// [AIV_SHORT]  Build version: 14.3.393 - Tuesday, October 29th, 2024, 5:57:08 PM  
 !function(e){function t(t){for(var n,r,a=t[0],o=t[1],s=0,l=[];s<a.length;s++)r=a[s],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&l.push(i[r][0]),i[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(c&&c(t);l.length;)l.shift()()}var n={},r={0:0},i={0:0};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[];r[e]?t.push(r[e]):0!==r[e]&&{2:1}[e]&&t.push(r[e]=new Promise((function(t,n){for(var i=e+".a998df22734862868909.css",o=a.p+i,s=document.getElementsByTagName("link"),l=0;l<s.length;l++){var c=(d=s[l]).getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(c===i||c===o))return t()}var u=document.getElementsByTagName("style");for(l=0;l<u.length;l++){var d;if((c=(d=u[l]).getAttribute("data-href"))===i||c===o)return t()}var h=document.createElement("link");h.rel="stylesheet",h.type="text/css",h.onload=t,h.onerror=function(t){var i=t&&t.target&&t.target.src||o,a=new Error("Loading CSS chunk "+e+" failed.\n("+i+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=i,delete r[e],h.parentNode.removeChild(h),n(a)},h.href=o,document.getElementsByTagName("head")[0].appendChild(h)})).then((function(){r[e]=0})));var n=i[e];if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((function(t,r){n=i[e]=[t,r]}));t.push(n[2]=o);var s,l=document.createElement("script");l.charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.src=function(e){return a.p+"scripts/"+e+".bundle.a998df22734862868909.js"}(e);var c=new Error;s=function(t){l.onerror=l.onload=null,clearTimeout(u);var n=i[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+a+")",c.name="ChunkLoadError",c.type=r,c.request=a,n[1](c)}i[e]=void 0}};var u=setTimeout((function(){s({type:"timeout",target:l})}),12e4);l.onerror=l.onload=s,document.head.appendChild(l)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var o=window.webpackJsonp=window.webpackJsonp||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var l=0;l<o.length;l++)t(o[l]);var c=s;a(a.s=1053)}([function(e,t,n){"use strict";e.exports=n(1058)},function(e,n,r){"use strict";r.d(n,"q",(function(){return d})),r.d(n,"g",(function(){return u})),r.d(n,"i",(function(){return i})),r.d(n,"f",(function(){return a})),r.d(n,"e",(function(){return fr})),r.d(n,"p",(function(){return Ir})),r.d(n,"j",(function(){return Pr})),r.d(n,"l",(function(){return Dr})),r.d(n,"h",(function(){return Nr})),r.d(n,"k",(function(){return Lr})),r.d(n,"m",(function(){return Rr})),r.d(n,"n",(function(){return Br})),r.d(n,"o",(function(){return jr})),r.d(n,"r",(function(){return Er})),r.d(n,"c",(function(){return o})),r.d(n,"a",(function(){return s})),r.d(n,"b",(function(){return l})),r.d(n,"d",(function(){return c}));var i={};r.r(i),r.d(i,"COUNTRIES",(function(){return h}));var a={};r.r(a),r.d(a,"OFFICE_COLOR_LIST",(function(){return f})),r.d(a,"COLOR_LIST",(function(){return p}));var o={};r.r(o),r.d(o,"validatorConfig",(function(){return de})),r.d(o,"defaultIfEmpty",(function(){return he})),r.d(o,"isJsonString",(function(){return fe})),r.d(o,"handleRefreshToken",(function(){return pe})),r.d(o,"setToken",(function(){return me})),r.d(o,"getToken",(function(){return ge})),r.d(o,"destroyAuth",(function(){return ve})),r.d(o,"getFileType",(function(){return be})),r.d(o,"convertRemToPx",(function(){return ye})),r.d(o,"msToTimestamp",(function(){return Ae})),r.d(o,"focusInCurrentTarget",(function(){return _e})),r.d(o,"formatDate",(function(){return we})),r.d(o,"formatDateTime",(function(){return Ee})),r.d(o,"scrollElementTop",(function(){return Se})),r.d(o,"scrollElementLeft",(function(){return Ce})),r.d(o,"isFirefox",(function(){return Te})),r.d(o,"isIEBrowser",(function(){return ke})),r.d(o,"isEdgeBrowser",(function(){return xe})),r.d(o,"isSafari",(function(){return Oe})),r.d(o,"isCurrentUserId",(function(){return Ie})),r.d(o,"getCurrentUserId",(function(){return Me})),r.d(o,"preventKeyDownSideEffect",(function(){return De})),r.d(o,"formatFileSize",(function(){return Ne})),r.d(o,"percentage",(function(){return Le})),r.d(o,"pluralize",(function(){return Re})),r.d(o,"isUploadingAttachment",(function(){return Be})),r.d(o,"isChapterUploadingAttachments",(function(){return je})),r.d(o,"closeChapterAttachmentModal",(function(){return Fe})),r.d(o,"clearDataWhenExitingVideo",(function(){return Ue})),r.d(o,"displayGalleryVideoData",(function(){return He})),r.d(o,"generateLoadingSemanticBlocks",(function(){return ze})),r.d(o,"generateChapterSbImages",(function(){return Ve})),r.d(o,"generateLoadingCogvidItems",(function(){return We})),r.d(o,"arrayBufferToBase64",(function(){return Ge})),r.d(o,"isVideoOwner",(function(){return qe})),r.d(o,"checkPermission",(function(){return Ye})),r.d(o,"checkChapterPermission",(function(){return Ke})),r.d(o,"snapshotFirstArea",(function(){return Xe})),r.d(o,"getScaffIdBaseOnMenu",(function(){return Qe})),r.d(o,"handleDisplayDataForRetranscodingVideo",(function(){return $e})),r.d(o,"formatMoney",(function(){return Je})),r.d(o,"chapterItemStyle",(function(){return Ze})),r.d(o,"getBase64Image",(function(){return et})),r.d(o,"buildURLWithSearchParams",(function(){return tt})),r.d(o,"removeURLSearchParams",(function(){return nt})),r.d(o,"addURLSearchParams",(function(){return rt})),r.d(o,"addURLParamsWithPath",(function(){return it})),r.d(o,"urlQuery",(function(){return at})),r.d(o,"urlQueryHook",(function(){return ot})),r.d(o,"parseDate",(function(){return st})),r.d(o,"isCheckLockFirstArea",(function(){return lt})),r.d(o,"nFormatter",(function(){return ct})),r.d(o,"pluralize2",(function(){return ut})),r.d(o,"getCurrentVideoCategory",(function(){return dt})),r.d(o,"getDataFromUrl",(function(){return ht})),r.d(o,"generateVideoUrl",(function(){return ft})),r.d(o,"getResumableHeaders",(function(){return pt})),r.d(o,"checkIsPublicProcessing",(function(){return mt})),r.d(o,"buildVideoList",(function(){return gt})),r.d(o,"getIndicatorVideoIndex",(function(){return vt})),r.d(o,"checkCogvidStatus",(function(){return bt})),r.d(o,"changeURLWithoutSideEffect",(function(){return yt})),r.d(o,"saveLastStateToLocalStorage",(function(){return At})),r.d(o,"getLastStateFromLocalStorage",(function(){return _t})),r.d(o,"convertChapterPermission",(function(){return wt})),r.d(o,"isVideoFile",(function(){return Et})),r.d(o,"updateURLSearchParams",(function(){return St})),r.d(o,"loadFbApi",(function(){return Tt})),r.d(o,"checkLoggedIn",(function(){return kt})),r.d(o,"setCookie",(function(){return xt})),r.d(o,"getCookie",(function(){return Ot})),r.d(o,"createDummyDailyVideo",(function(){return It})),r.d(o,"replaceRouteState",(function(){return Mt})),r.d(o,"getDatesInMonth",(function(){return Pt})),r.d(o,"insertDummyDailyVideos",(function(){return Dt})),r.d(o,"getCogvidItemHeight",(function(){return Nt})),r.d(o,"checkCanAnoynymousLike",(function(){return Lt})),r.d(o,"convertMinsToHrsMins",(function(){return Rt})),r.d(o,"getReadableTimeDuration",(function(){return Bt})),r.d(o,"trackAnonymousLikeInfo",(function(){return jt})),r.d(o,"convertToCurrentTZ",(function(){return Ft})),r.d(o,"toDateWithTimezone",(function(){return Ut})),r.d(o,"displayCoverImage",(function(){return Ht})),r.d(o,"getRenderList",(function(){return zt})),r.d(o,"encrypt",(function(){return Vt})),r.d(o,"decrypt",(function(){return Wt})),r.d(o,"getLevelBackgrounds",(function(){return Gt})),r.d(o,"setPkgAgtParams",(function(){return qt})),r.d(o,"getPkgAgtParams",(function(){return Yt})),r.d(o,"checkCanPlayVideo",(function(){return Kt})),r.d(o,"download",(function(){return Xt})),r.d(o,"getFileExtension",(function(){return Qt})),r.d(o,"getDisplayRating",(function(){return Jt})),r.d(o,"getElementCoords",(function(){return Zt})),r.d(o,"scrollToElementById",(function(){return en})),r.d(o,"scrollElementIntoView",(function(){return tn})),r.d(o,"isExploring",(function(){return nn})),r.d(o,"isShare",(function(){return rn})),r.d(o,"isCreate",(function(){return an})),r.d(o,"normalizeText",(function(){return on})),r.d(o,"blurFirstArea",(function(){return sn})),r.d(o,"storeUrl",(function(){return ln})),r.d(o,"restoreUrl",(function(){return cn})),r.d(o,"checkSubscribedOffer",(function(){return un})),r.d(o,"checkChapterAccessible",(function(){return dn})),r.d(o,"hhmmToMinutes",(function(){return hn})),r.d(o,"toTitleCase",(function(){return fn})),r.d(o,"handleFileSelect",(function(){return pn}));var s={};r.r(s),r.d(s,"quickBuyOneItem",(function(){return vn})),r.d(s,"appTracking",(function(){return bn})),r.d(s,"cogvidPers",(function(){return yn})),r.d(s,"appLogging",(function(){return An})),r.d(s,"stateTracking",(function(){return _n})),r.d(s,"clearStateTracking",(function(){return wn})),r.d(s,"stateTrackingVideoTime",(function(){return En}));var l={};r.r(l),r.d(l,"reportResourceStoreDesktopLoaded",(function(){return Hn})),r.d(l,"reportResourcePreviewDesktopLoaded",(function(){return zn})),r.d(l,"reportTeacherProfileViewDesktopLoaded",(function(){return Vn})),r.d(l,"reportRegFormDesktopSubmitted",(function(){return Wn})),r.d(l,"reportAccountActivationDesktopSubmitted",(function(){return Gn})),r.d(l,"reportLoginFormDesktopSubmitted",(function(){return qn})),r.d(l,"reportSignUpWithGoogleDesktop",(function(){return Yn})),r.d(l,"reportIncompletePurchaseDesktop",(function(){return Kn})),r.d(l,"reportCompletePurchaseResourcesDesktop",(function(){return Xn})),r.d(l,"reportCompletePurchaseClassDesktop",(function(){return Qn})),r.d(l,"reportFreeResourceDownloadDesktop",(function(){return $n})),r.d(l,"reportIncompleteSubscriptionDesktop",(function(){return Jn})),r.d(l,"reportCompleteSubscriptionDesktop",(function(){return Zn})),r.d(l,"reportOpenSubscriptionFormDesktop",(function(){return er})),r.d(l,"reportTeacherSubscribedPlanDesktop",(function(){return tr})),r.d(l,"reportTeacherCreatedProductDesktop",(function(){return nr}));var c={};r.r(c),r.d(c,"CVS_PUBLISHED",(function(){return Fr})),r.d(c,"CVS_FAILED",(function(){return Ur})),r.d(c,"CVS_COMPOSING",(function(){return Hr})),r.d(c,"CVS_INITIALLIZING",(function(){return zr}));var u=r(168),d={ACCESS_TOKEN:"ACCESS_TOKEN"},h=[{Code:"AF",Name:"Afghanistan"},{Code:"AX",Name:"Åland Islands"},{Code:"AL",Name:"Albania"},{Code:"DZ",Name:"Algeria"},{Code:"AS",Name:"American Samoa"},{Code:"AD",Name:"Andorra"},{Code:"AO",Name:"Angola"},{Code:"AI",Name:"Anguilla"},{Code:"AQ",Name:"Antarctica"},{Code:"AG",Name:"Antigua and Barbuda"},{Code:"AR",Name:"Argentina"},{Code:"AM",Name:"Armenia"},{Code:"AW",Name:"Aruba"},{Code:"AU",Name:"Australia"},{Code:"AT",Name:"Austria"},{Code:"AZ",Name:"Azerbaijan"},{Code:"BS",Name:"Bahamas"},{Code:"BH",Name:"Bahrain"},{Code:"BD",Name:"Bangladesh"},{Code:"BB",Name:"Barbados"},{Code:"BY",Name:"Belarus"},{Code:"BE",Name:"Belgium"},{Code:"BZ",Name:"Belize"},{Code:"BJ",Name:"Benin"},{Code:"BM",Name:"Bermuda"},{Code:"BT",Name:"Bhutan"},{Code:"BO",Name:"Bolivia, Plurinational State of"},{Code:"BQ",Name:"Bonaire, Sint Eustatius and Saba"},{Code:"BA",Name:"Bosnia and Herzegovina"},{Code:"BW",Name:"Botswana"},{Code:"BV",Name:"Bouvet Island"},{Code:"BR",Name:"Brazil"},{Code:"IO",Name:"British Indian Ocean Territory"},{Code:"BN",Name:"Brunei Darussalam"},{Code:"BG",Name:"Bulgaria"},{Code:"BF",Name:"Burkina Faso"},{Code:"BI",Name:"Burundi"},{Code:"KH",Name:"Cambodia"},{Code:"CM",Name:"Cameroon"},{Code:"CA",Name:"Canada"},{Code:"CV",Name:"Cape Verde"},{Code:"KY",Name:"Cayman Islands"},{Code:"CF",Name:"Central African Republic"},{Code:"TD",Name:"Chad"},{Code:"CL",Name:"Chile"},{Code:"CN",Name:"China"},{Code:"CX",Name:"Christmas Island"},{Code:"CC",Name:"Cocos (Keeling) Islands"},{Code:"CO",Name:"Colombia"},{Code:"KM",Name:"Comoros"},{Code:"CG",Name:"Congo"},{Code:"CD",Name:"Congo, the Democratic Republic of the"},{Code:"CK",Name:"Cook Islands"},{Code:"CR",Name:"Costa Rica"},{Code:"CI",Name:"Côte d'Ivoire"},{Code:"HR",Name:"Croatia"},{Code:"CU",Name:"Cuba"},{Code:"CW",Name:"Curaçao"},{Code:"CY",Name:"Cyprus"},{Code:"CZ",Name:"Czech Republic"},{Code:"DK",Name:"Denmark"},{Code:"DJ",Name:"Djibouti"},{Code:"DM",Name:"Dominica"},{Code:"DO",Name:"Dominican Republic"},{Code:"EC",Name:"Ecuador"},{Code:"EG",Name:"Egypt"},{Code:"SV",Name:"El Salvador"},{Code:"GQ",Name:"Equatorial Guinea"},{Code:"ER",Name:"Eritrea"},{Code:"EE",Name:"Estonia"},{Code:"ET",Name:"Ethiopia"},{Code:"FK",Name:"Falkland Islands (Malvinas)"},{Code:"FO",Name:"Faroe Islands"},{Code:"FJ",Name:"Fiji"},{Code:"FI",Name:"Finland"},{Code:"FR",Name:"France"},{Code:"GF",Name:"French Guiana"},{Code:"PF",Name:"French Polynesia"},{Code:"TF",Name:"French Southern Territories"},{Code:"GA",Name:"Gabon"},{Code:"GM",Name:"Gambia"},{Code:"GE",Name:"Georgia"},{Code:"DE",Name:"Germany"},{Code:"GH",Name:"Ghana"},{Code:"GI",Name:"Gibraltar"},{Code:"GR",Name:"Greece"},{Code:"GL",Name:"Greenland"},{Code:"GD",Name:"Grenada"},{Code:"GP",Name:"Guadeloupe"},{Code:"GU",Name:"Guam"},{Code:"GT",Name:"Guatemala"},{Code:"GG",Name:"Guernsey"},{Code:"GN",Name:"Guinea"},{Code:"GW",Name:"Guinea-Bissau"},{Code:"GY",Name:"Guyana"},{Code:"HT",Name:"Haiti"},{Code:"HM",Name:"Heard Island and McDonald Islands"},{Code:"VA",Name:"Holy See (Vatican City State)"},{Code:"HN",Name:"Honduras"},{Code:"HK",Name:"Hong Kong"},{Code:"HU",Name:"Hungary"},{Code:"IS",Name:"Iceland"},{Code:"IN",Name:"India"},{Code:"ID",Name:"Indonesia"},{Code:"IR",Name:"Iran, Islamic Republic of"},{Code:"IQ",Name:"Iraq"},{Code:"IE",Name:"Ireland"},{Code:"IM",Name:"Isle of Man"},{Code:"IL",Name:"Israel"},{Code:"IT",Name:"Italy"},{Code:"JM",Name:"Jamaica"},{Code:"JP",Name:"Japan"},{Code:"JE",Name:"Jersey"},{Code:"JO",Name:"Jordan"},{Code:"KZ",Name:"Kazakhstan"},{Code:"KE",Name:"Kenya"},{Code:"KI",Name:"Kiribati"},{Code:"KP",Name:"Korea, Democratic People's Republic of"},{Code:"KR",Name:"Korea, Republic of"},{Code:"KW",Name:"Kuwait"},{Code:"KG",Name:"Kyrgyzstan"},{Code:"LA",Name:"Lao People's Democratic Republic"},{Code:"LV",Name:"Latvia"},{Code:"LB",Name:"Lebanon"},{Code:"LS",Name:"Lesotho"},{Code:"LR",Name:"Liberia"},{Code:"LY",Name:"Libya"},{Code:"LI",Name:"Liechtenstein"},{Code:"LT",Name:"Lithuania"},{Code:"LU",Name:"Luxembourg"},{Code:"MO",Name:"Macao"},{Code:"MK",Name:"Macedonia, the Former Yugoslav Republic of"},{Code:"MG",Name:"Madagascar"},{Code:"MW",Name:"Malawi"},{Code:"MY",Name:"Malaysia"},{Code:"MV",Name:"Maldives"},{Code:"ML",Name:"Mali"},{Code:"MT",Name:"Malta"},{Code:"MH",Name:"Marshall Islands"},{Code:"MQ",Name:"Martinique"},{Code:"MR",Name:"Mauritania"},{Code:"MU",Name:"Mauritius"},{Code:"YT",Name:"Mayotte"},{Code:"MX",Name:"Mexico"},{Code:"FM",Name:"Micronesia, Federated States of"},{Code:"MD",Name:"Moldova, Republic of"},{Code:"MC",Name:"Monaco"},{Code:"MN",Name:"Mongolia"},{Code:"ME",Name:"Montenegro"},{Code:"MS",Name:"Montserrat"},{Code:"MA",Name:"Morocco"},{Code:"MZ",Name:"Mozambique"},{Code:"MM",Name:"Myanmar"},{Code:"NA",Name:"Namibia"},{Code:"NR",Name:"Nauru"},{Code:"NP",Name:"Nepal"},{Code:"NL",Name:"Netherlands"},{Code:"NC",Name:"New Caledonia"},{Code:"NZ",Name:"New Zealand"},{Code:"NI",Name:"Nicaragua"},{Code:"NE",Name:"Niger"},{Code:"NG",Name:"Nigeria"},{Code:"NU",Name:"Niue"},{Code:"NF",Name:"Norfolk Island"},{Code:"MP",Name:"Northern Mariana Islands"},{Code:"NO",Name:"Norway"},{Code:"OM",Name:"Oman"},{Code:"PK",Name:"Pakistan"},{Code:"PW",Name:"Palau"},{Code:"PS",Name:"Palestine, State of"},{Code:"PA",Name:"Panama"},{Code:"PG",Name:"Papua New Guinea"},{Code:"PY",Name:"Paraguay"},{Code:"PE",Name:"Peru"},{Code:"PH",Name:"Philippines"},{Code:"PN",Name:"Pitcairn"},{Code:"PL",Name:"Poland"},{Code:"PT",Name:"Portugal"},{Code:"PR",Name:"Puerto Rico"},{Code:"QA",Name:"Qatar"},{Code:"RE",Name:"Réunion"},{Code:"RO",Name:"Romania"},{Code:"RU",Name:"Russian Federation"},{Code:"RW",Name:"Rwanda"},{Code:"BL",Name:"Saint Barthélemy"},{Code:"SH",Name:"Saint Helena, Ascension and Tristan da Cunha"},{Code:"KN",Name:"Saint Kitts and Nevis"},{Code:"LC",Name:"Saint Lucia"},{Code:"MF",Name:"Saint Martin (French part)"},{Code:"PM",Name:"Saint Pierre and Miquelon"},{Code:"VC",Name:"Saint Vincent and the Grenadines"},{Code:"WS",Name:"Samoa"},{Code:"SM",Name:"San Marino"},{Code:"ST",Name:"Sao Tome and Principe"},{Code:"SA",Name:"Saudi Arabia"},{Code:"SN",Name:"Senegal"},{Code:"RS",Name:"Serbia"},{Code:"SC",Name:"Seychelles"},{Code:"SL",Name:"Sierra Leone"},{Code:"SG",Name:"Singapore"},{Code:"SX",Name:"Sint Maarten (Dutch part)"},{Code:"SK",Name:"Slovakia"},{Code:"SI",Name:"Slovenia"},{Code:"SB",Name:"Solomon Islands"},{Code:"SO",Name:"Somalia"},{Code:"ZA",Name:"South Africa"},{Code:"GS",Name:"South Georgia and the South Sandwich Islands"},{Code:"SS",Name:"South Sudan"},{Code:"ES",Name:"Spain"},{Code:"LK",Name:"Sri Lanka"},{Code:"SD",Name:"Sudan"},{Code:"SR",Name:"Suriname"},{Code:"SJ",Name:"Svalbard and Jan Mayen"},{Code:"SZ",Name:"Swaziland"},{Code:"SE",Name:"Sweden"},{Code:"CH",Name:"Switzerland"},{Code:"SY",Name:"Syrian Arab Republic"},{Code:"TW",Name:"Taiwan, Province of China"},{Code:"TJ",Name:"Tajikistan"},{Code:"TZ",Name:"Tanzania, United Republic of"},{Code:"TH",Name:"Thailand"},{Code:"TL",Name:"Timor-Leste"},{Code:"TG",Name:"Togo"},{Code:"TK",Name:"Tokelau"},{Code:"TO",Name:"Tonga"},{Code:"TT",Name:"Trinidad and Tobago"},{Code:"TN",Name:"Tunisia"},{Code:"TR",Name:"Turkey"},{Code:"TM",Name:"Turkmenistan"},{Code:"TC",Name:"Turks and Caicos Islands"},{Code:"TV",Name:"Tuvalu"},{Code:"UG",Name:"Uganda"},{Code:"UA",Name:"Ukraine"},{Code:"AE",Name:"United Arab Emirates"},{Code:"GB",Name:"United Kingdom"},{Code:"US",Name:"United States"},{Code:"UM",Name:"United States Minor Outlying Islands"},{Code:"UY",Name:"Uruguay"},{Code:"UZ",Name:"Uzbekistan"},{Code:"VU",Name:"Vanuatu"},{Code:"VE",Name:"Venezuela, Bolivarian Republic of"},{Code:"VN",Name:"Vietnam"},{Code:"VG",Name:"Virgin Islands, British"},{Code:"VI",Name:"Virgin Islands, U.S."},{Code:"WF",Name:"Wallis and Futuna"},{Code:"EH",Name:"Western Sahara"},{Code:"YE",Name:"Yemen"},{Code:"ZM",Name:"Zambia"},{Code:"ZW",Name:"Zimbabwe"}],f=["#FFFFFF","#000000","#EEECE1","#1F497D","#4F81BD","#C0504D","#9BBB59","#8064A2","#4BACC6","#F79646","#F2F2F2","#808080","#DDD9C4","#C5D9F1","#DCE6F1","#F2DCDB","#EBF1DE","#E4DFEC","#DAEEF3","#FDE9D9","#D9D9D9","#595959","#C4BD97","#8DB4E2","#B8CCE4","#E6B8B7","#D8E4BC","#CCC0DA","#B7DEE8","#FCD5B4","#BFBFBF","#404040","#948A54","#538DD5","#95B3D7","#DA9694","#C4D79B","#B1A0C7","#92CDDC","#FABF8F","#A6A6A6","#262626","#494529","#16365C","#366092","#963634","#76933C","#60497A","#31869B","#E26B0A","#808080","#0D0D0D","#1D1B10","#0F243E","#244062","#632523","#4F6228","#403151","#215967","#974706","#C00000","#FF0000","#FFC000","#FFFF00","#92D050","#00B050","#00B0F0","#0070C0","#002060","#7030A0","#1E2761","#7A2048","#408EC6"],p=["#434343","#555555","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF","#980000","#FF0000","#FF9900","#FFFF00","#00FF00","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF","#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#741B47","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"],m=r(2),g=r.n(m),v=r(26),b=r(8),y=r(21),A=r.n(y),_=r(186),w=r.n(_),E=r(40),S=r.n(E),C=r(24),T=r.n(C),k=r(9),x=r.n(k),O=r(60),I=r.n(O),M=r(29),P=r.n(M),D=r(0),N=r.n(D),L=r(92),R=r.n(L),B=r(243),j=r.n(B),F=r(441),U=r.n(F),H=r(122),z=r.n(H),V=r(277),W=r.n(V),G=r(140),q=r(578),Y=r.n(q),K=r(43),X=r.n(K),Q=r(162),$=r(7),J=r(20),Z=r(5),ee=r(109),te=r(54);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ie(e){var t=function(e,t){if("object"!==w()(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==w()(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===w()(t)?t:String(t)}var ae=u.HOURS_BETWEEN_SAME_ANOYNYMOUS_LIKE,oe=(u.CHAPTER_PROCESSING_STATUS,u.DAILY_VIDEO_DATE_FORMAT),se=u.CHAPTER_TYPES,le=u.VIDEO_CATEGORY,ce=u.VIDEO_LIST_FILTER,ue={pkg:"",agt:""},de={element:function(e){return N.a.createElement("div",{className:"text-danger"},e)},messages:{email:"Please enter a valid email address.",required:"Please enter :attribute.",max:"The :attribute text must not exceed :max characters."},validators:{confirmPasswordRule:{message:"The :attribute and password does not match.",rule:function(e,t){return e===t[0]}},newPasswordRule:{message:Object(J.b)("message.differentNewPassword"),rule:function(e,t){return e!==t[0]}},hasMixedCharacters:{message:Object(J.b)("message.passwordMustHaveMixedCharacters"),rule:function(e){return new RegExp(/[a-z]/).test(e)&&new RegExp(/[A-Z]/).test(e)}},hasSpecial:{message:Object(J.b)("message.passwordMustHaveSpecial"),rule:function(e){return new RegExp(/[!#@$%^&*)(+=._-]/).test(e)}},recaptcha:{message:Object(J.b)("message.recaptcha"),rule:function(e){return e}},videoTitleRequired:{message:Object(J.b)("message.videoTitleRequired"),required:!0,rule:function(e){return!!e&&e.trim().length>0}},eventTitleRequired:{message:Object(J.b)("message.eventTitleRequired"),required:!0,rule:function(e){return!!e&&e.trim().length>0}},videoSubjectRequired:{message:Object(J.b)("message.videoSubjectRequired"),required:!0,rule:function(e){return!!e&&e.trim().length>0}},videoTopicRequired:{message:Object(J.b)("message.videoTopicRequired"),required:!0,rule:function(e){return!!e&&e.trim().length>0}},categoriesRequired:{message:Object(J.b)("message.categoriesRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},fileTitleRequired:{message:Object(J.b)("message.fileTitleRequired"),required:!0,rule:function(e){return!!e&&e.trim().length>0}},chapterRequired:{message:Object(J.b)("message.chapterRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},courseCodeRequired:{message:Object(J.b)("message.courseCodeRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},courseSequenceRequired:{message:Object(J.b)("message.courseSequenceRequired"),required:!0,rule:function(e){return!!e||0===e}},courseTitleRequired:{message:Object(J.b)("message.courseTitleRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},resourceTitleRequired:{message:Object(J.b)("message.resourceTitleRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},resourceStoreTitleRequired:{message:Object(J.b)("message.resourceStoreTitleRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},resourceStoreThumbnailRequired:{message:Object(J.b)("message.resourceStoreThumbnailRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},textbookTitleRequired:{message:Object(J.b)("message.textbookTitleRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},textbookAuthorRequired:{message:Object(J.b)("message.textbookAuthorRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},textbookPublisherRequired:{message:Object(J.b)("message.textbookPublisherRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},courseTotalRequired:{message:Object(J.b)("message.courseTotalRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},maxCourseSequence:{message:Object(J.b)("validation.maxNumberExceeded",{name:Object(J.b)("courseSequence"),max:u.MAX_COURSE_SEQUENCE+1}),required:!1,rule:function(e){return e<=u.MAX_COURSE_SEQUENCE}},validPrice:{message:Object(J.b)("message.validPrice"),rule:function(e){return!isNaN(parseFloat(e))}},priceBoundary:{message:Object(J.b)("message.priceBoundaryExceeded",{min:"$0.01",max:"$999999"}),rule:function(e){return e>=.01&&e<=999999}},groupNameRequired:{message:Object(J.b)("message.groupNameRequired"),required:!0,rule:function(e){return!!e&&e.trim().length>0}},primaryCourseCodeRule:{message:Object(J.b)("message.primaryCourseCodeCannotSameAsCourseCode"),rule:function(e,t){return!e||e!==t[0]}},primaryCourseSequenceRule:{message:Object(J.b)("message.primaryCourseSerialRequired"),rule:function(e,t){return!t[0]||""!==e&&e>=0}},cloneCourseCodeRequired:{message:Object(J.b)("message.courseCodeRequired"),required:!0,rule:function(e,t){return!t[0]||!!e&&e.trim().length>0}},remarkRequired:{message:Object(J.b)("message.remarkRequired"),required:!0,rule:function(e){return!!e&&e.trim().length>0}},zipRequired:{message:Object(J.b)("message.zipRequired"),required:!0,rule:function(e){return!!e&&e.trim().length>0}},validZip:{message:Object(J.b)("message.invalidZip"),rule:function(e){return new RegExp(/^[0-9]{5}(?:-[0-9]{4})?$/).test(e)}},firstnameRequired:{message:Object(J.b)("message.firstnameRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},lastnameRequired:{message:Object(J.b)("message.lastnameRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},emailAddressRequired:{message:Object(J.b)("message.emailAddressRequired"),required:!0,rule:function(e){return!Object($.isEmpty)(e)}},validEndtime:{message:Object(J.b)("message.invalidEndtime"),required:!0,rule:function(e,t){var n=P()(t,2),r=n[0],i=n[1];return r>1||R()(e,"hh:mm").isAfter(R()(i,"hh:mm"))}},validTotalHours:{message:Object(J.b)("message.invalidTotalHours"),required:!0,rule:function(e){return e>=1&&e<=999}},requiredAvatar:{message:"Please upload avatar.",required:!0,rule:function(e){return!!e}}},autoForceUpdate:void 0},he=function(e,t){return Object($.isEmpty)(e)?t:e},fe=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},pe=Object($.throttle)(function(){var e=I()(x.a.mark((function e(t){var n,r;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(30,n=R()(t.expiresDate).diff(R()(),"seconds"),r=n-30,clearTimeout(window.refreshTokenTimeout),!(t.refreshExpiresIn<=30)){e.next=7;break}return v.a.dispatch(b.a.authLogOut()),e.abrupt("return");case 7:if(!(r>0)){e.next=11;break}window.refreshTokenTimeout=setTimeout((function(){v.a.dispatch(b.a.refreshToken(t))}),1e3*r),e.next=13;break;case 11:return e.next=13,v.a.dispatch(b.a.refreshToken(t));case 13:return e.abrupt("return",!0);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),1e3,{trailing:!1}),me=function(){var e=I()(x.a.mark((function e(t){var n,r;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={accessToken:t.access_token||t.token,refreshToken:t.refresh_token||t.refreshToken,expiresIn:t.expires_in||t.expiresIn,expiresDate:t.expiresDate||R()().add(t.expires_in,"s"),refreshExpiresIn:t.refresh_expires_in||t.refreshExpiresIn},pe(n),window.freeVideoChapter={},r=Vt(n),e.next=6,localStorage.setItem(d.ACCESS_TOKEN,r);case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ge=function(){var e=localStorage.getItem(d.ACCESS_TOKEN);return Wt(e)},ve=function(){var e=I()(x.a.mark((function e(){return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(window.refreshTokenTimeout),e.next=3,localStorage.removeItem(d.ACCESS_TOKEN);case 3:return e.abrupt("return",!0);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=function(e){var t=e.split("/")[0];if("m3u8"===t)return"m3u8";if("video"===t)return"video";if("audio"===t)return"audio";if("image"===t)return"image";var n={pdf:["application/pdf"],powerpoint:["application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation"],excel:["application/octet-stream","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],word:["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],archive:["application/x-rar-compressed","application/x-7z-compressed","application/zip"]};for(var r in n)if(n[r].indexOf(e)>=0)return r;return""},ye=function(e){var t=window.innerWidth,n=te.fontSizeBase.replace(/rem/,""),r=te.fontSizeLg.replace(/rem/,""),i=te.fontSizeSm.replace(/rem/,""),a=te.screenLarge.replace(/px/,""),o=t<=te.screenSmall.replace(/px/,"")?i:t>=a?r:n;return e.replace(/rem/,"")*(u.BASE_PIXEL_SIZE*o)},Ae=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HH:mm:ss";if(0===e){var n=R()().utcOffset(0);return n.set({hour:0,minute:0,second:0,millisecond:0}),n.toISOString(),n.format(t)}return R.a.utc(e).format(t)},_e=function(e){var t=e.relatedTarget,n=e.currentTarget;if(null===t)return!1;for(var r=t.parentNode;null!==r;){if(r===n)return!0;r=r.parentNode}return!1},we=function(e){return R()(e).format(u.DATE_FORMAT)},Ee=function(e){return R()(e).format(u.DATE_TIME_FORMAT)},Se=function(e,t){e&&(e.scrollTo&&!Te()?e.scrollTo({top:t,behavior:"smooth"}):void 0!==e.scrollTop&&(e.scrollTop=t))},Ce=function(e,t){e&&(e.scrollTo&&!Te()?e.scrollTo({left:t,behavior:"smooth"}):void 0!==e.scrollLeft&&(e.scrollLeft=t))},Te=function(){return-1!==navigator.userAgent.indexOf("Firefox")},ke=function(){return!!document.documentMode},xe=function(){return!ke()&&!!window.StyleMedia},Oe=function(){return!!window.safari},Ie=function(e){var t=Object($.get)(v.a.getState(),"auth.userInfo.userId","");return!!t&&t===e},Me=function(){return Object($.get)(v.a.getState(),"auth.userInfo.userId","")},Pe=[32,69,87,13,37,38,39,40],De=function(e){Pe.includes(e.keyCode)&&e.nativeEvent.stopImmediatePropagation(),65===e.keyCode&&e.ctrlKey&&(e.preventDefault(),e.target&&e.target.select())},Ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=1024;if(Math.abs(e)<n)return"".concat(e," B");var r=["kB","MB","GB","TB","PB","EB","ZB","YB"],i=-1,a=Math.pow(10,t);do{e/=n,++i}while(Math.round(Math.abs(e)*a)/a>=n&&i<r.length-1);return"".concat(e.toFixed(t)," ").concat(r[i])},Le=function(e){return(100*e).toFixed(2)},Re=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"s";return"".concat(e," ").concat(t).concat(e>1?n:"")},Be=function(){var e=Object($.get)(v.a.getState(),"cogvid.chapterAttachments",{}),t=!1;if(Object($.forEach)(e,(function(e){Object($.forEach)(e,(function(e){if(t=e.some((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).status;return!t&&r!==u.ATTACHED_SUCCESSFULLY})))return!1}))})),t)return!0;var n=Object($.get)(v.a.getState(),"cogvid.videoAttachments",{});return Object($.forEach)(n,(function(e){if(t=e.some((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).status;return!t&&r!==u.ATTACHED_SUCCESSFULLY})))return!1})),t},je=function(e,t){var n=Object($.get)(v.a.getState(),"cogvid.chapterAttachments",{});return Object($.get)(n,[e,t],[]).some((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).status;return!t&&r!==u.ATTACHED_SUCCESSFULLY}))},Fe=function(){setTimeout((function(){window.isCAModalHovered||window.isCABtnHovered||v.a.dispatch(b.e.toggleDisplayChapterAttachments(!1))}),500)},Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.clearChapterAttachmentData,n=void 0!==t&&t,r=e.clearCogvidDetails,i=void 0!==r&&r,a=e.clearVideoTime,o=void 0!==a&&a,s=e.clearWithinVideoSearch,l=void 0!==s&&s,c=e.closeCaModal,u=void 0===c||c,d=e.closeVaModal,h=void 0===d||d,f=e.closeAttachmentReview,p=void 0===f||f,m=e.execute,g=void 0===m||m,y=v.a.dispatch,A=[];return A.push((function(){return y(b.e.toggleEdittingChapterTextMode(!1))})),A.push((function(){return y({type:Z.b.RESET_CANVAS_PROPERTIES})})),u&&A.push((function(){return y(b.e.toggleDisplayChapterAttachments(!1))})),h&&A.push((function(){return y(b.e.displayVideoAttachments({}))})),n&&A.push((function(){return y({type:Z.e.RESET_CHAPTER_ATTACHMENT_DATA})})),A.push((function(){return y(b.e.updateCurrentSbData({contextualImg:""}))})),p&&A.push((function(){return y(b.e.updateReviewAttachment({attachmentId:"",fileName:""}))})),i&&(A.push((function(){return y({type:Z.e.RESET_COGVID_DETAILS})})),A.push((function(){return y(b.d.displaySlide(-1))}))),o&&A.push((function(){return y({type:Z.e.UPDATE_VIDEO_TIME,data:ee.j})})),l&&A.push((function(){return y(b.e.resetWithinVideoSearch({}))})),A.push((function(){return y(b.d.displayComments(null))})),A.push((function(){return y(b.d.displayNotes(null))})),g&&A.forEach((function(e){e()})),A},He=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.videoLength,n=void 0===t?0:t,r=e.chapters,i=void 0===r?[]:r,a=e.uid,o=void 0===a?"":a,s=(e.playlistUrl,e.thumbnailUrl,e.auto),l=e.semantics,c=e.rootContext,d=v.a.dispatch;if(s){var h=v.a.getState(),f=h.cogvid,p=(f=void 0===f?{}:f).galleryVideoData,m=void 0===p?{}:p;n=m.videoLength||0,i=m.chapters||[],o=m.uid||"",m.playlistUrl||"",m.thumbnailUrl||"",d({type:Z.e.UPDATE_VIDEO_TIME,data:ee.j})}d({type:Z.e.GET_CG_SUCCESS,data:i}),d(b.e.getSb({videoId:o,isLoadingRemaining:!0,timePoint:0,radius:50,initialSemantics:l,rootContext:c,videoLength:n})),d(b.e.updateCogvidDetails({videoId:o,videoType:u.VIDEO_TYPE.GALLERY,videoLength:n}))},ze=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=parseInt(e-t);if(i>0){for(var a=new Array(i).fill({}),o=0;o<i;o++){var s=o+t,l="0000".concat(s);l=l.substr(l.length-5),a[o]={blockSeq:s,contextualImage:"contextuals/ci_".concat(l,".jpg?ver=").concat(n),startTime:2e3*s+1,isLoading:r}}return a}return[]},Ve=function(e,t){var n=e.startBlockSeq,r=e.endTime,i=t.version,a=t.cognitiveResolutionUnit,o=t.rootContext,s=r/1e3/a-1;return Array.from({length:s-n+1},(function(e,t){var r="0000".concat(t+n);return r=r.substr(r.length-5),"".concat(o,"contextuals/ci_").concat(r,".jpg?ver=").concat(i)}))},We=function(e){var t=[];return e>0&&(t=T()(Array(e)).map((function(){return{isLoading:!0,cognitiveVideo:{}}}))),t},Ge=function(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)},qe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.videoId,r=t.userId,i=r||Object($.get)(v.a.getState(),"auth.userInfo.userId",""),a=zt().videoList||[],o=a.find((function(e){return e.uid===n}));return!!(i&&(null==o?void 0:o.uid))&&(null==o?void 0:null===(e=o.cognitiveVideo)||void 0===e?void 0:e.owner)===i},Ye=function(e,t){return!(!e&&!t)},Ke=function(e,t,n){return Ie(e)||Ie(t)||!!n},Xe=function(e){var t=document.getElementById("play-video-btn");t&&(t.style.display="none"),function(){for(var e,t,n=document.getElementById("canvas"),r=n.getContext("2d"),i=document.querySelectorAll("video"),a=0,o=i.length;a<o;a++){var s=i[a];if(s.src)try{e=s.videoWidth,t=s.videoHeight,n.width=e,n.height=t,r.fillRect(0,0,e,t),r.drawImage(s,0,0,e,t);var l=n.toDataURL();s.style.backgroundImage="url(".concat(l,")"),s.style.backgroundSize="cover",r.clearRect(0,0,e,t)}catch(e){continue}}}();var n=document.getElementById(u.VIDEO_AREA_ID);j()(n,{useCORS:!0,width:n.offsetWidth,height:n.offsetHeight,scrollX:0,scrollY:0}).then((function(n){t&&(t.style.display=""),n.toBlob((function(t){var n="".concat((new Date).getTime(),".jpeg");t.fileName=n,t.name=n,e&&e(t)}),"image/jpeg",1)}))},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e.ownerScaffId,Object($.get)(v.a.getState(),"cogvid.cogvidDetails.userScaffId")||Object($.get)(v.a.getState(),"cogvid.cogvidDetails.ownerScaffId"));return t},$e=function(e){var t=e.videoId,n=v.a.dispatch;Object($.get)(v.a.getState(),"cogvid.cogvidDetails.videoId")===t&&n(b.e.updateCogvidDetails({cognitiveVideo:{status:u.COGVID_STATUS.INITIALLIZING}})),n(b.e.updateCogvidListItem({videoId:t,data:{cognitiveVideo:{status:u.COGVID_STATUS.UPDATING}}}))},Je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD",n=u.CURRENCIES[t],r=n.localeCode,i=n.minimumFractionDigits,a=void 0===i?2:i,o=n.maximumFractionDigits,s=void 0===o?2:o;return Number(e).toLocaleString(r,{style:"currency",currency:t,minimumFractionDigits:a,maximumFractionDigits:s})},Ze=function(e){return{textDecoration:e.fontstyle&&e.fontstyle.some((function(e){return"U"===e}))?"underline":"none",fontWeight:e.fontstyle&&e.fontstyle.some((function(e){return"B"===e}))?"bold":"normal",fontStyle:e.fontstyle&&e.fontstyle.some((function(e){return"I"===e}))?"italic":"normal",color:e.foreground||"",fontSize:"".concat((e.fontsize||u.CHAPTER_TEXT_DEFAULT_PIXEL_SIZE)/16,"rem")}},et=function(e,t,n){var r=document.createElement("canvas");r.width=t||e.width,r.height=n||e.height;var i=r.getContext("2d");return t&&n?i.drawImage(e,0,0,t,n):i.drawImage(e,0,0),r.toDataURL("image/png").replace(/^data:image\/(png|jpg);base64,/,"")},tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new URLSearchParams("");t.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e[0]&&n.delete(e[0]),e[0]&&e[1]&&n.set.apply(n,T()(e))}));var r=n.toString(),i=e+(r?"?"+r:"");return i},nt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=window.location,a=i.pathname,o=i.search,s=new URLSearchParams(o);if(0!==e.length){e.map((function(e){return s.delete(e)}));var l=s.toString(),c=a+(l?"?"+l:"");return n||(t?Q.a.replace(c,r):Q.a.push(c,r)),c}},rt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=window.location.pathname,a=new URLSearchParams(window.location.search);e.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e[0]&&a.delete(e[0]),e[0]&&e[1]&&a.set.apply(a,T()(e))}));var o=a.toString(),s=i+(o?"?"+o:"");return n||(t?Q.a.replace(s,r):Q.a.push(s,r)),s},it=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=new URLSearchParams(window.location.search);e.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e[0]&&a.delete(e[0]),e[0]&&e[1]&&a.set.apply(a,T()(e))}));var o=a.toString(),s=r+(o?"?"+o:"");return n||(t?Q.a.replace(s,i):Q.a.push(s,i)),s},at=function(e){var t;return Y.a.parse(null===(t=Q.a.location)||void 0===t?void 0:t.search)[e]},ot=function(e){return new URLSearchParams(Object(G.h)().search).get(e)},st=function(e){try{var t=e.split("/"),n=P()(t,3),r=n[0],i=n[1],a=n[2];return Date.parse("".concat(i,"/").concat(r,"/").concat(a))?Date.parse("".concat(i,"/").concat(r,"/").concat(a)):""}catch(e){return""}},lt=function(){var e=u.VIDEO_CATEGORY;u.ACCESS_GRANT_TYPE;return dt()===e.EXPLORING},ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!Object($.isNumber)(e))return" ";var r,i=e>Math.pow(10,n+3)?Math.pow(10,n):1,a=e/i,o=[{value:1,symbol:""},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"B"},{value:1e12,symbol:"T"},{value:1e15,symbol:"P"},{value:1e18,symbol:"E"}],s=/\.0+$|(\.[0-9]*[1-9])0+$/;for(r=o.length-1;r>0&&!(a>=o[r].value);r--);var l=Number((a*i/o[r].value).toFixed(t)).toLocaleString();return l.replace(s,"$1")+o[r].symbol},ut=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"s";return e>1?t+n:t},dt=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Q.a.location,n=(t=void 0===t?{}:t).pathname,r=void 0===n?"/":n,i=r.substring(1);if(e)return i;var a=ht(),o=a.filter;return i===le.COMPOSING&&o===ce.PURCHASED?le.LEARNING:i},ht=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q.a.location,t=e||{},n=t.search,r=void 0===n?"":n,i=Y.a.parse(r),a=u.SEARCH_PARAM.KEY.VIDEO_ID,o=u.SEARCH_PARAM.KEY.CHAPTER_ID,s=u.SEARCH_PARAM.KEY.SEARCH_TERM,l=u.SEARCH_PARAM.KEY.TIMESTAMP,c=u.SEARCH_PARAM.KEY.BLOCK_OFFSET,d=u.SEARCH_PARAM.KEY.ATTACHMENT_ID,h=u.SEARCH_PARAM.KEY.CHAPTER_ATTACHMENT_ID,f=u.SEARCH_PARAM.KEY.ATTACHMENT_PAGE_INDEX,p=u.SEARCH_PARAM.KEY.STOP_AUTOPLAY,m=u.SEARCH_PARAM.KEY.WITH_COURSE,g=u.SEARCH_PARAM.KEY.EXPANDED,v=u.SEARCH_PARAM.KEY.ACTION,b=u.SEARCH_PARAM.KEY.EMAIL,y=i[a],A=i[o],_=i[s],w=i[l],E=i[c],C=i[d],T=i[h],k=i[f],x=i[p],O=i[m],I=i[g],M=i[v],P=(i[b],S()(i,[a,o,s,l,c,d,h,f,p,m,g,v,b].map(ie)));return re({videoId:y,chapterId:A,searchTerm:_,stopAutoPlay:x,timestamp:w,timeOffset:E,attachmentId:C,attachmentPageIndex:k,chapterAttachmentId:T,withCourse:O,expanded:I,action:M},P)},ft=function(e){var t=e.videoId,n=e.chapterId;return rt([[u.SEARCH_PARAM.KEY.VIDEO_ID,t],[u.SEARCH_PARAM.KEY.CHAPTER_ID,n]],null,!0)},pt=function(){var e=(ge()||{}).accessToken;return{Authorization:"Bearer ".concat(e)}},mt=function(e,t){var n=u.PUBLISHING_STATUS,r=u.COGVID_STATUS;return(e||![n.CANCELED].includes(e))&&[n.PENDING,n.PROCESSING].includes(e)||r.PUBLISHING===t&&e===n.APPROVED},gt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={0:void 0,1:0,2:1,3:2,4:2,6:3},n=u.VIDEO_TYPE,r=u.COGVID_STATUS,i=Object($.get)(v.a.getState(),"content.creatingCogvidList",[]),a=(nn(),e.filter((function(e){var t=e.cognitiveVideo,n=(t=void 0===t?{}:t).status;return(void 0===n?"":n)!==r.FAILED})).map((function(e){e.permissions=s.cogvidPers(e.permissions);var a=e.chapters,o=void 0===a?[]:a,l=e.uid,c=(e.rootContext,qe({videoId:l}));return Object($.isEmpty)(o)||(o.forEach((function(t){t.permissions=s.cogvidPers(t.permissions),t.isLockedChapter=!(c||t.accessible||e.subscription===u.SUBSCRIPTION.VALID),t.isLockedChapter&&(t.lockTime=(t.endTime-150)/1e3)})),e.chapterImages=o.map((function(t){return{chapterId:t.uid,seqNumber:t.seqNumber,url:t.image?"".concat(e.rootContext).concat(t.image):"",type:t.type}}))),!!Object($.find)(i,{videoId:l,type:n.UPDATING_COGNITIVE})&&(e.cognitiveVideo.status=r.UPDATING),Object($.isEmpty)(e.offers)&&(e.offers=[u.SUB_OFFER.VIEW_VIDEOS]),e.plan=t[(e.offers||[]).length],e})));return a},vt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye(te.cogvidItemHeight);if(!e)return null;var n=Object($.get)(e,"current.scrollRef.scrollTop",0),r=parseInt((n+t-2)/t,0);return r},bt=function(e,t,n){if(!e.includes(u.DUMMY_DAILY_VIDEO_ID_PREFIX)){var r=u.COGVID_STATUS;v.a.dispatch(b.e.getPublicCogvidLastStatus(e,(function(e){return[r.INITIALLIZING,r.UPDATING].includes(null==e?void 0:e.status)?fr.info(Object(J.b)("yourCognitiveVideoIsUpdating")):t(e)})),(function(e){return!!n&&n(e)}))}},yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=rt(e,null,!0);t?window.history.pushState({},document.title,n):window.history.replaceState({},document.title,n)},At=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e[0]&&localStorage.removeItem(e[0]),e[0]&&e[1]&&localStorage.setItem(e[0],e[1])}))},_t=function(){var e=localStorage.getItem(u.SEARCH_PARAM.KEY.VIDEO_ID),t=localStorage.getItem(u.SEARCH_PARAM.KEY.CHAPTER_ID),n=localStorage.getItem(u.SEARCH_PARAM.KEY.TIMESTAMP),r=localStorage.getItem(u.SEARCH_PARAM.KEY.BLOCK_OFFSET),i=localStorage.getItem(u.SEARCH_PARAM.KEY.ATTACHMENT_ID),a=localStorage.getItem(u.SEARCH_PARAM.KEY.CHAPTER_ATTACHMENT_ID);return{videoId:e,chapterId:t,timestamp:n,attachmentId:i,attachmentPageIndex:localStorage.getItem(u.SEARCH_PARAM.KEY.ATTACHMENT_PAGE_INDEX),chapterAttachmentId:a,timeOffset:r}},wt=function(e){var t=u.CHAPTER_TYPES,n=e;if(Object($.isEmpty)(n))return[];for(var r=n.filter((function(e){return e.type===t.EPISODIC.key})).sort((function(e,t){return e.startTime-t.startTime})),i=r.length,a=0;a<i;a++)r[a+1]&&r[a].endTime===r[a+1].startTime&&(r[a].endTime=r[a].endTime-1);return n.forEach((function(e){e.permissions=s.cogvidPers(e.permissions)})),n},Et=function(e){var t=e.type,n=e.path;return t.match(/video|application\/pdf/)||"webm"===n.split(".").pop()},St=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new URL(e),r=new URLSearchParams(n.search);return t.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e[0]&&r.delete(e[0]),e[0]&&e[1]&&r.set.apply(r,T()(e))})),n.search=r,n.toString()},Ct=function(){FB.getLoginStatus((function(e){"connected"===e.status&&FB.logout((function(e){console.log("Logout FB with response: ",e)}))}))},Tt=function(e){window.fbAsyncInit=function(){if(FB.init({appId:u.FACEBOOK_APP_ID,cookie:!0,xfbml:!0,version:u.FACEBOOK_APP_VERSION}),!e)try{Ct()}catch(e){console.log(e)}},function(t,n,r){var i,a=t.getElementsByTagName(n)[0];if(t.getElementById(r)){if(!e)try{Ct()}catch(e){console.log(e)}}else(i=t.createElement(n)).id=r,i.src=u.FACEBOOK_APP_JSSDK_URL,a.parentNode.insertBefore(i,a)}(document,"script","facebook-jssdk")},kt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.message,r=(void 0===n&&Object(J.b)("message.loginToContinue"),t.showLogin),i=t.callback,a=ge(),o=window.location,s=o.pathname,l=o.search,c=e||"".concat(s).concat(l);if(window.loginCallback=i,a)Object($.get)(v.a.getState(),"auth.userInfo.userId","")||(v.a.dispatch(b.a.getProfile()),v.a.dispatch({type:Z.a.GET_MY_ROLES}));else if(r){var u=Object($.get)(v.a.getState(),"auth.showLoginModal.show",!1);u||v.a.dispatch(b.a.displayLoginModal({show:!0,redirectTo:c}))}else{var d=Object($.get)(v.a.getState(),"auth.showRegisterModal.show",!1);d||v.a.dispatch(b.a.displayRegisterModal({show:!0,redirectTo:c}))}return a},xt=function(e,t,n){if(n){var r=new Date;r.setTime(r.getTime()+n);var i="expires="+r.toUTCString();document.cookie="".concat(e,"=").concat(t,";").concat(i,";path=/")}else document.cookie="".concat(e,"=").concat(t)},Ot=function(e){var t;return document.cookie.split(";").some((function(n){var r=n.split("="),i=P()(r,2),a=i[0],o=i[1];if(a===e||a===" ".concat(e))return t=o,!0})),fe(t)?JSON.parse(t):t},It=function(e){var t=Object($.get)(v.a.getState(),"auth.userInfo",{}),n=t.userId,r=t.firstName,i=t.lastName,a=t.avatar,o=(a=void 0===a?{}:a).image,s=R()(e),l=s.format(oe),c={accessGrantType:"AGT_UNDEFINED",archived:!1,attachmentCount:0,isDummyDailyVideo:!0,cognitiveVideo:{author:"".concat(r," ").concat(i),avatar:o,cognitiveResolutionUnit:2,comments:0,contextualImageOffset:0,createdDate:e,owner:n,status:u.COGVID_STATUS.PUBLISHED,title:"".concat(l," ").concat(s.format("ddd").toUpperCase()),uid:"".concat(u.DUMMY_DAILY_VIDEO_ID_PREFIX).concat(l),version:0,videoParts:[],videoType:u.VIDEO_TYPE.LECTURE,views:0,visibilityScope:u.SCOPE_COGVID_STATUS.PRIVATE,isDailyTask:!0},createdDate:e,sharedCount:0,uid:"".concat(u.DUMMY_DAILY_VIDEO_ID_PREFIX).concat(l),videoLength:0,views:0},d=X.a.asMutable(Object($.get)(v.a.getState(),"cogvid.dailyVideoTemplate",{}),{deep:!0});return Object($.isEmpty)(d)||Object($.isEmpty)(d.chapters)||d.chapters.forEach((function(e,t){e.seqNumber=t,e.uid="".concat(l,"_").concat(e.content),e.attributes=u.INITIAL_DAILY_VIDEO_CHAPTERS[t].textAttributes,e.type=u.CHAPTER_TYPES.ATTACHMENT_ONLY.key,e.isTemplateChapter=!0})),re(re({},c),d)},Mt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=window.location,n=t.pathname,r=t.search,i=n+r;Q.a.replace(i,e)};function Pt(e){return T()(Array(R()(e).daysInMonth())).map((function(t,n){return new Date(e.getFullYear(),e.getMonth(),n+1)}))}function Dt(e,t,n){var r=this,i=R.a.tz.guess();return T()(Array(u.DEFAULT_DAILY_VIDEO_DATE_RANGE)).flatMap((function(a,o){var s=r.toDateWithTimezone(t,i),l=n?o-Math.floor((u.DEFAULT_DAILY_VIDEO_DATE_RANGE-1)/2):o;return s.setDate(s.getDate()-l),R()(s).format(oe)>R()().format(oe)||R()(s).format(oe)<R()(u.MINIUM_IRL_DATE).format(oe)?[]:[e.find((function(e){var t=e.cognitiveVideo,n=(t=void 0===t?{}:t).title;return R()(n.substring(0,oe.length)).date()===s.getDate()&&R()(n.substring(0,oe.length)).month()===s.getMonth()}))||It(new Date(s.getFullYear(),s.getMonth(),s.getDate()))]})).sort((function(e,t){return new Date(t.createdDate)-new Date(e.createdDate)}))}var Nt=function(){return dt()===le.HOME?ye(te.IRLCogvidItemHeight):ye(te.smallCogvidItemHeight)},Lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isVideo,r=void 0!==n&&n,i=t.force,a=void 0!==i&&i,o=Object($.get)(v.a.getState(),"auth.userInfo.userId","");if(o&&!a)return!0;var s=JSON.parse(localStorage.getItem("LIKE_TRACKING"))||{};if(s[e]){var l=Math.ceil(R.a.duration(R()().diff(R()(s[e]))).asHours()),c=l>ae;return c?(s[e]=new Date,localStorage.setItem("LIKE_TRACKING",JSON.stringify(s))):fr.info(Object(J.b)(r?"message.cannotAnonymousLikeVideo":"message.cannotAnonymousLike",{hour:l}),!0,"",3e3),c}return s[e]=new Date,localStorage.setItem("LIKE_TRACKING",JSON.stringify(s)),!0},Rt=function(e){var t=parseInt(e);return{hours:Math.floor(t/60),minutes:t%60}},Bt=function(e){var t=Rt(e),n=t.hours,r=t.minutes;return n?r?"".concat(Re(n,Object(J.b)("hour"))," ").concat(Object(J.b)("and")," ").concat(Re(r,Object(J.b)("minute"))):Re(n,Object(J.b)("hour")):Re(r,Object(J.b)("minute"))},jt=function(e,t){var n=JSON.parse(localStorage.getItem("LIKE_TRACKING"))||{};n[e]=t,localStorage.setItem("LIKE_TRACKING",JSON.stringify(n))};function Ft(e,t){var n=R()(e).tz(t);return R()(e).add(R()().utcOffset()-n.utcOffset(),"m")}function Ut(e,t){var n=R()(e);return new Date(n.tz(t,!0).format())}var Ht=function(){var e=Object($.get)(v.a.getState(),"cogvid.cogvidDetails.rootContext",""),t=Object($.get)(v.a.getState(),"cogvid.chapterHighlighting",{});!Object($.get)(v.a.getState(),"cogvid.attachmentReview.attachmentId","")&&t.image&&[se.ATTACHMENT_ONLY.key,se.LIVE_SESSION.key].includes(t.type)&&v.a.dispatch(b.e.displayCoverImage({image:"".concat(e).concat(t.image),content:""}))},zt=function(e){var t,n,r,i,a,o=Object($.get)(v.a.getState(),"cogvid.cogvidListLv",{}),s=o.currentActiveLv,l=e||o||{},c=re({},l["lv".concat(s)]),u=(null===(t=l["lv".concat(s)])||void 0===t?void 0:t.insertTop)?[].concat(T()((null===(n=l["lv".concat(s)])||void 0===n?void 0:n.loadingCogvidItems)||[]),T()((null===(r=l["lv".concat(s)])||void 0===r?void 0:r.videoList)||[])):[].concat(T()((null===(i=l["lv".concat(s)])||void 0===i?void 0:i.videoList)||[]),T()((null===(a=l["lv".concat(s)])||void 0===a?void 0:a.loadingCogvidItems)||[]));return[le.EXPLORING,le.LEARNING].includes(dt())&&s>0&&(u=u.filter((function(e){var t=e.chapters,n=void 0===t?[]:t,r=e.cognitiveVideo,i=(r=void 0===r?{}:r).primCourse,a=r.course;return!((1==s?0===(null==i?void 0:i.serial):0===(null==a?void 0:a.serial))&&Object($.isEmpty)(n))}))),c.videoList=u,c},Vt=function(e){return U.a.AES.encrypt(JSON.stringify(e),u.SECRET_KEY).toString()},Wt=function(e){try{var t=U.a.AES.decrypt(e,u.SECRET_KEY).toString(U.a.enc.Utf8);return fe(t)?JSON.parse(t):t}catch(t){return fe(e)?JSON.parse(e):e}},Gt=function(){return Object($.get)(v.a.getState(),"cogvid.levelBackgrounds")},qt=function(e){var t=e.pckg,n=e.agent;ue={pkg:t,agt:n}},Yt=function(){return ue},Kt=function(){var e=v.a.getState(),t=e.cogvid,n=e.auth,r=Object($.get)(t,"chapterHighlighting.accessible",!1),i=Object($.get)(n,"showLoginModal.show",!1),a=ge();r||a||i||v.a.dispatch(b.a.displayLoginModal({show:!0,topMessage:Object(J.b)("message.loginToContinue")}));var o=Object($.get)(n,"userInfo.userId",""),s=Object($.get)(t,"cogvidDetails.videoId",""),l=Object($.get)(t,"chapterHighlighting.createdBy",""),c=qe({videoId:s,userId:o})||o===l;return r||c},Xt=function(){var e=I()(x.a.mark((function e(t){var n,r,i,a,o,s,l,c,u;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.url,r=t.name,i=void 0===r?"":r,a=t.callback,e.prev=1,e.next=4,W.a.get(n,{responseType:"blob"});case 4:o=e.sent,s=new Blob([o.data],{type:o.data.type}),l=URL.createObjectURL(s),Qt(n),c=decodeURI(new URL(n).pathname.split("/").pop()),(u=document.createElement("a")).href=l,u.download=i||c,document.body.appendChild(u),u.click(),document.body.removeChild(u),a&&a(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),a&&a();case 21:case"end":return e.stop()}}),e,null,[[1,18]])})));return function(t){return e.apply(this,arguments)}}(),Qt=function(e){if("string"==typeof e||e instanceof String){var t=e.split(".");return 1===t.length||""===t[0]&&2===t.length?"":"."+t.pop()}return""},$t=[{lower:1,upper:1.2,stars:1,label:"Bad"},{lower:1.3,upper:1.7,stars:1.5,label:"Bad"},{lower:1.8,upper:2.2,stars:2,label:"Poor"},{lower:2.3,upper:2.7,stars:2.5,label:"Poor"},{lower:2.8,upper:3.2,stars:3,label:"Average"},{lower:3.3,upper:3.7,stars:3.5,label:"Average"},{lower:3.8,upper:4.2,stars:4,label:"Great"},{lower:4.3,upper:4.7,stars:4.5,label:"Excellent"},{lower:4.8,upper:5,stars:5,label:"Excellent"}],Jt=function(e){var t=parseFloat(e).toFixed(1);return $t.find((function(e){var n=e.lower,r=e.upper;return n<=t&&t<=r}))},Zt=function(e){if(e){var t=e.getBoundingClientRect(),n=document.body,r=document.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,a=window.pageXOffset||r.scrollLeft||n.scrollLeft,o=r.clientTop||n.clientTop||0,s=r.clientLeft||n.clientLeft||0,l=t.top+i-o,c=t.left+a-s;return{top:Math.round(l),left:Math.round(c)}}},en=function(e){var t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},tn=function(e,t){var n=document.getElementById(e);n&&n.scrollIntoView(t||{behavior:"smooth",block:"center",inline:"center"})},nn=function(){return dt()===le.EXPLORING},rn=function(){return dt()===le.BRAINHIVE},an=function(){return dt()===le.COMPOSING},on=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.normalize("NFKD").replace(/(?:[\^`\xA8\xAF\xB4\xB7\xB8\u02B0-\u034E\u0350-\u0357\u035D-\u0362\u0374\u0375\u037A\u0384\u0385\u0483-\u0487\u0559\u0591-\u05A1\u05A3-\u05BD\u05BF\u05C1\u05C2\u05C4\u064B-\u0652\u0657\u0658\u06DF\u06E0\u06E5\u06E6\u06EA-\u06EC\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F5\u0818\u0819\u08E3-\u08FE\u093C\u094D\u0951-\u0954\u0971\u09BC\u09CD\u0A3C\u0A4D\u0ABC\u0ACD\u0AFD-\u0AFF\u0B3C\u0B4D\u0B55\u0BCD\u0C4D\u0CBC\u0CCD\u0D3B\u0D3C\u0D4D\u0DCA\u0E47-\u0E4C\u0E4E\u0EBA\u0EC8-\u0ECC\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F82-\u0F84\u0F86\u0F87\u0FC6\u1037\u1039\u103A\u1063\u1064\u1069-\u106D\u1087-\u108D\u108F\u109A\u109B\u135D-\u135F\u17C9-\u17D3\u17DD\u1939-\u193B\u1A75-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B34\u1B44\u1B6B-\u1B73\u1BAA\u1BAB\u1C36\u1C37\u1C78-\u1C7D\u1CD0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1D2C-\u1D6A\u1DC4-\u1DCF\u1DF5-\u1DF9\u1DFD-\u1DFF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2CEF-\u2CF1\u2E2F\u302A-\u302F\u3099-\u309C\u30FC\uA66F\uA67C\uA67D\uA67F\uA69C\uA69D\uA6F0\uA6F1\uA700-\uA721\uA788-\uA78A\uA7F8\uA7F9\uA8C4\uA8E0-\uA8F1\uA92B-\uA92E\uA953\uA9B3\uA9C0\uA9E5\uAA7B-\uAA7D\uAABF-\uAAC2\uAAF6\uAB5B-\uAB5F\uAB69-\uAB6B\uABEC\uABED\uFB1E\uFE20-\uFE2F\uFF3E\uFF40\uFF70\uFF9E\uFF9F\uFFE3]|\uD800\uDEE0|\uD802[\uDEE5\uDEE6]|\uD803[\uDD22-\uDD27\uDF46-\uDF50]|\uD804[\uDCB9\uDCBA\uDD33\uDD34\uDD73\uDDC0\uDDCA-\uDDCC\uDE35\uDE36\uDEE9\uDEEA\uDF3C\uDF4D\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC42\uDC46\uDCC2\uDCC3\uDDBF\uDDC0\uDE3F\uDEB6\uDEB7\uDF2B]|\uD806[\uDC39\uDC3A\uDD3D\uDD3E\uDD43\uDDE0\uDE34\uDE47\uDE99]|\uD807[\uDC3F\uDD42\uDD44\uDD45\uDD97]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF8F-\uDF9F\uDFF0\uDFF1]|\uD834[\uDD67-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uD838[\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD46\uDD48-\uDD4A])/g,"")},sn=function(e,t){var n=document.getElementById(u.VIDEO_AREA_ID);n&&(n.style.transition=t?"none":"opacity 300ms ease-in-out"),n&&(n.style.opacity=e?"0.25":"1");var r=document.getElementById(u.ID_PRODUCTS_LAYER);r&&(r.style.opacity=e?"0.25":"")},ln=function(e){if(e||!window.storeUrl){var t=window.location,n=t.pathname,r=t.search;window.storeUrl=n+r}},cn=function(){window.storeUrl&&(window.history.replaceState({},document.title,window.storeUrl),window.storeUrl="")},un=function(e){var t,n,r,i,a,o,s,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=l.popup,u=void 0!==c&&c;if(!e)return!0;var d=v.a.getState(),h=d.cogvid,f=(h=void 0===h?{}:h).selectedVideo,p=null===(t=f.data)||void 0===t?void 0:t.uid,m=null===(n=f.data)||void 0===n?void 0:n.plan,g=null===(r=f.data)||void 0===r?void 0:null===(i=r.cognitiveVideo)||void 0===i?void 0:i.title,y=null===(a=f.data)||void 0===a?void 0:null===(o=a.cognitiveVideo)||void 0===o?void 0:o.owner,A=(null===(s=f.data)||void 0===s?void 0:s.offers)||[],_=A.includes(e);return!!p&&(!!(an()||rn()||qe({videoId:p}))||(!_&&u?(v.a.dispatch(b.e.displaySubscribeModal({videoId:p,videoTitle:g,videoOwner:y,videoPlan:m})),!1):_))},dn=function(e){var t,n,r=v.a.getState().cogvid,i=(r=void 0===r?{}:r).selectedVideo,a=null===(t=i.data)||void 0===t?void 0:t.uid,o=((null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.chapters)||[])[e];return!!o&&(!!(an()||rn()||qe({videoId:a}))||!!o.accessible)},hn=function(e){var t=e.split(":");return 60*parseInt(t[0])+parseInt(t[1])},fn=function(e){if(Object($.isEmpty)(e))return"";for(var t=e.toLowerCase().split(" "),n=0;n<t.length;n++)t[n]=t[n].charAt(0).toUpperCase()+t[n].slice(1);return t.join(" ")},pn=function(e){var t=T()(e),n=[];if(t.forEach((function(e,t){var r=z.a.dirname(e.path);"/"===r.charAt(0)&&(r=r.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),n.push(e)})),n.length<1)fr.warn(Object(J.b)("message.fileSupportedFiles"));else if(0!==n.length){if(!(n[0].size>u.MAX_FILE_SIZE))return n[0];fr.error(Object(J.b)("message.maxFileSize",{size:"500 MB"}))}else fr.error(Object(J.b)("message.fileRequired"))};function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vn=function(e,t){var n=e.productId,r=e.productTitle,i=e.productType,a=e.months,o=e.videoId,s=e.videoOwner;v.a.dispatch(b.c.updateIsQuickPurchasing(!0));var l=function(e){t&&t(),v.a.dispatch(b.c.updateIsQuickPurchasing(!1)),v.a.dispatch(b.c.openCart(e))};v.a.dispatch(b.c.removeAllCartItems((function(){v.a.dispatch(b.c.addItemToCart({productId:n,productTitle:r,productType:i,months:a,videoId:o,videoOwner:s},(function(){return l(!0)}),(function(){return l(!1)})))}),(function(){l(!1)})))},bn=function(e,t){v.a.dispatch(b.f.appTracking(e,t))},yn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={};return e.map((function(e){t[e.type]?t[e.type][e.action]=!0:t[e.type]=g()({},e.action,!0)})),t},An=function(e){var t=A()().format();v.a.dispatch(b.f.appLogging(gn({occuredTimestamp:t},e)))},_n=Object($.debounce)((function(e,t,n){var r=_t(),i=dt();!r.videoId||i!==u.VIDEO_CATEGORY.COMPOSING&&i!==u.VIDEO_CATEGORY.LEARNING||v.a.dispatch(b.f.stateTracking(gn({state:JSON.stringify(r),context:i},e),t,n))}),500),wn=Object($.debounce)((function(e,t,n){var r=_t(),i=dt();i!==u.VIDEO_CATEGORY.COMPOSING&&i!==u.VIDEO_CATEGORY.LEARNING||v.a.dispatch(b.f.stateTracking(gn({state:JSON.stringify(r),context:i},e),t,n))}),500),En=Object($.throttle)((function(e,t,n){var r=_t(),i=dt();!r.videoId||i!==u.VIDEO_CATEGORY.COMPOSING&&i!==u.VIDEO_CATEGORY.LEARNING||v.a.dispatch(b.f.stateTracking(gn({state:JSON.stringify(r),context:i},e),t,n))}),1e4),Sn=(r(1046),r(1047),r(203)),Cn={conversion:"Resource store desktop page load",command:"event",event_name:"conversion",send_to:"AW-11083130214/xqCICMj16v8YEObK7KQp",currency:"USD"},Tn={conversion:"Resource preview desktop page load",command:"event",event_name:"conversion",send_to:"AW-11083130214/LTOiCIOG8f8YEObK7KQp",currency:"USD"},kn={conversion:"Teacher profile view desktop page load",command:"event",event_name:"conversion",send_to:"AW-11083130214/qAkECOG8_oAZEObK7KQp",currency:"USD"},xn={conversion:"Registration form submission",command:"event",event_name:"conversion",send_to:"AW-11083130214/_1VUCNmTqIEZEObK7KQp",currency:"USD"},On={conversion:"Account activation",command:"event",event_name:"conversion",send_to:"AW-11083130214/E_tkCOynpIEZEObK7KQp",currency:"USD"},In={conversion:"Login form submission",command:"event",event_name:"conversion",send_to:"AW-11083130214/46v_CIzpooEZEObK7KQp",currency:"USD"},Mn={conversion:"Sign-up with Google",command:"event",event_name:"conversion",send_to:"AW-11083130214/10rsCJ_S2IYZEObK7KQp",currency:"USD"},Pn={conversion:"Incomplete purchase desktop",command:"event",event_name:"conversion",send_to:"AW-11083130214/mMOGCOvL-4AZEObK7KQp",currency:"USD"},Dn={conversion:"Complete purchase desktop",command:"event",event_name:"conversion",send_to:"AW-11083130214/670MCOnVgIEZEObK7KQp",currency:"USD"},Nn={conversion:"Free resource download desktop",command:"event",event_name:"conversion",send_to:"AW-11083130214/diwgCMa614QZEObK7KQp",currency:"USD"},Ln={conversion:"Incomplete course subscription desktop",command:"event",event_name:"conversion",send_to:"AW-11083130214/iQxLCIulh6oZEObK7KQp",currency:"USD"},Rn={conversion:"Complete course subscription desktop",command:"event",event_name:"conversion",send_to:"AW-11083130214/ZWR-CO3BgaoZEObK7KQp",currency:"USD"},Bn={conversion:"Open subscription form desktop",command:"event",event_name:"conversion",send_to:"AW-11083130214/XusVCO3Rg7oZEObK7KQp",currency:"USD"},jn={conversion:"[Desktop] Teacher subscribed to become content creator",command:"event",event_name:"conversion",send_to:"AW-11083130214/ZoTdCNz3_t0ZEObK7KQp",currency:"USD"},Fn={conversion:"[Desktop] Teacher created a product",command:"event",event_name:"conversion",send_to:"AW-11083130214/E0xYCJ6s_90ZEObK7KQp",currency:"USD"},Un=function(e){var t=e.command,n=e.event_name,r=e.send_to,i=e.currency,a=e.value,o=e.transaction_id;try{o?gtag(t,n,{send_to:r,currency:i,value:a,transaction_id:o}):a?gtag(t,n,{send_to:r,currency:i,value:a}):gtag(t,n,{send_to:r})}catch(e){console.log("Error invoking gtag command: "+e)}},Hn=function(){Un(Cn)},zn=function(){Un(Tn)},Vn=function(){Un(kn)},Wn=function(){Un(xn)},Gn=function(){Un(On)},qn=function(){Un(In)},Yn=function(){Un(Mn)},Kn=function(e){var t=Object($.cloneDeep)(Pn);e&&(t.transaction_id=e),Un(t)},Xn=function(e,t){var n=Object($.cloneDeep)(Dn);e&&(n.transaction_id=e),Un(n)},Qn=function(e,t){var n=Object($.cloneDeep)(Dn);e&&(n.transaction_id=e),Un(n)},$n=function(e){var t=Object($.cloneDeep)(Nn);t.transaction_id=Object(Sn.v4)(),Un(t)},Jn=function(e){var t=Object($.cloneDeep)(Ln);e&&(t.transaction_id=e),Un(t)},Zn=function(e,t){var n=Object($.cloneDeep)(Rn);e&&(n.transaction_id=e),Un(n)},er=function(){var e=Object($.cloneDeep)(Bn);Un(e)},tr=function(){var e=Object($.cloneDeep)(jn);Un(e)},nr=function(){var e=Object($.cloneDeep)(Fn);Un(e)},rr=r(139),ir=r(419),ar=r.n(ir);function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}window.toastMessages=[];var lr=function(e,t,n){if(e){var r=Object($.find)(window.toastMessages,{message:e,type:t});if(r){if(dr(r.id))return r.id;ur(e,t)}var i=(t?rr.c[t]:rr.c)(e,sr(sr({},n),{},{onClick:function(){return ur(e,t)},onClose:function(){return ur(e,t)}}));return window.toastMessages.push({id:i,message:e,type:t}),i}},cr=Object($.throttle)(lr,100,{trailing:!1}),ur=function(e,t){Object($.remove)(window.toastMessages,{message:e,type:t}).map((function(e){var t=e.id;return dr(t)&&hr(t)}))},dr=function(e){return rr.c.isActive(e)},hr=function(e){return rr.c.dismiss(e)},fr={error:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;return(t?cr:lr)(e,"error",{position:n||u.TOAST_POSITION,autoClose:1e4,pauseOnHover:!0,className:"fv-toast fv-toast--error"})},success:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;return(t?cr:lr)(e,"success",{position:n||u.TOAST_POSITION,autoClose:5e3,pauseOnHover:!1,className:"fv-toast"})},warn:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;return(t?cr:lr)(e,"warn",{position:n||u.TOAST_POSITION,autoClose:1e4,hideProgressBar:!0,className:"fv-toast"})},info:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return(t?cr:lr)(e,"info",{position:n||u.TOAST_POSITION,autoClose:r,hideProgressBar:!0,className:"fv-toast"})},isActive:dr,dismiss:hr,dark:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;return(t?cr:lr)(e,"dark",{position:n||u.TOAST_POSITION,autoClose:1e4,pauseOnHover:!0,className:"fv-toast fv-toast--dark"})},meetingReminder:function(e){var n=e.chapterTitle,r=e.hostname,i=e.startedAt,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2?arguments[2]:void 0;(a?cr:lr)(N.a.createElement("div",null,N.a.createElement("div",{className:"text-primary text-uppercase u-fs-13o16 u-fw-500 u-mb-1o2"},t("label.reminder")),N.a.createElement("div",{className:"u-fw-500 u-fs-15o16"},n),N.a.createElement("div",{className:"u-text-84 u-fs-7o8 u-mb-1o3"},N.a.createElement(ar.a,{children:t("hostedBy",{name:r})})),N.a.createElement("div",null,"on ".concat(i))),null,{position:o||u.TOAST_POSITION,autoClose:!1,pauseOnHover:!0,className:"fv-toast reminder-toast"})}};function pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pr(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}u.CHAPTER_TYPES;var gr=function(e,t){var n=window,r=n.highlights;n.playMode,v.a.getState().cogvid.chapterHighlighting;if(r.length){t&&(t.willPlay||32===t.keyCode||t.currentTarget&&[u.PLAY_BUTTON_NAME,u.CHAPTER_PLAY_BUTTON_NAME,u.SB_WRAPPER_NAME].includes(t.currentTarget.getAttribute("name")));var i=function(e,t){window.currentHighlightIndex=e,v.a.dispatch(b.e.setUpdateVideoTime({setTimeFrom:u.SRC_SET_TIME.HIGHLIGHT,currentTime:t||.001}))};if(!r.some((function(t,n){var r=t.startTime/1e3,a=t.endTime/1e3;return e>=r&&e<=a&&(i(n,e),!0)})))r.some((function(t,n){var r=t.startTime/1e3;return e<r&&(i(n,r),!0)}))||i(0,Object($.get)(r,"[0].startTime",1)/1e3)}},vr=function(e,t,n){if(window.playMode=mr(mr({},window.playMode),e),window.highlights=t,v.a.dispatch(b.e.updateHighlightMode({mode:e.isVideoPlayingHighlightMode})),!Object($.isEmpty)(t)){window.currentHighlightIndex=null;var r=v.a.getState().cogvid.videoTime;gr((void 0===r?{}:r).currentTime||.001,n)}},br=function(e){window.playMode={isVideoPlayingChapterMode:"",isVideoPlayingHighlightMode:""},window.highlights=[],window.currentHighlightIndex=null,v.a.dispatch(b.e.updateHighlightMode({}))},yr=function(e,t){var n=t.startTime,r=t.endTime,i=[];return e.map((function(e){e.startTime>r||e.endTime<n||i.push({startTime:n<=e.startTime?e.startTime:n,endTime:r<=e.endTime?r:e.endTime})})),i},Ar=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.PLAYING_CHAPTER_ORDER,n=v.a.getState().cogvid.cogvidDetails,r=u.CHAPTER_TYPES,i=Object($.get)(n,"chapters",[]).filter((function(e){return o.isCheckLockFirstArea()?![r.ATTACHMENT_ONLY.key,r.LIVE_SESSION.key].includes(e.type)&&e.accessible:![r.ATTACHMENT_ONLY.key,r.LIVE_SESSION.key].includes(e.type)}));vr({isVideoPlayingHighlightMode:"",isVideoPlayingChapterMode:t},i,{willPlay:e})},_r=function(){var e=window.playMode;(void 0===e?{}:e).isVideoPlayingChapterMode?Ar(!1):br()},wr=function(e){var t=v.a.getState().cogvid.cogvidDetails.highlightsBookmark,n=void 0===t?[]:t;return X.a.asMutable(n).filter((function(t){return t.color===e})).sort((function(e,t){return e.startBlockSeq-t.startBlockSeq}))},Er={isPlayer:function(){var e=window.audioPlayer,t=void 0===e?{}:e;return!Object($.isEmpty)(t)},currentTime:function(e){return e?Object($.invoke)(window,"audioPlayer.player_.currentTime",e):Object($.invoke)(window,"audioPlayer.player_.currentTime")},play:function(e,t){e||0==e?(Object($.invoke)(window,"audioPlayer.player_.currentTime",e),Object($.invoke)(window,"audioPlayer.player_.play")):Object($.invoke)(window,"audioPlayer.player_.play")},pause:function(e){var t,n;Object($.invoke)(window,"audioPlayer.player_.pause"),e&&(null===(t=window)||void 0===t||null===(n=t.audioPlayer)||void 0===n||n.player_.one("pause",(function(){e()})))},paused:function(){return Object($.invoke)(window,"audioPlayer.player_.paused")},jumpToNextHighlight:function(){var e,t=null===(e=v.a.getState().cogvid.highlightMode)||void 0===e?void 0:e.loop,n=u.SRC_SET_TIME,r=window,i=r.currentHighlightIndex,a=r.highlights,o=t?i:i<a.length-1?i+1:0;window.currentHighlightIndex=o;var s=(a[o].startTime+1)/1e3;v.a.dispatch(b.e.setUpdateVideoTime({setTimeFrom:n.NEXT_SEGMENT,currentTime:s}))},jumpToPrevHighlight:function(){var e,t=null===(e=v.a.getState().cogvid.highlightMode)||void 0===e?void 0:e.loop,n=u.SRC_SET_TIME,r=(u.LOOP_MODE,window),i=r.currentHighlightIndex,a=r.highlights;if(t)v.a.dispatch(b.e.setUpdateVideoTime({setTimeFrom:n.PREV_SEGMENT,currentTime:(a[i].startTime+1)/1e3}));else{var o=t?i:0===i?a.length-1:i-1;window.currentHighlightIndex=o;var s=(a[o].startTime+1)/1e3;v.a.dispatch(b.e.setUpdateVideoTime({setTimeFrom:n.PREV_SEGMENT,currentTime:s}))}},checkHighlightLoop:function(e){var t,n,r=v.a.getState().cogvid,i=r.highlightMode,a=i.mode,o=i.loop,s=r.chapterHighlighting,l=void 0===s?{}:s,c=u.SRC_SET_TIME,d=window,h=d.currentHighlightIndex,f=d.highlights;if(a&&!Object($.isEmpty)(f)){var p=f[h]||{},m=p.startTime,g=p.endTime,y=void 0===g?0:g;if(e>=y/1e3||(null===(t=window.audioPlayer)||void 0===t?void 0:null===(n=t.player_)||void 0===n?void 0:n.ended())){var A=0;if(o)A=p.startTime;else{var _,w=h+1>=f.length?0:h+1;A=null===(_=f[w])||void 0===_?void 0:_.startTime,window.currentHighlightIndex=w}return v.a.dispatch(b.e.setUpdateVideoTime({setTimeFrom:c.HIGHLIGHT,currentTime:(A+1)/1e3})),!0}if(e<m/1e3||e>y/1e3){var E,S=l.startTime,C=l.endTime,T=f.findIndex((function(e){return e.startTime>=S&&e.startTime<C}));if(-1==T)return!1;var k=null===(E=f[T])||void 0===E?void 0:E.startTime;return window.currentHighlightIndex=T,v.a.dispatch(b.e.setUpdateVideoTime({setTimeFrom:c.HIGHLIGHT,currentTime:(k+1)/1e3})),!0}return!1}},setModeToPlay:vr,clearVideoPlayingMode:br,jumpCurrentTimeIntoActivePart:gr,loopHighlightInChapter:function e(t,n){var r=v.a.getState().cogvid,i=r.videoTime,a=void 0===i?{}:i,o=r.cogvidDetails,s=void 0===o?{}:o,l=r.chapterHighlighting,c=void 0===l?{}:l,u=s.chapters,d=void 0===u?[]:u,h=n;Object($.isEmpty)(h)&&(d.some((function(e,t){var n=e.startTime/1e3;return a.currentTime<n&&(h=e,!0)}))||(h=d[0]));var f=yr(t,h);if(f.length)c.uid!==h.uid&&v.a.dispatch(b.e.setActiveChapter(h)),vr({},f);else{var p=0;d.some((function(e,t){return t===d.length-1||h.uid===e.uid&&(p=t+1,!0)})),e(t,d[p])}},filterHighlight:wr,updateHighlightPlayMode:function(){var e=window.playMode,t=void 0===e?{}:e;if(t.isVideoPlayingHighlightMode){var n=wr(t.isVideoPlayingHighlightMode);if(!n.length)return _r();vr({},n)}},cancelHighlightPlay:_r,filterChapterToPlay:Ar,filterHighlightInAChapter:yr,handleLookingForEpisodicChapter:function(e,t){var n=u.CHAPTER_TYPES,r={},i=e.seqNumber;do{t[i=i===t.length-1?0:i+=1].type===n.EPISODIC.key&&(r=t[i])}while(Object($.isEmpty)(r));return r}};function Sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sr(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tr=u.CANVAS_DRAWING_TYPE,kr=u.SB_LENGTH,xr=u.CHAPTER_TYPES,Or=u.CHAPTER_PROCESSING_STATUS,Ir=function(e){var t=v.a.getState(),n=t.cogvid,r=n.videoTime.currentTime,i=void 0===r?0:r,a=n.isCopyChapterStyle;if(!window.isMouseWheel||0==i){var o=t.content.videoUploadedInfo,s=void 0===o?{}:o,l=t.canvas.isToolbarShown,c=void 0!==l&&l;Object($.invoke)(e,"stopImmediatePropagation"),s.id||c||(Object($.invoke)(e,"preventDefault"),Er.isPlayer()&&(Er.paused()?(Er.play(),a&&v.a.dispatch(b.e.enableCopyChapterStyle())):Er.pause()))}},Mr=function(e,t){var n=v.a.getState().cogvid,r=n.chapterHighlighting,i=void 0===r?{}:r,a=n.cogvidDetails.rawVideos,o=void 0===a?[]:a,s=i.partId,l=i.uid,c=e||s,u=Object($.find)(o,{partId:c});if(c&&0!==o.length&&u){var d,h=l;if("before"==t){var f=0;u.chapters.map((function(e){e.endTime>f&&(d=e,f=e.endTime,h=e.uid)}))}else if("after"==t){var p=0;u.chapters.map((function(e,t){0==t?(d=e,p=e.startTime,h=e.uid):e.startTime<p&&(d=e,p=e.endTime,h=e.uid)}))}var m=u.startSeq,g=u.endSeq,b=u.chapters,y=void 0===b?[]:b,A=Object($.findIndex)(y,{uid:h}),_=y[A+1],w=y[A-1],E=m*kr+1,S=(g+1)*kr;return _&&(S=_.startTime-1),w&&(E=w.endTime+1),{from:E,to:S,chapterActive:d}}},Pr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.CHAPTER_TYPES.EPISODIC.key,n=u.MINIMUM_CHAPTER_LENGTH,r=u.CHAPTER_TYPES,i=u.ADD_NEW_CHAPTER,a=v.a.getState(),o=a.common.typeEditting,s=a.cogvid,l=s.chapterHighlighting,c=s.cogvidDetails,d=s.isUpdatingCG,h=(null==c?void 0:c.chapters)||[];if(window.audioPlayer&&!window.audioPlayer.paused()&&window.audioPlayer.pause(),!d){var f={};if(e===i)f={startTime:c.videoLength-n,endTime:c.videoLength,seqNumber:0};else{if(o)return;var p="before"===e.position,m=Object($.isEmpty)(l)||![r.ATTACHMENT_ONLY.key,r.LIVE_SESSION.key].includes(null==l?void 0:l.type)&&t!==r.ATTACHMENT_ONLY.key?Object($.minBy)(h.filter((function(e){return e.partId===(null==l?void 0:l.partId)})),"seqNumber"):l,g=(null==m?void 0:m.seqNumber)||0;if([r.ATTACHMENT_ONLY.key,r.LIVE_SESSION.key].includes(t))f={startTime:null,endTime:null,seqNumber:g};else{var y=Mr();if(!y)return;var A=p?y.from:l.endTime+1,_=p?l.startTime-1:y.to;if(_-A<n){var w=0;if(c.rawVideos.some((function(e,t){return w=t,e.partId==l.partId})),p){if(!w)return fr.error(Object(J.b)("message.createChapterMinLenghtError"));var E,S,C=Mr(c.rawVideos[w-1].partId,e.position);if(!y)return;if(C.chapterActive)A=p?(null===(E=C.chapterActive)||void 0===E?void 0:E.endTime)+1:C.from,_=p?C.to:(null===(S=C.chapterActive)||void 0===S?void 0:S.startTime)-1;else A=C.from,_=C.to;if(_-A<n)return fr.error(Object(J.b)("message.createChapterMinLenghtError"))}else{if(w===c.rawVideos.length-1)return fr.error(Object(J.b)("message.createChapterMinLenghtError"));var T,k,x=Mr(c.rawVideos[w+1].partId,e.position);if(!y)return;if(x.chapterActive)A=p?(null===(T=x.chapterActive)||void 0===T?void 0:T.endTime)+1:x.from,_=p?x.to:(null===(k=x.chapterActive)||void 0===k?void 0:k.startTime)-1;else A=x.from,_=x.to;if(_-A<n)return fr.error(Object(J.b)("message.createChapterMinLenghtError"))}}f={startTime:A,endTime:_,seqNumber:g}}}v.a.dispatch(b.e.changeCGUpdatingStatus(!0)),v.a.dispatch(b.e.addANewChapter([r.ATTACHMENT_ONLY.key,r.LIVE_SESSION.key].includes(t)?{userScaffId:c.userScaffId||c.ownerScaffId,videoUid:c.videoId,content:r[t].title,type:t||r.EPISODIC.key,seqNumber:f.seqNumber}:Cr({userScaffId:c.userScaffId||c.ownerScaffId,videoUid:c.videoId,content:r[t].title,type:t||r.EPISODIC.key},f),(function(){v.a.dispatch(b.e.changeCGUpdatingStatus(!1))}),(function(){v.a.dispatch(b.e.changeCGUpdatingStatus(!1))})))}},Dr=function(){var e=v.a.getState(),t=e.common.typeEditting,n=e.cogvid,r=n.chapterHighlighting,i=void 0===r?{}:r,a=n.cogvidDetails;if(!n.isUpdatingCG&&!t&&i.uid){if(o.isChapterUploadingAttachments(a.videoId,i.uid))return void fr.warn(Object(J.b)("message.deleteUploadingChapterWarning"));v.a.dispatch(b.f.toggleDelChapterModal(i))}},Nr=function(){var e=v.a.getState(),t=u.CHAPTER_TYPES,n=e.cogvid,r=n.chapterHighlighting,i=void 0===r?{}:r,a=n.cogvidDetails;v.a.dispatch(b.e.changeCGUpdatingStatus(!0));var o=a.chapters.map((function(e){return e.uid})).indexOf(i.uid);v.a.dispatch(b.e.deleteAChapter(Cr(Cr({},i),{},{videoUid:a.videoId,ownerScaffId:a.ownerScaffId}),(function(){var e=v.a.getState().cogvid,n=e.cogvidDetails,r=e.showVideoAttachments,a=void 0===r?{}:r,s=n.chapters||[],l=s.length,c={},u=0;if(l&&(0!==o&&(u=o===l?o-1:o),(c=s[u]).type!==t.EPISODIC.key&&(Er&&Er.pause(),c.image&&(null==n?void 0:n.rootContext)))){var d="".concat(null==n?void 0:n.rootContext).concat(c.image);v.a.dispatch(b.e.displayCoverImage({image:d}))}v.a.dispatch(b.d.displaySlide(u)),a.chapterId===i.uid&&(v.a.dispatch(b.e.displayVideoAttachments({})),v.a.dispatch(b.e.updateReviewAttachment({attachmentId:""}))),v.a.dispatch(b.f.toggleDelChapterModal({})),v.a.dispatch(b.e.changeCGUpdatingStatus(!1))}),(function(){v.a.dispatch(b.f.toggleDelChapterModal({})),v.a.dispatch(b.e.changeCGUpdatingStatus(!1))})))},Lr=function(e){var t=v.a.getState().cogvid,n=t.highlightEditInfo,r=void 0===n?{}:n,i=t.cogvidDetails,a=void 0===i?{}:i,o=t.currentSbData,s=void 0===o?{}:o,l=u.TYPE_EDITING,c=e||s.timestamp||0;if(r.editMode===l.HIGHLIGHT_ADD_START)v.a.dispatch(b.e.setEditHighLightBookmark({editMode:l.HIGHLIGHT_ADD_END,startTime:c,isMouseClickMode:!!e}));else if(r.editMode===l.HIGHLIGHT_ADD_END||r.editMode===l.HIGHLIGHT_EDITING_END||r.editMode===l.HIGHLIGHT_EDITING_START){var d=0,h=0,f="",p=function(){var e=r.id;return a.highlightsBookmark.filter((function(t){return t.id===e}))[0]},m=function(){v.a.dispatch(b.e.setEditHighLightBookmark({editMode:"",id:"",color:"",endTime:null,startTime:null,label:""}));var e=document.querySelectorAll("button[name=highlight-bracket]"),t=!0,n=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){i.value.blur()}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}},g=function(e){return v.a.dispatch(b.e.updateHighLightBookmark({color:r.color,timePoint:Math.floor(c),videoId:a.videoId,endTime:h,startTime:d,label:f,isDeleteOldActiveHighlight:e},(function(){Er.updateHighlightPlayMode(),m()})))};if(r.editMode===l.HIGHLIGHT_ADD_END){var y={startTime:r.startTime,endTime:c};r.startTime>c&&(y.endTime=r.startTime,y.startTime=c),v.a.dispatch(b.e.setEditHighLightBookmark(Cr(Cr(Cr({},r),y),{},{isMouseClickMode:!!e})))}if(r.editMode===l.HIGHLIGHT_EDITING_START){var A=p();if(c>2e3*A.endBlockSeq+1)return m();d=c,h=2e3*A.endBlockSeq+1,f=A.label||"",g(c>2e3*A.startBlockSeq+1)}if(r.editMode===l.HIGHLIGHT_EDITING_END){var _=p();if(c<2e3*_.startBlockSeq+1)return m();d=2e3*_.startBlockSeq+1,h=c,f=_.label||"",g(c<2e3*_.endBlockSeq+1)}}},Rr=function(e){var t=v.a.getState().cogvid,n=t.highlightEditInfo,r=void 0===n?{}:n,i=t.cogvidDetails,a=void 0===i?{}:i,o=t.currentSbData,s=void 0===o?{}:o,l=u.TYPE_EDITING,c=s.timestamp||0;[l.HIGHLIGHT_EDITING_END,l.HIGHLIGHT_EDITING_START].includes(r.editMode)&&v.a.dispatch(b.e.deleteHighLightBookmark({color:r.color,timePoint:Math.floor(c),videoId:a.videoId},(function(){Er.updateHighlightPlayMode(),v.a.dispatch(b.f.toggleDelHighlightModal("")),v.a.dispatch(b.e.setEditHighLightBookmark({editMode:"",id:"",color:"",label:"",endTime:null,startTime:null})),Boolean(e)&&e()})))},Br=function(e){var t,n=v.a.getState(),r=e.keyCode,i=e.ctrlKey,a=e.shiftKey,s=e.target,l=n.cogvid,c=l.openCreateCogvidForm,d=l.oldOpenCreateCogvidForm,h=l.openAddFilesToGalleryForm,f=l.cogvidDetails.permissions,p=void 0===f?{}:f,m=l.chapterHighlighting,g=void 0===m?{}:m,y=l.showProductsLayer,A=l.showMyResourcesModal,_=n.common.isPopupOpen,w=n.canvas,E=w.isToolbarShown,S=void 0!==E&&E;w.drawingType;if(!(s&&["INPUT","TEXTAREA"].includes(s.tagName)||(null===(t=s.className)||void 0===t?void 0:t.includes("modal"))||"dialog"===s.role)){var C=_||c||d||h||!!(null==y?void 0:y.videoId)||A||S;switch(r){case 32:C||(null==g?void 0:g.type)!==xr.EPISODIC.key||!o.checkSubscribedOffer(u.SUB_OFFER.VIEW_VIDEOS)&&!o.checkChapterAccessible(g.seqNumber)||Ir(e),e.preventDefault();break;case 13:if(!C){if(e.metaKey||e.ctrlKey)return Pr(Cr(Cr({},e),{},{position:"after"}));if(n.cogvid.highlightEditInfo.color)return Lr();!function(e){e.preventDefault();var t=u.MINIMUM_CHAPTER_LENGTH,n=v.a.getState(),r=n.cogvid,i=r.chapterHighlighting,a=r.videoTime,o=r.cogvidDetails;if(!r.isUpdatingCG&&o.videoId){var s=n.common.typeEditting,l=u.TYPE_EDITING,c=u.CHAPTER_EDITTING_TOLERANCE;if(s){var d=a.limitTime,h=1e3*a.currentTime,f=Cr({},i),p=l.CHAPTER_EDITING_END===s;if(s===l.CHAPTER_EDITING_START){if(f.startTime=h<0?0:h,h>=f.endTime)return v.a.dispatch(b.f.setTypeEditting("")),void(window.globalTypeEditting="");d&&f.startTime-d.from<=c&&(f.startTime=d.from)}else if(p){if(f.endTime=h>o.videoLength?o.videoLength:h,h-f.startTime<t&&h+t>o.videoLength&&(f.endTime=o.videoLength,f.startTime=o.videoLength-t),h<=f.startTime)return v.a.dispatch(b.f.setTypeEditting("")),void(window.globalTypeEditting="");d&&d.to-f.endTime<=c&&(f.endTime=d.to)}if(f.endTime-f.startTime<t)return void fr.error(Object(J.b)("message.updateChapterMinLenghtError"));v.a.dispatch(b.e.changeCGUpdatingStatus(!0)),v.a.dispatch(b.e.updateChapterItem(Cr(Cr({},f),{},{videoUid:o.videoId,content:i.content||"Chapter title",ownerScaffId:o.ownerScaffId,canFetchRawVideos:!0}),(function(){v.a.dispatch(b.f.setTypeEditting("")),window.globalTypeEditting="",v.a.dispatch(b.e.changeCGUpdatingStatus(!1))}),(function(){v.a.dispatch(b.e.changeCGUpdatingStatus(!1))})))}}}(e)}break;case 27:S&&v.a.dispatch({type:Z.b.CANVAS_UPDATE_DRAWING_PROPERTIES,data:{drawingType:Tr.MOVE_AND_RESIZE,prevDrawingType:Tr.MOVE_AND_RESIZE}});break;case 46:case 8:if(S)(46==r||8==r&&i)&&v.a.dispatch({type:Z.b.CANVAS_UPDATE_DRAWING_PROPERTIES,data:{drawingType:Tr.DELETE_SELECTED_OBJECTS}});else if(!C&&(e.metaKey||e.ctrlKey)){var T,k,x;if(n.cogvid.highlightEditInfo.color)return Rr(e);((null==p?void 0:null===(T=p.VIDEO)||void 0===T?void 0:T.DOANYACTION)||(null==g?void 0:null===(k=g.permissions)||void 0===k?void 0:null===(x=k.COMPREHENSION_GUIDE)||void 0===x?void 0:x.DOANYACTION))&&(null==g?void 0:g.processingStatus)===Or.NONE&&Dr(e)}break;case 90:(e.metaKey||e.ctrlKey)&&S&&v.a.dispatch({type:Z.b.CANVAS_UPDATE_DRAWING_PROPERTIES,data:{drawingType:e.shiftKey?Tr.REDO:Tr.UNDO}});break;case 89:(e.metaKey||e.ctrlKey)&&S&&v.a.dispatch({type:Z.b.CANVAS_UPDATE_DRAWING_PROPERTIES,data:{drawingType:Tr.REDO}});break;case 38:if(e.target.className.includes(u.VIDEO_SLIDER_THUMB))return;window.cognitiveVideoListRef&&window.cognitiveVideoListRef.handleStepScrolling(-1);break;case 40:if(e.target.className.includes(u.VIDEO_SLIDER_THUMB))return;window.cognitiveVideoListRef&&window.cognitiveVideoListRef.handleStepScrolling(1);break;case 37:if(e.target.className.includes(u.CHAPTER_SLIDER_THUMB))return;window.chapterSliderRef&&window.chapterSliderRef.handleStepSliding(-1);break;case 39:if(e.target.className.includes(u.CHAPTER_SLIDER_THUMB))return;window.chapterSliderRef&&window.chapterSliderRef.handleStepSliding(1);break;default:S&&v.a.dispatch({type:Z.b.CANVAS_UPDATE_DRAWING_PROPERTIES,data:{shiftKeyPress:a,ctrlKeyPress:i,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1}})}}},jr=function(e){var t=v.a.getState(),n=(e.keyCode,e.ctrlKey),r=e.shiftKey,i=t.canvas.isToolbarShown;void 0!==i&&i&&v.a.dispatch({type:Z.b.CANVAS_UPDATE_DRAWING_PROPERTIES,data:{shiftKeyPress:r,ctrlKeyPress:n,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1}})},Fr="Published",Ur="Failed",Hr="Composing",zr="Initializing"},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r;
/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var o=i.apply(null,r);o&&e.push(o)}else if("object"===a)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"e",(function(){return o})),n.d(t,"j",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"k",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"m",(function(){return d})),n.d(t,"i",(function(){return h})),n.d(t,"h",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"n",(function(){return g}));var r={INITIALIZE_APP:"INITIALIZE_APP",FETCH_CATEGORIES:"FETCH_CATEGORIES",FETCH_CATEGORIES_SUCCESS:"FETCH_CATEGORIES_SUCCESS",FETCH_CATEGORIES_FAILURE:"FETCH_CATEGORIES_FAILURES",SET_TYPE_EDITTING:"SET_TYPE_EDITTING",TOGGLE_OPEN_POPUP:"TOGGLE_OPEN_POPUP",FULLSCREEN_MODE:"FULLSCREEN_MODE",APP_TRACKING:"APP_TRACKING",APP_LOGGING:"APP_LOGGING",STATE_TRACKING:"STATE_TRACKING",FETCH_LAST_STATE:"FETCH_LAST_STATE",TOGGLE_DELETE_CHAPTER_CONFIRMATION_MODAL:"TOGGLE_DELETE_CHAPTER_CONFIRMATION_MODAL",TOGGLE_DELETE_HIGHLIGHT_CONFIRMATION_MODAL:"TOGGLE_DELETE_HIGHLIGHT_CONFIRMATION_MODAL",UPDATE_COMMON_STATE:"UPDATE_COMMON_STATE",INCREASE_CHAPTER_ENGAGEMENT:"INCREASE_CHAPTER_ENGAGEMENT",GET_VIDEO_LEARNING_METRICS:"GET_VIDEO_LEARNING_METRICS",DELETE_VIDEO_LEARNING_METRICS:"DELETE_VIDEO_LEARNING_METRICS"},i={AUTH_LOGIN:"AUTH_LOGIN",SOCIAL_LOGIN:"SOCIAL_LOGIN",AUTH_LOGIN_FAILURE:"AUTH_LOGIN_FAILURE",AUTH_LOGIN_SUCCESS:"AUTH_LOGIN_SUCCESS",AUTH_GET_PROFILE:"AUTH_GET_PROFILE",AUTH_GET_PROFILE_SUCCESS:"AUTH_GET_PROFILE_SUCCESS",AUTH_GET_PROFILE_FAILURE:"AUTH_GET_PROFILE_FAILURE",AUTH_SET_USER_PROFILE:"AUTH_SET_USER_PROFILE",AUTH_LOGOUT:"AUTH_LOGOUT",AUTH_LOGOUT_SUCCESS:"AUTH_LOGOUT_SUCCESS",AUTH_REGISTER:"AUTH_REGISTER",AUTH_REGISTER_FAILURE:"AUTH_REGISTER_FAILURE",AUTH_REGISTER_SUCCESS:"AUTH_REGISTER_SUCCESS",AUTH_GET_PASSWORD:"AUTH_GET_PASSWORD",AUTH_GET_PASSWORD_FAILURE:"AUTH_GET_PASSWORD_FAILURE",AUTH_GET_PASSWORD_SUCCESS:"AUTH_GET_PASSWORD_SUCCESS",AUTH_VERIFY_ACCOUNT:"AUTH_VERIFY_ACCOUNT",AUTH_VERIFY_ACCOUNT_SUCCESS:"AUTH_VERIFY_ACCOUNT_SUCCESS",AUTH_VERIFY_ACCOUNT_FAILURE:"AUTH_VERIFY_ACCOUNT_FAILURE",AUTH_SEND_CONFIRMATION_MAIL:"AUTH_SEND_CONFIRMATION_MAIL",AUTH_SEND_CONFIRMATION_MAIL_SUCCESS:"AUTH_SEND_CONFIRMATION_MAIL_SUCCESS",AUTH_SEND_CONFIRMATION_MAIL_FAILURE:"AUTH_SEND_CONFIRMATION_MAIL_FAILURE",AUTH_UPLOAD_AVATAR:"AUTH_UPLOAD_AVATAR",AUTH_UPLOAD_AVATAR_SUCESS:"AUTH_UPLOAD_AVATAR_SUCESS",REFRESH_TOKEN:"REFRESH_TOKEN",TOGGLE_OPEN_USER_PROFILE_MODAL:"TOGGLE_OPEN_USER_PROFILE_MODAL",SEARCH_KEYWORD:"ARCH_KEYWORD",UPDATE_PROFILE:"UPDATE_PROFILE",UPDATE_PROFILE_SUCCESS:"UPDATE_PROFILE_SUCCESS",UPDATE_PROFILE_FAILURE:"UPDATE_PROFILE_FAILURE",GET_MY_ROLES:"GET_MY_ROLES",GET_MY_ROLES_SUCCESS:"GET_MY_ROLES_SUCCESS",TOGGLE_OPEN_CHANGE_PASSWORD_MODAL:"TOGGLE_OPEN_CHANGE_PASSWORD_MODAL",DISPLAY_LOGIN_MODAL:"DISPLAY_LOGIN_MODAL",CHANGE_PASSWORD:"CHANGE_PASSWORD",RESET_PASSWORD:"RESET_PASSWORD",GET_RESET_PASSWORD_CODE:"GET_RESET_PASSWORD_CODE",GET_TERMS_OF_USE:"GET_TERMS_OF_USE",GET_PRIVACY_POLICY:"GET_PRIVACY_POLICY",SEARCH_GROUPS:"SEARCH_GROUPS",GET_USER_STORAGE:"GET_USER_STORAGE",GET_TRUSTED_PUBLISHER:"GET_TRUSTED_PUBLISHER",UPDATE_USER_INFO:"UPDATE_USER_INFO",DISPLAY_REGISTER_MODAL:"DISPLAY_REGISTER_MODAL",DISPLAY_ACTIVATION_MODAL:"DISPLAY_ACTIVATION_MODAL",UPDATE_JOIN_AS:"UPDATE_JOIN_AS"},a={UPLOAD_RAW_FILE:"UPLOAD_RAW_FILE",UPLOAD_RAW_FILE_SUCCESS:"UPLOAD_RAW_FILE_SUCCESS",UPLOAD_RAW_FILE_FAILURE:"UPLOAD_RAW_FILE_FAILURE",CREATE_COGNITIVE_VIDEO:"CREATE_COGNITIVE_VIDEO",CREATE_COGNITIVE_VIDEO_SUCCESS:"CREATE_COGNITIVE_VIDEO_SUCCESS",CREATE_COGNITIVE_VIDEO_FAILURE:"CREATE_COGNITIVE_VIDEO_FAILURE",CREATE_COGVID_WITH_CHAPTER_TEMPLATE:"CREATE_COGVID_WITH_CHAPTER_TEMPLATE",EDIT_COGNITIVE_VIDEO:"EDIT_COGNITIVE_VIDEO",EDIT_COGNITIVE_VIDEO_FAILURE:"EDIT_COGNITIVE_VIDEO_FAILURE",ADD_FILES_TO_GALLERY:"ADD_FILES_TO_GALLERY",ADD_FILES_TO_GALLERY_SUCCESS:"ADD_FILES_TO_GALLERY_SUCCESS",ADD_FILES_TO_GALLERY_FAILURE:"ADD_FILES_TO_GALLERY_FAILURE",OLD_CREATE_COGNITIVE_VIDEO:"OLD_CREATE_COGNITIVE_VIDEO",OLD_CREATE_COGNITIVE_VIDEO_SUCCESS:"OLD_CREATE_COGNITIVE_VIDEO_SUCCESS",OLD_CREATE_COGNITIVE_VIDEO_FAILURE:"OLD_CREATE_COGNITIVE_VIDEO_FAILURE",GET_MY_MEDIA_LIST:"GET_MY_MEDIA_LIST",GET_MY_MEDIA_LIST_SUCCESS:"GET_MY_MEDIA_LIST_SUCCESS",GET_MY_MEDIA_LIST_FAILURE:"GET_MY_MEDIA_LIST_FAILURE",UPDATE_MY_MEDIA_LIST:"UPDATE_MY_MEDIA_LIST",CONTENT_ACTIVE_REVIEW:"CONTENT_ACTIVE_REVIEW",ADD_CREATING_COGVID_ITEM:"ADD_CREATING_COGVID_ITEM",DELETE_CREATING_COGVID_ITEM:"DELETE_CREATING_COGVID_ITEM",UPDATE_CREATING_COGVID_LIST:"UPDATE_CREATING_COGVID_LIST",GET_UPLOADING_FILE:"GET_UPLOADING_FILE",GET_ATTACHMENT_INFO:"GET_ATTACHMENT_INFO",UPDATE_CREATING_COGVID_ITEM:"UPDATE_CREATING_COGVID_ITEM",CREATE_MEETING_VIDEO:"CREATE_MEETING_VIDEO",CREATE_PRODUCT_ID:"CREATE_PRODUCT_ID",DELETE_PRODUCT_ID:"DELETE_PRODUCT_ID"},o={GET_MY_COGVID_LIST:"GET_MY_COGVID_LIST",GET_MY_COGVID_LIST_SUCCESS:"GET_MY_COGVID_LIST_SUCCESS",GET_COGVID_LIST:"GET_COGVID_LIST",LOAD_MORE_COGVID_LIST:"LOAD_MORE_COGVID_LIST",UPDATE_COGVID_LIST:"UPDATE_COGVID_LIST",RESET_ALL_COGVID_LIST:"RESET_ALL_COGVID_LIST",MERGE_COGVID_LIST:"MERGE_COGVID_LIST",MERGE_FETCHED_VIDEOS:"MERGE_FETCHED_VIDEOS",SEARCH_COGVID_LIST:"SEARCH_COGVID_LIST",UPDATE_COGVID_LIST_ITEM:"UPDATE_COGVID_LIST_ITEM",UPDATE_COGVID_CHILD_VIDEOS_STATUS:"UPDATE_COGVID_CHILD_VIDEOS_STATUS",GET_COGVID_DETAILS:"GET_COGVID_DETAILS",GET_VIDEO_STATE:"GET_VIDEO_STATE",GET_PROCESSING_COGVID_STATUS_LIST:"GET_PROCESSING_COGVID_STATUS_LIST",CANCEL_VIDEO_PROCESSING:"CANCEL_VIDEO_PROCESSING",RETRY_VIDEO_PROCESSING:"RETRY_VIDEO_PROCESSING",SHOW_VIDEO_OVERLAY:"SHOW_VIDEO_OVERLAY",UPDATE_SB_CONTENT:"UPDATE_SB_CONTENT",UPDATE_MULTIPLE_SB_CONTENT:"UPDATE_MULTIPLE_SB_CONTENT",UPDATE_MULTIPLE_SB_CONTENT_SUCCESS:"UPDATE_MULTIPLE_SB_CONTENT_SUCCESS",UPDATE_SB_CONTENT_SUCCESS:"UPDATE_SB_CONTENT_SUCCESS",UPDATE_SB_CONTENT_FAILURE:"UPDATE_SB_CONTENT_FAILURE",UPDATE_IS_EDITTING_SB:"UPDATE_IS_EDITTING_SB",UPDATE_VIDEO_PLAY_BACK_RATE:"UPDATE_VIDEO_PLAY_BACK_RATE",UPDATE_VIDEO_TIME:"UPDATE_VIDEO_TIME",LIMIT_VIDEO_TIME:"LIMIT_VIDEO_TIME",RESET_VIDEO_TIME:"RESET_VIDEO_TIME",UPDATE_HIGHLIGHT_MODE:"UPDATE_HIGHLIGHT_MODE",UPDATE_CURRENT_SB_DATA:"UPDATE_CURRENT_SB_DATA",RETRANSCRIBE_VIDEO:"RETRANSCRIBE_VIDEO",COMPREHENSION_GUIDE_UPDATING:"COMPREHENSION_GUIDE_UPDATING",REORDER_CHAPTER_ON_UI:"REORDER_CHAPTER_ON_UI",REORDER_CHAPTER_API:"REORDER_CHAPTER_API",UPDATE_CHAPTER_ORDERS:"UPDATE_CHAPTER_ORDERS",REORDER_CHAPTER_SUCCESS:"REORDER_CHAPTER_SUCCESS",UPDATE_LOCAL_CHAPTER_ITEM:"UPDATE_LOCAL_CHAPTER_ITEM",UPDATE_CHAPTER_ITEM:"UPDATE_CHAPTER_ITEM",UPDATE_CHAPTER_LOCK:"UPDATE_CHAPTER_LOCK",UPDATE_CHAPTER_FREE_FUI:"UPDATE_CHAPTER_FREE_FUI",UPDATE_CHAPTER_ITEM_SUCCESS:"UPDATE_CHAPTER_ITEM_SUCCESS",UPDATE_CHAPTER_ITEM_IN_CACHE:"UPDATE_CHAPTER_ITEM_IN_CACHE",UPDATE_CHAPTER_ITEMS_IN_CACHE:"UPDATE_CHAPTER_ITEMS_IN_CACHE",UPDATE_CHAPTER_SLIDE:"UPDATE_CHAPTER_SLIDE",DELETE_CHAPTER_SLIDE:"DELETE_CHAPTER_SLIDE",UPDATE_CHAPTERS_FILES:"UPDATE_CHAPTERS_FILES",SET_ACTIVE_CHAPTER:"SET_ACTIVE_CHAPTER",ADD_A_NEW_CHAPTER:"ADD_A_NEW_CHAPTER",REMOVE_A_CHAPTER:"REMOVE_A_CHAPTER",GET_CG:"GET_CG",DISPLAY_COVER_IMAGE:"DISPLAY_COVER_IMAGE",DISPLAY_PREVIEW_IMAGE:"DISPLAY_PREVIEW_IMAGE",DISPLAY_MINI_COVER_IMAGE:"DISPLAY_MINI_COVER_IMAGE",SET_PRIVACY_CHAPTER:"SET_PRIVACY_CHAPTER",SET_PRIVACY_CHAPTER_SUCCESS:"SET_PRIVACY_CHAPTER_SUCCESS",TOGGLE_CREATE_COGVID_FORM:"TOGGLE_CREATE_COGVID_FORM",UPDATE_CREATE_MEETING_MODAL:"UPDATE_CREATE_MEETING_MODAL",TOGGLE_ADD_FILES_TO_GALLERY_FORM:"TOGGLE_ADD_FILES_TO_GALLERY_FORM",OLD_TOGGLE_CREATE_COGVID_FORM:"OLD_TOGGLE_CREATE_COGVID_FORM",GET_CG_SUCCESS:"GET_CG_SUCCESS",SET_INPUT_MODE:"SET_INPUT_MODE",GET_SB:"GET_SB",UPDATE_SB:"UPDATE_SB",SEARCH_WITHIN_VIDEO:"SEARCH_WITHIN_VIDEO",SEARCH_WITHIN_VIDEO_SUCCESS:"SEARCH_WITHIN_VIDEO_SUCCESS",SEARCH_WITHIN_VIDEO_FAILURE:"SEARCH_WITHIN_VIDEO_FAILURE",UPDATE_WITHIN_VIDEO_SEARCH:"UPDATE_WITHIN_VIDEO_SEARCH",RESET_WITHIN_VIDEO_SEARCH:"RESET_WITHIN_VIDEO_SEARCH",UPDATE_RESERVED_COMPREHENSION_BOARD:"UPDATE_RESERVED_COMPREHENSION_BOARD",HIGHLIGHTS_GET:"HIGHLIGHTS_GET",HIGHLIGHTS_GET_SUCCESS:"HIGHLIGHTS_GET_SUCCESS",HIGHLIGHTS_SET:"HIGHLIGHTS_SET",HIGHLIGHTS_APPLY:"HIGHLIGHTS_APPLY",HIGHLIGHTS_DELETE:"HIGHLIGHTS_DELETE",HIGHLIGHTS_UPDATE:"HIGHLIGHTS_UPDATE",TOGGLE_CHAPTER_TEXT_EDITTING_MODE:"TOGGLE_CHAPTER_TEXT_EDITTING_MODE",GET_AUTHOR_PROFILE:"GET_AUTHOR_PROFILE",GET_AUTHOR_PROFILE_SUCCESS:"GET_AUTHOR_PROFILE_SUCCESS",RESET_AUTHOR_INFO:"RESET_AUTHOR_INFO",UPDATE_COGVID_DETAILS:"UPDATE_COGVID_DETAILS",EDIT_COGVID_INFO:"EDIT_COGVID_INFO",EDIT_COGVID_INFO_SUCCESS:"EDIT_COGVID_INFO_SUCCESS",RESET_REDUCER:"RESET_REDUCER",ATTACH_FILES_TO_VIDEO:"ATTACH_FILES_TO_VIDEO",ADD_VIDEO_ATTACHMENTS:"ADD_VIDEO_ATTACHMENTS",REPLACE_VIDEO_ATTACHMENTS:"REPLACE_VIDEO_ATTACHMENTS",UPDATE_VIDEO_ATTACHMENT:"UPDATE_VIDEO_ATTACHMENT",UPDATE_VIDEO_ATTACHMENT_ORDER:"UPDATE_VIDEO_ATTACHMENT_ORDER",UPDATE_VIDEO_ATTACHMENT_IN_CACHE:"UPDATE_VIDEO_ATTACHMENT_IN_CACHE",UPDATE_VIDEO_ATTACHMENT_THUMBNAIL:"UPDATE_VIDEO_ATTACHMENT_THUMBNAIL",DELETE_VIDEO_ATTACHMENT:"DELETE_VIDEO_ATTACHMENT",DELETE_VIDEO_ATTACHMENT_IN_CACHE:"DELETE_VIDEO_ATTACHMENT_IN_CACHE",ATTACH_FILES_TO_CHAPTER:"ATTACH_FILES_TO_CHAPTER",DELETE_CHAPTER_ATTACHMENT:"DELETE_CHAPTER_ATTACHMENT",TOGGLE_DISPLAY_CHAPTER_ATTACHMENTS:"TOGGLE_DISPLAY_CHAPTER_ATTACHMENTS",GET_VIDEO_ATTACHMENTS:"GET_VIDEO_ATTACHMENTS",GET_VIDEO_ATTACHMENTS_SUCCESS:"GET_VIDEO_ATTACHMENTS_SUCCESS",GET_VIDEO_CHAPTERS_ATTACHMENTS:"GET_VIDEO_CHAPTERS_ATTACHMENTS",REPLACE_VIDEO_CHAPTER_ATTACHMENTS:"REPLACE_VIDEO_CHAPTER_ATTACHMENTS",GET_VIDEO_CHAPTERS_ATTACHMENTS_SUCCESS:"GET_VIDEO_CHAPTERS_ATTACHMENTS_SUCCESS",DELETE_CHAPTER_ATTACHMENT_IN_CACHE:"DELETE_CHAPTER_ATTACHMENT_IN_CACHE",UPDATE_CHAPTER_ATTACHMENT:"UPDATE_CHAPTER_ATTACHMENT",UPDATE_CHAPTER_ATTACHMENT_LOCK:"UPDATE_CHAPTER_ATTACHMENT_LOCK",UPDATE_CHAPTER_ATTACHMENT_ORDER:"UPDATE_CHAPTER_ATTACHMENT_ORDER",UPDATE_CHAPTER_ATTACHMENT_IN_CACHE:"UPDATE_CHAPTER_ATTACHMENT_IN_CACHE",UPDATE_CHAPTER_ATTACHMENT_THUMBNAIL:"UPDATE_CHAPTER_ATTACHMENT_THUMBNAIL",ADD_CHAPTER_ATTACHMENTS:"ADD_CHAPTER_ATTACHMENTS",UPDATE_REVIEW_ATTACHMENT:"UPDATE_REVIEW_ATTACHMENT",DOWNLOAD_ATTACHMENT:"DOWNLOAD_ATTACHMENT",TRACKING_DOWNLOAD_ATTACHMENT:"TRACKING_DOWNLOAD_ATTACHMENT",RESET_CHAPTER_ATTACHMENT_DATA:"RESET_CHAPTER_ATTACHMENT_DATA",RESET_COGVID_DETAILS:"RESET_COGVID_DETAILS",GET_GALLERY_VIDEO:"GET_GALLERY_VIDEO",GET_GALLERY_VIDEO_SUCCESS:"GET_GALLERY_VIDEO_SUCCESS",UPDATE_GALLERY_VIDEO_DATA:"UPDATE_GALLERY_VIDEO_DATA",GET_LECTURE_VIDEO:"GET_LECTURE_VIDEO",IMPORT_SUBTITLE:"IMPORT_SUBTITLE",DISPLAY_VIDEO_ATTACHMENTS:"DISPLAY_VIDEO_ATTACHMENTS",DISPLAY_PREVIEW_ATTACHMENTS:"DISPLAY_PREVIEW_ATTACHMENTS",CHANGE_PUBLIC_COGVID_VIDEO_SCOPE:"CHANGE_PUBLIC_COGVID_VIDEO_SCOPE",CANCEL_PUBLIC_COGVID_VIDEO:"CANCEL_PUBLIC_COGVID_VIDEO",PUBLIC_COGVID_VIDEO:"PUBLIC_COGVID_VIDEO",CHANGE_PUBLIC_COGVID_VIDEO_STATUS:"CHANGE_PUBLIC_COGVID_VIDEO_STATUS",CHANGE_PUBLIC_COGVID_VIDEO_VISBILITY_SCOPE:"CHANGE_PUBLIC_COGVID_VIDEO_VISBILITY_SCOPE",CHANGE_PUBLIC_COGVID_VIDEO_PUBLIC_VIEW:"CHANGE_PUBLIC_COGVID_VIDEO_PUBLIC_VIEW",GET_PUBLIC_COGVID_VIDEO_FEEDBACK:"GET_PUBLIC_COGVID_VIDEO_FEEDBACK",GET_PUBLIC_COGVID_VIDEO_LAST_STATUS:"GET_PUBLIC_COGVID_VIDEO_LAST_STATUS",UNPUBLISH_VIDEO:"UNPUBLISH_VIDEO",REMOVE_VIDEO_FROM_COGVID_LIST:"REMOVE_VIDEO_FROM_COGVID_LIST",UNSHIFT_COGVID_LIST:"UNSHIFT_COGVID_LIST",CLONE_COGNITIVE_VIDEO:"CLONE_COGNITIVE_VIDEO",CLONE_COGNITIVE_VIDEO_SUCCESS:"CLONE_COGNITIVE_VIDEO_SUCCESS",EXPORT_COGNITIVE_VIDEO_LINK:"EXPORT_COGNITIVE_VIDEO_LINK",SET_VIDEO_COVER_IMG:"SET_VIDEO_COVER_IMG",SET_VIDEO_COVER_IMG_HTML:"SET_VIDEO_COVER_IMG_HTML",SET_VIDEO_COVER_IMG_SUCCESS:"SET_VIDEO_COVER_IMG_SUCCESS",DELETE_VIDEO:"DELETE_VIDEO",DELETE_VIDEO_SHARED_TO_ME:"DELETE_VIDEO_SHARED_TO_ME",RESET_VIDEO_LIST:"RESET_VIDEO_LIST",GET_RAW_VIDEOS:"GET_RAW_VIDEOS",INSERT_VIDEO:"INSERT_VIDEO",SET_STYLE_FOR_CHAPTER:"SET_STYLE_FOR_CHAPTER",SET_STYLE_FOR_CHAPTER_SUCCESS:"SET_STYLE_FOR_CHAPTER_SUCCESS",ENABLED_COPY_CHAPTER_STYLE:"ENABLED_COPY_CHAPTER_STYLE",GET_VIDEO_SHARING_INFO:"GET_VIDEO_SHARING_INFO",GET_VIDEO_SHARED_USERS:"GET_VIDEO_SHARED_USERS",GET_VIDEO_ROLES:"GET_VIDEO_ROLES",GET_VIDEO_ROLES_SUCCESS:"GET_VIDEO_ROLES_SUCCESS",GET_VIDEO_SETTING:"GET_VIDEO_SETTING",GET_VIDEO_SETTING_SUCCESS:"GET_VIDEO_SETTING_SUCCESS",SHARE_VIDEO:"SHARE_VIDEO",EXTRACT_CHAPTERS:"EXTRACT_CHAPTERS",EXTRACT_HIGHLIGHTS:"EXTRACT_HIGHLIGHTS",GET_CHAPTER_ATTACHMENT_SKETCH:"GET_CHAPTER_ATTACHMENT_SKETCH",EDIT_CHAPTER_ATTACHMENT_SKETCH:"EDIT_CHAPTER_ATTACHMENT_SKETCH",DELETE_CHAPTER_ATTACHMENT_SKETCH:"DELETE_CHAPTER_ATTACHMENT_SKETCH",GET_VIDEO_ATTACHMENT_SKETCH:"GET_VIDEO_ATTACHMENT_SKETCH",EDIT_VIDEO_ATTACHMENT_SKETCH:"EDIT_VIDEO_ATTACHMENT_SKETCH",DELETE_VIDEO_ATTACHMENT_SKETCH:"DELETE_VIDEO_ATTACHMENT_SKETCH",UPDATE_SHARE_VIDEO_CHAPTER_MODAL:"UPDATE_SHARE_VIDEO_CHAPTER_MODAL",SHARE_CHAPTER:"SHARE_CHAPTER",GET_CHAPTER_SHARING_INFO:"GET_CHAPTER_SHARING_INFO",GET_CHAPTER_SHARING_ROLES:"GET_CHAPTER_SHARING_ROLES",GET_CHAPTER_SHARING_ROLES_SUCCESS:"GET_CHAPTER_SHARING_ROLES_SUCCESS",UPDATE_EXTRACT_CHAPTERS_MODAL:"UPDATE_EXTRACT_CHAPTERS_MODAL",UPDATE_SAVE_TO_MY_VIDEO_MODAL:"UPDATE_SAVE_TO_MY_VIDEO_MODAL",UPDATE_EXPORT_VIDEO_MODAL:"UPDATE_EXPORT_VIDEO_MODAL",GET_COGVID_THUMBNAIL:"GET_COGVID_THUMBNAIL",GET_COVER_IMAGE_TEMPLATE:"GET_COVER_IMAGE_TEMPLATE",UPDATE_COVER_IMAGE_TEMPLATE:"UPDATE_COVER_IMAGE_TEMPLATE",CHAPTER_LIKE:"CHAPTER_LIKE",CHAPTER_LIKE_COMPLETE:"CHAPTER_LIKE_COMPLETE",GET_COURSES:"GET_COURSES",GET_COURSE_SERIAL:"GET_COURSE_SERIAL",CREATE_COURSE:"CREATE_COURSE",UPDATE_EDIT_VIDEO_MODAL:"UPDATE_EDIT_VIDEO_MODAL",UPDATE_SET_PRICE_MODAL:"UPDATE_SET_PRICE_MODAL",UPDATE_PUBLISH_VIDEO_MODAL:"UPDATE_PUBLISH_VIDEO_MODAL",UPDATE_FEEDBACK_MODAL:"UPDATE_FEEDBACK_MODAL",UPDATE_SHARED_PEOPLE_DATA:"UPDATE_SHARED_PEOPLE_DATA",UPDATE_STATE:"UPDATE_STATE",GET_SHAREABLE_VIDEO_ROLES:"GET_SHAREABLE_VIDEO_ROLES",INCREASE_CHAPTER_VIEW_COUNT:"INCREASE_CHAPTER_VIEW_COUNT",CHANGE_OWNERSHIP:"CHANGE_OWNERSHIP",CHANGE_OWNERSHIP_SUCCESS:"CHANGE_OWNERSHIP_SUCCESS",GET_VIDEO_OWNER_PROFILE:"GET_VIDEO_OWNER_PROFILE",CREATE_DAILY_VIDEO:"CREATE_DAILY_VIDEO",TOGGLE_ENABLE_COMMENTS_LIKES:"TOGGLE_ENABLE_COMMENTS_LIKES",LIKE_VIDEO:"LIKE_VIDEO",UNLIKE_VIDEO:"UNLIKE_VIDEO",GET_LIKED_VIDEO_PEOPLE_LIST:"GET_LIKED_VIDEO_PEOPLE_LIST",GET_PARTICIPANTS:"GET_PARTICIPANTS",CREATE_MEETING:"CREATE_MEETING",UPDATE_LIVE_CHAPTER_DATA:"UPDATE_LIVE_CHAPTER_DATA",GET_SHORTEN_VIDEO_URL:"GET_SHORTEN_VIDEO_URL",DE_SHORTEN_VIDEO_URL:"DE_SHORTEN_VIDEO_URL",SEARCH_KEYWORD:"SEARCH_KEYWORD",CREATE_VIDEO_KEYWORD:"CREATE_VIDEO_KEYWORD",FETCH_USER_VIDEOS:"FETCH_USER_VIDEOS",FETCH_SB_NOTES:"FETCH_SB_NOTES",CLONE_VIDEO:"CLONE_VIDEO",GET_LEVEL_BACKGROUNDS:"GET_LEVEL_BACKGROUNDS",GET_LEVEL_BACKGROUNDS_SUCCESS:"GET_LEVEL_BACKGROUNDS_SUCCESS",FIND_MASTERS:"FIND_MASTERS",GET_COURSE_VIDEOS:"GET_COURSE_VIDEOS",DISPLAY_REQUIRE_PURCHASE_MODAL:"DISPLAY_REQUIRE_PURCHASE_MODAL",DISPLAY_VIDEO_DESCRIPTION:"DISPLAY_VIDEO_DESCRIPTION",GET_VIDEO_DESCRIPTION:"GET_VIDEO_DESCRIPTION",UPDATE_VIDEO_DESCRIPTION:"UPDATE_VIDEO_DESCRIPTION",DISPLAY_COPY_CHAPTERS_MODAL:"DISPLAY_COPY_CHAPTERS_MODAL",COPY_CHAPTERS:"COPY_CHAPTERS",DISPLAY_CHAPTERS_SWAPPING:"DISPLAY_CHAPTERS_SWAPPING",SWAP_CHAPTERS:"SWAP_CHAPTERS",DISPLAY_PRODUCTS_LAYER:"DISPLAY_PRODUCTS_LAYER",CREATE_PRODUCT:"CREATE_PRODUCT",GET_VIDEO_PRODUCTS:"GET_VIDEO_PRODUCTS",UPDATE_PRODUCT:"UPDATE_PRODUCT",DELETE_PRODUCT:"DELETE_PRODUCT",GET_MY_PRODUCTS:"GET_MY_PRODUCTS",LINK_PRODUCT:"LINK_PRODUCT",APPROVE_PRODUCT:"APPROVE_PRODUCT",REJECT_PRODUCT:"REJECT_PRODUCT",DELETE_LINKED_PRODUCT:"DELETE_LINKED_PRODUCT",DOWNLOAD_PRODUCT:"DOWNLOAD_PRODUCT",GET_DOWNLOAD_RESOURCES:"GET_DOWNLOAD_RESOURCES",DISPLAY_MY_RESOURCES_MODAL:"DISPLAY_MY_RESOURCES_MODAL",ARRANGE_PRODUCTS:"ARRANGE_PRODUCTS",REGISTER_FOR_FREE_COURSE:"REGISTER_FOR_FREE_COURSE",CREATE_RESOURCE_STORE:"CREATE_RESOURCE_STORE",UPDATE_RESOURCE_STORE:"UPDATE_RESOURCE_STORE",DELETE_RESOURCE_STORE:"DELETE_RESOURCE_STORE",GET_RESOURCE_STORE:"GET_RESOURCE_STORE",INCREASE_STORE_VIEW_COUNT:"INCREASE_STORE_VIEW_COUNT",INCREASE_PROD_COUNTS:"INCREASE_PROD_COUNTS",CONNECT_VIDEO_WITH_STORE:"CONNECT_VIDEO_WITH_STORE",DISCONNECT_VIDEO_WITH_STORE:"DISCONNECT_VIDEO_WITH_STORE",GET_STORE_MEMBERS:"GET_STORE_MEMBERS",ADD_STORE_MEMBER:"ADD_STORE_MEMBER",UPDATE_STORE_MEMBER:"UPDATE_STORE_MEMBER",REMOVE_STORE_MEMBER:"REMOVE_STORE_MEMBER",REVIEW_STORE_MEMBER:"REVIEW_STORE_MEMBER",APPROVE_STORE_MEMBER:"APPROVE_STORE_MEMBER",READ_STORE_MEMBER_MESSAGES:"READ_STORE_MEMBER_MESSAGES",SEARCH_STORE_MEMBERS:"SEARCH_STORE_MEMBERS",GET_CHAPTER_SEMANTIC_BLOCKS:"GET_CHAPTER_SEMANTIC_BLOCKS",SET_LEARNING_SUBJECT:"SET_LEARNING_SUBJECT",UPDATE_TABLE_OF_CONTENT:"UPDATE_TABLE_OF_CONTENT",DISPLAY_SUBSCRIBE_MODAL:"DISPLAY_SUBSCRIBE_MODAL",UPDATE_SELECTED_VIDEO:"UPDATE_SELECTED_VIDEO",SEARCH_PUBLIC_COURSES:"SEARCH_PUBLIC_COURSES",GET_COURSE_FILES:"GET_COURSE_FILES",UPLOAD_COURSE_FILE:"UPLOAD_COURSE_FILE",UPDATE_COURSE_FILE:"UPDATE_COURSE_FILE",DELETE_COURSE_FILE:"DELETE_COURSE_FILE",ARRANGE_COURSE_FILES:"ARRANGE_COURSE_FILES"},s={VIDEO_READY:"VIDEO_READY",VIDEO_RESET:"VIDEO_RESET",VIDEO_PLAYED:"VIDEO_PLAYED",VIDEO_WAITING:"VIDEO_WAITING"},l={CANVAS_UPDATE_DRAWING_PROPERTIES:"CANVAS_UPDATE_DRAWING_PROPERTIES",GET_CB_DATA:"GET_CB_DATA",GET_CB_DATA_SUCCESS:"GET_CB_DATA_SUCCESS",GET_CB_DATA_FAILURE:"GET_CB_DATA_FAILURE",SAVE_CB_DATA:"SAVE_CB_DATA",SAVE_CB_DATA_SUCCESS:"SAVE_CB_DATA_SUCCESS",RESET_CANVAS_PROPERTIES:"RESET_CANVAS_PROPERTIES",RESET_CANVAS_EDIT_MODE_STYLES:"RESET_CANVAS_EDIT_MODE_STYLES",SET_DISPLAY_CONTEXTUAL_IMG:"SET_DISPLAY_CONTEXTUAL_IMG",UPDATE_SHOW_CONTEXTUAL_IMG:"UPDATE_SHOW_CONTEXTUAL_IMG",GET_HAS_CB_BLOCKS_SUCCESS:"GET_HAS_CB_BLOCKS_DATA_SUCCESS",DELETE_CB:"DELETE_CB",DELETE_CB_SUCCESS:"DELETE_CB_SUCCESS"},c={GET_SUBS_PRICE:"GET_SUBS_PRICE",SET_SUBS_PRICE:"SET_SUBS_PRICE",DEL_SUBS_PRICE:"DEL_SUBS_PRICE",SET_PRICE:"SET_PRICE"},u={CHECKOUT:"CHECKOUT",OPEN_CART:"OPEN_CART",GET_CART_ITEMS:"GET_CART_ITEMS",SET_CART_ITEMS:"SET_CART_ITEMS",ADD_ITEM_TO_CART:"ADD_ITEM_TO_CART",REMOVE_CART_ITEM:"REMOVE_CART_ITEM",REMOVE_ALL_CART_ITEMS:"REMOVE_ALL_CART_ITEMS",UPDATE_IS_QUICK_PURCHASING:"UPDATE_IS_QUICK_PURCHASING",REMOVE_ORDER:"REMOVE_ORDER",TOGGLE_OPEN_ORDER_HISTORY_MODAL:"TOGGLE_OPEN_ORDER_HISTORY_MODAL",GET_ORDER_LIST:"GET_ORDER_LIST",PROCEED_ORDER:"PROCEED_ORDER",CANCEL_ORDER:"CANCEL_ORDER",TOGGLE_OPEN_REVENUE_REPORT_MODAL:"TOGGLE_OPEN_REVENUE_REPORT_MODAL",GET_REVENUE_REPORT:"GET_REVENUE_REPORT"},d={GET_MY_SUBSCRIPTIONS:"GET_MY_SUBSCRIPTIONS",GET_MY_SUB_OPTIONS:"GET_MY_SUB_OPTIONS",SET_MY_SUB_OPTIONS:"SET_MY_SUB_OPTIONS",GET_SUBSCRIPTION_PLANS:"GET_SUBSCRIPTION_PLANS",GET_SUBSCRIPTION_OPTIONS:"GET_SUBSCRIPTION_OPTIONS",SUBSCRIBE_TO_PLAN:"SUBSCRIBE_TO_PLAN",CHANGE_PLAN:"CHANGE_PLAN",STOP_SUBSCRIPTION:"STOP_SUBSCRIPTION",UNSUBSCRIBE_PLAN:"UNSUBSCRIBE_PLAN",CHECKOUT:"SUBSCRIPTION_CHECKOUT",UPDATE_COURSE_SUBSCRIPTION:"UPDATE_COURSE_SUBSCRIPTION",CANCEL_COURSE_SUBSCRIPTION:"CANCEL_COURSE_SUBSCRIPTION",GET_MY_PAYMENT_METHODS:"GET_MY_PAYMENT_METHODS",ADD_PAYMENT_METHOD:"ADD_PAYMENT_METHOD",SET_DEFAULT_PAYMENT_METHOD:"SET_DEFAULT_PAYMENT_METHOD",DELETE_PAYMENT_METHOD:"DELETE_PAYMENT_METHOD",GET_MY_PAYOUT_ACCOUNTS:"GET_MY_PAYOUT_ACCOUNTS",ADD_PAYOUT_ACCOUNT:"ADD_PAYOUT_ACCOUNT",SET_DEFAULT_PAYOUT_ACCOUNT:"SET_DEFAULT_PAYOUT_ACCOUNT",SUBMIT_ACCOUNT_INFO:"SUBMIT_ACCOUNT_INFO",DELETE_PAYOUT_ACCOUNT:"DELETE_PAYOUT_ACCOUNT",SHOW_SUBSCRIPTION_FORM:"SHOW_SUBSCRIPTION_FORM",SHOW_FINANCE_ACCOUNT_FORM:"SHOW_FINANCE_ACCOUNT_FORM",SHOW_SUBSCRIBED_COURSES_FORM:"SHOW_SUBSCRIBED_COURSES_FORM",GET_MY_SUBSCRIBED_COURSES:"GET_MY_SUBSCRIBED_COURSES"},h={GET_PEOPLE_LIST:"GET_PEOPLE_LIST",GET_PEOPLE_DETAILS:"GET_PEOPLE_DETAILS",SEARCH_PEOPLE:"SEARCH_PEOPLE",SEARCH_FRIENDS:"SEARCH_FRIENDS",SEARCH_FRIENDS_2:"SEARCH_FRIENDS_2",GET_FRIENDSHIP_STATUS:"GET_FRIENDSHIP_STATUS",GET_FRIEND_LIST:"GET_FRIEND_LIST",GET_REQUEST_LIST:"GET_REQUEST_LIST",UNFRIEND:"UNFRIEND",SEND_FRIEND_REQUEST:"SEND_FRIEND_REQUEST",CANCEL_FRIEND_REQUEST:"CANCEL_FRIEND_REQUEST",CONFIRM_FRIEND_REQUEST:"CONFIRM_FRIEND_REQUEST",DECLINE_FRIEND_REQUEST:"DECLINE_FRIEND_REQUEST",GET_GROUP_LIST:"GET_GROUP_LIST",UPDATE_CREATE_GROUP_MODAL:"UPDATE_CREATE_GROUP_MODAL",GET_GROUP_DETAIL:"GET_GROUP_DETAIL",UPDATE_GROUP_INFO:"UPDATE_GROUP_INFO",GET_GROUP_MEMBER:"GET_GROUP_MEMBER",GET_GROUP_MEMBER_BY_VIDEO:"GET_GROUP_MEMBER_BY_VIDEO",TOGGLE_CREATE_GROUP_FORM:"TOGGLE_CREATE_GROUP_FORM",CREATE_GROUP:"CREATE_GROUP",DELETE_GROUP:"DELETE_GROUP",ADD_GROUP_MEMBER:"ADD_GROUP_MEMBER",REMOVE_GROUP_MEMBER:"REMOVE_GROUP_MEMBER",UPLOAD_GROUP_AVATAR:"UPLOAD_GROUP_AVATAR",GET_GROUP_COUNT:"GET_GROUP_COUNT"},f={GET_NOTIFICATIONS:"GET_NOTIFICATIONS",GET_NOTIFICATIONS_STATISTICS:"GET_NOTIFICATIONS_STATISTICS",REDUCE_NOTIFICATIONS_STATISTICS:"REDUCE_NOTIFICATIONS_STATISTICS",UPDATE_NOTIFICATION:"UPDATE_NOTIFICATION",DELETE_NOTIFICATION:"DELETE_NOTIFICATION",MARK_ALL_AS_READ:"MARK_ALL_AS_READ",UPDATE_NO_NEW_NOTIFICATIONS:"UPDATE_NO_NEW_NOTIFICATIONS",UPDATE_NO_NEW_SHARED_VIDEO:"UPDATE_NO_NEW_SHARED_VIDEO",RESET_NO_NEW_SHARED_VIDEO:"RESET_NO_NEW_SHARED_VIDEO",RESET_VIDEO_STATISTICS:"RESET_VIDEO_STATISTICS",UPDATE_VIDEO_STATISTICS:"UPDATE_VIDEO_STATISTICS",UPDATE_TRACKING_OBJECT:"UPDATE_TRACKING_OBJECT",UPDATE_NOTIFICATION_STATE:"UPDATE_NOTIFICATION_STATE",RESET_NO_NEW_SHARED_MESSAGE_VIDEOS:"RESET_NO_NEW_SHARED_MESSAGE_VIDEOS",SET_KPI_CHANGES:"SET_KPI_CHANGES",SET_KPI_COMPLETED_CHAPTERS:"SET_KPI_COMPLETED_CHAPTERS"},p={UPDATE_CREATING_COGVID_PROGRESS:"UPDATE_CREATING_COGVID_PROGRESS",UPDATE_A_COGVID_PROGRESS:"UPDATE_A_COGVID_PROGRESS",REMOVE_A_COGVID_PROGRESS:"REMOVE_A_COGVID_PROGRESS",UPDATE_TOTAL_COGVID_PROGRESS:"UPDATE_TOTAL_COGVID_PROGRESS",ADD_UPLOADER:"ADD_UPLOADER",REMOVE_UPLOADER:"REMOVE_UPLOADER",START_A_FILE_UPLOAD:"START_A_FILE_UPLOAD",START_A_COGVID_FILE_UPLOAD:"START_A_COGVID_FILE_UPLOAD",UPDATE_IS_UPLOADING_COGVID:"UPDATE_IS_UPLOADING_COGVID",UPDATE_IS_UPLOADING_ATTACHMENT:"UPDATE_IS_UPLOADING_ATTACHMENT",CHANGE_SHOULD_UPDATE_PROGRESS:"CHANGE_SHOULD_UPDATE_PROGRESS",UPDATE_TRANSCODING_STATUS:"UPDATE_TRANSCODING_STATUS"},m={DISPLAY_COMMENTS:"DISPLAY_COMMENTS",DISPLAY_NOTES:"DISPLAY_NOTES",DISPLAY_PREVIEW_COMMENTS:"DISPLAY_PREVIEW_COMMENTS",DISPLAY_PREVIEW_NOTES:"DISPLAY_PREVIEW_NOTES",GET_CHAPTER_COMMENTS:"GET_CHAPTER_COMMENTS",ADD_CHAPTER_COMMENT:"ADD_CHAPTER_COMMENT",UPDATE_CHAPTER_COMMENT:"UPDATE_CHAPTER_COMMENT",DELETE_CHAPTER_COMMENT:"DELETE_CHAPTER_COMMENT",GET_CHAPTER_NOTES:"GET_CHAPTER_NOTES",ADD_CHAPTER_NOTE:"ADD_CHAPTER_NOTE",UPDATE_CHAPTER_NOTE:"UPDATE_CHAPTER_NOTE",UPDATE_DISPLAY_NOTES:"UPDATE_DISPLAY_NOTES",DELETE_CHAPTER_NOTE:"DELETE_CHAPTER_NOTE",GET_CHAPTER_LIKES:"GET_CHAPTER_LIKES",RATING_PRODUCT:"RATING_PRODUCT",GET_PRODUCT_RATINGS:"GET_PRODUCT_RATINGS",GET_PRODUCT_MY_RATING:"GET_PRODUCT_MY_RATING",GET_PRODUCT_SUMMARY_RATING:"GET_PRODUCT_SUMMARY_RATING",UPDATE_RATING:"UPDATE_RATING",DELETE_RATING:"DELETE_RATING",LIKE_PRODUCT:"LIKE_PRODUCT",DISPLAY_CHAPTER_COVER_IMAGE:"DISPLAY_CHAPTER_COVER_IMAGE",DISPLAY_SLIDE:"DISPLAY_SLIDE",DISPLAY_CHAPTER_IMAGE_SLIDER:"DISPLAY_CHAPTER_IMAGE_SLIDER",UPDATE_CHAPTER_IMAGE_SLIDER:"UPDATE_CHAPTER_IMAGE_SLIDER",DISPLAY_SLIDE_TYPE:"DISPLAY_SLIDE_TYPE",FU_SLIDES_EXISTANCE:"FU_SLIDES_EXISTANCE",FREE_FUI_FLAG_UPDATE:"FREE_FUI_FLAG_UPDATE",DISPLAY_TOC:"DISPLAY_TOC",DISPLAY_LOCK:"DISPLAY_LOCK",DISPLAY_CHAPTER_FILE_UPLOAD_MODAL:"DISPLAY_CHAPTER_FILE_UPLOAD_MODAL",DISPLAY_CHAPTER_FILE_DELETE_MODAL:"DISPLAY_CHAPTER_FILE_DELETE_MODAL",DISPLAY_CHAPTER_FILE_MANAGER_MODAL:"DISPLAY_CHAPTER_FILE_MANAGER_MODAL"},g={TOGGLE_DEVICE_SETUP_MODAL:"TOGGLE_DEVICE_SETUP_MODAL",SET_MEETING_INFO:"SET_MEETING_INFO",SET_MEETING_SESSION:"SET_MEETING_SESSION",START_MEETING:"START_MEETING",START_MEETING_SUCCESS:"START_MEETING_SUCCESS",JOIN_MEETING:"JOIN_MEETING",JOIN_MEETING_SUCCESS:"JOIN_MEETING_SUCCESS",LEAVE_MEETING:"LEAVE_MEETING",END_MEETING:"END_MEETING",END_MEETING_SUCCESS:"END_MEETING_SUCCESS",GET_MEETING_INFO:"GET_MEETING_INFO",GET_MEETING_INFO_SUCCESS:"GET_MEETING_INFO_SUCCESS",FETCH_MEETING:"FETCH_MEETING",GET_ALL_PARTICIPANT:"GET_ALL_PARTICIPANT",GET_ALL_PARTICIPANT_SUCCESS:"GET_ALL_PARTICIPANT_SUCCESS",CREATE_GET_ATTENDEE_CALLBACK:"CREATE_GET_ATTENDEE_CALLBACK",START_RECORD_MEETING:"START_RECORD_MEETING",SET_MEDIA_PIPELINE:"SET_MEDIA_PIPELINE",STOP_RECORD_MEETING:"STOP_RECORD_MEETING"}},function(e,t,n){e.exports=n(1062)()},function(e,t,n){(function(e,r){var i;
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */(function(){var a="Expected a function",o="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",c="[object Array]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Object]",b="[object RegExp]",y="[object Set]",A="[object String]",_="[object Symbol]",w="[object WeakMap]",E="[object ArrayBuffer]",S="[object DataView]",C="[object Float32Array]",T="[object Float64Array]",k="[object Int8Array]",x="[object Int16Array]",O="[object Int32Array]",I="[object Uint8Array]",M="[object Uint16Array]",P="[object Uint32Array]",D=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,j=RegExp(R.source),F=RegExp(B.source),U=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,G=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(q.source),K=/^\s+/,X=/\s/,Q=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,J=/,? & /,Z=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,ae=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,de=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",fe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",me="["+fe+"]",ge="["+he+"]",ve="\\d+",be="[\\u2700-\\u27bf]",ye="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ae="[^\\ud800-\\udfff"+fe+ve+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Te="(?:"+ye+"|"+Ae+")",ke="(?:"+Ce+"|"+Ae+")",xe="(?:"+ge+"|"+_e+")"+"?",Oe="[\\ufe0e\\ufe0f]?"+xe+("(?:\\u200d(?:"+[we,Ee,Se].join("|")+")[\\ufe0e\\ufe0f]?"+xe+")*"),Ie="(?:"+[be,Ee,Se].join("|")+")"+Oe,Me="(?:"+[we+ge+"?",ge,Ee,Se,pe].join("|")+")",Pe=RegExp("['’]","g"),De=RegExp(ge,"g"),Ne=RegExp(_e+"(?="+_e+")|"+Me+Oe,"g"),Le=RegExp([Ce+"?"+ye+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[me,Ce,"$"].join("|")+")",ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[me,Ce+Te,"$"].join("|")+")",Ce+"?"+Te+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ce+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Ie].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+he+"\\ufe0e\\ufe0f]"),Be=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,je=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fe=-1,Ue={};Ue[C]=Ue[T]=Ue[k]=Ue[x]=Ue[O]=Ue[I]=Ue["[object Uint8ClampedArray]"]=Ue[M]=Ue[P]=!0,Ue[l]=Ue[c]=Ue[E]=Ue[u]=Ue[S]=Ue[d]=Ue[h]=Ue[f]=Ue[m]=Ue[g]=Ue[v]=Ue[b]=Ue[y]=Ue[A]=Ue[w]=!1;var He={};He[l]=He[c]=He[E]=He[S]=He[u]=He[d]=He[C]=He[T]=He[k]=He[x]=He[O]=He[m]=He[g]=He[v]=He[b]=He[y]=He[A]=He[_]=He[I]=He["[object Uint8ClampedArray]"]=He[M]=He[P]=!0,He[h]=He[f]=He[w]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ve=parseFloat,We=parseInt,Ge="object"==typeof e&&e&&e.Object===Object&&e,qe="object"==typeof self&&self&&self.Object===Object&&self,Ye=Ge||qe||Function("return this")(),Ke=t&&!t.nodeType&&t,Xe=Ke&&"object"==typeof r&&r&&!r.nodeType&&r,Qe=Xe&&Xe.exports===Ke,$e=Qe&&Ge.process,Je=function(){try{var e=Xe&&Xe.require&&Xe.require("util").types;return e||$e&&$e.binding&&$e.binding("util")}catch(e){}}(),Ze=Je&&Je.isArrayBuffer,et=Je&&Je.isDate,tt=Je&&Je.isMap,nt=Je&&Je.isRegExp,rt=Je&&Je.isSet,it=Je&&Je.isTypedArray;function at(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function st(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ut(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function dt(e,t){return!!(null==e?0:e.length)&&_t(e,t,0)>-1}function ht(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ft(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function pt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function mt(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function gt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bt=Ct("length");function yt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function At(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function _t(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):At(e,Et,n)}function wt(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Et(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?xt(e,t)/n:NaN}function Ct(e){return function(t){return null==t?void 0:t[e]}}function Tt(e){return function(t){return null==e?void 0:e[t]}}function kt(e,t,n,r,i){return i(e,(function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)})),n}function xt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);void 0!==a&&(n=void 0===n?a:n+a)}return n}function Ot(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function It(e){return e?e.slice(0,Kt(e)+1).replace(K,""):e}function Mt(e){return function(t){return e(t)}}function Pt(e,t){return ft(t,(function(t){return e[t]}))}function Dt(e,t){return e.has(t)}function Nt(e,t){for(var n=-1,r=e.length;++n<r&&_t(t,e[n],0)>-1;);return n}function Lt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Bt=Tt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),jt=Tt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Ft(e){return"\\"+ze[e]}function Ut(e){return Re.test(e)}function Ht(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Vt(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function Wt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Gt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function qt(e){return Ut(e)?function(e){var t=Ne.lastIndex=0;for(;Ne.test(e);)++t;return t}(e):bt(e)}function Yt(e){return Ut(e)?function(e){return e.match(Ne)||[]}(e):function(e){return e.split("")}(e)}function Kt(e){for(var t=e.length;t--&&X.test(e.charAt(t)););return t}var Xt=Tt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Qt=function e(t){var n,r=(t=null==t?Ye:Qt.defaults(Ye.Object(),t,Qt.pick(Ye,je))).Array,i=t.Date,X=t.Error,he=t.Function,fe=t.Math,pe=t.Object,me=t.RegExp,ge=t.String,ve=t.TypeError,be=r.prototype,ye=he.prototype,Ae=pe.prototype,_e=t["__core-js_shared__"],we=ye.toString,Ee=Ae.hasOwnProperty,Se=0,Ce=(n=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Te=Ae.toString,ke=we.call(pe),xe=Ye._,Oe=me("^"+we.call(Ee).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ie=Qe?t.Buffer:void 0,Me=t.Symbol,Ne=t.Uint8Array,Re=Ie?Ie.allocUnsafe:void 0,ze=zt(pe.getPrototypeOf,pe),Ge=pe.create,qe=Ae.propertyIsEnumerable,Ke=be.splice,Xe=Me?Me.isConcatSpreadable:void 0,$e=Me?Me.iterator:void 0,Je=Me?Me.toStringTag:void 0,bt=function(){try{var e=ea(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Tt=t.clearTimeout!==Ye.clearTimeout&&t.clearTimeout,$t=i&&i.now!==Ye.Date.now&&i.now,Jt=t.setTimeout!==Ye.setTimeout&&t.setTimeout,Zt=fe.ceil,en=fe.floor,tn=pe.getOwnPropertySymbols,nn=Ie?Ie.isBuffer:void 0,rn=t.isFinite,an=be.join,on=zt(pe.keys,pe),sn=fe.max,ln=fe.min,cn=i.now,un=t.parseInt,dn=fe.random,hn=be.reverse,fn=ea(t,"DataView"),pn=ea(t,"Map"),mn=ea(t,"Promise"),gn=ea(t,"Set"),vn=ea(t,"WeakMap"),bn=ea(pe,"create"),yn=vn&&new vn,An={},_n=ka(fn),wn=ka(pn),En=ka(mn),Sn=ka(gn),Cn=ka(vn),Tn=Me?Me.prototype:void 0,kn=Tn?Tn.valueOf:void 0,xn=Tn?Tn.toString:void 0;function On(e){if(Go(e)&&!No(e)&&!(e instanceof Dn)){if(e instanceof Pn)return e;if(Ee.call(e,"__wrapped__"))return xa(e)}return new Pn(e)}var In=function(){function e(){}return function(t){if(!Wo(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Mn(){}function Pn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Dn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Rn;++t<n;)this.add(e[t])}function jn(e){var t=this.__data__=new Ln(e);this.size=t.size}function Fn(e,t){var n=No(e),r=!n&&Do(e),i=!n&&!r&&jo(e),a=!n&&!r&&!i&&Zo(e),o=n||r||i||a,s=o?Ot(e.length,ge):[],l=s.length;for(var c in e)!t&&!Ee.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sa(c,l))||s.push(c);return s}function Un(e){var t=e.length;return t?e[Br(0,t-1)]:void 0}function Hn(e,t){return Sa(bi(e),Qn(t,0,e.length))}function zn(e){return Sa(bi(e))}function Vn(e,t,n){(void 0===n||Io(e[t],n))&&(void 0!==n||t in e)||Kn(e,t,n)}function Wn(e,t,n){var r=e[t];Ee.call(e,t)&&Io(r,n)&&(void 0!==n||t in e)||Kn(e,t,n)}function Gn(e,t){for(var n=e.length;n--;)if(Io(e[n][0],t))return n;return-1}function qn(e,t,n,r){return tr(e,(function(e,i,a){t(r,e,n(e),a)})),r}function Yn(e,t){return e&&yi(t,_s(t),e)}function Kn(e,t,n){"__proto__"==t&&bt?bt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Xn(e,t){for(var n=-1,i=t.length,a=r(i),o=null==e;++n<i;)a[n]=o?void 0:gs(e,t[n]);return a}function Qn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function $n(e,t,n,r,i,a){var o,s=1&t,c=2&t,h=4&t;if(n&&(o=i?n(e,r,i,a):n(e)),void 0!==o)return o;if(!Wo(e))return e;var w=No(e);if(w){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return bi(e,o)}else{var D=ra(e),N=D==f||D==p;if(jo(e))return hi(e,s);if(D==v||D==l||N&&!i){if(o=c||N?{}:aa(e),!s)return c?function(e,t){return yi(e,na(e),t)}(e,function(e,t){return e&&yi(t,ws(t),e)}(o,e)):function(e,t){return yi(e,ta(e),t)}(e,Yn(o,e))}else{if(!He[D])return i?e:{};o=function(e,t,n){var r=e.constructor;switch(t){case E:return fi(e);case u:case d:return new r(+e);case S:return function(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case C:case T:case k:case x:case O:case I:case"[object Uint8ClampedArray]":case M:case P:return pi(e,n);case m:return new r;case g:case A:return new r(e);case b:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case y:return new r;case _:return i=e,kn?pe(kn.call(i)):{}}var i}(e,D,s)}}a||(a=new jn);var L=a.get(e);if(L)return L;a.set(e,o),Qo(e)?e.forEach((function(r){o.add($n(r,t,n,r,e,a))})):qo(e)&&e.forEach((function(r,i){o.set(i,$n(r,t,n,i,e,a))}));var R=w?void 0:(h?c?Yi:qi:c?ws:_s)(e);return st(R||e,(function(r,i){R&&(r=e[i=r]),Wn(o,i,$n(r,t,n,i,e,a))})),o}function Jn(e,t,n){var r=n.length;if(null==e)return!r;for(e=pe(e);r--;){var i=n[r],a=t[i],o=e[i];if(void 0===o&&!(i in e)||!a(o))return!1}return!0}function Zn(e,t,n){if("function"!=typeof e)throw new ve(a);return Aa((function(){e.apply(void 0,n)}),t)}function er(e,t,n,r){var i=-1,a=dt,o=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=ft(t,Mt(n))),r?(a=ht,o=!1):t.length>=200&&(a=Dt,o=!1,t=new Bn(t));e:for(;++i<s;){var u=e[i],d=null==n?u:n(u);if(u=r||0!==u?u:0,o&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else a(t,d,r)||l.push(u)}return l}On.templateSettings={escape:U,evaluate:H,interpolate:z,variable:"",imports:{_:On}},On.prototype=Mn.prototype,On.prototype.constructor=On,Pn.prototype=In(Mn.prototype),Pn.prototype.constructor=Pn,Dn.prototype=In(Mn.prototype),Dn.prototype.constructor=Dn,Nn.prototype.clear=function(){this.__data__=bn?bn(null):{},this.size=0},Nn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Nn.prototype.get=function(e){var t=this.__data__;if(bn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ee.call(t,e)?t[e]:void 0},Nn.prototype.has=function(e){var t=this.__data__;return bn?void 0!==t[e]:Ee.call(t,e)},Nn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bn&&void 0===t?"__lodash_hash_undefined__":t,this},Ln.prototype.clear=function(){this.__data__=[],this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=Gn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},Ln.prototype.get=function(e){var t=this.__data__,n=Gn(t,e);return n<0?void 0:t[n][1]},Ln.prototype.has=function(e){return Gn(this.__data__,e)>-1},Ln.prototype.set=function(e,t){var n=this.__data__,r=Gn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(pn||Ln),string:new Nn}},Rn.prototype.delete=function(e){var t=Ji(this,e).delete(e);return this.size-=t?1:0,t},Rn.prototype.get=function(e){return Ji(this,e).get(e)},Rn.prototype.has=function(e){return Ji(this,e).has(e)},Rn.prototype.set=function(e,t){var n=Ji(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Bn.prototype.add=Bn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Bn.prototype.has=function(e){return this.__data__.has(e)},jn.prototype.clear=function(){this.__data__=new Ln,this.size=0},jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},jn.prototype.get=function(e){return this.__data__.get(e)},jn.prototype.has=function(e){return this.__data__.has(e)},jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ln){var r=n.__data__;if(!pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rn(r)}return n.set(e,t),this.size=n.size,this};var tr=wi(cr),nr=wi(ur,!0);function rr(e,t){var n=!0;return tr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function ir(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(null!=o&&(void 0===s?o==o&&!Jo(o):n(o,s)))var s=o,l=a}return l}function ar(e,t){var n=[];return tr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function or(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=oa),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?or(s,t-1,n,r,i):pt(i,s):r||(i[i.length]=s)}return i}var sr=Ei(),lr=Ei(!0);function cr(e,t){return e&&sr(e,t,_s)}function ur(e,t){return e&&lr(e,t,_s)}function dr(e,t){return ut(t,(function(t){return Ho(e[t])}))}function hr(e,t){for(var n=0,r=(t=li(t,e)).length;null!=e&&n<r;)e=e[Ta(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return No(e)?r:pt(r,n(e))}function pr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Je&&Je in pe(e)?function(e){var t=Ee.call(e,Je),n=e[Je];try{e[Je]=void 0;var r=!0}catch(e){}var i=Te.call(e);r&&(t?e[Je]=n:delete e[Je]);return i}(e):function(e){return Te.call(e)}(e)}function mr(e,t){return e>t}function gr(e,t){return null!=e&&Ee.call(e,t)}function vr(e,t){return null!=e&&t in pe(e)}function br(e,t,n){for(var i=n?ht:dt,a=e[0].length,o=e.length,s=o,l=r(o),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=ft(d,Mt(t))),c=ln(d.length,c),l[s]=!n&&(t||a>=120&&d.length>=120)?new Bn(s&&d):void 0}d=e[0];var h=-1,f=l[0];e:for(;++h<a&&u.length<c;){var p=d[h],m=t?t(p):p;if(p=n||0!==p?p:0,!(f?Dt(f,m):i(u,m,n))){for(s=o;--s;){var g=l[s];if(!(g?Dt(g,m):i(e[s],m,n)))continue e}f&&f.push(m),u.push(p)}}return u}function yr(e,t,n){var r=null==(e=ga(e,t=li(t,e)))?e:e[Ta(Fa(t))];return null==r?void 0:at(r,e,n)}function Ar(e){return Go(e)&&pr(e)==l}function _r(e,t,n,r,i){return e===t||(null==e||null==t||!Go(e)&&!Go(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var o=No(e),s=No(t),f=o?c:ra(e),p=s?c:ra(t),w=(f=f==l?v:f)==v,C=(p=p==l?v:p)==v,T=f==p;if(T&&jo(e)){if(!jo(t))return!1;o=!0,w=!1}if(T&&!w)return a||(a=new jn),o||Zo(e)?Wi(e,t,n,r,i,a):function(e,t,n,r,i,a,o){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!a(new Ne(e),new Ne(t)));case u:case d:case g:return Io(+e,+t);case h:return e.name==t.name&&e.message==t.message;case b:case A:return e==t+"";case m:var s=Ht;case y:var l=1&r;if(s||(s=Wt),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var f=Wi(s(e),s(t),r,i,a,o);return o.delete(e),f;case _:if(kn)return kn.call(e)==kn.call(t)}return!1}(e,t,f,n,r,i,a);if(!(1&n)){var k=w&&Ee.call(e,"__wrapped__"),x=C&&Ee.call(t,"__wrapped__");if(k||x){var O=k?e.value():e,I=x?t.value():t;return a||(a=new jn),i(O,I,n,r,a)}}if(!T)return!1;return a||(a=new jn),function(e,t,n,r,i,a){var o=1&n,s=qi(e),l=s.length,c=qi(t).length;if(l!=c&&!o)return!1;var u=l;for(;u--;){var d=s[u];if(!(o?d in t:Ee.call(t,d)))return!1}var h=a.get(e),f=a.get(t);if(h&&f)return h==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);var m=o;for(;++u<l;){d=s[u];var g=e[d],v=t[d];if(r)var b=o?r(v,g,d,t,e,a):r(g,v,d,e,t,a);if(!(void 0===b?g===v||i(g,v,n,r,a):b)){p=!1;break}m||(m="constructor"==d)}if(p&&!m){var y=e.constructor,A=t.constructor;y!=A&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof A&&A instanceof A)&&(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,r,i,a)}(e,t,n,r,_r,i))}function wr(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=pe(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var l=(s=n[i])[0],c=e[l],u=s[1];if(o&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new jn;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?_r(u,c,3,r,d):h))return!1}}return!0}function Er(e){return!(!Wo(e)||(t=e,Ce&&Ce in t))&&(Ho(e)?Oe:oe).test(ka(e));var t}function Sr(e){return"function"==typeof e?e:null==e?Ys:"object"==typeof e?No(e)?Ir(e[0],e[1]):Or(e):nl(e)}function Cr(e){if(!ha(e))return on(e);var t=[];for(var n in pe(e))Ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Tr(e){if(!Wo(e))return function(e){var t=[];if(null!=e)for(var n in pe(e))t.push(n);return t}(e);var t=ha(e),n=[];for(var r in e)("constructor"!=r||!t&&Ee.call(e,r))&&n.push(r);return n}function kr(e,t){return e<t}function xr(e,t){var n=-1,i=Ro(e)?r(e.length):[];return tr(e,(function(e,r,a){i[++n]=t(e,r,a)})),i}function Or(e){var t=Zi(e);return 1==t.length&&t[0][2]?pa(t[0][0],t[0][1]):function(n){return n===e||wr(n,e,t)}}function Ir(e,t){return ca(e)&&fa(t)?pa(Ta(e),t):function(n){var r=gs(n,e);return void 0===r&&r===t?vs(n,e):_r(t,r,3)}}function Mr(e,t,n,r,i){e!==t&&sr(t,(function(a,o){if(i||(i=new jn),Wo(a))!function(e,t,n,r,i,a,o){var s=ba(e,n),l=ba(t,n),c=o.get(l);if(c)return void Vn(e,n,c);var u=a?a(s,l,n+"",e,t,o):void 0,d=void 0===u;if(d){var h=No(l),f=!h&&jo(l),p=!h&&!f&&Zo(l);u=l,h||f||p?No(s)?u=s:Bo(s)?u=bi(s):f?(d=!1,u=hi(l,!0)):p?(d=!1,u=pi(l,!0)):u=[]:Ko(l)||Do(l)?(u=s,Do(s)?u=ss(s):Wo(s)&&!Ho(s)||(u=aa(l))):d=!1}d&&(o.set(l,u),i(u,l,r,a,o),o.delete(l));Vn(e,n,u)}(e,t,o,n,Mr,r,i);else{var s=r?r(ba(e,o),a,o+"",e,t,i):void 0;void 0===s&&(s=a),Vn(e,o,s)}}),ws)}function Pr(e,t){var n=e.length;if(n)return sa(t+=t<0?n:0,n)?e[t]:void 0}function Dr(e,t,n){t=t.length?ft(t,(function(e){return No(e)?function(t){return hr(t,1===e.length?e[0]:e)}:e})):[Ys];var r=-1;return t=ft(t,Mt($i())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(xr(e,(function(e,n,i){return{criteria:ft(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;for(;++r<o;){var l=mi(i[r],a[r]);if(l){if(r>=s)return l;var c=n[r];return l*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)}))}function Nr(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=hr(e,o);n(s,o)&&zr(a,li(o,e),s)}return a}function Lr(e,t,n,r){var i=r?wt:_t,a=-1,o=t.length,s=e;for(e===t&&(t=bi(t)),n&&(s=ft(e,Mt(n)));++a<o;)for(var l=0,c=t[a],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&Ke.call(s,l,1),Ke.call(e,l,1);return e}function Rr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;sa(i)?Ke.call(e,i,1):ei(e,i)}}return e}function Br(e,t){return e+en(dn()*(t-e+1))}function jr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function Fr(e,t){return _a(ma(e,t,Ys),e+"")}function Ur(e){return Un(Is(e))}function Hr(e,t){var n=Is(e);return Sa(n,Qn(t,0,n.length))}function zr(e,t,n,r){if(!Wo(e))return e;for(var i=-1,a=(t=li(t,e)).length,o=a-1,s=e;null!=s&&++i<a;){var l=Ta(t[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=o){var u=s[l];void 0===(c=r?r(u,l,s):void 0)&&(c=Wo(u)?u:sa(t[i+1])?[]:{})}Wn(s,l,c),s=s[l]}return e}var Vr=yn?function(e,t){return yn.set(e,t),e}:Ys,Wr=bt?function(e,t){return bt(e,"toString",{configurable:!0,enumerable:!1,value:Ws(t),writable:!0})}:Ys;function Gr(e){return Sa(Is(e))}function qr(e,t,n){var i=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=r(a);++i<a;)o[i]=e[i+t];return o}function Yr(e,t){var n;return tr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Kr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var a=r+i>>>1,o=e[a];null!==o&&!Jo(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return Xr(e,t,Ys,n)}function Xr(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=n(t))!=t,s=null===t,l=Jo(t),c=void 0===t;i<a;){var u=en((i+a)/2),d=n(e[u]),h=void 0!==d,f=null===d,p=d==d,m=Jo(d);if(o)var g=r||p;else g=c?p&&(r||h):s?p&&h&&(r||!f):l?p&&h&&!f&&(r||!m):!f&&!m&&(r?d<=t:d<t);g?i=u+1:a=u}return ln(a,4294967294)}function Qr(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!Io(s,l)){var l=s;a[i++]=0===o?0:o}}return a}function $r(e){return"number"==typeof e?e:Jo(e)?NaN:+e}function Jr(e){if("string"==typeof e)return e;if(No(e))return ft(e,Jr)+"";if(Jo(e))return xn?xn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zr(e,t,n){var r=-1,i=dt,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=ht;else if(a>=200){var c=t?null:ji(e);if(c)return Wt(c);o=!1,i=Dt,l=new Bn}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,o&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function ei(e,t){return null==(e=ga(e,t=li(t,e)))||delete e[Ta(Fa(t))]}function ti(e,t,n,r){return zr(e,t,n(hr(e,t)),r)}function ni(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?qr(e,r?0:a,r?a+1:i):qr(e,r?a+1:0,r?i:a)}function ri(e,t){var n=e;return n instanceof Dn&&(n=n.value()),mt(t,(function(e,t){return t.func.apply(t.thisArg,pt([e],t.args))}),n)}function ii(e,t,n){var i=e.length;if(i<2)return i?Zr(e[0]):[];for(var a=-1,o=r(i);++a<i;)for(var s=e[a],l=-1;++l<i;)l!=a&&(o[a]=er(o[a]||s,e[l],t,n));return Zr(or(o,1),t,n)}function ai(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function oi(e){return Bo(e)?e:[]}function si(e){return"function"==typeof e?e:Ys}function li(e,t){return No(e)?e:ca(e,t)?[e]:Ca(ls(e))}var ci=Fr;function ui(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:qr(e,t,n)}var di=Tt||function(e){return Ye.clearTimeout(e)};function hi(e,t){if(t)return e.slice();var n=e.length,r=Re?Re(n):new e.constructor(n);return e.copy(r),r}function fi(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function pi(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function mi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,a=Jo(e),o=void 0!==t,s=null===t,l=t==t,c=Jo(t);if(!s&&!c&&!a&&e>t||a&&o&&l&&!s&&!c||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&e<t||c&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!l)return-1}return 0}function gi(e,t,n,i){for(var a=-1,o=e.length,s=n.length,l=-1,c=t.length,u=sn(o-s,0),d=r(c+u),h=!i;++l<c;)d[l]=t[l];for(;++a<s;)(h||a<o)&&(d[n[a]]=e[a]);for(;u--;)d[l++]=e[a++];return d}function vi(e,t,n,i){for(var a=-1,o=e.length,s=-1,l=n.length,c=-1,u=t.length,d=sn(o-l,0),h=r(d+u),f=!i;++a<d;)h[a]=e[a];for(var p=a;++c<u;)h[p+c]=t[c];for(;++s<l;)(f||a<o)&&(h[p+n[s]]=e[a++]);return h}function bi(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function yi(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?Kn(n,s,l):Wn(n,s,l)}return n}function Ai(e,t){return function(n,r){var i=No(n)?ot:qn,a=t?t():{};return i(n,e,$i(r,2),a)}}function _i(e){return Fr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&la(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=pe(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))}function wi(e,t){return function(n,r){if(null==n)return n;if(!Ro(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=pe(n);(t?a--:++a<i)&&!1!==r(o[a],a,o););return n}}function Ei(e){return function(t,n,r){for(var i=-1,a=pe(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===n(a[l],l,a))break}return t}}function Si(e){return function(t){var n=Ut(t=ls(t))?Yt(t):void 0,r=n?n[0]:t.charAt(0),i=n?ui(n,1).join(""):t.slice(1);return r[e]()+i}}function Ci(e){return function(t){return mt(Hs(Ds(t).replace(Pe,"")),e,"")}}function Ti(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=In(e.prototype),r=e.apply(n,t);return Wo(r)?r:n}}function ki(e){return function(t,n,r){var i=pe(t);if(!Ro(t)){var a=$i(n,3);t=_s(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}function xi(e){return Gi((function(t){var n=t.length,r=n,i=Pn.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ve(a);if(i&&!s&&"wrapper"==Xi(o))var s=new Pn([],!0)}for(r=s?r:n;++r<n;){var l=Xi(o=t[r]),c="wrapper"==l?Ki(o):void 0;s=c&&ua(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[Xi(c[0])].apply(s,c[3]):1==o.length&&ua(o)?s[l]():s.thru(o)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&No(r))return s.plant(r).value();for(var i=0,a=n?t[i].apply(this,e):r;++i<n;)a=t[i].call(this,a);return a}}))}function Oi(e,t,n,i,a,o,s,l,c,u){var d=128&t,h=1&t,f=2&t,p=24&t,m=512&t,g=f?void 0:Ti(e);return function v(){for(var b=arguments.length,y=r(b),A=b;A--;)y[A]=arguments[A];if(p)var _=Qi(v),w=Rt(y,_);if(i&&(y=gi(y,i,a,p)),o&&(y=vi(y,o,s,p)),b-=w,p&&b<u){var E=Vt(y,_);return Ri(e,t,Oi,v.placeholder,n,y,E,l,c,u-b)}var S=h?n:this,C=f?S[e]:e;return b=y.length,l?y=va(y,l):m&&b>1&&y.reverse(),d&&c<b&&(y.length=c),this&&this!==Ye&&this instanceof v&&(C=g||Ti(C)),C.apply(S,y)}}function Ii(e,t){return function(n,r){return function(e,t,n,r){return cr(e,(function(e,i,a){t(r,n(e),i,a)})),r}(n,e,t(r),{})}}function Mi(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Jr(n),r=Jr(r)):(n=$r(n),r=$r(r)),i=e(n,r)}return i}}function Pi(e){return Gi((function(t){return t=ft(t,Mt($i())),Fr((function(n){var r=this;return e(t,(function(e){return at(e,r,n)}))}))}))}function Di(e,t){var n=(t=void 0===t?" ":Jr(t)).length;if(n<2)return n?jr(t,e):t;var r=jr(t,Zt(e/qt(t)));return Ut(t)?ui(Yt(r),0,e).join(""):r.slice(0,e)}function Ni(e){return function(t,n,i){return i&&"number"!=typeof i&&la(t,n,i)&&(n=i=void 0),t=rs(t),void 0===n?(n=t,t=0):n=rs(n),function(e,t,n,i){for(var a=-1,o=sn(Zt((t-e)/(n||1)),0),s=r(o);o--;)s[i?o:++a]=e,e+=n;return s}(t,n,i=void 0===i?t<n?1:-1:rs(i),e)}}function Li(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=os(t),n=os(n)),e(t,n)}}function Ri(e,t,n,r,i,a,o,s,l,c){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,i,u?a:void 0,u?o:void 0,u?void 0:a,u?void 0:o,s,l,c],h=n.apply(void 0,d);return ua(e)&&ya(h,d),h.placeholder=r,wa(h,e,t)}function Bi(e){var t=fe[e];return function(e,n){if(e=os(e),(n=null==n?0:ln(is(n),292))&&rn(e)){var r=(ls(e)+"e").split("e");return+((r=(ls(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ji=gn&&1/Wt(new gn([,-0]))[1]==1/0?function(e){return new gn(e)}:Js;function Fi(e){return function(t){var n=ra(t);return n==m?Ht(t):n==y?Gt(t):function(e,t){return ft(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ui(e,t,n,i,s,l,c,u){var d=2&t;if(!d&&"function"!=typeof e)throw new ve(a);var h=i?i.length:0;if(h||(t&=-97,i=s=void 0),c=void 0===c?c:sn(is(c),0),u=void 0===u?u:is(u),h-=s?s.length:0,64&t){var f=i,p=s;i=s=void 0}var m=d?void 0:Ki(e),g=[e,t,n,i,s,f,p,l,c,u];if(m&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,s=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?gi(c,l,t[4]):l,e[4]=c?Vt(e[3],o):t[4]}(l=t[5])&&(c=e[5],e[5]=c?vi(c,l,t[6]):l,e[6]=c?Vt(e[5],o):t[6]);(l=t[7])&&(e[7]=l);128&r&&(e[8]=null==e[8]?t[8]:ln(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(g,m),e=g[0],t=g[1],n=g[2],i=g[3],s=g[4],!(u=g[9]=void 0===g[9]?d?0:e.length:sn(g[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,n){var i=Ti(e);return function a(){for(var o=arguments.length,s=r(o),l=o,c=Qi(a);l--;)s[l]=arguments[l];var u=o<3&&s[0]!==c&&s[o-1]!==c?[]:Vt(s,c);if((o-=u.length)<n)return Ri(e,t,Oi,a.placeholder,void 0,s,u,void 0,void 0,n-o);var d=this&&this!==Ye&&this instanceof a?i:e;return at(d,this,s)}}(e,t,u):32!=t&&33!=t||s.length?Oi.apply(void 0,g):function(e,t,n,i){var a=1&t,o=Ti(e);return function t(){for(var s=-1,l=arguments.length,c=-1,u=i.length,d=r(u+l),h=this&&this!==Ye&&this instanceof t?o:e;++c<u;)d[c]=i[c];for(;l--;)d[c++]=arguments[++s];return at(h,a?n:this,d)}}(e,t,n,i);else var v=function(e,t,n){var r=1&t,i=Ti(e);return function t(){var a=this&&this!==Ye&&this instanceof t?i:e;return a.apply(r?n:this,arguments)}}(e,t,n);return wa((m?Vr:ya)(v,g),e,t)}function Hi(e,t,n,r){return void 0===e||Io(e,Ae[n])&&!Ee.call(r,n)?t:e}function zi(e,t,n,r,i,a){return Wo(e)&&Wo(t)&&(a.set(t,e),Mr(e,t,void 0,zi,a),a.delete(t)),e}function Vi(e){return Ko(e)?void 0:e}function Wi(e,t,n,r,i,a){var o=1&n,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=2&n?new Bn:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=o?r(m,p,d,t,e,a):r(p,m,d,e,t,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!vt(t,(function(e,t){if(!Dt(f,t)&&(p===e||i(p,e,n,r,a)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function Gi(e){return _a(ma(e,void 0,Na),e+"")}function qi(e){return fr(e,_s,ta)}function Yi(e){return fr(e,ws,na)}var Ki=yn?function(e){return yn.get(e)}:Js;function Xi(e){for(var t=e.name+"",n=An[t],r=Ee.call(An,t)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==e)return i.name}return t}function Qi(e){return(Ee.call(On,"placeholder")?On:e).placeholder}function $i(){var e=On.iteratee||Ks;return e=e===Ks?Sr:e,arguments.length?e(arguments[0],arguments[1]):e}function Ji(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Zi(e){for(var t=_s(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fa(i)]}return t}function ea(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Er(n)?n:void 0}var ta=tn?function(e){return null==e?[]:(e=pe(e),ut(tn(e),(function(t){return qe.call(e,t)})))}:al,na=tn?function(e){for(var t=[];e;)pt(t,ta(e)),e=ze(e);return t}:al,ra=pr;function ia(e,t,n){for(var r=-1,i=(t=li(t,e)).length,a=!1;++r<i;){var o=Ta(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&Vo(i)&&sa(o,i)&&(No(e)||Do(e))}function aa(e){return"function"!=typeof e.constructor||ha(e)?{}:In(ze(e))}function oa(e){return No(e)||Do(e)||!!(Xe&&e&&e[Xe])}function sa(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&le.test(e))&&e>-1&&e%1==0&&e<t}function la(e,t,n){if(!Wo(n))return!1;var r=typeof t;return!!("number"==r?Ro(n)&&sa(t,n.length):"string"==r&&t in n)&&Io(n[t],e)}function ca(e,t){if(No(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Jo(e))||(W.test(e)||!V.test(e)||null!=t&&e in pe(t))}function ua(e){var t=Xi(e),n=On[t];if("function"!=typeof n||!(t in Dn.prototype))return!1;if(e===n)return!0;var r=Ki(n);return!!r&&e===r[0]}(fn&&ra(new fn(new ArrayBuffer(1)))!=S||pn&&ra(new pn)!=m||mn&&"[object Promise]"!=ra(mn.resolve())||gn&&ra(new gn)!=y||vn&&ra(new vn)!=w)&&(ra=function(e){var t=pr(e),n=t==v?e.constructor:void 0,r=n?ka(n):"";if(r)switch(r){case _n:return S;case wn:return m;case En:return"[object Promise]";case Sn:return y;case Cn:return w}return t});var da=_e?Ho:ol;function ha(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function fa(e){return e==e&&!Wo(e)}function pa(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in pe(n)))}}function ma(e,t,n){return t=sn(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,o=sn(i.length-t,0),s=r(o);++a<o;)s[a]=i[t+a];a=-1;for(var l=r(t+1);++a<t;)l[a]=i[a];return l[t]=n(s),at(e,this,l)}}function ga(e,t){return t.length<2?e:hr(e,qr(t,0,-1))}function va(e,t){for(var n=e.length,r=ln(t.length,n),i=bi(e);r--;){var a=t[r];e[r]=sa(a,n)?i[a]:void 0}return e}function ba(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ya=Ea(Vr),Aa=Jt||function(e,t){return Ye.setTimeout(e,t)},_a=Ea(Wr);function wa(e,t,n){var r=t+"";return _a(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Q,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return st(s,(function(n){var r="_."+n[0];t&n[1]&&!dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match($);return t?t[1].split(J):[]}(r),n)))}function Ea(e){var t=0,n=0;return function(){var r=cn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Sa(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var a=Br(n,i),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var Ca=function(e){var t=So(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(G,(function(e,n,r,i){t.push(r?i.replace(te,"$1"):n||e)})),t}));function Ta(e){if("string"==typeof e||Jo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ka(e){if(null!=e){try{return we.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function xa(e){if(e instanceof Dn)return e.clone();var t=new Pn(e.__wrapped__,e.__chain__);return t.__actions__=bi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Oa=Fr((function(e,t){return Bo(e)?er(e,or(t,1,Bo,!0)):[]})),Ia=Fr((function(e,t){var n=Fa(t);return Bo(n)&&(n=void 0),Bo(e)?er(e,or(t,1,Bo,!0),$i(n,2)):[]})),Ma=Fr((function(e,t){var n=Fa(t);return Bo(n)&&(n=void 0),Bo(e)?er(e,or(t,1,Bo,!0),void 0,n):[]}));function Pa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:is(n);return i<0&&(i=sn(r+i,0)),At(e,$i(t,3),i)}function Da(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=is(n),i=n<0?sn(r+i,0):ln(i,r-1)),At(e,$i(t,3),i,!0)}function Na(e){return(null==e?0:e.length)?or(e,1):[]}function La(e){return e&&e.length?e[0]:void 0}var Ra=Fr((function(e){var t=ft(e,oi);return t.length&&t[0]===e[0]?br(t):[]})),Ba=Fr((function(e){var t=Fa(e),n=ft(e,oi);return t===Fa(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?br(n,$i(t,2)):[]})),ja=Fr((function(e){var t=Fa(e),n=ft(e,oi);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?br(n,void 0,t):[]}));function Fa(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Ua=Fr(Ha);function Ha(e,t){return e&&e.length&&t&&t.length?Lr(e,t):e}var za=Gi((function(e,t){var n=null==e?0:e.length,r=Xn(e,t);return Rr(e,ft(t,(function(e){return sa(e,n)?+e:e})).sort(mi)),r}));function Va(e){return null==e?e:hn.call(e)}var Wa=Fr((function(e){return Zr(or(e,1,Bo,!0))})),Ga=Fr((function(e){var t=Fa(e);return Bo(t)&&(t=void 0),Zr(or(e,1,Bo,!0),$i(t,2))})),qa=Fr((function(e){var t=Fa(e);return t="function"==typeof t?t:void 0,Zr(or(e,1,Bo,!0),void 0,t)}));function Ya(e){if(!e||!e.length)return[];var t=0;return e=ut(e,(function(e){if(Bo(e))return t=sn(e.length,t),!0})),Ot(t,(function(t){return ft(e,Ct(t))}))}function Ka(e,t){if(!e||!e.length)return[];var n=Ya(e);return null==t?n:ft(n,(function(e){return at(t,void 0,e)}))}var Xa=Fr((function(e,t){return Bo(e)?er(e,t):[]})),Qa=Fr((function(e){return ii(ut(e,Bo))})),$a=Fr((function(e){var t=Fa(e);return Bo(t)&&(t=void 0),ii(ut(e,Bo),$i(t,2))})),Ja=Fr((function(e){var t=Fa(e);return t="function"==typeof t?t:void 0,ii(ut(e,Bo),void 0,t)})),Za=Fr(Ya);var eo=Fr((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ka(e,n)}));function to(e){var t=On(e);return t.__chain__=!0,t}function no(e,t){return t(e)}var ro=Gi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Xn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Dn&&sa(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:no,args:[i],thisArg:void 0}),new Pn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var io=Ai((function(e,t,n){Ee.call(e,n)?++e[n]:Kn(e,n,1)}));var ao=ki(Pa),oo=ki(Da);function so(e,t){return(No(e)?st:tr)(e,$i(t,3))}function lo(e,t){return(No(e)?lt:nr)(e,$i(t,3))}var co=Ai((function(e,t,n){Ee.call(e,n)?e[n].push(t):Kn(e,n,[t])}));var uo=Fr((function(e,t,n){var i=-1,a="function"==typeof t,o=Ro(e)?r(e.length):[];return tr(e,(function(e){o[++i]=a?at(t,e,n):yr(e,t,n)})),o})),ho=Ai((function(e,t,n){Kn(e,n,t)}));function fo(e,t){return(No(e)?ft:xr)(e,$i(t,3))}var po=Ai((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var mo=Fr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&la(e,t[0],t[1])?t=[]:n>2&&la(t[0],t[1],t[2])&&(t=[t[0]]),Dr(e,or(t,1),[])})),go=$t||function(){return Ye.Date.now()};function vo(e,t,n){return t=n?void 0:t,Ui(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function bo(e,t){var n;if("function"!=typeof t)throw new ve(a);return e=is(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var yo=Fr((function(e,t,n){var r=1;if(n.length){var i=Vt(n,Qi(yo));r|=32}return Ui(e,r,t,n,i)})),Ao=Fr((function(e,t,n){var r=3;if(n.length){var i=Vt(n,Qi(Ao));r|=32}return Ui(t,r,e,n,i)}));function _o(e,t,n){var r,i,o,s,l,c,u=0,d=!1,h=!1,f=!0;if("function"!=typeof e)throw new ve(a);function p(t){var n=r,a=i;return r=i=void 0,u=t,s=e.apply(a,n)}function m(e){return u=e,l=Aa(v,t),d?p(e):s}function g(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-u>=o}function v(){var e=go();if(g(e))return b(e);l=Aa(v,function(e){var n=t-(e-c);return h?ln(n,o-(e-u)):n}(e))}function b(e){return l=void 0,f&&r?p(e):(r=i=void 0,s)}function y(){var e=go(),n=g(e);if(r=arguments,i=this,c=e,n){if(void 0===l)return m(c);if(h)return di(l),l=Aa(v,t),p(c)}return void 0===l&&(l=Aa(v,t)),s}return t=os(t)||0,Wo(n)&&(d=!!n.leading,o=(h="maxWait"in n)?sn(os(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==l&&di(l),u=0,r=c=i=l=void 0},y.flush=function(){return void 0===l?s:b(go())},y}var wo=Fr((function(e,t){return Zn(e,1,t)})),Eo=Fr((function(e,t,n){return Zn(e,os(t)||0,n)}));function So(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ve(a);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(So.Cache||Rn),n}function Co(e){if("function"!=typeof e)throw new ve(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}So.Cache=Rn;var To=ci((function(e,t){var n=(t=1==t.length&&No(t[0])?ft(t[0],Mt($i())):ft(or(t,1),Mt($i()))).length;return Fr((function(r){for(var i=-1,a=ln(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return at(e,this,r)}))})),ko=Fr((function(e,t){return Ui(e,32,void 0,t,Vt(t,Qi(ko)))})),xo=Fr((function(e,t){return Ui(e,64,void 0,t,Vt(t,Qi(xo)))})),Oo=Gi((function(e,t){return Ui(e,256,void 0,void 0,void 0,t)}));function Io(e,t){return e===t||e!=e&&t!=t}var Mo=Li(mr),Po=Li((function(e,t){return e>=t})),Do=Ar(function(){return arguments}())?Ar:function(e){return Go(e)&&Ee.call(e,"callee")&&!qe.call(e,"callee")},No=r.isArray,Lo=Ze?Mt(Ze):function(e){return Go(e)&&pr(e)==E};function Ro(e){return null!=e&&Vo(e.length)&&!Ho(e)}function Bo(e){return Go(e)&&Ro(e)}var jo=nn||ol,Fo=et?Mt(et):function(e){return Go(e)&&pr(e)==d};function Uo(e){if(!Go(e))return!1;var t=pr(e);return t==h||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ko(e)}function Ho(e){if(!Wo(e))return!1;var t=pr(e);return t==f||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function zo(e){return"number"==typeof e&&e==is(e)}function Vo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Wo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Go(e){return null!=e&&"object"==typeof e}var qo=tt?Mt(tt):function(e){return Go(e)&&ra(e)==m};function Yo(e){return"number"==typeof e||Go(e)&&pr(e)==g}function Ko(e){if(!Go(e)||pr(e)!=v)return!1;var t=ze(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&we.call(n)==ke}var Xo=nt?Mt(nt):function(e){return Go(e)&&pr(e)==b};var Qo=rt?Mt(rt):function(e){return Go(e)&&ra(e)==y};function $o(e){return"string"==typeof e||!No(e)&&Go(e)&&pr(e)==A}function Jo(e){return"symbol"==typeof e||Go(e)&&pr(e)==_}var Zo=it?Mt(it):function(e){return Go(e)&&Vo(e.length)&&!!Ue[pr(e)]};var es=Li(kr),ts=Li((function(e,t){return e<=t}));function ns(e){if(!e)return[];if(Ro(e))return $o(e)?Yt(e):bi(e);if($e&&e[$e])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[$e]());var t=ra(e);return(t==m?Ht:t==y?Wt:Is)(e)}function rs(e){return e?(e=os(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function is(e){var t=rs(e),n=t%1;return t==t?n?t-n:t:0}function as(e){return e?Qn(is(e),0,4294967295):0}function os(e){if("number"==typeof e)return e;if(Jo(e))return NaN;if(Wo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Wo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=It(e);var n=ae.test(e);return n||se.test(e)?We(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function ss(e){return yi(e,ws(e))}function ls(e){return null==e?"":Jr(e)}var cs=_i((function(e,t){if(ha(t)||Ro(t))yi(t,_s(t),e);else for(var n in t)Ee.call(t,n)&&Wn(e,n,t[n])})),us=_i((function(e,t){yi(t,ws(t),e)})),ds=_i((function(e,t,n,r){yi(t,ws(t),e,r)})),hs=_i((function(e,t,n,r){yi(t,_s(t),e,r)})),fs=Gi(Xn);var ps=Fr((function(e,t){e=pe(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&la(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=ws(a),s=-1,l=o.length;++s<l;){var c=o[s],u=e[c];(void 0===u||Io(u,Ae[c])&&!Ee.call(e,c))&&(e[c]=a[c])}return e})),ms=Fr((function(e){return e.push(void 0,zi),at(Ss,void 0,e)}));function gs(e,t,n){var r=null==e?void 0:hr(e,t);return void 0===r?n:r}function vs(e,t){return null!=e&&ia(e,t,vr)}var bs=Ii((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Te.call(t)),e[t]=n}),Ws(Ys)),ys=Ii((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Te.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]}),$i),As=Fr(yr);function _s(e){return Ro(e)?Fn(e):Cr(e)}function ws(e){return Ro(e)?Fn(e,!0):Tr(e)}var Es=_i((function(e,t,n){Mr(e,t,n)})),Ss=_i((function(e,t,n,r){Mr(e,t,n,r)})),Cs=Gi((function(e,t){var n={};if(null==e)return n;var r=!1;t=ft(t,(function(t){return t=li(t,e),r||(r=t.length>1),t})),yi(e,Yi(e),n),r&&(n=$n(n,7,Vi));for(var i=t.length;i--;)ei(n,t[i]);return n}));var Ts=Gi((function(e,t){return null==e?{}:function(e,t){return Nr(e,t,(function(t,n){return vs(e,n)}))}(e,t)}));function ks(e,t){if(null==e)return{};var n=ft(Yi(e),(function(e){return[e]}));return t=$i(t),Nr(e,n,(function(e,n){return t(e,n[0])}))}var xs=Fi(_s),Os=Fi(ws);function Is(e){return null==e?[]:Pt(e,_s(e))}var Ms=Ci((function(e,t,n){return t=t.toLowerCase(),e+(n?Ps(t):t)}));function Ps(e){return Us(ls(e).toLowerCase())}function Ds(e){return(e=ls(e))&&e.replace(ce,Bt).replace(De,"")}var Ns=Ci((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ls=Ci((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Rs=Si("toLowerCase");var Bs=Ci((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var js=Ci((function(e,t,n){return e+(n?" ":"")+Us(t)}));var Fs=Ci((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Us=Si("toUpperCase");function Hs(e,t,n){return e=ls(e),void 0===(t=n?void 0:t)?function(e){return Be.test(e)}(e)?function(e){return e.match(Le)||[]}(e):function(e){return e.match(Z)||[]}(e):e.match(t)||[]}var zs=Fr((function(e,t){try{return at(e,void 0,t)}catch(e){return Uo(e)?e:new X(e)}})),Vs=Gi((function(e,t){return st(t,(function(t){t=Ta(t),Kn(e,t,yo(e[t],e))})),e}));function Ws(e){return function(){return e}}var Gs=xi(),qs=xi(!0);function Ys(e){return e}function Ks(e){return Sr("function"==typeof e?e:$n(e,1))}var Xs=Fr((function(e,t){return function(n){return yr(n,e,t)}})),Qs=Fr((function(e,t){return function(n){return yr(e,n,t)}}));function $s(e,t,n){var r=_s(t),i=dr(t,r);null!=n||Wo(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=dr(t,_s(t)));var a=!(Wo(n)&&"chain"in n&&!n.chain),o=Ho(e);return st(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),i=n.__actions__=bi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pt([this.value()],arguments))})})),e}function Js(){}var Zs=Pi(ft),el=Pi(ct),tl=Pi(vt);function nl(e){return ca(e)?Ct(Ta(e)):function(e){return function(t){return hr(t,e)}}(e)}var rl=Ni(),il=Ni(!0);function al(){return[]}function ol(){return!1}var sl=Mi((function(e,t){return e+t}),0),ll=Bi("ceil"),cl=Mi((function(e,t){return e/t}),1),ul=Bi("floor");var dl,hl=Mi((function(e,t){return e*t}),1),fl=Bi("round"),pl=Mi((function(e,t){return e-t}),0);return On.after=function(e,t){if("function"!=typeof t)throw new ve(a);return e=is(e),function(){if(--e<1)return t.apply(this,arguments)}},On.ary=vo,On.assign=cs,On.assignIn=us,On.assignInWith=ds,On.assignWith=hs,On.at=fs,On.before=bo,On.bind=yo,On.bindAll=Vs,On.bindKey=Ao,On.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return No(e)?e:[e]},On.chain=to,On.chunk=function(e,t,n){t=(n?la(e,t,n):void 0===t)?1:sn(is(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,s=r(Zt(i/t));a<i;)s[o++]=qr(e,a,a+=t);return s},On.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i},On.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return pt(No(n)?bi(n):[n],or(t,1))},On.cond=function(e){var t=null==e?0:e.length,n=$i();return e=t?ft(e,(function(e){if("function"!=typeof e[1])throw new ve(a);return[n(e[0]),e[1]]})):[],Fr((function(n){for(var r=-1;++r<t;){var i=e[r];if(at(i[0],this,n))return at(i[1],this,n)}}))},On.conforms=function(e){return function(e){var t=_s(e);return function(n){return Jn(n,e,t)}}($n(e,1))},On.constant=Ws,On.countBy=io,On.create=function(e,t){var n=In(e);return null==t?n:Yn(n,t)},On.curry=function e(t,n,r){var i=Ui(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},On.curryRight=function e(t,n,r){var i=Ui(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},On.debounce=_o,On.defaults=ps,On.defaultsDeep=ms,On.defer=wo,On.delay=Eo,On.difference=Oa,On.differenceBy=Ia,On.differenceWith=Ma,On.drop=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,(t=n||void 0===t?1:is(t))<0?0:t,r):[]},On.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,0,(t=r-(t=n||void 0===t?1:is(t)))<0?0:t):[]},On.dropRightWhile=function(e,t){return e&&e.length?ni(e,$i(t,3),!0,!0):[]},On.dropWhile=function(e,t){return e&&e.length?ni(e,$i(t,3),!0):[]},On.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&la(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=is(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:is(r))<0&&(r+=i),r=n>r?0:as(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},On.filter=function(e,t){return(No(e)?ut:ar)(e,$i(t,3))},On.flatMap=function(e,t){return or(fo(e,t),1)},On.flatMapDeep=function(e,t){return or(fo(e,t),1/0)},On.flatMapDepth=function(e,t,n){return n=void 0===n?1:is(n),or(fo(e,t),n)},On.flatten=Na,On.flattenDeep=function(e){return(null==e?0:e.length)?or(e,1/0):[]},On.flattenDepth=function(e,t){return(null==e?0:e.length)?or(e,t=void 0===t?1:is(t)):[]},On.flip=function(e){return Ui(e,512)},On.flow=Gs,On.flowRight=qs,On.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},On.functions=function(e){return null==e?[]:dr(e,_s(e))},On.functionsIn=function(e){return null==e?[]:dr(e,ws(e))},On.groupBy=co,On.initial=function(e){return(null==e?0:e.length)?qr(e,0,-1):[]},On.intersection=Ra,On.intersectionBy=Ba,On.intersectionWith=ja,On.invert=bs,On.invertBy=ys,On.invokeMap=uo,On.iteratee=Ks,On.keyBy=ho,On.keys=_s,On.keysIn=ws,On.map=fo,On.mapKeys=function(e,t){var n={};return t=$i(t,3),cr(e,(function(e,r,i){Kn(n,t(e,r,i),e)})),n},On.mapValues=function(e,t){var n={};return t=$i(t,3),cr(e,(function(e,r,i){Kn(n,r,t(e,r,i))})),n},On.matches=function(e){return Or($n(e,1))},On.matchesProperty=function(e,t){return Ir(e,$n(t,1))},On.memoize=So,On.merge=Es,On.mergeWith=Ss,On.method=Xs,On.methodOf=Qs,On.mixin=$s,On.negate=Co,On.nthArg=function(e){return e=is(e),Fr((function(t){return Pr(t,e)}))},On.omit=Cs,On.omitBy=function(e,t){return ks(e,Co($i(t)))},On.once=function(e){return bo(2,e)},On.orderBy=function(e,t,n,r){return null==e?[]:(No(t)||(t=null==t?[]:[t]),No(n=r?void 0:n)||(n=null==n?[]:[n]),Dr(e,t,n))},On.over=Zs,On.overArgs=To,On.overEvery=el,On.overSome=tl,On.partial=ko,On.partialRight=xo,On.partition=po,On.pick=Ts,On.pickBy=ks,On.property=nl,On.propertyOf=function(e){return function(t){return null==e?void 0:hr(e,t)}},On.pull=Ua,On.pullAll=Ha,On.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Lr(e,t,$i(n,2)):e},On.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Lr(e,t,void 0,n):e},On.pullAt=za,On.range=rl,On.rangeRight=il,On.rearg=Oo,On.reject=function(e,t){return(No(e)?ut:ar)(e,Co($i(t,3)))},On.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],a=e.length;for(t=$i(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Rr(e,i),n},On.rest=function(e,t){if("function"!=typeof e)throw new ve(a);return Fr(e,t=void 0===t?t:is(t))},On.reverse=Va,On.sampleSize=function(e,t,n){return t=(n?la(e,t,n):void 0===t)?1:is(t),(No(e)?Hn:Hr)(e,t)},On.set=function(e,t,n){return null==e?e:zr(e,t,n)},On.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:zr(e,t,n,r)},On.shuffle=function(e){return(No(e)?zn:Gr)(e)},On.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&la(e,t,n)?(t=0,n=r):(t=null==t?0:is(t),n=void 0===n?r:is(n)),qr(e,t,n)):[]},On.sortBy=mo,On.sortedUniq=function(e){return e&&e.length?Qr(e):[]},On.sortedUniqBy=function(e,t){return e&&e.length?Qr(e,$i(t,2)):[]},On.split=function(e,t,n){return n&&"number"!=typeof n&&la(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ls(e))&&("string"==typeof t||null!=t&&!Xo(t))&&!(t=Jr(t))&&Ut(e)?ui(Yt(e),0,n):e.split(t,n):[]},On.spread=function(e,t){if("function"!=typeof e)throw new ve(a);return t=null==t?0:sn(is(t),0),Fr((function(n){var r=n[t],i=ui(n,0,t);return r&&pt(i,r),at(e,this,i)}))},On.tail=function(e){var t=null==e?0:e.length;return t?qr(e,1,t):[]},On.take=function(e,t,n){return e&&e.length?qr(e,0,(t=n||void 0===t?1:is(t))<0?0:t):[]},On.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?qr(e,(t=r-(t=n||void 0===t?1:is(t)))<0?0:t,r):[]},On.takeRightWhile=function(e,t){return e&&e.length?ni(e,$i(t,3),!1,!0):[]},On.takeWhile=function(e,t){return e&&e.length?ni(e,$i(t,3)):[]},On.tap=function(e,t){return t(e),e},On.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ve(a);return Wo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_o(e,t,{leading:r,maxWait:t,trailing:i})},On.thru=no,On.toArray=ns,On.toPairs=xs,On.toPairsIn=Os,On.toPath=function(e){return No(e)?ft(e,Ta):Jo(e)?[e]:bi(Ca(ls(e)))},On.toPlainObject=ss,On.transform=function(e,t,n){var r=No(e),i=r||jo(e)||Zo(e);if(t=$i(t,4),null==n){var a=e&&e.constructor;n=i?r?new a:[]:Wo(e)&&Ho(a)?In(ze(e)):{}}return(i?st:cr)(e,(function(e,r,i){return t(n,e,r,i)})),n},On.unary=function(e){return vo(e,1)},On.union=Wa,On.unionBy=Ga,On.unionWith=qa,On.uniq=function(e){return e&&e.length?Zr(e):[]},On.uniqBy=function(e,t){return e&&e.length?Zr(e,$i(t,2)):[]},On.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zr(e,void 0,t):[]},On.unset=function(e,t){return null==e||ei(e,t)},On.unzip=Ya,On.unzipWith=Ka,On.update=function(e,t,n){return null==e?e:ti(e,t,si(n))},On.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ti(e,t,si(n),r)},On.values=Is,On.valuesIn=function(e){return null==e?[]:Pt(e,ws(e))},On.without=Xa,On.words=Hs,On.wrap=function(e,t){return ko(si(t),e)},On.xor=Qa,On.xorBy=$a,On.xorWith=Ja,On.zip=Za,On.zipObject=function(e,t){return ai(e||[],t||[],Wn)},On.zipObjectDeep=function(e,t){return ai(e||[],t||[],zr)},On.zipWith=eo,On.entries=xs,On.entriesIn=Os,On.extend=us,On.extendWith=ds,$s(On,On),On.add=sl,On.attempt=zs,On.camelCase=Ms,On.capitalize=Ps,On.ceil=ll,On.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=os(n))==n?n:0),void 0!==t&&(t=(t=os(t))==t?t:0),Qn(os(e),t,n)},On.clone=function(e){return $n(e,4)},On.cloneDeep=function(e){return $n(e,5)},On.cloneDeepWith=function(e,t){return $n(e,5,t="function"==typeof t?t:void 0)},On.cloneWith=function(e,t){return $n(e,4,t="function"==typeof t?t:void 0)},On.conformsTo=function(e,t){return null==t||Jn(e,t,_s(t))},On.deburr=Ds,On.defaultTo=function(e,t){return null==e||e!=e?t:e},On.divide=cl,On.endsWith=function(e,t,n){e=ls(e),t=Jr(t);var r=e.length,i=n=void 0===n?r:Qn(is(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},On.eq=Io,On.escape=function(e){return(e=ls(e))&&F.test(e)?e.replace(B,jt):e},On.escapeRegExp=function(e){return(e=ls(e))&&Y.test(e)?e.replace(q,"\\$&"):e},On.every=function(e,t,n){var r=No(e)?ct:rr;return n&&la(e,t,n)&&(t=void 0),r(e,$i(t,3))},On.find=ao,On.findIndex=Pa,On.findKey=function(e,t){return yt(e,$i(t,3),cr)},On.findLast=oo,On.findLastIndex=Da,On.findLastKey=function(e,t){return yt(e,$i(t,3),ur)},On.floor=ul,On.forEach=so,On.forEachRight=lo,On.forIn=function(e,t){return null==e?e:sr(e,$i(t,3),ws)},On.forInRight=function(e,t){return null==e?e:lr(e,$i(t,3),ws)},On.forOwn=function(e,t){return e&&cr(e,$i(t,3))},On.forOwnRight=function(e,t){return e&&ur(e,$i(t,3))},On.get=gs,On.gt=Mo,On.gte=Po,On.has=function(e,t){return null!=e&&ia(e,t,gr)},On.hasIn=vs,On.head=La,On.identity=Ys,On.includes=function(e,t,n,r){e=Ro(e)?e:Is(e),n=n&&!r?is(n):0;var i=e.length;return n<0&&(n=sn(i+n,0)),$o(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},On.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:is(n);return i<0&&(i=sn(r+i,0)),_t(e,t,i)},On.inRange=function(e,t,n){return t=rs(t),void 0===n?(n=t,t=0):n=rs(n),function(e,t,n){return e>=ln(t,n)&&e<sn(t,n)}(e=os(e),t,n)},On.invoke=As,On.isArguments=Do,On.isArray=No,On.isArrayBuffer=Lo,On.isArrayLike=Ro,On.isArrayLikeObject=Bo,On.isBoolean=function(e){return!0===e||!1===e||Go(e)&&pr(e)==u},On.isBuffer=jo,On.isDate=Fo,On.isElement=function(e){return Go(e)&&1===e.nodeType&&!Ko(e)},On.isEmpty=function(e){if(null==e)return!0;if(Ro(e)&&(No(e)||"string"==typeof e||"function"==typeof e.splice||jo(e)||Zo(e)||Do(e)))return!e.length;var t=ra(e);if(t==m||t==y)return!e.size;if(ha(e))return!Cr(e).length;for(var n in e)if(Ee.call(e,n))return!1;return!0},On.isEqual=function(e,t){return _r(e,t)},On.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?_r(e,t,void 0,n):!!r},On.isError=Uo,On.isFinite=function(e){return"number"==typeof e&&rn(e)},On.isFunction=Ho,On.isInteger=zo,On.isLength=Vo,On.isMap=qo,On.isMatch=function(e,t){return e===t||wr(e,t,Zi(t))},On.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,wr(e,t,Zi(t),n)},On.isNaN=function(e){return Yo(e)&&e!=+e},On.isNative=function(e){if(da(e))throw new X("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Er(e)},On.isNil=function(e){return null==e},On.isNull=function(e){return null===e},On.isNumber=Yo,On.isObject=Wo,On.isObjectLike=Go,On.isPlainObject=Ko,On.isRegExp=Xo,On.isSafeInteger=function(e){return zo(e)&&e>=-9007199254740991&&e<=9007199254740991},On.isSet=Qo,On.isString=$o,On.isSymbol=Jo,On.isTypedArray=Zo,On.isUndefined=function(e){return void 0===e},On.isWeakMap=function(e){return Go(e)&&ra(e)==w},On.isWeakSet=function(e){return Go(e)&&"[object WeakSet]"==pr(e)},On.join=function(e,t){return null==e?"":an.call(e,t)},On.kebabCase=Ns,On.last=Fa,On.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=is(n))<0?sn(r+i,0):ln(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):At(e,Et,i,!0)},On.lowerCase=Ls,On.lowerFirst=Rs,On.lt=es,On.lte=ts,On.max=function(e){return e&&e.length?ir(e,Ys,mr):void 0},On.maxBy=function(e,t){return e&&e.length?ir(e,$i(t,2),mr):void 0},On.mean=function(e){return St(e,Ys)},On.meanBy=function(e,t){return St(e,$i(t,2))},On.min=function(e){return e&&e.length?ir(e,Ys,kr):void 0},On.minBy=function(e,t){return e&&e.length?ir(e,$i(t,2),kr):void 0},On.stubArray=al,On.stubFalse=ol,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return!0},On.multiply=hl,On.nth=function(e,t){return e&&e.length?Pr(e,is(t)):void 0},On.noConflict=function(){return Ye._===this&&(Ye._=xe),this},On.noop=Js,On.now=go,On.pad=function(e,t,n){e=ls(e);var r=(t=is(t))?qt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Di(en(i),n)+e+Di(Zt(i),n)},On.padEnd=function(e,t,n){e=ls(e);var r=(t=is(t))?qt(e):0;return t&&r<t?e+Di(t-r,n):e},On.padStart=function(e,t,n){e=ls(e);var r=(t=is(t))?qt(e):0;return t&&r<t?Di(t-r,n)+e:e},On.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(ls(e).replace(K,""),t||0)},On.random=function(e,t,n){if(n&&"boolean"!=typeof n&&la(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=rs(e),void 0===t?(t=e,e=0):t=rs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=dn();return ln(e+i*(t-e+Ve("1e-"+((i+"").length-1))),t)}return Br(e,t)},On.reduce=function(e,t,n){var r=No(e)?mt:kt,i=arguments.length<3;return r(e,$i(t,4),n,i,tr)},On.reduceRight=function(e,t,n){var r=No(e)?gt:kt,i=arguments.length<3;return r(e,$i(t,4),n,i,nr)},On.repeat=function(e,t,n){return t=(n?la(e,t,n):void 0===t)?1:is(t),jr(ls(e),t)},On.replace=function(){var e=arguments,t=ls(e[0]);return e.length<3?t:t.replace(e[1],e[2])},On.result=function(e,t,n){var r=-1,i=(t=li(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var a=null==e?void 0:e[Ta(t[r])];void 0===a&&(r=i,a=n),e=Ho(a)?a.call(e):a}return e},On.round=fl,On.runInContext=e,On.sample=function(e){return(No(e)?Un:Ur)(e)},On.size=function(e){if(null==e)return 0;if(Ro(e))return $o(e)?qt(e):e.length;var t=ra(e);return t==m||t==y?e.size:Cr(e).length},On.snakeCase=Bs,On.some=function(e,t,n){var r=No(e)?vt:Yr;return n&&la(e,t,n)&&(t=void 0),r(e,$i(t,3))},On.sortedIndex=function(e,t){return Kr(e,t)},On.sortedIndexBy=function(e,t,n){return Xr(e,t,$i(n,2))},On.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Kr(e,t);if(r<n&&Io(e[r],t))return r}return-1},On.sortedLastIndex=function(e,t){return Kr(e,t,!0)},On.sortedLastIndexBy=function(e,t,n){return Xr(e,t,$i(n,2),!0)},On.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Kr(e,t,!0)-1;if(Io(e[n],t))return n}return-1},On.startCase=js,On.startsWith=function(e,t,n){return e=ls(e),n=null==n?0:Qn(is(n),0,e.length),t=Jr(t),e.slice(n,n+t.length)==t},On.subtract=pl,On.sum=function(e){return e&&e.length?xt(e,Ys):0},On.sumBy=function(e,t){return e&&e.length?xt(e,$i(t,2)):0},On.template=function(e,t,n){var r=On.templateSettings;n&&la(e,t,n)&&(t=void 0),e=ls(e),t=ds({},t,r,Hi);var i,a,o=ds({},t.imports,r.imports,Hi),s=_s(o),l=Pt(o,s),c=0,u=t.interpolate||ue,d="__p += '",h=me((t.escape||ue).source+"|"+u.source+"|"+(u===z?ne:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),f="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Fe+"]")+"\n";e.replace(h,(function(t,n,r,o,s,l){return r||(r=o),d+=e.slice(c,l).replace(de,Ft),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t})),d+="';\n";var p=Ee.call(t,"variable")&&t.variable;if(p){if(ee.test(p))throw new X("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(D,""):d).replace(N,"$1").replace(L,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=zs((function(){return he(s,f+"return "+d).apply(void 0,l)}));if(m.source=d,Uo(m))throw m;return m},On.times=function(e,t){if((e=is(e))<1||e>9007199254740991)return[];var n=4294967295,r=ln(e,4294967295);e-=4294967295;for(var i=Ot(r,t=$i(t));++n<e;)t(n);return i},On.toFinite=rs,On.toInteger=is,On.toLength=as,On.toLower=function(e){return ls(e).toLowerCase()},On.toNumber=os,On.toSafeInteger=function(e){return e?Qn(is(e),-9007199254740991,9007199254740991):0===e?e:0},On.toString=ls,On.toUpper=function(e){return ls(e).toUpperCase()},On.trim=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return It(e);if(!e||!(t=Jr(t)))return e;var r=Yt(e),i=Yt(t);return ui(r,Nt(r,i),Lt(r,i)+1).join("")},On.trimEnd=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return e.slice(0,Kt(e)+1);if(!e||!(t=Jr(t)))return e;var r=Yt(e);return ui(r,0,Lt(r,Yt(t))+1).join("")},On.trimStart=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return e.replace(K,"");if(!e||!(t=Jr(t)))return e;var r=Yt(e);return ui(r,Nt(r,Yt(t))).join("")},On.truncate=function(e,t){var n=30,r="...";if(Wo(t)){var i="separator"in t?t.separator:i;n="length"in t?is(t.length):n,r="omission"in t?Jr(t.omission):r}var a=(e=ls(e)).length;if(Ut(e)){var o=Yt(e);a=o.length}if(n>=a)return e;var s=n-qt(r);if(s<1)return r;var l=o?ui(o,0,s).join(""):e.slice(0,s);if(void 0===i)return l+r;if(o&&(s+=l.length-s),Xo(i)){if(e.slice(s).search(i)){var c,u=l;for(i.global||(i=me(i.source,ls(re.exec(i))+"g")),i.lastIndex=0;c=i.exec(u);)var d=c.index;l=l.slice(0,void 0===d?s:d)}}else if(e.indexOf(Jr(i),s)!=s){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+r},On.unescape=function(e){return(e=ls(e))&&j.test(e)?e.replace(R,Xt):e},On.uniqueId=function(e){var t=++Se;return ls(e)+t},On.upperCase=Fs,On.upperFirst=Us,On.each=so,On.eachRight=lo,On.first=La,$s(On,(dl={},cr(On,(function(e,t){Ee.call(On.prototype,t)||(dl[t]=e)})),dl),{chain:!1}),On.VERSION="4.17.21",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){On[e].placeholder=On})),st(["drop","take"],(function(e,t){Dn.prototype[e]=function(n){n=void 0===n?1:sn(is(n),0);var r=this.__filtered__&&!t?new Dn(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Dn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Dn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:$i(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Dn.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Dn.prototype[e]=function(){return this.__filtered__?new Dn(this):this[n](1)}})),Dn.prototype.compact=function(){return this.filter(Ys)},Dn.prototype.find=function(e){return this.filter(e).head()},Dn.prototype.findLast=function(e){return this.reverse().find(e)},Dn.prototype.invokeMap=Fr((function(e,t){return"function"==typeof e?new Dn(this):this.map((function(n){return yr(n,e,t)}))})),Dn.prototype.reject=function(e){return this.filter(Co($i(e)))},Dn.prototype.slice=function(e,t){e=is(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Dn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=is(t))<0?n.dropRight(-t):n.take(t-e)),n)},Dn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Dn.prototype.toArray=function(){return this.take(4294967295)},cr(Dn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=On[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(On.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,s=t instanceof Dn,l=o[0],c=s||No(t),u=function(e){var t=i.apply(On,pt([e],o));return r&&d?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(s=c=!1);var d=this.__chain__,h=!!this.__actions__.length,f=a&&!d,p=s&&!h;if(!a&&c){t=p?t:new Dn(this);var m=e.apply(t,o);return m.__actions__.push({func:no,args:[u],thisArg:void 0}),new Pn(m,d)}return f&&p?e.apply(this,o):(m=this.thru(u),f?r?m.value()[0]:m.value():m)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=be[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);On.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(No(i)?i:[],e)}return this[n]((function(n){return t.apply(No(n)?n:[],e)}))}})),cr(Dn.prototype,(function(e,t){var n=On[t];if(n){var r=n.name+"";Ee.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}})),An[Oi(void 0,2).name]=[{name:"wrapper",func:void 0}],Dn.prototype.clone=function(){var e=new Dn(this.__wrapped__);return e.__actions__=bi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=bi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=bi(this.__views__),e},Dn.prototype.reverse=function(){if(this.__filtered__){var e=new Dn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Dn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=No(e),r=t<0,i=n?e.length:0,a=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=ln(t,e+o);break;case"takeRight":e=sn(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=a.start,s=a.end,l=s-o,c=r?s:o-1,u=this.__iteratees__,d=u.length,h=0,f=ln(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return ri(e,this.__actions__);var p=[];e:for(;l--&&h<f;){for(var m=-1,g=e[c+=t];++m<d;){var v=u[m],b=v.iteratee,y=v.type,A=b(g);if(2==y)g=A;else if(!A){if(1==y)continue e;break e}}p[h++]=g}return p},On.prototype.at=ro,On.prototype.chain=function(){return to(this)},On.prototype.commit=function(){return new Pn(this.value(),this.__chain__)},On.prototype.next=function(){void 0===this.__values__&&(this.__values__=ns(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},On.prototype.plant=function(e){for(var t,n=this;n instanceof Mn;){var r=xa(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},On.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Dn){var t=e;return this.__actions__.length&&(t=new Dn(this)),(t=t.reverse()).__actions__.push({func:no,args:[Va],thisArg:void 0}),new Pn(t,this.__chain__)}return this.thru(Va)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,$e&&(On.prototype[$e]=function(){return this}),On}();Ye._=Qt,void 0===(i=function(){return Qt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(68),n(256)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"i",(function(){return g})),n.d(t,"h",(function(){return b})),n.d(t,"k",(function(){return y})),n.d(t,"d",(function(){return A.a})),n.d(t,"m",(function(){return _})),n.d(t,"l",(function(){return w})),n.d(t,"e",(function(){return r})),n.d(t,"n",(function(){return i}));var r={};n.r(r),n.d(r,"likeChapter",(function(){return E})),n.d(r,"changeCGUpdatingStatus",(function(){return S})),n.d(r,"displayCoverImage",(function(){return C})),n.d(r,"displayPreviewImage",(function(){return T})),n.d(r,"displayMiniCoverImage",(function(){return k})),n.d(r,"getMyCogvidList",(function(){return x})),n.d(r,"getCogvidList",(function(){return O})),n.d(r,"loadMoreCogvidList",(function(){return I})),n.d(r,"mergeFetchedVideos",(function(){return M})),n.d(r,"getCogvidDetails",(function(){return P})),n.d(r,"getVideoState",(function(){return D})),n.d(r,"resetCogvidDetail",(function(){return N})),n.d(r,"showVideoOverlay",(function(){return L})),n.d(r,"searchCogvidList",(function(){return R})),n.d(r,"updateSbContent",(function(){return B})),n.d(r,"updateMultipleSbContent",(function(){return j})),n.d(r,"updateCg",(function(){return F})),n.d(r,"updateChapterItem",(function(){return U})),n.d(r,"updateChapterLock",(function(){return H})),n.d(r,"updateChapterFreeFUI",(function(){return z})),n.d(r,"updateChapterItemInCache",(function(){return V})),n.d(r,"updateChapterFile",(function(){return W})),n.d(r,"deleteChapterFile",(function(){return G})),n.d(r,"updateChapterCoverImage",(function(){return q})),n.d(r,"updateChapterThumbnail",(function(){return Y})),n.d(r,"deleteChapterThumbnail",(function(){return K})),n.d(r,"updateChapterFoundation",(function(){return X})),n.d(r,"deleteChapterFoundation",(function(){return Q})),n.d(r,"updateChapterUnderstanding",(function(){return $})),n.d(r,"deleteChapterUnderstanding",(function(){return J})),n.d(r,"deleteAChapter",(function(){return Z})),n.d(r,"addANewChapter",(function(){return ee})),n.d(r,"updateCurrentSbData",(function(){return te})),n.d(r,"updateOrderChaptersListUI",(function(){return ne})),n.d(r,"updateOrderChaptersListAPI",(function(){return re})),n.d(r,"setActiveChapter",(function(){return ie})),n.d(r,"setPrivacyChapter",(function(){return ae})),n.d(r,"toggleCreateCogvidForm",(function(){return oe})),n.d(r,"updateCreateMeetingForm",(function(){return se})),n.d(r,"toggleAddFilesToGalleryForm",(function(){return le})),n.d(r,"oldToggleCreateCogvidForm",(function(){return ce})),n.d(r,"getCg",(function(){return ue})),n.d(r,"getSb",(function(){return de})),n.d(r,"getHighlight",(function(){return he})),n.d(r,"searchWithinVideo",(function(){return fe})),n.d(r,"setEditHighLightBookmark",(function(){return pe})),n.d(r,"postHighLightBookmark",(function(){return me})),n.d(r,"deleteHighLightBookmark",(function(){return ge})),n.d(r,"updateHighLightBookmark",(function(){return ve})),n.d(r,"updateWithinVideoSearch",(function(){return be})),n.d(r,"resetWithinVideoSearch",(function(){return ye})),n.d(r,"setUpdateVideoTime",(function(){return Ae})),n.d(r,"limitVideoTime",(function(){return _e})),n.d(r,"resetVideoTime",(function(){return we})),n.d(r,"updateHighlightMode",(function(){return Ee})),n.d(r,"toggleEdittingChapterTextMode",(function(){return Se})),n.d(r,"getAuthorProfile",(function(){return Ce})),n.d(r,"updateCogvidDetails",(function(){return Te})),n.d(r,"updateSb",(function(){return ke})),n.d(r,"getProcessingCogvidStatusList",(function(){return xe})),n.d(r,"editCogvidInfo",(function(){return Oe})),n.d(r,"cancelVideoProcessing",(function(){return Ie})),n.d(r,"retryVideoProcessing",(function(){return Me})),n.d(r,"resetReducer",(function(){return Pe})),n.d(r,"attachFilesToVideo",(function(){return De})),n.d(r,"addVideoAttachments",(function(){return Ne})),n.d(r,"replaceVideoAttachments",(function(){return Le})),n.d(r,"updateVideoAttachment",(function(){return Re})),n.d(r,"updateVideoAttachmentLock",(function(){return Be})),n.d(r,"updateVideoAttachmentOrder",(function(){return je})),n.d(r,"updateVideoAttachmentInCache",(function(){return Fe})),n.d(r,"updateVideoAttachmentThumbnail",(function(){return Ue})),n.d(r,"deleteVideoAttachment",(function(){return He})),n.d(r,"deleteVideoAttachmentInCache",(function(){return ze})),n.d(r,"attachFilesToChapter",(function(){return Ve})),n.d(r,"deleteChapterAttachment",(function(){return We})),n.d(r,"toggleDisplayChapterAttachments",(function(){return Ge})),n.d(r,"updateChapterAttachment",(function(){return qe})),n.d(r,"updateChapterAttachmentLock",(function(){return Ye})),n.d(r,"updateChapterAttachmentOrder",(function(){return Ke})),n.d(r,"updateChapterAttachmentInCache",(function(){return Xe})),n.d(r,"updateChapterAttachmentThumbnail",(function(){return Qe})),n.d(r,"addChapterAttachments",(function(){return $e})),n.d(r,"updateReviewAttachment",(function(){return Je})),n.d(r,"deleteChapterAttachmentInCache",(function(){return Ze})),n.d(r,"downloadAttachment",(function(){return et})),n.d(r,"getGalleryVideo",(function(){return tt})),n.d(r,"getLectureVideo",(function(){return nt})),n.d(r,"updateGalleryVideoData",(function(){return rt})),n.d(r,"displayVideoAttachments",(function(){return it})),n.d(r,"displayPreviewAttachments",(function(){return at})),n.d(r,"getVideoAttachments",(function(){return ot})),n.d(r,"getVideoChaptersAttachments",(function(){return st})),n.d(r,"replaceVideoChapterAttachments",(function(){return lt})),n.d(r,"importSubtitle",(function(){return ct})),n.d(r,"changePublishScopeCogvid",(function(){return ut})),n.d(r,"publishCogvid",(function(){return dt})),n.d(r,"cancelPublishCogvid",(function(){return ht})),n.d(r,"getPublicCogvidFeedback",(function(){return ft})),n.d(r,"getPublicCogvidLastStatus",(function(){return pt})),n.d(r,"unpublishVideo",(function(){return mt})),n.d(r,"updateCogvidList",(function(){return gt})),n.d(r,"resetCogvidLists",(function(){return vt})),n.d(r,"updateCogvidListItem",(function(){return bt})),n.d(r,"updateChildVideoStatus",(function(){return yt})),n.d(r,"cloneCogvid",(function(){return At})),n.d(r,"exportCogvid",(function(){return _t})),n.d(r,"setVideoCoverImg",(function(){return wt})),n.d(r,"setVideoCoverImgHtml",(function(){return Et})),n.d(r,"deleteVideo",(function(){return St})),n.d(r,"deleteVideoSharedToMe",(function(){return Ct})),n.d(r,"resetVideoList",(function(){return Tt})),n.d(r,"getRawVideos",(function(){return kt})),n.d(r,"insertVideo",(function(){return xt})),n.d(r,"setChapterStyle",(function(){return Ot})),n.d(r,"enableCopyChapterStyle",(function(){return It})),n.d(r,"getVideoSharingInfo",(function(){return Mt})),n.d(r,"getVideoSharedUsers",(function(){return Pt})),n.d(r,"getVideoRoles",(function(){return Dt})),n.d(r,"getVideoSetting",(function(){return Nt})),n.d(r,"shareVideo",(function(){return Lt})),n.d(r,"extractChapters",(function(){return Rt})),n.d(r,"extractHighlights",(function(){return Bt})),n.d(r,"getChapterAttachmentSketch",(function(){return jt})),n.d(r,"editChapterAttachmentSketch",(function(){return Ft})),n.d(r,"deleteChapterAttachmentSketch",(function(){return Ut})),n.d(r,"getVideoAttachmentSketch",(function(){return Ht})),n.d(r,"editVideoAttachmentSketch",(function(){return zt})),n.d(r,"deleteVideoAttachmentSketch",(function(){return Vt})),n.d(r,"updateEditVideoModal",(function(){return Wt})),n.d(r,"updateSetPriceModal",(function(){return Gt})),n.d(r,"updatePublishVideoModal",(function(){return qt})),n.d(r,"updateFeedbackModal",(function(){return Yt})),n.d(r,"updateShareVideoChapterModal",(function(){return Kt})),n.d(r,"updateExtractChaptersModal",(function(){return Xt})),n.d(r,"updateSaveToMyVideoModal",(function(){return Qt})),n.d(r,"updateExportVideoModal",(function(){return $t})),n.d(r,"shareChapter",(function(){return Jt})),n.d(r,"getChapterSharingInfo",(function(){return Zt})),n.d(r,"getChapterSharingRoles",(function(){return en})),n.d(r,"getCogvidThumbnail",(function(){return tn})),n.d(r,"updateLocalChapterItem",(function(){return nn})),n.d(r,"updateIsEditingSb",(function(){return rn})),n.d(r,"updateCoverImageTemplate",(function(){return an})),n.d(r,"getCoverImageTemplate",(function(){return on})),n.d(r,"getCourses",(function(){return sn})),n.d(r,"getCourseSerial",(function(){return ln})),n.d(r,"createCourse",(function(){return cn})),n.d(r,"unshiftCogvidList",(function(){return un})),n.d(r,"updateSharedPeopleData",(function(){return dn})),n.d(r,"updateCogvidState",(function(){return hn})),n.d(r,"getSharableVideoRoles",(function(){return fn})),n.d(r,"changeOwnerShip",(function(){return pn})),n.d(r,"trackingDownloadAttachment",(function(){return mn})),n.d(r,"getVideoOwnerProfile",(function(){return gn})),n.d(r,"createDailyVideo",(function(){return vn})),n.d(r,"toggleEnableCommentVideo",(function(){return bn})),n.d(r,"likeVideo",(function(){return yn})),n.d(r,"unlikeVideo",(function(){return An})),n.d(r,"getLikedVideoPeopleList",(function(){return _n})),n.d(r,"getParticipants",(function(){return wn})),n.d(r,"createMeeting",(function(){return En})),n.d(r,"getShortenVideoUrl",(function(){return Sn})),n.d(r,"deShortenedVideoUrl",(function(){return Cn})),n.d(r,"searchKeyword",(function(){return Tn})),n.d(r,"createVideoKeyword",(function(){return kn})),n.d(r,"fetchUserVideos",(function(){return xn})),n.d(r,"fetchSbNotes",(function(){return On})),n.d(r,"cloneVideo",(function(){return In})),n.d(r,"findMasters",(function(){return Mn})),n.d(r,"getCourseVideos",(function(){return Pn})),n.d(r,"displayRequirePurchaseModal",(function(){return Dn})),n.d(r,"retranscribeVideo",(function(){return Nn})),n.d(r,"changePlayBackRate",(function(){return Ln})),n.d(r,"displayVideoDescription",(function(){return Rn})),n.d(r,"getVideoDescription",(function(){return Bn})),n.d(r,"updateVideoDescription",(function(){return jn})),n.d(r,"displayCopyChaptersModal",(function(){return Fn})),n.d(r,"copyChapters",(function(){return Un})),n.d(r,"displaySwapChaptersModal",(function(){return Hn})),n.d(r,"swapChapters",(function(){return zn})),n.d(r,"displayProductsLayer",(function(){return Vn})),n.d(r,"createProduct",(function(){return Wn})),n.d(r,"getVideoProducts",(function(){return Gn})),n.d(r,"updateProduct",(function(){return qn})),n.d(r,"deleteProduct",(function(){return Yn})),n.d(r,"registerForFreeCourse",(function(){return Kn})),n.d(r,"getMyProducts",(function(){return Xn})),n.d(r,"linkProduct",(function(){return Qn})),n.d(r,"approveProduct",(function(){return $n})),n.d(r,"rejectProduct",(function(){return Jn})),n.d(r,"deleteLinkedProduct",(function(){return Zn})),n.d(r,"downloadProduct",(function(){return er})),n.d(r,"getDownloadResources",(function(){return tr})),n.d(r,"displayMyResourcesModal",(function(){return nr})),n.d(r,"arrangeProducts",(function(){return rr})),n.d(r,"createResourceStore",(function(){return ir})),n.d(r,"updateResourceStore",(function(){return ar})),n.d(r,"deleteResourceStore",(function(){return or})),n.d(r,"getResourceStore",(function(){return sr})),n.d(r,"connectResourceStore",(function(){return lr})),n.d(r,"disconnectResourceStore",(function(){return cr})),n.d(r,"incrStoreViews",(function(){return ur})),n.d(r,"incrProductCounts",(function(){return dr})),n.d(r,"getChapterSemanticBlocks",(function(){return hr})),n.d(r,"increaseChapterViewCount",(function(){return fr})),n.d(r,"setLearningSubject",(function(){return pr})),n.d(r,"updateTableOfContent",(function(){return mr})),n.d(r,"getStoreMembers",(function(){return gr})),n.d(r,"addStoreMember",(function(){return vr})),n.d(r,"updateStoreMember",(function(){return br})),n.d(r,"removeStoreMember",(function(){return yr})),n.d(r,"reviewStoreMember",(function(){return Ar})),n.d(r,"approveStoreMember",(function(){return _r})),n.d(r,"readStoreMemberMessages",(function(){return wr})),n.d(r,"searchStoreMembers",(function(){return Er})),n.d(r,"displaySubscribeModal",(function(){return Sr})),n.d(r,"updateSelectedVideo",(function(){return Cr})),n.d(r,"searchPublicCourses",(function(){return Tr})),n.d(r,"updateChaptersFiles",(function(){return kr})),n.d(r,"getCourseFiles",(function(){return xr})),n.d(r,"uploadCourseFile",(function(){return Or})),n.d(r,"updateCourseFile",(function(){return Ir})),n.d(r,"deleteCourseFile",(function(){return Mr})),n.d(r,"arrangeCourseFiles",(function(){return Pr}));var i={};n.r(i),n.d(i,"updateDeviceSetupModal",(function(){return Dr})),n.d(i,"updateMeetingInfo",(function(){return Nr})),n.d(i,"updateMeetingSession",(function(){return Lr})),n.d(i,"fetchMeeting",(function(){return Rr})),n.d(i,"startMeeting",(function(){return Br})),n.d(i,"joinMeeting",(function(){return jr})),n.d(i,"endMeeting",(function(){return Fr})),n.d(i,"getParticipants",(function(){return Ur})),n.d(i,"startRecordMeeting",(function(){return Hr})),n.d(i,"setMediaPipelineId",(function(){return zr})),n.d(i,"stopRecordMeeting",(function(){return Vr})),n.d(i,"createGetAttendeeCallback",(function(){return Wr}));var a=n(26),o=n(5);var s={initializeApp:function(){return{type:o.f.INITIALIZE_APP}},fetchCategories:function(){return{type:o.f.FETCH_CATEGORIES}},setTypeEditting:function(e){return{type:o.f.SET_TYPE_EDITTING,data:e}},toggleOpenPopup:function(e){return{type:o.f.TOGGLE_OPEN_POPUP,data:e}},fullscreenMode:function(){return{type:o.f.FULLSCREEN_MODE}},appTracking:function(e,t){return{type:o.f.APP_TRACKING,data:e,resolve:t}},appLogging:function(e,t,n){return{type:o.f.APP_LOGGING,data:e,resolve:t,reject:n}},stateTracking:function(e,t,n){return{type:o.f.STATE_TRACKING,data:e,resolve:t,reject:n}},fetchTrackingState:function(e,t,n){return{type:o.f.FETCH_LAST_STATE,data:e,resolve:t,reject:n}},toggleDelChapterModal:function(e){return{type:o.f.TOGGLE_DELETE_CHAPTER_CONFIRMATION_MODAL,data:e}},updateCommonState:function(e){return{type:o.f.UPDATE_COMMON_STATE,data:e}},toggleDelHighlightModal:function(e){return{type:o.f.TOGGLE_DELETE_HIGHLIGHT_CONFIRMATION_MODAL,data:e}},increaseChapterEngagement:function(e,t,n){return{type:o.f.INCREASE_CHAPTER_ENGAGEMENT,data:e,resolve:t,reject:n}},getLearningMetrics:function(e,t,n){return{type:o.f.GET_VIDEO_LEARNING_METRICS,data:e,resolve:t,reject:n}},deleteLearningMetrics:function(e,t,n){return{type:o.f.DELETE_VIDEO_LEARNING_METRICS,data:e,resolve:t,reject:n}}},l={authLogin:function(e,t,n){return{type:o.a.AUTH_LOGIN,data:e,resolve:t,reject:n}},getProfile:function(){return{type:o.a.AUTH_GET_PROFILE}},authRegister:function(e,t,n){return{type:o.a.AUTH_REGISTER,data:e,resolve:t,reject:n}},authLogOut:function(){return{type:o.a.AUTH_LOGOUT}},verifyAccount:function(e,t,n){return{type:o.a.AUTH_VERIFY_ACCOUNT,data:e,resolve:t,reject:n}},sendConfirmationEmail:function(e,t,n){return{type:o.a.AUTH_SEND_CONFIRMATION_MAIL,data:e,resolve:t,reject:n}},uploadAvatar:function(e,t,n){return{type:o.a.AUTH_UPLOAD_AVATAR,data:e,resolve:t,reject:n}},refreshToken:function(e,t,n){return{type:o.a.REFRESH_TOKEN,data:e,resolve:t,reject:n}},toggleOpenUserProfileModal:function(e){return a.a.dispatch(s.toggleOpenPopup(e)),{type:o.a.TOGGLE_OPEN_USER_PROFILE_MODAL,data:e}},updateProfile:function(e,t,n){return{type:o.a.UPDATE_PROFILE,data:e,resolve:t,reject:n}},searchKeyword:function(e,t,n){return{type:o.a.SEARCH_KEYWORD,data:e,resolve:t,reject:n}},toggleOpenChangePasswordModal:function(e){return a.a.dispatch(s.toggleOpenPopup(e)),{type:o.a.TOGGLE_OPEN_CHANGE_PASSWORD_MODAL,data:e}},displayLoginModal:function(e){return a.a.dispatch(s.toggleOpenPopup(e.show||!1)),{type:o.a.DISPLAY_LOGIN_MODAL,data:e}},changePassword:function(e,t,n){return{type:o.a.CHANGE_PASSWORD,data:e,resolve:t,reject:n}},resetPassword:function(e,t,n){return{type:o.a.RESET_PASSWORD,data:e,resolve:t,reject:n}},getResetPasswordCode:function(e,t,n){return{type:o.a.GET_RESET_PASSWORD_CODE,data:e,resolve:t,reject:n}},getTermsOfUse:function(e,t,n){return{type:o.a.GET_TERMS_OF_USE,data:e,resolve:t,reject:n}},getPrivacyPolicy:function(e,t,n){return{type:o.a.GET_PRIVACY_POLICY,data:e,resolve:t,reject:n}},searchGroups:function(e,t,n){return{type:o.a.SEARCH_GROUPS,data:e,resolve:t,reject:n}},socialLogin:function(e,t,n){return{type:o.a.SOCIAL_LOGIN,data:e,resolve:t,reject:n}},getUserStorage:function(e,t,n){return{type:o.a.GET_USER_STORAGE,data:e,resolve:t,reject:n}},getTrustedPublisher:function(e,t){return{type:o.a.GET_TRUSTED_PUBLISHER,resolve:e,reject:t}},displayRegisterModal:function(e){return{type:o.a.DISPLAY_REGISTER_MODAL,data:e}},displayActivationModal:function(e){return{type:o.a.DISPLAY_ACTIVATION_MODAL,data:e}},updateJoinAs:function(e,t,n){return{type:o.a.UPDATE_JOIN_AS,data:e,resolve:t,reject:n}}};var c={uploadAVideo:function(e,t,n){return{type:o.g.UPLOAD_RAW_FILE,data:e,resolve:t,reject:n}},createCognitiveVideo:function(e,t,n){return{type:o.g.CREATE_COGNITIVE_VIDEO,data:e,resolve:t,reject:n}},createCogvidWithChapterTemplate:function(e,t,n){return{type:o.g.CREATE_COGVID_WITH_CHAPTER_TEMPLATE,data:e,resolve:t,reject:n}},editCognitiveVideo:function(e,t,n){return{type:o.g.EDIT_COGNITIVE_VIDEO,data:e,resolve:t,reject:n}},getMyMediaList:function(e,t,n){return{type:o.g.GET_MY_MEDIA_LIST,data:e,resolve:t,reject:n}},activeContentToReview:function(e){return{type:o.g.CONTENT_ACTIVE_REVIEW,data:e}},addCreatingCogvidItem:function(e){return{type:o.g.ADD_CREATING_COGVID_ITEM,data:e}},deleteCreatingCogvidItem:function(e,t,n){return{type:o.g.DELETE_CREATING_COGVID_ITEM,data:e,resolve:t,reject:n}},updateCreatingCogvidList:function(e){return{type:o.g.UPDATE_CREATING_COGVID_LIST,data:e}},getUploadingFile:function(e,t,n){return{type:o.g.GET_UPLOADING_FILE,data:e,resolve:t,reject:n}},oldCreateCognitiveVideo:function(e,t,n){return{type:o.g.OLD_CREATE_COGNITIVE_VIDEO,data:e,resolve:t,reject:n}},addFilesToGallery:function(e,t,n){return{type:o.g.ADD_FILES_TO_GALLERY,data:e,resolve:t,reject:n}},getAttachmentInfo:function(e,t,n){return{type:o.g.GET_ATTACHMENT_INFO,data:e,resolve:t,reject:n}},updateCreatingCogvidItem:function(e,t,n){return{type:o.g.UPDATE_CREATING_COGVID_ITEM,data:e,resolve:t,reject:n}},createMeetingVideo:function(e,t,n){return{type:o.g.CREATE_MEETING_VIDEO,data:e,resolve:t,reject:n}},createProductId:function(e,t,n){return{type:o.g.CREATE_PRODUCT_ID,data:e,resolve:t,reject:n}},deleteProductId:function(e,t,n){return{type:o.g.DELETE_PRODUCT_ID,data:e,resolve:t,reject:n}}};var u={updateCanvasProperties:function(e){return{type:o.b.CANVAS_UPDATE_DRAWING_PROPERTIES,data:e}},saveCanvas:function(e,t){return{type:o.b.SAVE_CB_DATA,data:e,resolve:t}},getCb:function(e,t){return{type:o.b.GET_CB_DATA,data:e,resolve:t}},resetEditModeStyles:function(){return{type:o.b.RESET_CANVAS_EDIT_MODE_STYLES}},setDisplayContextualImg:function(e){return{type:o.b.SET_DISPLAY_CONTEXTUAL_IMG,data:e}},updateShowContextualImg:function(e){return{type:o.b.UPDATE_SHOW_CONTEXTUAL_IMG,data:e}},deleteCb:function(e){return{type:o.b.DELETE_CB,data:e}},resetCanvasProperties:function(){return{type:o.b.RESET_CANVAS_PROPERTIES}}};var d={setPrice:function(e,t,n){return{type:o.k.SET_PRICE,data:e,resolve:t,reject:n}},getSubsPrice:function(e,t,n){return{type:o.k.GET_SUBS_PRICE,data:e,resolve:t,reject:n}},setSubsPrice:function(e,t,n){return{type:o.k.SET_SUBS_PRICE,data:e,resolve:t,reject:n}},deleteSubsPrice:function(e,t,n){return{type:o.k.DEL_SUBS_PRICE,data:e,resolve:t,reject:n}}};var h={checkout:function(e,t,n){return{type:o.c.CHECKOUT,data:e,resolve:t,reject:n}},openCart:function(e){return{type:o.c.OPEN_CART,data:e}},getCartItems:function(e,t){return{type:o.c.GET_CART_ITEMS,resolve:e,reject:t}},addItemToCart:function(e,t,n){return{type:o.c.ADD_ITEM_TO_CART,data:e,resolve:t,reject:n}},removeCartItem:function(e,t,n){return{type:o.c.REMOVE_CART_ITEM,data:e,resolve:t,reject:n}},removeAllCartItems:function(e,t){return{type:o.c.REMOVE_ALL_CART_ITEMS,resolve:e,reject:t}},updateIsQuickPurchasing:function(e){return{type:o.c.UPDATE_IS_QUICK_PURCHASING,data:e}},removeOrder:function(e,t,n){return{type:o.c.REMOVE_ORDER,data:e,resolve:t,reject:n}},toggleOpenOrderHistoryModal:function(e){return{type:o.c.TOGGLE_OPEN_ORDER_HISTORY_MODAL,data:e}},getOrderList:function(e,t,n){return{type:o.c.GET_ORDER_LIST,data:e,resolve:t,reject:n}},proceedOrder:function(e,t,n){return{type:o.c.PROCEED_ORDER,data:e,resolve:t,reject:n}},cancelOrder:function(e,t,n){return{type:o.c.CANCEL_ORDER,data:e,resolve:t,reject:n}},getRevenueReport:function(e,t,n){return{type:o.c.GET_REVENUE_REPORT,data:e,resolve:t,reject:n}},toggleOpenRevenueReportModal:function(e){return{type:o.c.TOGGLE_OPEN_REVENUE_REPORT_MODAL,data:e}}};var f,p=n(2),m=n.n(p),g=(f={getPeopleList:function(e,t,n){return{type:o.i.GET_PEOPLE_LIST,data:e,resolve:t,reject:n}},getPeopleDetails:function(e,t,n){return{type:o.i.GET_PEOPLE_DETAILS,data:e,resolve:t,reject:n}},searchPeople:function(e,t,n){return{type:o.i.SEARCH_PEOPLE,data:e,resolve:t,reject:n}},getFriendshipStatus:function(e,t){return{type:o.i.GET_FRIENDSHIP_STATUS,resolve:e,reject:t}},getFriendList:function(e,t,n){return{type:o.i.GET_FRIEND_LIST,data:e,resolve:t,reject:n}},getRequestList:function(e,t,n){return{type:o.i.GET_REQUEST_LIST,data:e,resolve:t,reject:n}},unfriend:function(e,t,n){return{type:o.i.UNFRIEND,data:e,resolve:t,reject:n}},sendFriendRequest:function(e,t,n){return{type:o.i.SEND_FRIEND_REQUEST,data:e,resolve:t,reject:n}},cancelFriendRequest:function(e,t,n){return{type:o.i.CANCEL_FRIEND_REQUEST,data:e,resolve:t,reject:n}},confirmFriendRequest:function(e,t,n){return{type:o.i.CONFIRM_FRIEND_REQUEST,data:e,resolve:t,reject:n}},declineFriendRequest:v,searchFriends:function(e,t,n){return{type:o.i.SEARCH_FRIENDS,data:e,resolve:t,reject:n}},searchFriends2:function(e,t,n){return{type:o.i.SEARCH_FRIENDS_2,data:e,resolve:t,reject:n}}},m()(f,"declineFriendRequest",v),m()(f,"getGroupList",(function(e,t,n){return{type:o.i.GET_GROUP_LIST,data:e,resolve:t,reject:n}})),m()(f,"updateCreateGroupModal",(function(e,t,n){var r=e.show;void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r));return{type:o.i.UPDATE_CREATE_GROUP_MODAL,data:e,resolve:t,reject:n}})),m()(f,"getGroupDetails",(function(e,t,n){return{type:o.i.GET_GROUP_DETAIL,data:e,resolve:t,reject:n}})),m()(f,"updateGroupInfo",(function(e,t,n){return{type:o.i.UPDATE_GROUP_INFO,data:e,resolve:t,reject:n}})),m()(f,"toggleCreateGroupForm",(function(e){return{type:o.i.TOGGLE_CREATE_GROUP_FORM,data:e}})),m()(f,"createGroup",(function(e,t,n){return{type:o.i.CREATE_GROUP,data:e,resolve:t,reject:n}})),m()(f,"deleteGroup",(function(e,t,n){return{type:o.i.DELETE_GROUP,data:e,resolve:t,reject:n}})),m()(f,"getGroupMember",(function(e,t,n){return{type:o.i.GET_GROUP_MEMBER,data:e,resolve:t,reject:n}})),m()(f,"addGroupMember",(function(e,t,n){return{type:o.i.ADD_GROUP_MEMBER,data:e,resolve:t,reject:n}})),m()(f,"removeGroupMember",(function(e,t,n){return{type:o.i.REMOVE_GROUP_MEMBER,data:e,resolve:t,reject:n}})),m()(f,"uploadGroupAvatar",(function(e,t,n){return{type:o.i.UPLOAD_GROUP_AVATAR,data:e,resolve:t,reject:n}})),m()(f,"getGroupCount",(function(e,t){return{type:o.i.GET_GROUP_COUNT,resolve:e,reject:t}})),m()(f,"getGroupMemberByVideo",(function(e,t,n){return{type:o.i.GET_GROUP_MEMBER_BY_VIDEO,data:e,resolve:t,reject:n}})),f);function v(e,t,n){return{type:o.i.DECLINE_FRIEND_REQUEST,data:e,resolve:t,reject:n}}var b={getNotifications:function(e,t,n){return{type:o.h.GET_NOTIFICATIONS,data:e,resolve:t,reject:n}},getNotificationsStatistics:function(e,t){return{type:o.h.GET_NOTIFICATIONS_STATISTICS,resolve:e,reject:t}},reduceNotificationsStatistics:function(e,t,n){return{type:o.h.REDUCE_NOTIFICATIONS_STATISTICS,data:e,resolve:t,reject:n}},deleteNotification:function(e,t,n){return{type:o.h.DELETE_NOTIFICATION,data:e,resolve:t,reject:n}},updateNotification:function(e,t,n){return{type:o.h.UPDATE_NOTIFICATION,data:e,resolve:t,reject:n}},markAllAsRead:function(e,t,n){return{type:o.h.MARK_ALL_AS_READ,data:e,resolve:t,reject:n}},resetNoNewSharedVideo:function(e,t,n){return{type:o.h.RESET_NO_NEW_SHARED_VIDEO,data:e,resolve:t,reject:n}},updateNoNewNotifications:function(e){return{type:o.h.UPDATE_NO_NEW_NOTIFICATIONS,data:e}},updateNoNewSharedVideos:function(e){return{type:o.h.UPDATE_NO_NEW_SHARED_VIDEO,data:e}},resetVideoStatistics:function(e){return{type:o.h.RESET_VIDEO_STATISTICS,data:e}},updateVideoStatistics:function(e){return{type:o.h.UPDATE_VIDEO_STATISTICS,data:e}},updateTrackingObject:function(e,t,n){return{type:o.h.UPDATE_TRACKING_OBJECT,data:e,resolve:t,reject:n}},updateNotificationState:function(e,t,n){return{type:o.h.UPDATE_NOTIFICATION_STATE,data:e,resolve:t,reject:n}},resetNoNewSharedMessageVideos:function(e,t,n){return{type:o.h.RESET_NO_NEW_SHARED_MESSAGE_VIDEOS,data:e,resolve:t,reject:n}},setKpiChanges:function(e){return{type:o.h.SET_KPI_CHANGES,data:e}},setKpiCompletedChapters:function(e){return{type:o.h.SET_KPI_COMPLETED_CHAPTERS,data:e}}};var y={updateCreatingCogvidProgress:function(e){return{type:o.l.UPDATE_CREATING_COGVID_PROGRESS,data:e}},updateACogvidProgress:function(e){return{type:o.l.UPDATE_A_COGVID_PROGRESS,data:e}},removeACogvidProgress:function(e){return{type:o.l.REMOVE_A_COGVID_PROGRESS,data:e}},updateTotalCogvidProgress:function(e){return{type:o.l.UPDATE_TOTAL_COGVID_PROGRESS,data:e}},addUploader:function(e){return{type:o.l.ADD_UPLOADER,data:e}},removeUploader:function(e){return{type:o.l.REMOVE_UPLOADER,data:e}},startAFileUpload:function(e){return{type:o.l.START_A_FILE_UPLOAD,data:e}},startACogvidFileUpload:function(e){return{type:o.l.START_A_COGVID_FILE_UPLOAD,data:e}},updateIsUploadingCogvid:function(e){return{type:o.l.UPDATE_IS_UPLOADING_COGVID,data:e}},updateIsUploadingAttachment:function(e){return{type:o.l.UPDATE_IS_UPLOADING_ATTACHMENT,data:e}},changeShouldUpdateProgress:function(e){return{type:o.l.CHANGE_SHOULD_UPDATE_PROGRESS,data:e}},updateTranscodingStatus:function(e){return{type:o.l.UPDATE_TRANSCODING_STATUS,data:e}}};var A=n(174),_={playerReset:function(){return{type:o.j.VIDEO_RESET}},playerReady:function(){return{type:o.j.VIDEO_READY}},playerPlayed:function(){return{type:o.j.VIDEO_PLAYED}},playerWaiting:function(e){return{type:o.j.VIDEO_WAITING,data:e}}};var w={getMySubscriptions:function(e,t){return{type:o.m.GET_MY_SUBSCRIPTIONS,resolve:e,reject:t}},getMySubsOptions:function(e,t){return{type:o.m.GET_MY_SUB_OPTIONS,resolve:e,reject:t}},getSubsPlans:function(e,t){return{type:o.m.GET_SUBSCRIPTION_PLANS,resolve:e,reject:t}},getSubsOptions:function(e,t,n){return{type:o.m.GET_SUBSCRIPTION_OPTIONS,data:e,resolve:t,reject:n}},subscribeToPlan:function(e,t,n){return{type:o.m.SUBSCRIBE_TO_PLAN,data:e,resolve:t,reject:n}},changeSubscribedPlan:function(e,t,n){return{type:o.m.CHANGE_PLAN,data:e,resolve:t,reject:n}},checkoutSubscription:function(e,t,n){return{type:o.m.CHECKOUT,data:e,resolve:t,reject:n}},unsubscribePlan:function(e,t,n){return{type:o.m.UNSUBSCRIBE_PLAN,data:e,resolve:t,reject:n}},updateCourseSubscription:function(e,t,n){return{type:o.m.UPDATE_COURSE_SUBSCRIPTION,data:e,resolve:t,reject:n}},cancelCourseSubscription:function(e,t,n){return{type:o.m.CANCEL_COURSE_SUBSCRIPTION,data:e,resolve:t,reject:n}},getMyPaymentMethods:function(e,t){return{type:o.m.GET_MY_PAYMENT_METHODS,resolve:e,reject:t}},addPaymentMethod:function(e,t,n){return{type:o.m.ADD_PAYMENT_METHOD,data:e,resolve:t,reject:n}},setDefaultPaymentMethod:function(e,t,n){return{type:o.m.SET_DEFAULT_PAYMENT_METHOD,data:e,resolve:t,reject:n}},deletePaymentMethod:function(e,t,n){return{type:o.m.DELETE_PAYMENT_METHOD,data:e,resolve:t,reject:n}},getMyPayoutAccounts:function(e,t){return{type:o.m.GET_MY_PAYOUT_ACCOUNTS,resolve:e,reject:t}},addPayoutAccount:function(e,t,n){return{type:o.m.ADD_PAYOUT_ACCOUNT,data:e,resolve:t,reject:n}},setDefaultPayoutAccount:function(e,t,n){return{type:o.m.SET_DEFAULT_PAYOUT_ACCOUNT,data:e,resolve:t,reject:n}},resubmitAccountInfo:function(e,t,n){return{type:o.m.SUBMIT_ACCOUNT_INFO,data:e,resolve:t,reject:n}},deletePayoutAccount:function(e,t,n){return{type:o.m.DELETE_PAYOUT_ACCOUNT,data:e,resolve:t,reject:n}},displaySubscriptionModal:function(e){return{type:o.m.SHOW_SUBSCRIPTION_FORM,data:e}},displayFinanceAccountsModal:function(e){return{type:o.m.SHOW_FINANCE_ACCOUNT_FORM,data:e}},displaySubscribedCoursesModal:function(e){return{type:o.m.SHOW_SUBSCRIBED_COURSES_FORM,data:e}},getMySubscribedCourses:function(e,t,n){return{type:o.m.GET_MY_SUBSCRIBED_COURSES,data:e,resolve:t,reject:n}}};function E(e,t,n){return{type:o.e.CHAPTER_LIKE,data:e,resolve:t,reject:n}}function S(e,t,n){return{type:o.e.COMPREHENSION_GUIDE_UPDATING,data:e,resolve:t,reject:n}}function C(e){return{type:o.e.DISPLAY_COVER_IMAGE,data:e}}function T(e){return{type:o.e.DISPLAY_PREVIEW_IMAGE,data:e}}function k(e){return{type:o.e.DISPLAY_MINI_COVER_IMAGE,data:e}}function x(e,t){return{type:o.e.GET_MY_COGVID_LIST,data:e,resolve:t}}function O(e,t){return{type:o.e.GET_COGVID_LIST,data:e,resolve:t}}function I(e,t,n){return{type:o.e.LOAD_MORE_COGVID_LIST,data:e,resolve:t,reject:n}}function M(e,t,n){return{type:o.e.MERGE_FETCHED_VIDEOS,data:e,resolve:t,reject:n}}function P(e,t){return{type:o.e.GET_COGVID_DETAILS,data:e,resolve:t}}function D(e,t,n){return{type:o.e.GET_VIDEO_STATE,data:e,resolve:t,reject:n}}function N(){return{type:o.e.RESET_COGVID_DETAILS}}function L(e){return{type:o.e.SHOW_VIDEO_OVERLAY,overlayMode:e}}function R(e,t,n){return{type:o.e.SEARCH_COGVID_LIST,data:e,resolve:t,reject:n}}function B(e,t,n){return{type:o.e.UPDATE_SB_CONTENT,data:e,resolve:t,reject:n}}function j(e,t,n){return{type:o.e.UPDATE_MULTIPLE_SB_CONTENT,data:e,resolve:t,reject:n}}function F(e){return{type:o.e.GET_CG_SUCCESS,data:e}}function U(e,t,n){return{type:o.e.UPDATE_CHAPTER_ITEM,data:e,resolve:t,reject:n}}function H(e,t,n){return{type:o.e.UPDATE_CHAPTER_LOCK,data:e,resolve:t,reject:n}}function z(e,t,n){return{type:o.e.UPDATE_CHAPTER_FREE_FUI,data:e,resolve:t,reject:n}}function V(e,t,n){return{type:o.e.UPDATE_CHAPTER_ITEM_IN_CACHE,data:e,resolve:t,reject:n}}function W(e,t,n){return{type:o.e.UPDATE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function G(e,t,n){return{type:o.e.DELETE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function q(e,t,n){return e.attribute="COVERIMAGE",{type:o.e.UPDATE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function Y(e,t,n){return e.attribute="THUMBNAIL",{type:o.e.UPDATE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function K(e,t,n){return e.attribute="THUMBNAIL",{type:o.e.DELETE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function X(e,t,n){return e.attribute="FOUNDATION",{type:o.e.UPDATE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function Q(e,t,n){return e.attribute="FOUNDATION",{type:o.e.DELETE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function $(e,t,n){return e.attribute="UNDERSTANDING",{type:o.e.UPDATE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function J(e,t,n){return e.attribute="UNDERSTANDING",{type:o.e.DELETE_CHAPTER_SLIDE,data:e,resolve:t,reject:n}}function Z(e,t,n){return{type:o.e.REMOVE_A_CHAPTER,data:e,resolve:t,reject:n}}function ee(e,t,n){return{type:o.e.ADD_A_NEW_CHAPTER,data:e,resolve:t,reject:n}}function te(e){return{type:o.e.UPDATE_CURRENT_SB_DATA,data:e}}function ne(e){return{type:o.e.REORDER_CHAPTER_ON_UI,data:e}}function re(e,t){return{type:o.e.REORDER_CHAPTER_API,data:e,resolve:t}}function ie(e){return{type:o.e.SET_ACTIVE_CHAPTER,data:e}}function ae(e,t,n){return{type:o.e.SET_PRIVACY_CHAPTER,data:e,resolve:t,reject:n}}function oe(e){return{type:o.e.TOGGLE_CREATE_COGVID_FORM,open:e}}function se(e){return void 0!==e.show&&a.a.dispatch(s.toggleOpenPopup(e.show)),{type:o.e.UPDATE_CREATE_MEETING_MODAL,data:e}}function le(e){return{type:o.e.TOGGLE_ADD_FILES_TO_GALLERY_FORM,open:e}}function ce(e){return{type:o.e.OLD_TOGGLE_CREATE_COGVID_FORM,open:e}}function ue(e,t){return{type:o.e.GET_CG,data:e,resolve:t}}function de(e){return{type:o.e.GET_SB,data:e}}function he(e){return{type:o.e.HIGHLIGHTS_GET,data:e}}function fe(e,t){return{type:o.e.SEARCH_WITHIN_VIDEO,data:e,resolve:t}}function pe(e){return{type:o.e.HIGHLIGHTS_SET,data:e}}function me(e,t){return{type:o.e.HIGHLIGHTS_APPLY,data:e,resolve:t}}function ge(e,t){return{type:o.e.HIGHLIGHTS_DELETE,data:e,resolve:t}}function ve(e,t){return{type:o.e.HIGHLIGHTS_UPDATE,data:e,resolve:t}}function be(e){return{type:o.e.UPDATE_WITHIN_VIDEO_SEARCH,data:e}}function ye(){return{type:o.e.RESET_WITHIN_VIDEO_SEARCH}}function Ae(e){return{type:o.e.UPDATE_VIDEO_TIME,data:e}}function _e(e){return{type:o.e.LIMIT_VIDEO_TIME,data:e}}function we(){return{type:o.e.RESET_VIDEO_TIME}}function Ee(e){return{type:o.e.UPDATE_HIGHLIGHT_MODE,data:e}}function Se(e){return{type:o.e.TOGGLE_CHAPTER_TEXT_EDITTING_MODE,data:e}}function Ce(e,t,n){return{type:o.e.GET_AUTHOR_PROFILE,data:e,resolve:t,reject:n}}function Te(e){return{type:o.e.UPDATE_COGVID_DETAILS,data:e}}function ke(e){return{type:o.e.UPDATE_SB,data:e}}function xe(e,t){return{type:o.e.GET_PROCESSING_COGVID_STATUS_LIST,resolve:e,reject:t}}function Oe(e,t,n){return{type:o.e.EDIT_COGVID_INFO,data:e,resolve:t,reject:n}}function Ie(e,t,n){return{type:o.e.CANCEL_VIDEO_PROCESSING,data:e,resolve:t,reject:n}}function Me(e,t,n){return{type:o.e.RETRY_VIDEO_PROCESSING,data:e,resolve:t,reject:n}}function Pe(){return{type:o.e.RESET_REDUCER}}function De(e,t,n){return{type:o.e.ATTACH_FILES_TO_VIDEO,data:e,resolve:t,reject:n}}function Ne(e,t,n){return{type:o.e.ADD_VIDEO_ATTACHMENTS,data:e,resolve:t,reject:n}}function Le(e,t,n){return{type:o.e.REPLACE_VIDEO_ATTACHMENTS,data:e,resolve:t,reject:n}}function Re(e,t,n){return{type:o.e.UPDATE_VIDEO_ATTACHMENT,data:e,resolve:t,reject:n}}function Be(e,t,n){return{type:o.e.UPDATE_VIDEO_ATTACHMENT_LOCK,data:e,resolve:t,reject:n}}function je(e,t,n){return{type:o.e.UPDATE_VIDEO_ATTACHMENT_ORDER,data:e,resolve:t,reject:n}}function Fe(e,t,n){return{type:o.e.UPDATE_VIDEO_ATTACHMENT_IN_CACHE,data:e,resolve:t,reject:n}}function Ue(e,t,n){return{type:o.e.UPDATE_VIDEO_ATTACHMENT_THUMBNAIL,data:e,resolve:t,reject:n}}function He(e,t,n){return{type:o.e.DELETE_VIDEO_ATTACHMENT,data:e,resolve:t,reject:n}}function ze(e){return{type:o.e.DELETE_VIDEO_ATTACHMENT_IN_CACHE,data:e}}function Ve(e,t,n){return{type:o.e.ATTACH_FILES_TO_CHAPTER,data:e,resolve:t,reject:n}}function We(e,t,n){return{type:o.e.DELETE_CHAPTER_ATTACHMENT,data:e,resolve:t,reject:n}}function Ge(e){return{type:o.e.TOGGLE_DISPLAY_CHAPTER_ATTACHMENTS,data:e}}function qe(e,t,n){return{type:o.e.UPDATE_CHAPTER_ATTACHMENT,data:e,resolve:t,reject:n}}function Ye(e,t,n){return{type:o.e.UPDATE_CHAPTER_ATTACHMENT_LOCK,data:e,resolve:t,reject:n}}function Ke(e,t,n){return{type:o.e.UPDATE_CHAPTER_ATTACHMENT_ORDER,data:e,resolve:t,reject:n}}function Xe(e){return{type:o.e.UPDATE_CHAPTER_ATTACHMENT_IN_CACHE,data:e}}function Qe(e,t,n){return{type:o.e.UPDATE_CHAPTER_ATTACHMENT_THUMBNAIL,data:e,resolve:t,reject:n}}function $e(e){return{type:o.e.ADD_CHAPTER_ATTACHMENTS,data:e}}function Je(e,t,n){return{type:o.e.UPDATE_REVIEW_ATTACHMENT,data:e,resolve:t,reject:n}}function Ze(e){return{type:o.e.DELETE_CHAPTER_ATTACHMENT_IN_CACHE,data:e}}function et(e,t,n){return{type:o.e.DOWNLOAD_ATTACHMENT,data:e,resolve:t,reject:n}}function tt(e,t){return{type:o.e.GET_GALLERY_VIDEO,resolve:e,reject:t}}function nt(e,t,n){return{type:o.e.GET_LECTURE_VIDEO,data:e,resolve:t,reject:n}}function rt(e){return{type:o.e.UPDATE_GALLERY_VIDEO_DATA,data:e}}function it(e){return{type:o.e.DISPLAY_VIDEO_ATTACHMENTS,data:e}}function at(e){return{type:o.e.DISPLAY_PREVIEW_ATTACHMENTS,data:e}}function ot(e,t,n){return{type:o.e.GET_VIDEO_ATTACHMENTS,data:e,resolve:t,reject:n}}function st(e,t,n){return{type:o.e.GET_VIDEO_CHAPTERS_ATTACHMENTS,data:e,resolve:t,reject:n}}function lt(e,t,n){return{type:o.e.REPLACE_VIDEO_CHAPTER_ATTACHMENTS,data:e,resolve:t,reject:n}}function ct(e,t,n){return{type:o.e.IMPORT_SUBTITLE,data:e,resolve:t,reject:n}}function ut(e,t,n){return{type:o.e.CHANGE_PUBLIC_COGVID_VIDEO_SCOPE,data:e,resolve:t,reject:n}}function dt(e,t,n){return{type:o.e.PUBLIC_COGVID_VIDEO,data:e,resolve:t,reject:n}}function ht(e,t,n){return{type:o.e.CANCEL_PUBLIC_COGVID_VIDEO,data:e,resolve:t,reject:n}}function ft(e,t,n){return{type:o.e.GET_PUBLIC_COGVID_VIDEO_FEEDBACK,data:e,resolve:t,reject:n}}function pt(e,t,n){return{type:o.e.GET_PUBLIC_COGVID_VIDEO_LAST_STATUS,data:e,resolve:t,reject:n}}function mt(e,t,n){return{type:o.e.UNPUBLISH_VIDEO,data:e,resolve:t,reject:n}}function gt(e,t,n){return{type:o.e.UPDATE_COGVID_LIST,data:e,currentActiveLv:t,isLoading:n}}function vt(){return{type:o.e.RESET_ALL_COGVID_LIST}}function bt(e){return{type:o.e.UPDATE_COGVID_LIST_ITEM,data:e}}function yt(e){return{type:o.e.UPDATE_COGVID_CHILD_VIDEOS_STATUS,data:e}}function At(e,t,n){return{type:o.e.CLONE_COGNITIVE_VIDEO,data:e,resolve:t,reject:n}}function _t(e,t,n){return{type:o.e.EXPORT_COGNITIVE_VIDEO_LINK,data:e,resolve:t,reject:n}}function wt(e,t,n){return{type:o.e.SET_VIDEO_COVER_IMG,data:e,resolve:t,reject:n}}function Et(e,t,n){return{type:o.e.SET_VIDEO_COVER_IMG_HTML,data:e,resolve:t,reject:n}}function St(e,t,n){return{type:o.e.DELETE_VIDEO,data:e,resolve:t,reject:n}}function Ct(e,t,n){return{type:o.e.DELETE_VIDEO_SHARED_TO_ME,data:e,resolve:t,reject:n}}function Tt(e){return{type:o.e.RESET_VIDEO_LIST,data:e}}function kt(e,t,n){return{type:o.e.GET_RAW_VIDEOS,data:e,resolve:t,reject:n}}function xt(e,t,n){return{type:o.e.INSERT_VIDEO,data:e,resolve:t,reject:n}}function Ot(e,t,n){return{type:o.e.SET_STYLE_FOR_CHAPTER,data:e,resolve:t,reject:n}}function It(){return{type:o.e.ENABLED_COPY_CHAPTER_STYLE}}function Mt(e,t,n){return{type:o.e.GET_VIDEO_SHARING_INFO,data:e,resolve:t,reject:n}}function Pt(e,t,n){return{type:o.e.GET_VIDEO_SHARED_USERS,data:e,resolve:t,reject:n}}function Dt(e,t,n){return{type:o.e.GET_VIDEO_ROLES,data:e,resolve:t,reject:n}}function Nt(e,t,n){return{type:o.e.GET_VIDEO_SETTING,data:e,resolve:t,reject:n}}function Lt(e,t,n){return{type:o.e.SHARE_VIDEO,data:e,resolve:t,reject:n}}function Rt(e,t,n){return{type:o.e.EXTRACT_CHAPTERS,data:e,resolve:t,reject:n}}function Bt(e,t,n){return{type:o.e.EXTRACT_HIGHLIGHTS,data:e,resolve:t,reject:n}}function jt(e,t,n){return{type:o.e.GET_CHAPTER_ATTACHMENT_SKETCH,data:e,resolve:t,reject:n}}function Ft(e,t,n){return{type:o.e.EDIT_CHAPTER_ATTACHMENT_SKETCH,data:e,resolve:t,reject:n}}function Ut(e,t,n){return{type:o.e.DELETE_CHAPTER_ATTACHMENT_SKETCH,data:e,resolve:t,reject:n}}function Ht(e,t,n){return{type:o.e.GET_VIDEO_ATTACHMENT_SKETCH,data:e,resolve:t,reject:n}}function zt(e,t,n){return{type:o.e.EDIT_VIDEO_ATTACHMENT_SKETCH,data:e,resolve:t,reject:n}}function Vt(e,t,n){return{type:o.e.DELETE_CHAPTER_ATTACHMENT_SKETCH,data:e,resolve:t,reject:n}}function Wt(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.e.UPDATE_EDIT_VIDEO_MODAL,data:e,resolve:t,reject:n}}function Gt(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.e.UPDATE_SET_PRICE_MODAL,data:e,resolve:t,reject:n}}function qt(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.e.UPDATE_PUBLISH_VIDEO_MODAL,data:e,resolve:t,reject:n}}function Yt(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.e.UPDATE_FEEDBACK_MODAL,data:e,resolve:t,reject:n}}function Kt(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.e.UPDATE_SHARE_VIDEO_CHAPTER_MODAL,data:e,resolve:t,reject:n}}function Xt(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.e.UPDATE_EXTRACT_CHAPTERS_MODAL,data:e,resolve:t,reject:n}}function Qt(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.e.UPDATE_SAVE_TO_MY_VIDEO_MODAL,data:e,resolve:t,reject:n}}function $t(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.e.UPDATE_EXPORT_VIDEO_MODAL,data:e,resolve:t,reject:n}}function Jt(e,t,n){return{type:o.e.SHARE_CHAPTER,data:e,resolve:t,reject:n}}function Zt(e,t,n){return{type:o.e.GET_CHAPTER_SHARING_INFO,data:e,resolve:t,reject:n}}function en(e,t,n){return{type:o.e.GET_CHAPTER_SHARING_ROLES,data:e,resolve:t,reject:n}}function tn(e){return{type:o.e.GET_COGVID_THUMBNAIL,data:e}}function nn(e){return{type:o.e.UPDATE_LOCAL_CHAPTER_ITEM,data:e}}function rn(e,t,n){return{type:o.e.UPDATE_IS_EDITTING_SB,data:e,resolve:t,reject:n}}function an(e,t,n){return{type:o.e.UPDATE_COVER_IMAGE_TEMPLATE,data:e,resolve:t,reject:n}}function on(e,t,n){return{type:o.e.GET_COVER_IMAGE_TEMPLATE,data:e,resolve:t,reject:n}}function sn(e,t,n){return{type:o.e.GET_COURSES,data:e,resolve:t,reject:n}}function ln(e,t,n){return{type:o.e.GET_COURSE_SERIAL,data:e,resolve:t,reject:n}}function cn(e,t,n){return{type:o.e.CREATE_COURSE,data:e,resolve:t,reject:n}}function un(e,t,n){return{type:o.e.UNSHIFT_COGVID_LIST,data:e,resolve:t,reject:n}}function dn(e,t,n){return{type:o.e.UPDATE_SHARED_PEOPLE_DATA,data:e,resolve:t,reject:n}}function hn(e,t,n){return{type:o.e.UPDATE_STATE,data:e,resolve:t,reject:n}}function fn(e,t,n){return{type:o.e.GET_SHAREABLE_VIDEO_ROLES,data:e,resolve:t,reject:n}}function pn(e,t,n){return{type:o.e.CHANGE_OWNERSHIP,data:e,resolve:t,reject:n}}function mn(e,t,n){return{type:o.e.TRACKING_DOWNLOAD_ATTACHMENT,data:e,resolve:t,reject:n}}function gn(e,t,n){return{type:o.e.GET_VIDEO_OWNER_PROFILE,data:e,resolve:t,reject:n}}function vn(e,t,n){return{type:o.e.CREATE_DAILY_VIDEO,data:e,resolve:t,reject:n}}function bn(e,t,n){return{type:o.e.TOGGLE_ENABLE_COMMENTS_LIKES,data:e,resolve:t,reject:n}}function yn(e,t,n){return{type:o.e.LIKE_VIDEO,data:e,resolve:t,reject:n}}function An(e,t,n){return{type:o.e.UNLIKE_VIDEO,data:e,resolve:t,reject:n}}function _n(e,t,n){return{type:o.e.GET_LIKED_VIDEO_PEOPLE_LIST,data:e,resolve:t,reject:n}}function wn(e,t,n){return{type:o.e.GET_PARTICIPANTS,data:e,resolve:t,reject:n}}function En(e,t,n){return{type:o.e.CREATE_MEETING,data:e,resolve:t,reject:n}}function Sn(e,t,n){return{type:o.e.GET_SHORTEN_VIDEO_URL,data:e,resolve:t,reject:n}}function Cn(e,t,n){return{type:o.e.DE_SHORTEN_VIDEO_URL,data:e,resolve:t,reject:n}}function Tn(e,t,n){return{type:o.e.SEARCH_KEYWORD,data:e,resolve:t,reject:n}}function kn(e,t,n){return{type:o.e.CREATE_VIDEO_KEYWORD,data:e,resolve:t,reject:n}}function xn(e,t,n){return{type:o.e.FETCH_USER_VIDEOS,data:e,resolve:t,reject:n}}function On(e,t,n){return{type:o.e.FETCH_SB_NOTES,data:e,resolve:t,reject:n}}function In(e,t,n){return{type:o.e.CLONE_VIDEO,data:e,resolve:t,reject:n}}function Mn(e,t,n){return{type:o.e.FIND_MASTERS,data:e,resolve:t,reject:n}}function Pn(e,t,n){return{type:o.e.GET_COURSE_VIDEOS,data:e,resolve:t,reject:n}}function Dn(e,t,n){return{type:o.e.DISPLAY_REQUIRE_PURCHASE_MODAL,data:e,resolve:t,reject:n}}function Nn(e){return{type:o.e.RETRANSCRIBE_VIDEO,data:e}}function Ln(e){return{type:o.e.UPDATE_VIDEO_PLAY_BACK_RATE,data:e}}function Rn(e){return{type:o.e.DISPLAY_VIDEO_DESCRIPTION,data:e}}function Bn(e,t,n){return{type:o.e.GET_VIDEO_DESCRIPTION,data:e,resolve:t,reject:n}}function jn(e,t,n){return{type:o.e.UPDATE_VIDEO_DESCRIPTION,data:e,resolve:t,reject:n}}function Fn(e,t,n){return{type:o.e.DISPLAY_COPY_CHAPTERS_MODAL,data:e,resolve:t,reject:n}}function Un(e,t,n){return{type:o.e.COPY_CHAPTERS,data:e,resolve:t,reject:n}}function Hn(e,t,n){return{type:o.e.DISPLAY_CHAPTERS_SWAPPING,data:e,resolve:t,reject:n}}function zn(e,t,n){return{type:o.e.SWAP_CHAPTERS,data:e,resolve:t,reject:n}}function Vn(e,t,n){return{type:o.e.DISPLAY_PRODUCTS_LAYER,data:e,resolve:t,reject:n}}function Wn(e,t,n){return{type:o.e.CREATE_PRODUCT,data:e,resolve:t,reject:n}}function Gn(e,t,n){return{type:o.e.GET_VIDEO_PRODUCTS,data:e,resolve:t,reject:n}}function qn(e,t,n){return{type:o.e.UPDATE_PRODUCT,data:e,resolve:t,reject:n}}function Yn(e,t,n){return{type:o.e.DELETE_PRODUCT,data:e,resolve:t,reject:n}}function Kn(e,t,n){return{type:o.e.REGISTER_FOR_FREE_COURSE,data:e,resolve:t,reject:n}}function Xn(e,t,n){return{type:o.e.GET_MY_PRODUCTS,data:e,resolve:t,reject:n}}function Qn(e,t,n){return{type:o.e.LINK_PRODUCT,data:e,resolve:t,reject:n}}function $n(e,t,n){return{type:o.e.APPROVE_PRODUCT,data:e,resolve:t,reject:n}}function Jn(e,t,n){return{type:o.e.REJECT_PRODUCT,data:e,resolve:t,reject:n}}function Zn(e,t,n){return{type:o.e.DELETE_LINKED_PRODUCT,data:e,resolve:t,reject:n}}function er(e,t,n){return{type:o.e.DOWNLOAD_PRODUCT,data:e,resolve:t,reject:n}}function tr(e,t,n){return{type:o.e.GET_DOWNLOAD_RESOURCES,data:e,resolve:t,reject:n}}function nr(e){return{type:o.e.DISPLAY_MY_RESOURCES_MODAL,data:e}}function rr(e,t,n){return{type:o.e.ARRANGE_PRODUCTS,data:e,resolve:t,reject:n}}function ir(e,t,n){return{type:o.e.CREATE_RESOURCE_STORE,data:e,resolve:t,reject:n}}function ar(e,t,n){return{type:o.e.UPDATE_RESOURCE_STORE,data:e,resolve:t,reject:n}}function or(e,t,n){return{type:o.e.DELETE_RESOURCE_STORE,data:e,resolve:t,reject:n}}function sr(e,t,n){return{type:o.e.GET_RESOURCE_STORE,data:e,resolve:t,reject:n}}function lr(e,t,n){return{type:o.e.CONNECT_VIDEO_WITH_STORE,data:e,resolve:t,reject:n}}function cr(e,t,n){return{type:o.e.DISCONNECT_VIDEO_WITH_STORE,data:e,resolve:t,reject:n}}function ur(e,t,n){return{type:o.e.INCREASE_STORE_VIEW_COUNT,data:e,resolve:t,reject:n}}function dr(e,t,n){return{type:o.e.INCREASE_PROD_COUNTS,data:e,resolve:t,reject:n}}function hr(e,t,n){return{type:o.e.GET_CHAPTER_SEMANTIC_BLOCKS,data:e,resolve:t,reject:n}}function fr(e,t,n){return{type:o.e.INCREASE_CHAPTER_VIEW_COUNT,data:e,resolve:t,reject:n}}function pr(e){return{type:o.e.SET_LEARNING_SUBJECT,data:e}}function mr(e,t,n){return{type:o.e.UPDATE_TABLE_OF_CONTENT,data:e,resolve:t,reject:n}}function gr(e,t,n){return{type:o.e.GET_STORE_MEMBERS,data:e,resolve:t,reject:n}}function vr(e,t,n){return{type:o.e.ADD_STORE_MEMBER,data:e,resolve:t,reject:n}}function br(e,t,n){return{type:o.e.UPDATE_STORE_MEMBER,data:e,resolve:t,reject:n}}function yr(e,t,n){return{type:o.e.REMOVE_STORE_MEMBER,data:e,resolve:t,reject:n}}function Ar(e,t,n){return{type:o.e.REVIEW_STORE_MEMBER,data:e,resolve:t,reject:n}}function _r(e,t,n){return{type:o.e.APPROVE_STORE_MEMBER,data:e,resolve:t,reject:n}}function wr(e,t,n){return{type:o.e.READ_STORE_MEMBER_MESSAGES,data:e,resolve:t,reject:n}}function Er(e,t,n){return{type:o.e.SEARCH_STORE_MEMBERS,data:e,resolve:t,reject:n}}function Sr(e){return{type:o.e.DISPLAY_SUBSCRIBE_MODAL,data:e}}function Cr(e){return{type:o.e.UPDATE_SELECTED_VIDEO,data:e}}function Tr(e,t,n){return{type:o.e.SEARCH_PUBLIC_COURSES,data:e,resolve:t,reject:n}}function kr(e,t,n){return{type:o.e.UPDATE_CHAPTERS_FILES,data:e,resolve:t,reject:n}}function xr(e,t,n){return{type:o.e.GET_COURSE_FILES,data:e,resolve:t,reject:n}}function Or(e,t,n){return{type:o.e.UPLOAD_COURSE_FILE,data:e,resolve:t,reject:n}}function Ir(e,t,n){return{type:o.e.UPDATE_COURSE_FILE,data:e,resolve:t,reject:n}}function Mr(e,t,n){return{type:o.e.DELETE_COURSE_FILE,data:e,resolve:t,reject:n}}function Pr(e,t,n){return{type:o.e.ARRANGE_COURSE_FILES,data:e,resolve:t,reject:n}}function Dr(e,t,n){var r=e.show;return void 0!==r&&a.a.dispatch(s.toggleOpenPopup(r)),{type:o.n.TOGGLE_DEVICE_SETUP_MODAL,data:e,resolve:t,reject:n}}function Nr(e,t,n){return{type:o.n.SET_MEETING_INFO,data:e,resolve:t,reject:n}}function Lr(e,t,n){return{type:o.n.SET_MEETING_SESSION,data:e,resolve:t,reject:n}}function Rr(e,t,n){return{type:o.n.GET_MEETING_INFO,data:e,resolve:t,reject:n}}function Br(e,t,n){return{type:o.n.START_MEETING,data:e,resolve:t,reject:n}}function jr(e,t,n){return{type:o.n.JOIN_MEETING,data:e,resolve:t,reject:n}}function Fr(e,t,n){return{type:o.n.END_MEETING,data:e,resolve:t,reject:n}}function Ur(e,t,n){return{type:o.n.GET_ALL_PARTICIPANT,data:e,resolve:t,reject:n}}function Hr(e,t,n){return{type:o.n.START_RECORD_MEETING,data:e,resolve:t,reject:n}}function zr(e,t,n){return{type:o.n.SET_MEDIA_PIPELINE,data:e,resolve:t,reject:n}}function Vr(e,t,n){return{type:o.n.STOP_RECORD_MEETING,data:e,resolve:t,reject:n}}function Wr(e,t,n){return{type:o.n.CREATE_GET_ATTENDEE_CALLBACK,data:e,resolve:t,reject:n}}},function(e,t,n){e.exports=n(581)},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return i.v})),n.d(t,"b",(function(){return i.l})),n.d(t,"c",(function(){return i.k})),n.d(t,"d",(function(){return i.x})),n.d(t,"f",(function(){return i.s})),n.d(t,"g",(function(){return i.j})),n.d(t,"h",(function(){return i.u})),n.d(t,"e",(function(){return p})),n.d(t,"i",(function(){return h})),n.d(t,"j",(function(){return f}));n(81),n(55);var r=n(66),i=n(39),a=(n(382),function(e){return{done:!0,value:e}}),o={};function s(e){return Object(r.b)(e)?"channel":Object(r.l)(e)?String(e):Object(r.d)(e)?e.name:String(e)}function l(e,t,n){var r,s,l,c=t;function u(t,n){if(c===o)return a(t);if(n&&!s)throw c=o,n;r&&r(t);var i=n?e[s](n):e[c]();return c=i.nextState,l=i.effect,r=i.stateUpdater,s=i.errorState,c===o?a(t):l}return Object(i.N)(u,(function(e){return u(null,e)}),n)}function c(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o,c={done:!1,value:Object(i.i)(e)},u=function(e){return{done:!1,value:i.j.apply(void 0,[t].concat(r,[e]))}},d=function(e){return o=e};return l({q1:function(){return{nextState:"q2",effect:c,stateUpdater:d}},q2:function(){return{nextState:"q1",effect:u(o)}}},"q1","takeEvery("+s(e)+", "+t.name+")")}function u(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o,c,u={done:!1,value:Object(i.i)(e)},d=function(e){return{done:!1,value:i.j.apply(void 0,[t].concat(r,[e]))}},h=function(e){return{done:!1,value:Object(i.k)(e)}},f=function(e){return o=e},p=function(e){return c=e};return l({q1:function(){return{nextState:"q2",effect:u,stateUpdater:p}},q2:function(){return o?{nextState:"q3",effect:h(o)}:{nextState:"q1",effect:d(c),stateUpdater:f}},q3:function(){return{nextState:"q1",effect:d(c),stateUpdater:f}}},"q1","takeLatest("+s(e)+", "+t.name+")")}function d(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];var c,u,d={done:!1,value:Object(i.i)(t)},h={done:!1,value:Object(i.t)({action:Object(i.i)(t),debounce:Object(i.s)(e)})},f=function(e){return{done:!1,value:i.j.apply(void 0,[n].concat(a,[e]))}},p=function(e){return{done:!1,value:e}},m=function(e){return c=e},g=function(e){return u=e};return l({q1:function(){return{nextState:"q2",effect:d,stateUpdater:m}},q2:function(){return{nextState:"q3",effect:h,stateUpdater:g}},q3:function(){return u.debounce?{nextState:"q1",effect:f(c)}:{nextState:"q2",effect:p(u.action),stateUpdater:m}}},"q1","debounce("+s(t)+", "+n.name+")")}function h(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return i.j.apply(void 0,[c,e,t].concat(r))}function f(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return i.j.apply(void 0,[u,e,t].concat(r))}function p(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];return i.j.apply(void 0,[d,e,t,n].concat(a))}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(1089);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(186),i=n(3);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r,i;i=this,void 0===(r=function(){return function(e){"use strict";var t=e&&e.I18n||{},n=Array.prototype.slice,r=function(e){return("0"+e.toString()).substr(-2)},i=function(e){var t=typeof e;return"function"===t||"object"===t},a=function(e){return"function"==typeof e},o=function(e){return null!=e},s=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},l=function(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)},c=function(e){return!0===e||!1===e},u=function(e){return null===e},d=function(e,t,n){return void 0===n||0==+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))},h=function(e,t){return a(e)?e(t):e},f=function(e,t){var n,r,i;for(n in t)t.hasOwnProperty(n)&&(r=t[n],"string"==typeof(i=r)||"[object String]"===Object.prototype.toString.call(i)||l(r)||c(r)||s(r)||u(r)?e[n]=r:(null==e[n]&&(e[n]={}),f(e[n],r)));return e},p={day_names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],month_names:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbr_month_names:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridian:["AM","PM"]},m={precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1},g={unit:"$",precision:2,format:"%u%n",sign_first:!0,delimiter:",",separator:"."},v={unit:"%",precision:3,format:"%n%u",separator:".",delimiter:""},b=[null,"kb","mb","gb","tb"],y={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,fallbacks:!1,translations:{},missingBehaviour:"message",missingTranslationPrefix:""};return t.reset=function(){var e;for(e in y)this[e]=y[e]},t.initializeOptions=function(){var e;for(e in y)o(this[e])||(this[e]=y[e])},t.initializeOptions(),t.locales={},t.locales.get=function(e){var n=this[e]||this[t.locale]||this.default;return a(n)&&(n=n(e)),!1===s(n)&&(n=[n]),n},t.locales.default=function(e){var n=[],r=[];return e&&n.push(e),!e&&t.locale&&n.push(t.locale),t.fallbacks&&t.defaultLocale&&n.push(t.defaultLocale),n.forEach((function(e){var n=e.split("-"),i=null,a=null;3===n.length?(i=[n[0],n[1]].join("-"),a=n[0]):2===n.length&&(i=n[0]),-1===r.indexOf(e)&&r.push(e),t.fallbacks&&[i,a].forEach((function(t){null!=t&&t!==e&&-1===r.indexOf(t)&&r.push(t)}))})),n.length||n.push("en"),r},t.pluralization={},t.pluralization.get=function(e){return this[e]||this[t.locale]||this.default},t.pluralization.default=function(e){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}},t.currentLocale=function(){return this.locale||this.defaultLocale},t.isSet=o,t.lookup=function(e,t){t=t||{};var n,r,i,a,s=this.locales.get(t.locale).slice();for(i=this.getFullScope(e,t);s.length;)if(n=s.shift(),r=i.split(this.defaultSeparator),a=this.translations[n]){for(;r.length&&null!=(a=a[r.shift()]););if(null!=a)return a}if(o(t.defaultValue))return h(t.defaultValue,e)},t.pluralizationLookupWithoutFallback=function(e,t,n){var r,a,s=this.pluralization.get(t)(e);if(i(n))for(;s.length;)if(r=s.shift(),o(n[r])){a=n[r];break}return a},t.pluralizationLookup=function(e,t,n){n=n||{};var r,a,s,l,c=this.locales.get(n.locale).slice();for(t=this.getFullScope(t,n);c.length;)if(r=c.shift(),a=t.split(this.defaultSeparator),s=this.translations[r]){for(;a.length&&(s=s[a.shift()],i(s));)0===a.length&&(l=this.pluralizationLookupWithoutFallback(e,r,s));if(null!=l)break}return null==l&&o(n.defaultValue)&&(l=i(n.defaultValue)?this.pluralizationLookupWithoutFallback(e,n.locale,n.defaultValue):n.defaultValue,s=n.defaultValue),{message:l,translations:s}},t.meridian=function(){var e=this.lookup("time"),t=this.lookup("date");return e&&e.am&&e.pm?[e.am,e.pm]:t&&t.meridian?t.meridian:p.meridian},t.prepareOptions=function(){for(var e,t=n.call(arguments),r={};t.length;)if("object"==typeof(e=t.shift()))for(var i in e)e.hasOwnProperty(i)&&(o(r[i])||(r[i]=e[i]));return r},t.createTranslationOptions=function(e,t){var n=[{scope:e}];return o(t.defaults)&&(n=n.concat(t.defaults)),o(t.defaultValue)&&n.push({message:t.defaultValue}),n},t.translate=function(e,t){t=t||{};var n,r=this.createTranslationOptions(e,t),a=e,l=this.prepareOptions(t);return delete l.defaultValue,r.some((function(t){if(o(t.scope)?(a=t.scope,n=this.lookup(a,l)):o(t.message)&&(n=h(t.message,e)),null!=n)return!0}),this)?("string"==typeof n?n=this.interpolate(n,t):s(n)?n=n.map((function(e){return"string"==typeof e?this.interpolate(e,t):e}),this):i(n)&&o(t.count)&&(n=this.pluralize(t.count,a,t)),n):this.missingTranslation(e,t)},t.interpolate=function(e,t){if(null==e)return e;t=t||{};var n,r,i,a,s=e.match(this.placeholder);if(!s)return e;for(;s.length;)i=(n=s.shift()).replace(this.placeholder,"$1"),r=o(t[i])?t[i].toString().replace(/\$/gm,"_#$#_"):i in t?this.nullPlaceholder(n,e,t):this.missingPlaceholder(n,e,t),a=new RegExp(n.replace(/{/gm,"\\{").replace(/}/gm,"\\}")),e=e.replace(a,r);return e.replace(/_#\$#_/g,"$")},t.pluralize=function(e,t,n){var r,i;return n=this.prepareOptions({count:String(e)},n),void 0===(i=this.pluralizationLookup(e,t,n)).translations||null==i.translations?this.missingTranslation(t,n):void 0!==i.message&&null!=i.message?this.interpolate(i.message,n):(r=this.pluralization.get(n.locale),this.missingTranslation(t+"."+r(e)[0],n))},t.missingTranslation=function(e,t){if("guess"===this.missingBehaviour){var n=e.split(".").slice(-1)[0];return(this.missingTranslationPrefix.length>0?this.missingTranslationPrefix:"")+n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+" "+n.toLowerCase()}))}return'[missing "'+[null!=t&&null!=t.locale?t.locale:this.currentLocale(),this.getFullScope(e,t)].join(this.defaultSeparator)+'" translation]'},t.missingPlaceholder=function(e,t,n){return"[missing "+e+" value]"},t.nullPlaceholder=function(){return t.missingPlaceholder.apply(t,arguments)},t.toNumber=function(e,t){t=this.prepareOptions(t,this.lookup("number.format"),m);var n,r,i=e<0,a=function(e,t){return d("round",e,-t).toFixed(t)}(Math.abs(e),t.precision).toString().split("."),o=[],s=t.format||"%n",l=i?"-":"";for(e=a[0],n=a[1];e.length>0;)o.unshift(e.substr(Math.max(0,e.length-3),3)),e=e.substr(0,e.length-3);return r=o.join(t.delimiter),t.strip_insignificant_zeros&&n&&(n=n.replace(/0+$/,"")),t.precision>0&&n&&(r+=t.separator+n),r=(s=t.sign_first?"%s"+s:s.replace("%n","%s%n")).replace("%u",t.unit).replace("%n",r).replace("%s",l)},t.toCurrency=function(e,t){return t=this.prepareOptions(t,this.lookup("number.currency.format",t),this.lookup("number.format",t),g),this.toNumber(e,t)},t.localize=function(e,t,n){switch(n||(n={}),e){case"currency":return this.toCurrency(t,n);case"number":return e=this.lookup("number.format",n),this.toNumber(t,e);case"percentage":return this.toPercentage(t,n);default:var r;return r=e.match(/^(date|time)/)?this.toTime(e,t,n):t.toString(),this.interpolate(r,n)}},t.parseDate=function(e){var t,n,r;if(null==e)return e;if("object"==typeof e)return e;if(t=e.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/)){for(var i=1;i<=6;i++)t[i]=parseInt(t[i],10)||0;t[2]-=1,r=t[7]?1e3*("0"+t[7]):null,n=t[8]?new Date(Date.UTC(t[1],t[2],t[3],t[4],t[5],t[6],r)):new Date(t[1],t[2],t[3],t[4],t[5],t[6],r)}else"number"==typeof e?(n=new Date).setTime(e):e.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)?(n=new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" "))):(e.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),(n=new Date).setTime(Date.parse(e)));return n},t.strftime=function(e,n,i){i=this.lookup("date",i);var a=t.meridian();if(i||(i={}),i=this.prepareOptions(i,p),isNaN(e.getTime()))throw new Error("I18n.strftime() requires a valid date object, but received an invalid date.");var o=e.getDay(),s=e.getDate(),l=e.getFullYear(),c=e.getMonth()+1,u=e.getHours(),d=u,h=u>11?1:0,f=e.getSeconds(),m=e.getMinutes(),g=e.getTimezoneOffset(),v=Math.floor(Math.abs(g/60)),b=Math.abs(g)-60*v,y=(g>0?"-":"+")+(v.toString().length<2?"0"+v:v)+(b.toString().length<2?"0"+b:b);return d>12?d-=12:0===d&&(d=12),n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace("%a",i.abbr_day_names[o])).replace("%A",i.day_names[o])).replace("%b",i.abbr_month_names[c])).replace("%B",i.month_names[c])).replace("%d",r(s))).replace("%e",s)).replace("%-d",s)).replace("%H",r(u))).replace("%-H",u)).replace("%k",u)).replace("%I",r(d))).replace("%-I",d)).replace("%l",d)).replace("%m",r(c))).replace("%-m",c)).replace("%M",r(m))).replace("%-M",m)).replace("%p",a[h])).replace("%P",a[h].toLowerCase())).replace("%S",r(f))).replace("%-S",f)).replace("%w",o)).replace("%y",r(l))).replace("%-y",r(l).replace(/^0+/,""))).replace("%Y",l)).replace("%z",y)).replace("%Z",y)},t.toTime=function(e,t,n){var r=this.parseDate(t),i=this.lookup(e,n);if(null==r)return r;var a=r.toString();return a.match(/invalid/i)?a:i?this.strftime(r,i,n):a},t.toPercentage=function(e,t){return t=this.prepareOptions(t,this.lookup("number.percentage.format",t),this.lookup("number.format",t),v),this.toNumber(e,t)},t.toHumanSize=function(e,t){for(var n,r,i=e,a=0;i>=1024&&a<4;)i/=1024,a+=1;return 0===a?(n=this.t("number.human.storage_units.units.byte",{count:i}),r=0):(n=this.t("number.human.storage_units.units."+b[a]),r=i-Math.floor(i)==0?0:1),t=this.prepareOptions(t,{unit:n,precision:r,format:"%n%u",delimiter:""}),this.toNumber(i,t)},t.getFullScope=function(e,t){return t=t||{},s(e)&&(e=e.join(this.defaultSeparator)),t.scope&&(e=[t.scope,e].join(this.defaultSeparator)),e},t.extend=function(e,t){return void 0===e&&void 0===t?{}:f(e,t)},t.t=t.translate.bind(t),t.l=t.localize.bind(t),t.p=t.pluralize.bind(t),t}(i)}.call(t,n,t,e))||(e.exports=r)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return H})),n.d(t,"c",(function(){return q})),n.d(t,"d",(function(){return Q}));var r=n(0),i=n.n(r),a=(n(6),i.a.createContext(null));var o=function(e){e()},s={notify:function(){}};function l(){var e=o,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var c=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=l())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}();var u=function(e){var t=e.store,n=e.context,o=e.children,s=Object(r.useMemo)((function(){var e=new c(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),l=Object(r.useMemo)((function(){return t.getState()}),[t]);Object(r.useEffect)((function(){var e=s.subscription;return e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,l]);var u=n||a;return i.a.createElement(u.Provider,{value:s},o)},d=n(55),h=n(87),f=n(159),p=n.n(f),m=n(217),g="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,v=[],b=[null,null];function y(e,t){var n=e[1];return[t.payload,n+1]}function A(e,t,n){g((function(){return e.apply(void 0,t)}),n)}function _(e,t,n,r,i,a,o){e.current=r,t.current=i,n.current=!1,a.current&&(a.current=null,o())}function w(e,t,n,r,i,a,o,s,l,c){if(e){var u=!1,d=null,h=function(){if(!u){var e,n,h=t.getState();try{e=r(h,i.current)}catch(e){n=e,d=e}n||(d=null),e===a.current?o.current||l():(a.current=e,s.current=e,o.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=h,n.trySubscribe(),h();return function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var E=function(){return[null,0]};function S(e,t){void 0===t&&(t={});var n=t,o=n.getDisplayName,s=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,l=n.methodName,u=void 0===l?"connectAdvanced":l,f=n.renderCountProp,g=void 0===f?void 0:f,S=n.shouldHandleStateChanges,C=void 0===S||S,T=n.storeKey,k=void 0===T?"store":T,x=(n.withRef,n.forwardRef),O=void 0!==x&&x,I=n.context,M=void 0===I?a:I,P=Object(h.a)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),D=M;return function(t){var n=t.displayName||t.name||"Component",a=s(n),o=Object(d.a)({},P,{getDisplayName:s,methodName:u,renderCountProp:g,shouldHandleStateChanges:C,storeKey:k,displayName:a,wrappedComponentName:n,WrappedComponent:t}),l=P.pure;var f=l?r.useMemo:function(e){return e()};function S(n){var a=Object(r.useMemo)((function(){var e=n.forwardedRef,t=Object(h.a)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),s=a[0],l=a[1],u=a[2],p=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(m.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:D}),[s,D]),g=Object(r.useContext)(p),S=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(g)&&Boolean(g.store);var T=S?n.store:g.store,k=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,o)}(T)}),[T]),x=Object(r.useMemo)((function(){if(!C)return b;var e=new c(T,S?null:g.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[T,S,g]),O=x[0],I=x[1],M=Object(r.useMemo)((function(){return S?g:Object(d.a)({},g,{subscription:O})}),[S,g,O]),P=Object(r.useReducer)(y,v,E),N=P[0][0],L=P[1];if(N&&N.error)throw N.error;var R=Object(r.useRef)(),B=Object(r.useRef)(u),j=Object(r.useRef)(),F=Object(r.useRef)(!1),U=f((function(){return j.current&&u===B.current?j.current:k(T.getState(),u)}),[T,N,u]);A(_,[B,R,F,u,U,j,I]),A(w,[C,T,O,k,B,R,F,j,I,L],[T,O,k]);var H=Object(r.useMemo)((function(){return i.a.createElement(t,Object(d.a)({},U,{ref:l}))}),[l,t,U]);return Object(r.useMemo)((function(){return C?i.a.createElement(p.Provider,{value:M},H):H}),[p,H,M])}var T=l?i.a.memo(S):S;if(T.WrappedComponent=t,T.displayName=a,O){var x=i.a.forwardRef((function(e,t){return i.a.createElement(T,Object(d.a)({},e,{forwardedRef:t}))}));return x.displayName=a,x.WrappedComponent=t,p()(x,t)}return p()(T,t)}}function C(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(C(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!C(e[n[i]],t[n[i]]))return!1;return!0}var k=n(167);function x(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function O(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function I(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=O(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=O(i),i=r(t,n)),i},r}}var M=[function(e){return"function"==typeof e?I(e):void 0},function(e){return e?void 0:x((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?x((function(t){return Object(k.b)(e,t)})):void 0}];var P=[function(e){return"function"==typeof e?I(e):void 0},function(e){return e?void 0:x((function(){return{}}))}];function D(e,t,n){return Object(d.a)({},n,{},e,{},t)}var N=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,a=n.areMergedPropsEqual,o=!1;return function(t,n,s){var l=e(t,n,s);return o?i&&a(l,r)||(r=l):(o=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return D}}];function L(e,t,n,r){return function(i,a){return n(e(i,a),t(r,a),a)}}function R(e,t,n,r,i){var a,o,s,l,c,u=i.areStatesEqual,d=i.areOwnPropsEqual,h=i.areStatePropsEqual,f=!1;function p(i,f){var p,m,g=!d(f,o),v=!u(i,a);return a=i,o=f,g&&v?(s=e(a,o),t.dependsOnOwnProps&&(l=t(r,o)),c=n(s,l,o)):g?(e.dependsOnOwnProps&&(s=e(a,o)),t.dependsOnOwnProps&&(l=t(r,o)),c=n(s,l,o)):v?(p=e(a,o),m=!h(p,s),s=p,m&&(c=n(s,l,o)),c):c}return function(i,u){return f?p(i,u):(s=e(a=i,o=u),l=t(r,o),c=n(s,l,o),f=!0,c)}}function B(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,a=Object(h.a)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,a),s=r(e,a),l=i(e,a);return(a.pure?R:L)(o,s,l,e,a)}function j(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function F(e,t){return e===t}function U(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?S:n,i=t.mapStateToPropsFactories,a=void 0===i?P:i,o=t.mapDispatchToPropsFactories,s=void 0===o?M:o,l=t.mergePropsFactories,c=void 0===l?N:l,u=t.selectorFactory,f=void 0===u?B:u;return function(e,t,n,i){void 0===i&&(i={});var o=i,l=o.pure,u=void 0===l||l,p=o.areStatesEqual,m=void 0===p?F:p,g=o.areOwnPropsEqual,v=void 0===g?T:g,b=o.areStatePropsEqual,y=void 0===b?T:b,A=o.areMergedPropsEqual,_=void 0===A?T:A,w=Object(h.a)(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=j(e,a,"mapStateToProps"),S=j(t,s,"mapDispatchToProps"),C=j(n,c,"mergeProps");return r(f,Object(d.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:S,initMergeProps:C,pure:u,areStatesEqual:m,areOwnPropsEqual:v,areStatePropsEqual:y,areMergedPropsEqual:_},w))}}var H=U();function z(){return Object(r.useContext)(a)}function V(e){void 0===e&&(e=a);var t=e===a?z:function(){return Object(r.useContext)(e)};return function(){return t().store}}var W=V();function G(e){void 0===e&&(e=a);var t=e===a?W:V(e);return function(){return t().dispatch}}var q=G(),Y=function(e,t){return e===t};function K(e){void 0===e&&(e=a);var t=e===a?z:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=Y);var i=t();return function(e,t,n,i){var a,o=Object(r.useReducer)((function(e){return e+1}),0)[1],s=Object(r.useMemo)((function(){return new c(n,i)}),[n,i]),l=Object(r.useRef)(),u=Object(r.useRef)(),d=Object(r.useRef)();try{a=e!==u.current||l.current?e(n.getState()):d.current}catch(e){throw l.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),e}return g((function(){u.current=e,d.current=a,l.current=void 0})),g((function(){function e(){try{var e=u.current(n.getState());if(t(e,d.current))return;d.current=e}catch(e){l.current=e}o({})}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),a}(e,n,i.store,i.subscription)}}var X,Q=K(),$=n(79);X=$.unstable_batchedUpdates,o=X},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"h",(function(){return _})),n.d(t,"e",(function(){return w})),n.d(t,"g",(function(){return S})),n.d(t,"o",(function(){return A})),n.d(t,"l",(function(){return C})),n.d(t,"f",(function(){return E})),n.d(t,"c",(function(){return T})),n.d(t,"i",(function(){return x})),n.d(t,"j",(function(){return O})),n.d(t,"a",(function(){return I})),n.d(t,"k",(function(){return D})),n.d(t,"d",(function(){return M})),n.d(t,"m",(function(){return P})),n.d(t,"p",(function(){return N})),n.d(t,"n",(function(){return k}));var r=n(9),i=n.n(r),a=n(60),o=n.n(a),s=n(277),l=n.n(s),c=n(7),u=n(1),d=n(26),h=n(5),f=n(8),p=n(20),m=!1,g=[],v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;g.forEach((function(n){e?n.reject(e):n.resolve(t)})),g=[]},b=function(e){var t=e.baseURL,n=e.contentType,r=void 0===n?"application/json":n,i=e.noRequestInterceptors,a=l.a.create({baseURL:t,ContentType:r,timeout:6e5});return!i&&a.interceptors.request.use((function(e){return B(e)}),(function(e){return j(e)})),a.interceptors.response.use((function(e){return L(e)}),(function(e){return R(e,a)})),a},y=b({baseURL:u.g.AUTH_SERVICES_ENDPOINT}),A=b({baseURL:u.g.VIDEO_SERVICES_ENDPOINT}),_=b({baseURL:u.g.CONTENT_SERVICES_ENDPOINT,contentType:"multipart/form-data"}),w=b({baseURL:u.g.COGVID_SERVICES_ENDPOINT,contentType:"multipart/form-data"});w.defaults.timeout=1e7;var E=b({baseURL:u.g.COMPOSING_SERVICES_V1,contentType:"multipart/form-data"});E.defaults.timeout=1e7;var S=b({baseURL:u.g.COMPREHENSION_SERVICES_ENDPOINT}),C=b({baseURL:u.g.PRICING_SERVICES_ENDPOINT}),T=b({baseURL:u.g.CART_SERVICES_ENDPOINT}),k=b({baseURL:u.g.CART_SERVICES_ENDPOINT}),x=b({baseURL:u.g.FRIENDSHIP_SERVICES_ENDPOINT}),O=b({baseURL:u.g.NOTIFICATION_SERVICES_ENDPOINT}),I=b({baseURL:u.g.ANALYTICS_SERVICES_ENDPOINT}),M=b({baseURL:u.g.CG_SERVICES_ENDPOINT}),P=b({baseURL:u.g.STORAGE_SERVICES_ENDPOINT}),D=b({baseURL:"",noRequestInterceptors:!0}),N=b({baseURL:u.g.MEETING_SERVICES_ENDPOINT}),L=function(e){return e.status||Promise.reject(e.data.message||"Fetching data failed!"),e.data},R=function(){var e=o()(i.a.mark((function e(t,n){var r,a,o,s,l,b,y,A,_,w;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.response,a=(r=void 0===r?{}:r).status,o=t.config,s=Object(c.get)(t,"response.headers.x-message-info",t.message||"Unknown error"),l=Object(c.get)(t,"response.headers.x-message-code","0"),window.navigator.onLine){e.next=8;break}return u.e.dark(Object(p.b)("message.noConnectionError")),e.abrupt("return",Promise.reject(""));case 8:if((401!==a||"Unauthorized or token expired"!==s)&&403!==a||o._retry){e.next=20;break}if(!(b=u.c.getToken())){e.next=18;break}if(!m){e.next=13;break}return e.abrupt("return",new Promise((function(e,t){g.push({resolve:e,reject:t})})).then((function(e){return o.headers.Authorization="Bearer ".concat(e.access_token),n(o)})));case 13:return o._retry=!0,m=!0,e.abrupt("return",new Promise((function(e,t){d.a.dispatch(f.a.refreshToken(b,(function(t){v(null,t),e(t)}),(function(e){v(e,null),t(e)})))})).then((function(e){return o.headers.Authorization="Bearer ".concat(e.access_token),n(o)})).finally((function(){m=!1})));case 18:return d.a.dispatch({type:h.a.AUTH_LOGOUT}),e.abrupt("return",Promise.reject());case 20:if(![500,501,502,503,504,505].includes(a)){e.next=25;break}return y=t.stack,A=o.url,_=o.baseURL,w=o.method,u.a.appLogging({body:y,errorCode:a,summary:s,details:"".concat(w," - ").concat(_).concat(A)}),e.abrupt("return",Promise.reject(s));case 25:if("Network Error"!==s||t.response){e.next=27;break}return e.abrupt("return",Promise.reject(Object(p.b)("message.serverError")));case 27:if(l!==u.g.ERROR_NOT_ACTIVATED){e.next=29;break}return e.abrupt("return",Promise.reject({errorMessage:s,errorCode:l}));case 29:return e.abrupt("return",Promise.reject(s));case 30:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),B=function(e){var t=(u.c.getToken()||{}).accessToken;return t&&(e.headers.Authorization="Bearer ".concat(t)),e},j=function(e){return Promise.reject(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));class r extends Error{constructor(e,t,n){super(function(e,t){const n=new WeakSet,r=t?` ${JSON.stringify(t,(e,t)=>{if("object"==typeof t&&null!==t){if(n.has(t))return`[object ${t.constructor.name}]`;n.add(t)}return t})}`:"",i=a(e);return e+r+i}(e,n)),this.name="CKEditorError",this.context=t,this.data=n}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const n=new r(e.message,t);throw n.stack=e.stack,n}}function i(e,t){console.warn(...o(e,t))}function a(e){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-${e}`}function o(e,t){const n=a(e);return t?[e,t,n]:[e,n]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s}));n(7);var r=n(16),i=n.n(r),a=n(1005),o=n(1006);i.a.defaultLocale="en",i.a.locale="en",i.a.translations={en:a,vi:o};var s=i.a.t;t.a=i.a},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return St(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=p(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function g(e){var t=f(NaN);return null!=e?h(p(t),e):p(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var v=i.momentProperties=[];function b(e,t){var n,r,i;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=p(t)),s(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)s(i=t[r=v[n]])||(e[r]=i);return e}var y=!1;function A(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function _(e){return e instanceof A||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function E(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=w(t)),n}function S(e,t,n){var r,i=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),o=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&E(e[r])!==E(t[r]))&&o++;return o+a}function C(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return h((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}C(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var k,x={};function O(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),x[e]||(C(t),x[e]=!0)}function I(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e,t){var n,r=h({},e);for(n in t)d(t,n)&&(o(e[n])&&o(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&o(e[n])&&(r[n]=h({},r[n]));return r}function P(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,k=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var D={};function N(e,t){var n=e.toLowerCase();D[n]=D[n+"s"]=D[t]=e}function L(e){return"string"==typeof e?D[e]||D[e.toLowerCase()]:void 0}function R(e){var t,n,r={};for(n in e)d(e,n)&&(t=L(n))&&(r[t]=e[n]);return r}var B={};function j(e,t){B[e]=t}function F(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var U=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,H=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},V={};function W(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(V[e]=i),t&&(V[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(V[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function G(e,t){return e.isValid()?(t=q(t,e.localeData()),z[t]=z[t]||function(e){var t,n,r,i=e.match(U);for(t=0,n=i.length;t<n;t++)V[i[t]]?i[t]=V[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,a="";for(r=0;r<n;r++)a+=I(i[r])?i[r].call(t,e):i[r];return a}}(t),z[t](e)):e.localeData().invalidDate()}function q(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(H.lastIndex=0;n>=0&&H.test(e);)e=e.replace(H,r),H.lastIndex=0,n-=1;return e}var Y=/\d/,K=/\d\d/,X=/\d{3}/,Q=/\d{4}/,$=/[+-]?\d{6}/,J=/\d\d?/,Z=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ie=/\d+/,ae=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ce={};function ue(e,t,n){ce[e]=I(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ce,e)?ce[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=E(e)}),n=0;n<e.length;n++)fe[e[n]]=r}function me(e,t){pe(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function ge(e,t,n){null!=t&&d(fe,e)&&fe[e](t,n._a,n,e)}function ve(e){return be(e)?366:365}function be(e){return e%4==0&&e%100!=0||e%400==0}W("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),W(0,["YY",2],0,(function(){return this.year()%100})),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),N("year","y"),j("year",1),ue("Y",ae),ue("YY",J,K),ue("YYYY",ne,Q),ue("YYYYY",re,$),ue("YYYYYY",re,$),pe(["YYYYY","YYYYYY"],0),pe("YYYY",(function(e,t){t[0]=2===e.length?i.parseTwoDigitYear(e):E(e)})),pe("YY",(function(e,t){t[0]=i.parseTwoDigitYear(e)})),pe("Y",(function(e,t){t[0]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return E(e)+(E(e)>68?1900:2e3)};var ye,Ae=_e("FullYear",!0);function _e(e,t){return function(n){return null!=n?(Ee(this,e,n),i.updateOffset(this,t),this):we(this,e)}}function we(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ee(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&be(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Se(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Se(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?be(e)?29:28:31-r%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},W("M",["MM",2],"Mo",(function(){return this.month()+1})),W("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),W("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),N("month","M"),j("month",8),ue("M",J),ue("MM",J,K),ue("MMM",(function(e,t){return t.monthsShortRegex(e)})),ue("MMMM",(function(e,t){return t.monthsRegex(e)})),pe(["M","MM"],(function(e,t){t[1]=E(e)-1})),pe(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[1]=i:p(n).invalidMonth=e}));var Ce=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ke="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function xe(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,o))?i:null:-1!==(i=ye.call(this._longMonthsParse,o))?i:null:"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,o))?i:-1!==(i=ye.call(this._longMonthsParse,o))?i:null:-1!==(i=ye.call(this._longMonthsParse,o))?i:-1!==(i=ye.call(this._shortMonthsParse,o))?i:null}function Oe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=E(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Se(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ie(e){return null!=e?(Oe(this,e),i.updateOffset(this,!0),this):we(this,"Month")}var Me=le,Pe=le;function De(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),a.sort(e),t=0;t<12;t++)r[t]=he(r[t]),i[t]=he(i[t]);for(t=0;t<24;t++)a[t]=he(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ne(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function Le(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Re(e,t,n){var r=7+t-n;return-(7+Le(e,0,r).getUTCDay()-t)%7+r-1}function Be(e,t,n,r,i){var a,o,s=1+7*(t-1)+(7+n-r)%7+Re(e,r,i);return s<=0?o=ve(a=e-1)+s:s>ve(e)?(a=e+1,o=s-ve(e)):(a=e,o=s),{year:a,dayOfYear:o}}function je(e,t,n){var r,i,a=Re(e.year(),t,n),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?r=o+Fe(i=e.year()-1,t,n):o>Fe(e.year(),t,n)?(r=o-Fe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function Fe(e,t,n){var r=Re(e,t,n),i=Re(e+1,t,n);return(ve(e)-r+i)/7}function Ue(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),j("week",5),j("isoWeek",5),ue("w",J),ue("ww",J,K),ue("W",J),ue("WW",J,K),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=E(e)})),W("d",0,"do","day"),W("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),W("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),W("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),ue("d",J),ue("e",J),ue("E",J),ue("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ue("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ue("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=E(e)}));var He="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function We(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,o))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,o))?i:null:"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,o))?i:-1!==(i=ye.call(this._shortWeekdaysParse,o))?i:-1!==(i=ye.call(this._minWeekdaysParse,o))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,o))?i:-1!==(i=ye.call(this._weekdaysParse,o))?i:-1!==(i=ye.call(this._minWeekdaysParse,o))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,o))?i:-1!==(i=ye.call(this._weekdaysParse,o))?i:-1!==(i=ye.call(this._shortWeekdaysParse,o))?i:null}var Ge=le,qe=le,Ye=le;function Ke(){function e(e,t){return t.length-e.length}var t,n,r,i,a,o=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),l.push(a),c.push(r),c.push(i),c.push(a);for(o.sort(e),s.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)s[t]=he(s[t]),l[t]=he(l[t]),c[t]=he(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Qe(e,t){W(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function $e(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Xe),W("k",["kk",2],0,(function(){return this.hours()||24})),W("hmm",0,0,(function(){return""+Xe.apply(this)+F(this.minutes(),2)})),W("hmmss",0,0,(function(){return""+Xe.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),W("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),W("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),N("hour","h"),j("hour",13),ue("a",$e),ue("A",$e),ue("H",J),ue("h",J),ue("k",J),ue("HH",J,K),ue("hh",J,K),ue("kk",J,K),ue("hmm",Z),ue("hmmss",ee),ue("Hmm",Z),ue("Hmmss",ee),pe(["H","HH"],3),pe(["k","kk"],(function(e,t,n){var r=E(e);t[3]=24===r?0:r})),pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),pe(["h","hh"],(function(e,t,n){t[3]=E(e),p(n).bigHour=!0})),pe("hmm",(function(e,t,n){var r=e.length-2;t[3]=E(e.substr(0,r)),t[4]=E(e.substr(r)),p(n).bigHour=!0})),pe("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=E(e.substr(0,r)),t[4]=E(e.substr(r,2)),t[5]=E(e.substr(i)),p(n).bigHour=!0})),pe("Hmm",(function(e,t,n){var r=e.length-2;t[3]=E(e.substr(0,r)),t[4]=E(e.substr(r))})),pe("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=E(e.substr(0,r)),t[4]=E(e.substr(r,2)),t[5]=E(e.substr(i))}));var Je,Ze=_e("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:ke,week:{dow:0,doy:6},weekdays:He,weekdaysMin:Ve,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function it(t){var r=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{r=Je._abbr,n(1087)("./"+t),at(r)}catch(e){}return tt[t]}function at(e,t){var n;return e&&((n=s(t)?st(e):ot(e,t))?Je=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Je._abbr}function ot(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=it(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new P(M(r,t)),nt[e]&&nt[e].forEach((function(e){ot(e.name,e.config)})),at(e),tt[e]}return delete tt[e],null}function st(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Je;if(!a(e)){if(t=it(e))return t;e=[e]}return function(e){for(var t,n,r,i,a=0;a<e.length;){for(t=(i=rt(e[a]).split("-")).length,n=(n=rt(e[a+1]))?n.split("-"):null;t>0;){if(r=it(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&S(i,n,!0)>=t-1)break;t--}a++}return Je}(e)}function lt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Se(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}function ct(e,t,n){return null!=e?e:null!=t?t:n}function ut(e){var t,n,r,a,o,s=[];if(!e._d){for(r=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,i,a,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)a=1,o=4,n=ct(t.GG,e._a[0],je(Ct(),1,4).year),r=ct(t.W,1),((i=ct(t.E,1))<1||i>7)&&(l=!0);else{a=e._locale._week.dow,o=e._locale._week.doy;var c=je(Ct(),a,o);n=ct(t.gg,e._a[0],c.year),r=ct(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a}r<1||r>Fe(n,a,o)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=Be(n,r,i,a,o),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=ct(e._a[0],r[0]),(e._dayOfYear>ve(o)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Le(o,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Le:Ne).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(p(e).weekdayMismatch=!0)}}var dt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,r,i,a,o,s=e._i,l=dt.exec(s)||ht.exec(s);if(l){for(p(e).iso=!0,t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(l[1])){i=pt[t][0],r=!1!==pt[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(l[3])){a=(l[2]||" ")+mt[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!ft.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=i+(a||"")+(o||""),wt(e)}else e._isValid=!1}var bt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function yt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var At={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function _t(e){var t,n,r,i,a,o,s,l=bt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var c=(t=l[4],n=l[3],r=l[2],i=l[5],a=l[6],o=l[7],s=[yt(t),ke.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(a,10)],o&&s.push(parseInt(o,10)),s);if(!function(e,t,n){return!e||ze.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],c,e))return;e._a=c,e._tzm=function(e,t,n){if(e)return At[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(l[8],l[9],l[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function wt(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],p(e).empty=!0;var t,n,r,a,o,s=""+e._i,l=s.length,c=0;for(r=q(e._f,e._locale).match(U)||[],t=0;t<r.length;t++)a=r[t],(n=(s.match(de(a,e))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&p(e).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),c+=n.length),V[a]?(n?p(e).empty=!1:p(e).unusedTokens.push(a),ge(a,n,e)):e._strict&&!n&&p(e).unusedTokens.push(a);p(e).charsLeftOver=l-c,s.length>0&&p(e).unusedInput.push(s),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),ut(e),lt(e)}else _t(e);else vt(e)}function Et(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),_(t)?new A(lt(t)):(c(t)?e._d=t:a(n)?function(e){var t,n,r,i,a;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)a=0,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],wt(t),m(t)&&(a+=p(t).charsLeftOver,a+=10*p(t).unusedTokens.length,p(t).score=a,(null==r||a<r)&&(r=a,n=t));h(e,n||t)}(e):n?wt(e):function(e){var t=e._i;s(t)?e._d=new Date(i.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=gt.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,_t(e),!1===e._isValid&&(delete e._isValid,i.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=u(t.slice(0),(function(e){return parseInt(e,10)})),ut(e)):o(t)?function(e){if(!e._d){var t=R(e._i);e._a=u([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),ut(e)}}(e):l(t)?e._d=new Date(t):i.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function St(e,t,n,r,i){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||a(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=i,l._l=n,l._i=e,l._f=t,l._strict=r,(s=new A(lt(Et(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ct(e,t,n,r){return St(e,t,n,r,!1)}i.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Tt=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),kt=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}));function xt(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Ot=["year","quarter","month","week","day","hour","minute","second","millisecond"];function It(e){var t=R(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ye.call(Ot,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Ot.length;++r)if(e[Ot[r]]){if(n)return!1;parseFloat(e[Ot[r]])!==E(e[Ot[r]])&&(n=!0)}return!0}(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=st(),this._bubble()}function Mt(e){return e instanceof It}function Pt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Dt(e,t){W(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}Dt("Z",":"),Dt("ZZ",""),ue("Z",se),ue("ZZ",se),pe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Lt(se,e)}));var Nt=/([\+\-]|\d\d)/gi;function Lt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Nt)||["-",0,0],i=60*r[1]+E(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Rt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(_(e)||c(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Ct(e).local()}function Bt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function jt(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ft=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ut=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ht(e,t){var n,r,i,a,o,s,c=e,u=null;return Mt(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(c={},t?c[t]=e:c.milliseconds=e):(u=Ft.exec(e))?(n="-"===u[1]?-1:1,c={y:0,d:E(u[2])*n,h:E(u[3])*n,m:E(u[4])*n,s:E(u[5])*n,ms:E(Pt(1e3*u[6]))*n}):(u=Ut.exec(e))?(n="-"===u[1]?-1:1,c={y:zt(u[2],n),M:zt(u[3],n),w:zt(u[4],n),d:zt(u[5],n),h:zt(u[6],n),m:zt(u[7],n),s:zt(u[8],n)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(a=Ct(c.from),o=Ct(c.to),i=a.isValid()&&o.isValid()?(o=Rt(o,a),a.isBefore(o)?s=Vt(a,o):((s=Vt(o,a)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(c={}).ms=i.milliseconds,c.M=i.months),r=new It(c),Mt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Vt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Wt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Gt(this,Ht(n="string"==typeof n?+n:n,r),e),this}}function Gt(e,t,n,r){var a=t._milliseconds,o=Pt(t._days),s=Pt(t._months);e.isValid()&&(r=null==r||r,s&&Oe(e,we(e,"Month")+s*n),o&&Ee(e,"Date",we(e,"Date")+o*n),a&&e._d.setTime(e._d.valueOf()+a*n),r&&i.updateOffset(e,o||s))}Ht.fn=It.prototype,Ht.invalid=function(){return Ht(NaN)};var qt=Wt(1,"add"),Yt=Wt(-1,"subtract");function Kt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Xt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=st(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qt=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function $t(){return this._locale}function Jt(e,t){return(e%t+t)%t}function Zt(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function en(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tn(e,t){W(0,[e,e.length],0,t)}function nn(e,t,n,r,i){var a;return null==e?je(this,r,i).year:(t>(a=Fe(e,r,i))&&(t=a),rn.call(this,e,t,n,r,i))}function rn(e,t,n,r,i){var a=Be(e,t,n,r,i),o=Le(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}W(0,["gg",2],0,(function(){return this.weekYear()%100})),W(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),ue("G",ae),ue("g",ae),ue("GG",J,K),ue("gg",J,K),ue("GGGG",ne,Q),ue("gggg",ne,Q),ue("GGGGG",re,$),ue("ggggg",re,$),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=E(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),W("Q",0,"Qo","quarter"),N("quarter","Q"),j("quarter",7),ue("Q",Y),pe("Q",(function(e,t){t[1]=3*(E(e)-1)})),W("D",["DD",2],"Do","date"),N("date","D"),j("date",9),ue("D",J),ue("DD",J,K),ue("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],2),pe("Do",(function(e,t){t[2]=E(e.match(J)[0])}));var an=_e("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),j("dayOfYear",4),ue("DDD",te),ue("DDDD",X),pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=E(e)})),W("m",["mm",2],0,"minute"),N("minute","m"),j("minute",14),ue("m",J),ue("mm",J,K),pe(["m","mm"],4);var on=_e("Minutes",!1);W("s",["ss",2],0,"second"),N("second","s"),j("second",15),ue("s",J),ue("ss",J,K),pe(["s","ss"],5);var sn,ln=_e("Seconds",!1);for(W("S",0,0,(function(){return~~(this.millisecond()/100)})),W(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),W(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),W(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),W(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),W(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),W(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),N("millisecond","ms"),j("millisecond",16),ue("S",te,Y),ue("SS",te,K),ue("SSS",te,X),sn="SSSS";sn.length<=9;sn+="S")ue(sn,ie);function cn(e,t){t[6]=E(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")pe(sn,cn);var un=_e("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var dn=A.prototype;function hn(e){return e}dn.add=qt,dn.calendar=function(e,t){var n=e||Ct(),r=Rt(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=t&&(I(t[a])?t[a].call(this,n):t[a]);return this.format(o||this.localeData().calendar(a,this,Ct(n)))},dn.clone=function(){return new A(this)},dn.diff=function(e,t,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Rt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=L(t)){case"year":a=Kt(this,r)/12;break;case"month":a=Kt(this,r);break;case"quarter":a=Kt(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:w(a)},dn.endOf=function(e){var t;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Zt;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Jt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Jt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Jt(t,1e3)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},dn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Ct(e).isValid())?Ht({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(Ct(),e)},dn.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Ct(e).isValid())?Ht({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(Ct(),e)},dn.get=function(e){return I(this[e=L(e)])?this[e]():this},dn.invalidAt=function(){return p(this).overflow},dn.isAfter=function(e,t){var n=_(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},dn.isBefore=function(e,t){var n=_(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},dn.isBetween=function(e,t,n,r){var i=_(e)?e:Ct(e),a=_(t)?t:Ct(t);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},dn.isSame=function(e,t){var n,r=_(e)?e:Ct(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},dn.isValid=function(){return m(this)},dn.lang=Qt,dn.locale=Xt,dn.localeData=$t,dn.max=kt,dn.min=Tt,dn.parsingFlags=function(){return h({},p(this))},dn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:B[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=R(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(I(this[e=L(e)]))return this[e](t);return this},dn.startOf=function(e){var t;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Zt;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Jt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Jt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Jt(t,1e3)}return this._d.setTime(t),i.updateOffset(this,!0),this},dn.subtract=Yt,dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},dn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},dn.toDate=function(){return new Date(this.valueOf())},dn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):I(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=Ae,dn.isLeapYear=function(){return be(this.year())},dn.weekYear=function(e){return nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=Ie,dn.daysInMonth=function(){return Se(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},dn.isoWeek=dn.isoWeeks=function(e){var t=je(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},dn.date=an,dn.day=dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},dn.hour=dn.hours=Ze,dn.minute=dn.minutes=on,dn.second=dn.seconds=ln,dn.millisecond=dn.milliseconds=un,dn.utcOffset=function(e,t,n){var r,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Lt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Bt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?Gt(this,Ht(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Bt(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Bt(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Lt(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=jt,dn.isUTC=jt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=T("dates accessor is deprecated. Use date instead.",an),dn.months=T("months accessor is deprecated. Use month instead",Ie),dn.years=T("years accessor is deprecated. Use year instead",Ae),dn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),dn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(b(e,this),(e=Et(e))._a){var t=e._isUTC?f(e._a):Ct(e._a);this._isDSTShifted=this.isValid()&&S(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var fn=P.prototype;function pn(e,t,n,r){var i=st(),a=f().set(r,t);return i[n](a,e)}function mn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=pn(e,r,n,"month");return i}function gn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,a=st(),o=e?a._week.dow:0;if(null!=n)return pn(t,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=pn(t,(i+o)%7,r,"day");return s}fn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return I(r)?r.call(t,n):r},fn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},fn.invalidDate=function(){return this._invalidDate},fn.ordinal=function(e){return this._ordinal.replace("%d",e)},fn.preparse=hn,fn.postformat=hn,fn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return I(i)?i(e,t,n,r):i.replace(/%d/i,e)},fn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return I(n)?n(t):n.replace(/%s/i,t)},fn.set=function(e){var t,n;for(n in e)I(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},fn.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ce).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},fn.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ce.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},fn.monthsParse=function(e,t,n){var r,i,a;if(this._monthsParseExact)return xe.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},fn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||De.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Pe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},fn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||De.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Me),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},fn.week=function(e){return je(e,this._week.dow,this._week.doy).week},fn.firstDayOfYear=function(){return this._week.doy},fn.firstDayOfWeek=function(){return this._week.dow},fn.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ue(n,this._week.dow):e?n[e.day()]:n},fn.weekdaysMin=function(e){return!0===e?Ue(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},fn.weekdaysShort=function(e){return!0===e?Ue(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},fn.weekdaysParse=function(e,t,n){var r,i,a;if(this._weekdaysParseExact)return We.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},fn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},fn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},fn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ye),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},fn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},fn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},at("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===E(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=T("moment.lang is deprecated. Use moment.locale instead.",at),i.langData=T("moment.langData is deprecated. Use moment.localeData instead.",st);var vn=Math.abs;function bn(e,t,n,r){var i=Ht(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function yn(e){return e<0?Math.floor(e):Math.ceil(e)}function An(e){return 4800*e/146097}function _n(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var En=wn("ms"),Sn=wn("s"),Cn=wn("m"),Tn=wn("h"),kn=wn("d"),xn=wn("w"),On=wn("M"),In=wn("Q"),Mn=wn("y");function Pn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Dn=Pn("milliseconds"),Nn=Pn("seconds"),Ln=Pn("minutes"),Rn=Pn("hours"),Bn=Pn("days"),jn=Pn("months"),Fn=Pn("years"),Un=Math.round,Hn={ss:44,s:45,m:45,h:22,d:26,M:11};function zn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var Vn=Math.abs;function Wn(e){return(e>0)-(e<0)||+e}function Gn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Vn(this._milliseconds)/1e3,r=Vn(this._days),i=Vn(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var a=w(i/12),o=i%=12,s=r,l=t,c=e,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",f=Wn(this._months)!==Wn(d)?"-":"",p=Wn(this._days)!==Wn(d)?"-":"",m=Wn(this._milliseconds)!==Wn(d)?"-":"";return h+"P"+(a?f+a+"Y":"")+(o?f+o+"M":"")+(s?p+s+"D":"")+(l||c||u?"T":"")+(l?m+l+"H":"")+(c?m+c+"M":"")+(u?m+u+"S":"")}var qn=It.prototype;return qn.isValid=function(){return this._isValid},qn.abs=function(){var e=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),e.milliseconds=vn(e.milliseconds),e.seconds=vn(e.seconds),e.minutes=vn(e.minutes),e.hours=vn(e.hours),e.months=vn(e.months),e.years=vn(e.years),this},qn.add=function(e,t){return bn(this,e,t,1)},qn.subtract=function(e,t){return bn(this,e,t,-1)},qn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=L(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+An(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(_n(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},qn.asMilliseconds=En,qn.asSeconds=Sn,qn.asMinutes=Cn,qn.asHours=Tn,qn.asDays=kn,qn.asWeeks=xn,qn.asMonths=On,qn.asQuarters=In,qn.asYears=Mn,qn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*E(this._months/12):NaN},qn._bubble=function(){var e,t,n,r,i,a=this._milliseconds,o=this._days,s=this._months,l=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*yn(_n(s)+o),o=0,s=0),l.milliseconds=a%1e3,e=w(a/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,n=w(t/60),l.hours=n%24,o+=w(n/24),i=w(An(o)),s+=i,o-=yn(_n(i)),r=w(s/12),s%=12,l.days=o,l.months=s,l.years=r,this},qn.clone=function(){return Ht(this)},qn.get=function(e){return e=L(e),this.isValid()?this[e+"s"]():NaN},qn.milliseconds=Dn,qn.seconds=Nn,qn.minutes=Ln,qn.hours=Rn,qn.days=Bn,qn.weeks=function(){return w(this.days()/7)},qn.months=jn,qn.years=Fn,qn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Ht(e).abs(),i=Un(r.as("s")),a=Un(r.as("m")),o=Un(r.as("h")),s=Un(r.as("d")),l=Un(r.as("M")),c=Un(r.as("y")),u=i<=Hn.ss&&["s",i]||i<Hn.s&&["ss",i]||a<=1&&["m"]||a<Hn.m&&["mm",a]||o<=1&&["h"]||o<Hn.h&&["hh",o]||s<=1&&["d"]||s<Hn.d&&["dd",s]||l<=1&&["M"]||l<Hn.M&&["MM",l]||c<=1&&["y"]||["yy",c];return u[2]=t,u[3]=+e>0,u[4]=n,zn.apply(null,u)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},qn.toISOString=Gn,qn.toString=Gn,qn.toJSON=Gn,qn.locale=Xt,qn.localeData=$t,qn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gn),qn.lang=Qt,W("X",0,0,"unix"),W("x",0,0,"valueOf"),ue("x",ae),ue("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),pe("x",(function(e,t,n){n._d=new Date(E(e))})),i.version="2.24.0",function(e){t=e}(Ct),i.fn=dn,i.min=function(){var e=[].slice.call(arguments,0);return xt("isBefore",e)},i.max=function(){var e=[].slice.call(arguments,0);return xt("isAfter",e)},i.now=function(){return Date.now?Date.now():+new Date},i.utc=f,i.unix=function(e){return Ct(1e3*e)},i.months=function(e,t){return mn(e,t,"months")},i.isDate=c,i.locale=at,i.invalid=g,i.duration=Ht,i.isMoment=_,i.weekdays=function(e,t,n){return gn(e,t,n,"weekdays")},i.parseZone=function(){return Ct.apply(null,arguments).parseZone()},i.localeData=st,i.isDuration=Mt,i.monthsShort=function(e,t){return mn(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return gn(e,t,n,"weekdaysMin")},i.defineLocale=ot,i.updateLocale=function(e,t){if(null!=t){var n,r,i=et;null!=(r=it(e))&&(i=r._config),t=M(i,t),(n=new P(t)).parentLocale=tt[e],tt[e]=n,at(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},i.locales=function(){return k(tt)},i.weekdaysShort=function(e,t,n){return gn(e,t,n,"weekdaysShort")},i.normalizeUnits=L,i.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Hn[e]&&(void 0===t?Hn[e]:(Hn[e]=t,"s"===e&&(Hn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=dn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(256)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return qe})),n.d(t,"d",(function(){return ze})),n.d(t,"c",(function(){return Ve})),n.d(t,"e",(function(){return Ge})),n.d(t,"b",(function(){return We}));var r=n.p+"fonts/cf5ecfec01d6b15b0c541c614ffa40fa.svg",i=n.p+"fonts/6127f70c439352bb0c3530e35e54aee5.svg",a=n.p+"images/no-avatar.png",o=n.p+"fonts/1bd8a7e852609c9c3593f85252863c27.svg",s=n.p+"fonts/22821f9c3839b381ef798548488b4bbe.svg",l=n.p+"fonts/47e99ad4d437213560f733484c6c3991.svg",c=n.p+"fonts/64846746a81008664d7b59ac4847841b.svg",u=n.p+"fonts/9a53e0f8f1e2050d1847d2764b86a096.svg",d=n.p+"fonts/b5cc2ae3f23ff5bfed1311520a656b51.svg",h=n.p+"fonts/c459ef35fb4d1e82d8c23b5326cc3c35.svg",f=n.p+"fonts/29ffdec30545d706332e6accf7b83f14.svg",p=n.p+"fonts/f90e80d96b6a95b0350e5501edf6d111.svg",m=n.p+"fonts/409b31113d2fa8a680e2468d64c9e10c.svg",g=n.p+"fonts/c8c761ce4bf9f93cbc2db5015f4593c4.svg",v=n.p+"fonts/8df5d3b97daf5693333c5b4e7bd66eb9.svg",b=n.p+"fonts/584a4fd000b7e89153491672f5c5302d.svg",y=n.p+"fonts/b23da223f46de77e9c573a7de76fae59.svg",A=n.p+"fonts/25af03f2f634d55acb1eddf88d16da86.svg",_=n.p+"fonts/5e5a9d73e9af19e0adda35bdbf6f991e.svg",w=n.p+"images/defaultCoverImage.png",E=n.p+"fonts/f8c38ae1f47f12a6505d2b208bbddcd9.svg",S=n.p+"fonts/4296a75558f52fdc05b04d1914041936.svg",C=n.p+"fonts/b8a253cc6e41087d99beae5b6aff6542.svg",T=n.p+"fonts/6f1f9f1b5507b0851aeb292864a1663c.svg",k=n.p+"images/defaultGroupAvatar.png",x=n.p+"images/mark-round.png",O=n.p+"fonts/3e8bfe812fd24a276bb1a8ed19a9bb6b.svg",I=n.p+"fonts/9dd51dcf5b34c46b9d8b6fe236c753db.svg",M=n.p+"fonts/1c31407a4ed06221b912b7a3ef63bf85.svg",P=n.p+"fonts/4dd4bb4bd32cab648ccf886382b33782.svg",D=n.p+"images/no-image.png",N=n.p+"fonts/b77c16b044f1919ff9015d5e7371a794.svg",L=n.p+"fonts/0a8bf63fbdf6c47eadbe88efade963f4.svg",R=n.p+"fonts/85648b9eff09f9ec9b255a3928768244.svg",B=n.p+"fonts/894daefb5abd66a29898e9d048704de5.svg",j=n.p+"fonts/f6ee0e67fc95ca3a183f4cce635f97ea.svg",F=n.p+"fonts/e84c22bb0d1476f7afe95a62413c80ef.svg",U=n.p+"fonts/10223c19753a0e4eaaa170c96f022853.svg",H=n.p+"fonts/23bc40d62ef24a2f1ab8c591062e7310.svg",z=n.p+"fonts/5b56aa979ae67ed8fcecc4e713869727.svg",V=n.p+"fonts/ecf9d42c03f09cfd815ca671ff639f25.svg",W=n.p+"fonts/af62d2e671013a6cf2bcb6bf95c2ca44.svg",G=n.p+"fonts/3209e925a61928cf33d5483a4a707921.svg",q=n.p+"images/subscriber.png",Y=n.p+"images/subscription.png",K=n.p+"images/setting.png",X=n.p+"fonts/3554f38eee058439231bcd8a434e0ef5.svg",Q=n.p+"fonts/cc88332956f640bf149f9b09c92bd373.svg",$=n.p+"images/double-arrow.png",J=n.p+"images/credit-card.png",Z=n.p+"images/set-default.png",ee=n.p+"fonts/2168a4ff93fc199ce337e3a55f9242c3.svg",te=n.p+"fonts/685adba73026fecb65abbf82cd7be91a.svg",ne=n.p+"images/purchased.png",re=n.p+"fonts/df00d3a4522b849f6725fd2c9f7788ed.svg",ie=n.p+"fonts/e3dd3b00edd461ba18d3bb562cf43e89.svg",ae=n.p+"fonts/328008406f6a361eb219df986e712ba2.svg",oe=n.p+"images/upload-white.png",se=n.p+"fonts/45d0b800c4c542b2344cef78533ab469.svg",le=n.p+"fonts/6f062ab9fa80f00f90c3161c3b258c83.svg",ce=n.p+"images/keyword-1.png",ue=n.p+"images/keyword-2.png",de=n.p+"images/store.png",he=n.p+"images/back.png",fe=n.p+"images/back-red.png",pe=n.p+"images/back-white.png",me=n.p+"images/list.png",ge=n.p+"images/change-video.png",ve=n.p+"images/prev-outline.png",be=n.p+"images/prev-fill.png",ye=n.p+"images/next-outline.png",Ae=n.p+"images/next-fill.png",_e=n.p+"images/plane.png",we=n.p+"images/toc.png",Ee=n.p+"fonts/b7eccc748ae97407f62fdd11b5c53c07.svg",Se=n.p+"images/store-request.png",Ce=n.p+"images/2PiR-border.png",Te=n.p+"images/home.png",ke=n.p+"images/home-red.png",xe=n.p+"images/toc-vertical.png",Oe=n.p+"fonts/7759f629b5f141b153b8ac07424a8bb6.svg",Ie=n.p+"fonts/8d041c5850fe309a739dcdbc65a9de7e.svg",Me=n.p+"images/download.png",Pe=n.p+"images/print.png",De=n.p+"images/heart.png",Ne=n.p+"fonts/29e4a7c43ff9aecc7b6fc01d7f9a1abf.svg",Le=n.p+"fonts/dcafbb1ae373580e04fc75a52928dc40.svg",Re=n(31),Be=n.n(Re),je=n(40),Fe=n.n(je),Ue=n(0),He=n.n(Ue),ze=function(e){var t=e.className,n=e.color,r=void 0===n?"#ed0e0c":n,i=e.size,a=void 0===i?24:i,o=Fe()(e,["className","color","size"]);return He.a.createElement("svg",Be()({xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 512 512",className:t,fill:r,width:a,height:a},o),He.a.createElement("g",null,He.a.createElement("path",{d:"M128,96v320l256-160L128,96L128,96z"})))},Ve=function(e){var t=e.className,n=e.color,r=void 0===n?"#ed0e0c":n,i=e.size,a=void 0===i?24:i,o=Fe()(e,["className","color","size"]);return He.a.createElement("svg",Be()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",className:t,fill:r,width:a,height:a},o),He.a.createElement("path",{d:"M12 38h8V10h-8v28zm16-28v28h8V10h-8z"}),He.a.createElement("path",{d:"M0 0h48v48H0z",fill:"none"}))},We=function(e){var t=e.className,n=e.color,r=void 0===n?"#ed0e0c":n,i=e.size,a=void 0===i?24:i;return He.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",className:t,fill:r,width:a,height:a},He.a.createElement("g",{id:"background"},He.a.createElement("rect",{fill:"none",height:"32",width:"32"})),He.a.createElement("g",{id:"chapter_x5F_next"},He.a.createElement("path",{d:"M0,28l12-12.001L0,4V28z M14,28l12-12.001L14,4V28z M28,4v24h4V4H28z"})))},Ge=function(e){var t=e.className,n=e.color,r=void 0===n?"#ed0e0c":n,i=e.size,a=void 0===i?24:i;return He.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 32 32",version:"1.1",viewBox:"0 0 32 32",className:t,fill:r,width:a,height:a},He.a.createElement("g",{id:"background"},He.a.createElement("rect",{fill:"none",height:"32",width:"32"})),He.a.createElement("g",{id:"chapter_x5F_previous"},He.a.createElement("path",{d:"M20,15.999L32,28V4L20,15.999z M18,28V4L6,15.999L18,28z M0,28h4V4H0V28z"})))},qe={logoWhite:r,logoBlue:i,noAvatar:a,cogvidIcon:o,unknowFile:s,srtIcon:l,folderIcon:c,pdfIcon:u,loadingFailedIcon:d,imageIcon:h,emptyGalleryIcon:f,newVideoIcon:p,addTemplateIcon:m,emptyVideoIcon:g,flagUS:v,flagVN:b,globe:y,stripeIcon:A,paypalIcon:_,defaultCoverImage:w,purchaseLocked:E,peopleImage:S,groupImage:C,templateChapter:T,defaultGroupAvatar:k,markRound:x,iconPlayDocument:O,basicLevelIcon:I,advancedLevelIcon:M,masterLevelIcon:P,noImage:D,resourceIcon:N,uploadIcon:R,addIcon:L,ratingIcon:B,viewRatingsIcon:j,editIcon:F,pendingIcon:U,rejectedIcon:H,reviewIcon:z,downloadIcon:V,sortingIcon:W,toTopIcon:G,subscriber:q,subscription:Y,storeSetting:K,scrollVertical:X,scrollVerticalBlue:Q,doubleArrow:$,creditCard:J,setDefault:Z,topics:ee,shared_link:te,purchased:ne,loop:re,loopNon:ie,addWhiteIcon:ae,uploadWhiteIcon:oe,sortingWhiteIcon:se,storeSettingWhiteIcon:le,keyword1:ce,keyword2:ue,store:de,back:he,backRed:fe,backWhite:pe,list:me,changeVideo:ge,prevOutline:ve,prevFill:be,nextOutline:ye,nextFill:Ae,plane:_e,toc:we,likeWhite:Ee,storeRequest:Se,logo2pir:Ce,home:Te,homeRed:ke,tocVertical:xe,redSphere:Oe,shoppingCart:Ie,download:Me,print:Pe,star:Ne,videoCourse:Le,heart:De}},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(68))},function(e,t,n){var r=n(1066),i=n(582),a=n(1067);e.exports=function(e){return r(e)||i(e)||a()}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",leftColumn:"leftColumn--13ZZ8",listVideoContent:"listVideoContent--3Kkxc",formTitle:"formTitle--K0uiz",control:"control--20Jne",label:"label--1x0Vv",sort:"sort--3IjMu",sortIcon:"sortIcon--3vlt7",addSubtitleBtn:"addSubtitleBtn--3M3Z1",deleteBorder:"deleteBorder--2LIXd",deleteBorderSubtitle:"deleteBorderSubtitle--3gBPW",disabled:"disabled---DwcU",controlItem:"controlItem--1Qpqe",multiSelect:"multiSelect--25MFC",withValidation:"withValidation--2xv75",rightColumn:"rightColumn--dcCwO",reviewVideoRightColumn:"reviewVideoRightColumn--wlcAi",description:"description--3q5fI",modalBody:"modalBody--1t3sG",bodyRow:"bodyRow--3sS6B",transcribeLabel:"transcribeLabel--2ga5y",shadowBorder:"shadowBorder---NHyG",browseAreaWrapper:"browseAreaWrapper--1CRcJ",uploadBtnsWrapper:"uploadBtnsWrapper--1TijR",uploadBtn:"uploadBtn--Uc7FC",uploadArea:"uploadArea--30JOG",blurBg:"blurBg--En_4L",loadingIcon:"loadingIcon--x-OdS",loadRawVideosFailedWrapper:"loadRawVideosFailedWrapper--3-gzv",retry:"retry--lQEQG",userGuideText:"userGuideText--G8wVS",browseBtnWrapper:"browseBtnWrapper--3mBO2",dropDownItem:"dropDownItem--24Rt5",browseBtn:"browseBtn--oh5R7",ccvItemList:"ccvItemList--1uYNn",ccvItemListDragDrop:"ccvItemListDragDrop--2NDd4",headerWrapper:"headerWrapper--3g6Sr",headerInnerWrapper:"headerInnerWrapper--Y-ZFZ",header:"header--3282_",fileHeader:"fileHeader--132ET",fileColumn:"fileColumn--3Ba9h",fileColumnWidthAuto:"fileColumnWidthAuto--2zbrV",galleryFileColumn:"galleryFileColumn--38BZ1",fullPathText:"fullPathText--2GA7B",withFilePath:"withFilePath--4hlzs",wideFileColumn:"wideFileColumn--rbJAc",mainText:"mainText--17Bk3",chapterColumn:"chapterColumn--2d4ls",dateColumn:"dateColumn--2U68K",sizeColumn:"sizeColumn--27Xow",transcriptColumn:"transcriptColumn--PfxBN",actionColumn:"actionColumn--12e-D",orderColumn:"orderColumn--2Kk88",orderButtonsWrap:"orderButtonsWrap--1wGBN",galleryWideFileColumn:"galleryWideFileColumn--1yA7x",galleryDateColumn:"galleryDateColumn--17GV4",gallerySizeColumn:"gallerySizeColumn--wXt7P",galleryActionColumn:"galleryActionColumn--2hNI6",galleryOrderColumn:"galleryOrderColumn--1UPMu",rowBg:"rowBg--3mjZ7",disableLayer:"disableLayer--OPDF1",cateValidator:"cateValidator--2HkuL",dragAndDropContainer:"dragAndDropContainer--2rMOs",circleBg:"circleBg--1v1t7",default:"default--1ZWZF",folderIcon:"folderIcon--3yY59",dndTextWrapper:"dndTextWrapper--17zWC",dndSecondLine:"dndSecondLine--3CQBN",strikeThrough:"strikeThrough--2M_60",noBorder:"noBorder--3kwng",textGroupWrapper:"textGroupWrapper--JfmRn",textLabel:"textLabel--OPTe0",textValue:"textValue--3gGz_",tableWrapper:"tableWrapper--1Yr1A",tableHeader:"tableHeader--RMqiH",itemWrapper:"itemWrapper--2mfVq",wrapperBorder:"wrapperBorder--25_0Z",tableItem:"tableItem--3VZec",reviewDeletedChapter:"reviewDeletedChapter--3nAuK",lineThrough:"lineThrough--2zctW",footerBtn:"footerBtn--2LTIj",infoIcon:"infoIcon--36fhG",reviewInfoWrapper:"reviewInfoWrapper--aHDEv",chapterCountInput:"chapterCountInput--2Z_In",transcriptCheckBox:"transcriptCheckBox--23zx5",transcriptedBadge:"transcriptedBadge--YJrTL",transcriptedTextLabel:"transcriptedTextLabel--35flp",courseInput:"courseInput--2U4nN",addNewCourseModalBody:"addNewCourseModalBody--2amOt",addCourseCode:"addCourseCode--1TKZR",addCourseTitle:"addCourseTitle--IThx0",addNewCourseWrap:"addNewCourseWrap--19s_k",addNewCourseOption:"addNewCourseOption--1XNX7",addCourseBtn:"addCourseBtn--1VDGx",circleWrapper:"circleWrapper--79pBr",emptyGalleryTitle:"emptyGalleryTitle--KLpIV",addNewCourseDialog:"addNewCourseDialog--1vM2V",courseTotalDisplay:"courseTotalDisplay--1PLr_",chapterItems:"chapterItems--1GWWR",chapterItem:"chapterItem--2OEdp",meetingBody:"meetingBody--2sG47",meetingWrap:"meetingWrap--3P4XV",meetingLeftWrap:"meetingLeftWrap--3wMi4",meetingRightWrap:"meetingRightWrap--1UBkJ",datePicker:"datePicker--3zr_5",datePickerInput:"datePickerInput--3saRS",meetingDescription:"meetingDescription--3IzQK",deleteIcon:"deleteIcon--2_D04",videoFormRow:"videoFormRow--1vNL7",videoFormCol:"videoFormCol--3OfgB",videoChapters:"videoChapters--gTUgw",defaultTabWrap:"defaultTabWrap--31WnX",videoUploadWrap:"videoUploadWrap--1Fowc",btnMore:"btnMore--EkVDa",videoInfoExpand:"videoInfoExpand--2gHqS",transStatusText:"transStatusText--1E25B",addParticipantsWrap:"addParticipantsWrap--1L3Y8",leftItem:"leftItem--I5Rqg",addParticipantInput:"addParticipantInput--1G-6N",participantsWrap:"participantsWrap--3f69N",numPartGroup:"numPartGroup--Twp_h",scrollWrapper:"scrollWrapper--axqpM",separator:"separator--G0l0M",addBtn:"addBtn--26BE7",tagItem:"tagItem--mPWaC",tagLabel:"tagLabel--2XVaa",tagAvatar:"tagAvatar--3JEID",suggestionItem:"suggestionItem--39N4H",suggestionAvatar:"suggestionAvatar--378Ox",participant:"participant--1I7Ev",participantAvatar:"participantAvatar--PRH7M",groupIconWrap:"groupIconWrap--3Jq49",transStatusFailed:"transStatusFailed--1FV2F",videoDescription:"videoDescription--2r4Bt",copyBtn:"copyBtn--3uZ21"}},function(e,n,r){"use strict";r.d(n,"a",(function(){return Qo}));r(581);var i=r(81),a=r(55),o=r(87),s=r(66),l=r(39),c=r(167);function u(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}var d=u,h=(r(382),[]),f=0;function p(e){try{v(),e()}finally{b()}}function m(e){h.push(e),f||(v(),y())}function g(e){try{return v(),e()}finally{y()}}function v(){f++}function b(){f--}function y(){var e;for(b();!f&&void 0!==(e=h.shift());)p(e)}var A=function(e){return function(t){return e.some((function(e){return C(e)(t)}))}},_=function(e){return function(t){return e(t)}},w=function(e){return function(t){return t.type===String(e)}},E=function(e){return function(t){return t.type===e}},S=function(){return l.H};function C(e){var t="*"===e?S:Object(s.k)(e)?w:Object(s.a)(e)?A:Object(s.l)(e)?w:Object(s.d)(e)?_:Object(s.m)(e)?E:null;if(null===t)throw new Error("invalid pattern: "+e);return t(e)}var T={type:i.b},k=function(e){return e&&e.type===i.b};function x(e){void 0===e&&(e=Object(l.B)());var t=!1,n=[];return{take:function(r){t&&e.isEmpty()?r(T):e.isEmpty()?(n.push(r),r.cancel=function(){Object(l.O)(n,r)}):r(e.take())},put:function(r){if(!t){if(0===n.length)return e.put(r);n.shift()(r)}},flush:function(n){t&&e.isEmpty()?n(T):n(e.flush())},close:function(){if(!t){t=!0;var e=n;n=[];for(var r=0,i=e.length;r<i;r++){(0,e[r])(T)}}}}}function O(){var e,t,n,r,a,o,s=(t=!1,r=n=[],a=function(){r===n&&(r=n.slice())},o=function(){t=!0;var e=n=r;r=[],e.forEach((function(e){e(T)}))},(e={})[i.e]=!0,e.put=function(e){if(!t)if(k(e))o();else for(var a=n=r,s=0,l=a.length;s<l;s++){var c=a[s];c[i.d](e)&&(c.cancel(),c(e))}},e.take=function(e,n){void 0===n&&(n=S),t?e(T):(e[i.d]=n,a(),r.push(e),e.cancel=Object(l.L)((function(){a(),Object(l.O)(r,e)})))},e.close=o,e),c=s.put;return s.put=function(e){e[i.f]?c(e):m((function(){c(e)}))},s}function I(e,t){var n=e[i.a];Object(s.d)(n)&&(t.cancel=n),e.then(t,(function(e){t(e,!0)}))}var M,P=0,D=function(){return++P};function N(e){e.isRunning()&&e.cancel()}var L=((M={})[l.r]=function(e,t,n){var r=t.channel,a=void 0===r?e.channel:r,o=t.pattern,l=t.maybe,c=function(e){e instanceof Error?n(e,!0):!k(e)||l?n(e):n(i.k)};try{a.take(c,Object(s.g)(o)?C(o):null)}catch(e){return void n(e,!0)}n.cancel=c.cancel},M[l.n]=function(e,t,n){var r=t.channel,i=t.action,a=t.resolve;m((function(){var t;try{t=(r?r.put:e.dispatch)(i)}catch(e){return void n(e,!0)}a&&Object(s.j)(t)?I(t,n):n(t)}))},M[l.a]=function(e,t,n,r){var i=r.digestEffect,a=P,o=Object.keys(t);if(0!==o.length){var c=Object(l.I)(t,n);o.forEach((function(e){i(t[e],a,c[e],e)}))}else n(Object(s.a)(t)?[]:{})},M[l.p]=function(e,t,n,r){var i=r.digestEffect,a=P,o=Object.keys(t),c=Object(s.a)(t)?Object(l.J)(o.length):{},u={},d=!1;o.forEach((function(e){var t=function(t,r){d||(r||Object(l.P)(t)?(n.cancel(),n(t,r)):(n.cancel(),d=!0,c[e]=t,n(c)))};t.cancel=l.Q,u[e]=t})),n.cancel=function(){d||(d=!0,o.forEach((function(e){return u[e].cancel()})))},o.forEach((function(e){d||i(t[e],a,u[e],e)}))},M[l.c]=function(e,t,n,r){var i=t.context,a=t.fn,o=t.args,c=r.task;try{var u=a.apply(i,o);if(Object(s.j)(u))return void I(u,n);if(Object(s.e)(u))return void V(e,u,c.context,P,Object(l.G)(a),!1,n);n(u)}catch(e){n(e,!0)}},M[l.w]=function(e,t,n){var r=t.context,i=t.fn,a=t.args;try{var o=function(e,t){Object(s.n)(e)?n(t):n(e,!0)};i.apply(r,a.concat(o)),o.cancel&&(n.cancel=o.cancel)}catch(e){n(e,!0)}},M[l.f]=function(e,t,n,r){var i=t.context,a=t.fn,o=t.args,c=t.detached,u=r.task,d=function(e){var t=e.context,n=e.fn,r=e.args;try{var i=n.apply(t,r);if(Object(s.e)(i))return i;var a=!1;return Object(l.N)((function(e){return a?{value:e,done:!0}:(a=!0,{value:i,done:!Object(s.j)(i)})}))}catch(e){return Object(l.N)((function(){throw e}))}}({context:i,fn:a,args:o}),h=function(e,t){return e.isSagaIterator?{name:e.meta.name}:Object(l.G)(t)}(d,a);g((function(){var t=V(e,d,u.context,P,h,c,void 0);c?n(t):t.isRunning()?(u.queue.addTask(t),n(t)):t.isAborted()?u.queue.abort(t.error()):n(t)}))},M[l.h]=function(e,t,n,r){var i=r.task,a=function(e,t){if(e.isRunning()){var n={task:i,cb:t};t.cancel=function(){e.isRunning()&&Object(l.O)(e.joiners,n)},e.joiners.push(n)}else e.isAborted()?t(e.error(),!0):t(e.result())};if(Object(s.a)(t)){if(0===t.length)return void n([]);var o=Object(l.I)(t,n);t.forEach((function(e,t){a(e,o[t])}))}else a(t,n)},M[l.y]=function(e,t,n,r){var a=r.task;t===i.h?N(a):Object(s.a)(t)?t.forEach(N):N(t),n()},M[l.q]=function(e,t,n){var r=t.selector,i=t.args;try{n(r.apply(void 0,[e.getState()].concat(i)))}catch(e){n(e,!0)}},M[l.A]=function(e,t,n){var r=t.pattern,i=x(t.buffer),a=C(r),o=function t(n){k(n)||e.channel.take(t,a),i.put(n)},s=i.close;i.close=function(){o.cancel(),s()},e.channel.take(o,a),n(i)},M[l.C]=function(e,t,n,r){n(r.task.isCancelled())},M[l.D]=function(e,t,n){t.flush(n)},M[l.g]=function(e,t,n,r){n(r.task.context[t])},M[l.E]=function(e,t,n,r){var i=r.task;Object(l.M)(i.context,t),n()},M);function R(e,t){return e+"?"+t}function B(e){var t=e.name,n=e.location;return n?t+"  "+R(n.fileName,n.lineNumber):t}var j=null,F=[],U=function(){j=null,F.length=0},H=function(){var e,t,n=F[0],r=F.slice(1),i=n.crashedEffect?function(e){var t=Object(l.S)(e);return t?t.code+"  "+R(t.fileName,t.lineNumber):""}(n.crashedEffect):null;return["The above error occurred in task "+B(n.meta)+(i?" \n when executing effect "+i:"")].concat(r.map((function(e){return"    created by "+B(e.meta)})),[(e=F,t=Object(l.R)((function(e){return e.cancelledTasks}),e),t.length?["Tasks cancelled due to error:"].concat(t).join("\n"):"")]).join("\n")};function z(e,t,n,r,a,o,s){var c;void 0===s&&(s=l.Q);var u,h,f=0,p=null,m=[],g=Object.create(n),v=function(e,t,n){var r,i=[],a=!1;function o(e){t(),c(),n(e,!0)}function s(t){i.push(t),t.cont=function(s,c){a||(Object(l.O)(i,t),t.cont=l.Q,c?o(s):(t===e&&(r=s),i.length||(a=!0,n(r))))}}function c(){a||(a=!0,i.forEach((function(e){e.cont=l.Q,e.cancel()})),i=[])}return s(e),{addTask:s,cancelAll:c,abort:o,getTasks:function(){return i}}}(t,(function(){m.push.apply(m,v.getTasks().map((function(e){return e.meta.name})))}),b);function b(t,n){if(n){if(f=2,(o={meta:a,cancelledTasks:m}).crashedEffect=j,F.push(o),y.isRoot){var r=H();U(),e.onError(t,{sagaStack:r})}h=t,p&&p.reject(t)}else t===i.j?f=1:1!==f&&(f=3),u=t,p&&p.resolve(t);var o;y.cont(t,n),y.joiners.forEach((function(e){e.cb(t,n)})),y.joiners=null}var y=((c={})[i.i]=!0,c.id=r,c.meta=a,c.isRoot=o,c.context=g,c.joiners=[],c.queue=v,c.cancel=function(){0===f&&(f=1,v.cancelAll(),b(i.j,!1))},c.cont=s,c.end=b,c.setContext=function(e){Object(l.M)(g,e)},c.toPromise=function(){return p?p.promise:(p=d(),2===f?p.reject(h):0!==f&&p.resolve(u),p.promise)},c.isRunning=function(){return 0===f},c.isCancelled=function(){return 1===f||0===f&&1===t.status},c.isAborted=function(){return 2===f},c.result=function(){return u},c.error=function(){return h},c);return y}function V(e,t,n,r,a,o,c){var u=e.finalizeRunEffect((function(t,n,r){if(Object(s.j)(t))I(t,r);else if(Object(s.e)(t))V(e,t,h.context,n,a,!1,r);else if(t&&t[i.c]){(0,L[t.type])(e,t.payload,r,f)}else r(t)}));p.cancel=l.Q;var d={meta:a,cancel:function(){0===d.status&&(d.status=1,p(i.j))},status:0},h=z(e,d,n,r,a,o,c),f={task:h,digestEffect:m};return c&&(c.cancel=h.cancel),p(),h;function p(e,n){try{var a;n?(a=t.throw(e),U()):Object(l.T)(e)?(d.status=1,p.cancel(),a=Object(s.d)(t.return)?t.return(i.j):{done:!0,value:i.j}):a=Object(l.U)(e)?Object(s.d)(t.return)?t.return():{done:!0}:t.next(e),a.done?(1!==d.status&&(d.status=3),d.cont(a.value)):m(a.value,r,p)}catch(e){if(1===d.status)throw e;d.status=2,d.cont(e,!0)}}function m(t,n,r,i){void 0===i&&(i="");var a,o=D();function s(n,i){a||(a=!0,r.cancel=l.Q,e.sagaMonitor&&(i?e.sagaMonitor.effectRejected(o,n):e.sagaMonitor.effectResolved(o,n)),i&&function(e){j=e}(t),r(n,i))}e.sagaMonitor&&e.sagaMonitor.effectTriggered({effectId:o,parentEffectId:n,label:i,effect:t}),s.cancel=l.Q,r.cancel=function(){a||(a=!0,s.cancel(),s.cancel=l.Q,e.sagaMonitor&&e.sagaMonitor.effectCancelled(o))},u(t,o,s)}}function W(e,t){var n=e.channel,r=void 0===n?O():n,i=e.dispatch,a=e.getState,o=e.context,s=void 0===o?{}:o,u=e.sagaMonitor,d=e.effectMiddlewares,h=e.onError,f=void 0===h?l.b:h;for(var p=arguments.length,m=new Array(p>2?p-2:0),v=2;v<p;v++)m[v-2]=arguments[v];var b=t.apply(void 0,m);var y,A=D();if(u&&(u.rootSagaStarted=u.rootSagaStarted||l.Q,u.effectTriggered=u.effectTriggered||l.Q,u.effectResolved=u.effectResolved||l.Q,u.effectRejected=u.effectRejected||l.Q,u.effectCancelled=u.effectCancelled||l.Q,u.actionDispatched=u.actionDispatched||l.Q,u.rootSagaStarted({effectId:A,saga:t,args:m})),d){var _=c.d.apply(void 0,d);y=function(e){return function(t,n,r){return _((function(t){return e(t,n,r)}))(t)}}}else y=l.e;var w={channel:r,dispatch:Object(l.d)(i),getState:a,sagaMonitor:u,onError:f,finalizeRunEffect:y};return g((function(){var e=V(w,b,s,A,Object(l.G)(t),!0,void 0);return u&&u.effectResolved(A,e),e}))}var G=function(e){var t,n=void 0===e?{}:e,r=n.context,i=void 0===r?{}:r,s=n.channel,c=void 0===s?O():s,u=n.sagaMonitor,d=Object(o.a)(n,["context","channel","sagaMonitor"]);function h(e){var n=e.getState,r=e.dispatch;return t=W.bind(null,Object(a.a)({},d,{context:i,channel:c,dispatch:r,getState:n,sagaMonitor:u})),function(e){return function(t){u&&u.actionDispatched&&u.actionDispatched(t);var n=e(t);return c.put(t),n}}}return h.run=function(){return t.apply(void 0,arguments)},h.setContext=function(e){Object(l.M)(i,e)},h},q=(r(1065),r(43)),Y=r.n(q),K=r(5),X={firstName:"",lastName:"",avatar:{image:""},bio:"",birthday:"",country:"",education:"",email:"",gender:"",headline:"",honorAndAward:"",location:"",phone:"",skills:[],subjects:[],topics:[],roles:[],subscriptionOptions:{}},Q={show:!1,topMessage:""},$=Y()({userInfo:X,isFetching:!1,error:"",isOpenUserProfileModal:!1,isUpdatingProfile:!1,isOpenChangePasswordModal:!1,showLoginModal:Q,showRegisterModal:!1,showActivationModal:!1}),J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.a.AUTH_LOGIN:case K.a.SOCIAL_LOGIN:return e.merge({isFetching:!0,error:""});case K.a.AUTH_LOGIN_SUCCESS:return e.merge({isFetching:!1,showLoginModal:Q});case K.a.AUTH_LOGIN_FAILURE:return e.merge({isFetching:!1,error:t.error});case K.a.AUTH_LOGOUT_SUCCESS:return e.set("userInfo",X).set("isFetching",!1);case K.a.AUTH_GET_PROFILE:return e.merge({isFetching:!0,error:""});case K.a.AUTH_SET_USER_PROFILE:return e.merge({isFetching:!1,userInfo:t.userInfo},{deep:!0});case K.a.AUTH_GET_PROFILE_FAILURE:return e.merge({isFetching:!1,error:t.error});case K.a.AUTH_REGISTER_SUCCESS:return e.set("isFetching",!1);case K.a.AUTH_REGISTER_FAILURE:return e.merge({isFetching:!1,error:t.error});case K.a.AUTH_VERIFY_ACCOUNT_SUCCESS:return e.set("isFetching",!1);case K.a.AUTH_VERIFY_ACCOUNT_FAILURE:return e.merge({isFetching:!1,error:t.error});case K.a.AUTH_SEND_CONFIRMATION_MAIL_SUCCESS:return e.set("isFetching",!1);case K.a.AUTH_SEND_CONFIRMATION_MAIL_FAILURE:return e.merge({isFetching:!1,error:t.error});case K.a.AUTH_UPLOAD_AVATAR_SUCESS:return e.merge({userInfo:{avatar:t.data}},{deep:!0});case K.a.TOGGLE_OPEN_USER_PROFILE_MODAL:return e.set("isOpenUserProfileModal",t.data);case K.a.UPDATE_PROFILE:return e.set("isUpdatingProfile",!0);case K.a.UPDATE_PROFILE_SUCCESS:case K.a.UPDATE_PROFILE_FAILURE:return e.set("isUpdatingProfile",!1);case K.a.GET_MY_ROLES_SUCCESS:return e.merge({userInfo:{roles:t.data}},{deep:!0});case K.a.TOGGLE_OPEN_CHANGE_PASSWORD_MODAL:return e.set("isOpenChangePasswordModal",t.data);case K.a.DISPLAY_LOGIN_MODAL:return e.merge({showLoginModal:t.data,isFetching:!1});case K.a.UPDATE_USER_INFO:return e.merge({userInfo:t.data},{deep:!0});case K.a.DISPLAY_REGISTER_MODAL:return e.set("showRegisterModal",t.data);case K.m.SET_MY_SUB_OPTIONS:return e.setIn(["userInfo","subscriptionOptions"],t.data);case K.a.DISPLAY_ACTIVATION_MODAL:return e.set("showActivationModal",t.data);default:return e}},Z=r(24),ee=r.n(Z),te=r(2),ne=r.n(te),re=r(7);function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe={isLoading:!1,error:"",videoUploadedInfo:{},myMediaList:[],isCreatingCogvid:!1,creatingCogvidList:[]},se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.g.UPLOAD_RAW_FILE:return ae(ae({},e),{},{isLoading:!0,error:""});case K.g.UPLOAD_RAW_FILE_SUCCESS:return ae(ae({},e),{},{isLoading:!1,error:""});case K.g.CONTENT_ACTIVE_REVIEW:return ae(ae({},e),t.data);case K.g.UPLOAD_RAW_FILE_FAILURE:return ae(ae({},e),{},{isLoading:!1,error:t.error});case K.g.CREATE_COGNITIVE_VIDEO:case K.g.CREATE_COGVID_WITH_CHAPTER_TEMPLATE:return ae(ae({},e),{},{isCreatingCogvid:!0,error:""});case K.g.CREATE_COGNITIVE_VIDEO_SUCCESS:return ae(ae({},e),{},{isCreatingCogvid:!1,error:""});case K.g.CREATE_COGNITIVE_VIDEO_FAILURE:return ae(ae({},e),{},{isCreatingCogvid:!1,error:t.error});case K.g.EDIT_COGNITIVE_VIDEO:return ae(ae({},e),{},{isCreatingCogvid:!0,error:""});case K.g.EDIT_COGNITIVE_VIDEO_FAILURE:return ae(ae({},e),{},{isCreatingCogvid:!1,error:t.error});case K.g.ADD_FILES_TO_GALLERY:return ae(ae({},e),{},{isCreatingCogvid:!0,error:""});case K.g.ADD_FILES_TO_GALLERY_SUCCESS:return ae(ae({},e),{},{isCreatingCogvid:!1,error:""});case K.g.ADD_FILES_TO_GALLERY_FAILURE:return ae(ae({},e),{},{isCreatingCogvid:!1,error:t.error});case K.g.UPDATE_MY_MEDIA_LIST:return ae(ae({},e),{},{myMediaList:t.isRefresh?t.data:e.myMediaList.concat(t.data)});case K.g.ADD_CREATING_COGVID_ITEM:return ae(ae({},e),{},{isCreatingCogvid:!1,creatingCogvidList:[].concat(ee()(e.creatingCogvidList),[ae(ae({},t.data),{},{createdDate:(new Date).toISOString()})])});case K.g.UPDATE_CREATING_COGVID_LIST:return ae(ae({},e),{},{creatingCogvidList:ee()(t.data)});case K.g.UPDATE_CREATING_COGVID_ITEM:var n=Object(re.cloneDeep)(e.creatingCogvidList),r=n.find((function(e){return e.sessionId===t.data.sessionId}));return Object(re.merge)(r,t.data),ae(ae({},e),{},{creatingCogvidList:n});case K.a.AUTH_LOGOUT_SUCCESS:return ae(ae({},e),{},{isCreatingCogvid:!1,creatingCogvidList:[]});default:return e}},le=Y()({categories:[],typeEditting:"",isPopupOpen:!1,isFullscreenMode:!1,deleteChapterInfo:{},deleteHighlightInfo:"",isMenuCollapsed:!1,willCollapseMenu:!1}),ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.f.FETCH_CATEGORIES:return e.merge({isLoading:!0,error:""});case K.f.FETCH_CATEGORIES_SUCCESS:return e.merge({isLoading:!1,categories:t.categories,error:""});case K.f.FETCH_CATEGORIES_FAILURE:return e.merge({isLoading:!1,error:t.error});case K.f.SET_TYPE_EDITTING:return e.set("typeEditting",t.data);case K.f.TOGGLE_OPEN_POPUP:return e.set("isPopupOpen",t.data);case K.f.FULLSCREEN_MODE:return e.update("isFullscreenMode",(function(e){return!e}));case K.f.TOGGLE_DELETE_CHAPTER_CONFIRMATION_MODAL:return e.set("deleteChapterInfo",t.data);case K.f.TOGGLE_DELETE_HIGHLIGHT_CONFIRMATION_MODAL:return e.set("deleteHighlightInfo",t.data);case K.f.UPDATE_COMMON_STATE:return e.merge(t.data);default:return e}},ue=r(109),de=r(1);function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pe={editModeStrokeWidth:0,editModeStrokeColor:""},me=Y()(fe(fe({isToolbarShown:!1,drawingType:de.g.CANVAS_DRAWING_TYPE.NONE,prevDrawingType:de.g.CANVAS_DRAWING_TYPE.NONE,isDrawingTypeChange:!0,strokeWidth:2,strokeColor:de.g.CANVAS_COLORS[0],userComprehension:"",showContextualImg:!0},pe),{},{hasCbBlocks:[],blockSeq:"",canUndo:!1,canRedo:!1})),ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:me,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.b.CANVAS_UPDATE_DRAWING_PROPERTIES:case K.b.GET_CB_DATA_SUCCESS:return e.merge(t.data);case K.b.RESET_CANVAS_PROPERTIES:var n=Y.a.asMutable(e,{deep:!0}),r=n.hasCbBlocks;return me.merge({hasCbBlocks:r});case K.b.RESET_CANVAS_EDIT_MODE_STYLES:return e.merge(pe);case K.b.SET_DISPLAY_CONTEXTUAL_IMG:return e.set("showContextualImg",t.data);case K.b.UPDATE_SHOW_CONTEXTUAL_IMG:for(var i=t.data,a=i.blockSeq,o=i.ctxBg,s=Y.a.asMutable(e,{deep:!0}),l=s.hasCbBlocks,c=!1,u=0;u<l.length;u++)if(l[u].blockSeq===a){c=!0,l[u].ctxBg=o;break}return c||l.push({blockSeq:a,ctxBg:o}),e.merge({hasCbBlocks:l,showContextualImg:o});case K.b.GET_HAS_CB_BLOCKS_SUCCESS:return e.set("hasCbBlocks",t.data);case K.b.DELETE_CB_SUCCESS:for(var d=t.data.blockSeq,h=Y.a.asMutable(e,{deep:!0}),f=h.hasCbBlocks,p=0;p<f.length;p++)if(f[p].blockSeq===d){f.splice(p,1);break}return e.set("hasCbBlocks",f);case K.b.SAVE_CB_DATA_SUCCESS:for(var m=t.data,g=m.blockSeq,v=m.ctxBg,b=m.empty,y=Y.a.asMutable(e,{deep:!0}),A=y.hasCbBlocks,_=!1,w=0;w<A.length;w++)if(A[w].blockSeq===g){A[w].ctxBg=v,A[w].empty=b,_=!0;break}return _||A.push({blockSeq:g,ctxBg:v,empty:b}),e.set("hasCbBlocks",A);default:return e}},ve=Y()({isOpen:!1,isQuickPurchasing:!1,isOpenOrderHistoryModal:!1,isOpenRevenueReportModal:!1,data:{}}),be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ve,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.c.OPEN_CART:return e.set("isOpen",t.data);case K.c.SET_CART_ITEMS:return e.set("data",t.data);case K.c.UPDATE_IS_QUICK_PURCHASING:return e.set("isQuickPurchasing",t.data);case K.c.TOGGLE_OPEN_ORDER_HISTORY_MODAL:return e.set("isOpenOrderHistoryModal",t.data);case K.c.TOGGLE_OPEN_REVENUE_REPORT_MODAL:return e.set("isOpenRevenueReportModal",t.data);default:return e}};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _e=Y()({noNewNotifications:0,noNewSharedVideo:0,noNewSharedMessageVideos:0,videoStatistics:{},kpiChangedVideos:[],kpiCompletedChapters:[]}),we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_e,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.h.UPDATE_NO_NEW_NOTIFICATIONS:return e.set("noNewNotifications",t.data);case K.h.UPDATE_NO_NEW_SHARED_VIDEO:return e.set("noNewSharedVideo",t.data);case K.h.RESET_VIDEO_STATISTICS:return e.set("videoStatistics",{});case K.h.UPDATE_NOTIFICATION_STATE:return e.merge(t.data);case K.h.UPDATE_VIDEO_STATISTICS:var n=t.data,r=n.videoScaffId,i=n.data;return e.merge({videoStatistics:ne()({},r,Ae({},i))},{deep:!0});case K.h.SET_KPI_CHANGES:return e.set("kpiChangedVideos",t.data);case K.h.SET_KPI_COMPLETED_CHAPTERS:return e.set("kpiCompletedChapters",t.data);default:return e}};function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ce=Y()({createGroupModal:{show:!1,videoId:"",chapterId:"",title:"",isEditSharing:!1,isOwner:!1,videoOwnerId:"",chapterOwnerId:""},openCreateGroupForm:!1}),Te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ce,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.i.UPDATE_CREATE_GROUP_MODAL:return e.merge({createGroupModal:Se({},t.data)});case K.i.TOGGLE_CREATE_GROUP_FORM:return e.set("openCreateGroupForm",t.data);default:return e}};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oe=de.g.PROGRESS_STATUS,Ie={isUploadingCogvid:!1,isUploadingAttachment:!1,uploader:{},creatingCogvidProgress:{},totalCogvidProgress:0,shouldUpdateProgress:!1,transcodingStatus:[]},Me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ie,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.a.AUTH_LOGOUT_SUCCESS:return xe({},Ie);case K.l.ADD_UPLOADER:return xe(xe({},e),{},{uploader:Object(re.merge)({},e.uploader,t.data)});case K.l.REMOVE_UPLOADER:var n=t.data,r=xe({},e.uploader);return n.map((function(e){delete r[e]})),xe(xe({},e),{},{uploader:r});case K.l.START_A_FILE_UPLOAD:var i=t.data,a=xe({},e.uploader),o=a[i];return o?(o.options.headers=de.c.getResumableHeaders(),o.start(),xe(xe({},e),{},{uploader:Object(re.merge)({},e.uploader,a)})):e;case K.l.START_A_COGVID_FILE_UPLOAD:var s=t.data,l=s.sessionId,c=s.uploadSeqNumber,u=xe({},e.uploader),d=u[l].find((function(e){return e.options.metadata.uploadSeqNumber===c}));return d?(d.options.headers=de.c.getResumableHeaders(),d.start(),xe(xe({},e),{},{uploader:Object(re.merge)({},e.uploader,u)})):e;case K.l.UPDATE_CREATING_COGVID_PROGRESS:return xe(xe({},e),{},{creatingCogvidProgress:Object(re.merge)({},e.creatingCogvidProgress,t.data)});case K.l.UPDATE_A_COGVID_PROGRESS:var h=t.data.sessionId,f=e.creatingCogvidProgress,p=Object.values(f[h]||{}),m=p.some((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.status;return t===Oe.UPLOADING})),g=p.some((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isFailed,n=e.resumed;return t&&!n})),v=m?Oe.UPLOADING:Oe.PROCESSING;if(m){var b=Object(re.sumBy)(p,"bytesUploaded"),y=Object(re.sumBy)(p,"bytesTotal"),A=de.c.percentage(b/y);return xe(xe({},e),{},{creatingCogvidProgress:Object(re.merge)({},f,ne()({},h,{status:v,now:A,bytesUploaded:b,bytesTotal:y,isFailed:g}))})}var _=xe({},e.uploader),w=Object(re.cloneDeep)(e.creatingCogvidProgress);return delete _[h],delete w[h],xe(xe({},e),{},{uploader:_,creatingCogvidProgress:w});case K.l.UPDATE_TOTAL_COGVID_PROGRESS:var E,S=e.creatingCogvidProgress,C=Object.values(S),T=C.filter((function(e){return e.status===Oe.UPLOADING})),k=T.length>0;if(k){var x=Object(re.sumBy)(T,"bytesUploaded"),O=Object(re.sumBy)(T,"bytesTotal");E=de.c.percentage(x/O)}return xe(xe({},e),{},{isUploadingCogvid:k,totalCogvidProgress:E||100});case K.l.REMOVE_A_COGVID_PROGRESS:var I=t.data.sessionId,M=xe({},e.uploader),P=Object(re.cloneDeep)(e.creatingCogvidProgress);return delete M[I],delete P[I],xe(xe({},e),{},{uploader:M,creatingCogvidProgress:P});case K.l.UPDATE_IS_UPLOADING_COGVID:return xe(xe({},e),{},{isUploadingCogvid:t.data});case K.l.UPDATE_IS_UPLOADING_ATTACHMENT:return xe(xe({},e),{},{isUploadingAttachment:t.data});case K.l.CHANGE_SHOULD_UPDATE_PROGRESS:return xe(xe({},e),{},{shouldUpdateProgress:t.data});case K.l.UPDATE_TRANSCODING_STATUS:return xe(xe({},e),{},{transcodingStatus:t.data});default:return e}},Pe=Y()({showComments:null,showNotes:null,showPreviewComments:null,showPreviewNotes:null,showChapterCoverImage:!1,showChapterCoverImageSlide:-1,showChapterImageSlider:{chapterId:"",showChapterImage:!1,index:0,isAudioLoop:!1,isEpisodic:!1},showSlideType:null,showToc:!1,showLock:!1,fslideExisted:!1,uslideExisted:!1,freeFUI:!1}),De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.e.RESET_COGVID_DETAILS:return e.set("showChapterCoverImage",!1).set("showLock",!1).set("showSlideType",null);case K.d.DISPLAY_COMMENTS:return e.set("showComments",t.data);case K.d.DISPLAY_NOTES:return e.set("showNotes",t.data);case K.d.UPDATE_DISPLAY_NOTES:return e.merge({showNotes:t.data},{deep:!0});case K.d.DISPLAY_PREVIEW_COMMENTS:return e.set("showPreviewComments",t.data);case K.d.DISPLAY_PREVIEW_NOTES:return e.set("showPreviewNotes",t.data);case K.d.DISPLAY_CHAPTER_COVER_IMAGE:return e.set("showChapterCoverImage",t.data);case K.d.DISPLAY_SLIDE:return e.set("showChapterCoverImageSlide",t.data);case K.d.DISPLAY_CHAPTER_IMAGE_SLIDER:return e.set("showChapterImageSlider",t.data);case K.d.DISPLAY_SLIDE_TYPE:return e.set("showSlideType",t.data);case K.d.DISPLAY_TOC:return e.set("showToc",t.data);case K.d.DISPLAY_LOCK:return e.set("showLock",t.data);case K.d.DISPLAY_CHAPTER_FILE_UPLOAD_MODAL:return e.set("showChapterFileUploadModal",t.data);case K.d.DISPLAY_CHAPTER_FILE_DELETE_MODAL:return e.set("showChapterFileDeleteModal",t.data);case K.d.DISPLAY_CHAPTER_FILE_MANAGER_MODAL:return e.set("showChapterFileManagerModal",t.data);case K.d.FU_SLIDES_EXISTANCE:return e.merge(t.data);case K.d.FREE_FUI_FLAG_UPDATE:var n=t.data.freeFUI;return e.set("freeFUI",n);case K.d.UPDATE_CHAPTER_IMAGE_SLIDER:return e.merge({showChapterImageSlider:t.data},{deep:!0});default:return e}};function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Re=Y()({deviceSetup:{show:!0,deviceLabels:null},meetingInfo:{},meetingSession:null,participants:[],meetingDetail:{},mediaPipelineId:""}),Be=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Re,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case K.n.TOGGLE_DEVICE_SETUP_MODAL:return n.merge({deviceSetup:Le(Le({},n.deviceSetup),r.data)});case K.n.SET_MEETING_INFO:return n.merge({meetingInfo:Le(Le({},n.meetingInfo),r.data)});case K.n.GET_MEETING_INFO_SUCCESS:return n.merge({meetingDetail:Le(Le({},n.meetingDetail),r.data)});case K.n.SET_MEETING_SESSION:return n.merge({meetingSession:r.data});case K.n.JOIN_MEETING:return n;case K.n.START_MEETING_SUCCESS:return localStorage.setItem(de.g.MEETING_SESSION_KEY,JSON.stringify(null===(e=r.data)||void 0===e?void 0:e.attendee)),n.merge({meetingSession:null===(t=r.data)||void 0===t?void 0:t.attendee});case K.n.JOIN_MEETING_SUCCESS:return localStorage.setItem(de.g.MEETING_SESSION_KEY,JSON.stringify(r.data)),n.merge({meetingSession:r.data});case K.n.END_MEETING_SUCCESS:return localStorage.removeItem(de.g.MEETING_SESSION_KEY),localStorage.removeItem(de.g.MEETING_INFO_KEY),n.merge({meetingSession:null});case K.n.GET_ALL_PARTICIPANT_SUCCESS:return n.merge({participants:r.data});case K.n.SET_MEDIA_PIPELINE:return n.merge({mediaPipelineId:r.data});case K.n.START_MEETING:default:return n}};function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ue=Y()({isReady:!1,isWaiting:!1,played:!1}),He=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case K.j.VIDEO_RESET:return Y()({isReady:!1,isWaiting:!1,played:!1});case K.j.VIDEO_READY:return Y()(Fe(Fe({},e),{},{isReady:!0}));case K.j.VIDEO_PLAYED:return Y()(Fe(Fe({},e),{},{played:!0}));case K.j.VIDEO_WAITING:return Y()(Fe(Fe({},e),{},{isWaiting:t.data}));default:return e}},ze=Y()({}),Ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ze,t=arguments.length>1?arguments[1]:void 0;return t.type,e},We=Object(c.c)({auth:J,content:se,common:ce,cogvid:ue.a,canvas:ge,cart:be,notification:we,people:Te,progress:Me,cg:De,videolive:Be,playerStatus:He,subscriptionReducer:Ve}),Ge=r(9),qe=r.n(Ge),Ye=r(11),Ke=r(18);function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $e=qe.a.mark(st),Je=qe.a.mark(lt),Ze=qe.a.mark(ct),et=qe.a.mark(ut),tt=qe.a.mark(dt),nt=qe.a.mark(ht),rt=qe.a.mark(ft),it=qe.a.mark(pt),at=qe.a.mark(mt),ot=qe.a.mark(gt);function st(){var e;return qe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ye.h)({type:K.e.GET_LEVEL_BACKGROUNDS});case 2:return t.next=4,de.c.getToken();case 4:if(!(e=t.sent)||"string"!=typeof e){t.next=9;break}return t.next=8,Object(Ye.h)({type:K.a.AUTH_LOGOUT});case 8:return t.abrupt("return");case 9:if(!e){t.next=18;break}return t.next=12,de.c.handleRefreshToken(e);case 12:return t.next=14,Object(Ye.h)({type:K.a.AUTH_GET_PROFILE});case 14:return t.next=16,Object(Ye.h)({type:K.a.GET_MY_ROLES});case 16:t.next=20;break;case 18:return t.next=20,de.c.destroyAuth();case 20:case"end":return t.stop()}}),$e)}function lt(){var e;return qe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(Ye.b)(Ke.h.get,"videos/videocategories");case 3:return e=t.sent,t.next=6,Object(Ye.h)({type:K.f.FETCH_CATEGORIES_SUCCESS,categories:e.map((function(e){return Qe(Qe({},e),{},{value:e.name})}))});case 6:t.next=12;break;case 8:return t.prev=8,t.t0=t.catch(0),t.next=12,Object(Ye.h)({type:K.f.FETCH_CATEGORIES_FAILURE,error:t.t0});case 12:case"end":return t.stop()}}),Je,null,[[0,8]])}function ct(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.a.post("events",e.data);case 3:t=n.sent,e.resolve&&e.resolve(t),n.next=11;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,Object(Ye.h)({type:K.f.FETCH_CATEGORIES_FAILURE,error:n.t0});case 11:case"end":return n.stop()}}),Ze,null,[[0,7]])}function ut(e){var t,n,r,i;return qe.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.data,n=e.resolve,r=e.reject,a.prev=1,a.next=4,Ke.a.post("logs",Qe(Qe({},t),{},{sourceSystem:"MM_WEB",platformVersion:"14.3.393"}));case 4:i=a.sent,n&&n(i),a.next=11;break;case 8:a.prev=8,a.t0=a.catch(1),r&&r(response);case 11:case"end":return a.stop()}}),et,null,[[1,8]])}function dt(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.context,a=t.state,s.prev=2,s.next=5,Ke.a.put("states",{context:i,state:a});case 5:o=s.sent,n&&n(o),s.next=12;break;case 9:s.prev=9,s.t0=s.catch(2),r&&r(s.t0);case 12:case"end":return s.stop()}}),tt,null,[[2,9]])}function ht(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.context,o.prev=2,o.next=5,Ke.a.get("states/".concat(i));case 5:a=o.sent,n&&n(a),o.next=12;break;case 9:o.prev=9,o.t0=o.catch(2),r&&r(o.t0);case 12:case"end":return o.stop()}}),nt,null,[[2,9]])}function ft(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.chapterId,s.prev=2,s.next=5,Ke.a.put("events/".concat(i,"/").concat(a));case 5:o=s.sent,n&&n(o),s.next=12;break;case 9:s.prev=9,s.t0=s.catch(2),r&&r(s.t0);case 12:case"end":return s.stop()}}),rt,null,[[2,9]])}function pt(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,o.prev=2,o.next=5,Ke.a.get("events/".concat(i));case 5:a=o.sent,n&&n(a||{}),o.next=12;break;case 9:o.prev=9,o.t0=o.catch(2),r&&r(o.t0);case 12:case"end":return o.stop()}}),it,null,[[2,9]])}function mt(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,o.prev=2,o.next=5,Ke.a.delete("events/".concat(i));case 5:a=o.sent,n&&n(a||{}),o.next=12;break;case 9:o.prev=9,o.t0=o.catch(2),r&&r(o.t0);case 12:case"end":return o.stop()}}),at,null,[[2,9]])}function gt(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.f.INITIALIZE_APP,st);case 2:return e.next=4,Object(Ye.j)(K.f.FETCH_CATEGORIES,lt);case 4:return e.next=6,Object(Ye.j)(K.f.APP_TRACKING,ct);case 6:return e.next=8,Object(Ye.j)(K.f.APP_LOGGING,ut);case 8:return e.next=10,Object(Ye.j)(K.f.STATE_TRACKING,dt);case 10:return e.next=12,Object(Ye.j)(K.f.FETCH_LAST_STATE,ht);case 12:return e.next=14,Object(Ye.j)(K.f.INCREASE_CHAPTER_ENGAGEMENT,ft);case 14:return e.next=16,Object(Ye.j)(K.f.GET_VIDEO_LEARNING_METRICS,pt);case 16:return e.next=18,Object(Ye.j)(K.f.DELETE_VIDEO_LEARNING_METRICS,mt);case 18:case"end":return e.stop()}}),ot)}var vt=r(40),bt=r.n(vt),yt=(r(92),r(37));function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wt=qe.a.mark(Yt),Et=qe.a.mark(Kt),St=qe.a.mark(Xt),Ct=qe.a.mark(Qt),Tt=qe.a.mark($t),kt=qe.a.mark(Jt),xt=qe.a.mark(Zt),Ot=qe.a.mark(en),It=qe.a.mark(tn),Mt=qe.a.mark(nn),Pt=qe.a.mark(rn),Dt=qe.a.mark(an),Nt=qe.a.mark(on),Lt=qe.a.mark(sn),Rt=qe.a.mark(ln),Bt=qe.a.mark(cn),jt=qe.a.mark(un),Ft=qe.a.mark(dn),Ut=qe.a.mark(hn),Ht=qe.a.mark(fn),zt=qe.a.mark(pn),Vt=qe.a.mark(mn),Wt=de.g.SHARE_VIDEO_SEARCH_PEOPLE_LIMIT,Gt=(de.g.VIDEO_CATEGORY,de.g.HOME_PAGE_PATH),qt=de.g.TEMP_PATH;function Yt(e){var t,n,r,i,a,o,s,l,c,u,d,h,f,p;return qe.a.wrap((function(m){for(;;)switch(m.prev=m.next){case 0:return t=e.data,n=t.willRedirect,r=void 0===n||n,i=t.redirectTo,a=bt()(t,["willRedirect","redirectTo"]),m.prev=1,m.next=4,Object(Ye.b)(Ke.b.post,"users/authentication",a);case 4:return o=m.sent,m.next=7,Object(Ye.b)(de.c.setToken,o);case 7:return m.next=9,Object(Ye.h)({type:K.a.AUTH_LOGIN_SUCCESS});case 9:return m.next=11,Object(Ye.h)({type:K.a.AUTH_GET_PROFILE});case 11:return m.next=13,Object(Ye.h)({type:K.a.GET_MY_ROLES});case 13:e.resolve&&e.resolve(),r?(s=Object(re.get)(yt.a.location.state,"from.search",""),l=Object(re.get)(yt.a.location.state,"from.pathname","/"),c=i||"".concat(l).concat(s),yt.a.push(qt),yt.a.replace(c)):(u=window.location,d=u.search,h=void 0===d?"":d,f=u.pathname,p=void 0===f?"/":f,yt.a.push(qt),yt.a.replace("".concat(p).concat(h)),de.c.getDataFromUrl(yt.a.location).videoId&&(window.forceAutoplay=!0)),m.next=22;break;case 17:return m.prev=17,m.t0=m.catch(1),e.reject&&e.reject(m.t0),m.next=22,Object(Ye.h)({type:K.a.AUTH_LOGIN_FAILURE});case 22:case"end":return m.stop()}}),wt,null,[[1,17]])}function Kt(e){var t,n;return qe.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,t=e.data||{},r.next=4,Object(Ye.b)(Ke.b.put,"users/authentication",{refreshToken:t.refreshToken});case 4:return n=r.sent,r.next=7,Object(Ye.b)(de.c.setToken,n);case 7:e.resolve&&e.resolve(n),r.next=14;break;case 10:return r.prev=10,r.t0=r.catch(0),r.next=14,Object(Ye.h)({type:K.a.AUTH_LOGOUT});case 14:case"end":return r.stop()}}),Et,null,[[0,10]])}function Xt(e){var t,n,r,i,a,o,s,l,c;return qe.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return t=e.data,n=t.credentials,r=t.willRedirect,i=void 0===r||r,a=t.redirectTo,u.prev=1,u.next=4,Object(Ye.b)(Ke.b.post,"users/social/authentication",n);case 4:return o=u.sent,e.resolve&&e.resolve(),u.next=8,Object(Ye.b)(de.c.setToken,o);case 8:if(!i){u.next=22;break}return u.next=11,Object(Ye.h)({type:K.a.AUTH_LOGIN_SUCCESS});case 11:return u.next=13,Object(Ye.h)({type:K.a.AUTH_GET_PROFILE});case 13:return u.next=15,Object(Ye.h)({type:K.a.GET_MY_ROLES});case 15:s=Object(re.get)(yt.a.location.state,"from.search",""),l=Object(re.get)(yt.a.location.state,"from.pathname","/"),c=a||"".concat(l).concat(s),yt.a.push(qt),yt.a.replace(c),u.next=24;break;case 22:return u.next=24,setTimeout((function(){document.location.href=Gt}),250);case 24:u.next=31;break;case 26:return u.prev=26,u.t0=u.catch(1),e.reject&&e.reject(u.t0),u.next=31,Object(Ye.h)({type:K.a.AUTH_LOGIN_FAILURE});case 31:case"end":return u.stop()}}),St,null,[[1,26]])}function Qt(){var e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m;return qe.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=0,g.next=3,Object(Ye.b)(Ke.b.get,"profiles/myself");case 3:return e=g.sent,t=e.avatar,n=(t=void 0===t?{}:t).contentType,r=void 0===n?"":n,i=t.image,a=void 0===i?"":i,o=e.birthday,s=void 0===o?"":o,l=e.email,c=void 0===l?"":l,u=e.firstName,d=void 0===u?"":u,h=e.lastName,f=void 0===h?"":h,p=e.gender,void 0===p?"Unknown":p,m=bt()(e,["avatar","birthday","email","firstName","lastName","gender"]),g.next=9,Object(Ye.h)({type:K.a.AUTH_SET_USER_PROFILE,userInfo:_t({avatar:{contentType:r,image:a},birthday:s,email:c,firstName:d,lastName:f},m)});case 9:g.next=18;break;case 11:if(g.prev=11,g.t0=g.catch(0),"Request aborted"===g.t0){g.next=16;break}return g.next=16,de.c.destroyAuth();case 16:return g.next=18,Object(Ye.h)({type:K.a.AUTH_GET_PROFILE_FAILURE,error:g.t0});case 18:case"end":return g.stop()}}),Ct,null,[[0,11]])}function $t(){var e,t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(s.prev=0,e=de.c.getToken(),!(t=(e||{}).refreshToken)){s.next=6;break}return s.next=6,Ke.b.delete("users/authentication",{data:{refreshToken:t}});case 6:return s.next=8,Object(Ye.b)(de.c.destroyAuth);case 8:return s.next=10,Object(Ye.h)({type:K.a.AUTH_LOGOUT_SUCCESS});case 10:e&&(n=window.location,r=n.search,i=void 0===r?"":r,a=n.pathname,o=void 0===a?"/":a,yt.a.push(qt),yt.a.replace("".concat(o).concat(i))),s.next=15;break;case 13:s.prev=13,s.t0=s.catch(0);case 15:case"end":return s.stop()}}),Tt,null,[[0,13]])}function Jt(e){return qe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(Ye.b)(Ke.b.post,"users",e.data);case 3:return e.resolve&&e.resolve(),t.next=6,Object(Ye.h)({type:K.a.AUTH_REGISTER_SUCCESS,data:{}});case 6:t.next=13;break;case 8:return t.prev=8,t.t0=t.catch(0),e.reject&&e.reject(t.t0),t.next=13,Object(Ye.h)({type:K.a.AUTH_REGISTER_FAILURE});case 13:case"end":return t.stop()}}),kt,null,[[0,8]])}function Zt(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,Object(Ye.b)(Ke.b.get,"users/confirmation?activationCode=".concat(e.data));case 3:return t=s.sent,e.resolve&&e.resolve(),s.next=7,Object(Ye.b)(de.c.setToken,t);case 7:return s.next=9,Object(Ye.h)({type:K.a.AUTH_VERIFY_ACCOUNT_SUCCESS,data:{}});case 9:return s.next=11,Object(Ye.h)({type:K.a.AUTH_GET_PROFILE});case 11:return s.next=13,Object(Ye.h)({type:K.a.GET_MY_ROLES});case 13:n=window.location,r=n.search,i=void 0===r?"":r,a=n.pathname,o=void 0===a?"/":a,yt.a.push(qt),yt.a.replace("".concat(o).concat(i)),s.next=23;break;case 18:return s.prev=18,s.t0=s.catch(0),e.reject&&e.reject(s.t0),s.next=23,Object(Ye.h)({type:K.a.AUTH_VERIFY_ACCOUNT_FAILURE});case 23:case"end":return s.stop()}}),xt,null,[[0,18]])}function en(e){return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(Ye.b)(Ke.b.post,"users/confirmation",{email:e.data});case 3:return e.resolve&&e.resolve(),n.next=6,Object(Ye.h)({type:K.a.AUTH_SEND_CONFIRMATION_MAIL_SUCCESS,data:{}});case 6:de.e.success(t("message.resendEmailSuccessfully")),n.next=14;break;case 9:return n.prev=9,n.t0=n.catch(0),e.reject&&e.reject(n.t0),n.next=14,Object(Ye.h)({type:K.a.AUTH_SEND_CONFIRMATION_MAIL_FAILURE});case 14:case"end":return n.stop()}}),Ot,null,[[0,9]])}function tn(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,(t=new FormData).append("file",e.data.file,e.data.file.name),s.next=5,Ke.b.post("profiles/myAvatar",t,{headers:{"Content-Type":"multipart/form-data; boundary=".concat(t._boundary)}});case 5:return n=s.sent,e.resolve&&e.resolve(),r=n.contentType,i=void 0===r?"":r,a=n.photo,o=void 0===a?"":a,s.next=10,Object(Ye.h)({type:K.a.AUTH_UPLOAD_AVATAR_SUCESS,data:{contentType:i,image:o}});case 10:s.next=17;break;case 12:return s.prev=12,s.t0=s.catch(0),s.next=16,de.e.error(s.t0);case 16:e.reject&&e.reject(s.t0);case 17:case"end":return s.stop()}}),It,null,[[0,12]])}function nn(e){var n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n=e.data,r=e.resolve,i=e.reject,o.prev=1,o.next=4,Ke.b.put("profiles/myself",_t({},n));case 4:return a=o.sent,o.next=7,Object(Ye.h)({type:K.a.UPDATE_PROFILE_SUCCESS});case 7:return o.next=9,Object(Ye.h)({type:K.a.AUTH_SET_USER_PROFILE,userInfo:_t(_t({},X),a)});case 9:de.e.success(t("message.updateProfileSuccess")),r&&r(),o.next=20;break;case 13:return o.prev=13,o.t0=o.catch(1),o.next=17,Object(Ye.h)({type:K.a.UPDATE_PROFILE_FAILURE});case 17:return o.next=19,de.e.error(o.t0);case 19:i&&i(o.t0);case 20:case"end":return o.stop()}}),Mt,null,[[1,13]])}function rn(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.scope,a=t.terms,s.prev=2,s.next=5,Ke.b.post("profiles/keywords/search",{pageNumber:0,pageSize:5,scope:i,terms:a});case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),Pt,null,[[2,9]])}function an(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return e.data,t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.b.get("users/roles");case 4:return r=i.sent,i.next=7,Object(Ye.h)({type:K.a.GET_MY_ROLES_SUCCESS,data:r});case 7:t&&t(r),i.next=15;break;case 10:return i.prev=10,i.t0=i.catch(1),i.next=14,de.e.error(i.t0);case 14:n&&n(i.t0);case 15:case"end":return i.stop()}}),Dt,null,[[1,10]])}function on(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.currentPwd,a=t.newPwd,s.prev=2,s.next=5,Ke.b.post("users/password",{currentPwd:i,newPwd:a});case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),Nt,null,[[2,9]])}function sn(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.email,o.prev=2,o.next=5,Ke.b.post("users/resetpwd",{email:i});case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Lt,null,[[2,9]])}function ln(e){var t,n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.email,a=t.password,o=t.resetCode,l.prev=2,l.next=5,Ke.b.put("users/resetpwd",{email:i,password:a,resetCode:o});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,de.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),Rt,null,[[2,9]])}function cn(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return e.data,t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.b.get("users/termsOfUse");case 4:r=i.sent,t&&t(r),i.next=13;break;case 8:return i.prev=8,i.t0=i.catch(1),i.next=12,de.e.error(i.t0);case 12:n&&n(i.t0);case 13:case"end":return i.stop()}}),Bt,null,[[1,8]])}function un(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return e.data,t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.b.get("users/privacyPolicy");case 4:r=i.sent,t&&t(r),i.next=13;break;case 8:return i.prev=8,i.t0=i.catch(1),i.next=12,de.e.error(i.t0);case 12:n&&n(i.t0);case 13:case"end":return i.stop()}}),jt,null,[[1,8]])}function dn(e){var t,n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.terms,a=t.pageSize,o=void 0===a?Wt:a,l.prev=2,l.next=5,Ke.b.post("groups/search",{pageNumber:0,pageSize:o,terms:i});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,de.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),Ft,null,[[2,9]])}function hn(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return e.data,t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.m.get("storageinsight/user");case 4:r=i.sent,t&&t(r),i.next=13;break;case 8:return i.prev=8,i.t0=i.catch(1),i.next=12,de.e.error(i.t0);case 12:n&&n(i.t0);case 13:case"end":return i.stop()}}),Ut,null,[[1,8]])}function fn(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,de.c.getToken();case 4:if(i.sent){i.next=8;break}return t&&t(!1),i.abrupt("return");case 8:return i.next=10,Ke.b.get("users/trustedPublisher");case 10:r=i.sent,t&&t(r),i.next=19;break;case 14:return i.prev=14,i.t0=i.catch(1),i.next=18,de.e.error(i.t0);case 18:n&&n(i.t0);case 19:case"end":return i.stop()}}),Ht,null,[[1,14]])}function pn(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i.prev=1,i.next=4,Ke.b.put("profiles/joiningAs/"+t);case 4:return n&&n(),i.next=7,Object(Ye.h)({type:K.a.UPDATE_USER_INFO,data:{audience:t}});case 7:i.next=14;break;case 9:return i.prev=9,i.t0=i.catch(1),i.next=13,de.e.error(i.t0);case 13:r&&r(i.t0);case 14:case"end":return i.stop()}}),zt,null,[[1,9]])}function mn(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.a.AUTH_LOGIN,Yt);case 2:return e.next=4,Object(Ye.j)(K.a.SOCIAL_LOGIN,Xt);case 4:return e.next=6,Object(Ye.j)(K.a.AUTH_GET_PROFILE,Qt);case 6:return e.next=8,Object(Ye.j)(K.a.AUTH_REGISTER,Jt);case 8:return e.next=10,Object(Ye.j)(K.a.AUTH_LOGOUT,$t);case 10:return e.next=12,Object(Ye.j)(K.a.AUTH_VERIFY_ACCOUNT,Zt);case 12:return e.next=14,Object(Ye.j)(K.a.AUTH_SEND_CONFIRMATION_MAIL,en);case 14:return e.next=16,Object(Ye.j)(K.a.AUTH_UPLOAD_AVATAR,tn);case 16:return e.next=18,Object(Ye.j)(K.a.REFRESH_TOKEN,Kt);case 18:return e.next=20,Object(Ye.j)(K.a.UPDATE_PROFILE,nn);case 20:return e.next=22,Object(Ye.j)(K.a.SEARCH_KEYWORD,rn);case 22:return e.next=24,Object(Ye.j)(K.a.GET_MY_ROLES,an);case 24:return e.next=26,Object(Ye.j)(K.a.CHANGE_PASSWORD,on);case 26:return e.next=28,Object(Ye.j)(K.a.GET_RESET_PASSWORD_CODE,sn);case 28:return e.next=30,Object(Ye.j)(K.a.RESET_PASSWORD,ln);case 30:return e.next=32,Object(Ye.j)(K.a.GET_TERMS_OF_USE,cn);case 32:return e.next=34,Object(Ye.j)(K.a.GET_PRIVACY_POLICY,un);case 34:return e.next=36,Object(Ye.j)(K.a.SEARCH_GROUPS,dn);case 36:return e.next=38,Object(Ye.j)(K.a.GET_USER_STORAGE,hn);case 38:return e.next=40,Object(Ye.j)(K.a.GET_TRUSTED_PUBLISHER,fn);case 40:return e.next=42,Object(Ye.j)(K.a.UPDATE_JOIN_AS,pn);case 42:case"end":return e.stop()}}),Vt)}var gn=r(220);function vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yn=qe.a.mark(Fn),An=qe.a.mark(Un),_n=qe.a.mark(Hn),wn=qe.a.mark(zn),En=qe.a.mark(Vn),Sn=qe.a.mark(Wn),Cn=qe.a.mark(Gn),Tn=qe.a.mark(qn),kn=qe.a.mark(Yn),xn=qe.a.mark(Kn),On=qe.a.mark(Xn),In=qe.a.mark(Qn),Mn=qe.a.mark($n),Pn=qe.a.mark(Jn),Dn=qe.a.mark(Zn),Nn=de.g.VIDEO_TYPE,Ln=de.g.VIDEO_CATEGORY_TYPE_TO_MENU,Rn=de.g.VIDEO_CATEGORY,Bn=de.g.VIDEO_LIST_FILTER,jn=de.g.CHAPTER_TYPES;function Fn(e){var t,n,r,i;return qe.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,t=new FormData,a.next=4,t.append("file",e.data);case 4:return a.next=6,Ke.h.post("contents",t);case 6:return n=a.sent,a.next=9,Object(Ye.h)({type:K.g.UPLOAD_RAW_FILE_SUCCESS,data:n});case 9:e.resolve&&e.resolve(n),a.next=23;break;case 12:return a.prev=12,a.t0=a.catch(0),r=e.willTriggerCancel,i=void 0===r||r,a.next=17,de.e.error(a.t0);case 17:if(!i){a.next=22;break}return a.next=20,Object(Ye.c)();case 20:a.next=23;break;case 22:e.reject&&e.reject();case 23:return a.prev=23,a.next=26,Object(Ye.d)();case 26:if(!a.sent){a.next=28;break}e.reject&&e.reject();case 28:return a.finish(23);case 29:case"end":return a.stop()}}),yn,null,[[0,12,23,29]])}function Un(e){var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T;return qe.a.wrap((function(k){for(;;)switch(k.prev=k.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.categories,o=n.description,s=n.subject,l=void 0===s?"subject":s,c=n.title,u=n.topic,d=void 0===u?"topic":u,h=n.files,f=n.totalSubtitles,p=n.totalVideos,m=n.transcriptEnabled,g=void 0!==m&&m,v=n.category,b=n.courseCode,y=n.courseSerial,A=n.primCourseCode,_=n.primCourseSerial,w=n.keywords,E=n.learningLevel,S=n.learningSubject,k.prev=2,k.next=5,Object(Ye.b)(Ke.h.post,"videos",{categories:a,description:o,subject:l,title:c,topic:d,total:h.length,transcriptEnabled:g,category:v,courseCode:b,courseSerial:y,primCourseCode:A,primCourseSerial:_,keywords:w,learningLevel:E,learningSubject:S});case 5:return C=k.sent,T=C.uid,k.next=9,Object(Ye.h)({type:K.g.ADD_CREATING_COGVID_ITEM,data:{type:Nn.COGNITIVE,sessionId:T,name:c,files:h,totalSubtitles:f,totalVideos:p}});case 9:r&&r(t("message.processingVideo"),"success"),k.next=17;break;case 12:return k.prev=12,k.t0=k.catch(2),k.next=16,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_FAILURE,error:k.t0});case 16:i&&i(k.t0,"error");case 17:case"end":return k.stop()}}),An,null,[[2,12]])}function Hn(e){var t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x;return qe.a.wrap((function(O){for(;;)switch(O.prev=O.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapters,a=t.description,o=t.subject,s=void 0===o?"subject":o,l=t.title,c=void 0===l?"title":l,u=t.topic,d=void 0===u?"topic":u,h=t.category,f=t.courseCode,p=t.courseSerial,m=t.primCourseCode,g=t.primCourseSerial,v=t.keywords,b=t.learningLevel,y=t.learningSubject,O.prev=2,O.next=5,Object(Ye.b)(Ke.e.post,"videos/template",{chapters:i,description:a,subject:s,title:c,topic:d,category:h,courseCode:f,courseSerial:p,primCourseCode:m,primCourseSerial:g,keywords:v,learningLevel:b,learningSubject:y});case 5:if(A=O.sent,_=de.c.getCurrentVideoCategory(),w={},_.toUpperCase()!==Ln[h]){O.next=21;break}return E=A.videoId,O.next=12,Ke.o.get("videos/".concat(E));case 12:if(w=O.sent,(S=w).playlistUrl,S.thumbnailUrl,C=bt()(S,["playlistUrl","thumbnailUrl"]),T=Object(re.get)(Qo.getState(),"cogvid.cogvidListLv"),k=T.currentActiveLv,x=T["lv".concat(k)].filter,_===Rn.BRAINHIVE&&x===Bn.RECEIVED){O.next=21;break}return O.next=21,Object(Ye.h)({type:K.e.UNSHIFT_COGVID_LIST,data:{videoData:bn(bn({},C),{},{permissions:{VIDEO:{DOANYACTION:!0}},playlistUrl:""})}});case 21:return O.next=23,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_SUCCESS});case 23:n&&n(w),O.next=31;break;case 26:return O.prev=26,O.t0=O.catch(2),O.next=30,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_FAILURE,error:O.t0});case 30:r&&r(O.t0);case 31:case"end":return O.stop()}}),_n,null,[[2,26]])}function zn(e){var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x,O,I,M,P,D,N;return qe.a.wrap((function(L){for(;;)switch(L.prev=L.next){case 0:if(n=e.data,r=e.resolve,i=e.reject,a=n.categories,o=n.description,s=n.existingParts,l=n.deletedParts,c=n.deletedSubtitles,u=n.subject,d=void 0===u?"subject":u,h=n.title,f=n.topic,p=void 0===f?"topic":f,m=n.files,g=n.totalSubtitles,v=n.totalVideos,b=n.transcriptEnabled,y=void 0!==b&&b,A=n.courseCode,_=n.courseSerial,w=n.isDummyDailyVideo,E=n.createdDate,S=n.primCourseCode,C=n.primCourseSerial,T=n.keywords,k=n.learningLevel,x=n.learningSubject,O=n.userScaffId,I=n.videoId,!w){L.next=8;break}return L.next=6,Object(gn.b)({data:{createdDate:E,title:h,subject:d,topic:p,courseCode:A,courseSerial:_,description:o,primCourseCode:S,primCourseSerial:C,keywords:T,learningLevel:k,learningSubject:x}});case 6:M=L.sent,I=M.videoId;case 8:return L.prev=8,L.next=11,Object(Ye.b)(Ke.e.put,"videos/".concat(I,"/parts"),{categories:a,description:o,subject:d,title:h,topic:p,total:m.length,transcriptEnabled:y,existingParts:s,courseCode:A,deletedParts:l,courseSerial:_,primCourseCode:S,primCourseSerial:C,keywords:T,learningLevel:k,learningSubject:x});case 11:P=L.sent,D=0;case 13:if(!(D<c.length)){L.next=19;break}return L.next=16,Ke.e.delete("videos/".concat(I,"/subtitles/").concat(c[D]),{params:{userScaffId:O}});case 16:D++,L.next=13;break;case 19:if(!(m.length>0)){L.next=23;break}return N=P.sessionId,L.next=23,Object(Ye.h)({type:K.g.ADD_CREATING_COGVID_ITEM,data:{type:Nn.UPDATING_COGNITIVE,videoId:I,sessionId:N,name:h,files:m,totalSubtitles:g,totalVideos:v,noUpload:m.length<=0,status:m.length<=0?de.g.PROGRESS_STATUS.PROCESSING:""}});case 23:return L.next=25,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_SUCCESS});case 25:r&&r(t("message.processingVideo"),"success"),L.next=33;break;case 28:return L.prev=28,L.t0=L.catch(8),L.next=32,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_FAILURE,error:L.t0});case 32:i&&i(L.t0,"error");case 33:case"end":return L.stop()}}),wn,null,[[8,28]])}function Vn(e){var n,r,i,a,o,s,l,c,u;return qe.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.files,o=n.totalSubtitles,s=n.totalVideos,l=n.totalImages,d.prev=2,d.next=5,Object(Ye.b)(Ke.h.post,"galleries",{total:a.length});case 5:return c=d.sent,u=c.uid,d.next=9,Object(Ye.h)({type:K.g.ADD_CREATING_COGVID_ITEM,data:{type:Nn.GALLERY,sessionId:u,name:"Gallery",files:a,totalSubtitles:o,totalVideos:s,totalImages:l}});case 9:r&&r(t("message.processingVideo"),"success"),d.next=17;break;case 12:return d.prev=12,d.t0=d.catch(2),d.next=16,Object(Ye.h)({type:K.g.ADD_FILES_TO_GALLERY_FAILURE,error:d.t0});case 16:i&&i(d.t0,"error");case 17:case"end":return d.stop()}}),En,null,[[2,12]])}function Wn(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=t.subtitles,r=void 0===n?[]:n,i=t.onSubtitleUploadSuccessful,a=bt()(t,["subtitles","onSubtitleUploadSuccessful"]),o.prev=1,o.delegateYield(qe.a.mark((function t(){var n,o,s,l;return qe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=!0,o=[],s=qe.a.mark((function e(t){var a,s;return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r[t],s=Object(re.get)(r,"[".concat(t,"].videoIndex")),!n){e.next=5;break}return e.next=5,Object(Ye.b)(Fn,{data:a.subtitleFile,resolve:function(e){i(s),o.push(e)},reject:function(){n=!1},willTriggerCancel:!1});case 5:case"end":return e.stop()}}),e)})),l=0;case 4:if(!(l<r.length)){t.next=9;break}return t.delegateYield(s(l),"t0",6);case 6:l++,t.next=4;break;case 9:if(!n){t.next=20;break}return forEach(o,(function(e,t){var n=e.contentId,i=void 0===n?"":n,o=Object(re.get)(r,"[".concat(t,"].videoIndex"));set(a,"formData.sourceVideos[".concat(o,"].subtitleId"),i)})),t.next=13,Object(Ye.b)(Ke.e.post,"videos",a.formData);case 13:return t.next=15,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_SUCCESS});case 15:return t.next=17,Object(Ye.h)({type:K.e.GET_MY_COGVID_LIST,data:{isRefresh:!0}});case 17:e.resolve&&e.resolve("Your video is being processed. It will be available after the proccess is finished","success"),t.next=22;break;case 20:return t.next=22,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_FAILURE});case 22:case"end":return t.stop()}}),t)}))(),"t0",3);case 3:o.next=10;break;case 5:return o.prev=5,o.t1=o.catch(1),o.next=9,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_FAILURE,error:o.t1});case 9:e.reject&&e.reject(o.t1,"error");case 10:case"end":return o.stop()}}),Sn,null,[[1,5]])}function Gn(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=void 0===t?{}:t,i.prev=1,i.next=4,Ke.h.get("contents",{params:{size:de.g.MY_MEDIA_PAGE_SIZE,page:n.page||0,sort:de.g.MY_MEDIA_PAGE_SORT}});case 4:return r=i.sent,i.next=7,Object(Ye.h)({type:K.g.UPDATE_MY_MEDIA_LIST,data:r.content,isRefresh:n.refresh});case 7:e.resolve&&e.resolve(r.content.length),i.next=15;break;case 10:return i.prev=10,i.t0=i.catch(1),i.next=14,Object(Ye.h)({type:K.g.GET_MY_MEDIA_LIST_FAILURE,error:i.t0});case 14:e.reject&&e.reject();case 15:case"end":return i.stop()}}),Cn,null,[[1,10]])}function qn(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i.prev=1,i.next=4,Ke.h.delete("videos/".concat(t.sessionId));case 4:n&&n(),i.next=12;break;case 7:return i.prev=7,i.t0=i.catch(1),i.next=11,de.e.error(i.t0);case 11:r&&r();case 12:case"end":return i.stop()}}),Tn,null,[[1,7]])}function Yn(e){var t,n,r,i;return qe.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.data,n=e.resolve,r=e.reject,a.prev=1,a.next=4,Ke.h.get("videos/".concat(t.sessionId,"/files/").concat(t.fileId));case 4:i=a.sent,n&&n(i),a.next=11;break;case 8:a.prev=8,a.t0=a.catch(1),r&&r(a.t0);case 11:case"end":return a.stop()}}),kn,null,[[1,8]])}function Kn(e){var t,n,r,i;return qe.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.data,n=e.resolve,r=e.reject,a.prev=1,a.next=4,Ke.h.get("attachments/".concat(t.fileId));case 4:i=a.sent,n&&n(i),a.next=11;break;case 8:a.prev=8,a.t0=a.catch(1),r&&r(a.t0);case 11:case"end":return a.stop()}}),xn,null,[[1,8]])}function Xn(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(Ye.h)({type:K.l.UPDATE_IS_UPLOADING_COGVID,data:!0});case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),On,null,[[0,5]])}function Qn(e){var t,n,r,i,a,o,s,l,c,u,d,h,f,p;return qe.a.wrap((function(m){for(;;)switch(m.prev=m.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoData,a=t.meetingData,m.prev=2,m.next=5,Ke.o.post("videos/live",bn({chapter:bn(bn({},a),{},{type:jn.LIVE_SESSION.key,seqNumber:0})},i));case 5:if(o=m.sent,s={},(l=de.c.getCurrentVideoCategory()).toUpperCase()!==Ln[i.category]){m.next=21;break}return c=o.videoId,m.next=12,Ke.o.get("videos/".concat(c));case 12:if(s=m.sent,(u=s).playlistUrl,u.thumbnailUrl,d=bt()(u,["playlistUrl","thumbnailUrl"]),h=Object(re.get)(Qo.getState(),"cogvid.cogvidListLv"),f=h.currentActiveLv,p=h["lv".concat(f)].filter,l===Rn.BRAINHIVE&&p===Bn.RECEIVED){m.next=21;break}return m.next=21,Object(Ye.h)({type:K.e.UNSHIFT_COGVID_LIST,data:{videoData:bn(bn({},d),{},{permissions:{VIDEO:{DOANYACTION:!0}},playlistUrl:""})}});case 21:return m.next=23,Object(Ye.h)({type:K.g.CREATE_COGNITIVE_VIDEO_SUCCESS});case 23:n&&n(s),m.next=31;break;case 26:return m.prev=26,m.t0=m.catch(2),m.next=30,de.e.error(m.t0);case 30:r&&r();case 31:case"end":return m.stop()}}),In,null,[[2,26]])}function $n(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.h.post("products");case 4:r=i.sent,t&&t(r),i.next=11;break;case 8:i.prev=8,i.t0=i.catch(1),n&&n(i.t0);case 11:case"end":return i.stop()}}),Mn,null,[[1,8]])}function Jn(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.productId,o.next=5,Ke.h.delete("products/".concat(i));case 5:a=o.sent,n&&n(a),o.next=12;break;case 9:o.prev=9,o.t0=o.catch(1),r&&r(o.t0);case 12:case"end":return o.stop()}}),Pn,null,[[1,9]])}function Zn(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.g.UPLOAD_RAW_FILE,Fn);case 2:return e.next=4,Object(Ye.j)(K.g.CREATE_COGNITIVE_VIDEO,Un);case 4:return e.next=6,Object(Ye.j)(K.g.CREATE_COGVID_WITH_CHAPTER_TEMPLATE,Hn);case 6:return e.next=8,Object(Ye.j)(K.g.EDIT_COGNITIVE_VIDEO,zn);case 8:return e.next=10,Object(Ye.j)(K.g.OLD_CREATE_COGNITIVE_VIDEO,Wn);case 10:return e.next=12,Object(Ye.j)(K.g.GET_MY_MEDIA_LIST,Gn);case 12:return e.next=14,Object(Ye.j)(K.g.DELETE_CREATING_COGVID_ITEM,qn);case 14:return e.next=16,Object(Ye.i)(K.g.GET_UPLOADING_FILE,Yn);case 16:return e.next=18,Object(Ye.j)(K.g.ADD_FILES_TO_GALLERY,Vn);case 18:return e.next=20,Object(Ye.i)(K.g.GET_ATTACHMENT_INFO,Kn);case 20:return e.next=22,Object(Ye.j)(K.g.ADD_CREATING_COGVID_ITEM,Xn);case 22:return e.next=24,Object(Ye.j)(K.g.CREATE_MEETING_VIDEO,Qn);case 24:return e.next=26,Object(Ye.j)(K.g.CREATE_PRODUCT_ID,$n);case 26:return e.next=28,Object(Ye.j)(K.g.DELETE_PRODUCT_ID,Jn);case 28:case"end":return e.stop()}}),Dn)}var er=r(553),tr=qe.a.mark(lr),nr=qe.a.mark(cr),rr=qe.a.mark(ur),ir=qe.a.mark(dr),ar=qe.a.mark(hr);function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lr(e){var n,r,i,a,o,s,l,c,u,d,h,f;return qe.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.currencyCode,o=n.productId,s=n.unitPrice,l=n.videoTitle,c=n.priceMode,u=n.accessGrantType,p.prev=2,p.next=5,Ke.l.post("prices",{currencyCode:a,productId:o,unitPrice:s,priceMode:c});case 5:return d=p.sent,h=d.unitPrice,f={videoId:o,data:{unitPrice:sr(sr({},h),{},{amount:s}),accessGrantType:u}},p.next=10,Object(Ye.h)({type:K.e.UPDATE_COGVID_LIST_ITEM,data:f});case 10:if(Object(re.get)(Qo.getState(),"cogvid.cogvidDetails.videoId")!==o){p.next=16;break}return p.next=14,Object(Ye.h)({type:K.e.UPDATE_COGVID_DETAILS,data:f});case 14:return p.next=16,Object(Ye.h)({type:K.e.GET_CG,data:{videoId:o}});case 16:return r&&r(f),p.next=19,de.e.success(t("message.setPriceSuccessfully",{name:l}));case 19:p.next=26;break;case 21:return p.prev=21,p.t0=p.catch(2),i&&i(),p.next=26,de.e.error(p.t0);case 26:case"end":return p.stop()}}),tr,null,[[2,21]])}function cr(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.currencyCode,a=t.productId,s.prev=2,s.next=5,Ke.l.get("prices/subsPrices/".concat(a,"/").concat(i));case 5:o=s.sent,n&&n(o),s.next=12;break;case 9:s.prev=9,s.t0=s.catch(2),r&&r();case 12:case"end":return s.stop()}}),nr,null,[[2,9]])}function ur(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.productId,o.prev=2,o.next=5,Ke.l.post("prices/subsPrices",t);case 5:return a=o.sent,o.next=8,Object(Ye.h)({type:K.e.GET_CG,data:{videoId:i}});case 8:if(de.c.isShare()){o.next=11;break}return o.next=11,Object(Ye.h)({type:K.e.UPDATE_COGVID_LIST_ITEM,data:{data:{accessGrantType:de.g.ACCESS_GRANT_TYPE.PAID},videoId:i}});case 11:n&&n(a),o.next=19;break;case 14:return o.prev=14,o.t0=o.catch(2),o.next=18,de.e.error(o.t0);case 18:r&&r();case 19:case"end":return o.stop()}}),rr,null,[[2,14]])}function dr(e){var t,n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.currencyCode,a=t.productId,o=t.agt,l.prev=2,l.next=5,Ke.l.delete("prices/subsPrices/".concat(a,"/").concat(i,"?agt=").concat(o));case 5:if(s=l.sent,de.c.isShare()){l.next=9;break}return l.next=9,Object(Ye.h)({type:K.e.UPDATE_COGVID_LIST_ITEM,data:{data:{accessGrantType:o},videoId:a}});case 9:n&&n(s),l.next=15;break;case 12:l.prev=12,l.t0=l.catch(2),r&&r();case 15:case"end":return l.stop()}}),ir,null,[[2,12]])}function hr(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.k.SET_PRICE,lr);case 2:return e.next=4,Object(Ye.j)(K.k.GET_SUBS_PRICE,cr);case 4:return e.next=6,Object(Ye.j)(K.k.SET_SUBS_PRICE,ur);case 6:return e.next=8,Object(Ye.j)(K.k.DEL_SUBS_PRICE,dr);case 8:case"end":return e.stop()}}),ar)}function fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mr=qe.a.mark(Tr),gr=qe.a.mark(kr),vr=qe.a.mark(xr),br=qe.a.mark(Or),yr=qe.a.mark(Ir),Ar=qe.a.mark(Mr),_r=qe.a.mark(Pr),wr=qe.a.mark(Dr),Er=qe.a.mark(Nr),Sr=qe.a.mark(Lr),Cr=qe.a.mark(Rr);function Tr(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.c.post("checkout",e.data);case 3:t=n.sent,e.resolve&&e.resolve(t),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),mr,null,[[0,7]])}function kr(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.c.get("carts");case 3:return t=n.sent,n.next=6,Object(Ye.h)({type:K.c.SET_CART_ITEMS,data:t});case 6:e.resolve&&e.resolve(t),n.next=14;break;case 9:return n.prev=9,n.t0=n.catch(0),n.next=13,de.e.error(n.t0);case 13:e.reject&&e.reject();case 14:case"end":return n.stop()}}),gr,null,[[0,9]])}function xr(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.c.post("carts",pr({},e.data));case 3:return t=n.sent,n.next=6,Object(Ye.h)({type:K.c.SET_CART_ITEMS,data:t});case 6:de.e.success("Successfully added to cart!"),e.resolve&&e.resolve(t),n.next=15;break;case 10:return n.prev=10,n.t0=n.catch(0),n.next=14,de.e.error(n.t0);case 14:e.reject&&e.reject();case 15:case"end":return n.stop()}}),vr,null,[[0,10]])}function Or(e){var t,n;return qe.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data.productId,r.prev=1,r.next=4,Ke.c.delete("carts/".concat(t));case 4:return n=r.sent,r.next=7,Object(Ye.h)({type:K.c.SET_CART_ITEMS,data:n});case 7:de.e.success("Successfully removed from cart!"),e.resolve&&e.resolve(),r.next=16;break;case 11:return r.prev=11,r.t0=r.catch(1),r.next=15,de.e.error(r.t0);case 15:e.reject&&e.reject();case 16:case"end":return r.stop()}}),br,null,[[1,11]])}function Ir(e){return qe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Ke.c.delete("carts");case 3:return t.next=5,Object(Ye.h)({type:K.c.SET_CART_ITEMS,data:{}});case 5:e.resolve&&e.resolve(),t.next=13;break;case 8:return t.prev=8,t.t0=t.catch(0),t.next=12,de.e.error(t.t0);case 12:e.reject&&e.reject();case 13:case"end":return t.stop()}}),yr,null,[[0,8]])}function Mr(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.data.orderId,n.prev=1,n.next=4,Ke.c.delete("orders/".concat(t));case 4:e.resolve&&e.resolve(),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(1),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),Ar,null,[[1,7]])}function Pr(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=t.pageNumber,i=t.pageSize,a=void 0===i?MY_COGVID_PAGE_SIZE:i,s.prev=2,s.next=5,Ke.c.post("orders",{pageNumber:r,pageSize:a});case 5:o=s.sent,n&&n(o),s.next=13;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:case"end":return s.stop()}}),_r,null,[[2,9]])}function Dr(e){var t,n;return qe.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data.orderId,r.prev=1,r.next=4,Ke.c.get("checkout/".concat(t));case 4:n=r.sent,e.resolve&&e.resolve(n),r.next=13;break;case 8:return r.prev=8,r.t0=r.catch(1),r.next=12,de.e.error(r.t0);case 12:e.reject&&e.reject();case 13:case"end":return r.stop()}}),wr,null,[[1,8]])}function Nr(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.data.orderId,n.prev=1,n.next=4,Ke.c.put("orders/".concat(t));case 4:e.resolve&&e.resolve(),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(1),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),Er,null,[[1,7]])}function Lr(e){var t,n,r,i,a,o,s,l,c,u,d,h;return qe.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.pageNumber,a=t.pageSize,o=void 0===a?MY_COGVID_PAGE_SIZE:a,s=t.period,l=t.fromDate,c=t.toDate,u=t.sortField,d=t.sortDir,f.prev=2,f.next=5,Ke.c.post("orders/revenueReport",{pageNumber:i,pageSize:o,period:s,fromDate:l,toDate:c,sort:{dir:d,fieldName:u}});case 5:h=f.sent,n&&n(h),f.next=14;break;case 9:return f.prev=9,f.t0=f.catch(2),r&&r(f.t0),f.next=14,de.e.error(f.t0);case 14:case"end":return f.stop()}}),Sr,null,[[2,9]])}function Rr(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.c.CHECKOUT,Tr);case 2:return e.next=4,Object(Ye.j)(K.c.GET_CART_ITEMS,kr);case 4:return e.next=6,Object(Ye.j)(K.c.ADD_ITEM_TO_CART,xr);case 6:return e.next=8,Object(Ye.j)(K.c.REMOVE_CART_ITEM,Or);case 8:return e.next=10,Object(Ye.j)(K.c.REMOVE_ALL_CART_ITEMS,Ir);case 10:return e.next=12,Object(Ye.j)(K.c.REMOVE_ORDER,Mr);case 12:return e.next=14,Object(Ye.j)(K.c.GET_ORDER_LIST,Pr);case 14:return e.next=16,Object(Ye.j)(K.c.PROCEED_ORDER,Dr);case 16:return e.next=18,Object(Ye.j)(K.c.CANCEL_ORDER,Nr);case 18:return e.next=20,Object(Ye.j)(K.c.GET_REVENUE_REPORT,Lr);case 20:case"end":return e.stop()}}),Cr)}var Br=qe.a.mark(di),jr=qe.a.mark(hi),Fr=qe.a.mark(fi),Ur=qe.a.mark(pi),Hr=qe.a.mark(mi),zr=qe.a.mark(gi),Vr=qe.a.mark(vi),Wr=qe.a.mark(bi),Gr=qe.a.mark(yi),qr=qe.a.mark(Ai),Yr=qe.a.mark(_i),Kr=qe.a.mark(wi),Xr=qe.a.mark(Ei),Qr=qe.a.mark(Si),$r=qe.a.mark(Ci),Jr=qe.a.mark(Ti),Zr=qe.a.mark(ki),ei=qe.a.mark(xi),ti=qe.a.mark(Oi),ni=qe.a.mark(Ii),ri=qe.a.mark(Mi),ii=qe.a.mark(Pi),ai=qe.a.mark(Di),oi=qe.a.mark(Ni),si=qe.a.mark(Li);function li(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ci(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?li(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):li(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ui=de.g.SHARE_VIDEO_SEARCH_PEOPLE_LIMIT;function di(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e.data,t=e.resolve,n=e.reject,s.prev=1,s.next=4,Ke.b.get("profiles",{params:{page:0,size:1e3}});case 4:r=s.sent,a=(i=r||{}).content,o=bt()(i,["content"]),t&&t(ci({items:a},o)),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,de.e.error(s.t0);case 13:n&&n(s.t0);case 14:case"end":return s.stop()}}),Br,null,[[1,9]])}function hi(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.userId,o.prev=2,o.next=5,Ke.b.get("profiles/".concat(i));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),jr,null,[[2,9]])}function fi(e){var t,n,r,i,a,o,s,l,c,u,d,h,f,p;return qe.a.wrap((function(m){for(;;)switch(m.prev=m.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.searchTerm,a=t.pageSize,o=void 0===a?1e3:a,s=t.pageNumber,l=void 0===s?0:s,c=t.excludeMyself,u=void 0===c||c,m.prev=2,m.next=5,Ke.b.post("profiles/search",{pageNumber:l,pageSize:o,scope:"PUBLIC",terms:i,excludeMyself:u});case 5:d=m.sent,f=(h=d||{}).content,p=bt()(h,["content"]),n&&n(ci({items:f},p)),m.next=15;break;case 10:return m.prev=10,m.t0=m.catch(2),m.next=14,de.e.error(m.t0);case 14:r&&r(m.t0);case 15:case"end":return m.stop()}}),Fr,null,[[2,10]])}function pi(e){var t,n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.names,a=t.limit,o=void 0===a?ui:a,l.prev=2,l.next=5,Ke.i.post("friends/myself/search",{briefProfile:!0,limit:o,names:i});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,de.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),Ur,null,[[2,9]])}function mi(e){var t,n,r,i,a,o,s,l,c,u;return qe.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.names,a=t.limit,void 0===a?ui:a,o=t.pageNumber,s=void 0===o?0:o,l=t.pageSize,c=void 0===l?ui:l,d.prev=2,d.next=5,Ke.i.post("friends2/myself/search",{briefProfile:!1,pageNumber:s,pageSize:c,names:i});case 5:u=d.sent,n&&n(u),d.next=14;break;case 9:return d.prev=9,d.t0=d.catch(2),d.next=13,de.e.error(d.t0);case 13:r&&r(d.t0);case 14:case"end":return d.stop()}}),Hr,null,[[2,9]])}function gi(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.i.get("friends2/myself/counts");case 4:r=i.sent,t&&t(r),i.next=13;break;case 8:return i.prev=8,i.t0=i.catch(1),i.next=12,de.e.error(i.t0);case 12:n&&n(i.t0);case 13:case"end":return i.stop()}}),zr,null,[[1,8]])}function vi(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e.data,t=e.resolve,n=e.reject,s.prev=1,s.next=4,Ke.i.get("friends2/myself",{params:{page:0,size:1e3}});case 4:r=s.sent,a=(i=r||{}).friends,o=bt()(i,["friends"]),t&&t(ci({items:a},o)),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,de.e.error(s.t0);case 13:n&&n(s.t0);case 14:case"end":return s.stop()}}),Vr,null,[[1,9]])}function bi(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e.data,t=e.resolve,n=e.reject,s.prev=1,s.next=4,Ke.i.get("friends2/myself/requests",{params:{page:0,size:1e3}});case 4:r=s.sent,a=(i=r||{}).friends,o=bt()(i,["friends"]),t&&t(ci({items:a},o)),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,de.e.error(s.t0);case 13:n&&n(s.t0);case 14:case"end":return s.stop()}}),Wr,null,[[1,9]])}function yi(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.userId,o.prev=2,o.next=5,Ke.i.delete("friends2/".concat(i));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Gr,null,[[2,9]])}function Ai(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.userId,o.prev=2,o.next=5,Ke.i.post("friends2/myself/requests",{receiverUserId:i,message:""});case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),qr,null,[[2,9]])}function _i(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.requestId,o.prev=2,o.next=5,Ke.i.delete("friends2/myself/requests/".concat(i));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Yr,null,[[2,9]])}function wi(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.requestId,o.prev=2,o.next=5,Ke.i.patch("friends2/myself/requests/".concat(i),{action:"accept"});case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Kr,null,[[2,9]])}function Ei(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.requestId,o.prev=2,o.next=5,Ke.i.patch("friends2/myself/requests/".concat(i),{action:"decline"});case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Xr,null,[[2,9]])}function Si(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return e.data,t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.b.get("groups");case 4:r=i.sent,t&&t({items:r}),i.next=13;break;case 8:return i.prev=8,i.t0=i.catch(1),i.next=12,de.e.error(i.t0);case 12:n&&n(i.t0);case 13:case"end":return i.stop()}}),Qr,null,[[1,8]])}function Ci(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.uid,o.prev=2,o.next=5,Ke.b.get("groups/".concat(i));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),$r,null,[[2,9]])}function Ti(e){var n,r,i,a,o,s,l;return qe.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.uid,o=n.name,s=n.description,c.prev=2,c.next=5,Ke.b.put("groups/".concat(a),{description:s,name:o});case 5:return l=c.sent,c.next=8,de.e.success(t("message.updateGroupInfoSuccessfully"));case 8:r&&r(l),c.next=16;break;case 11:return c.prev=11,c.t0=c.catch(2),c.next=15,de.e.error(c.t0);case 15:i&&i(c.t0);case 16:case"end":return c.stop()}}),Jr,null,[[2,11]])}function ki(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.uid,o.prev=2,o.next=5,Ke.b.get("groups/".concat(i,"/members"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Zr,null,[[2,9]])}function xi(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.groupId,s.prev=2,s.next=5,Ke.e.get("videos/".concat(i,"/").concat(a,"/members"));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),ei,null,[[2,9]])}function Oi(e){var n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.uid,o=n.members,l.prev=2,l.next=5,Ke.b.post("groups/".concat(a,"/members"),o);case 5:return s=l.sent,l.next=8,de.e.success(t("message.addGroupMemberSuccessfully"));case 8:r&&r(s),l.next=16;break;case 11:return l.prev=11,l.t0=l.catch(2),l.next=15,de.e.error(l.t0);case 15:i&&i(l.t0);case 16:case"end":return l.stop()}}),ti,null,[[2,11]])}function Ii(e){var n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.uid,o=n.members,l.prev=2,l.next=5,Ke.b.put("groups/".concat(a,"/members"),o);case 5:return s=l.sent,l.next=8,de.e.success(t("message.removeGroupMemberSuccessfully"));case 8:r&&r(s),l.next=16;break;case 11:return l.prev=11,l.t0=l.catch(2),l.next=15,de.e.error(l.t0);case 15:i&&i(l.t0);case 16:case"end":return l.stop()}}),ni,null,[[2,11]])}function Mi(e){var n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.name,o=n.description,l.prev=2,l.next=5,Ke.b.post("groups",{name:a,description:o});case 5:return s=l.sent,l.next=8,de.e.success(t("message.createGroupSuccessfully",{name:a}));case 8:r&&r(s),l.next=16;break;case 11:return l.prev=11,l.t0=l.catch(2),l.next=15,de.e.error(l.t0);case 15:i&&i(l.t0);case 16:case"end":return l.stop()}}),ri,null,[[2,11]])}function Pi(e){var n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return n=e.data,r=e.resolve,i=e.reject,s.prev=1,(a=new FormData).append("file",n.file,n.file.name),s.next=6,Ke.b.post("groups/".concat(n.uid,"/avatar"),a,{headers:{"Content-Type":"multipart/form-data; boundary=".concat(a._boundary)}});case 6:return o=s.sent,s.next=9,de.e.success(t("message.updateGroupAvatarSuccessfully"));case 9:r&&r(o),s.next=17;break;case 12:return s.prev=12,s.t0=s.catch(1),s.next=16,de.e.error(s.t0);case 16:i&&i(s.t0);case 17:case"end":return s.stop()}}),ii,null,[[1,12]])}function Di(e){var n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.uid,o=n.name,l.prev=2,l.next=5,Ke.b.delete("groups/".concat(a));case 5:return s=l.sent,l.next=8,de.e.success(t("message.deleteGroupSuccessfully",{name:o}));case 8:r&&r(s),l.next=16;break;case 11:return l.prev=11,l.t0=l.catch(2),l.next=15,de.e.error(l.t0);case 15:i&&i(l.t0);case 16:case"end":return l.stop()}}),ai,null,[[2,11]])}function Ni(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.b.get("groups/count");case 4:r=i.sent,t&&t(r),i.next=13;break;case 8:return i.prev=8,i.t0=i.catch(1),i.next=12,de.e.error(i.t0);case 12:n&&n(i.t0);case 13:case"end":return i.stop()}}),oi,null,[[1,8]])}function Li(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.i.GET_PEOPLE_LIST,di);case 2:return e.next=4,Object(Ye.j)(K.i.GET_PEOPLE_DETAILS,hi);case 4:return e.next=6,Object(Ye.j)(K.i.SEARCH_PEOPLE,fi);case 6:return e.next=8,Object(Ye.j)(K.i.GET_FRIENDSHIP_STATUS,gi);case 8:return e.next=10,Object(Ye.j)(K.i.GET_FRIEND_LIST,vi);case 10:return e.next=12,Object(Ye.j)(K.i.GET_REQUEST_LIST,bi);case 12:return e.next=14,Object(Ye.j)(K.i.UNFRIEND,yi);case 14:return e.next=16,Object(Ye.j)(K.i.SEND_FRIEND_REQUEST,Ai);case 16:return e.next=18,Object(Ye.j)(K.i.CANCEL_FRIEND_REQUEST,_i);case 18:return e.next=20,Object(Ye.j)(K.i.CONFIRM_FRIEND_REQUEST,wi);case 20:return e.next=22,Object(Ye.j)(K.i.SEARCH_FRIENDS,pi);case 22:return e.next=24,Object(Ye.j)(K.i.SEARCH_FRIENDS_2,mi);case 24:return e.next=26,Object(Ye.j)(K.i.DECLINE_FRIEND_REQUEST,Ei);case 26:return e.next=28,Object(Ye.j)(K.i.GET_GROUP_LIST,Si);case 28:return e.next=30,Object(Ye.j)(K.i.GET_GROUP_DETAIL,Ci);case 30:return e.next=32,Object(Ye.j)(K.i.UPDATE_GROUP_INFO,Ti);case 32:return e.next=34,Object(Ye.j)(K.i.GET_GROUP_MEMBER,ki);case 34:return e.next=36,Object(Ye.j)(K.i.GET_GROUP_MEMBER_BY_VIDEO,xi);case 36:return e.next=38,Object(Ye.j)(K.i.ADD_GROUP_MEMBER,Oi);case 38:return e.next=40,Object(Ye.j)(K.i.REMOVE_GROUP_MEMBER,Ii);case 40:return e.next=42,Object(Ye.j)(K.i.UPLOAD_GROUP_AVATAR,Pi);case 42:return e.next=44,Object(Ye.j)(K.i.CREATE_GROUP,Mi);case 44:return e.next=46,Object(Ye.j)(K.i.DELETE_GROUP,Di);case 46:return e.next=48,Object(Ye.j)(K.i.GET_GROUP_COUNT,Ni);case 48:case"end":return e.stop()}}),si)}var Ri=qe.a.mark(qi),Bi=qe.a.mark(Yi),ji=qe.a.mark(Ki),Fi=qe.a.mark(Xi),Ui=qe.a.mark(Qi),Hi=qe.a.mark($i),zi=qe.a.mark(Ji),Vi=qe.a.mark(Zi),Wi=qe.a.mark(ea),Gi=qe.a.mark(ta);function qi(e){var t,n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.lastId,a=t.pageSize,l.prev=2,l.next=5,Ke.j.get("notifications/myself",{params:{lastId:i,pageSize:a}});case 5:return o=l.sent,s=o.noNewSharedVideos,l.next=9,Object(Ye.h)({type:K.h.UPDATE_NO_NEW_NOTIFICATIONS,data:0});case 9:return l.next=11,Object(Ye.h)({type:K.h.UPDATE_NO_NEW_SHARED_VIDEO,data:s});case 11:n&&n(o),l.next=19;break;case 14:return l.prev=14,l.t0=l.catch(2),r&&r(),l.next=19,de.e.error(l.t0);case 19:case"end":return l.stop()}}),Ri,null,[[2,14]])}function Yi(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.resolve,n=e.reject,s.prev=1,s.next=4,Ke.j.get("users/myself/statistics");case 4:return r=s.sent,i=r.noNewNotifications,a=r.noNewSharedVideos,o=r.noNewSharedMessageVideos,s.next=8,Object(Ye.h)({type:K.h.UPDATE_NOTIFICATION_STATE,data:{noNewNotifications:i,noNewSharedVideos:a,noNewSharedMessageVideos:o}});case 8:t&&t(r),s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),n&&n();case 14:case"end":return s.stop()}}),Bi,null,[[1,11]])}function Ki(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.quantities,o.prev=2,o.next=5,Ke.j.patch("users/myself/statistics",{quantities:i});case 5:return a=o.sent,o.next=8,Object(Ye.h)({type:K.h.UPDATE_NO_NEW_NOTIFICATIONS,data:0});case 8:n&&n(a),o.next=16;break;case 11:return o.prev=11,o.t0=o.catch(2),r&&r(),o.next=16,de.e.error(o.t0);case 16:case"end":return o.stop()}}),ji,null,[[2,11]])}function Xi(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.id,a=t.status,s.prev=2,s.next=5,Ke.j.patch("notifications/".concat(i),{status:a});case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),r&&r(),s.next=14,de.e.error(s.t0);case 14:case"end":return s.stop()}}),Fi,null,[[2,9]])}function Qi(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.id,o.prev=2,o.next=5,Ke.j.delete("notifications/".concat(i));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),r&&r(),o.next=14,de.e.error(o.t0);case 14:case"end":return o.stop()}}),Ui,null,[[2,9]])}function $i(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.fromId,o.prev=2,o.next=5,Ke.j.patch("notifications/".concat(i,"/markAllRead"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),r&&r(),o.next=14,de.e.error(o.t0);case 14:case"end":return o.stop()}}),Hi,null,[[2,9]])}function Ji(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.j.patch("users/myself/tracking",{trackingObject:"BrainHive"});case 4:return r=i.sent,i.next=7,Object(Ye.h)({type:K.h.UPDATE_NO_NEW_SHARED_VIDEO,data:0});case 7:t&&t(r),i.next=15;break;case 10:return i.prev=10,i.t0=i.catch(1),n&&n(),i.next=15,de.e.error(i.t0);case 15:case"end":return i.stop()}}),zi,null,[[1,10]])}function Zi(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,Ke.j.patch("users/myself/tracking",{trackingObject:"Message"});case 4:return r=i.sent,i.next=7,Object(Ye.h)({type:K.h.UPDATE_NOTIFICATION_STATE,data:{noNewSharedMessageVideos:0}});case 7:t&&t(r),i.next=15;break;case 10:return i.prev=10,i.t0=i.catch(1),n&&n(),i.next=15,de.e.error(i.t0);case 15:case"end":return i.stop()}}),Vi,null,[[1,10]])}function ea(e){var t,n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,l.prev=1,i=t.trackingObject,a=t.trackingProperty,o=t.maxReadValue,l.next=5,Ke.j.post("trackings",{trackingObject:i,trackingProperty:a,maxReadValue:o});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(1),r&&r(),l.next=14,de.e.error(l.t0);case 14:case"end":return l.stop()}}),Wi,null,[[1,9]])}function ta(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.h.GET_NOTIFICATIONS,qi);case 2:return e.next=4,Object(Ye.j)(K.h.GET_NOTIFICATIONS_STATISTICS,Yi);case 4:return e.next=6,Object(Ye.j)(K.h.REDUCE_NOTIFICATIONS_STATISTICS,Ki);case 6:return e.next=8,Object(Ye.j)(K.h.UPDATE_NOTIFICATION,Xi);case 8:return e.next=10,Object(Ye.j)(K.h.DELETE_NOTIFICATION,Qi);case 10:return e.next=12,Object(Ye.j)(K.h.MARK_ALL_AS_READ,$i);case 12:return e.next=14,Object(Ye.j)(K.h.RESET_NO_NEW_SHARED_VIDEO,Ji);case 14:return e.next=16,Object(Ye.j)(K.h.RESET_NO_NEW_SHARED_MESSAGE_VIDEOS,Zi);case 16:return e.next=18,Object(Ye.j)(K.h.UPDATE_TRACKING_OBJECT,ea);case 18:case"end":return e.stop()}}),Gi)}function na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?na(Object(n),!0).forEach((function(t){ne()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):na(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ia=qe.a.mark(wa),aa=qe.a.mark(Ea),oa=qe.a.mark(Sa),sa=qe.a.mark(Ca),la=qe.a.mark(Ta),ca=qe.a.mark(ka),ua=qe.a.mark(xa),da=qe.a.mark(Oa),ha=qe.a.mark(Ia),fa=qe.a.mark(Ma),pa=qe.a.mark(Pa),ma=qe.a.mark(Da),ga=qe.a.mark(Na),va=qe.a.mark(La),ba=qe.a.mark(Ra),ya=qe.a.mark(Ba),Aa=qe.a.mark(ja),_a=de.g.DUMMY_DAILY_VIDEO_ID_PREFIX;function wa(e){var t,n,r,i,a,o,s,l;return qe.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,a=t.pageNumber,o=t.pageSize,s=t.category,c.prev=2,c.next=5,Ke.d.get("chapters/".concat(i,"/comments"),{params:{page:a,size:o,category:s}});case 5:l=c.sent,n&&n(l),c.next=14;break;case 9:return c.prev=9,c.t0=c.catch(2),c.next=13,de.e.error(c.t0);case 13:r&&r();case 14:case"end":return c.stop()}}),ia,null,[[2,9]])}function Ea(e){var t,n,r,i,a,o,s,l,c,u;return qe.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,a=t.parentCommentId,o=t.userScaffId,s=t.text,l=t.lastPostedAt,c=t.category,d.prev=2,d.next=5,Ke.d.post("chapters/".concat(i,"/comments"),{parentCommentId:a,text:s,lastPostedAt:l,category:c,scaffoldingId:o});case 5:u=d.sent,n&&n(u),d.next=14;break;case 9:return d.prev=9,d.t0=d.catch(2),d.next=13,de.e.error(d.t0);case 13:r&&r();case 14:case"end":return d.stop()}}),aa,null,[[2,9]])}function Sa(e){var t,n,r,i,a,o,s,l;return qe.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,a=t.commentId,o=t.parentCommentId,s=t.text,c.prev=2,c.next=5,Ke.d.put("chapters/".concat(i,"/comments/").concat(a),{parentCommentId:o,text:s});case 5:l=c.sent,n&&n(l),c.next=14;break;case 9:return c.prev=9,c.t0=c.catch(2),c.next=13,de.e.error(c.t0);case 13:r&&r();case 14:case"end":return c.stop()}}),oa,null,[[2,9]])}function Ca(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,a=t.commentId,s.prev=2,s.next=5,Ke.d.delete("chapters/".concat(i,"/comments/").concat(a));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),sa,null,[[2,9]])}function Ta(e){var t,n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,a=t.pageNumber,o=t.pageSize,l.prev=2,l.next=5,Ke.d.get("chapters/".concat(i,"/notes"),{params:{page:a,size:o}});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,de.e.error(l.t0);case 13:r&&r();case 14:case"end":return l.stop()}}),la,null,[[2,9]])}function ka(e){var t,n,r,i,a,o,s,l,c,u,d,h,f;return qe.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:if(t=e.data,n=e.resolve,r=e.reject,i=t.userScaffId,a=t.text,o=t.lastPostedAt,s=t.seqNumber,l=t.chapterId,u=Object(re.get)(Qo.getState(),"cogvid.cogvidDetails.videoId"),d=u.includes(_a),p.prev=5,!d){p.next=12;break}return p.next=9,Object(gn.b)({data:{reloadCg:!1}});case 9:h=p.sent,void 0!==s&&(l=Object(re.get)(h.chapters[s],"uid",l)),c=h.videoId;case 12:return p.next=14,Ke.d.post("chapters/".concat(l,"/notes"),{text:a,lastPostedAt:o,scaffoldingId:i});case 14:if(f=p.sent,!d){p.next=20;break}return p.next=18,Object(gn.c)({data:{videoId:c,dummyDailyVideoId:u}});case 18:return p.next=20,Object(Ye.h)({data:{chapterId:l},type:K.d.UPDATE_DISPLAY_NOTES});case 20:n&&n(ra(ra({},f),{},{videoId:c,chapterId:l})),p.next=28;break;case 23:return p.prev=23,p.t0=p.catch(5),p.next=27,de.e.error(p.t0);case 27:r&&r();case 28:case"end":return p.stop()}}),ca,null,[[5,23]])}function xa(e){var t,n,r,i,a,o,s;return qe.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,a=t.noteId,o=t.text,l.prev=2,l.next=5,Ke.d.put("chapters/".concat(i,"/notes/").concat(a),{text:o});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,de.e.error(l.t0);case 13:r&&r();case 14:case"end":return l.stop()}}),ua,null,[[2,9]])}function Oa(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,a=t.noteId,s.prev=2,s.next=5,Ke.d.delete("chapters/".concat(i,"/notes/").concat(a));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),da,null,[[2,9]])}function Ia(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,a=t.category,s.prev=2,s.next=5,Ke.d.get("chapters/".concat(i,"/likes"),{params:{category:a}});case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),ha,null,[[2,9]])}function Ma(e){var n,r,i,a,o,s,l,c;return qe.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.productId,o=n.comment,s=n.stars,l=n.title,u.prev=2,u.next=5,Ke.d.post("ratings",{productId:a,comment:o,stars:s});case 5:return c=u.sent,u.next=8,de.e.success(t("message.ratingResourceSuccessfully",{name:l}));case 8:r&&r(c),u.next=16;break;case 11:return u.prev=11,u.t0=u.catch(2),u.next=15,de.e.error(u.t0);case 15:i&&i();case 16:case"end":return u.stop()}}),fa,null,[[2,11]])}function Pa(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.productId,a=t.stars,s.prev=2,s.next=5,Ke.d.get("ratings/".concat(i),{params:{stars:a}});case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),pa,null,[[2,9]])}function Da(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.productId,o.prev=2,o.next=5,Ke.d.get("ratings/".concat(i,"/myRating"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),ma,null,[[2,9]])}function Na(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.productId,t.stars,o.prev=2,o.next=5,Ke.d.get("ratings/".concat(i,"/sum"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,de.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),ga,null,[[2,9]])}function La(e){var n,r,i,a,o,s,l,c,u;return qe.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.ratingId,o=n.title,s=n.comment,l=n.stars,c=n.productId,d.prev=2,d.next=5,Ke.d.put("ratings/".concat(a),{comment:s,stars:l,productId:c});case 5:return u=d.sent,d.next=8,de.e.success(t("message.ratingResourceSuccessfully",{name:o}));case 8:r&&r(u),d.next=16;break;case 11:return d.prev=11,d.t0=d.catch(2),d.next=15,de.e.error(d.t0);case 15:i&&i();case 16:case"end":return d.stop()}}),va,null,[[2,11]])}function Ra(e){var n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.ratingId,s.prev=2,s.next=5,Ke.d.delete("ratings/".concat(a));case 5:return o=s.sent,s.next=8,de.e.success(t("message.deleteRatingSuccessfully"));case 8:r&&r(o),s.next=16;break;case 11:return s.prev=11,s.t0=s.catch(2),s.next=15,de.e.error(s.t0);case 15:i&&i();case 16:case"end":return s.stop()}}),ba,null,[[2,11]])}function Ba(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.productId,o.next=5,de.c.checkCanAnoynymousLike(i);case 5:if(o.sent){o.next=9;break}return n&&n(),o.abrupt("return");case 9:return o.next=11,Ke.d.post("productLikes/".concat(i));case 11:a=o.sent,n&&n(a),o.next=20;break;case 15:return o.prev=15,o.t0=o.catch(1),o.next=19,de.e.error(o.t0);case 19:r&&r(o.t0);case 20:case"end":return o.stop()}}),ya,null,[[1,15]])}function ja(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.d.GET_CHAPTER_COMMENTS,wa);case 2:return e.next=4,Object(Ye.j)(K.d.ADD_CHAPTER_COMMENT,Ea);case 4:return e.next=6,Object(Ye.j)(K.d.UPDATE_CHAPTER_COMMENT,Sa);case 6:return e.next=8,Object(Ye.j)(K.d.DELETE_CHAPTER_COMMENT,Ca);case 8:return e.next=10,Object(Ye.j)(K.d.GET_CHAPTER_NOTES,Ta);case 10:return e.next=12,Object(Ye.j)(K.d.ADD_CHAPTER_NOTE,ka);case 12:return e.next=14,Object(Ye.j)(K.d.UPDATE_CHAPTER_NOTE,xa);case 14:return e.next=16,Object(Ye.j)(K.d.DELETE_CHAPTER_NOTE,Oa);case 16:return e.next=18,Object(Ye.j)(K.d.GET_CHAPTER_LIKES,Ia);case 18:return e.next=20,Object(Ye.j)(K.d.RATING_PRODUCT,Ma);case 20:return e.next=22,Object(Ye.j)(K.d.GET_PRODUCT_RATINGS,Pa);case 22:return e.next=24,Object(Ye.j)(K.d.GET_PRODUCT_MY_RATING,Da);case 24:return e.next=26,Object(Ye.j)(K.d.GET_PRODUCT_SUMMARY_RATING,Na);case 26:return e.next=28,Object(Ye.j)(K.d.UPDATE_RATING,La);case 28:return e.next=30,Object(Ye.j)(K.d.DELETE_RATING,Ra);case 30:return e.next=32,Object(Ye.j)(K.d.LIKE_PRODUCT,Ba);case 32:case"end":return e.stop()}}),Aa)}var Fa=qe.a.mark(Ka),Ua=qe.a.mark(Xa),Ha=qe.a.mark(Qa),za=qe.a.mark($a),Va=qe.a.mark(Ja),Wa=qe.a.mark(Za),Ga=qe.a.mark(eo),qa=qe.a.mark(to),Ya=qe.a.mark(no);function Ka(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.schedUid,o.prev=2,o.next=5,Ke.p.post("meeting/".concat(i));case 5:return a=o.sent,o.next=8,Object(Ye.h)({type:K.n.START_MEETING_SUCCESS,data:a});case 8:n&&n(a.attendee||null),o.next=16;break;case 11:return o.prev=11,o.t0=o.catch(2),r&&r(),o.next=16,de.e.error(o.t0);case 16:case"end":return o.stop()}}),Fa,null,[[2,11]])}function Xa(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.meetUid,o.prev=2,o.next=5,Ke.p.put("meeting/".concat(i));case 5:return a=o.sent,o.next=8,Object(Ye.h)({type:K.n.JOIN_MEETING_SUCCESS,data:a});case 8:n&&n(a),o.next=16;break;case 11:return o.prev=11,o.t0=o.catch(2),r&&r(),o.next=16,de.e.error(o.t0);case 16:case"end":return o.stop()}}),Ua,null,[[2,11]])}function Qa(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.meetUid,o.prev=2,o.next=5,Ke.p.delete("meeting/".concat(i));case 5:return a=o.sent,o.next=8,Object(Ye.h)({type:K.n.END_MEETING_SUCCESS});case 8:n&&n(a),o.next=16;break;case 11:return o.prev=11,o.t0=o.catch(2),r&&r(),o.next=16,de.e.error(o.t0);case 16:case"end":return o.stop()}}),Ha,null,[[2,11]])}function $a(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.meetUid,o.prev=2,o.next=5,Ke.p.get("meeting/".concat(i));case 5:return a=o.sent,o.next=8,Object(Ye.h)({type:K.n.GET_MEETING_INFO_SUCCESS,data:a});case 8:n&&n(a),o.next=16;break;case 11:return o.prev=11,o.t0=o.catch(2),r&&r(),o.next=16,de.e.error(o.t0);case 16:case"end":return o.stop()}}),za,null,[[2,11]])}function Ja(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.schedUid,o.prev=2,o.next=5,Ke.p.get("meeting/".concat(i,"/participants"));case 5:return a=o.sent,o.next=8,Object(Ye.h)({type:K.n.GET_ALL_PARTICIPANT_SUCCESS,data:a});case 8:n&&n(a),o.next=16;break;case 11:return o.prev=11,o.t0=o.catch(2),r&&r(),o.next=16,de.e.error(o.t0);case 16:case"end":return o.stop()}}),Va,null,[[2,11]])}function Za(e){var t,n;return qe.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data,e.resolve,n=e.reject,t.meetingId,r.prev=2,r.abrupt("return","");case 6:return r.prev=6,r.t0=r.catch(2),n&&n(),r.next=11,de.e.error(r.t0);case 11:case"end":return r.stop()}}),Wa,null,[[2,6]])}function eo(e){var t,n,r,i,a;return qe.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.meetUid,o.prev=2,o.next=5,Ke.p.post("meeting/".concat(i,"/recording"));case 5:return a=o.sent,o.next=8,Object(Ye.h)({type:K.n.SET_MEDIA_PIPELINE,data:a});case 8:n&&n(a),o.next=16;break;case 11:return o.prev=11,o.t0=o.catch(2),r&&r(),o.next=16,de.e.error(o.t0);case 16:case"end":return o.stop()}}),Ga,null,[[2,11]])}function to(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.meetUid,a=t.mediaPipelineId,s.prev=2,s.next=5,Ke.p.delete("meeting/".concat(i,"/recording/").concat(a));case 5:return o=s.sent,s.next=8,Object(Ye.h)({type:K.n.SET_MEDIA_PIPELINE,data:""});case 8:n&&n(o),s.next=16;break;case 11:return s.prev=11,s.t0=s.catch(2),r&&r(),s.next=16,de.e.error(s.t0);case 16:case"end":return s.stop()}}),qa,null,[[2,11]])}function no(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.n.START_MEETING,Ka);case 2:return e.next=4,Object(Ye.j)(K.n.JOIN_MEETING,Xa);case 4:return e.next=6,Object(Ye.j)(K.n.CREATE_GET_ATTENDEE_CALLBACK,Za);case 6:return e.next=8,Object(Ye.j)(K.n.END_MEETING,Qa);case 8:return e.next=10,Object(Ye.j)(K.n.GET_MEETING_INFO,$a);case 10:return e.next=12,Object(Ye.j)(K.n.GET_ALL_PARTICIPANT,Ja);case 12:return e.next=14,Object(Ye.j)(K.n.START_RECORD_MEETING,eo);case 14:return e.next=16,Object(Ye.j)(K.n.STOP_RECORD_MEETING,to);case 16:case"end":return e.stop()}}),Ya)}var ro=qe.a.mark(Co),io=qe.a.mark(To),ao=qe.a.mark(ko),oo=qe.a.mark(xo),so=qe.a.mark(Oo),lo=qe.a.mark(Io),co=qe.a.mark(Mo),uo=qe.a.mark(Po),ho=qe.a.mark(Do),fo=qe.a.mark(No),po=qe.a.mark(Lo),mo=qe.a.mark(Ro),go=qe.a.mark(Bo),vo=qe.a.mark(jo),bo=qe.a.mark(Fo),yo=qe.a.mark(Uo),Ao=qe.a.mark(Ho),_o=qe.a.mark(zo),wo=qe.a.mark(Vo),Eo=qe.a.mark(Wo),So=qe.a.mark(Go);function Co(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.n.get("subscriptions");case 3:t=n.sent,e.resolve&&e.resolve(t),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),ro,null,[[0,7]])}function To(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.n.post("subscriptions/checkout",e.data);case 3:t=n.sent,e.resolve&&e.resolve(t),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),io,null,[[0,7]])}function ko(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.n.get("subscriptions/options");case 3:return t=n.sent,n.next=6,Object(Ye.h)({type:K.m.SET_MY_SUB_OPTIONS,data:t||{}});case 6:e.resolve&&e.resolve(t),n.next=14;break;case 9:return n.prev=9,n.t0=n.catch(0),n.next=13,de.e.error(n.t0);case 13:e.reject&&e.reject();case 14:case"end":return n.stop()}}),ao,null,[[0,9]])}function xo(e){var t,n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,t=e.data,n=(null==t?void 0:t.productName)?"subscriptions/systemProductPlans?pName="+t.productName:"subscriptions/systemProductPlans",i.next=5,Ke.n.get(n);case 5:r=i.sent,e.resolve&&e.resolve(r),i.next=14;break;case 9:return i.prev=9,i.t0=i.catch(0),i.next=13,de.e.error(i.t0);case 13:e.reject&&e.reject();case 14:case"end":return i.stop()}}),oo,null,[[0,9]])}function Oo(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,e.productName?"subscriptions/planOptionTypes?pName="+e.productName:"subscriptions/systemProductPlans",n.next=4,Ke.n.get("subscriptions/planOptionTypes");case 4:t=n.sent,e.resolve&&e.resolve(t),n.next=13;break;case 8:return n.prev=8,n.t0=n.catch(0),n.next=12,de.e.error(n.t0);case 12:e.reject&&e.reject();case 13:case"end":return n.stop()}}),so,null,[[0,8]])}function Io(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.n.post("subscriptions/subscribePlan",{kbPlanName:e.data});case 3:t=n.sent,e.resolve&&e.resolve(t),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),lo,null,[[0,7]])}function Mo(e){var t,n,r,i;return qe.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,t=e.data,n=t.subsId,r=t.planName,a.next=4,Ke.n.put("subscriptions/"+n,{targetPlanName:r});case 4:i=a.sent,e.resolve&&e.resolve(i),a.next=13;break;case 8:return a.prev=8,a.t0=a.catch(0),a.next=12,de.e.error(a.t0);case 12:e.reject&&e.reject();case 13:case"end":return a.stop()}}),co,null,[[0,8]])}function Po(e){var t,n;return qe.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,t=e.data.subsId,r.next=4,Ke.n.delete("subscriptions/"+t+"?immediate=true");case 4:return n=r.sent,r.next=7,Object(Ye.h)({type:K.m.SET_MY_SUB_OPTIONS,data:{}});case 7:e.resolve&&e.resolve(n),r.next=15;break;case 10:return r.prev=10,r.t0=r.catch(0),r.next=14,de.e.error(r.t0);case 14:e.reject&&e.reject();case 15:case"end":return r.stop()}}),uo,null,[[0,10]])}function Do(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.n.get("subscriptions/paymentMethods");case 3:t=n.sent,e.resolve&&e.resolve(t),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),ho,null,[[0,7]])}function No(e){var n,r,i,a,o,s,l;return qe.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,n=e.data,r=n.isAddPaymentMethod,i=n.kbSubscriberId,a=n.kbPlanName,o=n.sessionId,s=n.defaultPaymentMethod,c.next=4,Ke.n.post("subscriptions/addPaymentMethod",{kbPlanName:a,kbSubscriberId:i,paymentGatewayPluginName:"killbill-stripe",paymentGatewayPluginProperties:{sessionId:o},defaultPaymentMethod:s});case 4:return l=c.sent,c.next=7,Object(Ye.h)({type:K.m.GET_MY_SUB_OPTIONS});case 7:r?de.e.success(t("message.addPaymentMethodSuccessfully")):de.e.success(t("modal.paymentSuccessTitle")),e.resolve&&e.resolve(l),c.next=16;break;case 11:return c.prev=11,c.t0=c.catch(0),c.next=15,de.e.error(c.t0);case 15:e.reject&&e.reject();case 16:case"end":return c.stop()}}),fo,null,[[0,11]])}function Lo(e){var t,n;return qe.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data.methodId,r.prev=1,r.next=4,Ke.n.put("subscriptions/paymentMethods/"+t+"/setDefault");case 4:n=r.sent,de.e.success("Successfully set the default payment method."),e.resolve&&e.resolve(n),r.next=14;break;case 9:return r.prev=9,r.t0=r.catch(1),r.next=13,de.e.error(r.t0);case 13:e.reject&&e.reject();case 14:case"end":return r.stop()}}),po,null,[[1,9]])}function Ro(e){var n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return n=e.data.methodId,i.prev=1,i.next=4,Ke.n.delete("subscriptions/paymentMethods/"+n);case 4:r=i.sent,de.e.success(t("message.paymentMethodDeleted")),e.resolve&&e.resolve(r),i.next=14;break;case 9:return i.prev=9,i.t0=i.catch(1),i.next=13,de.e.error(i.t0);case 13:e.reject&&e.reject();case 14:case"end":return i.stop()}}),mo,null,[[1,9]])}function Bo(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.n.get("subscriptions/connectedAccounts?includedDelete=false");case 3:t=n.sent,e.resolve&&e.resolve(t),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),go,null,[[0,7]])}function jo(e){var t,n,r,i;return qe.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=window.location.origin,n=e.data,r={refreshUrl:t+"/purchase/api/v0/subscriptions/connectedAccounts/{accountId}/submitLink",returnUrl:t,accountType:"express",firstName:n.firstname,lastName:n.lastname,emailAddress:n.emailAddress,defaultAccount:n.isDefault},a.prev=3,a.next=6,Ke.n.post("subscriptions/connectedAccounts",r);case 6:i=a.sent,de.e.success("Successfully save payout account. Redirecting to Stripe website."),e.resolve&&e.resolve(i),a.next=16;break;case 11:return a.prev=11,a.t0=a.catch(3),a.next=15,de.e.error(a.t0);case 15:e.reject&&e.reject();case 16:case"end":return a.stop()}}),vo,null,[[3,11]])}function Fo(e){var t,n;return qe.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data.accountId,r.prev=1,r.next=4,Ke.n.put("subscriptions/connectedAccounts/"+t+"/setDefault");case 4:n=r.sent,e.resolve&&e.resolve(n),r.next=13;break;case 8:return r.prev=8,r.t0=r.catch(1),r.next=12,de.e.error(r.t0);case 12:e.reject&&e.reject();case 13:case"end":return r.stop()}}),bo,null,[[1,8]])}function Uo(e){var t,n,r,i,a,o;return qe.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=t.accountId,r=t.refreshUrl,i=t.returnUrl,a={refreshUrl:r,returnUrl:i},s.prev=2,s.next=5,Ke.n.put("subscriptions/connectedAccounts/"+n+"/submitLink",a);case 5:o=s.sent,e.resolve&&e.resolve(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,de.e.error(s.t0);case 13:e.reject&&e.reject();case 14:case"end":return s.stop()}}),yo,null,[[2,9]])}function Ho(e){var t,n;return qe.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data.accountId,r.prev=1,r.next=4,Ke.n.delete("subscriptions/connectedAccounts/"+t);case 4:n=r.sent,e.resolve&&e.resolve(n),r.next=13;break;case 8:return r.prev=8,r.t0=r.catch(1),r.next=12,de.e.error(r.t0);case 12:e.reject&&e.reject();case 13:case"end":return r.stop()}}),Ao,null,[[1,8]])}function zo(e){var t,n,r,i;return qe.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,t=e.data,n=t.courseId,r=bt()(t,["courseId"]),a.next=4,Ke.n.put("courseSubs/"+n,r);case 4:i=a.sent,e.resolve&&e.resolve(i),a.next=13;break;case 8:return a.prev=8,a.t0=a.catch(0),a.next=12,de.e.error(a.t0);case 12:e.reject&&e.reject();case 13:case"end":return a.stop()}}),_o,null,[[0,8]])}function Vo(e){var t;return qe.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Ke.n.get("courseSubs");case 3:t=n.sent,e.resolve&&e.resolve(t),n.next=12;break;case 7:return n.prev=7,n.t0=n.catch(0),n.next=11,de.e.error(n.t0);case 11:e.reject&&e.reject();case 12:case"end":return n.stop()}}),wo,null,[[0,7]])}function Wo(e){var n,r;return qe.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,n=e.data.courseId,i.next=4,Ke.n.delete("courseSubs/"+n);case 4:return r=i.sent,i.next=7,Object(Ye.h)({type:K.e.UPDATE_COGVID_LIST_ITEM,data:{data:{plan:0,offers:[de.g.SUB_OFFER.VIEW_VIDEOS]},videoId:n}});case 7:return e.resolve&&e.resolve(r),i.next=10,de.e.success(t("message.cancelCourseSubscriptionSuccessfully"));case 10:i.next=17;break;case 12:return i.prev=12,i.t0=i.catch(0),i.next=16,de.e.error(i.t0);case 16:e.reject&&e.reject();case 17:case"end":return i.stop()}}),Eo,null,[[0,12]])}function Go(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.j)(K.m.GET_MY_SUBSCRIPTIONS,Co);case 2:return e.next=4,Object(Ye.j)(K.m.CHECKOUT,To);case 4:return e.next=6,Object(Ye.j)(K.m.GET_MY_SUB_OPTIONS,ko);case 6:return e.next=8,Object(Ye.j)(K.m.GET_SUBSCRIPTION_PLANS,xo);case 8:return e.next=10,Object(Ye.j)(K.m.GET_SUBSCRIPTION_OPTIONS,Oo);case 10:return e.next=12,Object(Ye.j)(K.m.SUBSCRIBE_TO_PLAN,Io);case 12:return e.next=14,Object(Ye.j)(K.m.CHANGE_PLAN,Mo);case 14:return e.next=16,Object(Ye.j)(K.m.UNSUBSCRIBE_PLAN,Po);case 16:return e.next=18,Object(Ye.j)(K.m.GET_MY_PAYMENT_METHODS,Do);case 18:return e.next=20,Object(Ye.j)(K.m.ADD_PAYMENT_METHOD,No);case 20:return e.next=22,Object(Ye.j)(K.m.SET_DEFAULT_PAYMENT_METHOD,Lo);case 22:return e.next=24,Object(Ye.j)(K.m.DELETE_PAYMENT_METHOD,Ro);case 24:return e.next=26,Object(Ye.j)(K.m.GET_MY_PAYOUT_ACCOUNTS,Bo);case 26:return e.next=28,Object(Ye.j)(K.m.ADD_PAYOUT_ACCOUNT,jo);case 28:return e.next=30,Object(Ye.j)(K.m.SET_DEFAULT_PAYOUT_ACCOUNT,Fo);case 30:return e.next=32,Object(Ye.j)(K.m.SUBMIT_ACCOUNT_INFO,Uo);case 32:return e.next=34,Object(Ye.j)(K.m.DELETE_PAYOUT_ACCOUNT,Ho);case 34:return e.next=36,Object(Ye.j)(K.m.UPDATE_COURSE_SUBSCRIPTION,zo);case 36:return e.next=38,Object(Ye.j)(K.m.GET_MY_SUBSCRIBED_COURSES,Vo);case 38:return e.next=40,Object(Ye.j)(K.m.CANCEL_COURSE_SUBSCRIPTION,Wo);case 40:case"end":return e.stop()}}),So)}var qo=qe.a.mark(Yo);function Yo(){return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ye.a)([Object(Ye.g)(mn),Object(Ye.g)(gt),Object(Ye.g)(Zn),Object(Ye.g)(gn.a),Object(Ye.g)(er.a),Object(Ye.g)(hr),Object(Ye.g)(Rr),Object(Ye.g)(Li),Object(Ye.g)(ta),Object(Ye.g)(ja),Object(Ye.g)(no),Object(Ye.g)(Go)]);case 2:case"end":return e.stop()}}),qo)}var Ko=G(),Xo=c.d;var Qo=Object(c.e)(We,Xo(c.a.apply(void 0,[Ko].concat([]))));Ko.run(Yo)},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",productsLayer:"productsLayer--3AWuy",show:"show--3J9pq",content:"content--2hS46",loadingWrapper:"loadingWrapper--15uAN",productsWrapper:"productsWrapper--1dz44",callActionBtn:"callActionBtn--ivAus",header:"header--3LAr1",arrow:"arrow--18PHe",border:"border--2setH",label:"label--3LOft",filterWrapper:"filterWrapper--3RsvB",productLabel:"productLabel--26hNC",toggleBtn:"toggleBtn--3s13Z",iconButton:"iconButton--CBi_z",actions:"actions--3z8KL",productList:"productList--1NYjo",productItem:"productItem--1xDSQ",classItem:"classItem--UdLrC",clickable:"clickable--2RYYK",selected:"selected--1MvyS",title:"title--2y7x4",thumbnailWrapper:"thumbnailWrapper--2icej",thumbnail:"thumbnail--30ZvC",largeThumbnail:"largeThumbnail--3omu9",avatar:"avatar--Dqv8p",info:"info--3nr4T",previewBtn:"previewBtn--1kp4P",disabled:"disabled--2K7x8",actionsWrapper:"actionsWrapper--2lKHb",iconBtnWrapper:"iconBtnWrapper--3bBcR",iconBtn:"iconBtn--z9-Ub",textBtn:"textBtn--YooAk",description:"description--262SC",storeTitle:"storeTitle--3G8j7",resourceDescription:"resourceDescription--2o5fL",uploadBtn:"uploadBtn--2g-aU",previewThumbnail:"previewThumbnail--1Le3n",createModal:"createModal--6Numg",modalBody:"modalBody--3Dpzj",uploadZoneWrapper:"uploadZoneWrapper--apu_X",uploadZone:"uploadZone--2yUk5",uploadItem:"uploadItem--GdrK_",setPriceArea:"setPriceArea--1IojO",linkModal:"linkModal--3YrSs",reviewModal:"reviewModal--Lyfgr",viewRatingsModal:"viewRatingsModal--21c-4",ratingsWrapper:"ratingsWrapper--2pqBD",confirmDeleteThumbnail:"confirmDeleteThumbnail--SpRyU",myProductsModal:"myProductsModal--1IQ2r",arrangeModal:"arrangeModal--tOzIg",arrangeProductItem:"arrangeProductItem--3Qfsh",storeModal:"storeModal--9orhX",storeThumbnailPreview:"storeThumbnailPreview--3EK2W",storeDescription:"storeDescription--1CcQH",tagItem:"tagItem---gZcT",tagLabel:"tagLabel--3xv5a",tagAvatar:"tagAvatar--3hlQy",suggestionItem:"suggestionItem--1np9g",suggestionAvatar:"suggestionAvatar--jLh5Z",storeHeadingSection:"storeHeadingSection--1fFnY",storeHeadingContent:"storeHeadingContent--ClnzK",storeThumbnailPart:"storeThumbnailPart--3TVKJ",storeThumb:"storeThumb--3BizT",storeInfoPart:"storeInfoPart--3lUx9",storeOwnerAvatar:"storeOwnerAvatar--3R62q",storePersonName:"storePersonName--2r_33",toggleContent:"toggleContent--2WJQF",storeIntroWrapper:"storeIntroWrapper--3mXWD",storeIntro:"storeIntro--Mc8sc",storeActionPart:"storeActionPart--1zbeS",videoTitle:"videoTitle--10_ep",searchBox:"searchBox--E1_3o",isSearching:"isSearching--1v1TM",dayItem:"dayItem--2D78C",storeMemberApplicationModal:"storeMemberApplicationModal--1yAFi",formWrapper:"formWrapper--398Yo",headerWrapper:"headerWrapper--1xdF4",storeMemberApplicationForm:"storeMemberApplicationForm--A9xLM",logo:"logo--2QHd3",badgeApproved:"badgeApproved--W4Wm4",reviewLog:"reviewLog--3OqSo",gray:"gray--20hTs",purple:"purple--2NNB-",storeHeadingBtn:"storeHeadingBtn--1haFT",active:"active--3CQAZ",storeMembersModal:"storeMembersModal--1jDQM",table:"table--23v-1",memberSearchBox:"memberSearchBox--HznlR"}},,function(e,t,n){var r=n(718),i=n(1091),a=n(719);e.exports=function(e,t){return r(e)||i(e,t)||a()}},function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,"a",(function(){return r}))},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Ne})),n.d(t,"b",(function(){return be})),n.d(t,"d",(function(){return Le}));var r=n(217),i=n(0),a=n.n(i),o=n(1023),s=n.n(o),l=n(1024),c=n(1025),u=n(579),d=n(159),h=n.n(d);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var p=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},m=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Object(r.typeOf)(e)},g=Object.freeze([]),v=Object.freeze({});function b(e){return"function"==typeof e}function y(e){return e.displayName||e.name||"Component"}function A(e){return e&&"string"==typeof e.styledComponentId}var _=void 0!==e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",w="undefined"!=typeof window&&"HTMLElement"in window,E=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==e&&void 0!==e.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==e.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==e.env.REACT_APP_SC_DISABLE_SPEEDY&&e.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==e&&void 0!==e.env.SC_DISABLE_SPEEDY&&""!==e.env.SC_DISABLE_SPEEDY&&("false"!==e.env.SC_DISABLE_SPEEDY&&e.env.SC_DISABLE_SPEEDY)),S={};function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&C(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=r;a<i;a++)this.groupSizes[a]=0}for(var o=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(o,t[s])&&(this.groupSizes[e]++,o++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,a=r;a<i;a++)t+=this.tag.getRule(a)+"/*!sc*/\n";return t},e}(),k=new Map,x=new Map,O=1,I=function(e){if(k.has(e))return k.get(e);for(;x.has(O);)O++;var t=O++;return k.set(e,t),x.set(t,e),t},M=function(e){return x.get(e)},P=function(e,t){t>=O&&(O=t+1),k.set(e,t),x.set(t,e)},D="style["+_+'][data-styled-version="5.3.6"]',N=new RegExp("^"+_+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,i=n.split(","),a=0,o=i.length;a<o;a++)(r=i[a])&&e.registerName(t,r)},R=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],i=0,a=n.length;i<a;i++){var o=n[i].trim();if(o){var s=o.match(N);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&(P(c,l),L(e,c,s[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(o)}}},B=function(){return n.nc},j=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(_))return r}}(n),a=void 0!==i?i.nextSibling:null;r.setAttribute(_,"active"),r.setAttribute("data-styled-version","5.3.6");var o=B();return o&&r.setAttribute("nonce",o),n.insertBefore(r,a),r},F=function(){function e(e){var t=this.element=j(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}C(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),U=function(){function e(e){var t=this.element=j(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),H=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),z=w,V={isServer:!w,useCSSOMInjection:!E},W=function(){function e(e,t,n){void 0===e&&(e=v),void 0===t&&(t={}),this.options=f({},V,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&w&&z&&(z=!1,function(e){for(var t=document.querySelectorAll(D),n=0,r=t.length;n<r;n++){var i=t[n];i&&"active"!==i.getAttribute(_)&&(R(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return I(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(f({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,i=t.target,e=n?new H(i):r?new F(i):new U(i),new T(e)));var e,t,n,r,i},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(I(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(I(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(I(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++){var a=M(i);if(void 0!==a){var o=e.names.get(a),s=t.getGroup(i);if(o&&s&&o.size){var l=_+".g"+i+'[id="'+a+'"]',c="";void 0!==o&&o.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),G=/(a)(d)/gi,q=function(e){return String.fromCharCode(e+(e>25?39:97))};function Y(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=q(t%52)+n;return(q(t%52)+n).replace(G,"$1-$2")}var K=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},X=function(e){return K(5381,e)};function Q(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(b(n)&&!A(n))return!1}return!0}var $=X("5.3.6"),J=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Q(e),this.componentId=t,this.baseHash=K($,t),this.baseStyle=n,W.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var a=ge(this.rules,e,t,n).join(""),o=Y(K(this.baseHash,a)>>>0);if(!t.hasNameForId(r,o)){var s=n(a,"."+o,void 0,r);t.insertRules(r,o,s)}i.push(o),this.staticRulesId=o}else{for(var l=this.rules.length,c=K(this.baseHash,n.hash),u="",d=0;d<l;d++){var h=this.rules[d];if("string"==typeof h)u+=h;else if(h){var f=ge(h,e,t,n),p=Array.isArray(f)?f.join(""):f;c=K(c,p+d),u+=p}}if(u){var m=Y(c>>>0);if(!t.hasNameForId(r,m)){var g=n(u,"."+m,void 0,r);t.insertRules(r,m,g)}i.push(m)}}return i.join(" ")},e}(),Z=/^\s*\/\/.*$/gm,ee=[":","[",".","#"];function te(e){var t,n,r,i,a=void 0===e?v:e,o=a.options,s=void 0===o?v:o,c=a.plugins,u=void 0===c?g:c,d=new l.a(s),h=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,a,o,s,l,c,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){h.push(e)})),p=function(e,r,a){return 0===r&&-1!==ee.indexOf(a[n.length])||a.match(i)?e:"."+t};function m(e,a,o,s){void 0===s&&(s="&");var l=e.replace(Z,""),c=a&&o?o+" "+a+" { "+l+" }":l;return t=s,n=a,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),d(o||!a?"":a,c)}return d.use([].concat(u,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},f,function(e){if(-2===e){var t=h;return h=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||C(15),K(e,t.name)}),5381).toString():"",m}var ne=a.a.createContext(),re=(ne.Consumer,a.a.createContext()),ie=(re.Consumer,new W),ae=te();function oe(){return Object(i.useContext)(ne)||ie}function se(){return Object(i.useContext)(re)||ae}function le(e){var t=Object(i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=oe(),l=Object(i.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=Object(i.useMemo)((function(){return te({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(i.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),a.a.createElement(ne.Provider,{value:l},a.a.createElement(re.Provider,{value:c},e.children))}var ce=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ae);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return C(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ae),this.name+e.hash},e}(),ue=/([A-Z])/,de=/([A-Z])/g,he=/^ms-/,fe=function(e){return"-"+e.toLowerCase()};function pe(e){return ue.test(e)?e.replace(de,fe).replace(he,"-ms-"):e}var me=function(e){return null==e||!1===e||""===e};function ge(e,t,n,r){if(Array.isArray(e)){for(var i,a=[],o=0,s=e.length;o<s;o+=1)""!==(i=ge(e[o],t,n,r))&&(Array.isArray(i)?a.push.apply(a,i):a.push(i));return a}return me(e)?"":A(e)?"."+e.styledComponentId:b(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:ge(e(t),t,n,r):e instanceof ce?n?(e.inject(n,r),e.getName(r)):e:m(e)?function e(t,n){var r,i,a=[];for(var o in t)t.hasOwnProperty(o)&&!me(t[o])&&(Array.isArray(t[o])&&t[o].isCss||b(t[o])?a.push(pe(o)+":",t[o],";"):m(t[o])?a.push.apply(a,e(t[o],o)):a.push(pe(o)+": "+(r=o,null==(i=t[o])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in c.a?String(i).trim():i+"px")+";"));return n?[n+" {"].concat(a,["}"]):a}(e):e.toString();var l}var ve=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function be(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return b(e)||m(e)?ve(ge(p(g,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:ve(ge(p(e,n)))}new Set;var ye=function(e,t,n){return void 0===n&&(n=v),e.theme!==n.theme&&e.theme||t||n.theme},Ae=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,_e=/(^-|-$)/g;function we(e){return e.replace(Ae,"-").replace(_e,"")}var Ee=function(e){return Y(X(e)>>>0)};function Se(e){return"string"==typeof e&&!0}var Ce=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Te=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ke(e,t,n){var r=e[n];Ce(t)&&Ce(r)?xe(r,t):e[n]=t}function xe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];if(Ce(o))for(var s in o)Te(s)&&ke(e,o[s],s)}return e}var Oe=a.a.createContext();Oe.Consumer;var Ie={};function Me(e,t,n){var r=A(e),o=!Se(e),s=t.attrs,l=void 0===s?g:s,c=t.componentId,d=void 0===c?function(e,t){var n="string"!=typeof e?"sc":we(e);Ie[n]=(Ie[n]||0)+1;var r=n+"-"+Ee("5.3.6"+n+Ie[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):c,p=t.displayName,m=void 0===p?function(e){return Se(e)?"styled."+e:"Styled("+y(e)+")"}(e):p,_=t.displayName&&t.componentId?we(t.displayName)+"-"+t.componentId:t.componentId||d,w=r&&e.attrs?Array.prototype.concat(e.attrs,l).filter(Boolean):l,E=t.shouldForwardProp;r&&e.shouldForwardProp&&(E=t.shouldForwardProp?function(n,r,i){return e.shouldForwardProp(n,r,i)&&t.shouldForwardProp(n,r,i)}:e.shouldForwardProp);var S,C=new J(n,_,r?e.componentStyle:void 0),T=C.isStatic&&0===l.length,k=function(e,t){return function(e,t,n,r){var a=e.attrs,o=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,c=e.shouldForwardProp,d=e.styledComponentId,h=e.target,p=function(e,t,n){void 0===e&&(e=v);var r=f({},t,{theme:e}),i={};return n.forEach((function(e){var t,n,a,o=e;for(t in b(o)&&(o=o(r)),o)r[t]=i[t]="className"===t?(n=i[t],a=o[t],n&&a?n+" "+a:n||a):o[t]})),[r,i]}(ye(t,Object(i.useContext)(Oe),s)||v,t,a),m=p[0],g=p[1],y=function(e,t,n,r){var i=oe(),a=se();return t?e.generateAndInjectStyles(v,i,a):e.generateAndInjectStyles(n,i,a)}(o,r,m),A=n,_=g.$as||t.$as||g.as||t.as||h,w=Se(_),E=g!==t?f({},t,{},g):t,S={};for(var C in E)"$"!==C[0]&&"as"!==C&&("forwardedAs"===C?S.as=E[C]:(c?c(C,u.a,_):!w||Object(u.a)(C))&&(S[C]=E[C]));return t.style&&g.style!==t.style&&(S.style=f({},t.style,{},g.style)),S.className=Array.prototype.concat(l,d,y!==d?y:null,t.className,g.className).filter(Boolean).join(" "),S.ref=A,Object(i.createElement)(_,S)}(S,e,t,T)};return k.displayName=m,(S=a.a.forwardRef(k)).attrs=w,S.componentStyle=C,S.displayName=m,S.shouldForwardProp=E,S.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):g,S.styledComponentId=_,S.target=r?e.target:e,S.withComponent=function(e){var r=t.componentId,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["componentId"]),a=r&&r+"-"+(Se(e)?e:we(y(e)));return Me(e,f({},i,{attrs:w,componentId:a}),n)},Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?xe({},e.defaultProps,t):t}}),S.toString=function(){return"."+S.styledComponentId},o&&h()(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),S}var Pe=function(e){return function e(t,n,i){if(void 0===i&&(i=v),!Object(r.isValidElementType)(n))return C(1,String(n));var a=function(){return t(n,i,be.apply(void 0,arguments))};return a.withConfig=function(r){return e(t,n,f({},i,{},r))},a.attrs=function(r){return e(t,n,f({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},a}(Me,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Pe[e]=Pe(e)}));var De=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Q(e),W.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(ge(this.rules,t,n,r).join(""),""),a=this.componentId+e;n.insertRules(a,a,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&W.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Ne(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=be.apply(void 0,[e].concat(n)),s="sc-global-"+Ee(JSON.stringify(o)),l=new De(o,s);function c(e){var t=oe(),n=se(),r=Object(i.useContext)(Oe),a=Object(i.useRef)(t.allocateGSInstance(s)).current;return t.server&&u(a,e,t,r,n),Object(i.useLayoutEffect)((function(){if(!t.server)return u(a,e,t,r,n),function(){return l.removeStyles(a,t)}}),[a,e,t,r,n]),null}function u(e,t,n,r,i){if(l.isStatic)l.renderStyles(e,S,n,i);else{var a=f({},t,{theme:ye(t,r,c.defaultProps)});l.renderStyles(e,a,n,i)}}return a.a.memo(c)}function Le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=be.apply(void 0,[e].concat(n)).join(""),a=Ee(i);return new ce(a,i)}!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=B();return"<style "+[n&&'nonce="'+n+'"',_+'="true"','data-styled-version="5.3.6"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?C(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return C(2);var n=((t={})[_]="",t["data-styled-version"]="5.3.6",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=B();return r&&(n.nonce=r),[a.a.createElement("style",f({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new W({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?C(2):a.a.createElement(le,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return C(3)}}();t.c=Pe}).call(this,n(96))},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"g",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"j",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"b",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"d",(function(){return v})),n.d(t,"a",(function(){return b}));var r,i,a=n(130),o=function(e,t,n){return void 0===n&&(n=" "),(function(e,t){for(var n="";t--;)n+=e;return n}(n,t)+e.toString()).slice(-t)},s=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},l=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||s(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},c=function(e){e=l(e);for(var t="",n=0;n<e.length;n++)t+=o(e[n].toString(16),2,"0");return t},u=function(e){e=l(e);for(var t="",n=0;n<e.length;n++)t+=o(e[n].toString(2),8,"0");return t},d=n.n(a).a.BigInt||Number,h=[d("0x1"),d("0x100"),d("0x10000"),d("0x1000000"),d("0x100000000"),d("0x10000000000"),d("0x1000000000000"),d("0x100000000000000"),d("0x10000000000000000")],f=(r=new Uint16Array([65484]),255===(i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength))[0]||i[0],function(e,t){var n=void 0===t?{}:t,r=n.signed,i=void 0!==r&&r,a=n.le,o=void 0!==a&&a;e=l(e);var s=o?"reduce":"reduceRight",c=(e[s]?e[s]:Array.prototype[s]).call(e,(function(t,n,r){var i=o?r:Math.abs(r+1-e.length);return t+d(n)*h[i]}),d(0));if(i){var u=h[e.length]/d(2)-d(1);(c=d(c))>u&&(c-=u,c-=u,c-=d(2))}return Number(c)}),p=function(e,t){var n=(void 0===t?{}:t).le,r=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=d(e);for(var i,a=(i=e,Math.ceil(function(e){return e.toString(2).length}(i)/8)),o=new Uint8Array(new ArrayBuffer(a)),s=0;s<a;s++){var l=r?s:Math.abs(s+1-o.length);o[l]=Number(e/h[s]&d(255)),e<0&&(o[l]=Math.abs(~o[l]),o[l]-=0===s?1:2)}return o},m=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,l(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},g=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},v=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if((t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e}))).length<=1)return l(t[0]);var r=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),i=new Uint8Array(r),a=0;return t.forEach((function(e){e=l(e),i.set(e,a),a+=e.byteLength})),i},b=function(e,t,n){var r=void 0===n?{}:n,i=r.offset,a=void 0===i?0:i,o=r.mask,s=void 0===o?[]:o;e=l(e);var c=(t=l(t)).every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&c.call(t,(function(t,n){return t===(s[n]?s[n]&e[a+n]:e[a+n])}))}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",lineGroup:"lineGroup--1iauj",quickBtn:"quickBtn--1nslH",quickBtnActive:"quickBtnActive--n0fI4",fitBtn:"fitBtn--1f9Bl",idIcon:"idIcon--3y3NO",quickMenuWrap:"quickMenuWrap--1pBbM",quickMenuScroll:"quickMenuScroll--bKAxB",searchIcon:"searchIcon--hEZeV",btnIconHasNum:"btnIconHasNum--YSMRP",quickBoxSearch:"quickBoxSearch--2Gf-P",chapterGroupBtn:"chapterGroupBtn--3AiF-",BLUE:"BLUE--2tNYI","color-BLUE":"color-BLUE--2grb-",ORANGE:"ORANGE--2XSxk","color-ORANGE":"color-ORANGE--2KdMx",dropDownQickButton:"dropDownQickButton--1Qfvx",fontSizeWrap:"fontSizeWrap--j62I5",fontSizeList:"fontSizeList--3lukZ",fontSizeListActive:"fontSizeListActive--1Mx6v",upCourseLevel:"upCourseLevel--1bNqq",videpPlayBtn:"videpPlayBtn--3fE8G",icon:"icon--1Jo9R",iconSmall:"iconSmall--2m9lx",expandable:"expandable--3JgVg"}},function(e,n,r){"use strict";r.d(n,"g",(function(){return B})),r.d(n,"bb",(function(){return Tt})),r.d(n,"Z",(function(){return Dt})),r.d(n,"lb",(function(){return jt})),r.d(n,"eb",(function(){return Qt})),r.d(n,"cb",(function(){return Jt})),r.d(n,"B",(function(){return sn})),r.d(n,"tb",(function(){return Nn})),r.d(n,"jb",(function(){return Ln})),r.d(n,"Xb",(function(){return Rn})),r.d(n,"hc",(function(){return jn})),r.d(n,"h",(function(){return Un})),r.d(n,"oc",(function(){return hi})),r.d(n,"pc",(function(){return mi})),r.d(n,"vc",(function(){return vi})),r.d(n,"tc",(function(){return bi})),r.d(n,"qc",(function(){return wi})),r.d(n,"lc",(function(){return Ys})),r.d(n,"L",(function(){return zc})),r.d(n,"k",(function(){return tc})),r.d(n,"l",(function(){return sc})),r.d(n,"m",(function(){return oc})),r.d(n,"ob",(function(){return hu})),r.d(n,"ib",(function(){return mu})),r.d(n,"i",(function(){return Au})),r.d(n,"x",(function(){return _u})),r.d(n,"S",(function(){return wu})),r.d(n,"dc",(function(){return Eu})),r.d(n,"P",(function(){return Hu})),r.d(n,"H",(function(){return rd})),r.d(n,"j",(function(){return sd})),r.d(n,"ec",(function(){return Wm})),r.d(n,"Ob",(function(){return tv})),r.d(n,"Wb",(function(){return Lb})),r.d(n,"Pb",(function(){return qb})),r.d(n,"X",(function(){return Wb})),r.d(n,"Qb",(function(){return jy})),r.d(n,"Hb",(function(){return UA})),r.d(n,"z",(function(){return f_})),r.d(n,"uc",(function(){return JA})),r.d(n,"A",(function(){return Z_})),r.d(n,"sc",(function(){return g_.a})),r.d(n,"E",(function(){return Uw})),r.d(n,"Bb",(function(){return Dw})),r.d(n,"xc",(function(){return nE})),r.d(n,"Vb",(function(){return sE})),r.d(n,"Nb",(function(){return mE})),r.d(n,"rc",(function(){return PE})),r.d(n,"Yb",(function(){return RE})),r.d(n,"mb",(function(){return $E})),r.d(n,"Eb",(function(){return TC})),r.d(n,"F",(function(){return IC})),r.d(n,"wb",(function(){return NC})),r.d(n,"vb",(function(){return jC})),r.d(n,"nb",(function(){return FC})),r.d(n,"hb",(function(){return HC})),r.d(n,"Gb",(function(){return VC})),r.d(n,"o",(function(){return KC})),r.d(n,"Cb",(function(){return tT})),r.d(n,"D",(function(){return iT})),r.d(n,"Ab",(function(){return aT})),r.d(n,"T",(function(){return QT})),r.d(n,"Q",(function(){return Bk})),r.d(n,"R",(function(){return fx})),r.d(n,"sb",(function(){return Sx})),r.d(n,"e",(function(){return Hx})),r.d(n,"f",(function(){return Vx})),r.d(n,"d",(function(){return iO})),r.d(n,"n",(function(){return IO})),r.d(n,"Ub",(function(){return PO})),r.d(n,"ic",(function(){return eI})),r.d(n,"jc",(function(){return UO})),r.d(n,"wc",(function(){return KO})),r.d(n,"yb",(function(){return FI})),r.d(n,"xb",(function(){return hI})),r.d(n,"zb",(function(){return TI})),r.d(n,"ab",(function(){return BI})),r.d(n,"Sb",(function(){return rM})),r.d(n,"U",(function(){return gM})),r.d(n,"N",(function(){return lM})),r.d(n,"rb",(function(){return KM})),r.d(n,"W",(function(){return sP})),r.d(n,"p",(function(){return dP})),r.d(n,"C",(function(){return vP})),r.d(n,"M",(function(){return GP})),r.d(n,"K",(function(){return dD})),r.d(n,"qb",(function(){return vD})),r.d(n,"Rb",(function(){return RD})),r.d(n,"Fb",(function(){return WD})),r.d(n,"Mb",(function(){return YD})),r.d(n,"V",(function(){return QD})),r.d(n,"Tb",(function(){return eN})),r.d(n,"fc",(function(){return TR})),r.d(n,"gb",(function(){return kR})),r.d(n,"kb",(function(){return LR})),r.d(n,"Jb",(function(){return ZR})),r.d(n,"cc",(function(){return tB})),r.d(n,"O",(function(){return dB})),r.d(n,"a",(function(){return fB})),r.d(n,"y",(function(){return yB})),r.d(n,"Zb",(function(){return kB})),r.d(n,"gc",(function(){return rj})),r.d(n,"Kb",(function(){return t7})),r.d(n,"bc",(function(){return r7})),r.d(n,"Lb",(function(){return i7})),r.d(n,"J",(function(){return c7})),r.d(n,"q",(function(){return k7})),r.d(n,"v",(function(){return N7})),r.d(n,"fb",(function(){return L7})),r.d(n,"nc",(function(){return R7})),r.d(n,"ub",(function(){return F7})),r.d(n,"kc",(function(){return yee})),r.d(n,"G",(function(){return Pee})),r.d(n,"Db",(function(){return Toe})),r.d(n,"pb",(function(){return $ae})),r.d(n,"Ib",(function(){return Poe})),r.d(n,"ac",(function(){return Goe})),r.d(n,"I",(function(){return Voe})),r.d(n,"Y",(function(){return nse})),r.d(n,"b",(function(){return ose})),r.d(n,"c",(function(){return cse})),r.d(n,"u",(function(){return pse})),r.d(n,"mc",(function(){return yse})),r.d(n,"db",(function(){return Ese})),r.d(n,"w",(function(){return xse})),r.d(n,"t",(function(){return jse})),r.d(n,"r",(function(){return Use})),r.d(n,"s",(function(){return Wse}));var i={};r.r(i),r.d(i,"keyboardHandler",(function(){return pb})),r.d(i,"mouseHandler",(function(){return mb})),r.d(i,"resizeHandler",(function(){return gb})),r.d(i,"selectHandler",(function(){return vb})),r.d(i,"touchHandler",(function(){return bb})),r.d(i,"wheelHandler",(function(){return yb}));var a={};r.r(a),r.d(a,"FILE",(function(){return Qk})),r.d(a,"URL",(function(){return $k})),r.d(a,"TEXT",(function(){return Jk}));var o=r(12),s=r.n(o),l=r(15),c=r.n(l),u=r(13),d=r.n(u),h=r(14),f=r.n(h),p=r(10),m=r.n(p),g=r(0),v=r.n(g),b=r(33),y=r(41),A=r(42),_=r.n(A),w=r(47),E=["bsPrefix","className","noGutters","as"],S=["xl","lg","md","sm","xs"],C=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.noGutters,a=e.as,o=void 0===a?"div":a,s=Object(y.a)(e,E),l=Object(w.a)(n,"row"),c=l+"-cols",u=[];return S.forEach((function(e){var t,n=s[e];delete s[e];var r="xs"!==e?"-"+e:"";null!=(t=null!=n&&"object"==typeof n?n.cols:n)&&u.push(""+c+r+"-"+t)})),v.a.createElement(o,Object(b.a)({ref:t},s,{className:_.a.apply(void 0,[r,l,i&&"no-gutters"].concat(u))}))}));C.displayName="Row",C.defaultProps={noGutters:!1};var T=C,k=r(1007),x=r(1),O=r(108),I=r(22),M=r(4),P=r.n(M),D=r(139),N=r(254),L=r.n(N);var R,B=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.children;e.title;return v.a.createElement("div",{className:L.a.authBackground},v.a.createElement(D.b,{transition:D.a}),v.a.createElement("div",{className:L.a.container},v.a.createElement("div",{className:L.a.containerBackground}),v.a.createElement("div",{className:P()("h-100 hide-scrollbar",L.a.hideScrollX)},v.a.createElement(T,{className:"h-100 align-items-center justify-content-end"},v.a.createElement(k.a,{md:6,lg:6},v.a.createElement("div",{className:"".concat(L.a.authBox," p-3 p-md-5")},v.a.createElement("div",{className:"text-center mb-5 mt-n2"},v.a.createElement(O.a,{to:x.g.HOME_PAGE_PATH},v.a.createElement("img",{width:"200",className:"u-bg-dark-blue-bold",src:I.a.logoWhite,alt:"Fuvi logo"}))),t)))),v.a.createElement("div",{className:L.a.copyrights},"2021 Copyrights © FUVI COGNITIVE TECHNOLOGY")))}}]),n}(g.Component),j=r(9),F=r.n(j),U=r(60),H=r.n(U),z=r(3),V=r.n(z),W=r(2),G=r.n(W),q=r(17),Y=r(7),K=r(63),X=r(127),Q=r(8),$=r(37);var J=Function.prototype.bind.call(Function.prototype.call,[].slice);function Z(e,t){return J(e.querySelectorAll(t))}var ee=r(388),te=r(6),ne=r.n(te),re=r(94),ie=r(166),ae=r(165),oe=r.n(ae);function se(e,t,n){var r=Object(g.useRef)(void 0!==e),i=Object(g.useState)(t),a=i[0],o=i[1],s=void 0!==e,l=r.current;return r.current=s,!s&&l&&a!==t&&o(t),[s?e:a,Object(g.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n&&n.apply(void 0,[e].concat(r)),o(e)}),[n])]}r(245);var le=r(389);var ce=r(151);function ue(e,t,n){return void 0===n&&(n=!1),function(e,t,n,r){void 0===r&&(r=!1);var i=Object(ce.a)(n);Object(g.useEffect)((function(){var n="function"==typeof e?e():e;return n.addEventListener(t,i,r),function(){return n.removeEventListener(t,i,r)}}),[e])}(Object(g.useCallback)((function(){return document}),[]),e,t,n)}var de=v.a.createContext(null),he=r(326),fe=r(432),pe=r(433),me=r(402),ge=function(){};function ve(e){void 0===e&&(e={});var t=Object(g.useContext)(de),n=Object(he.a)(),r=n[0],i=n[1],a=Object(g.useRef)(!1),o=e,s=o.flip,l=o.offset,c=o.rootCloseEvent,u=o.fixed,d=void 0!==u&&u,h=o.popperConfig,f=void 0===h?{}:h,p=o.usePopper,m=void 0===p?!!t:p,v=null==(null==t?void 0:t.show)?!!e.show:t.show,b=null==(null==t?void 0:t.alignEnd)?e.alignEnd:t.alignEnd;v&&!a.current&&(a.current=!0);var y=t||{},A=y.drop,_=y.setMenu,w=y.menuElement,E=y.toggleElement,S=b?"bottom-end":"bottom-start";"up"===A?S=b?"top-end":"top-start":"right"===A?S=b?"right-end":"right-start":"left"===A&&(S=b?"left-end":"left-start");var C=Object(fe.a)(E,w,Object(me.a)({placement:S,enabled:!(!m||!v),enableEvents:v,offset:l,flip:s,fixed:d,arrowElement:r,popperConfig:f})),T=Object(re.a)({ref:_||ge,"aria-labelledby":null==E?void 0:E.id},C.attributes.popper,{style:C.styles.popper}),k={show:v,alignEnd:b,hasShown:a.current,toggle:null==t?void 0:t.toggle,popper:m?C:null,arrowProps:m?Object(re.a)({ref:i},C.attributes.arrow,{style:C.styles.arrow}):{}};return Object(pe.a)(w,(function(e){null==t||t.toggle(!1,e)}),{clickTrigger:c,disabled:!v}),[T,k]}var be={children:ne.a.func.isRequired,show:ne.a.bool,alignEnd:ne.a.bool,flip:ne.a.bool,usePopper:ne.a.oneOf([!0,!1]),popperConfig:ne.a.object,rootCloseEvent:ne.a.string};function ye(e){var t=e.children,n=ve(Object(ie.a)(e,["children"])),r=n[0],i=n[1];return v.a.createElement(v.a.Fragment,null,i.hasShown?t(r,i):null)}ye.displayName="ReactOverlaysDropdownMenu",ye.propTypes=be,ye.defaultProps={usePopper:!0};var Ae=ye,_e=function(){};function we(){var e=Object(g.useContext)(de)||{},t=e.show,n=void 0!==t&&t,r=e.toggle,i=void 0===r?_e:r,a=e.setToggle,o=Object(g.useCallback)((function(e){i(!n,e)}),[n,i]);return[{ref:a||_e,onClick:o,"aria-haspopup":!0,"aria-expanded":!!n},{show:n,toggle:i}]}var Ee={children:ne.a.func.isRequired};function Se(e){var t=e.children,n=we(),r=n[0],i=n[1];return v.a.createElement(v.a.Fragment,null,t(r,i))}Se.displayName="ReactOverlaysDropdownToggle",Se.propTypes=Ee;var Ce=Se,Te={children:ne.a.node,drop:ne.a.oneOf(["up","left","right","down"]),focusFirstItemOnShow:ne.a.oneOf([!1,!0,"keyboard"]),itemSelector:ne.a.string,alignEnd:ne.a.bool,show:ne.a.bool,defaultShow:ne.a.bool,onToggle:ne.a.func};function ke(){var e=Object(g.useReducer)((function(e){return!e}),!1)[1],t=Object(g.useRef)(null),n=Object(g.useCallback)((function(n){t.current=n,e()}),[e]);return[t,n]}function xe(e){var t=e.drop,n=e.alignEnd,r=e.defaultShow,i=e.show,a=e.onToggle,o=e.itemSelector,s=void 0===o?"* > *":o,l=e.focusFirstItemOnShow,c=e.children,u=se(i,r,a),d=u[0],h=u[1],f=ke(),p=f[0],m=f[1],b=p.current,y=ke(),A=y[0],_=y[1],w=A.current,E=Object(le.a)(d),S=Object(g.useRef)(null),C=Object(g.useRef)(!1),T=Object(g.useCallback)((function(e,t){h(e,t)}),[h]),k=Object(g.useMemo)((function(){return{toggle:T,drop:t,show:d,alignEnd:n,menuElement:b,toggleElement:w,setMenu:m,setToggle:_}}),[T,t,d,n,b,w,m,_]);b&&E&&!d&&(C.current=b.contains(document.activeElement));var x=Object(ce.a)((function(){w&&w.focus&&w.focus()})),O=Object(ce.a)((function(){var e=S.current,t=l;if(null==t&&(t=!(!p.current||!function(e,t){if(!R){var n=document.body,r=n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;R=function(e,t){return r.call(e,t)}}return R(e,t)}(p.current,"[role=menu]"))&&"keyboard"),!1!==t&&("keyboard"!==t||/^key.+$/.test(e))){var n=Z(p.current,s)[0];n&&n.focus&&n.focus()}}));Object(g.useEffect)((function(){d?O():C.current&&(C.current=!1,x())}),[d,C,x,O]),Object(g.useEffect)((function(){S.current=null}));var I=function(e,t){if(!p.current)return null;var n=Z(p.current,s),r=n.indexOf(e)+t;return n[r=Math.max(0,Math.min(r,n.length))]};return ue("keydown",(function(e){var t,n,r=e.key,i=e.target,a=null==(t=p.current)?void 0:t.contains(i),o=null==(n=A.current)?void 0:n.contains(i);if((!/input|textarea/i.test(i.tagName)||!(" "===r||"Escape"!==r&&a))&&(a||o)&&(p.current||"Tab"!==r))switch(S.current=e.type,r){case"ArrowUp":var s=I(i,-1);return s&&s.focus&&s.focus(),void e.preventDefault();case"ArrowDown":if(e.preventDefault(),d){var l=I(i,1);l&&l.focus&&l.focus()}else h(!0,e);return;case"Tab":Object(ee.a)(document,"keyup",(function(t){var n;("Tab"!==t.key||t.target)&&null!=(n=p.current)&&n.contains(t.target)||h(!1,e)}),{once:!0});break;case"Escape":e.preventDefault(),e.stopPropagation(),h(!1,e)}})),v.a.createElement(de.Provider,{value:k},c)}xe.displayName="ReactOverlaysDropdown",xe.propTypes=Te,xe.Menu=Ae,xe.Toggle=Ce;var Oe=xe,Ie=r(149),Me=r(150),Pe=function(e,t){return void 0===t&&(t=null),null!=e?String(e):t||null},De=v.a.createContext(null),Ne=v.a.createContext(null);Ne.displayName="NavContext";var Le=Ne,Re=r(219),Be=["bsPrefix","className","children","eventKey","disabled","href","onClick","onSelect","active","as"],je={as:Re.a,disabled:!1},Fe=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.children,a=e.eventKey,o=e.disabled,s=e.href,l=e.onClick,c=e.onSelect,u=e.active,d=e.as,h=Object(y.a)(e,Be),f=Object(w.a)(n,"dropdown-item"),p=Object(g.useContext)(De),m=(Object(g.useContext)(Le)||{}).activeKey,A=Pe(a,s),E=null==u&&null!=A?Pe(m)===A:u,S=Object(Me.a)((function(e){o||(l&&l(e),p&&p(A,e),c&&c(A,e))}));return v.a.createElement(d,Object(b.a)({},h,{ref:t,href:s,disabled:o,className:_()(r,f,E&&"active",o&&"disabled"),onClick:S}),i)}));Fe.displayName="DropdownItem",Fe.defaultProps=je;var Ue=Fe,He=function(e){return e&&"function"!=typeof e?function(t){e.current=t}:e};var ze=function(e,t){return Object(g.useMemo)((function(){return function(e,t){var n=He(e),r=He(t);return function(e){n&&n(e),r&&r(e)}}(e,t)}),[e,t])},Ve=r(142),We=r.n(Ve),Ge=v.a.createContext(null);Ge.displayName="NavbarContext";var qe=Ge;function Ye(e,t){return e}var Ke=r(430),Xe=["bsPrefix","className","align","alignRight","rootCloseEvent","flip","show","renderOnMount","as","popperConfig"],Qe=ne.a.oneOf(["left","right"]),$e=ne.a.oneOfType([Qe,ne.a.shape({sm:Qe}),ne.a.shape({md:Qe}),ne.a.shape({lg:Qe}),ne.a.shape({xl:Qe})]),Je=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.align,a=e.alignRight,o=e.rootCloseEvent,s=e.flip,l=e.show,c=e.renderOnMount,u=e.as,d=void 0===u?"div":u,h=e.popperConfig,f=Object(y.a)(e,Xe),p=Object(g.useContext)(qe),m=Object(w.a)(n,"dropdown-menu"),A=Object(Ke.a)(),E=A[0],S=A[1],C=[];if(i)if("object"==typeof i){var T=Object.keys(i);if(T.length){var k=T[0],x=i[k];a="left"===x,C.push(m+"-"+k+"-"+x)}}else"right"===i&&(a=!0);var O=ve({flip:s,rootCloseEvent:o,show:l,alignEnd:a,usePopper:!p&&0===C.length,popperConfig:Object(b.a)({},h,{modifiers:S.concat((null==h?void 0:h.modifiers)||[])})}),I=O[0],M=O[1],P=M.hasShown,D=M.popper,N=M.show,L=M.alignEnd,R=M.toggle;if(I.ref=ze(E,ze(Ye(t),I.ref)),!P&&!c)return null;"string"!=typeof d&&(I.show=N,I.close=function(){return null==R?void 0:R(!1)},I.alignRight=L);var B=f.style;return null!=D&&D.placement&&(B=Object(b.a)({},f.style,I.style),f["x-placement"]=D.placement),v.a.createElement(d,Object(b.a)({},f,I,{style:B,className:_.a.apply(void 0,[r,m,N&&"show",L&&m+"-right"].concat(C))}))}));Je.displayName="DropdownMenu",Je.defaultProps={align:"left",alignRight:!1,flip:!0};var Ze=Je,et=(r(347),r(1011)),tt=["bsPrefix","split","className","childBsPrefix","as"],nt=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.split,i=e.className,a=e.childBsPrefix,o=e.as,s=void 0===o?et.a:o,l=Object(y.a)(e,tt),c=Object(w.a)(n,"dropdown-toggle");void 0!==a&&(l.bsPrefix=a);var u=we()[0];return u.ref=ze(u.ref,Ye(t)),v.a.createElement(s,Object(b.a)({className:_()(i,c,r&&c+"-split")},u,l))}));nt.displayName="DropdownToggle";var rt=nt,it=r(97),at=["bsPrefix","drop","show","className","alignRight","onSelect","onToggle","focusFirstItemOnShow","as","navbar"],ot=Object(it.a)("dropdown-header",{defaultProps:{role:"heading"}}),st=Object(it.a)("dropdown-divider",{defaultProps:{role:"separator"}}),lt=Object(it.a)("dropdown-item-text",{Component:"span"}),ct=v.a.forwardRef((function(e,t){var n=Object(Ie.a)(e,{show:"onToggle"}),r=n.bsPrefix,i=n.drop,a=n.show,o=n.className,s=n.alignRight,l=n.onSelect,c=n.onToggle,u=n.focusFirstItemOnShow,d=n.as,h=void 0===d?"div":d,f=(n.navbar,Object(y.a)(n,at)),p=Object(g.useContext)(De),m=Object(w.a)(r,"dropdown"),A=Object(Me.a)((function(e,t,n){void 0===n&&(n=t.type),t.currentTarget!==document||"keydown"===n&&"Escape"!==t.key||(n="rootClose"),c&&c(e,t,{source:n})})),E=Object(Me.a)((function(e,t){p&&p(e,t),l&&l(e,t),A(!1,t,"select")}));return v.a.createElement(De.Provider,{value:E},v.a.createElement(Oe,{drop:i,show:a,alignEnd:s,onToggle:A,focusFirstItemOnShow:u,itemSelector:"."+m+"-item:not(.disabled):not(:disabled)"},v.a.createElement(h,Object(b.a)({},f,{ref:t,className:_()(o,a&&"show",(!i||"down"===i)&&m,"up"===i&&"dropup","right"===i&&"dropright","left"===i&&"dropleft")}))))}));ct.displayName="Dropdown",ct.defaultProps={navbar:!1},ct.Divider=st,ct.Header=ot,ct.Item=Ue,ct.ItemText=lt,ct.Menu=Ze,ct.Toggle=rt;var ut=ct;function dt(e,t){var n=0;return v.a.Children.map(e,(function(e){return v.a.isValidElement(e)?t(e,n++):e}))}var ht=["min","now","max","label","srOnly","striped","animated","className","style","variant","bsPrefix"],ft=["isChild"],pt=["min","now","max","label","srOnly","striped","animated","bsPrefix","variant","className","children"];function mt(e,t,n){var r=(e-t)/(n-t)*100;return Math.round(1e3*r)/1e3}function gt(e,t){var n,r=e.min,i=e.now,a=e.max,o=e.label,s=e.srOnly,l=e.striped,c=e.animated,u=e.className,d=e.style,h=e.variant,f=e.bsPrefix,p=Object(y.a)(e,ht);return v.a.createElement("div",Object(b.a)({ref:t},p,{role:"progressbar",className:_()(u,f+"-bar",(n={},n["bg-"+h]=h,n[f+"-bar-animated"]=c,n[f+"-bar-striped"]=c||l,n)),style:Object(b.a)({width:mt(i,r,a)+"%"},d),"aria-valuenow":i,"aria-valuemin":r,"aria-valuemax":a}),s?v.a.createElement("span",{className:"sr-only"},o):o)}var vt=v.a.forwardRef((function(e,t){var n=e.isChild,r=Object(y.a)(e,ft);if(r.bsPrefix=Object(w.a)(r.bsPrefix,"progress"),n)return gt(r,t);var i=r.min,a=r.now,o=r.max,s=r.label,l=r.srOnly,c=r.striped,u=r.animated,d=r.bsPrefix,h=r.variant,f=r.className,p=r.children,m=Object(y.a)(r,pt);return(v.a.createElement("div",Object(b.a)({ref:t},m,{className:_()(f,d)}),p?dt(p,(function(e){return Object(g.cloneElement)(e,{isChild:!0})})):gt({min:i,now:a,max:o,label:s,srOnly:l,striped:c,animated:u,bsPrefix:d,variant:h},t)))}));vt.displayName="ProgressBar",vt.defaultProps={min:0,max:100,animated:!1,isChild:!1,srOnly:!1,striped:!1};var bt=vt,yt=r(194),At=r.n(yt),_t=r(16);var wt=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{storageCapacity:0,storageUsed:0,isDropdownShow:!1,isUnlimited:!1}),G()(V()(e),"toggleOpen",Object(Y.debounce)((function(t){var n=e.state,r=n.isDropdownShow,i=n.storageCapacity,a=n.storageUsed;e.setState({isDropdownShow:!r,storageCapacity:r?0:i,storageUsed:r?0:a})}),100)),e}return c()(n,[{key:"componentDidUpdate",value:function(e,t){var n=this,r=t.isDropdownShow,i=this.state.isDropdownShow,a=this.props.getUserStorage;i&&i!==r&&a(null,(function(e){var t=e.capacity,r=e.used,i=e.unlimited;n.setState({storageCapacity:t,storageUsed:r,isUnlimited:i&&-1==t})}))}},{key:"render",value:function(){var e=this.props,t=e.incompleteProfile,n=e.userAvatar,r=e.displayName,i=e.email,a=e.onLogout,o=e.openProfileForm,s=e.openChangePasswordForm,l=e.openOrderHistoryModal,c=e.openRevenueReportModal,u=e.openMyResourcesModal,d=e.openSubscription,h=e.openCourseSubscription,f=e.openFinanceAccountsForm,p=this.state,m=p.storageCapacity,g=p.storageUsed,b=p.isUnlimited,y=b?0:(g/m*100).toFixed(2),A="info";y>80&&(A="warning"),y>100&&(A="danger");var _=0===m;return v.a.createElement(ut,{onToggle:this.toggleOpen},v.a.createElement(ut.Toggle,{className:P()(At.a.userAvatarImage,At.a.userDropdownMenu),style:{backgroundImage:"url(".concat(n,")")}},t&&v.a.createElement("div",{className:P()(At.a.notif),title:"incomplete profile",onClick:function(e){e.stopPropagation(),o()}},v.a.createElement("img",{width:12,src:I.a.redSphere}))),v.a.createElement(ut.Menu,{className:P()(At.a.menuWrapper)},v.a.createElement(v.a.Fragment,null,v.a.createElement(ut.Item,{className:At.a.userInfoRow},v.a.createElement("div",{className:"u-fs-1x1o8 u-fw-500 text-truncate"},r),v.a.createElement("div",{className:"u-fw-300 text-truncate"},i)),v.a.createElement(ut.Item,{className:At.a.storageRow},v.a.createElement("div",{className:"d-flex align-items-center mb-1"},v.a.createElement("i",{className:"fv fuvi-disk-icon u-mr-3o4 u-fs-1x1o3"}),Object(_t.t)("myStorage")),v.a.createElement(bt,{className:P()("mb-1"),now:_?0:y,variant:A,animated:_}),v.a.createElement("div",{className:"u-flex-center"},_?Object(_t.t)("loadingStorage"):Object(_t.t)("storageInfoDisplay",{storageUsed:x.c.formatFileSize(g),storageCapacity:b?Object(_t.t)("unlimited"):x.c.formatFileSize(m)}))),v.a.createElement(ut.Item,{className:"my-3 u-pl-2x1o6",onClick:o},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("i",{className:"fv fuvi-contact-book pr-3 u-fs-1x1o3"}),Object(_t.t)("btn.myProfile"),t&&v.a.createElement("i",{title:"incomplete profile",className:P()(At.a.notif2,"fa fa-exclamation-circle","ml-2"),"aria-hidden":"true"}))),v.a.createElement(ut.Item,{className:"my-3 u-pl-2x1o6",onClick:h},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("img",{width:22,height:22,className:"mr-3",src:I.a.videoCourse,alt:"Course subscriptions"}),Object(_t.t)("btn.mySubscribedCourses"))),v.a.createElement(ut.Item,{className:"my-3 u-pl-2x1o6",onClick:d},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("img",{width:22,height:22,className:"mr-3",src:I.a.subscription,alt:"Partner-ship subscriptions"}),Object(_t.t)("btn.mySubscription"))),v.a.createElement(ut.Item,{className:"my-3 u-pl-2x1o6",onClick:f},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("img",{width:22,height:22,className:"mr-3",src:I.a.creditCard,alt:"Finance accounts"}),Object(_t.t)("btn.myFinanceAccount"))),v.a.createElement(ut.Item,{className:"my-3 u-pl-2x1o6",onClick:u},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("img",{width:22,height:22,className:"mr-3",src:I.a.resourceIcon,alt:"resource icon"}),Object(_t.t)("btn.myResources"))),v.a.createElement(ut.Item,{className:"my-3 u-pl-2x1o6",onClick:l},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("i",{className:"fv fuvi-order-history pr-3 u-fs-1x1o3"}),Object(_t.t)("btn.myOrderHistory"))),v.a.createElement(ut.Item,{className:"my-3 u-pl-2x1o6",onClick:c},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("i",{className:"fv fuvi-reg-icon pr-3 u-fs-1x1o3"}),Object(_t.t)("btn.revenueReport"))),v.a.createElement(ut.Item,{className:"my-3 u-pl-2x1o6",onClick:s},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("i",{className:"fv fuvi-change-password pr-3 u-fs-1x1o3"}),Object(_t.t)("btn.changePassword"))),v.a.createElement(ut.Item,{className:"u-pl-2x1o6",onClick:a},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("i",{className:"fv fuvi-logouts pr-3 u-fs-1x1o3"}),Object(_t.t)("btn.logout"))))))}}]),n}(v.a.PureComponent),Et=Object(q.b)(null,(function(e){return{getUserStorage:function(t,n,r){return e(Q.a.getUserStorage(t,n,r))}}}))(wt);var St=v.a.lazy((function(){return r.e(2).then(r.bind(null,1991))})),Ct=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{showConfirmation:!1}),G()(V()(e),"componentDidMount",(function(){var t=x.g.SEARCH_PARAM,n=t.KEY,r=t.VALUE,i=new URLSearchParams(window.location.search),a=i.get(n.POPUP),o=i.get(n.ACTION);if([r.SUBSCRIBE_SUCCESS,r.SUBSCRIBE_CANCEL].includes(a)){if(a===r.SUBSCRIBE_SUCCESS){var s=i.get(n.SUBSCRIBER_ID),l=i.get(n.PLAN_NAME),c=i.get(n.SESSION_ID);e.handleSubscriptionCheckoutSuccessCallback({kbSubscriberId:s,kbPlanName:l,sessionId:c})}else e.props.showSubscriptionModalForm(!0);x.c.removeURLSearchParams([n.POPUP,n.SUBSCRIBER_ID,n.PLAN_NAME,n.SESSION_ID],!0)}else if([r.ADD_PAYMENT_METHOD_SUCCESS,r.ADD_PAYMENT_METHOD_CANCEL].includes(a)){if(a===r.ADD_PAYMENT_METHOD_SUCCESS){var u=i.get(n.SUBSCRIBER_ID),d=i.get(n.SESSION_ID),h=i.get(n.DEFAULT_PAYMENT_METHOD);e.handleAddPaymentMethodSuccessCallback({kbSubscriberId:u,sessionId:d,defaultPaymentMethod:h})}else e.props.displayFinanceAccountsForm(!0);x.c.removeURLSearchParams([n.POPUP,n.SUBSCRIBER_ID,n.PLAN_NAME,n.SESSION_ID,n.DEFAULT_PAYMENT_METHOD],!0)}else o==r.ACTION.OPEN_FINANCE_ACCOUNTS?e.props.displayFinanceAccountsForm(!0):o==r.ACTION.OPEN_LOGIN_FORM?e.props.displayLoginModal({show:!0}):o==r.ACTION.OPEN_REGISTER_FORM?e.props.displayRegisterModal(!0):o==r.ACTION.OPEN_ACTIVATION_FORM&&e.props.displayActivationModal(!0)})),G()(V()(e),"handleLogoutClick",(function(){x.c.loadFbApi(!1);var t=e.props,n=t.isUploadingCogvid,r=t.isEditingSb,i=t.logOutAction;n||r||x.c.isUploadingAttachment()?e.setState({showConfirmation:!0}):i()})),G()(V()(e),"handleLogoutConfirm",(function(){var t=e.props,n=t.logOutAction,r=t.updateIsUploadingCogvid,i=t.updateIsUploadingAttachment,a=t.updateIsEditingSb;r(!1),i(!1),a(!1),n()})),G()(V()(e),"handleLoginClick",H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.c.getToken();case 2:e.sent?window.location.href=x.g.HOME_PAGE_PATH:$.a.push(x.g.LOGIN_PAGE_PATH);case 4:case"end":return e.stop()}}),e)})))),G()(V()(e),"handleOpenOrderHistoryModal",(function(){(0,e.props.toggleOpenOrderHistoryModal)(!0)})),G()(V()(e),"handleOpenRevenueReportModal",(function(){(0,e.props.toggleOpenRevenueReportModal)(!0)})),G()(V()(e),"handleOpenMyResourcesModal",(function(){(0,e.props.displayMyResourcesModal)(!0)})),G()(V()(e),"handleRegisterClick",(function(t){e.props.displayRegisterModal(!0)})),G()(V()(e),"handleSubscriptionClick",(function(t){e.props.showSubscriptionModalForm(!0)})),G()(V()(e),"handleCourseSubscriptionClick",(function(t){e.props.displaySubscribedCoursesModal(!0)})),G()(V()(e),"handleSubscriptionCheckoutSuccessCallback",(function(t){var n=t.kbSubscriberId,r=t.kbPlanName,i=t.sessionId,a=e.props,o=a.addPaymentMethod,s=a.showSubscriptionModalForm;e.setState({isLoading:!0}),o({kbSubscriberId:n,kbPlanName:r,sessionId:i},(function(){setTimeout((function(){e.setState({isLoading:!1}),s(!0)}),500)}),(function(){e.setState({isLoading:!1}),s(!0)}))})),G()(V()(e),"handleAddPaymentMethodSuccessCallback",(function(t){var n=t.kbSubscriberId,r=t.sessionId,i=(t.defaultPaymentMethod,e.props),a=i.addPaymentMethod,o=i.displayFinanceAccountsForm;e.setState({isLoading:!0}),a({isAddPaymentMethod:!0,kbSubscriberId:n,sessionId:r,defaultPaymentMethod:!1},(function(){setTimeout((function(){e.setState({isLoading:!1}),o(!0)}),500)}),(function(){e.setState({isLoading:!1}),o(!0)}))})),G()(V()(e),"handleFinanceAccountsClick",(function(t){e.props.displayFinanceAccountsForm(!0)})),G()(V()(e),"handleLoginClick",(function(){var t=window.location,n=t.pathname,r=t.search,i="".concat(n).concat(r);e.props.displayLoginModal({show:!0,redirectTo:i})})),G()(V()(e),"isEmpty",(function(e){return null==e||null==e||""==e})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.userInfo,i=n.toggleOpenUserProfileModal,a=n.isOpenChangePasswordModal,o=n.toggleOpenChangePasswordModal,s=n.isEditingSb,l=n.isOpenOrderHistoryModal,c=(n.displayLoginModal,n.isOpenRevenueReportModal),u=n.showMyResourcesModal,d=n.showSubscriptionForm,h=void 0!==d&&d,f=n.showSubscribedCoursesForm,p=void 0!==f&&f,m=n.showFinanceAccountsForm,g=void 0!==m&&m,b=n.reportUserSessionState,y=this.state,A=y.showConfirmation,_=y.storageCapacity,w=y.storageUsed,E=y.isLoading,S=Object(Y.get)(r,"avatar.image")?Object(Y.get)(r,"avatar.image"):I.a.noAvatar,C="".concat(r.firstName," ").concat(r.lastName),T=this.isEmpty(null==r?void 0:r.firstName)||this.isEmpty(null==r?void 0:r.lastName)||this.isEmpty(null==r?void 0:r.avatar)||this.isEmpty(null==r?void 0:r.audience)||this.isEmpty(null==r?void 0:r.country)||this.isEmpty(null==r?void 0:r.location);return r.userId?v.a.createElement("div",{className:"h-100 py-1 mx-2 d-flex align-items-center position-relative"},v.a.createElement("div",null,v.a.createElement(TC,null)),E&&v.a.createElement(Nn,{className:"position-fixed"}),a&&v.a.createElement(dP,null),v.a.createElement(v.a.Suspense,{fallback:v.a.createElement("div",{className:"d-none position-absolute"})},l&&v.a.createElement(St,null)),c&&v.a.createElement(ZR,null),u&&v.a.createElement($ae,null),h&&v.a.createElement(Goe,null),g&&v.a.createElement(nse,null),p&&v.a.createElement(Voe,null),v.a.createElement("div",{className:"u-w-5 u-flex-center flex-column h-100 pt-3 ml-2"},v.a.createElement(Et,{incompleteProfile:T,userAvatar:S,displayName:C,email:r.email,onLogout:this.handleLogoutClick,openProfileForm:function(){return i(!0)},openChangePasswordForm:function(){return o(!0)},openOrderHistoryModal:this.handleOpenOrderHistoryModal,openRevenueReportModal:this.handleOpenRevenueReportModal,openMyResourcesModal:this.handleOpenMyResourcesModal,storageCapacity:_,storageUsed:w,openSubscription:this.handleSubscriptionClick,openCourseSubscription:this.handleCourseSubscriptionClick,openFinanceAccountsForm:this.handleFinanceAccountsClick})),v.a.createElement(IC,{show:!!A,title:t("modal.confirmLogoutModalTitle"),message:s?t("modal.confirmCancelEditSbMessage"):t("modal.confirmCancelUploadingModalMessage"),onConfirm:this.handleLogoutConfirm,onClose:function(){return e.setState({showConfirmation:!1})}}),v.a.createElement(yee,{userId:r.userId,reportUserSessionState:b})):v.a.createElement(v.a.Fragment,null,h&&v.a.createElement(Goe,null),v.a.createElement("div",{className:"u-w-5 u-font-din-condensed d-flex flex-column"},v.a.createElement("div",{className:P()(At.a.loginBtn,"mt-3"),onClick:this.handleLoginClick},v.a.createElement("span",null,t("btn.login")))))}}]),r}(g.PureComponent),Tt=Object(X.a)(K.b,Object(q.b)((function(e){var t=e.auth,n=e.cart,r=e.cogvid,i=e.progress;return{userInfo:t.userInfo,isUploadingCogvid:i.isUploadingCogvid,isOpenChangePasswordModal:t.isOpenChangePasswordModal,isEditingSb:r.isEditingSb,isOpenOrderHistoryModal:n.isOpenOrderHistoryModal,isOpenRevenueReportModal:n.isOpenRevenueReportModal,showMyResourcesModal:r.showMyResourcesModal,showSubscriptionForm:r.showSubscriptionForm,showSubscribedCoursesForm:r.showSubscribedCoursesForm,showFinanceAccountsForm:r.showFinanceAccountsForm}}),(function(e){return{logOutAction:function(){return e(Q.a.authLogOut())},updateIsUploadingCogvid:function(t){return e(Q.k.updateIsUploadingCogvid(t))},updateIsUploadingAttachment:function(t){return e(Q.k.updateIsUploadingAttachment(t))},toggleOpenUserProfileModal:function(t){return e(Q.a.toggleOpenUserProfileModal(t))},toggleOpenChangePasswordModal:function(t){return e(Q.a.toggleOpenChangePasswordModal(t))},updateIsEditingSb:function(t){return e(Q.e.updateIsEditingSb(t))},toggleOpenOrderHistoryModal:function(t){return e(Q.c.toggleOpenOrderHistoryModal(t))},markUserVisited:function(t,n,r){return e(Q.f.stateTracking(t,n,r))},displayLoginModal:function(t){return e(Q.a.displayLoginModal(t))},toggleOpenRevenueReportModal:function(t){return e(Q.c.toggleOpenRevenueReportModal(t))},getUserStorage:function(t,n,r){return e(Q.a.getUserStorage(t,n,r))},displayMyResourcesModal:function(t){return e(Q.e.displayMyResourcesModal(t))},displayRegisterModal:function(t){return e(Q.a.displayRegisterModal(t))},showSubscriptionModalForm:function(t){return e(Q.l.displaySubscriptionModal(t))},addPaymentMethod:function(t,n,r){return e(Q.l.addPaymentMethod(t,n,r))},displayFinanceAccountsForm:function(t){return e(Q.l.displayFinanceAccountsModal(t))},displayActivationModal:function(t){return e(Q.a.displayActivationModal(t))},displaySubscribedCoursesModal:function(t){return e(Q.l.displaySubscribedCoursesModal(t))}}}),null,{forwardRef:!0}))(Ct),kt=r(112),xt=r.n(kt);var Ot=x.g.HOME_PAGE_PATH,It=x.g.DEFAULT_LEARNING_SUBJECT,Mt=x.g.VIDEO_CATEGORY,Pt=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"handleLogoClick",(function(t){t.preventDefault();var n=e.props,r=n.learningSubject,i=n.setLearningSubject;(0,n.resetCogvidReducer)(),x.c.isExploring()&&r!==It?i(It):$.a.push(Ot,{refresh:!0})})),G()(V()(e),"handleUploadResourceClick",(function(){(0,e.props.displaySubscriptionModal)(!0)})),e}return c()(r,[{key:"render",value:function(){var e,n,r,i,a,o=this.props,s=o.header,l=o.leftContent,c=o.leftContentFullscreen,u=o.rightContent,d=o.rightContentFullscreen,h=o.firstArea,f=o.bottomFirstArea,p=o.bottomContentFullscreen,m=o.onFuviAppWrapMouseOver,g=o.isFullscreenMode,b=o.children,y=o.isOpenUserProfileModal,A=o.isUpdatingProfile,_=o.isCreatingCogvid,w=o.firstAreaClassName,E=o.addBtnAction,S=o.isShowAddBtn,C=o.userLoggedIn,T=o.showVideoDescription,k=o.subscriptionOptions,O=((k=void 0===k?{}:k).videoManipulationPermission,k.resourceManipulationPermission,o.videoData),M=o.showProductsLayer,D=o.isVideoActive,N=o.showSubVideoList,L=o.videoSearchComponent,R=o.chapterSearchComponent,B=x.c.getCurrentVideoCategory(),j=B===Mt.COMPOSING||B===Mt.EXPLORING;return v.a.createElement("div",{className:P()(xt.a.fuviAppContainer,"border border-white")},b,(_||A)&&v.a.createElement(Nn,null),y&&v.a.createElement(eI,null),v.a.createElement("div",{className:xt.a.fuviAppWrap,onMouseOver:m},v.a.createElement("div",{className:P()(xt.a.leftBar,g&&xt.a.hide,!g&&"position-static",M&&"u-z-index-0")},v.a.createElement("a",{href:"#",className:P()(xt.a.logoWrapper),onClick:this.handleLogoClick},v.a.createElement("img",{src:I.a.logoWhite,alt:"fuvi.us"})),v.a.createElement("div",{className:P()(xt.a.toolbar,"border-bottom u-flex-center u-font-din-condensed")}),l,v.a.createElement("div",{id:"menu-wrapper",className:P()(xt.a.footer,"u-flex-center flex-column u-font-din-condensed u-z-index-2")},v.a.createElement("div",{className:"w-100 pl-2 u-pr-4 u-fs-1"},v.a.createElement($E,null)),v.a.createElement("div",{className:"w-100 pl-2 u-pr-4 u-fs-1 mt-2"},v.a.createElement(yse,null)))),v.a.createElement("div",{className:"w-100 d-flex flex-column"},v.a.createElement("div",{className:P()(xt.a.topBar,T&&xt.a.shadow)},g&&v.a.createElement("a",{href:"#",className:xt.a.logoWrapper,onClick:this.handleLogoClick},v.a.createElement("img",{src:I.a.logoWhite,alt:"fuvi.us"})),v.a.createElement("div",{className:"flex-fill position-relative"},v.a.createElement("div",{className:xt.a.topbarScrollWrap},s)),v.a.createElement("div",{className:P()(xt.a.userActionsWrapper)},j&&v.a.createElement(Qt,{className:P()(!C&&"mt-3"),tooltipText:"Subscribe or change plans to upload resources & classes",tooltipPlacement:"bottom",onClick:this.handleUploadResourceClick},v.a.createElement("img",{height:28,src:I.a.uploadWhiteIcon,alt:"upload icon"})),S&&v.a.createElement("div",{className:"d-flex align-items-center mx-2"},v.a.createElement(et.a,{type:"button",variant:"light",block:!0,className:P()(xt.a.addBtn,"text-dark"),onClick:E},v.a.createElement("i",{className:"fv fuvi-create-video mr-1 u-fs-1x1o2"}),v.a.createElement("div",null,t("btn.add")))),C&&v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement(KM,null),v.a.createElement(PO,null)),v.a.createElement("div",{className:P()(xt.a.policyLink,"u-w-5 u-font-din-condensed")},v.a.createElement("a",{href:"/common/privacyPolicy.html",target:"_blank"},"Privacy policy")),v.a.createElement(Tt,null))),v.a.createElement("div",{className:P()(xt.a.contentWrapper)},v.a.createElement("div",{className:P()(xt.a.productsLayerWrapper,g&&xt.a.isFullscreenMode)},O&&v.a.createElement(Toe,{videoId:null==O?void 0:O.uid,chapters:null==O?void 0:O.chapters,author:null==O?void 0:null===(e=O.cognitiveVideo)||void 0===e?void 0:e.author,title:null==O?void 0:null===(n=O.cognitiveVideo)||void 0===n?void 0:n.title,subject:null==O?void 0:null===(r=O.cognitiveVideo)||void 0===r?void 0:r.subject,topic:null==O?void 0:null===(i=O.cognitiveVideo)||void 0===i?void 0:i.topic,videoOwnerId:null==O?void 0:null===(a=O.cognitiveVideo)||void 0===a?void 0:a.owner,videoSearchComponent:L,chapterSearchComponent:R,isVideoActive:D,isFullscreenMode:g})),v.a.createElement("div",{className:"w-100 h-100 d-flex "},v.a.createElement("div",{className:P()(xt.a.centerApp,g&&[xt.a.isFullscreenMode])},v.a.createElement("div",{className:P()("flex-fill d-flex",g&&"u-z-index-0",w)},g&&v.a.createElement("div",{className:xt.a.leftBar},c),h,g&&v.a.createElement("div",{className:xt.a.rightBar},d),v.a.createElement("div",{id:"id-right-bar",className:P()(xt.a.rightBar,g&&xt.a.hide,"border-left")},u)),g?p:f)))),!g&&v.a.createElement(bi,{videoId:null==O?void 0:O.uid,chapters:null==O?void 0:O.chapters,showSubVideoList:N})))}}]),r}(g.Component),Dt=Object(q.b)((function(e){var t,n=e.canvas,r=e.auth,i=e.content,a=e.common,o=e.cogvid,s=e.cg;return{isFullscreenMode:a.isFullscreenMode,isOpenUserProfileModal:r.isOpenUserProfileModal,isUpdatingProfile:r.isUpdatingProfile,isCreatingCogvid:i.isCreatingCogvid,isToolbarShown:n.isToolbarShown,userLoggedIn:!!r.userInfo.userId,showVideoDescription:o.showVideoDescription,subscriptionOptions:r.userInfo.subscriptionOptions,learningSubject:o.learningSubject,showProductsLayer:!!(null===(t=o.showProductsLayer)||void 0===t?void 0:t.videoId),isVideoActive:-1!==s.showChapterCoverImageSlide}}),(function(e){return{setTypeEditting:function(t){return e(Q.f.setTypeEditting(t))},getGalleryVideo:function(t,n){return e(Q.e.getGalleryVideo(t,n))},resetVideoList:function(t){return e(Q.e.resetVideoList(t))},updateReviewAttachment:function(t){return e(Q.e.updateReviewAttachment(t))},updateCreatingCogvidList:function(t){return e(Q.g.updateCreatingCogvidList(t))},displaySubscriptionModal:function(t){return e(Q.l.displaySubscriptionModal(t))},setLearningSubject:function(t){return e(Q.e.setLearningSubject(t))},resetCogvidReducer:function(){return e(Q.e.resetReducer())}}}))(Pt),Nt=r(179),Lt=r.n(Nt);var Rt=x.g.HOME_PAGE_PATH,Bt=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.meetingBottom,r=e.rightContent,i=e.firstArea,a=(e.bottomFirstArea,e.onFuviAppWrapMouseOver),o=e.isFullscreenMode,s=e.children,l=e.firstAreaClassName,c=e.userLoggedIn;return v.a.createElement("div",{className:P()(Lt.a.fuviAppContainer,"border border-white")},s,v.a.createElement(D.b,{transition:D.a}),v.a.createElement("div",{className:"".concat(Lt.a.fuviAppWrap," h-100 d-flex flex-column position-relative"),onMouseOver:a},v.a.createElement("div",{className:"".concat(Lt.a.topBar," d-flex align-items-stretch border-bottom border-white")},v.a.createElement("a",{href:"#",className:"".concat(Lt.a.mainLogoWrap," d-flex justify-content-center align-items-center border-right border-white px-2"),onClick:function(){$.a.push(Rt),window.location.reload()}},v.a.createElement("img",{className:Lt.a.fuviLogo,src:I.a.logoWhite,alt:"fuvi.us"})),v.a.createElement("div",{className:"flex-fill position-relative"},v.a.createElement("div",{className:Lt.a.topbarScrollWrap},t)),c&&v.a.createElement("div",{className:"d-flex align-items-center"})),v.a.createElement("div",{className:P()(Lt.a.contentWrapper,"d-flex flex-fill")},v.a.createElement("div",{className:"d-flex flex-fill"},v.a.createElement("div",{className:P()("d-flex flex-fill flex-column",Lt.a.centerApp)},v.a.createElement("div",{className:P()("flex-fill d-flex meeting-wrapper",l)},i),n)),v.a.createElement("div",{className:P()(Lt.a.rightBar,o&&Lt.a.fullscreenMode,!o&&"position-relative","border-left")},r))))}}]),n}(g.Component),jt=Object(q.b)((function(e){var t=e.canvas,n=e.auth,r=e.content;return{isFullscreenMode:e.common.isFullscreenMode,isOpenUserProfileModal:n.isOpenUserProfileModal,isUpdatingProfile:n.isUpdatingProfile,isCreatingCogvid:r.isCreatingCogvid,isToolbarShown:t.isToolbarShown,userLoggedIn:!!n.userInfo.userId}}),(function(e){return{setTypeEditting:function(t){return e(Q.f.setTypeEditting(t))},getGalleryVideo:function(t,n){return e(Q.e.getGalleryVideo(t,n))},resetVideoList:function(t){return e(Q.e.resetVideoList(t))},updateReviewAttachment:function(t){return e(Q.e.updateReviewAttachment(t))},updateCreatingCogvidList:function(t){return e(Q.g.updateCreatingCogvidList(t))}}}))(Bt),Ft=r(437),Ut=r.n(Ft);Object(q.b)((function(e){var t=e.cogvid;return{chapterHighlighting:t.chapterHighlighting,cognitiveVideo:t.cogvidDetails.cognitiveVideo}}))((function(e){var t=e.chapterHighlighting,n=e.cognitiveVideo,r=n.avatar,i=n.author,a=n.title,o=n.subject,s=n.topic,l=t.content;return v.a.createElement("div",{className:"d-flex w-100 text-white"},v.a.createElement("div",{className:P()("d-flex flex-column align-items-center",Ut.a.avatarCol)},v.a.createElement("div",{className:P()(Ut.a.avatarImg),style:{backgroundImage:"url(".concat(r||I.a.noAvatar,")")}}),v.a.createElement("div",{className:"w-100 mt-1 text-truncate u-fs-3o4 u-fw-500"},i," ")),v.a.createElement("div",{className:P()("d-flex flex-column justify-content-center",Ut.a.videoInfoCol)},v.a.createElement("div",{className:"w-100 text-truncate mb-1 u-fw-500"},a," ",Boolean(o)&&v.a.createElement(v.a.Fragment,null," —  ",o)," ",Boolean(s)&&v.a.createElement(v.a.Fragment,null," —  ",s)),v.a.createElement("div",{className:"w-100 text-truncate"},v.a.createElement("small",null,l))))}));var Ht=r(82),zt=r.n(Ht),Vt=function(e){var t=e.children,n=e.className,r=e.onClick;return v.a.createElement("div",{className:"".concat(zt.a.quickBtn," px-1 ").concat(n||null),onClick:r},t)};Vt.propTypes={className:ne.a.string,onClick:ne.a.func},Vt.defaultProps={className:null,onClick:function(){return null}};var Wt=r(31),Gt=r.n(Wt),qt=r(40),Yt=r.n(qt),Kt=r(1836),Xt=r(1830),Qt=function(e){var t=e.children,n=e.onClick,r=e.onMouseEnter,i=e.onMouseLeave,a=e.className,o=e.classNameBadge,s=e.classNameContainer,l=e.classNameWrapper,c=e.round,u=e.large,d=e.badge,h=e.border,f=e.size,p=e.style,m=e.active,g=e.disabled,b=e.tooltipText,y=e.tooltipPlacement,A=e.isLoading,_=e.fillColor,w=e.fontActive,E=e.label,S=e.name,C=e.btnRef,T=Yt()(e,["children","onClick","onMouseEnter","onMouseLeave","className","classNameBadge","classNameContainer","classNameWrapper","round","large","badge","border","size","style","active","disabled","tooltipText","tooltipPlacement","isLoading","fillColor","fontActive","label","name","btnRef"]),k="sm"===f;return A?v.a.createElement(Rn,null):v.a.createElement(Kt.a,{placement:y,delay:{show:800},overlay:v.a.createElement(Xt.a,{className:P()(void 0!==d&&zt.a.tooltipWithBadge)},b),trigger:b?["hover","focus"]:""},v.a.createElement("div",{className:P()(zt.a.iconBtnWrapper,l,s)},v.a.createElement("div",{name:S,onClick:function(e){e.currentTarget.blur(),n(e)},onMouseEnter:r,onMouseLeave:i,className:P()(s,g?zt.a.disabled:"u-cursor-pointer"),ref:C},!!d&&v.a.createElement("div",{className:P()("font-weight-bold",zt.a.badge,c&&zt.a.badgeOnTop,o)},d),v.a.createElement("button",Gt()({type:"button",style:p,className:P()("btn d-flex align-items-center justify-content-center flex-column",zt.a.iconBtn,h&&"border border-dark",k&&zt.a.smallSize,m&&zt.a.active,c&&zt.a.round,w&&zt.a.fontActive,u&&zt.a.large,a,E&&zt.a.labelOnly)},T),t,!!_&&v.a.createElement("div",{className:zt.a.colorFill,style:{backgroundColor:_}})))))};Qt.propTypes={btnRef:ne.a.oneOfType([ne.a.object,ne.a.func,ne.a.string]),className:ne.a.string,classNameBadge:ne.a.string,onClick:ne.a.func,border:ne.a.bool,disabled:ne.a.bool,size:ne.a.oneOf(["sm","md","lg"]),onMouseEnter:ne.a.func,onMouseLeave:ne.a.func,round:ne.a.bool,badge:ne.a.node,tooltipText:ne.a.string,isLoading:ne.a.bool,fillColor:ne.a.string,label:ne.a.bool},Qt.defaultProps={className:null,onClick:function(){return null},border:!1,disabled:!1,size:"md",tooltipPlacement:"top",isLoading:!1,label:!1};var $t=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.onClick,i=e.onMouseDown;return v.a.createElement("div",{role:"button",className:"".concat(zt.a.IconRoundBtn," ").concat(n," d-flex align-items-center justify-content-center"),onClick:r,onMouseDown:i},t)}}]),n}(g.Component);$t.propTypes={className:ne.a.string,onClick:ne.a.func},$t.defaultProps={className:null,onClick:function(){return null}};var Jt=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=x.g.TYPE_EDITING,n=this.props,r=n.color,i=n.active,a=n.isEditing,o=n.disabled,s=n.onClick,l=n.onStartClick,c=n.onEndClick,u=n.editMode;return v.a.createElement("div",{className:P()((i||a)&&zt.a.active,"d-flex align-items-center btn p-0",o&&"u-cursor-default")},v.a.createElement(Kt.a,{placement:"top",delay:{show:800},overlay:v.a.createElement(Xt.a,null,i?t("tooltip.highlightEditStart",{color:r}):t("tooltip.hightlightAddNew",{color:r})),trigger:["hover","focus"]},v.a.createElement("div",null,v.a.createElement("button",{className:P()(a&&(u==e.HIGHLIGHT_ADD_START||u==e.HIGHLIGHT_EDITING_START)&&"activeButton","btn p-0 m-0 d-flex align-items-center",o&&zt.a.disabled),onClick:l,name:"highlight-bracket"},v.a.createElement("i",{className:"".concat(a&&(u==e.HIGHLIGHT_ADD_START||u==e.HIGHLIGHT_EDITING_START)&&zt.a["color-".concat(r)]," fv fuvi-bracket-open")})))),v.a.createElement(Kt.a,{placement:"top",delay:{show:800},overlay:v.a.createElement(Xt.a,null,t("tooltip.hightlightAddNew",{color:r})),trigger:["hover","focus"]},v.a.createElement("div",null,v.a.createElement("div",{onClick:s,className:P()("py-1",o&&zt.a.disabled)},v.a.createElement("div",{className:"".concat(zt.a.highlightBtnLabel," ").concat(zt.a[r]," ").concat(a&&(u==e.HIGHLIGHT_ADD_END||u==e.HIGHLIGHT_ADD_START)&&"activeButton")})))),v.a.createElement(Kt.a,{placement:"top",delay:{show:800},overlay:v.a.createElement(Xt.a,null,i?t("tooltip.highlightEditStart",{color:r}):t("tooltip.hightlightAddNew",{color:r})),trigger:["hover","focus"]},v.a.createElement("div",null,v.a.createElement("button",{className:P()(a&&(u==e.HIGHLIGHT_ADD_END||u==e.HIGHLIGHT_ADD_START||u==e.HIGHLIGHT_EDITING_END)&&"activeButton","btn p-0 m-0 d-flex align-items-center",o&&zt.a.disabled),onClick:c,name:"highlight-bracket"},v.a.createElement("i",{className:"".concat(a&&(u==e.HIGHLIGHT_ADD_END||u==e.HIGHLIGHT_ADD_START||u==e.HIGHLIGHT_EDITING_END)&&zt.a["color-".concat(r)]," fv fuvi-bracket-close")})))))}}]),r}(g.Component);Jt.propTypes={color:ne.a.oneOf([x.g.HIGHLIGHTS.BLUE,x.g.HIGHLIGHTS.ORANGE,x.g.HIGHLIGHTS.YELLOW]),editMode:ne.a.string,active:ne.a.bool,disabled:ne.a.bool,onClick:ne.a.func},Jt.defaultProps={color:x.g.HIGHLIGHTS.BLUE,active:!1,disabled:!1,onClick:function(){return null}};var Zt=["as","bsPrefix","className","children"],en=v.a.forwardRef((function(e,t){var n=e.as,r=void 0===n?"div":n,i=e.bsPrefix,a=e.className,o=e.children,s=Object(y.a)(e,Zt);return i=Object(w.a)(i,"popover-header"),v.a.createElement(r,Object(b.a)({ref:t},s,{className:_()(i,a)}),o)})),tn=["as","bsPrefix","className","children"],nn=v.a.forwardRef((function(e,t){var n=e.as,r=void 0===n?"div":n,i=e.bsPrefix,a=e.className,o=e.children,s=Object(y.a)(e,tn);return i=Object(w.a)(i,"popover-body"),v.a.createElement(r,Object(b.a)({ref:t},s,{className:_()(a,i)}),o)})),rn=["bsPrefix","placement","className","style","children","content","arrowProps","popper","show"],an=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.placement,i=e.className,a=e.style,o=e.children,s=e.content,l=e.arrowProps,c=(e.popper,e.show,Object(y.a)(e,rn)),u=Object(w.a)(n,"popover"),d=((null==r?void 0:r.split("-"))||[])[0];return v.a.createElement("div",Object(b.a)({ref:t,role:"tooltip",style:a,"x-placement":d,className:_()(i,u,d&&"bs-popover-"+d)},c),v.a.createElement("div",Object(b.a)({className:"arrow"},l)),s?v.a.createElement(nn,null,o):o)}));an.defaultProps={placement:"right"},an.Title=en,an.Content=nn;var on=an;r(336);var sn=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"shouldComponentUpdate",(function(t){var n={},r={};return Object.keys(e.props).forEach((function(i){"function"!=typeof e.props[i]&&(n[i]=e.props[i],r[i]=t[i])})),!Object(Y.isEqual)(n,r)})),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.children,r=e.fillColor,i=e.onChange,a=e.disabled,o=e.isTransparent,s=e.position,l=e.className,c=v.a.createElement(on,{style:{maxWidth:305}},v.a.createElement(on.Content,null,v.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-3"},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:P()(zt.a.colorListPickerItem,"mr-2",zt.a.cursorDefault),style:{backgroundColor:r}}),v.a.createElement("span",null,t("selected"))),o&&v.a.createElement("div",{className:P()("d-flex align-items-center",zt.a.cursorPointer),onClick:function(){return i("transparent")}},v.a.createElement("div",{className:P()(zt.a.colorListPickerItem,"mr-2 d-flex align-items-center justify-content-center text-black-50")},v.a.createElement("i",{className:"fv fuvi-no-fill-icon"})),v.a.createElement("span",null,t("transparent")))),v.a.createElement("div",{className:P()(zt.a.colorListPicker,"")},x.f.OFFICE_COLOR_LIST.map((function(e,t){return v.a.createElement("div",{key:t,style:{backgroundColor:e},className:P()(zt.a.colorListPickerItem,e===r&&zt.a.active),onClick:function(){return i(e)}})})))));return v.a.createElement(v.a.Fragment,null,v.a.createElement(Kt.a,{rootClose:!0,trigger:a?null:"click",placement:s,overlay:c},v.a.createElement(Qt,{fillColor:r,disabled:a,className:l},n)))}}]),r}(g.Component),ln=r(247),cn=v.a.createContext(null);cn.displayName="CardContext";var un=cn,dn=["bsPrefix","className","variant","as"],hn=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.variant,a=e.as,o=void 0===a?"img":a,s=Object(y.a)(e,dn),l=Object(w.a)(n,"card-img");return v.a.createElement(o,Object(b.a)({ref:t,className:_()(i?l+"-"+i:l,r)},s))}));hn.displayName="CardImg",hn.defaultProps={variant:null};var fn=hn,pn=["bsPrefix","className","bg","text","border","body","children","as"],mn=Object(ln.a)("h5"),gn=Object(ln.a)("h6"),vn=Object(it.a)("card-body"),bn=Object(it.a)("card-title",{Component:mn}),yn=Object(it.a)("card-subtitle",{Component:gn}),An=Object(it.a)("card-link",{Component:"a"}),_n=Object(it.a)("card-text",{Component:"p"}),wn=Object(it.a)("card-header"),En=Object(it.a)("card-footer"),Sn=Object(it.a)("card-img-overlay"),Cn=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.bg,a=e.text,o=e.border,s=e.body,l=e.children,c=e.as,u=void 0===c?"div":c,d=Object(y.a)(e,pn),h=Object(w.a)(n,"card"),f=Object(g.useMemo)((function(){return{cardHeaderBsPrefix:h+"-header"}}),[h]);return v.a.createElement(un.Provider,{value:f},v.a.createElement(u,Object(b.a)({ref:t},d,{className:_()(r,h,i&&"bg-"+i,a&&"text-"+a,o&&"border-"+o)}),s?v.a.createElement(vn,null,l):l))}));Cn.displayName="Card",Cn.defaultProps={body:!1},Cn.Img=fn,Cn.Title=bn,Cn.Subtitle=yn,Cn.Body=vn,Cn.Link=An,Cn.Text=_n,Cn.Header=wn,Cn.Footer=En,Cn.ImgOverlay=Sn;var Tn=Cn,kn=r(1831),xn=r(1815),On=r(558),In=r.n(On);var Mn=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"fileInput",v.a.createRef()),G()(V()(e),"state",{fileName:"",isUploadOpen:!1}),G()(V()(e),"handleFileChange",(function(t){if(t.target.files&&t.target.files.length>0){var n=e.props.uploadVideo,r=t.target.files[0].name,i=t.target.files[0];e.setState({fileName:r,isUploadOpen:!0},(function(){return n(i,(function(){return e.fileInput.current.value=null}),(function(){return e.fileInput.current.value=null}))}))}})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.btnUploadStyle,r=t.isUploading,i=t.uploadError,a=this.state,o=a.fileName,s=a.isUploadOpen;return v.a.createElement("div",null,v.a.createElement("div",{className:"".concat(n," px-2"),onClick:function(){return e.fileInput.current.click()}},v.a.createElement("i",{className:"fa fa-upload","aria-hidden":"true"})),v.a.createElement("input",{className:"d-none",ref:this.fileInput,type:"file",onChange:function(t){return e.handleFileChange(t)}}),s&&v.a.createElement("div",{className:In.a.videoUploadModal},v.a.createElement(Tn,null,v.a.createElement(Tn.Header,{className:"bg-secondary text-white"},r?"Uploading video":"Video upload",v.a.createElement("button",{className:"close",onClick:function(){return e.setState({isUploadOpen:!1})}},v.a.createElement("i",{className:"fa fa-times","aria-hidden":"true"}))),!r&&v.a.createElement(kn.a,{variant:i?"danger":"success"},i.toString()||"Upload successful"),v.a.createElement(Tn.Body,null,v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("i",{className:"fa fa-file-video-o mr-3","aria-hidden":"true"}),v.a.createElement("div",{className:"".concat(In.a.textUploadFileName," flex-fill")},o),v.a.createElement("div",{className:"ml-3"},r?v.a.createElement(xn.a,{animation:"border",size:"sm",variant:"info"}):i?v.a.createElement("i",{className:"fa fa-times-circle text-danger fa-lg","aria-hidden":"true"}):v.a.createElement("i",{className:"fa fa-check-circle text-success fa-lg","aria-hidden":"true"})))))))}}]),n}(g.Component),Pn=(Object(q.b)((function(e){return{isUploading:e.content.isLoading,uploadError:e.content.error}}),(function(e){return{uploadVideo:function(t,n,r){return e(Q.g.uploadAVideo(t,n,r))}}}))(Mn),r(330)),Dn=r.n(Pn),Nn=function(e){var t=e.className;return v.a.createElement("div",{className:P()(Dn.a.maskSpinner,t)},v.a.createElement("div",{className:Dn.a.spinContent},v.a.createElement(xn.a,{animation:"border"})))};function Ln(e){var t=e.className;return v.a.createElement("i",{className:P()("fv fuvi-spinner8",Dn.a.loadingAnimationIcon,t)})}function Rn(){return v.a.createElement(Qt,{round:!0,disabled:!0,classNameWrapper:"u-flex-center"},v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}))}var Bn=r(140),jn=function(e){var t=e.component,n=Yt()(e,["component"]);return v.a.createElement(Bn.b,Gt()({},n,{render:function(e){return x.c.getToken()?v.a.createElement(Bn.a,{to:{pathname:x.g.HOME_PAGE_PATH,state:{from:e.location}}}):v.a.createElement(t,e)}}))},Fn=r(244),Un=function(e){var t=e.component,n=Yt()(e,["component"]);return v.a.createElement(Bn.b,Gt()({},n,{render:function(e){var r=n.location,i=(r=void 0===r?{}:r).pathname,a=void 0===i?"/":i,o=x.c.getToken(),s=x.g.HOME_PAGE_PATH;return o?Fn.isMobile?v.a.createElement(Bn.a,{to:{pathname:x.g.MOBILE_COMING_SOON_PAGE_PATH,state:{from:e.location}}}):"/"===a?v.a.createElement(Bn.a,{to:{pathname:s,state:{from:e.location}}}):v.a.createElement(t,e):v.a.createElement(Bn.a,{to:{pathname:x.g.LOGIN_PAGE_PATH,state:{from:e.location}}})}}))},Hn=r(192),zn=r.n(Hn),Vn=r(61),Wn=r.n(Vn);var Gn=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isDisabledBuyButton:!1}),G()(V()(e),"handleQuickBuy",(function(t){t.stopPropagation();var n=e.props.videoId,r=x.c.getCurrentVideoCategory(),i="/".concat(r,"?v=").concat(n);if(x.c.checkLoggedIn(i)){var a=e.props.unitPrice,o=(a=void 0===a?{}:a).productId,s=a.productTitle,l=void 0===s?"":s;o&&(e.setState({isDisabledBuyButton:!0}),x.a.quickBuyOneItem({productId:o,productTitle:l,productType:x.g.PRODUCT_TYPE.VIDEO},(function(){return e.setState({isDisabledBuyButton:!1})})))}})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.unitPrice,n=e.userScaffId,r=e.ownerId,i=e.videoId,a=e.archived,o=(e.accessGrantType,this.state.isDisabledBuyButton,x.g.VIDEO_CATEGORY),s=(x.g.ACCESS_GRANT_TYPE,Object(Y.get)(t,"amount",0)),l=Object(Y.get)(t,"currency.code","USD"),c=(x.c.formatMoney(s,l),x.c.isCurrentUserId(r));return v.a.createElement("div",{className:P()("w-100 h-100 position-absolute d-flex justify-content-center align-items-center bg-body",Wn.a.purchaseOverlayContainer),onClick:function(e){return e.stopPropagation()}},v.a.createElement("div",{className:P()("p-5 bg-white",Wn.a.purchaseOverlayBox)},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("img",{src:I.a.purchaseLocked,alt:""}),v.a.createElement("div",{className:"ml-3",dangerouslySetInnerHTML:{__html:n&&!c?Object(_t.t)("firstAreaPurchaseNoticePurchased",{menu:Object(_t.t)(a?"menu.messages":"menu.learn")}):c?Object(_t.t)("firstAreaPurchaseNoticePurchased",{menu:Object(_t.t)("menu.composing")}):Object(_t.t)("firstAreaUnavailableNotice")}})),v.a.createElement("div",{className:"text-center mt-3"},!!n&&!c&&v.a.createElement(O.a,{className:"btn btn-outline-primary modal-button",to:"".concat(a?o.EXPERIENCING:o.LEARNING,"?v=").concat(i)},Object(_t.t)("btn.open")),!!c&&v.a.createElement(O.a,{className:"btn btn-outline-primary modal-button",to:"".concat(o.COMPOSING,"?v=").concat(i)},Object(_t.t)("btn.open")),!n&&!c&&!1)))}}]),n}(g.Component);var qn=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){return v.a.createElement("div",{className:P()("w-100 h-100 position-absolute d-flex justify-content-center align-items-center bg-body",Wn.a.purchaseOverlayContainer),onClick:function(e){return e.stopPropagation()}},v.a.createElement("div",{className:P()("p-5 bg-white",Wn.a.purchaseOverlayBox)},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("img",{src:I.a.purchaseLocked,alt:""}),v.a.createElement("div",{className:"ml-3",dangerouslySetInnerHTML:{__html:t("firstAreaHiddenContent")}}))))}}]),r}(g.Component),Yn=(r(1149),r(408));function Kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qn=x.g.SRC_SET_TIME,$n=x.g.VIDEO_VOLUME_DEFAULT,Jn=x.g.CHAPTER_TYPES,Zn=x.g.VIDEO_OVERLAY_MODE,er=x.g.TYPE_EDITING,tr=(x.g.LOOP_MODE,x.g.TRACKING_USER),nr=x.g.VIDEO_CATEGORY,rr=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"timeInterval",null),G()(V()(e),"playerPaused",!0),G()(V()(e),"componentDidMount",(function(){var t=V()(e),n=e.props,r=n.playerReady,i=n.playerPlayed,a=n.playerWaiting;window.videojs=V()(e),window.playnow=!0,e.oldPlayer=Object(Yn.a)(e.videoNode,Xn(Xn({},e.props),{},{loadingSpinner:!1,preload:"auto"}),(function(){return window.oldPlayer=e.oldPlayer})),e.oldPlayer.ready((function(){e.oldPlayer.volume($n),e.oldPlayer.on("error",(function(e){console.debug("Video error: ",e)})),e.oldPlayer.on("waiting",(function(){a(!0)})),e.oldPlayer.on("ready",(function(){a(!0)})),e.oldPlayer.on("loadeddata",(function(){a(!1),r()})),e.oldPlayer.on("firstplay",(function(){i()})),e.oldPlayer.on("canplaythrough",(function(){var e=t.props,n=e.chapterHighlighting,r=e.isActivedVideoOnRedline,i=e.attachmentId,o=e.played,s=e.videoTime,l=(null==s?void 0:s.setTimeFrom)===Qn.FIRST_PLAY,c=x.c.getCurrentVideoCategory(),u=!!(null==n?void 0:n.uid)&&(null==n?void 0:n.type)===Jn.EPISODIC.key&&(c!==nr.EXPLORING||(null==n?void 0:n.accessible));if((o?!t.paused():window.playnow&&!i)&&window.oldPlayer&&u&&!r){var d=x.c.getDataFromUrl().action,h=(!l||window.forceAutoplay)&&!d;h&&t.play(),!h&&t.pause(),window.forceAutoplay=!1,window.playnow=!1}else console.debug("doesn't meet the conditions"),a(!1)})),e.oldPlayer.on("playing",(function(){t.props.isWaiting&&a(!1),t.oldPlayerPaused&&(t.oldPlayerPaused=!1),e.props.videoOverlayMode===Zn.CONTEXTUAL_IMG&&e.props.showVideoOverlay("");var n=window.trackingObj;(void 0===n?{}:n).action!==tr.ACTIONS.PLAY&&t.trackingPlayer(tr.ACTIONS.PLAY,window.oldPlayer.currentTime())})),e.oldPlayer.on("pause",(function(){a(!1),e.oldPlayerPaused&&e.props.setUpdateVideoTime({isPaused:window.oldPlayer.paused()}),t.trackingPlayer(tr.ACTIONS.PAUSE,window.oldPlayer.currentTime())})),e.oldPlayer.on("ended",(function(){var n=e.props.videoTime.setTimeFrom;t.trackingPlayer(tr.ACTIONS.PAUSE,window.oldPlayer.currentTime());var r=e.props.isHighlightLoop,i=window,a=i.playMode,o=void 0===a?{}:a,s=i.highlights,l=i.currentHighlightIndex,c=i.globalTypeEditting;c===er.CHAPTER_EDITING_START||c===er.CHAPTER_EDITING_END||(r?window.oldPlayer.currentTime(s[l].startTime/1e3):o.isVideoPlayingChapterMode||o.isVideoPlayingHighlightMode?n!==Qn.CG&&e.checkJumpToNextOrFirstPart():window.oldPlayer.currentTime(0),e.oldPlayer.ready((function(){n!==Qn.CG&&window.oldPlayer.play()})))}))}))})),G()(V()(e),"play",(function(){window.oldPlayer&&(window.oldPlayer.play(),e.timeInterval||(e.timeInterval=setInterval((function(){if(!e.oldPlayerPaused){var t=window,n=t.playMode,r=void 0===n?{}:n,i=t.globalTypeEditting,a=V()(e).oldPlayer,o=a.currentTime(),s=e.props,l=s.videoTime,c=s.chapterHighlighting,u=l.setTimeFrom,d=l.continuePlayVideo,h=l.currentTime,f=x.c.isCheckLockFirstArea();if(u!==Qn.PLAYER&&""!==u&&!d)return window.oldPlayer.pause(),window.oldPlayer.currentTime(h),e.clearTimer(),void e.props.setUpdateVideoTime({setTimeFrom:Qn.PLAYER,isPaused:a.paused(),continuePlayVideo:f?![Qn.SB_SCROLL,Qn.SB_SCROLL].includes(u)&&c.accessible:![Qn.SB_SCROLL,Qn.FIRST_PLAY].includes(u)});(r.isVideoPlayingChapterMode||r.isVideoPlayingHighlightMode)&&i!==er.CHAPTER_EDITING_START&&i!==er.CHAPTER_EDITING_END&&e.playEachPart(o),!e.props.lockedUpdateVideoTime&&l.currentTime!==o&&e.props.setUpdateVideoTime({setTimeFrom:Qn.PLAYER,isPaused:a.paused(),currentTime:o,remainingTime:a.remainingTime(),duration:a.duration(),continuePlayVideo:!1})}}),20)))})),G()(V()(e),"paused",(function(){return e.oldPlayerPaused})),G()(V()(e),"pause",(function(){e.oldPlayerPaused=!0,window.oldPlayer&&window.oldPlayer.pause()})),G()(V()(e),"clearTimer",(function(){e.timeInterval&&clearInterval(e.timeInterval),e.timeInterval=null})),G()(V()(e),"trackingPlayer",(function(t,n){var r,i=e.props,a=i.videoId;(0,i.trackingVideoCountViewData)({videoId:a,type:tr.TYPES.VIDEO,action:t,timestamp:n,duration:n-((null===(r=window.oldPlayer)||void 0===r?void 0:r.startTimeVideoTracking)||0)})})),G()(V()(e),"playEachPart",(function(t){var n=e.props.isHighlightLoop,r=window,i=r.oldPlayer,a=r.highlights,o=r.currentHighlightIndex;r.playMode;if(!i.paused()&&a[o]){var s=a[o].endTime/1e3,l=a[o].startTime/1e3;if(t>=s-.01){if(n)return e.trackingPlayer(tr.ACTIONS.PAUSE,s),i.currentTime(l);e.checkJumpToNextOrFirstPart()}return t<l?(e.trackingPlayer(tr.ACTIONS.PAUSE,s),i.currentTime(l)):void 0}})),G()(V()(e),"checkJumpToNextOrFirstPart",(function(){var t=e.props.setActiveChapter,n=window,r=n.oldPlayer,i=n.highlights,a=n.currentHighlightIndex,o=n.playMode,s=void 0===o?{}:o,l=!!s.isVideoPlayingChapterMode&&!s.isVideoPlayingHighlightMode;if(a<i.length-1){var c;e.trackingPlayer(tr.ACTIONS.PAUSE,(null===(c=i[a])||void 0===c?void 0:c.endTime)/1e3);var u=a+1;i[window.currentHighlightIndex].endTime+1!=i[u].startTime&&r.currentTime(i[u].startTime/1e3),window.currentHighlightIndex=u,l&&t(i[u])}else{var d;e.trackingPlayer(tr.ACTIONS.PAUSE,(null===(d=i[a])||void 0===d?void 0:d.endTime)/1e3),window.currentHighlightIndex=0;var h=(i[0]||{}).startTime,f=void 0===h?0:h;r.currentTime(f/1e3),l&&t(i[0]||{})}})),e}return c()(n,[{key:"componentWillUnmount",value:function(){var e=this.props,t=e.setUpdateVideoTime,n=e.playerReset,r=window.trackingObj;(void 0===r?{}:r).action===tr.ACTIONS.PLAY&&this.trackingPlayer(tr.ACTIONS.PAUSE,window.oldPlayer?window.oldPlayer.currentTime():0),this.clearTimer(),t({isPaused:!0}),n(),window.videojs=null,this.oldPlayer.dispose(),window.oldPlayer=null}},{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"fv-video-old-player"},v.a.createElement("div",{"data-vjs-player":!0},v.a.createElement("video",{id:"fv-old-player",ref:function(t){return e.videoNode=t},className:"video-js vjs-big-play-centered"})))}}]),n}(v.a.Component),ir=Object(q.b)((function(e){var t=e.cogvid,n=e.playerStatus;return{isHighlightLoop:t.highlightMode.loop,videoOverlayMode:t.videoOverlayMode,lockedUpdateVideoTime:t.videoTime.lockedUpdateVideoTime,chapterHighlighting:t.chapterHighlighting,videoId:t.cogvidDetails.videoId,videoTime:t.videoTime,attachmentId:t.attachmentReview.attachmentId,isWaiting:n.isWaiting,played:n.played}}),(function(e){return{setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))},showVideoOverlay:function(t){return e(Q.e.showVideoOverlay(t))},setActiveChapter:function(t){return e(Q.e.setActiveChapter(t))},playerReset:function(t){return e(Q.m.playerReset(t))},playerReady:function(t){return e(Q.m.playerReady(t))},playerPlayed:function(t){return e(Q.m.playerPlayed(t))},playerWaiting:function(t){return e(Q.m.playerWaiting(t))}}}))(Object(K.b)(rr));var ar,or,sr,lr,cr,ur,dr,hr,fr,pr,mr,gr,vr,br=x.g.VIDEO_CATEGORY,yr=x.g.WITH_CREDENTIALS,Ar=(x.g.ACCESS_GRANT_TYPE,function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.videoOverlayMode,n=e.contextualImg,r=e.rootContext,i=e.fileType,a=e.videoSrc,o=e.videoContentType,s=e.chapterHighlighting,l=e.unitPrice,c=e.cognitiveVideo,u=e.userScaffId,d=e.ownerId,h=e.videoId,f=e.archived,p=e.poster,m=e.isVideoDataLoading,g=e.isActivedVideoOnRedline,b=e.accessGrantType,y=e.userId,A=x.c.getCurrentVideoCategory()===br.BRAINHIVE,_=x.c.isCheckLockFirstArea()&&y&&!!(null==s?void 0:s.uid)&&!(null==s?void 0:s.accessible)||A&&!m&&h&&!(null==s?void 0:s.uid);return v.a.createElement(v.a.Fragment,null,Object(Y.includes)(["video","m3u8"],i)&&!!a&&v.a.createElement(ir,{key:a,sources:[{src:"".concat(a),type:o||"video/mp4",withCredentials:yr}],poster:p,isActivedVideoOnRedline:g}),"image"===i&&v.a.createElement("div",{className:Wn.a.videoPlayer},v.a.createElement("img",{className:Wn.a.imageDisplay,src:a,alt:"review image"})),_?A?v.a.createElement(qn,null):v.a.createElement(Gn,{unitPrice:l,cognitiveVideo:c,userScaffId:u,ownerId:d,videoId:h,archived:f,accessGrantType:b}):Object(Y.includes)(["","m3u8"],i)&&t&&v.a.createElement(hi,{overlayMode:t,contextualImg:"".concat(r).concat(n)}))}}]),n}(g.PureComponent)),_r=(Object(q.b)((function(e){var t=e.cogvid,n=e.auth;return{videoOverlayMode:t.videoOverlayMode,contextualImg:t.currentSbData.contextualImg,rootContext:t.cogvidDetails.rootContext,unitPrice:t.cogvidDetails.unitPrice,ownerId:t.cogvidDetails.ownerId,videoId:t.cogvidDetails.videoId,archived:t.cogvidDetails.archived,userScaffId:t.cogvidDetails.userScaffId,cognitiveVideo:t.cogvidDetails.cognitiveVideo,chapterHighlighting:t.chapterHighlighting,isVideoDataLoading:t.cogvidDetails.isVideoDataLoading,accessGrantType:t.cogvidDetails.accessGrantType,userId:n.userInfo.userId}}))(Ar),r(178)),wr=r(410),Er=(r(1221),x.g.CB_CANVAS),Sr=x.g.MAX_UNDO_STEPS,Cr=x.g.CANVAS_DRAWING_TYPE,Tr=x.g.BORDER_STYLE_TYPE,kr=x.g.BASE_CANVAS_BORDER_COLOR,xr="",Or=Cr.FREE_STYLE,Ir=!1,Mr="",Pr=!1,Dr=!1,Nr=x.g.BASE_FONT,Lr=Tr.LINE,Rr=!1,Br=[0],jr=new Array,Fr=new Array,Ur=!1,Hr=!1;function zr(e){var t=JSON.parse(JSON.stringify(e));t.objects.map((function(e){e.selectable=!1})),e.loadFromJSON(JSON.stringify(t),e.renderAll.bind(e),(function(e,t){}))}function Vr(e,t){null!=e.getActiveObject()&&(e.getActiveObject().set("fontSize",t),e.requestRenderAll())}function Wr(e,t){Pr=e,Dr=t}function Gr(e,t){Nr=t,null!=e.getActiveObject()&&(e.getActiveObject().set("fontFamily",Nr),e.requestRenderAll())}function qr(e){e.selection=!0,e.isDrawingMode=!1}function Yr(e,t){var n=e.getActiveObject();switch(Lr=t,t){case Tr.LINE:Br=[0];break;case Tr.DOT_LINE:Br=[2,5];break;case Tr.DASH_LINE:Br=[20,5,0,0];break;case Tr.DOT_DASH_LINE:Br=[20,5,2,5]}null!=n&&(n.set("strokeLineCap","Butt"),n.set("strokeDashArray",Br),n.setCoords(),e.renderAll())}function Kr(e,t,n,r,i){kr=t,xr=n,e.selection=!1,Rr=!1,Or=r,Mr=r}function Xr(){Rr=!1}function Qr(e){e.getObjects().map((function(e){e.selectable=!1})),e.discardActiveObject(),zr(e)}function $r(e,t){!function(e,t){null!=e.getActiveObject()&&("rect"!=e.getActiveObject().type&&"circle"!=e.getActiveObject().type&&"triangle"!=e.getActiveObject().type&&"ellipse"!=e.getActiveObject().type&&"polygon"!=e.getActiveObject().type||(e.getActiveObject().set("fill",t),e.renderAll()))}(e,t)}function Jr(e,t){kr=null==e?kr:e,xr=null==t?xr:t}function Zr(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.selectable=t,e.hasControls=t,e.hasBorders=t,e.lockMovementX=!t,e.lockMovementY=!t,e.editable=t}function ei(e,t){e.getObjects().map((function(e){Zr(e,t)}))}function ti(e,t,n){e.isDrawingMode=!0;var r=new sr.PSBrush(e);r.width=n,r.color=t||kr,e.freeDrawingBrush=r,e.enablePointerEvents=!0}function ni(e,t,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!Object(Y.isEmpty)(t)){var a=n||Er.WIDTH,o=r||Er.HEIGHT;if(i&&(e.setWidth(a),e.setHeight(o)),null!=t){var s=JSON.parse(t);s.objects.map((function(e){i&&(e.scaleX=(e.scaleX?e.scaleX:1)*a/(s.width?s.width:a),e.scaleY=(e.scaleY?e.scaleY:1)*o/(s.height?s.height:o),e.left*=a/(s.width?s.width:a),e.top*=o/(s.height?s.height:o)),Zr(e)}));var l={objects:s.objects};return e.loadFromJSON(JSON.stringify(l),e.renderAll.bind(e)),l}}}function ri(e,t){var n,r,i,a,o,s,l,c,u,d;return e.X>t.X&&e.Y<t.Y?(n=t.X,r=t.Y-(t.Y-e.Y)/5*2,i=t.X+.02*(e.X-t.X),a=r,o=t.X+.06*(e.X-t.X),s=t.Y,l=t.X+.1*(e.X-t.X),c=e.Y,u=e.X,d=e.Y):e.X<t.X&&e.Y>t.Y?(n=e.X,r=e.Y-(e.Y-t.Y)/5*2,i=e.X+.02*(t.X-e.X),a=r,o=e.X+.06*(t.X-e.X),s=e.Y,l=e.X+.1*(t.X-e.X),c=t.Y,u=t.X,d=t.Y):e.X>t.X&&e.Y>t.Y?(n=t.X,r=e.Y-(e.Y-t.Y)/5*2,i=t.X+.02*(e.X-t.X),a=r,o=t.X+.06*(e.X-t.X),s=e.Y,l=t.X+.1*(e.X-t.X),c=t.Y,u=e.X,d=t.Y):(n=e.X,r=t.Y-(t.Y-e.Y)/5*2,i=e.X+.02*(t.X-e.X),a=r,o=e.X+.06*(t.X-e.X),s=t.Y,l=e.X+.1*(t.X-e.X),c=e.Y,u=t.X,d=e.Y),{startPointX:n,startPointY:r,secondPointX:i,secondPointY:a,thirdPointX:o,thirdPointY:s,fourPointX:l,fourPointY:c,endPointX:u,endPointY:d}}function ii(e,t){var n,r,i,a,o,s;return e.X>t.X&&e.Y<t.Y?(n=t.X,r=t.Y-(t.Y-e.Y)/5*2,i=t.X+.3*(e.X-t.X),a=t.Y,o=e.X,s=e.Y):e.X<t.X&&e.Y>t.Y?(n=e.X,r=e.Y-(e.Y-t.Y)/5*2,i=e.X+.3*(t.X-e.X),a=e.Y,o=t.X,s=t.Y):e.X>t.X&&e.Y>t.Y?(n=t.X,r=e.Y-(e.Y-t.Y)/5*2,i=t.X+.3*(e.X-t.X),a=e.Y,o=e.X,s=t.Y):(n=e.X,r=t.Y-(t.Y-e.Y)/5*2,i=e.X+.3*(t.X-e.X),a=t.Y,o=t.X,s=e.Y),{startPointX:n,startPointY:r,secondPointX:i,secondPointY:a,endPointX:o,endPointY:s}}_r.fabric.Canvas.prototype.historyInit=function(){this.historyUndo=[],this.historyRedo=[],this.historyCurrentState=this.getCurrentCanvasState()},_r.fabric.Canvas.prototype.getCurrentCanvasState=function(){return JSON.stringify(this.toDatalessJSON(this.extraProps))},_r.fabric.Canvas.prototype.saveHistory=function(e,t){this.historyProcessing||(t||this.historyCurrentState)&&(this.historyUndo.push(t||this.historyCurrentState),this.historyUndo.length>Sr&&this.historyUndo.shift(),this.historyRedo=[],e&&e({historyUndo:this.historyUndo,historyRedo:this.historyRedo}),this.historyCurrentState=this.getCurrentCanvasState())},_r.fabric.Canvas.prototype.clearHistory=function(){this.historyUndo=[],this.historyRedo=[]},_r.fabric.Canvas.prototype.undo=function(e,t){this.historyProcessing=!0;var n=this.historyUndo.pop();n&&(this.historyRedo.push(this.getCurrentCanvasState()),this.historyCurrentState=n,ni(e,n),t&&t({historyUndo:this.historyUndo,historyRedo:this.historyRedo})),this.historyProcessing=!1},_r.fabric.Canvas.prototype.redo=function(e,t){this.historyProcessing=!0;var n=this.historyRedo.pop();n&&(this.historyUndo.push(this.getCurrentCanvasState()),this.historyCurrentState=n,ni(e,n),t&&t({historyUndo:this.historyUndo,historyRedo:this.historyRedo})),this.historyProcessing=!1};var ai=2*Math.PI/6;function oi(e){var t,n,r=e.canvas,i=e.mouseUpCallback,a=e.handleTextChange,o=e.canvasElementId,s=void 0===o?"c":o,l=e.width,c=e.height,u=e.updateUndoRedoStates;e.changeToSelectMode;r.freeDrawingBrush.color=kr,sr.Object.prototype.selectable=!1,sr.Object.prototype.noScaleCache=!1,sr.Object.prototype.strokeUniform=!0,sr.Object.prototype.transparentCorners=!1,sr.Object.prototype.cornerColor="white",sr.Object.prototype.cornerStyle="circle",sr.Object.prototype.cornerStrokeColor="#86c9cf",sr.Object.prototype.borderColor="#86c9cf",sr.Object.prototype.rotatingPointOffset=140,sr.Object.prototype.borderScaleFactor=4,sr.Object.prototype.cornerSize=10,sr.Textbox.prototype.setControlsVisibility((t={tr:!0,bl:!1,br:!1,ml:!0,mt:!1,mr:!0,mb:!1,tl:!1},G()(t,"tr",!1),G()(t,"mtr",!0),t)),sr.Line.prototype.setControlsVisibility((n={tr:!0,bl:!0,br:!0,ml:!0,mt:!0,mr:!0,mb:!0,tl:!0},G()(n,"tr",!0),G()(n,"ctp",!0),G()(n,"mtr",!0),n)),sr.Path.prototype.setControlsVisibility({ctp:!1}),sr.Polygon.prototype.setControlsVisibility({ctp:!1}),sr.Triangle.prototype.setControlsVisibility({ctp:!1}),sr.Rect.prototype.setControlsVisibility({ctp:!0}),sr.Circle.prototype.setControlsVisibility({ctp:!0});window;var d=document,h=(d.documentElement,d.getElementById(s),l||Er.WIDTH),f=c||Er.HEIGHT;r.setHeight(f),r.setWidth(h),h,f,r.on("mouse:down",(function(e){var t=r.getPointer(e.e);switch(ar={X:t.x,Y:t.y},Or){case Cr.LINE:Ir=!0;var n=[t.x,t.y,t.x,t.y];cr=t.x,ur=t.y,lr=new sr.Line(n,{strokeWidth:xr,fill:"",stroke:kr,objectCaching:!1,opacity:1,hasBorders:!0,hasControls:!0,selectable:!0}),r.add(lr);break;case Cr.CIRCLE:Ir=!0,cr=t.x,ur=t.y,mr=new sr.Ellipse({left:cr,top:ur,originX:"left",originY:"top",rx:t.x-cr,ry:t.y-ur,angle:0,fill:"",stroke:kr,strokeWidth:xr}),r.add(mr);break;case Cr.RECT:Ir=!0,cr=t.x,ur=t.y,dr=new sr.Rect({left:cr,top:ur,fill:"",stroke:kr,strokeWidth:xr,selectable:!0,objectCaching:!1,opacity:1,hasBorders:!0,hasControls:!0}),r.add(dr);break;case Cr.TRIANGLE:Ir=!0,cr=t.x,ur=t.y,hr=new sr.Triangle({left:t.x,top:t.y,strokeWidth:xr,width:2,height:2,stroke:kr,fill:"",selectable:!0,objectCaching:!1,opacity:1,hasBorders:!0,hasControls:!0}),r.add(hr);break;case Cr.POLYGON:jr.length>0&&e.target&&e.target.id==jr[0].id?(!function(e,t,n){var r=new Array;jr.forEach((function(t,n){r.push({x:t.left,y:t.top}),e.remove(t)})),Fr.forEach((function(t,n){e.remove(t)})),e.remove(Hr).remove(Ur);var i=new sr.Polygon(r,{stroke:t,strokeWidth:n,fill:"",opacity:1,hasBorders:!0,selectable:!1,hasControls:!0,objectCaching:!1});e.add(i),Ur=!1,Hr=!1,jr=[],Fr=[],e.selection=!1,e.discardActiveObject(),zr(e);var a=e.getObjects()[e.getObjects().length-1];a.selectable=!0,e.setActiveObject(a),Or=Cr.NONE}(r,kr,xr),Yr(r,Lr),i&&i()):function(e,t){var n=t.getPointer(e.e),r=Math.floor(999901*Math.random())+99,i=(new Date).getTime()+r,a=new sr.Circle({radius:5,fill:"#ffffff",stroke:"#333333",strokeWidth:.5,left:n.x/t.getZoom(),top:n.y/t.getZoom(),selectable:!1,hasBorders:!1,hasControls:!1,originX:"center",originY:"center",id:i,objectCaching:!1,class:"polyCircle"});0==jr.length&&a.set({fill:"red"});var o=[n.x/t.getZoom(),n.y/t.getZoom(),n.x/t.getZoom(),n.y/t.getZoom()],s=new sr.Line(o,{strokeWidth:2,fill:"#999999",stroke:"#999999",class:"line",originX:"center",originY:"center",selectable:!1,hasBorders:!1,hasControls:!1,evented:!1,objectCaching:!1});if(Hr){var l=t.getPointer(e.e),c=Hr.get("points");c.push({x:l.x,y:l.y});var u=new sr.Polygon(c,{stroke:"#333333",strokeWidth:1,fill:"#cccccc",opacity:.3,selectable:!1,hasBorders:!1,hasControls:!1,evented:!1,objectCaching:!1});t.remove(Hr),t.add(u),Hr=u,t.renderAll()}else{var d=[{x:n.x/t.getZoom(),y:n.y/t.getZoom()}],h=new sr.Polygon(d,{stroke:"#333333",strokeWidth:1,fill:"#cccccc",opacity:.3,selectable:!1,hasBorders:!1,hasControls:!1,evented:!1,objectCaching:!1});Hr=h,t.add(h)}Ur=s,jr.push(a),Fr.push(s),t.add(s),t.add(a),t.selection=!1}(e,r);break;case Cr.CURVE:Ir=!0,cr=t.x,ur=t.y;var a="M ".concat(t.x," ").concat(t.y,"  Q ").concat(t.x," ").concat(t.y," ").concat(t.x," ").concat(t.y);fr=new sr.Path(a,{originX:"left",originY:"top",fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1,selectable:!0}),r.add(fr);break;case Cr.SQRT:Ir=!0,cr=t.x,ur=t.y;a="M 0 0 L 0 0 L 0 0 L 0 0 L 0 0";pr=new sr.Path(a,{originX:"left",originY:"top",fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1}),r.add(pr);break;case Cr.HEXAGON:Ir=!0,cr=t.x,ur=t.y;for(var o=[],s=0;s<6;s++)o.push({x:t.x+1*Math.cos(ai*s),y:t.y+1*Math.sin(ai*s)});gr=new sr.Polygon(o,{stroke:kr,strokeWidth:xr,fill:"",opacity:1,hasBorders:!0,selectable:!1,hasControls:!0,objectCaching:!1,originX:"left",originY:"top",angle:0}),r.add(gr);break;case Cr.CHECK:Ir=!0,cr=t.x,ur=t.y;a="M 0 0 L 0 0 L 0 0";vr=new sr.Path(a,{originX:"left",originY:"top",fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1}),r.add(vr)}})),r.on("mouse:move",(function(e){switch(Or){case Cr.LINE:if(!Ir)return;var t=r.getPointer(e.e);Pr?Math.abs(ur-t.y)>Math.abs(cr-t.x)?lr.set({x2:cr,y2:t.y}):Math.abs(ur-t.y)<Math.abs(cr-t.x)?lr.set({x2:t.x,y2:ur}):lr.set({x2:cr,y2:t.y}):lr.set({x2:t.x,y2:t.y}),r.renderAll();break;case Cr.CIRCLE:if(!Ir)return;t=r.getPointer(e.e);var n=Math.abs(cr-t.x)/2,i=Math.abs(ur-t.y)/2;n>mr.strokeWidth&&(n-=mr.strokeWidth/2),i>mr.strokeWidth&&(i-=mr.strokeWidth/2),Pr?mr.set({rx:n,ry:n}):mr.set({rx:n,ry:i}),Dr?mr.set({originX:"center",originY:"center"}):(cr>t.x?mr.set({originX:"right",originY:"top"}):mr.set({originX:"left",originY:"top"}),ur>t.y?mr.set({originY:"bottom"}):mr.set({originY:"top"})),r.renderAll();break;case Cr.RECT:if(!Ir)return;t=r.getPointer(e.e);cr>t.x&&dr.set({left:Math.abs(t.x)}),ur>t.y&&dr.set({top:Math.abs(t.y)}),Pr?(dr.set({width:Math.abs(cr-t.x)}),dr.set({height:Math.abs(cr-t.x)})):(dr.set({width:Math.abs(cr-t.x)}),dr.set({height:Math.abs(ur-t.y)})),r.renderAll();break;case Cr.TRIANGLE:if(!Ir)return;t=r.getPointer(e.e);hr.set({width:Math.abs(cr-t.x),height:Math.abs(ur-t.y)}),r.renderAll();break;case Cr.CURVE:if(!Ir)return;var a=((t=r.getPointer(e.e)).x+cr)/2+500,o=(t.y+ur)/2-500;fr.path[1][1]=a,fr.path[1][2]=o,fr.path[1][3]=t.x,fr.path[1][4]=t.y,r.renderAll();break;case Cr.SQRT:if(!Ir)return;t=r.getPointer(e.e);or={X:t.x,Y:t.y};var s=ri(ar,or);pr.path[0][1]=s.startPointX,pr.path[0][2]=s.startPointY,pr.path[1][1]=s.secondPointX,pr.path[1][2]=s.secondPointY,pr.path[2][1]=s.thirdPointX,pr.path[2][2]=s.thirdPointY,pr.path[3][1]=s.fourPointX,pr.path[3][2]=s.fourPointY,pr.path[4][1]=s.endPointX,pr.path[4][2]=s.endPointY,r.renderAll();break;case Cr.POLYGON:if(Ur&&"line"==Ur.class){t=r.getPointer(e.e);Ur.set({x2:t.x,y2:t.y});var l=Hr.get("points");l[jr.length]={x:t.x,y:t.y},Hr.set({points:l}),r.renderAll()}r.renderAll();break;case Cr.HEXAGON:if(!Ir)return;t=r.getPointer(e.e);for(var c=Math.max(Math.abs(ur-t.y),Math.abs(cr-t.x))/2,u=[],d=0;d<6;d++)u.push({x:(ar.X+t.x)/2+c*Math.cos(ai*d),y:(ar.Y+t.y)/2+c*Math.sin(ai*d)});cr>t.x?gr.set({originX:"right",originY:"top"}):gr.set({originX:"left",originY:"top"}),ur>t.y?gr.set({originY:"bottom"}):gr.set({originY:"top"}),gr.set({points:u}),r.renderAll();break;case Cr.CHECK:if(!Ir)return;t=r.getPointer(e.e);or={X:t.x,Y:t.y};var h=ii(ar,or);vr.path[0][1]=h.startPointX,vr.path[0][2]=h.startPointY,vr.path[1][1]=h.secondPointX,vr.path[1][2]=h.secondPointY,vr.path[2][1]=h.endPointX,vr.path[2][2]=h.endPointY,r.renderAll()}})),r.on("mouse:up",(function(e){var t=r.getPointer(e.e);switch(or={X:t.x,Y:t.y},Or){case Cr.NONE:Rr&&(Rr=!1,Or=Mr),r.renderAll();break;case Cr.ZIGZAG:Ir=!1;break;case Cr.LINE:if(Ir=!1,ar.X==or.X&&ar.Y==or.Y){var n=r.getObjects()[r.getObjects().length-1];if(r.remove(n),r.discardActiveObject(),zr(r),!Rr){var o=[cr,ur,cr+200,ur+200];lr=new sr.Line(o,{strokeWidth:xr,fill:"",stroke:kr,objectCaching:!1,opacity:1,hasBorders:!0,hasControls:!0,selectable:!1,strokeDashArray:Br,strokeLineCap:"Butt"}),r.add(lr),i&&i()}return}r.discardActiveObject(),zr(r),(n=r.getObjects()[r.getObjects().length-1]).selectable=!0,r.setActiveObject(n),Or=Cr.NONE,Mr=Cr.LINE,r.renderAll(),Yr(r,Lr),i&&i();break;case Cr.CIRCLE:if(Ir=!1,ar.X==or.X&&ar.Y==or.Y){n=r.getObjects()[r.getObjects().length-1];return r.remove(n),r.discardActiveObject(),zr(r),void(Rr||(mr=new sr.Ellipse({left:cr-20,top:ur-20,originX:"left",originY:"top",rx:20,ry:20,angle:0,fill:"",stroke:kr,strokeWidth:xr,strokeDashArray:Br,strokeLineCap:"Butt"}),r.add(mr),i&&i()))}r.discardActiveObject(),zr(r),(n=r.getObjects()[r.getObjects().length-1]).selectable=!0,r.setActiveObject(n),Or=Cr.NONE,Mr=Cr.CIRCLE,r.renderAll(),Yr(r,Lr),i&&i();break;case Cr.RECT:if(Ir=!1,ar.X==or.X&&ar.Y==or.Y){var s=r.getObjects()[r.getObjects().length-1];r.remove(s),r.discardActiveObject(),zr(r),Rr||(dr=new sr.Rect({left:cr-15,top:ur-15,fill:"",stroke:kr,strokeWidth:xr,selectable:!1,objectCaching:!1,opacity:1,hasBorders:!0,hasControls:!0,width:30,height:30,strokeDashArray:Br,strokeLineCap:"Butt"}),r.add(dr),i&&i()),r.renderAll();break}r.discardActiveObject(),zr(r),(n=r.getObjects()[r.getObjects().length-1]).selectable=!0,r.setActiveObject(n),Or=Cr.NONE,Mr=Cr.RECT,r.renderAll(),Yr(r,Lr),i&&i();break;case Cr.TRIANGLE:if(Ir=!1,ar.X==or.X&&ar.Y==or.Y){n=r.getObjects()[r.getObjects().length-1];return r.remove(n),r.discardActiveObject(),zr(r),void(Rr||(hr=new sr.Triangle({left:cr,top:ur,strokeWidth:xr,width:20,height:20,stroke:kr,fill:"",selectable:!1,objectCaching:!1,opacity:1,hasBorders:!0,hasControls:!0,strokeDashArray:Br,strokeLineCap:"Butt"}),r.add(hr),i&&i()))}r.discardActiveObject(),zr(r),(n=r.getObjects()[r.getObjects().length-1]).selectable=!0,r.setActiveObject(n),Or=Cr.NONE,Mr=Cr.TRIANGLE,r.renderAll(),Yr(r,Lr),i&&i();break;case Cr.ECLIPSE:break;case Cr.POLYGON:Mr=Cr.POLYGON;break;case Cr.SQRT:if(Ir=!1,ar.X==or.X&&ar.Y==or.Y){var l=r.getObjects()[r.getObjects().length-1];if(r.remove(l),r.discardActiveObject(),zr(r),!Rr){var c=ri(ar,{X:ar.X+100,Y:ar.Y+100}),d="M ".concat(c.startPointX," ").concat(c.startPointY," L ").concat(c.secondPointX," ").concat(c.secondPointY,"\n              L ").concat(c.thirdPointX," ").concat(c.thirdPointY," L ").concat(c.fourPointX," ").concat(c.fourPointY," L ").concat(c.endPointX," ").concat(c.endPointY),h=new sr.Path(d,{fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1,strokeDashArray:Br,strokeLineCap:"Butt"});r.add(h),i&&i()}return}var f=r.item(r.getObjects().length-1);r.remove(f),r.discardActiveObject(),zr(r);var p=ri(ar,or),m="M ".concat(p.startPointX," ").concat(p.startPointY," L ").concat(p.secondPointX," ").concat(p.secondPointY,"\n         L ").concat(p.thirdPointX," ").concat(p.thirdPointY," L ").concat(p.fourPointX," ").concat(p.fourPointY," L ").concat(p.endPointX," ").concat(p.endPointY),g=new sr.Path(m,{fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1});r.add(g),(n=r.getObjects()[r.getObjects().length-1]).selectable=!0,r.setActiveObject(n),Or=Cr.NONE,Mr=Cr.SQRT,r.renderAll(),Yr(r,Lr),i&&i();break;case Cr.CURVE:if(Ir=!1,ar.X==or.X&&ar.Y==or.Y){var v=r.getObjects()[r.getObjects().length-1];if(r.remove(v),r.discardActiveObject(),zr(r),!Rr){var b=ar.X-0,y=ar.Y-0,A=(2*ar.X+100)/2+500,_=(2*ar.Y+100)/2-500;m="M ".concat(b," ").concat(y," Q ").concat(A," ").concat(_," ").concat(ar.X+100," ").concat(ar.Y+100," ");var w=new sr.Path(m,{fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1,strokeDashArray:Br,strokeLineCap:"Butt"});r.add(w),i&&i()}return}f=r.item(r.getObjects().length-1),r.remove(f),r.discardActiveObject(),zr(r),Mr=Cr.CURVE;var E=ar.X-0,S=ar.Y-0,C=(ar.X+or.X)/2+500,T=(ar.Y+or.Y)/2-500;m="M ".concat(E," ").concat(S," Q ").concat(C," ").concat(T," ").concat(or.X," ").concat(or.Y," ");var k=new sr.Path(m,{fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1});r.add(k),(n=r.getObjects()[r.getObjects().length-1]).selectable=!0,r.setActiveObject(n),Or=Cr.NONE,r.renderAll(),Yr(r,Lr),i&&i();break;case Cr.FREE_STYLE:i&&i();break;case Cr.TEXT:u&&this.saveHistory(u,this.getCurrentCanvasState());var x=new sr.Textbox("",{left:ar.X-0,top:ar.Y-0,width:150,fontSize:42,selectable:!0,fill:kr,fontFamily:Nr});x.type="textbox",a&&x.on("changed",a),Or=Cr.NONE,Mr=Cr.TEXT,r.add(x),r.setActiveObject(x),r.renderAll(),i&&i();break;case Cr.HEXAGON:if(Ir=!1,ar.X==or.X&&ar.Y==or.Y){n=r.getObjects()[r.getObjects().length-1];return r.remove(n),r.discardActiveObject(),void zr(r)}r.discardActiveObject(),zr(r),(n=r.getObjects()[r.getObjects().length-1]).selectable=!0,r.setActiveObject(n),Or=Cr.NONE,Mr=Cr.HEXAGON,r.renderAll(),Yr(r,Lr),i&&i();break;case Cr.CHECK:if(Ir=!1,ar.X==or.X&&ar.Y==or.Y){var O=r.getObjects()[r.getObjects().length-1];if(r.remove(O),r.discardActiveObject(),zr(r),!Rr){var I=ii(ar,{X:ar.X+24,Y:ar.Y+24}),M="M ".concat(I.startPointX," ").concat(I.startPointY," L ").concat(I.secondPointX," ").concat(I.secondPointY,"\n             L ").concat(I.endPointX," ").concat(I.endPointY),P=new sr.Path(M,{top:ar.Y-24,left:ar.X-8,fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1,strokeDashArray:Br,strokeLineCap:"Butt"});r.add(P),i&&i()}return}f=r.item(r.getObjects().length-1),r.remove(f),r.discardActiveObject(),zr(r);var D=ii(ar,or);m="M ".concat(D.startPointX," ").concat(D.startPointY,"\n         L ").concat(D.secondPointX," ").concat(D.secondPointY," L ").concat(D.endPointX," ").concat(D.endPointY);var N=new sr.Path(m,{fill:"",stroke:kr,strokeWidth:xr,objectCaching:!1});r.add(N),(n=r.getObjects()[r.getObjects().length-1]).selectable=!0,r.setActiveObject(n),Or=Cr.NONE,Mr=Cr.CHECK,r.renderAll(),Yr(r,Lr),i&&i()}})),r.on("selection:cleared",(function(e){switch(Mr){case Cr.TEXT:var t=r.getObjects()[r.getObjects().length-1];t&&""==t.text&&r.remove(t);break;case Cr.MOVE_AND_RESIZE:break;default:Rr=!0,zr(r)}})),r.on("text:changed",(function(e){})),r.on("line:created",(function(e){e.line.perPixelTargetFind=!0,e.line.hasBorders=!1,r.renderAll()})),r.on("mouse:over",(function(e){e.target})),r.on("mouse:out",(function(e){null}))}var si=x.g.CB_CANVAS,li=x.g.EXPORT_PDF,ci=x.g.CANVAS_DRAWING_TYPE,ui=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{canvas:null,isExportingCb:!1}),G()(V()(e),"canvasDrawingProps",{mouseDownCoord:{},isDown:!1,marginLeft:0,marginTop:0}),G()(V()(e),"shouldCanvasUpdate",!1),G()(V()(e),"isDeletingSelectedOBjects",!1),G()(V()(e),"savedCanvasObjects",{}),G()(V()(e),"handleTextChange",Object(Y.debounce)((function(){var t=e.state.canvas,n=e.props,r=n.timestamp,i=n.videoId;e.saveCanvasJson(r,i),t.historyCurrentState=t.getCurrentCanvasState()}),200)),G()(V()(e),"updateUndoRedoStates",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.historyUndo,r=void 0===n?[]:n,i=t.historyRedo,a=void 0===i?[]:i,o=e.props.updateCanvasProperties;o({canUndo:!Object(Y.isEmpty)(r),canRedo:!Object(Y.isEmpty)(a)})})),G()(V()(e),"getCanvasJson",(function(){var t=e.state.canvas;t.includeDefaultValues=!1;var n=JSON.parse(JSON.stringify(t));return n.width=si.WIDTH,n.height=si.HEIGHT,n})),G()(V()(e),"saveCanvasJson",(function(t,n){var r=e.getCanvasJson();if(!Object(Y.isEqual)(Object(Y.get)(r,"objects",[]),Object(Y.get)(e.savedCanvasObjects,"objects",[]))){var i=JSON.stringify(r);Object(Y.isEmpty)(Object(Y.get)(r,"objects",[]))&&(i=""),e.shouldCanvasUpdate=!0,e.savedCanvasObjects=r;var a=e.props,o=a.saveCanvas,s=a.timestamp,l=a.videoId,c=a.showContextualImg,u=a.deleteCb,d=a.blockSeq;""===i&&c?u({timePoint:s,videoId:l,blockSeq:d}):o({timePoint:t||s,videoId:n||l,userComprehension:i,blockSeq:d,ctxBg:c})}})),G()(V()(e),"loadCanvasObjects",(function(){var t=e.state.canvas,n=e.props.userComprehension;if(t)try{t.clear(),e.savedCanvasObjects=ni(t,n),t.historyInit(),e.updateUndoRedoStates()}catch(e){t.loadFromJSON({},t.renderAll.bind(t)),console.log("Loading comprehension from Json failed",e)}})),G()(V()(e),"exportToPdf",(function(){var t,n=e.props,r=n.updateCanvasProperties,i=n.prevDrawingType,a=n.showContextualImg,o=document.getElementById("c"),s=document.getElementById("hidden-contextual-img"),l=li.WIDTH,c=li.HEIGHT;if(l=(t=new wr.a("l","px",[l,c],!0)).internal.pageSize.getWidth(),c=t.internal.pageSize.getHeight(),a){var u=x.c.getBase64Image(s,2*si.WIDTH,2*si.HEIGHT);t.addImage(u,"JPEG",0,0,l,c,null,"FAST")}t.addImage(o,"PNG",0,0,l,c,null,"FAST"),e.setState({isExportingCb:!0}),t.save("download.pdf",{returnPromise:!0}).then((function(){e.setState({isExportingCb:!1})})),r({drawingType:i})})),G()(V()(e),"updateSelectedObjectsStyles",(function(t,n){var r=e.state.canvas,i=r.getActiveObjects();(Jr(t,n),i.length)&&(i.forEach((function(e){t&&e.set("stroke",t),n&&e.set("strokeWidth",n)})),e.saveCanvasJson(),(0,e.props.resetEditModeStyles)(),r.renderAll())})),e}return c()(n,[{key:"componentDidMount",value:function(){var e=this,t=new _r.fabric.Canvas("c",{targetFindTolerance:30,selection:!1});t.hoverCursor="all-scroll",this.setState({canvas:t},(function(){var n;e.loadCanvasObjects(),t.selection=!1,n=_r.fabric,sr=n,oi({canvas:t,mouseUpCallback:function(){e.props.drawingType!==ci.TEXT?(e.saveCanvasJson(),t.saveHistory(e.updateUndoRedoStates)):(0,e.props.updateCanvasProperties)({drawingType:ci.MOVE_AND_RESIZE,prevDrawingType:ci.MOVE_AND_RESIZE,isDrawingTypeChange:!1})},handleTextChange:e.handleTextChange,updateUndoRedoStates:e.updateUndoRedoStates,changeToSelectMode:function(){}}),t.on("object:modified",(function(n){var r=n.target.type;"textbox"!==(void 0===r?"":r)&&(e.saveCanvasJson(),t.saveHistory(e.updateUndoRedoStates))})),t.on("object:removed",(function(){e.isDeletingSelectedOBjects||t.saveHistory(e.updateUndoRedoStates)}))}))}},{key:"componentDidUpdate",value:function(e){var t=e.userComprehension,n=e.timestamp,r=this.props,i=r.userComprehension,a=r.timestamp,o=r.isToolbarShown,s=r.strokeColor,l=r.strokeWidth,c=r.drawingType,u=r.attachmentId,d=(r.backgroundColor,r.borderColor),h=r.isDrawingTypeChange,f=this.state.canvas;if(u){if(a===n&&this.shouldCanvasUpdate&&!o){var p=this.props,m=p.videoId;(0,p.getCb)({timePoint:a,videoId:m}),this.shouldCanvasUpdate=!1}t===i&&a===n||this.loadCanvasObjects()}else{if(f&&h&&c!=ci.DELETE_SELECTED_OBJECTS&&(Qr(f),Kr(f,s,l,c,0),Jr(d,l)),a===n&&this.shouldCanvasUpdate&&!o){var g=this.props,v=g.videoId;(0,g.getCb)({timePoint:a,videoId:v}),this.shouldCanvasUpdate=!1}if(t===i&&a===n||this.loadCanvasObjects(),f){var b=this.props,y=b.editModeStrokeColor,A=b.editModeStrokeWidth,_=b.updateCanvasProperties,w=b.prevDrawingType,E=b.editModeBackgroundColor,S=b.editModeFontSize,C=b.editModeFontStyle,T=b.editModeLineStyle,k=b.shiftKeyPress,x=b.ctrlKeyPress;if(c===ci.FREE_STYLE?ti(f,d,l):f.isDrawingMode=!1,Wr(k,x),c===ci.MOVE_AND_RESIZE&&(ei(f,!0),qr(f)),c===ci.RESET_CANVAS&&(f.clear(),Xr(),f.saveHistory(this.updateUndoRedoStates),_({drawingType:w}),this.saveCanvasJson()),c===ci.UNDO&&(f.undo(f,this.updateUndoRedoStates),_({drawingType:w}),this.saveCanvasJson()),c===ci.REDO&&(f.redo(f,this.updateUndoRedoStates),_({drawingType:w}),this.saveCanvasJson()),c===ci.EXPORT&&this.exportToPdf(),c===ci.DELETE_SELECTED_OBJECTS){this.isDeletingSelectedOBjects=!0;var O=f.getActiveObjects();O.length&&(O.forEach((function(e){f.remove(e)})),f.discardActiveObject().renderAll(),_({drawingType:w}),this.saveCanvasJson()),this.isDeletingSelectedOBjects=!1,f.saveHistory(this.updateUndoRedoStates)}""===y&&0===A||(this.updateSelectedObjectsStyles(""!==y?y:null,0!==A?A:null),f.saveHistory(this.updateUndoRedoStates)),E&&($r(f,E),this.saveCanvasJson(),f.saveHistory(this.updateUndoRedoStates)),S&&(Vr(f,S),this.saveCanvasJson(),f.saveHistory(this.updateUndoRedoStates)),C&&(Gr(f,C),this.saveCanvasJson(),f.saveHistory(this.updateUndoRedoStates)),T&&(Yr(f,T),this.saveCanvasJson(),f.saveHistory(this.updateUndoRedoStates))}}}},{key:"render",value:function(){var e=this.props,t=e.showContextualImg,n=e.cbBlockSeq,r=e.blockSeq,i=e.isToolbarShown,a=e.rootContext,o=e.contextualImg,s=e.mouseCursor,l=this.state.isExportingCb;return v.a.createElement("div",{id:"canvas-container",className:P()("h-100 w-100 position-relative",!t&&"bg-white",r!==n&&!i&&t&&"invisible")},l&&v.a.createElement(Nn,null),v.a.createElement("img",{id:"hidden-contextual-img",crossOrigin:"anonymous",src:"".concat(a).concat(o),alt:"hidden contextual img",className:"position-absolute",width:2*si.WIDTH,height:2*si.HEIGHT,style:{objectFit:"contain",top:"-999999px",left:"-999999px"}}),v.a.createElement("canvas",{id:"c",className:P()("w-100 h-100 position-absolute"),width:si.WIDTH,height:si.HEIGHT,style:{cursor:"".concat(s)}}))}}]),n}(v.a.PureComponent),di=Object(q.b)((function(e){var t=e.canvas,n=e.cogvid;return{drawingType:t.drawingType,strokeWidth:t.strokeWidth,strokeColor:t.strokeColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,fontSize:t.fontSize,fontName:t.fontName,userComprehension:t.userComprehension,timestamp:n.currentSbData.timestamp,videoId:n.cogvidDetails.videoId,isToolbarShown:t.isToolbarShown,prevDrawingType:t.prevDrawingType,editModeStrokeColor:t.editModeStrokeColor,editModeStrokeWidth:t.editModeStrokeWidth,editModeBackgroundColor:t.editModeBackgroundColor,editModeFontSize:t.editModeFontSize,editModeFontStyle:t.editModeFontStyle,editModeLineStyle:t.editModeLineStyle,isDrawingTypeChange:t.isDrawingTypeChange,showContextualImg:t.showContextualImg,blockSeq:n.currentSbData.blockSeq,cbBlockSeq:t.blockSeq,contextualImg:n.currentSbData.contextualImg,rootContext:n.cogvidDetails.rootContext,attachmentId:n.attachmentReview.attachmentId,mouseCursor:t.mouseCursor,shiftKeyPress:t.shiftKeyPress,ctrlKeyPress:t.ctrlKeyPress}}),(function(e){return{getCb:function(t,n){return e(Q.b.getCb(t,n))},updateCanvasProperties:function(t){return e(Q.b.updateCanvasProperties(t))},saveCanvas:function(t,n){return e(Q.b.saveCanvas(t,n))},resetEditModeStyles:function(){return e(Q.b.resetEditModeStyles())},deleteCb:function(t){return e(Q.b.deleteCb(t))}}}))(ui);var hi=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.overlayMode,n=e.contextualImg;return v.a.createElement("div",{className:"w-100 h-100 text-white position-absolute d-flex justify-content-center align-items-center ".concat(Wn.a.videoOverlay),style:{visibility:""===n&&t===x.g.VIDEO_OVERLAY_MODE.CONTEXTUAL_IMG?"hidden":"visible"}},t===x.g.VIDEO_OVERLAY_MODE.ERROR?v.a.createElement("div",{className:Wn.a.errorMessage},"Video is not available"):v.a.createElement("div",{className:"w-100 h-100 ".concat(Wn.a.contextualImgWrapper)},v.a.createElement("img",{src:n,alt:"contextual img",className:"".concat(Wn.a.imageDisplay," position-absolute")}),v.a.createElement(di,null)))}}]),n}(v.a.PureComponent),fi=r(29),pi=r.n(fi),mi=(Object(q.b)((function(e){e.auth;var t=e.cg;return{isPaused:e.cogvid.videoTime.isPaused,slideIdx:t.showChapterCoverImageSlide}}),(function(e){return{displaySlide:function(t){return e(Q.d.displaySlide(t))}}}))((function(e){var t=e.className,n=e.chapters,r=void 0===n?[]:n,i=e.slideIdx,a=e.isPaused,o=e.displaySlide,s=Object(g.useState)([]),l=pi()(s,2),c=l[0],u=l[1],d=Object(Y.findIndex)(c,{seqNumber:i});Object(g.useEffect)((function(){if(!Object(Y.isEmpty)(r)){var e=r.filter((function(e){return e.type==x.g.CHAPTER_TYPES.EPISODIC.key}));u(e)}}),[r]);var h=Object(g.useCallback)((function(e){e&&e.stopPropagation(),window.audioPlayer.paused()?window.audioPlayer.play():window.audioPlayer.pause()}),[]),f=Object(g.useCallback)((function(e){if(e.target.blur(),!(d-1<0)){var t=c[d-1].seqNumber;o(t)}}),[d,c]),p=Object(g.useCallback)((function(e){if(e.target.blur(),!(d+1>=c.length)){var t=c[d+1].seqNumber;o(t)}}),[d,c]);return v.a.createElement("div",{className:P()(Wn.a.videoPlaybar,t)},v.a.createElement(Qt,{className:P()(Wn.a.iconButton),onClick:f,disabled:d<=0},v.a.createElement(I.e,{size:22,color:d<=0?"gray":void 0})),v.a.createElement(Qt,{className:P()(Wn.a.iconButton),onClick:h},a?v.a.createElement(I.d,{size:28}):v.a.createElement(I.c,{size:28})),v.a.createElement(Qt,{className:P()(Wn.a.iconButton),onClick:p,disabled:d>=c.length-1},v.a.createElement(I.b,{size:22,color:d>=c.length-1?"gray":void 0})))})),Object(q.b)((function(e){var t,n=e.auth,r=e.cg,i=e.cogvid;return{isLoggedIn:!0,userId:n.userInfo.userId,chapterId:r.showChapterImageSlider.chapterId,isEpisodic:r.showChapterImageSlider.isEpisodic,activeVideoId:null===(t=i.cogvidDetails)||void 0===t?void 0:t.videoId,slideIndex:r.showChapterCoverImageSlide}}),(function(e){return{}}))((function(e){e.className,e.classNameTooltip;var n=e.isLoggedIn,r=e.videoId,i=e.chapterId,a=e.isEpisodic,o=e.activeVideoId,s=e.slideIndex,l=e.activateVideo,c=o===r;Object(g.useEffect)((function(){n&&(c||-1===s||u())}),[n,s,c]);Object(g.useCallback)((function(e,t){var n=x.c.getCurrentVideoCategory(),i="/".concat(n,"?v=").concat(r,"&c=").concat(e);if(t||x.c.checkLoggedIn(i)){var a=document.getElementById("chapter-".concat(e));a&&a.click()}}),[r,i]);var u=Object(g.useCallback)((function(e){if(e&&e.stopPropagation(),a)if(n)if(c){Object(Y.invoke)(window,"audioPlayer.player_.paused")?Object(Y.invoke)(window.audioPlayer,"player_.play"):Object(Y.invoke)(window.audioPlayer,"player_.pause")}else{var o,s=!Object(Y.invoke)(window,"audioPlayer.audioOnlyMode"),u=null===(o=document.getElementById(x.g.VIDEO_PLAYER_ID))||void 0===o?void 0:o.parentElement;s?(Object(Y.invoke)(window.audioPlayer,"player_.audioOnlyMode",!0),u&&u.classList.remove("show")):(Object(Y.invoke)(window.audioPlayer,"player_.audioOnlyMode",!1),u&&u.classList.add("show"),Object(Y.invoke)(window.audioPlayer,"player_.play")),l()}else{var d=x.c.getCurrentVideoCategory(),h="/".concat(d,"?v=").concat(r,"&c=").concat(i);x.c.checkLoggedIn(h,{message:t("message.loginToPlayVideo")})}else l()}),[n,r,i,o,a,c]);return null}))),gi=x.g.SLIDE_TYPE,vi=Object(q.b)((function(e){var t=e.cg;e.cogvid;return{slideIndex:t.showChapterCoverImageSlide,showChapterCoverImage:t.showChapterCoverImage,showSlideType:t.showSlideType,fslideExisted:t.fslideExisted,uslideExisted:t.uslideExisted,thumbnailExisted:t.thumbnailExisted,isAudioLoop:t.showChapterImageSlider.isAudioLoop,showToc:t.showToc,freeFUI:t.freeFUI}}),(function(e){return{displayChapterCoverImage:function(t){return e(Q.d.displayChapterCoverImage(t))},updateChapterImageSlider:function(t){return e(Q.d.updateChapterImageSlider(t))},displaySlide:function(t){return e(Q.d.displaySlide(t))},displaySlideType:function(t){return e(Q.d.displaySlideType(t))},deleteChapterFoundation:function(t){return e(Q.d.deleteChapterFoundation(t))},deleteChapterUnderstanding:function(t){return e(Q.d.deleteChapterUnderstanding(t))}}}))((function(e){var t=e.vertical,n=e.slideIndex,r=e.chapterCount,i=e.className,a=e.showChapterCoverImage,o=e.showSlideType,s=e.showToc,l=e.fslideExisted,c=e.uslideExisted,u=e.thumbnailExisted,d=e.freeFUI,h=e.displayChapterCoverImage,f=e.displaySlide,p=e.displaySlideType,m=(Object(g.useCallback)((function(e){e&&e.stopPropagation(),window.audioPlayer.paused()?window.audioPlayer.play():window.audioPlayer.pause()}),[]),Object(g.useCallback)((function(e){e&&e.stopPropagation(),n-1<0||f(n-1)}),[n])),b=Object(g.useCallback)((function(e){e&&e.stopPropagation(),n+1>=r||f(n+1)}),[n,r]);Object(g.useCallback)((function(e){h(!a)}),[a]);Object(g.useEffect)((function(){!o&&!a||d||x.c.checkSubscribedOffer(x.g.SUB_OFFER.VIEW_SLIDES)||y(!1)}),[o,a,d]);var y=Object(g.useCallback)((function(e){(!e||d||x.c.checkSubscribedOffer(x.g.SUB_OFFER.VIEW_SLIDES,{popup:!0}))&&(p(null),h(e))}),[d]),A=Object(g.useCallback)((function(e){(d||x.c.checkSubscribedOffer(x.g.SUB_OFFER.VIEW_SLIDES,{popup:!0}))&&(p(e),h(!0))}),[d]),_=Object(g.useCallback)((function(){u&&(p(gi.THUMBNAIL),h(!0))}),[u]),w=Object(g.useCallback)((function(e,t){return t?s||o!==e?"":"blink":Wn.a.dimButton}),[o,s]);return v.a.createElement("div",{className:P()(Wn.a.videoToggleBtnWrapper,t&&Wn.a.vertical,"u-font-din-condensed",i)},v.a.createElement("div",{className:P()(Wn.a.videoToggleBtn)},!t&&v.a.createElement(Qt,{classNameWrapper:Wn.a.iconButton,onClick:m,disabled:n<=0},v.a.createElement("img",{width:36,src:I.a.prevFill})),v.a.createElement("div",{className:P()(Wn.a.toggleLabel,Wn.a.active,!t&&"flex-grow-1","u-flex-center u-font-roboto")},v.a.createElement("div",{className:P()(Wn.a.icon,Wn.a.iconF,"u-bg-red",w(gi.FOUNDATION,l)),onClick:function(){"blink"==w(gi.FOUNDATION,l)?_():l&&A(gi.FOUNDATION)}},"F"),v.a.createElement("div",{className:P()(Wn.a.icon,Wn.a.iconU,"u-bg-grey",w(gi.UNDERSTANDING,c)),onClick:function(){"blink"==w(gi.UNDERSTANDING,c)?_():c&&A(gi.UNDERSTANDING)}},"U"),v.a.createElement("div",{className:P()(Wn.a.icon,Wn.a.iconV,"u-bg-blue",!o&&!s&&!a&&"blink"),onClick:function(){o||a||!u?y(!1):_()}},v.a.createElement("span",{className:P()()},"V")),v.a.createElement("div",{className:P()(Wn.a.icon,Wn.a.iconI,"bg-secondary",!o&&!s&&a&&"blink"),onClick:function(){!o&&a&&u?_():y(!0)}},v.a.createElement("span",{className:P()()},"I"))),!t&&v.a.createElement(Qt,{classNameWrapper:Wn.a.iconButton,onClick:b,disabled:n>=r-1},v.a.createElement("img",{width:36,src:I.a.nextFill}))))})),bi=Object(q.b)((function(e){var t,n,r=e.auth,i=e.cg,a=e.cogvid,o=e.notification;return{showProductsLayer:!!(null===(t=a.showProductsLayer)||void 0===t?void 0:t.videoId),userId:r.userInfo.userId,isVideoActive:-1!==i.showChapterCoverImageSlide,chapterId:null===(n=a.chapterHighlighting)||void 0===n?void 0:n.uid,showChapterCoverImage:i.showChapterCoverImage,kpiChangedVideos:o.kpiChangedVideos,kpiCompletedChapters:o.kpiCompletedChapters}}),(function(e){return{getLearningMetrics:function(t,n,r){return e(Q.f.getLearningMetrics(t,n,r))},deleteLearningMetrics:function(t,n,r){return e(Q.f.deleteLearningMetrics(t,n,r))},increaseChapterEngagement:function(t,n,r){return e(Q.f.increaseChapterEngagement(t,n,r))},setKpiChanges:function(t){return e(Q.h.setKpiChanges(t))},displaySlide:function(t){return e(Q.d.displaySlide(t))},setKpiCompletedChapters:function(t){return e(Q.h.setKpiCompletedChapters(t))}}}))((function(e){var n=e.isVideoActive,r=e.showProductsLayer,i=e.showChapterCoverImage,a=e.videoId,o=e.chapterId,s=e.userId,l=(e.chapters,e.kpiChangedVideos),c=e.kpiCompletedChapters,u=e.getLearningMetrics,d=e.increaseChapterEngagement,h=e.deleteLearningMetrics,f=e.setKpiChanges,p=(e.displaySlide,e.setKpiCompletedChapters),m=e.showSubVideoList,b=Object(g.useState)([]),y=pi()(b,2),A=y[0],_=y[1],w=Object(g.useState)(0),E=pi()(w,2),S=(E[0],E[1]),C=Object(g.useState)(0),T=pi()(C,2),k=(T[0],T[1]),O=Object(g.useState)(!1),M=pi()(O,2),D=(M[0],M[1]),N=Object(g.useState)(!1),L=pi()(N,2),R=(L[0],L[1]),B=Object(g.useState)(!1),j=pi()(B,2),F=j[0],U=j[1],H=Object(g.useState)(0),z=pi()(H,2),V=z[0],W=z[1];Object(g.useEffect)((function(){l.includes(a)&&G(),l.length&&f([])}),[a,l]),Object(g.useEffect)((function(){var e=Date.now();s&&a&&o&&e>V+5e3&&(d({videoId:a,chapterId:o},(function(){G()})),W(e))}),[i,a,o,s,V]),Object(g.useEffect)((function(){if(!s||!a)return S(0),k(0),void _([]);G(!0)}),[a,s]);var G=Object(g.useCallback)((function(e){s&&a&&(e&&D(!0),u({videoId:a},(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.engaged,n=void 0===t?0:t,r=e.completed,i=void 0===r?0:r,a=e.chapters,o=void 0===a?[]:a;S(n),k(i),_(o);var s=o.map((function(e){return 1==.5*(e.engaged+e.completed)&&e.chapterId}));(s=s.filter(Boolean)).length!==c.length&&p(s),setTimeout((function(){D(!1)}),500)}),(function(){setTimeout((function(){D(!1)}),500)})))}),[a,s]),q=(Object(g.useCallback)((function(){var e=window.location,t=e.pathname,n=e.search,r="".concat(t).concat(n);x.c.checkLoggedIn(r,"")}),[]),Object(g.useCallback)((function(){var e=document.getElementById(x.g.ID_FULLSCREEN_BUTTON);e&&e.click()}),[])),Y=Object(g.useCallback)((function(){s&&a&&(U(!1),R(!0),h({videoId:a},(function(){setTimeout((function(){S(0),k(0),_([]),R(!1)}),500)}),(function(){setTimeout((function(){R(!1)}),500)})))}),[a,s]),K=A.find((function(e){return e.chapterId===o}));null==K||K.engaged,null==K||K.completed;return m||r?v.a.createElement("div",{className:P()(Wn.a.videoStatistics,r&&Wn.a.hide,"u-font-din-condensed")},v.a.createElement("div",{className:P()(Wn.a.left)},v.a.createElement("div",{className:"u-flex-center"},v.a.createElement("img",{height:54,src:I.a.logo2pir}),v.a.createElement("div",{className:"u-fs-1 ml-3 text-center"},v.a.createElement("div",{className:""},"FUVI Global Community"),v.a.createElement("div",{className:""},"A Full Circle of Education"))))):v.a.createElement("div",{className:P()(Wn.a.videoStatistics,"u-font-din-condensed",r&&Wn.a.hide)},v.a.createElement("div",{className:P()(Wn.a.left)}),v.a.createElement("div",{className:P()(Wn.a.center,n&&Wn.a.hide,!s&&Wn.a.nonLogin)},v.a.createElement("div",{className:"w-100 u-fs-2 u-flex-center"},"Think Fast – Solve Smart – Learn Intuitively")),v.a.createElement("div",{className:P()(Wn.a.right)},v.a.createElement(Qt,{onClick:q,tooltipText:t("tooltip.openFullscreen")},v.a.createElement("i",{className:"fv u-fs-2x1o2 fuvi-enter-fullscreen-mobile text-white"}))),v.a.createElement(IC,{show:F,message:"Do you want to clear your performance record?",onConfirm:Y,onClose:function(){return U(!1)}}))}));var yi=["English"],Ai=["Transcription"],_i=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{language:yi[0],type:Ai[0]}),G()(V()(e),"handleLanguageChange",(function(t){e.setState({language:t})})),G()(V()(e),"handleTypeChange",(function(t){e.setState({type:t})})),e}return c()(n,[{key:"render",value:function(){var e=this.props.slideIndex,t=this.state;t.language,t.type;if(-1==e)return null;var n=x.c.isExploring();return v.a.createElement("div",{className:P()(Wn.a.videoSbFilterWrapper,"u-font-din-condensed",!n&&"d-none")},v.a.createElement("div",{className:"mt-3 u-flex-center flex-column u-font-din-condensed text-white"},v.a.createElement("div",{className:"u-fs-7o8"},"Scroll Below To Navigate Ideas"),v.a.createElement("i",{className:"fv fuvi-s-arrow-down mt-2 text-white u-fs-7o8"})))}}]),n}(g.Component),wi=Object(q.b)((function(e){return{slideIndex:e.cg.showChapterCoverImageSlide}}),(function(e){return{}}))(_i);function Ei(e){return(Ei="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)}function Si(e){var t=function(e,t){if("object"!=Ei(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ei(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ei(t)?t:t+""}function Ci(e,t,n){return(t=Si(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ti(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ti(Object(n),!0).forEach((function(t){Ci(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ti(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xi(){return(xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}var Oi=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Ii="-webkit-",Mi=Math.abs,Pi=String.fromCharCode,Di=Object.assign;function Ni(e,t){return 45^Fi(e,0)?(((t<<2^Fi(e,0))<<2^Fi(e,1))<<2^Fi(e,2))<<2^Fi(e,3):0}function Li(e){return e.trim()}function Ri(e,t){return(e=t.exec(e))?e[0]:e}function Bi(e,t,n){return e.replace(t,n)}function ji(e,t){return e.indexOf(t)}function Fi(e,t){return 0|e.charCodeAt(t)}function Ui(e,t,n){return e.slice(t,n)}function Hi(e){return e.length}function zi(e){return e.length}function Vi(e,t){return t.push(e),e}function Wi(e,t){return e.map(t).join("")}var Gi=1,qi=1,Yi=0,Ki=0,Xi=0,Qi="";function $i(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Gi,column:qi,length:o,return:""}}function Ji(e,t){return Di($i("",null,null,"",null,null,0),e,{length:-e.length},t)}function Zi(){return Xi=Ki<Yi?Fi(Qi,Ki++):0,qi++,10===Xi&&(qi=1,Gi++),Xi}function ea(){return Fi(Qi,Ki)}function ta(){return Ki}function na(e,t){return Ui(Qi,e,t)}function ra(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ia(e){return Gi=qi=1,Yi=Hi(Qi=e),Ki=0,[]}function aa(e){return Qi="",e}function oa(e){return Li(na(Ki-1,function e(t){for(;Zi();)switch(Xi){case t:return Ki;case 34:case 39:34!==t&&39!==t&&e(Xi);break;case 40:41===t&&e(t);break;case 92:Zi()}return Ki}(91===e?e+2:40===e?e+1:e)))}function sa(e){for(;(Xi=ea())&&Xi<33;)Zi();return ra(e)>2||ra(Xi)>3?"":" "}function la(e,t){for(;--t&&Zi()&&!(Xi<48||Xi>102||Xi>57&&Xi<65||Xi>70&&Xi<97););return na(e,ta()+(t<6&&32==ea()&&32==Zi()))}function ca(e,t){for(;Zi()&&e+Xi!==57&&(e+Xi!==84||47!==ea()););return"/*"+na(t,Ki-1)+"*"+Pi(47===e?e:Zi())}function ua(e){for(;!ra(ea());)Zi();return na(e,Ki)}function da(e){return aa(function e(t,n,r,i,a,o,s,l,c){var u=0,d=0,h=s,f=0,p=0,m=0,g=1,v=1,b=1,y=0,A="",_=a,w=o,E=i,S=A;for(;v;)switch(m=y,y=Zi()){case 40:if(108!=m&&58==Fi(S,h-1)){-1!=ji(S+=Bi(oa(y),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:S+=oa(y);break;case 9:case 10:case 13:case 32:S+=sa(m);break;case 92:S+=la(ta()-1,7);continue;case 47:switch(ea()){case 42:case 47:Vi(fa(ca(Zi(),ta()),n,r),c);break;default:S+="/"}break;case 123*g:l[u++]=Hi(S)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+d:-1==b&&(S=Bi(S,/\f/g,"")),p>0&&Hi(S)-h&&Vi(p>32?pa(S+";",i,r,h-1):pa(Bi(S," ","")+";",i,r,h-2),c);break;case 59:S+=";";default:if(Vi(E=ha(S,n,r,u,d,a,l,A,_=[],w=[],h),o),123===y)if(0===d)e(S,n,E,E,_,o,h,l,w);else switch(99===f&&110===Fi(S,3)?100:f){case 100:case 108:case 109:case 115:e(t,E,E,i&&Vi(ha(t,E,E,0,0,a,l,A,a,_=[],h),w),a,w,h,l,i?_:w);break;default:e(S,E,E,E,[""],w,0,l,w)}}u=d=p=0,g=b=1,A=S="",h=s;break;case 58:h=1+Hi(S),p=m;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==(Xi=Ki>0?Fi(Qi,--Ki):0,qi--,10===Xi&&(qi=1,Gi--),Xi))continue;switch(S+=Pi(y),y*g){case 38:b=d>0?1:(S+="\f",-1);break;case 44:l[u++]=(Hi(S)-1)*b,b=1;break;case 64:45===ea()&&(S+=oa(Zi())),f=ea(),d=h=Hi(A=S+=ua(ta())),y++;break;case 45:45===m&&2==Hi(S)&&(g=0)}}return o}("",null,null,null,[""],e=ia(e),0,[0],e))}function ha(e,t,n,r,i,a,o,s,l,c,u){for(var d=i-1,h=0===i?a:[""],f=zi(h),p=0,m=0,g=0;p<r;++p)for(var v=0,b=Ui(e,d+1,d=Mi(m=o[p])),y=e;v<f;++v)(y=Li(m>0?h[v]+" "+b:Bi(b,/&\f/g,h[v])))&&(l[g++]=y);return $i(e,t,n,0===i?"rule":s,l,c,u)}function fa(e,t,n){return $i(e,t,n,"comm",Pi(Xi),Ui(e,2,-2),0)}function pa(e,t,n,r){return $i(e,t,n,"decl",Ui(e,0,r),Ui(e,r+1,-1),r)}function ma(e,t){for(var n="",r=zi(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function ga(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"decl":return e.return=e.return||e.value;case"comm":return"";case"@keyframes":return e.return=e.value+"{"+ma(e.children,r)+"}";case"rule":e.value=e.props.join(",")}return Hi(n=ma(e.children,r))?e.return=e.value+"{"+n+"}":""}function va(e){var t=zi(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}var ba=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};function ya(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Aa="undefined"!=typeof document,_a=function(e,t,n){for(var r=0,i=0;r=i,i=ea(),38===r&&12===i&&(t[n]=1),!ra(i);)Zi();return na(e,Ki)},wa=function(e,t){return aa(function(e,t){var n=-1,r=44;do{switch(ra(r)){case 0:38===r&&12===ea()&&(t[n]=1),e[n]+=_a(Ki-1,t,n);break;case 2:e[n]+=oa(r);break;case 4:if(44===r){e[++n]=58===ea()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Pi(r)}}while(r=Zi());return e}(ia(e),t))},Ea=new WeakMap,Sa=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ea.get(n))&&!r){Ea.set(e,!0);for(var i=[],a=wa(t,i),o=n.props,s=0,l=0;s<a.length;s++)for(var c=0;c<o.length;c++,l++)e.props[l]=i[s]?a[s].replace(/&\f/g,o[c]):o[c]+" "+a[s]}}},Ca=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};var Ta=Aa?void 0:ba((function(){return ya((function(){var e={};return function(t){return e[t]}}))})),ka=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case"decl":e.return=function e(t,n){switch(Ni(t,n)){case 5103:return"-webkit-print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ii+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Ii+t+"-moz-"+t+"-ms-"+t+t;case 6828:case 4268:return Ii+t+"-ms-"+t+t;case 6165:return Ii+t+"-ms-flex-"+t+t;case 5187:return Ii+t+Bi(t,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+t;case 5443:return Ii+t+"-ms-flex-item-"+Bi(t,/flex-|-self/,"")+t;case 4675:return Ii+t+"-ms-flex-line-pack"+Bi(t,/align-content|flex-|-self/,"")+t;case 5548:return Ii+t+"-ms-"+Bi(t,"shrink","negative")+t;case 5292:return Ii+t+"-ms-"+Bi(t,"basis","preferred-size")+t;case 6060:return"-webkit-box-"+Bi(t,"-grow","")+Ii+t+"-ms-"+Bi(t,"grow","positive")+t;case 4554:return Ii+Bi(t,/([^-])(transform)/g,"$1-webkit-$2")+t;case 6187:return Bi(Bi(Bi(t,/(zoom-|grab)/,"-webkit-$1"),/(image-set)/,"-webkit-$1"),t,"")+t;case 5495:case 3959:return Bi(t,/(image-set\([^]*)/,"-webkit-$1$`$1");case 4968:return Bi(Bi(t,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ii+t+t;case 4095:case 3583:case 4068:case 2532:return Bi(t,/(.+)-inline(.+)/,"-webkit-$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hi(t)-1-n>6)switch(Fi(t,n+1)){case 109:if(45!==Fi(t,n+4))break;case 102:return Bi(t,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==Fi(t,n+3)?"$3":"$2-$3"))+t;case 115:return~ji(t,"stretch")?e(Bi(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==Fi(t,n+1))break;case 6444:switch(Fi(t,Hi(t)-3-(~ji(t,"!important")&&10))){case 107:return Bi(t,":",":-webkit-")+t;case 101:return Bi(t,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===Fi(t,14)?"inline-":"")+"box$3$1"+Ii+"$2$3$1-ms-$2box$3")+t}break;case 5936:switch(Fi(t,n+11)){case 114:return Ii+t+"-ms-"+Bi(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Ii+t+"-ms-"+Bi(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Ii+t+"-ms-"+Bi(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Ii+t+"-ms-"+t+t}return t}(e.value,e.length);break;case"@keyframes":return ma([Ji(e,{value:Bi(e.value,"@","@-webkit-")})],r);case"rule":if(e.length)return Wi(e.props,(function(t){switch(Ri(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ma([Ji(e,{props:[Bi(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ma([Ji(e,{props:[Bi(t,/:(plac\w+)/,":-webkit-input-$1")]}),Ji(e,{props:[Bi(t,/:(plac\w+)/,":-moz-$1")]}),Ji(e,{props:[Bi(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],xa=function(e){var t=e.key;if(Aa&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,a=e.stylisPlugins||ka,o={},s=[];Aa&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)})));var l,c=[Sa,Ca];if(Aa){var u,d=[ga,(l=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],h=va(c.concat(a,d));i=function(e,t,n,r){u=n,function(e){ma(da(e),h)}(e?e+"{"+t.styles+"}":t.styles),r&&(v.inserted[t.name]=!0)}}else{var f=[ga],p=va(c.concat(a,f)),m=Ta(a)(t),g=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=function(e){return ma(da(e),p)}(e?e+"{"+t.styles+"}":t.styles)),m[n]};i=function(e,t,n,r){var i=t.name,a=g(e,t);return void 0===v.compat?(r&&(v.inserted[i]=!0),a):r?void(v.inserted[i]=a):a}}var v={key:t,sheet:new Oi({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return v.sheet.hydrate(s),v};r(159);var Oa="undefined"!=typeof document;function Ia(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Ma=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===Oa&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Pa=function(e,t,n){Ma(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",a=t;do{var o=e.insert(t===a?"."+r:"",a,e.sheet,!0);Oa||void 0===o||(i+=o),a=a.next}while(void 0!==a);if(!Oa&&0!==i.length)return i}};var Da={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Na=/[A-Z]|^ms/g,La=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ra=function(e){return 45===e.charCodeAt(1)},Ba=function(e){return null!=e&&"boolean"!=typeof e},ja=ya((function(e){return Ra(e)?e:e.replace(Na,"-$&").toLowerCase()})),Fa=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(La,(function(e,t,n){return Ha={name:t,styles:n,next:Ha},t}))}return 1===Da[e]||Ra(e)||"number"!=typeof t||0===t?t:t+"px"};function Ua(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return Ha={name:i.name,styles:i.styles,next:Ha},i.name;var a=n;if(void 0!==a.styles){var o=a.next;if(void 0!==o)for(;void 0!==o;)Ha={name:o.name,styles:o.styles,next:Ha},o=o.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ua(e,t,n[i])+";";else for(var a in n){var o=n[a];if("object"!=typeof o){var s=o;null!=t&&void 0!==t[s]?r+=a+"{"+t[s]+"}":Ba(s)&&(r+=ja(a)+":"+Fa(a,s)+";")}else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var l=Ua(e,t,o);switch(a){case"animation":case"animationName":r+=ja(a)+":"+l+";";break;default:r+=a+"{"+l+"}"}}else for(var c=0;c<o.length;c++)Ba(o[c])&&(r+=ja(a)+":"+Fa(a,o[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=Ha,l=n(e);return Ha=s,Ua(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var Ha,za=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function Va(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";Ha=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,i+=Ua(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++){if(i+=Ua(n,t,e[o]),r)i+=a[o]}za.lastIndex=0;for(var s,l="";null!==(s=za.exec(i));)l+="-"+s[1];return{name:function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l,styles:i,next:Ha}}var Wa="undefined"!=typeof document,Ga=function(e){return e()},qa=!!g.useInsertionEffect&&g.useInsertionEffect,Ya=Wa&&qa||Ga,Ka=(qa||g.useLayoutEffect,"undefined"!=typeof document),Xa=g.createContext("undefined"!=typeof HTMLElement?xa({key:"css"}):null),Qa=Xa.Provider,$a=function(e){return Object(g.forwardRef)((function(t,n){var r=Object(g.useContext)(Xa);return e(t,r,n)}))};Ka||($a=function(e){return function(t){var n=Object(g.useContext)(Xa);return null===n?(n=xa({key:"css"}),g.createElement(Xa.Provider,{value:n},e(t,n))):e(t,n)}});var Ja=g.createContext({});var Za={}.hasOwnProperty,eo="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",to=function(e,t){var n={};for(var r in t)Za.call(t,r)&&(n[r]=t[r]);return n[eo]=e,n},no=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Ma(t,n,r);var i=Ya((function(){return Pa(t,n,r)}));if(!Ka&&void 0!==i){for(var a,o=n.name,s=n.next;void 0!==s;)o+=" "+s.name,s=s.next;return(g.createElement("style",((a={})["data-emotion"]=t.key+" "+o,a.dangerouslySetInnerHTML={__html:i},a.nonce=t.sheet.nonce,a)))}return null},ro=$a((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[eo],a=[r],o="";"string"==typeof e.className?o=Ia(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var s=Va(a,void 0,g.useContext(Ja));o+=t.key+"-"+s.name;var l={};for(var c in e)Za.call(e,c)&&"css"!==c&&c!==eo&&(l[c]=e[c]);return l.className=o,n&&(l.ref=n),g.createElement(g.Fragment,null,g.createElement(no,{cache:t,serialized:s,isStringTag:"string"==typeof i}),g.createElement(i,l))})),io=(r(1225),function(e,t){var n=arguments;if(null==t||!Za.call(t,"css"))return g.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=ro,i[1]=to(e,t);for(var a=2;a<r;a++)i[a]=n[a];return g.createElement.apply(null,i)});function ao(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Va(t)}var oo=function(){var e=ao.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},so=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var a=t[r];if(null!=a){var o=void 0;switch(typeof a){case"boolean":break;case"object":if(Array.isArray(a))o=e(a);else for(var s in o="",a)a[s]&&s&&(o&&(o+=" "),o+=s);break;default:o=a}o&&(i&&(i+=" "),i+=o)}}return i};function lo(e,t,n){var r=[],i=Ia(e,r,n);return r.length<2?n:i+t(r)}var co=function(e){var t,n=e.cache,r=e.serializedArr,i=Ya((function(){for(var e="",t=0;t<r.length;t++){var i=Pa(n,r[t],!1);Ka||void 0===i||(e+=i)}if(!Ka)return e}));return Ka||0===i.length?null:g.createElement("style",((t={})["data-emotion"]=n.key+" "+r.map((function(e){return e.name})).join(" "),t.dangerouslySetInnerHTML={__html:i},t.nonce=n.sheet.nonce,t))},uo=$a((function(e,t){var n=[],r=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var a=Va(r,t.registered);return n.push(a),Ma(t,a,!1),t.key+"-"+a.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return lo(t.registered,r,so(n))},theme:g.useContext(Ja)},a=e.children(i);return!0,g.createElement(g.Fragment,null,g.createElement(co,{cache:t,serializedArr:n}),a)}));function ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fo(e,t){if(e){if("string"==typeof e)return ho(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ho(e,t):void 0}}function po(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||fo(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mo(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var go=r(79),vo=r.n(go);const bo=Math.min,yo=Math.max,Ao=Math.round,_o=Math.floor,wo=e=>({x:e,y:e});function Eo(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function So(){return"undefined"!=typeof window}function Co(e){return xo(e)?(e.nodeName||"").toLowerCase():"#document"}function To(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ko(e){var t;return null==(t=(xo(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function xo(e){return!!So()&&(e instanceof Node||e instanceof To(e).Node)}function Oo(e){return!!So()&&(e instanceof Element||e instanceof To(e).Element)}function Io(e){return!!So()&&(e instanceof HTMLElement||e instanceof To(e).HTMLElement)}function Mo(e){return!(!So()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof To(e).ShadowRoot)}function Po(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Lo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Do(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function No(e){return["html","body","#document"].includes(Co(e))}function Lo(e){return To(e).getComputedStyle(e)}function Ro(e){if("html"===Co(e))return e;const t=e.assignedSlot||e.parentNode||Mo(e)&&e.host||ko(e);return Mo(t)?t.host:t}function Bo(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=function e(t){const n=Ro(t);return No(n)?t.ownerDocument?t.ownerDocument.body:t.body:Io(n)&&Po(n)?n:e(n)}(e),a=i===(null==(r=e.ownerDocument)?void 0:r.body),o=To(i);if(a){const e=jo(o);return t.concat(o,o.visualViewport||[],Po(i)?i:[],e&&n?Bo(e):[])}return t.concat(i,Bo(i,[],n))}function jo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fo(e){const t=Lo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Io(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ao(n)!==a||Ao(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Uo(e){return Oo(e)?e:e.contextElement}function Ho(e){const t=Uo(e);if(!Io(t))return wo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Fo(t);let o=(a?Ao(n.width):n.width)/r,s=(a?Ao(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}const zo=wo(0);function Vo(e){const t=To(e);return Do()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:zo}function Wo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),a=Uo(e);let o=wo(1);t&&(r?Oo(r)&&(o=Ho(r)):o=Ho(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==To(e))&&t}(a,n,r)?Vo(a):wo(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){const e=To(a),t=r&&Oo(r)?To(r):r;let n=e,i=jo(n);for(;i&&r&&t!==n;){const e=Ho(i),t=i.getBoundingClientRect(),r=Lo(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=a,c+=o,n=To(i),i=jo(n)}}return Eo({width:u,height:d,x:l,y:c})}function Go(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Uo(e),u=i||a?[...c?Bo(c):[],...Bo(t)]:[];u.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const i=ko(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function o(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;const f={rootMargin:-_o(u)+"px "+-_o(i.clientWidth-(c+d))+"px "+-_o(i.clientHeight-(u+h))+"px "+-_o(c)+"px",threshold:yo(0,bo(1,l))||1};let p=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!p)return o();t?o(!1,t):n=setTimeout(()=>{o(!1,1e-7)},1e3)}p=!1}try{r=new IntersectionObserver(m,{...f,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),a}(c,n):null;let h,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m=l?Wo(e):null;return l&&function t(){const r=Wo(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var qo=g.useLayoutEffect,Yo=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ko=function(){};function Xo(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Qo(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var a=[].concat(r);if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&a.push("".concat(Xo(e,o)));return a.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var $o=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===Ei(e)&&null!==e?[e]:[];var t},Jo=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,ki({},mo(e,Yo))},Zo=function(e,t,n){var r=e.cx,i=e.getStyles,a=e.getClassNames,o=e.className;return{css:i(t,e),className:r(null!=n?n:{},a(t,e),o)}};function es(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ts(e){return es(e)?window.pageYOffset:e.scrollTop}function ns(e,t){es(e)?window.scrollTo(0,t):e.scrollTop=t}function rs(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function is(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ko,i=ts(e),a=t-i,o=10,s=0;function l(){var t=rs(s+=o,i,a,n);ns(e,t),s<n?window.requestAnimationFrame(l):r(e)}l()}function as(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?ns(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&ns(e,Math.max(t.offsetTop-i,0))}function os(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var ss=!1,ls={get passive(){return ss=!0}},cs="undefined"!=typeof window?window:{};cs.addEventListener&&cs.removeEventListener&&(cs.addEventListener("p",Ko,ls),cs.removeEventListener("p",Ko,!1));var us=ss;function ds(e){return null!=e}function hs(e,t,n){return e?t:n}var fs=["children","innerProps"],ps=["children","innerProps"];function ms(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,a=e.shouldScroll,o=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,h=n.getBoundingClientRect(),f=h.bottom,p=h.height,m=h.top,g=n.offsetParent.getBoundingClientRect().top,v=o?window.innerHeight:es(u=l)?window.innerHeight:u.clientHeight,b=ts(l),y=parseInt(getComputedStyle(n).marginBottom,10),A=parseInt(getComputedStyle(n).marginTop,10),_=g-A,w=v-m,E=_+b,S=d-b-m,C=f-v+b+y,T=b+m-A;switch(i){case"auto":case"bottom":if(w>=p)return{placement:"bottom",maxHeight:t};if(S>=p&&!o)return a&&is(l,C,160),{placement:"bottom",maxHeight:t};if(!o&&S>=r||o&&w>=r)return a&&is(l,C,160),{placement:"bottom",maxHeight:o?w-y:S-y};if("auto"===i||o){var k=t,x=o?_:E;return x>=r&&(k=Math.min(x-y-s,t)),{placement:"top",maxHeight:k}}if("bottom"===i)return a&&ns(l,C),{placement:"bottom",maxHeight:t};break;case"top":if(_>=p)return{placement:"top",maxHeight:t};if(E>=p&&!o)return a&&is(l,T,160),{placement:"top",maxHeight:t};if(!o&&E>=r||o&&_>=r){var O=t;return(!o&&E>=r||o&&_>=r)&&(O=o?_-A:E-A),a&&is(l,T,160),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var gs,vs=function(e){return"auto"===e?"bottom":e},bs=Object(g.createContext)(null),ys=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,o=e.menuShouldScrollIntoView,s=e.theme,l=(Object(g.useContext)(bs)||{}).setPortalPlacement,c=Object(g.useRef)(null),u=po(Object(g.useState)(r),2),d=u[0],h=u[1],f=po(Object(g.useState)(null),2),p=f[0],m=f[1],v=s.spacing.controlHeight;return qo((function(){var e=c.current;if(e){var t="fixed"===a,s=ms({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:o&&!t,isFixedPosition:t,controlHeight:v});h(s.maxHeight),m(s.placement),null==l||l(s.placement)}}),[r,i,a,o,n,l,v]),t({ref:c,placerProps:ki(ki({},e),{},{placement:p||vs(i),maxHeight:d})})},As=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return io("div",xi({},Zo(e,"menu",{menu:!0}),{ref:n},r),t)},_s=function(e,t){var n=e.theme,r=n.spacing.baseUnit,i=n.colors;return ki({textAlign:"center"},t?{}:{color:i.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},ws=_s,Es=_s,Ss=["size"],Cs=["innerProps","isRtl","size"];var Ts={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},ks=function(e){var t=e.size,n=mo(e,Ss);return io("svg",xi({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ts},n))},xs=function(e){return io(ks,xi({size:20},e),io("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Os=function(e){return io(ks,xi({size:20},e),io("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Is=function(e,t){var n=e.isFocused,r=e.theme,i=r.spacing.baseUnit,a=r.colors;return ki({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*i,":hover":{color:n?a.neutral80:a.neutral40}})},Ms=Is,Ps=Is,Ds=oo(gs||(gs=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"]))),Ns=function(e){var t=e.delay,n=e.offset;return io("span",{css:ao({animation:"".concat(Ds," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Ls=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.innerRef,a=e.innerProps,o=e.menuIsOpen;return io("div",xi({ref:i},Zo(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":o}),a,{"aria-disabled":n||void 0}),t)},Rs=["data"],Bs=function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.getClassNames,a=e.Heading,o=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return io("div",xi({},Zo(e,"group",{group:!0}),s),io(a,xi({},o,{selectProps:u,theme:c,getStyles:r,getClassNames:i,cx:n}),l),io("div",null,t))},js=["innerRef","isDisabled","isHidden","inputClassName"],Fs={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Us={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ki({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Fs)},Hs=function(e){return ki({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Fs)},zs=function(e){var t=e.children,n=e.innerProps;return io("div",n,t)};var Vs={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return io("div",xi({},Zo(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||io(xs,null))},Control:Ls,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return io("div",xi({},Zo(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||io(Os,null))},DownChevron:Os,CrossIcon:xs,Group:Bs,GroupHeading:function(e){var t=Jo(e);t.data;var n=mo(t,Rs);return io("div",xi({},Zo(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return io("div",xi({},Zo(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return io("span",xi({},t,Zo(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Jo(e),i=r.innerRef,a=r.isDisabled,o=r.isHidden,s=r.inputClassName,l=mo(r,js);return io("div",xi({},Zo(e,"input",{"input-container":!0}),{"data-value":n||""}),io("input",xi({className:t({input:!0},s),ref:i,style:Hs(o),disabled:a},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,i=void 0===r?4:r,a=mo(e,Cs);return io("div",xi({},Zo(ki(ki({},a),{},{innerProps:t,isRtl:n,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),io(Ns,{delay:0,offset:n}),io(Ns,{delay:160,offset:!0}),io(Ns,{delay:320,offset:!n}))},Menu:As,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,i=e.isMulti;return io("div",xi({},Zo(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,a=e.menuPlacement,o=e.menuPosition,s=Object(g.useRef)(null),l=Object(g.useRef)(null),c=po(Object(g.useState)(vs(a)),2),u=c[0],d=c[1],h=Object(g.useMemo)((function(){return{setPortalPlacement:d}}),[]),f=po(Object(g.useState)(null),2),p=f[0],m=f[1],v=Object(g.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===o?0:window.pageYOffset,n=e[u]+t;n===(null==p?void 0:p.offset)&&e.left===(null==p?void 0:p.rect.left)&&e.width===(null==p?void 0:p.rect.width)||m({offset:n,rect:e})}}),[r,o,u,null==p?void 0:p.offset,null==p?void 0:p.rect.left,null==p?void 0:p.rect.width]);qo((function(){v()}),[v]);var b=Object(g.useCallback)((function(){"function"==typeof l.current&&(l.current(),l.current=null),r&&s.current&&(l.current=Go(r,s.current,v,{elementResize:"ResizeObserver"in window}))}),[r,v]);qo((function(){b()}),[b]);var y=Object(g.useCallback)((function(e){s.current=e,b()}),[b]);if(!t&&"fixed"!==o||!p)return null;var A=io("div",xi({ref:y},Zo(ki(ki({},e),{},{offset:p.offset,position:o,rect:p.rect}),"menuPortal",{"menu-portal":!0}),i),n);return io(bs.Provider,{value:h},t?Object(go.createPortal)(A,t):A)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,i=mo(e,ps);return io("div",xi({},Zo(ki(ki({},i),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,i=mo(e,fs);return io("div",xi({},Zo(ki(ki({},i),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,i=e.innerProps,a=e.isDisabled,o=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return io(l,{data:r,innerProps:ki(ki({},Zo(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),i),selectProps:s},io(c,{data:r,innerProps:ki({},Zo(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),io(u,{data:r,innerProps:ki(ki({},Zo(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},o),selectProps:s}))},MultiValueContainer:zs,MultiValueLabel:zs,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return io("div",xi({role:"button"},n),t||io(xs,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.isSelected,a=e.innerRef,o=e.innerProps;return io("div",xi({},Zo(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":i}),{ref:a,"aria-disabled":n},o),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return io("div",xi({},Zo(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,i=e.isRtl;return io("div",xi({},Zo(e,"container",{"--is-disabled":r,"--is-rtl":i}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return io("div",xi({},Zo(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,i=e.hasValue;return io("div",xi({},Zo(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":i}),n),t)}};function Ws(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ws(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qs=Object(g.forwardRef)((function(e,t){var n=e.components,r=e.styles,i=Yt()(e,["components","styles"]);return v.a.createElement(tv,Gt()({},i,{ref:t,menuPlacement:"top",styles:Gs({menuPortal:{width:"25rem",maxHeight:300,zIndex:10},menu:{border:"2px solid white",borderRadius:"0.5rem",overflow:"hidden"},control:{borderColor:"transparent",background:"transparent",border:"none",boxShadow:"none"},option:{fontSize:"0.9375rem"}},r),components:Gs({IndicatorsContainer:function(){return null},Placeholder:function(){return null},SingleValue:function(){return null}},n)}))})),Ys=Object(q.b)((function(e){return{isVideoActive:-1!==e.cg.showChapterCoverImageSlide}}),(function(e){return{getCourseFiles:function(t,n,r){return e(Q.e.getCourseFiles(t,n,r))}}}))((function(e){var t=e.isVideoActive,n=e.videoId,r=e.plan,i=e.getCourseFiles,a=Object(g.useState)(!1),o=pi()(a,2),s=o[0],l=o[1],c=Object(g.useState)([]),u=pi()(c,2),d=u[0],h=u[1],f=Object(g.useState)(null),p=pi()(f,2),m=p[0],b=p[1],y=Object(g.useState)(""),A=pi()(y,2),_=A[0],w=A[1],E=Object(g.useState)(!1),S=pi()(E,2),C=S[0],T=S[1],k=Object(g.useState)({}),O=pi()(k,2),M=O[0],D=O[1],N=Object(g.useRef)(),L=r||0,R=Object(g.useCallback)((function(){var e=localStorage.getItem("fv-visited-files-key"),t=e?JSON.parse(e):{};D(t)}),[]),B=Object(g.useCallback)((function(){localStorage.setItem("fv-visited-files-key",JSON.stringify(M))}),[M]);Object(g.useEffect)((function(){return j(),function(){T(!1)}}),[n,t]);var j=Object(g.useCallback)((function(){n&&t&&(window.refreshCourseFiles=!1,R(),l(!0),i({videoId:n},(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=[];e.forEach((function(e){var r=e.minPlan?e.minPlan:0,i=x.g.SUB_OFFER[e.type];r<=L||x.c.checkSubscribedOffer(i)?t.push(Gs(Gs({},e),{},{label:e.fileName,value:e.id,subOffer:i,styles:{background:"#00b0f0",color:"#FFF"}})):n.push(Gs(Gs({},e),{},{label:e.fileName,value:e.id,subOffer:i,styles:{background:"#dc632a",color:"#FFF"}}))}));var r=t.concat(n);h(r),l(!1)}),(function(){l(!1)})))}),[n,t]),F=Object(g.useCallback)((function(){window.refreshCourseFiles&&(window.refreshCourseFiles=!1,j())}),[n,t]),U=Object(g.useCallback)((function(e){(e.minPlan?e.minPlan:0)>L&&!x.c.checkSubscribedOffer(e.subOffer,{popup:!0})||(b(e),N.current.focus())}),[N]),H=Object(g.useCallback)((function(e){if(document.activeElement.blur(),m){M[m.id]=!0,D(M),B();var t=m.fileUrl;if("view"===e.value){var n=x.c.getFileExtension(new URL(t).pathname);if(![".ppt",".pptx"].includes(n.toLowerCase()))return void w(t)}x.c.download({name:m.label,url:t}),b(null)}}),[m,M]),z=Object(g.useCallback)((function(e){T(!C)}),[C]);return v.a.createElement("div",{id:"filesDiv",className:"position-relative"},v.a.createElement(qs,{isDisabled:s||!d.length,options:d,menuIsOpen:C,onChange:U,onMenuOpen:F,selectProps:{label:v.a.createElement("div",{onClick:z,className:P()("u-flex-center u-py-3o8 px-3 border border-white u-border-radius-1o4",d.length?"u-cursor-pointer":"u-opacity-50")},v.a.createElement("div",{className:"u-fs-13o16 text-white u-ws-pre"},"Summaries\nWorksheets\nHW Guides"),v.a.createElement("div",{className:"u-flex-center flex-column ml-3"},v.a.createElement("img",{className:"",width:"30",src:I.a.download}),v.a.createElement("img",{className:"",width:"26",src:I.a.print})))},highlights:M,highlightStyle:{color:"#4b4b4b"},value:null,components:{MenuList:function(e){return v.a.createElement(Vs.MenuList,e,v.a.createElement("div",{className:"position-sticky",style:{top:0,zIndex:2}},v.a.createElement("div",{className:P()(Wn.a.btnClose,"clickable"),onClick:function(){T(!1)}},v.a.createElement("div",{className:"u-flex-center"},v.a.createElement("i",{className:"fv fuvi-delete u-fs-3o4"})))),v.a.createElement("div",{className:"u-bg-black text-white p-3"},v.a.createElement("div",{className:"u-fs-15o16"},"Welcome to mastery resources!"),v.a.createElement("div",{className:"mt-1 d-flex align-items-center"},v.a.createElement("div",{className:"u-w-1 u-h-1 mr-2 u-bg-cyan"}),"Available to view and download"),v.a.createElement("div",{className:"mt-1 d-flex align-items-center"},v.a.createElement("div",{className:"u-w-1 u-h-1 mr-2 bg-secondary"}),"Upgrade your plan to view and download")),e.children)}}}),v.a.createElement(qs,{ref:N,menuIsOpen:!!m,className:Wn.a.hiddenSelect,onBlur:function(){b(null)},options:[{label:"View",value:"view"},{label:"Download",value:"download"}],styles:{menuPortal:{width:"9rem"}},onChange:H,value:null}),_&&v.a.createElement(aT,{urls:[_],onClose:function(){w("")}}))})),Ks=(r(353),r(206));var Xs=v.a.createContext(null),Qs=["as","onSelect","activeKey","role","onKeyDown"],$s=function(){},Js=v.a.forwardRef((function(e,t){var n,r,i=e.as,a=void 0===i?"ul":i,o=e.onSelect,s=e.activeKey,l=e.role,c=e.onKeyDown,u=Object(y.a)(e,Qs),d=Object(g.useReducer)((function(e){return!e}),!1)[1],h=Object(g.useRef)(!1),f=Object(g.useContext)(De),p=Object(g.useContext)(Xs);p&&(l=l||"tablist",s=p.activeKey,n=p.getControlledId,r=p.getControllerId);var m=Object(g.useRef)(null),A=function(e){var t=m.current;if(!t)return null;var n=Object(Ks.a)(t,"[data-rb-event-key]:not(.disabled)"),r=t.querySelector(".active");if(!r)return null;var i=n.indexOf(r);if(-1===i)return null;var a=i+e;return a>=n.length&&(a=0),a<0&&(a=n.length-1),n[a]},_=function(e,t){null!=e&&(o&&o(e,t),f&&f(e,t))};Object(g.useEffect)((function(){if(m.current&&h.current){var e=m.current.querySelector("[data-rb-event-key].active");e&&e.focus()}h.current=!1}));var w=ze(t,m);return(v.a.createElement(De.Provider,{value:_},v.a.createElement(Le.Provider,{value:{role:l,activeKey:Pe(s),getControlledId:n||$s,getControllerId:r||$s}},v.a.createElement(a,Object(b.a)({},u,{onKeyDown:function(e){var t;switch(c&&c(e),e.key){case"ArrowLeft":case"ArrowUp":t=A(-1);break;case"ArrowRight":case"ArrowDown":t=A(1);break;default:return}t&&(e.preventDefault(),_(t.dataset.rbEventKey,e),h.current=!0,d())},ref:w,role:l})))))})),Zs=["bsPrefix","className","children","as"],el=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,i=e.children,a=e.as,o=void 0===a?"div":a,s=Object(y.a)(e,Zs);return n=Object(w.a)(n,"nav-item"),v.a.createElement(o,Object(b.a)({},s,{ref:t,className:_()(r,n)}),i)}));el.displayName="NavItem";var tl=el,nl=["active","className","eventKey","onSelect","onClick","as"],rl=v.a.forwardRef((function(e,t){var n=e.active,r=e.className,i=e.eventKey,a=e.onSelect,o=e.onClick,s=e.as,l=Object(y.a)(e,nl),c=Pe(i,l.href),u=Object(g.useContext)(De),d=Object(g.useContext)(Le),h=n;if(d){l.role||"tablist"!==d.role||(l.role="tab");var f=d.getControllerId(c),p=d.getControlledId(c);l["data-rb-event-key"]=c,l.id=f||l.id,l["aria-controls"]=p||l["aria-controls"],h=null==n&&null!=c?d.activeKey===c:n}"tab"===l.role&&(l.disabled&&(l.tabIndex=-1,l["aria-disabled"]=!0),l["aria-selected"]=h);var m=Object(Me.a)((function(e){o&&o(e),null!=c&&(a&&a(c,e),u&&u(c,e))}));return(v.a.createElement(s,Object(b.a)({},l,{ref:t,onClick:m,className:_()(r,h&&"active")})))}));rl.defaultProps={disabled:!1};var il=rl,al=["bsPrefix","disabled","className","href","eventKey","onSelect","as"],ol={disabled:!1,as:Re.a},sl=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.disabled,i=e.className,a=e.href,o=e.eventKey,s=e.onSelect,l=e.as,c=Object(y.a)(e,al);return n=Object(w.a)(n,"nav-link"),v.a.createElement(il,Object(b.a)({},c,{href:a,ref:t,eventKey:o,as:l,disabled:r,onSelect:s,className:_()(i,n,r&&"disabled")}))}));sl.displayName="NavLink",sl.defaultProps=ol;var ll=sl,cl=["as","bsPrefix","variant","fill","justify","navbar","navbarScroll","className","children","activeKey"],ul=v.a.forwardRef((function(e,t){var n,r,i,a=Object(Ie.a)(e,{activeKey:"onSelect"}),o=a.as,s=void 0===o?"div":o,l=a.bsPrefix,c=a.variant,u=a.fill,d=a.justify,h=a.navbar,f=a.navbarScroll,p=a.className,m=a.children,A=a.activeKey,E=Object(y.a)(a,cl),S=Object(w.a)(l,"nav"),C=!1,T=Object(g.useContext)(qe),k=Object(g.useContext)(un);return T?(r=T.bsPrefix,C=null==h||h):k&&(i=k.cardHeaderBsPrefix),v.a.createElement(Js,Object(b.a)({as:s,ref:t,activeKey:A,className:_()(p,(n={},n[S]=!C,n[r+"-nav"]=C,n[r+"-nav-scroll"]=C&&f,n[i+"-"+c]=!!i,n[S+"-"+c]=!!c,n[S+"-fill"]=u,n[S+"-justified"]=d,n))},E),m)}));ul.displayName="Nav",ul.defaultProps={justify:!1,fill:!1},ul.Item=tl,ul.Link=ll;var dl=ul,hl=function(e){var t=Object(Ie.a)(e,{activeKey:"onSelect"}),n=t.id,r=t.generateChildId,i=t.onSelect,a=t.activeKey,o=t.transition,s=t.mountOnEnter,l=t.unmountOnExit,c=t.children,u=Object(g.useMemo)((function(){return r||function(e,t){return n?n+"-"+t+"-"+e:null}}),[n,r]),d=Object(g.useMemo)((function(){return{onSelect:i,activeKey:a,transition:o,mountOnEnter:s||!1,unmountOnExit:l||!1,getControlledId:function(e){return u(e,"tabpane")},getControllerId:function(e){return u(e,"tab")}}}),[i,a,o,s,l,u]);return v.a.createElement(Xs.Provider,{value:d},v.a.createElement(De.Provider,{value:i||null},c))},fl=["bsPrefix","as","className"],pl=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.as,i=void 0===r?"div":r,a=e.className,o=Object(y.a)(e,fl),s=Object(w.a)(n,"tab-content");return v.a.createElement(i,Object(b.a)({ref:t},o,{className:_()(a,s)}))})),ml=r(175),gl=["activeKey","getControlledId","getControllerId"],vl=["bsPrefix","className","active","onEnter","onEntering","onEntered","onExit","onExiting","onExited","mountOnEnter","unmountOnExit","transition","as","eventKey"];var bl=v.a.forwardRef((function(e,t){var n=function(e){var t=Object(g.useContext)(Xs);if(!t)return e;var n=t.activeKey,r=t.getControlledId,i=t.getControllerId,a=Object(y.a)(t,gl),o=!1!==e.transition&&!1!==a.transition,s=Pe(e.eventKey);return Object(b.a)({},e,{active:null==e.active&&null!=s?Pe(n)===s:e.active,id:r(e.eventKey),"aria-labelledby":i(e.eventKey),transition:o&&(e.transition||a.transition||ml.a),mountOnEnter:null!=e.mountOnEnter?e.mountOnEnter:a.mountOnEnter,unmountOnExit:null!=e.unmountOnExit?e.unmountOnExit:a.unmountOnExit})}(e),r=n.bsPrefix,i=n.className,a=n.active,o=n.onEnter,s=n.onEntering,l=n.onEntered,c=n.onExit,u=n.onExiting,d=n.onExited,h=n.mountOnEnter,f=n.unmountOnExit,p=n.transition,m=n.as,A=void 0===m?"div":m,E=(n.eventKey,Object(y.a)(n,vl)),S=Object(w.a)(r,"tab-pane");if(!a&&!p&&f)return null;var C=v.a.createElement(A,Object(b.a)({},E,{ref:t,role:"tabpanel","aria-hidden":!a,className:_()(i,S,{active:a})}));return p&&(C=v.a.createElement(p,{in:a,onEnter:o,onEntering:s,onEntered:l,onExit:c,onExiting:u,onExited:d,mountOnEnter:h,unmountOnExit:f},C)),v.a.createElement(Xs.Provider,{value:null},v.a.createElement(De.Provider,{value:null},C))}));bl.displayName="TabPane";var yl=bl,Al=["id","onSelect","transition","mountOnEnter","unmountOnExit","children","activeKey"];function _l(e){var t;return function(e,t){var n=0;v.a.Children.forEach(e,(function(e){v.a.isValidElement(e)&&t(e,n++)}))}(e,(function(e){null==t&&(t=e.props.eventKey)})),t}function wl(e){var t=e.props,n=t.title,r=t.eventKey,i=t.disabled,a=t.tabClassName,o=t.id;return null==n?null:v.a.createElement(tl,{as:ll,eventKey:r,disabled:i,id:o,className:a},n)}var El=function(e){var t=Object(Ie.a)(e,{activeKey:"onSelect"}),n=t.id,r=t.onSelect,i=t.transition,a=t.mountOnEnter,o=t.unmountOnExit,s=t.children,l=t.activeKey,c=void 0===l?_l(s):l,u=Object(y.a)(t,Al);return(v.a.createElement(hl,{id:n,activeKey:c,onSelect:r,transition:i,mountOnEnter:a,unmountOnExit:o},v.a.createElement(dl,Object(b.a)({},u,{role:"tablist",as:"nav"}),dt(s,wl)),v.a.createElement(pl,null,dt(s,(function(e){var t=Object(b.a)({},e.props);return delete t.title,delete t.disabled,delete t.tabClassName,v.a.createElement(yl,t)})))))};El.defaultProps={variant:"tabs",mountOnEnter:!1,unmountOnExit:!1},El.displayName="Tabs";var Sl=El,Cl=r(289),Tl=function(e){function t(){return e.apply(this,arguments)||this}return Object(Cl.a)(t,e),t.prototype.render=function(){throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")},t}(v.a.Component);Tl.Container=hl,Tl.Content=pl,Tl.Pane=yl;var kl=Tl,xl=r(102),Ol=r.n(xl),Il=r(21),Ml=r.n(Il),Pl=function(e){var t=e.thumb,n=e.name,r=e.description,i=e.date,a=e.status,o=e.mediaType,s=e.onClick,l=e.checked,c=e.onSelect,u=e.active,d=x.g.COGVID_STATUS_COLOR,h=a===x.g.COGVID_STATUS.PUBLISHED;return v.a.createElement("div",{className:"".concat(h||o?Ol.a.isHoverItem:Ol.a.noneHoverItem," ").concat(Ol.a.myMediaItem," ").concat((l||u)&&Ol.a.myMediaItemChecked," d-flex p-2 border-bottom border-white"),onClick:s},h||o?v.a.createElement("div",{className:"".concat(Ol.a.myCogvidThumb," border border-white d-flex align-items-center justify-content-center position-relative"),style:{backgroundImage:"url(".concat(t,")")},alt:"cogvid Icon"},("video"===o||l)&&v.a.createElement("span",{className:"".concat(Ol.a.checkIcon," d-flex justify-content-center align-items-center position-absolute ").concat(l&&"text-success"),onClick:function(e){return e.stopPropagation(),c()}},v.a.createElement("i",{className:"fa fa-check-circle-o","aria-hidden":"true"})),h||"video"===o?v.a.createElement("span",{className:"".concat(Ol.a.centerIcon)},v.a.createElement("i",{className:"fv fuvi-play-btn fv-2x text-white"})):"image"===o?v.a.createElement("div",null):v.a.createElement("img",{className:"".concat(Ol.a.centerIcon),height:"36",src:I.a.unknowFile,alt:"cogvid Icon"})):v.a.createElement("div",{className:"".concat(Ol.a.myCogvidThumb," border border-white d-flex justify-content-center align-items-center position-relative")},v.a.createElement("img",{className:"".concat(Ol.a.centerIcon),height:"36",src:I.a.cogvidIcon,alt:"cogvid Icon"})),v.a.createElement("div",{className:"".concat(Ol.a.rightMyItem," ml-3 d-flex flex-column"),style:{minWidth:0}},v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",{style:{minWidth:0}},v.a.createElement("small",{className:"text-truncate d-block"},n))),r&&v.a.createElement("div",null,v.a.createElement("small",{className:"text-truncate d-block mt-1"},r)),v.a.createElement("div",{className:"d-flex align-items-center mt-auto"},!!a&&v.a.createElement("div",null,v.a.createElement("span",{style:{background:d[a]},className:"".concat(Ol.a.statusLabel," text-white px-2")},x.d[a])),v.a.createElement("small",{className:"ml-auto text-black-50"},Ml()(i).format("LL")))))};Pl.propTypes={thumb:ne.a.string,icon:ne.a.string,name:ne.a.string,description:ne.a.string,date:ne.a.string,status:ne.a.string,onClick:ne.a.func,checked:ne.a.bool,active:ne.a.bool,onSelect:ne.a.func,mediaType:ne.a.string},Pl.defaultProps={};var Dl=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isLoadingMore:!1}),G()(V()(e),"componentDidMount",(function(){e.props.getMyCogvidList({isRefresh:!0},(function(){return e.setState({isLoadingMore:!1})}))})),G()(V()(e),"handleMyCogvidScroll",(function(){var t=e.props.myCogvidList,n=t.totalPages,r=void 0===n?1:n,i=t.pageable.pageNumber,a=void 0===i?0:i;!e.state.isLoadingMore&&a<r-1&&e.loadMoreContent(a+1)})),G()(V()(e),"loadMoreContent",Object(Y.debounce)((function(t){e.setState({isLoadingMore:!0},(function(){return e.props.getMyCogvidList({page:t},(function(){return e.setState({isLoadingMore:!1})}))}))}),200)),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.myCogvidList,n=void 0===t?{}:t,r=e.cogvidDetails,i=void 0===r?{}:r,a=e.onItemClick,o=this.state.isLoadingMore,s=n.content,l=void 0===s?[]:s,c=i.videoId;return v.a.createElement(Lb,{onYReachEnd:this.handleMyCogvidScroll,className:"flex-fill"},v.a.createElement("div",null,!!l.length&&l.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.cognitiveVideo,r=void 0===n?{}:n;return v.a.createElement(Pl,{active:c===r.uid,key:t,onClick:function(){return a(e)},thumb:e.thumbnailUrl,name:r.title,description:r.subject,date:e.createdDate,status:r.status})})),o&&v.a.createElement("div",{className:"d-flex justify-content-center py-2"},v.a.createElement(xn.a,{animation:"border",size:"sm",variant:"primary"}))))}}]),n}(g.Component),Nl=Object(q.b)((function(e){var t=e.cogvid;return{myCogvidList:t.myCogvidList,cogvidDetails:t.cogvidDetails}}),(function(e){return{getMyCogvidList:function(t,n){return e(Q.e.getMyCogvidList(t,n))}}}))(Dl),Ll=r(24),Rl=r.n(Ll);var Bl=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"fileInput",v.a.createRef()),G()(V()(e),"state",{uploadFiles:[],isUploading:!1}),G()(V()(e),"handleFileChange",(function(t){var n=t.target.files,r=n.length;if(n&&r>0){if(r>5)return x.e.info("Please choose maximum 5 files.");for(var i=[],a=0;a<r;a++)n[a].status="waiting",i.push(n[a]);e.setState({uploadFiles:i,isUploading:!0},(function(){e.handleUploadFile(0)}))}})),G()(V()(e),"handleUploadFile",(function(t){var n=e.props.uploadVideo,r=e.state.uploadFiles[t];e.setState((function(e){return{uploadFiles:e.uploadFiles.map((function(e,n){return n===t&&(e.status="uploading"),e}))}}),(function(){return n(r,(function(){return e.nextUpload("success",t)}),(function(){return e.nextUpload("failure",t)}))}))})),G()(V()(e),"nextUpload",(function(t,n){var r=e.state.uploadFiles,i=e.props.reGetMyMediaList;e.setState((function(e){return{uploadFiles:e.uploadFiles.map((function(e,r){return r===n&&(e.status=t),e}))}}),(function(){n<r.length-1?e.handleUploadFile(++n):e.setState({isUploading:!1},(function(){x.e.success("Upload finished."),e.fileInput.current.value="",i({refresh:!0})}))}))})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.uploadFiles,r=t.isUploading;return v.a.createElement("div",{className:"".concat(Ol.a.uploadArea," border-bottom border-white border-left border-white")},v.a.createElement("div",{className:"".concat(Ol.a.uploadAreaWrap," ").concat(r&&Ol.a.uploadAreaDisabled," d-flex justify-content-center align-items-center flex-column"),onClick:function(){return r?null:e.fileInput.current.click()}},v.a.createElement("i",{className:"fa fa-cloud-upload fa-2x","aria-hidden":"true"}),v.a.createElement("small",{className:"text-center"},"Click here to upload")),!!n.length&&v.a.createElement("div",{className:Ol.a.listUploading},n.map((function(e,t){var n=x.c.getFileType(e.type);return v.a.createElement("div",{className:"d-flex align-items-center mb-2",key:t},v.a.createElement("i",{className:"fa fa-file".concat(n&&"-".concat(n,"-o")," mr-3"),"aria-hidden":"true"}),v.a.createElement("div",{className:"".concat(Ol.a.textUploadFileName," flex-fill")},e.name),v.a.createElement("div",{className:"ml-3"},"waiting"===e.status&&v.a.createElement("i",{className:"fa fa-circle-o text-black-50 fa-lg","aria-hidden":"true"}),"uploading"===e.status&&v.a.createElement(xn.a,{animation:"border",size:"sm",variant:"info"}),"failure"===e.status&&v.a.createElement("i",{className:"fa fa-times-circle text-danger fa-lg","aria-hidden":"true"}),"success"===e.status&&v.a.createElement("i",{className:"fa fa-check-circle text-success fa-lg","aria-hidden":"true"})))}))),v.a.createElement("input",{className:"d-none",ref:this.fileInput,type:"file",onChange:function(t){return e.handleFileChange(t)},multiple:!0}))}}]),n}(g.Component),jl=Object(q.b)((function(e){return{}}),(function(e){return{uploadVideo:function(t,n,r){return e(Q.g.uploadAVideo(t,n,r))},reGetMyMediaList:function(t,n,r){return e(Q.g.getMyMediaList(t,n,r))}}}))(Bl),Fl=r(1834),Ul=function(e){var t=e.show,n=e.onHide,r=e.data,i=r.mediaType?x.c.getFileType(r.mediaType):"";return v.a.createElement(Fl.a,{show:t,onHide:n,size:"xl",className:"modal-no-background",centered:!0,"aria-labelledby":"contained-modal-title-vcenter"},Object(Y.includes)(["video","m3u8"],i)&&v.a.createElement("div",{className:"".concat(Ol.a.videoReview)},v.a.createElement("video",{className:"d-block",width:"100%",height:"'100%'",controls:!0,disablePictureInPicture:!0,controlsList:"nodownload"},v.a.createElement("source",{src:r.contentUrl,type:r.mediaType||"video/mp4"}),"Your browser does not support the video tag.")),"image"===i&&v.a.createElement("div",{className:"d-flex align-items-center justify-content-center"},v.a.createElement("img",{className:"mw-100 w-auto",src:r.contentUrl})))};function Hl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hl(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vl=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{videosChecked:[],hasMore:!0,isLoadingMore:!0}),G()(V()(e),"componentDidMount",(function(){(0,e.props.getMyMediaList)({},(function(){return e.setState({isLoadingMore:!1})}))})),G()(V()(e),"handleCheckedVideos",(function(t){var n=e.state.videosChecked,r=[];if(n.filter((function(e){return e.id===t.id})).length>0)r=n.filter((function(e){return e.id!==t.id}));else{if(n.length===x.g.CREATE_COGVID_CONSTRAINTS.MAX_COGVID_SOURCE_VIDEOS)return void x.e.info("Cannot select more than ".concat(x.g.CREATE_COGVID_CONSTRAINTS.MAX_COGVID_SOURCE_VIDEOS," videos"));r=[].concat(Rl()(n),[t])}e.setState({videosChecked:r})})),G()(V()(e),"handleContentItemClick",(function(t){if(["image","video"].includes(x.c.getFileType(t.mediaType)))!x.r.paused()&&x.r.pause(),e.props.activeContentToReview({videoUploadedInfo:zl({},t)});else{var n=document.createElement("a");n.href="".concat(x.g.CONTENT_SERVICES_ENDPOINT,"contents/").concat(t.contentId),n.target="_blank",document.body.appendChild(n),n.click(),document.body.removeChild(n)}})),G()(V()(e),"handleScroll",(function(){var t=e.state,n=t.hasMore,r=t.isLoadingMore;n&&!r&&e.loadMoreContent()})),G()(V()(e),"loadMoreContent",Object(Y.debounce)((function(){var t=Math.ceil(e.props.myMediaList.length/x.g.MY_MEDIA_PAGE_SIZE);e.setState({isLoadingMore:!0},(function(){return e.props.getMyMediaList({page:t},(function(t){return e.setState({isLoadingMore:!1,hasMore:!(t<x.g.MY_MEDIA_PAGE_SIZE)})}))}))}),200)),G()(V()(e),"handleOpenCreateCogvidForm",(function(){(0,e.props.oldtoggleCreateCogvidForm)(!0)})),G()(V()(e),"handleOpenCloseCogvidForm",(function(){(0,e.props.oldtoggleCreateCogvidForm)(!1)})),G()(V()(e),"handleCloseReviewModal",(function(){e.props.activeContentToReview({videoUploadedInfo:{}})})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.myMediaList,r=t.videoUploadedInfo,i=t.oldOpenCreateCogvidForm,a=this.state,o=a.videosChecked,s=a.isLoadingMore;return v.a.createElement("div",{className:"h-100 d-flex flex-column"},i&&v.a.createElement(Sx,{sourceVideos:o,onShow:this.handleOpenCreateCogvidForm,onClose:this.handleOpenCloseCogvidForm,onCogvidCreated:function(){return e.setState({videosChecked:[]})}}),v.a.createElement(jl,null),v.a.createElement("div",{className:"".concat(Ol.a.myMediaListWrap," flex-fill d-flex"),style:{minHeight:0}},v.a.createElement(Lb,{onYReachEnd:this.handleScroll,className:"flex-fill"},v.a.createElement("div",{className:"".concat(o.length&&"pb-5")},n.length?n.map((function(t){var n=x.c.getFileType(t.mediaType);return v.a.createElement(Pl,{mediaType:n||t.mediaType,key:t.id,checked:!!o.filter((function(e){return e.id===t.id})).length,onClick:function(){return e.handleContentItemClick(t)},onSelect:function(){return e.handleCheckedVideos(t)},thumb:"video"===n?t.thumbnailUrl:"image"===n?t.contentUrl:null,name:t.fileName,date:t.createdDate})})):v.a.createElement("div",{className:"p-3 text-center"},v.a.createElement("small",null,v.a.createElement("em",null,"No data.")))),s&&v.a.createElement("div",{className:"d-flex justify-content-center py-2"},v.a.createElement(xn.a,{animation:"border",size:"sm",variant:"primary"}))),!!o.length&&v.a.createElement(et.a,{className:"".concat(Ol.a.createCogVideo," text-white shadow-sm"),variant:"secondary",onClick:this.handleOpenCreateCogvidForm},"Create cognitive video")),v.a.createElement(Ul,{show:!!r.id,onHide:this.handleCloseReviewModal,data:r}))}}]),n}(g.Component),Wl=Object(q.b)((function(e){return{myMediaList:e.content.myMediaList,oldOpenCreateCogvidForm:e.cogvid.oldOpenCreateCogvidForm,videoUploadedInfo:e.content.videoUploadedInfo}}),(function(e){return{getMyMediaList:function(t,n){return e(Q.g.getMyMediaList(t,n))},activeContentToReview:function(t){return e(Q.g.activeContentToReview(t))},oldtoggleCreateCogvidForm:function(t){return e(Q.e.oldToggleCreateCogvidForm(t))}}}))(Vl);g.Component;var Gl=r(75),ql=r.n(Gl),Yl=r(187),Kl=r.n(Yl),Xl=r(122),Ql=r.n(Xl),$l=r(1835),Jl=r(25),Zl=r.n(Jl),ec=x.g.SUPPORTED_VIDEO_TYPES;function tc(e){var t=e.handleChooseFiles,n=e.displayUserGuide,r=e.acceptedFiles;return v.a.createElement("div",{className:P()("d-flex",Zl.a.browseAreaWrapper)},n&&v.a.createElement("div",{className:Zl.a.userGuideText},v.a.createElement("div",null,Object(_t.t)("reorderInstruction1")),v.a.createElement("div",null,Object(_t.t)("reorderInstruction2"))),v.a.createElement("div",{className:P()(Zl.a.uploadBtnsWrapper,"align-self-center")},v.a.createElement(QT,{receiveAcceptedFiles:t,acceptedFiles:r,innerWrapperClassName:P()(Zl.a.uploadBtn,"u-shadow btn-border")},v.a.createElement("i",{className:"fv fuvi-add-file-icon mr-2 u-fs-1x1o4"}),v.a.createElement("div",{className:"u-fs-7o8"},Object(_t.t)("btn.addFiles")))))}tc.propTypes={handleChooseFiles:ne.a.func,displayUserGuide:ne.a.bool.isRequired,acceptedFiles:ne.a.string},tc.defaultProps={handleChooseFiles:function(){return null},acceptedFiles:"".concat(ec,",.srt")};var nc=r(1832),rc=r(115),ic=r.n(rc);function ac(e){var n=e.data,r=e.index,i=e.swapItem,a=e.addSubFile,o=e.removeFile,s=e.restoreFile,l=e.isMoveUpDisabled,c=e.isMoveDownDisabled,u=e.rearrangeable,d=e.displayFullPath,h=e.hasTranscript,f=e.isGalleryForm,p=e.onTranscriptToggle,m=x.g.TRANSCRIPT_STATUS,g=n.uid,b=n.name,y=n.type,A=n.path,_=(n.lastModifiedDate,n.lastModified,n.creationTime,n.size,n.subItem),w=n.willBeDeleted,E=void 0!==w&&w,S=n.isExistingVideo,C=void 0!==S&&S,T=n.transcriptEnabled,k=void 0!==T&&T,O=(n.didTranscript,n.chapters),M=void 0===O?[]:O,D=n.subtitle,N=n.transcriptionStatus,L=void 0===N?m.NONE:N,R=n.mediaType,B=!!(_||D||L!==m.NONE&&L!==m.FAILED),j=L===m.FAILED,F=_||D||{},U=F.uid,H=F.name,z=(F.lastModifiedDate,F.lastModified,F.size,F.creationTime,F.contentLength,F.willBeDeleted),V=v.a.createRef(),W=I.a.srtIcon;x.c.isVideoFile({type:y,path:A})?W=C?I.a.cogvidIcon:I.a.newVideoIcon:y.match(/image/)?W=I.a.imageIcon:y.match(/pdf/)&&(W=I.a.pdfIcon);var G=(R||y).match(/pdf/);return v.a.createElement(Bk,{id:r,index:r,moveCard:i,dndType:x.g.DND_TYPE.CCV_ITEM,originalIndex:r,canDrag:u&&!E,classNameContainer:"mb-2",className:P()("py-3 border",r%2==0?Zl.a.rowBg:"bg-white")},E&&v.a.createElement("div",{className:Zl.a.disableLayer}),v.a.createElement("div",{className:P()("d-flex w-100 h-100 ",!H&&"align-items-start")},v.a.createElement("div",{className:P()(f?Zl.a.galleryFileColumn:Zl.a.fileColumn,!M.length&&Zl.a.fileColumnWidthAuto,"mr-auto")},v.a.createElement("div",{className:P()(H&&"mb-2","d-flex align-items-center position-relative w-100")},v.a.createElement("div",{className:"position-relative"},v.a.createElement("img",{className:"mr-3",style:{height:45,opacity:.5},src:W,alt:"Item icon"})),v.a.createElement("div",{style:{minWidth:0},className:"flex-fill"},v.a.createElement("div",{className:P()("text-truncate u-fs-7o8",Zl.a.mainText,d&&Zl.a.withFilePath,E&&Zl.a.strikeThrough)},b),!H&&!E&&C&&!G&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{role:"button",onClick:function(){return V.current.click()},className:P()("d-inline-flex justify-content-center align-items-center u-cursor-pointer px-2 bg-primary text-white",Zl.a.shadowBorder,Zl.a.addSubtitleBtn)},v.a.createElement("i",{className:P()("fv fuvi-import-sub mr-2",Zl.a.deleteIcon)}),v.a.createElement("small",null,"Add subtitle file")),v.a.createElement("input",{className:"d-none",ref:V,type:"file",accept:".srt",onChange:function(e){return function(e){e.stopPropagation();var n=e.target.files[0];if("srt"!==n.name.split(".").pop())return x.e.warn(t("message.acceptSrtFile"));a(g,n)}(e)}}))),d&&v.a.createElement("div",{className:P()(Zl.a.fullPathText,"text-truncate")},A)),H&&v.a.createElement("div",{className:"d-flex align-items-center pl-3"},v.a.createElement("img",{className:"mr-3",style:{height:39,opacity:.5},src:I.a.srtIcon,alt:"Srt icon"}),v.a.createElement("div",{className:P()("text-truncate u-fs-3o4 mr-2",(z||E)&&Zl.a.strikeThrough)},H),H&&U&&v.a.createElement("div",{role:"button",onClick:U?function(){return o(U,"subtitle")}:null,className:P()("d-inline-flex justify-content-center align-items-center u-cursor-pointer u-ml-1",Zl.a.shadowBorder,Zl.a.deleteBorder)},v.a.createElement("i",{className:P()("fv fuvi-trash-can text-danger",Zl.a.deleteIcon)})),D&&v.a.createElement("div",{className:"u-pl-1"},v.a.createElement("div",{role:"button",onClick:function(){z?s(g,"subtitle"):o(g,"subtitle")},className:P()("d-inline-flex justify-content-center align-items-center",Zl.a.shadowBorder,Zl.a.deleteBorder,"u-cursor-pointer")},v.a.createElement("i",{className:P()("fv",z?"fuvi-restore text-success":"fuvi-trash-can text-danger",Zl.a.deleteIcon)}))))),M.length>0&&v.a.createElement("div",{className:P()(f?Zl.a.galleryChapterColumn:Zl.a.chapterColumn,"flex-fill")},v.a.createElement("div",{className:P()("d-flex h-100 flex-column flex-fill",(!H||!d)&&"justify-content-around",E&&Zl.a.strikeThrough)},v.a.createElement("div",{className:P()(H&&"mb-2","u-fs-13o16",d&&Zl.a.withFilePath,d&&H&&"mt-1")},v.a.createElement("div",{className:Zl.a.chapterItems},M.map((function(e,t){var n=e.uid,r=e.content,i=e.startTime,a=e.endTime;return v.a.createElement("div",{key:n,className:P()(Zl.a.chapterItem,E&&Zl.a.strikeThrough)},v.a.createElement("div",{className:"flex-grow-1 text-truncate mr-2"},r,v.a.createElement("br",null),v.a.createElement("div",{className:P()("d-flex u-fs-13o16")},v.a.createElement(Qt,{tooltipText:"Copy chapter id to clipboard",classNameContainer:"mx-0",onClick:function(e){e.stopPropagation(),function(e){!x.c.isSafari()&&ic()(""),ic()(e),x.e.info("Copied chapter Id into clipboard",!0,"",3e3)}(n)},className:P()("mx-0 p-0 position-relative",Zl.a.copyBtn)},v.a.createElement("small",null,v.a.createElement("i",null,n))))),v.a.createElement("div",null,x.c.msToTimestamp(a-i+1,a-i+1>36e5?"HH:mm:ss":"mm:ss")))})))))),h&&!G&&v.a.createElement("div",{className:P()(Zl.a.transcriptColumn,"u-pl-2")},v.a.createElement("div",{className:P()("d-flex h-100 flex-column",(!H||!d)&&"justify-content-around")},L!==m.NONE&&v.a.createElement("div",{className:P()(Zl.a.transStatusText,j&&Zl.a.transStatusFailed)},L.toLowerCase()||""),!B&&v.a.createElement("div",{className:P()(H&&"mb-2",d&&Zl.a.withFilePath,d&&H&&"mt-1",E&&Zl.a.strikeThrough)},!(A&&_)&&!B&&v.a.createElement(_u,{id:"transcript".concat(r),labelName:"",classNameInput:"custom-checkbox-md u-pl-2",checked:k,disabled:B,onChange:function(){return p(g)}})))),v.a.createElement("div",{className:P()(f?Zl.a.galleryActionColumn:Zl.a.actionColumn,"u-pl-1x1o4")},v.a.createElement("div",{className:"d-flex h-100 flex-column justify-content-around align-items-center"},v.a.createElement("div",{className:P()(!H&&"d-flex h-100 flex-row align-items-center")},v.a.createElement("div",{role:"button",onClick:function(){E?s(g):o(g)},className:P()("d-inline-flex justify-content-center align-items-center",Zl.a.shadowBorder,Zl.a.deleteBorder,"u-cursor-pointer",H&&"mb-2")},v.a.createElement("i",{className:P()("fv",E?"fuvi-restore text-success":"fuvi-trash-can text-danger",Zl.a.deleteIcon)}))))),u&&v.a.createElement("div",{className:P()(Zl.a.orderColumn,"d-flex justify-content-center align-items-center u-pl-1x1o4")},v.a.createElement("div",{className:P()("d-inline-flex flex-column justify-content-between",Zl.a.orderButtonsWrap)},v.a.createElement("div",{className:P()("d-flex justify-content-center align-items-center",Zl.a.sort,Zl.a.shadowBorder,"u-cursor-pointer",l&&Zl.a.disabled),role:"button",onClick:function(){return i(r,r-1)}},v.a.createElement("i",{className:"fv fuvi-arrow-left ".concat(Zl.a.sortIcon),"aria-hidden":"true"})),v.a.createElement("div",{className:P()("d-flex justify-content-center align-items-center",Zl.a.sort,Zl.a.shadowBorder,"u-cursor-pointer",c&&Zl.a.disabled),role:"button",onClick:function(){return i(r,r+1)}},v.a.createElement("i",{className:"fv fuvi-arrow-right ".concat(Zl.a.sortIcon),"aria-hidden":"true"}))))))}function oc(e){var n=e.data,r=e.swapItem,i=e.addSubFile,a=e.removeFile,o=e.restoreFile,s=e.rearrangeable,l=e.displayFullPath,c=e.hasTranscript,u=e.isGalleryForm,d=e.onTranscriptToggle,h=e.isEditVideo;return v.a.createElement("div",{className:P()("h-100 overflow-hidden bg-light u-fs-7o8",Zl.a.ccvItemList)},v.a.createElement(nc.a,{striped:!0,borderless:!0,className:Zl.a.headerWrapper},v.a.createElement("thead",null,v.a.createElement("tr",{className:Zl.a.headerInnerWrapper},v.a.createElement("th",{className:P()(s?Zl.a.fileColumn:Zl.a.wideFileColumn,u&&Zl.a.galleryFileColumn,Zl.a.header,Zl.a.fileHeader,!h&&Zl.a.fileColumnWidthAuto,"mr-auto")},t("label.file")),h&&v.a.createElement("th",{className:P()(u?Zl.a.galleryChapterColumn:Zl.a.chapterColumn,Zl.a.header,"flex-fill")},t("label.chapters")),c&&v.a.createElement("th",{className:P()(Zl.a.transcriptColumn,Zl.a.header)},t("label.speechToText")),v.a.createElement("th",{className:P()(u?Zl.a.galleryActionColumn:Zl.a.actionColumn,Zl.a.header)},t("label.action")),s&&v.a.createElement("th",{className:P()(u?Zl.a.galleryOrderColumn:Zl.a.orderColumn,Zl.a.header)},t("label.order"))))),v.a.createElement("div",{className:P()("fv-smooth-scroll h-100 autoshow-scrollbar y fv-always-show-tracks",Zl.a.ccvItemListDragDrop)},v.a.createElement(fx,null,v.a.createElement("div",null,n.map((function(e,t){return v.a.createElement(ac,{key:e.uid,isEditVideo:h,data:e,swapItem:r,addSubFile:i,removeFile:a,restoreFile:o,index:t,isMoveUpDisabled:0===t,isMoveDownDisabled:t===n.length-1,rearrangeable:s,displayFullPath:l,hasTranscript:c,isGalleryForm:u,onTranscriptToggle:d})}))))))}function sc(e){var n=e.onlyFiles;return v.a.createElement("div",{className:Zl.a.dragAndDropContainer},v.a.createElement("div",{className:P()(Zl.a.circleBg,"rounded-circle bg-white")},v.a.createElement("img",{height:"106",width:"121",src:I.a.folderIcon,alt:"cogvid Icon",className:P()(Zl.a.folderIcon)}),v.a.createElement("div",{className:Zl.a.dndTextWrapper},v.a.createElement("div",null,n?t("dropFilesHere"):t("dropFilesFolderHere")),v.a.createElement("div",{className:Zl.a.dndSecondLine},t("dropFilesOr",{button:t("btn.addFiles")})))))}function lc(e){var n=e.existingVideos,r=e.addedVideos,i=e.deletedVideos,a=e.totalSize,o=e.totalTranscripts;return v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",{className:"d-flex align-self-start ml-2"},v.a.createElement("i",{className:P()("fv fuvi-exam-ex",Zl.a.infoIcon)})),v.a.createElement("div",{className:P()("u-fs-7o8 ml-3 u-pr-2x1o4 pr-3",Zl.a.reviewInfoWrapper)},v.a.createElement("div",{className:"u-opacity-60"},t("existing"),":"," ","".concat(n," video").concat(n>1?"s":"")),v.a.createElement("div",{className:"u-opacity-60"},t("added"),": ","".concat(r," video").concat(r>1?"s":"")),v.a.createElement("div",{className:"u-opacity-60"},t("label.speechToTextTranscript"),":"," ","".concat(o," video").concat(o>1?"s":"")),v.a.createElement("div",{className:P()("u-opacity-60",i>0&&"text-danger")},t("deleted"),":"," ","".concat(i," video").concat(i>1?"s":""))),v.a.createElement("div",{className:"u-opacity-90 align-self-center u-ml-1x1o2 u-fs-7o8",style:{fontWeight:600}},t("total")," (",x.c.formatFileSize(a),")"))}ac.propTypes={data:ne.a.object.isRequired,index:ne.a.number.isRequired,swapItem:ne.a.func,removeFile:ne.a.func,restoreFile:ne.a.func,isMoveUpDisabled:ne.a.bool,isMoveDownDisabled:ne.a.bool,rearrangeable:ne.a.bool,displayFullPath:ne.a.bool,hasTranscript:ne.a.bool,isGalleryForm:ne.a.bool,onTranscriptToggle:ne.a.func},ac.defaultProps={swapItem:function(){return null},removeFile:function(){return null},restoreFile:function(){return null},isMoveUpDisabled:!1,isMoveDownDisabled:!1,rearrangeable:!0,displayFullPath:!0,hasTranscript:!1,isGalleryForm:!1},oc.propTypes={data:ne.a.array.isRequired,swapItem:ne.a.func,removeFile:ne.a.func,restoreFile:ne.a.func,rearrangeable:ne.a.bool,displayFullPath:ne.a.bool,hasTranscript:ne.a.bool,isGalleryForm:ne.a.bool,onTranscriptToggle:ne.a.func},oc.defaultProps={swapItem:function(){return null},removeFile:function(){return null},restoreFile:function(){return null},rearrangeable:!0,displayFullPath:!0,hasTranscript:!1,isGalleryForm:!1},lc.propTypes={existingVideos:ne.a.number,addedVideos:ne.a.number,deletedVideos:ne.a.number,totalSize:ne.a.number,totalTranscripts:ne.a.number},lc.defaultProps={existingVideos:0,addedVideos:0,deletedVideos:0,totalSize:0,totalTranscripts:0};var cc=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this.props,n=(e.title,e.subject,e.topic,e.description,e.addedVideos),r=e.deletedVideos,i=(e.onClose,e.onGoBack,e.noExistingVideos,e.totalSize,e.onSubmit,e.fileList),a=e.isEmptyVideo,o=(e.totalTranscripts,n.length,r.length);return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(Zl.a.separator,"mt-3")}),v.a.createElement("div",{className:P()(Zl.a.bodyRow,"pt-4 pb-3")},v.a.createElement("div",{className:Zl.a.reviewVideoRightColumn},a?v.a.createElement("div",{className:"w-100 h-100 d-flex justify-content-center align-items-center u-overflow-hidden"},v.a.createElement("div",{className:P()(Zl.a.circleWrapper,"u-shadow rounded-circle")},v.a.createElement("div",{className:Zl.a.emptyGalleryTitle},t("emptyVideo")),v.a.createElement("img",{height:"86",width:"192",src:I.a.emptyVideoIcon,alt:"cogvid Icon",className:"u-opacity-30"}))):v.a.createElement("div",{className:P()(Zl.a.tableWrapper,"u-shadow h-100")},v.a.createElement("div",{className:Zl.a.itemWrapper},i.map((function(e){var n=e.name,r=e.size,i=e.uid,a=e.lastModified,s=e.lastModifiedDate,l=e.willBeDeleted,c=e.chapters,u=void 0===c?[]:c,d=e.partId,h=e.isExistingVideo,f=e.subtitle,p=e.subItem,m=s||a;return v.a.createElement("div",{className:P()("u-mb-3o4",l&&Zl.a.wrapperBorder),key:i||d},v.a.createElement("div",{className:P()(Zl.a.tableItem,l?[Zl.a.lineThrough,"border-bottom"]:"border"),key:i},v.a.createElement("div",{className:"d-flex align-items-center u-fs-7o8 mr-3"},v.a.createElement("img",{style:{height:45,opacity:.5},src:h?I.a.cogvidIcon:I.a.newVideoIcon,alt:"Video icon"})),v.a.createElement("div",{className:"text-truncate flex-grow-1 mr-3"},n),v.a.createElement("div",{className:"d-flex u-w-11 u-fs-13o16"},v.a.createElement("div",{className:"u-w-7"},Ml()(m).format("MMM Do, YYYY")),v.a.createElement("div",{className:"u-w-4"},x.c.formatFileSize(r)))),l&&u.length>0&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(Zl.a.tableHeader,"bg-white pl-4",o>0&&"text-danger")},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-1x3o4 u-mr-3o4"}),t("willDeleteChapters")),u.map((function(e,t){var n=e.content;return v.a.createElement("div",{className:P()(Zl.a.reviewDeletedChapter,Zl.a.lineThrough),key:d+t},v.a.createElement("div",{className:"text-truncate"},n))}))),(null==f?void 0:f.willBeDeleted)&&!l&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(Zl.a.tableHeader,"bg-white pl-4","text-danger")},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-1x3o4 u-mr-3o4"}),t("willDeleteSubtitle")),v.a.createElement("div",{className:P()(Zl.a.reviewDeletedChapter,Zl.a.lineThrough)},v.a.createElement("div",{className:"text-truncate"},f.name))),(null==p?void 0:p.name)&&h&&!l&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(Zl.a.tableHeader,"bg-white pl-4","text-success")},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-1x3o4 u-mr-3o4"}),t("willAddSubtitle")),v.a.createElement("div",{className:P()(Zl.a.reviewDeletedChapter)},v.a.createElement("div",{className:"text-truncate"},p.name))))})))))))}}]),r}(g.PureComponent);cc.propTypes={title:ne.a.string.isRequired,subject:ne.a.string.isRequired,topic:ne.a.string.isRequired,description:ne.a.string,fileList:ne.a.array.isRequired,addedVideos:ne.a.array,deletedVideos:ne.a.array,onClose:ne.a.func,onGoBack:ne.a.func,noExistingVideos:ne.a.number,totalSize:ne.a.number,isEmptyVideo:ne.a.bool,totalTranscripts:ne.a.number},cc.defaultProps={addedVideos:[],deletedVideos:[],noExistingVideos:0,totalSize:0,onClose:function(){return null},onGoBack:function(){return null},isEmptyVideo:!1,totalTranscripts:0};var uc=r(20);var dc=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"closeButtonRef",v.a.createRef()),G()(V()(e),"state",{title:"",code:"",total:"",isSubmitting:!1}),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"handleChange",(function(t){var n=t.target,r=n.name,i=n.value;"total"===r?(/^\d+$/.test(i)||""===i)&&e.setState(G()({},r,i)):e.setState(G()({},r,i))})),G()(V()(e),"handleSubmitForm",(function(t){var n;t.preventDefault(),t.stopPropagation(),null==t||null===(n=t.target)||void 0===n||n.blur();var r=e.props,i=r.onSubmit,a=r.createCourse,o=r.onClose,s=e.state,l=s.title,c=s.code,u=s.total;e.validator.allValid()?e.setState({isSubmitting:!0},(function(){a({title:l,code:c,total:u},(function(e){i(e),o()}),(function(){e.setState({isSubmitting:!1})}))})):(e.validator.showMessages(),e.forceUpdate())})),e}return c()(n,[{key:"componentDidMount",value:function(){this.closeButtonRef.current&&this.closeButtonRef.current.focus()}},{key:"render",value:function(){var e=this,t=this.props.onClose,n=this.state,r=n.title,i=n.code,a=n.total,o=n.isSubmitting;return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",dialogClassName:Zl.a.addNewCourseDialog,onEscapeKeyDown:t},v.a.createElement(Fl.a.Header,{className:"u-px-2"},v.a.createElement(Fl.a.Title,null,Object(uc.b)("modal.addNewCourse"))),v.a.createElement(Fl.a.Body,{className:Zl.a.addNewCourseModalBody},v.a.createElement("div",{className:"h-100 w-100 d-flex"},v.a.createElement(mu,{labelName:Object(uc.b)("label.code"),name:"code",value:i,placeholder:Object(uc.b)("placeholder.code"),required:!0,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("code")},validatorElement:this.validator.message("code",i,"courseCodeRequired|max:".concat(x.g.COURSE_CODE_MAX_LENGTH)),className:Zl.a.addCourseCode}),v.a.createElement(mu,{labelName:Object(uc.b)("label.title"),name:"title",value:r,placeholder:Object(uc.b)("placeholder.title"),required:!0,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("title")},validatorElement:this.validator.message("title",r,"courseTitleRequired|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),className:Zl.a.addCourseTitle}),v.a.createElement(mu,{labelName:Object(uc.b)("label.total"),name:"total",value:a,placeholder:Object(uc.b)("placeholder.total"),required:!0,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("total")},validatorElement:this.validator.message("total",a,"courseTotalRequired|min:1,num"),className:"ml-3 u-w-8",maxLength:x.g.COURSE_SEQUENCE_MAX_LENGTH}))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button",onClick:t,disabled:o},Object(uc.b)("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:"modal-button ml-4",onClick:this.handleSubmitForm,disabled:o},Object(uc.b)("btn.add"),o&&v.a.createElement(xn.a,{size:"sm",animation:"border",className:"ml-2"}))))}}]),n}(v.a.Component),hc=Object(q.b)(null,(function(e){return{createCourse:function(t,n,r){return e(Q.e.createCourse(t,n,r))}}}))(dc);var fc=x.g.REMINDER_OPTIONS;function pc(e){var t=e.item,n=t.avatar;return v.a.createElement("span",{id:t.uid,className:Zl.a.suggestionItem},v.a.createElement("img",{src:n,className:Zl.a.suggestionAvatar}),v.a.createElement("span",null,t.name))}function mc(e){var t=e.tag,n=(e.removeButtonText,e.onDelete),r=t.name,i=t.avatar;return v.a.createElement("div",{onClick:n,className:Zl.a.tagItem},v.a.createElement("img",{src:i,className:Zl.a.tagAvatar}),v.a.createElement("span",{className:P()(Zl.a.tagLabel,"text-truncate")},r),v.a.createElement("i",{className:"fv fuvi-delete text-danger ml-2"}))}var gc=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"scrollRef",v.a.createRef()),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.handleInputChange,r=e.handleReminderChange,i=e.handleStartDateChange,a=e.handleEndDateChange,o=e.handleStartTimeChange,s=e.handleEndTimeChange,l=e.handleTimeZoneChange,c=e.validator,u=e.title,d=e.meetingDescription,h=e.isEdit,f=void 0!==h&&h,p=e.startDate,m=e.endDate,g=e.startDates,b=e.endDates,y=e.timezone,A=e.reminder,_=e.durationText,w=e.handleRemoveParticipant,E=e.handleSearchPeople,S=e.handleSuggestionSelect,C=e.handleCreateSharingItems,T=e.handleRemoveIncompleteSharingItem,k=e.tags,O=e.suggestions,M=e.participants,D=f?p>new Date?p:new Date:p,N=k.length>0;return v.a.createElement("div",{className:Zl.a.meetingWrap},v.a.createElement("div",{className:Zl.a.meetingLeftWrap},v.a.createElement(mu,{labelName:t("label.eventTitle"),name:"meetingTitle",value:u,placeholder:t("addTitle"),onChange:n,onBlur:function(){return c.showMessageFor("meetingTitle")},validatorElement:c.message("meetingTitle",u,"eventTitleRequired|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),required:!0}),v.a.createElement(mu,{labelName:t("description"),name:"meetingDescription",value:d,onChange:n,onBlur:function(){return c.showMessageFor("meetingDescription")},validatorElement:c.message("meetingDescription",d,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),classNameInput:Zl.a.meetingDescription,as:"textarea",rows:3}),v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",null,v.a.createElement($l.a.Label,{className:[Zl.a.label,"mt-2"]},t("label.startTime"),v.a.createElement("span",null," *")),v.a.createElement("div",{className:"d-flex"},v.a.createElement(Hu,{className:Zl.a.datePicker,classNameWrap:Zl.a.datePickerInput,selected:p,onSelect:i,minDate:new Date,dateFormat:"MMM d, yyyy",openToDate:D}),v.a.createElement(Au,{className:"u-w-5 ml-3",items:g.map((function(e){return{label:Ml()(e).format("HH:mm"),value:e}})),value:Ml()(p).format("HH:mm"),onSelect:function(e,t){var n=t.value;return o(n)},focusOnMount:!1}))),v.a.createElement("div",{className:"flex-fill"}),v.a.createElement("div",null,v.a.createElement($l.a.Label,{className:[Zl.a.label,"mt-2"]},t("label.endTime"),v.a.createElement("span",null," *")),v.a.createElement("div",{className:"d-flex"},v.a.createElement(Hu,{className:Zl.a.datePicker,classNameWrap:Zl.a.datePickerInput,selected:m,onSelect:a,minDate:p,dateFormat:"MMM d, yyyy"}),v.a.createElement(Au,{className:"u-w-5 ml-3",items:b.map((function(e){return{label:Ml()(e).format("HH:mm"),value:e}})),value:Ml()(m).format("HH:mm"),onSelect:function(e,t){var n=t.value;return s(n)},focusOnMount:!1})))),v.a.createElement("div",{className:"u-mb-1"},v.a.createElement("span",{className:Zl.a.label},t("label.duration"),":"),v.a.createElement("span",null," ",_)),v.a.createElement(Wm,{labelName:t("label.timezone"),value:y,onChange:l}),v.a.createElement("div",null,v.a.createElement("div",{className:P()(Zl.a.label,"d-flex align-items-center mt-4")},v.a.createElement("i",{className:"fv fuvi-notification-icon u-mr-1o5"}),t("label.reminder")),v.a.createElement(wu,{name:"reminder",className:"u-w-10",value:A,options:fc,onChange:r}))),v.a.createElement("div",{className:Zl.a.meetingRightWrap},v.a.createElement("div",{className:"d-flex u-fw-500 justify-content-between mt-2"},v.a.createElement("div",null,t("participants"))),v.a.createElement("div",{className:P()("d-flex align-items-start u-mb-1x3o8 mt-1",Zl.a.addParticipantsWrap)},v.a.createElement("div",{className:P()(Zl.a.leftItem,"position-relative participant-tags")},v.a.createElement(sd,{className:P()("w-100",Zl.a.addParticipantInput),placeholderText:"",tags:k,suggestions:O,onInput:E,onFocus:E,onAddition:S,onDelete:T,minQueryLength:0,suggestionComponent:pc,tagComponent:mc,maxSuggestionsLength:10})),v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{role:"button",className:P()(Zl.a.addBtn,!N&&"u-opacity-50 u-pointer-event-none"),onClick:C},v.a.createElement("i",{className:"fv fuvi-user-addlist u-mr-3o8"}),v.a.createElement("div",null,t("btn.add"))))),v.a.createElement("div",{className:Zl.a.separator}),v.a.createElement("div",{className:P()("d-flex u-fw-500",Zl.a.numPartGroup)},v.a.createElement("div",{className:"d-flex align-items-center"},M.length,v.a.createElement("i",{className:"ml-1 fv fuvi-group-avatar"}))),v.a.createElement("div",{className:P()(Zl.a.participantsWrap,"fv-custom-scroll y")},M.map((function(e){var t=e.userId,n=e.firstName,r=e.lastName,i=e.avatar,a=(i=void 0===i?{}:i).image;return v.a.createElement("div",{key:t,className:P()("u-mb-5o8",Zl.a.participant)},v.a.createElement("div",{className:P()(Zl.a.leftItem)},v.a.createElement("div",{className:Zl.a.participantAvatar,style:{backgroundImage:"url(".concat(a||I.a.noAvatar,")")}}),v.a.createElement("div",{className:P()("text-truncate")},"".concat(n," ").concat(r))),v.a.createElement("div",null,!x.c.isCurrentUserId(t)&&v.a.createElement("div",{role:"button",className:P()("",Zl.a.deleteIcon),onClick:function(){return w(t)}},v.a.createElement("i",{className:"fv fuvi-trash-can"}))))})))))}}]),r}(v.a.PureComponent);var vc=x.g.CREATE_COGVID_TYPE,bc=x.g.COURSE_SEQUENCE_MAX_LENGTH,yc=x.g.SUPPORTED_VIDEO_TYPES,Ac=x.g.DEFAULT_COLLECTION_TEXT,_c=x.g.LEARNING_LEVELS,wc=x.g.LEARNING_SUBJECTS,Ec="basic",Sc="description",Cc=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"ErrorMessageElement",(function(e){return e?v.a.createElement("div",{className:"text-danger"},e):null})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.title,i=n.subject,a=n.topic,o=n.author,s=(n.description,n.fileList),l=n.totalVideos,c=n.totalSubtitles,u=n.totalSize,d=n.showConfirmationModal,h=n.uploadType,f=n.isLoadingRawVideos,p=n.isLoadingRawVideosFailed,m=n.existingVideos,g=n.showEditingVideoReview,b=n.isFormValidationPassed,y=n.chapterCount,A=n.inputChapterCount,_=n.createType,w=n.totalTranscripts,E=n.course,S=n.course,C=(S=void 0===S?{}:S).total,O=n.courseSuggestions,M=n.priCourseSuggestions,D=n.showAddNewCourseModal,N=n.courseSequence,L=n.isSubmitting,R=n.meetingTitle,B=n.meetingDescription,j=n.meetingStartDate,F=n.meetingStartDates,U=n.meetingEndDate,H=n.meetingEndDates,z=n.meetingTimezone,V=n.meetingReminder,W=n.meetingDurationText,G=n.primCourseCode,q=n.primCourseSerial,Y=n.customErrors,K=n.showMoreInfo,X=n.addingSharingItems,Q=n.searchingFriendResults,$=n.meetingParticipants,J=n.learningLevel,Z=n.learningSubject,ee=n.keywords,te=n.keywordSuggestions,ne=n.keywordErrorMessage,re=n.isTrustedPublisher,ie=n.activeTab,ae=n.descriptionValid,oe=this.props,se=oe.onClose,le=oe.formTitle,ce=void 0===le?t("ccv"):le,ue=oe.submitBtnText,de=(void 0===ue&&t("btn.create"),oe.isEditVideo),he=oe.isOwner;oe.videoId;this.validator.purgeFields();var fe=this.hasCourse(),pe=[],me=[];de&&(s.forEach((function(e){var t=e.willBeDeleted;e.isExistingVideo?t&&me.push(e):pe.push(e)})),pe=s.filter((function(e){return!e.isExistingVideo})));var ge=_===vc.TEMPLATE&&!de,ve=_===vc.VIDEO&&!de,be=_===vc.MEETING&&!de,ye=s.filter((function(e){return!e.willBeDeleted})).length,Ae=ye>0&&s.length>0||0===ye&&0===s.length,_e=this.isFormDirty(),we=_e&&b&&ae,Ee=de?this.isListchanged()||this.isSubtitlesDeleted():be||Ae&&(ge||s.length>0&&this.isListchanged());be&&(Ee=!!R);var Se=we;return ve&&(Se=Ee&&we),de&&!_e&&Ee&&(Se=Ee),Se=Se&&!p,v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:"createCogvidWrapper",scrollable:!1,centered:!0,backdrop:"static",onEscapeKeyDown:this.handleFormCancel,enforceFocus:!1},L&&v.a.createElement(Nn,null),v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"ml-3 ".concat(Zl.a.formTitle)},ce),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Sl,{activeKey:ie,onSelect:this.handleTabChanged,className:"px-3 fv-tabs user-profile-tabs"},v.a.createElement(kl,{tabClassName:P()(_e&&de&&!b&&"text-danger"),eventKey:Ec,title:t("basicInformation")},v.a.createElement($l.a,{noValidate:!0},v.a.createElement(Fl.a.Body,{className:Zl.a.modalBody},v.a.createElement("div",{className:"w-100 h-100"},v.a.createElement("div",{className:"h-100 autoshow-scrollbar y fv-always-show-tracks fv-custom-scroll"},v.a.createElement("div",{className:"u-pl-1o2 u-pr-1o2"},v.a.createElement("div",{className:"videoInfoWrap"},v.a.createElement(T,{className:P()(Zl.a.videoFormRow,"hide-scrollbar")},v.a.createElement(k.a,{className:Zl.a.videoFormCol},v.a.createElement(mu,{labelName:t("covidFormTitle"),name:"title",value:r,placeholder:t("covidFormTitlePlaceHolder"),required:!0,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("title")},validatorElement:this.validator.message("title",r,"videoTitleRequired|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),classNameInput:"cogvid-input-height"})),v.a.createElement(k.a,{className:P()(Zl.a.videoFormCol,"d-flex align-items-center")},v.a.createElement($l.a.Group,{className:""},v.a.createElement($l.a.Label,{className:[Zl.a.label,"mt-2 d-flex align-items-center"]},v.a.createElement("span",null)),v.a.createElement("div",{className:Zl.a.btnMore,onClick:function(){return e.setState({showMoreInfo:!K})}},t(K?"btn.less":"btn.more")," ",v.a.createElement("i",{className:"fv fv-sm ".concat(K?"fuvi-up-arrow-s":"fuvi-down-arrow-s")}))))),v.a.createElement("div",{className:P()("videoInfoExpand ".concat(K?"":"d-none"),Zl.a.videoInfoExpand)},v.a.createElement(T,{className:Zl.a.videoFormRow},v.a.createElement(k.a,{className:P()(Zl.a.videoFormCol,"")},v.a.createElement(mu,{labelName:t("covidFormSubject"),name:"subject",value:i,placeholder:t("covidFormSubjectPlaceHolder"),onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("subject")},validatorElement:this.validator.message("subject",i,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),classNameInput:"cogvid-input-height"})),v.a.createElement(k.a,{className:P()(Zl.a.videoFormCol,"")},fe&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"d-flex justify-content-between"},v.a.createElement("div",{className:"flex-grow-1",style:{maxWidth:"calc(100% - 8rem)"}},v.a.createElement($l.a.Label,{className:[Zl.a.label,"mt-2 d-flex align-items-center"]},v.a.createElement("span",null,t("label.course"))),v.a.createElement(Au,{inputProps:{ref:this.autoCompleteRef},className:"u-mr-1x1o2",placeholder:t("placeholder.ccvCourse"),classNameInput:"pl-fs-7o8",items:O,value:E,name:"course",onChange:function(t){return e.handleCourseSearch(t.target.value)},onSelect:this.handleCourseSelect,focusOnMount:!1,validatorElement:this.validator.message("course",E,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))||this.ErrorMessageElement(null==Y?void 0:Y.course)})),v.a.createElement(mu,{labelName:"Sequence",name:"sequence",value:"".concat(E!==Ac||de?N:""),readOnly:E===Ac,className:"u-w-8",classNameInput:P()(C&&"u-w-4 flex-grow-0","cogvid-input-height"),classNameError:"ml-0",onChange:this.handleCourseSequenceChange,onBlur:function(){return e.validator.showMessageFor("Course sequence")},maxLength:bc,suffix:C?v.a.createElement(mu,{name:"courseTotal",className:"u-w-4 mb-0 cogvid-input-height",value:" / "+C,readOnly:!0}):null,validatorElement:this.validator.message("Course sequence",N,"max:".concat(C?C-1:99,",num"))||this.ErrorMessageElement(null==Y?void 0:Y.courseSerial)},C?v.a.createElement("div",{className:"mt-1 u-fs-7o8 u-opacity-80"},"(0(M) to ".concat(C-1,")")):null))))),v.a.createElement(T,{className:Zl.a.videoFormRow},v.a.createElement(k.a,{className:P()(Zl.a.videoFormCol,"")},v.a.createElement(mu,{labelName:t("covidFormTopic"),name:"topic",value:a,placeholder:t("covidFormTopicPlaceHolder"),onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("topic")},validatorElement:this.validator.message("topic",a,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),classNameInput:"cogvid-input-height"})),v.a.createElement(k.a,{className:P()(Zl.a.videoFormCol,"")},fe&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"d-flex justify-content-between"},v.a.createElement("div",{className:"flex-grow-1",style:{maxWidth:"calc(100% - 8rem)"}},v.a.createElement($l.a.Label,{className:[Zl.a.label,"mt-2 d-flex align-items-center"]},v.a.createElement("span",null,t("label.primaryCourse"))),v.a.createElement(Au,{inputProps:{ref:this.autoCompleteRefPrimCourse},className:"u-mr-1x1o2",placeholder:t("placeholder.ccvPrimCourse"),classNameInput:"pl-fs-7o8",items:M,value:G,name:"primCourseCode",onChange:function(t){return e.handlePrimaryCourseSearch(t.target.value)},onSelect:this.handlePrimaryCourseSelect,focusOnMount:!1,validatorElement:this.validator.message("Primary course",G,["max:".concat(x.g.TEXT_INPUT_MAX_LENGTH),{primaryCourseCodeRule:E}])||this.ErrorMessageElement(null==Y?void 0:Y.primCourseCode)})),v.a.createElement(mu,{labelName:"Sequence",name:"prim_sequence",value:"".concat(G!==Ac||de?q:""),readOnly:G===Ac,className:"u-w-8",classNameInput:P()(C&&"u-w-4 flex-grow-0","cogvid-input-height"),classNameError:"ml-0",onChange:this.handlePrimaryCourseSequenceChange,onBlur:function(){return e.validator.showMessageFor("Primary course sequence")},maxLength:bc,suffix:C?v.a.createElement(mu,{name:"courseTotal2",className:"u-w-4 mb-0 cogvid-input-height",value:" / "+C,readOnly:!0}):null,validatorElement:this.validator.message("Primary course sequence",q,["max:".concat(C?C-1:99,",num"),{primaryCourseSequenceRule:G}])||this.ErrorMessageElement(null==Y?void 0:Y.primCourseSerial)},C?v.a.createElement("div",{className:"mt-1 u-fs-7o8 u-opacity-80"},"(0(M) to ".concat(C-1,")")):null))))),(!de||he)&&v.a.createElement(T,{className:Zl.a.videoFormRow},v.a.createElement(k.a,{className:P()(Zl.a.videoFormCol,"")},v.a.createElement("div",{className:"d-flex justify-content-between"},v.a.createElement("div",{className:"w-100 mr-4"},v.a.createElement(wu,{labelName:t("covidFormLearningSubject"),name:"learningSubject",value:Z,options:wc,onChange:function(t){return e.handleChange({target:{name:"learningSubject",value:t}})}})),v.a.createElement("div",{className:"w-100"},v.a.createElement(wu,{labelName:t("label.learningLevel"),name:"learningLevel",value:J,options:_c,onChange:function(t){return e.handleChange({target:{name:"learningLevel",value:t}})}})))),v.a.createElement(k.a,{className:P()(Zl.a.videoFormCol,"col-keywords")},v.a.createElement(sd,{placeholderText:t("placeholder.keyword"),labelName:t("label.keyword"),tags:ee,suggestions:te,suggestionsFilter:function(e,t){return!(null==e||null==t||t.length<1)&&e.name.toLowerCase().indexOf(t.toLowerCase().trim())>-1},onInput:function(t){return e.handleSearchKeyword(t)},onFocus:function(t){return e.handleSearchKeyword(t)},onAddition:function(t){e.handleKeywordSelect(t)},onDelete:function(t){return e.handleKeywordDelete(t)},minQueryLength:1,onValidate:function(t){return e.validateKeyword(t)},validatorElement:ne,searchInputClassName:Zl.a.searchInputClassName}))))),v.a.createElement("div",{className:Zl.a.videoChapters},g?v.a.createElement(v.a.Fragment,null,v.a.createElement(cc,{title:r,subject:i,topic:a,meetingDescription:B,author:o,addedVideos:pe,deletedVideos:me,onClose:this.handleFormCancel,onGoBack:function(){e.setState({showEditingVideoReview:!1})},noExistingVideos:m.length,totalSize:u,onSubmit:this.handleFormCheckThenSubmit,fileList:s,isEmptyVideo:0===m.length&&0===pe.length,totalTranscripts:w})):v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()("",be&&"bg-white")},v.a.createElement(k.a,{className:P()("p-0",ve&&Zl.a.listVideoContent)},f?v.a.createElement("div",{className:"d-flex justify-content-center align-items-center h-100"},v.a.createElement(Ln,{className:Zl.a.loadingIcon})):v.a.createElement(v.a.Fragment,null,p?v.a.createElement("div",{className:Zl.a.loadRawVideosFailedWrapper,onClick:this.loadRawVideos},v.a.createElement("div",{className:"text-danger"},t("failedToLoadVideo")),v.a.createElement("div",{className:Zl.a.retry},t("clickHereToRetry"))):v.a.createElement(v.a.Fragment,null,!de&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"u-h-3 d-flex align-items-center flex-shrink-0 border-bottom bg-white u-fs-1x1o8"},v.a.createElement(_u,{id:"addTemplateRadio",labelName:t("btn.defaultChapters"),type:"radio",className:"mr-5",checked:ge,onChange:function(){return e.handleChangeCreateType(vc.TEMPLATE)}}),v.a.createElement(_u,{id:"addVideoRadio",labelName:t("btn.rawVideos"),type:"radio",className:"mr-5",checked:ve,onChange:function(){return e.handleChangeCreateType(vc.VIDEO)}}))),ge&&v.a.createElement("div",{className:Zl.a.defaultTabWrap},v.a.createElement("div",{className:"d-flex align-items-center mt-4 ml-3 justify-content-center"},v.a.createElement("div",null,t("inputChapterCountLabel")),v.a.createElement(RE,{className:"ml-4 px-2 border bg-white u-border-radius-1o4",value:y,onChange:this.handleChapterCountChange,min:1,max:24},v.a.createElement("input",{autoComplete:"off",className:P()(Zl.a.chapterCountInput,"mx-2 border-left border-right"),value:A,onChange:this.handleInputChapterChange,onBlur:this.handleInputChapterBlur}))),v.a.createElement("div",{className:Zl.a.dragAndDropContainer},v.a.createElement("div",{className:P()(Zl.a.circleBg,Zl.a.default)},v.a.createElement("img",{height:"106",width:"121",src:I.a.addTemplateIcon,alt:"add template icon",className:P()(Zl.a.folderIcon,"u-opacity-30")}),v.a.createElement("div",{className:Zl.a.dndTextWrapper},t("chapterCount",{count:y}))))),(de||ve)&&v.a.createElement("div",{className:Zl.a.videoUploadWrap},v.a.createElement(tc,{handleChooseFiles:this.handleChooseFiles,displayUserGuide:s.length>0}),v.a.createElement("div",{className:P()(Zl.a.uploadArea,"position-relative")},v.a.createElement(QT,{receiveAcceptedFiles:this.handleChooseFiles,acceptedFiles:"".concat(yc,",.srt"),wrapperClassName:"w-100 u-mb-5o8",noClick:!0},s.length>0?v.a.createElement(oc,{isEditVideo:de,data:s,swapItem:this.handleItemSwapping,addSubFile:this.handleAddSubtitle,removeFile:this.handleRemoveFile,restoreFile:this.handleRestoreFile,displayFullPath:h===x.g.CCV_UPLOAD_TYPE.FOLDER,onTranscriptToggle:this.handleToggleTranscript,hasTranscript:re}):v.a.createElement(sc,{onlyFiles:!0})))),be&&v.a.createElement(gc,{handleInputChange:this.handleChange,validator:this.validator,title:R,description:B,startDate:j,handleStartDateChange:this.handleMeetingStartDateChange,endDate:U,handleEndDateChange:this.handleMeetingEndDateChange,handleStartTimeChange:this.handleMeetingStartTimeChange,handleEndTimeChange:this.handleMeetingEndTimeChange,handleTimeZoneChange:this.handleMeetingTimeZoneChange,handleReminderChange:this.handleMeetingReminderChange,startDates:F,endDates:H,timezone:z,reminder:V,durationText:W,hasMeetingPrefixVariables:!0,handleRemoveParticipant:this.handleRemoveParticipant,handleSearchPeople:this.handleSearchPeople,handleSuggestionSelect:this.handleSuggestionSelect,handleCreateSharingItems:this.handleCreateSharingItems,handleRemoveIncompleteSharingItem:this.handleRemoveIncompleteSharingItem,tags:X,suggestions:Q,participants:$})))))))))))))),v.a.createElement(Fl.a.Footer,{ref:this.chapterTabFooterRef},v.a.createElement("div",{className:"d-flex w-100"},de?v.a.createElement(lc,{deletedVideos:me.length,addedVideos:pe.length,existingVideos:m.length,totalSize:u,totalTranscripts:w}):ve&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"d-flex align-self-start ml-2"},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-1x1o4"})),v.a.createElement("div",{className:"u-fs-7o8 ml-2"},v.a.createElement("div",{className:"u-opacity-60"},"".concat(l," video").concat(l>1?"s":"",", ").concat(c," subtitle").concat(c>1?"s":"")),v.a.createElement("div",{className:"u-opacity-90",style:{fontWeight:600}},t("total")," (",x.c.formatFileSize(u),")"))),v.a.createElement("div",{className:"flex-fill"}),g?v.a.createElement(v.a.Fragment,null,v.a.createElement(et.a,{variant:"outline-primary",className:P()(Zl.a.footerBtn,"modal-button"),onClick:function(){e.setState({showEditingVideoReview:!1})}},t("btn.back")),v.a.createElement(et.a,{variant:"primary",className:P()("text-white modal-button ml-4",Zl.a.footerBtn),onClick:function(t){e.handleFormCheckThenSubmit(t)}},t("btn.update"))):v.a.createElement(v.a.Fragment,null,v.a.createElement(et.a,{variant:"outline-primary",className:P()(Zl.a.footerBtn,"modal-button"),onClick:function(t){e.handleFormCancel(t)}},t("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:P()("text-white modal-button ml-4",Zl.a.footerBtn,!Se&&"u-pointer-event-none u-opacity-50"),onClick:function(t){de&&(e.isListchanged()||e.isSubtitlesDeleted())?e.verifyAndShowEditingVideoReview():e.handleFormCheckThenSubmit(t)}},de?Ee?t("btn.next"):t("btn.save"):t("btn.create")))))),v.a.createElement(IC,{show:!!d,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:se,onClose:function(){return e.setState({showConfirmationModal:!1})}}),D&&v.a.createElement(hc,{onSubmit:this.handleCreateCourseSuccess,onClose:function(){return e.setState({showAddNewCourseModal:!1})}}))}}]),r}(g.PureComponent),Tc=r(43),kc=r.n(Tc);function xc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xc(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ic=x.g.COGVID_STATUS,Mc=x.g.CREATE_COGVID_TYPE,Pc=x.g.VIDEO_MENU_CATEGORY,Dc=x.g.MAX_COURSE_SEQUENCE,Nc=x.g.REMINDER_OPTIONS,Lc=x.g.DEFAULT_MEETING_DURATION,Rc=x.g.DEFAULT_COLLECTION_TEXT,Bc=(x.g.CREATE_COGVID_CONSTRAINTS.KEYWORD_LENGTH_LIMIT,x.g.DEFAULT_LEARNING_LEVEL),jc=x.g.DEFAULT_LEARNING_SUBJECT_EDIT,Fc=x.g.KEYWORD_CATEGORIES,Uc=x.g.DESCRIPTION_INPUT_MAX_LENGTH,Hc=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(e){var r;s()(this,n),r=t.call(this,e),G()(V()(r),"handleSearchKeyword",Object(Y.debounce)((function(e){var t=r.props.searchKeyword;void 0===e||e.length<1||r.validateKeyword({name:e})&&t({category:Fc.VIDEO_KEYWORD,terms:e},(function(t){var n=t.content,i=r.state.keywords;e=e.toLowerCase().trim();var a=n.filter((function(e){return!Object(Y.find)(i,(function(t){return t.name.toLowerCase()===e.name.toLowerCase()}))}));0==a.length?a.push({id:e,name:e,isAddNew:!0}):(a=a.filter((function(t){return t.name.toLowerCase().indexOf(e)>-1})).sort((function(t,n){var r=t.name.toLowerCase(),i=n.name.toLowerCase();if(r===i)return 0;var a=r.indexOf(e),o=i.indexOf(e);return a==o?r.localeCompare(i):a-o})),-1==n.findIndex((function(t){return t.name.toLowerCase()===e}))&&a.push({id:e,name:e,isAddNew:!0}));a.length>10&&(a=[].concat(Rl()(a.slice(0,9)),[a[a.length-1]])),r.setState({keywordSuggestions:a})}))}),500)),G()(V()(r),"handleKeywordSelect",(function(e){var t=r.state.keywords;e&&e.isAddNew?(0,r.props.createVideoKeyword)({category:Fc.VIDEO_KEYWORD,names:[e.name]},(function(){r.setState({keywordSuggestions:[],keywords:[].concat(Rl()(t),[e])})})):r.setState({keywordSuggestions:[],keywords:[].concat(Rl()(t),[e])})})),G()(V()(r),"handleKeywordDelete",(function(e){var t=r.state.keywords;t.splice(e,1),r.setState({keywords:t},(function(){return r.forceUpdate()}))})),G()(V()(r),"loadRawVideos",Object(Y.debounce)((function(){var e=r.props,t=e.getRawVideos,n=e.videoId;n&&t({videoId:n},(function(e){var t=0,n=e.map((function(e){return e.isExistingVideo=!0,e.type="video",e.uid=e.partId,e.size=e.contentLength,t+=e.contentLength,e.didTranscript=e.transcriptEnabled,e.transcriptEnabled=!1,e}));r.originalRawVideos=Rl()(n),r.setState({isLoadingRawVideos:!1,fileList:n,existingVideos:n,totalSize:t})}),(function(){r.setState({isLoadingRawVideos:!1,isLoadingRawVideosFailed:!0})}))}),300)),G()(V()(r),"handleChange",(function(e){var t=e.target,n=t.name,i=t.value;r.setState(G()({},n,i),(function(){return r.showValidationErrors(n)}))})),G()(V()(r),"handleDescriptionChange",(function(e){r.setState({description:e},(function(){return r.showValidationErrors("description")}))})),G()(V()(r),"handleChangeCreateType",(function(e){r.setState({createType:e},(function(){var e=r.validator.allValid(),t=r.primaryCourseValidate();r.setState({isFormValidationPassed:e&&t})}))})),G()(V()(r),"handleToggleTranscript",(function(e){for(var t=r.state.fileList,n=Rl()(t),i=r.state.totalTranscripts,a=0;a<n.length;a++){var o=n[a];if(o.uid===e){o.transcriptEnabled?(o.transcriptEnabled=!1,i--):(o.transcriptEnabled=!0,i++);break}}r.setState({fileList:n,totalTranscripts:i})})),G()(V()(r),"groupItems",(function(e){var t=e.filter((function(e){return x.c.isVideoFile(e)})),n=0,r=0,i=[];return e.forEach((function(e){var a=e.path;x.c.isVideoFile(e)||(t.some((function(t){var i=t.path,o=void 0===i?"":i,s=o.replace(/\.[^/.]+$/,""),l=a.replace(/\.[^/.]+$/,"");if(""===Object(Y.get)(t,"subItem.name","")&&([s,o].includes(a)||[s,o].includes(l)))return t.subItem=e,t.transcriptEnabled=!1,r+=e.size,n++,!0}))||i.push('Subtitle file "'.concat(e.path,"\" doesn't match with any newly created video.")))})),{videoFiles:t,subtitleCount:n,subtitleSize:r,errors:i}})),G()(V()(r),"handleChooseFiles",(function(e){var t=r.state,n=t.fileList,i=t.uploadType,a=t.totalSubtitles,o=x.g.CCV_UPLOAD_TYPE,s=Object(Y.sortBy)(e,(function(e){return e.path})),l=r.state,c=l.totalVideos,u=l.totalSize,d=[];if(s.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),x.c.isVideoFile(e)&&(c++,u+=e.size),d.push(e)})),d.length<1)x.e.warn("We are currently supporting video and .srt files only.");else{var h="";if(h=s[0].path.split("/")[1]?o.FOLDER:o.FILES,""===i||i!==o.FOLDER&&h!==o.FOLDER){var f=r.groupItems([].concat(Rl()(n),d)),p=f.videoFiles,m=f.subtitleCount,g=f.subtitleSize;f.errors.forEach((function(e){x.e.warn(e,!1)})),0!==p.length&&r.setState((function(e){return{fileList:p,totalVideos:c,totalSize:u+g,totalSubtitles:a+m,uploadType:""===i?h:e.uploadType}}))}else x.e.warn("Cannot select more than one folder.")}})),G()(V()(r),"handleAddSubtitle",(function(e,t){var n=r.state,i=n.fileList,a=n.totalSubtitles,o=n.totalSize;t.uid="".concat(Date.now(),"i=0"),i.some((function(n){var r=n.partId;if(r===e)return n.subItem=t,n.subItem.videoPartId=r,n.transcriptEnabled=!1,o+=t.size,a++,!0})),r.setState({fileList:i,totalSize:o,totalSubtitles:a})})),G()(V()(r),"handleItemSwapping",(function(e,t){var n=r.state.fileList,i=n[e],a=Kl()(n,{$splice:[[e,1],[t,0,i]]});r.setState({fileList:a})})),G()(V()(r),"handleAddition",(function(e){var t=e;Object(Y.isEmpty)(t)||(t[t.length-1]=t[t.length-1].toLowerCase().replace(/\s+/g," ").trim()),r.setState({keywords:t})})),G()(V()(r),"validateKeyword",(function(e){var t=e.name,n=r.state.keywords,i=t?t.replace(/\s+/g," ").trim():"";return 0===i.length?(r.setState({keywordErrorMessage:"Blank keyword is not allowed"}),!1):t.length>x.g.CREATE_COGVID_CONSTRAINTS.KEYWORD_LENGTH_LIMIT?(r.setState({keywordErrorMessage:"Keyword length should be within ".concat(x.g.CREATE_COGVID_CONSTRAINTS.KEYWORD_LENGTH_LIMIT," characters")}),!1):Object(Y.find)(n,(function(e){return e.name.toLowerCase()===i.toLowerCase()}))?(r.setState({keywordErrorMessage:"Duplicated keywords are not allowed"}),!1):(r.setState({keywordErrorMessage:""}),!0)})),G()(V()(r),"handleRestoreFile",(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"video",n=r.state,i=n.fileList,a=n.existingVideos,o=Rl()(i),s=r.state,l=s.totalVideos,c=s.totalSubtitles,u=s.totalSize,d=0;d<o.length;d++){var h=o[d];if("video"===t&&h.uid===e){h.willBeDeleted=!1,l++,u+=h.size,a.push(h);break}if("subtitle"===t&&h.uid===e&&h.subtitle){h.subtitle.willBeDeleted=!1,c++;break}}r.setState({fileList:o,totalVideos:l,totalSubtitles:c,totalSize:u,existingVideos:a})})),G()(V()(r),"handleRemoveFile",(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"video",n=r.state,i=n.fileList,a=n.uploadType,o=Rl()(i),s=r.state,l=s.totalVideos,c=s.totalSubtitles,u=s.totalSize,d=s.existingVideos,h=0;h<o.length;h++){var f=o[h];if("video"===t&&f.uid===e){if(f.subItem&&(c--,u-=f.subItem.size,delete f.subItem),f.isExistingVideo){f.willBeDeleted=!0;for(var p=0;p<d.length;p++){var m=d[p];m.uid===e&&d.splice(p,1)}}else o.splice(h,1);l--,u-=f.size;break}if("subtitle"===t){if(f.uid===e&&f.subtitle){f.subtitle.willBeDeleted=!0,c--;break}if(f.subItem&&f.subItem.uid===e){c--,u-=f.subItem.size,delete f.subItem;break}}}r.setState({fileList:r.groupItems(o).videoFiles,totalVideos:l,totalSubtitles:c,totalSize:u,uploadType:o.length>d.length?a:"",existingVideos:d})})),G()(V()(r),"prepareUploadFilesData",(function(e){var t=0,n=[];return e.forEach((function(e){e.metadata={filename:e.path,uploadSeqNumber:t,seqNumber:t++,transcriptEnabled:!!e.transcriptEnabled},n.push(e),e.subItem&&(e.subItem.metadata={filename:e.subItem.path||e.subItem.name,videoSeqNumber:e.metadata.seqNumber,uploadSeqNumber:t,seqNumber:t++,videoPartId:e.subItem.videoPartId||""},n.push(e.subItem),delete e.subItem)})),n})),G()(V()(r),"validateUploadFiles",(function(){var e=r.state.fileList,t=r.props.isEditVideo;return!(0===e.length&&!t)||(x.e.error("Please add at least one video from your device."),!1)})),G()(V()(r),"verifyAndShowEditingVideoReview",(function(){r.validator.allValid()?r.setState((function(e){return{showEditingVideoReview:!e.showEditingVideoReview}})):(r.validator.showMessages(),r.forceUpdate())})),G()(V()(r),"primaryCourseValidate",(function(){var e=r.state,t=e.course,n=e.courseSequence,i=e.primCourseCode,a=e.primCourseSerial,o=null;return!o&&t&&t!==Rc&&""===n&&(o={courseSerial:Object(_t.t)("message.courseSerialRequired")}),!o&&t&&t===i&&(o={primCourseCode:Object(_t.t)("message.primaryCourseCodeCannotSameAsCourseCode")}),!o&&t&&n>0&&i&&(o={primCourseCode:Object(_t.t)("message.primaryCourseNotBeSet")}),!o&&i&&i!==Rc&&""===a&&(o={primCourseSerial:Object(_t.t)("message.primaryCourseSerialRequired")}),!o&&i&&0==a&&t&&(o={course:Object(_t.t)("message.courseMustNotBeSet")}),!o&&i&&a>0&&t===Rc&&(o={course:Object(_t.t)("message.courseCannotSameAsDefaultCourse")}),r.setState({customErrors:o||{}}),!o})),G()(V()(r),"customValidateField",(function(e){var t=r.state,n=t.course,i=t.courseSequence,a=t.primCourseCode,o=t.primCourseSerial,s=null;switch(e){case"course":a&&0==o&&n&&(s={course:Object(_t.t)("message.courseMustNotBeSet")}),!s&&a&&o>0&&n===Rc&&(s={course:Object(_t.t)("message.courseCannotSameAsDefaultCourse")});break;case"courseSequence":break;case"primCourseCode":!s&&n&&i>0&&a&&(s={primCourseCode:Object(_t.t)("message.primaryCourseNotBeSet")});break;case"primCourseSerial":!s&&a&&""==o&&(s={primCourseSerial:Object(_t.t)("message.primaryCourseSerialRequired")});break;default:!0}return s?r.setState({customErrors:s}):r.setState({customErrors:{}}),r.forceUpdate(),!s})),G()(V()(r),"getTagsDataForApi",(function(e){return Object(Y.cloneDeep)(e).map((function(e){e.isAddNew,e.id;var t=e.name;Yt()(e,["isAddNew","id","name"]);return t.toLowerCase()}))})),G()(V()(r),"handleFormCheckThenSubmit",(function(e){e.preventDefault(),e.stopPropagation();var t=r.props,n=t.isEditVideo,i=t.onClose,a=r.state,o=a.description,s=a.descriptionValid,l=r.isFormDirty(!1)||r.isListchanged()||r.isSubtitlesDeleted();if(n&&o!==r.originalDescription){if(!s)return void r.setState({activeTab:Sc});r.handleDescriptionUpdate((function(){l?r.handleBasicFormCheckThenSubmit():i()}))}else l&&r.handleBasicFormCheckThenSubmit()})),G()(V()(r),"handleBasicFormCheckThenSubmit",(function(e){var t=r.props,n=t.videoId,i=t.isEditVideo,a=t.findMasters,o=r.state,s=o.courses,l=o.createType,c=o.course,u=o.courseSequence,d=o.primCourseCode,h=o.primCourseSerial,f=o.activeTab,p=r.hasCourse();if((i||l===Mc.MEETING)&&(!r.validator.allValid()||p&&!r.primaryCourseValidate()))return r.validator.showMessages(),r.forceUpdate(),void(f===Sc&&r.setState({activeTab:Ec}));if(c&&0==u||d&&0==h){var m=!c,g=Object(Y.find)(s,{code:m?d:c});if(g&&p)return void r.setState({isSubmitting:!0},(function(){a({courseId:g.uid,isPrimaryCourse:m},(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.length>0&&!e.includes(n);if(t){var i=G()({},m?"primCourseSerial":"courseSerial",Object(_t.t)("validation.existingMasterSequence"));r.setState({isSubmitting:!1,customErrors:i})}else r.handleFormSubmit()}),(function(){r.setState({isSubmitting:!1})}))}))}r.handleFormSubmit()})),G()(V()(r),"handleFormSubmit",(function(){var e=r.state,t=e.createType,n=e.description,i=e.title,a=e.subject,o=e.topic,s=e.fileList,l=e.totalSubtitles,c=e.totalVideos,u=e.transcriptEnabled,d=e.chapterCount,h=e.menuCategory,f=e.course,p=e.courseSequence,m=e.primCourseCode,g=e.primCourseSerial,v=e.meetingTitle,b=e.meetingStartDate,y=e.meetingEndDate,A=e.meetingTimezone,_=e.meetingReminder,w=e.meetingDescription,E=e.meetingParticipants,S=e.keywords,C=e.learningLevel,T=e.learningSubject,k=r.props,O=k.isEditVideo,I=k.onClose,M=k.videoId,P=k.userScaffId,D=k.ownerScaffId,N=k.updateCogvidItem,L=k.createCognitiveVideo,R=k.editCognitiveVideo,B=k.createCogvidWithChapterTemplate,j=k.editCogvidInfo,F=k.title,U=k.isDummyDailyVideo,H=k.createDailyVideo,z=k.createdDate,V=k.getCg,W=k.createMeetingVideo,G=k.addNewCogvidItem,q=k.refreshCogvidItem,K=r.getTagsDataForApi(S),X=r.hasCourse();if(O||t!==Mc.TEMPLATE)if(O||t!==Mc.MEETING){var Q=O||U?R:L;if(r.validateUploadFiles()){var $,J,Z,ee,te=r.prepareUploadFilesData(s);if(O){$=[],J=[],Z=[],ee=[];var ne=0,re=0;te.forEach((function(e){var t=e.isExistingVideo,n=e.partId,r=e.willBeDeleted,i=e.transcriptEnabled,a=void 0!==i&&i,o=e.subtitle,s=(o=void 0===o?{}:o).willBeDeleted;r?J.push({partId:n}):t?($.push({partId:n,seqNumber:ne++,transcriptEnabled:a}),s&&ee.push(n)):(e.seqNumber=ne++,e.uploadSeqNumber=re++,Z.push(e))})),te=Z;var ie=r.checkIfFilesOrChaptersChanged().isFileListChanged;if(Object(Y.isEmpty)(J)&&0===Z.length&&!ie){var ae=U?H:j;return void r.setState({isSubmitting:!0},(function(){ae({title:i,subject:a,topic:o,videoId:M,courseCode:f||void 0,courseSerial:X&&f?p:void 0,createdDate:z,primCourseCode:m||void 0,primCourseSerial:m?g:void 0,keywords:K&&0!==K.length?K:void 0,learningLevel:C,learningSubject:T,deletedSubtitles:ee,userScaffId:P},(function(){var e,t;U||r.updateVideoInfoAfterEditVideo({videoId:M,title:i,subject:a,topic:o,keywords:K&&0!==K.length?K:void 0,learningLevel:C,learningSubject:T,course:""===f?{uid:-1,serial:p,code:f}:{uid:null===(e=r.props.course)||void 0===e?void 0:e.uid,code:f,serial:p},primCourse:""===m?{uid:-1,serial:g,code:m}:{uid:null===(t=r.props.primCourse)||void 0===t?void 0:t.uid,code:m,serial:g}});x.e.success(Object(_t.t)("message.updatedVideoSuccessfully",{name:F})),ee.length>0&&q({title:i,videoId:M,userScaffId:P}),I()}),(function(){r.setState({isSubmitting:!1})}))}))}}r.setState({isSubmitting:!0},(function(){Q({files:te,title:i,subject:a,topic:o,totalSubtitles:l,totalVideos:c,transcriptEnabled:u,videoId:M,userScaffId:P,existingParts:$,deletedParts:J,deletedSubtitles:ee,category:h,courseCode:f||void 0,courseSerial:X&&f?p:void 0,isDummyDailyVideo:U,createdDate:z,primCourseCode:m||void 0,primCourseSerial:m?g:void 0,keywords:K&&0!==K.length?K:void 0,learningLevel:C,learningSubject:T},(function(e,t){var n,s;M&&(x.c.handleDisplayDataForRetranscodingVideo({videoId:M}),r.updateVideoInfoAfterEditVideo({videoId:M,title:i,subject:a,topic:o,keywords:K,learningLevel:C,learningSubject:T,course:""===f?{uid:-1,serial:p}:{uid:null===(n=r.props.course)||void 0===n?void 0:n.uid,code:f,serial:p},primCourse:""===m?{uid:-1,serial:g,code:m}:{uid:null===(s=r.props.primCourse)||void 0===s?void 0:s.uid,code:m,serial:g}}),V({videoId:M,ownerScaffId:P||D}));x.e[t](e),I()}),(function(e,t){x.e[t](e),M&&N({videoId:M,data:{cognitiveVideo:{status:Ic.FAILED}}}),r.setState({isSubmitting:!1})}))}))}}else r.setState({isSubmitting:!0},(function(){var e=E&&E.length?E.map((function(e){return e.userId})):[x.c.getCurrentUserId()];W({videoData:{title:i,subject:a,topic:o,category:h,courseCode:f||void 0,courseSerial:X&&f?p:void 0,primCourseCode:m||void 0,primCourseSerial:m?g:void 0,keywords:K&&0!==K.length?K:void 0,learningLevel:C,learningSubject:T},meetingData:{content:v,startTime:b.getTime()-6e4*b.getTimezoneOffset(),endTime:y.getTime()-6e4*y.getTimezoneOffset(),timezone:A,reminderTime:_,description:w,participantIds:e||[]}},(function(e){G&&G(e),x.e.success(Object(_t.t)("message.createdVideoSuccessfully",{name:i})),I()}),(function(){r.setState({isSubmitting:!1})}))}));else{var oe=new Array(d).fill(void 0).map((function(e,t){return{content:"Chapter ".concat(t+1),description:""}}));r.setState({isSubmitting:!0},(function(){B({title:i,subject:a,topic:o,description:n,chapters:oe,category:h,courseCode:f||void 0,courseSerial:X&&f?p:void 0,primCourseCode:m||void 0,primCourseSerial:m?g:void 0,keywords:K&&0!==K.length?K:void 0,learningLevel:C,learningSubject:T},(function(e){G&&G(e),x.e.success(Object(_t.t)("message.createdVideoSuccessfully",{name:i})),I()}),(function(){r.setState({isSubmitting:!1})}))}))}})),G()(V()(r),"updateVideoInfoAfterEditVideo",(function(e){var t=e.videoId,n=e.title,i=e.subject,a=e.topic,o=e.description,s=e.keywords,l=e.learningLevel,c=e.learningSubject,u=e.course,d=e.primCourse,h=e.updateCogvidItemFlag,f=void 0===h||h,p=r.props,m=p.currentActiveVideoId,g=p.updateCogvidItem,v=p.updateCogvidDetails,b=p.updateVideoPreviewData;f&&g({videoId:t,data:{cognitiveVideo:{title:n,subject:i,topic:a,description:o,course:u,primCourse:d,keywords:s,learningLevel:l,learningSubject:c}}}),m===t&&v({cognitiveVideo:{title:n,subject:i,topic:a,description:o,course:u,primCourse:d,keywords:s,learningLevel:l,learningSubject:c}}),b({hideVideoDescription:!1})})),G()(V()(r),"handleFormCancel",(function(e){e.stopPropagation();var t=r.props.onClose;r.isFormDirty()||r.isListchanged()?r.setState({showConfirmationModal:!0}):t&&t()})),G()(V()(r),"checkIfFilesOrChaptersChanged",(function(){var e=r.state,t=e.fileList,n=e.chapterCount,i=e.createType,a=r.props.isEditVideo,o=!1,s=!1;if(a){if(t.some((function(e){var t=e.isExistingVideo,n=e.willBeDeleted,r=e.transcriptEnabled,i=e.subItem;return t?n||r||(null==i?void 0:i.uid)?(s=!0,!0):void 0:(s=!0,!0)})),!s){var l=t.filter((function(e){var t=e.willBeDeleted,n=e.isExistingVideo;return!t&&n}));s=!Object(Y.isEqual)(r.originalRawVideos,l)}}else s=i===Mc.VIDEO&&t.length>0,o=i===Mc.TEMPLATE&&3!==n;return{isFileListChanged:s,isChapterCountChanged:o}})),G()(V()(r),"isListchanged",(function(){var e=r.checkIfFilesOrChaptersChanged(),t=e.isFileListChanged,n=e.isChapterCountChanged;return t||n})),G()(V()(r),"isSubtitlesDeleted",(function(){return r.state.fileList.some((function(e){var t=e.isExistingVideo,n=e.subtitle;if(t&&(null==n?void 0:n.willBeDeleted))return!0}))})),G()(V()(r),"isFormDirty",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=r.state,n=t.description,i=t.title,a=t.subject,o=t.topic,s=t.totalTranscripts,l=t.course,c=t.courseSequence,u=t.primCourseCode,d=t.primCourseSerial,h=t.keywords,f=t.learningLevel,p=t.learningSubject,m=r.props,g=m.title,v=void 0===g?"":g,b=m.subject,y=void 0===b?"":b,A=m.topic,_=void 0===A?"":A,w=m.course,E=void 0===w?{}:w,S=m.primCourse,C=void 0===S?{}:S,T=m.keywords,k=void 0===T?[]:T,x=r.props.learningLevel||Bc,O=r.props.learningSubject||jc,I=[];k.flatMap((function(e){I.push(e)}));var M=h.map((function(e){return e.name})),P=n!=r.originalDescription;return i!==v||a!==y||o!=_||l!==Object(Y.get)(E,"code","")||s>0||c!==Object(Y.get)(E,"serial","")||u!==Object(Y.get)(C,"code","")||d!==Object(Y.get)(C,"serial","")||f!==x||p!==O||!Object(Y.isEqual)(M,I)||!!e&&P})),G()(V()(r),"handleChapterCountChange",(function(e){r.setState({chapterCount:e,inputChapterCount:e})})),G()(V()(r),"handleInputChapterChange",(function(e){var t=e.target,n=""===t.value?"":Number(t.value);r.setState((function(e){return{inputChapterCount:Number.isNaN(n)?e.inputChapterCount:n}}))})),G()(V()(r),"handleInputChapterBlur",(function(){var e=r.state,t=e.inputChapterCount,n=e.chapterCount;if(t!==n)if(""===t)r.setState({inputChapterCount:n});else{var i=t>24?24:t<1?1:t;r.setState({chapterCount:i,inputChapterCount:i})}})),G()(V()(r),"handleCourseSearch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=r.state.courses,n=t.flatMap((function(t){var n=t.code;return n.toLowerCase().includes(e.toLowerCase())?[Oc(Oc({},t),{},{label:n,name:n,score:e.length/n.length})]:[]}));r.setState({courseSuggestions:Object(Y.sortBy)(n,["score"]).reverse().slice(0,5),course:e},(function(){r.showValidationErrors("course")}))})),G()(V()(r),"handlePrimaryCourseSearch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=r.state,n=t.courses,i=(t.primCourseSerial,n.flatMap((function(t){var n=t.code;return n.toLowerCase().includes(e.toLowerCase())?[Oc(Oc({},t),{},{label:n,name:n,score:e.length/n.length})]:[]})));r.setState({priCourseSuggestions:Object(Y.sortBy)(i,["score"]).reverse().slice(0,5),primCourseCode:e},(function(){r.showValidationErrors("Primary course")}))})),G()(V()(r),"handleCourseDelete",(function(){r.setState({course:{},courseSequence:""})})),G()(V()(r),"handleCourseSelect",(function(e){r.setState({course:e,courseSuggestions:[]},(function(){""===r.state.courseSequence&&r.setDefaultCourseSequence(!1),r.showValidationErrors("course")}))})),G()(V()(r),"handlePrimaryCourseSelect",(function(e){r.setState({primCourseCode:e,priCourseSuggestions:[]},(function(){""===r.state.primCourseSerial&&r.setDefaultPrimaryCourseSequence(!1),r.showValidationErrors("Primary course")}))})),G()(V()(r),"handleCreateCourseSuccess",(function(e){var t=r.state.courses,n="".concat(e.code," - ").concat(e.title);r.setState({course:Oc(Oc({},e),{},{label:n,name:n}),courses:[e].concat(Rl()(t)),courseSequence:0})})),G()(V()(r),"getSuggestedSequenceFromCourseList",(function(){var e=r.state,t=e.course,n=e.courses,i="",a=Object(Y.find)(n,(function(e){return e.code===t}));return(null==a?void 0:a.lastSerial)&&(i=a.lastSerial+1),i})),G()(V()(r),"getSuggestedSequenceFromCourseListByCode",(function(e){var t=r.state.courses,n="",i=Object(Y.find)(t,(function(t){return t.code===e}));return(null==i?void 0:i.lastSerial)&&(n=i.lastSerial+1),n})),G()(V()(r),"setDefaultCourseSequence",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=r.props.course,n=void 0===t?{}:t,i=r.state.course,a=r.state.courseSequence;n.code===i?(void 0!==i.serial&&i.serial,a=void 0===n.serial?"":n.serial,e||""!==a||(a=r.getSuggestedSequenceFromCourseList())):i&&(a=r.getSuggestedSequenceFromCourseList()),r.setState({courseSequence:a>Dc?Dc:a})})),G()(V()(r),"setDefaultPrimaryCourseSequence",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=r.props.primCourse,n=void 0===t?{}:t,i=r.state.primCourseCode,a=r.state.primCourseSerial;n.code===i?(a=void 0===n.serial?"":n.serial,e||""!==a||(a=r.getSuggestedSequenceFromCourseListByCode(i))):i&&(a=r.getSuggestedSequenceFromCourseListByCode(i)),r.setState({primCourseSerial:a>Dc?Dc:a})})),G()(V()(r),"showValidationErrors",(function(e){var t=r.state,n=t.isFormValidationPassed,i=t.description,a=void 0===i?"":i,o=r.validator.allValid(),s=r.primaryCourseValidate(),l=r.hasCourse()?o&&s:o,c=a.length<=Uc;r.setState({descriptionValid:c}),n!==l&&r.setState({isFormValidationPassed:l}),l||(r.validator.showMessageFor(e),r.forceUpdate())})),G()(V()(r),"handleCourseSequenceChange",(function(e){e.stopPropagation();var t=e.target.value;(/^\d+$/.test(t)||""===t)&&r.setState({courseSequence:t},(function(){r.showValidationErrors("Course sequence")}))})),G()(V()(r),"handlePrimaryCourseSequenceChange",(function(e){e.stopPropagation();var t=e.target.value;(/^\d+$/.test(t)||""===t)&&r.setState({primCourseSerial:t},(function(){r.showValidationErrors("Primary course sequence")}))})),G()(V()(r),"hasCourse",(function(){return Object(Y.get)(r.props,"hasCourse",!0)})),G()(V()(r),"initMeetingStartEndDates",(function(){var e=r.props.isEdit,t=r.state,n=t.meetingStartDate,i=t.meetingEndDate,a=t.meetingDuration,o=t.meetingTitle,s=t.meetingReminder,l=t.meetingTimezone,c=t.meetingDescription,u=e,d=[],h=[],f=new Date;f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0);var p=new Date;for(p.setHours(23),p.setMinutes(59);f<p;)f>new Date&&(u||(n=f,i=Ml()(n).add(a,"m").toDate(),u=!0),d.push(f),n&&f>=n&&h.push(f)),f=Ml()(f).add(15,"m").toDate();r.initialStates={meetingStartDate:n,meetingEndDate:i,meetingTitle:o,meetingReminder:s,meetingTimezone:l,meetingDescription:c},r.setState({meetingStartDates:d,meetingStartDate:n,meetingEndDates:h,meetingEndDate:i})})),G()(V()(r),"updateMeetingEndDates",(function(){var e=r.state,t=e.meetingDuration,n=e.meetingStartDate,i=Ml()(n).add(t,"m").toDate(),a=new Date(i);a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0);var o=new Date(i);o.setHours(23),o.setMinutes(59);for(var s=[];a<o;)a>=n&&s.push(a),a=Ml()(a).add(15,"m").toDate();r.setState({meetingEndDates:s,meetingEndDate:i})})),G()(V()(r),"handleMeetingStartDateChange",(function(e){var t=r.state.meetingStartDate,n=new Date(e);n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(0),n.setMilliseconds(0),n<new Date&&(n=new Date);var i=new Date(e);i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0);var a=new Date(e);a.setHours(23),a.setMinutes(59);for(var o=[];i<a;)i>=new Date&&o.push(i),i=Ml()(i).add(15,"m").toDate();r.setState({meetingStartDates:o,meetingStartDate:n},r.updateMeetingEndDates)})),G()(V()(r),"handleMeetingEndDateChange",(function(e){var t=r.state,n=t.meetingEndDate,i=t.meetingStartDate,a=new Date(e);a.setHours(n.getHours()),a.setMinutes(n.getMinutes()),a.setSeconds(0),a.setMilliseconds(0);var o=Math.round((a.getTime()-i.getTime())/6e4),s=new Date(e);s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0);var l=new Date(e);l.setHours(23),l.setMinutes(59);for(var c=[];s<l;)s>=i&&c.push(s),s=Ml()(s).add(15,"m").toDate();r.setState({meetingEndDates:c,meetingEndDate:a>i?a:i,meetingDuration:o,meetingDurationText:x.c.getReadableTimeDuration(o)})})),G()(V()(r),"handleMeetingStartTimeChange",(function(e){r.setState({meetingStartDate:e},r.updateMeetingEndDates)})),G()(V()(r),"handleMeetingEndTimeChange",(function(e){var t=r.state.meetingStartDate,n=Math.round((e.getTime()-t.getTime())/6e4);r.setState({meetingEndDate:e,meetingDuration:n,meetingDurationText:x.c.getReadableTimeDuration(n)})})),G()(V()(r),"handleMeetingTimeZoneChange",(function(e){r.setState({meetingTimezone:e.value})})),G()(V()(r),"handleMeetingReminderChange",(function(e){r.setState({meetingReminder:e})})),G()(V()(r),"scrollToBottomSelectedList",(function(){var e=document.querySelector(".participant-tags .react-tags__selected");e&&e.scrollIntoView(!1)})),G()(V()(r),"handleSuggestionSelect",(function(e){var t=r.state.addingSharingItems;t.push(e),r.setState({addingSharingItems:Object(Y.cloneDeep)(t),searchingFriendResults:[]},(function(){r.handleSearchPeople()}))})),G()(V()(r),"handleRemoveIncompleteSharingItem",(function(e){var t=r.state.addingSharingItems;t.splice(e,1),r.setState({addingSharingItems:t},(function(){r.handleSearchPeople()}))})),G()(V()(r),"handleRemoveParticipant",(function(e){var t=r.state.meetingParticipants.filter((function(t){return t.userId!==e}));r.setState({meetingParticipants:t})})),G()(V()(r),"handleSearchPeople",Object(Y.debounce)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=r.props,n=t.searchParticipants,i=t.searchingFriendResults,a=(t.maxNumberOfSharesPerVideo,r.state);a.addingSharingItems,a.shareVideoItems;if(Object(Y.isEmpty)(i)){var o=100;r.setState({searchingFriendResults:[]},(function(){n({names:e.trim(),pageSize:o},(function(e){var t=e.content.flatMap((function(e){var t=e.avatar,n=(t=void 0===t?{}:t).image,i=e.firstName,a=void 0===i?"":i,o=e.lastName,s=void 0===o?"":o,l=e.userId,c=r.state,u=c.addingSharingItems,d=c.meetingParticipants,h=[].concat(Rl()(d),Rl()(u)).some((function(e){var t=e.willBeDeleted,n=void 0!==t&&t;if(e.userId===l&&!n)return!0})),f=x.c.isCurrentUserId(l);if(h||f)return[];var p="".concat(a," ").concat(s);return[{avatar:n||I.a.noAvatar,fullName:p,userId:l,label:p,uid:l,name:p,firstName:a,lastName:s}]}));r.setState({searchingFriendResults:t.slice(0,5)})}))}))}}),300)),G()(V()(r),"handleCreateSharingItems",(function(){var e=r.state,t=e.addingSharingItems,n=e.meetingParticipants;r.setState({meetingParticipants:[].concat(Rl()(t.map((function(e){var t=e.userId,n=e.fullName;return{userId:t,firstName:e.firstName,lastName:e.lastName,fullName:n,avatar:{image:e.avatar||I.a.noAvatar},active:!0,isNewItem:!0}}))),Rl()(n)),addingSharingItems:[],searchingFriendResults:[]})})),G()(V()(r),"handleTabChanged",(function(e){e!==r.state.activeTab&&r.setState({activeTab:e})})),G()(V()(r),"getVideoDescription",(function(){var e=r.props,t=e.videoId,n=e.userScaffId,i=e.ownerScaffId;(0,e.getVideoDescription)({videoId:t,scaffId:n||i},(function(e){r.originalDescription=e,r.setState({description:e})}))})),G()(V()(r),"handleDescriptionUpdate",(function(e){var t=r.props,n=t.videoId,i=t.updateVideoDescription,a=r.state.description;r.setState({isSubmitting:!0}),i({videoId:n,description:a},(function(){r.setState({isSubmitting:!1}),r.updateVideoInfoAfterEditVideo({videoId:n,description:a}),e&&e()}),(function(){r.setState({isSubmitting:!1})}))}));var i=e.title,a=e.subject,o=e.topic,l=e.author,c=e.videoId,u=(e.description,e.course),d=void 0===u?{}:u,h=e.primCourse,f=void 0===h?{}:h,p=e.isDummyDailyVideo,m=e.userProfileTimezone,v=e.keywords,b=e.learningLevel,y=e.learningSubject,A=v?v.flatMap((function(e){return[{id:e.toLowerCase(),name:e.toLowerCase()}]})):[];return r.autoCompleteRef=Object(g.createRef)(),r.autoCompleteRefPrimCourse=Object(g.createRef)(),r.tabRef=Object(g.createRef)(),r.chapterTabBodyRef=Object(g.createRef)(),r.chapterTabFooterRef=Object(g.createRef)(),r.originalDescription="",r.state={activeTab:Ec,isSubmitting:!1,fileList:[],uploadType:"",showConfirmationModal:!1,showAddNewCourseModal:!1,title:i||"",subject:a||"",topic:o||"",author:l||"",description:"",keywordErrorMessage:"",totalVideos:0,totalSubtitles:0,totalSize:0,totalTranscripts:0,isLoadingRawVideos:!!c&&!p,isLoadingRawVideosFailed:!1,existingVideos:[],showEditingVideoReview:!1,isFormValidationPassed:!0,chapterCount:3,inputChapterCount:3,createType:Mc.TEMPLATE,menuCategory:Pc[x.c.getCurrentVideoCategory().toUpperCase()]||Pc.CREATE_VIDEO,courses:[],courseSuggestions:[],priCourseSuggestions:[],course:d.code||"",courseSequence:void 0===d.serial?"":d.serial,primCourseCode:f.code||"",primCourseSerial:void 0===f.serial?"":f.serial,meetingTitle:"",meetingDescription:"",meetingStartDate:new Date,meetingStartDates:new Date,meetingEndDates:[],meetingTimezone:m,meetingReminder:Nc[0].value,meetingDuration:Lc,meetingDurationText:x.c.getReadableTimeDuration(Lc),meetingParticipants:[],customErrors:{},chapterTabBodyHeight:"auto",chapterTabFooterHeight:"auto",showMoreInfo:!0,addingSharingItems:[],searchingFriendResults:[],keywords:kc.a.asMutable(A||[]),keywordSuggestions:[],learningLevel:b||Bc,learningSubject:y||jc,keywordValidationError:"",isTrustedPublisher:!1,descriptionValid:!0,videoDescription:""},r.validator=new ql.a(x.c.validatorConfig),r.originalRawVideos=[],r}return c()(n,[{key:"componentDidMount",value:function(){var e,t,n,r,i,a,o=this,s=this.props,l=s.isEditVideo,c=s.getCourses,u=s.isDummyDailyVideo,d=s.userProfile,h=s.getTrustedPublisher,f=this.state,p=f.course,m=f.primCourseCode,g=this.hasCourse();if(l&&this.getVideoDescription(),d){var v=d.firstName,b=d.lastName,y=d.userId,A=d.avatar;this.setState({meetingParticipants:[{avatar:A||I.a.noAvatar,fullName:"".concat(v," ").concat(b),userId:y,label:"".concat(v," ").concat(b),uid:y,name:"".concat(v," ").concat(b),firstName:v,lastName:b}]})}l&&!u&&this.loadRawVideos(),g&&c(null,(function(e){o.setState({courses:e},(function(){""===p&&o.handleCourseSearch(p),""===m&&o.handlePrimaryCourseSearch(""),l&&o.setDefaultCourseSequence()}))})),h((function(e){o.setState({isTrustedPublisher:e})})),this.initMeetingStartEndDates(),(null===(e=this.chapterTabBodyRef)||void 0===e?void 0:e.current)&&this.setState({chapterTabBodyHeight:"".concat(null===(t=this.chapterTabBodyRef)||void 0===t?void 0:null===(n=t.current)||void 0===n?void 0:n.clientHeight,"px")}),(null===(r=this.chapterTabFooterRef)||void 0===r?void 0:r.current)&&this.setState({chapterTabFooterHeight:"".concat(null===(i=this.chapterTabFooterRef)||void 0===i?void 0:null===(a=i.current)||void 0===a?void 0:a.clientHeight,"px")})}}]),n}(Cc),zc=Object(q.b)((function(e){var t=e.cogvid,n=e.auth;return{currentActiveVideoId:t.cogvidDetails.videoId,userProfileTimezone:n.userInfo.timezone,userProfile:n.userInfo}}),(function(e){return{createCognitiveVideo:function(t,n,r){return e(Q.g.createCognitiveVideo(t,n,r))},editCognitiveVideo:function(t,n,r){return e(Q.g.editCognitiveVideo(t,n,r))},uploadSubtitleFile:function(t,n,r){return e(Q.g.uploadAVideo(t,n,r))},updateSb:function(t){return e(Q.e.updateSb(t))},updateCg:function(t){return e(Q.e.updateCg(t))},updateCogvidDetails:function(t){return e(Q.e.updateCogvidDetails(t))},getRawVideos:function(t,n,r){return e(Q.e.getRawVideos(t,n,r))},createCogvidWithChapterTemplate:function(t,n,r){return e(Q.g.createCogvidWithChapterTemplate(t,n,r))},createMeetingVideo:function(t,n,r){return e(Q.g.createMeetingVideo(t,n,r))},getCourses:function(t,n,r){return e(Q.e.getCourses(t,n,r))},getCourseSerial:function(t,n,r){return e(Q.e.getCourseSerial(t,n,r))},editCogvidInfo:function(t,n,r){return e(Q.e.editCogvidInfo(t,n,r))},createDailyVideo:function(t,n,r){return e(Q.e.createDailyVideo(t,n,r))},getCg:function(t,n,r){return e(Q.e.getCg(t,n,r))},searchParticipants:function(t,n,r){return e(Q.i.searchFriends2(t,n,r))},searchKeyword:function(t,n,r){return e(Q.e.searchKeyword(t,n,r))},createVideoKeyword:function(t,n,r){return e(Q.e.createVideoKeyword(t,n,r))},findMasters:function(t,n,r){return e(Q.e.findMasters(t,n,r))},getTrustedPublisher:function(t,n){return e(Q.a.getTrustedPublisher(t,n))},getVideoDescription:function(t,n,r){return e(Q.e.getVideoDescription(t,n,r))},updateVideoDescription:function(t,n,r){return e(Q.e.updateVideoDescription(t,n,r))}}}))(Hc);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".rmsc{--rmsc-main:#4285f4;--rmsc-hover:#f1f3f5;--rmsc-selected:#e2e6ea;--rmsc-border:#ccc;--rmsc-gray:#aaa;--rmsc-bg:#fff;--rmsc-p:10px;--rmsc-radius:4px;--rmsc-h:38px}.rmsc *{box-sizing:border-box;transition:all .2s ease}.rmsc .gray{color:var(--rmsc-gray)}.rmsc .dropdown-content{position:absolute;z-index:1;top:100%;width:100%;padding-top:8px}.rmsc .dropdown-content .panel-content{overflow:hidden;border-radius:var(--rmsc-radius);background:var(--rmsc-bg);box-shadow:0 0 0 1px rgba(0,0,0,.1),0 4px 11px rgba(0,0,0,.1)}.rmsc .dropdown-container{position:relative;outline:0;background-color:var(--rmsc-bg);border:1px solid var(--rmsc-border);border-radius:var(--rmsc-radius)}.rmsc .dropdown-container:focus-within{box-shadow:var(--rmsc-main) 0 0 0 1px;border-color:var(--rmsc-main)}.rmsc .dropdown-heading{position:relative;padding:0 var(--rmsc-p);display:flex;align-items:center;width:100%;height:var(--rmsc-h);cursor:default;outline:0}.rmsc .dropdown-heading .dropdown-heading-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.rmsc .clear-selected-button{cursor:pointer;background:none;border:0;padding:0;display:flex}.rmsc .options{max-height:260px;overflow-y:auto;margin:0;padding-left:0}.rmsc .options li{list-style:none;margin:0}.rmsc .select-item{box-sizing:border-box;cursor:pointer;display:block;padding:var(--rmsc-p);outline:0}.rmsc .select-item:focus,.rmsc .select-item:hover{background:var(--rmsc-hover)}.rmsc .select-item.selected{background:var(--rmsc-selected)}.rmsc .no-options{padding:var(--rmsc-p);text-align:center;color:var(--rmsc-gray)}.rmsc .search{width:100%;position:relative;border-bottom:1px solid var(--rmsc-border)}.rmsc .search input{height:var(--rmsc-h);padding:0 var(--rmsc-p);width:100%;outline:0;border:0}.rmsc .search-clear-button{cursor:pointer;position:absolute;top:0;right:0;bottom:0;background:none;border:0;padding:0 calc(var(--rmsc-p)/2)}.rmsc .search-clear-button [hidden]{display:none}.rmsc .item-renderer{display:flex;align-items:baseline}.rmsc .item-renderer input{margin:0 5px 0 0}.rmsc .item-renderer.disabled{opacity:.5}.rmsc .spinner{animation:rotate 2s linear infinite}.rmsc .spinner .path{stroke:var(--rmsc-border);stroke-width:4px;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{to{transform:rotate(1turn)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}");const Vc={allItemsAreSelected:"All items are selected.",clearSearch:"Clear Search",clearSelected:"Clear Selected",noOptions:"No options",search:"Search",selectAll:"Select All",selectSomeItems:"Select..."},Wc={value:[],hasSelectAll:!0,className:"multi-select",debounceDuration:200,options:[]},Gc=v.a.createContext({}),qc=({props:e,children:t})=>v.a.createElement(Gc.Provider,{value:{t:t=>{var n;return(null==(n=e.overrideStrings)?void 0:n[t])||Vc[t]},...Wc,...e}},t),Yc=()=>v.a.useContext(Gc);const Kc={when:!0,eventTypes:["keydown"]};function Xc(e,t,n){const r=Object(g.useMemo)(()=>Array.isArray(e)?e:[e],[e]),i=Object.assign({},Kc,n),{when:a,eventTypes:o}=i,s=Object(g.useRef)(t);let{target:l}=i;Object(g.useEffect)(()=>{s.current=t});const c=Object(g.useCallback)(e=>{r.some(t=>e.key===t||e.code===t)&&s.current(e)},[r]);Object(g.useEffect)(()=>{if(a&&"undefined"!=typeof window){const e=l?l.current:window;return o.forEach(t=>{e&&e.addEventListener(t,c)}),()=>{o.forEach(t=>{e&&e.removeEventListener(t,c)})}}},[a,o,r,l,t])}const Qc={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",SPACE:"Space"};function $c(e,t){const n=e.length,r=t.length,i=[];if(!n||!r)return 0;if(n<r&&([e,t]=[t,e]),-1!==e.indexOf(t))return r+1/n;for(let e=0;e<=n;++e)i[e]=[0];for(let e=0;e<=r;++e)i[0][e]=0;for(let a=1;a<=n;++a)for(let n=1;n<=r;++n)i[a][n]=e[a-1]===t[n-1]?1+i[a-1][n-1]:Math.max(i[a][n-1],i[a-1][n]);return i[n][r]}function Jc(e,t){if(!e)return"";if(e=e.toUpperCase().replace(/((?=[^\u00E0-\u00FC])\W)|_/g,""),!t)return e;const n=t;return Object.keys(n).reduce((e,t)=>{const r=new RegExp(t,"g");return e.replace(r,n[t])},e)}const Zc=()=>v.a.createElement("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"dropdown-search-clear-icon gray"},v.a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),v.a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),eu=({checked:e,option:t,onClick:n,disabled:r})=>v.a.createElement("div",{className:"item-renderer "+(r&&"disabled")},v.a.createElement("input",{type:"checkbox",onChange:n,checked:e,tabIndex:-1,disabled:r}),v.a.createElement("span",null,t.label)),tu=({itemRenderer:e=eu,option:t,checked:n,tabIndex:r,disabled:i,onSelectionChanged:a,onClick:o})=>{const s=Object(g.useRef)(),l=()=>{i||a(!n)};return Xc([Qc.ENTER,Qc.SPACE],e=>{l(),e.preventDefault()},{target:s}),v.a.createElement("label",{className:"select-item "+(n&&"selected"),role:"option","aria-selected":n,tabIndex:r,ref:s},v.a.createElement(e,{option:t,checked:n,onClick:e=>{l(),o(e)},disabled:i}))},nu=({options:e,onClick:t,skipIndex:n})=>{const{disabled:r,value:i,onChange:a,ItemRenderer:o}=Yc();return v.a.createElement(v.a.Fragment,null,e.map((e,s)=>{const l=s+n;return v.a.createElement("li",{key:(null==e?void 0:e.key)||s},v.a.createElement(tu,{tabIndex:l,option:e,onSelectionChanged:t=>{return n=e,o=t,void(r||a(o?[...i,n]:i.filter(e=>e.value!==n.value)));var n,o},checked:!!i.find(t=>t.value===e.value),onClick:e=>t(e,l),itemRenderer:o,disabled:e.disabled||r}))}))};var ru;!function(e){e[e.SEARCH=0]="SEARCH",e[e.NONE=-1]="NONE"}(ru||(ru={}));const iu=()=>{const{t:e,onChange:t,options:n,value:r,filterOptions:i,selectAllLabel:a,ItemRenderer:o,disabled:s,disableSearch:l,hasSelectAll:c,ClearIcon:u,debounceDuration:d}=Yc(),h=Object(g.useRef)(),f=Object(g.useRef)(),[p,m]=Object(g.useState)(""),[b,y]=Object(g.useState)(n),[A,_]=Object(g.useState)(""),[w,E]=Object(g.useState)(0),S=Object(g.useCallback)(((e,t)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(null,r)},t)}})(e=>_(e),d),[]),C=Object(g.useMemo)(()=>{let e=0;return l||(e+=1),c&&(e+=1),e},[l,c]),T={label:a||e("selectAll"),value:""},k=e=>E(e);Xc([Qc.ARROW_DOWN,Qc.ARROW_UP],e=>{switch(e.code){case Qc.ARROW_UP:O(-1);break;case Qc.ARROW_DOWN:O(1);break;default:return}e.stopPropagation(),e.preventDefault()},{target:h});const x=async()=>i?await i(n,A):function(e,t,n){if(!t)return e;const r=Jc(t,n);return e.filter(({label:e,value:t})=>null!=e&&null!=t).map(e=>({option:e,score:$c(Jc(e.label,n),r)})).filter(e=>e.score>=r.length-2).sort((e,t)=>t.score-e.score).map(e=>e.option)}(n,A),O=e=>{let t=w+e;t=Math.max(0,t),t=Math.min(t,n.length+Math.max(C-1,0)),E(t)};Object(g.useEffect)(()=>{var e,t;null==h||null==(e=h.current)||null==(t=e.querySelector("[tabIndex='"+w+"']"))||t.focus()},[w]);const[I,M]=Object(g.useMemo)(()=>{const e=b.filter(e=>!e.disabled);return[e.every(e=>-1!==r.findIndex(t=>t.value===e.value)),0!==e.length]},[b,r]);return Object(g.useEffect)(()=>{x().then(y)},[A,n]),v.a.createElement("div",{className:"select-panel",role:"listbox",ref:h},!l&&v.a.createElement("div",{className:"search"},v.a.createElement("input",{placeholder:e("search"),type:"text","aria-describedby":e("search"),onChange:e=>{S(e.target.value),m(e.target.value),E(ru.SEARCH)},onFocus:()=>{E(ru.SEARCH)},value:p,ref:f,tabIndex:0}),v.a.createElement("button",{type:"button",className:"search-clear-button",hidden:!p,onClick:()=>{var e;_(""),m(""),null==f||null==(e=f.current)||e.focus()},"aria-label":e("clearSearch")},u||v.a.createElement(Zc,null))),v.a.createElement("ul",{className:"options"},c&&M&&v.a.createElement(tu,{tabIndex:1===C?0:1,checked:I,option:T,onSelectionChanged:e=>{const n=(e=>{const t=b.filter(e=>!e.disabled).map(e=>e.value);if(e){const e=[...r.map(e=>e.value),...t];return b.filter(t=>e.includes(t.value))}return r.filter(e=>!t.includes(e.value))})(e);t(n)},onClick:()=>k(1),itemRenderer:o,disabled:s}),b.length?v.a.createElement(nu,{skipIndex:C,options:b,onClick:(e,t)=>k(t)}):v.a.createElement("li",{className:"no-options"},e("noOptions"))))},au=({expanded:e})=>v.a.createElement("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"dropdown-heading-dropdown-arrow gray"},v.a.createElement("path",{d:e?"M18 15 12 9 6 15":"M6 9L12 15 18 9"})),ou=()=>{const{t:e,value:t,options:n,valueRenderer:r}=Yc(),i=0===t.length,a=t.length===n.length,o=r&&r(t,n);return i?v.a.createElement("span",{className:"gray"},o||e("selectSomeItems")):v.a.createElement("span",null,o||(a?e("allItemsAreSelected"):t.map(e=>e.label).join(", ")))},su=({size:e=24})=>v.a.createElement("span",{style:{width:e,marginRight:"0.2rem"}},v.a.createElement("svg",{width:e,height:e,className:"spinner",viewBox:"0 0 50 50",style:{display:"inline",verticalAlign:"middle"}},v.a.createElement("circle",{cx:"25",cy:"25",r:"20",fill:"none",className:"path"}))),lu=()=>{const{t:e,onMenuToggle:t,ArrowRenderer:n,shouldToggleOnHover:r,isLoading:i,disabled:a,onChange:o,labelledBy:s,value:l,isOpen:c,defaultIsOpen:u,ClearSelectedIcon:d}=Yc(),[h,f]=Object(g.useState)(!0),[p,m]=Object(g.useState)(u),[b,y]=Object(g.useState)(!1),A=n||au,_=Object(g.useRef)();!function(e,t){const n=Object(g.useRef)(!1);Object(g.useEffect)(()=>{n.current?e():n.current=!0},t)}(()=>{t&&t(p)},[p]),Object(g.useEffect)(()=>{void 0===u&&"boolean"==typeof c&&(f(!1),m(c))},[c]);Xc([Qc.ENTER,Qc.ARROW_DOWN,Qc.SPACE,Qc.ESCAPE],e=>{if(!["text","button"].includes(e.target.type)||![Qc.SPACE,Qc.ENTER].includes(e.code)){var t;if(h)if(e.code===Qc.ESCAPE)m(!1),null==_||null==(t=_.current)||t.focus();else m(!0);e.preventDefault()}},{target:_});const w=e=>{h&&r&&m(e)};return v.a.createElement("div",{tabIndex:0,className:"dropdown-container","aria-labelledby":s,"aria-expanded":p,"aria-readonly":!0,"aria-disabled":a,ref:_,onFocus:()=>!b&&y(!0),onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&h&&(y(!1),m(!1))},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1)},v.a.createElement("div",{className:"dropdown-heading",onClick:()=>{h&&m(!i&&!a&&!p)}},v.a.createElement("div",{className:"dropdown-heading-value"},v.a.createElement(ou,null)),i&&v.a.createElement(su,null),l.length>0&&v.a.createElement("button",{type:"button",className:"clear-selected-button",onClick:e=>{e.stopPropagation(),o([]),h&&m(!1)},disabled:a,"aria-label":e("clearSelected")},d||v.a.createElement(Zc,null)),v.a.createElement(A,{expanded:p})),p&&v.a.createElement("div",{className:"dropdown-content"},v.a.createElement("div",{className:"panel-content"},v.a.createElement(iu,null))))};var cu=e=>v.a.createElement(qc,{props:e},v.a.createElement("div",{className:"rmsc "+(e.className||"multi-select")},v.a.createElement(lu,null))),uu=r(294),du=r.n(uu);var hu=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.required,n=e.simple,r=e.labelName,i=e.options,a=e.value,o=e.name,s=e.onChange,l=e.hasSelectAll,c=e.disableSearch,u=e.disabled,d=(e.selectAllMessage,e.labelPosition),h=e.className,f=e.classNameLabel,p=e.classNameContainer,m=e.classNameError,g=e.placeholder,b=e.selectAllLabel,y=e.onMenuToggle,A=e.validatorElement;return v.a.createElement($l.a.Group,{className:P()("position-relative",!!r&&"left"===d&&"d-flex align-items-center",n&&"m-0",p)},r&&v.a.createElement($l.a.Label,{className:[du.a.label,f]},r,t&&v.a.createElement("span",null,"*")),v.a.createElement(cu,{disabled:u,options:i,value:a,name:o,onChange:s,labelledBy:"Select",className:P()("multiple-select-custom w-100",u&&"disabled",n&&"simple",du.a.multiSelect,du.a.controlItem,!!r&&"left"===d&&"ml-2",h),hasSelectAll:l,disableSearch:c,overrideStrings:{allItemsAreSelected:b||i.map((function(e){return e.label})).join(", "),selectSomeItems:g||"Select",selectAll:b||"All"},ArrowRenderer:function(){return v.a.createElement("i",{className:P()("fv fuvi-s-arrow-down",du.a.arrowIcon)})},ItemRenderer:function(e){var t=e.checked,n=e.option,r=e.onClick,i=e.disabled;return v.a.createElement("div",{className:P()("item-renderer pl-1",i&&"disabled")},v.a.createElement(_u,{type:"checkbox",label:n.label,className:"w-100 u-pointer-event-none",classNameInput:"custom-checkbox-md justify-content-start",checked:t,onChange:function(e){document.querySelector(".dropdown-container").focus(),r(e)}}))},onMenuToggle:y}),A&&v.a.createElement("div",{className:P()(du.a.errorMessage,m)},A))}}]),n}(g.PureComponent);hu.propTypes={labelName:ne.a.string,options:ne.a.arrayOf(ne.a.object),value:ne.a.arrayOf(ne.a.object),name:ne.a.string,onChange:ne.a.func,hasSelectAll:ne.a.bool,disableSearch:ne.a.bool,selectAllMessage:ne.a.string,labelPosition:ne.a.oneOf(["top","left"]),className:ne.a.string},hu.defaultProps={options:[],labelPosition:"top",hasSelectAll:!1,disableSearch:!0,className:""};var fu=r(53),pu=r.n(fu);var mu=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.inputRef,n=e.labelName,r=e.labelPosition,i=e.classNameLabel,a=e.classNameError,o=e.classNameSuffix,s=e.validatorElement,l=e.required,c=e.size,u=e.className,d=e.classNameInput,h=e.children,f=e.suffix,p=e.iconSuffix,m=e.onIconSuffixClick,g=e.readOnly,b=Yt()(e,["inputRef","labelName","labelPosition","classNameLabel","classNameError","classNameSuffix","validatorElement","required","size","className","classNameInput","children","suffix","iconSuffix","onIconSuffixClick","readOnly"]),y="sm"===c,A="md"===c;return v.a.createElement($l.a.Group,{className:P()("left"===r&&"d-flex",y&&pu.a.formGroupSm,A&&pu.a.formGroupMd,u)},n&&v.a.createElement($l.a.Label,{className:[pu.a.label,i]},n,l&&v.a.createElement("span",null," *")),v.a.createElement("div",{className:P()(pu.a.controlItem)},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement($l.a.Control,Gt()({ref:t,className:P()("fv-input",pu.a.control,"left"===r&&n&&"ml-2",pu.a.controlItem,pu.a.withValidation,y&&pu.a.formInputSm,A&&pu.a.formInputMd,g&&"border-0",d),readOnly:g},b)),f,p&&v.a.createElement("span",{className:P()(pu.a.iconSuffix,o,m&&pu.a.iconSuffixClickable),onClick:m},v.a.createElement("i",{className:"fv fuvi-".concat(p," u-fs-7o8 align-middle mr-1")}))),h,s&&v.a.createElement("div",{className:P()(pu.a.errorMessage,a)},s)))}}]),n}(g.PureComponent);mu.propTypes={inputRef:ne.a.oneOfType([ne.a.object,ne.a.func,ne.a.string]),labelName:ne.a.string,className:ne.a.string,classNameInput:ne.a.string,value:ne.a.string,name:ne.a.string,onChange:ne.a.func,onBlur:ne.a.func,labelPosition:ne.a.oneOf(["top","left"]),size:ne.a.oneOf(["sm","md","lg"]),validatorElement:ne.a.oneOfType([ne.a.object,ne.a.string]),placeholder:ne.a.string,required:ne.a.bool,autoComplete:ne.a.string,onKeyDown:ne.a.func,maxLength:ne.a.number,onMouseEnter:ne.a.func,onMouseLeave:ne.a.func,onFocus:ne.a.func,type:ne.a.string,children:ne.a.node,classNameLabel:ne.a.string,suffix:ne.a.node,iconSuffix:ne.a.string,onIconSuffixClick:ne.a.func,readOnly:ne.a.bool},mu.defaultProps={labelPosition:"top",required:!1,size:"md",type:"text",onKeyDown:function(){return null},readOnly:!1};var gu,vu=r(1018),bu=r.n(vu),yu=r(203);gu={position:"absolute",top:"100%",left:0,background:"#fff",borderRadius:"0px",boxShadow:"0 0.125rem 0.75rem rgba(0, 0, 0, 0.1)"},G()(gu,"background","rgba(255, 255, 255, 0.9)"),G()(gu,"padding","0.125rem 0"),G()(gu,"zIndex",1e3),G()(gu,"maxHeight","300px"),G()(gu,"overflowY","auto");var Au=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"inputRef",v.a.createRef()),e}return c()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.focusOnMount;setTimeout((function(){t&&e.inputRef.current&&e.inputRef.current.focus()}),0)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.classNameMenu,r=e.renderItem,i=(e.menuStyle,e.readOnly),a=e.getItemValue,o=e.classNameInput,s=e.validatorElement,l=e.classNameError,c={readOnly:i,placeholder:e.placeholder};return v.a.createElement("div",{className:P()(t,"position-relative")},v.a.createElement(bu.a,Gt()({},this.props,{ref:this.inputRef,wrapperStyle:{display:"block"},getItemValue:a,renderInput:function(e){return v.a.createElement($l.a.Group,{className:"mb-0"},v.a.createElement($l.a.Control,Gt()({},e,c,{className:P()("cogvid-input-border cogvid-input-height",o)})))},renderItem:r,autoHighlight:!0,renderMenu:function(e,t,r){return v.a.createElement("div",{className:P()(pu.a.autocompleteMenu,"fv-custom-scroll",n),children:e})}})),s&&v.a.createElement("div",{className:P()(pu.a.errorMessage,l)},s))}}]),n}(g.Component);Au.propTypes={renderItem:ne.a.func,getItemValue:ne.a.func,readOnly:ne.a.bool,focusOnMount:ne.a.bool,validatorElement:ne.a.object},Au.defaultProps={getItemValue:function(e){return e.label},readOnly:!1,renderItem:function(e,t){return v.a.createElement("div",{className:P()("px-3 py-2 text-truncate",t&&pu.a.isHighlighted),type:"button",key:Object(yu.v4)()},e.label)}};var _u=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.inputRef,n=e.labelName,r=e.className,i=e.classNameInput,a=e.disabled,o=Yt()(e,["inputRef","labelName","className","classNameInput","disabled"]);return v.a.createElement($l.a.Group,{className:["m-0",r]},v.a.createElement("div",{className:pu.a.controlItem},v.a.createElement($l.a.Check,Gt()({custom:!0,ref:t,label:n,className:["fv-input w-100",i,a&&"u-cursor-default u-pointer-event-none"],disabled:a},o))))}}]),n}(g.PureComponent);_u.propTypes={inputRef:ne.a.oneOfType([ne.a.object,ne.a.func,ne.a.string]),labelName:ne.a.oneOfType([ne.a.node,ne.a.string]),className:ne.a.string,classNameInput:ne.a.string,checked:ne.a.bool,onChange:ne.a.func,type:ne.a.oneOf(["radio","checkbox","switch"])},_u.defaultProps={type:"checkbox"};var wu=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.options,r=e.labelName,i=e.labelPosition,a=e.classNameLabel,o=e.classNameDropdown,s=e.classNamePopup,l=e.className,c=e.classNameInput,u=e.onChange,d=e.required,h=e.placeholder,f=e.validatorElement,p=e.prefix,m=e.disabled,g=e.size,b=e.propName,y=void 0===b?"name":b,A=e.propValue,_=void 0===A?"value":A,w=Yt()(e,["value","options","labelName","labelPosition","classNameLabel","classNameDropdown","classNamePopup","className","classNameInput","onChange","required","placeholder","validatorElement","prefix","disabled","size","propName","propValue"]),E=n.find((function(e){return e[_]===t||e===t}));return v.a.createElement($l.a.Group,{className:P()("left"===i&&"d-flex",l)},r&&v.a.createElement($l.a.Label,{className:[pu.a.label,a]},r,d&&v.a.createElement("span",null,"*")),v.a.createElement("div",{className:"".concat(pu.a.controlItem," d-flex align-items-center ").concat(o)},p,v.a.createElement(ut,Gt()({className:["fv-dropdown",c],onSelect:u},w),v.a.createElement(ut.Toggle,{type:"button",variant:"outline-primary",className:P()("text-truncate pr-4",m&&"custom-disabled"),size:g,block:!0},E?v.a.createElement("div",null,!p&&E.prefix,E[y]||E):v.a.createElement("div",{className:"u-text-placeholder font-italic u-opacity-80"},h||"")),v.a.createElement(ut.Menu,{className:P()("fv-custom-scroll",s)},n.map((function(e){return v.a.createElement(ut.Item,{key:e[_]||e,eventKey:e[_]||e,active:e[_]===t||e===t,className:"text-truncate",disabled:e&&e.disabled},e.prefix,e[y]||e)})),0===n.length&&v.a.createElement(ut.Item,{disabled:!0},"No options found.")))),f&&v.a.createElement("div",{className:"ml-2 mt-1"},f))}}]),n}(g.PureComponent);wu.propTypes={labelName:ne.a.string,className:ne.a.string,classNameInput:ne.a.string,value:ne.a.string,options:ne.a.array,onChange:ne.a.func,propName:ne.a.string,propValue:ne.a.string},wu.defaultProps={value:"",options:[],onChange:function(){},propName:"name",propValue:"value"};var Eu=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.inputRef,n=e.labelName,r=e.labelPosition,i=e.classNameLabel,a=e.validatorElement,o=e.required,s=e.rows,l=e.resizable,c=e.className,u=e.classNameInput,d=e.children,h=Yt()(e,["inputRef","labelName","labelPosition","classNameLabel","validatorElement","required","rows","resizable","className","classNameInput","children"]);return v.a.createElement($l.a.Group,{className:P()("left"===r&&"d-flex",c)},n&&v.a.createElement($l.a.Label,{className:[pu.a.label,i]},n,o&&v.a.createElement("span",null," *")),v.a.createElement("div",{className:"".concat(pu.a.controlItem)},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement($l.a.Control,Gt()({as:"textarea",ref:t,rows:s,className:P()(["fv-input fv-custom-scroll",pu.a.control,"left"===r&&n&&"ml-2",pu.a.controlItem,pu.a.withValidation,u,pu.a.textArea,!l&&pu.a.disableTextAreaResize])},h))),d,a&&v.a.createElement("div",{className:"ml-2 mt-1 u-fs-7o8"},a)))}}]),n}(g.PureComponent);Eu.propTypes={inputRef:ne.a.oneOfType([ne.a.object,ne.a.func,ne.a.string]),labelName:ne.a.string,className:ne.a.string,classNameInput:ne.a.string,value:ne.a.string,name:ne.a.string,onChange:ne.a.func,onBlur:ne.a.func,labelPosition:ne.a.oneOf(["top","left"]),validatorElement:ne.a.object,placeholder:ne.a.string,required:ne.a.bool,onKeyDown:ne.a.func,onMouseEnter:ne.a.func,onMouseLeave:ne.a.func,onFocus:ne.a.func,type:ne.a.string,children:ne.a.node,classNameLabel:ne.a.string,rows:ne.a.number,resizable:ne.a.bool},Eu.defaultProps={labelPosition:"top",required:!1,type:"text",onKeyDown:function(){return null},rows:3,resizable:!1};var Su="react-tag-input",Cu="react-tag-input__input",Tu="react-tag-input__tag",ku="react-tag-input__tag__content",xu="react-tag-input__tag__remove",Ou="react-tag-input__tag__remove-readonly";var Iu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function Mu(e){return function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return Iu[e]}))}(function(e){return e.replace(/(\r\n|\n|\r)/gm,"")}(e))}var Pu=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.focused=!1,t.removed=!1,t.preFocusedValue="",t.onPaste=function(e){e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,Mu(t))},t.onFocus=function(){t.preFocusedValue=t.getValue(),t.focused=!0},t.onBlur=function(){t.focused=!1;var e=t.props.innerEditableRef.current,n=t.props,r=n.validator,i=n.change;if(!t.removed&&e){if(""===e.innerText)return void t.props.remove();if(r)if(!r(t.getValue()))return void(e.innerText=t.preFocusedValue);i(e.innerText)}},t.onKeyDown=function(e){if(13===e.keyCode)return e.preventDefault(),void t.focusInputRef();var n=t.props.removeOnBackspace,r=t.getValue();return n&&8===e.keyCode&&""===r?(t.removed=!0,t.props.remove(),void t.focusInputRef()):void 0},t.getValue=function(){var e=t.getRef();return e?e.innerText:""},t.getRef=function(){return t.props.innerEditableRef.current},t.focusInputRef=function(){var e=t.props.inputRef;e&&e.current&&e.current.focus()},t}return Pu(t,e),t.prototype.componentDidMount=function(){this.preFocusedValue=this.getValue()},t.prototype.render=function(){var e=this.props,t=e.value,n=e.className,r=e.innerEditableRef;return v.a.createElement("div",{ref:r,className:n,contentEditable:!0,onPaste:this.onPaste,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,dangerouslySetInnerHTML:{__html:Mu(t)}})},t}(v.a.Component),Nu=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerEditableRef=v.a.createRef(),t.remove=function(){return t.props.remove(t.props.index)},t}return Nu(t,e),t.prototype.render=function(){var e=this.props,t=e.value,n=e.index,r=e.editable,i=e.inputRef,a=e.validator,o=e.update,s=e.readOnly,l=e.removeOnBackspace,c=s?xu+" "+Ou:xu;return v.a.createElement("div",{className:Tu},!r&&v.a.createElement("div",{className:ku},t),r&&v.a.createElement(Du,{value:t,inputRef:i,innerEditableRef:this.innerEditableRef,className:ku,change:function(e){return o(n,e)},remove:this.remove,validator:a,removeOnBackspace:l}),v.a.createElement("div",{className:c,onClick:this.remove}))},t}(v.a.Component),Ru=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={input:""},t.inputRef=v.a.createRef(),t.onInputChange=function(e){t.setState({input:e.target.value})},t.onInputKeyDown=function(e){var n=t.state.input,r=t.props,i=r.validator,a=r.removeOnBackspace;if(13===e.keyCode){if(e.preventDefault(),""===n)return;if(!(void 0===i||i(n)))return;t.addTag(n)}else if(a&&(8===e.keyCode||46===e.keyCode)){if(""!==n)return;t.removeTag(t.props.tags.length-1)}},t.addTag=function(e){var n=t.props.tags.slice();n.push(e),t.props.onChange(n),t.setState({input:""})},t.removeTag=function(e){var n=t.props.tags.slice();n.splice(e,1),t.props.onChange(n)},t.updateTag=function(e,n){var r=t.props.tags.slice();r[e]=n,t.props.onChange(r)},t}return Ru(t,e),t.prototype.render=function(){var e=this,t=this.state.input,n=this.props,r=n.tags,i=n.placeholder,a=n.maxTags,o=n.editable,s=n.readOnly,l=n.validator,c=n.removeOnBackspace,u=void 0!==a&&r.length>=a,d=!s&&(o||!1),h=!s&&!u;return v.a.createElement("div",{className:Su},r.map((function(t,n){return v.a.createElement(Lu,{key:n,value:t,index:n,editable:d,readOnly:s||!1,inputRef:e.inputRef,update:e.updateTag,remove:e.removeTag,validator:l,removeOnBackspace:c})})),h&&v.a.createElement("input",{ref:this.inputRef,value:t,className:Cu,placeholder:i||"Type and press enter",onChange:this.onInputChange,onKeyDown:this.onInputKeyDown}))},t}(v.a.Component);var ju=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=(e.inputRef,e.labelName),n=e.labelPosition,r=e.classNameLabel,i=e.validatorElement,a=e.validator,o=e.required,s=e.size,l=e.className,c=(e.classNameInput,e.children),u=e.tags,d=Yt()(e,["inputRef","labelName","labelPosition","classNameLabel","validatorElement","validator","required","size","className","classNameInput","children","tags"]),h="sm"===s,f="md"===s;return v.a.createElement($l.a.Group,{className:P()("left"===n&&"d-flex",h&&pu.a.formGroupSm,f&&pu.a.formGroupMd,l)},t&&v.a.createElement($l.a.Label,{className:[pu.a.label,"mt-2",r]},t,o&&v.a.createElement("span",null," *")),v.a.createElement("div",{className:"".concat(pu.a.controlItem)},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement(Bu,Gt()({tags:u},d,{className:"fv-input form-control",validator:a}))),c,i&&v.a.createElement("div",{className:"ml-2 mt-1 text-danger"},i)))}}]),n}(g.PureComponent);ju.propTypes={inputRef:ne.a.oneOfType([ne.a.object,ne.a.func,ne.a.string]),labelName:ne.a.string,className:ne.a.string,classNameInput:ne.a.string,name:ne.a.string,onChange:ne.a.func,onBlur:ne.a.func,labelPosition:ne.a.oneOf(["top","left"]),size:ne.a.oneOf(["sm","md","lg"]),validatorElement:ne.a.string,placeholder:ne.a.string,required:ne.a.bool,autoComplete:ne.a.string,onKeyDown:ne.a.func,maxLength:ne.a.number,onMouseEnter:ne.a.func,onMouseLeave:ne.a.func,onFocus:ne.a.func,type:ne.a.string,children:ne.a.node,classNameLabel:ne.a.string,tags:ne.a.arrayOf(ne.a.string)},ju.defaultProps={labelPosition:"top",required:!1,size:"md",type:"text",onKeyDown:function(){return null},tags:[]};var Fu=r(411),Uu=r.n(Fu);r(768);var Hu=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.inputRef,n=e.labelName,r=e.labelPosition,i=e.classNameLabel,a=e.validatorElement,o=e.required,s=e.size,l=e.className,c=e.classNameInput,u=e.classNameWrap,d=e.children,h=e.selected,f=e.showCalendarIcon,p=Yt()(e,["inputRef","labelName","labelPosition","classNameLabel","validatorElement","required","size","className","classNameInput","classNameWrap","children","selected","showCalendarIcon"]),m="sm"===s,g="md"===s;return v.a.createElement($l.a.Group,{className:P()("left"===r&&"d-flex",m&&pu.a.formGroupSm,g&&pu.a.formGroupMd,l)},n&&v.a.createElement($l.a.Label,{className:[pu.a.label,i]},n,o&&v.a.createElement("span",null," *")),v.a.createElement("div",{className:"".concat(pu.a.controlItem)},v.a.createElement("div",{className:P()("d-flex align-items-center position-relative",u)},v.a.createElement(Uu.a,Gt()({ref:t,selected:h,className:P()(["fv-input w-100 form-control","left"===r&&n&&"ml-2",pu.a.withValidation,m&&pu.a.formInputSm,g&&pu.a.formInputMd,c])},p)),f&&v.a.createElement("i",{className:P()("fv fuvi-calendar fv-sm",pu.a.calendarIcon)})),d,a&&v.a.createElement("div",{className:"ml-2 mt-1"},a)))}}]),n}(g.PureComponent);Hu.propTypes={inputRef:ne.a.oneOfType([ne.a.object,ne.a.func,ne.a.string]),labelName:ne.a.string,className:ne.a.string,classNameInput:ne.a.string,classNameWrap:ne.a.string,name:ne.a.string,onChange:ne.a.func,onBlur:ne.a.func,labelPosition:ne.a.oneOf(["top","left"]),size:ne.a.oneOf(["sm","md","lg"]),validatorElement:ne.a.object,placeholder:ne.a.string,required:ne.a.bool,autoComplete:ne.a.string,onKeyDown:ne.a.func,maxLength:ne.a.number,onMouseEnter:ne.a.func,onMouseLeave:ne.a.func,onFocus:ne.a.func,type:ne.a.string,children:ne.a.node,classNameLabel:ne.a.string,showCalendarIcon:ne.a.bool},Hu.defaultProps={labelPosition:"top",required:!1,size:"md",type:"text",onKeyDown:function(){return null},showCalendarIcon:!1};var zu=[["Afghanistan","AF","Badakhshan~BDS|Badghis~BDG|Baghlan~BGL|Balkh~BAL|Bamyan~BAM|Daykundi~DAY|Farah~FRA|Faryab~FYB|Ghazni~GHA|Ghor~GHO|Helmand~HEL|Herat~HER|Jowzjan~JOW|Kabul~KAB|Kandahar~KAN|Kapisa~KAP|Khost~KHO|Kunar~KNR|Kunduz~KDZ|Laghman~LAG|Logar~LOW|Maidan Wardak~WAR|Nangarhar~NAN|Nimruz~NIM|Nuristan~NUR|Paktia~PIA|Paktika~PKA|Panjshir~PAN|Parwan~PAR|Samangan~SAM|Sar-e Pol~SAR|Takhar~TAK|Urozgan~ORU|Zabul~ZAB"],["Åland Islands","AX","Brändö~BR|Eckerö~EC|Finström~FN|Föglö~FG|Geta~GT|Hammarland~HM|Jomala~JM|Kumlinge~KM|Kökar~KK|Lemland~LE|Lumparland~LU|Mariehamn~MH|Saltvik~SV|Sottunga~ST|Sund~SD|Vårdö~VR"],["Albania","AL","Berat~01|Dibër~09|Durrës~02|Elbasan~03|Fier~04|Gjirokastër~05|Korçë~06|Kukës~07|Lezhë~08|Shkodër~10|Tirana~11|Vlorë~12"],["Algeria","DZ","Adrar~01|Aïn Defla~44|Aïn Témouchent~46|Algiers~16|Annaba~23|Batna~05|Béchar~08|Béjaïa~06|Biskra~07|Blida~09|Bordj Bou Arréridj~34|Bouïra~10|Boumerdès~35|Chlef~02|Constantine~25|Djelfa~17|El Bayadh~32|El Oued~39|El Tarf~36|Ghardaïa~47|Guelma~24|Illizi~33|Jijel~18|Khenchela~40|Laghouat~03|Mascara~29|Médéa~26|Mila~43|Mostaganem~27|Msila~28|Naâma~45|Oran~31|Ouargla~30|Oum el Bouaghi~04|Relizane~48|Saïda~20|Sétif~19|Sidi Bel Abbès~22|Skikda~21|Souk Ahras~41|Tamanghasset~11|Tébessa~12|Tiaret~14|Tindouf~37|Tipaza~42|Tissemsilt~38|Tizi Ouzou~15|Tlemcen~13"],["American Samoa","AS","Tutuila~01|Aunu'u~02|Ta'ū~03|Ofu‑Olosega~04|Rose Atoll~21|Swains Island~22"],["Andorra","AD","Andorra la Vella~07|Canillo~02|Encamp~03|Escaldes-Engordany~08|La Massana~04|Ordino~05|Sant Julià de Lòria~06"],["Angola","AO","Bengo~BGO|Benguela~BGU|Bié~BIE|Cabinda~CAB|Cuando Cubango~CCU|Cuanza Norte~CNO|Cuanza Sul~CUS|Cunene~CNN|Huambo~HUA|Huíla~HUI|Luanda~LUA|Lunda Norte~LNO|Lunda Sul~LSU|Malanje~MAL|Moxico~MOX|Namibe~NAM|Uíge~UIG|Zaire~ZAI"],["Anguilla","AI","Anguilla~01|Anguillita Island~02|Blowing Rock~03|Cove Cay~04|Crocus Cay~05|Deadman's Cay~06|Dog Island~07|East Cay~08|Little Island~09|Little Scrub Island~10|Mid Cay~11|North Cay~12|Prickly Pear Cays~13|Rabbit Island~14|Sandy Island/Sand Island~15|Scilly Cay~16|Scrub Island~17|Seal Island~18|Sombrero/Hat Island~19|South Cay~20|South Wager Island~21|West Cay~22"],["Antarctica","AQ","Antarctica~AQ"],["Antigua and Barbuda","AG","Antigua Island~01|Barbuda Island~02|Bird Island~04|Bishop Island~05|Blake Island~06|Crump Island~09|Dulcina Island~10|Exchange Island~11|Five Islands~12|Great Bird Island~13|Green Island~14|Guiana Island~15|Hawes Island~17|Hells Gate Island~16|Henry Island~18|Johnson Island~19|Kid Island~20|Lobster Island~22|Maiden Island~24|Moor Island~25|Nanny Island~26|Pelican Island~27|Prickly Pear Island~28|Rabbit Island~29|Red Head Island~31|Redonda Island~03|Sandy Island~32|Smith Island~33|The Sisters~34|Vernon Island~35|Wicked Will Island~36|York Island~37"],["Argentina","AR","Buenos Aires~B|Capital Federal~C|Catamarca~K|Chaco~H|Chubut~U|Córdoba~X|Corrientes~W|Entre Ríos~E|Formosa~P|Jujuy~Y|La Pampa~L|La Rioja~F|Mendoza~M|Misiones~N|Neuquén~Q|Río Negro~R|Salta~A|San Juan~J|San Luis~D|Santa Cruz~Z|Santa Fe~S|Santiago del Estero~G|Tierra del Fuego~V|Tucumán~T"],["Armenia","AM","Aragatsotn~AG|Ararat~AR|Armavir~AV|Gegharkunik~GR|Kotayk~KT|Lori~LO|Shirak~SH|Syunik~SU|Tavush~TV|Vayots Dzor~VD|Yerevan~ER"],["Aruba","AW","Aruba~AW"],["Australia","AU","Australian Capital Territory~ACT|New South Wales~NSW|Northern Territory~NT|Queensland~QLD|South Australia~SA|Tasmania~TAS|Victoria~VIC|Western Australia~WA"],["Austria","AT","Burgenland~1|Kärnten~2|Niederösterreich~3|Oberösterreich~4|Salzburg~5|Steiermark~6|Tirol~7|Vorarlberg~8|Wien~9"],["Azerbaijan","AZ","Abşeron~ABS|Ağcabədi~AGC|Ağdam~AGM|Ağdaş~AGS|Ağstafa~AGA|Ağsu~AGU|Astara~AST|Bakı~BAK|Babək~BAB|Balakən~BAL|Bərdə~BAR|Beyləqan~BEY|Biləsuvar~BIL|Cəbrayıl~CAB|Cəlilabad~CAL|Culfa~CUL|Daşkəsən~DAS|Füzuli~FUZ|Gədəbəy~GAD|Goranboy~GOR|Göyçay~GOY|Göygöl~GYG|Hacıqabul~HAC|İmişli~IMI|İsmayıllı~ISM|Kəlbəcər~KAL|Kǝngǝrli~KAN|Kürdəmir~KUR|Laçın~LAC|Lənkəran~LAN|Lerik~LER|Masallı~MAS|Neftçala~NEF|Oğuz~OGU|Ordubad~ORD|Qəbələ~QAB|Qax~QAX|Qazax~QAZ|Qobustan~QOB|Quba~QBA|Qubadli~QBI|Qusar~QUS|Saatlı~SAT|Sabirabad~SAB|Şabran~SBN|Sədərək~SAD|Şahbuz~SAH|Şəki~SAK|Salyan~SAL|Şamaxı~SMI|Şəmkir~SKR|Samux~SMX|Şərur~SAR|Siyəzən~SIY|Şuşa~SUS|Tərtər~TAR|Tovuz~TOV|Ucar~UCA|Xaçmaz~XAC|Xızı~XIZ|Xocalı~XCI|Xocavənd~XVD|Yardımlı~YAR|Yevlax~YEV|Zəngilan~ZAN|Zaqatala~ZAQ|Zərdab~ZAR"],["Bahamas","BS","Acklins Island~01|Berry Islands~22|Bimini~02|Black Point~23|Cat Island~03|Central Abaco~24|Crooked Island and Long Cay~28|East Grand Bahama~29|Exuma~04|Freeport~05|Fresh Creek~06|Governor's Harbour~07|Green Turtle Cay~08|Harbour Island~09|High Rock~10|Inagua~11|Kemps Bay~12|Long Island~13|Marsh Harbour~14|Mayaguana~15|Moore’s Island~40|New Providence~16|Nichollstown and Berry Islands~17|North Abaco~42|North Andros~41|North Eleuthera~33|Ragged Island~18|Rock Sound~19|San Salvador and Rum Cay~20|Sandy Point~21|South Abaco~35|South Andros~36|South Eleuthera~37|West Grand Bahama~39"],["Bahrain","BH","Al Janūbīyah~14|Al Manāmah~13|Al Muḩarraq~15|Al Wusţá~16|Ash Shamālīyah~17"],["Bangladesh","BD","Barisal~A|Chittagong~B|Dhaka~C|Khulna~D|Mymensingh~M|Rajshahi~E|Rangpur~F|Sylhet~G"],["Barbados","BB","Christ Church~01|Saint Andrew~02|Saint George~03|Saint James~04|Saint John~05|Saint Joseph~06|Saint Lucy~07|Saint Michael~08|Saint Peter~09|Saint Philip~10|Saint Thomas~11"],["Belarus","BY","Brest voblast~BR|Gorod Minsk~HM|Homiel voblast~HO|Hrodna voblast~HR|Mahilyow voblast~MA|Minsk voblast~MI|Vitsebsk voblast~VI"],["Belgium","BE","Brussels~BRU|Flanders~VLG|Wallonia~WAL"],["Belize","BZ","Belize District~BZ|Cayo District~CY|Corozal District~CZL|Orange Walk District~OW|Stann Creek District~SC|Toledo District~TOL"],["Benin","BJ","Alibori~AL|Atakora~AK|Atlantique~AQ|Borgou~BO|Collines Department~CO|Donga~DO|Kouffo~KO|Littoral Department~LI|Mono Department~MO|Ouémé~OU|Plateau~PL|Zou~ZO"],["Bermuda","BM","City of Hamilton~03|Devonshire Parish~01|Hamilton Parish~02|Paget Parish~04|Pembroke Parish~05|Sandys Parish~08|Smith's Parish~09|Southampton Parish~10|St. George's Parish~07|Town of St. George~06|Warwick Parish~11"],["Bhutan","BT","Bumthang~33|Chhukha~12|Dagana~22|Gasa~GA|Haa~13|Lhuntse~44|Mongar~42|Paro~11|Pemagatshel~43|Punakha~23|Samdrup Jongkhar~45|Samtse~14|Sarpang~31|Thimphu~15|Trashigang~41|Trashiyangtse~TY|Trongsa~32|Tsirang~21|Wangdue Phodrang~24|Zhemgang~34"],["Bolivia","BO","Beni~B|Chuquisaca~H|Cochabamba~C|La Paz~L|Oruro~O|Pando~N|Potosí~P|Santa Cruz~S|Tarija~T"],["Bonaire, Sint Eustatius and Saba","BQ","Bonaire~BO|Saba Isand~SA|Sint Eustatius~SE"],["Bosnia and Herzegovina","BA","Brčko Distrikt~BRC|Federacija Bosne i Hercegovine~BIH|Republika Srpska~SRP"],["Botswana","BW","Central~CE|Ghanzi~GH|Kgalagadi~KG|Kgatleng~KL|Kweneng~KW|North West~NW|North-East~NE|South East~SE|Southern~SO"],["Bouvet Island","BV","Bouvet Island~BV"],["Brazil","BR","Acre~AC|Alagoas~AL|Amapá~AP|Amazonas~AM|Bahia~BA|Ceará~CE|Distrito Federal~DF|Espírito Santo~ES|Goiás~GO|Maranhão~MA|Mato Grosso~MT|Mato Grosso do Sul~MS|Minas Gerais~MG|Pará~PA|Paraíba~PB|Paraná~PR|Pernambuco~PE|Piauí~PI|Rio de Janeiro~RJ|Rio Grande do Norte~RN|Rio Grande do Sul~RS|Rondônia~RO|Roraima~RR|Santa Catarina~SC|São Paulo~SP|Sergipe~SE|Tocantins~TO"],["British Indian Ocean Territory","IO","British Indian Ocean Territory~IO"],["Brunei Darussalam","BN","Belait~BE|Brunei Muara~BM|Temburong~TE|Tutong~TU"],["Bulgaria","BG","Blagoevgrad~01|Burgas~02|Dobrich~08|Gabrovo~07|Jambol~28|Khaskovo~26|Kjustendil~10|Kurdzhali~09|Lovech~11|Montana~12|Pazardzhik~13|Pernik~14|Pleven~15|Plovdiv~16|Razgrad~17|Ruse~18|Shumen~27|Silistra~19|Sliven~20|Smoljan~21|Sofija~23|Sofija-Grad~22|Stara Zagora~24|Turgovishhe~25|Varna~03|Veliko Turnovo~04|Vidin~05|Vraca~06"],["Burkina Faso","BF","Balé~BAL|Bam/Lake Bam~BAM|Banwa Province~BAN|Bazèga~BAZ|Bougouriba~BGR|Boulgou Province~BLG|Boulkiemdé~BLK|Comoé/Komoe~COM|Ganzourgou Province~GAN|Gnagna~GNA|Gourma Province~GOU|Houet~HOU|Ioba~IOB|Kadiogo~KAD|Kénédougou~KEN|Komondjari~KMD|Kompienga~KMP|Kossi Province~KOS|Koulpélogo~KOP|Kouritenga~KOT|Kourwéogo~KOW|Léraba~LER|Loroum~LOR|Mouhoun~MOU|Namentenga~NAM|Naouri/Nahouri~NAO|Nayala~NAY|Noumbiel~NOU|Oubritenga~OUB|Oudalan~OUD|Passoré~PAS|Poni~PON|Sanguié~SNG|Sanmatenga~SMT|Séno~SEN|Sissili~SIS|Soum~SOM|Sourou~SOR|Tapoa~TAP|Tui/Tuy~TUI|Yagha~YAG|Yatenga~YAT|Ziro~ZIR|Zondoma~ZON|Zoundwéogo~ZOU"],["Burundi","BI","Bubanza~BB|Bujumbura Mairie~BM|Bujumbura Rural~BL|Bururi~BR|Cankuzo~CA|Cibitoke~CI|Gitega~GI|Karuzi~KR|Kayanza~KY|Kirundo~KI|Makamba~MA|Muramvya~MU|Muyinga~MY|Mwaro~MW|Ngozi~NG|Rutana~RT|Ruyigi~RY"],["Cambodia","KH","Baat Dambang~2|Banteay Mean Chey~1|Kampong Chaam~3|Kampong Chhnang~4|Kampong Spueu~5|Kampong Thum~6|Kampot~7|Kandaal~8|Kaoh Kong~9|Kracheh~10|Krong Kaeb~23|Krong Pailin~24|Krong Preah Sihanouk~18|Mondol Kiri~11|Otdar Mean Chey~22|Phnom Penh~12|Pousaat~15|Preah Vihear~13|Prey Veaeng~14|Rotanah Kiri~16|Siem Reab~17|Stueng Treng~19|Svaay Rieng~20|Taakaev~21|Tbong Khmum~25"],["Cameroon","CM","Adamaoua~AD|Centre~CE|Est~ES|Extrême-Nord~EN|Littoral~LT|Nord~NO|Nord-Ouest~NW|Ouest~OU|Sud~SU|Sud-Ouest~SW"],["Canada","CA","Alberta~AB|British Columbia~BC|Manitoba~MB|New Brunswick~NB|Newfoundland and Labrador~NL|Northwest Territories~NT|Nova Scotia~NS|Nunavut~NU|Ontario~ON|Prince Edward Island~PE|Quebec~QC|Saskatchewan~SK|Yukon~YT"],["Cape Verde","CV","Boa Vista~BV|Brava~BR|Calheta de São Miguel~CS|Maio~MA|Mosteiros~MO|Paúl~PA|Porto Novo~PN|Praia~PR|Ribeira Brava~RB|Ribeira Grande~RG|Sal~SL|Santa Catarina~CA|Santa Cruz~CR|São Domingos~SD|São Filipe~SF|São Nicolau~SN|São Vicente~SV|Tarrafal~TA|Tarrafal de São Nicolau~TS"],["Cayman Islands","KY","Creek~undefined|Eastern~undefined|Midland~undefined|South Town~undefined|Spot Bay~undefined|Stake Bay~undefined|West End~undefined|Western~undefined"],["Central African Republic","CF","Bamingui-Bangoran~BB|Bangui~BGF|Basse-Kotto~BK|Haute-Kotto~HK|Haut-Mbomou~HM|Kémo~KG|Lobaye~LB|Mambéré-Kadéï~HS|Mbomou~MB|Nana-Grebizi~10|Nana-Mambéré~NM|Ombella-M'Poko~MP|Ouaka~UK|Ouham~AC|Ouham Péndé~OP|Sangha-Mbaéré~SE|Vakaga~VK"],["Chad","TD","Bahr el Ghazal~BG|Batha~BA|Borkou~BO|Chari-Baguirmi~CB|Ennedi-Est~EE|Ennedi-Ouest~EO|Guéra~GR|Hadjer Lamis~HL|Kanem~KA|Lac~LC|Logone Occidental~LO|Logone Oriental~LR|Mondoul~MA|Mayo-Kébbi-Est~ME|Moyen-Chari~MC|Ouaddai~OD|Salamat~SA|Sila~SI|Tandjilé~TA|Tibesti~TI|Ville de Ndjamena~ND|Wadi Fira~WF"],["Chile","CL","Aisén del General Carlos Ibáñez del Campo~AI|Antofagasta~AN|Araucanía~AR|Arica y Parinacota~AP|Atacama~AT|Bío-Bío~BI|Coquimbo~CO|Libertador General Bernardo O'Higgins~LI|Los Lagos~LL|Los Ríos~LR|Magallanes y Antartica Chilena~MA|Marga-Marga~|Maule~ML|Ñuble~NB|Región Metropolitana de Santiago~RM|Tarapacá~TA|Valparaíso~VS"],["China","CN","Anhui~34|Beijing~11|Chongqing~50|Fujian~35|Gansu~62|Guangdong~44|Guangxi~45|Guizhou~52|Hainan~46|Hebei~13|Heilongjiang~23|Henan~41|Hong Kong~91|Hubei~42|Hunan~43|Inner Mongolia~15|Jiangsu~32|Jiangxi~36|Jilin~22|Liaoning~21|Macau~92|Ningxia~64|Qinghai~63|Shaanxi~61|Shandong~37|Shanghai~31|Shanxi~14|Sichuan~51|Tianjin~12|Tibet~54|Xinjiang~65|Yunnan~53|Zhejiang~33"],["Christmas Island","CX","Christmas Island~CX"],["Cocos (Keeling) Islands","CC","Direction Island~DI|Home Island~HM|Horsburgh Island~HR|North Keeling Island~NK|South Island~SI|West Island~WI"],["Colombia","CO","Amazonas~AMA|Antioquia~ANT|Arauca~ARA|Archipiélago de San Andrés~SAP|Atlántico~ATL|Bogotá D.C.~DC|Bolívar~BOL|Boyacá~BOY|Caldas~CAL|Caquetá~CAQ|Casanare~CAS|Cauca~CAU|Cesar~CES|Chocó~CHO|Córdoba~COR|Cundinamarca~CUN|Guainía~GUA|Guaviare~GUV|Huila~HUI|La Guajira~LAG|Magdalena~MAG|Meta~MET|Nariño~NAR|Norte de Santander~NSA|Putumayo~PUT|Quindío~QUI|Risaralda~RIS|Santander~SAN|Sucre~SUC|Tolima~TOL|Valle del Cauca~VAC|Vaupés~VAU|Vichada~VID"],["Comoros","KM","Andjazîdja~G|Andjouân~A|Moûhîlî~M"],["Congo, Republic of the (Brazzaville)","CG","Bouenza~11|Brazzaville~BZV|Cuvette~8|Cuvette-Ouest~15|Kouilou~5|Lékoumou~2|Likouala~7|Niari~9|Plateaux~14|Pointe-Noire~16|Pool~12|Sangha~13"],["Congo, the Democratic Republic of the (Kinshasa)","CD","Bandundu~BN|Bas-Congo~BC|Équateur~EQ|Kasaï-Occidental~KE|Kasaï-Oriental~KW|Katanga~KA|Kinshasa~KN|Maniema~MA|Nord-Kivu~NK|Orientale~OR|Sud-Kivu~SK"],["Cook Islands","CK","Aitutaki~undefined|Atiu~undefined|Avarua~undefined|Mangaia~undefined|Manihiki~undefined|Ma'uke~undefined|Mitiaro~undefined|Nassau~undefined|Palmerston~undefined|Penrhyn~undefined|Pukapuka~undefined|Rakahanga~undefined"],["Costa Rica","CR","Alajuela~2|Cartago~3|Guanacaste~5|Heredia~4|Limón~7|Puntarenas~6|San José~1"],["Côte d'Ivoire, Republic of","CI","Agnéby~16|Bafing~17|Bas-Sassandra~09|Denguélé~10|Dix-Huit Montagnes~06|Fromager~18|Haut-Sassandra~02|Lacs~07|Lagunes~01|Marahoué~12|Moyen-Cavally~19|Moyen-Comoé~05|N'zi-Comoé~11|Savanes~03|Sud-Bandama~15|Sud-Comoé~13|Vallée du Bandama~04|Worodougou~14|Zanzan~08"],["Croatia","HR","Bjelovarsko-Bilogorska Županija~07|Brodsko-Posavska Županija~12|Dubrovačko-Neretvanska Županija~19|Grad Zagreb~21|Istarska Županija~18|Karlovačka Županija~04|Koprivničko-Krizevačka Županija~06|Krapinsko-Zagorska Županija~02|Ličko-Senjska Županija~09|Međimurska Županija~20|Osječko-Baranjska Županija~14|Požeško-Slavonska Županija~11|Primorsko-Goranska Županija~08|Sisačko-Moslavačka Županija~03|Splitsko-Dalmatinska Županija~17|Sibensko-Kninska Županija~15|Varaždinska Županija~05|Virovitičko-Podravska Županija~10|Vukovarsko-Srijemska Županija~16|Zadarska Županija~13|Zagrebacka Zupanija~01"],["Cuba","CU","Artemisa~15|Camagüey~09|Ciego de Ávila~08|Cienfuegos~06|Granma~12|Guantánamo~14|Holguín~11|Isla de la Juventud~99|La Habana~03|Las Tunas~10|Matanzas~04|Mayabeque~16|Pinar del Río~01|Sancti Spíritus~07|Santiago de Cuba~13|Villa Clara~05"],["Curaçao","CW","Curaçao~CW"],["Cyprus","CY","Ammochostos~04|Keryneia~05|Larnaka~03|Lefkosia~01|Lemesos~02|Pafos~05"],["Czech Republic","CZ","Hlavní město Praha~PR|Jihočeský kraj~JC|Jihomoravský kraj~JM|Karlovarský kraj~KA|Královéhradecký kraj~KR|Liberecký kraj~LI|Moravskoslezský kraj~MO|Olomoucký kraj~OL|Pardubický kraj~PA|Plzeňský kraj~PL|Středočeský kraj~ST|Ústecký kraj~US|Vysočina~VY|Zlínský kraj~ZL"],["Denmark","DK","Hovedstaden~84|Kujalleq~GL-KU|Midtjylland~82|Norderøerne~FO-01|Nordjylland~81|Østerø~FO-06|Qaasuitsup~GL-QA|Qeqqata~GL-QE|Sandø~FO-02|Sermersooq~GL-SM|Sjælland~85|Strømø~FO-03|Suderø~FO-04|Syddanmark~83|Vågø~FO-05"],["Djibouti","DJ","Ali Sabieh~AS|Arta~AR|Dikhil~DI|Obock~OB|Tadjourah~TA"],["Dominica","DM","Saint Andrew Parish~02|Saint David Parish~03|Saint George Parish~04|Saint John Parish~05|Saint Joseph Parish~06|Saint Luke Parish~07|Saint Mark Parish~08|Saint Patrick Parish~09|Saint Paul Parish~10|Saint Peter Parish~11"],["Dominican Republic","DO","Cibao Central~02|Del Valle~37|Distrito Nacional~01|Enriquillo~38|Norcentral~04|Nordeste~34|Noroeste~34|Norte~35|Valdesia~42"],["Ecuador","EC","Azuay~A|Bolívar~B|Cañar~F|Carchi~C|Chimborazo~H|Cotopaxi~X|El Oro~O|Esmeraldas~E|Galápagos~W|Guayas~G|Imbabura~I|Loja~L|Los Ríos~R|Manabí~M|Morona-Santiago~S|Napo~N|Orellana~D|Pastaza~Y|Pichincha~P|Santa Elena~SE|Santo Domingo de los Tsáchilas~SD|Sucumbíos~U|Tungurahua~T|Zamora-Chinchipe~Z"],["Egypt","EG","Alexandria~ALX|Aswan~ASN|Asyout~AST|Bani Sueif~BNS|Beheira~BH|Cairo~C|Daqahlia~DK|Dumiat~DT|El Bahr El Ahmar~BA|El Ismailia~IS|El Suez~SUZ|El Wadi El Gedeed~WAD|Fayoum~FYM|Gharbia~GH|Giza~SUZ|Helwan~HU|Kafr El Sheikh~KFS|Luxor~LX|Matrouh~MT|Menia~MN|Menofia~MNF|North Sinai~SIN|Port Said~PTS|Qalubia~KB|Qena~KN|Sharqia~SHR|Sixth of October~SU|Sohag~SHG|South Sinai~JS"],["El Salvador","SV","Ahuachapán~AH|Cabañas~CA|Cuscatlán~CU|Chalatenango~CH|La Libertad~LI|La Paz~PA|La Unión~UN|Morazán~MO|San Miguel~SM|San Salvador~SS|Santa Ana~SA|San Vicente~SV|Sonsonate~SO|Usulután~US"],["Equatorial Guinea","GQ","Annobón~AN|Bioko Norte~BN|Bioko Sur~BS|Centro Sur~CS|Kié-Ntem~KN|Litoral~LI|Wele-Nzas~WN"],["Eritrea","ER","Anseba~AN|Debub~DU|Debub-Keih-Bahri~DK|Gash-Barka~GB|Maekel~MA|Semien-Keih-Bahri~SK"],["Estonia","EE","Harjumaa (Tallinn)~37|Hiiumaa (Kardla)~39|Ida-Virumaa (Johvi)~44|Järvamaa (Paide)~41|Jõgevamaa (Jogeva)~49|Läänemaa~57|Lääne-Virumaa (Rakvere)~59|Pärnumaa (Parnu)~67|Põlvamaa (Polva)~65|Raplamaa (Rapla)~70|Saaremaa (Kuessaare)~74|Tartumaa (Tartu)~78|Valgamaa (Valga)~82|Viljandimaa (Viljandi)~84|Võrumaa (Voru)~86"],["Ethiopia","ET","Addis Ababa~AA|Afar~AF|Amhara~AM|Benshangul-Gumaz~BE|Dire Dawa~DD|Gambela~GA|Harari~HA|Oromia~OR|Somali~SO|Southern Nations Nationalities and People's Region~SN|Tigray~TI"],["Falkland Islands (Islas Malvinas)","FK","Falkland Islands (Islas Malvinas)~undefined"],["Faroe Islands","FO","Bordoy~undefined|Eysturoy~undefined|Mykines~undefined|Sandoy~undefined|Skuvoy~undefined|Streymoy~undefined|Suduroy~undefined|Tvoroyri~undefined|Vagar~undefined"],["Fiji","FJ","Ba~01|Bua~01|Cakaudrove~03|Kadavu~04|Lau~05|Lomaiviti~06|Macuata~07|Nadroga and Navosa~08|Naitasiri~09|Namosi~10|Ra~011|Rewa~12|Rotuma~R|Serua~12|Tailevu~14"],["Finland","FI","Ahvenanmaan maakunta~FI-01|Etelä-Karjala~FI-02|Etelä-Pohjanmaa~FI-03|Etelä-Savo~FI-04|Kainuu~FI-05|Kanta-Häme~FI-06|Keski-Pohjanmaa~FI-07|Keski-Suomi~FI-08|Kymenlaakso~FI-09|Lappi~FI-10|Pirkanmaa~FI-11|Pohjanmaa~FI-12|Pohjois-Karjala~FI-13|Pohjois-Pohjanmaa~FI-14|Pohjois-Savo~FI-15|Päijät-Häme~FI-16|Satakunta~FI-17|Uusimaa~FI-18|Varsinais-Suomi~FI-19"],["France","FR","Auvergne-Rhône-Alpes~ARA|Bourgogne-Franche-Comté~BFC|Bretagne~BRE|Centre-Val de Loire~CVL|Corse~COR|Grand Est~GES|Hauts-de-France~HDF|Île-de-France~IDF|Normandie~NOR|Nouvelle-Aquitaine~NAQ|Occitanie~OCC|Pays de la Loire~PDL|Provence-Alpes-Cote d'Azur~PAC|Clipperton~CP|Guadeloupe~GP|Guyane~GF|Martinique~MQ|Mayotte~YT|Novelle-Calédonie~NC|Polynésie~PF|Saint-Pierre-et-Miquelon~PM|Saint Barthélemy~BL|Saint Martin~MF|Réunion~RE|Terres Australes Françaises~TF|Wallis-et-Futuna~WF"],["French Guiana","GF","French Guiana~undefined"],["French Polynesia","PF","Archipel des Marquises~undefined|Archipel des Tuamotu~undefined|Archipel des Tubuai~undefined|Iles du Vent~undefined|Iles Sous-le-Vent~undefined"],["French Southern and Antarctic Lands","TF","Adelie Land~undefined|Ile Crozet~undefined|Iles Kerguelen~undefined|Iles Saint-Paul et Amsterdam~undefined"],["Gabon","GA","Estuaire~1|Haut-Ogooué~2|Moyen-Ogooué~3|Ngounié~4|Nyanga~5|Ogooué-Ivindo~6|Ogooué-Lolo~7|Ogooué-Maritime~8|Woleu-Ntem~9"],["Gambia, The","GM","Banjul~B|Central River~M|Lower River~L|North Bank~N|Upper River~U|Western~W"],["Georgia","GE","Abkhazia (Sokhumi)~AB|Ajaria (Bat'umi)~AJ|Guria~GU|Imereti~IM|K'akheti~KA|Kvemo Kartli~KK|Mtshkheta-Mtianeti~MM|Rach'a-Lexhkumi-KvemoSvaneti~RL|Samegrelo-Zemo Svaneti~SZ|Samtskhe-Javakheti~SJ|Shida Kartli~SK|Tbilisi~TB"],["Germany","DE","Baden-Württemberg~BW|Bayern~BY|Berlin~BE|Brandenburg~BB|Bremen~HB|Hamburg~HH|Hessen~HE|Mecklenburg-Vorpommern~MV|Niedersachsen~NI|Nordrhein-Westfalen~NW|Rheinland-Pfalz~RP|Saarland~SL|Sachsen~SN|Sachsen-Anhalt~ST|Schleswig-Holstein~SH|Thüringen~TH"],["Ghana","GH","Ahafo~undefined|Ashanti~AH|Bono~undefined|Bono East~undefined|Central~CP|Eastern~EP|Greater Accra~AA|Northern~NP|North East~undefined|Oti~undefined|Savannah~undefined|Upper East~UE|Upper West~UW|Volta~TV|Western~WP|Western North~undefined"],["Gibraltar","GI","Gibraltar~undefined"],["Greece","GR","Anatolikí Makedonía kai Thráki~A|Attikḯ~I|Dytikí Elláda~G|Dytikí Makedonía~C|Ionía Nísia~F|Kentrikí Makedonía~B|Krítí~M|Notío Aigaío~L|Peloponnísos~J|Stereá Elláda~H|Thessalía~E|Voreío Aigaío~K|Ípeiros~D|Ágion Óros~69"],["Greenland","GL","Kommune Kujalleq~KU|Kommuneqarfik Sermersooq~SM|Qaasuitsup Kommunia~QA|Qeqqata Kommunia~QE"],["Grenada","GD","Saint Andrew~01|Saint David~02|Saint George~03|Saint John~04|Saint Mark~05|Saint Patrick~06|Southern Grenadine Islands~10"],["Guadeloupe","GP","Guadeloupe~undefined"],["Guam","GU","Guam~undefined"],["Guatemala","GT","Alta Verapaz~AV|Baja Verapaz~BV|Chimaltenango~CM|Chiquimula~CQ|El Progreso~PR|Escuintla~ES|Guatemala~GU|Huehuetenango~HU|Izabal~IZ|Jalapa~JA|Jutiapa~JU|Petén~PE|Quetzaltenango~QZ|Quiché~QC|Retalhuleu~Re|Sacatepéquez~SA|San Marcos~SM|Santa Rosa~SR|Sololá~SO|Suchitepéquez~SU|Totonicapán~TO|Zacapa~ZA"],["Guernsey","GG","Castel~undefined|Forest~undefined|St. Andrew~undefined|St. Martin~undefined|St. Peter Port~undefined|St. Pierre du Bois~undefined|St. Sampson~undefined|St. Saviour~undefined|Torteval~undefined|Vale~undefined"],["Guinea","GN","Boké~B|Conakry~C|Faranah~F|Kankan~K|Kindia~D|Labé~L|Mamou~M|Nzérékoré~N"],["Guinea-Bissau","GW","Bafatá~BA|Biombo~BM|Bissau~BS|Bolama-Bijagos~BL|Cacheu~CA|Gabú~GA|Oio~OI|Quinara~QU|Tombali~TO"],["Guyana","GY","Barima-Waini~BA|Cuyuni-Mazaruni~CU|Demerara-Mahaica~DE|East Berbice-Corentyne~EB|Essequibo Islands-West Demerara~ES|Mahaica-Berbice~MA|Pomeroon-Supenaam~PM|Potaro-Siparuni~PT|Upper Demerara-Berbice~UD|Upper Takutu-Upper Essequibo~UT"],["Haiti","HT","Artibonite~AR|Centre~CE|Grand'Anse~GA|Nippes~NI|Nord~ND|Nord-Est~NE|Nord-Ouest~NO|Ouest~OU|Sud~SD|Sud-Est~SE"],["Heard Island and McDonald Islands","HM","Heard Island and McDonald Islands~undefined"],["Holy See (Vatican City)","VA","Holy See (Vatican City)~01"],["Honduras","HN","Atlántida~AT|Choluteca~CH|Colón~CL|Comayagua~CM|Copán~CP|Cortés~CR|El Paraíso~EP|Francisco Morazan~FM|Gracias a Dios~GD|Intibucá~IN|Islas de la Bahía~IB|La Paz~LP|Lempira~LE|Ocotepeque~OC|Olancho~OL|Santa Bárbara~SB|Valle~VA|Yoro~YO"],["Hong Kong","HK","Hong Kong~HK"],["Hungary","HU","Bács-Kiskun~BK|Baranya~BA|Békés~BE|Békéscsaba~BC|Borsod-Abauj-Zemplen~BZ|Budapest~BU|Csongrád~CS|Debrecen~DE|Dunaújváros~DU|Eger~EG|Érd~ER|Fejér~FE|Győr~GY|Győr-Moson-Sopron~GS|Hajdú-Bihar~HB|Heves~HE|Hódmezővásárhely~HV|Jász-Nagykun-Szolnok~N|Kaposvár~KV|Kecskemét~KM|Komárom-Esztergom~KE|Miskolc~MI|Nagykanizsa~NK|Nógrád~NO|Nyíregyháza~NY|Pécs~PS|Pest~PE|Salgótarján~ST|Somogy~SO|Sopron~SN|Szabolcs-á-Bereg~SZ|Szeged~SD|Székesfehérvár~SF|Szekszárd~SS|Szolnok~SK|Szombathely~SH|Tatabánya~TB|Tolna~TO|Vas~VA|Veszprém~VE|Veszprém (City)~VM|Zala~ZA|Zalaegerszeg~ZE"],["Iceland","IS","Austurland~7|Höfuðborgarsvæði utan Reykjavíkur~1|Norðurland eystra~6|Norðurland vestra~5|Suðurland~8|Suðurnes~2|Vestfirðir~4|Vesturland~3"],["India","IN","Andaman and Nicobar Islands~AN|Andhra Pradesh~AP|Arunachal Pradesh~AR|Assam~AS|Bihar~BR|Chandigarh~CH|Chhattisgarh~CT|Dadra and Nagar Haveli~DN|Daman and Diu~DD|Delhi~DL|Goa~GA|Gujarat~GJ|Haryana~HR|Himachal Pradesh~HP|Jammu and Kashmir~JK|Jharkhand~JH|Karnataka~KA|Kerala~KL|Lakshadweep~LD|Madhya Pradesh~MP|Maharashtra~MH|Manipur~MN|Meghalaya~ML|Mizoram~MZ|Nagaland~NL|Odisha~OR|Puducherry~PY|Punjab~PB|Rajasthan~RJ|Sikkim~WK|Tamil Nadu~TN|Telangana~TG|Tripura~TR|Uttarakhand~UT|Uttar Pradesh~UP|West Bengal~WB"],["Indonesia","ID","Aceh~AC|Bali~BA|Bangka Belitung~BB|Banten~BT|Bengkulu~BE|Gorontalo~GO|Jakarta Raya~JK|Jambi~JA|Jawa Barat~JB|Jawa Tengah~JT|Jawa Timur~JI|Kalimantan Barat~KB|Kalimantan Selatan~KS|Kalimantan Tengah~KT|Kalimantan Timur~KI|Kalimantan Utara~KU|Kepulauan Riau~KR|Lampung~LA|Maluku~MA|Maluku Utara~MU|Nusa Tenggara Barat~NB|Nusa Tenggara Timur~NT|Papua~PA|Papua Barat~PB|Riau~RI|Sulawesi Selatan~SR|Sulawesi Tengah~ST|Sulawesi Tenggara~SG|Sulawesi Utara~SA|Sumatera Barat~SB|Sumatera Selatan~SS|Sumatera Utara~SU|Yogyakarta~YO"],["Iran, Islamic Republic of","IR","Alborz~32|Ardabīl~03|Āz̄arbāyjān-e Gharbī~02|Āz̄arbāyjān-e Sharqī~01|Būshehr~06|Chahār Maḩāl va Bakhtīārī~08|Eşfahān~04|Fārs~14|Gīlān~19|Golestān~27|Hamadān~24|Hormozgān~23|Īlām~05|Kermān~15|Kermānshāh~17|Khorāsān-e Jonūbī~29|Khorāsān-e Raẕavī~30|Khorāsān-e Shomālī~61|Khūzestān~10|Kohgīlūyeh va Bowyer Aḩmad~18|Kordestān~16|Lorestān~20|Markazi~22|Māzandarān~21|Qazvīn~28|Qom~26|Semnān~12|Sīstān va Balūchestān~13|Tehrān~07|Yazd~25|Zanjān~11"],["Iraq","IQ","Al Anbār~AN|Al Başrah~BA|Al Muthanná~MU|Al Qādisīyah~QA|An Najaf~NA|Arbīl~AR|As Sulaymānīyah~SU|Bābil~BB|Baghdād~BG|Dohuk~DA|Dhī Qār~DQ|Diyālá~DI|Karbalā'~KA|Kirkuk~KI|Maysān~MA|Nīnawá~NI|Şalāḩ ad Dīn~SD|Wāsiţ~WA"],["Ireland","IE","Carlow~CW|Cavan~CN|Clare~CE|Cork~CO|Donegal~DL|Dublin~D|Galway~G|Kerry~KY|Kildare~KE|Kilkenny~KK|Laois~LS|Leitrim~LM|Limerick~LK|Longford~LD|Louth~LH|Mayo~MO|Meath~MH|Monaghan~MN|Offaly~OY|Roscommon~RN|Sligo~SO|Tipperary~TA|Waterford~WD|Westmeath~WH|Wexford~WX|Wicklow~WW"],["Isle of Man","IM","Isle of Man~undefined"],["Israel","IL","HaDarom~D|HaMerkaz~M|HaTsafon~Z|H̱efa~HA|Tel-Aviv~TA|Yerushalayim~JM"],["Italy","IT","Abruzzo~65|Basilicata~77|Calabria~78|Campania~72|Emilia-Romagna~45|Friuli-Venezia Giulia~36|Lazio~62|Liguria~42|Lombardia~25|Marche~57|Molise~67|Piemonte~21|Puglia~75|Sardegna~88|Sicilia~82|Toscana~52|Trentino-Alto Adige~32|Umbria~55|Valle d'Aosta~23|Veneto~34"],["Jamaica","JM","Clarendon~13|Hanover~09|Kingston~01|Manchester~12|Portland~04|Saint Andrew~02|Saint Ann~06|Saint Catherine~14|Saint Elizabeth~11|Saint James~08|Saint Mary~05|Saint Thomas~03|Trelawny~07|Westmoreland~10"],["Japan","JP","Aichi~23|Akita~05|Aomori~02|Chiba~12|Ehime~38|Fukui~18|Fukuoka~40|Fukushima~07|Gifu~21|Gunma~10|Hiroshima~34|Hokkaido~01|Hyogo~28|Ibaraki~08|Ishikawa~17|Iwate~03|Kagawa~37|Kagoshima~46|Kanagawa~14|Kochi~39|Kumamoto~43|Kyoto~26|Mie~24|Miyagi~04|Miyazaki~45|Nagano~20|Nagasaki~42|Nara~29|Niigata~15|Oita~44|Okayama~33|Okinawa~47|Osaka~27|Saga~41|Saitama~11|Shiga~25|Shimane~32|Shizuoka~22|Tochigi~09|Tokushima~36|Tokyo~13|Tottori~31|Toyama~16|Wakayama~30|Yamagata~06|Yamaguchi~35|Yamanashi~19"],["Jersey","JE","Jersey~undefined"],["Jordan","JO","‘Ajlūn~AJ|Al 'Aqabah~AQ|Al Balqā’~BA|Al Karak~KA|Al Mafraq~MA|Al ‘A̅şimah~AM|Aţ Ţafīlah~AT|Az Zarqā’~AZ|Irbid~IR|Jarash~JA|Ma‘ān~MN|Mādabā~MD"],["Kazakhstan","KZ","Almaty~ALA|Aqmola~AKM|Aqtobe~AKT|Astana~AST|Atyrau~ATY|Batys Qazaqstan~ZAP|Bayqongyr~undefined|Mangghystau~MAN|Ongtustik Qazaqstan~YUZ|Pavlodar~PAV|Qaraghandy~KAR|Qostanay~KUS|Qyzylorda~KZY|Shyghys Qazaqstan~VOS|Soltustik Qazaqstan~SEV|Zhambyl~ZHA"],["Kenya","KE","Baringo~01|Bomet~02|Bungoma~03|Busia~04|Eleyo/Marakwet~05|Embu~06|Garissa~07|Homa Bay~08|Isiolo~09|Kajiado~10|Kakamega~11|Kericho~12|Kiambu~13|Kilifi~14|Kirinyaga~15|Kisii~16|Kisumu~17|Kitui~18|Kwale~19|Laikipia~20|Lamu~21|Machakos~22|Makueni~23|Mandera~24|Marsabit~25|Meru~26|Migori~27|Mombasa~28|Murang'a~29|Nairobi City~30|Nakuru~31|Nandi~32|Narok~33|Nyamira~34|Nyandarua~35|Nyeri~36|Samburu~37|Siaya~38|Taita/Taveta~39|Tana River~40|Tharaka-Nithi~41|Trans Nzoia~42|Turkana~43|Uasin Gishu~44|Vihiga~45|Wajir~46|West Pokot~47"],["Kiribati","KI","Abaiang~undefined|Abemama~undefined|Aranuka~undefined|Arorae~undefined|Banaba~undefined|Beru~undefined|Butaritari~undefined|Central Gilberts~undefined|Gilbert Islands~G|Kanton~undefined|Kiritimati~undefined|Kuria~undefined|Line Islands~L|Maiana~undefined|Makin~undefined|Marakei~undefined|Nikunau~undefined|Nonouti~undefined|Northern Gilberts~undefined|Onotoa~undefined|Phoenix Islands~P|Southern Gilberts~undefined|Tabiteuea~undefined|Tabuaeran~undefined|Tamana~undefined|Tarawa~undefined|Teraina~undefined"],["Korea, Democratic People's Republic of","KP","Chagang-do (Chagang Province)~04|Hamgyong-bukto (North Hamgyong Province)~09|Hamgyong-namdo (South Hamgyong Province)~08|Hwanghae-bukto (North Hwanghae Province)~06|Hwanghae-namdo (South Hwanghae Province)~05|Kangwon-do (Kangwon Province)~07|Nasŏn (Najin-Sŏnbong)~13|P'yongan-bukto (North P'yongan Province)~03|P'yongan-namdo (South P'yongan Province)~02|P'yongyang-si (P'yongyang City)~01|Yanggang-do (Yanggang Province)~10"],["Korea, Republic of","KR","Ch'ungch'ongbuk-do~43|Ch'ungch'ongnam-do~44|Cheju-do~49|Chollabuk-do~45|Chollanam-do~46|Inch'on-Kwangyokhi~28|Kang-won-do~42|Kwangju-Kwangyokshi~28|Kyonggi-do~41|Kyongsangbuk-do~47|Kyongsangnam-do~48|Pusan-Kwangyokshi~26|Seoul-T'ukpyolshi~11|Sejong~50|Taegu-Kwangyokshi~27|Taejon-Kwangyokshi~30|Ulsan-Kwangyokshi~31"],["Kuwait","KW","Al Aḩmadi~AH|Al Farwānīyah~FA|Al Jahrā’~JA|Al ‘Āşimah~KU|Ḩawallī~HA|Mubārak al Kabir~MU"],["Kyrgyzstan","KG","Batken Oblasty~B|Bishkek Shaary~GB|Chuy Oblasty (Bishkek)~C|Jalal-Abad Oblasty~J|Naryn Oblasty~N|Osh Oblasty~O|Talas Oblasty~T|Ysyk-Kol Oblasty (Karakol)~Y"],["Laos","LA","Attapu~AT|Bokèo~BK|Bolikhamxai~BL|Champasak~CH|Houaphan~HO|Khammouan~KH|Louang Namtha~LM|Louangphabang~LP|Oudômxai~OU|Phôngsali~PH|Salavan~SL|Savannakhét~SV|Vientiane~VI|Xaignabouli~XA|Xékong~XE|Xaisomboun~XS|Xiangkhouang~XI"],["Latvia","LV","Aglona~001|Aizkraukle~002|Aizpute~003|Aknīste~004|Aloja~005|Alsunga~06|Alūksne~007|Amata~008|Ape~009|Auce~010|Ādaži~011|Babīte~012|Baldone~013|Baltinava~014|Balvi~015|Bauska~016|Beverīna~017|Brocēni~018|Burtnieki~019|Carnikava~020|Cesvaine~021|Cēsis~022|Cibla~023|Dagda~024|Daugavpils~025|Daugavpils (City)~DGV|Dobele~026|Dundaga~027|Durbe~028|Engure~029|Ērgļi~030|Garkalne~031|Grobiņa~032|Gulbene~033|Iecava~034|Ikšķile~035|Ilūkste~036|Inčukalns~037|Jaunjelgava~038|Jaunpiebalga~039|Jaunpils~040|Jelgava~041|Jelgava (City)~JEL|Jēkabpils~042|Jēkabpils (City)~JKB|Jūrmala (City)~JUR|Kandava~043|Kārsava~044|Kocēni~045|Koknese~046|Krāslava~047|Krimulda~048|Krustpils~049|Kuldīga~050|Ķegums~051|Ķekava~052|Lielvārde~053|Liepāja~LPX|Limbaži~054|Līgatne~055|Līvāni~056|Lubāna~057|Ludza~058|Madona~059|Mazsalaca~060|Mālpils~061|Mārupe~062|Mērsrags~063|Naukšēni~064|Nereta~065|Nīca~066|Ogre~067|Olaine~068|Ozolnieki~069|Pārgauja~070|Pāvilosta~071|Pļaviņas~072|Preiļi~073|Priekule~074|Priekuļi~075|Rauna~076|Rēzekne~077|Rēzekne (City)~REZ|Riebiņi~078|Rīga~RIX|Roja~079|Ropaži~080|Rucava~081|Rugāji~082|Rundāle~083|Rūjiena~084|Sala~085|Salacgrīva~086|Salaspils~087|Saldus~088|Saulkrasti~089|Sēja~090|Sigulda~091|Skrīveri~092|Skrunda~093|Smiltene~094|Stopiņi~095|Strenči~096|Talsi~097|Tērvete~098|Tukums~099|Vaiņode~100|Valka~101|Valmiera~VMR|Varakļāni~102|Vārkava~103|Vecpiebalga~104|Vecumnieki~105|Ventspils~106|Ventspils (City)~VEN|Viesīte~107|Viļaka~108|Viļāni~109|Zilupe~110"],["Lebanon","LB","Aakkâr~AK|Baalbelk-Hermel~BH|Béqaa~BI|Beyrouth~BA|Liban-Nord~AS|Liban-Sud~JA|Mont-Liban~JL|Nabatîyé~NA"],["Lesotho","LS","Berea~D|Butha-Buthe~B|Leribe~C|Mafeteng~E|Maseru~A|Mohales Hoek~F|Mokhotlong~J|Qacha's Nek~H|Quthing~G|Thaba-Tseka~K"],["Liberia","LR","Bomi~BM|Bong~BG|Gbarpolu~GP|Grand Bassa~GB|Grand Cape Mount~CM|Grand Gedeh~GG|Grand Kru~GK|Lofa~LO|Margibi~MG|Maryland~MY|Montserrado~MO|Nimba~NI|River Cess~RI|River Geee~RG|Sinoe~SI"],["Libya","LY","Al Buţnān~BU|Al Jabal al Akhḑar~JA|Al Jabal al Gharbī~JG|Al Jafārah~JA|Al Jufrah~JU|Al Kufrah~FK|Al Marj~MJ|Al Marquab~MB|Al Wāḩāt~WA|An Nuqaţ al Khams~NQ|Az Zāwiyah~ZA|Banghāzī~BA|Darnah~DR|Ghāt~GH|Mişrātah~MI|Murzuq~MQ|Nālūt~NL|Sabhā~SB|Surt~SR|Ţarābulus~TB|Yafran~WD|Wādī ash Shāţiʾ~WS"],["Liechtenstein","LI","Balzers~01|Eschen~02|Gamprin~03|Mauren~04|Planken~05|Ruggell~06|Schaan~07|Schellenberg~08|Triesen~09|Triesenberg~10|Vaduz~11"],["Lithuania","LT","Alytaus~AL|Kauno~KU|Klaipėdos~KL|Marijampolės~MR|Panevėžio~PN|Šiaulių~SA|Tauragės~TA|Telšių~TE|Utenos~UT|Vilniaus~VL"],["Luxembourg","LU","Capellen~CA|Clevaux~CL|Diekirch~DI|Echternach~EC|Esch-sur-Alzette~ES|Grevenmacher~GR|Luxembourg~LU|Mersch~ME|Redange~RD|Remich~RM|Vianden~VD|Wiltz~WI"],["Macao","MO","Macao~undefined"],["Macedonia, Republic of","MK","Aračinovo~02|Berovo~03|Bitola~04|Bogdanci~05|Bogovinje~06|Bosilovo~07|Brvenica~08|Centar Župa~78|Čaška~08|Češinovo-Obleševo~81|Čučer Sandevo~82|Debar~21|Debarca~22|Delčevo~23|Demir Hisar~25|Demir Kapija~24|Doran~26|Dolneni~27|Gevgelija~18|Gostivar~19|Gradsko~20|Ilinden~34|Jegunovce~35|Karbinci~37|Kavadarci~36|Kičevo~40|Kočani~42|Konče~41|Kratovo~43|Kriva Palanka~44|Krivogaštani~45|Kruševo~46|Kumanovo~47|Lipkovo~48|Lozovo~49|Makedonska Kamenica~51|Makedonski Brod~52|Mavrovo i Rostuša~50|Mogila~53|Negotino~54|Novaci~55|Novo Selo~56|Ohrid~58|Pehčevo~60|Petrovec~59|Plasnica~61|Prilep~62|Probištip~63|Radoviš~|Rankovce~65|Resen~66|Rosoman~67|Skopje~85|Sopište~70|Staro Nagoričane~71|Struga~72|Strumica~73|Studeničani~74|Sveti Nikole~69|Štip~83|Tearce~75|Tetovo~76|Valandovo~10|Vasilevo~11|Veles~13|Vevčani~12|Vinica~14|Vrapčište~16|Zelenikovo~32|Zrnovci~33|Želino~30"],["Madagascar","MG","Antananarivo~T|Antsiranana~D|Fianarantsoa~F|Mahajanga~M|Toamasina~A|Toliara~U"],["Malawi","MW","Balaka~BA|Blantyre~BL|Chikwawa~CK|Chiradzulu~CR|Chitipa~CT|Dedza~DE|Dowa~DO|Karonga~KR|Kasungu~KS|Likoma~LK|Lilongwe~LI|Machinga~MH|Mangochi~MG|Mchinji~MC|Mulanje~MU|Mwanza~MW|Mzimba~MZ|Nkhata Bay~NE|Nkhotakota~NB|Nsanje~NS|Ntcheu~NU|Ntchisi~NI|Phalombe~PH|Rumphi~RU|Salima~SA|Thyolo~TH|Zomba~ZO"],["Malaysia","MY","Johor~01|Kedah~02|Kelantan~03|Melaka~04|Negeri Sembilan~05|Pahang~06|Perak~08|Perlis~09|Pulau Pinang~07|Sabah~12|Sarawak~13|Selangor~10|Terengganu~11|Wilayah Persekutuan (Kuala Lumpur)~14|Wilayah Persekutuan (Labuan)~15|Wilayah Persekutuan (Putrajaya)~16"],["Maldives","MV","Alifu Alifu~02|Alifu Dhaalu~00|Baa~20|Dhaalu~17|Faafu~14|Gaafu Alifu~27|Gaafu Dhaalu~28|Gnaviyani~29|Haa Alifu~07|Haa Dhaalu~23|Kaafu~29|Laamu~05|Lhaviyani~03|Malé~MLE|Meemu~12|Noonu~25|Raa~13|Seenu~01|Shaviyani~24|Thaa~08|Vaavu~04"],["Mali","ML","Bamako~BKO|Gao~7|Kayes~1|Kidal~8|Koulikoro~2|Mopti~5|Segou~4|Sikasso~3|Tombouctou~6"],["Malta","MT","Attard~01|Balzan~02|Birgu~03|Birkirkara~04|Birżebbuġa~05|Bormla~06|Dingli~07|Fgura~08|Floriana~09|Fontana~10|Guda~11|Gżira~12|Għajnsielem~13|Għarb~14|Għargħur~15|Għasri~16|Għaxaq~17|Ħamrun~18|Iklin~19|Isla~20|Kalkara~21|Kerċem~22|Kirkop~23|Lija~24|Luqa~25|Marsa~26|Marsaskala~27|Marsaxlokk~28|Mdina~29|Mellieħa~30|Mġarr~31|Mosta~32|Mqabba~33|Msida~34|Mtarfa~35|Munxar~36|Nadur~37|Naxxar~38|Paola~39|Pembroke~40|Pietà~41|Qala~42|Qormi~43|Qrendi~44|Rabat Għawdex~45|Rabat Malta~46|Safi~47|San Ġiljan~48|San Ġwann~49|San Lawrenz~50|San Pawl il-Baħar~51|Sannat~52|Santa Luċija~53|Santa Venera~54|Siġġiewi~55|Sliema~56|Swieqi~57|Tai Xbiex~58|Tarzien~59|Valletta~60|Xagħra~61|Xewkija~62|Xgħajra~63|Żabbar~64|Żebbuġ Għawde~65|Żebbuġ Malta~66|Żejtun~67|Żurrieq~68"],["Marshall Islands","MH","Ailinglaplap~ALL|Ailuk~ALK|Arno~ARN|Aur~AUR|Bikini and Kili~KIL|Ebon~EBO|Jabat~JAB|Jaluit~JAL|Kwajalein~KWA|Lae~LAE|Lib~LIB|Likiep~LIK|Majuro~MAJ|Maloelap~MAL|Mejit~MEJ|Namdrik~NMK|Namu~NMU|Rongelap~RON|Ujae~UJA|Utrik~UTI|Wotho~WTH|Wotje~WTJ"],["Martinique","MQ","Martinique~undefined"],["Mauritania","MR","Adrar~07|Assaba~03|Brakna~05|Dakhlet Nouadhibou~08|Gorgol~04|Guidimaka~10|Hodh Ech Chargui~01|Hodh El Gharbi~02|Inchiri~12|Nouakchott Nord~14|Nouakchott Ouest~13|Nouakchott Sud~15|Tagant~09|Tiris Zemmour~11|Trarza~06"],["Mauritius","MU","Agalega Islands~AG|Beau Bassin-Rose Hill~BR|Black River~BL|Cargados Carajos Shoals~CC|Curepipe~CU|Flacq~FL|Grand Port~GP|Moka~MO|Pamplemousses~PA|Plaines Wilhems~PW|Port Louis (City)~PU|Port Louis~PL|Riviere du Rempart~RR|Rodrigues Island~RO|Savanne~SA|Vacoas-Phoenix~CP"],["Mayotte","YT","Dzaoudzi~01|Pamandzi~02|Mamoudzou~03|Dembeni~04|Bandrélé~05|Kani-Kéli~06|Bouéni~07|Chirongui~08|Sada~09|Ouangani~10|Chiconi~11|Tsingoni~12|M'Tsangamouji~13|Acoua~14|Mtsamboro~15|Bandraboua~16|Koungou~17"],["Mexico","MX","Aguascalientes~AGU|Baja California~BCN|Baja California Sur~BCS|Campeche~CAM|Ciudad de México~DIF|Chiapas~CHP|Chihuahua~CHH|Coahuila de Zaragoza~COA|Colima~COL|Durango~DUR|Estado de México~MEX|Guanajuato~GUA|Guerrero~GRO|Hidalgo~HID|Jalisco~JAL|Michoacán de Ocampo~MIC|Morelos~MOR|Nayarit~NAY|Nuevo León~NLE|Oaxaca~OAX|Puebla~PUE|Querétaro de Arteaga~QUE|Quintana Roo~ROO|San Luis Potosí~SLP|Sinaloa~SIN|Sonora~SON|Tabasco~TAB|Tamaulipas~TAM|Tlaxcala~TLA|Veracruz~VER|Yucatán~YUC|Zacatecas~ZAC"],["Micronesia, Federated States of","FM","Chuuk (Truk)~TRK|Kosrae~KSA|Pohnpei~PNI|Yap~YAP"],["Moldova","MD","Aenii Noi~AN|Basarabeasca~BS|Bălți~BA|Bender~BD|Briceni~BR|Cahul~CA|Cantemir~CT|Călărași~CL|Căușeni~CS|Chișinău~CU|Cimișlia~CM|Criuleni~CR|Dondușeni~DO|Drochia~DR|Dubăsari~DU|Edineț~ED|Fălești~FA|Florești~FL|Găgăuzia~GA|Glodeni~GL|Hîncești~HI|Ialoveni~IA|Leova~LE|Nisporeni~NI|Ocnița~OC|Orhei~OR|Rezina~RE|Rîșcani~RI|Sîngerei~SI|Soroca~SO|Stînga Nistrului~SN|Strășeni~ST|Șoldănești~SD|Ștefan Vodă~SV|Taraclia~TA|Telenești~TE|Ungheni~UN"],["Monaco","MC","Colle~CL|Condamine~CO|Fontvieille~FO|Gare~GA|Jardin Exotique~JE|Larvotto~LA|Malbousquet~MA|Monaco-Ville~MO|Moneghetti~MG|Monte-Carlo~MC|Moulins~MU|Port-Hercule~PH|Saint-Roman~SR|Sainte-Dévote~SD|Source~SO|Spélugues~SP|Vallon de la Rousse~VR"],["Mongolia","MN","Arhangay~073|Bayan-Olgiy~071|Bayanhongor~069|Bulgan~067|Darhan~037|Dornod~061|Dornogovi~063|Dundgovi~059|Dzavhan~065|Govi-Altay~065|Govi-Sumber~064|Hovd~043|Hovsgol~041|Omnogovi~053|Ovorhangay~055|Selenge~049|Suhbaatar~051|Tov~047|Ulaanbaatar~1|Uvs~046"],["Montenegro","ME","Andrijevica~01|Bar~02|Berane~03|Bijelo Polje~04|Budva~05|Cetinje~06|Danilovgrad~07|Gusinje~22|Herceg Novi~08|Kolašin~09|Kotor~10|Mojkovac~11|Nikšić~12|Petnica~23|Plav~13|Plužine~14|Pljevlja~15|Podgorica~16|Rožaje~17|Šavnik~18|Tivat~19|Ulcinj~20|Žabljak~21"],["Montserrat","MS","Saint Anthony~undefined|Saint Georges~undefined|Saint Peter's~undefined"],["Morocco","MA","Chaouia-Ouardigha~09|Doukhala-Abda~10|Fès-Boulemane~05|Gharb-Chrarda-Beni Hssen~02|Grand Casablanca~08|Guelmim-Es Semara~14|Laâyoune-Boujdour-Sakia el Hamra~15|Marrakech-Tensift-Al Haouz~11|Meknès-Tafilalet~06|Oriental~04|Oued ed Dahab-Lagouira~16|Souss-Massa-Drâa~13|Tadla-Azilal~12|Tanger-Tétouan~01|Taza-Al Hoceima-Taounate~03"],["Mozambique","MZ","Cabo Delgado~P|Gaza~G|Inhambane~I|Manica~B|Maputo~L|Maputo (City)~MPM|Nampula~N|Niassa~A|Sofala~S|Tete~T|Zambezia~Q"],["Myanmar","MM","Ayeyarwady~07|Bago~02|Chin~14|Kachin~11|Kayah~12|Kayin~13|Magway~03|Mandalay~04|Mon~15|Nay Pyi Taw~18|Rakhine~16|Sagaing~01|Shan~17|Tanintharyi~05|Yangon~06"],["Namibia","NA","Erongo~ER|Hardap~HA|Kavango East~KE|Kavango West~KW|Karas~KA|Khomas~KH|Kunene~KU|Ohangwena~OW|Omaheke~OH|Omusati~OS|Oshana~ON|Oshikoto~OT|Otjozondjupa~OD|Zambezi~CA"],["Nauru","NR","Aiwo~01|Anabar~02|Anetan~03|Anibare~04|Baiti~05|Boe~06|Buada~07|Denigomodu~08|Ewa~09|Ijuw~10|Meneng~11|Nibok~12|Uaboe~13|Yaren~14"],["Nepal","NP","Bagmati~BA|Bheri~BH|Dhawalagiri~DH|Gandaki~GA|Janakpur~JA|Karnali~KA|Kosi~KO|Lumbini~LU|Mahakali~MA|Mechi~ME|Narayani~NA|Rapti~RA|Sagarmatha~SA|Seti~SE"],["Netherlands","NL","Drenthe~DR|Flevoland~FL|Friesland~FR|Gelderland~GE|Groningen~GR|Limburg~LI|Noord-Brabant~NB|Noord-Holland~NH|Overijssel~OV|Utrecht~UT|Zeeland~ZE|Zuid-Holland~ZH"],["New Caledonia","NC","Iles Loyaute~undefined|Nord~undefined|Sud~undefined"],["New Zealand","NZ","Auckland~AUK|Bay of Plenty~BOP|Canterbury~CAN|Gisborne~GIS|Hawke's Bay~HKB|Marlborough~MBH|Manawatu-Wanganui~MWT|Northland~NTL|Nelson~NSN|Otago~OTA|Southland~STL|Taranaki~TKI|Tasman~TAS|Waikato~WKO|Wellington~WGN|West Coast~WTC|Chatham Islands Territory~CIT"],["Nicaragua","NI","Boaco~BO|Carazo~CA|Chinandega~CI|Chontales~CO|Estelí~ES|Granada~GR|Jinotega~JI|León~LE|Madriz~MD|Managua~MN|Masaya~MS|Matagalpa~MT|Nueva Segovia~NS|Río San Juan~SJ|Rivas~RI|Atlántico Norte~AN|Atlántico Sur~AS"],["Niger","NE","Agadez~1|Diffa~2|Dosso~3|Maradi~4|Niamey~8|Tahoua~5|Tillabéri~6|Zinder~7"],["Nigeria","NG","Abia~AB|Abuja Federal Capital Territory~FC|Adamawa~AD|Akwa Ibom~AK|Anambra~AN|Bauchi~BA|Bayelsa~BY|Benue~BE|Borno~BO|Cross River~CR|Delta~DE|Ebonyi~EB|Edo~ED|Ekiti~EK|Enugu~EN|Gombe~GO|Imo~IM|Jigawa~JI|Kaduna~KD|Kano~KN|Katsina~KT|Kebbi~KE|Kogi~KO|Kwara~KW|Lagos~LA|Nassarawa~NA|Niger~NI|Ogun~OG|Ondo~ON|Osun~OS|Oyo~OY|Plateau~PL|Rivers~RI|Sokoto~SO|Taraba~TA|Yobe~YO|Zamfara~ZA"],["Niue","NU","Niue~undefined"],["Norfolk Island","NF","Norfolk Island~undefined"],["Northern Mariana Islands","MP","Northern Islands~undefined|Rota~undefined|Saipan~undefined|Tinian~undefined"],["Norway","NO","Akershus~02|Aust-Agder~09|Buskerud~06|Finnmark~20|Hedmark~04|Hordaland~12|Møre og Romsdal~15|Nordland~18|Nord-Trøndelag~17|Oppland~05|Oslo~03|Rogaland~11|Sogn og Fjordane~14|Sør-Trøndelag~16|Telemark~08|Troms~19|Vest-Agder~10|Vestfold~07|Østfold~01|Jan Mayen~22|Svalbard~21"],["Oman","OM","Ad Dakhiliyah~DA|Al Buraymi~BU|Al Wusta~WU|Az Zahirah~ZA|Janub al Batinah~BS|Janub ash Sharqiyah~SS|Masqat~MA|Musandam~MU|Shamal al Batinah~BJ|Shamal ash Sharqiyah~SJ|Zufar~ZU"],["Pakistan","PK","Āzād Kashmīr~JK|Balōchistān~BA|Gilgit-Baltistān~GB|Islāmābād~IS|Khaībar Pakhtūnkhwās~KP|Punjāb~PB|Sindh~SD|Federally Administered Tribal Areas~TA"],["Palau","PW","Aimeliik~002|Airai~004|Angaur~010|Hatobohei~050|Kayangel~100|Koror~150|Melekeok~212|Ngaraard~214|Ngarchelong~218|Ngardmau~222|Ngatpang~224|Ngchesar~226|Ngeremlengui~227|Ngiwal~228|Peleliu~350|Sonsoral~350"],["Palestine, State of","PS","Ak Khalīl~HBN|Al Quds~JEM|Arīḩā wal Aghwār~JRH|Bayt Laḩm~BTH|Dayr al Balaḩ~DEB|Ghazzah~GZA|Janīn~JEN|Khān Yūnis~KYS|Nāblus~NBS|Qalqīyah~QQA|Rafaḩ~RFH|Rām Allāh wal Bīrah~RBH|Salfīt~SLT|Shamāl Ghazzah~NGZ|Ţūbās~TBS|Ţūlkarm~TKM"],["Panama","PA","Bocas del Toro~1|Chiriquí~4|Coclé~2|Colón~3|Darién~5|Emberá~EM|Herrera~6|Kuna Yala~KY|Los Santos~7|Ngäbe-Buglé~NB|Panamá~8|Panamá Oeste~10|Veraguas~9"],["Papua New Guinea","PG","Bougainville~NSB|Central~CPM|Chimbu~CPK|East New Britain~EBR|East Sepik~ESW|Eastern Highlands~EHG|Enga~EPW|Gulf~GPK|Hela~HLA|Jiwaka~JWK|Madang~MOM|Manus~MRL|Milne Bay~MBA|Morobe~MPL|Port Moresby~NCD|New Ireland~NIK|Northern~NPP|Southern Highlands~SHM|West New Britain~WBK|West Sepik~SAN|Western~WPD|Western Highlands~WHM"],["Paraguay","PY","Alto Paraguay~16|Alto Parana~10|Amambay~13|Asuncion~ASU|Caaguazu~5|Caazapa~6|Canindeyu~14|Central~11|Concepcion~1|Cordillera~3|Guaira~4|Itapua~7|Misiones~8|Neembucu~12|Paraguari~9|Presidente Hayes~15|San Pedro~2"],["Peru","PE","Amazonas~AMA|Ancash~ANC|Apurimac~APU|Arequipa~ARE|Ayacucho~AYA|Cajamarca~CAJ|Callao~CAL|Cusco~CUS|Huancavelica~HUV|Huanuco~HUC|Ica~ICA|Junin~JUN|La Libertad~LAL|Lambayeque~LAM|Lima~LIM|Loreto~LOR|Madre de Dios~MDD|Moquegua~MOQ|Municipalidad Metropolitana de Lima~LMA|Pasco~PAS|Piura~PIU|Puno~PUN|San Martin~SAM|Tacna~TAC|Tumbes~TUM|Ucayali~UCA"],["Philippines","PH","Abra~ABR|Agusan del Norte~AGN|Agusan del Sur~AGS|Aklan~AKL|Albay~ALB|Antique~ANT|Apayao~APA|Aurora~AUR|Basilan~BAS|Bataan~BAN|Batanes~BTN|Batangas~BTG|Benguet~BEN|Biliran~BIL|Bohol~BOH|Bukidnon~BUK|Bulacan~BUL|Cagayan~CAG|Camarines Norte~CAN|Camarines Sur~CAS|Camiguin~CAM|Capiz~CAP|Catanduanes~CAT|Cavite~CAV|Cebu~CEB|Compostela~COM|Cotabato~NCO|Davao del Norte~DAV|Davao del Sur~DAS|Davao Occidental~DVO|Davao Oriental~DAO|Dinagat Islands~DIN|Eastern Samar~EAS|Guimaras~GUI|Ifugao~IFU|Ilocos Norte~ILN|Ilocos Sur~ILS|Iloilo~ILI|Isabela~ISA|Kalinga~KAL|La Union~LUN|Laguna~LAG|Lanao del Norte~LAN|Lanao del Sur~LAS|Leyte~LEY|Maguindanao~MAG|Masbate~MAS|Metro Manila~00|Mindoro Occidental~MDC|Mindoro Oriental~MDR|Misamis Occidental~MSC|Misamis Oriental~MSR|Mountain Province~MOU|Negros Occidental~NEC|Negros Oriental~NER|Northern Samar~NSA|Nueva Ecija~NUE|Nueva Vizcaya~NUV|Palawan~PLW|Pampanga~PAM|Pangasinan~PAN|Quezon~QUE|Quirino~QUI|Rizal~RIZ|Romblon~ROM|Samar~WSA|Sarangani~SAR|Siquijor~SIG|Sorsogon~SOR|Southern Leyte~SLE|Sultan Kudarat~AUK|Sulu~SLU|Surigao del Norte~SUN|Surigao del Sur~SUR|Tarlac~TAR|Tawi-Tawi~TAW|Zambales~ZMB|Zamboanga del Norte~ZAN|Zamboanga del Sur~ZAS|Zamboanga Sibugay~ZSI"],["Pitcairn","PN","Pitcairn Islands~undefined"],["Poland","PL","Dolnośląskie~DS|Kujawsko-pomorskie~KP|Łódzkie~LD|Lubelskie~LU|Lubuskie~LB|Małopolskie~MA|Mazowieckie~MZ|Opolskie~OP|Podkarpackie~PK|Podlaskie~PD|Pomorskie~PM|Śląskie~SL|Świętokrzyskie~SK|Warmińsko-mazurskie~WN|Wielkopolskie~WP|Zachodniopomorskie~ZP"],["Portugal","PT","Açores~20|Aveiro~01|Beja~02|Braga~03|Bragança~04|Castelo Branco~05|Coimbra~06|Évora~07|Faro~08|Guarda~09|Leiria~10|Lisboa~11|Madeira~30|Portalegre~12|Porto~13|Santarém~14|Setúbal~15|Viana do Castelo~16|Vila Real~17|Viseu~18"],["Puerto Rico","PR","Adjuntas~undefined|Aguada~undefined|Aguadilla~undefined|Aguas Buenas~undefined|Aibonito~undefined|Anasco~undefined|Arecibo~undefined|Arroyo~undefined|Barceloneta~undefined|Barranquitas~undefined|Bayamon~undefined|Cabo Rojo~undefined|Caguas~undefined|Camuy~undefined|Canovanas~undefined|Carolina~undefined|Cat~undefined|Ceiba~undefined|Ciales~undefined|Cidra~undefined|Coamo~undefined|Comerio~undefined|Corozal~undefined|Culebra~undefined|Dorado~undefined|Fajardo~undefined|Florida~undefined|Guanica~undefined|Guayama~undefined|Guayanilla~undefined|Guaynabo~undefined|Gurabo~undefined|Hatillo~undefined|Hormigueros~undefined|Humacao~undefined|Isabe~undefined|Juana Diaz~undefined|Juncos~undefined|Lajas~undefined|Lares~undefined|Las Marias~undefined|Las oiza~undefined|Luquillo~undefined|Manati~undefined|Maricao~undefined|Maunabo~undefined|Mayaguez~undefined|Moca~undefined|Morovis~undefined|Naguabo~undefined|Naranjito~undefined|Orocovis~undefined|Patillas~undefined|Penuelas~undefined|Ponce~undefined|Quebradillas~undefined|Rincon~undefined|Rio Grande~undefined|Sabana linas~undefined|San German~undefined|San Juan~undefined|San Lorenzo~undefined|San Sebastian~undefined|Santa Isabel~undefined|Toa Alta~undefined|Toa Baja~undefined|Trujillo Alto~undefined|Utuado~undefined|Vega Alta~undefined|Vega ues~undefined|Villalba~undefined|Yabucoa~undefined|Yauco~undefined"],["Qatar","QA","Ad Dawḩah~DA|Al Khawr wa adh Dhakhīrah~KH|Al Wakrah~WA|Ar Rayyān~RA|Ash Shamāl~MS|Az̧ Za̧`āyin~ZA|Umm Şalāl~US"],["Réunion","RE","Réunion~undefined"],["Romania","RO","Alba~AB|Arad~AR|Arges~AG|Bacau~BC|Bihor~BH|Bistrita-Nasaud~BN|Botosani~BT|Braila~BR|Brasov~BV|Bucuresti~B|Buzau~BZ|Calarasi~CL|Caras-Severin~CS|Cluj~CJ|Constanta~CT|Covasna~CV|Dambovita~DB|Dolj~DJ|Galati~GL|Giurgiu~GR|Gorj~GJ|Harghita~HR|Hunedoara~HD|Ialomita~IL|Iasi~IS|Maramures~MM|Mehedinti~MH|Mures~MS|Neamt~NT|Olt~OT|Prahova~PH|Salaj~SJ|Satu Mare~SM|Sibiu~SB|Suceava~SV|Teleorman~TR|Timis~TM|Tulcea~TL|Valcea~VL|Vaslui~VS|Vrancea~VN"],["Russian Federation","RU","Republic of Adygea~AD|Republic of Altai (Gorno-Altaysk)~AL|Altai Krai~ALT|Amur Oblast~AMU|Arkhangelsk Oblast~ARK|Astrakhan Oblast~AST|Republic of Bashkortostan~BA|Belgorod Oblast~BEL|Bryansk Oblast~BRY|Republic of Buryatia~BU|Chechen Republic~CE|Chelyabinsk Oblast~CHE|Chukotka Autonomous Okrug~CHU|Chuvash Republic~CU|Republic of Dagestan~DA|Republic of Ingushetia~IN|Irkutsk Oblast~IRK|Ivanovo Oblast~IVA|Jewish Autonomous Oblast~JEW|Kabardino-Balkar Republic~KB|Kaliningrad Oblast~KLN|Republic of Kalmykia~KL|Kaluga Oblast~KLU|Kamchatka Krai~KAM|Karachay-Cherkess Republic~KC|Republic of Karelia~KR|Khabarovsk Krai~KHA|Republic of Khakassia~KK|Khanty-Mansi Autonomous Okrug - Yugra~KHM|Kemerovo Oblast~KEM|Kirov Oblast~KIR|Komi Republic~KO|Kostroma Oblast~KOS|Krasnodar Krai~KDA|Krasnoyarsk Krai~KYA|Kurgan Oblast~KGN|Kursk Oblast~KRS|Leningrad Oblast~LEN|Lipetsk Oblast~LIP|Magadan Oblast~MAG|Mari El Republic~ME|Republic of Mordovia~MO|Moscow Oblast~MOS|Moscow~MOW|Murmansk Oblast~MU|Nenets Autonomous Okrug~NEN|Nizhny Novgorod Oblast~NIZ|Novgorod Oblast~NGR|Novosibirsk Oblast~NVS|Omsk Oblast~OMS|Orenburg Oblast~ORE|Oryol Oblast~ORL|Penza Oblast~PNZ|Perm Krai~PER|Primorsky Krai~PRI|Pskov Oblast~PSK|Rostov Oblast~ROS|Ryazan Oblast~RYA|Saint Petersburg~SPE|Sakha (Yakutia) Republic~SA|Sakhalin Oblast~SAK|Samara Oblast~SAM|Saratov Oblast~SAR|Republic of North Ossetia-Alania~NOA|Smolensk Oblast~SMO|Stavropol Krai~STA|Sverdlovsk Oblast~SVE|Tambov Oblast~TAM|Republic of Tatarstan~TA|Tomsk Oblast~TOM|Tuva Republic~TU|Tula Oblast~TUL|Tver Oblast~TVE|Tyumen Oblast~TYU|Udmurt Republic~UD|Ulyanovsk Oblast~ULY|Vladimir Oblast~VLA|Volgograd Oblast~VGG|Vologda Oblast~VLG|Voronezh Oblast~VOR|Yamalo-Nenets Autonomous Okrug~YAN|Yaroslavl Oblast~YAR|Zabaykalsky Krai~ZAB"],["Rwanda","RW","Kigali~01|Eastern~02|Northern~03|Western~04|Southern~05"],["Saint Barthélemy","BL","Au Vent~02|Sous le Vent~01"],["Saint Helena, Ascension and Tristan da Cunha","SH","Ascension~AC|Saint Helena~HL|Tristan da Cunha~TA"],["Saint Kitts and Nevis","KN","Saint Kitts~K|Nevis~N"],["Saint Lucia","LC","Anse-la-Raye~01|Canaries~12|Castries~02|Choiseul~03|Dennery~05|Gros Islet~06|Laborie~07|Micoud~08|Soufriere~10|Vieux Fort~11"],["Saint Martin","MF","Saint Martin~undefined"],["Saint Pierre and Miquelon","PM","Miquelon~undefined|Saint Pierre~undefined"],["Saint Vincent and the Grenadines","VC","Charlotte~01|Grenadines~06|Saint Andrew~02|Saint David~03|Saint George~04|Saint Patrick~05"],["Samoa","WS","A'ana~AA|Aiga-i-le-Tai~AL|Atua~AT|Fa'asaleleaga~FA|Gaga'emauga~GE|Gagaifomauga~GI|Palauli~PA|Satupa'itea~SA|Tuamasaga~TU|Va'a-o-Fonoti~VF|Vaisigano~VS"],["San Marino","SM","Acquaviva~01|Borgo Maggiore~06|Chiesanuova~02|Domagnano~03|Faetano~04|Fiorentino~05|Montegiardino~08|San Marino~07|Serravalle~09"],["Sao Tome and Principe","ST","Principe~P|Sao Tome~S"],["Saudi Arabia","SA","'Asir~14|Al Bahah~11|Al Hudud ash Shamaliyah~08|Al Jawf~12|Al Madinah al Munawwarah~03|Al Qasim~05|Ar Riyad~01|Ash Sharqiyah~04|Ha'il~06|Jazan~09|Makkah al Mukarramah~02|Najran~10|Tabuk~07"],["Senegal","SN","Dakar~DK|Diourbel~DB|Fatick~FK|Kaffrine~KA|Kaolack~KL|Kedougou~KE|Kolda~KD|Louga~LG|Matam~MT|Saint-Louis~SL|Sedhiou~SE|Tambacounda~TC|Thies~TH|Ziguinchor~ZG"],["Serbia","RS","Beograd (Belgrade)~00|Borski~14|Braničevski~11|Jablanički~23|Južnobački~06|Južnobanatski~04|Kolubarski~09|Kosovski~25|Kosovsko-Mitrovački~28|Kosovsko-Pomoravski~29|Mačvanski~08|Moravički~17|Nišavski~20|Pčinjski~24|Pećki~26|Pirotski~22|Podunavski~10|Pomoravski~13|Prizrenski~27|Rasinski~19|Raški~18|Severnobački~01|Severnobanatski~03|Srednjebanatski~02|Sremski~07|Šumadijski~12|Toplički~21|Zaječarski~15|Zapadnobački~05|Zlatiborski~16"],["Seychelles","SC","Anse aux Pins~01|Anse Boileau~02|Anse Etoile~03|Anse Royale~05|Anu Cap~04|Baie Lazare~06|Baie Sainte Anne~07|Beau Vallon~08|Bel Air~09|Bel Ombre~10|Cascade~11|Glacis~12|Grand'Anse Mahe~13|Grand'Anse Praslin~14|La Digue~15|La Riviere Anglaise~16|Les Mamelles~24|Mont Buxton~17|Mont Fleuri~18|Plaisance~19|Pointe La Rue~20|Port Glaud~21|Roche Caiman~25|Saint Louis~22|Takamaka~23"],["Sierra Leone","SL","Eastern~E|Northern~N|Southern~S|Western~W"],["Singapore","SG","Central Singapore~01|North East~02|North West~03|South East~04|South West~05"],["Sint Maarten (Dutch part)","SX","Sint Maarten~undefined"],["Slovakia","SK","Banskobystricky~BC|Bratislavsky~BL|Kosicky~KI|Nitriansky~NI|Presovsky~PV|Trenciansky~TC|Trnavsky~TA|Zilinsky~ZI"],["Slovenia","SI","Ajdovscina~001|Apace~195|Beltinci~002|Benedikt~148|Bistrica ob Sotli~149|Bled~003|Bloke~150|Bohinj~004|Borovnica~005|Bovec~006|Braslovce~151|Brda~007|Brezice~009|Brezovica~008|Cankova~152|Celje~011|Cerklje na Gorenjskem~012|Cerknica~013|Cerkno~014|Cerkvenjak~153|Cirkulane~196|Crensovci~015|Crna na Koroskem~016|Crnomelj~017|Destrnik~018|Divaca~019|Dobje~154|Dobrepolje~020|Dobrna~155|Dobrova-Polhov Gradec~021|Dobrovnik~156|Dol pri Ljubljani~022|Dolenjske Toplice~157|Domzale~023|Dornava~024|Dravograd~025|Duplek~026|Gorenja Vas-Poljane~027|Gorisnica~028|Gorje~207|Gornja Radgona~029|Gornji Grad~030|Gornji Petrovci~031|Grad~158|Grosuplje~032|Hajdina~159|Hoce-Slivnica~160|Hodos~161|Horjul~162|Hrastnik~034|Hrpelje-Kozina~035|Idrija~036|Ig~037|Ilirska Bistrica~038|Ivancna Gorica~039|Izola~040s|Jesenice~041|Jursinci~042|Kamnik~043|Kanal~044|Kidricevo~045|Kobarid~046|Kobilje~047|Kocevje~048|Komen~049|Komenda~164|Koper~050|Kodanjevica na Krki~197|Kostel~165|Kozje~051|Kranj~052|Kranjska Gora~053|Krizevci~166|Krsko~054|Kungota~055|Kuzma~056|Lasko~057|Lenart~058|Lendava~059|Litija~068|Ljubljana~061|Ljubno~062|Ljutomer~063|Log-Dragomer~208|Logatec~064|Loska Dolina~065|Loski Potok~066|Lovrenc na Pohorju~167|Lukovica~068|Luce~067|Majsperk~069|Makole~198|Maribor~070|Markovci~168|Medvode~071|Menges~072|Metlika~073|Mezica~074|Miklavz na Dravskem Polju~169|Miren-Kostanjevica~075|Mirna~212|Mirna Pec~170|Mislinja~076|Mokronog-Trebelno~199|Moravce~077|Moravske Toplice~078|Mozirje~079|Murska Sobota~080|Naklo~082|Nazarje~083|Nova Gorica~084|Novo Mesto~085|Odranci~086|Ormoz~087|Osilnica~088|Pesnica~089|Piran~090|Pivka~091|Podcetrtek~092|Podlehnik~172|Podvelka~093|Poljcane~200|Postojna~094|Prebold~174|Preddvor~095|Prevalje~175|Ptuj~096|Race-Fram~098|Radece~099|Radenci~100|Radlje ob Dravi~101|Radovljica~102|Ravne na Koroskem~103|Razkrizje~176|Recica ob Savinji~209|Rence-Vogrsko~201|Ribnica~104|Ribnica na Poboriu~177|Rogaska Slatina~106|Rogasovci~105|Rogatec~107|Ruse~108|Salovci~033|Selnica ob Dravi~178|Semic~109|Sempeter-Vrtojba~183|Sencur~117|Sentilj~118|Sentjernej~119|Sentjur~120|Sentrupert~211|Sevnica~110|Sezana~111|Skocjan~121|Skofja Loka~122|Skofljica~123|Slovenj Gradec~112|Slovenska Bistrica~113|Slovenske Konjice~114|Smarje pri elsah~124|Smarjeske Toplice~206|Smartno ob Paki~125|Smartno pri Litiji~194|Sodrazica~179|Solcava~180|Sostanj~126|Sredisce ob Dravi~202|Starse~115|Store~127|Straza~203|Sveta Ana~181|Sveta Trojica v Slovenskih Goricah~204|Sveta Andraz v Slovenskih Goricah~182|Sveti Jurij~116|Sveti Jurij v Slovenskih Goricah~210|Sveti Tomaz~205|Tabor~184|Tisina~128|Tolmin~128|Trbovlje~129|Trebnje~130|Trnovska Vas~185|Trzin~186|Trzic~131|Turnisce~132|Velenje~133|Velika Polana~187|Velike Lasce~134|Verzej~188|Videm~135|Vipava~136|Vitanje~137|Vodice~138|Vojnik~139|Vransko~189|Vrhnika~140|Vuzenica~141|Zagorje ob Savi~142|Zavrc~143|Zrece~144|Zalec~190|Zelezniki~146|Zetale~191|Ziri~147|Zirovnica~192|Zuzemberk~193"],["Solomon Islands","SB","Central~CE|Choiseul~CH|Guadalcanal~GU|Honiara~CT|Isabel~IS|Makira-Ulawa~MK|Malaita~ML|Rennell and Bellona~RB|Temotu~TE|Western~WE"],["Somalia","SO","Awdal~AW|Bakool~BK|Banaadir~BN|Bari~BR|Bay~BY|Galguduud~GA|Gedo~GE|Hiiraan~HI|Jubbada Dhexe~JD|Jubbada Hoose~JH|Mudug~MU|Nugaal~NU|Sanaag~SA|Shabeellaha Dhexe~SD|Shabeellaha Hoose~SH|Sool~SO|Togdheer~TO|Woqooyi Galbeed~WO"],["South Africa","ZA","Eastern Cape~EC|Free State~FS|Gauteng~GT|KwaZulu-Natal~NL|Limpopo~LP|Mpumalanga~MP|Northern Cape~NC|North West~NW|Western Cape~WC"],["South Georgia and South Sandwich Islands","GS","Bird Island~undefined|Bristol Island~undefined|Clerke Rocks~undefined|Montagu Island~undefined|Saunders Island~undefined|South Georgia~undefined|Southern Thule~undefined|Traversay Islands~undefined"],["South Sudan","SS","Central Equatoria~CE|Eastern Equatoria~EE|Jonglei~JG|Lakes~LK|Northern Bahr el Ghazal~BN|Unity~UY|Upper Nile~NU|Warrap~WR|Western Bahr el Ghazal~BW|Western Equatoria~EW"],["Spain","ES","Albacete~AB|Alicante~A|Almería~AN|Araba/Álava~VI|Asturias~O|Ávila~AV|Badajoz~BA|Barcelona~B|Bizkaia~BI|Burgos~BU|Cáceres~CC|Cádiz~CA|Cantabria~S|Castellón/Castelló~CS|Ceuta~CE|Ciudad Real~CR|Córdoba~CO|A Coruña~C|Cuenca~CU|Gipuzkoa~SS|Girona~GI|Granada~GR|Guadalajara~GU|Huelva~H|Huesca~HU|Illes Balears~PM|Jaén~J|León~LE|Lleida~L|Lugo~LU|Madrid~M|Málaga~MA|Melilla~ML|Murcia~MU|Navarra/Nafarroa~NA|Ourense~OR|Palencia~P|Las Palmas~GC|Pontevedra~PO|La Rioja~LO|Salamanca~SA|Santa Cruz de Tenerife~TF|Segovia~SG|Sevilla~SE|Soria~SO|Tarragona~T|Teruel~TE|Toledo~TO|Valencia/València~V|Valladolid~VA|Zamora~ZA|Zaragoza~Z"],["Sri Lanka","LK","Basnahira~1|Dakunu~3|Madhyama~2|Naegenahira~5|Sabaragamuwa~9|Uturu~4|Uturumaeda~7|Vayamba~6|Uva~8"],["Sudan","SD","Al Bahr al Ahmar~RS|Al Jazirah~GZ|Al Khartum~KH|Al Qadarif~GD|An Nil al Abyad~NW|An Nil al Azraq~NB|Ash Shamaliyah~NO|Gharb Darfur~DW|Gharb Kurdufan~GK|Janub Darfur~DS|Janub Kurdufan~KS|Kassala~KA|Nahr an Nil~NR|Shamal Darfur~DN|Sharq Darfur~DE|Shiamal Kurdufan~KN|Sinnar~SI|Wasat Darfur Zalinjay~DC"],["Suriname","SR","Brokopondo~BR|Commewijne~CM|Coronie~CR|Marowijne~MA|Nickerie~NI|Para~PR|Paramaribo~PM|Saramacca~SA|Sipaliwini~SI|Wanica~WA"],["Swaziland","SZ","Hhohho~HH|Lubombo~LU|Manzini~MA|Shiselweni~SH"],["Sweden","SE","Blekinge~K|Dalarna~W|Gävleborg~X|Gotland~I|Halland~N|Jämtland~Z|Jönköping~F|Kalmar~H|Kronoberg~G|Norrbotten~BD|Örebro~T|Östergötland~E|Skåne~M|Södermanland~D|Stockholm~AB|Uppsala~C|Värmland~S|Västerbotten~AC|Västernorrland~Y|Västmanland~U|Västra Götaland~O"],["Switzerland","CH","Aargau~AG|Appenzell Ausserrhoden~AR|Appenzell Innerhoden~AI|Basel-Landschaft~BL|Basel-Stadt~BS|Bern~BE|Fribourg~FR|Genève~GE|Glarus~GL|Graubünden~GR|Jura~JU|Luzern~LU|Neuchâtel~NE|Nidwalden~NW|Obwalden~OW|Sankt Gallen~SG|Schaffhausen~SH|Schwyz~SZ|Solothurn~SO|Thurgau~TG|Ticino~TI|Uri~UR|Valais~VS|Vaud~VD|Zug~ZG|Zürich~ZH"],["Syrian Arab Republic","SY","Al Hasakah~HA|Al Ladhiqiyah~LA|Al Qunaytirah~QU|Ar Raqqah~RA|As Suwayda'~SU|Dar'a~DR|Dayr az Zawr~DY|Dimashq~DI|Halab~HL|Hamah~HM|Hims~HI|Idlib~ID|Rif Dimashq~RD|Tartus~TA"],["Taiwan","TW","Chang-hua~CHA|Chia-i~CYQ|Hsin-chu~HSQ|Hua-lien~HUA|Kao-hsiung~KHH|Keelung~KEE|Kinmen~KIN|Lienchiang~LIE|Miao-li~MIA|Nan-t'ou~NAN|P'eng-hu~PEN|New Taipei~NWT|P'ing-chung~PIF|T'ai-chung~TXG|T'ai-nan~TNN|T'ai-pei~TPE|T'ai-tung~TTT|T'ao-yuan~TAO|Yi-lan~ILA|Yun-lin~YUN"],["Tajikistan","TJ","Dushanbe~DU|Kŭhistoni Badakhshon~GB|Khatlon~KT|Sughd~SU"],["Tanzania, United Republic of","TZ","Arusha~01|Coast~19|Dar es Salaam~02|Dodoma~03|Iringa~04|Kagera~05|Kigoma~08|Kilimanjaro~09|Lindi~12|Manyara~26|Mara~13|Mbeya~14|Morogoro~16|Mtwara~17|Mwanza~18|Pemba North~06|Pemba South~10|Rukwa~20|Ruvuma~21|Shinyanga~22|Singida~23|Tabora~24|Tanga~25|Zanzibar North~07|Zanzibar Central/South~11|Zanzibar Urban/West~15"],["Thailand","TH","Amnat Charoen~37|Ang Thong~15|Bueng Kan~38|Buri Ram~31|Chachoengsao~24|Chai Nat~18|Chaiyaphum~36|Chanthaburi~22|Chiang Mai~50|Chiang Rai~57|Chon Buri~20|Chumphon~86|Kalasin~46|Kamphaeng Phet~62|Kanchanaburi~71|Khon Kaen~40|Krabi~81|Krung Thep Mahanakhon (Bangkok)~10|Lampang~52|Lamphun~51|Loei~42|Lop Buri~16|Mae Hong Son~58|Maha Sarakham~44|Mukdahan~49|Nakhon Nayok~26|Nakhon Phathom~73|Nakhon Phanom~48|Nakhon Ratchasima~30|Nakhon Sawan~60|Nakhon Si Thammarat~80|Nan~55|Narathiwat~96|Nong Bua Lam Phu~39|Nong Khai~43|Nonthaburi~12|Pathum Thani~13|Pattani~94|Phangnga~82|Phatthalung~93|Phayao~56|Phetchabun~76|Phetchaburi~76|Phichit~66|Phitsanulok~65|Phra Nakhon Si Ayutthaya~14|Phrae~54|Phuket~83|Prachin Buri~25|Prachuap Khiri Khan~77|Ranong~85|Ratchaburi~70|Rayong~21|Roi Et~45|Sa Kaeo~27|Sakon Nakhon~47|Samut Prakan~11|Samut Sakhon~74|Samut Songkhram~75|Saraburi~19|Satun~91|Sing Buri~17|Si Sa ket~33|Songkhla~90|Sukhothai~64|Suphan Buri~72|Surat Thani~84|Surin~32|Tak~63|Trang~92|Trat~23|Ubon Ratchathani~34|Udon Thani~41|Uthai Thani~61|Uttaradit~53|Yala~95|Yasothon~35"],["Timor-Leste","TL","Aileu~AL|Ainaro~AN|Baucau~BA|Bobonaro~BO|Cova Lima~CO|Dili~DI|Ermera~ER|Lautem~LA|Liquica~LI|Manatuto~MT|Manufahi~MF|Oecussi~OE|Viqueque~VI"],["Togo","TG","Centre~C|Kara~K|Maritime~M|Plateaux~P|Savannes~S"],["Tokelau","TK","Atafu~undefined|Fakaofo~undefined|Nukunonu~undefined"],["Tonga","TO","'Eua~01|Ha'apai~02|Niuas~03|Tongatapu~04|Vava'u~05"],["Trinidad and Tobago","TT","Arima~ARI|Chaguanas~CHA|Couva-Tabaquite-Talparo~CTT|Diefo Martin~DMN|Mayaro-Rio Claro~MRC|Penal-Debe~PED|Point Fortin~PTF|Port-of-Spain~POS|Princes Town~PRT|San Fernando~SFO|San Juan-Laventille~SJL|Sangre Grande~SGE|Siparia~SIP|Tobago~TOB|Tunapuna-Piarco~TUP"],["Tunisia","TN","Ariana~12|Beja~31|Ben Arous~13|Bizerte~23|Gabes~81|Gafsa~71|Jendouba~32|Kairouan~41|Kasserine~42|Kebili~73|Kef~33|Mahdia~53|Medenine~82|Monastir~52|Nabeul~21|Sfax~61|Sidi Bouzid~43|Siliana~34|Sousse~51|Tataouine~83|Tozeur~72|Tunis~11|Zaghouan~22"],["Turkey","TR","Adana~01|Adiyaman~02|Afyonkarahisar~03|Agri~04|Aksaray~68|Amasya~05|Ankara~06|Antalya~07|Ardahan~75|Artvin~08|Aydin~09|Balikesir~10|Bartin~74|Batman~72|Bayburt~69|Bilecik~11|Bingol~12|Bitlis~13|Bolu~14|Burdur~15|Bursa~16|Canakkale~17|Cankiri~18|Corum~19|Denizli~20|Diyarbakir~21|Duzce~81|Edirne~22|Elazig~23|Erzincan~24|Erzurum~25|Eskisehir~26|Gaziantep~27|Giresun~28|Gumushane~29|Hakkari~30|Hatay~31|Igdir~76|Isparta~32|Istanbul~34|Izmir~35|Kahramanmaras~46|Karabuk~78|Karaman~70|Kars~36|Kastamonu~37|Kayseri~38|Kilis~79|Kirikkale~71|Kirklareli~39|Kirsehir~40|Kocaeli~41|Konya~42|Kutahya~43|Malatya~44|Manisa~45|Mardin~47|Mersin~33|Mugla~48|Mus~49|Nevsehir~50|Nigde~51|Ordu~52|Osmaniye~80|Rize~53|Sakarya~54|Samsun~55|Sanliurfa~63|Siirt~56|Sinop~57|Sirnak~73|Sivas~58|Tekirdag~59|Tokat~60|Trabzon~61|Tunceli~62|Usak~64|Van~65|Yalova~77|Yozgat~66|Zonguldak~67"],["Turkmenistan","TM","Ahal~A|Asgabat~S|Balkan~B|Dashoguz~D|Lebap~L|Mary~M"],["Turks and Caicos Islands","TC","Turks and Caicos Islands~undefined"],["Tuvalu","TV","Funafuti~FUN|Nanumanga~NMG|Nanumea~NMA|Niutao~NIT|Nui~NUI|Nukufetau~NKF|Nukulaelae~NKL|Vaitupu~VAU"],["Uganda","UG","Abim~317|Adjumani~301|Amolatar~314|Amuria~216|Amuru~319|Apac~302|Arua~303|Budaka~217|Bududa~223|Bugiri~201|Bukedea~224|Bukwa~218|Buliisa~419|Bundibugyo~401|Bushenyi~402|Busia~202|Butaleja~219|Dokolo~318|Gulu~304|Hoima~403|Ibanda~416|Iganga~203|Isingiro~417|Jinja~204|Kaabong~315|Kabale~404|Kabarole~405|Kaberamaido~213|Kalangala~101|Kaliro~220|Kampala~102|Kamuli~205|Kamwenge~413|Kanungu~414|Kapchorwa~206|Kasese~406|Katakwi~207|Kayunga~112|Kibaale~407|Kiboga~103|Kiruhura~418|Kisoro~408|Kitgum~305|Koboko~316|Kotido~306|Kumi~208|Kyenjojo~415|Lira~307|Luwero~104|Lyantonde~116|Manafwa~221|Maracha~320|Masaka~105|Masindi~409|Mayuge~214|Mbale~209|Mbarara~410|Mityana~114|Moroto~308|Moyo~309|Mpigi~106|Mubende~107|Mukono~108|Nakapiripirit~311|Nakaseke~115|Nakasongola~109|Namutumba~222|Nebbi~310|Ntungamo~411|Oyam~321|Pader~312|Pallisa~210|Rakai~110|Rukungiri~412|Sembabule~111|Sironko~215|Soroti~211|Tororo~212|Wakiso~113|Yumbe~313"],["Ukraine","UA","Cherkasy~71|Chernihiv~74|Chernivtsi~77|Dnipropetrovsk~12|Donetsk~14|Ivano-Frankivsk~26|Kharkiv~63|Kherson~65|Khmelnytskyi~68|Kiev~32|Kirovohrad~35|Luhansk~09|Lviv~46|Mykolaiv~48|Odessa~51|Poltava~53|Rivne~56|Sumy~59|Ternopil~61|Vinnytsia~05|Volyn~07|Zakarpattia~21|Zaporizhia~23|Zhytomyr~18|Avtonomna Respublika Krym~43|Kyïv~30|Sevastopol~40"],["United Arab Emirates","AE","Abu Dhabi~AZ|Ajman~AJ|Dubai~DU|Fujairah~FU|Ras al Khaimah~RK|Sharjah~SH|Umm Al Quwain~UQ"],["United Kingdom","GB","Aberdeen City~ABE|Aberdeenshire~ABD|Angus~ANS|Antrim and Newtownabbey~ANN|Ards and North Down~AND|Argyll and Bute~AGB|Armagh, Banbridge and Craigavon~ABC|Barking and Dagenham~BDG|Barnet~BNE|Barnsley~BNS|Bath and North East Somerset~BAS|Bedford~BDF|Belfast~BFS|Bexley~BEX|Birmingham~BIR|Blackburn with Darwen~BBD|Blackpool~BPL|Blaenau Gwent~BGW|Bolton~BOL|Bournemouth~BMH|Bracknell Forest~BRC|Bradford~BRD|Brent~BEN|Bridgend~BGE|Brighton and Hove~BNH|Bristol, City of~BST|Bromley~BRY|Buckinghamshire~BKM|Bury~BUR|Caerphilly~CAY|Calderdale~CLD|Cambridgeshire~CAM|Camden~CMD|Cardiff~CRF|Carmarthenshire~CMN|Causeway Coast and Glens~CCG|Central Bedfordshire~CBF|Ceredigion~CGN|Cheshire East~CHE|Cheshire West and Chester~CHW|Clackmannanshire~CLK|Conwy~CWY|Cornwall~CON|Coventry~COV|Croydon~CRY|Cumbria~CMA|Darlington~DAL|Denbighshire~DEN|Derby~DER|Derbyshire~DBY|Derry and Strabane~DRS|Devon~DEV|Doncaster~DNC|Dorset~DOR|Dudley~DUD|Dumfries and Galloway~DGY|Dundee City~DND|Durham County~DUR|Ealing~EAL|East Ayrshire~EAY|East Dunbartonshire~EDU|East Lothian~ELN|East Renfrewshire~ERW|East Riding of Yorkshire~ERY|East Sussex~ESX|Edinburgh, City of~EDH|Eilean Siar~ELS|Enfield~ENF|Essex~ESS|Falkirk~FAL|Fermanagh and Omagh~FMO|Fife~FIF|Flintshire~FLN|Gateshead~GAT|Glasgow City~GLG|Gloucestershire~GLS|Greenwich~GRE|Gwynedd~GWN|Hackney~HCK|Halton~HAL|Hammersmith and Fulham~HMF|Hampshire~HAM|Haringey~HRY|Harrow~HRW|Hartlepool~HPL|Havering~HAV|Herefordshire~HEF|Hertfordshire~HRT|Highland~HLD|Hillingdon~HIL|Hounslow~HNS|Inverclyde~IVC|Isle of Anglesey~AGY|Isle of Wight~IOW|Isles of Scilly~IOS|Islington~ISL|Kensington and Chelsea~KEC|Kent~KEN|Kingston upon Hull~KHL|Kingston upon Thames~KTT|Kirklees~KIR|Knowsley~KWL|Lambeth~LBH|Lancashire~LAN|Leeds~LDS|Leicester~LCE|Leicestershire~LEC|Lewisham~LEW|Lincolnshire~LIN|Lisburn and Castlereagh~LBC|Liverpool~LIV|London, City of~LND|Luton~LUT|Manchester~MAN|Medway~MDW|Merthyr Tydfil~MTY|Merton~MRT|Mid and East Antrim~MEA|Mid Ulster~MUL|Middlesbrough~MDB|Midlothian~MLN|Milton Keynes~MIK|Monmouthshire~MON|Moray~MRY|Neath Port Talbot~NTL|Newcastle upon Tyne~NET|Newham~NWM|Newport~NWP|Newry, Mourne and Down~NMD|Norfolk~NFK|North Ayrshire~NAY|North East Lincolnshire~NEL|North Lanarkshire~NLK|North Lincolnshire~NLN|North Somerset~NSM|North Tyneside~NTY|North Yorkshire~NYK|Northamptonshire~NTH|Northumberland~NBL|Nottingham~NGM|Nottinghamshire~NTT|Oldham~OLD|Orkney Islands~ORK|Oxfordshire~OXF|Pembrokeshire~PEM|Perth and Kinross~PKN|Peterborough~PTE|Plymouth~PLY|Poole~POL|Portsmouth~POR|Powys~POW|Reading~RDG|Redbridge~RDB|Redcar and Cleveland~RCC|Renfrewshire~RFW|Rhondda, Cynon, Taff~RCT|Richmond upon Thames~RIC|Rochdale~RCH|Rotherham~ROT|Rutland~RUT|St. Helens~SHN|Salford~SLF|Sandwell~SAW|Scottish Borders, The~SCB|Sefton~SFT|Sheffield~SHF|Shetland Islands~ZET|Shropshire~SHR|Slough~SLG|Solihull~SOL|Somerset~SOM|South Ayrshire~SAY|South Gloucestershire~SGC|South Lanarkshire~SLK|South Tyneside~STY|Southampton~STH|Southend-on-Sea~SOS|Southwark~SWK|Staffordshire~STS|Stirling~STG|Stockport~SKP|Stockton-on-Tees~STT|Stoke-on-Trent~STE|Suffolk~SFK|Sunderland~SND|Surrey~SRY|Sutton~STN|Swansea~SWA|Swindon~SWD|Tameside~TAM|Telford and Wrekin~TFW|Thurrock~THR|Torbay~TOB|Torfaen~TOF|Tower Hamlets~TWH|Trafford~TRF|Vale of Glamorgan, The~VGL|Wakefield~WKF|Walsall~WLL|Waltham Forest~WFT|Wandsworth~WND|Warrington~WRT|Warwickshire~WAR|West Berkshire~WBK|West Dunbartonshire~WDU|West Lothian~WLN|West Sussex~WSX|Westminster~WSM|Wigan~WGN|Wiltshire~WIL|Windsor and Maidenhead~WNM|Wirral~WRL|Wokingham~WOK|Wolverhampton~WLV|Worcestershire~WOR|Wrexham~WRX|York~YOR"],["United States","US","Alabama~AL|Alaska~AK|American Samoa~AS|Arizona~AZ|Arkansas~AR|California~CA|Colorado~CO|Connecticut~CT|Delaware~DE|District of Columbia~DC|Micronesia~FM|Florida~FL|Georgia~GA|Guam~GU|Hawaii~HI|Idaho~ID|Illinois~IL|Indiana~IN|Iowa~IA|Kansas~KS|Kentucky~KY|Louisiana~LA|Maine~ME|Marshall Islands~MH|Maryland~MD|Massachusetts~MA|Michigan~MI|Minnesota~MN|Mississippi~MS|Missouri~MO|Montana~MT|Nebraska~NE|Nevada~NV|New Hampshire~NH|New Jersey~NJ|New Mexico~NM|New York~NY|North Carolina~NC|North Dakota~ND|Northern Mariana Islands~MP|Ohio~OH|Oklahoma~OK|Oregon~OR|Palau~PW|Pennsylvania~PA|Puerto Rico~PR|Rhode Island~RI|South Carolina~SC|South Dakota~SD|Tennessee~TN|Texas~TX|Utah~UT|Vermont~VT|Virgin Islands~VI|Virginia~VA|Washington~WA|West Virginia~WV|Wisconsin~WI|Wyoming~WY|Armed Forces Americas~AA|Armed Forces Europe, Canada, Africa and Middle East~AE|Armed Forces Pacific~AP"],["United States Minor Outlying Islands","UM","Baker Island~81|Howland Island~84|Jarvis Island~86|Johnston Atoll~67|Kingman Reef~89|Midway Islands~71|Navassa Island~76|Palmyra Atoll~95|Wake Island~79|Bajo Nuevo Bank~BN|Serranilla Bank~SB"],["Uruguay","UY","Artigas~AR|Canelones~CA|Cerro Largo~CL|Colonia~CO|Durazno~DU|Flores~FS|Florida~FD|Lavalleja~LA|Maldonado~MA|Montevideo~MO|Paysandú~PA|Río Negro~RN|Rivera~RV|Rocha~RO|Salto~SA|San José~SJ|Soriano~SO|Tacuarembó~TA|Treinta y Tres~TT"],["Uzbekistan","UZ","Toshkent shahri~TK|Andijon~AN|Buxoro~BU|Farg‘ona~FA|Jizzax~JI|Namangan~NG|Navoiy~NW|Qashqadaryo (Qarshi)~QA|Samarqand~SA|Sirdaryo (Guliston)~SI|Surxondaryo (Termiz)~SU|Toshkent wiloyati~TO|Xorazm (Urganch)~XO|Qoraqalpog‘iston Respublikasi (Nukus)~QR"],["Vanuatu","VU","Malampa~MAP|Pénama~PAM|Sanma~SAM|Shéfa~SEE|Taféa~TAE|Torba~TOB"],["Venezuela, Bolivarian Republic of","VE","Dependencias Federales~W|Distrito Federal~A|Amazonas~Z|Anzoátegui~B|Apure~C|Aragua~D|Barinas~E|Bolívar~F|Carabobo~G|Cojedes~H|Delta Amacuro~Y|Falcón~I|Guárico~J|Lara~K|Mérida~L|Miranda~M|Monagas~N|Nueva Esparta~O|Portuguesa~P|Sucre~R|Táchira~S|Trujillo~T|Vargas~X|Yaracuy~U|Zulia~V"],["Vietnam","VN","Đồng Nai~39|Đồng Tháp~45|Gia Lai~30|Hà Giang~03|Hà Nam~63|Hà Tây~15|Hà Tĩnh~23|Hải Dương~61|Hậu Giang~73|Hòa Bình~14|Hưng Yên~66|Khánh Hòa~34|Kiên Giang~47|Kon Tum~28|Lai Châu~01|Lâm Đồng~35|Lạng Sơn~09|Lào Cai~02|Long An~41|Nam Định~67|Nghệ An~22|Ninh Bình~18|Ninh Thuận~36|Phú Thọ~68|Phú Yên~32|Quảng Bình~24|Quảng Nam~27|Quảng Ngãi~29|Quảng Ninh~13|Quảng Trị~25|Sóc Trăng~52|Sơn La~05|Tây Ninh~37|Thái Bình~20|Thái Nguyên~69|Thanh Hóa~21|Thừa Thiên–Huế~26|Tiền Giang~46|Trà Vinh~51|Tuyên Quang~07|Vĩnh Long~49|Vĩnh Phúc~70|Yên Bái~06|Cần Thơ~CT|Đà Nẵng~DN|Hà Nội~HN|Hải Phòng~HP|Hồ Chí Minh (Sài Gòn)~SG"],["Virgin Islands, British","VG","Anegada~ANG|Jost Van Dyke~JVD|Tortola~TTA|Virgin Gorda~VGD"],["Virgin Islands, U.S.","VI","St. Thomas~STH|St. John~SJO|St. Croix~SCR"],["Wallis and Futuna","WF","Alo~ALO|Sigave~SIG|Wallis~WAL"],["Western Sahara","EH","Es Smara~ESM|Boujdour~BOD|Laâyoune~LAA|Aousserd~AOU|Oued ed Dahab~OUD"],["Yemen","YE","Abyān~AB|'Adan~AD|Aḑ Ḑāli'~DA|Al Bayḑā'~BA|Al Ḩudaydah~HU|Al Jawf~JA|Al Mahrah~MR|Al Maḩwīt~MW|'Amrān~AM|Dhamār~DH|Ḩaḑramawt~HD|Ḩajjah~HJ|Ibb~IB|Laḩij~LA|Ma'rib~MA|Raymah~RA|Şā‘dah~SD|Şan‘ā'~SN|Shabwah~SH|Tā‘izz~TA"],["Zambia","ZM","Central~02|Copperbelt~08|Eastern~03|Luapula~04|Lusaka~09|Northern~05|North-Western~06|Southern~07|Western~01"],["Zimbabwe","ZW","Bulawayo~BU|Harare~HA|Manicaland~MA|Mashonaland Central~MC|Mashonaland East~ME|Mashonaland West~MW|Masvingo~MV|Matabeleland North~MN|Matabeleland South~MS|Midlands~MI"]],Vu="full",Wu="short",Gu="|",qu="~",Yu=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ku=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Xu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qu=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},$u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Ju=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Zu=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},ed=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},td=function(e){function t(e){Yu(this,t);var n,r,i,a,o,s,l=Ju(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return l.state={countries:(n=zu,r=e.priorityOptions,i=e.whitelist,a=e.blacklist,o=[],s=n,i.length>0?s=n.filter((function(e){var t=Zu(e,2)[1];return i.indexOf(t)>-1})):a.length>0&&(s=n.filter((function(e){var t=Zu(e,2)[1];return-1===a.indexOf(t)}))),r.length>0&&(r.forEach((function(e){var t=s.find((function(t){return Zu(t,2)[1]===e}));t&&o.push(t)})),s=s.filter((function(e){var t=Zu(e,2)[1];return-1===r.indexOf(t)}))),o.length?[].concat(o,ed(s)):s)},l}return Qu(t,e),Ku(t,[{key:"getCountries",value:function(){var e=this.props,t=e.valueType,n=e.labelType;return this.state.countries.map((function(e){var r=Zu(e,2),i=r[0],a=r[1];return v.a.createElement("option",{value:t===Wu?a:i,key:a},n===Wu?a:i)}))}},{key:"getDefaultOption",value:function(){var e=this.props,t=e.showDefaultOption,n=e.defaultOptionLabel;return t?v.a.createElement("option",{value:"",key:"default"},n):null}},{key:"render",value:function(){var e=this.props,t=e.name,n=e.id,r=e.classes,i=e.value,a=e.onChange,o=e.onBlur,s=e.disabled,l=(e.showDefaultOption,e.defaultOptionLabel,e.labelType,e.valueType,e.whitelist,e.blacklist,e.customOptions,e.priorityOptions,$u(e,["name","id","classes","value","onChange","onBlur","disabled","showDefaultOption","defaultOptionLabel","labelType","valueType","whitelist","blacklist","customOptions","priorityOptions"])),c=Xu({},l,{name:t,value:i,onChange:function(e){return a(e.target.value,e)},onBlur:function(e){return o(e.target.value,e)},disabled:s});return n&&(c.id=n),r&&(c.className=r),v.a.createElement("select",c,this.getDefaultOption(),this.getCountries())}}]),t}(g.Component);td.propTypes={value:ne.a.oneOfType([ne.a.string,ne.a.number]),name:ne.a.string,id:ne.a.string,classes:ne.a.string,showDefaultOption:ne.a.bool,defaultOptionLabel:ne.a.oneOfType([ne.a.string,ne.a.number]),priorityOptions:ne.a.array,onChange:ne.a.func,onBlur:ne.a.func,labelType:ne.a.oneOf([Vu,Wu]),valueType:ne.a.oneOf([Vu,Wu]),whitelist:ne.a.array,blacklist:ne.a.array,disabled:ne.a.bool},td.defaultProps={value:"",name:"rcrs-country",id:"",classes:"",showDefaultOption:!0,defaultOptionLabel:"Select Country",priorityOptions:[],onChange:function(){},onBlur:function(){},labelType:Vu,valueType:Vu,whitelist:[],blacklist:[],disabled:!1};var nd=function(e){function t(e){Yu(this,t);var n=Ju(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={regions:n.getRegions(e.country)},n.getRegions=n.getRegions.bind(n),n}return Qu(t,e),Ku(t,[{key:"componentDidUpdate",value:function(e){var t=this.props.country;if(t!==e.country){var n=this.getRegions(t);this.setState({regions:[].concat(ed(n),ed(this.getCustomOptions(n)))})}}},{key:"getCustomOptions",value:function(e){var t=this.props.customOptions,n=this.getDuplicates(e);return n.length?(console.error("Error: Duplicate regions present: "+n.toString()+".\nThe above item(s) is/are already getting added to the region dropdown by the library."),[]):t.map((function(e){if(e)return{regionName:e,regionShortCode:e}}))}},{key:"getDuplicates",value:function(e){var t=this.props,n=t.customOptions,r=t.valueType===Vu?"regionName":"regionShortCode";return e.filter((function(e){return-1!==n.indexOf(e[r])})).map((function(e){return e[r]}))}},{key:"getRegions",value:function(e){if(!e)return[];var t=this.props,n=t.countryValueType,r=t.whitelist,i=t.blacklist,a=n===Vu?0:1,o=[];return zu.forEach((function(t){t[a]===e&&(o=t)})),o&&0!==o.length?function(e,t,n){var r=Zu(e,3),i=r[0],a=r[1],o=r[2],s=t.hasOwnProperty(a)?t[a]:[],l=n.hasOwnProperty(a)?n[a]:[],c=o.split("|");return s.length>0&&c.length>0?c=c.filter((function(e){for(var t=0,n=s.length;t<n;t++)if(e.indexOf(s[t])>-1)return!0;return!1})):l.length>0&&c.length>0&&(c=c.filter((function(e){for(var t=0,n=l.length;t<n;t++)if(e.indexOf(l[t])>-1)return!1;return!0}))),[i,a,c.join("|")]}(o,r,i)[2].split(Gu).map((function(e){var t=e.split(qu),n=Zu(t,2),r=n[0],i=n[1];return{regionName:r,regionShortCode:void 0===i?null:i}})):(console.error("Error. Unknown country passed: "+e+'. If you\'re passing a country shortcode, be sure to include countryValueType="short" on the RegionDropdown'),[])}},{key:"getRegionList",value:function(){var e=this.props,t=e.labelType,n=e.valueType;return this.state.regions.map((function(e){var r=e.regionName,i=e.regionShortCode,a=t===Vu?r:i,o=n===Vu?r:i;return v.a.createElement("option",{value:o,key:r},a)}))}},{key:"getDefaultOption",value:function(){var e=this.props,t=e.blankOptionLabel,n=e.showDefaultOption,r=e.defaultOptionLabel;return e.country?n?v.a.createElement("option",{value:""},r):null:v.a.createElement("option",{value:""},t)}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.country,r=e.onChange,i=e.onBlur,a=e.id,o=e.name,s=e.classes,l=e.disabled,c=(e.blankOptionLabel,e.showDefaultOption,e.defaultOptionLabel,e.labelType,e.valueType,e.countryValueType,e.disableWhenEmpty),u=(e.customOptions,$u(e,["value","country","onChange","onBlur","id","name","classes","disabled","blankOptionLabel","showDefaultOption","defaultOptionLabel","labelType","valueType","countryValueType","disableWhenEmpty","customOptions"])),d=Xu({},u,{name:o,value:t,onChange:function(e){return r(e.target.value,e)},onBlur:function(e){return i(e.target.value,e)},disabled:l||c&&""===n});return a&&(d.id=a),s&&(d.className=s),v.a.createElement("select",d,this.getDefaultOption(),this.getRegionList())}}]),t}(g.PureComponent);nd.propTypes={country:ne.a.string,countryValueType:ne.a.oneOf([Vu,Wu]),value:ne.a.oneOfType([ne.a.string,ne.a.number]),name:ne.a.string,id:ne.a.string,classes:ne.a.string,blankOptionLabel:ne.a.string,showDefaultOption:ne.a.bool,defaultOptionLabel:ne.a.string,onChange:ne.a.func,onBlur:ne.a.func,labelType:ne.a.string,valueType:ne.a.string,whitelist:ne.a.object,blacklist:ne.a.object,disabled:ne.a.bool,disableWhenEmpty:ne.a.bool,customOptions:ne.a.array},nd.defaultProps={country:"",value:"",name:"rcrs-region",id:"",classes:"",blankOptionLabel:"-",showDefaultOption:!0,defaultOptionLabel:"Select Region",onChange:function(){},onBlur:function(){},countryValueType:Vu,labelType:Vu,valueType:Vu,whitelist:{},blacklist:{},disabled:!1,disableWhenEmpty:!1,customOptions:[]};var rd=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.inputRef,n=e.labelName,r=e.labelPosition,i=e.classNameLabel,a=e.validatorElement,o=e.required,s=e.size,l=e.className,c=e.classNameInput,u=e.children,d=Yt()(e,["inputRef","labelName","labelPosition","classNameLabel","validatorElement","required","size","className","classNameInput","children"]),h="sm"===s,f="md"===s;return v.a.createElement($l.a.Group,{className:P()("left"===r&&"d-flex",h&&pu.a.formGroupSm,f&&pu.a.formGroupMd,l)},n&&v.a.createElement($l.a.Label,{className:[pu.a.label,i]},n,o&&v.a.createElement("span",null," *")),v.a.createElement("div",{className:"".concat(pu.a.controlItem)},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement(td,Gt()({ref:t,classes:P()(["fv-input form-control",pu.a.control,"left"===r&&n&&"ml-2",pu.a.controlItem,pu.a.withValidation,h&&pu.a.formInputSm,f&&pu.a.formInputMd,c])},d))),u,a&&v.a.createElement("div",{className:"ml-2 mt-1"},a)))}}]),n}(g.PureComponent);rd.propTypes={inputRef:ne.a.oneOfType([ne.a.object,ne.a.func,ne.a.string]),labelName:ne.a.string,className:ne.a.string,classNameInput:ne.a.string,value:ne.a.string,name:ne.a.string,onChange:ne.a.func,onBlur:ne.a.func,labelPosition:ne.a.oneOf(["top","left"]),size:ne.a.oneOf(["sm","md","lg"]),validatorElement:ne.a.object,placeholder:ne.a.string,required:ne.a.bool,autoComplete:ne.a.string,onKeyDown:ne.a.func,maxLength:ne.a.number,onMouseEnter:ne.a.func,onMouseLeave:ne.a.func,onFocus:ne.a.func,type:ne.a.string,children:ne.a.node,classNameLabel:ne.a.string},rd.defaultProps={labelPosition:"top",required:!1,size:"md",type:"text",onKeyDown:function(){return null}};var id=r(1020),ad=r.n(id);function od(e){var n=e.item;return v.a.createElement("div",{className:P()(n.isAddNew&&pu.a.addNew,"text-truncate pr-3"),id:n.id},"".concat(n.isAddNew?"".concat(t("createNewTag"),": "):"").concat(n.name))}var sd=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"componentDidUpdate",(function(){document.querySelector(".react-tags__selected")})),G()(V()(e),"reactTagRef",v.a.createRef()),G()(V()(e),"handleInput",(function(t){if(!(null==t||t.length<1)){var n=e.props.onInput,r=t.trim().toLowerCase(),i=e.reactTagRef.current.state.options;if(i&&i.length>0){var a=i.findIndex((function(e){return e.name.toLowerCase()===r}));r.length<t.length?e.reactTagRef.current.setState({index:a}):-1==a?e.reactTagRef.current.setState({index:0}):e.reactTagRef.current.setState({index:a})}n&&n(t)}})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=(e.inputRef,e.labelName),n=e.labelPosition,r=e.classNameLabel,i=e.validatorElement,a=e.required,o=e.size,s=e.className,l=(e.classNameInput,e.children),c=e.tags,u=e.suggestions,d=e.minQueryLength,h=e.suggestionComponent,f=e.searchDisabled,p=e.noPaddingSuggestionItem,m=e.suggestionsDisplayTop,g=e.suggestionsWrapperClassName,b=e.searchInputClassName,y=e.hideSearch,A=Yt()(e,["inputRef","labelName","labelPosition","classNameLabel","validatorElement","required","size","className","classNameInput","children","tags","suggestions","minQueryLength","suggestionComponent","searchDisabled","noPaddingSuggestionItem","suggestionsDisplayTop","suggestionsWrapperClassName","searchInputClassName","hideSearch"]),_="sm"===o,w="md"===o;return v.a.createElement($l.a.Group,{className:P()("left"===n&&"d-flex",_&&pu.a.formGroupSm,w&&pu.a.formGroupMd,s)},t&&v.a.createElement($l.a.Label,{className:[pu.a.label,r]},t,a&&v.a.createElement("span",null," *")),v.a.createElement("div",{className:"".concat(pu.a.controlItem)},v.a.createElement("div",{className:P()("d-flex align-items-center",pu.a.webkitPosition)},v.a.createElement(ad.a,Gt()({},A,{ref:this.reactTagRef,onInput:this.handleInput,tags:c,classNames:{root:"react-tags fv-custom-scroll y",rootFocused:pu.a.isFocused,selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:P()("react-tags__search",f&&"search-disabled",y&&"d-none"),searchWrapper:"react-tags__search-wrapper",searchInput:P()("react-tags__search-input",b),suggestions:P()("react-tags__suggestions",p&&"react-tags__suggestions-no-padding",m&&pu.a.suggestionsDisplayTop,g),suggestionActive:"is-active",suggestionDisabled:"is-disabled"},suggestions:u,minQueryLength:d,suggestionComponent:h||od}))),l,i&&v.a.createElement("div",{className:"ml-2 mt-1 text-danger"},i)))}}]),n}(g.PureComponent);function ld(){return(ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function cd(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ud(e){return(ud="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)}sd.propTypes={inputRef:ne.a.oneOfType([ne.a.object,ne.a.func,ne.a.string]),labelName:ne.a.string,className:ne.a.string,classNameInput:ne.a.string,labelPosition:ne.a.oneOf(["top","left"]),size:ne.a.oneOf(["sm","md","lg"]),validatorElement:ne.a.any,required:ne.a.bool,children:ne.a.node,classNameLabel:ne.a.string,minQueryLength:ne.a.number,searchDisabled:ne.a.bool,noPaddingSuggestionItem:ne.a.bool,suggestionsDisplayTop:ne.a.bool},sd.defaultProps={labelPosition:"top",required:!1,size:"md",tags:[],minQueryLength:0,searchDisabled:!1,noPaddingSuggestionItem:!1,suggestionsDisplayTop:!1};var dd=r(551),hd=r.n(dd);function fd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pd(e){var t=function(e,t){if("object"!=ud(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ud(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ud(t)?t:t+""}function md(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pd(r.key),r)}}function gd(e,t,n){return t&&md(e.prototype,t),n&&md(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vd(e,t){return(vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function bd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vd(e,t)}function yd(e,t,n){return(t=pd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ad(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_d(Object(n),!0).forEach((function(t){Ad(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ed(e){return(Ed=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Sd(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ed(e);if(t){var i=Ed(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sd(this,n)}}var Td=function(){};function kd(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function xd(e,t,n){var r=[n];if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&r.push("".concat(kd(e,i)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Od=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===ud(e)&&null!==e?[e]:[]},Id=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,wd({},cd(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function Md(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Pd(e){return Md(e)?window.pageYOffset:e.scrollTop}function Dd(e,t){Md(e)?window.scrollTo(0,t):e.scrollTop=t}function Nd(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Ld(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Td,i=Pd(e),a=t-i,o=10,s=0;function l(){var t=Nd(s+=o,i,a,n);Dd(e,t),s<n?window.requestAnimationFrame(l):r(e)}l()}function Rd(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Bd=!1,jd={get passive(){return Bd=!0}},Fd="undefined"!=typeof window?window:{};Fd.addEventListener&&Fd.removeEventListener&&(Fd.addEventListener("p",Td,jd),Fd.removeEventListener("p",Td,!1));var Ud=Bd;function Hd(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,a=e.shouldScroll,o=e.isFixedPosition,s=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var a=e;a=a.parentElement;)if(t=getComputedStyle(a),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return a;return i}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),h=d.bottom,f=d.height,p=d.top,m=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,v=Pd(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),A=m-y,_=g-p,w=A+v,E=u-v-p,S=h-g+v+b,C=v+p-y;switch(i){case"auto":case"bottom":if(_>=f)return{placement:"bottom",maxHeight:t};if(E>=f&&!o)return a&&Ld(l,S,160),{placement:"bottom",maxHeight:t};if(!o&&E>=r||o&&_>=r)return a&&Ld(l,S,160),{placement:"bottom",maxHeight:o?_-b:E-b};if("auto"===i||o){var T=t,k=o?A:w;return k>=r&&(T=Math.min(k-b-s.controlHeight,t)),{placement:"top",maxHeight:T}}if("bottom"===i)return a&&Dd(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(A>=f)return{placement:"top",maxHeight:t};if(w>=f&&!o)return a&&Ld(l,C,160),{placement:"top",maxHeight:t};if(!o&&w>=r||o&&A>=r){var x=t;return(!o&&w>=r||o&&A>=r)&&(x=o?A-y:w-y),a&&Ld(l,C,160),{placement:"top",maxHeight:x}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var zd=function(e){return"auto"===e?"bottom":e},Vd=Object(g.createContext)({getPortalPlacement:null}),Wd=function(e){bd(n,e);var t=Cd(n);function n(){var e;fd(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,i=n.maxMenuHeight,a=n.menuPlacement,o=n.menuPosition,s=n.menuShouldScrollIntoView,l=n.theme;if(t){var c="fixed"===o,u=Hd({maxHeight:i,menuEl:t,minHeight:r,placement:a,shouldScroll:s&&!c,isFixedPosition:c,theme:l}),d=e.context.getPortalPlacement;d&&d(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||zd(t);return wd(wd({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return gd(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(g.Component);Wd.contextType=Vd;var Gd=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},qd=Gd,Yd=Gd,Kd=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return io("div",ld({css:i("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Kd.defaultProps={children:"No options"};var Xd=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return io("div",ld({css:i("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Xd.defaultProps={children:"Loading..."};var Qd,$d=function(e){bd(n,e);var t=Cd(n);function n(){var e;fd(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==zd(e.props.menuPlacement)&&e.setState({placement:n})},e}return gd(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.className,i=e.controlElement,a=e.cx,o=e.innerProps,s=e.menuPlacement,l=e.menuPosition,c=e.getStyles,u="fixed"===l;if(!t&&!u||!i)return null;var d=this.state.placement||zd(s),h=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),f=u?0:window.pageYOffset,p=h[d]+f,m=io("div",ld({css:c("menuPortal",{offset:p,position:l,rect:h}),className:a({"menu-portal":!0},r)},o),n);return io(Vd.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?Object(go.createPortal)(m,t):m)}}]),n}(g.Component);var Jd={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Zd=function(e){var t=e.size,n=cd(e,["size"]);return io("svg",ld({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Jd},n))},eh=function(e){return io(Zd,ld({size:20},e),io("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},th=function(e){return io(Zd,ld({size:20},e),io("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},nh=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},rh=nh,ih=nh,ah=oo(Qd||(Qd=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"]))),oh=function(e){var t=e.delay,n=e.offset;return io("span",{css:ao({animation:"".concat(ah," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},sh=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps,a=e.isRtl;return io("div",ld({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},i),io(oh,{delay:0,offset:a}),io(oh,{delay:160,offset:!0}),io(oh,{delay:320,offset:!a}))};sh.defaultProps={size:4};var lh=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},ch=function(e){var t=e.children,n=e.innerProps;return io("div",n,t)},uh=ch,dh=ch;var hh=function(e){var t=e.children,n=e.className,r=e.components,i=e.cx,a=e.data,o=e.getStyles,s=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,d=r.Container,h=r.Label,f=r.Remove;return io(uo,null,(function(r){var p=r.css,m=r.cx;return io(d,{data:a,innerProps:wd({className:m(p(o("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":l},n))},s),selectProps:u},io(h,{data:a,innerProps:{className:m(p(o("multiValueLabel",e)),i({"multi-value__label":!0},n))},selectProps:u},t),io(f,{data:a,innerProps:wd({className:m(p(o("multiValueRemove",e)),i({"multi-value__remove":!0},n))},c),selectProps:u}))}))};hh.defaultProps={cropWithEllipsis:!0};var fh={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return io("div",ld({css:i("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},a),t||io(eh,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.className,a=e.isDisabled,o=e.isFocused,s=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return io("div",ld({ref:s,css:r("control",e),className:n({control:!0,"control--is-disabled":a,"control--is-focused":o,"control--menu-is-open":c},i)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return io("div",ld({css:i("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},a),t||io(th,null))},DownChevron:th,CrossIcon:eh,Group:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.Heading,o=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return io("div",ld({css:i("group",e),className:r({group:!0},n)},s),io(a,ld({},o,{selectProps:u,theme:c,getStyles:i,cx:r}),l),io("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,i=Id(e);i.data;var a=cd(i,["data"]);return io("div",ld({css:t("groupHeading",e),className:n({"group-heading":!0},r)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.innerProps,a=e.getStyles;return io("div",ld({css:a("indicatorsContainer",e),className:r({indicators:!0},n)},i),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps;return io("span",ld({},i,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=Id(e),a=i.innerRef,o=i.isDisabled,s=i.isHidden,l=cd(i,["innerRef","isDisabled","isHidden"]);return io("div",{css:r("input",e)},io(hd.a,ld({className:n({input:!0},t),inputRef:a,inputStyle:lh(s),disabled:o},l)))},LoadingIndicator:sh,Menu:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerRef,o=e.innerProps;return io("div",ld({css:i("menu",e),className:r({menu:!0},n),ref:a},o),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps,o=e.innerRef,s=e.isMulti;return io("div",ld({css:i("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":s},n),ref:o},a),t)},MenuPortal:$d,LoadingMessage:Xd,NoOptionsMessage:Kd,MultiValue:hh,MultiValueContainer:uh,MultiValueLabel:dh,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return io("div",n,t||io(eh,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.isDisabled,o=e.isFocused,s=e.isSelected,l=e.innerRef,c=e.innerProps;return io("div",ld({css:i("option",e),className:r({option:!0,"option--is-disabled":a,"option--is-focused":o,"option--is-selected":s},n),ref:l},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps;return io("div",ld({css:i("placeholder",e),className:r({placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.innerProps,o=e.isDisabled,s=e.isRtl;return io("div",ld({css:i("container",e),className:r({"--is-disabled":o,"--is-rtl":s},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,a=e.isDisabled,o=e.innerProps;return io("div",ld({css:i("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":a},n)},o),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.innerProps,a=e.isMulti,o=e.getStyles,s=e.hasValue;return io("div",ld({css:o("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":a,"value-container--has-value":s},n)},i),t)}};function ph(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mh(e){return function(e){if(Array.isArray(e))return ph(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ph(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ph(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gh(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var vh=function(e,t){var n;void 0===t&&(t=gh);var r,i=[],a=!1;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return a&&n===this&&t(o,i)?r:(r=e.apply(this,o),a=!0,n=this,i=o,r)}};for(var bh={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},yh=function(e){return io("span",ld({css:bh},e))},Ah={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,i=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=void 0===n?{}:n,i=e.options,a=e.label,o=void 0===a?"":a,s=e.selectValue,l=e.isDisabled,c=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(o," focused, ").concat(u(s,r),".");if("menu"===t){var d=l?" disabled":"",h="".concat(c?"selected":"focused").concat(d);return"option ".concat(o," ").concat(h,", ").concat(u(i,r),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},_h=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,o=e.selectValue,s=e.selectProps,l=s.ariaLiveMessages,c=s.getOptionLabel,u=s.inputValue,d=s.isMulti,h=s.isOptionDisabled,f=s.isSearchable,p=s.menuIsOpen,m=s.options,b=s.screenReaderStatus,y=s.tabSelectsValue,A=s["aria-label"],_=s["aria-live"],w=Object(g.useMemo)((function(){return wd(wd({},Ah),l||{})}),[l]),E=Object(g.useMemo)((function(){var e,n="";if(t&&w.onChange){var r=t.option,i=t.removedValue,a=t.value,o=i||r||(e=a,Array.isArray(e)?null:e),s=wd({isDisabled:o&&h(o),label:o?c(o):""},t);n=w.onChange(s)}return n}),[t,h,c,w]),S=Object(g.useMemo)((function(){var e="",t=n||r,i=!!(n&&o&&o.includes(n));if(t&&w.onFocus){var a={focused:t,label:c(t),isDisabled:h(t),isSelected:i,options:m,context:t===n?"menu":"value",selectValue:o};e=w.onFocus(a)}return e}),[n,r,c,h,w,m,o]),C=Object(g.useMemo)((function(){var e="";if(p&&m.length&&w.onFilter){var t=b({count:i.length});e=w.onFilter({inputValue:u,resultsMessage:t})}return e}),[i,u,p,w,m,b]),T=Object(g.useMemo)((function(){var e="";if(w.guidance){var t=r?"value":p?"menu":"input";e=w.guidance({"aria-label":A,context:t,isDisabled:n&&h(n),isMulti:d,isSearchable:f,tabSelectsValue:y})}return e}),[A,n,r,d,h,f,p,w,y]),k="".concat(S," ").concat(C," ").concat(T);return io(yh,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text"},a&&io(v.a.Fragment,null,io("span",{id:"aria-selection"},E),io("span",{id:"aria-context"},k)))},wh=[{base:"A",letters:"AⒶＡÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷＢḂḄḆɃƂƁ"},{base:"C",letters:"CⒸＣĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹＤḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"ǱǄ"},{base:"Dz",letters:"ǲǅ"},{base:"E",letters:"EⒺＥÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻＦḞƑꝻ"},{base:"G",letters:"GⒼＧǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽＨĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾＩÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿＪĴɈ"},{base:"K",letters:"KⓀＫḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁＬĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"Ǉ"},{base:"Lj",letters:"ǈ"},{base:"M",letters:"MⓂＭḾṀṂⱮƜ"},{base:"N",letters:"NⓃＮǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"Ǌ"},{base:"Nj",letters:"ǋ"},{base:"O",letters:"OⓄＯÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅＰṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆＱꝖꝘɊ"},{base:"R",letters:"RⓇＲŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈＳẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉＴṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊＵÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋＶṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌＷẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍＸẊẌ"},{base:"Y",letters:"YⓎＹỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏＺŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐａẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑｂḃḅḇƀƃɓ"},{base:"c",letters:"cⓒｃćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓｄḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"ǳǆ"},{base:"e",letters:"eⓔｅèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕｆḟƒꝼ"},{base:"g",letters:"gⓖｇǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗｈĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘｉìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙｊĵǰɉ"},{base:"k",letters:"kⓚｋḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛｌŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"ǉ"},{base:"m",letters:"mⓜｍḿṁṃɱɯ"},{base:"n",letters:"nⓝｎǹńñṅňṇņṋṉƞɲŉꞑꞥ"},{base:"nj",letters:"ǌ"},{base:"o",letters:"oⓞｏòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟｐṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠｑɋꝗꝙ"},{base:"r",letters:"rⓡｒŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢｓßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣｔṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤｕùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥｖṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦｗẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧｘẋẍ"},{base:"y",letters:"yⓨｙỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩｚźẑżžẓẕƶȥɀⱬꝣ"}],Eh=new RegExp("["+wh.map((function(e){return e.letters})).join("")+"]","g"),Sh={},Ch=0;Ch<wh.length;Ch++)for(var Th=wh[Ch],kh=0;kh<Th.letters.length;kh++)Sh[Th.letters[kh]]=Th.base;var xh=function(e){return e.replace(Eh,(function(e){return Sh[e]}))},Oh=vh(xh),Ih=function(e){return e.replace(/^\s+|\s+$/g,"")},Mh=function(e){return"".concat(e.label," ").concat(e.value)};function Ph(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var n=cd(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return io("input",ld({ref:t},n,{css:ao({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var Dh=["boxSizing","height","overflow","paddingRight","position"],Nh={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Lh(e){e.preventDefault()}function Rh(e){e.stopPropagation()}function Bh(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function jh(){return"ontouchstart"in window||navigator.maxTouchPoints}var Fh=!("undefined"==typeof window||!window.document||!window.document.createElement),Uh=0,Hh={capture:!1,passive:!1};var zh=function(){return document.activeElement&&document.activeElement.blur()},Vh={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Wh(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,o=Object(g.useRef)(!1),s=Object(g.useRef)(!1),l=Object(g.useRef)(0),c=Object(g.useRef)(null),u=Object(g.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,h=l.clientHeight,f=c.current,p=t>0,m=d-h-u,g=!1;m>t&&o.current&&(r&&r(e),o.current=!1),p&&s.current&&(a&&a(e),s.current=!1),p&&t>m?(n&&!o.current&&n(e),f.scrollTop=d,g=!0,o.current=!0):!p&&-t>u&&(i&&!s.current&&i(e),f.scrollTop=0,g=!0,s.current=!0),g&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),d=Object(g.useCallback)((function(e){u(e,e.deltaY)}),[u]),h=Object(g.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=Object(g.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),p=Object(g.useCallback)((function(e){if(e){var t=!!Ud&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",d,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",h,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",f,t)}}),[f,h,d]),m=Object(g.useCallback)((function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",d,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",h,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",f,!1))}),[f,h,d]);return Object(g.useEffect)((function(){if(t){var e=c.current;return p(e),function(){m(e)}}}),[t,p,m]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=Object(g.useRef)({}),a=Object(g.useRef)(null),o=Object(g.useCallback)((function(e){if(Fh){var t=document.body,n=t&&t.style;if(r&&Dh.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Uh<1){var a=parseInt(i.current.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,s=window.innerWidth-o+a||0;Object.keys(Nh).forEach((function(e){var t=Nh[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&jh()&&(t.addEventListener("touchmove",Lh,Hh),e&&(e.addEventListener("touchstart",Bh,Hh),e.addEventListener("touchmove",Rh,Hh))),Uh+=1}}),[]),s=Object(g.useCallback)((function(e){if(Fh){var t=document.body,n=t&&t.style;Uh=Math.max(Uh-1,0),r&&Uh<1&&Dh.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&jh()&&(t.removeEventListener("touchmove",Lh,Hh),e&&(e.removeEventListener("touchstart",Bh,Hh),e.removeEventListener("touchmove",Rh,Hh)))}}),[]);return Object(g.useEffect)((function(){if(t){var e=a.current;return o(e),function(){s(e)}}}),[t,o,s]),function(e){a.current=e}}({isEnabled:n});return io(v.a.Fragment,null,n&&io("div",{onClick:zh,css:Vh}),t((function(e){i(e),a(e)})))}var Gh={clearIndicator:ih,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius,o=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:rh,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Yd,menu:function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,a=r.spacing,o=r.colors;return yd(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),yd(t,"backgroundColor",o.neutral0),yd(t,"borderRadius",i),yd(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),yd(t,"marginBottom",a.menuGutter),yd(t,"marginTop",a.menuGutter),yd(t,"position","absolute"),yd(t,"width","100%"),yd(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:qd,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,o=i.colors;return{label:"option",backgroundColor:r?o.primary:n?o.primary25:"transparent",color:t?o.neutral20:r?o.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?o.primary:o.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var qh,Yh={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Kh={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Rd(),captureMenuScroll:!Rd(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=wd({ignoreCase:!0,ignoreAccents:!0,stringify:Mh,trim:!0,matchFrom:"any"},qh),r=n.ignoreCase,i=n.ignoreAccents,a=n.stringify,o=n.trim,s=n.matchFrom,l=o?Ih(t):t,c=o?Ih(a(e)):a(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=Oh(l),c=xh(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Xh(e,t,n,r){return{type:"option",data:t,isDisabled:tf(e,t,n),isSelected:nf(e,t,n),label:Zh(e,t),value:ef(e,t),index:r}}function Qh(e,t){return e.options.map((function(n,r){if(n.options){var i=n.options.map((function(n,r){return Xh(e,n,t,r)})).filter((function(t){return Jh(e,t)}));return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var a=Xh(e,n,t,r);return Jh(e,a)?a:void 0})).filter((function(e){return!!e}))}function $h(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,mh(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Jh(e,t){var n=e.inputValue,r=void 0===n?"":n,i=t.data,a=t.isSelected,o=t.label,s=t.value;return(!af(e)||!a)&&rf(e,{label:o,value:s,data:i},r)}var Zh=function(e,t){return e.getOptionLabel(t)},ef=function(e,t){return e.getOptionValue(t)};function tf(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function nf(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ef(e,t);return n.some((function(t){return ef(e,t)===r}))}function rf(e,t,n){return!e.filterOption||e.filterOption(t,n)}var af=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},of=1,sf=function(e){bd(n,e);var t=Cd(n);function n(e){var r;return fd(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,a=n.name;t.name=a,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,i=r.props,a=i.closeMenuOnSelect,o=i.isMulti;r.onInputChange("",{action:"set-value"}),a&&(r.setState({inputIsHiddenAfterUpdate:!o}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,a=t.name,o=r.state.selectValue,s=i&&r.isOptionSelected(e,o),l=r.isOptionDisabled(e,o);if(s){var c=r.getOptionValue(e);r.setValue(o.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",name:a});i?r.setValue([].concat(mh(o),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),a=n.filter((function(e){return r.getOptionValue(e)!==i})),o=t?a:a[0]||null;r.onChange(o,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),a=e?i:i[0]||null;r.onChange(a,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xd.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Zh(r.props,e)},r.getOptionValue=function(e){return ef(r.props,e)},r.getStyles=function(e,t){var n=Gh[e](t);n.boxSizing="border-box";var i=r.props.styles[e];return i?i(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,wd(wd({},fh),e.components);var e},r.buildCategorizedOptions=function(){return Qh(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return $h(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:wd({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,i=t.menuIsOpen;r.focusInput(),i?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault(),e.stopPropagation()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.stopPropagation(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Md(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-r.initialTouchX),a=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=i>5||a>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return af(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,a=t.escapeClearsValue,o=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,h=t.openMenuOnFocus,f=r.state,p=f.focusedOption,m=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||o)return;r.focusValue("previous");break;case"ArrowRight":if(!n||o)return;r.focusValue("next");break;case"Delete":case"Backspace":if(o)return;if(m)r.removeValue(m);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!p||h&&r.isOptionSelected(p,g))return;r.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(c){if(!p)return;if(r.isComposing)return;r.selectOption(p);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&a&&r.clearValue();break;case" ":if(o)return;if(!c){r.openMenu("first");break}if(!p)return;r.selectOption(p);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++of),r.state.selectValue=Od(e.value),r}return gd(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,r,i,a,o=this.props,s=o.isDisabled,l=o.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),c&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=n.offsetHeight/3,i.bottom+a>r.bottom?Dd(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):i.top-a<r.top&&Dd(t,Math.max(n.offsetTop-a,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,a=this.buildFocusableOptions(),o="first"===e?0:a.length-1;if(!this.props.isMulti){var s=a.indexOf(r[0]);s>-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[o]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var a=n.length-1,o=-1;if(n.length){switch(e){case"previous":o=0===i?0:-1===i?a:i-1;break;case"next":i>-1&&i<a&&(o=i+1)}this.setState({inputIsHidden:-1!==o,focusedValue:n[o]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,a=r.indexOf(n);n||(a=-1),"up"===e?i=a>0?a-1:r.length-1:"down"===e?i=(a+1)%r.length:"pageup"===e?(i=a-t)<0&&(i=0):"pagedown"===e?(i=a+t)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Yh):wd(wd({},Yh),this.props.theme):Yh}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,i=this.selectOption,a=this.setValue,o=this.props,s=o.isMulti,l=o.isRtl,c=o.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:c,selectOption:i,selectProps:o,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return tf(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return nf(this.props,e,t)}},{key:"filterOption",value:function(e,t){return rf(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,o=e.form,s=this.getComponents().Input,l=this.state.inputIsHidden,c=this.commonProps,u=r||this.getElementId("input"),d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return n?v.a.createElement(s,ld({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:o,type:"text",value:i},d)):v.a.createElement(Ph,ld({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Td,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,form:o,value:""},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,o=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,h=c.isMulti,f=c.inputValue,p=c.placeholder,m=this.state,g=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!u)return f?null:v.a.createElement(s,ld({},l,{key:"placeholder",isDisabled:d,isFocused:y}),p);if(h)return g.map((function(t,o){var s=t===b;return(v.a.createElement(n,ld({},l,{components:{Container:r,Label:i,Remove:a},isFocused:s,isDisabled:d,key:"".concat(e.getOptionValue(t)).concat(o),index:o,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value")))}));if(f)return null;var A=g[0];return(v.a.createElement(o,ld({},l,{data:A,isDisabled:d}),this.formatOptionLabel(A,"value")))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var o={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return(v.a.createElement(e,ld({},t,{innerProps:o,isFocused:a})))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!e||!i)return null;return v.a.createElement(e,ld({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return v.a.createElement(n,ld({},r,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return v.a.createElement(e,ld({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,o=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,h=this.props,f=h.captureMenuScroll,p=h.inputValue,m=h.isLoading,g=h.loadingMessage,b=h.minMenuHeight,y=h.maxMenuHeight,A=h.menuIsOpen,_=h.menuPlacement,w=h.menuPosition,E=h.menuPortalTarget,S=h.menuShouldBlockScroll,C=h.menuShouldScrollIntoView,T=h.noOptionsMessage,k=h.onMenuScrollToTop,x=h.onMenuScrollToBottom;if(!A)return null;var O,I=function(t,n){var r=t.type,i=t.data,a=t.isDisabled,o=t.isSelected,s=t.label,l=t.value,h=d===i,f=a?void 0:function(){return e.onOptionHover(i)},p=a?void 0:function(){return e.selectOption(i)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:p,onMouseMove:f,onMouseOver:f,tabIndex:-1};return v.a.createElement(c,ld({},u,{innerProps:g,data:i,isDisabled:a,isSelected:o,key:m,label:s,type:r,value:l,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())O=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,o=t.index,s="".concat(e.getElementId("group"),"-").concat(o),l="".concat(s,"-heading");return v.a.createElement(n,ld({},u,{key:s,data:i,options:a,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e,"".concat(o,"-").concat(e.index))})))}if("option"===t.type)return I(t,"".concat(t.index))}));else if(m){var M=g({inputValue:p});if(null===M)return null;O=v.a.createElement(s,u,M)}else{var P=T({inputValue:p});if(null===P)return null;O=v.a.createElement(l,u,P)}var D={minMenuHeight:b,maxMenuHeight:y,menuPlacement:_,menuPosition:w,menuShouldScrollIntoView:C},N=v.a.createElement(Wd,ld({},u,D),(function(t){var n=t.ref,r=t.placerProps,o=r.placement,s=r.maxHeight;return(v.a.createElement(i,ld({},u,D,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:o}),v.a.createElement(Wh,{captureEnabled:f,onTopArrive:k,onBottomArrive:x,lockEnabled:S},(function(t){return v.a.createElement(a,ld({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:s,focusedOption:d}),O)}))))}));return E||"fixed"===w?v.a.createElement(o,ld({},u,{appendTo:E,controlElement:this.controlRef,menuPlacement:_,menuPosition:w}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,o=this.state.selectValue;if(a&&!r){if(i){if(n){var s=o.map((function(t){return e.getOptionValue(t)})).join(n);return(v.a.createElement("input",{name:a,type:"hidden",value:s}))}var l=o.length>0?o.map((function(t,n){return v.a.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):v.a.createElement("input",{name:a,type:"hidden"});return(v.a.createElement("div",null,l))}var c=o[0]?this.getOptionValue(o[0]):"";return(v.a.createElement("input",{name:a,type:"hidden",value:c}))}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.isFocused,o=t.selectValue,s=this.getFocusableOptions();return v.a.createElement(_h,ld({},e,{ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:a,selectValue:o,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,o=a.className,s=a.id,l=a.isDisabled,c=a.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return v.a.createElement(r,ld({},d,{className:o,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),v.a.createElement(t,ld({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),v.a.createElement(i,ld({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),v.a.createElement(n,ld({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,a=e.options,o=e.value,s=e.menuIsOpen,l=e.inputValue,c={};if(n&&(o!==n.value||a!==n.options||s!==n.menuIsOpen||l!==n.inputValue)){var u=Od(o),d=s?function(e,t){return $h(Qh(e,t))}(e,u):[],h=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,u):null;c={selectValue:u,focusedOption:function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,d),focusedValue:h,clearFocusValueOnUpdate:!1}}var f=null!=i&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{};return wd(wd(wd({},c),f),{},{prevProps:e})}}]),n}(g.Component);sf.defaultProps=Kh;var lf,cf,uf,df={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},hf=(r(1282),r(1283),r(1288),r(1290),r(460),r(1291),g.Component,lf=sf,uf=cf=function(e){bd(n,e);var t=Cd(n);function n(){var e;fd(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return gd(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var e=this,t=this.props;t.defaultInputValue,t.defaultMenuIsOpen,t.defaultValue;var n=cd(t,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return(v.a.createElement(lf,ld({},n,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")})))}}]),n}(g.Component),cf.defaultProps=df,uf);const ff=(e,t,n)=>{const[r,i]=e.split("/"),[a,o]=i.split(":");return Date.UTC(n,r-1,a,o)-36e5*t};var pf,mf=(e,t,n,r,i)=>{const a=new Date(e).getUTCFullYear(),o=ff(t,i,a),s=ff(n,r,a);return e>=o&&e<s},gf=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"],vf=(pf=Object.freeze({__proto__:null,default:{"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau","9.5|s|04/04:03->10/03:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/08:01->10/04:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/saigon,2/tomsk,2/vientiane,2/ho_chi_minh","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/rangoon,9/cocos,2/yangon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/baku,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/katmandu,2/kathmandu","5.5|n":"2/calcutta,2/colombo,2/kolkata","4|s":"9/reunion","4|n":"2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,2/volgograd,9/mahe,9/mauritius","4.5|n|03/22:00->09/21:24":"2/tehran","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|03/28:03->10/31:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kiev,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia","3|n|03/28:02->10/31:03":"8/chisinau,8/tiraspol","3|n|03/28:00->10/30:24":"2/beirut","3|n|03/27:00->10/30:01":"2/gaza,2/hebron","3|n|03/26:02->10/31:02":"2/jerusalem,2/tel_aviv","3|n|03/26:00->10/29:01":"2/amman","3|n|03/26:00->10/28:24":"2/damascus","3|n":"0/addis_ababa,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,0/asmara,2/istanbul","2|s|03/28:02->10/31:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/28:02->10/31:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen","2|n":"0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|04/11:03->05/16:02":"0/casablanca,0/el_aaiun","1|n|03/28:01->10/31:02":"3/canary,3/faeroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faroe,8/belfast","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s|04/04:04->09/26:03":"11/apia","13|s|01/15:02->11/05:03":"11/tongatapu","13|n":"11/enderbury,11/fakaofo","12|s|04/04:03->09/26:02":"12/mcmurdo,11/auckland,12/south_pole","12|s|01/17:03->11/14:02":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis","12.75|s|04/04:03->09/26:02":"11/chatham","11|s|04/04:03->10/03:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/ponape,11/pohnpei","11.5|n|04/04:03->10/03:02":"11/norfolk","10|s|04/04:03->10/03:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,2/yakutsk,11/guam,11/saipan,11/truk,11/chuuk,11/yap","10.5|s|04/04:01->10/03:02":"4/lord_howe,4/lhi","0|n|03/28:00->10/31:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/gmt-0,13/gmt+0,13/gmt0,13/greenwich,13/uct,13/universal,13/zulu","-9|n|03/14:02->11/07:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/14:02->11/07:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/14:02->11/07:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n|03/08:02->11/01:01":"1/dawson,1/whitehorse,6/yukon","-7|n":"1/creston,1/dawson_creek,1/fort_nelson,1/hermosillo,1/phoenix,us/arizona","-6|s|04/03:22->09/04:22":"11/easter,7/easterisland","-6|n|04/04:02->10/31:02":"1/chihuahua,1/mazatlan,10/bajasur","-6|n|03/14:02->11/07:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,us/mountain","-6|n":"1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|04/04:02->10/31:02":"1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general","-5|n|03/14:02->11/07:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n|03/12:03->11/05:01":"1/north_dakota","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan","-4|s|05/13:23->08/13:01":"12/palmer","-4|s|04/03:24->09/05:00":"1/santiago,7/continental","-4|s|03/27:24->10/03:00":"1/asuncion","-4|s|02/16:24->11/03:00":"1/campo_grande,1/cuiaba","-4|s":"1/la_paz,1/manaus,5/west","-4|n|03/14:02->11/07:02":"1/detroit,1/grand_turk,1/indianapolis,1/iqaluit,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/14:00->11/07:01":"1/havana","-4|n|03/12:03->11/05:01":"1/indiana,1/kentucky","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/comodrivadavia,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/rosario,5/east","-3|n|03/14:02->11/07:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/27:22->10/30:23":"1/godthab,1/nuuk","-2|n|03/14:02->11/07:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/14:02->11/07:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii"}}))&&pf.default||pf;let bf={};Object.keys(vf).forEach(e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),vf[e].split(",").forEach(e=>{e=e.replace(/(^[0-9]+)\//,(e,t)=>(t=Number(t),gf[t]+"/")),bf[e]=n})}),bf.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;bf[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,bf[n]={offset:-1*e,hem:"n"}}var yf=bf;const Af=/(\-?[0-9]+)h(rs)?/i,_f=/(\-?[0-9]+)/,wf=/utc([\-+]?[0-9]+)/i,Ef=/gmt([\-+]?[0-9]+)/i,Sf=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};const Cf=(()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e})(),Tf=Object.keys(yf).reduce((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e},{});var kf,xf=(e,t)=>{if(!e)return Cf;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(e=>(e=(e=(e=(e=(e=e.replace(/ time/g,"")).replace(/ (standard|daylight|summer)/g,"")).replace(/\b(east|west|north|south)ern/g,"$1")).replace(/\b(africa|america|australia)n/g,"$1")).replace(/\beuropean/g,"europe")).replace(/\islands/g,"island"))(n),!0===t.hasOwnProperty(n))return n;if(!0===Tf.hasOwnProperty(n))return Tf[n];if(!0===/[0-9]/.test(n)){let e=function(e){let t=e.match(Af);if(null!==t)return Sf(t[1]);if(t=e.match(wf),null!==t)return Sf(t[1]);if(t=e.match(Ef),null!==t){let e=-1*Number(t[1]);return Sf(e)}return t=e.match(_f),null!==t?Sf(t[1]):null}(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")},Of=(function(e,t){t.isLeapYear=e=>e%4==0&&e%100!=0||e%400==0,t.isDate=e=>"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf()),t.isArray=e=>"[object Array]"===Object.prototype.toString.call(e),t.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),t.isBoolean=e=>"[object Boolean]"===Object.prototype.toString.call(e),t.zeroPad=(e,t=2)=>(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e,t.titleCase=e=>e?e[0].toUpperCase()+e.substr(1):"",t.ordinal=e=>{let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"},t.toCardinal=e=>(e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)),t.normalize=(e="")=>"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e,t.getEpoch=e=>"number"==typeof e?e:t.isDate(e)?e.getTime():e.epoch?e.epoch:null,t.beADate=(e,n)=>!1===t.isObject(e)?n.clone().set(e):e,t.formatTimezone=(e,n="")=>{const r=e>0?"+":"-",i=Math.abs(e);return`${r}${t.zeroPad(parseInt(""+i,10))}${n}${t.zeroPad(i%1*60)}`}}(kf={exports:{}},kf.exports),kf.exports);Of.isLeapYear,Of.isDate,Of.isArray,Of.isObject,Of.isBoolean,Of.zeroPad,Of.titleCase,Of.ordinal,Of.toCardinal,Of.normalize,Of.getEpoch,Of.beADate,Of.formatTimezone;const If={year:(new Date).getFullYear(),month:0,date:1};var Mf={parseArray:(e,t,n)=>{if(0===t.length)return e;let r=["year","month","date","hour","minute","second","millisecond"];for(let i=0;i<r.length;i++){let a=t[i]||n[r[i]]||If[r[i]]||0;e=e[r[i]](a)}return e},parseObject:(e,t,n)=>{if(0===Object.keys(t).length)return e;t=Object.assign({},If,n,t);let r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];if(void 0===e[a]||"function"!=typeof e[a])continue;if(null===t[a]||void 0===t[a]||""===t[a])continue;let o=t[a]||n[a]||If[a]||0;e=e[a](o)}return e},parseNumber:function(e,t){return t>0&&t<25e8&&!1===e.silent&&(console.warn("  - Warning: You are setting the date to January 1970."),console.warn("       -   did input seconds instead of milliseconds?")),e.epoch=t,e}};const Pf=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach(t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))}),e},Df={now:e=>Pf(e),today:e=>Pf(e),tonight:e=>(e=Pf(e)).hour(18),tomorrow:e=>(e=(e=Pf(e)).add(1,"day")).startOf("day"),yesterday:e=>(e=(e=Pf(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=Pf(e).year();return e.set([t,11,25,18,0,0])},"new years":e=>{let t=Pf(e).year();return e.set([t,11,31,18,0,0])}};Df["new years eve"]=Df["new years"];var Nf=Df;let Lf={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};Lf.date=Lf.day,Lf.month=25488e5,Lf.week=6048e5,Lf.year=3154e7,Object.keys(Lf).forEach(e=>{Lf[e+"s"]=Lf[e]});var Rf=Lf;const Bf=(e,t,n,r,i)=>{let a=e.d[n]();if(a===t)return;let o=null===i?null:e.d[i](),s=e.epoch,l=t-a;e.epoch+=Rf[r]*l,"day"===r&&Math.abs(l)>28&&t<28&&(e.epoch+=Rf.hour),null!==i&&o!==e.d[i]()&&(e.epoch=s);const c=Rf[r]/2;for(;e.d[n]()<t;)e.epoch+=c;for(;e.d[n]()>t;)e.epoch-=c;null!==i&&o!==e.d[i]()&&(e.epoch=s)},jf={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>Bf(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,r=n.getMonth(),i=e.epoch,a=n.getFullYear();if(r===t)return;let o=t-r;for(e.epoch+=Rf.day*(28*o),a!==e.d.getFullYear()&&(e.epoch=i);e.d.getMonth()<t;)e.epoch+=Rf.day;for(;e.d.getMonth()>t;)e.epoch-=Rf.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>Bf(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>Bf(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>Bf(e,t,"getMinutes","minute","getHours")},second:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>{e.epoch=e.seconds(t).epoch}},millisecond:{valid:e=>e>=0&&e<1e3,walkTo:(e,t)=>{e.epoch=e.milliseconds(t).epoch}}};var Ff=(e,t)=>{let n=Object.keys(jf),r=e.clone();for(let i=0;i<n.length;i++){let a=n[i],o=t[a];if(void 0===o&&(o=r[a]()),"string"==typeof o&&(o=parseInt(o,10)),!jf[a].valid(o))return e.epoch=null,void(!1===e.silent&&console.warn("invalid "+a+": "+o));jf[a].walkTo(e,o)}},Uf=[31,28,31,30,31,30,31,31,30,31,30,31];let Hf=["jan","feb","mar","apr","may","jun","jul","aug","sept","oct","nov","dec"],zf=["january","february","march","april","may","june","july","august","september","october","november","december"];var Vf=()=>Hf,Wf=()=>function(){const e={sep:8};for(let t=0;t<Hf.length;t++)e[Hf[t]]=t;for(let t=0;t<zf.length;t++)e[zf[t]]=t;return e}();const Gf=Of.isLeapYear,qf=Wf();var Yf={parseOffset:(e,t)=>{if(!t)return e;"Z"!==t&&"z"!==t||(t="+0000");let n=0;/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),n*=-1,n>=0&&(n="+"+n);let r="etc/gmt"+n;return e.timezones[r]&&(e.tz=r),e},parseTime:(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let r=Number(n[1]);if(r<0||r>24)return e.startOf("day");let i=Number(n[2]);if(n[2].length<2||i<0||i>59)return e.startOf("day");n[4]>999&&(n[4]=parseInt((""+n[4]).substring(0,3),10)),e=(e=(e=(e=e.hour(r)).minute(i)).seconds(n[3]||0)).millisecond(n[4]||0);let a=t.match(/[\b0-9] ?(am|pm)\b/);return null!==a&&a[1]&&(e=e.ampm(a[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e.startOf("day")},parseYear:(e="",t)=>{if(e=e.trim(),!0===/^'[0-9][0-9]$/.test(e)){let t=Number(e.replace(/'/,""));return t>50?1900+t:2e3+t}let n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},parseMonth:function(e){return e=e.toLowerCase().trim(),qf[e]},validate:e=>{if(!0!==Uf.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(Gf(e.year)&&e.date<=29)||e.date<=28;let t=Uf[e.month]||0;return e.date<=t}};const{validate:Kf,parseTime:Xf,parseYear:Qf,parseMonth:$f,parseOffset:Jf}=Yf;var Zf=[{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Kf(n)?(e.epoch=null,e):(Jf(e,t[5]),Ff(e,n),e=Xf(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Kf(n)?(e.epoch=null,e):(Ff(e,n),e=Xf(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:Qf(t[1],e._today),month:$f(t[2]),date:Of.toCardinal(t[3]||"")};return!1===Kf(n)?(e.epoch=null,e):(Ff(e,n),e=Xf(e,t[4]))}}];const{validate:ep,parseTime:tp,parseYear:np,parseMonth:rp}=Yf;var ip=[{reg:/^([0-9]{1,2})[\-\/.]([0-9]{1,2})[\-\/.]?([0-9]{4})?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n=parseInt(t[1],10)-1,r=parseInt(t[2],10);(e.british||n>=12)&&(r=parseInt(t[1],10),n=parseInt(t[2],10)-1);let i={date:r,month:n,year:np(t[3],e._today)||(new Date).getFullYear()};return!1===ep(i)?(e.epoch=null,e):(Ff(e,i),e=tp(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:np(t[3],e._today),month:rp(t[1]),date:Of.toCardinal(t[2]||"")};return!1===ep(n)?(e.epoch=null,e):(Ff(e,n),e=tp(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:np(t[3],e._today),month:rp(t[1]),date:Of.toCardinal(t[2]||"")};return!1===ep(n)?(e.epoch=null,e):(Ff(e,n),e=tp(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:np(t[5],e._today),month:rp(t[1]),date:Of.toCardinal(t[2]||"")};return!1===ep(n)?(e.epoch=null,e):(Ff(e,n),e=tp(e,t[3]))}}];const{validate:ap,parseTime:op,parseYear:sp,parseMonth:lp}=Yf;var cp=[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:sp(t[3],e._today),month:lp(t[2]),date:Of.toCardinal(t[1]||"")};return!1===ap(n)?(e.epoch=null,e):(Ff(e,n),e=op(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:sp(t[3],e._today),month:lp(t[2]),date:Of.toCardinal(t[1])};return n.month&&!1!==ap(n)?(Ff(e,n),e=op(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:lp(t[2]),year:Number(t[3])};return!1===ap(n)?(e.epoch=null,e):(Ff(e,n),e=e.startOf("day"),e=op(e,t[4]))}}];const{validate:up,parseTime:dp,parseYear:hp,parseMonth:fp}=Yf;var pp=[].concat(Zf,ip,cp,[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===up(n)?(e.epoch=null,e):(Ff(e,n),e=dp(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:hp(t[2],e._today),month:fp(t[1]),date:e._today.date||1};return!1===up(n)?(e.epoch=null,e):(Ff(e,n),e=dp(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let r=t[3]||"";return r&&(r=r.trim(),e=e.year(r)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let r=t[3]||"";return r&&(r=r.trim(),e=e.year(r)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let r=new Date,i={year:parseInt(n.trim(),10),month:r.getMonth(),date:r.getDate()};return!1===up(i)?(e.epoch=null,e):(Ff(e,i),e=dp(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let r=new Date,i={year:parseInt(n.trim(),10),month:r.getMonth(),date:r.getDate()};return!1===up(i)?(e.epoch=null,e):(Ff(e,i),e=dp(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let r=new Date,i={year:hp(t[0],n),month:n.month||r.getMonth(),date:n.date||r.getDate()};return!1===up(i)?(e.epoch=null,e):(Ff(e,i),e=dp(e))}}]);const{parseArray:mp,parseObject:gp,parseNumber:vp}=Mf,bp={year:(new Date).getFullYear(),month:0,date:1};var yp=(e,t)=>{let n=e._today||bp;if("number"==typeof t)return vp(e,t);if(e.epoch=Date.now(),e._today&&Of.isObject(e._today)&&Object.keys(e._today).length>0){let t=gp(e,n,bp);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===Of.isDate(t)?(e.epoch=t.getTime(),e):!0===Of.isArray(t)?e=mp(e,t,n):!0===Of.isObject(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=gp(e,t,n):"string"!=typeof t?e:(t=function(e){return(e=(e=(e=e.replace(/\b(mon|tues?|wed|wednes|thur?s?|fri|sat|satur|sun)(day)?\b/i,"")).replace(/([0-9])(th|rd|st|nd)/,"$1")).replace(/,/g,"")).replace(/ +/g," ").trim()}(t),!0===Nf.hasOwnProperty(t)?e=Nf[t](e):function(e,t,n){for(let r=0;r<pp.length;r++){let i=t.match(pp[r].reg);if(i){let t=pp[r].parse(e,i,n);if(null!==t&&t.isValid())return t}}return!1===e.silent&&console.warn("Warning: couldn't parse date-string: '"+t+"'"),e.epoch=null,e}(e,t))};let Ap=["sun","mon","tue","wed","thu","fri","sat"],_p=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];var wp={short:()=>Ap,long:()=>_p,set:e=>{Ap=e.short||Ap,_p=e.long||_p},aliases:{mo:1,tu:2,we:3,th:4,fr:5,sa:6,su:7,tues:2,weds:3,wedn:3,thur:4,thurs:4}};let Ep=!0;var Sp=e=>{let t=e.timezone().current.offset;return t?Of.formatTimezone(t,":"):"Z"};const Cp=e=>Ep?Of.titleCase(e):e,Tp={day:e=>Cp(e.dayName()),"day-short":e=>Cp(wp.short()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>Of.ordinal(e.day()),"day-pad":e=>Of.zeroPad(e.day()),date:e=>e.date(),"date-ordinal":e=>Of.ordinal(e.date()),"date-pad":e=>Of.zeroPad(e.date()),month:e=>Cp(e.monthName()),"month-short":e=>Cp(Vf()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>Of.ordinal(e.month()),"month-pad":e=>Of.zeroPad(e.month()),"iso-month":e=>Of.zeroPad(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?"'"+String(e.year()).substr(2,4):(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,r=Of.zeroPad(Math.abs(t),4);return n&&(r=Of.zeroPad(r,6),r="-"+r),r},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${Of.zeroPad(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>Of.zeroPad(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>Of.zeroPad(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>Of.zeroPad(e.minute()),second:e=>e.second(),"second-pad":e=>Of.zeroPad(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>Of.zeroPad(e.millisecond(),3),ampm:e=>e.ampm(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>Sp(e),numeric:e=>`${e.year()}/${Of.zeroPad(e.month()+1)}/${Of.zeroPad(e.date())}`,"numeric-us":e=>`${Of.zeroPad(e.month()+1)}/${Of.zeroPad(e.date())}/${e.year()}`,"numeric-uk":e=>`${Of.zeroPad(e.date())}/${Of.zeroPad(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${Of.zeroPad(e.month()+1)}/${Of.zeroPad(e.date())}`,iso:e=>`${e.format("iso-year")}-${Of.zeroPad(e.month()+1)}-${Of.zeroPad(e.date())}T${Of.zeroPad(e.h24())}:${Of.zeroPad(e.minute())}:${Of.zeroPad(e.second())}.${Of.zeroPad(e.millisecond(),3)}${Sp(e)}`,"iso-short":e=>{let t=Of.zeroPad(e.month()+1),n=Of.zeroPad(e.date());return`${e.year()}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${Vf()[e.month()]} ${Of.ordinal(e.date())}, ${e.time()}`,"nice-24":e=>`${Vf()[e.month()]} ${Of.ordinal(e.date())}, ${e.hour24()}:${Of.zeroPad(e.minute())}`,"nice-year":e=>`${Vf()[e.month()]} ${Of.ordinal(e.date())}, ${e.year()}`,"nice-day":e=>`${wp.short()[e.day()]} ${Cp(Vf()[e.month()])} ${Of.ordinal(e.date())}`,"nice-full":e=>`${e.dayName()} ${Cp(e.monthName())} ${Of.ordinal(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${Cp(e.monthName())} ${Of.ordinal(e.date())}, ${e.hour24()}:${Of.zeroPad(e.minute())}`},kp={"day-name":"day","month-name":"month","iso 8601":"iso","time-h24":"time-24","time-12":"time","time-h12":"time",tz:"timezone","day-num":"day-number","month-num":"month-number","month-iso":"iso-month","year-iso":"iso-year","nice-short":"nice","nice-short-24":"nice-24",mdy:"numeric-us",dmy:"numeric-uk",ymd:"numeric","yyyy/mm/dd":"numeric","mm/dd/yyyy":"numeric-us","dd/mm/yyyy":"numeric-us","little-endian":"numeric-uk","big-endian":"numeric","day-nice":"nice-day"};Object.keys(kp).forEach(e=>Tp[e]=Tp[kp[e]]);var xp=(e,t="")=>{if(!0!==e.isValid())return"";if(Tp.hasOwnProperty(t)){let n=Tp[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t&&(n=Cp(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t.replace(n,(t,n)=>{if(n=n.toLowerCase().trim(),Tp.hasOwnProperty(n)){let t=String(Tp[n](e));return"ampm"!==n?Cp(t):t}return""})}return e.format("iso-short")};const Op=Of.zeroPad,Ip=Of.formatTimezone,Mp={G:e=>e.era(),GG:e=>e.era(),GGG:e=>e.era(),GGGG:e=>"AD"===e.era()?"Anno Domini":"Before Christ",y:e=>e.year(),yy:e=>parseInt(String(e.year()).substr(2,4),10),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>Op(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>Op(e.week()),d:e=>e.date(),dd:e=>Op(e.date()),D:e=>e.dayOfYear(),DD:e=>Op(e.dayOfYear()),DDD:e=>Op(e.dayOfYear(),3),E:e=>e.format("day-short"),EE:e=>e.format("day-short"),EEE:e=>e.format("day-short"),EEEE:e=>e.format("day"),EEEEE:e=>e.format("day")[0],e:e=>e.day(),ee:e=>e.day(),eee:e=>e.format("day-short"),eeee:e=>e.format("day"),eeeee:e=>e.format("day")[0],a:e=>e.ampm().toUpperCase(),aa:e=>e.ampm().toUpperCase(),aaa:e=>e.ampm().toUpperCase(),aaaa:e=>e.ampm().toUpperCase(),h:e=>e.h12(),hh:e=>Op(e.h12()),H:e=>e.hour(),HH:e=>Op(e.hour()),m:e=>e.minute(),mm:e=>Op(e.minute()),s:e=>e.second(),ss:e=>Op(e.second()),SSS:e=>Op(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>Ip(e.timezone().current.offset),ZZ:e=>Ip(e.timezone().current.offset),ZZZ:e=>Ip(e.timezone().current.offset),ZZZZ:e=>Ip(e.timezone().current.offset,":")},Pp=(e,t,n)=>{let r=e,i=t;for(let a=0;a<n;a+=1)Mp[r]=Mp[i],r+=e,i+=t};Pp("q","Q",4),Pp("L","M",4),Pp("Y","y",4),Pp("c","e",4),Pp("k","H",2),Pp("K","h",2),Pp("S","s",2),Pp("v","z",4),Pp("V","Z",4);const Dp=["year","season","quarter","month","week","day","quarterHour","hour","minute"],Np=function(e,t){let n=e.clone().startOf(t),r=e.clone().endOf(t).epoch-n.epoch,i=(e.epoch-n.epoch)/r;return parseFloat(i.toFixed(2))};const Lp=(e,t,n)=>{let r=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),r+=1;return e.isAfter(t,n)&&(r-=1),r};var Rp=(e,t,n)=>e.isBefore(t)?Lp(e,t,n):-1*Lp(t,e,n),Bp=function(e,t,n){t=Of.beADate(t,e);let r=!1;if(e.isAfter(t)){let n=e;e=t,t=n,r=!0}let i=function(e,t){let n=t.epoch-e.epoch,r={milliseconds:n,seconds:parseInt(n/1e3,10)};r.minutes=parseInt(r.seconds/60,10),r.hours=parseInt(r.minutes/60,10);let i=e.clone();return r.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(i,t),i=e.add(r.years,"year"),r.months=12*r.years,i=e.add(r.months,"month"),r.months+=Rp(i,t,"month"),r.weeks=52*r.years,i=e.add(r.weeks,"week"),r.weeks+=Rp(i,t,"week"),r.days=7*r.weeks,i=e.add(r.days,"day"),r.days+=Rp(i,t,"day"),r}(e,t);return r&&(i=function(e){return Object.keys(e).forEach(t=>{e[t]*=-1}),e}(i)),n?(n=Of.normalize(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),i[n]):i};const jp={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function Fp(e,t){return 1===e&&(t=t.slice(0,-1)),e+" "+t}var Up={north:[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],south:[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]]},Hp=[null,[0,1],[3,1],[6,1],[9,1]];const zp={minute:e=>(Ff(e,{second:0,millisecond:0}),e),quarterhour:e=>{let t=e.minutes();return e=t>=45?e.minutes(45):t>=30?e.minutes(30):t>=15?e.minutes(15):e.minutes(0),Ff(e,{second:0,millisecond:0}),e},hour:e=>(Ff(e,{minute:0,second:0,millisecond:0}),e),day:e=>(Ff(e,{hour:0,minute:0,second:0,millisecond:0}),e),week:e=>{let t=e.clone();return(e=e.day(e._weekStart)).isAfter(t)&&(e=e.subtract(1,"week")),Ff(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(Ff(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Hp[t]&&Ff(e,{month:Hp[t][0],date:Hp[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let r=0;r<Up[n].length;r++)if(Up[n][r][0]===t){let i=e.year();return"winter"===t&&e.month()<3&&(i-=1),Ff(e,{year:i,month:Up[n][r][1],date:Up[n][r][2],hour:0,minute:0,second:0,millisecond:0}),e}return e},year:e=>(Ff(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e.year(n)}};zp.date=zp.day;var Vp=e=>{let t=e.timezones,n=e.tz;if(!1===t.hasOwnProperty(n)&&(n=xf(e.tz,t)),null===n)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=t[n],i={name:(a=n,a=(a=(a=a[0].toUpperCase()+a.substr(1)).replace(/\/gmt/,"/GMT")).replace(/[\/_]([a-z])/gi,e=>e.toUpperCase())),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};var a,o;if(i.hasDst){let e=(o=r.dst)?o.split("->"):[];i.change={start:e[0],back:e[1]}}let s=r.offset,l=s;return!0===i.hasDst&&(l="North"===i.hemisphere?s-1:r.offset+1),!1===i.hasDst?(i.current.offset=s,i.current.isDST=!1):!0===mf(e.epoch,i.change.start,i.change.back,s,l)?(i.current.offset=s,i.current.isDST="North"===i.hemisphere):(i.current.offset=l,i.current.isDST="South"===i.hemisphere),i};const Wp=["century","decade","year","month","date","day","hour","minute","second","millisecond"],Gp={set:function(e,t){let n=this.clone();return n=yp(n,e),t&&(this.tz=xf(t)),n},timezone:function(){return Vp(this)},isDST:function(){return Vp(this).current.isDST},hasDST:function(){return Vp(this).hasDst},offset:function(){return 60*Vp(this).current.offset},hemisphere:function(){return Vp(this).hemisphere},format:function(e){return xp(this,e)},unixFmt:function(e){return((e,t)=>{let n=t.split("");return n=function(e){for(let t=0;t<e.length;t+=1)if("'"===e[t])for(let n=t+1;n<e.length;n+=1){if(e[n]&&(e[t]+=e[n]),"'"===e[n]){e[n]=null;break}e[n]=null}return e.filter(e=>e)}(n),n=function(e){for(let t=0;t<e.length;t+=1){let n=e[t];for(let r=t+1;r<e.length&&e[r]===n;r+=1)e[t]+=e[r],e[r]=null}return(e=e.filter(e=>e)).map(e=>("''"===e&&(e="'"),e))}(n),n.reduce((t,n)=>(void 0!==Mp[n]?t+=Mp[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t),"")})(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=Of.normalize(t),zp[t]?zp[t](n):"summer"===t||"winter"===t?(n=n.season(t),zp.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=Of.normalize(t),zp[t]?(n=zp[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){let e=this.year();return Of.isLeapYear(e)},progress:function(e){return((e,t)=>{if(t)return t=Of.normalize(t),Np(e,t);let n={};return Dp.forEach(t=>{n[t]=Np(e,t)}),n})(this,e)},nearest:function(e){return((e,t)=>{let n=e.progress();return"quarterhour"===(t=Of.normalize(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e})(this,e)},diff:function(e,t){return Bp(this,e,t)},since:function(e){return e||(e=this.clone().set()),((e,t)=>{const n=function(e,t){const n=e.isBefore(t),r=n?t:e;let i=n?e:t;i=i.clone();const a={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(a).forEach(e=>{if(i.isSame(r,e))return;let t=i.diff(r,e);i=i.add(t,e),a[e]=t}),n&&Object.keys(a).forEach(e=>{0!==a[e]&&(a[e]*=-1)}),a}(e,t=Of.beADate(t,e));if(!0===Object.keys(n).every(e=>!n[e]))return{diff:n,rounded:"now",qualified:"now",precise:"now"};let r,i,a,o=[];return Object.keys(n).forEach((e,t,a)=>{const s=Math.abs(n[e]);if(0===s)return;const l=Fp(s,e);if(o.push(l),!r){if(r=i=l,t>4)return;const o=a[t+1],c=Math.abs(n[o]);c>jp[o].almost?(r=Fp(s+1,e),i="almost "+r):c>jp[o].over&&(i="over "+l)}}),a=o.splice(0,2).join(", "),!0===e.isAfter(t)?(r+=" ago",i+=" ago",a+=" ago"):(r="in "+r,i="in "+i,a="in "+a),{diff:n,rounded:r,qualified:i,precise:a}})(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!(!this.epoch&&0!==this.epoch||isNaN(this.d.getTime()))},goto:function(e){let t=this.clone();return t.tz=xf(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return function(e,t="",n){if(!t||!n)return[];if(t=Of.normalize(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let r=e.clone();!function(e){return!!wp.short().find(t=>t===e)||!!wp.long().find(t=>t===e)}(t)?r=r.next(t):(r=r.next(t),t="week");let i=[];for(;r.isBefore(n);)i.push(r),r=r.add(1,t);return i}(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},log:function(){return console.log(""),console.log(xp(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(xp(this,"full-short")),this},json:function(){return Wp.reduce((e,t)=>(e[t]=this[t](),e),{})},debug:function(){let e=this.timezone(),t=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return t+="\n     - "+this.format("time"),console.log("\n\n",t+"\n     - "+e.name+" ("+e.current.offset+")"),this},from:function(e){return(e=this.clone().set(e)).since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(e){if("number"==typeof e)return this._weekStart=e,this;if("string"==typeof e){e=e.toLowerCase().trim();let t=wp.short().indexOf(e);-1===t&&(t=wp.long().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};Gp.inDST=Gp.isDST,Gp.round=Gp.nearest,Gp.each=Gp.every;var qp=Gp;const Yp=Of.isLeapYear,Kp=e=>("string"==typeof e&&(e=parseInt(e,10)),e),Xp=["year","month","date","hour","minute","second","millisecond"],Qp=(e,t,n)=>{let r=Xp.indexOf(n),i=Xp.slice(r,Xp.length);for(let n=0;n<i.length;n++){let r=t[i[n]]();e[i[n]](r)}return e},$p=function(e,t,n,r){return!0===n&&e.isBefore(t)?e=e.add(1,r):!1===n&&e.isAfter(t)&&(e=e.minus(1,r)),e};var Jp=(e,t,n)=>{t=Kp(t);let r=e.clone(),i=(e.minute()-t)*Rf.minute;return e.epoch-=i,Qp(e,r,"second"),(e=$p(e,r,n,"hour")).epoch},Zp=(e,t,n)=>{(t=Kp(t))>=24?t=24:t<0&&(t=0);let r=e.clone(),i=e.hour()-t,a=i*Rf.hour;return e.epoch-=a,e.date()!==r.date()&&(e=r.clone(),i>1&&(i-=1),i<1&&(i+=1),a=i*Rf.hour,e.epoch-=a),Ff(e,{hour:t}),Qp(e,r,"minute"),(e=$p(e,r,n,"day")).epoch},em=(e,t)=>("string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Kp(t),Ff(e,{year:t}),e.epoch),tm={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=((e,t)=>{t=Kp(t);let n=e.millisecond()-t;return e.epoch-n})(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=((e,t,n)=>{t=Kp(t);let r=e.clone(),i=(e.second()-t)*Rf.second;return e.epoch=e.epoch-i,(e=$p(e,r,n,"minute")).epoch})(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=Jp(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=Zp(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),r=e%1;r*=60;let i=parseInt(e,10);return n.epoch=Zp(n,i,t),n.epoch=Jp(n,r,t),n}let n=this.d,r=n.getHours(),i=n.getMinutes();return i/=60,r+i},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),r=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(r){let e=parseInt(r[1],10);"pm"===r[2]&&(e+=12),n.epoch=Zp(n,e,t)}return n}let r=n.getHours();return r>12&&(r-=12),0===r&&(r=12),r},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=((e,t,n)=>{let r=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!r){if(r=t.match(/([0-9]{1,2}) ?(am|pm)/),!r)return e.epoch;r.splice(2,0,"0"),r.splice(3,0,"")}let i=!1,a=parseInt(r[1],10),o=parseInt(r[2],10);o>=60&&(o=59),a>12&&(i=!0),!1===i&&("am"===r[4]&&12===a&&(a=0),"pm"===r[4]&&a<12&&(a+=12)),r[3]=r[3]||"",r[3]=r[3].replace(/:/,"");let s=parseInt(r[3],10)||0,l=e.clone();return e=(e=(e=(e=e.hour(a)).minute(o)).second(s)).millisecond(0),(e=$p(e,l,n,"day")).epoch})(n,e,t),n}return`${this.h12()}:${Of.zeroPad(this.minute())}${this.ampm()}`},ampm:function(e,t){let n="am",r=this.hour();if(r>=12&&(n="pm"),"string"!=typeof e)return n;let i=this.clone();return e=e.toLowerCase().trim(),r>=12&&"am"===e?(r-=12,i.hour(r,t)):r<12&&"pm"===e?(r+=12,i.hour(r,t)):i},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00am",breakfast:"7:00am",noon:"12:00am",lunch:"12:00pm",afternoon:"2:00pm",evening:"6:00pm",dinner:"6:00pm",night:"11:00pm",midnight:"23:59pm"};let r=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(r=r.time(n[e],t)),r}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}},nm={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=((e,t,n)=>{if((t=Kp(t))>28){let n=e.month(),r=Uf[n];1===n&&29===t&&Yp(e.year())&&(r=29),t>r&&(t=r)}t<=0&&(t=1);let r=e.clone();return Ff(e,{date:t}),(e=$p(e,r,n,"month")).epoch})(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),r=e;"string"==typeof e&&(e=e.toLowerCase(),wp.aliases.hasOwnProperty(e)?r=wp.aliases[e]:(r=wp.short().indexOf(e),-1===r&&(r=wp.long().indexOf(e))));let i=this.d.getDay()-r;!0===t&&i>0&&(i-=7),!1===t&&i<0&&(i+=7);let a=this.subtract(i,"days");return Ff(a,{hour:n.hour(),minute:n.minute(),second:n.second()}),a},dayName:function(e,t){if(void 0===e)return wp.long()[this.day()];let n=this.clone();return n=n.day(e,t),n}};const rm=e=>(e=(e=e.minute(0)).second(0)).millisecond(1);var im={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=((e,t,n)=>{t=Kp(t);let r=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=364),e=(e=e.startOf("year")).add(t,"day"),Qp(e,r,"hour"),(e=$p(e,r,n,"year")).epoch})(n,e,t),n}let n,r=0,i=this.d.getMonth();for(let e=1;e<=i;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),r+=n.getDate();return r+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=((e,t,n)=>{let r=e.clone();return t=Kp(t),"december"===(e=(e=(e=e.month(0)).date(1)).day("monday")).monthName()&&e.date()>=28&&(e=e.add(1,"week")),t-=1,e=e.add(t,"weeks"),(e=$p(e,r,n,"year")).epoch})(this,e,t),n=rm(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=rm(n),n=n.day("monday"),"december"===n.monthName()&&n.date()>=28&&(n=n.add(1,"week"));let r=1;1===n.date()&&(r=0),n=n.minus(1,"second");const i=this.epoch;if(n.epoch>i)return 1;let a=0,o=4*this.month();for(n.epoch+=Rf.week*o,a+=o;a<=52;a++){if(n.epoch>i)return a+r;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=((e,t,n)=>{"string"==typeof t&&(t=Wf()[t.toLowerCase()]),(t=Kp(t))>=12&&(t=11),t<=0&&(t=0);let r=e.date();r>Uf[t]&&(r=Uf[t]);let i=e.clone();return Ff(e,{month:t,date:r}),(e=$p(e,i,n,"year")).epoch})(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return zf[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Hp[e])){let n=this.clone(),r=Hp[e][0];return n=n.month(r,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e<Hp.length;e++)if(n<Hp[e][0])return e-1;return 4},season:function(e,t){let n="north";if("South"===this.hemisphere()&&(n="south"),void 0!==e){let r=this.clone();for(let i=0;i<Up[n].length;i++)e===Up[n][i][0]&&(r=r.month(Up[n][i][1],t),r=r.date(1),r=r.startOf("day"));return r}let r=this.d.getMonth();for(let e=0;e<Up[n].length-1;e++)if(r>=Up[n][e][1]&&r<Up[n][e+1][1])return Up[n][e][0];return"winter"},year:function(e){if(void 0!==e){let t=this.clone();return t.epoch=em(t,e),t}return this.d.getFullYear()},era:function(e){if(void 0!==e){let t=this.clone();e=e.toLowerCase();let n=t.d.getFullYear();return"bc"===e&&n>0&&(t.epoch=em(t,-1*n)),"ad"===e&&n<0&&(t.epoch=em(t,-1*n)),t}return this.d.getFullYear()<0?"BC":"AD"},decade:function(e){if(void 0!==e){if(!(e=(e=(e=String(e)).replace(/([0-9])'?s$/,"$1")).replace(/([0-9])(th|rd|st|nd)/,"$1")))return console.warn("Spacetime: Invalid decade input"),this;2===e.length&&/[0-9][0-9]/.test(e)&&(e="19"+e);let t=Number(e);return isNaN(t)?this:(t=10*Math.floor(t/10),this.year(t))}return this.startOf("decade").year()},century:function(e){if(void 0!==e){"string"==typeof e&&(e=(e=(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1")).replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i,(e,t,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};const am=Object.assign({},tm,nm,im);am.milliseconds=am.millisecond,am.seconds=am.second,am.minutes=am.minute,am.hours=am.hour,am.hour24=am.hour,am.h12=am.hour12,am.h24=am.hour24,am.days=am.day;const om=Of.isLeapYear,sm=function(e,t){return 1===e&&om(t)?29:Uf[e]};const lm=["millisecond","second","minute","hour","date","month"];let cm={second:lm.slice(0,1),minute:lm.slice(0,2),quarterhour:lm.slice(0,2),hour:lm.slice(0,3),date:lm.slice(0,4),month:lm.slice(0,4),quarter:lm.slice(0,4),season:lm.slice(0,4),year:lm,decade:lm,century:lm};cm.week=cm.hour,cm.season=cm.date,cm.quarter=cm.date;const um={year:!0,quarter:!0,season:!0,month:!0,week:!0,day:!0},dm={month:!0,quarter:!0,season:!0,year:!0};const hm={millisecond:e=>e.epoch,second:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second()].join("-"),minute:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute()].join("-"),hour:e=>[e.year(),e.month(),e.date(),e.hour()].join("-"),day:e=>[e.year(),e.month(),e.date()].join("-"),week:e=>[e.year(),e.week()].join("-"),month:e=>[e.year(),e.month()].join("-"),quarter:e=>[e.year(),e.quarter()].join("-"),year:e=>e.year()};hm.date=hm.day;let fm=yf;const pm=function(e,t,n={}){this.epoch=null,this.tz=xf(t,fm),this.silent=n.silent||!0,this.british=n.dmy||n.british,this._weekStart=1,void 0!==n.weekStart&&(this._weekStart=n.weekStart),this._today={},void 0!==n.today&&(this._today=n.today),Object.defineProperty(this,"d",{get:function(){let e=(e=>{let t=e.timezones[e.tz];if(void 0===t)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===t.dst)return t.offset;let n=t.offset,r=t.offset+1;"n"===t.hem&&(r=n-1);let i=t.dst.split("->");return!0===mf(e.epoch,i[0],i[1],n,r)?n:r})(this),t=(new Date(this.epoch).getTimezoneOffset()||0)+60*e;t=60*t*1e3;let n=this.epoch+t;return new Date(n)}}),Object.defineProperty(this,"timezones",{get:()=>fm,set:e=>(fm=e,e)});let r=yp(this,e);this.epoch=r.epoch};var mm;Object.keys(qp).forEach(e=>{pm.prototype[e]=qp[e]}),pm.prototype.clone=function(){return new pm(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},pm.prototype.toLocalDate=function(){return this.toNativeDate()},pm.prototype.toNativeDate=function(){return new Date(this.epoch)},mm=pm,Object.keys(am).forEach(e=>{mm.prototype[e]=am[e]}),(e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let r=this.clone();if("millisecond"===(t=Of.normalize(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),Rf[t]?n.epoch+=Rf[t]*e:"week"===t||"weekend"===t?n.epoch+=Rf.day*(7*e):"quarter"===t||"season"===t?n.epoch+=Rf.month*(3*e):"quarterhour"===t&&(n.epoch+=15*Rf.minute*e);let i={};if(cm[t]&&cm[t].forEach(e=>{i[e]=r[e]()}),um[t]){const e=r.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(i.month=r.month()+e,i=((e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.floor(Math.abs(e.month)/13,10);n=Math.abs(n)+1,e.year=t.year()-n,e.month=e.month%12,e.month=e.month+12,12===e.month&&(e.month=0)}return e})(i,r)),"week"===t){let t=r.date()+7*e;t<=28&&t>1&&(i.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)i=((e,t,n)=>{e.year=t.year(),e.month=t.month();let r=t.date();for(e.date=r-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=sm(e.month,e.year);e.date+=t}return e})(i,r,e);else{let t=r.date()+e;i=((e,t,n)=>{let r=t.year(),i=t.month(),a=sm(i,r);for(;n>a;)n-=a,i+=1,i>=12&&(i-=12,r+=1),a=sm(i,r);return e.month=i,e.date=n,e})(i,r,t)}0!==e&&r.isSame(n,"day")&&(i.date=r.date()+e)}else if("quarter"===t){if(i.month=r.month()+3*e,i.year=r.year(),i.month<0){let e=Math.floor(i.month/12),t=i.month+12*Math.abs(e);i.month=t,i.year+=e}else if(i.month>=12){let e=Math.floor(i.month/12);i.month=i.month%12,i.year+=e}i.date=r.date()}else if("year"===t){let t=r.year()+e,i=n.year();(i<t||i>t)&&(n.epoch+=Rf.day)}else"decade"===t?i.year=n.year()+10:"century"===t&&(i.year=n.year()+100);if(dm[t]){let e=Uf[i.month];i.date=r.date(),i.date>e&&(i.date=e)}return Object.keys(i).length>1&&Ff(n,i),n},e.prototype.subtract=function(e,t){return this.clone().add(-1*e,t)},e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add})(pm),(e=>{e.prototype.isSame=function(t,n,r=!0){let i=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===r&&i.tz!==t.tz&&((t=t.clone()).tz=i.tz),hm[n]?hm[n](i)===hm[n](t):null}})(pm),(e=>{const t={isAfter:function(e){e=Of.beADate(e,this);let t=Of.getEpoch(e);return null===t?null:this.epoch>t},isBefore:function(e){e=Of.beADate(e,this);let t=Of.getEpoch(e);return null===t?null:this.epoch<t},isEqual:function(e){e=Of.beADate(e,this);let t=Of.getEpoch(e);return null===t?null:this.epoch===t},isBetween:function(e,t,n=!1){e=Of.beADate(e,this),t=Of.beADate(t,this);let r=Of.getEpoch(e);if(null===r)return null;let i=Of.getEpoch(t);return null===i?null:n?this.isBetween(e,t)||this.isEqual(e)||this.isEqual(t):r<this.epoch&&this.epoch<i}};Object.keys(t).forEach(n=>{e.prototype[n]=t[n]})})(pm),(e=>{const t={i18n:e=>{Of.isObject(e.days)&&wp.set(e.days),Of.isObject(e.months)&&(e=>{Hf=e.short||Hf,zf=e.long||zf})(e.months),Of.isBoolean(e.useTitleCase)&&(e=>{Ep=e})(e.useTitleCase)}};Object.keys(t).forEach(n=>{e.prototype[n]=t[n]})})(pm);var gm=pm;const vm=(e,t,n)=>new gm(e,t,n),bm=function(e){let t=e._today||{};return Object.keys(t).forEach(n=>{e=e[n](t[n])}),e};vm.now=(e,t)=>{let n=new gm((new Date).getTime(),e,t);return n=bm(n),n},vm.today=(e,t)=>{let n=new gm((new Date).getTime(),e,t);return n=bm(n),n.startOf("day")},vm.tomorrow=(e,t)=>{let n=new gm((new Date).getTime(),e,t);return n=bm(n),n.add(1,"day").startOf("day")},vm.yesterday=(e,t)=>{let n=new gm((new Date).getTime(),e,t);return n=bm(n),n.subtract(1,"day").startOf("day")},vm.extend=function(e={}){return Object.keys(e).forEach(t=>{gm.prototype[t]=e[t]}),this},vm.timezones=function(){return(new gm).timezones},vm.max=function(e,t){let n=new gm(null,e,t);return n.epoch=864e13,n},vm.min=function(e,t){let n=new gm(null,e,t);return n.epoch=-864e13,n},vm.whereIts=(e,t)=>{let n=new gm(null),r=new gm(null);n=n.time(e),r=t?r.time(t):n.add(59,"minutes");let i=n.hour(),a=r.hour();return Object.keys(n.timezones).filter(e=>{if(-1===e.indexOf("/"))return!1;let t=new gm(null,e),o=t.hour();return o>=i&&o<=a&&!(o===i&&t.minute()<n.minute())&&!(o===a&&t.minute()>r.minute())})},vm.version="6.16.2",vm.plugin=vm.extend;var ym=vm,Am="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",_m=Am.split("").reduce((function(e,t,n){return e[t]=n,e}),{}),wm=function(e){if(void 0!==_m[e])return _m[e];for(var t=0,n=1,r=36,i=1;n<e.length;t+=r,n++,r*=36);for(var a=e.length-1;a>=0;a--,i*=36){var o=e.charCodeAt(a)-48;o>10&&(o-=7),t+=o*i}return t},Em=function(e,t,n){var r=wm(t);return r<e.symCount?e.syms[r]:n+r+1-e.symCount},Sm=function(e){var t={nodes:e.split(";"),syms:[],symCount:0};return e.match(":")&&function(e){for(var t=new RegExp("([0-9A-Z]+):([0-9A-Z]+)"),n=0;n<e.nodes.length;n++){var r=t.exec(e.nodes[n]);if(!r){e.symCount=n;break}e.syms[wm(r[1])]=wm(r[2])}e.nodes=e.nodes.slice(e.symCount,e.nodes.length)}(t),function(e){var t=[];return function n(r,i){var a=e.nodes[r];"!"===a[0]&&(t.push(i),a=a.slice(1));for(var o=a.split(/([A-Z0-9,]+)/g),s=0;s<o.length;s+=2){var l=o[s],c=o[s+1];if(l){var u=i+l;if(","!==c&&void 0!==c)n(Em(e,c,r),u);else t.push(u)}}}(0,""),t}(t)},Cm=/(\-?[0-9]+)h(rs)?/i,Tm=/(\-?[0-9]+)/,km=/utc([\-+]?[0-9]+)/i,xm=/gmt([\-+]?[0-9]+)/i,Om=function(e){return(e=Number(e))>-13&&e<13?"Etc/GMT"+(e=((e*=-1)>0?"+":"")+e):null},Im=function(e){var t=e.match(Cm);if(null!==t)return Om(t[1]);if(null!==(t=e.match(km)))return Om(t[1]);if(null!==(t=e.match(xm))){var n=-1*Number(t[1]);return Om(n)}return null!==(t=e.match(Tm))?Om(t[1]):null},Mm=function(e){var t=e.split("|").reduce((function(e,t){var n=t.split("¦");return e[n[0]]=n[1],e}),{}),n={};return Object.keys(t).forEach((function(e){var r=Sm(t[e]);"true"===e&&(e=!0);for(var i=0;i<r.length;i++){var a=r[i];!0===n.hasOwnProperty(a)?!1===Array.isArray(n[a])?n[a]=[n[a],e]:n[a].push(e):n[a]=e}})),n}("Africa/Abidjan¦a2bouake,daloa,san ped1t0yamoussouk1;g,ogo;ro;b1frica/0;abi1timbuktu;i0obo;djan|Africa/Accra¦a2gh1kumasi,ta0;koradi,male;!ana;c0frica/ac0tsiaman;cra|Africa/Addis_Ababa¦a0dire dawa,mek'ele,nazret;ddis ababa,frica/addis0;|Africa/Algiers¦a5b3c2dz,oran,s1t0;ebessa,iaret;etif,idi bel abbes;hlef,onstantine;a0iskra,lida,oumerdas;b ezzouar,tna;frica/algi1lg0nnaba;eria,i0;ers|Africa/Asmera¦a0;frica/asma0sme0;ra|Africa/Asmara¦asmara|Africa/Nairobi¦africa/6e2kisumu,m1na0thika,yt;i6kuru;ayotte,ombasa;a0ldoret;st0t; africa0ern africa;! time,n;asmera,nai0;robi|Africa/Bamako¦africa/b0b0;amako|Africa/Bangui¦africa/b0b0;angui|Africa/Banjul¦africa/b0b0serekunda;anjul|Africa/Bissau¦africa/b1b1g0;uinea b0w;issau|Africa/Blantyre¦africa/b0b0lilongwe,mzuzu;lantyre|Africa/Brazzaville¦africa/b0b0pointe noire;razzaville|Africa/Bujumbura¦africa/b0b0;ujumbura|Africa/Cairo¦a3bani suwayf,cBdamanhur,eg2giza,halw5i1kafr ad dawwar,luxor,new cBport said,qina,s0tanta,zagazig;hibin al kawm,ohag,uez;dku,smail5;!ypt;frica/c7l2s0;w0yut;an; 1exandr0;ia;fayyum,m0;a0inya;hallah al kubra,nsurah;airo|Africa/Casablanca¦a9cAf8kenit7m4oujda angad,rabat,sa2t0;angier,e0;ma5touan;fi,le0;! al jadida;a1ekn3o0;hammedia,rocco;!rrakesh;ra;es;frica/c0gadir,l hoceima;asablanca|Africa/Ceuta¦africa/ceuta,ceuta0;!melilla|Africa/Conakry¦africa/co1c0;amayenne,o0;nakry|Africa/Dakar¦africa/d2d2pikine,t0;hies0ouba;! nones;akar|Africa/Dar_Es_Salaam¦africa/dar0;|Africa/Dar_es_Salaam¦arusha,d1m0tanga,zanzibar;beya,orogoro,wanza;ar es salaam,odoma|Africa/Djibouti¦africa/d0d0;jibouti|Africa/Douala¦africa/d4b1d4edea,gar2kousseri,loum,m0ngaoundere,yaounde;ar1okolo;a1ert0;oua;foussam,menda;ouala|Africa/El_Aaiun¦africa/el1e0laayoune,western sahara;h,l aaiun;|Africa/Freetown¦africa/f0etc,f0greenwich standard time;reetown|Africa/Gaborone¦africa/g0g0;aborone|Africa/Harare¦africa/h0bulawayo,chitungwiza,h0mut1;ar0;are|Africa/Johannesburg¦africa/jIbFcBdAeast londCjIk8newcastEp7r6s2tembisa,uitenhage,v1w0za;elkom,itbank;anderbijlpark,ereeniging;ast,o0prings;uth0weto; africa0ern africa;! standard time,n;andCichards bay,oodepoort;aarl,ietermaritzBort elizabeth,retoria;lerk0ruger0;sdorp;iepsloot,urb5;a1enturi0;on;pe town,rletonvil0;le;enoni,loemfontein,o1rakp0;an;ks1tshabelo;ohannes0;burg|Africa/Juba¦africa/j1j1s0winejok;outh sudan,s;uba|Africa/Kampala¦africa/k0k0;ampala|Africa/Khartoum¦a7c5el 4k2ny3omdurm1port sud1s0wad medani;d,inga,ud0;an;ass0h5osti;ala;dae4fasher,obeid;at,entral africa0;! time;d damaz1frica/kh0l qadarif;artoum;in|Africa/Kigali¦africa/k0k0;igali|Africa/Kinshasa¦africa/kin4c3ki2m0;a0bandaka;sina,tadi;kwit,n1;d,ongo;shasa|Africa/Lagos¦aUbScReQgPiLjKkaIlGmDnBo8port harcourt,s7u6w0zarC;a4est0; africa0ern africa;! 0n;standard t0t0;ime;r9st,t;gep,muah5yo;a9hagamu,okoto;kFn1w0yo;er5o;do,itsha;g,iger0newi;ia;a0in5ubi;idugu0kurdi;ri;aFek0;ki;du0no,tsi0;na;imeFos;badan,jebu ode,k1l0seBwo;a orangun,esa,or6;eBi7ot ekp0;ene;ombe,usau;bute ikorodu,fon alaaye,nugu;alabar,hakwama;auchi,en0;in;b3do2frica/la1ku0tani;re;gos; ekiti;a,eoku1u0;ja;ta|Africa/Libreville¦africa/l0l0;ibreville|Africa/Lome¦africa/l0l0;ome|Africa/Luanda¦africa/lu1huambo,l0n'dalatando;obito,u0;anda|Africa/Lubumbashi¦africa/lu5b3k2l1m0tshikapa;buji mayi,wene ditu;ikasi,u3;ananga,isanga1olwezi;e0ukavu;ni;bumbashi|Africa/Lusaka¦africa/l2k0l2ndola;ab0it0;we;usaka|Africa/Malabo¦africa/m0m0;alabo|Africa/Maputo¦africa/map4beira,chimoio,ma2na1quelimane,z0;imbabwe,w;ca1mpu1;p1to0;la;uto|Africa/Maseru¦africa/m0m0;aseru|Africa/Mbabane¦africa/m0m0;babane|Africa/Mogadishu¦africa/mo1berbera,hargeysa,jamaame,kismayo,m0;arka,o0;gadishu|Africa/Monrovia¦africa/m1l0m1;iber1r;onrov0;ia|Africa/Ndjamena¦africa/nd1chad,n0td;'d0d0;jamena|Africa/Niamey¦africa/n0n0zinder;iamey|Africa/Nouakchott¦africa/n0n0;ouakchott|Africa/Ouagadougou¦africa/o0bobo dioulasso,o0;uagadougou|Africa/Porto-novo¦africa/porto-novo|Africa/Porto-Novo¦abomey calavi,coton0djoug0porto novo;ou|Africa/Sao_Tome¦africa/sao1s0;ao tome,t;|Africa/Timbuktu¦timbuktu|Africa/Tripoli¦a3benghazi,l1misrat4t0zawi2;arhuna,r4;ib0y;ya;frica/tr1l khums,z zawiy0;ah;ipoli|Africa/Tunis¦africa/tunis,sfax,t0;n,unis0;!ia|Africa/Windhoek¦africa/w1na0w1;!mibia;indhoek|America/Adak¦a0us/aleutian;d1leutian islands,merica/a0;d0tka;ak|America/Anchorage¦a0us/alaska;h4k4laska1merica/an0n0;chorage;! (most areas),n 0;daylight0standard0; time;dt,st|America/Anguilla¦a0;merica/an0n0;guilla|America/Antigua¦a0;merica/an0n0;tigua|America/Araguaina¦a0palmas,tocantins;merica/ar0r0;aguaina|America/Argentina¦aNbKcHformosa,jGla EmBneuquen,pAquilmJr9sa1t0;ierra del fuego (tLucumán (tm);lta6n0; 2t0;a 0iago del estero;cruz (sc),fe;juan1luis0miguel de tQsalvador de jM;! (sl);! (sj);! (salpnqrn);esistencRoH;araEilar,osadas;ar del p3e0oron;ndoza0rlo;! (mz);p0rioja (lr);laH;ose c paz,ujuy (jy);atamarca (ct) chubut (ch),or0;dHrient0;es;ahia blanIuenos aires0;! (bac0;f);merica/2r0;!genti0;na;argentina3bDc2j1mendoza,ro0;sario;ujuy;a8ord6;!/0;b8c2sal1t0;ucuman;ta;a3o0;modrivadav1rd0;oba;ia;tamar0;ca;uenos0;|America/Aruba¦a0;merica/ar0r0;uba|America/Asuncion¦a6c5p0san lorenzo;araguay1y0;!st,t;! 0;summer t0t0;ime;apiata,iudad del este;merica/as0s0;uncion|America/Coral_Harbour¦america/atikokan,coral harbour|America/Atikokan¦a0est - on (atikokan) nu (coral h);merica/coral0tikokan;|America/Atka¦atka|America/Bahia¦america/b1b1camacari,feira de santa0itabu0salvador,vitoria da conquista;na;ahia|America/Bahia_Banderas¦america/bahia1bahia0central time - bahía de0; banderas;|America/Barbados¦america/ba1b0;a0b;rbados|America/Belem¦a1b2macapa,par0;auapebas,á (east) amapá;merica/b0nanindeua;elem|America/Belize¦america/be1b0;e0z;lize|America/Blanc-sablon¦america/blanc-0blanc 0;sablon|America/Boa_Vista¦america/boa0boa vista,roraima;|America/Bogota¦america/boFbBc7dosquebradas,floridablanca,i6m5neiva,p3s1v0;alledupar,illavicencio;anta marEincelejo,o0;acha,ledad;a0erei9opayan;lmi8sto;anizales,edellin,onteria;bague,taguei;a2o0ucu8;!lombia0t;! time,n;li,rtagena;arran2ello,o3u0;caramanga,enaventu0;ra;cabermeja,quilla;go0;ta|America/Boise¦america/b0b0mountain - id (south) or (east);oise|America/Cambridge_Bay¦america/cambridge0cambridge bay,mountain - nu (west);|America/Campo_Grande¦america/campo0campo grande,mato grosso do sul;|America/Cancun¦america/c0c0eastern standard time - quintana roo;ancun|America/Caracas¦aHbarGcAgua8m5p4san3turmeCv0;alencia,e0;!nezuela0t;!n standard time; cristobal,ta teresa del tuy;eta4uerto la cruz;a0ucumpiz;raca0turin;ibo,y;renAti0;re;a4iudad 2o1u0;a,m2;ro;bolivar,guay0;ana;bim3r2;in2quisimeto,uta;lto barin1merica/car0;ac0;as|America/Catamarca¦catamarca|America/Cayenne¦america/c1c1french guiana,gf0;!t;ayenne|America/Cayman¦america/c0c0;ayman|America/Chicago¦aVbScPdOfort worth,gNhMiKkZlHmAn6o5plano,s2t1us/central,wi0;chiEsconsV;exYulsa;a0hreveport,ou4t 1;int 0n antonio;louGpaul;klahoXmaha,verland park;ashMe1or0;th dako7;braska,w 0;orleans,south me6;adisNe5i1o0;biIntgomery;lwaukee,nne1ss0;issippi,ouri;apol6so0;ta;mph4;aredo,i0ouisiana,ubb1;ncoln,ttle r0;ock;llino0owa,rving;is;oustBunts6;arland,rand prairie;allBes moines;entral 0hCorpus christi;(most areas),daylight0standard0; time;aton rouge,rowns0;vil0;le;laba7m5r1ust0;in;k1lingt0;on;ans0;as;arillo,erica/ch0;icago;ma|America/Chihuahua¦america/c0c0mountain time - chihuahua (most areas);hihuahua|America/Costa_Rica¦america/costa1c0;osta rica,r;|America/Creston¦america/c0c0mst - bc (creston);reston|America/Cuiaba¦america/c0c0mato grosso,varzea grande;uiaba|America/Curacao¦america/c1c1s0;t maarten,x;uracao|America/Danmarkshavn¦america/d0d0national park (east coast);anmarkshavn|America/Dawson¦america/d0d0pacific - yukon (north);awson|America/Dawson_Creek¦america/dawson0dawson creek,mst - bc (dawson crft st john);|America/Denver¦a3colorado springs,d5el paso,m0navajo,salt lake,us/mountain;dt,ountain 0st;(most areas),daylight0standard0; time;lbuquerque,merica/0urora;d0shiprock;enver|America/Detroit¦america/d0d0eastern - mi (most areas),grand rapids,us/michigan;etroit|America/Dominica¦america/d0d0;ominica|America/Edmonton¦a1ca0e2mountain - ab bc (e) sk (w);lgary,nada/mountain;lberta,merica/e0;dmonton|America/Eirunepe¦a0e2;c2m0;azonas (west),erica/e0;irunepe;re time,t|America/El_Salvador¦america/el2el1s0;an0oyapango,v; salvador;|America/Tijuana¦america/1e4mexic0pacific time us - baja california,t2;ali,o/bajanorte;e2santa1t0;ijuana;;nsenada|America/Indiana¦america/6central - in (4eastern - in (1fort wayne,i9us/0;east-indiana,indiana-starke;crawfor1dadukmn),most areas),p0switzerlan1;i2ulaski);d);perry),star0;ke);fort4indiana0knox4;!/0p2;i0knox;ndianap0;olis;|America/Fortaleza¦america/f3ca2f3imperatriz,j1m0natal,sao luis,teresina;aracanau,ossoro;oao pessoa,uazeiro do norte;mpina grande,ucaia;ortaleza|America/Glace_Bay¦a0glace bay;merica/glace0tlantic - ns (cape breton);|America/Godthab¦america/go4g2w0;est greenland,g0;st,t;l,o1reenland0;! (most areas);dthab|America/Goose_Bay¦a0goose bay;merica/goose0tlantic - labrador (most areas);|America/Grand_Turk¦america/grand1grand turk,t0;c,urks and caicos;|America/Grenada¦america/g0g0;renada|America/Guadeloupe¦america/g0g0;uadeloupe|America/Guatemala¦america/gu1g0mixco,villa nueva;t,u0;atemala|America/Guayaquil¦america/g3cuenca,ec1g3ma0quito,santo domingo de los colorados;chala,nta;!uador0;! (mainland);uayaquil|America/Guyana¦america/gu2g0;eorgetown,u1y0;!t;yana|America/Halifax¦a2canada/atlantic,h5n1p0;ei,rince edward island;ew brunswick,ova scotia;dt,merica/h2tlantic 0;- ns (most areas) pe,daylight0standard0; time;alifax|America/Havana¦aCb9c2diez de octubre,guantanBh1las tunas,pinar del rio,sant0;a clara,iago de cuba;aBolguin;amaguey,dt,i4st,u0;!ba0;! 0n;daylight0standard0; time;e0udad camilo cie0;nfueg1;ay1oyer0;os;amo;merica/ha0rroyo naranjo;vana|America/Hermosillo¦america/h0ciudad obregon,h0mountain standard time - sonora,nogales;ermosillo|America/New_York¦a0Lb0Ic0Bd0Ae06f03greensboro,hialeah,i00jacks01kZlexingtonYmUnNoLpIquHrDsAt7u5v3w0yonkers;ashington1est 0inston salem,orcD;raEvirginI;! dc;ermont,irginia0;! beach;nited states,s0;!/eastern;a0enne1he bronx,oleE;llaha0mpa;ssee;outh 1t0;. petersburg,aten3;bo06cD;a2hode1ichmo00och0;ester; isX;lei2;eens,intana roo;ennsylvan1hiladelph1ittsbur0rovidence;gh;ia;hio,rlan0;do;ew3or1y0;!c;folk,th c0;aroliB; 0ark,port news;hampshiRjersey,york0;! staN;a1eads,i0;ami,chig1;ine,nhatt0ryGssachusetts;an;! fayetI;entucky,nox4;ndia1r0;on2;na;ayette0lorida,ort lauderda1;vil0;le;ast0dt,st; flatbush,ern 0;(most areas),daylight0standard0; time;elawa9urham;ape coral,h3incinnati,leve1o0;lumbus,nnecticut;la0;nd;a0esapeake;rlot0ttanooga;te;altimo1o0rooklyn,uffalo;st3;re;kr1merica/new0tlanta;;on|America/Inuvik¦america/i0i0mountain - nt (west);nuvik|America/Iqaluit¦america/i0eastern - nu (most east areas),i0;qaluit|America/Jamaica¦america/ja2j1k0new k0;ingston;a0m;maica|America/Jujuy¦america/argentina/j0j0;ujuy|America/Juneau¦a0j1;laska - juneau area,merica/j0;uneau|America/Kentucky¦america/1eastern - ky (0l3;louisville area),wayne);kentucky0l1;!/l0;ouisville|America/Knox_In¦knox in|America/Kralendijk¦america/k0k0;ralendijk|America/La_Paz¦america/la3bo1cochabamba,la paz,oruro,s0;anta cruz de la sierra,ucre;!livia0t;! time,n;|America/Lima¦aAc6huanc9i5juliaca,lCp2sant1t0;acna,rujillo;a anita   los ficus,iago de sur5;e0iura,ucall8;!ru0t;! time;ca,quitos;allao,hi1us0;co;cl0mbote;ayo;merica/l1requi0;pa;ima|America/Los_Angeles¦a01baZcXfTgarden grove,hQirviPlLmoInHoEp9r8s1tacoma,us/pacific0washington state;!-new;a1eattle,f,p0tocktQunrise manor;okaMringG;cramenGn0; 1ta 0;aQclariS;bernardiOdiego,fran0jo4;!cisco;ancho cucamonga,eMiver6;a0dt,ort6st;cific 1radi0;se;daylight0standard0; time;ak1cean0regDxnard;side;land;evada,orth las6;des1reno0; valley;to;a1o0;ng4s angeles;!s0; vegas;ne;enders1untington0; beach;on;onta2re0;mont,s0;no;na;a2hula vis0;ta;ja ca0kersfield;lifornia;merica/los0naheim;|America/Lower_Princes¦america/lower0lower princes;|America/Maceio¦a0m1;lagoassergipe,merica/m0racaju;aceio|America/Managua¦america/m1m1ni0;!car1;an0;agua|America/Manaus¦am0brazil/west,m1;azon1erica/m0t;anaus; time,as (east),ian|America/Marigot¦america/m0m0;arigot|America/Martinique¦america/ma1m0;a0q;rtinique|America/Matamoros¦america/m0central time us - coahuilanuevo leóntamaulipas (us border),heroica m0m0nuevo laredo,reynosa;atamoros|America/Mazatlan¦america/ma1culiac2los mochis,m0tepic;a0exico/bajasur,ountain time - baja california surnayaritsinaloa;zatl0;an|America/Menominee¦america/m0central - mi (wisconsin border),m0;enominee|America/Merida¦america/m1c0m1;ampeche,entral time - campecheyucatán;erida|America/Metlakatla¦a0m1;laska - annette island,merica/m0;etlakatla|America/Mexico_City¦a0Eb0CcVduran09ecatepec de morel07guQhPiNjalis0Gleon de los alda03mInHoGpEqDs9t4uruap01v2x1yucat01za0;catec09pop00;alapa de enriqu0Ji0Eochimil0E;e0illahermosa;nustiano carranza,racruz;a3e7la1o0uxt00;luRnaZ;huac,l0quepaque,xcaY;nepantXpT;bas07maulip01pachuW;an0oledad de graciano sanch0B; luis potosi,t0;a maria chimal0iago de q1;huN;ueretaD;achuca de soFoza rica de6ue0;bPrto vallarX;axaGjo de agua;aucalpan01icolas rome9uevo le00;agdalena contrerRexico3i1orel0x;ia,os;choFguel0; h3;! city,/general;rap5xtapalu9zta0;cQpalapa;idalJ;a1erre0stavo adolfo made0;ro;dalajara,naj0;ua0;to;eFhiCiudad Ao3u0;au1ernava0;ca;htemoc,titlan izcalli;a4l2yo0;ac0;an;i0onia del valle;ma;cAhui0tzacoalc2;la;lopez mate0nezahualcoyotl;os;ap1lpancin0;go;as;laya,ntral time;enito7uenavis0;ta;capulco4guascalientes,lvaro obreg3merica/mexico2zcapotz0;al0;co;;on; de0; juar0;ez|America/Miquelon¦america/m0m0pm,st pierre and m0;iquelon|America/Moncton¦a0m1;merica/m0tlantic - new brunswick;oncton|America/Monterrey¦america/mont7c5g4mon3sa1t0victoria de durango;ampico,orreon;ltillo,n0; nicolas de los garza,ta catarina;clova,t3;omez palacio,uadalupe;entral time - durango coahuilanuevo leóntamaulipas (most areas),iudad 0;apodaca,general escobedo,madero,victoria;errey|America/Montevideo¦america/m3m3u0;ruguay1y0;!t;! time;ontevideo|America/Toronto¦america/Bb9ca7eastern - onqc (most areas),gatineau,hamilAkitchener,l4m3nepe2o0quebec,richmond hill,tCvaugh2windsor;n5sh0tt0;awa;an;arkham,ississauga,o9;av9on0;don on0gueuil;tario;!nada0;!/eastern;arrie,ramp0;ton;mo1t0;oronto;ntre0;al|America/Montserrat¦america/m0m0;ontserrat|America/Nassau¦america/n1b0n1;ahamas,s;assau|America/Nipigon¦america/n0n0;ipigon|America/Nome¦a0n1;laska (west),merica/n0;ome|America/Noronha¦a0brazil/den1n1;merica/n0tlantic islands;oronha|America/North_Dakota¦america/north3central - nd (0;m0oliv1;erc0orton rural);er);|America/Ojinaga¦america/o0ciudad juarez,mountain time us - chihuahua (us border),o0;jinaga|America/Panama¦america/pan1pa0san miguelito;!n0;ama|America/Pangnirtung¦america/p0eastern - nu (pangnirtung),p0;angnirtung|America/Paramaribo¦america/p2p2s0;r0uriname;!t;aramaribo|America/Phoenix¦a8c7g5idaho,m4n3pBs2t1u0wyoming;s/ar8tah;empe,ucson;cottsd3inaloa,onora;ayarit,ew mexico;aryv1esa,onta5st - arizona (except navajo);ilbert,lend0;ale;handler,olorado;merica/p2r0;izo0;na;hoenix|America/Port-au-prince¦america/port-au-prince,h0;aiti,t|America/Port-au-Prince¦c2p0;etionville,ort 0;au prince,de paix;arrefour,roix des bouquets|America/Port_Of_Spain¦america/1port of spa2vi0;!rgin islands;port1virg0;in;|America/Rio_Branco¦a0brazil/ac3rio branco;c2merica/0;porto0rio0;;re|America/Porto_Acre¦porto acre|America/Porto_Velho¦america/porto0porto velho,rondônia;|America/Puerto_Rico¦america/puerto1bayamon,p0;r,uerto rico;|America/Punta_Arenas¦america/punta4c0punta arenas,region of magallanes;hile s1l0;dt,st;tandard0ummer0; time;|America/Rainy_River¦america/rainy0central - on (rainy rft frances),rainy river;|America/Rankin_Inlet¦america/rankin0central - nu (central),rankin inlet;|America/Recife¦america/r3caruaru,jaboatao2olinda,p0r3;aulista,e0;rnambuco,trolina;! dos guararapes;ecife|America/Regina¦america/r5c1r5saskat0;c3oon;anada/0st - sk (most areas);east-s0s0;askatc0;hewan;egina|America/Resolute¦america/r0central - nu (resolute),r0;esolute|America/Santa_Isabel¦santa isabel|America/Santarem¦america/s0pará (west),s0;antarem|America/Santiago¦a7c4iquique,la pintana,puente alto,rancagua,san3t1v0;alparaiso,ina del mar;alca0emuco;!huano; bernardo,t4;hile1l0oncepcion;!t;! (most areas),/continental;merica/sant0ntofagasta,rica;iago|America/Santo_Domingo¦america/santo6bella vista,do5la romana,san0; pedro de macoris,t0;iago de los caballeros,o domingo0;! 0;e0oe0;ste;!minican republic;|America/Sao_Paulo¦a12b0Sc0Ld0Iembu,f0Gg0Bhortol0Ai06j03l01mXnVosasco,pLriFs4ta3uber2v0;i0olta redon17;amao,la velha,tor12;a0Ll07;boao da ser01uba0W;a2e1oroNu0;maLzano;rYte lago0K;nt4o 0;bernardo do campo,carl04jo0leopolLpaulo,vicE;ao de meriti,se0;! do0; rio p8s camp01;a 1o0; andDs;barbara d'oes0Lluz0Pmar0P;beirao 3o0;! 0;cla0de janei0g6ver7;ro;das nev06p0;reto;asso fun8e7iraci6lanaltGo4r0;aia g1esidente prud0;en0C;ran0;de;nta grossa,rto aleg0;re;caV;lotXtro0B;do;iteroi,ov0;aKo hamburgo;a1o0;gi das cruzRntes clarE;ri0ua;l03n7;imei3ondr0;ina;acarei,oinville,u0;iz de fo0ndi9;ra;ndaia2patin1ta0;bor6pevi,quaquece1;ga;tuE;andT;o3ravat2uaru0;ja,lh0;os;ai;iNvernador valadarA;loria3oz do0ranca; iguacu;i0uque de caxi8;adema,vi0;noK;a1o0uriti2;ntagem,tH;choeiro de itapemirAmp1no3rapicui0scavel,xias do sul;ba;in1os dos goytacaz0;es;as;a8e4lumenau,r0;!a0st,t;s1zil0;! time,/east,ian;il7íl7;l1t0;im;ford roxo,o horizon0;te;rueri,uru;lvora5merica3na2parecida de goi0;an0;ia;polis;/sao0na;;da|America/Scoresbysund¦america/scoresbysu3e1scoresbysund0;!/ittoqqortoormiit;ast greenla1g0;st,t;nd|America/Shiprock¦shiprock|America/Sitka¦a0s1;laska - sitka area,merica/s0;itka|America/St_Barthelemy¦america/st0st barthelemy;|America/St_Johns¦america/st4canada/newfoundland,n0st johns;d2ewfoundland 0st,t;daylight0labrador (southeast),standard0; time;dt,t;|America/St_Kitts¦america/st0st kitts;|America/St_Lucia¦america/st0st lucia;|America/St_Thomas¦america/st0st thomas;|America/St_Vincent¦america/st0st vincent;|America/Swift_Current¦america/swift0cst - sk (midwest),swift current;|America/Tegucigalpa¦america/t1h0san pedro sula,t1;n,onduras;egucigalpa|America/Thule¦america/thule,thule0;!/pituffik|America/Thunder_Bay¦america/thunder0eastern - on (thunder bay),thunder bay;|America/Tortola¦america/t0t0;ortola|America/Vancouver¦america/va3b1canada/pacific,ladn4okanagan,pacific - bc (most areas),surrey,v0yukon;a2ictor1;ritish columb0urnaby;ia;ncouv0;er|America/Virgin¦virgin|America/Whitehorse¦america/w0canada/yukon,pacific - yukon (south),w0;hitehorse|America/Winnipeg¦america/w2c0m1w2;anada/central,entral - on (west) m0;anitoba;innipeg|America/Yakutat¦a0y1;laska - y0merica/y0;akutat|America/Yellowknife¦america/y0mountain - nt (central),y0;ellowknife|Antarctica/Casey¦antarctica/c0c0;asey|Antarctica/Davis¦a0d2;ntarctica0q;!/d0;avis|Antarctica/Dumontdurville¦antarctica/d0d0;umontdurville|Antarctica/Macquarie¦antarctica/macquarie,macquarie0;! island|Antarctica/Mawson¦antarctica/m0m0;awson|Antarctica/Mcmurdo¦antarctica/m0m0;cmurdo|Antarctica/Palmer¦antarctica/p0p0;almer|Antarctica/Rothera¦antarctica/r0r0;othera|Pacific/Auckland¦a6christchurch,manukau,n0pacific/au7wellington;ew zealand1orth shore,z0;!dt,mt,st;! 0;daylight0standard0t1; t0;ime;ntarctica/south1u0;ckland;|Antarctica/South_Pole¦south pole|Antarctica/Syowa¦antarctica/s0s0;yowa|Antarctica/Troll¦antarctica/t0t0;roll|Antarctica/Vostok¦antarctica/vostok,vost0;!ok|Arctic/Longyearbyen¦arctic/l0l0;ongyearbyen|Asia/Aden¦a0ibb,mukalla,sanaa,taiz;d0l hudaydah,sia/ad0;en|Asia/Almaty¦a5k2nur sultan,p1s0taraz,ust kamenogorsk;emey,hymkent;avlodar,etropavl;a0z;ragandy,zakhstan0;! (most areas);lm0sia/almaty;a0t; ata,-ata time,ty|Asia/Amman¦a1irbid,jo0russeifa,wadi as sir,zarqa;!rd1;mm0sia/amm0;an|Asia/Anadyr¦a0;na0sia/anadyr;dyr0t;! time|Asia/Aqtau¦a0mangghystaū/mankis1;q0sia/aq0;tau|Asia/Aqtobe¦a0;k1qt0sia/aq1;o1öbe/ak0;to0;be|Asia/Ashgabat¦as4t0;m2urkmen0;a4istan0;! time;!t;hga1ia/ash0;ga0khabad;bat|Asia/Ashkhabad¦ashkhabad|Asia/Atyrau¦a0;sia/atyrau,tyra0;u,ū/atirau/gur'yev|Asia/Baghdad¦a4ba3dihok,erbil,i2k1mosul,na0ramadi;jaf,sirA;arbala,irkuk;q,raq;g2sr8;bu ghurayb,d diw5l 4rab2s0; sulaym4ia/bag0t;hdad;!ic0;! standard time;amar2basrah al qadim2falluj2hill2kut,mawsil al jadid2;an0;iy0;ah|Asia/Bahrain¦asia/b0b0;ahrain|Asia/Baku¦a0b3ganja,lankaran,sumqayit;sia/b2z0;!erbaijan0t;! time;aku|Asia/Bangkok¦asia/b9b9ch6h4i2mueang nontha7na1pak kret,s0udon thani;amut prakan,i racha,outh east asia;khon ratchasima,m dinh;ct,ndochina 0;(most areas),time;a0ue;iphong,noi,t y2;iang m1on 0;buri;ai;angkok|Asia/Barnaul¦asia/ba1b0;a0iysk;rnaul|Asia/Beirut¦asia/b1b1l0ra's bay2;b,ebanon;ei0;rut|Asia/Bishkek¦asia/b3b3k0osh;g1yrgyzstan0;! time;!t;ishkek|Asia/Brunei¦asia/brunei,b0;dt,n1runei0;! darussalam time;!t|Asia/Kolkata¦0:3D;1:3L;2:2D;3:3M;4:3J;a35b2Dc24d1We1Uf1Sg1Fh1Ci18j13k0Pl0Km0Cn05odis3KpVquthbull3DrNsFt9u8v5warang2Myamun1P;a6el1Ui5;jayawa2Vsakha0HzianagC;doda2Orana11;daip0jja23lhasn1ttar pradesh;a8eXh7iru5umk0;chirap0Mnelve2p5vottiy0;a39p0;ane,iruvananthapur0Noothuku2Yriss0;mb5njo1X;ar0L;aBecunder4h9i8lst,o7r1Fu5;jan37r5;at,endr1C;l2Znip2N;k3liguKngrau2rJ;ahj1Zi5ri2Oya0L;mo1Mvaji07;har1Xlem,mbh24ng2t04ug0Y;a6e0Eoh5;iItak;ebare2i9j7m5nc1Gtl0Aurke37;ag5g5p0;und08;a5kot;hmund26sth2A;ch0p0;a9imp8roddat0u5;ducher23n5rn17;a5e;sa;ri;li,n7rbha6t5;ia2Vna;ni;chku2Ti5;ha2Gp21;a7e6izam4o5;i1Vwrang2B;l0Sw del0Y;di2Kg7i0Ejaf2Fn5re2Oshik,vi mumb15;ded,g5;i,loi j1V;ercoil,p0;a8eerut,irz25o7u5yso0Y;lugu,mb10rwa1Izaffar5;n1p0;nghyr,rad4;chili7d6harasht1Fleg07n5thu1Fu;ga0Iip0;hya,ur0V;patnG;a7u5;cknow,dhia5;na;l bahadur5t0; n1;aDhaBo8u5;kat6lt5rno1P;a2i;pal2;l5rWta,zhikode;h1Nka1Kl5;am;nd5ragp0;wa;kina13l8marOnp0r5shmir,tih3;i6na5ol ba18;l,tV;mn1;lakuric03y11;a6han5odNunagadh;si;b0Rip0l6m5;mu,n1shedp0;andh3gGna;chalkaranji,mph0In5;!d5;ia5o00;! standard time,n;a6is3ospet,u5;b2g2;o0Hp0ridw3;aChazi4o9reater noi0Mu6wali5y04;or;jar0OlbarQnt0rg6wa5;ha12;aon;rak6sa5;ba;hp0;juw8n5ya;dh6g5;an1;in1;aka;ar5iroz4;id4rukh4;l5taw0M;loF;aAe8h6indigul,ombOurg5;!ap0;anb0Uul5;ia;hra dun,l5was;hi;rbhan5vange8;ga;a09h8o5uttack;ch6imbato5;re;in;a6enn5;ai;nd5pL;a5i0C;!nn1;aNeKhBi9or7rahm04u5;landshahr,rh5;anp0;iv2;li;d3har sharif,jZkan07l5;asp0imoC;aAi7op6u5;baneshw3sav5;al;l6wan5;di,i;ai,wa6;g6ratp0tpa5vn1yand3;ra;alp0;l5ngaluru;gaum,la5;ry;hAli,r6thin5;da;a6ddham5eilly;an;n1s5;at;a6rai5;gh;ramp0;gQhmLizawl,jmKkoRlHmDnantCrrBs6urang4va5;di;ans8ia/5;ca5kolka6;lcut5;ta;ol;ah;ap0;arnath,batt0r5;ava5its3o9;ti;ur;appuz6i5lah4w3;garh;ha;er;adn1ed4;ab5;ad;ag3;ar;arta5ra;la|Asia/Chita¦asia/c0c0;hita|Asia/Choibalsan¦asia/c0c0dornodsükhbaatar;hoibalsan|Asia/Shanghai¦0:3J;1:37;2:35;3:38;4:3D;a3Db31c2Md2He30f2Cg26h1Qji1Ek1Bl0Ym0Wn0Tordos,p0Pq0Lrizh10s08t01wSxLyEz5;aoCh6i5ouc3unyi;bo,go0;a7en6ouk2u5; c3h3CmaWzh2;g2Vj1Izh2;b1Ung5o3E;jiakou5zh2;! shi xuanhua qu;ya0z27;an9i7u5;ci,e18n5;c3fu;b4c9n5ya0;cZgk2;c3g5ji,t31;j17qu1sh16zh2;i6uc5;ha0;a6n5uyi0;di,gt2Wh1Fi0pu,t2Wx13ya0;m17n5;!g5ni0t0Eya0;t1ya0;aBe9u5;h6so0w1Bx5zh2;i,ue;a5u;i,n;i0Hn5;sh1zh2;fang5nxi1;di1;a8i6ong5;chuans0XhDli02sh1;an5eli0;j4sh0Z;i6ng5;gu,sh1;an,hec1Wyu1zh2;anmi0hAi8u5;i5zh2;h5zh2;ua;c5pi0;hu1;a7en6i5uangya14;jiaz15qi,y1;gli,ya0zh0G;n6o5s0I;gu1xi0;g5t2;h20qiu,rKyu;i5uan1J;aFn5o1Xqih0N;g5huangdH;dGh1W;an0Ting7rc,u5;ti1yang5;! H;ding0QxZ;an5eijYingbo;ch5ji0ni0to0ya0;a0o0;entoug2ianRuda5;njU;aEi8u5;anc3o6qi5;ao;he,ya0;a7jPn5upansh01;fTxia 5yi;chengguanI;n0Do5;c3y5;a0u1;i0Wn5ohek2;g5zh2;fa0;ai6un5;mi0sh1;fe0yu1;'1aAe9l4n6u5xi;jCt15;an,c3g5i0zh2;de5li0zh2;zhE;ya0;musi,n8o5xi0;j6z5;uo;ia0;g5shF;m7xi;aFeBohhot,u5;a6i0Dlan ergi,m5n1;en;i7ng5y4;ga0s5;hi;'1b8n1;bi,f7ga0ng5ze;sh5ya0;ui;ei;i7n5rb4;d1g5;u,zh2;c3k2l5;ar;a9u5;an6i5li;l4ya0zh2;g5k2;do0yu1zh2;nsu,opi0;en7o6u5;ji1shQx4zh2;sh1;d2g5;hua0;a6eNong5;gu1h02;d6lian5ndo0qi0to0;!g;oYuk2;angIh5n,t;aBen8i5o00uH;fe0n5;a5ese;! standard K;g5zh2;d5zho0;e,u;ng6o5;ya0zh2;ch7de,sh6zh5;i,ou;a,u;un;zh2;aAe5;i6n5;gbu,xi;'1hGjing5;! 5;time;i7o5yan nur;di0t2;ou;c3sh1y4;an;he0;nCsia/5;ch8harb4sha5;ngh5;ai;in;o5ungki0;ng5;qi0;da,qi0sh5ya0;an,un;ng|Asia/Chungking¦chungking|Asia/Colombo¦asia/c0c0dehiwala mount lavinia,lk,moratuwa,sri lanka;olombo|Asia/Dhaka¦asia/dFbDcBd9jess8khul7mymensingh,na4pa3ra2s1t0;angail,ungi;aid8hib4ylhet;jshahi,ng7;b3ltan,r naogaon;gar5r0t3;ayan0singdi;ganj;na;ore;h6inaj0;pur;hattogram,o0;milla,x's bazar;a0d,ogra;gerhat,ngladesh,rishal;acca,h0;aka|Asia/Dacca¦dacca|Asia/Damascus¦a4d3h2latak1sy0;!r0;ia;am3oms;a1eir ez zor;leppo,r raqq1sia/da0;mascus;ah|Asia/Dili¦asia/d1d1east timor,tl0;!t;ili|Asia/Dubai¦a4d5g2musaff1om0ras al khaim1sharj1uae;!an;ah;st,ulf0;! standard time;bu dhabi,jman,sia/d0;ubai|Asia/Dushanbe¦asia/d2d2t0;ajikistan,j0;!t;ushanbe|Asia/Gaza¦asia/gaza,gaza1p0;alestine,s;! strip|Asia/Hebron¦asia/h0east jerusalem,h0west bank;ebron|Asia/Saigon¦asia/ho0saigon;|Asia/Ho_Chi_Minh¦asia/saig4bien hoa,can tho,da 2ho chi minh,nha tr3qui nh4rach gia,sa dec,thi xa phu my,v0;ietnam0n,ung tau;! (south);lat,n0;ang;on|Asia/Hong_Kong¦asia/hong4h0kowloon,tsuen wan;k2ong0; kong0kong;! time;!t;|Asia/Hovd¦asia/hovd,bayan-ölgiigovi-altaihovduvszavkhan,hov0;d,t|Asia/Irkutsk¦a1brat2irk0ulan ude;t,ut1;ngar0sia/irkut0;sk|Europe/Istanbul¦aZbTcRdPeMgLiJkHmCosmBs5t1u0v08zeytinburnu;eskuedXmrA;arsus,r2urk0;ey0ish;! standard time;!abzon,t;a3i1ultan0;beyJgazi;sIv0;as,erek;msun,n0;cakt5liurfa;aniye;a1er0uratpaH;kezefendi,sin;l0niF;atQt0;epe;a0irikkale,onOutahO;hramanmaras,rabaglFyseR;sJzmi0;r,t;aziantep,ebze;lazig,rzurum,s0uropeF;en0kiC;l8yurt;eniz0iyarbakB;li;ankaEor0;lu,um;a1ur0;sa;gcil2hcelievl1likes5sak4t0;ikent,mB;er;ar;d7n4rnavutkoey,sia2ta0;seh0;ir;/is0;tanbul;kara,ta0;k0l0;ya;a1iyam0;an;na,paza0;ri|Asia/Jakarta¦asia/jXbRcPdepOiMjKkediri,lJmGpArengasdengklOs4t2w0yogyX;est0ib; inLern indonesian time;a0egal;n4sikmal3;ema4itubondo,outh tan3u0;kabumi,medaQra0;b0kR;aya;ge0;raM;a4e1robolinggo,urw0;akMokerto;ka1ma0rcut;laItangsiantar;long2nbaru;daGl3mulaGruG;a1ed0;an;diun,laD;embaC;a0ember;kCmbi,vasumatra;d,n0;donesia;ok;i0urug;ampea,bino5leungsir,mahi,putat,rebon;a1e0injai,ogor;kasi,ngkulu;nd0tam;a0u1; aceh,r lampu0;ng;ak0;arta|Asia/Jayapura¦a0east indonesia,j1new guinea (west papua / irian jaya) malukus/moluccas,wit;mbon,sia/j0;ayapura|Asia/Jerusalem¦as7beersheba,haifa,i1j0petah tiqwa,rishon leziyyon,tel aviv,west jeA;e9mt;d4l,s0;rael0t;! 0i;daylight0standard0; time;dt,t;hdod,ia/0;je1tel0;;rusalem|Asia/Kabul¦a1herat,jalalabad,ka0mazar e sharif;b1ndahar;f1sia/kab0;ul;!ghanistan0t;! time|Asia/Kamchatka¦asia/kamchatka,kamchatka1pet0;ropavlovsk kamchatsky,t;! time|Asia/Karachi¦asia/karObKchiniJdera ghaziHfaisalGgujraFhyderGislamGjhang sadr,kDlaCm7nawabshah,okaAp4quetta,ra3s0;a1h0ialkIukkM;ahkHekhupu8;ddiqDhiwal,rgodha;him yarDwalpindi;akistan1eshawar,k0;!t;! standard time;a3i1u0;lt9zaffar7;ngo0rpur khas;ra;lir cantonment,rd6;hore,rkana;a0otli;moke,r9s8;n5t;abad; kh0;an;ot;a1himber,ure0;wala;hawalp0ttagram;ur;achi|Asia/Urumqi¦a6changji,huoche5k3shihezi,turp2u8xin1zh0;anjia4ongsh1;jiang time,yu0;an;a0orla;ramay,s4;ng;ksu,ral,sia/0;kas1u0;rumqi;hgar|Asia/Katmandu¦asia/kath1kat1n0;epal time,pt;mandu|Asia/Kathmandu¦asia/kat2biratnagar,kath2n1p0;atan,okhara;epal,p;mandu|Asia/Khandyga¦asia/k0k0;handyga|Asia/Krasnoyarsk¦asia/krasnoyarsk,kra0;snoyarsk0t;! time|Asia/Kuala_Lumpur¦aGbukit mertajFgeorge town,ipoh,johor bahEk9m4petali3s0taipiD;e1hah alEu0;ba1ngai petani;paAremb8;ng jaya;ala1y0;!t;cca,ysia0;! 0;(peninsula),time;ampung baru suba3la3ota bha4ua0;la 1nt0;an;lumpur,terengganu;ng;ru;am;lor setar,sia/kuala0;|Asia/Kuching¦asia/ku3k2miri,s0tawau;a0ibu;bahsarawak,ndakan;ota kinabalu,u0;ching|Asia/Kuwait¦a0k1;l ahmadi,sia/k0;uwait|Asia/Macau¦asia/maca1m0;acau,o;o,u|Asia/Macao¦macao|Asia/Magadan¦asia/maga1mag0;a0t;dan|Asia/Makassar¦asia/9b5c3denpaCk2l1ma0palu,samarinda,wita;kAnado,taram;abuan bajo,oa jan6;endari,upang;entral indonesia0ity of bal3;!n time;a0orneo (eastsouth) sulawesi/celebesbalinusa tengarra timor (west);l0njarmasin;ikpap0;an;mak1ujung0;;as0;sar|Asia/Manila¦a04bWcRdaPgeneral santOiMlJmCnaBoAp4quezIsan1ta0zamboanga;clobZguig,rlac,ytE; 1t0;a ro2ol;fernando,jose del monte,pab03;a3h1uerto prince0;sa;!ilippine0t; time,s;gadiRnalanoy,s0;ay,ig;longapo,rmoc;ga,votQ;a0eycauayN;balacat,gugpo poblaci4kati,l3n0;da1iQsilingLtamp0;ay;luyong,ue;ingDol6;on;a1egaspi,i0ucena;bertad,pa;pu lapu,s p4;l0mus;igCoiJ;os;smar0v5;inB;a0ebu,otabato;b1gayan de oro,in5l0;amba,ooc6;anatu5uy0;ao;a4inan2u0;d0tu2;ta;!gon0;an;co1guio,tang0;as;lod,or;n1sia/mani0;la;geles,tipo0;lo|Asia/Muscat¦asia/m0m0seeb;uscat|Asia/Nicosia¦asia2cy0europe2n3;!prus0;! (most areas);/n0;icosia|Asia/Novokuznetsk¦asia/n0kemerovo,n0prokop'yev1;ovokuznet0;sk|Asia/Novosibirsk¦asia/novo1nov0siberia;o0t;sibirsk|Asia/Omsk¦asia/omsk,oms0;k,t|Asia/Oral¦asia/oral,ora0west kazakhstan;l0t;! time|Asia/Phnom_Penh¦asia/phnom0phnom penh,takeo;|Asia/Pontianak¦asia/p0borneo (westcentral),p0tanjung pinang;ontianak|Asia/Pyongyang¦asia/p9chongjin,h5k3n2p9s0won6;ariw0inui7unch'0;on;amp'o,orth korea;a0p;eso5nggye;a1ungnam,ye0;san;e0mhu2;ju;yongya0;ng|Asia/Qatar¦a1doha,qa0;!t1;r rayyan,sia/qat0;ar|Asia/Qyzylorda¦asia/q1k1qyzylorda0;!/kyzylorda/kzyl-1;yzyl0;orda|Asia/Yangon¦asia/rango3b2kyain seikgyi township,m0nay pyi taw,pathein,sittwe,yang3;a0eiktila,m,onywa,yanmar;ndalay,wlamyine;ago,urma;on|Asia/Rangoon¦asia/yang1m0rango1;mt,yanmar time;on|Asia/Riyadh¦a6burayd5dammam,ha4jedd5khamis mushait,me3najran,r7sultan5ta2y0;anbu,e0;!men;'if,buk;cca,dina;'il,far al batin;ah;bha,l 1sia/r0;iyadh;hufuf,jubayl,kharj,mubarraz|Asia/Sakhalin¦asia/sakh1sak0yuzhno sakhalinsk;h0t;alin|Asia/Samarkand¦asia/s2bukhara,nukus,qarshi,s2uz0;bekistan 0t;(west),time;amarkand|Asia/Seoul¦aObuLchGdaeFgBhwaseoQiAje9k7m6pohaErok,s2u1wonIy0;aBeosu;ijeongbuPlsK;e1outh korea,u0;nDwG;jo9o0;ngnamLul;asFokpo;imhae,orea0r,st,wangmyo6;! standard time,n;ju,on8;cCksBn6;angneu2oyaEu1wa0;ng5;mi,ns8riD;ng;gu,je4;angw3eon2in1un0;che2;ju;an,gju7;on;c1s0;an;heon3;n0sia/seoul;san1ya0;ng0; si|Asia/Singapore¦asia/singapore,s0woodlands;g1ingapore0;! time;!t|Asia/Srednekolymsk¦asia/sred1sre0;d0t;nekolymsk|Asia/Taipei¦asia/taip7banqiao,h6k4roc,t0;a0w;i0oyu1;ch2n0p4w0;an;aohsi0eel0;ung;sinchu,ualien;ei|Asia/Tashkent¦a2namangan,qo`q4t3uz0;!bekistan0;! (east);ndij1sia/t0;ashkent;on|Asia/Tbilisi¦asia/t2ge0kuta3t2;!orgia0t;! standard time;bil0;isi|Asia/Tehran¦aTbPgorg00hamZiKkCmaBn8orumiy7pasragad branch,q4rasht,s2t1varam6yazd,za0;hedZnjZ;abHeT;a0hirVirjX;bzevar,nandEri,v3;a0om;rchak,zv0;in;eh;a0eyshabur;jaf0zar0;ab4;layer,shh3;a4erman3ho0;meyni sGrram0wy;ab0sF;ad;!shah;h1r0;aj;riz;r0sfahF;!an0dt,st;! 0iD;daylight0standard0; time;a2irjand,o0ukA;jnu0ruje0;rd;b4ndar abbas;b5hv4m3r2sia/te1zads0;hahr;hr4;ak,dabil;ol;az;ad0;an|Asia/Thimphu¦asia/thim1b0thimp2;hutan,t;bu,p0;hu|Asia/Thimbu¦btt,thimbu|Asia/Tokyo¦0:11;1:1A;2:10;a18ch16fu0Zgifu14h0Oi0Ij0FkZmTnMoKsFt9u8waka05y3;a6o3;k3no;kaic1Co3;ha2su0;maKo;ji,tsun0F;aka7o3sukuba;k5makom05y3;a2o3;hOna0ta;oro03us0Qyo;m0Jrazu0sa1tsu1;a5end00hi4o0u3;i10zu0;monose1zuo0;ita2k3ppoLsebo;ai,u06;dawa05i0Wka3sa0t0E;ya2za1;a6eyaga0Qi3umazu;i4shi3; tokyo0Inomiya ha2;ga0R;g3ha,ra0G;a3oX;no,o0sa1;a5i3orio0;na3to,yaza1;mirinkan,to;chiDeb4tsu3;do,m8ya2;as0J;aBi9o7u3y6;mam5r4shi3;ro;ashi1e,uH;oto;be,c0Dfu,ri3shigaK;ya2;shiwa3takyushu;da;gosVkogawacho honmKmirenjaku,na8s5wa3;g3sa1;oe,uc07;hi01u3;g3kabe;ai;zaY;apan3oetJp,st;! standard ti3;me;bara1chi4ta3wa1zu3;mi;ha5n3;omi3;ya;ra;a8i3oncho;meBr4t3;acR;a4os3;a1hi2;kaNtsu0;chi5kodate,mam3;at3;su;nohe,o3;ji;ji8ku3;i6o0s3ya2;hi2;ma;ka; sD;!sa7;i3ofu;ba,g6;geoshimo,k7mag5njo,omori,s3tsugi;ahika3ia/tokyo;wa;asa1;ki;as4i3;ta;hi|Asia/Tomsk¦asia/t0t0;omsk|Asia/Ujung_Pandang¦ujung pandang|Asia/Ulaanbaatar¦asia/ula4m2ula0;anbaatar0n bator,t;! time;n,ongolia0;! (most areas);anbaatar,n0;|Asia/Ust-nera¦asia/ust-0ust 0;nera|Asia/Vientiane¦asia/v0v0;ientiane|Asia/Vladivostok¦asia/vladivostok,k2vla0;divostok0t;! time;habarovsk0omsomolsk on amur;! vtoroy|Asia/Yakutsk¦asia/yakut2blagoveshchen2yak0;t,utsk0;! time;sk|Asia/Yekaterinburg¦asia/yeka6chelyabin5k4magnitogor5nizhn3or2perm,s1tyumen,ufa,yek0zlatoust;a5t;terlitamak,urgut;e4sk;evartov1y tagil;amensk ural'skiy,urgan;sk;teri0;nburg|Asia/Yerevan¦a0y1;m,rmenia,sia/y0;erevan|Asia/Volgograd¦asia/volgograd|Europe/Volgograd¦europe/volgograd,vol0;gograd0t,zhskiy;! time|Atlantic/Azores¦a0hmt;tlantic/azor1zo0;r0st,t;es|Atlantic/Bermuda¦atlantic/be1b0;e0m;rmuda|Atlantic/Canary¦atlantic/canary,canary0las palmas de gran canaria,santa cruz de tenerife;! islands|Atlantic/Cape_Verde¦atlantic/cape2c0;ape verde,v0;!t;|atlantic/Faroe¦atlantic/faeroe|Atlantic/Faeroe¦faeroe|atlantic/Faeroe¦atlantic/faroe|Atlantic/Faroe¦f0;aroe0o;! islands|Europe/Oslo¦atlantic/jan3berg2europe/o1o1s0;j,valbard and jan may1;slo;en;|Atlantic/Jan_Mayen¦jan mayen|Atlantic/Madeira¦atlantic/madeira,madeira0;! islands|Atlantic/Reykjavik¦atlantic/r0is,r0;eykjavik|Atlantic/South_Georgia¦atlantic/south0gs,south georgia;|Atlantic/St_Helena¦atlantic/st0st helena;|Atlantic/Stanley¦atlantic/s3f0s3;alkland island1k0;!st;!s;tanley|Australia/Sydney¦au0c4new south wales (most areas),s3wollongong;!stralia0;!/0;act,c1nsw,s0;ydney;anberra|Australia/Adelaide¦a0south australia;c6d5ustralia0; central,/3n central0;! 0;daylight0standard0; time;ad0south;elaide;dt,st|Australia/Brisbane¦a1b7gold co8logan,queensland0townsville;! (most areas);e7ustralia0; e5/3n east0;!ern 0;daylight0standard0; time;b0queensland;risbane;ast;dt,st|Australia/Broken_Hill¦australia/0broken hill,new south wales (yancowinna);broken0yancowinna;|Australia/Currie¦australia/c0c0tasmania (king island);urrie|Australia/Darwin¦australia/0d1northern territory;d0north;arwin|Australia/Eucla¦a0cw4e3western australia (eucla);cw3ustralia0; central we2/e1n central western0;! standard time;ucla;st|Australia/Hobart¦australia/1h2tasmania0;! (most areas);h0tasmania;obart|Australia/Lord_Howe¦australia/l5l0;h3ord howe0;! 0;daylight0island,standard0; time;dt,st;hi,ord0;|Australia/Lhi¦lhi|Australia/Lindeman¦australia/l0l0queensland (whitsunday islands);indeman|Australia/Melbourne¦australia/0geelong,m1;m0victoria;elbourne|Australia/Nsw¦nsw|Australia/North¦north|Australia/Perth¦a0p7western australia (most areas);ustralia1w0;dt,st; w5/3n west0;!ern 0;daylight0standard0; time;p0w1;erth;est|Australia/South¦south|Europe/Lisbon¦amadora,europe/l8l8p5we0;st0t;! europe,ern europe0;!an 0;summer t0t0;ime;ort0t;o,ugal0;! (mainland);isbon|Australia/Yancowinna¦yancowinna|Brazil/Denoronha¦denoronha|Chile/EasterIsland¦e0;as0mt;st,t0;!er0; island0island;! s0;tandard0ummer0; time|Canada/Atlantic¦atlantic|Canada/Central¦central|Canada/East-saskatchewan¦east saskatchewan|Canada/Eastern¦eastern|Canada/Mountain¦mountain|Canada/Newfoundland¦newfoundland|Canada/Pacific¦pacific|Chile/Continental¦continental|Pacific/Easter¦chile/easterisland,e0pacific/e0;aster|Europe/Amsterdam¦a4e2groning3n1rot5t0utrecht;he hague,ilburg;etherlands,l;indhov0urope/ams2;en;lmere stad,ms0;terdam|Europe/Andorra¦a0europe/an1;d,n0;dorra|Europe/Astrakhan¦a0europe/a0;strakhan|Europe/Athens¦a1europe/a1gr0thessaloniki;!eece;thens|Europe/London¦a0Kb06c03d00eVgShQiOjeNkingston upon hull,lJmHnBoxRp9reading,s1w0yF;arwick06igan,olverha7;heffield,o3t2u1w0;an4iU;ffolk,nderland,sVttU;afMoke on tre08;meVuth0;a1end on 0;sea;mptP;ly0orts0restO;mouth;ew4o0;r0ttinghamP;th0wB; y0amptonN;orkR;castle upon tyne,port;ancheMi0;dlan3lton keynes;ancaNdn,e1i0oDutE;ncolnMverT;e0icesterG;ds;!rsU;psw0slingt9;ich;ampGert0;fordF;b1l0;asgow,oucesterD;!-eD;dinburgh,s3urope/0;belMlo0;nd0;on;sex;erby1o0udlH;rset;!sh5;a1ity of westmin0oventry,rawlE;ster;mbridge1rdiff;eAir9lack7r2st,uckingham0;sh0;ire;adford,e3i0;st4t0;ain,ish0;! summer time;nt;po0;ol;kenhead,mingham;l1xl0;ey;fast;berdeen,rchway|Europe/Belgrade¦b2europe/b2n1pristina,s0;i,lovenia;is,ovi sad;elgrade|Europe/Berlin¦a05bWcRdPeNfrMgeKhaFkDlBm5n4oberhaus09ro3s1w0;andsbek,iesbad08uppert9;a0tuttgaM;arbrueck06xony;mance,sto8;eue neustadt,uernbe02;a3e2iddle european,oenchengladba1u0;enst9ni0;ch;st,t;gdeWinz,nnheim,rienth0;al;eipzMuebe0;ck;a0iNoeln,rO;rlsruhe,ssM;gTlle (saale),m1nnov0rQ;er;burg0m;! 0;mitte,nord;lsenkirNrmany0;! (most areas);ankfurt am maHeiJ;imsbuettDrfu0ssLurope/beF;rt;e,ortmund,resdJu0;esseldorf,isF;e0hemnitz;ntral europe0st,t;!an 0;summer t0t0;ime;avaria,e6iel5o2r0;aunschwe0emB;ig;chum0nn;! hord0;el;efeld;rl0;in;a2ltona,ugs0;bu0;rg;ch0;en|Europe/Bratislava¦b0europe/b0kosice;ratislava|Europe/Brussels¦antwerpen,b0charleroi,europe/br1gent,liege;e1r0;ussels;!lgium|Europe/Bucharest¦b3c2europe/bu4gala1iasi,oradea,ploies1ro0timisoara;!mania;ti;luj napoca,onstanta,raiova;ra1u0;charest;ila,sov|Europe/Budapest¦b1debrecen,europe/b1hu0;!ngary;udapest|Europe/Busingen¦b0europe/b0;usingen|Europe/Chisinau¦c2europe/1m0;d,oldova;c0tiraspol;hisinau|Europe/Copenhagen¦arhus,c1d0europe/c1;enmark,k;openhagen|Europe/Dublin¦cork,d3e2i0;e,r0;eland,ish summer time;ire,urope/d0;ublin|Europe/Gibraltar¦europe/gib1gi0;!b0;raltar|Europe/Guernsey¦europe/g0g0;uernsey|Europe/Helsinki¦e2fi1h3t0vantaa;ampere,urku;!nland;spoo,urope/h0;elsinki|Europe/Isle_Of_Man¦europe/isle0isle of man;|Europe/Jersey¦europe/jersey|Europe/Kaliningrad¦europe/k0k0;aliningrad|Europe/Kirov¦europe/k0k0;irov|Europe/Kiev¦bila tserkIcherFdDeurope/kiChorlBivano frankivEk7l6m4odessa,poltaIrivne,sumy,ternopil,u2vinnyts1z0;aporizhzh0hytomyr;ya;a,kraine0;! (most areas);a0ykolayC;ki5riupol;ut7vA;amyanske,h1i4r0y9;emenchuk,opyv1yvyy rih;ark7erson,mel0;nytskyy;ivka;ev;nipro,onet0;sk;kasy,ni0;h0vtsi;iv;va|Europe/Ljubljana¦europe/l0l0;jubljana|Europe/Luxembourg¦europe/lux1lu0;!x0;embourg|Europe/Madrid¦aMbJcHeFfuenCgBjerez de la frontera,lAm8ovieEp6s1terrassa,v0zaragoza;alladolFigo;a1evilla,pain0;! (mainland);badell,n0; sebastian,t0; marti,ander,s montjuic;a0uente de vallecas;lma,mpD;a0ostolGurcF;dr6laga;atiFeganE;asteiz / vitorCijon,ran1;carral el par1labr0;ada;do;ixample,lche,s,urope/madr0;id;a0iudad lineal;rabanchel,stello de la pla7;a0ilbao,urgos;da0rce0sque;lo4; coru3l0;cala de henar1icante,mer0;ia;es;na|Europe/Malta¦europe/ma1m0;a0t;lta|Europe/Mariehamn¦europe/m0m0;ariehamn|Europe/Minsk¦b2europe/min3h1m0viteb3;ahilyow,in2;omyel,rodna;abruy0elarus,rest,y;sk|Europe/Monaco¦europe/mo1m0;c,o0;naco|Europe/Moscow¦ar0Bb08c05dzerzh04europe/mo03fet,grozn02ivano01kVlipet0DmQnMorel,pJrEs7t5v2w-su,y0zelenograd;a0oshkar oT;roslavl,seneZ;asyl'evsky ostrHelikiLladi1o0ykhino zhulebQ;logda,ronezh;kavkaz,m07;a0uOver;ganrog,mbD;a4ever3hakhty,molen05ochi,t0yktyvkP; 4a0;ryy osk0vrop0;ol;nQodvS;int 0rW;petersburg;ostov na donu,u1y0;azJbO;!ssia0;!n0;! standard time;e1odolTsk0;ov;nza,trozavodR;a2izhn0ovorossiyQ;ekamPi0;y novL;berezhnyye chelny,l'chik;a1dst,oCs0urmI;d,k;khachka1r'0;ino;la;a2himki,ostroma,rasno0urH;d0gvargeisky;ar;l1z0;an;ininsk6uga;vo;yy;scow;in8;entraln1he0;boksary,repovets;iy;el1ry0;an3;gorod;khangel'1mav0;ir;sk|Europe/Paris¦bordeaux,cergy pontoiCeurope/pBfr9l7m6n4pBre3s0toulouC;aint 1t0; 0rasbourg;etienne;ims,nn1;ant0i5ormandy;es;arsei1ontpellier;e havre,i0yon;lle;!an0;ce;aris;se|Europe/Podgorica¦europe/p0p0;odgorica|Europe/Prague¦brno,europe/p1ostrava,p1s0;k,lovakia;rague|Europe/Riga¦e1kalt,l0r2;atvia,v;ast2e1urope/r0;iga;st,t; europe,ern europe0;!an 0;summer t0t0;ime|Europe/Rome¦bAc9europe/r8florence,genoa,m7naples,p4r8sicily,t2v0;a0eroB;!tican city;aran2rieste,u0;rin,scany;a1ra0;to;dova,lermo;essi4ilan;ome;atan1orsica;ari,olog1resc0;ia;na|Europe/Samara¦europe/sama2izhevsk,s0togliatti on the volga;am0yzran;a0t;ra|Europe/Saratov¦balakovo,europe/s0s0;aratov|Europe/San_Marino¦europe/san0san marino;|Europe/Sarajevo¦banja luka,europe/s0s0;arajevo|Europe/Simferopol¦europe/s0s0;imferopol|Europe/Skopje¦europe/s0s0;kopje|Europe/Sofia¦b1europe/s0plovdiv,s0varna;of2;g,u0;lgar0rgas;ia|Europe/Stockholm¦europe/st1goeteborg,malmoe,s0;e,t0weden;ockholm|Europe/Tallinn¦e0t1;e,stonia,urope/t0;allinn|Europe/Tirane¦al1europe/tirane,tiran0;a,e;!bania|Europe/Tiraspol¦tiraspol|Europe/Ulyanovsk¦europe/u0u0;lyanovsk|Europe/Uzhgorod¦europe/u0ruthenia,u0;zhgorod|Europe/Vaduz¦europe/v0v0;aduz|Europe/Vatican¦europe/v0v0;atican|Europe/Vienna¦a1donaustadt,europe/v0favoriten,graz,linz,v0;ienna;t,ustria|Europe/Vilnius¦europe/v2k1l0v2;ithuania,t;aunas,laipeda;ilnius|Europe/Warsaw¦bEczestochowa,europe/waCg8k6l4mokot7p2radGs1torun,w0zabrze;aBroclC;osnowiec,zczec3;l,o0raga poludnie;land,znan;odz,ubl0;in;ato2iel3rak0;ow;d2li0;wi0;ce;ansk,ynia;rs0;aw;i2y0;dgoszcz,t0;om;alystok,elsko biala|Europe/Zagreb¦europe/z0split,z0;agreb|Europe/Zaporozhye¦europe/zaporozhye,luhansk,sevastopol,zaporozh0;'ye/zaporizhia lugansk/luhansk (east),ye|Europe/Zurich¦europe/z1geneve,li0swiss time,z1;!echtenstein;urich|Indian/Antananarivo¦ant0indian/anta1toamasina;a0sirabe;nanarivo|Indian/Chagos¦british indian ocean territory,c3i0;ndian1o0;!t; c0/c0;hagos|Indian/Christmas¦c0indian/christmas;hristmas1x0;!t;! island|Indian/Cocos¦c0indian/cocos;c2ocos0;! island0;!s;!t|Indian/Comoro¦c0indian/c0;omoro|Indian/Kerguelen¦french southern and antarctic2indian/kerguelen,kerguelen1tf0;!t;!st paul islandamsterdam island;! lands|Indian/Mahe¦indian/m1m1s0;c,eychelles;ahe|Indian/Maldives¦indian/maldives,m0;aldives1v0;!t;! time|Indian/Mauritius¦indian/mauritius,m0;auritius1u0;!t;! time|Indian/Mayotte¦indian/mayotte|Indian/Reunion¦indian/reu2r0;e0éunioncrozetscattered islands;t,u0;nion|Mexico/Bajanorte¦bajanorte|Mexico/Bajasur¦bajasur|Pacific/Apia¦a2pacific/a2s1w0;estern s0s;amoa;pia|Pacific/Bougainville¦b2p0;a0gt;cific/b0pua new guinea time;ougainville|Pacific/Chatham¦cha0nz-chat,pacific/chatham;dt,st,tham0;! island0; 0s;daylight0standard0; time|Pacific/Truk¦pacific/chu0tr0;uk|Pacific/Chuuk¦chuuk1pacific/0;truk,y1;!/truky0;ap|Pacific/Efate¦e1pacific/e1v0;anuatu,u;fate|Pacific/Enderbury¦e1p0;acific/e0hoenix islands;nderbury|Pacific/Fakaofo¦f2pacific/f2t0;k0okelau;!t;akaofo|Pacific/Fiji¦f0pacific/fi2;i1j0;!st,t;ji|Pacific/Funafuti¦f1pacific/f1t0;uvalu,v;unafuti|Pacific/Galapagos¦gal0pacific/gala1;a0t,ápagos islands;pagos|Pacific/Gambier¦gambier0pacific/gambier;! islands|Pacific/Guadalcanal¦g1pacific/g1s0;b,olomon islands;uadalcanal|Pacific/Guam¦ch1g0mp,northern mariana islands,pacific/g0;uam;amorro standard time,st|Pacific/Honolulu¦aleutian,h1pacific/0us/hawaii;ho1johnston;awaii1o0st;nolulu;!an standard time|Pacific/Johnston¦johnston|Pacific/Kiritimati¦ki0line islands,pacific/kirit2;!ri0;b1t0;im0;ati|Pacific/Kosrae¦k0pacific/k0;osrae|Pacific/Kwajalein¦k1m0pacific/k1;arshall islands time,ht;wajalein|Pacific/Majuro¦m0pacific/maj3;a0h;j1rshall islands0;! (most areas);uro|Pacific/Marquesas¦marquesas0pacific/marquesas;! islands|Pacific/Midway¦m1pacific/m1s0;amoa standard time,dt,omoan,st;idway|Pacific/Nauru¦n0pacific/na1;a0r;uru|Pacific/Niue¦n0pacific/ni2;i1u0;!t;ue|Pacific/Norfolk¦n0pacific/norfolk;f,orfolk island|Pacific/Noumea¦n0pacific/no1;c,ew caledonia,o0;umea|Pacific/Pago_Pago¦pa0samoamidway,us/s2;cific/0go pago;pago1s0;amoa;|Pacific/Palau¦p0;a0w;cific/pal0l0;au|Pacific/Pitcairn¦p0;acific/pi0i0n;tcairn|Pacific/Ponape¦p0;acific/pohnpei,onape|Pacific/Pohnpei¦f3micro4p0;acific/1f,ohnpei0;!/0;ponape;m,rench poly0;nesia|Pacific/Port_Moresby¦p0;a0g,ort moresby;cific/port1pua new guinea0;! (most areas);|Pacific/Rarotonga¦c1pacific/r0r0;arotonga;k0ook islands;!t|Pacific/Saipan¦pacific/s0s0;aipan|Pacific/Tahiti¦pacific/t0society islands,t0;ahiti|Pacific/Tarawa¦gilbert islands,pacific/t0t0;arawa|Pacific/Tongatapu¦pacific/tongat2to0;!nga0;!t0;apu|Pacific/Wake¦pacific/wake,u1wake0;! island;m,s minor outlying islands|Pacific/Wallis¦pacific/wallis,w0;allis0f;! and futuna|Pacific/Yap¦yap|ETC/GMT¦etc/gmt|etc/Gmt¦etc/gr1g0;mt,r0;eenwich|ETC/UTC¦etc/utc|Etc/Utc¦etc/2u1z0;!u2;ct,tc;u1zu0;lu;ct,niversal|etc/Utc¦universal|Antarctica/DumontDUrville¦dumont-d'urville|America/Blanc-Sablon¦ast - qc (lower north shore)|America/Fort_Nelson¦mst - bc (ft nelson)|Asia/Famagusta¦northern cyprus|Asia/Qostanay¦kostanay|atlantic/Reykjavik¦iceland|America/Mendoza¦america/argentina/mendoza|America/Buenos_Aires¦ar0;gentin0t;a time,ian");Mm=Object.assign(Mm,{"gmt+0":"etc/Gmt","gmt-0":"etc/Gmt",gmt0:"etc/Gmt","etc/gmt+0":"Etc/Gmt","etc/gmt-0":"Etc/Gmt","etc/gmt0":"Etc/Gmt","msk-01 - kaliningrad":"Europe/Kaliningrad","msk+00 - moscow area":"Europe/Moscow","msk+00 - crimea":"Europe/Simferopol","msk+00 - volgograd":"Europe/Volgograd","msk+00 - kirov":"Europe/Kirov","msk+01 - astrakhan":"Europe/Astrakhan","msk+01 - saratov":"Europe/Saratov","msk+01 - ulyanovsk":"Europe/Ulyanovsk","msk+01 - samaraudmurtia":"Europe/Samara","msk+02 - urals":"Asia/Yekaterinburg","msk+03 - omsk":"Asia/Omsk","msk+04 - novosibirsk":"Asia/Novosibirsk","msk+04 - altai":"Asia/Barnaul","msk+04 - tomsk":"Asia/Tomsk","msk+04 - kemerovo":"Asia/Novokuznetsk","msk+04 - krasnoyarsk area":"Asia/Krasnoyarsk","msk+05 - irkutskburyatia":"Asia/Irkutsk","msk+06 - zabaykalsky":"Asia/Chita","msk+06 - lena river":"Asia/Yakutsk","msk+06 - tomponskyust-maysky":"Asia/Khandyga","msk+07 - amur river":"Asia/Vladivostok","msk+07 - oymyakonsky":"Asia/Ust-Nera","msk+08 - magadan":"Asia/Magadan","msk+08 - sakhalin island":"Asia/Sakhalin","msk+08 - sakha (e) north kuril is":"Asia/Srednekolymsk","msk+09 - kamchatka":"Asia/Kamchatka","msk+09 - bering sea":"Asia/Anadyr"}),Object.keys(Mm).filter((function(e){var t=Mm[e].toLowerCase();void 0===Mm[t]&&(Mm[t]=Mm[e])}));var Pm=function(e){if(!e)return null;if(e=e.toLowerCase().trim(),Mm.hasOwnProperty(e))return Mm[e];if(/[0-9]/.test(e)){var t=Im(e);if(t)return t}if(e=e.replace(/^in /g,"").replace(/ time/g,"").replace(/ (standard|daylight|summer)/g,"").replace(/ - .*/g,"").replace(/, .*/g,"").trim(),Mm.hasOwnProperty(e))return Mm[e];var n=e+" time";return Mm.hasOwnProperty(n)?Mm[n]:(n=e+" standard time",Mm.hasOwnProperty(n)?Mm[n]:(e=function(e){return(e=(e=(e=(e=(e=e.replace(/\b(east|west|north|south)ern/g,"$1")).replace(/\b(africa|america|australia)n/g,"$1")).replace(/\beuropean/g,"europe")).replace(/\islands/g,"island")).replace(/.*\//g,"")).trim()}(e),Mm.hasOwnProperty(e)?Mm[e]:(e=function(e){return(e=e.replace(/\(.*\)/,"")).trim()}(e),Mm.hasOwnProperty(e)?Mm[e]:(n=e+" time",Mm.hasOwnProperty(n)?Mm[n]:(n=e+" standard time",Mm.hasOwnProperty(n)?Mm[n]:null)))))},Dm=[{standard:{name:"Greenwich Standard Time",abbrev:"GMT"},daylight:{name:"British Summer Time",abbrev:"BST"},alias:["british","britain"],pick:"Europe/London",zones:["Europe/Guernsey","Europe/Isle_Of_Man","Europe/Jersey","Europe/London"]},{standard:{name:"Greenwich Standard Time",abbrev:"GMT"},daylight:{name:"Irish Summer Time",abbrev:"IST"},alias:["ireland"],zones:["Europe/Dublin"]},{standard:{name:"Greenwich Standard Time",abbrev:"GMT"},pick:"Africa/Freetown",alias:["etc","utc"],zones:["Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","America/Danmarkshavn","Antarctica/Troll","Atlantic/Reykjavik","Atlantic/St_Helena","ETC/GMT"]},{standard:{name:"Central Standard Time",abbrev:"CST"},daylight:{name:"Central Daylight Time",abbrev:"CDT"},pick:"America/Chicago",zones:["America/Bahia_Banderas","America/Belize","America/Chicago","America/Costa_Rica","America/El_Salvador","America/Guatemala","America/Indiana","America/Managua","America/Matamoros","America/Menominee","America/Merida","America/Mexico_City","America/Monterrey","America/North_Dakota","America/North_Dakota","America/North_Dakota","America/Rainy_River","America/Rankin_Inlet","America/Regina","America/Resolute","America/Swift_Current","America/Tegucigalpa","America/Winnipeg"]},{standard:{name:"Mountain Standard Time",abbrev:"MST"},daylight:{name:"Mountain Daylight Time",abbrev:"MDT"},pick:"America/Denver",zones:["America/Boise","America/Cambridge_Bay","America/Creston","America/Dawson_Creek","America/Denver","America/Edmonton","America/Fort_Nelson","America/Inuvik","America/Ojinaga","America/Phoenix","America/Yellowknife","America/Chihuahua","America/Hermosillo","America/Mazatlan"]},{standard:{name:"Atlantic Standard Time",abbrev:"AST"},daylight:{name:"Atlantic Daylight Time",abbrev:"ADT"},pick:"America/Halifax",zones:["America/Anguilla","America/Antigua","America/Aruba","America/Barbados","America/Blanc-sablon","America/Curacao","America/Dominica","America/Glace_Bay","America/Goose_Bay","America/Grenada","America/Guadeloupe","America/Halifax","America/Kralendijk","America/Lower_Princes","America/Marigot","America/Martinique","America/Moncton","America/Montserrat","America/Port_Of_Spain","America/Puerto_Rico","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Thule","America/Tortola","Atlantic/Bermuda"]},{standard:{name:"Eastern Standard Time",abbrev:"EST"},daylight:{name:"Eastern Daylight Time",abbrev:"EDT"},pick:"America/New_York",zones:["America/Cancun","America/Cayman","America/Coral_Harbour","America/Detroit","America/Grand_Turk","America/Indiana","America/Indianapolis","America/Iqaluit","America/Jamaica","America/Kentucky","America/Louisville","America/Nassau","America/New_York","America/Nipigon","America/Panama","America/Pangnirtung","America/Port-au-prince","America/Thunder_Bay","America/Toronto","America/Montreal"]},{standard:{name:"Pacific Standard Time",abbrev:"PST"},daylight:{name:"Pacific Daylight Time",abbrev:"PDT"},pick:"America/Los_Angeles",zones:["America/Dawson","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse"]},{standard:{name:"Alaskan Standard Time",abbrev:"AHST"},daylight:{name:"Alaskan Daylight Time",abbrev:"AHDT"},pick:"America/Anchorage",zones:["America/Anchorage","America/Juneau","America/Metlakatla","America/Nome","America/Sitka","America/Yakutat"]},{standard:{name:"Hawaiian Standard Time",abbrev:"HST"},alias:["aleutian","hawaii"],pick:"Pacific/Honolulu",zones:["America/Adak","Pacific/Honolulu","Pacific/Johnston"]},{standard:{name:"Newfoundland Standard Time",abbrev:"NST"},daylight:{name:"Newfoundland Daylight Time",abbrev:"NDT"},pick:"America/St_Johns",zones:["America/St_Johns"]},{standard:{name:"Central European Time",abbrev:"CET"},daylight:{name:"Central European Summer Time",abbrev:"CEST"},alias:["romance","central europe"],pick:"Europe/Berlin",zones:["Africa/Algiers","Africa/Ceuta","Africa/Tunis","arctic/Longyearbyen","Europe/Amsterdam","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Busingen","Europe/Copenhagen","Europe/Gibraltar","Europe/Ljubljana","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/San_Marino","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich"]},{standard:{name:"Eastern European Time",abbrev:"EET"},daylight:{name:"Eastern European Summer Time",abbrev:"EEST"},alias:["eastern europe"],pick:"Europe/Riga",zones:["Africa/Cairo","Africa/Tripoli","Asia/Amman","Asia/Beirut","Asia/Damascus","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Kaliningrad","Europe/Kiev","Europe/Mariehamn","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{standard:{name:"Western European Time",abbrev:"WET"},daylight:{name:"Western European Summer Time",abbrev:"WEST"},alias:["western europe"],pick:"Europe/Lisbon",zones:["Africa/Casablanca","Africa/El_Aaiun","Atlantic/Canary","Atlantic/Faeroe","Atlantic/Madeira","Europe/Lisbon"]},{standard:{name:"Turkey Standard Time",abbrev:"TRT"},alias:["turkish"],pick:"Europe/Istanbul",zones:["Europe/Istanbul"]},{standard:{name:"East Africa Time",abbrev:"EAT"},alias:["east african","eastern africa"],pick:"Africa/Nairobi",zones:["Africa/Addis_Ababa","Africa/Asmera","Africa/Dar_Es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Mogadishu","Africa/Nairobi","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte"]},{standard:{name:"Central Africa Time",abbrev:"CAT"},pick:"Africa/Khartoum",alias:["central africa"],zones:["Africa/Blantyre","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Khartoum","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Windhoek"]},{standard:{name:"South Africa Standard Time",abbrev:"SAST"},alias:["southern africa","south african"],pick:"Africa/Johannesburg",zones:["Africa/Johannesburg","Africa/Maseru","Africa/Mbabane"]},{standard:{name:"West Africa Standard Time",abbrev:"WAT"},alias:["western africa","west african"],pick:"Africa/Lagos",zones:["Africa/Bangui","Africa/Brazzaville","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-novo"]},{standard:{name:"Australian Central Standard Time",abbrev:"ACST"},daylight:{name:"Australian Central Daylight Time",abbrev:"ACDT"},alias:["australia central"],pick:"Australia/Adelaide",zones:["Australia/Adelaide","Australia/Broken_Hill","Australia/Darwin"]},{standard:{name:"Australian Eastern Standard Time",abbrev:"AEST"},daylight:{name:"Australian Eastern Daylight Time",abbrev:"AEDT"},alias:["australia east"],pick:"Australia/Brisbane",zones:["Australia/Brisbane","Australia/Currie","Australia/Hobart","Australia/Lindeman","Australia/Melbourne","Australia/Sydney"]},{standard:{name:"Australian Western Standard Time",abbrev:"AWST"},daylight:{name:"Australian Western Daylight Time",abbrev:"AWDT"},alias:["australia west"],pick:"Australia/Perth",zones:["Antarctica/Casey","Australia/Perth"]},{standard:{name:"Australian Central Western Standard Time",abbrev:"ACWST"},alias:["australia central west"],pick:"Australia/Eucla",zones:["Australia/Eucla"]},{standard:{name:"Lord Howe Standard Time",abbrev:"LHST"},daylight:{name:"Lord Howe Daylight Time",abbrev:"LHDT"},pick:"Australia/Lord_Howe",zones:["Australia/Lord_Howe"]},{standard:{name:"New Zealand Standard Time",abbrev:"NZST"},daylight:{name:"New Zealand Daylight Time",abbrev:"NZDT"},pick:"Pacific/Auckland",zones:["Antarctica/Mcmurdo","Pacific/Auckland"]},{standard:{name:"Chatham Island Standard Time",abbrev:"CHAST"},daylight:{name:"Chatham Island Daylight Time",abbrev:"CHADT"},pick:"Pacific/Chatham",zones:["Pacific/Chatham"]},{standard:{name:"Russian Standard Time",abbrev:"MSK"},alias:["russian"],pick:"Europe/Moscow",zones:["Europe/Astrakhan","Europe/Minsk","Europe/Moscow","Europe/Simferopol","Europe/Ulyanovsk","Europe/Kirov"]},{standard:{name:"Volgograd Time",abbrev:"VOLT"},zones:["Europe/Volgograd"]},{standard:{name:"Brazil Time",abbrev:"BRT"},alias:["brasília","brasilia","brazilian"],pick:"America/Sao_Paulo",zones:["America/Araguaina","America/Bahia","America/Belem","America/Fortaleza","America/Maceio","America/Recife","America/Santarem","America/Sao_Paulo"]},{standard:{name:"Argentina Time",abbrev:"ART"},alias:["argentinian"],pick:"America/Buenos_Aires",zones:["America/Argentina","America/Buenos_Aires","America/Catamarca","America/Cordoba","America/Jujuy","America/Mendoza"]},{standard:{name:"Amazon Time",abbrev:"AMT"},alias:["amazonian"],pick:"America/Manaus",zones:["America/Boa_Vista","America/Campo_Grande","America/Cuiaba","America/Manaus","America/Porto_Velho"]},{standard:{name:"Easter Island Standard Time",abbrev:"EAST"},daylight:{name:"Easter Island Summer Time",abbrev:"EASST"},zones:["Chile/EasterIsland"]},{standard:{name:"Venezuelan Standard Time",abbrev:"VET"},alias:["venezuela"],zones:["America/Caracas"]},{standard:{name:"Paraguay Time",abbrev:"PYT"},daylight:{name:"Paraguay Summer Time",abbrev:"PYST"},zones:["America/Asuncion"]},{standard:{name:"Cuba Standard Time",abbrev:"CST"},daylight:{name:"Cuba Daylight Time",abbrev:"CDT"},alias:["cuban"],zones:["America/Havana"]},{standard:{name:"Bolivia Time",abbrev:"BOT"},alias:["bolivian"],zones:["America/La_Paz"]},{standard:{name:"Colombia Time",abbrev:"COT"},alias:["colombian"],zones:["America/Bogota"]},{standard:{name:"Acre Time",abbrev:"ACT"},pick:null,zones:["America/Eirunepe","America/Rio_Branco"]},{standard:{name:"Peru Time",abbrev:"PET"},zones:["America/Lima"]},{standard:{name:"Chile Standard Time",abbrev:"CLST"},daylight:{name:"Chile Summer Time",abbrev:"CLDT"},pick:null,zones:["America/Punta_Arenas","America/Santiago","Antarctica/Palmer"]},{standard:{name:"Uruguay Time",abbrev:"UYT"},zones:["America/Montevideo"]},{standard:{name:"Arabic Standard Time",abbrev:"AST"},pick:"Asia/Baghdad",alias:["arabic","arab"],zones:["Asia/Aden","Asia/Baghdad","Asia/Bahrain","Asia/Kuwait","Asia/Qatar","Asia/Riyadh"]},{standard:{name:"Iran Standard Time",abbrev:"IRST"},daylight:{name:"Iran Daylight Time",abbrev:"IRDT"},alias:["iranian"],pick:"Asia/Tehran",zones:["Asia/Tehran"]},{standard:{name:"Pakistan Standard Time",abbrev:"PKT"},pick:"Asia/Karachi",zones:["Asia/Karachi"]},{standard:{name:"India Standard Time",abbrev:"IST"},alias:["indian"],pick:"Asia/Kolkata",zones:["Asia/Kolkata","Asia/Colombo"]},{standard:{name:"Indochina Time",abbrev:"ICT"},alias:["South East Asia"],pick:"Asia/Bangkok",zones:["Asia/Bangkok","Asia/Phnom_Penh","Asia/Saigon","Asia/Vientiane"]},{standard:{name:"China Standard Time",abbrev:"CT"},alias:["chinese"],pick:"Asia/Shanghai",zones:["Asia/Macau","Asia/Shanghai","Asia/Taipei"]},{standard:{name:"Alma-Ata Time",abbrev:"ALMT"},pick:"Asia/Almaty",zones:["Asia/Almaty","Asia/Qostanay"]},{standard:{name:"Oral Time",abbrev:"ORAT"},pick:"Asia/Oral",zones:["Asia/Aqtau","Asia/Aqtobe","Asia/Atyrau","Asia/Oral","Asia/Qyzylorda"]},{standard:{name:"Yakutsk Time",abbrev:"YAKT"},pick:"Asia/Yakutsk",zones:["Asia/Chita","Asia/Khandyga","Asia/Yakutsk"]},{standard:{name:"Gulf Standard Time",abbrev:"GST"},pick:"Asia/Dubai",alias:["uae"],zones:["Asia/Dubai","Asia/Muscat"]},{standard:{name:"Hong Kong Time",abbrev:"HKT"},zones:["Asia/Hong_Kong"]},{standard:{name:"Western Indonesian Time",abbrev:"WIB"},alias:["indonesia"],zones:["Asia/Jakarta","Asia/Pontianak","Asia/Jayapura"]},{standard:{name:"Central Indonesian Time",abbrev:"WITA"},zones:["Asia/Makassar"]},{standard:{name:"Israel Daylight Time",abbrev:"IDT"},daylight:{name:"Israel Standard Time",abbrev:"IST"},alias:["israeli"],zones:["Asia/Jerusalem"]},{standard:{name:"Krasnoyarsk Time",abbrev:"KRAT"},zones:["Asia/Krasnoyarsk","Asia/Novokuznetsk","Asia/Barnaul"]},{standard:{name:"Malaysia Time",abbrev:"MYT"},zones:["Asia/Kuala_Lumpur","Asia/Kuching"]},{standard:{name:"Singapore Time",abbrev:"SGT"},zones:["Asia/Singapore"]},{standard:{name:"Korea Standard Time",abbrev:"KST"},pick:"Asia/Seoul",alias:["korean"],zones:["Asia/Pyongyang","Asia/Seoul"]},{standard:{name:"Uzbekistan Time",abbrev:"UZT"},zones:["Asia/Samarkand","Asia/Tashkent"]},{standard:{name:"Vladivostok Time",abbrev:"VLAT"},pick:"Asia/Vladivostok",zones:["Asia/Ust-nera","Asia/Vladivostok"]},{standard:{name:"Anadyr Time",abbrev:"ANAT"},zones:["Asia/Anadyr"]},{standard:{name:"Turkmenistan Time",abbrev:"TMT"},zones:["Asia/Ashgabat"]},{standard:{name:"Azerbaijan Time",abbrev:"AZT"},zones:["Asia/Baku"]},{standard:{name:"Kyrgyzstan Time",abbrev:"KGT"},zones:["Asia/Bishkek"]},{standard:{name:"Brunei Darussalam Time",abbrev:"BNT"},zones:["Asia/Brunei"]},{standard:{name:"Afghanistan Time",abbrev:"AFT"},zones:["Asia/Kabul"]},{standard:{name:"Kamchatka Time",abbrev:"PETT"},zones:["Asia/Kamchatka"]},{standard:{name:"Nepal Time",abbrev:"NPT"},zones:["Asia/Katmandu"]},{standard:{name:"Philippine Time",abbrev:"PHT"},zones:["Asia/Manila"]},{standard:{name:"Myanmar Time",abbrev:"MMT"},zones:["Asia/Rangoon"]},{standard:{name:"Georgia Standard Time",abbrev:"GET"},zones:["Asia/Tbilisi"]},{standard:{name:"Japan Standard Time",abbrev:"JST"},zones:["Asia/Tokyo"]},{standard:{name:"Ulaanbaatar Time",abbrev:"ULAT"},zones:["Asia/Ulaanbaatar"]},{standard:{name:"Maldives Time",abbrev:"MVT"},zones:["Indian/Maldives"]},{standard:{name:"Mauritius Time",abbrev:"MUT"},zones:["Indian/Mauritius"]},{standard:{name:"Marshall Islands Time",abbrev:"MHT"},zones:["Pacific/Kwajalein","Pacific/Majuro"]},{standard:{name:"Samoa Standard Time",abbrev:"SST"},alias:["somoan"],zones:["Pacific/Midway","Pacific/Pago_Pago"]},{standard:{name:"Chamorro Standard Time",abbrev:"CHST"},zones:["Pacific/Guam","Pacific/Saipan"]},{standard:{name:"Papua New Guinea Time",abbrev:"PGT"},zones:["Pacific/Bougainville","Pacific/Port_Moresby"]}],Nm=function(e){var t=Pm(e);if(!t)return null;var n=Dm.find((function(e){return e.zones.find((function(e){return e===t}))}));return n||(n={standard:{name:t,abbrev:t}}),{iana:t,standard:n.standard,daylight:n.daylight}},Lm={find:Pm,display:Nm,version:"0.6.1"},Rm=Lm;const Bm={"Pacific/Midway":"Midway Island, Samoa","Pacific/Honolulu":"Hawaii","America/Juneau":"Alaska","America/Boise":"Mountain Time","America/Dawson":"Dawson, Yukon","America/Chihuahua":"Chihuahua, La Paz, Mazatlan","America/Phoenix":"Arizona","America/Chicago":"Central Time","America/Regina":"Saskatchewan","America/Mexico_City":"Guadalajara, Mexico City, Monterrey","America/Belize":"Central America","America/Detroit":"Eastern Time","America/Bogota":"Bogota, Lima, Quito","America/Caracas":"Caracas, La Paz","America/Santiago":"Santiago","America/St_Johns":"Newfoundland and Labrador","America/Sao_Paulo":"Brasilia","America/Tijuana":"Tijuana, Pacific Time","America/Argentina/Buenos_Aires":"Buenos Aires, Georgetown","America/Godthab":"Greenland","Atlantic/Azores":"Azores","Atlantic/Cape_Verde":"Cape Verde Islands",GMT:"UTC","Europe/London":"Edinburgh, London","Europe/Dublin":"Dublin","Europe/Lisbon":"Lisbon","Africa/Casablanca":"Casablanca, Monrovia","Atlantic/Canary":"Canary Islands","Europe/Belgrade":"Belgrade, Bratislava, Budapest, Ljubljana, Prague","Europe/Sarajevo":"Sarajevo, Skopje, Warsaw, Zagreb","Europe/Brussels":"Brussels, Copenhagen, Madrid, Paris","Europe/Amsterdam":"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","Africa/Algiers":"West Central Africa","Europe/Bucharest":"Bucharest","Africa/Cairo":"Cairo","Europe/Helsinki":"Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius","Europe/Athens":"Athens, Istanbul, Minsk","Asia/Jerusalem":"Jerusalem","Africa/Harare":"Harare, Pretoria","Europe/Moscow":"Moscow, St. Petersburg, Volgograd","Asia/Kuwait":"Kuwait, Riyadh","Africa/Nairobi":"Nairobi","Asia/Baghdad":"Baghdad","Asia/Tehran":"Tehran","Asia/Dubai":"Abu Dhabi, Muscat","Asia/Baku":"Baku, Tbilisi, Yerevan","Asia/Kabul":"Kabul","Asia/Yekaterinburg":"Ekaterinburg","Asia/Karachi":"Islamabad, Karachi, Tashkent","Asia/Kolkata":"Chennai, Kolkata, Mumbai, New Delhi","Asia/Kathmandu":"Kathmandu","Asia/Dhaka":"Astana, Dhaka","Asia/Colombo":"Sri Jayawardenepura","Asia/Almaty":"Almaty, Novosibirsk","Asia/Rangoon":"Yangon Rangoon","Asia/Bangkok":"Bangkok, Hanoi, Jakarta","Asia/Krasnoyarsk":"Krasnoyarsk","Asia/Shanghai":"Beijing, Chongqing, Hong Kong SAR, Urumqi","Asia/Kuala_Lumpur":"Kuala Lumpur, Singapore","Asia/Taipei":"Taipei","Australia/Perth":"Perth","Asia/Irkutsk":"Irkutsk, Ulaanbaatar","Asia/Seoul":"Seoul","Asia/Tokyo":"Osaka, Sapporo, Tokyo","Asia/Yakutsk":"Yakutsk","Australia/Darwin":"Darwin","Australia/Adelaide":"Adelaide","Australia/Sydney":"Canberra, Melbourne, Sydney","Australia/Brisbane":"Brisbane","Australia/Hobart":"Hobart","Asia/Vladivostok":"Vladivostok","Pacific/Guam":"Guam, Port Moresby","Asia/Magadan":"Magadan, Solomon Islands, New Caledonia","Asia/Kamchatka":"Kamchatka, Marshall Islands","Pacific/Fiji":"Fiji Islands","Pacific/Auckland":"Auckland, Wellington","Pacific/Tongatapu":"Nuku'alofa"};var jm;!function(e){e.ORIGINAL="original",e.ALTNAME="altName",e.ABBREV="abbrev"}(jm||(jm={}));var Fm=({value:e,onBlur:t,onChange:n,labelStyle:r="original",timezones:i=Bm,...a})=>{const o=v.a.useMemo(()=>Object.entries(i).reduce((e,t)=>{const n=ym.now().goto(t[0]),i=n.timezone(),a=Rm.display(t[0]);let o="",s=t[0],l=t[0];a&&a.daylight&&a.standard&&(s=n.isDST()?a.daylight.abbrev:a.standard.abbrev,l=n.isDST()?a.daylight.name:a.standard.name);const c=60*i.current.offset,u=`${c/60^0}:`+(c%60==0?"00":Math.abs(c%60)),d=`(GMT${u.includes("-")?u:`+${u}`}) ${t[1]}`;switch(r){case"original":o=d;break;case"altName":o=`${d} ${l.includes("/")?"":`(${l})`}`;break;case"abbrev":o=`${d} ${s.length<5?`(${s})`:""}`;break;default:o=`${d}`}return e.push({value:t[0],label:o,offset:i.current.offset,abbrev:s,altName:l}),e},[]).sort((e,t)=>e.offset-t.offset),[r,i]);return v.a.createElement(hf,{value:(s=e,"object"==typeof s&&s.value&&s.label?s:"string"==typeof s?o.find(e=>e.value===s)||-1!==s.indexOf("/")&&(e=>{let t;try{t=ym.now(e)}catch(e){return}return o.filter(e=>e.offset===t.timezone().current.offset).map(e=>{let n=0;return t.timezones[e.value.toLowerCase()]&&!!t.timezones[e.value.toLowerCase()].dst===t.timezone().hasDst?(-1!==e.value.toLowerCase().indexOf(t.tz.substr(t.tz.indexOf("/")+1))&&(n+=8),-1!==e.label.toLowerCase().indexOf(t.tz.substr(t.tz.indexOf("/")+1))&&(n+=4),e.value.toLowerCase().indexOf(t.tz.substr(0,t.tz.indexOf("/")))&&(n+=2),n+=1):"GMT"===e.value&&(n+=1),{tz:e,score:n}}).sort((e,t)=>t.score-e.score).map(({tz:e,score:t})=>e)[0]})(s):s.value&&!s.label?o.find(e=>e.value===s.value):void 0),onChange:e=>{n&&n(e)},options:o,onBlur:t,...a});var s},Um=r(54);function Hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hm(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vm={option:function(e,t){var n=t.isDisabled,r=t.isFocused,i=t.isSelected;return zm(zm({},e),{},{backgroundColor:n?null:i?Um.primary_color:r?Um.hover_primary_color:null})}},Wm=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.value,r=e.onChange,i=e.className,a=e.labelName,o=e.classNameLabel,s=e.classNameInput,l=e.labelPosition,c=e.required,u=e.isSmSize,d=e.isMdSize,h=Yt()(e,["value","onChange","className","labelName","classNameLabel","classNameInput","labelPosition","required","isSmSize","isMdSize"]);return v.a.createElement($l.a.Group,{className:P()("left"===l&&"d-flex",u&&pu.a.formGroupSm,d&&pu.a.formGroupMd,i)},a&&v.a.createElement($l.a.Label,{className:[pu.a.label,o]},a,c&&v.a.createElement("span",null," *")),v.a.createElement(Fm,Gt()({styles:Vm,className:P()(pu.a.timezoneSelect,s),components:{IndicatorSeparator:function(){return null}},value:n,onChange:r,placeholder:t("placeholder.selectTimezone")},h)))}}]),r}(g.PureComponent);Wm.propTypes={labelName:ne.a.string,className:ne.a.string,classNameLabel:ne.a.string,classNameInput:ne.a.string,value:ne.a.string,options:ne.a.array,onChange:ne.a.func},Wm.defaultProps={value:"",onChange:function(){}};var Gm=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Si(r.key),r)}}function Ym(e,t){return(Ym=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Km(e){return(Km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Xm=function(){return!!e})()}function Qm(e,t){if(t&&("object"==Ei(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $m(e){return function(e){if(Array.isArray(e))return ho(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||fo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Jm=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||Jm(r)&&Jm(i)))return!1;var r,i;return!0}for(var eg={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},tg=function(e){return io("span",xi({css:eg},e))},ng={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,i=e.context,a=e.isInitialFocus;switch(i){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,i=e.labels,a=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return"option ".concat(r,a?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,i=e.label,a=void 0===i?"":i,o=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&o)return"value ".concat(a," focused, ").concat(u(o,n),".");if("menu"===t&&c){var d=s?" disabled":"",h="".concat(l?" selected":"").concat(d);return"".concat(a).concat(h,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},rg=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,o=e.selectValue,s=e.selectProps,l=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,h=s.inputValue,f=s.isMulti,p=s.isOptionDisabled,m=s.isSearchable,v=s.menuIsOpen,b=s.options,y=s.screenReaderStatus,A=s.tabSelectsValue,_=s.isLoading,w=s["aria-label"],E=s["aria-live"],S=Object(g.useMemo)((function(){return ki(ki({},ng),u||{})}),[u]),C=Object(g.useMemo)((function(){var e,n="";if(t&&S.onChange){var r=t.option,i=t.options,a=t.removedValue,s=t.removedValues,l=t.value,c=a||r||(e=l,Array.isArray(e)?null:e),u=c?d(c):"",h=i||s||void 0,f=h?h.map(d):[],m=ki({isDisabled:c&&p(c,o),label:u,labels:f},t);n=S.onChange(m)}return n}),[t,S,p,o,d]),T=Object(g.useMemo)((function(){var e="",t=n||r,a=!!(n&&o&&o.includes(n));if(t&&S.onFocus){var s={focused:t,label:d(t),isDisabled:p(t,o),isSelected:a,options:i,context:t===n?"menu":"value",selectValue:o,isAppleDevice:c};e=S.onFocus(s)}return e}),[n,r,d,p,S,i,o,c]),k=Object(g.useMemo)((function(){var e="";if(v&&b.length&&!_&&S.onFilter){var t=y({count:i.length});e=S.onFilter({inputValue:h,resultsMessage:t})}return e}),[i,h,v,S,b,y,_]),x="initial-input-focus"===(null==t?void 0:t.action),O=Object(g.useMemo)((function(){var e="";if(S.guidance){var t=r?"value":v?"menu":"input";e=S.guidance({"aria-label":w,context:t,isDisabled:n&&p(n,o),isMulti:f,isSearchable:m,tabSelectsValue:A,isInitialFocus:x})}return e}),[w,n,r,f,p,m,v,S,o,A,x]),I=io(g.Fragment,null,io("span",{id:"aria-selection"},C),io("span",{id:"aria-focused"},T),io("span",{id:"aria-results"},k),io("span",{id:"aria-guidance"},O));return io(g.Fragment,null,io(tg,{id:l},x&&I),io(tg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!x&&I))},ig=[{base:"A",letters:"AⒶＡÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷＢḂḄḆɃƂƁ"},{base:"C",letters:"CⒸＣĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹＤḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"ǱǄ"},{base:"Dz",letters:"ǲǅ"},{base:"E",letters:"EⒺＥÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻＦḞƑꝻ"},{base:"G",letters:"GⒼＧǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽＨĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾＩÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿＪĴɈ"},{base:"K",letters:"KⓀＫḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁＬĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"Ǉ"},{base:"Lj",letters:"ǈ"},{base:"M",letters:"MⓂＭḾṀṂⱮƜ"},{base:"N",letters:"NⓃＮǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"Ǌ"},{base:"Nj",letters:"ǋ"},{base:"O",letters:"OⓄＯÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅＰṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆＱꝖꝘɊ"},{base:"R",letters:"RⓇＲŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈＳẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉＴṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊＵÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋＶṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌＷẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍＸẊẌ"},{base:"Y",letters:"YⓎＹỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏＺŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐａẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑｂḃḅḇƀƃɓ"},{base:"c",letters:"cⓒｃćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓｄḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"ǳǆ"},{base:"e",letters:"eⓔｅèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕｆḟƒꝼ"},{base:"g",letters:"gⓖｇǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗｈĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘｉìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙｊĵǰɉ"},{base:"k",letters:"kⓚｋḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛｌŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"ǉ"},{base:"m",letters:"mⓜｍḿṁṃɱɯ"},{base:"n",letters:"nⓝｎǹńñṅňṇņṋṉƞɲŉꞑꞥ"},{base:"nj",letters:"ǌ"},{base:"o",letters:"oⓞｏòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟｐṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠｑɋꝗꝙ"},{base:"r",letters:"rⓡｒŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢｓßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣｔṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤｕùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥｖṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦｗẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧｘẋẍ"},{base:"y",letters:"yⓨｙỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩｚźẑżžẓẕƶȥɀⱬꝣ"}],ag=new RegExp("["+ig.map((function(e){return e.letters})).join("")+"]","g"),og={},sg=0;sg<ig.length;sg++)for(var lg=ig[sg],cg=0;cg<lg.letters.length;cg++)og[lg.letters[cg]]=lg.base;var ug=function(e){return e.replace(ag,(function(e){return og[e]}))},dg=function(e,t){void 0===t&&(t=Zm);var n=null;function r(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return r.clear=function(){n=null},r}(ug),hg=function(e){return e.replace(/^\s+|\s+$/g,"")},fg=function(e){return"".concat(e.label," ").concat(e.value)},pg=["innerRef"];function mg(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=Object.entries(e).filter((function(e){var t=po(e,1)[0];return!n.includes(t)}));return i.reduce((function(e,t){var n=po(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})}(mo(e,pg),"onExited","in","enter","exit","appear");return io("input",xi({ref:t},n,{css:ao({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var gg=["boxSizing","height","overflow","paddingRight","position"],vg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function bg(e){e.preventDefault()}function yg(e){e.stopPropagation()}function Ag(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function _g(){return"ontouchstart"in window||navigator.maxTouchPoints}var wg=!("undefined"==typeof window||!window.document||!window.document.createElement),Eg=0,Sg={capture:!1,passive:!1};var Cg=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Tg={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function kg(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,o=Object(g.useRef)(!1),s=Object(g.useRef)(!1),l=Object(g.useRef)(0),c=Object(g.useRef)(null),u=Object(g.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,h=l.clientHeight,f=c.current,p=t>0,m=d-h-u,g=!1;m>t&&o.current&&(r&&r(e),o.current=!1),p&&s.current&&(a&&a(e),s.current=!1),p&&t>m?(n&&!o.current&&n(e),f.scrollTop=d,g=!0,o.current=!0):!p&&-t>u&&(i&&!s.current&&i(e),f.scrollTop=0,g=!0,s.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,i,a]),d=Object(g.useCallback)((function(e){u(e,e.deltaY)}),[u]),h=Object(g.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=Object(g.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),p=Object(g.useCallback)((function(e){if(e){var t=!!us&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",h,t),e.addEventListener("touchmove",f,t)}}),[f,h,d]),m=Object(g.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",h,!1),e.removeEventListener("touchmove",f,!1))}),[f,h,d]);return Object(g.useEffect)((function(){if(t){var e=c.current;return p(e),function(){m(e)}}}),[t,p,m]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=Object(g.useRef)({}),a=Object(g.useRef)(null),o=Object(g.useCallback)((function(e){if(wg){var t=document.body,n=t&&t.style;if(r&&gg.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Eg<1){var a=parseInt(i.current.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,s=window.innerWidth-o+a||0;Object.keys(vg).forEach((function(e){var t=vg[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&_g()&&(t.addEventListener("touchmove",bg,Sg),e&&(e.addEventListener("touchstart",Ag,Sg),e.addEventListener("touchmove",yg,Sg))),Eg+=1}}),[r]),s=Object(g.useCallback)((function(e){if(wg){var t=document.body,n=t&&t.style;Eg=Math.max(Eg-1,0),r&&Eg<1&&gg.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&_g()&&(t.removeEventListener("touchmove",bg,Sg),e&&(e.removeEventListener("touchstart",Ag,Sg),e.removeEventListener("touchmove",yg,Sg)))}}),[r]);return Object(g.useEffect)((function(){if(t){var e=a.current;return o(e),function(){s(e)}}}),[t,o,s]),function(e){a.current=e}}({isEnabled:n});return io(g.Fragment,null,n&&io("div",{onClick:Cg,css:Tg}),t((function(e){i(e),a(e)})))}var xg={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Og=function(e){var t=e.name,n=e.onFocus;return io("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:xg,value:"",onChange:function(){}})};function Ig(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Mg(){return Ig(/^Mac/i)}function Pg(){return Ig(/^iPhone/i)||Ig(/^iPad/i)||Mg()&&navigator.maxTouchPoints>1}var Dg={clearIndicator:Ps,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.theme,a=i.colors,o=i.borderRadius;return ki({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:r?a.primary:a.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:r?a.primary:a.neutral30}})},dropdownIndicator:Ms,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,i=n.spacing;return ki({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*i.baseUnit,paddingRight:3*i.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing.baseUnit,a=r.colors;return ki({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:2*i,marginTop:2*i})},input:function(e,t){var n=e.isDisabled,r=e.value,i=e.theme,a=i.spacing,o=i.colors;return ki(ki({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Us),t?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:o.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,i=e.theme,a=i.colors,o=i.spacing.baseUnit;return ki({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*o})},loadingMessage:Es,menu:function(e,t){var n,r=e.placement,i=e.theme,a=i.borderRadius,o=i.spacing,s=i.colors;return ki((Ci(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Ci(n,"position","absolute"),Ci(n,"width","100%"),Ci(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return ki({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,a=n.colors;return ki({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:a.neutral10,borderRadius:i/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,i=n.colors,a=e.cropWithEllipsis;return ki({overflow:"hidden",textOverflow:a||void 0===a?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,a=n.colors,o=e.isFocused;return ki({alignItems:"center",display:"flex"},t?{}:{borderRadius:i/2,backgroundColor:o?a.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},noOptionsMessage:ws,option:function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.isSelected,a=e.theme,o=a.spacing,s=a.colors;return ki({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:i?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:i?s.neutral0:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),":active":{backgroundColor:n?void 0:i?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,i=n.colors;return ki({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:i.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing,a=r.colors;return ki({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?a.neutral40:a.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,i=e.hasValue,a=e.selectProps.controlShouldRenderValue;return ki({alignItems:"center",display:r&&i&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var Ng={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Lg={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:os(),captureMenuScroll:!os(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=ki({ignoreCase:!0,ignoreAccents:!0,stringify:fg,trim:!0,matchFrom:"any"},e),i=r.ignoreCase,a=r.ignoreAccents,o=r.stringify,s=r.trim,l=r.matchFrom,c=s?hg(n):n,u=s?hg(o(t)):o(t);return i&&(c=c.toLowerCase(),u=u.toLowerCase()),a&&(c=dg(c),u=ug(u)),"start"===l?u.substr(0,c.length)===c:u.indexOf(c)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Rg(e,t,n,r){return{type:"option",data:t,isDisabled:Wg(e,t,n),isSelected:Gg(e,t,n),label:zg(e,t),value:Vg(e,t),index:r}}function Bg(e,t){return e.options.map((function(n,r){if("options"in n){var i=n.options.map((function(n,r){return Rg(e,n,t,r)})).filter((function(t){return Ug(e,t)}));return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var a=Rg(e,n,t,r);return Ug(e,a)?a:void 0})).filter(ds)}function jg(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,$m(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Fg(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,$m(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function Ug(e,t){var n=e.inputValue,r=void 0===n?"":n,i=t.data,a=t.isSelected,o=t.label,s=t.value;return(!Yg(e)||!a)&&qg(e,{label:o,value:s,data:i},r)}var Hg=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},zg=function(e,t){return e.getOptionLabel(t)},Vg=function(e,t){return e.getOptionValue(t)};function Wg(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Gg(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Vg(e,t);return n.some((function(t){return Vg(e,t)===r}))}function qg(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Yg=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Kg=1,Xg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ym(e,t)}(n,e);var t=function(e){var t=Xm();return function(){var n,r=Km(e);if(t){var i=Km(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qm(this,n)}}(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=Mg()||Pg(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,a=n.name;t.name=a,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e,t,n){var i=r.props,a=i.closeMenuOnSelect,o=i.isMulti,s=i.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),a&&(r.setState({inputIsHiddenAfterUpdate:!o}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,a=t.name,o=r.state.selectValue,s=i&&r.isOptionSelected(e,o),l=r.isOptionDisabled(e,o);if(s){var c=r.getOptionValue(e);r.setValue(o.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:a});i?r.setValue([].concat($m(o),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),a=n.filter((function(e){return r.getOptionValue(e)!==i})),o=hs(t,a,a[0]||null);r.onChange(o,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(hs(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),a=hs(e,i,i[0]||null);r.onChange(a,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Hg(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return Fg(Bg(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Qo.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return zg(r.props,e)},r.getOptionValue=function(e){return Vg(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,i=Dg[e](t,n);i.boxSizing="border-box";var a=r.props.styles[e];return a?a(i,t):i},r.getClassNames=function(e,t){var n,i;return null===(n=(i=r.props.classNames)[e])||void 0===n?void 0:n.call(i,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,ki(ki({},Vs),e.components);var e},r.buildCategorizedOptions=function(){return Bg(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return jg(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:ki({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,i=t.menuIsOpen;r.focusInput(),i?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&es(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-r.initialTouchX),a=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=i>5||a>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return Yg(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,a=t.escapeClearsValue,o=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,h=t.openMenuOnFocus,f=r.state,p=f.focusedOption,m=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||o)return;r.focusValue("previous");break;case"ArrowRight":if(!n||o)return;r.focusValue("next");break;case"Delete":case"Backspace":if(o)return;if(m)r.removeValue(m);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!p||h&&r.isOptionSelected(p,g))return;r.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(c){if(!p)return;if(r.isComposing)return;r.selectOption(p);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:o}),r.onMenuClose()):s&&a&&r.clearValue();break;case" ":if(o)return;if(!c){r.openMenu("first");break}if(!p)return;r.selectOption(p);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++Kg),r.state.selectValue=$o(e.value),e.menuIsOpen&&r.state.selectValue.length){var i=r.getFocusableOptionsWithIds(),a=r.buildFocusableOptions(),o=a.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=i,r.state.focusedOption=a[o],r.state.focusedOptionId=Hg(i,a[o])}return r}return function(e,t,n){t&&qm(e.prototype,t),n&&qm(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&as(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,i=this.state.isFocused;(i&&!n&&e.isDisabled||i&&r&&!e.menuIsOpen)&&this.focusInput(),i&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):i||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(as(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,a=this.buildFocusableOptions(),o="first"===e?0:a.length-1;if(!this.props.isMulti){var s=a.indexOf(r[0]);s>-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[o],focusedOptionId:this.getFocusedOptionId(a[o])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var a=n.length-1,o=-1;if(n.length){switch(e){case"previous":o=0===i?0:-1===i?a:i-1;break;case"next":i>-1&&i<a&&(o=i+1)}this.setState({inputIsHidden:-1!==o,focusedValue:n[o]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,a=r.indexOf(n);n||(a=-1),"up"===e?i=a>0?a-1:r.length-1:"down"===e?i=(a+1)%r.length:"pageup"===e?(i=a-t)<0&&(i=0):"pagedown"===e?(i=a+t)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[i])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ng):ki(ki({},Ng),this.props.theme):Ng}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,i=this.getValue,a=this.selectOption,o=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:i,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:a,selectProps:s,setValue:o,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Wg(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Gg(this.props,e,t)}},{key:"filterOption",value:function(e,t){return qg(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,o=e.form,s=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,h=u.ariaSelection,f=this.commonProps,p=r||this.getElementId("input"),m=ki(ki(ki({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==h?void 0:h.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?g.createElement(c,xi({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:o,type:"text",value:i},m)):g.createElement(mg,xi({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ko,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:o,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,o=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,h=c.isMulti,f=c.inputValue,p=c.placeholder,m=this.state,v=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!u)return f?null:g.createElement(s,xi({},l,{key:"placeholder",isDisabled:d,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),p);if(h)return v.map((function(t,o){var s=t===b,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return g.createElement(n,xi({},l,{components:{Container:r,Label:i,Remove:a},isFocused:s,isDisabled:d,key:c,index:o,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var A=v[0];return(g.createElement(o,xi({},l,{data:A,isDisabled:d}),this.formatOptionLabel(A,"value")))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var o={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return(g.createElement(e,xi({},t,{innerProps:o,isFocused:a})))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!e||!i)return null;return g.createElement(e,xi({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return g.createElement(n,xi({},r,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(e,xi({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,o=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,h=this.props,f=h.captureMenuScroll,p=h.inputValue,m=h.isLoading,v=h.loadingMessage,b=h.minMenuHeight,y=h.maxMenuHeight,A=h.menuIsOpen,_=h.menuPlacement,w=h.menuPosition,E=h.menuPortalTarget,S=h.menuShouldBlockScroll,C=h.menuShouldScrollIntoView,T=h.noOptionsMessage,k=h.onMenuScrollToTop,x=h.onMenuScrollToBottom;if(!A)return null;var O,I=function(t,n){var r=t.type,i=t.data,a=t.isDisabled,o=t.isSelected,s=t.label,l=t.value,h=d===i,f=a?void 0:function(){return e.onOptionHover(i)},p=a?void 0:function(){return e.selectOption(i)},m="".concat(e.getElementId("option"),"-").concat(n),v={id:m,onClick:p,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:o};return g.createElement(c,xi({},u,{innerProps:v,data:i,isDisabled:a,isSelected:o,key:m,label:s,type:r,value:l,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())O=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,o=t.index,s="".concat(e.getElementId("group"),"-").concat(o),l="".concat(s,"-heading");return g.createElement(n,xi({},u,{key:s,data:i,options:a,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e,"".concat(o,"-").concat(e.index))})))}if("option"===t.type)return I(t,"".concat(t.index))}));else if(m){var M=v({inputValue:p});if(null===M)return null;O=g.createElement(s,u,M)}else{var P=T({inputValue:p});if(null===P)return null;O=g.createElement(l,u,P)}var D={minMenuHeight:b,maxMenuHeight:y,menuPlacement:_,menuPosition:w,menuShouldScrollIntoView:C},N=g.createElement(ys,xi({},u,D),(function(t){var n=t.ref,r=t.placerProps,o=r.placement,s=r.maxHeight;return(g.createElement(i,xi({},u,D,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:o}),g.createElement(kg,{captureEnabled:f,onTopArrive:k,onBottomArrive:x,lockEnabled:S},(function(t){return g.createElement(a,xi({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:s,focusedOption:d}),O)}))))}));return E||"fixed"===w?g.createElement(o,xi({},u,{appendTo:E,controlElement:this.controlRef,menuPlacement:_,menuPosition:w}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,o=t.required,s=this.state.selectValue;if(o&&!this.hasValue()&&!r)return g.createElement(Og,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(i){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return(g.createElement("input",{name:a,type:"hidden",value:l}))}var c=s.length>0?s.map((function(t,n){return g.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):g.createElement("input",{name:a,type:"hidden",value:""});return(g.createElement("div",null,c))}var u=s[0]?this.getOptionValue(s[0]):"";return(g.createElement("input",{name:a,type:"hidden",value:u}))}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.isFocused,o=t.selectValue,s=this.getFocusableOptions();return g.createElement(rg,xi({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:a,selectValue:o,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,o=a.className,s=a.id,l=a.isDisabled,c=a.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return g.createElement(r,xi({},d,{className:o,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),g.createElement(t,xi({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),g.createElement(i,xi({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),g.createElement(n,xi({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,o=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,h=e.inputValue,f=e.isMulti,p=$o(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||h!==n.inputValue)){var g=d?function(e,t){return jg(Bg(e,t))}(e,p):[],v=d?Fg(Bg(e,p),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,p):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:p,focusedOption:y,focusedOptionId:Hg(v,y),focusableOptionsWithIds:v,focusedValue:b,clearFocusValueOnUpdate:!1}}var A=null!=i&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{},_=a,w=o&&s;return o&&!w&&(_={value:hs(f,p,p[0]||null),options:p,action:"initial-input-focus"},w=!s),"initial-input-focus"===(null==a?void 0:a.action)&&(_=null),ki(ki(ki({},m),A),{},{prevProps:e,ariaSelection:_,prevWasFocused:w})}}]),n}(g.Component);Xg.defaultProps=Lg;r(1294),r(1296),r(1300),r(1302),r(1303),r(1304),r(1306),r(1311),r(355),r(1315),r(776);var Qg=Object(g.forwardRef)((function(e,t){var n,r,i,a,o,s,l,c,u,d,h,f,p,m,v,b,y,A,_,w,E,S,C,T,k,x,O,I,M,P,D,N=(r=(n=e).defaultInputValue,i=void 0===r?"":r,a=n.defaultMenuIsOpen,o=void 0!==a&&a,s=n.defaultValue,l=void 0===s?null:s,c=n.inputValue,u=n.menuIsOpen,d=n.onChange,h=n.onInputChange,f=n.onMenuClose,p=n.onMenuOpen,m=n.value,v=mo(n,Gm),b=po(Object(g.useState)(void 0!==c?c:i),2),y=b[0],A=b[1],_=po(Object(g.useState)(void 0!==u?u:o),2),w=_[0],E=_[1],S=po(Object(g.useState)(void 0!==m?m:l),2),C=S[0],T=S[1],k=Object(g.useCallback)((function(e,t){"function"==typeof d&&d(e,t),T(e)}),[d]),x=Object(g.useCallback)((function(e,t){var n;"function"==typeof h&&(n=h(e,t)),A(void 0!==n?n:e)}),[h]),O=Object(g.useCallback)((function(){"function"==typeof p&&p(),E(!0)}),[p]),I=Object(g.useCallback)((function(){"function"==typeof f&&f(),E(!1)}),[f]),M=void 0!==c?c:y,P=void 0!==u?u:w,D=void 0!==m?m:C,ki(ki({},v),{},{inputValue:M,menuIsOpen:P,onChange:k,onInputChange:x,onMenuClose:I,onMenuOpen:O,value:D}));return(g.createElement(Xg,xi({ref:t},N)))}));function $g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$g(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zg=function(e){return Jg(Jg({},e),{},{colors:Jg(Jg({},e.colors),{},{primary:"#86c9cf"})})},ev=function(e){var t,n,r=e.children,i=Yt()(e,["children"]);return v.a.createElement(Vs.Control,i,null===(t=i.selectProps)||void 0===t?void 0:null===(n=t.selectProps)||void 0===n?void 0:n.label,r)},tv=Object(g.forwardRef)((function(e,t){var n=e.options,r=e.onChange,i=e.className,a=e.styles,o=e.components,s=void 0===o?{}:o,l=e.highlights,c=void 0===l?{}:l,u=e.highlightStyle,d=void 0===u?{}:u,h=Yt()(e,["options","onChange","className","styles","components","highlights","highlightStyle"]);return v.a.createElement(Qg,Gt()({ref:t,isSearchable:!1,className:P()("fv-select",i),menuPortalTarget:document.body,classNamePrefix:"fv-react-select",styles:{menuPortal:function(e){return Jg(Jg({},e),{},{minWidth:100,zIndex:9999},null==a?void 0:a.menuPortal)},control:function(e){return Jg(Jg({},e),null==a?void 0:a.control)},option:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.data,r=(null==n?void 0:n.highlight)||c[n.id];return Jg(Jg(Jg(Jg({},e),{},{cursor:(null==n?void 0:n.isDisabled)?"default":"pointer",color:(null==n?void 0:n.isDisabled)?"#DADADA":(null==n?void 0:n.highlight)?"#00B0F0":"black"},null==a?void 0:a.option),null==n?void 0:n.styles),r?d:{})},menu:function(e){return Jg(Jg({},e),null==a?void 0:a.menu)},menuList:function(e){return Jg(Jg({},e),{},{padding:0})}},components:Jg({Control:ev},s),theme:Zg,onChange:r,options:n},h))})),nv=r(1021),rv=r.n(nv);r(1318);var iv=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(e){var r;return s()(this,n),(r=t.call(this,e)).ps=v.a.createRef(),r}return c()(n,[{key:"componentDidMount",value:function(){this.ps.updateScroll()}},{key:"render",value:function(){var e=this,t=this.props,n=t.hasVerticalScroll,r=t.hasHorizontalScroll,i=Yt()(t,["hasVerticalScroll","hasHorizontalScroll"]);return v.a.createElement(rv.a,Gt()({ref:function(t){e.ps=t},options:{suppressScrollX:!r,suppressScrollY:!n,useBothWheelAxes:!0}},i))}}]),n}(v.a.PureComponent);iv.propTypes={hasVerticalScroll:ne.a.bool,hasHorizontalScroll:ne.a.bool,onScrollY:ne.a.func,onScrollX:ne.a.func,onScrollUp:ne.a.func,onScrollDown:ne.a.func,onScrollLeft:ne.a.func,onScrollRight:ne.a.func,onYReachStart:ne.a.func,onYReachEnd:ne.a.func,onXReachStart:ne.a.func,onXReachEnd:ne.a.func},iv.defaultProps={hasVerticalScroll:!0,hasHorizontalScroll:!0};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var av=function(e,t){return(av=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var ov=function(){return(ov=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function sv(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function lv(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function cv(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function uv(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function dv(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}r(1319),r(1340),r(1345),r(1354),r(1357);var hv=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e},fv=/\s/;var pv=function(e){for(var t=e.length;t--&&fv.test(e.charAt(t)););return t},mv=/^\s+/;var gv=function(e){return e?e.slice(0,pv(e)+1).replace(mv,""):e};var vv=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},bv=r(114),yv=bv.a.Symbol,Av=Object.prototype,_v=Av.hasOwnProperty,wv=Av.toString,Ev=yv?yv.toStringTag:void 0;var Sv=function(e){var t=_v.call(e,Ev),n=e[Ev];try{e[Ev]=void 0;var r=!0}catch(e){}var i=wv.call(e);return r&&(t?e[Ev]=n:delete e[Ev]),i},Cv=Object.prototype.toString;var Tv=function(e){return Cv.call(e)},kv=yv?yv.toStringTag:void 0;var xv=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":kv&&kv in Object(e)?Sv(e):Tv(e)};var Ov=function(e){return null!=e&&"object"==typeof e};var Iv=function(e){return"symbol"==typeof e||Ov(e)&&"[object Symbol]"==xv(e)},Mv=/^[-+]0x[0-9a-f]+$/i,Pv=/^0b[01]+$/i,Dv=/^0o[0-7]+$/i,Nv=parseInt;var Lv=function(e){if("number"==typeof e)return e;if(Iv(e))return NaN;if(vv(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=vv(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=gv(e);var n=Pv.test(e);return n||Dv.test(e)?Nv(e.slice(2),n?2:8):Mv.test(e)?NaN:+e};var Rv=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Lv(n))==n?n:0),void 0!==t&&(t=(t=Lv(t))==t?t:0),hv(Lv(e),t,n)};function Bv(e,t){return void 0===e&&(e=-1/0),void 0===t&&(t=1/0),function(n,r){var i="_"+r;Object.defineProperty(n,r,{get:function(){return this[i]},set:function(n){Object.defineProperty(this,i,{value:Rv(n,e,t),enumerable:!1,writable:!0,configurable:!0})},enumerable:!0,configurable:!0})}}function jv(e,t){var n="_"+t;Object.defineProperty(e,t,{get:function(){return this[n]},set:function(e){Object.defineProperty(this,n,{value:!!e,enumerable:!1,writable:!0,configurable:!0})},enumerable:!0,configurable:!0})}var Fv=function(){return bv.a.Date.now()},Uv=Math.max,Hv=Math.min;var zv=function(e,t,n){var r,i,a,o,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,a=i;return r=i=void 0,c=t,o=e.apply(a,n)}function p(e){return c=e,s=setTimeout(g,t),u?f(e):o}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function g(){var e=Fv();if(m(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?Hv(n,a-(e-c)):n}(e))}function v(e){return s=void 0,h&&r?f(e):(r=i=void 0,o)}function b(){var e=Fv(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return p(l);if(d)return clearTimeout(s),s=setTimeout(g,t),f(l)}return void 0===s&&(s=setTimeout(g,t)),o}return t=Lv(t)||0,vv(n)&&(u=!!n.leading,a=(d="maxWait"in n)?Uv(Lv(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},b.flush=function(){return void 0===s?o:v(Fv())},b};function Vv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,r){var i=r.value;return{get:function(){return this.hasOwnProperty(n)||Object.defineProperty(this,n,{value:zv.apply(void 0,dv([i],e))}),this[n]}}}}var Wv,Gv=function(){function e(e){var t=this;void 0===e&&(e={}),this.damping=.1,this.thumbMinSize=20,this.renderByPixels=!0,this.alwaysShowTracks=!1,this.continuousScrolling=!0,this.delegateTo=null,this.plugins={},Object.keys(e).forEach((function(n){t[n]=e[n]}))}return Object.defineProperty(e.prototype,"wheelEventTarget",{get:function(){return this.delegateTo},set:function(e){console.warn("[smooth-scrollbar]: `options.wheelEventTarget` is deprecated and will be removed in the future, use `options.delegateTo` instead."),this.delegateTo=e},enumerable:!0,configurable:!0}),sv([Bv(0,1)],e.prototype,"damping",void 0),sv([Bv(0,1/0)],e.prototype,"thumbMinSize",void 0),sv([jv],e.prototype,"renderByPixels",void 0),sv([jv],e.prototype,"alwaysShowTracks",void 0),sv([jv],e.prototype,"continuousScrolling",void 0),e}(),qv=new WeakMap;function Yv(){if(void 0!==Wv)return Wv;var e=!1;try{var t=function(){},n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",t,n),window.removeEventListener("testPassive",t,n)}catch(e){}return Wv=!!e&&{passive:!1}}function Kv(e){var t=qv.get(e)||[];return qv.set(e,t),function(e,n,r){function i(e){e.defaultPrevented||r(e)}n.split(/\s+/g).forEach((function(n){t.push({elem:e,eventName:n,handler:i}),e.addEventListener(n,i,Yv())}))}}function Xv(e){var t=function(e){return e.touches?e.touches[e.touches.length-1]:e}(e);return{x:t.clientX,y:t.clientY}}function Qv(e,t){return void 0===t&&(t=[]),t.some((function(t){return e===t}))}var $v=["webkit","moz","ms","o"],Jv=new RegExp("^-(?!(?:"+$v.join("|")+")-)");function Zv(e,t){t=function(e){var t={};return Object.keys(e).forEach((function(n){if(Jv.test(n)){var r=e[n];n=n.replace(/^-/,""),t[n]=r,$v.forEach((function(e){t["-"+e+"-"+n]=r}))}else t[n]=e[n]})),t}(t),Object.keys(t).forEach((function(n){var r=n.replace(/^-/,"").replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}));e.style[r]=t[n]}))}var eb,tb=function(){function e(e){this.updateTime=Date.now(),this.delta={x:0,y:0},this.velocity={x:0,y:0},this.lastPosition={x:0,y:0},this.lastPosition=Xv(e)}return e.prototype.update=function(e){var t=this.velocity,n=this.updateTime,r=this.lastPosition,i=Date.now(),a=Xv(e),o={x:-(a.x-r.x),y:-(a.y-r.y)},s=i-n||16,l=o.x/s*16,c=o.y/s*16;t.x=.9*l+.1*t.x,t.y=.9*c+.1*t.y,this.delta=o,this.updateTime=i,this.lastPosition=a},e}(),nb=function(){function e(){this._touchList={}}return Object.defineProperty(e.prototype,"_primitiveValue",{get:function(){return{x:0,y:0}},enumerable:!0,configurable:!0}),e.prototype.isActive=function(){return void 0!==this._activeTouchID},e.prototype.getDelta=function(){var e=this._getActiveTracker();return e?ov({},e.delta):this._primitiveValue},e.prototype.getVelocity=function(){var e=this._getActiveTracker();return e?ov({},e.velocity):this._primitiveValue},e.prototype.track=function(e){var t=this,n=e.targetTouches;return Array.from(n).forEach((function(e){t._add(e)})),this._touchList},e.prototype.update=function(e){var t=this,n=e.touches,r=e.changedTouches;return Array.from(n).forEach((function(e){t._renew(e)})),this._setActiveID(r),this._touchList},e.prototype.release=function(e){var t=this;delete this._activeTouchID,Array.from(e.changedTouches).forEach((function(e){t._delete(e)}))},e.prototype._add=function(e){if(!this._has(e)){var t=new tb(e);this._touchList[e.identifier]=t}},e.prototype._renew=function(e){this._has(e)&&this._touchList[e.identifier].update(e)},e.prototype._delete=function(e){delete this._touchList[e.identifier]},e.prototype._has=function(e){return this._touchList.hasOwnProperty(e.identifier)},e.prototype._setActiveID=function(e){this._activeTouchID=e[e.length-1].identifier},e.prototype._getActiveTracker=function(){return this._touchList[this._activeTouchID]},e}();!function(e){e.X="x",e.Y="y"}(eb||(eb={}));var rb=function(){function e(e,t){void 0===t&&(t=0),this._direction=e,this._minSize=t,this.element=document.createElement("div"),this.displaySize=0,this.realSize=0,this.offset=0,this.element.className="scrollbar-thumb scrollbar-thumb-"+e}return e.prototype.attachTo=function(e){e.appendChild(this.element)},e.prototype.update=function(e,t,n){this.realSize=Math.min(t/n,1)*t,this.displaySize=Math.max(this.realSize,this._minSize),this.offset=e/n*(t+(this.realSize-this.displaySize)),Zv(this.element,this._getStyle())},e.prototype._getStyle=function(){switch(this._direction){case eb.X:return{width:this.displaySize+"px","-transform":"translate3d("+this.offset+"px, 0, 0)"};case eb.Y:return{height:this.displaySize+"px","-transform":"translate3d(0, "+this.offset+"px, 0)"};default:return null}},e}(),ib=function(){function e(e,t){void 0===t&&(t=0),this.element=document.createElement("div"),this._isShown=!1,this.element.className="scrollbar-track scrollbar-track-"+e,this.thumb=new rb(e,t),this.thumb.attachTo(this.element)}return e.prototype.attachTo=function(e){e.appendChild(this.element)},e.prototype.show=function(){this._isShown||(this._isShown=!0,this.element.classList.add("show"))},e.prototype.hide=function(){this._isShown&&(this._isShown=!1,this.element.classList.remove("show"))},e.prototype.update=function(e,t,n){Zv(this.element,{display:n<=t?"none":"block"}),this.thumb.update(e,t,n)},e}(),ab=function(){function e(e){this._scrollbar=e;var t=e.options.thumbMinSize;this.xAxis=new ib(eb.X,t),this.yAxis=new ib(eb.Y,t),this.xAxis.attachTo(e.containerEl),this.yAxis.attachTo(e.containerEl),e.options.alwaysShowTracks&&(this.xAxis.show(),this.yAxis.show())}return e.prototype.update=function(){var e=this._scrollbar,t=e.size,n=e.offset;this.xAxis.update(n.x,t.container.width,t.content.width),this.yAxis.update(n.y,t.container.height,t.content.height)},e.prototype.autoHideOnIdle=function(){this._scrollbar.options.alwaysShowTracks||(this.xAxis.hide(),this.yAxis.hide())},sv([Vv(300)],e.prototype,"autoHideOnIdle",null),e}();var ob=new WeakMap;function sb(e){return Math.pow(e-1,3)+1}var lb,cb,ub,db=function(){function e(e,t){var n=this.constructor;this.scrollbar=e,this.name=n.pluginName,this.options=ov(ov({},n.defaultOptions),t)}return e.prototype.onInit=function(){},e.prototype.onDestroy=function(){},e.prototype.onUpdate=function(){},e.prototype.onRender=function(e){},e.prototype.transformDelta=function(e,t){return ov({},e)},e.pluginName="",e.defaultOptions={},e}(),hb={order:new Set,constructors:{}};function fb(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.forEach((function(e){var t=e.pluginName;if(!t)throw new TypeError("plugin name is required");hb.order.add(t),hb.constructors[t]=e}))}function pb(e){var t=Kv(e),n=e.containerEl;t(n,"keydown",(function(t){var r=document.activeElement;if((r===n||n.contains(r))&&!function(e){if("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!e.disabled;return!1}(r)){var i=function(e,t){var n=e.size,r=e.limit,i=e.offset;switch(t){case lb.TAB:return function(e){requestAnimationFrame((function(){e.scrollIntoView(document.activeElement,{offsetTop:e.size.container.height/2,onlyScrollIfNeeded:!0})}))}(e);case lb.SPACE:return[0,200];case lb.PAGE_UP:return[0,40-n.container.height];case lb.PAGE_DOWN:return[0,n.container.height-40];case lb.END:return[0,r.y-i.y];case lb.HOME:return[0,-i.y];case lb.LEFT:return[-40,0];case lb.UP:return[0,-40];case lb.RIGHT:return[40,0];case lb.DOWN:return[0,40];default:return null}}(e,t.keyCode||t.which);if(i){var a=i[0],o=i[1];e.addTransformableMomentum(a,o,t,(function(n){n?t.preventDefault():(e.containerEl.blur(),e.parent&&e.parent.containerEl.focus())}))}}}))}function mb(e){var t,n,r,i,a,o=Kv(e),s=e.containerEl,l=e.track,c=l.xAxis,u=l.yAxis;function d(t,n){var r=e.size;return t===cb.X?n/(r.container.width+(c.thumb.realSize-c.thumb.displaySize))*r.content.width:t===cb.Y?n/(r.container.height+(u.thumb.realSize-u.thumb.displaySize))*r.content.height:0}function h(e){return Qv(e,[c.element,c.thumb.element])?cb.X:Qv(e,[u.element,u.thumb.element])?cb.Y:void 0}o(s,"click",(function(t){if(!n&&Qv(t.target,[c.element,u.element])){var r=t.target,i=h(r),a=r.getBoundingClientRect(),o=Xv(t),s=e.offset,l=e.limit;if(i===cb.X){var f=o.x-a.left-c.thumb.displaySize/2;e.setMomentum(Rv(d(i,f)-s.x,-s.x,l.x-s.x),0)}if(i===cb.Y){f=o.y-a.top-u.thumb.displaySize/2;e.setMomentum(0,Rv(d(i,f)-s.y,-s.y,l.y-s.y))}}})),o(s,"mousedown",(function(n){if(Qv(n.target,[c.thumb.element,u.thumb.element])){t=!0;var o=n.target,l=Xv(n),d=o.getBoundingClientRect();i=h(o),r={x:l.x-d.left,y:l.y-d.top},a=s.getBoundingClientRect(),Zv(e.containerEl,{"-user-select":"none"})}})),o(window,"mousemove",(function(o){if(t){n=!0;var s=e.offset,l=Xv(o);if(i===cb.X){var c=l.x-r.x-a.left;e.setPosition(d(i,c),s.y)}if(i===cb.Y){c=l.y-r.y-a.top;e.setPosition(s.x,d(i,c))}}})),o(window,"mouseup blur",(function(){t=n=!1,Zv(e.containerEl,{"-user-select":""})}))}function gb(e){Kv(e)(window,"resize",zv(e.update.bind(e),300))}function vb(e){var t,n=Kv(e),r=e.containerEl,i=e.contentEl,a=e.offset,o=e.limit,s=!1;n(window,"mousemove",(function(n){s&&(cancelAnimationFrame(t),function n(r){var i=r.x,s=r.y;(i||s)&&(e.setMomentum(Rv(a.x+i,0,o.x)-a.x,Rv(a.y+s,0,o.y)-a.y),t=requestAnimationFrame((function(){n({x:i,y:s})})))}(function(e,t){var n=e.bounding,r=n.top,i=n.right,a=n.bottom,o=n.left,s=Xv(t),l=s.x,c=s.y,u={x:0,y:0};if(0===l&&0===c)return u;l>i-20?u.x=l-i+20:l<o+20&&(u.x=l-o-20);c>a-20?u.y=c-a+20:c<r+20&&(u.y=c-r-20);return u.x*=2,u.y*=2,u}(e,n)))})),n(i,"selectstart",(function(e){e.stopPropagation(),cancelAnimationFrame(t),s=!0})),n(window,"mouseup blur",(function(){cancelAnimationFrame(t),s=!1})),n(r,"scroll",(function(e){e.preventDefault(),r.scrollTop=r.scrollLeft=0}))}function bb(e){var t,n=/Android/.test(navigator.userAgent)?3:2,r=e.options.delegateTo||e.containerEl,i=new nb,a=Kv(e),o=0;a(r,"touchstart",(function(n){i.track(n),e.setMomentum(0,0),0===o&&(t=e.options.damping,e.options.damping=Math.max(t,.5)),o++})),a(r,"touchmove",(function(t){if(!ub||ub===e){i.update(t);var n=i.getDelta(),r=n.x,a=n.y;e.addTransformableMomentum(r,a,t,(function(n){n&&(t.preventDefault(),ub=e)}))}})),a(r,"touchcancel touchend",(function(r){var a=i.getVelocity(),s={x:0,y:0};Object.keys(a).forEach((function(e){var r=a[e]/t;s[e]=Math.abs(r)<50?0:r*n})),e.addTransformableMomentum(s.x,s.y,r),0===--o&&(e.options.damping=t),i.release(r),ub=null}))}function yb(e){Kv(e)(e.options.delegateTo||e.containerEl,"onwheel"in window||document.implementation.hasFeature("Events.wheel","3.0")?"wheel":"mousewheel",(function(t){var n=function(e){if("deltaX"in e){var t=function(e){return wb[e]||wb[0]}(e.deltaMode);return{x:e.deltaX/Ab*t,y:e.deltaY/Ab*t}}if("wheelDeltaX"in e)return{x:e.wheelDeltaX/_b,y:e.wheelDeltaY/_b};return{x:0,y:e.wheelDelta/_b}}(t),r=n.x,i=n.y;e.addTransformableMomentum(r,i,t,(function(e){e&&t.preventDefault()}))}))}!function(e){e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.PAGE_UP=33]="PAGE_UP",e[e.PAGE_DOWN=34]="PAGE_DOWN",e[e.END=35]="END",e[e.HOME=36]="HOME",e[e.LEFT=37]="LEFT",e[e.UP=38]="UP",e[e.RIGHT=39]="RIGHT",e[e.DOWN=40]="DOWN"}(lb||(lb={})),function(e){e[e.X=0]="X",e[e.Y=1]="Y"}(cb||(cb={}));var Ab=1,_b=-3,wb=[1,28,500];var Eb=new Map,Sb=function(){function e(e,t){var n=this;this.offset={x:0,y:0},this.limit={x:1/0,y:1/0},this.bounding={top:0,right:0,bottom:0,left:0},this._plugins=[],this._momentum={x:0,y:0},this._listeners=new Set,this.containerEl=e;var r=this.contentEl=document.createElement("div");this.options=new Gv(t),e.setAttribute("data-scrollbar","true"),e.setAttribute("tabindex","-1"),Zv(e,{overflow:"hidden",outline:"none"}),window.navigator.msPointerEnabled&&(e.style.msTouchAction="none"),r.className="scroll-content",Array.from(e.childNodes).forEach((function(e){r.appendChild(e)})),e.appendChild(r),this.track=new ab(this),this.size=this.getSize(),this._plugins=function(e,t){return Array.from(hb.order).filter((function(e){return!1!==t[e]})).map((function(n){var r=new(0,hb.constructors[n])(e,t[n]);return t[n]=r.options,r}))}(this,this.options.plugins);var i=e.scrollLeft,a=e.scrollTop;e.scrollLeft=e.scrollTop=0,this.setPosition(i,a,{withoutCallbacks:!0});var o=window,s=o.MutationObserver||o.WebKitMutationObserver||o.MozMutationObserver;"function"==typeof s&&(this._observer=new s((function(){n.update()})),this._observer.observe(r,{subtree:!0,childList:!0})),Eb.set(e,this),requestAnimationFrame((function(){n._init()}))}return Object.defineProperty(e.prototype,"parent",{get:function(){for(var e=this.containerEl.parentElement;e;){var t=Eb.get(e);if(t)return t;e=e.parentElement}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.offset.y},set:function(e){this.setPosition(this.scrollLeft,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollLeft",{get:function(){return this.offset.x},set:function(e){this.setPosition(e,this.scrollTop)},enumerable:!0,configurable:!0}),e.prototype.getSize=function(){return t=(e=this).containerEl,n=e.contentEl,{container:{width:t.clientWidth,height:t.clientHeight},content:{width:n.offsetWidth-n.clientWidth+n.scrollWidth,height:n.offsetHeight-n.clientHeight+n.scrollHeight}};var e,t,n},e.prototype.update=function(){var e,t,n,r,i;t=(e=this).getSize(),n={x:Math.max(t.content.width-t.container.width,0),y:Math.max(t.content.height-t.container.height,0)},r=e.containerEl.getBoundingClientRect(),i={top:Math.max(r.top,0),right:Math.min(r.right,window.innerWidth),bottom:Math.min(r.bottom,window.innerHeight),left:Math.max(r.left,0)},e.size=t,e.limit=n,e.bounding=i,e.track.update(),e.setPosition(),this._plugins.forEach((function(e){e.onUpdate()}))},e.prototype.isVisible=function(e){return function(e,t){var n=e.bounding,r=t.getBoundingClientRect(),i=Math.max(n.top,r.top),a=Math.max(n.left,r.left),o=Math.min(n.right,r.right);return i<Math.min(n.bottom,r.bottom)&&a<o}(this,e)},e.prototype.setPosition=function(e,t,n){var r=this;void 0===e&&(e=this.offset.x),void 0===t&&(t=this.offset.y),void 0===n&&(n={});var i=function(e,t,n){var r=e.options,i=e.offset,a=e.limit,o=e.track,s=e.contentEl;return r.renderByPixels&&(t=Math.round(t),n=Math.round(n)),t=Rv(t,0,a.x),n=Rv(n,0,a.y),t!==i.x&&o.xAxis.show(),n!==i.y&&o.yAxis.show(),r.alwaysShowTracks||o.autoHideOnIdle(),t===i.x&&n===i.y?null:(i.x=t,i.y=n,Zv(s,{"-transform":"translate3d("+-t+"px, "+-n+"px, 0)"}),o.update(),{offset:ov({},i),limit:ov({},a)})}(this,e,t);i&&!n.withoutCallbacks&&this._listeners.forEach((function(e){e.call(r,i)}))},e.prototype.scrollTo=function(e,t,n,r){void 0===e&&(e=this.offset.x),void 0===t&&(t=this.offset.y),void 0===n&&(n=0),void 0===r&&(r={}),function(e,t,n,r,i){void 0===r&&(r=0);var a=void 0===i?{}:i,o=a.easing,s=void 0===o?sb:o,l=a.callback,c=e.options,u=e.offset,d=e.limit;c.renderByPixels&&(t=Math.round(t),n=Math.round(n));var h=u.x,f=u.y,p=Rv(t,0,d.x)-h,m=Rv(n,0,d.y)-f,g=Date.now();cancelAnimationFrame(ob.get(e)),function t(){var n=Date.now()-g,i=r?s(Math.min(n/r,1)):1;if(e.setPosition(h+p*i,f+m*i),n>=r)"function"==typeof l&&l.call(e);else{var a=requestAnimationFrame(t);ob.set(e,a)}}()}(this,e,t,n,r)},e.prototype.scrollIntoView=function(e,t){void 0===t&&(t={}),function(e,t,n){var r=void 0===n?{}:n,i=r.alignToTop,a=void 0===i||i,o=r.onlyScrollIfNeeded,s=void 0!==o&&o,l=r.offsetTop,c=void 0===l?0:l,u=r.offsetLeft,d=void 0===u?0:u,h=r.offsetBottom,f=void 0===h?0:h,p=e.containerEl,m=e.bounding,g=e.offset,v=e.limit;if(t&&p.contains(t)){var b=t.getBoundingClientRect();if(!s||!e.isVisible(t)){var y=a?b.top-m.top-c:b.bottom-m.bottom+f;e.setMomentum(b.left-m.left-d,Rv(y,-g.y,v.y-g.y))}}}(this,e,t)},e.prototype.addListener=function(e){if("function"!=typeof e)throw new TypeError("[smooth-scrollbar] scrolling listener should be a function");this._listeners.add(e)},e.prototype.removeListener=function(e){this._listeners.delete(e)},e.prototype.addTransformableMomentum=function(e,t,n,r){this._updateDebounced();var i=this._plugins.reduce((function(e,t){return t.transformDelta(e,n)||e}),{x:e,y:t}),a=!this._shouldPropagateMomentum(i.x,i.y);a&&this.addMomentum(i.x,i.y),r&&r.call(this,a)},e.prototype.addMomentum=function(e,t){this.setMomentum(this._momentum.x+e,this._momentum.y+t)},e.prototype.setMomentum=function(e,t){0===this.limit.x&&(e=0),0===this.limit.y&&(t=0),this.options.renderByPixels&&(e=Math.round(e),t=Math.round(t)),this._momentum.x=e,this._momentum.y=t},e.prototype.updatePluginOptions=function(e,t){this._plugins.forEach((function(n){n.name===e&&Object.assign(n.options,t)}))},e.prototype.destroy=function(){var e,t,n=this.containerEl,r=this.contentEl;e=this,(t=qv.get(e))&&(t.forEach((function(e){var t=e.elem,n=e.eventName,r=e.handler;t.removeEventListener(n,r,Yv())})),qv.delete(e)),this._listeners.clear(),this.setMomentum(0,0),cancelAnimationFrame(this._renderID),this._observer&&this._observer.disconnect(),Eb.delete(this.containerEl);for(var i=Array.from(r.childNodes);n.firstChild;)n.removeChild(n.firstChild);i.forEach((function(e){n.appendChild(e)})),Zv(n,{overflow:""}),n.scrollTop=this.scrollTop,n.scrollLeft=this.scrollLeft,this._plugins.forEach((function(e){e.onDestroy()})),this._plugins.length=0},e.prototype._init=function(){var e=this;this.update(),Object.keys(i).forEach((function(t){i[t](e)})),this._plugins.forEach((function(e){e.onInit()})),this._render()},e.prototype._updateDebounced=function(){this.update()},e.prototype._shouldPropagateMomentum=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var n=this.options,r=this.offset,i=this.limit;if(!n.continuousScrolling)return!1;0===i.x&&0===i.y&&this._updateDebounced();var a=Rv(e+r.x,0,i.x),o=Rv(t+r.y,0,i.y),s=!0;return s=(s=(s=s&&a===r.x)&&o===r.y)&&(r.x===i.x||0===r.x||r.y===i.y||0===r.y)},e.prototype._render=function(){var e=this._momentum;if(e.x||e.y){var t=this._nextTick("x"),n=this._nextTick("y");e.x=t.momentum,e.y=n.momentum,this.setPosition(t.position,n.position)}var r=ov({},this._momentum);this._plugins.forEach((function(e){e.onRender(r)})),this._renderID=requestAnimationFrame(this._render.bind(this))},e.prototype._nextTick=function(e){var t=this.options,n=this.offset,r=this._momentum,i=n[e],a=r[e];if(Math.abs(a)<=.1)return{momentum:0,position:i+a};var o=a*(1-t.damping);return t.renderByPixels&&(o|=0),{momentum:o,position:i+a-o}},sv([Vv(100,{leading:!0})],e.prototype,"_updateDebounced",null),e}(),Cb=!1;function Tb(){if(!Cb&&"undefined"!=typeof window){var e=document.createElement("style");e.id="smooth-scrollbar-style",e.textContent="\n[data-scrollbar] {\n  display: block;\n  position: relative;\n}\n\n.scroll-content {\n  -webkit-transform: translate3d(0, 0, 0);\n          transform: translate3d(0, 0, 0);\n}\n\n.scrollbar-track {\n  position: absolute;\n  opacity: 0;\n  z-index: 1;\n  background: rgba(222, 222, 222, .75);\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n          user-select: none;\n  -webkit-transition: opacity 0.5s 0.5s ease-out;\n          transition: opacity 0.5s 0.5s ease-out;\n}\n.scrollbar-track.show,\n.scrollbar-track:hover {\n  opacity: 1;\n  -webkit-transition-delay: 0s;\n          transition-delay: 0s;\n}\n\n.scrollbar-track-x {\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  height: 8px;\n}\n.scrollbar-track-y {\n  top: 0;\n  right: 0;\n  width: 8px;\n  height: 100%;\n}\n.scrollbar-thumb {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 8px;\n  height: 8px;\n  background: rgba(0, 0, 0, .5);\n  border-radius: 4px;\n}\n",document.head&&document.head.appendChild(e),Cb=!0}}
/*!
 * cast `I.Scrollbar` to `Scrollbar` to avoid error
 *
 * `I.Scrollbar` is not assignable to `Scrollbar`:
 *     "privateProp" is missing in `I.Scrollbar`
 *
 * @see https://github.com/Microsoft/TypeScript/issues/2672
 */
var kb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}av(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.init=function(e,t){if(!e||1!==e.nodeType)throw new TypeError("expect element to be DOM Element, but got "+e);return Tb(),Eb.has(e)?Eb.get(e):new Sb(e,t)},t.initAll=function(e){return Array.from(document.querySelectorAll("[data-scrollbar]"),(function(n){return t.init(n,e)}))},t.has=function(e){return Eb.has(e)},t.get=function(e){return Eb.get(e)},t.getAll=function(){return Array.from(Eb.values())},t.destroy=function(e){var t=Eb.get(e);t&&t.destroy()},t.destroyAll=function(){Eb.forEach((function(e){e.destroy()}))},t.use=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fb.apply(void 0,e)},t.attachStyle=function(){return Tb()},t.detachStyle=function(){return function(){if(Cb&&"undefined"!=typeof window){var e=document.getElementById("smooth-scrollbar-style");e&&e.parentNode&&(e.parentNode.removeChild(e),Cb=!1)}}()},t.version="8.5.2",t.ScrollbarPlugin=db,t}(Sb),xb=r(339),Ob=r.n(xb);function Ib(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var Mb=function(e){d()(n,e);var t=Ib(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"transformDelta",value:function(e,t){if(this.shouldBlockEvent(t))return{x:0,y:0};if(this.options.horizontalScroll){var n=e.x,r=e.y;return{y:0,x:Math.abs(n)>Math.abs(r)?n:r}}return e}},{key:"shouldBlockEvent",value:function(e){return this.options.blacklist.some((function(t){return e.type.match(t)}))}}]),n}(db);G()(Mb,"pluginName","filterEvent"),G()(Mb,"defaultOptions",{blacklist:["keydown"],horizontalScroll:!1});var Pb=function(e){d()(n,e);var t=Ib(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"transformDelta",value:function(e){var t=this.options.speed;return{x:e.x*t,y:e.y*t}}}]),n}(db);G()(Pb,"pluginName","scaleSpeed"),G()(Pb,"defaultOptions",{speed:1});var Db=function(e){d()(n,e);var t=Ib(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"transformDelta",value:function(e){var t=this.options,n=t.min,r=t.max,i=this.scrollbar.offset.y+(e.y>0?1:-1);return Object(Y.isNumber)(n)&&i<=n?{x:0,y:0}:Object(Y.isNumber)(r)&&i>=r?{x:0,y:0}:e}}]),n}(db);G()(Db,"pluginName","limitScroll"),G()(Db,"defaultOptions",{min:void 0,max:void 0});var Nb=function(e){d()(n,e);var t=Ib(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"transformDelta",value:function(e){var t=this.options,n=t.x,r=t.y;return{x:(n?-1:1)*e.x,y:(r?-1:1)*e.y}}}]),n}(db);G()(Nb,"pluginName","reverse"),G()(Nb,"defaultOptions",{x:!1,y:!1}),kb.use(Mb),kb.use(Pb),kb.use(Db),kb.use(Nb);var Lb=function(e){d()(n,e);var t=Ib(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isXEnd:!1,isXStart:!0,isYEnd:!0,isYStart:!0}),G()(V()(e),"callbacks",[]),G()(V()(e),"reInitScrollbar",Object(Y.debounce)((function(){var t=e.scrollbar.scrollTop;e.scrollbar.destroy(),e.scrollbar=kb.init(e.$container,e.props),e.scrollbar.scrollTop=t,e.callbacks.forEach((function(t){requestAnimationFrame((function(){return t(e.scrollbar)}))})),e.scrollbar.addListener(e.handleScroll.bind(V()(e))),e.scrollbar.update(),e.props.updateRef(V()(e))}),200)),G()(V()(e),"handleStopScrolling",Object(Y.debounce)((function(t){(0,e.props.onStopScrolling)(t)}),200)),G()(V()(e),"checkScrollPositionX",(function(t){var n=Object(Y.get)(t,"offset.x",0),r=Object(Y.get)(t,"limit.x",0),i=e.state,a=i.isXEnd,o=i.isXStart;0!==n||o?n!==r||a?(a||o)&&e.setState({isXEnd:!1,isXStart:!1}):e.setState({isXEnd:!0,isXStart:!1}):e.setState({isXEnd:!1,isXStart:!0})})),G()(V()(e),"checkScrollPositionY",(function(t){var n=Object(Y.get)(t,"offset.y",0),r=Object(Y.get)(t,"limit.y",0),i=e.state,a=i.isYEnd,o=i.isYStart;0===n&&0===r?e.setState({isYEnd:!0,isYStart:!0}):0===n?e.setState({isYEnd:!1,isYStart:!0}):n===r?e.setState({isYEnd:!0,isYStart:!1}):(a||o)&&e.setState({isYEnd:!1,isYStart:!1})})),G()(V()(e),"scrollTo",(function(t){var n=Object(Y.get)(e.scrollbar,"limit.x",0);e.scrollbar.scrollTo(t?n:0,0,500)})),G()(V()(e),"scrollToEndY",(function(){var t=Object(Y.get)(e.scrollbar,"limit.y",0);e.scrollbar.scrollTo(0,t,0)})),e}return c()(n,[{key:"getChildContext",value:function(){var e=this;return{getScrollbar:function(t){"function"==typeof t&&(e.scrollbar?setTimeout((function(){return t(e.scrollbar)})):e.callbacks.push(t))}}}},{key:"componentDidMount",value:function(){var e=this;this.scrollbar=kb.init(this.$container,this.props),this.callbacks.forEach((function(t){requestAnimationFrame((function(){return t(e.scrollbar)}))})),this.scrollbar.addListener(this.handleScroll.bind(this)),this.scrollbar.scrollTop=this.props.initialScrollTop||0}},{key:"componentWillUnmount",value:function(){this.scrollbar&&this.scrollbar.destroy()}},{key:"componentWillReceiveProps",value:function(e){var t=this;Object.keys(e).forEach((function(n){!n in t.scrollbar.options||("plugins"===n?Object.keys(e.plugins).forEach((function(n){t.scrollbar.updatePluginOptions(n,e.plugins[n])})):t.scrollbar.options[n]=e[n])}))}},{key:"componentDidUpdate",value:function(e){var t=e.delegateTo,n=this.props.delegateTo;Object(Y.isEqual)(t,n)||this.reInitScrollbar(),this.scrollbar&&this.scrollbar.update()}},{key:"handleScroll",value:function(e){this.props.onStopScrolling&&this.handleStopScrolling(e),this.props.isDisplayXNav&&this.checkScrollPositionX(e),this.props.isDisplayYNav,this.props.onScroll&&this.props.onScroll(e,this.scrollbar),this.props.onYReachEnd&&e.offset.y===e.limit.y&&this.scrollbar.scrollTop===e.offset.y&&this.props.onYReachEnd(e,this.scrollbar),this.props.onYReachAlmostEnd&&e.limit.y>150&&e.offset.y>=e.limit.y-150&&this.scrollbar.scrollTop>=e.offset.y-150&&this.props.onYReachAlmostEnd(e,this.scrollbar),this.props.onYReachStart&&0===e.offset.y&&this.scrollbar.scrollTop===e.offset.y&&this.props.onYReachStart(e,this.scrollbar),this.props.onYReachAlmostStart&&e.limit.y>150&&e.offset.y<=150&&this.scrollbar.scrollTop<=150&&this.props.onYReachAlmostStart(e,this.scrollbar),this.props.onXReachEnd&&e.offset.x===e.limit.x&&this.scrollbar.scrollLeft===e.offset.x&&this.props.onXReachEnd(e,this.scrollbar),this.props.onXReachStart&&0===e.offset.x&&this.scrollbar.scrollLeft===e.offset.y&&this.props.onXReachEnd(e,this.scrollbar)}},{key:"render",value:function(){var e=this,t=this.props,n=(t.damping,t.thumbMinSize,t.syncCallbacks,t.renderByPixels,t.alwaysShowTracks,t.continuousScrolling,t.horizontalScroll,t.wheelEventTarget,t.delegateTo,t.plugins,t.onScroll,t.initialScrollTop,t.children),r=(t.onYReachStart,t.onYReachEnd,t.onYReachAlmostEnd,t.onYReachAlmostStart,t.onXReachStart,t.onXReachEnd,t.onStopScrolling,t.containerClassName),i=(t.classNameQuickNavTop,t.isDisplayXNav),a=(t.isDisplayYNav,t.updateRef,Yt()(t,["damping","thumbMinSize","syncCallbacks","renderByPixels","alwaysShowTracks","continuousScrolling","horizontalScroll","wheelEventTarget","delegateTo","plugins","onScroll","initialScrollTop","children","onYReachStart","onYReachEnd","onYReachAlmostEnd","onYReachAlmostStart","onXReachStart","onXReachEnd","onStopScrolling","containerClassName","classNameQuickNavTop","isDisplayXNav","isDisplayYNav","updateRef"])),o=this.state,s=o.isXEnd,l=o.isXStart;return v.a.createElement(v.a.Fragment,null,i&&!l&&v.a.createElement("div",{className:P()(Ob.a.quickNavX,Ob.a.quickNavLeft),onClick:function(){return e.scrollTo(!1)}},v.a.createElement("i",{className:"fv fuvi-left-fullscreen-op"})),v.a.createElement("section",Gt()({},a,{"data-scrollbar":!0,ref:function(t){return e.$container=t}}),v.a.createElement("div",{className:P()(r)},n)),i&&!s&&v.a.createElement("div",{role:"button",className:P()(Ob.a.quickNavX,Ob.a.quickNavRight),onClick:function(){return e.scrollTo(!0)}},v.a.createElement("i",{className:"fv fuvi-right-fullscreen-op"})))}}]),n}(v.a.Component);G()(Lb,"propTypes",{damping:ne.a.number,thumbMinSize:ne.a.number,syncCallbacks:ne.a.bool,renderByPixels:ne.a.bool,alwaysShowTracks:ne.a.bool,continuousScrolling:ne.a.bool,wheelEventTarget:ne.a.any,delegateTo:ne.a.any,plugins:ne.a.object,onScroll:ne.a.func,children:ne.a.node,horizontalScroll:ne.a.bool,onYReachStart:ne.a.func,onYReachEnd:ne.a.func,onXReachStart:ne.a.func,onXReachEnd:ne.a.func,onStopScrolling:ne.a.func}),G()(Lb,"defaultProps",{continuousScrolling:!1,horizontalScroll:!1}),G()(Lb,"childContextTypes",{getScrollbar:ne.a.func});var Rb=r(103),Bb=r.n(Rb);function jb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jb(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ub=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"virtualTextareaRef",v.a.createRef()),G()(V()(e),"componentDidMount",(function(){e.virtualTextareaRef.current.textContent=e.props.value})),G()(V()(e),"countNumOfRows",(function(t){var n=e.props.lineHeight;if(!e.virtualTextareaRef.current)return 0;e.virtualTextareaRef.current.textContent=t;var r=Number.parseInt(e.virtualTextareaRef.current.offsetHeight/n,10);return r+=t.endsWith("\n")?1:0})),G()(V()(e),"isValidValue",(function(t){var n=e.props,r=n.value,i=n.maxRows;return!i||(!(e.countNumOfRows(t)>i)||(t.length<r.length||!!(e.isPasteAction&&e.prevNumOfRows<=i)&&(e.isPasteAction=!1,!0)))})),G()(V()(e),"handleChange",(function(t){var n=e.props,r=n.onChange,i=(n.value,t.target.value);r&&r(t,i,e.isPasteAction),e.isPasteAction&&(e.isPasteAction=!1)})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.textareaRef,r=t.onKeyDown,i=t.onBlur,a=t.className,o=t.classNameInput,s=t.classNameNumOfRows,l=t.lineHeight,c=t.maxRows,u=t.value,d=t.style,h=t.showNumOfRows,f=t.fitHeightContent,p=Yt()(t,["textareaRef","onKeyDown","onBlur","className","classNameInput","classNameNumOfRows","lineHeight","maxRows","value","style","showNumOfRows","fitHeightContent"]),m=this.countNumOfRows(u);return v.a.createElement("div",{className:P()("px-2",a)},v.a.createElement("div",{className:"position-relative w-100 d-flex"},v.a.createElement("div",{ref:this.virtualTextareaRef,className:Bb.a.virtualTextarea,style:{lineHeight:l+"px"}},u),h&&c&&v.a.createElement("div",{className:P()(Bb.a.numOfRows,s,m>c&&Bb.a.textError)},"".concat(m,"/").concat(c," lines")),v.a.createElement("textarea",Gt()({type:"text",autoComplete:"off"},p,{className:P()(Bb.a.textarea,o),value:u,style:Fb(Fb({minHeight:2*l},d),{},{lineHeight:l+"px",height:f?m*l:null}),ref:n,onChange:this.handleChange,onPaste:function(){e.prevNumOfRows=m,e.isPasteAction=!0},onKeyDown:r,onBlur:i}))))}}]),n}(v.a.Component);Ub.propTypes={value:ne.a.string,classNameInput:ne.a.string,maxRows:ne.a.number,lineHeight:ne.a.number,showNumOfRows:ne.a.bool,fitHeightContent:ne.a.bool},Ub.defaultProps={value:"",lineHeight:20};var Hb=Ub;var zb=x.g.SRC_SET_TIME,Vb=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handleBookmarkClick",(function(t){t.preventDefault(),t.stopPropagation(),t.target.blur();var n=e.props,r=n.setUpdateVideoTime,i=n.timestamp,a=n.cru,o=void 0===a?2e3:a;if(r){var s=t.target.getBoundingClientRect(),l=t.clientY-s.top,c=Math.round(o*(l/s.height));if(c>=1){var u=i+c;r({setTimeFrom:zb.SB_CLICK,currentTime:u/1e3})}else console.log("Seeked offset=",c)}})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.isEditing,r=t.hasError,i=this.props,a=i.bookmarkedOrange,o=i.bookmarkedYellow,s=i.bookmarkedBlue,l=i.isActive,c=i.timestamp,u=i.showTimestamp,d=i.editOnClick,h=i.isLoading,f=i.createdDate,p=i.hasCanvas,m=i.showDateTime,g=i.index,b=i.lineHeight,y=i.content,A=i.onInputBlur;return v.a.createElement("div",{id:"fake-sb-".concat(g),role:"button",className:P()("fake-sb-item",Bb.a.semanticBlockWrapper,r&&Bb.a.errorBorder,d?"u-cursor-text":"u-cursor-pointer"," position-relative d-flex",0==g&&"border-top border-white",l&&"highlight-sb",a&&"highlight-orange",o&&"highlight-yellow",s&&"highlight-blue"),onBlur:this.handleBlur,onClick:this.handleEditHighlightBookmark},h&&v.a.createElement("div",{className:P()("u-flex-center",Bb.a.spinnerWrapper)},v.a.createElement(xn.a,{animation:"border",size:"sm",variant:"primary",className:P()(Bb.a.spinner)})),p&&v.a.createElement("div",{className:Bb.a.hasCanvasMark},v.a.createElement("i",{className:"fv fuvi-toolbar-pen"})),!x.c.isExploring()&&v.a.createElement("div",{className:"".concat(Bb.a.bookmarksWrapper," d-flex"),onClick:function(t){return e.handleBookmarkClick(t)}},v.a.createElement("div",{className:P()(Bb.a.bookmarkOrange)}),v.a.createElement("div",{className:P()(Bb.a.bookmarkGrey)})),v.a.createElement("div",{className:P()(Bb.a.semanticTextWrapper,"position-relative flex-fill",h&&Bb.a.loadingBg),onClick:this.handleClick},u&&v.a.createElement("div",{className:P()("position-absolute",Bb.a.timestamp,n&&"u-z-index-2")},x.c.msToTimestamp(c)),v.a.createElement("div",{className:P()("sb-content",n&&Bb.a.isEditing)},v.a.createElement(Hb,{id:"sb-textarea-".concat(g),name:"content",className:P()("u-pt-7o8",n&&"u-shadow"),classNameInput:P()("sb-textarea",n?"u-cursor-text":"u-cursor-inherit",!n&&"u-pointer-event-none"),textareaRef:this.textArea,value:y,fitHeightContent:n,onChange:this.handleChange,onKeyDown:this.handleKeyDown,maxRows:x.g.MAX_LINES_SB_TEXT,showNumOfRows:n,lineHeight:b,onBlur:A})),m&&l&&v.a.createElement("div",{className:Bb.a.createdDate},f)))}}]),n}(g.Component);Vb.propTypes={bookmarkedOrange:ne.a.string,bookmarkedYellow:ne.a.string,bookmarkedBlue:ne.a.string,isActive:ne.a.bool,showTimestamp:ne.a.bool,isLoading:ne.a.bool,createdDate:ne.a.string,hasCanvas:ne.a.bool},Vb.defaultProps={bookmarkedOrange:"",bookmarkedYellow:"",bookmarkedBlue:"",isActive:!1,showTimestamp:!0,isLoading:!1,createdDate:""};var Wb=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"shouldComponentUpdate",(function(t){var n=e.props,r=n.isActive,i=n.content,a=n.className;return t.isActive!==r||t.content!==i||t.className!==a})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.index,n=e.isDummy,r=(e.isActive,e.className),i=e.bookmarkedOrange,a=e.bookmarkedBlue,o=e.content,s=e.showTimestamp,l=e.timestamp;return v.a.createElement("div",{id:"fake-sb-".concat(t),role:"button",className:P()("fake-sb-item",Bb.a.fakeSemanticBlockWrapper,n&&Bb.a.isDummy,0==t&&"border-top border-white",r)},!x.c.isExploring()&&v.a.createElement("div",{className:"".concat(Bb.a.bookmarksWrapper," d-flex")},v.a.createElement("div",{className:"".concat(i&&Bb.a.bookmarkOrage," flex-grow-1")}),v.a.createElement("div",{className:"".concat(a&&Bb.a.bookmarkGrey," flex-grow-1")})),v.a.createElement("div",{className:P()(Bb.a.semanticTextWrapper,"position-relative flex-fill")},s&&v.a.createElement("div",{className:P()("position-absolute",Bb.a.timestamp)},x.c.msToTimestamp(l)),v.a.createElement("div",{className:P()("sb-content")},v.a.createElement(Hb,{name:"content",className:P()("u-pt-7o8"),classNameInput:P()("sb-textarea u-cursor-pointer"),value:o,readOnly:!0,maxRows:x.g.MAX_LINES_SB_TEXT}))))}}]),n}(g.Component);Wb.propTypes={bookmarkedOrange:ne.a.string,bookmarkedYellow:ne.a.string,bookmarkedBlue:ne.a.string,showTimestamp:ne.a.bool},Wb.defaultProps={bookmarkedOrange:"",bookmarkedYellow:"",bookmarkedBlue:"",showTimestamp:!0};var Gb=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{content:e.props.content||"",originalContent:"",isEditing:!1,hasError:!1}),G()(V()(e),"textArea",v.a.createRef()),G()(V()(e),"shouldComponentUpdate",(function(t,n){var r=t.editOnClick,i=t.bookmarkedOrange,a=t.bookmarkedYellow,o=t.bookmarkedBlue,s=t.isLoading,l=t.hasCanvas,c=t.content,u=n.isEditing,d=e.props,h=d.bookmarkedOrange,f=d.bookmarkedYellow,p=d.bookmarkedBlue,m=d.isActive,g=d.editOnClick,v=d.isLoading,b=d.hasCanvas,y=d.content,A=e.state.isEditing;return!(!(m||A||u)&&Object(Y.isEqual)(h,i)&&Object(Y.isEqual)(f,a)&&Object(Y.isEqual)(p,o)&&Object(Y.isEqual)(g,r)&&Object(Y.isEqual)(v,s)&&Object(Y.isEqual)(y,c)&&Object(Y.isEqual)(b,l))})),G()(V()(e),"handleToggleEdit",(function(t){var n=e.state,r=n.isEditing,i=n.content;r||e.textArea.current.focus(),e.setState({isEditing:t||!r,originalContent:i})})),G()(V()(e),"revertTextLinesContent",(function(){var t=e.state.originalContent;e.setState({content:t})})),G()(V()(e),"handleChange",(function(t,n,r){var i=t.target,a=i.selectionStart,o=i.selectionEnd,s=e.props;(0,s.onContentChange)(n,s.index,{isPaste:r,isEnter:e.isEnter,cursorIndex:a-1,isCursorAtEnd:a===n.length&&o===n.length})})),G()(V()(e),"handleKeyDown",(function(t){var n=t.target,r=n.selectionStart,i=n.selectionEnd,a=e.props,o=a.content,s=a.index,l=a.onContentMoveUp,c=a.onCursorMove;if(e.state.isEditing)switch(e.isEnter="Enter"===t.key,t.keyCode){case 27:e.handleToggleEdit();break;case 9:t.preventDefault();break;case 8:0===r&&0===i&&(t.preventDefault(),l(s));break;case 46:r===o.length&&i===o.length&&(t.preventDefault(),l(s+1));break;case 37:case 38:t.stopPropagation(),s>0&&0===r&&0===i&&(t.preventDefault(),c(s,!0));break;case 39:case 40:t.stopPropagation(),r===o.length&&i===o.length&&(t.preventDefault(),c(s));break;default:x.c.preventKeyDownSideEffect(t)}})),G()(V()(e),"updateSbContent",(function(t){var n=e.props,r=n.onUpdate,i=n.timestamp,a=n.index,o=n.videoId,s=e.state,l=s.content;l!==s.originalContent?r(o,i,l,a,(function(){e.setState({hasError:!1}),e.handleToggleEdit(),t&&t()}),(function(){return e.setState({hasError:!0})})):e.handleToggleEdit()})),G()(V()(e),"handleBlur",(function(t){var n=e.state,r=n.isEditing,i=n.content,a=n.originalContent;if(r&&!x.c.focusInCurrentTarget(t)){if(i.length>x.g.TEXT_INPUT_MAX_LENGTH)return x.e.info("The sb content text must not exceed ".concat(x.g.TEXT_INPUT_MAX_LENGTH," characters.")),void e.setState({content:a,isEditing:!1});e.handleToggleEdit()}})),G()(V()(e),"focusTextArea",(function(){e.textArea.current.focus()})),G()(V()(e),"handleEditHighlightBookmark",(function(t){var n=e.props.onClick,r=e.props.highlightEditInfo;(void 0===r?{}:r).color&&n(t)})),G()(V()(e),"handleClick",(function(t){var n=e.props,r=n.editOnClick,i=n.chapterHighlighting,a=e.props.highlightEditInfo;(void 0===a?{}:a).color||(r?(!x.r.paused()&&x.r.pause(),e.handleToggleEdit(!0),t.stopPropagation()):(null==i||i.type,x.g.CHAPTER_TYPES.EPISODIC.key))})),e}return c()(n,[{key:"componentDidMount",value:function(){}},{key:"componentDidUpdate",value:function(e){var t=e.isActive,n=this.props.isActive;t&&!n&&this.state.isEditing&&this.textArea.current.blur()}}]),n}(Vb),qb=Object(q.b)((function(e){var t=e.cogvid;return{currentTimestamp:t.currentSbData.timestamp,currentContextualImg:t.currentSbData.contextualImg,currentHightLightActive:t.currentSbData.hightLightActive,videoId:t.cogvidDetails.videoId,currentVideoTime:t.videoTime.currentTime,highlightEditInfo:t.highlightEditInfo,chapterHighlighting:t.chapterHighlighting}}),null)(Gb),Yb=r(110),Kb=r.n(Yb),Xb=r(417),Qb=r.n(Xb);var $b=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{searchTerm:"",isSubmitted:!1,showInput:!1,searchList:[],currentResult:0,searchResults:[]}),G()(V()(e),"inputRef",v.a.createRef()),G()(V()(e),"componentDidMount",(function(){e.buildSearchList()})),G()(V()(e),"componentDidUpdate",(function(t,n){var r=t.sbNoteList,i=n.showInput,a=e.props.sbNoteList,o=e.state.showInput;a.length!==r.length&&e.buildSearchList(),o&&!i&&e.inputRef.current.focus()})),G()(V()(e),"buildSearchList",(function(){var t=e.props.sbNoteList,n=new Qb.a;t.map((function(e,t){var r=e.content;n.addText(t,r.replace("\n"," "))})),e.setState({searchList:n})})),G()(V()(e),"toggleSearch",(function(){e.setState((function(e){return{showInput:!e.showInput}}))})),G()(V()(e),"clearSearch",(function(){e.setState({searchTerm:"",searchResults:[],currentResult:0,isSubmitted:!1})})),G()(V()(e),"clearSearchResults",(function(){e.isSearchDirty=!0,e.setState({searchResults:[],currentResult:0,isSubmitted:!1},e.buildSearchList)})),G()(V()(e),"handleChange",(function(t){e.isSearchDirty=!0,e.setState({searchTerm:t.target.value,currentResult:0})})),G()(V()(e),"handleSearch",(function(){var t=e.props.scrollToNote,n=e.state,r=n.searchTerm,i=n.searchList,a=e.state.searchResults,o=e.state.currentResult;e.isSearchDirty||Object(Y.isEmpty)(a)?(e.isSearchDirty=!1,o=0,a=i.search(r),Object(Y.isEmpty)(a)&&(a=i.fuzzySearch(r))):(o+=1)>a.length-1&&(o=0),e.setState({currentResult:o,searchResults:a,isSubmitted:!!r});var s=a[o];void 0!==s&&t(Number(s))})),G()(V()(e),"handleKeyDown",(function(t){t.nativeEvent.stopImmediatePropagation(),13===t.keyCode&&e.handleSearch()})),G()(V()(e),"scrollToResult",(function(t){var n=t-1,r=e.props.scrollToNote,i=e.state.searchResults[n];r(Number(i)),e.setState({currentResult:n})})),e}return c()(n,[{key:"render",value:function(){var e=this.props.className,t=this.state,n=t.isSubmitted,r=t.showInput,i=t.searchTerm,a=t.currentResult,o=t.searchResults.length;return v.a.createElement("div",{className:P()(Kb.a.toggleSearch,r&&[Kb.a.showInput,"border"],e)},v.a.createElement(Qt,{onClick:this.toggleSearch},v.a.createElement("i",{className:P()("fv",r?"fuvi-arrow-left":"fuvi-search")})),r&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"overflow-hidden flex-grow-1"},v.a.createElement("input",{ref:this.inputRef,autoComplete:"off",className:"w-100 border-0 bg-transparent shadow-none",name:"noteSearchTerm",value:i,onChange:this.handleChange,onKeyDown:this.handleKeyDown})),n&&v.a.createElement(RE,{value:a+1,onChange:this.scrollToResult,min:1,max:o},v.a.createElement("span",{className:"text-primary mr-1 u-fs-7o8"},o>0?"".concat(a+1,"/"):"",o)),v.a.createElement(Qt,{disabled:0===i.length,onClick:this.clearSearch},v.a.createElement("i",{className:"fv fuvi-delete u-fs-3o4"}))))}}]),n}(v.a.Component),Jb=function(e){var n,r,i=e.currentNote,a=e.sbNoteList,o=void 0===a?[]:a,s=e.permissions,l=void 0===s?{}:s,c=e.refFileInput,u=e.refNoteSearch,d=e.canEditContent,h=e.showNavbar,f=e.showToolbarBtns,p=e.showSbContent,m=e.isExploring,g=e.isBrainHive,b=e.isMessages,y=e.isLoading,A=e.isDirty,_=e.isSaving,w=e.isEditBtnsHidden,E=e.isSbTextMode,S=e.isEmptyData,C=e.isImportingSubtitle,T=e.isEditingSbMode,k=e.isTrustedPublisher,O=e.onSbListSave,I=e.onStepperInputNoteChange,M=e.onEditSbModeToggle,D=e.onDisplaySbContentToggle,N=e.onSubtitleFileChange,L=e.onRevertChangesClick,R=e.onRequestRetranscriptionClick,B=e.scrollToNote,j=x.c.checkPermission(null===(n=l.VIDEO)||void 0===n?void 0:n.DOANYACTION,null===(r=l.VIDEO_SEMANTIC_GUIDES)||void 0===r?void 0:r.WRITE);return v.a.createElement("div",{className:P()(Kb.a.toolbar,h&&Kb.a.hasNavbar,!E&&"u-pl-2x1o2",m&&Kb.a.invisible)},(g||b?j:!w&&E)&&(C?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):v.a.createElement(Qt,{onClick:function(){return c.current.click()},disabled:!d,tooltipPlacement:"bottom",tooltipText:t("tooltip.semanticToolImportSubtitle")},v.a.createElement("i",{className:"fv fuvi-import-sub"}))),E&&v.a.createElement(Qt,{disabled:S,onClick:D,active:p,tooltipText:t(p?"tooltip.semanticToolHideText":"tooltip.semanticToolShowText"),tooltipPlacement:"bottom"},v.a.createElement("i",{className:"fv fuvi-eye"})),(g||b?j:f)&&v.a.createElement(v.a.Fragment,null,E&&v.a.createElement(v.a.Fragment,null,k&&v.a.createElement(Qt,{disabled:!d||y,onClick:R,tooltipPlacement:"bottom",tooltipText:t("tooltip.semanticToolRetranscribe")},v.a.createElement("i",{className:"fv fuvi-refresh"})),v.a.createElement(Qt,{disabled:!d||y,onClick:M,active:T,tooltipText:t(T?"tooltip.semanticToolDisableEditText":"tooltip.semanticToolEnableEditText"),tooltipPlacement:"bottom"},v.a.createElement("i",{className:"fv fuvi-text-icon"}))),v.a.createElement(Qt,{isLoading:_,disabled:!d||!A,onClick:O,tooltipPlacement:"bottom",tooltipText:t("tooltip.saveChanges")},v.a.createElement("i",{className:"fv fuvi-save-icon"})),v.a.createElement($b,{ref:u,className:P()(E&&"d-none"),sbNoteList:o,scrollToNote:B}),!E&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"flex-grow-1"}),v.a.createElement(StepperInput,{value:i+1,min:1,max:o.length,onChange:I,className:"u-fs-7o8"})),E&&v.a.createElement(Qt,{disabled:!d||!A,onClick:L,tooltipPlacement:"bottom",tooltipText:t("tooltip.revertChanges")},v.a.createElement("i",{className:"fv fuvi-restore"}))),v.a.createElement("input",{className:"d-none",ref:c,type:"file",accept:".srt",onChange:N}))},Zb=r(55),ey=r(250),ty=r(85),ny=r(87),ry="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function iy(e){cancelAnimationFrame(e.id)}function ay(e,t){var n=ry();var r={id:requestAnimationFrame((function i(){ry()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var oy=-1;function sy(e){if(void 0===e&&(e=!1),-1===oy||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),oy=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return oy}var ly=null;function cy(e){if(void 0===e&&(e=!1),null===ly||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?ly="positive-descending":(t.scrollLeft=1,ly=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),ly}return ly}var uy=function(e,t){return e};function dy(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return(t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Object(ey.a)(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Object(ey.a)(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=vh((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=vh((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,a=r.props,o=a.direction,s=a.itemSize,l=a.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&o);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),h=i(r.props,e,r._instanceProps),f="horizontal"===o||"horizontal"===l,p="rtl"===o,m=f?d:0;u[e]=t={position:"absolute",left:p?void 0:m,right:p?m:void 0,top:f?0:d,height:f?"100%":h,width:f?h:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=vh((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,a=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,o=i;if("rtl"===t)switch(cy()){case"negative":o=-i;break;case"positive-descending":o=a-n-i}return o=Math.max(0,Math.min(o,a-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<i?"forward":"backward",scrollOffset:o,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,a=t.scrollTop;r.setState((function(e){if(e.scrollOffset===a)return null;var t=Math.max(0,Math.min(a,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&iy(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ay(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Object(ty.a)(t,e),t.getDerivedStateFromProps=function(e,t){return hy(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?sy():0:l.scrollHeight>l.clientHeight?sy():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var a=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(cy()){case"negative":a.scrollLeft=-i;break;case"positive-ascending":a.scrollLeft=i;break;default:var o=a.clientWidth,s=a.scrollWidth;a.scrollLeft=s-o-i}else a.scrollLeft=i;else a.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&iy(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,o=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,h=void 0===d?uy:d,f=e.layout,p=e.outerElementType,m=e.outerTagName,v=e.style,b=e.useIsScrolling,y=e.width,A=this.state.isScrolling,_="horizontal"===i||"horizontal"===f,w=_?this._onScrollHorizontal:this._onScrollVertical,E=this._getRangeToRender(),S=E[0],C=E[1],T=[];if(c>0)for(var k=S;k<=C;k++)T.push(Object(g.createElement)(t,{data:u,key:h(k,u),index:k,isScrolling:b?A:void 0,style:this._getItemStyle(k)}));var x=r(this.props,this._instanceProps);return Object(g.createElement)(p||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Object(Zb.a)({position:"relative",height:a,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},Object(g.createElement)(s||l||"div",{children:T,ref:o,style:{height:_?"100%":x,pointerEvents:A?"none":void 0,width:_?x:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var a=this.state,o=a.scrollDirection,s=a.scrollOffset,l=a.scrollUpdateWasRequested;this._callOnScroll(o,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,a=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=o(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=i&&"backward"!==a?1:Math.max(1,n),h=i&&"forward"!==a?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+h)),c,u]},t}(g.PureComponent)).defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var hy=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},fy=dy({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,a){var o=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,h="horizontal"===o||"horizontal"===u?d:s,f=Math.max(0,l*c-h),p=Math.min(f,t*c),m=Math.max(0,t*c-h+c+a);switch("smart"===n&&(n=r>=m-h&&r<=p+h?"auto":"center"),n){case"start":return p;case"end":return m;case"center":var g=Math.round(m+(p-m)/2);return g<Math.ceil(h/2)?0:g>f+Math.floor(h/2)?f:g;case"auto":default:return r>=m&&r<=p?r:r<m?m:p}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,a=e.itemCount,o=e.itemSize,s=e.layout,l=e.width,c=t*o,u="horizontal"===r||"horizontal"===s?l:i,d=Math.ceil((u+n-c)/o);return Math.max(0,Math.min(a-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});var py=r(1022);function my(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?my(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):my(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vy=Object(g.forwardRef)((function(e,t){var n=e.style,r=(e.showTip,e.itemSize,e.noTopDummyBlocks,e.noBottomDummyBlocks),i=e.heightTopDummyBlocks,a=e.heightBottomDummyBlocks,o=Yt()(e,["style","showTip","itemSize","noTopDummyBlocks","noBottomDummyBlocks","heightTopDummyBlocks","heightBottomDummyBlocks"]);return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:Kb.a.dummySpaceTop,style:{height:i}}),v.a.createElement("div",Gt()({ref:t},o,{style:gy(gy({},n),{},{height:"".concat(parseFloat(n.height),"px")})})),v.a.createElement("div",{className:Kb.a.dummySpaceBottom,style:{height:a}},Rl()(Array(r)).map((function(e,t){return v.a.createElement(Wb,{key:"dummy-sb-".concat(t),isDummy:!0,className:P()("u-pointer-event-none"),showTimestamp:!1})}))))})),by=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"itemRenderer",(function(t){var n=t.index,r=t.style,i=(Yt()(t,["index","style"]),e.props),a=i.itemCount,o=i.itemSize,s=i.heightTopDummyBlocks,l=i.renderSemanticBlock,c=Object(Y.get)(e.refScroll,"current.state.scrollOffset",0),u=parseInt(c/o,0),d=a-1,h=(u>d?d:u)===n;return v.a.createElement(v.a.Fragment,null,h&&v.a.createElement(v.a.Fragment,null,Rl()(Array(10)).map((function(e,t){var i=n-(10-t);return v.a.createElement("div",{key:"dummy-item-".concat(i),className:"dummy-item-".concat(i),style:gy(gy({},r),{},{top:"".concat(i*o+s,"px"),zIndex:0})},l(i))}))),v.a.createElement("div",{key:n,style:gy(gy({},r),{},{top:parseFloat(r.top)+s,zIndex:1})},l(n)))})),G()(V()(e),"renderInnerElement",Object(g.forwardRef)((function(t,n){var r=e.props,i=r.itemSize,a=r.noTopDummyBlocks,o=r.noBottomDummyBlocks,s=r.heightTopDummyBlocks,l=r.heightBottomDummyBlocks;return v.a.createElement(vy,Gt()({ref:n},t,{itemSize:i,noTopDummyBlocks:a,noBottomDummyBlocks:o,heightTopDummyBlocks:s,heightBottomDummyBlocks:l}))}))),G()(V()(e),"renderDummySBs",(function(n,r,i,a,o){return r&&o&&e.props.slideIndex>-1?v.a.createElement("div",{className:"".concat(Kb.a.sgUsageTip),style:{height:i}},v.a.createElement("div",{className:"u-fs-1x1o2"},"CC")):a?v.a.createElement("div",{className:"".concat(Kb.a.sgUsageTip),style:{height:i}},v.a.createElement("div",null,v.a.createElement("p",null,t("tooltip.sgUsageTip"))),v.a.createElement("div",{className:"".concat(Kb.a.centerArrow)},v.a.createElement("img",{src:I.a.scrollVertical,alt:"Scroll up/down",height:40}))):v.a.createElement("div",{className:P()(Kb.a.dummySbsWrapper,r?"flex-column-reverse":"flex-column",!r&&o&&"border-top border-white"),style:{height:i}},Rl()(Array(n)).map((function(e,t){return v.a.createElement(Wb,{key:t,isDummy:!0,className:P()("u-pointer-event-none",r&&"border-0"),showTimestamp:!1})})))})),e}return c()(r,[{key:"render",value:function(){var e=this,t=this.props,n=t.refScroll,r=t.itemCount,i=t.itemSize,a=t.onScroll;return v.a.createElement("div",{id:"fake-sb-scrollbar",className:"w-100 h-100"},v.a.createElement(py.a,null,(function(t){var o=t.height,s=t.width;return v.a.createElement(fy,{ref:n,overscanCount:5,className:"sb-list hide-scrollbar",width:s,height:o,itemCount:r,itemSize:i,onScroll:a,innerElementType:e.renderInnerElement},e.itemRenderer)})))}}]),r}(v.a.Component);var yy=x.g.SB_CONTENT_MODE,Ay=x.g.SB_MODES,_y=x.g.VIDEO_CATEGORY,wy=x.g.HIGHLIGHTS,Ey=x.g.SB_LENGTH,Sy=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"renderSemanticBlock",(function(t){var n=e.state,r=n.mode,i=n.items,a=n.isEditingSb,o=n.isEditingSbMode,s=n.heightSbLine,l=n.heightSbInPx,c=i[t];if(!c)return v.a.createElement(Wb,{key:"dummy-sb-".concat(t),isDummy:!0,className:P()("u-pointer-event-none"),showTimestamp:!1});var u=c.blockSeq,d=c.semanticText,h=void 0===d?"":d,f=c.startTime,p=void 0===f?"":f,m=c.semanticNote,g=void 0===m?"":m,b=c.isLoading,y=e.getSbHighlights(t),A=r===yy.SEMANTIC_TEXT?h:g,_=Object(Y.get)(e.refScroll,"current.state.scrollOffset",0),w=parseInt(_/l,0),E=i.length-1,S=(w>E?E:w)===t;return v.a.createElement(qb,{key:p+t+b,index:t,isActive:S,content:A,timestamp:p,bookmarkedOrange:y[wy.ORANGE],bookmarkedYellow:y[wy.YELLOW],bookmarkedBlue:y[wy.BLUE],blockSeq:u,showEdit:e.isPaused&&!a,editOnClick:o,onUpdate:e.handleSbContentUpdate,onClick:function(t,n){return e.handleSbClick(t,p,n)},isLoading:b,lineHeight:s,onContentChange:e.handleSbContentChange,onContentMoveUp:e.handleSbContentMoveUp,onCursorMove:e.handleCursorMove,onInputBlur:e.handleSbInputBlur,setUpdateVideoTime:e.props.setUpdateVideoTime})})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=(n.videoId,n.videoLength),i=n.permissions,a=void 0===i?{}:i,o=n.semanticNoteCount,s=n.trustedPublisher,l=n.slideIndex,c=n.isComposingVideo,u=n.isPublicProcess,d=n.isEditBtnsHidden,h=n.isVideoActive,f=this.state,p=f.isLoading,m=f.mode,g=(f.currentIndex,f.heightSbInPx),b=f.heightSbLine,y=f.noTopDummyBlocks,A=f.noBottomDummyBlocks,_=f.heightTopDummyBlocks,w=f.heightBottomDummyBlocks,E=f.isEditingSbMode,S=f.showSbContent,C=f.isImportingSubtitle,T=f.isDirty,k=f.isSaving,O=f.showConfirmationModal,I=f.showModeChangeConfirmationModal,M=f.currentNote,D=f.sbNoteList,N=x.c.getCurrentVideoCategory(),L=[_y.LEARNING,_y.HOME].includes(N),R=N===_y.EXPLORING,B=N===_y.BRAINHIVE,j=N===_y.MESSAGES,F=m===yy.SEMANTIC_TEXT,U=0==r,H=-1==l,z=h&&!R&&!U&&!c&&!u,V=!d||L&&m===yy.SEMANTIC_NOTE,W=r/Ey;return v.a.createElement(v.a.Fragment,null,L&&v.a.createElement("div",{className:Kb.a.navbar},Ay.map((function(t){var n=t.label,r=t.value;return v.a.createElement("div",{key:r,className:P()(Kb.a.navbarItem,m===r&&Kb.a.isActive),onClick:function(t){return e.handleContentModeChange(t,r)}},n,r===yy.SEMANTIC_NOTE&&o>0&&v.a.createElement("span",{className:Kb.a.noteCountBadge},o))}))),v.a.createElement(Jb,{currentNote:M,sbNoteList:D,permissions:a,refFileInput:this.refFileInput,refNoteSearch:this.refNoteSearch,canEditContent:z,showNavbar:L,showToolbarBtns:V,showSbContent:S,isExploring:R,isBrainHive:B,isMessages:j,isLoading:p,isDirty:T,isSaving:k,isEditBtnsHidden:d,isSbTextMode:F,isEmptyData:U,isImportingSubtitle:C,isEditingSbMode:E,isTrustedPublisher:s,onSbListSave:this.handleSbListSave,onStepperInputNoteChange:this.handleStepperInputNoteChange,onEditSbModeToggle:this.handleEditSbModeToggle,onDisplaySbContentToggle:this.handleDisplaySbContentToggle,onSubtitleFileChange:this.handleSubtitleFileChange,onRevertChangesClick:function(){return e.setState({showConfirmationModal:!0})},onRequestRetranscriptionClick:this.requestRetranscription,scrollToNote:this.scrollToNote}),v.a.createElement("div",{className:P()(Kb.a.scrollWrapper,U||H?"u-pointer-event-none":"u-cursor-pointer",L&&Kb.a.hasNavbar,R&&Kb.a.noToolbar),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onWheel:this.handleMouseWheel,onClick:this.handleMouseClick},H&&v.a.createElement("div",{className:P()(Kb.a.keywordsLayer,"u-fs-1x2o3 u-font-din-condensed")},v.a.createElement("div",{className:"h-100 u-flex-center flex-column u-justify-content-evenly  py-3"},v.a.createElement("div",{className:""},"Comprehension")),v.a.createElement("div",{className:"py-4 border-top border-white flex-shrink-0"},v.a.createElement("div",{className:""},"ALL-IN-ONE")),v.a.createElement("div",{className:"h-100 u-flex-center flex-column u-justify-content-evenly py-3 border-top border-white"},v.a.createElement("div",{className:""},"Retention"))),v.a.createElement("div",{id:"fake-sb-scrollbar",className:"w-100 h-100"},v.a.createElement(by,{refScroll:this.refScroll,itemCount:W,itemSize:g,noTopDummyBlocks:y,noBottomDummyBlocks:A,heightTopDummyBlocks:_,heightBottomDummyBlocks:w,onScroll:this.handleScroll,renderSemanticBlock:this.renderSemanticBlock}))),v.a.createElement(Ese,null),v.a.createElement(IC,{show:!!O,title:t("modal.confirmRevertModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:this.resetSbList,onClose:function(){return e.setState({showConfirmationModal:!1})}}),v.a.createElement(IC,{show:!!I,title:t("modal.confirmModeChangeModalTitle"),message:t("modal.confirmModeChangeModalMessage"),onConfirm:this.handleModeChangeConfirm,onClose:function(){return e.setState({showModeChangeConfirmationModal:!1})}}),v.a.createElement("div",{ref:this.refVirtualTextarea,className:Kb.a.virtualTextarea,style:{lineHeight:b+"px"}}))}}]),r}(v.a.Component);function Cy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ty(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cy(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ky=x.g.SB_CONTENT_MODE,xy=(x.g.SB_MODES,x.g.VIDEO_AREA_WRAPPER_ID),Oy=x.g.VIDEO_CATEGORY,Iy=x.g.HIGHLIGHTS,My=x.g.CHAPTER_TYPES,Py=x.g.WITH_CREDENTIALS,Dy=x.g.SRC_SET_TIME,Ny=x.g.VIDEO_PLAYER_ID,Ly=x.g.TRACKING_USER,Ry=x.g.SB_LENGTH,By=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{items:[],currentIndex:-1,scrollBarHeight:0,videoAreaHeight:0,mode:ky.SEMANTIC_TEXT,heightSbInPx:0,heightSbList:0,heightSbLine:20,loadedItems:{},sbNoteList:[],isEditingSb:!1,isEditingSbMode:!1,showSbContent:!0,isDirty:!1}),G()(V()(e),"refScroll",v.a.createRef()),G()(V()(e),"refNoteSearch",v.a.createRef()),G()(V()(e),"refFileInput",v.a.createRef()),G()(V()(e),"refVirtualTextarea",v.a.createRef()),G()(V()(e),"isPaused",!0),G()(V()(e),"isInitial",!0),G()(V()(e),"prevIsPaused",!0),G()(V()(e),"prevIndex",0),G()(V()(e),"updateWindowDimensions",(function(){setTimeout((function(){var t=x.c.getCurrentVideoCategory(),n=[Oy.LEARNING,Oy.HOME].includes(t),r=t===Oy.EXPLORING,i=x.c.convertRemToPx(Um.heightChapterSlider),a=Object(Y.get)(document.getElementById("id-right-bar"),"clientHeight",0)-x.c.convertRemToPx("7.5rem"),o=Object(Y.get)(document.getElementById(xy),"clientHeight",0)-i,s=x.c.convertRemToPx("1.25rem"),l=x.c.convertRemToPx(Um.sbHeight),c=(r||x.c.convertRemToPx(Um.heightToolbar),2*l),u=Math.ceil(c/l),d=a-3*l,h=Math.ceil(Math.abs(d)/l);e.setState({heightVideoArea:o,heightSbInPx:l,heightSbLine:s,noTopDummyBlocks:u,noBottomDummyBlocks:h,heightTopDummyBlocks:c,heightBottomDummyBlocks:d})}))})),G()(V()(e),"componentDidMount",(function(){e.updateWindowDimensions(),window.addEventListener("resize",e.updateWindowDimensions),e.buildAudioVideo(),e.fetchChapterSbList()})),G()(V()(e),"componentWillUnmount",(function(){window.removeEventListener("resize",e.updateWindowDimensions),e.stopAutoScroll(),e.handleAudioDestroy(),clearInterval(e.intervalTrackingChapter)})),G()(V()(e),"shouldComponentUpdate",(function(t,n){t.isAudioLoop;var r=t.videoTime,i=t.chapters,a=void 0===i?[]:i,o=Yt()(t,["isAudioLoop","videoTime","chapters"]),s=(n.currentIndex,Yt()(n,["currentIndex"])),l=e.props,c=(l.isAudioLoop,l.videoTime),u=l.chapters,d=void 0===u?[]:u,h=Yt()(l,["isAudioLoop","videoTime","chapters"]),f=e.state,p=(f.currentIndex,Yt()(f,["currentIndex"]));if(!Object(Y.isEqual)(c,r)&&[Dy.SB_CLICK,Dy.CG,Dy.HIGHLIGHT,Dy.PREV_SEGMENT,Dy.NEXT_SEGMENT,Dy.INSIDE_VIDEO_SEARCH].includes(null==r?void 0:r.setTimeFrom))if(r.currentTime>=e.startTime&&r.currentTime<=e.endTime)e.prevIsPaused=e.isPaused,e.handleAudioPause(),e.handlePositionUpdateByAudioTime(r.currentTime),e.forceUpdate(e.highlightSbItem),setTimeout((function(){!e.prevIsPaused&&e.handleAudioPlay()}),250);else if(e.nextVideoTime=r.currentTime,[Dy.HIGHLIGHT,Dy.PREV_SEGMENT,Dy.NEXT_SEGMENT].includes(null==r?void 0:r.setTimeFrom)){var m=Object(Y.findIndex)(d,(function(e){var t=e.startTime,n=e.endTime;return 1e3*r.currentTime>=t&&1e3*r.currentTime<=n}));x.r.paused()?x.r.currentTime(r.currentTime):x.r.play(r.currentTime),e.props.displaySlide(m)}return!Object(Y.isEqual)(h,o)||!Object(Y.isEqual)(p,s)||d.length!==a.length})),G()(V()(e),"componentDidUpdate",(function(t){var n,r,i=t.chapters,a=void 0===i?[]:i,o=Yt()(t,["chapters"]),s=e.props,l=s.videoId,c=s.videoSrc,u=s.slideIndex,d=s.isVideoActive,h=s.chapters,f=void 0===h?[]:h;if(l===o.videoId&&c===o.videoSrc||(e.setState({items:[],currentIndex:-1,loadedItems:{}}),e.scrollTo(0),e.isInitial=!0,c&&e.buildAudioVideo()),e.isInitial&&-1===o.slideIndex&&-1!==u&&(e.isInitial=!1,e.trackingPlayer(Ly.ACTIONS.SELECT)),u!==o.slideIndex||(null===(n=f[u])||void 0===n?void 0:n.uid)!==(null===(r=a[u])||void 0===r?void 0:r.uid)){clearInterval(e.intervalTrackingChapter);var p=a[o.slideIndex];(null==p?void 0:p.type)!==My.EPISODIC.key||e.isPaused||e.trackingPlayer(Ly.ACTIONS.SLIDE_CHANGE,p.endTime/1e3,{chapterId:p.uid}),e.prevIsPaused=e.isPaused&&-1!==o.slideIndex,e.fetchChapterSbList(),e.trackingChapter(f[u])}d&&!o.isVideoActive&&Object(Y.invoke)(e.player,"player_.audioOnlyMode",!1)})),G()(V()(e),"trackingChapter",(function(t){if(t){var n=t.uid,r=t.endTime-t.startTime,i=Math.max(15e3,Math.round(r/4));clearInterval(e.intervalTrackingChapter),e.intervalTrackingChapter=setInterval((function(){var t,r,i,a=e.props,o=a.chapters,s=null===(t=(void 0===o?[]:o)[a.slideIndex])||void 0===t?void 0:t.uid;e.isPaused||n!==s||e.trackingPlayer(Ly.ACTIONS.SLIDE_CHANGE,null===(r=e.player)||void 0===r?void 0:null===(i=r.player_)||void 0===i?void 0:i.currentTime(),{chapterId:n})}),i)}})),G()(V()(e),"trackingPlayer",(function(t,n){var r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n||(null===(r=e.player)||void 0===r?void 0:null===(i=r.player_)||void 0===i?void 0:i.currentTime()),s=t===Ly.ACTIONS.PLAY,l=t===Ly.ACTIONS.SLIDE_CHANGE,c=s?0:o-(window.startTimeVideoTracking||0);if((s||l)&&(window.startTimeVideoTracking=o),!s){var u=e.props,d=u.videoId,h=u.trackingVideoCountViewData,f=Ty({videoId:d,type:Ly.TYPES.VIDEO,action:l?Ly.ACTIONS.PAUSE:t,timestamp:o,duration:c},a);h(f)}})),G()(V()(e),"buildAudioVideo",Object(Y.debounce)((function(){var t=e.props,n=t.videoSrc,r=t.isVideoMaster;t.isVideoActive;if(e.handleAudioDestroy(),n&&!r){var i=document.getElementById(Ny);e.player=Object(Yn.a)(i,{preload:"metadata",loadingSpinner:!1,autoplay:!1,sources:[{src:"".concat(n),type:"application/x-mpegURL",withCredentials:Py}]},(function(){window.audioPlayer=e.player})),e.t0=(new Date).getTime(),e.tt=!0,e.player.ready((function(){e.player.on("loadeddata",(function(){e.tt&&console.log("load data time ",(new Date).getTime()-e.t0,"ms")})),e.player.on("play",(function(){e.ended&&(e.handleAudioPause(),e.scrollTo(0),setTimeout((function(){e.handleAudioPlay(e.startTime)})),e.forceUpdate(e.highlightSbItem),e.ended=!1),e.t1=(new Date).getTime(),e.autoScroll(),e.isPaused=!1,e.props.isVideoActive&&e.props.setUpdateVideoTime({setTimeFrom:Dy.PLAYER,isPaused:!1}),e.trackingPlayer(Ly.ACTIONS.PLAY)})),e.player.on("pause",(function(){e.stopAutoScroll(),e.isPaused=!0,e.props.isVideoActive&&e.props.setUpdateVideoTime({setTimeFrom:Dy.PLAYER,isPaused:!0}),e.trackingPlayer(Ly.ACTIONS.PAUSE)})),e.player.on("timeupdate",(function(){e.ended&&(e.ended=!1),e.isPaused&&!x.r.paused()&&e.handleAudioPause(!0),!e.isPaused&&e.handleAudioLoop()})),e.player.on("ended",(function(){e.ended=!0,e.trackingPlayer(Ly.ACTIONS.PAUSE)})),e.player.on("dispose",(function(){!e.isPaused&&e.trackingPlayer(Ly.ACTIONS.PAUSE)}))}))}}),50)),G()(V()(e),"fetchChapterSbList",(function(){var t=e.props,n=t.videoId,r=t.videoLength,i=t.slideIndex,a=t.chapters,o=void 0===a?[]:a,s=(t.rootContext,t.version),l=t.isVideoActive,c=t.getChapterSemanticBlocks,u=t.setActiveChapter,d=e.state.loadedItems,h=o[i],f=null==h?void 0:h.uid,p=!!d[f],m=e.prevIsPaused;e.startTime=((null==h?void 0:h.startTime)||0)/1e3,e.endTime=((null==h?void 0:h.endTime)||0)/1e3,e.startBlockSeq=null==h?void 0:h.startBlockSeq,e.seqNumber=null==h?void 0:h.seqNumber,!e.isContinuous&&e.handleAudioPause();var g=function(){var t,n;e.startTime=((null==h?void 0:h.startTime)||0)/1e3,e.endTime=((null==h?void 0:h.endTime)||0)/1e3,e.startBlockSeq=null==h?void 0:h.startBlockSeq,e.seqNumber=null==h?void 0:h.seqNumber,e.isWheeling||(!e.isContinuous&&e.isPaused&&e.highlightSbItem(e.startBlockSeq),(!e.isContinuous&&e.isPaused||(null===(t=e.player)||void 0===t?void 0:null===(n=t.player_)||void 0===n?void 0:n.ended()))&&e.handleAudioPlay(e.nextVideoTime||e.startTime,m),e.isContinuous?e.handlePositionUpdateByAudioTime():e.nextVideoTime?e.handlePositionUpdateByAudioTime(e.nextVideoTime):e.handlePositionUpdateByAudioTime(),e.forceUpdate(),Object(Y.invoke)(e.refScroll,"current.forceUpdate"),e.isContinuous=!1,e.nextVideoTime=null)};if(p||!f||-1==i||h.type!==My.EPISODIC.key)return p&&g(),f&&h.type===My.EPISODIC.key&&e.fetchChapterSbListArround(f),void(l&&-1==i&&u({}));var v=Math.ceil(e.endTime/2),b=Object(Y.cloneDeep)(e.state.items);if(0==b.length){var y=Math.ceil(r/Ry);b=x.c.generateLoadingSemanticBlocks(y,0,s,!1)}Rl()(Array(v-h.startBlockSeq)).map((function(e,t){var n=b[t+h.startBlockSeq];n&&(n.isLoading=!0)})),e.setState((function(t){return{isLoading:!0,items:b,currentIndex:e.nextVideoTime?t.currentIndex:e.startBlockSeq}}),(function(){e.nextVideoTime&&e.handlePositionUpdateByAudioTime(e.nextVideoTime),e.highlightSbItem()})),c({videoId:n,chapterId:f},(function(t){var n=e.props,r=n.slideIndex;if(n.chapters[r].uid===f){var i=t.resultList,a=void 0===i?[]:i,o=e.state.loadedItems;o[f]=a;var s=Object(Y.cloneDeep)(e.state.items);a.map((function(e){s[e.blockSeq]=Ty(Ty({},e),{},{isLoading:!1})})),e.setState((function(t){return{items:s,currentIndex:e.nextVideoTime?t.currentIndex:e.startBlockSeq,isLoading:!1,loadedItems:o}}),g),e.fetchChapterSbListArround(f)}}),(function(){e.setState({currentIndex:-1,items:[],isLoading:!1})}))})),G()(V()(e),"fetchChapterSbListMore",(function(t){var n=e.props,r=n.videoId,i=n.videoLength,a=(n.slideIndex,n.chapters),o=void 0===a?[]:a,s=n.version,l=n.getChapterSemanticBlocks;if(t){var c=e.state.loadedItems,u=o.find((function(e){return e.uid===t}))||{},d=!!c[t],h=((null==u?void 0:u.endTime)||0)/1e3;if(!d&&t&&u.type===My.EPISODIC.key){var f=Math.ceil(h/2),p=Object(Y.cloneDeep)(e.state.items);if(0==p.length){var m=Math.ceil(i/Ry);p=x.c.generateLoadingSemanticBlocks(m,0,s,!1)}Rl()(Array(f-u.startBlockSeq)).map((function(e,t){var n=p[t+u.startBlockSeq];n&&(n.isLoading=!0)})),e.setState({items:p}),l({videoId:r,chapterId:t},(function(n){var r=n.resultList,i=void 0===r?[]:r,a=e.state.loadedItems;a[t]=i;var o=Object(Y.cloneDeep)(e.state.items);i.map((function(e){o[e.blockSeq]=Ty(Ty({},e),{},{isLoading:!1})})),e.setState({items:o,loadedItems:a},(function(){e.isPaused&&e.refScroll.current&&e.refScroll.current.forceUpdate()}))}))}}})),G()(V()(e),"fetchChapterSbListArround",(function(t){if(t){var n=e.props.chapters,r=(void 0===n?[]:n).filter((function(e){return e.type===My.EPISODIC.key})),i=Object(Y.findIndex)(r,{uid:t}),a=r[i-1];a&&e.fetchChapterSbListMore(a.uid);var o=r[i+1];o&&e.fetchChapterSbListMore(o.uid)}})),G()(V()(e),"autoScroll",(function(){var t;clearInterval(e.intervalScroll),(null===(t=e.refScroll)||void 0===t?void 0:t.current)&&(e.isIntervalScrolling=!0,e.intervalScroll=setInterval((function(){var t;e.tt&&console.log("start scrolling after",(new Date).getTime()-e.t1,"ms"),e.tt=!1,e.isPaused||((null===(t=e.refScroll)||void 0===t?void 0:t.current)&&e.player.player_?e.handlePositionUpdateByAudioTime():e.stopAutoScroll())}),2e3/e.state.heightSbInPx))})),G()(V()(e),"stopAutoScroll",(function(){clearInterval(e.intervalScroll),e.isIntervalScrolling=!1})),G()(V()(e),"handleContentModeChange",(function(t,n){t.stopPropagation(),e.setState({mode:n})})),G()(V()(e),"displaySbImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.state.currentIndex,n=arguments.length>1?arguments[1]:void 0,r=e.props,i=r.rootContext,a=(r.displayCoverImage,r.updateChapterImageSlider,e.state.items[t]);if(a&&(!e.isIntervalScrolling||n))"".concat(i).concat(a.contextualImage)})),G()(V()(e),"handleScroll",Object(Y.throttle)((function(t){var n,r,i,a,o,s,l,c=t.scrollOffset,u=parseInt(c/e.state.heightSbInPx,0);u!==e.state.currentIndex&&(e.prevIndex=e.state.currentIndex,e.setState({currentIndex:u}),e.displaySbImage(u,e.isMouseEnter),e.highlightSbItem(u)),e.isPaused&&e.handleAudioTimeUpdateByPosition(c),e.isWheeling&&e.handleWheeling(u),e.props.isVideoActive&&!e.nextVideoTime&&((null===(n=e.props.videoTime)||void 0===n?void 0:n.setTimeFrom)!==Dy.CG||e.isWheeling)&&e.props.setUpdateVideoTime({setTimeFrom:Dy.PLAYER,isPaused:e.isPaused,currentTime:null===(r=e.player)||void 0===r?void 0:null===(i=r.player_)||void 0===i?void 0:i.currentTime(),remainingTime:null===(a=e.player)||void 0===a?void 0:null===(o=a.player_)||void 0===o?void 0:o.remainingTime(),duration:null===(s=e.player)||void 0===s?void 0:null===(l=s.player_)||void 0===l?void 0:l.duration(),continuePlayVideo:!1})}),25,{leading:!0,trailing:!0})),G()(V()(e),"handleWheeling",(function(t){e.handleWheelingAfter();var n=e.props,r=n.slideIndex,i=n.chapters,a=void 0===i?[]:i,o=n.setActiveChapter,s=n.displaySlide,l=a[r];if((null==l?void 0:l.type)!==My.EPISODIC.key||t<(null==l?void 0:l.startBlockSeq)||t>(null==l?void 0:l.endTime)/Ry||!l){var c=a.findIndex((function(e){return t>=e.startBlockSeq&&t<=e.endTime/Ry}));o(a[c]),s(c)}})),G()(V()(e),"handleWheelingAfter",Object(Y.debounce)((function(){e.isWheeling=!1,!e.prevIsPaused&&e.handleAudioPlay()}),100)),G()(V()(e),"handleMouseEnter",(function(t){var n,r;e.isMouseEnter=!0,e.state.items.length&&(e.displaySbImage(void 0,!0),null===(n=(r=e.props).onMouseEnter)||void 0===n||n.call(r,t))})),G()(V()(e),"handleMouseLeave",(function(t){var n,r;e.isMouseEnter=!1,null===(n=(r=e.props).onMouseLeave)||void 0===n||n.call(r,t)})),G()(V()(e),"handleMouseWheel",(function(t){e.isWheeling||(e.prevIsPaused=e.isPaused),e.isWheeling=!0,e.handleAudioPause()})),G()(V()(e),"handleMouseClick",(function(t){t.stopPropagation();var n=e.props;n.highlightEditInfo,n.slideIndex;e.isPaused?e.handleAudioPlay():e.handleAudioPause()})),G()(V()(e),"handleAudioPlay",(function(t,n){var r,i,a=e.props,o=a.slideIndex,s=a.chapters,l=void 0===s?[]:s,c=a.showLock;l[o];if(!c&&(!n&&(e.isPaused=!1),void 0!==t&&(null===(r=e.player)||void 0===r||null===(i=r.player_)||void 0===i||i.currentTime(t)),!n)){var u=Object(Y.invoke)(e.player,"player_.play");u&&u.then((function(t){e.canPause=!0})).catch((function(e){}))}})),G()(V()(e),"handleAudioPause",(function(t){e.isPaused=!0,(e.canPause||t)&&Object(Y.invoke)(e.player,"player_.pause")})),G()(V()(e),"handleAudioDestroy",(function(){e.player&&!e.player.isDisposed()&&Object(Y.invoke)(e.player,"player_.pause"),e.player=null,window.audioPlayer=null})),G()(V()(e),"handleAudioLoop",(function(){var t,n,r,i,a=null===(t=e.player)||void 0===t?void 0:null===(n=t.player_)||void 0===n?void 0:n.currentTime();if(!x.r.checkHighlightLoop(a)){var o=e.props,s=o.slideIndex,l=o.chapters,c=void 0===l?[]:l,u=o.displaySlide,d=o.setActiveChapter;if(c[s]&&c[s].type!==My.EPISODIC.key){var h=Object(Y.findIndex)(c,(function(e){var t=e.startTime,n=e.endTime;return 1e3*a>=t&&1e3*a<=n})),f=c[h];if(!f)return;return e.isContinuous=!0,e.startTime=((null==f?void 0:f.startTime)||0)/1e3,e.endTime=((null==f?void 0:f.endTime)||0)/1e3,e.seqNumber=null==f?void 0:f.seqNumber,d(f),void u(h)}if(a>=e.endTime||(null===(r=e.player)||void 0===r?void 0:null===(i=r.player_)||void 0===i?void 0:i.ended())){var p=e.props.chapters.filter((function(e){return e.type===My.EPISODIC.key})).length;if(e.props.isAudioLoop||1===p)e.handleAudioPause(),setTimeout((function(){e.handleAudioPlay(e.startTime)})),e.forceUpdate(e.highlightSbItem);else{var m,g=c.filter((function(e){return e.type===My.EPISODIC.key})),v=g.find((function(e){var t=e.seqNumber;return t>s&&(x.c.checkSubscribedOffer(x.g.SUB_OFFER.VIEW_VIDEOS)||x.c.checkChapterAccessible(t))}));v||(v=g.find((function(e){return e.seqNumber>s}))),v||(v=g.find((function(e){return x.c.checkSubscribedOffer(x.g.SUB_OFFER.VIEW_VIDEOS)||x.c.checkChapterAccessible(seqNumber)})));var b=null===(m=v)||void 0===m?void 0:m.seqNumber;e.isContinuous=!0,v&&((Math.abs(Object(Y.findIndex)(g,{seqNumber:b})-Object(Y.findIndex)(g,{seqNumber:s}))>1||b===s)&&x.r.play(v.startTime/1e3),d(v),u(b))}}}})),G()(V()(e),"handleAudioTimeUpdateByPosition",(function(t){var n,r;if(e.isPaused&&e.player){var i=t/e.state.heightSbInPx*2;null===(n=e.player)||void 0===n||null===(r=n.player_)||void 0===r||r.currentTime(i)}})),G()(V()(e),"handlePositionUpdateByAudioTime",(function(t){var n,r,i=void 0===t?null===(n=e.player)||void 0===n?void 0:null===(r=n.player_)||void 0===r?void 0:r.currentTime():t,a=Math.ceil(i/2*e.state.heightSbInPx);e.scrollTo(a);var o=Math.min(parseInt(i/2),e.state.items.length-1);e.isPaused&&e.highlightSbItem(o)})),G()(V()(e),"countNORows",(function(t){var n=e.state.heightSbLine;if(!e.refVirtualTextarea.current)return 0;e.refVirtualTextarea.current.textContent=t;var r=Number.parseInt(e.refVirtualTextarea.current.offsetHeight/n,10);return r+=t.endsWith("\n")?1:0})),G()(V()(e),"splitText",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=2,a=t.length,o=a;if(e.countNORows(t)>i){if(o=a>60?60:a,e.countNORows(t.slice(0,o))>i)for(;e.countNORows(t.slice(0,o))>i&&o>=0;)o-=1;else{for(;e.countNORows(t.slice(0,o))<=i&&o<a;)o+=1;o--}if(n&&" "!==t[o-1]&&" "!==t[o]&&!t[o].match(/\r\n|\r|\n/)){var s=Object(Y.lastIndexOf)(t.slice(0,o)," ");if(!(s>r))return[];o=s+1}}var l=t.slice(0,o),c=t.slice(o,a);return c&&c.startsWith("\n")&&c.length>1&&(c=c.slice(1)),[l,c]})),G()(V()(e),"focusTextarea",(function(e,t){var n=document.getElementById("sb-textarea-".concat(e));n&&(n.click(),n.focus(),void 0!==t?n.setSelectionRange(t,t):n.setSelectionRange(n.value.length,n.value.length))})),G()(V()(e),"handleSbContentChange",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Object(Y.cloneDeep)(e.state.items),a=i.length-1,o=r.isPaste,s=r.isEnter,l=r.cursorIndex,c=r.isCursorAtEnd;if(!(n>a)){var u=e.state.mode===ky.SEMANTIC_TEXT?"semanticText":"semanticNote",d=e.splitText(t,n!==a),h=d[1],f=n,p=l+1;if(h){if(n===a&&i[n][u]===d[0])return;i[n].isDirty=!0,i[n].saved=!1,i[n][u]=d[0],p-=d[0].length;var m=n+1;if(m<=a)do{var g=i[m][u]||"";d=e.splitText(h+(!s&&!o||h.endsWith(" ")||h.startsWith("\n")||!g||"\n"===g||" "===g[0]?"":" ")+g,!0),i[m].isDirty=!0,i[m].saved=!1,i[m][u]=d[0],h=d[1],o&&p>0&&(p-=d[0].length,m<=a&&(f=m)),h&&(m+=1)}while(m<=a&&h);e.setState({items:i,isDirty:!0},(function(){if(e.refScroll.current.forceUpdate(),o){var r=i[f][u].length+p;e.focusTextarea(f,r)}else{var d=e.countNORows(t.slice(0,l)),h=i[n][u].length;if(n===a||s&&(1===d||0===l)||!s&&!c&&h>l)e.focusTextarea(n,l+1);else if(s&&2===d||!s&&c||!s&&h<=l){var m=s?0:Math.max(1,l+1-h);e.focusTextarea(n+1,m)}}}))}else i[n].isDirty=!0,i[n].saved=!1,i[n][u]=t,e.setState({items:i,isDirty:!0},(function(){e.refScroll.current.forceUpdate()}))}})),G()(V()(e),"handleCursorMove",(function(t,n){n?e.focusTextarea(t-1):e.focusTextarea(t+1,0)})),G()(V()(e),"handleSbContentMoveUp",(function(t){var n=Object(Y.cloneDeep)(e.state.items),r=n.length-1;if(!(t<=0||t>r)&&n[t]){var i=e.state.mode===ky.SEMANTIC_TEXT?"semanticText":"semanticNote",a=n[t][i]||"",o=n[t-1][i]||"",s=a.split("\n")[0],l=s.split(" ").slice(0,Object(Y.findIndex)(s.split(" "),(function(e){return""!==e}))+1).join(" ").length,c=a.slice(0,l),u=a.slice(l+(" "===a[l]&&" "!==a[l+1]?1:0)),d=e.splitText(o+c,!0,o.length);Object(Y.isEmpty)(d)||(n[t-1].isDirty=!0,n[t-1].saved=!1,n[t-1][i]=d[0],n[t].isDirty=!0,n[t].saved=!1,n[t][i]=d[1]+u),e.setState({items:n,isDirty:!0},(function(){t<=0||t>r||e.focusTextarea(t-1,o.length)}))}})),G()(V()(e),"handleSbContentUpdate",(function(t,n,r,i,a,o){e.props.updateSbContent({videoUid:t,timestamp:n,content:r,index:i},a,o)})),G()(V()(e),"handleSbClick",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=e.state,a=i.isEditingSbMode,o=i.showSbContent,s=e.props.highlightEditInfo,l=void 0===s?{}:s;return l.color?Object(x.k)(n):a?(e.isPaused||(e.handleAudioPause(),Object(Y.delay)(r,250)),void(o||e.setState({showSbContent:!0},r))):void 0})),G()(V()(e),"scrollToNote",(function(t){var n=e.props.setUpdateVideoTime,r=e.state.sbNoteList[t];if(r){e.handleAudioPause(),e.setState({currentNote:t});var i=r.startTime||2e3*r.blockSeq;n({setTimeFrom:Dy.INSIDE_VIDEO_SEARCH,currentTime:(i+10)/1e3})}})),G()(V()(e),"handleSbNoteSave",(function(){e.state.mode===ky.SEMANTIC_NOTE&&e.handleSbListSave()})),G()(V()(e),"handleSbInputBlur",Object(Y.debounce)(e.handleSbNoteSave,500)),G()(V()(e),"handleStepperInputNoteChange",(function(t){e.scrollToNote(t-1)})),G()(V()(e),"handleEditSbModeToggle",(function(){return e.setState((function(e){return{isEditingSbMode:!e.isEditingSbMode}}),e.refreshSbList)})),G()(V()(e),"handleDisplaySbContentToggle",(function(){return e.setState((function(e){return{showSbContent:!e.showSbContent}}),e.refreshSbList)})),G()(V()(e),"requestRetranscription",(function(){var t=e.props.videoId;e.props.retranscribeVideo(t)})),G()(V()(e),"handleSubtitleFileChange",(function(n){n.stopPropagation();var r=e.props,i=r.videoId,a=r.slideIndex,o=n.target.files[0];if("srt"!==o.name.split(".").pop())return Toast.warn(t("message.acceptSrtFile"));e.setState({isImportingSubtitle:!0},(function(){return e.props.importSubtitle({file:o,videoId:i},(function(){if(e.setState({isImportingSubtitle:!1,isDirty:!1}),e.refFileInput.current.value="",i===e.props.videoId&&a===e.props.slideIndex){var t=e.props,n=t.slideIndex,r=t.chapters,o=t.getChapterSemanticBlocks,s=r[n],l=null==s?void 0:s.uid;if(!l)return;o({videoId:i,chapterId:l},(function(t){var n=t.resultList,r=void 0===n?[]:n,i=e.state.loadedItems;i[l]=r,e.setState({items:r,loadedItems:i})}))}}),(function(){e.setState({isImportingSubtitle:!1}),e.refFileInput.current.value=""}))}))})),G()(V()(e),"resetSbList",(function(){var t=e.props,n=t.slideIndex,r=t.chapters,i=e.state.loadedItems,a=r[n],o=null==a?void 0:a.uid;e.setState({items:i[o]||[],isDirty:!1,showConfirmationModal:!1})})),G()(V()(e),"refreshSbList",(function(){e.refScroll.current.forceUpdate(),e.highlightSbItem()})),G()(V()(e),"handleSbListSave",(function(){var t=e.props,n=t.videoId,r=t.slideIndex,i=t.chapters,a=void 0===i?[]:i,o=t.updateMultipleSbContent,s=t.updateCogvidListItem,l=e.state,c=l.items,u=l.mode,d=l.isSaving;if(n){var h=a[r],f=c.filter((function(e){return e.isDirty}));if(!Object(Y.isEmpty)(f)&&!d){var p=Rl()(c);f.map((function(e){var t=e.blockSeq;p[t].saved=!0})),e.setState({isSaving:!0,items:p}),o({videoId:n,sbList:f,mode:u},(function(){var t=e.state.items,r=e.state.sbNoteList,i=u===ky.SEMANTIC_NOTE;f.map((function(e){var n=e.blockSeq,a=e.semanticNote,o=e.startTime,s=t[n];if(s.saved&&(s.isDirty=!1),i){var l=Object(Y.find)(r,{blockSeq:n});l?l.content=a:"\n"!==a&&r.push({blockSeq:n,startTime:o,content:a})}}));var a=e.state.loadedItems;a[h.uid]=t,e.setState({isDirty:!1,isSaving:!1,items:t,loadedItems:a,sbNoteList:r.filter((function(e){var t=e.content;return!!t&&"\n"!==t})).sort((function(e,t){return e.blockSeq-t.blockSeq}))},(function(){i&&(Object(Y.invoke)(e.refNoteSearch,"current.clearSearchResults"),s({videoId:n,data:{semanticNoteCount:e.state.sbNoteList.length}}))}))}),(function(){return e.setState({isSaving:!1})}))}}})),G()(V()(e),"handleModeChangeConfirm",(function(){var t=e.props.updateIsEditingSb,n=e.state.mode===ky.SEMANTIC_TEXT?ky.SEMANTIC_NOTE:ky.SEMANTIC_TEXT;t(!1),e.resetSbList(),e.setState({mode:n,showModeChangeConfirmationModal:!1,isEditingSbMode:n===ky.SEMANTIC_NOTE,isDirty:!1},e.refreshSbList)})),G()(V()(e),"checkHighlight",(function(t,n){var r=e.props,i=r.highlightEditInfo,a=void 0===i?{}:i,o=r.highlightsBookmark,s=void 0===o?[]:o,l=!1;if(a.color===t&&Object(Y.isNumber)(a.startTime)){var c=a.isMouseClickMode,u=e.state.currentIndex+e.startBlockSeq,d=c&&a.endTime?a.endTime:2e3*(u+1),h=a.startTime?Math.floor(a.startTime/2e3):0;l=d>a.startTime?n>=h&&n<=u:n>=u&&n<=h}return l||s.some((function(e){return l=e.color===t&&n>=e.startBlockSeq&&n<=e.endBlockSeq&&e.id})),l&&"boolean"==typeof l?t:l||""})),G()(V()(e),"getSbHighlights",(function(t){var n,r=e.state.items[t];if(!r)return{};var i=r.blockSeq;return n={},G()(n,Iy.ORANGE,e.checkHighlight(Iy.ORANGE,i)),G()(n,Iy.BLUE,e.checkHighlight(Iy.BLUE,i)),G()(n,Iy.YELLOW,e.checkHighlight(Iy.YELLOW,i)),n})),G()(V()(e),"handleSbDataUpdate",(function(t,n){var r=e.state.items[t];r&&e.props.updateCurrentSbData({blockSeq:r.blockSeq,timestamp:r.startTime,contextualImg:r.contextualImage,hightLightActive:n||e.getSbHighlights(t)})})),G()(V()(e),"highlightSbBookmarks",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.state.currentIndex,n=document.getElementById("fake-sb-".concat(t));if(n){var r=e.getSbHighlights(t),i=n.classList;i.remove("highlight-orange"),i.remove("highlight-yellow"),i.remove("highlight-blue"),r[Iy.ORANGE]&&i.add("highlight-orange"),r[Iy.YELLOW]&&i.add("highlight-yellow"),r[Iy.BLUE]&&i.add("highlight-blue")}})),G()(V()(e),"highlightSbItem",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.state.currentIndex,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(document.querySelectorAll(".fake-sb-item").forEach((function(e){return e.classList.remove("highlight-sb")})),-1!=t){var r=e.props,i=r.isVideoActive,a=r.highlightEditInfo;i&&e.handleSbDataUpdate(t);var o=document.getElementById("fake-sb-".concat(t));o?(o.classList.add("highlight-sb"),i&&(null==a?void 0:a.color)&&(e.highlightSbBookmarks(t),e.highlightSbBookmarks(e.prevIndex))):n&&setTimeout((function(){e.highlightSbItem(void 0,!1)}),10)}})),G()(V()(e),"scrollTo",(function(t,n){Object(Y.invoke)(e.refScroll,"current.scrollTo",t)})),e}return r}(Sy),jy=Object(X.a)(K.b,Object(q.b)((function(e){var t,n,r,i=e.auth,a=e.cg,o=e.cogvid;return{userId:null===(t=i.userInfo)||void 0===t?void 0:t.userId,trustedPublisher:null===(n=i.userInfo)||void 0===n?void 0:n.trustedPublisher,slideIndex:a.showChapterCoverImageSlide,isAudioLoop:a.showChapterImageSlider.isAudioLoop,videoTime:o.videoTime,isEdittingChapterText:o.isEdittingChapterText,highlightEditInfo:o.highlightEditInfo,chapterId:!!(null===(r=o.chapterHighlighting)||void 0===r?void 0:r.uid),showLock:a.showLock}}),(function(e){return{getChapterSemanticBlocks:function(t,n,r){return e(Q.e.getChapterSemanticBlocks(t,n,r))},displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))},updateChapterImageSlider:function(t){return e(Q.d.updateChapterImageSlider(t))},displaySlide:function(t){return e(Q.d.displaySlide(t))},setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))},updateSbContent:function(t,n,r){return e(Q.e.updateSbContent(t,n,r))},updateMultipleSbContent:function(t,n,r){return e(Q.e.updateMultipleSbContent(t,n,r))},updateCurrentSbData:function(t){return e(Q.e.updateCurrentSbData(t))},updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))},retranscribeVideo:function(t){return e(Q.e.retranscribeVideo(t))},importSubtitle:function(t,n,r){return e(Q.e.importSubtitle(t,n,r))},setActiveChapter:function(t){return e(Q.e.setActiveChapter(t))}}}),null,{forwardRef:!0}))(By),Fy=r(35),Uy=r.n(Fy);x.g.LOOP_MODE,x.g.SRC_SET_TIME;var Hy=x.g.CHAPTER_TYPES,zy=x.g.VIDEO_CATEGORY,Vy=x.g.HIGHLIGHTS,Wy=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"bookmarkPlay",(function(t){var n=e.props,r=n.updateHighlightMode,i=n.isVideoPlayingHighlightMode,a=n.isHighlightLoop,o=n.cogvidDetails,s=x.c.getCurrentVideoCategory(),l=x.r.filterHighlight(t);if(t===i)a&&r({}),x.r.cancelHighlightPlay();else{if(s===zy.EXPLORING){var c=[];return Object(Y.get)(o,"chapters",[]).filter((function(e){return Hy.ATTACHMENT_ONLY.key!==e.type&&e.accessible})).map((function(e){c=[].concat(Rl()(c),Rl()(x.r.filterHighlightInAChapter(l,e)))})),void x.r.setModeToPlay({isVideoPlayingHighlightMode:t},c,{willPlay:!0})}x.r.setModeToPlay({isVideoPlayingHighlightMode:t},l,{willPlay:!0})}})),G()(V()(e),"handleLoopBookmark",(function(){var t=e.props,n=t.isHighlightLoop,r=t.updateHighlightMode,i=t.chapterHighlighting;if(r({loop:!n}),!n){var a=[];if(x.c.isExploring()){var o=x.r.filterHighlight(e.props.isVideoPlayingHighlightMode);a=x.r.filterHighlightInAChapter(o,i)}else a=x.r.filterHighlight(e.props.isVideoPlayingHighlightMode);x.r.setModeToPlay({isVideoPlayingHighlightMode:e.props.isVideoPlayingHighlightMode},a)}})),G()(V()(e),"isLoopChapter",(function(t){var n=x.c.getCurrentVideoCategory(),r=x.r.filterHighlight(t);if(r.length&&n===zy.EXPLORING){var i=e.props.cogvidDetails,a=Object(Y.get)(i,"chapters",[]).filter((function(e){return Hy.ATTACHMENT_ONLY.key!==e.type&&e.accessible}));return!!a.length&&a.some((function(e){return!!x.r.filterHighlightInAChapter(r,e).length}))}return!!r.length})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.isVideoPlayingHighlightMode,i=n.isHighlightLoop,a=n.isToolbarShown,o=n.isDisabledAllButtons,s=n.chapterHighlighting,l=x.c.getCurrentVideoCategory(),c=this.isLoopChapter(Vy.ORANGE),u=this.isLoopChapter(Vy.BLUE),d=[Vy.ORANGE,Vy.BLUE].includes(r),h=r===Vy.ORANGE?Vy.ORANGE:"",f=[zy.LEARNING].includes(l);return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()("d-flex align-items-center")},v.a.createElement(Qt,{onClick:function(){return x.r.jumpToPrevHighlight()},disabled:!r||o,tooltipText:t(h?"tooltip.highlightPrevPart":"tooltip.highlightPrevPartDisabled",{color:h}),className:P()(Uy.a.quickBtn)},v.a.createElement("i",{className:P()("fv fuvi-pre-btn-ex",Uy.a["color-".concat(h)])})),v.a.createElement(Qt,{active:r===Vy.ORANGE,onClick:function(){return e.bookmarkPlay(Vy.ORANGE)},disabled:!c||a||o||(null==s?void 0:s.type)!==Hy.EPISODIC.key,tooltipText:t(r===Vy.ORANGE?"tooltip.cancelHighlightPlay":"tooltip.highlightPlay",{color:Vy.ORANGE}),className:P()(Uy.a.quickBtn)},r===Vy.ORANGE?v.a.createElement("i",{className:"fv fuvi-play-east-blue"},v.a.createElement("span",{className:P()("path1",Uy.a["color-".concat(Vy.ORANGE)])}),v.a.createElement("span",{className:"path2"})):v.a.createElement("i",{className:"fv fuvi-stop-east-blue"},v.a.createElement("span",{className:P()("path1",Uy.a["color-".concat(Vy.ORANGE)])}),v.a.createElement("span",{className:"path2"}))),f&&v.a.createElement(Qt,{active:r===Vy.BLUE,onClick:function(){return e.bookmarkPlay(Vy.BLUE)},disabled:!u||a||o||(null==s?void 0:s.type)!==Hy.EPISODIC.key,tooltipText:t(r===Vy.BLUE?"tooltip.cancelHighlightPlay":"tooltip.highlightPlay",{color:Vy.BLUE}),className:P()(Uy.a.quickBtn)},r===Vy.BLUE?v.a.createElement("i",{className:"fv fuvi-play-east-blue"},v.a.createElement("span",{className:P()("path1",Uy.a["color-".concat(Vy.BLUE)])}),v.a.createElement("span",{className:"path2"})):v.a.createElement("i",{className:"fv fuvi-stop-east-blue"},v.a.createElement("span",{className:P()("path1",Uy.a["color-".concat(Vy.BLUE)])}),v.a.createElement("span",{className:"path2"}))),i?v.a.createElement(Qt,{active:!0,disabled:!d||o,onClick:this.handleLoopBookmark,tooltipText:t(h?"tooltip.highlightLoop":"tooltip.highlightLoopDisabled",{color:h}),className:P()(Uy.a.quickBtn,Uy.a.quickBtnActive)},v.a.createElement("i",{className:"fv fuvi-repeat-icon-s"})):v.a.createElement(Qt,{disabled:!d||o,onClick:this.handleLoopBookmark,tooltipText:t(h?"tooltip.highlightLoop":"tooltip.highlightLoopDisabled",{color:h}),className:P()(Uy.a.quickBtn)},v.a.createElement("i",{className:"fv fuvi-repeat-icon-s1"})),v.a.createElement(Qt,{onClick:function(){return x.r.jumpToNextHighlight()},disabled:!r||o,tooltipText:t(h?"tooltip.highlightNextPart":"tooltip.highlightNextPartDisabled",{color:h}),className:P()(Uy.a.quickBtn)},v.a.createElement("i",{className:P()("fv fuvi-next-btn-ex",Uy.a["color-".concat(h)])}))))}}]),r}(g.Component),Gy=Object(q.b)((function(e){var t=e.cogvid,n=e.canvas;return{isVideoPlayingHighlightMode:t.highlightMode.mode,isHighlightLoop:t.highlightMode.loop,chapterHighlighting:t.chapterHighlighting,isToolbarShown:n.isToolbarShown,cogvidDetails:t.cogvidDetails}}),(function(e){return{updateHighlightMode:function(t){return e(Q.e.updateHighlightMode(t))},setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))}}}))(Wy);var qy=x.g.HIGHLIGHTS,Yy=x.g.VIDEO_CATEGORY,Ky=x.g.TYPE_EDITING,Xy=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isDelelingHighlight:!1}),G()(V()(e),"handleStartClick",(function(t,n){t.stopPropagation();var r=e.props,i=r.setEditHighLightBookmark,a=r.highlightEditInfo,o=void 0===a?{}:a,s=r.currentSbData.hightLightActive,l=void 0===s?{}:s,c=n!==o.color;if(!x.r.paused()&&x.r.pause(),[Ky.HIGHLIGHT_ADD_START,Ky.HIGHLIGHT_ADD_END].includes(o.editMode)||!l[n]&&o.editMode!==Ky.HIGHLIGHT_EDITING_START)return e.handleBtnClick(t,n);i({color:c?n:"",id:c?l[n]:"",editMode:c?Ky.HIGHLIGHT_EDITING_START:""})})),G()(V()(e),"handleEndClick",(function(t,n){t.stopPropagation();var r=e.props,i=r.setEditHighLightBookmark,a=r.highlightEditInfo,o=void 0===a?{}:a,s=r.currentSbData.hightLightActive,l=void 0===s?{}:s,c=n!==o.color;if(!x.r.paused()&&x.r.pause(),[Ky.HIGHLIGHT_ADD_START,Ky.HIGHLIGHT_ADD_END].includes(o.editMode)||!l[n]&&o.editMode!==Ky.HIGHLIGHT_EDITING_END)return e.handleBtnClick(t,n);i({color:c?n:"",id:c?l[n]:"",editMode:c?Ky.HIGHLIGHT_EDITING_END:"",startTime:null})})),G()(V()(e),"handleBtnClick",(function(t,n){t.stopPropagation();var r=e.props,i=r.setEditHighLightBookmark,a=r.highlightEditInfo,o=void 0===a?{}:a,s=n!==o.color;!x.r.paused()&&x.r.pause(),[Ky.HIGHLIGHT_EDITING_START,Ky.HIGHLIGHT_EDITING_END].includes(o.editMode)||i({color:s?n:"",id:"",startTime:null,editMode:s?Ky.HIGHLIGHT_ADD_START:""})})),G()(V()(e),"handleDeleteHighlightButton",(function(t){var n=e.props,r=n.highlightEditInfo,i=r.color,a=void 0===i?"":i,o=(r.editMode,n.currentSbData.hightLightActive),s=void 0===o?{}:o,l=n.setEditHighLightBookmark;e.setState({isDelelingHighlight:!0},(function(){l({color:t,id:s[a],editMode:Ky.HIGHLIGHT_EDITING_END}),Object(x.m)((function(){e.setState({isDelelingHighlight:!1})}))}))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state.isDelelingHighlight,r=this.props,i=r.highlightEditInfo,a=i.color,o=void 0===a?"":a,s=i.editMode,l=void 0===s?"":s,c=r.currentSbData.hightLightActive,u=void 0===c?{}:c,d=r.typeEditting,h=r.isDisabledAllButtons,f=r.isEnabledEditContent,p=r.deleteHighlightInfo,m=r.toggleDelHighlightModal,g=x.c.getCurrentVideoCategory(),b=!!d||!f||h,y=[Yy.COMPOSING,Yy.HOME,Yy.EXPERIENCING].includes(g),A=[Yy.LEARNING].includes(g),_=A?qy.BLUE:qy.ORANGE;return v.a.createElement("div",{className:P()("d-flex align-items-center")},(y||A)&&v.a.createElement(Qt,{disabled:!u[_],onClick:function(){return m(_)},tooltipText:t("tooltip.delCurrentHighlight",{color:_})},v.a.createElement("i",{className:P()("fv fuvi-trash-can",y?Uy.a["color-".concat(qy.ORANGE)]:Uy.a["color-".concat(qy.BLUE)])})),y&&v.a.createElement("div",{className:P()("d-flex align-items-center")},v.a.createElement(Jt,{onClick:function(t){return e.handleBtnClick(t,qy.ORANGE)},onStartClick:function(t){return e.handleStartClick(t,qy.ORANGE)},onEndClick:function(t){return e.handleEndClick(t,qy.ORANGE)},color:qy.ORANGE,active:!!u.ORANGE,isEditing:o===qy.ORANGE,editMode:l,disabled:b})),A&&v.a.createElement(Jt,{onClick:function(t){return e.handleBtnClick(t,qy.BLUE)},onStartClick:function(t){return e.handleStartClick(t,qy.BLUE)},onEndClick:function(t){return e.handleEndClick(t,qy.BLUE)},color:qy.BLUE,active:!!u.BLUE,isEditing:o===qy.BLUE,editMode:l,disabled:b}),v.a.createElement(IC,{show:Boolean(p),isProgressing:n,message:t("modal.delHighlightConfirmModal",{name:p}),onConfirm:function(){e.handleDeleteHighlightButton(p)},onClose:function(){return m("")}}))}}]),r}(g.Component),Qy=Object(q.b)((function(e){return{highlightEditInfo:e.cogvid.highlightEditInfo,currentSbData:e.cogvid.currentSbData,typeEditting:e.common.typeEditting,videoId:e.cogvid.cogvidDetails.videoId,deleteHighlightInfo:e.common.deleteHighlightInfo}}),(function(e){return{setEditHighLightBookmark:function(t){return e(Q.e.setEditHighLightBookmark(t))},toggleDelHighlightModal:function(t){return e(Q.f.toggleDelHighlightModal(t))}}}))(Xy);function $y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$y(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zy=x.g.VIDEO_CATEGORY,eA=x.g.POSITION,tA=x.g.SUPPORTED_VIDEO_TYPES,nA=x.g.CHAPTER_TYPES,rA=x.g.TYPE_EDITING,iA=(x.g.PLAYING_CHAPTER_ORDER,x.g.LOOP_MODE,x.g.SRC_SET_TIME),aA=(x.g.ATTACHED_SUCCESSFULLY,x.g.VIDEO_TYPE),oA=x.g.CHAPTER_LIST_FONT,sA=x.g.CHAPTER_TEXT_DEFAULT_PIXEL_SIZE,lA=x.g.CHAPTER_PROCESSING_STATUS,cA=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"addHeadingChapterButton",Object(g.createRef)()),G()(V()(e),"state",{showConfirmationModal:!1,isResetChapter:!1,isUpdatingCoverImage:!1,isShowCreateChapterCoverForm:!1,snapshot:"",deletedSlide:""}),G()(V()(e),"shouldComponentUpdate",(function(t,n){var r={},i={},a=["timestamp","blockSeq"];return Object.keys(e.props).forEach((function(n){a.includes(n)||"function"==typeof e.props[n]||(r[n]=e.props[n],i[n]=t[n])})),!Object(Y.isEqual)(r,i)||!Object(Y.isEqual)(n,e.state)})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.chapterHighlighting,r=void 0===n?{}:n,i=e.props.chapterHighlighting,a=void 0===i?{}:i;r.uid!==a.uid&&e.setState({isUpdatingCoverImage:!1})})),G()(V()(e),"handleMoveToOffsetOfVideo",(function(t){var n,r;(0,e.props.setUpdateVideoTime)({setTimeFrom:iA.CG,currentTime:t}),null===(n=window)||void 0===n||null===(r=n.audioPlayer)||void 0===r||r.currentTime(t)})),G()(V()(e),"activeEditingTarget",(function(t){var n=e.props,r=n.typeEditting===t?"":t;(0,n.setTypeEditting)(r),window.globalTypeEditting=r})),G()(V()(e),"handleTextButtonClick",(function(){var t=e.props,n=t.isEdittingChapterText,r=t.toggleEdittingChapterTextMode,i=t.isCopyChapterStyle,a=t.enableCopyChapterStyle;i&&a(),r(!n)})),G()(V()(e),"handleCaIconMouseLeave",(function(){window.isCABtnHovered=!1,x.c.closeChapterAttachmentModal()})),G()(V()(e),"toggleDisplayContextualImg",(function(){var t=e.props,n=t.showContextualImg,r=t.timestamp,i=t.videoId;(0,t.updateShowContextualImg)({ctxBg:!n,timePoint:r,videoId:i,blockSeq:t.blockSeq})})),G()(V()(e),"handleUpdateCoverImageMouseEnter",(function(){var t=e.props,n=t.rootContext,r=t.chapterHighlighting;(0,t.displayMiniCoverImage)("".concat(n).concat(r.image))})),G()(V()(e),"handleUpdateCoverImageMouseLeave",(function(){(0,e.props.displayMiniCoverImage)()})),G()(V()(e),"handleUpdateCoverImage",(function(t){t.stopPropagation(),x.r.pause();var n=e.props.displayMiniCoverImage;e.setState({isUpdatingCoverImage:!0}),n(),setTimeout((function(){x.c.snapshotFirstArea((function(t){e.setState({snapshot:t,isUpdatingCoverImage:!1},(function(){return e.toggleOpenCreateVideoCoverForm(!0)}))}))}))})),G()(V()(e),"toggleOpenCreateVideoCoverForm",(function(t){e.setState({isShowCreateVideoCoverForm:t})})),G()(V()(e),"handleReplaceChapterVideo",(function(n){if(x.r.paused()||x.r.pause(),n.length<=0)x.e.warn(t("message.selectOneVideo"));else{var r=e.props.chapterHighlighting;e.loopFilesToInsert(n,null==r?void 0:r.uid,0,null==r?void 0:r.seqNumber,eA.REPLACE)}})),G()(V()(e),"handleInsertVideo",(function(n){if(x.r.paused()||x.r.pause(),n.length<=0)x.e.warn(t("message.selectOneVideo"));else{var r=e.props,i=r.chapterHighlighting,a=r.chapters,o=(null==i?void 0:i.type)===nA.ATTACHMENT_ONLY.key?i:Object(Y.maxBy)(a.filter((function(e){return e.partId===(null==i?void 0:i.partId)})),"seqNumber");e.loopFilesToInsert(n,null==o?void 0:o.uid,0,null==o?void 0:o.seqNumber)}})),G()(V()(e),"loopFilesToInsert",(function(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:eA.BEFORE,o=e.props,s=o.insertVideo,l=o.videoId,c=o.videoTitle;s({file:t[r],chapterId:n,videoId:l,title:c,position:a,seqNumber:i},(function(){x.c.handleDisplayDataForRetranscodingVideo({videoId:l}),r<t.length-1&&e.loopFilesToInsert(t,n,r+1)}))})),G()(V()(e),"setfontStyle",(function(t){var n=Object(Y.get)(e.props,"chapterHighlighting.attributes.fontstyle",[]);e.updateChapterStyle({fontstyle:n.indexOf(t)>=0?n.filter((function(e){return e!==t})):n.concat([t])})})),G()(V()(e),"setChapterColor",(function(t){var n=Object(Y.get)(e.props,"chapterHighlighting.attributes",{});e.updateChapterStyle(Jy(Jy({},n),t))})),G()(V()(e),"handleEnabledCopyChapterStyle",(function(){x.r.pause(),e.props.enableCopyChapterStyle()})),G()(V()(e),"updateChapterStyle",(function(t){var n=e.props,r=n.setChapterStyle,i=n.videoId,a=n.chapterHighlighting,o=n.enableCopyChapterStyle,s=n.isCopyChapterStyle;!t&&s&&o(),r({videoId:i,chapterId:a.seqNumber,attributes:t?Jy(Jy({},a.attributes||{}),t):{}})})),G()(V()(e),"handleCopyChapters",(function(){var t=e.props,n=t.videoId,r=t.chapters;(0,t.displayCopyChaptersModal)({videoId:n,chapters:r})})),G()(V()(e),"handleSwapChapters",(function(){var t=e.props,n=t.videoId,r=t.chapterHighlighting,i=t.chapters,a=t.displaySwapChaptersModal;a&&a({videoId:n,chapter:r,chapters:i})})),G()(V()(e),"handleAudioLoopToggle",(function(){var t=e.props,n=t.isAudioLoop;(0,t.updateChapterImageSlider)({isAudioLoop:!n})})),G()(V()(e),"handleNextChapterClick",(function(){var t=e.props.chapterHighlighting;x.r.pause(),e.handleMoveToOffsetOfVideo((t.endTime-30)/1e3)})),G()(V()(e),"handleDeleteSlide",(function(t){var n=e.props.onDeletingSlide;try{n&&n(t)}finally{e.setState({deletedSlide:""})}})),G()(V()(e),"handleBeforeUploadVideo",(function(t,n,r){var i=e.props,a=i.getVideoState,o=i.updateCogvidListItem;a({videoId:t},(function(e){var i=e.status;if(o({videoId:t,data:{cognitiveVideo:{status:i}}}),"CVS_UPDATING"==i||"CVS_PUBLISHING"==i)return x.e.info("There is an update running. Please refresh and try later!");r(n)}),(function(e){console.log(e)}))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.chapterHighlighting,i=void 0===r?{}:r,a=n.typeEditting,o=n.isEdittingChapterText,s=n.highlightEditInfo,l=void 0===s?{}:s,c=n.videoId,u=n.videoStatus,d=n.isDisabledAllButtons,h=n.isEnabledEditContent,f=n.currentActiveVideoType,p=n.isCopyChapterStyle,m=n.isEditableMenu,g=n.isEditBtnsHidden,b=n.isScrollingCogvidItem,y=n.deleteChapterInfo,A=n.toggleDelChapterModal,_=n.isComposingVideo,w=n.isVideoOwner,E=n.subscriptionOptions,S=n.isAudioLoop,C=n.slideIndex,T=n.isVideoActive,k=n.isFoundationUpdating,O=n.isUnderstandingUpdating,M=n.isThumbnailUpdating,D=n.isCoverImageUpdating,N=n.fslideExisted,L=n.uslideExisted,R=n.thumbnailExisted,B=n.onFoundationChange,j=n.onUnderstandingChange,F=n.onThumbnailChange,U=n.onCoverImageChange,H=null==E?void 0:E.videoManipulationPermission,z=this.state,V=z.snapshot,W=z.showConfirmationModal,G=z.isResetChapter,q=(z.isUpdatingCoverImage,z.isShowCreateVideoCoverForm),K=z.deletedSlide,X=x.c.getCurrentVideoCategory(),Q=x.c.isExploring(),$=Zy.HOME===X&&i.isTemplateChapter,J=[nA.ATTACHMENT_ONLY.key].includes(i.type),Z=[nA.EPISODIC.key].includes(i.type),ee=!i.uid||!!i.processingStatus&&i.processingStatus!=lA.NONE,te=!!l.color||!h||d||ee||J,ne=ee||!!l.color||!h||d,re=d&&!_,ie=Object(Y.get)(i,"attributes",{}),ae=Object(Y.get)(i,"attributes.fontstyle",[]),oe=[Zy.COMPOSING,Zy.HOME,Zy.REVIEW].includes(X),se=(m&&f!==aA.GALLERY&&Zy.LEARNING,"CVS_UPDATING"==u||"CVS_PUBLISHING"==u||!H||!h||re);if(Q)return C>-1&&v.a.createElement("div",{className:"d-flex u-flex-center u-fs-3o4 u-fw-500"},v.a.createElement(Qt,{className:P()(Uy.a.quickBtn),onClick:this.handleAudioLoopToggle,tooltipText:t("tooltip.chapterLoopOneChapterMode")},S?v.a.createElement("img",{width:22,src:I.a.loop,alt:"loop icon"}):v.a.createElement("img",{width:22,src:I.a.loopNon,alt:"no loop icon"})),S?"Slide in Loop Mode":"Slide in 1 by 1 Mode. Click to switch to Loop Mode");var le="T"===K?"The thumbnail will be deleted. Do you want to continue?":"The ".concat(K," slide will be deleted. Do you want to continue?");return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"d-flex align-items-center ".concat(Uy.a.chapterGroupBtn)},v.a.createElement("div",{className:P()(Uy.a.expandable)},v.a.createElement("div",{className:P()(Uy.a.icon,"u-bg-dark-blue-bold")},v.a.createElement("span",null,"T")),v.a.createElement(QT,{receiveAcceptedFiles:F,isDisabled:!w||!T||M,acceptedFiles:x.g.SUPPORTED_IMG_TYPES},v.a.createElement(Qt,{tooltipText:t("tooltip.updateThumbnail"),classNameWrapper:P()(Uy.a.iconSmall,"u-bg-dark-blue-bold"),disabled:!w||!T||M,isLoading:M},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-up-arrow"})))),v.a.createElement(Qt,{disabled:!w||!T||M||!R,isLoading:M,tooltipText:"Delete",classNameWrapper:P()(Uy.a.iconSmall,"u-bg-dark-blue-bold"),onClick:function(){document.activeElement.blur(),e.setState({deletedSlide:"T"})}},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-trash-can"})))),!g&&v.a.createElement(v.a.Fragment,null,v.a.createElement(Qt,{btnRef:function(t){return e.addHeadingChapterButton=t},disabled:se,tooltipText:t("attachmentOnlyBefore"),className:P()(Uy.a.quickBtn),onClick:function(e){return Object(x.j)(Jy(Jy({},e),{},{position:"before"}),nA.ATTACHMENT_ONLY.key)}},v.a.createElement("i",{className:"fv fuvi-chapter-heading-before"}))),v.a.createElement("div",{className:P()(Uy.a.expandable)},v.a.createElement("div",{className:P()(Uy.a.icon,"u-bg-red")},v.a.createElement("span",null,"F")),v.a.createElement(QT,{receiveAcceptedFiles:B,isDisabled:!w||!T||k,acceptedFiles:x.g.SUPPORTED_IMG_TYPES},v.a.createElement(Qt,{tooltipText:t("tooltip.updateFoundation"),classNameWrapper:P()(Uy.a.iconSmall,"u-bg-red"),disabled:!w||!T||k,isLoading:k},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-up-arrow"})))),v.a.createElement(Qt,{disabled:!w||!T||k||!N,isLoading:k,tooltipText:"Delete",classNameWrapper:P()(Uy.a.iconSmall,"u-bg-red"),onClick:function(){document.activeElement.blur(),e.setState({deletedSlide:"F"})}},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-trash-can"})))),v.a.createElement("div",{className:P()(Uy.a.expandable)},v.a.createElement("div",{className:P()(Uy.a.icon,"u-bg-grey")},v.a.createElement("span",null,"U")),v.a.createElement(QT,{receiveAcceptedFiles:j,isDisabled:!w||!T||O,acceptedFiles:x.g.SUPPORTED_IMG_TYPES},v.a.createElement(Qt,{disabled:!w||!T||O,type:"file",isLoading:O,tooltipText:t("tooltip.updateUnderstanding"),classNameWrapper:P()(Uy.a.iconSmall,"u-bg-grey")},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-up-arrow"})))),v.a.createElement(Qt,{disabled:!w||!T||O||!L,isLoading:O,tooltipText:"Delete",classNameWrapper:P()(Uy.a.iconSmall,"u-bg-grey"),onClick:function(){document.activeElement.blur(),e.setState({deletedSlide:"U"})}},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-trash-can"})))),v.a.createElement(QT,{receiveAcceptedFiles:this.handleReplaceChapterVideo,isDisabled:se,acceptedFiles:tA,multiple:!1,onCheckStatusBeforeAction:function(t,n){return e.handleBeforeUploadVideo(c,t,n)}},v.a.createElement(Qt,{disabled:se,tooltipText:t("tooltip.updateChapterVideo"),classNameWrapper:P()(Uy.a.icon,"u-bg-blue")},v.a.createElement("span",null,"V"))),v.a.createElement(QT,{receiveAcceptedFiles:U,isDisabled:!w||!T||D,acceptedFiles:x.g.SUPPORTED_IMG_TYPES},v.a.createElement(Qt,{tooltipText:t("tooltip.updateChapterCoverImage"),classNameWrapper:P()(Uy.a.icon,"bg-secondary"),disabled:ee||d||!h||D,isLoading:D},v.a.createElement("span",null,"I"))),!g&&v.a.createElement(Qt,{disabled:se,tooltipText:t("tooltip.copyChapters"),className:P()(Uy.a.quickBtn),onClick:this.handleCopyChapters},v.a.createElement("i",{className:"fv fuvi-clone-file"})),!g&&v.a.createElement(Qt,{disabled:se,tooltipText:t("tooltip.swapChapters"),className:P()(Uy.a.quickBtn),onClick:this.handleSwapChapters},v.a.createElement("i",{className:"fv fuvi-repeat-icon"})),!g&&v.a.createElement(Qt,{disabled:te||!i.uid,onClick:function(){e.activeEditingTarget(rA.CHAPTER_EDITING_START)},className:P()(Uy.a.quickBtn,{activeButton:a===rA.CHAPTER_EDITING_START},Uy.a.quickBtnActive&&a===rA.CHAPTER_EDITING_START),tooltipText:t("tooltip.chapterEditStartTime")},v.a.createElement("i",{className:"fv fuvi-bracket-open"})),v.a.createElement(Qt,{disabled:b||!Z,onClick:function(){return e.handleMoveToOffsetOfVideo(i.startTime/1e3)},className:P()(Uy.a.quickBtn),tooltipText:t("tooltip.chapterMoveToStartTime")},v.a.createElement("i",{className:"fv fuvi-arrow-left"})),v.a.createElement(Qt,{className:P()(Uy.a.quickBtn,S&&Uy.a.quickBtnActive),onClick:this.handleAudioLoopToggle,tooltipText:t("tooltip.chapterLoopOneChapterMode")},S?v.a.createElement("img",{width:22,src:I.a.loop,alt:"loop icon"}):v.a.createElement("img",{width:22,src:I.a.loopNon,alt:"no loop icon"})),v.a.createElement(Qt,{disabled:b||!Z,onClick:this.handleNextChapterClick,className:P()(Uy.a.quickBtn),tooltipText:t("tooltip.chapterMoveToEndTime")},v.a.createElement("i",{className:"fv fuvi-arrow-right"})),!g&&v.a.createElement(Qt,{disabled:te||!i.uid,onClick:function(){e.activeEditingTarget(rA.CHAPTER_EDITING_END)},className:P()(Uy.a.quickBtn,{activeButton:a===rA.CHAPTER_EDITING_END},Uy.a.quickBtnActive&&a===rA.CHAPTER_EDITING_END),tooltipText:t("tooltip.chapterEditEndTime")},v.a.createElement("i",{className:"fv fuvi-bracket-close"})),!g&&v.a.createElement(v.a.Fragment,null,oe&&v.a.createElement(Qt,{disabled:ee||d||$,onClick:function(){return Object(x.l)()},className:P()(Uy.a.quickBtn),tooltipText:t("tooltip.delCurrentChapter")},v.a.createElement("i",{className:"fv fuvi-trash-can"})))),!g&&v.a.createElement(Qt,{disabled:ne,onClick:this.handleTextButtonClick,tooltipText:t("tooltip.chapterEnabledEditTitle"),className:P()(Uy.a.quickBtn,o&&Uy.a.quickBtnActive)},v.a.createElement("i",{className:"fv fuvi-text-icon",style:{fontSize:"1rem"}})),!g&&v.a.createElement(v.a.Fragment,null,v.a.createElement(Kt.a,{rootClose:!0,trigger:ne?null:"click",placement:"top",overlay:v.a.createElement(on,null,v.a.createElement(on.Content,null,v.a.createElement("ul",{className:Uy.a.fontSizeList},oA.map((function(t,n){return v.a.createElement("li",{key:n,onClick:function(){return e.updateChapterStyle({fontsize:t})},className:P()((ie.fontsize||sA)==t&&Uy.a.fontSizeListActive)},t)})))))},v.a.createElement("div",{className:Uy.a.fontSizeWrap},v.a.createElement("input",{value:ie.fontsize||sA,type:"text",readOnly:!0,style:{cursor:ne?"default":"pointer"}}))),v.a.createElement("div",{className:Uy.a.lineGroup}),v.a.createElement(Qt,{onClick:function(){return e.setfontStyle("B")},disabled:ne,className:P()(Uy.a.quickBtn,ae.indexOf("B")>=0&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterMakeTextBold")},v.a.createElement("i",{className:"fv fuvi-bold-style",style:{fontSize:"1rem"}})),v.a.createElement(Qt,{onClick:function(){return e.setfontStyle("I")},disabled:ne,className:P()(Uy.a.quickBtn,ae.indexOf("I")>=0&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterMakeTextItalic")},v.a.createElement("i",{className:"fv fuvi-italic-style",style:{fontSize:"1rem"}})),v.a.createElement(Qt,{onClick:function(){return e.setfontStyle("U")},disabled:ne,className:P()(Uy.a.quickBtn,ae.indexOf("U")>=0&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterMakeTextUnderline")},v.a.createElement("i",{className:"fv fuvi-under-line-style",style:{fontSize:"1rem"}})),v.a.createElement("div",{className:Uy.a.lineGroup}),v.a.createElement(sn,{fillColor:ie.foreground||Um.bodyColor,onChange:function(t){return e.updateChapterStyle({foreground:t})},className:P()(Uy.a.quickBtn),disabled:ne,position:"top"},v.a.createElement("i",{className:"fv fuvi-fill-icon-copy",style:{fontSize:"1rem"}})),v.a.createElement(sn,{fillColor:ie.background||"transparent",onChange:function(t){return e.updateChapterStyle({background:t})},className:P()(Uy.a.quickBtn),disabled:ne,isTransparent:!0,position:"top"},v.a.createElement("i",{className:"fv fuvi-fill-icon",style:{fontSize:"1rem"}})),v.a.createElement(Qt,{onClick:this.handleEnabledCopyChapterStyle,disabled:ne||Object(Y.isEmpty)(ie),className:P()(Uy.a.quickBtn,p&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterCopyStyle")},v.a.createElement("i",{className:"fv fuvi-format-painter",style:{fontSize:"1rem"}})),v.a.createElement("div",{className:Uy.a.lineGroup})),v.a.createElement(IC,{show:!!W,isProgressing:G,message:t("modal.resetChapterDesc"),onConfirm:this.resetCG,onClose:function(){return e.setState({showConfirmationModal:!1})}}),v.a.createElement(IC,{show:!!(null==y?void 0:y.uid),isProgressing:G,message:t("modal.delChapterConfirmModal",{name:y.content}),onConfirm:function(){A({}),Object(x.h)()},onClose:function(){return A({})}}),q&&v.a.createElement(dD,{capturedImage:URL.createObjectURL(V),snapshotBlob:V,onClose:function(){return e.toggleOpenCreateVideoCoverForm(!1)}}),!!K&&v.a.createElement(IC,{show:!0,isProgressing:G,message:le,onConfirm:function(){return e.handleDeleteSlide(K)},onClose:function(){return e.setState({deletedSlide:""})}}))}}]),r}(g.Component),uA=Object(q.b)((function(e){var t,n,r,i=e.cogvid,a=e.common,o=e.canvas,s=e.auth,l=e.cg;return{userId:s.userInfo.userId,subscriptionOptions:s.userInfo.subscriptionOptions,typeEditting:a.typeEditting,chapterHighlighting:i.chapterHighlighting,chapters:(null===(t=i.cogvidDetails)||void 0===t?void 0:t.chapters)||[],videoId:i.cogvidDetails.videoId,ownerId:i.cogvidDetails.ownerId,rootContext:i.cogvidDetails.rootContext,currentActiveVideoType:i.cogvidDetails.videoType,videoTitle:null===(n=i.cogvidDetails.cognitiveVideo)||void 0===n?void 0:n.title,videoStatus:null===(r=i.cogvidDetails.cognitiveVideo)||void 0===r?void 0:r.status,isEdittingChapterText:i.isEdittingChapterText,highlightEditInfo:i.highlightEditInfo,chapterAttachments:i.chapterAttachments,showContextualImg:o.showContextualImg,timestamp:i.currentSbData.timestamp,blockSeq:i.currentSbData.blockSeq,isCopyChapterStyle:i.isCopyChapterStyle,deleteChapterInfo:a.deleteChapterInfo,isAudioLoop:l.showChapterImageSlider.isAudioLoop,slideIndex:l.showChapterCoverImageSlide,fslideExisted:l.fslideExisted,uslideExisted:l.uslideExisted,thumbnailExisted:l.thumbnailExisted}}),(function(e){return{setTypeEditting:function(t){return e(Q.f.setTypeEditting(t))},toggleEdittingChapterTextMode:function(t){return e(Q.e.toggleEdittingChapterTextMode(t))},setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))},updateShowContextualImg:function(t){return e(Q.b.updateShowContextualImg(t))},displayMiniCoverImage:function(t){return e(Q.e.displayMiniCoverImage(t))},insertVideo:function(t,n,r){return e(Q.e.insertVideo(t,n,r))},setChapterStyle:function(t,n,r){return e(Q.e.setChapterStyle(t,n,r))},enableCopyChapterStyle:function(){return e(Q.e.enableCopyChapterStyle())},displayVideoAttachments:function(t){return e(Q.e.displayVideoAttachments(t))},updateReviewAttachment:function(t,n,r){return e(Q.e.updateReviewAttachment(t,n,r))},toggleDelChapterModal:function(t){return e(Q.f.toggleDelChapterModal(t))},displayCopyChaptersModal:function(t){return e(Q.e.displayCopyChaptersModal(t))},updateChapterImageSlider:function(t){return e(Q.d.updateChapterImageSlider(t))},displaySwapChaptersModal:function(t){return e(Q.e.displaySwapChaptersModal(t))},getVideoState:function(t,n,r){return e(Q.e.getVideoState(t,n,r))},updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))}}}))(Object(K.c)(cA));var dA=x.g.VIDEO_TYPE,hA=x.g.VIDEO_MENU_BASE_URL,fA=x.g.VIDEO_CATEGORY,pA=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isShowCreateVideoCoverForm:!1,isChangingCoverImage:!1,snapshot:""}),G()(V()(e),"snapshotFirstArea",(function(){(0,e.props.displayMiniCoverImage)(),setTimeout((function(){x.c.snapshotFirstArea((function(t){e.setState({snapshot:t},(function(){e.toggleOpenCreateVideoCoverForm(!0)}))}))}))})),G()(V()(e),"activeGalleryVideo",(function(){var t=e.props,n=t.getGalleryVideo,r=t.activeCogvidItem;n((function(e){r({videoData:e,url:hA.EXPERIENCING,videoType:dA.GALLERY})}))})),G()(V()(e),"toggleOpenCreateVideoCoverForm",(function(t){var n=e.props.toggleOpenPopup;e.setState({isShowCreateVideoCoverForm:t}),n(t)})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.isEnabledEditContent,i=n.isDisabledAllButtons,a=n.currentActiveVideoType,o=n.thumbnailUrl,s=n.displayMiniCoverImage,l=n.isEditBtnsHidden,c=n.isComposingVideo,u=n.ownerId,d=n.userId,h=x.c.getCurrentVideoCategory(),f=this.state,p=f.isShowCreateVideoCoverForm,m=f.isChangingCoverImage,g=f.snapshot,b=h===fA.EXPERIENCING,y=fA.HOME===h&&u!==d;return v.a.createElement(v.a.Fragment,null,p&&v.a.createElement(GP,{capturedImage:URL.createObjectURL(g),snapshotBlob:g,onClose:function(){return e.toggleOpenCreateVideoCoverForm(!1)}}),v.a.createElement("canvas",{id:"canvas",hidden:!0}),!l&&v.a.createElement(Qt,{disabled:y||!r||i&&!c||a===dA.GALLERY,onClick:this.snapshotFirstArea,tooltipText:t("tooltip.setVideoCoverImg"),isLoading:m,onMouseEnter:function(){return!m&&s(o)},className:P()(Uy.a.quickBtn,Uy.a.fitBtn),onMouseLeave:function(){return s()}},v.a.createElement("i",{className:P()("fv fuvi-capture_image")})),b&&v.a.createElement(Qt,{active:a!==dA.GALLERY,onClick:this.activeGalleryVideo,disabled:!a||a===dA.GALLERY,tooltipText:t("tooltip.galleryBtn")},v.a.createElement("i",{className:P()("fv fuvi-back-gallery",Uy.a.contextualImgBtn)})))}}]),r}(v.a.PureComponent),mA=Object(q.b)((function(e){var t=e.cogvid;return{userId:e.auth.userInfo.userId,ownerId:t.cogvidDetails.ownerId,currentActiveVideoType:t.cogvidDetails.videoType,thumbnailUrl:t.cogvidDetails.thumbnailUrl}}),(function(e){return{getGalleryVideo:function(t,n){return e(Q.e.getGalleryVideo(t,n))},displayMiniCoverImage:function(t){return e(Q.e.displayMiniCoverImage(t))},toggleOpenPopup:function(t){return e(Q.f.toggleOpenPopup(t))}}}))(pA);var gA=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"bookmarkPlay",(function(t){var n=e.props,r=n.updateHighlightMode,i=n.isVideoPlayingHighlightMode,a=n.isHighlightLoop,o=n.setUpdateVideoTime,s=n.cogvidDetails,l=x.c.getCurrentVideoCategory(),c=(x.g.LOOP_MODE,x.g.SRC_SET_TIME),u=x.g.VIDEO_CATEGORY,d=x.g.CHAPTER_TYPES,h=x.r.filterHighlight(t);if(o({setTimeFrom:c.PLAYER}),t===i)a&&r({}),x.r.cancelHighlightPlay();else{if(l===u.EXPLORING){var f=[];return Object(Y.get)(s,"chapters",[]).filter((function(e){return d.ATTACHMENT_ONLY.key!==e.type&&e.accessible})).map((function(e){f=[].concat(Rl()(f),Rl()(x.r.filterHighlightInAChapter(h,e)))})),void x.r.setModeToPlay({isVideoPlayingHighlightMode:t},f,{willPlay:!0})}if(l===u.BRAINHIVE){var p=[];return Object(Y.get)(s,"chapters",[]).filter((function(e){return d.ATTACHMENT_ONLY.key!==e.type})).map((function(e){p=[].concat(Rl()(p),Rl()(x.r.filterHighlightInAChapter(h,e)))})),void x.r.setModeToPlay({isVideoPlayingHighlightMode:t},p,{willPlay:!0})}x.r.setModeToPlay({isVideoPlayingHighlightMode:t},h,{willPlay:!0})}})),G()(V()(e),"handleLoopBookmark",(function(){var t=e.props,n=t.isHighlightLoop,r=t.updateHighlightMode,i=t.chapterHighlighting,a=x.c.getCurrentVideoCategory(),o=(x.g.LOOP_MODE,x.g.VIDEO_CATEGORY);if(r({loop:!n}),!n){var s=[];if(a===o.EXPLORING){var l=x.r.filterHighlight(e.props.isVideoPlayingHighlightMode);s=x.r.filterHighlightInAChapter(l,i)}else s=x.r.filterHighlight(e.props.isVideoPlayingHighlightMode);x.r.setModeToPlay({isVideoPlayingHighlightMode:e.props.isVideoPlayingHighlightMode},s)}})),G()(V()(e),"isLoopChapter",(function(t){var n=x.c.getCurrentVideoCategory(),r=x.g.VIDEO_CATEGORY,i=x.g.CHAPTER_TYPES,a=x.r.filterHighlight(t);if(a.length&&n===r.EXPLORING){var o=e.props.cogvidDetails,s=Object(Y.get)(o,"chapters",[]).filter((function(e){return i.ATTACHMENT_ONLY.key!==e.type&&e.accessible}));return!!s.length&&s.some((function(e){return!!x.r.filterHighlightInAChapter(a,e).length}))}return!!a.length})),e}return c()(r,[{key:"render",value:function(){var e,n,r=this,i=x.g.HIGHLIGHTS,a=(x.g.LOOP_MODE,this.props),o=a.isVideoPlayingHighlightMode,s=a.isHighlightLoop,l=a.isToolbarShown,c=a.isDisabledAllButtons,u=a.permissions,d=this.isLoopChapter(i.BLUE),h=this.isLoopChapter(i.ORANGE),f=o===i.BLUE||o===i.ORANGE,p=o===i.ORANGE?i.ORANGE:o===i.BLUE?i.BLUE:"";return(null===(e=u.VIDEO)||void 0===e?void 0:e.DOANYACTION)||(null===(n=u.VIDEO_COMPREHENSION_HIGHLIGHTS)||void 0===n?void 0:n.READ)?v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()("d-flex align-items-center")},v.a.createElement(Qt,{onClick:function(){return x.r.jumpToPrevHighlight()},disabled:!o||c,tooltipText:t(p?"tooltip.highlightPrevPart":"tooltip.highlightPrevPartDisabled",{color:p})},v.a.createElement("i",{className:P()("fv fuvi-pre-btn-ex",Uy.a["color-".concat(p)])})),v.a.createElement(Qt,{active:o===i.ORANGE,onClick:function(){return r.bookmarkPlay(i.ORANGE)},disabled:!h||l||c,tooltipText:t(o===i.ORANGE?"tooltip.cancelHighlightPlay":"tooltip.highlightPlay",{color:i.ORANGE})},o===i.ORANGE?v.a.createElement("i",{className:"fv fuvi-play-east-blue"},v.a.createElement("span",{className:P()("path1",Uy.a["color-".concat(i.ORANGE)])}),v.a.createElement("span",{className:"path2"})):v.a.createElement("i",{className:"fv fuvi-stop-east-blue"},v.a.createElement("span",{className:P()("path1",Uy.a["color-".concat(i.ORANGE)])}),v.a.createElement("span",{className:"path2"}))),v.a.createElement(Qt,{active:o===i.BLUE,onClick:function(){return r.bookmarkPlay(i.BLUE)},disabled:!d||l||c,tooltipText:t(o===i.BLUE?"tooltip.cancelHighlightPlay":"tooltip.highlightPlay",{color:i.BLUE})},o===i.BLUE?v.a.createElement("i",{className:"fv fuvi-play-east-blue"},v.a.createElement("span",{className:P()("path1",Uy.a["color-".concat(i.BLUE)])}),v.a.createElement("span",{className:"path2"})):v.a.createElement("i",{className:"fv fuvi-stop-east-blue"},v.a.createElement("span",{className:P()("path1",Uy.a["color-".concat(i.BLUE)])}),v.a.createElement("span",{className:"path2"}))),s?v.a.createElement(Qt,{active:!0,disabled:!f||c,onClick:function(){return r.handleLoopBookmark()},tooltipText:t(p?"tooltip.highlightLoop":"tooltip.highlightLoopDisabled",{color:p})},v.a.createElement("i",{className:"fv fuvi-repeat-icon-s"})):v.a.createElement(Qt,{disabled:!f||c,onClick:function(){return r.handleLoopBookmark()},tooltipText:t(p?"tooltip.highlightLoop":"tooltip.highlightLoopDisabled",{color:p})},v.a.createElement("i",{className:"fv fuvi-repeat-icon-s1"})),v.a.createElement(Qt,{onClick:function(){return x.r.jumpToNextHighlight()},disabled:!o||c,tooltipText:t(p?"tooltip.highlightNextPart":"tooltip.highlightNextPartDisabled",{color:p})},v.a.createElement("i",{className:P()("fv fuvi-next-btn-ex",Uy.a["color-".concat(p)])})))):null}}]),r}(g.Component),vA=Object(q.b)((function(e){var t=e.cogvid,n=e.canvas;return{isVideoPlayingHighlightMode:t.highlightMode.mode,isHighlightLoop:t.highlightMode.loop,chapterHighlighting:t.chapterHighlighting,isToolbarShown:n.isToolbarShown,cogvidDetails:t.cogvidDetails}}),(function(e){return{updateHighlightMode:function(t){return e(Q.e.updateHighlightMode(t))},setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))}}}))(gA);var bA=x.g.HIGHLIGHTS,yA=x.g.TYPE_EDITING,AA=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isDelelingHighlight:!1}),G()(V()(e),"handleStartClick",(function(t,n){t.stopPropagation();var r=e.props,i=r.setEditHighLightBookmark,a=r.highlightEditInfo,o=void 0===a?{}:a,s=r.currentSbData.hightLightActive,l=void 0===s?{}:s,c=n!==o.color;if(!x.r.paused()&&x.r.pause(),[yA.HIGHLIGHT_ADD_START,yA.HIGHLIGHT_ADD_END].includes(o.editMode)||!l[n]&&o.editMode!==yA.HIGHLIGHT_EDITING_START)return e.handleBtnClick(t,n);i({color:c?n:"",id:c?l[n]:"",editMode:c?yA.HIGHLIGHT_EDITING_START:""})})),G()(V()(e),"handleEndClick",(function(t,n){t.stopPropagation();var r=e.props,i=r.setEditHighLightBookmark,a=r.highlightEditInfo,o=void 0===a?{}:a,s=r.currentSbData.hightLightActive,l=void 0===s?{}:s,c=n!==o.color;if(!x.r.paused()&&x.r.pause(),[yA.HIGHLIGHT_ADD_START,yA.HIGHLIGHT_ADD_END].includes(o.editMode)||!l[n]&&o.editMode!==yA.HIGHLIGHT_EDITING_END)return e.handleBtnClick(t,n);i({color:c?n:"",id:c?l[n]:"",editMode:c?yA.HIGHLIGHT_EDITING_END:"",startTime:null})})),G()(V()(e),"handleBtnClick",(function(t,n){t.stopPropagation();var r=e.props,i=r.setEditHighLightBookmark,a=r.highlightEditInfo,o=void 0===a?{}:a,s=n!==o.color;!x.r.paused()&&x.r.pause(),[yA.HIGHLIGHT_EDITING_START,yA.HIGHLIGHT_EDITING_END].includes(o.editMode)||i({color:s?n:"",id:"",startTime:null,editMode:s?yA.HIGHLIGHT_ADD_START:""})})),G()(V()(e),"checkActiveHighlightButton",(function(){})),G()(V()(e),"handleDeleteHighlightButton",(function(t){var n=e.props,r=n.highlightEditInfo,i=r.color,a=void 0===i?"":i,o=(r.editMode,n.currentSbData.hightLightActive),s=void 0===o?{}:o,l=n.setEditHighLightBookmark;e.setState({isDelelingHighlight:!0},(function(){l({color:t,id:s[a],editMode:yA.HIGHLIGHT_EDITING_END}),Object(x.m)((function(){e.setState({isDelelingHighlight:!1})}))}))})),e}return c()(r,[{key:"render",value:function(){var e,n,r=this,i=this.props,a=i.highlightEditInfo,o=a.color,s=void 0===o?"":o,l=a.editMode,c=void 0===l?"":l,u=i.currentSbData.hightLightActive,d=void 0===u?{}:u,h=i.typeEditting,f=i.isDisabledAllButtons,p=i.isEnabledEditContent,m=i.permissions,g=i.toggleDelHighlightModal,b=i.deleteHighlightInfo,y=i.isVideoOwner,A=this.state.isDelelingHighlight,_=!!h||!p||f||!x.c.checkPermission(null===(e=m.VIDEO)||void 0===e?void 0:e.DOANYACTION,null===(n=m.VIDEO_COMPREHENSION_HIGHLIGHTS)||void 0===n?void 0:n.CREATE),w=y,E=!y,S=E?bA.BLUE:bA.ORANGE;return v.a.createElement("div",{className:P()("d-flex align-items-center")},(w||E)&&v.a.createElement(Qt,{disabled:!d[S],onClick:function(){return g(S)},tooltipText:t("tooltip.delCurrentHighlight",{color:S})},v.a.createElement("i",{className:P()("fv fuvi-trash-can",w?Uy.a["color-".concat(bA.ORANGE)]:Uy.a["color-".concat(bA.BLUE)])})),w&&v.a.createElement(Jt,{onClick:function(e){return r.handleBtnClick(e,bA.ORANGE)},onStartClick:function(e){return r.handleStartClick(e,bA.ORANGE)},onEndClick:function(e){return r.handleEndClick(e,bA.ORANGE)},color:bA.ORANGE,active:!!d.ORANGE,isEditing:s===bA.ORANGE,editMode:c,disabled:_}),E&&v.a.createElement(Jt,{onClick:function(e){return r.handleBtnClick(e,bA.BLUE)},onStartClick:function(e){return r.handleStartClick(e,bA.BLUE)},onEndClick:function(e){return r.handleEndClick(e,bA.BLUE)},color:bA.BLUE,active:!!d.BLUE,isEditing:s===bA.BLUE,editMode:c,disabled:_}),v.a.createElement(IC,{show:Boolean(b),isProgressing:A,message:t("modal.delHighlightConfirmModal",{name:b}),onConfirm:function(){r.handleDeleteHighlightButton(b)},onClose:function(){return g("")}}))}}]),r}(g.Component),_A=Object(q.b)((function(e){return{highlightEditInfo:e.cogvid.highlightEditInfo,currentSbData:e.cogvid.currentSbData,typeEditting:e.common.typeEditting,cogvidDetails:e.cogvid.cogvidDetails,deleteHighlightInfo:e.common.deleteHighlightInfo}}),(function(e){return{setEditHighLightBookmark:function(t){return e(Q.e.setEditHighLightBookmark(t))},toggleDelHighlightModal:function(t){return e(Q.f.toggleDelHighlightModal(t))}}}))(AA);function wA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function EA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wA(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var SA=x.g.POSITION,CA=x.g.SUPPORTED_VIDEO_TYPES,TA=x.g.CHAPTER_TYPES,kA=x.g.CHAPTER_PROCESSING_STATUS,xA=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{isUpdatingCoverImage:!1,showConfirmationModal:!1,isShowCreateVideoCoverForm:!1,isResetChapter:!1,deletedSlide:""}),G()(V()(e),"shouldComponentUpdate",(function(t,n){var r={},i={},a=["timestamp","blockSeq"];return Object.keys(e.props).forEach((function(n){a.includes(n)||"function"==typeof e.props[n]||(r[n]=e.props[n],i[n]=t[n])})),!Object(Y.isEqual)(r,i)||!Object(Y.isEqual)(n,e.state)})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.chapterHighlighting,r=e.props.chapterHighlighting,i=void 0===r?{}:r;n.uid!==i.uid&&e.setState({isUpdatingCoverImage:!1})})),G()(V()(e),"handleMoveToOffsetOfVideo",(function(t){var n,r,i,a;(0,e.props.setUpdateVideoTime)({setTimeFrom:x.g.SRC_SET_TIME.CG,currentTime:t}),!(null===(n=window)||void 0===n?void 0:null===(r=n.audioPlayer)||void 0===r?void 0:r.paused())&&(null===(i=window)||void 0===i||null===(a=i.audioPlayer)||void 0===a||a.play(t))})),G()(V()(e),"activeEditingTarget",(function(t){var n=e.props,r=n.typeEditting===t?"":t;(0,n.setTypeEditting)(r),window.globalTypeEditting=r})),G()(V()(e),"handleTextButtonClick",(function(){var t=e.props,n=t.isEdittingChapterText,r=t.toggleEdittingChapterTextMode,i=t.isCopyChapterStyle,a=t.enableCopyChapterStyle;i&&a(),r(!n)})),G()(V()(e),"handleCaIconMouseLeave",(function(){window.isCABtnHovered=!1,x.c.closeChapterAttachmentModal()})),G()(V()(e),"toggleDisplayContextualImg",(function(){var t=e.props,n=t.showContextualImg,r=t.timestamp,i=t.videoId;(0,t.updateShowContextualImg)({ctxBg:!n,timePoint:r,videoId:i,blockSeq:t.blockSeq})})),G()(V()(e),"handleUpdateCoverImageMouseEnter",(function(){var t=e.props,n=t.rootContext,r=t.chapterHighlighting;(0,t.displayMiniCoverImage)("".concat(n).concat(r.image))})),G()(V()(e),"handleUpdateCoverImageMouseLeave",(function(){(0,e.props.displayMiniCoverImage)()})),G()(V()(e),"handleUpdateCoverImage",(function(t){t.stopPropagation(),x.r.pause();var n=e.props.displayMiniCoverImage;e.setState({isUpdatingCoverImage:!0}),n(),setTimeout((function(){x.c.snapshotFirstArea((function(t){e.setState({snapshot:t,isUpdatingCoverImage:!1},(function(){return e.toggleOpenCreateVideoCoverForm(!0)}))}))}))})),G()(V()(e),"toggleOpenCreateVideoCoverForm",(function(t){e.setState({isShowCreateVideoCoverForm:t})})),G()(V()(e),"handleReplaceChapterVideo",(function(n){if(x.r.paused()||x.r.pause(),n.length<=0)x.e.warn(t("message.selectOneVideo"));else{var r=e.props.chapterHighlighting;e.loopFilesToInsert(n,null==r?void 0:r.uid,0,null==r?void 0:r.seqNumber,SA.REPLACE)}})),G()(V()(e),"handleInsertVideo",(function(n){if(n.length<=0)x.e.warn(t("message.selectOneVideo"));else{var r=e.props,i=r.chapterHighlighting,a=r.chapters,o=[TA.ATTACHMENT_ONLY.key,TA.LIVE_SESSION.key].includes(null==i?void 0:i.type)?i:Object(Y.maxBy)(a.filter((function(e){return e.partId===(null==i?void 0:i.partId)})),"seqNumber");e.loopFilesToInsert(n,null==o?void 0:o.uid,0,null==o?void 0:o.seqNumber)}})),G()(V()(e),"loopFilesToInsert",(function(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:SA.BEFORE,o=e.props,s=o.insertVideo,l=o.videoId,c=o.videoTitle;s({file:t[r],chapterId:n,videoId:l,title:c,seqNumber:i,position:a},(function(){x.c.handleDisplayDataForRetranscodingVideo({videoId:l}),r<t.length-1&&e.loopFilesToInsert(t,n,r+1)}))})),G()(V()(e),"setfontStyle",(function(t){var n=Object(Y.get)(e.props,"chapterHighlighting.attributes.fontstyle",[]);e.updateChapterStyle({fontstyle:n.indexOf(t)>=0?n.filter((function(e){return e!==t})):n.concat([t])})})),G()(V()(e),"setChapterColor",(function(t){var n=Object(Y.get)(e.props,"chapterHighlighting.attributes",{});e.updateChapterStyle(EA(EA({},n),t))})),G()(V()(e),"handleEnabledCopyChapterStyle",(function(){x.r.pause(),e.props.enableCopyChapterStyle()})),G()(V()(e),"updateChapterStyle",(function(t){var n=e.props,r=n.setChapterStyle,i=n.videoId,a=n.chapterHighlighting,o=n.enableCopyChapterStyle,s=n.isCopyChapterStyle;!t&&s&&o(),r({videoId:i,chapterId:a.seqNumber,attributes:t?EA(EA({},a.attributes||{}),t):{}})})),G()(V()(e),"handleAudioLoopToggle",(function(){var t=e.props,n=t.isAudioLoop;(0,t.updateChapterImageSlider)({isAudioLoop:!n})})),G()(V()(e),"handleDeleteSlide",(function(t){var n=e.props.onDeletingSlide;try{n&&n(t)}finally{e.setState({deletedSlide:""})}})),e}return c()(r,[{key:"render",value:function(){var e,n,r,i,a,o,s,l=this,c=this.props,u=c.chapterHighlighting,d=void 0===u?{}:u,h=c.typeEditting,f=c.isEdittingChapterText,p=c.highlightEditInfo,m=void 0===p?{}:p,g=c.videoId,b=c.isDisabledAllButtons,y=c.isEnabledEditContent,A=c.isCopyChapterStyle,_=c.permissions,w=c.isScrollingCogvidItem,E=c.toggleDelChapterModal,S=c.deleteChapterInfo,C=c.subscriptionOptions,T=c.isAudioLoop,k=c.isVideoActive,O=c.isFoundationUpdating,I=c.isUnderstandingUpdating,M=c.isThumbnailUpdating,D=c.isCoverImageUpdating,N=c.fslideExisted,L=c.uslideExisted,R=c.thumbnailExisted,B=c.onFoundationChange,j=c.onUnderstandingChange,F=c.onThumbnailChange,U=c.onCoverImageChange,H=null==C?void 0:C.videoManipulationPermission,z=x.c.checkPermission(null===(e=_.VIDEO)||void 0===e?void 0:e.DOANYACTION,null===(n=_.VIDEO_COMPREHENSION_GUIDES)||void 0===n?void 0:n.WRITE),V=x.c.checkPermission(null===(r=_.VIDEO)||void 0===r?void 0:r.DOANYACTION,null===(i=_.VIDEO_COMPREHENSION_GUIDES)||void 0===i?void 0:i.CREATE),W=x.c.checkPermission(z,null==d?void 0:null===(a=d.permissions)||void 0===a?void 0:null===(o=a.COMPREHENSION_GUIDE)||void 0===o?void 0:o.DOANYACTION),G=this.state,q=(G.isUpdatingCoverImage,G.isShowCreateVideoCoverForm),K=G.isResetChapter,X=G.snapshot,Q=G.deletedSlide,$=x.g.TYPE_EDITING,J=x.g.CHAPTER_TYPES,Z=(x.g.PLAYING_CHAPTER_ORDER,x.g.LOOP_MODE,[J.ATTACHMENT_ONLY.key].includes(d.type)),ee=[J.LIVE_SESSION.key].includes(d.type),te=([J.EPISODIC.key].includes(d.type),!d.uid||!!d.processingStatus&&d.processingStatus!=kA.NONE),ne=!!m.color||!y||b||te||Z||ee||!W,re=te||!!m.color||!y||b||!W,ie=Object(Y.get)(d,"attributes",{}),ae=Object(Y.get)(d,"attributes.fontstyle",[]),oe=(!H||!y||b||x.c.checkPermission(null===(s=_.VIDEO)||void 0===s?void 0:s.DOANYACTION),!H||!y||b||!V),se="T"===Q?"The thumbnail will be deleted. Do you want to continue?":"The ".concat(Q," slide will be deleted. Do you want to continue?");return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"d-flex align-items-center ".concat(Uy.a.chapterGroupBtn)},v.a.createElement("div",{className:P()(Uy.a.expandable)},v.a.createElement("div",{className:P()(Uy.a.icon,"u-bg-dark-blue-bold")},v.a.createElement("span",null,"T")),v.a.createElement(QT,{receiveAcceptedFiles:F,isDisabled:!z||!k||M,acceptedFiles:x.g.SUPPORTED_IMG_TYPES},v.a.createElement(Qt,{tooltipText:t("tooltip.updateThumbnail"),classNameWrapper:P()(Uy.a.iconSmall,"u-bg-dark-blue-bold"),disabled:!z||!k||M,isLoading:M},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-up-arrow"})))),v.a.createElement(Qt,{disabled:!z||!k||M||!R,isLoading:M,tooltipText:"Delete",classNameWrapper:P()(Uy.a.iconSmall,"u-bg-dark-blue-bold"),onClick:function(){document.activeElement.blur(),l.setState({deletedSlide:"T"})}},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-trash-can"})))),v.a.createElement(Qt,{disabled:oe,tooltipText:t("attachmentOnlyBefore"),className:P()(Uy.a.quickBtn),onClick:function(e){return Object(x.j)(EA(EA({},e),{},{position:"before"}),J.ATTACHMENT_ONLY.key)}},v.a.createElement("i",{className:"fv fuvi-chapter-heading-before"})),v.a.createElement("div",{className:P()(Uy.a.expandable)},v.a.createElement("div",{className:P()(Uy.a.icon,"u-bg-red")},v.a.createElement("span",null,"F")),v.a.createElement(QT,{receiveAcceptedFiles:B,isDisabled:!z||!k||O,acceptedFiles:x.g.SUPPORTED_IMG_TYPES},v.a.createElement(Qt,{tooltipText:t("tooltip.updateFoundation"),classNameWrapper:P()(Uy.a.iconSmall,"u-bg-red"),disabled:!z||!k||O,isLoading:O},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-up-arrow"})))),v.a.createElement(Qt,{disabled:!z||!k||O||!N,isLoading:O,tooltipText:"Delete",classNameWrapper:P()(Uy.a.iconSmall,"u-bg-red"),onClick:function(){document.activeElement.blur(),l.setState({deletedSlide:"F"},(function(){return l.forceUpdate()}))}},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-trash-can"})))),v.a.createElement("div",{className:P()(Uy.a.expandable)},v.a.createElement("div",{className:P()(Uy.a.icon,"u-bg-grey")},v.a.createElement("span",null,"U")),v.a.createElement(QT,{receiveAcceptedFiles:j,isDisabled:!z||!k||I,acceptedFiles:x.g.SUPPORTED_IMG_TYPES},v.a.createElement(Qt,{disabled:!z||!k||I,type:"file",isLoading:I,tooltipText:t("tooltip.updateUnderstanding"),classNameWrapper:P()(Uy.a.iconSmall,"u-bg-grey")},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-up-arrow"})))),v.a.createElement(Qt,{disabled:!z||!k||I||!L,isLoading:I,tooltipText:"Delete",classNameWrapper:P()(Uy.a.iconSmall,"u-bg-grey"),onClick:function(){document.activeElement.blur(),l.setState({deletedSlide:"U"})}},v.a.createElement("span",null,v.a.createElement("i",{className:"fv fuvi-trash-can"})))),v.a.createElement(QT,{receiveAcceptedFiles:this.handleReplaceChapterVideo,isDisabled:oe,acceptedFiles:CA,multiple:!1,onCheckStatusBeforeAction:function(e,t){return x.c.checkCogvidStatus(g,t)}},v.a.createElement(Qt,{disabled:oe,tooltipText:t("tooltip.updateChapterVideo"),classNameWrapper:P()(Uy.a.icon,"u-bg-blue")},v.a.createElement("span",null,"V"))),v.a.createElement(QT,{receiveAcceptedFiles:U,isDisabled:te||b||!y||!W||D,acceptedFiles:x.g.SUPPORTED_IMG_TYPES},v.a.createElement(Qt,{tooltipText:t("tooltip.updateChapterCoverImage"),classNameWrapper:P()(Uy.a.icon,"bg-secondary"),disabled:te||b||!y||!W||D,isLoading:D},v.a.createElement("span",null,"I"))),v.a.createElement(Qt,{disabled:ne||!d.uid,onClick:function(){l.activeEditingTarget($.CHAPTER_EDITING_START)},className:P()(Uy.a.quickBtn,{activeButton:h===$.CHAPTER_EDITING_START},Uy.a.quickBtnActive&&h===$.CHAPTER_EDITING_START),tooltipText:t("tooltip.chapterEditStartTime")},v.a.createElement("i",{className:"fv fuvi-bracket-open"})),v.a.createElement(Qt,{disabled:!d.uid||w||Z||ee,onClick:function(){return l.handleMoveToOffsetOfVideo(d.startTime/1e3)},className:P()(Uy.a.quickBtn),tooltipText:t("tooltip.chapterMoveToStartTime")},v.a.createElement("i",{className:"fv fuvi-arrow-left"})),v.a.createElement(Qt,{className:P()(Uy.a.quickBtn,T&&Uy.a.quickBtnActive),onClick:this.handleAudioLoopToggle,tooltipText:t("tooltip.chapterLoopOneChapterMode")},T?v.a.createElement("i",{className:"fv fuvi-repeat-icon-s"}):v.a.createElement("i",{className:"fv fuvi-repeat-icon-s1"})),v.a.createElement(Qt,{disabled:!d.uid||w||Z||ee,onClick:function(){return l.handleMoveToOffsetOfVideo(d.endTime/1e3)},className:P()(Uy.a.quickBtn),tooltipText:t("tooltip.chapterMoveToEndTime")},v.a.createElement("i",{className:"fv fuvi-arrow-right"})),v.a.createElement(Qt,{disabled:ne||!d.uid,onClick:function(){l.activeEditingTarget($.CHAPTER_EDITING_END)},className:P()(Uy.a.quickBtn,{activeButton:h===$.CHAPTER_EDITING_END},Uy.a.quickBtnActive&&h===$.CHAPTER_EDITING_END),tooltipText:t("tooltip.chapterEditEndTime")},v.a.createElement("i",{className:"fv fuvi-bracket-close"})),v.a.createElement(Qt,{disabled:!((null==d?void 0:d.uid)&&W)||w||b||!!d.processingStatus&&d.processingStatus!=kA.NONE,onClick:function(){return Object(x.l)()},className:P()(Uy.a.quickBtn),tooltipText:t("tooltip.delCurrentChapter")},v.a.createElement("i",{className:"fv fuvi-trash-can"}))),v.a.createElement(Qt,{disabled:re,onClick:this.handleTextButtonClick,className:P()(Uy.a.quickBtn,f&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterEnabledEditTitle")},v.a.createElement("i",{className:"fv fuvi-text-icon",style:{fontSize:"1rem"}})),v.a.createElement(Kt.a,{rootClose:!0,trigger:re?null:"click",placement:"top",overlay:v.a.createElement(on,null,v.a.createElement(on.Content,null,v.a.createElement("ul",{className:Uy.a.fontSizeList},x.g.CHAPTER_LIST_FONT.map((function(e,t){return v.a.createElement("li",{key:t,onClick:function(){return l.updateChapterStyle({fontsize:e})},className:P()((ie.fontsize||x.g.CHAPTER_TEXT_DEFAULT_PIXEL_SIZE)==e&&Uy.a.fontSizeListActive)},e)})))))},v.a.createElement("div",{className:Uy.a.fontSizeWrap},v.a.createElement("input",{value:ie.fontsize||x.g.CHAPTER_TEXT_DEFAULT_PIXEL_SIZE,type:"text",readOnly:!0,style:{cursor:re?"default":"pointer"}}))),v.a.createElement("div",{className:Uy.a.lineGroup}),v.a.createElement(Qt,{onClick:function(){return l.setfontStyle("B")},disabled:re,className:P()(Uy.a.quickBtn,ae.indexOf("B")>=0&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterMakeTextBold")},v.a.createElement("i",{className:"fv fuvi-bold-style",style:{fontSize:"1rem"}})),v.a.createElement(Qt,{onClick:function(){return l.setfontStyle("I")},disabled:re,className:P()(Uy.a.quickBtn,ae.indexOf("I")>=0&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterMakeTextItalic")},v.a.createElement("i",{className:"fv fuvi-italic-style",style:{fontSize:"1rem"}})),v.a.createElement(Qt,{onClick:function(){return l.setfontStyle("U")},disabled:re,className:P()(Uy.a.quickBtn,ae.indexOf("U")>=0&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterMakeTextUnderline")},v.a.createElement("i",{className:"fv fuvi-under-line-style",style:{fontSize:"1rem"}})),v.a.createElement("div",{className:Uy.a.lineGroup}),v.a.createElement(sn,{fillColor:ie.foreground||Um.bodyColor,onChange:function(e){return l.updateChapterStyle({foreground:e})},className:P()(Uy.a.quickBtn),disabled:re,position:"top"},v.a.createElement("i",{className:"fv fuvi-fill-icon-copy",style:{fontSize:"1rem"}})),v.a.createElement(sn,{fillColor:ie.background||"transparent",onChange:function(e){return l.updateChapterStyle({background:e})},disabled:re,className:P()(Uy.a.quickBtn),isTransparent:!0,position:"top"},v.a.createElement("i",{className:"fv fuvi-fill-icon",style:{fontSize:"1rem"}})),v.a.createElement(Qt,{onClick:this.handleEnabledCopyChapterStyle,disabled:re||Object(Y.isEmpty)(ie),className:P()(Uy.a.quickBtn,A&&Uy.a.quickBtnActive),tooltipText:t("tooltip.chapterCopyStyle")},v.a.createElement("i",{className:"fv fuvi-format-painter",style:{fontSize:"1rem"}})),v.a.createElement("div",{className:Uy.a.lineGroup}),v.a.createElement(IC,{show:!!(null==S?void 0:S.uid),isProgressing:K,message:t("modal.delChapterConfirmModal",{name:S.content}),onConfirm:function(){E({}),Object(x.h)()},onClose:function(){return E({})}}),q&&v.a.createElement(dD,{capturedImage:URL.createObjectURL(X),snapshotBlob:X,onClose:function(){return l.toggleOpenCreateVideoCoverForm(!1)}}),!!Q&&v.a.createElement(IC,{show:!0,isProgressing:K,message:se,onConfirm:function(){return l.handleDeleteSlide(Q)},onClose:function(){return l.setState({deletedSlide:""})}}))}}]),r}(g.Component),OA=Object(q.b)((function(e){var t,n,r=e.cogvid,i=e.common,a=e.canvas,o=e.auth,s=e.cg;return{typeEditting:i.typeEditting,chapterHighlighting:r.chapterHighlighting,chapters:(null===(t=r.cogvidDetails)||void 0===t?void 0:t.chapters)||[],videoId:r.cogvidDetails.videoId,rootContext:r.cogvidDetails.rootContext,videoTitle:null===(n=r.cogvidDetails.cognitiveVideo)||void 0===n?void 0:n.title,isEdittingChapterText:r.isEdittingChapterText,highlightEditInfo:r.highlightEditInfo,chapterAttachments:r.chapterAttachments,showContextualImg:a.showContextualImg,timestamp:r.currentSbData.timestamp,blockSeq:r.currentSbData.blockSeq,isCopyChapterStyle:r.isCopyChapterStyle,deleteChapterInfo:i.deleteChapterInfo,ownerId:r.cogvidDetails.ownerId,subscriptionOptions:o.userInfo.subscriptionOptions,isAudioLoop:s.showChapterImageSlider.isAudioLoop,fslideExisted:s.fslideExisted,uslideExisted:s.uslideExisted,thumbnailExisted:s.thumbnailExisted}}),(function(e){return{setTypeEditting:function(t){return e(Q.f.setTypeEditting(t))},toggleEdittingChapterTextMode:function(t){return e(Q.e.toggleEdittingChapterTextMode(t))},setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))},updateShowContextualImg:function(t){return e(Q.b.updateShowContextualImg(t))},displayMiniCoverImage:function(t){return e(Q.e.displayMiniCoverImage(t))},insertVideo:function(t,n,r){return e(Q.e.insertVideo(t,n,r))},setChapterStyle:function(t,n,r){return e(Q.e.setChapterStyle(t,n,r))},enableCopyChapterStyle:function(){return e(Q.e.enableCopyChapterStyle())},displayVideoAttachments:function(t){return e(Q.e.displayVideoAttachments(t))},updateReviewAttachment:function(t,n,r){return e(Q.e.updateReviewAttachment(t,n,r))},toggleDelChapterModal:function(t){return e(Q.f.toggleDelChapterModal(t))},updateCreateMeetingForm:function(t){return e(Q.e.updateCreateMeetingForm(t))},updateChapterImageSlider:function(t){return e(Q.d.updateChapterImageSlider(t))}}}))(Object(K.c)(xA));var IA=x.g.VIDEO_TYPE,MA=x.g.VIDEO_MENU_BASE_URL,PA=x.g.VIDEO_CATEGORY,DA=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isChangingCoverImage:!1,isShowCreateVideoCoverForm:!1,snapshot:""}),G()(V()(e),"snapshotFirstArea",(function(){(0,e.props.displayMiniCoverImage)(),setTimeout((function(){x.c.snapshotFirstArea((function(t){e.setState({snapshot:t},(function(){e.toggleOpenCreateVideoCoverForm(!0)}))}))}))})),G()(V()(e),"toggleOpenCreateVideoCoverForm",(function(t){var n=e.props.toggleOpenPopup;e.setState({isShowCreateVideoCoverForm:t}),n(t)})),G()(V()(e),"activeGalleryVideo",(function(){var t=e.props,n=t.getGalleryVideo,r=t.activeCogvidItem;n((function(e){r({videoData:e,url:MA.EXPERIENCING,videoType:IA.GALLERY})}))})),e}return c()(r,[{key:"render",value:function(){var e,n,r=this,i=this.props,a=i.isEnabledEditContent,o=i.isDisabledAllButtons,s=i.currentActiveVideoType,l=i.thumbnailUrl,c=i.displayMiniCoverImage,u=i.permissions,d=(i.videoId,i.isComposingVideo),h=x.c.getCurrentVideoCategory(),f=this.state,p=f.isChangingCoverImage,m=f.isShowCreateVideoCoverForm,g=f.snapshot,b=h===PA.EXPERIENCING;return v.a.createElement(v.a.Fragment,null,m&&v.a.createElement(GP,{capturedImage:URL.createObjectURL(g),snapshotBlob:g,onClose:function(){return r.toggleOpenCreateVideoCoverForm(!1)}}),v.a.createElement("canvas",{id:"canvas",hidden:!0}),x.c.checkPermission(null===(e=u.VIDEO)||void 0===e?void 0:e.DOANYACTION,null===(n=u.VIDEO)||void 0===n?void 0:n.WRITE)&&v.a.createElement(Qt,{disabled:!a||o&&!d||s===IA.GALLERY,className:Uy.a.quickBtn,onClick:this.snapshotFirstArea,tooltipText:t("tooltip.setVideoCoverImg"),isLoading:p,onMouseEnter:function(){return!p&&c(l)},onMouseLeave:function(){return c()}},v.a.createElement("i",{className:P()("fv fuvi-capture_image")})),b&&v.a.createElement(Qt,{active:s!==IA.GALLERY,onClick:this.activeGalleryVideo,disabled:!s||s===IA.GALLERY,tooltipText:t("tooltip.galleryBtn")},v.a.createElement("i",{className:P()("fv fuvi-back-gallery",Uy.a.contextualImgBtn)})))}}]),r}(v.a.PureComponent),NA=Object(q.b)((function(e){var t=e.cogvid;return{currentActiveVideoType:t.cogvidDetails.videoType,videoId:t.cogvidDetails.videoId,thumbnailUrl:t.cogvidDetails.thumbnailUrl}}),(function(e){return{setVideoCoverImg:function(t,n,r){return e(Q.e.setVideoCoverImg(t,n,r))},getGalleryVideo:function(t,n){return e(Q.e.getGalleryVideo(t,n))},displayMiniCoverImage:function(t){return e(Q.e.displayMiniCoverImage(t))},toggleOpenPopup:function(t){return e(Q.f.toggleOpenPopup(t))}}}))(DA),LA=r(174);var RA=function(e){var n=e.onClick,r=e.className;return v.a.createElement(Qt,{onClick:n,tooltipText:t("btn.back"),classNameContainer:r,className:P()("bg-secondary px-1",Uy.a.upCourseLevel),round:!0,large:!0,style:{opacity:1}},v.a.createElement("i",{className:"fv fuvi-arrow-left-bold text-white fv-lg"}))},BA=function(e){var n=e.className,r=e.onClick;return v.a.createElement(Qt,{large:!0,className:P()(Uy.a.quickBtn,Uy.a.fitBtn),classNameContainer:n,onClick:r,tooltipText:t("tooltip.copyVideoId")},v.a.createElement("div",{className:Uy.a.idIcon},"ID"))},jA=x.g.SLIDE_TYPE,FA=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{isTocUpdating:!1,isFoundationUpdating:!1,isUnderstandingUpdating:!1,isThumbnailUpdating:!1}),G()(V()(e),"leftMenuRef",Object(g.createRef)()),G()(V()(e),"midMenuRef",Object(g.createRef)()),G()(V()(e),"wrapperWidth",Object(g.createRef)()),G()(V()(e),"paddingInPx",Number.parseInt(x.c.convertRemToPx("2rem"))),G()(V()(e),"handleCopyVideoId",(function(){var n=e.props,r=n.videoId,i=n.scrollingCogvidItem,a=(null==i?void 0:i.uid)||r;a&&(!x.c.isSafari()&&ic()(""),ic()(a),x.e.info(t("message.copyVideoIdSuccess"),!0,"",3e3))})),G()(V()(e),"handleTocChange",(function(n){if(n.length<=0)x.e.warn(t("message.selectOneImage"));else{var r=e.props,i=r.videoId,a=r.updateTableOfContent,o=r.updateCogvidListItem;i&&(e.setState({isTocUpdating:!0}),a({videoId:i,file:n[0]},(function(t){o({videoId:null==t?void 0:t.videoId,data:{tocUrl:null==t?void 0:t.url}}),setTimeout((function(){e.setState({isTocUpdating:!1})}),500)}),(function(t){setTimeout((function(){e.setState({isTocUpdating:!1})}),500)})))}})),G()(V()(e),"handleFoundationChange",(function(n){if(n.length<=0)x.e.warn(t("message.selectOneImage"));else{var r=e.props,i=r.videoId,a=r.chapterId,o=r.rootContext,s=r.updateChapterFoundation,l=r.updateSlidesExistance;i&&(e.setState({isFoundationUpdating:!0}),s({videoId:i,chapterId:a,file:n[0],rootContext:o},(function(t){setTimeout((function(){e.setState({isFoundationUpdating:!1}),l({fslideExisted:!0})}),500)}),(function(t){setTimeout((function(){e.setState({isFoundationUpdating:!1})}),500)})))}})),G()(V()(e),"handleUnderstandingChange",(function(n){if(n.length<=0)x.e.warn(t("message.selectOneImage"));else{var r=e.props,i=r.videoId,a=r.chapterId,o=r.rootContext,s=r.updateChapterUnderstanding,l=r.updateSlidesExistance;i&&(e.setState({isUnderstandingUpdating:!0}),s({videoId:i,chapterId:a,rootContext:o,file:n[0]},(function(t){setTimeout((function(){e.setState({isUnderstandingUpdating:!1}),l({uslideExisted:!0})}),500)}),(function(t){setTimeout((function(){e.setState({isUnderstandingUpdating:!1})}),500)})))}})),G()(V()(e),"handleThumbnailChange",(function(n){if(n.length<=0)x.e.warn(t("message.selectOneImage"));else{var r=e.props,i=r.videoId,a=r.chapterId,o=r.rootContext,s=r.updateChapterThumbnail,l=r.updateSlidesExistance;i&&(e.setState({isThumbnailUpdating:!0}),s({videoId:i,chapterId:a,file:n[0],rootContext:o},(function(t){setTimeout((function(){e.setState({isThumbnailUpdating:!1}),l({thumbnailExisted:!0})}),500)}),(function(t){setTimeout((function(){e.setState({isThumbnailUpdating:!1})}),500)})))}})),G()(V()(e),"handleCoverImageChange",(function(n){if(n.length<=0)x.e.warn(t("message.selectOneImage"));else{var r=e.props,i=r.videoId,a=r.chapterId,o=r.rootContext,s=r.updateChapterCoverImage,l=r.updateSlidesExistance;i&&(e.setState({isCoverImageUpdating:!0}),s({videoId:i,chapterId:a,file:n[0],rootContext:o},(function(t){setTimeout((function(){e.setState({isCoverImageUpdating:!1}),l({imageExisted:!0})}),500)}),(function(t){setTimeout((function(){e.setState({isCoverImageUpdating:!1})}),500)})))}})),G()(V()(e),"handleDeleteSlide",(function(t){var n=e.props,r=n.videoId,i=n.chapterId,a=n.showSlideType,o=n.deleteChapterFoundation,s=n.deleteChapterUnderstanding,l=n.deleteChapterThumbnail,c=n.updateSlidesExistance,u=n.updateChapterItemInCache,d=n.displaySlideType,h=n.displayChapterCoverImage;"F"===t?(o({videoId:r,chapterId:i}),u({videoId:r,chapterId:i,data:{foundation:null}}),c({fslideExisted:!1}),a==jA.FOUNDATION&&(d(null),h(!0))):"U"===t?(s({videoId:r,chapterId:i}),u({videoId:r,chapterId:i,data:{understanding:null}}),c({uslideExisted:!1}),a==jA.UNDERSTANDING&&(d(null),h(!0))):"T"===t&&(l({videoId:r,chapterId:i}),u({videoId:r,chapterId:i,data:{thumbnail:null}}),c({thumbnailExisted:!1}),a==jA.THUMBNAIL&&(d(null),h(!0)))})),G()(V()(e),"handleChapterFileUploadClick",(function(){var t=e.props,n=t.videoId,r=t.chapterId,i=t.displayChapterFileUploadModal;document.activeElement.blur(),i({videoId:n,chapterId:r})})),G()(V()(e),"handleChapterFileDeleteClick",(function(){var t=e.props,n=t.videoId,r=t.chapterId,i=t.activeChapter,a=t.displayChapterFileDeleteModal;document.activeElement.blur(),a({videoId:n,chapterId:r,data:i})})),G()(V()(e),"handleChapterFileManagerClick",(function(){var t=e.props,n=t.chapterId,r=t.selectedVideo,i=void 0===r?{}:r,a=t.displayChapterFileManagerModal;document.activeElement.blur(),a({videoId:i.uid,chapterId:n,files:i.files,chapters:i.chapters.map((function(e){return{label:e.content,value:e.uid,slides:e.slides,worksheets:e.worksheets,solutions:e.solutions,hwGuides:e.hwGuides,worksheetsPrev:e.worksheetsPrev,solutionsPrev:e.solutionsPrev,hwGuidesPrev:e.hwGuidesPrev}}))})})),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.activeCogvidItem,r=e.isComposingVideo,i=e.isEnabledEditContent,a=e.isEditableMenu,o=e.disabled,s=e.permissions,l=void 0===s?{}:s,c=e.isEditBtnsHidden,u=e.isPublicProcess,d=e.scrollingCogvidItem,h=e.videoId,f=e.videoStatus,p=e.hideActions,m=e.currentActiveLv,g=e.onCloseCourseClick,b=(e.videoDescription,e.chapters,e.isVideoActive),y=this.state,A=y.isTocUpdating,_=y.isFoundationUpdating,w=y.isUnderstandingUpdating,E=y.isThumbnailUpdating,S=y.isCoverImageUpdating,C=x.g.VIDEO_CATEGORY,T=x.g.COGVID_STATUS,k=[T.INITIALLIZING,T.UPDATING].includes(f),O=Object(Y.get)(this.leftMenuRef,"current.offsetWidth",0)+Object(Y.get)(this.midMenuRef,"current.offsetWidth",0)+this.paddingInPx>Object(Y.get)(this.wrapperWidth,"current.offsetWidth",0),M=o,D=x.c.getCurrentVideoCategory(),N=D===C.EXPLORING,L=D===C.COMPOSING,R=D===C.BRAINHIVE,B=D===C.MESSAGES,j=0!=m&&![C.BRAINHIVE,C.REVIEW].includes(D),F=!Object(Y.isEmpty)(d)&&(null==d?void 0:d.uid)!==h,U=(null==d?void 0:d.uid)||h,H=x.c.isVideoOwner({videoId:U});return v.a.createElement("div",{className:"".concat(Uy.a.quickMenuWrap),ref:this.wrapperWidth},p&&v.a.createElement("div",{className:"w-100 h-100 d-flex align-items-center"},j&&v.a.createElement("div",{className:" d-flex align-items-center ml-3"},v.a.createElement(RA,{onClick:g})),L&&!Object(Y.isEmpty)(d)&&v.a.createElement("div",{className:P()("d-flex",j?"mx-2":"ml-3 mr-2")},v.a.createElement(BA,{onClick:this.handleCopyVideoId}))),v.a.createElement("div",{className:P()(Uy.a.quickMenuScroll,p&&"d-none")},v.a.createElement(Lb,{plugins:{filterEvent:{horizontalScroll:!0}},className:"h-100 fv-smooth-scroll",containerClassName:"h-100",isDisplayXNav:O},v.a.createElement("div",{className:"h-100 d-flex align-item-center px-3"},v.a.createElement("div",{className:"u-w-40p d-flex align-items-center",ref:this.leftMenuRef},j&&v.a.createElement(RA,{onClick:g}),R||B?v.a.createElement(NA,{activeCogvidItem:n,isEnabledEditContent:!!i,isDisabledAllButtons:M,permissions:l,isComposingVideo:r}):v.a.createElement(mA,{activeCogvidItem:n,isEnabledEditContent:!!i,isDisabledAllButtons:M,isEditBtnsHidden:c,isComposingVideo:r}),L&&!Object(Y.isEmpty)(d)&&v.a.createElement(v.a.Fragment,null,v.a.createElement(BA,{onClick:this.handleCopyVideoId})),v.a.createElement(QT,{receiveAcceptedFiles:this.handleTocChange,isDisabled:!H||!b||A,acceptedFiles:x.g.SUPPORTED_IMG_TYPES,wrapperClassName:"ml-1"},v.a.createElement(Qt,{disabled:!H||!b||A,tooltipText:t("tooltip.updateToc"),type:"file",className:P()(Uy.a.quickBtn,"mx-0"),isLoading:A},v.a.createElement("img",{height:20,src:I.a.toc}))),v.a.createElement("div",{className:P()("flex-fill mx-1")})),v.a.createElement("div",{className:"d-flex align-items-center",ref:this.midMenuRef},v.a.createElement(Qt,{disabled:!H,tooltipText:"File manager",className:P()(Uy.a.quickBtn),classNameWrapper:"mr-3",onClick:this.handleChapterFileManagerClick},v.a.createElement("i",{className:"fv fuvi-my-files u-text-cyan"})),R||B?v.a.createElement(OA,{isDisabledAllButtons:M,isEnabledEditContent:!!i,isEditableMenu:a,permissions:l,isScrollingCogvidItem:F,isVideoUpdating:k,isComposingVideo:!!r,isPublicProcess:u,isVideoActive:b,isFoundationUpdating:_,isUnderstandingUpdating:w,isThumbnailUpdating:E,isCoverImageUpdating:S,onFoundationChange:this.handleFoundationChange,onUnderstandingChange:this.handleUnderstandingChange,onDeletingSlide:this.handleDeleteSlide,onThumbnailChange:this.handleThumbnailChange,onCoverImageChange:this.handleCoverImageChange}):v.a.createElement(uA,{isDisabledAllButtons:M,isEnabledEditContent:!!i,isEditableMenu:a,isEditBtnsHidden:c,isPublicProcess:u,isScrollingCogvidItem:F,isVideoUpdating:k,isComposingVideo:!!r,isVideoOwner:H,isVideoActive:b,isFoundationUpdating:_,isUnderstandingUpdating:w,isThumbnailUpdating:E,isCoverImageUpdating:S,onFoundationChange:this.handleFoundationChange,onUnderstandingChange:this.handleUnderstandingChange,onDeletingSlide:this.handleDeleteSlide,onThumbnailChange:this.handleThumbnailChange,onCoverImageChange:this.handleCoverImageChange}),!N&&v.a.createElement("div",{className:"d-flex align-items-center"},R||B?v.a.createElement(_A,{isDisabledAllButtons:M,isEnabledEditContent:!!i,isVideoOwner:H,permissions:l}):v.a.createElement(Qy,{isDisabledAllButtons:M,isEnabledEditContent:!!i,isEditBtnsHidden:c})),!N&&(R||B?v.a.createElement(vA,{isDisabledAllButtons:M,permissions:l}):v.a.createElement(Gy,{isDisabledAllButtons:M})))))))}}]),r}(g.Component),UA=Object(X.a)(K.c,Object(q.b)((function(e){var t,n=e.cogvid,r=e.cg;return{chapterId:n.chapterHighlighting.uid,rootContext:n.cogvidDetails.rootContext,showSlideType:r.showSlideType,activeChapter:n.chapterHighlighting,selectedVideo:null===(t=n.selectedVideo)||void 0===t?void 0:t.data}}),(function(e){return{updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))},updateTableOfContent:function(t,n,r){return e(Q.e.updateTableOfContent(t,n,r))},updateChapterThumbnail:function(t,n,r){return e(Q.e.updateChapterThumbnail(t,n,r))},deleteChapterThumbnail:function(t,n,r){return e(Q.e.deleteChapterThumbnail(t,n,r))},updateChapterFoundation:function(t,n,r){return e(Q.e.updateChapterFoundation(t,n,r))},deleteChapterFoundation:function(t,n,r){return e(Q.e.deleteChapterFoundation(t,n,r))},updateChapterUnderstanding:function(t,n,r){return e(Q.e.updateChapterUnderstanding(t,n,r))},deleteChapterUnderstanding:function(t,n,r){return e(Q.e.deleteChapterUnderstanding(t,n,r))},updateSlidesExistance:function(t){return e(LA.a.updateSlidesExistance(t))},displaySlideType:function(t){return e(LA.a.displaySlideType(t))},displayChapterCoverImage:function(t){return e(LA.a.displayChapterCoverImage(t))},updateChapterItemInCache:function(t){return e(Q.e.updateChapterItemInCache(t))},updateChapterCoverImage:function(t,n,r){return e(Q.e.updateChapterCoverImage(t,n,r))},displayChapterFileUploadModal:function(t){return e(LA.a.displayChapterFileUploadModal(t))},displayChapterFileDeleteModal:function(t){return e(LA.a.displayChapterFileDeleteModal(t))},displayChapterFileManagerModal:function(t){return e(LA.a.displayChapterFileManagerModal(t))}}})))(FA),HA=r(109);function zA(e){var t=e.title,n=e.isDummyItem,r="u-text-irl";return e.isActive?r="text-white":n&&(r="u-text-6d"),v.a.createElement("div",{className:P()(r,"u-flex-center u-ml-3o4")},t)}var VA=r(51),WA=r.n(VA),GA=r(26),qA=x.g.CURRENCIES,YA=(x.g.SUB_OFFER,x.g.SUB_OPTIONS),KA=[0,1,2,3],XA=Object(q.b)(null,(function(e){return{getSubsPrice:function(t,n,r){return e(Q.j.getSubsPrice(t,n,r))}}}))((function(e){var n=e.isSubmitting,r=e.videoId,i=e.videoPlan,a=void 0===i?0:i,o=e.option,s=e.currency,l=void 0===s?qA.USD.value:s,c=e.getSubsPrice,u=e.onInitial,d=e.onChange,h=e.onSubmit,f=e.onClose,p=e.onSubscriptionCancel,m=Object(g.useState)({}),b=pi()(m,2),y=b[0],A=b[1],_=Object(g.useState)(!0),w=pi()(_,2),E=w[0],S=w[1];Object(g.useEffect)((function(){r&&c({productId:r,currencyCode:l},(function(e){var t=null;if(e){var n=e||{},r=n.pctSaleOff,i=n.msgSaleOff,a=n.priceItems;t={pctSaleOff:r||0,msgSaleOff:i||""},(void 0===a?[]:a).map((function(e){t["price".concat(e.plan)]=e.amount}))}A(t),u&&u(t),S(!1)}),(function(){S(!1),u&&u(null)}))}),[r]);var C=Object(g.useCallback)((function(){var e=y["price".concat(o)];return(0==o||Object(Y.isNumber)(e))&&!0}),[o,y,a]),T=(null==y?void 0:y.pctSaleOff)>0;return v.a.createElement("div",{className:"w-100 h-100"},E&&v.a.createElement(Nn,null),v.a.createElement("div",{className:P()(WA.a.btnClose),onClick:E?null:f},v.a.createElement("div",{className:"u-flex-center"},v.a.createElement("i",{className:"fv fuvi-delete u-fs-3o4"}))),v.a.createElement("div",{className:"u-fw-600 u-fs-1x2o3"},"Subscribe Now !"),v.a.createElement("div",{className:"u-fw-500 u-fs-1x1o2 u-mb-1"},"For Brain-Powered Effective Learning"),null===y?v.a.createElement("div",{className:"py-5 u-fs-1 font-italic"},"Currently there are no subscription plans available. Please check back later."):v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"w-100 d-flex align-items-center my-2"},v.a.createElement("div",{className:"flex-grow-1 u-fs-1"},"Please choose a plan"),T&&v.a.createElement("div",{className:P()(WA.a.saleOffBadge,"u-fs-3o4 ml-2")},y.msgSaleOff||"")),v.a.createElement("div",{className:"w-100 d-flex justify-content-end my-3"},v.a.createElement("div",{className:"w-100 u-flex-center"},v.a.createElement("div",{className:P()(WA.a.point,"u-bg-cyan mr-2")}),v.a.createElement("div",null,"Current"),v.a.createElement("div",{className:P()(WA.a.point,"bg-warning ml-4 mr-2")}),v.a.createElement("div",null,"Recommended")),v.a.createElement(et.a,{variant:"warning",className:P()("btn-border u-text-black text-uppercase u-fs-7o8 u-fw-500"),onClick:E||n||!C()?null:h,disabled:E||n||!C()},t("btn.subscribe"))),v.a.createElement("div",{className:"w-100 flex-column my-2"},v.a.createElement("div",{className:"d-flex u-fs-7o8 u-fw-500 pl-4 text-warning"},v.a.createElement("div",{className:"u-w-20p"},"View"),v.a.createElement("div",{className:"w-25 text-center"},"Download"),v.a.createElement("div",{className:"u-w-20p text-center"},"Price"),v.a.createElement("div",{className:"u-w-35p text-center"},"Benefits")),KA.map((function(e,t){var n=y["price".concat(e)],r=n*(1-y.pctSaleOff/100),i=(Object(Y.isNumber)(n)||0==e)&&e!==a;return v.a.createElement("div",{key:"radioPrice".concat(e),className:P()("d-flex u-fs-13o16 py-2 border-top",!i&&e>0?"u-opacity-80":"u-cursor-pointer"),onClick:function(){i&&d(e)}},v.a.createElement("div",{className:P()(WA.a.point,"mr-2 u-mt-1o8",o===e&&"bg-warning",e===a&&"u-bg-cyan")}),v.a.createElement("div",{className:"u-w-20p"},YA[t].view),v.a.createElement("div",{className:"w-25 u-ws-pre text-center"},YA[t].download),v.a.createElement("div",{className:P()("u-w-20p text-center")},0==t?"Free":Object(Y.isNumber)(n)?(T?x.c.formatMoney(r,l):x.c.formatMoney(n,l))+" /month":"N/A"),v.a.createElement("div",{className:"u-w-35p pr-1"},YA[t].benefits.map((function(e,t){return v.a.createElement("div",{key:"b-".concat(t),className:"d-flex"},v.a.createElement("img",{src:I.a.star,height:16}),e)}))))}))),a>0&&v.a.createElement("div",{className:"d-flex justify-content-end"},v.a.createElement("div",{className:"u-fs-15o16 u-opacity-80 font-italic clickable link",onClick:p},"Cancel plan"))))})),QA=x.g.PRODUCT_TYPE,$A=x.g.SUB_OPTIONS,JA=Object(X.a)(K.f,K.e,Object(q.b)((function(e){var t,n,r,i,a,o,s=e.cogvid;return{show:!!(null===(t=s.showSubscribeModal)||void 0===t?void 0:t.videoId),videoId:null===(n=s.showSubscribeModal)||void 0===n?void 0:n.videoId,videoTitle:null===(r=s.showSubscribeModal)||void 0===r?void 0:r.videoTitle,videoOwner:null===(i=s.showSubscribeModal)||void 0===i?void 0:i.videoOwner,videoPlan:null===(a=s.showSubscribeModal)||void 0===a?void 0:a.videoPlan,initialOption:null===(o=s.showSubscribeModal)||void 0===o?void 0:o.initialOption}}),(function(e){return{getSubsPrice:function(t,n,r){return e(Q.j.getSubsPrice(t,n,r))},displaySubscribeModal:function(t,n,r){return e(Q.e.displaySubscribeModal(t,n,r))},getLectureVideo:function(t,n,r){return e(Q.e.getLectureVideo(t,n,r))},addItemToCart:function(t,n,r){return e(Q.c.addItemToCart(t,n,r))},updateCourseSubscription:function(t,n,r){return e(Q.l.updateCourseSubscription(t,n,r))},cancelCourseSubscription:function(t,n,r){return e(Q.l.cancelCourseSubscription(t,n,r))}}})))((function(e){var n=e.show,r=e.stripe,i=e.videoId,a=e.videoTitle,o=e.videoOwner,s=e.videoPlan,l=e.initialOption,c=e.displaySubscribeModal,u=e.getLectureVideo,d=e.addItemToCart,h=e.updateCourseSubscription,f=e.cancelCourseSubscription;if(!n)return null;Object(g.useEffect)((function(){x.b.reportOpenSubscriptionFormDesktop()}),[n]);var p=Object(g.useState)(!1),m=pi()(p,2),b=m[0],y=m[1],A=Object(g.useState)(!1),_=pi()(A,2),w=(_[0],_[1]),E=Object(g.useState)(l||s+1),S=pi()(E,2),C=S[0],T=S[1],k=Object(g.useState)(!1),O=pi()(k,2),I=O[0],M=O[1],D=Object(g.useCallback)((function(e){w(!!e)}),[]),N=Object(g.useCallback)((function(e){T(e)}),[]),L=Object(g.useCallback)((function(){var e=x.g.SEARCH_PARAM,t=e.KEY,n=e.VALUE,a=Object(Y.get)(GA.a.getState(),"auth.userInfo.userId",""),o=window.location,s=o.origin,l=o.pathname,u=o.search,d=new URLSearchParams(u);d.set(t.USER_ID,a),d.set(t.POPUP,n.PAYMENT_SUCCESS),d.set(t.ORDER_TYPE,QA.SUBSCRIPTION),d.set(t.RESOURCE_ID,i);var f=s+l+"?"+d.toString();d.set(t.POPUP,n.PAYMENT_CANCEL);var p=s+l+"?"+d.toString();M(!0),h({courseId:i,newPlan:C,successUrl:f,cancelUrl:p},(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.redirectUrl,n=e.successUrl,i=e.paymentRequired;if(i)r&&t&&r.redirectToCheckout({sessionId:t});else{var a=new URL(n),o=a.pathname,s=a.search;$.a.push(x.g.TEMP_PATH),$.a.push(o+s)}M(!1),c(null),callback&&callback()}),(function(){M(!1),c(null)}))}),[r,i,C]),R=Object(g.useCallback)((function(){x.c.checkLoggedIn("",{showLogin:!0,callback:function(){setTimeout((function(){Object(Y.get)(GA.a.getState(),"auth.userInfo.userId","")!==o&&u({videoId:i,scope:x.g.VIDEO_SEARCH_SCOPE.EXPLORING},(function(e){c({videoId:i,videoTitle:a,videoOwner:o,videoPlan:e.plan,initialOption:C>e.plan?C:e.plan})}))}),1e3)}})&&(s>0?L():(M(!0),d({productId:i,productTitle:a,productType:QA.SUBSCRIPTION,videoId:i,videoOwner:o,months:1,plan:C,offers:$A[C].offers},(function(){M(!1),c(null),callback&&callback()}),(function(){M(!1),c(null)}))))}),[i,a,o,s,C]),B=Object(g.useCallback)((function(){c(null)}),[]),j=Object(g.useCallback)((function(){M(!0),f({courseId:i},(function(){c({videoId:i,videoTitle:a,videoOwner:o,videoPlan:0}),y(!1),T(1),M(!1)}),(function(){M(!1)}))}),[i,a,o]);return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",onEscapeKeyDown:B,className:P()("createDocumentModal",WA.a.videoSubscribeModal)},v.a.createElement(Fl.a.Body,{className:P()(WA.a.modalBody,"u-fs-15o16")},v.a.createElement(XA,{isSubmitting:I,videoId:i,videoTitle:a,videoPlan:s,option:C,onInitial:D,onChange:N,onClose:B,onSubmit:R,onSubscriptionCancel:function(){y(!0)}}),v.a.createElement(IC,{show:b,title:t("modal.confirmCancelModalTitle"),onConfirm:function(){return j()},onClose:function(){return y(!1)}})))}));var ZA=x.g.ACCESS_GRANT_TYPE,e_=(x.g.CURRENCIES,x.g.PUBLISHING_STATUS),t_=x.g.COGVID_STATUS,n_=x.g.DEFAULT_LEARNING_LEVEL,r_=x.g.LEARNING_LEVEL,i_=x.g.SCOPE_CHAPTER_STATUS,a_=x.g.VIDEO_CATEGORY,o_=x.g.COGVID_ACTIONS,s_=(x.g.SUBSCRIPTION,x.g.ACCESS_GRANT_TYPE_DISPLAY),l_=function(e){var t=e.learningLevel,n=void 0===t?"":t;if(!n||n===n_)return null;var r=n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),i=I.a.basicLevelIcon;return n===r_.ADVANCED&&(i=I.a.advancedLevelIcon),n===r_.MASTER&&(i=I.a.masterLevelIcon),v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,"".concat(r," video")),trigger:["hover","focus"]},v.a.createElement("div",{className:P()(WA.a.learningLevelLabel,"ml-1")},v.a.createElement("img",{className:WA.a.learningLevelIcon,src:i,alt:""})))},c_=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"publicLabel",(function(){var n=e.state.isCancelPublishing,r=e.props,i=r.videoStatus,a=r.lastReviewStatus;return v.a.createElement("span",{className:P()(WA.a.publicLabel,a===e_.PENDING&&WA.a.pendingStyle,a===e_.PROCESSING&&WA.a.processingStyle,"text-capitalize bg-white d-flex align-items-center text-primary p-0")},a===e_.PENDING&&v.a.createElement("i",{className:"fv fuvi-most-recent fv-sm mr-1"}),a===e_.PROCESSING&&v.a.createElement("i",{className:"fv fuvi-in-review fv-sm mr-1"}),i===t_.PUBLISHING&&v.a.createElement("i",{className:"fv fuvi-copping-file fv-sm mr-1"}),i===t_.PUBLISHING||a?t("publishingStatus.".concat(i===t_.PUBLISHING?i:a)):"",i!=t_.PUBLISHING&&v.a.createElement(Qt,{className:"ml-2 bg-transparent",tooltipText:t("tooltip.cancelPublic"),round:!0,size:"sm",onClick:function(t){t.stopPropagation(),e.handleCancelPublishVideo()},disabled:n,isLoading:n},v.a.createElement("i",{className:"fv fuvi-delete-rounder u-fs-1 text-danger"},v.a.createElement("span",{className:"path1"}),v.a.createElement("span",{className:"path2"}))))})),G()(V()(e),"videoLabel",(function(){var n=e.props,r=n.openCourseButtonShow,i=n.showChildCount,a=(n.handleItemClick,n.childCount);return v.a.createElement(v.a.Fragment,null,r&&v.a.createElement("div",{className:WA.a.videoLabel},v.a.createElement("div",{className:WA.a.videoLabelLeft},a),v.a.createElement("div",null,v.a.createElement("i",{className:"fv fuvi-playlist-root text-white u-fs-7o8"}))),i&&v.a.createElement(Qt,{tooltipText:t("tooltip.viewCourse"),round:!0,badge:a,classNameBadge:WA.a.childCountBadge},v.a.createElement("i",{className:"fv fuvi-play-list text-white u-fs-7o8"})))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.index,i=n.author,a=n.avatar,o=n.description,s=n.course,l=n.primCourse,c=(n.onClick,n.createdDate),u=n.isDisabled,d=n.isActive,h=n.videoOverlayMode,f=n.editable,p=n.videoId,m=n.visibilityScope,g=n.userScaffId,b=n.ownerScaffId,y=n.isOwner,A=n.videoStatus,_=n.isAdmin,w=n.accessGrantType,E=(n.isQuickPurchasing,n.isLoading),S=n.views,C=n.likeCount,T=n.liked,k=n.lastReviewStatus,O=n.actualCourseCount,M=n.displayHour,D=n.isDummyDailyVideo,N=void 0!==D&&D,L=n.commentsLikesEnabled,R=n.isOpenCourseVideoList,B=n.isOpenPrCourseList,j=n.childCount,F=n.showChildCount,U=n.isMainList,H=n.isHover,z=n.keywords,V=n.learningLevel,W=n.learningSubject,G=n.trustedPublisher,q=(n.videoChaptersCount,n.canManipulateVideos),K=(n.subscription,n.plan,this.state),X=K.title,Q=K.subject,$=K.topic,J=K.titleOrigin,Z=K.subjectOrigin,ee=K.topicOrigin,te=K.editingField,ne=K.isDeleting,re=K.isUnpublishing,ie=K.isCloning,ae=K.isCloningFully,oe=K.isPublishing,se=(K.isItemPurchasing,K.isSharingVideo),le=K.isGetPublicFeedback,ce=K.isCheckingLatePublishStatus,ue=K.isTogglingCommentLike,de=K.isLikeProcessing,he=K.isExporting,fe=K.openChangeAccessScope,pe=x.c.getCurrentVideoCategory(),me=!(!l||0!=l.serial||s&&-1!==s.uid),ge=!!s&&0==s.serial,ve=(!!l&&0==l.serial&&(!s||-1===s.uid)||!!s&&s.serial,d&&h!==x.g.VIDEO_OVERLAY_MODE.ERROR),be=Ml.a.duration(-1*Ml()().diff(Ml()(c))),ye=pe===a_.EXPLORING,Ae=oe||ne||se||A!==t_.PUBLISHED,_e=A===t_.UPDATING,we=p&&q&&[a_.BRAINHIVE,a_.COMPOSING].includes(pe),Ee=ye&&(y||_),Se=[a_.COMPOSING].includes(pe)&&y,Ce=[a_.COMPOSING,a_.HOME].includes(pe)&&y,Te=pe===a_.COMPOSING&&y,ke=p&&[a_.EXPLORING,a_.EXPERIENCING,a_.LEARNING].includes(pe),xe=s_[w],Oe=pe===a_.COMPOSING&&!u&&y,Ie=(ZA.PAID,p&&ye),Me=p&&![a_.EXPLORING,a_.BRAINHIVE,a_.REVIEW,a_.HOME].includes(pe),Pe=!(ge&&q&&y)&&([i_.PUBLIC,i_.INTERNAL].includes(m)||Ae),De=x.c.checkIsPublicProcessing(k,A),Ne=a_.HOME==pe?y&&f:f&&!Ae&&!De,Le=[a_.COMPOSING,a_.HOME].includes(pe),Re=B&&!R&&!!l&&!s,Be=s||l,je=(null==Be||Be.defaultCourse,!ye&&!!(null==Be?void 0:Be.uid)&&-1!==(null==Be?void 0:Be.uid)&&!R&&!Re&&[a_.EXPLORING,a_.COMPOSING,a_.LEARNING].includes(pe),R?"".concat("0"==(null==s?void 0:s.serial)?"M":(null==s?void 0:s.serial)||"").concat(O?"/"+O:""):"".concat("0"==(null==l?void 0:l.serial)?"M":(null==l?void 0:l.serial)||"").concat(O?"/"+O:"")),Fe=je&&(R||B),Ue=[a_.COMPOSING,a_.HOME].includes(pe)&&y,He=pe===a_.HOME;return v.a.createElement("div",{ref:this.refItem,role:"button",id:"video-item-".concat(r),className:P()(WA.a.cogvidItemWrapper,u&&WA.a.disabledWrapper,E&&WA.a.loadingBg,He&&WA.a.IRLCogvidItem,H&&WA.a.activeItem),onClick:He?function(t){return e.handleItemClick(t)}:null,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},E&&v.a.createElement("div",{className:P()("d-flex justify-content-center w-100 h-100",WA.a.spinnerWrapper)},v.a.createElement(xn.a,{animation:"border",size:"sm",variant:"primary",className:P()(WA.a.spinner)})),He?v.a.createElement(zA,{isDummyItem:N,title:X,isActive:ve}):v.a.createElement("div",{className:P()(WA.a.cogvidCellBorder,"w-100 flex-column",E?"d-none":"d-flex"),onClick:this.handleItemClick},v.a.createElement("div",{className:P()("d-flex align-items-center pt-1")},!u&&ye&&v.a.createElement("div",null,v.a.createElement("div",{style:{backgroundImage:"url(".concat(a||I.a.noAvatar,")")},className:P()(WA.a.scAvatar)})),v.a.createElement("div",{className:"d-flex flex-column flex-fill"},v.a.createElement("div",{className:P()("d-flex position-relative pb-1 mx-1",WA.a.itemActionsRow)},v.a.createElement("div",{className:"flex-grow-1"}),ye&&v.a.createElement("div",{className:"d-flex"},v.a.createElement(l_,{learningLevel:V})),v.a.createElement("div",{className:"d-flex flex-fill align-items-center justify-content-center"},!1),v.a.createElement("div",{className:"d-flex"},F&&v.a.createElement(Kt.a,{key:p,delay:{show:800,hide:0},overlay:v.a.createElement(Xt.a,null,me||ge?t("tooltip.clickToExploreCourse"):""),trigger:["hover","focus"]},v.a.createElement("div",{className:P()("ml-1 position-relative",WA.a.videoLabel,U&&WA.a.videoPrimLabel)},v.a.createElement("div",{className:WA.a.videoLabelLeft},j||0),v.a.createElement("div",{className:P()(WA.a.videoLabelRight,H&&WA.a.videoLabelRightActive,"d-flex align-items-center justify-content-center")},v.a.createElement("i",{className:"fv ".concat(me?"fuvi-playlist-root":"fuvi-playlist-branch"," text-white u-fs-7o8")})))),Fe&&v.a.createElement("div",{className:P()("ml-1",WA.a.courseIndexBadge)},je))),v.a.createElement("div",{className:P()("d-flex justify-content-end",WA.a.itemActionsRow)},A!==t_.PUBLISHING&&v.a.createElement(v.a.Fragment,null,e_.REJECTED===k&&v.a.createElement(Qt,{round:!0,className:"bg-white mr-auto",onClick:this.handleGetlPublishVideoFeedback,isLoading:le||ie,tooltipText:t("tooltip.publishingRejectedInfo")},v.a.createElement("i",{className:"fv fuvi-exclamation text-secondary fv-sm"}))),we&&v.a.createElement(Qt,{tooltipText:t("tooltip.cloneFullyVideo"),round:!0,onClick:function(t){t.target.blur(),e.handleCogvidAction(t,o_.CLONE_FULLY,"isCloningFully")},isLoading:ae},v.a.createElement("i",{className:"fv text-white fv-sm fuvi-clone-file"})),pe===a_.EXPLORING&&y&&v.a.createElement(Qt,{tooltipText:t("".concat(L?"tooltip.disableCommentVideo":"tooltip.enableCommentVideo")),round:!0,onClick:this.toggleEnableCommentVideo,isLoading:ue},v.a.createElement("i",{className:P()("fv text-white fv-sm",L?"fuvi-write-comment":"fuvi-write-comment-disable")})),Ee&&v.a.createElement(Qt,{tooltipText:t("tooltip.unpublish"),round:!0,onClick:function(t){e.handleCogvidAction(t,o_.UNPUBLISH,"isUnpublishing")},isLoading:re},v.a.createElement("i",{className:"fv fuvi-unpublish-opi text-white fv-sm"})),ye&&y&&v.a.createElement(Qt,{tooltipText:t("tooltip.exportVideo"),round:!0,onClick:function(t){e.handleExportAction(t,o_.EXPORT_VIDEO_LINK,"isExporting")},isLoading:he},v.a.createElement("i",{className:"fv fuvi-export-html text-white fv-sm"})),De?this.publicLabel():v.a.createElement(v.a.Fragment,null,Se&&v.a.createElement(Qt,{tooltipText:Le?t("tooltip.extractVideo"):t("tooltip.shareVideo"),round:!0,onClick:Le?this.showExtractChaptersModal:this.showShareVideoModal,disabled:Ae||!q,isLoading:se},v.a.createElement("i",{className:"fv fuvi-share text-white fv-sm"})),Ce&&v.a.createElement(Qt,{tooltipText:t("tooltip.editVideo"),round:!0,onClick:function(t){e.handleToggleEditVideoForm(t,{show:!0,title:J,subject:Z,topic:ee,course:s,primCourse:l,keywords:z,learningLevel:V,learningSubject:W,description:o,author:i,videoId:p,userScaffId:g,ownerScaffId:b,isDummyDailyVideo:N,createdDate:c,hasCourse:pe!==a_.HOME,isOwner:y},pe===a_.COMPOSING)},disabled:Ae&&!_e||!q,isLoading:A!==x.g.COGVID_STATUS.PUBLISHED&&!_e||ce},v.a.createElement("i",{className:"fv fuvi-edit text-white fv-sm"})),Te&&v.a.createElement(Qt,{tooltipText:t("tooltip.publish"),round:!0,onClick:this.handlePublishVideoBtnClick,disabled:Pe||!q,isLoading:oe},v.a.createElement("i",{className:"fv fuvi-publish text-white fv-sm"})),Me&&v.a.createElement(Qt,{tooltipText:t("tooltip.deleteVideo"),round:!0,onClick:function(t){e.handleCogvidAction(t,o_.DELETE,"isDeleting")},disabled:Ae,isLoading:ne},v.a.createElement("i",{className:"fv fuvi-trash-can text-white fv-sm"})))))),v.a.createElement("div",{className:WA.a.content},!u&&v.a.createElement(v.a.Fragment,null,!Ue&&v.a.createElement("div",{className:P()("",WA.a.vAuthor)},v.a.createElement("div",{className:P()("text-truncate")},Ue?" ":i)),v.a.createElement("div",{className:"".concat(WA.a.vTitle," position-relative ")},v.a.createElement("div",{className:P()("text-truncate","title"===te&&"d-none",N&&"text-secondary")},J),v.a.createElement("textarea",{className:P()(WA.a.vTitle,WA.a.editTextarea,"title"===te&&"u-opacity-100",!Ne&&"invisible"),ref:function(t){e.titleRef=t},name:"title",value:X,onChange:this.handleTextAreaChange,onClick:Ne?this.handleTextAreaClick:null,onBlur:this.handleTextAreaBlur,onKeyDown:function(t){return e.handleTextAreaKeyDown(t,e.titleRef)},style:{height:Object(Y.get)(this.titleRef,"scrollHeight",0)}})),v.a.createElement("div",{className:"".concat(WA.a.vSubject," position-relative ")},v.a.createElement("div",{className:P()("text-truncate","subject"===te&&"d-none")},Z),v.a.createElement("textarea",{className:P()(WA.a.vSubject,WA.a.editTextarea,"subject"===te&&"u-opacity-100",!Ne&&"invisible"),ref:function(t){e.subjectRef=t},name:"subject",value:Q,onChange:this.handleTextAreaChange,onClick:Ne?this.handleTextAreaClick:null,onBlur:this.handleTextAreaBlur,onKeyDown:function(t){return e.handleTextAreaKeyDown(t,e.subjectRef)},style:{height:Object(Y.get)(this.subjectRef,"scrollHeight",0)}})),v.a.createElement("div",{className:"".concat(WA.a.vTopic," position-relative ")},v.a.createElement("div",{className:P()("text-truncate","topic"===te&&"d-none")},ee),v.a.createElement("textarea",{className:P()(WA.a.vTopic,WA.a.editTextarea,"topic"===te&&"u-opacity-100",!Ne&&"invisible"),ref:function(t){e.topicRef=t},name:"topic",value:$,onChange:this.handleTextAreaChange,onClick:Ne?this.handleTextAreaClick:null,onBlur:this.handleTextAreaBlur,onKeyDown:function(t){return e.handleTextAreaKeyDown(t,e.topicRef)},style:{height:Object(Y.get)(this.topicRef,"scrollHeight",0)}})))),v.a.createElement("div",{className:P()("d-flex align-items-center pb-1 pr-2 u-fw-400",y?"justify-content-between":"justify-content-end")},v.a.createElement("div",{className:P()(WA.a.videoStats,"")},v.a.createElement("div",{className:"d-flex align-items-center text-truncate u-fs-3o4"},M&&be.humanize(!0)),ke&&v.a.createElement("div",{className:"d-flex align-items-center ml-2 u-fs-3o4"},v.a.createElement("i",{className:"fv fuvi-eye u-mr-1o4"}),v.a.createElement("span",null,x.c.nFormatter(S))),Ie&&v.a.createElement("div",{onClick:T?this.handleUnlikeVideo:this.handleLikeVideo,className:"d-flex align-items-center ml-2"},v.a.createElement("div",{className:P()("d-flex u-fs-3o4")},v.a.createElement(Qt,{number:x.c.nFormatter(C),classNameContainer:"mx-0",className:P()("mx-0 p-0 position-relative",WA.a.likeBtn),disabled:de},v.a.createElement("i",{className:P()("fv u-fs-3o4",T||C>0?"fuvi-like-full u-text-red":"fuvi-like")})),v.a.createElement("div",{className:"u-ml-1o8"},C>0?x.c.nFormatter(C):""))),ye&&!u&&v.a.createElement("div",{className:"d-flex align-items-center ml-2"},v.a.createElement("div",{className:P()("d-flex u-fs-13o16")},v.a.createElement(Qt,{tooltipText:t("tooltip.copyToClipBoard"),classNameContainer:"mx-0",onClick:this.copyVideoLinkToClipBoard,className:P()("mx-0 p-0 position-relative",WA.a.likeBtn)},v.a.createElement("i",{className:"fv fuvi-share u-fs-13o16"}))))),Oe&&v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,w!==ZA.UNDEFINED?t("tooltip.updateVideoPrice"):t("tooltip.setVideoPrice")),trigger:["hover","focus"]},v.a.createElement("div",{className:P()("d-flex flex-shrink-0 bg-secondary u-px-1o3 u-py-1o8 u-border-radius-1o2 u-fs-11o16 align-items-center text-white",Ae&&"u-opacity-50 u-pointer-event-none"),onClick:function(t){!De&&e.toggleSetPriceModal(t,{show:!0,videoTitle:J,videoId:p,accessGrantType:w})}},v.a.createElement("i",{className:"fv fuvi-price-tag text-white fv-sm u-mr-1o4"}),v.a.createElement("div",{className:"text-lowercase"},xe||t("btn.setPrice")))),v.a.createElement("div",{className:"flex-1"}))),fe&&v.a.createElement(fB,{isCourseMaster:ge,trustedPublisher:G,visibilityScope:m,onChangeAccessScope:this.handleChangeAccessScope,onClose:function(){return e.setState({openChangeAccessScope:!1})}}))}}]),r}(v.a.Component);function u_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u_(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}c_.propTypes={author:ne.a.string,onClick:ne.a.func,createdDate:ne.a.oneOfType([ne.a.string,ne.a.object]),isDisabled:ne.a.bool,isActive:ne.a.bool,editable:ne.a.bool,videoId:ne.a.string,isOwner:ne.a.bool,isLoading:ne.a.bool},c_.defaultProps={isDisabled:!1,isLoading:!1,isActive:!1};var h_=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{title:e.props.videoTitle,subject:e.props.subject,topic:e.props.topic,titleOrigin:e.props.videoTitle,subjectOrigin:e.props.subject,topicOrigin:e.props.topic,editingField:"",isDeleting:!1,isUnpublishing:!1,isCloning:!1,isPublishing:!1,isMovingVideoToGallery:!1,isItemPurchasing:!1,isSharingVideo:!1,isCancelPublishing:!1,isGetPublicFeedback:!1,isExporting:!1,publicFeedbackMessage:"",isCheckingLatePublishStatus:!1,isTogglingCommentLike:!1,isLikeProcessing:!1,isCopying:!1,openChangeAccessScope:!1}),G()(V()(e),"refItem",v.a.createRef()),G()(V()(e),"titleRef",v.a.createRef()),G()(V()(e),"subjectRef",v.a.createRef()),G()(V()(e),"topicRef",v.a.createRef()),G()(V()(e),"preventSaveOnBlur",!1),G()(V()(e),"showFeedbackFromLocation",(function(t){var n=Object(Y.get)(t,"state",{}),r=n.showFeedbackModal,i=void 0!==r&&r,a=n.videoId,o=e.props,s=o.videoId,l=o.feedbackModal;s===a&&i&&!l.show&&($.a.replace(d_(d_({},$.a.location),{},{state:{}})),setTimeout(e.handleGetlPublishVideoFeedback,500))})),G()(V()(e),"shouldComponentUpdate",(function(t,n){var r={},i={};return Object.keys(e.props).forEach((function(n){"function"!=typeof e.props[n]&&(r[n]=e.props[n],i[n]=t[n])})),!Object(Y.isEqual)(r,i)||!Object(Y.isEqual)(n,e.state)})),G()(V()(e),"handleTextAreaClick",(function(t){t.stopPropagation(),e.setState({editingField:t.target.name})})),G()(V()(e),"revertTextValue",(function(t){e.setState((function(e){return G()({},t,e["".concat(t,"Origin")])}),(function(){e.updateTextAreaHeight(e["".concat(t,"Ref")])}))})),G()(V()(e),"handleTextAreaBlur",(function(n){var r,i=n.target,a=i.name,o=i.value,s=e.state,l=s.title,c=s.subject,u=s.topic,d=e.props,h=d.editCogvidInfo,f=d.videoId,p=d.updateCogvidItem,m=d.course,g=d.primCourse,v=d.description,b=d.isDummyDailyVideo,y=d.createdDate,A=d.createDailyVideo,_=d.keywords,w=d.learningLevel,E=d.learningSubject;if(e.setState({editingField:""}),e.preventSaveOnBlur||o===e.state["".concat(a,"Origin")])e.preventSaveOnBlur=!1;else{if(0===o.length&&"title"===a)return x.e.info(t("validation.blankVideoTitle")),void e.revertTextValue(a);if(o.length>x.g.TEXT_INPUT_MAX_LENGTH)return x.e.info("The ".concat(a," text must not exceed ").concat(x.g.TEXT_INPUT_MAX_LENGTH," characters.")),void e.revertTextValue(a);(b?A:h)(d_(d_({},{title:l,subject:c,topic:u}),{},(r={courseCode:null==m?void 0:m.code,courseSerial:null==m?void 0:m.serial},G()(r,a,o),G()(r,"videoId",f),G()(r,"description",v),G()(r,"isDummyDailyVideo",b),G()(r,"createdDate",y),G()(r,"courseCode",m?m.code:void 0),G()(r,"courseSerial",m?m.serial:void 0),G()(r,"primCourseCode",g?g.code:void 0),G()(r,"primCourseSerial",g?g.serial:void 0),G()(r,"keywords",_),G()(r,"learningLevel",w),G()(r,"learningSubject",E),r)),(function(){var t=e.props,n=t.currentActivevideoId,r=t.updateCogvidDetails;e.setState(G()({},"".concat(a,"Origin"),o)),b||p({videoId:f,data:{cognitiveVideo:G()({},a,o)}}),n===f&&r({cognitiveVideo:G()({},a,o)})}),(function(){e.revertTextValue(a)}))}})),G()(V()(e),"handleTextAreaKeyDown",(function(t,n){if(t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),13!==t.keyCode){if(27===t.keyCode){var r=t.target.name;e.preventSaveOnBlur=!0,e.setState((function(e){return G()({},r,e["".concat(r,"Origin")])})),n.blur()}x.c.preventKeyDownSideEffect(t)}else n.blur()})),G()(V()(e),"handleTextAreaChange",(function(t){var n=t.target,r=n.name,i=n.value;e.updateTextAreaHeight(e["".concat(r,"Ref")]),e.setState(G()({},r,i))})),G()(V()(e),"updateTextAreaHeight",(function(e){e&&e.style&&(e.style.height="5px",e.style.height="".concat(e.scrollHeight,"px"))})),G()(V()(e),"handleCloneAction",(function(t,n,r){var i=e.props,a=i.videoId,o=i.course,s=i.primCourse,l=i.onCloneCogvidCourse,c=e.state.titleOrigin,u=o||s,d=!!(null==u?void 0:u.defaultCourse);(null==u?void 0:u.code)&&0==(null==u?void 0:u.serial)&&!d?e.toggleSaveVideoModal(t,{videoId:a,show:!0,videoTitle:c,onSubmit:function(t){e.setState({isCloning:!0}),l&&l(t,(function(){return e.setState({isCloning:!1})}))}}):e.handleCogvidAction(t,n,r)})),G()(V()(e),"handleExportAction",(function(t){var n=e.props,r=n.videoId,i=n.course,a=n.primCourse,o=n.onExportCogvidCourse,s=e.state.titleOrigin,l=!!a&&0==a.serial||!!i&&0==i.serial,c=[];a&&(c=[{name:a.code,value:a.uid}]),i&&(c=[].concat(Rl()(c),[{name:i.code,value:i.uid}])),e.toggleExportVideoModal(t,{videoId:r,show:!0,videoTitle:s,isCourseMaster:l,packages:c,onSubmit:function(t){var n=t.entireCourse,r=t.agent,i=t.packageId;e.setState({isExporting:!0}),o&&o(n,r,i,(function(){return e.setState({isExporting:!1})}))}})})),G()(V()(e),"handleCogvidAction",(function(t,n,r){t.stopPropagation(),(0,e.props.onActionCogvidItem)(n,(function(){return e.setState(G()({},r,!1))}),(function(){return e.setState(G()({},r,!0))}))})),G()(V()(e),"handlePublishVideoBtnClick",(function(t){t.stopPropagation();var n=e.props,r=(n.isEmptyVideo,n.unitPrice),i=(r=void 0===r?{}:r).amount,a=r.currency,o=(a=void 0===a?{}:a).code,s=void 0===o?x.g.CURRENCIES.USD.value:o,l=n.accessGrantType,c=n.videoId,u=n.course,d=n.trustedPublisher,h=e.state.titleOrigin,f=!!(null==u?void 0:u.code)&&0===(null==u?void 0:u.serial),p="";void 0!==i&&i>0&&(p=x.c.formatMoney(i,s)),l===x.g.ACCESS_GRANT_TYPE.FREE&&(p=""),e.togglePublishVideoModal(t,{videoId:c,show:!0,videoTitle:h,onPublish:e.handlePublishVideo,price:p,hasPrice:l!==x.g.ACCESS_GRANT_TYPE.UNDEFINED,isCourseMaster:f,trustedPublisher:d})})),G()(V()(e),"handlePublishVideo",(function(t){var n=t.publishingMarkets,r=t.commentsLikesEnabledOnPublic,i=t.entireCoursePublished,a=t.publishingScope,o=e.props,s=o.publishCogvid,l=o.videoId,c=o.updateCanvasProperties,u=o.updateCogvidItem,d=o.updateChildCourseStatus,h=o.course;e.setState({isPublishing:!0}),i&&d&&d(h.code,x.g.COGVID_STATUS.PUBLISHING),s({videoId:l,publishingMarkets:n,commentsLikesEnabledOnPublic:r,entireCoursePublished:i,publishingScope:a},(function(t){e.setState({isPublishing:!1},(function(){return c({isToolbarShown:!1})})),t===x.g.PUBLISHING_STATUS.APPROVED?u({videoId:l,data:{cognitiveVideo:{visibilityScope:x.g.SCOPE_COGVID_STATUS.PUBLIC},lastReviewStatus:x.g.PUBLISHING_STATUS.APPROVED}}):u({videoId:l,data:{lastReviewStatus:x.g.PUBLISHING_STATUS.PENDING}})}),(function(){return e.setState({isPublishing:!0})}))})),G()(V()(e),"handleCancelPublishVideo",(function(){var t=e.props,n=t.cancelPublishCogvid,r=t.videoId,i=t.updateCogvidItem;e.setState({isCancelPublishing:!0}),n(r,(function(){e.setState({isCancelPublishing:!1},(function(){i({videoId:r,data:{lastReviewStatus:"",cognitiveVideo:{status:x.g.COGVID_STATUS.PUBLISHED}}})}))}),(function(){return e.setState({isCancelPublishing:!0})}))})),G()(V()(e),"handleGetlPublishVideoFeedback",(function(t){t&&t.stopPropagation();var n=e.props,r=n.getPublicCogvidFeedback,i=n.videoId,a=n.updateFeedbackModal;e.setState({isGetPublicFeedback:!0}),r(i,(function(t){t&&(e.setState({isGetPublicFeedback:!1,publicFeedbackMessage:t}),a({show:!0,content:t}))}),(function(){return e.setState({isGetPublicFeedback:!0})}))})),G()(V()(e),"handleToggleEditVideoForm",(function(n,r,i){n&&n.stopPropagation();var a=e.props,o=a.getPublicCogvidLastStatus,s=a.videoId,l=a.updateEditVideoModal;i?e.setState({isCheckingLatePublishStatus:!0},(function(){o(s,(function(n){e.setState({isCheckingLatePublishStatus:!1},(function(){x.c.checkIsPublicProcessing(null==n?void 0:n.lastReviewStatus,null==n?void 0:n.status)?x.e.info(t("yourCognitiveVideoIsPublishing")):l(r)}))}),(function(){e.setState({isCheckingLatePublishStatus:!1})}))})):l(r)})),G()(V()(e),"showShareVideoModal",(function(t){t&&t.stopPropagation();var n=e.props,r=n.updateShareVideoChapterModal,i=n.videoId;r({show:!0,title:e.state.titleOrigin,videoId:i,isEditSharing:!1})})),G()(V()(e),"showExtractChaptersModal",(function(t){t&&t.stopPropagation();var n=e.props,r=n.updateExtractChaptersModal,i=n.videoId,a=n.chapters,o=n.author,s=n.description,l=n.highlights,c=e.state;r({show:!0,title:c.titleOrigin,subject:c.subjectOrigin,topic:c.topicOrigin,description:s,videoId:i,chapters:a,author:o,highlights:l})})),G()(V()(e),"toggleSetPriceModal",(function(t,n){t&&t.stopPropagation(),(0,e.props.updateSetPriceModal)(n)})),G()(V()(e),"togglePublishVideoModal",(function(t,n){t&&t.stopPropagation(),(0,e.props.updatePublishVideoModal)(n)})),G()(V()(e),"toggleSaveVideoModal",(function(t,n){t&&t.stopPropagation(),(0,e.props.updateSaveToMyVideoModal)(n)})),G()(V()(e),"toggleExportVideoModal",(function(t,n){t&&t.stopPropagation(),(0,e.props.updateExportVideoModal)(n)})),G()(V()(e),"handlePriceClick",(function(t){t&&t.stopPropagation();var n=e.props,r=n.plan,i=n.videoId,a=n.videoTitle,o=n.videoOwnerId;(0,n.displaySubscribeModal)({videoId:i,videoTitle:a,videoOwner:o,videoPlan:r})})),G()(V()(e),"handleItemClick",(function(t){t&&t.stopPropagation(),Object(Y.invoke)(t,"target.blur");var n=e.props,r=n.videoId,i=n.course,a=n.primCourse,o=n.onClick;o&&o(r,i||a)})),G()(V()(e),"copyVideoLinkToClipBoard",(function(n){n.stopPropagation();var r=e.props,i=r.videoId,a=r.videoTitle,o=r.course,s=r.primCourse,l=(new URL(window.location.href).searchParams.get("v"),x.g.SEARCH_PARAM.KEY),c=(!!s&&0==s.serial&&(!o||-1===o.uid)||!!o&&o.serial,window.location.href.split("?")[0]),u=new URL(c);u.searchParams.append(l.VIDEO_ID,i);var d=u.href;e.setState({isCopying:!0},(function(){try{!x.c.isSafari()&&ic()(""),ic()(d),x.e.info(t("copyVideoLinkToClipboard",{videoTitle:a}),!0,"",3e3)}finally{e.setState({isCopying:!1})}}))})),G()(V()(e),"toggleEnableCommentVideo",(function(t){t.stopPropagation();var n=e.props,r=n.toggleEnableCommentVideo,i=n.commentsLikesEnabled,a=n.videoId,o=n.onChangeCommentsLikesEnabled;e.setState({isTogglingCommentLike:!0},(function(){r({enabled:!i,videoId:a},(function(){o(!i),e.setState({isTogglingCommentLike:!1})}),(function(){e.setState({isTogglingCommentLike:!1})}))}))})),G()(V()(e),"handleLikeVideo",(function(t){t.stopPropagation();var n=e.props,r=n.likeVideo,i=n.videoId,a=n.ownerScaffId,o=n.userScaffId,s=n.updateCogvidItem;e.setState({isLikeProcessing:!0},(function(){r({videoId:i,scaffoldingId:a||o},(function(t){var n=t.likeCount;s({videoId:i,data:{likeCount:n,liked:!0}}),e.setState({isLikeProcessing:!1})}),(function(){e.setState({isLikeProcessing:!1})}))}))})),G()(V()(e),"handleUnlikeVideo",(function(t){t.stopPropagation();var n=e.props,r=n.unlikeVideo,i=n.videoId,a=n.ownerScaffId,o=n.userScaffId,s=n.updateCogvidItem;e.setState({isLikeProcessing:!0},(function(){r({videoId:i,scaffoldingId:a||o},(function(t){var n=t.likeCount;s({videoId:i,data:{likeCount:n,liked:!1}}),e.setState({isLikeProcessing:!1})}),(function(){e.setState({isLikeProcessing:!1})}))}))})),G()(V()(e),"toggleAccessSetting",(function(t){t.stopPropagation(),e.setState((function(e){return{openChangeAccessScope:!e.openChangeAccessScope}}))})),G()(V()(e),"handleChangeAccessScope",(function(t){var n=e.props,r=n.changePublishScopeCogvid,i=n.videoId,a=n.onChangeVisibilityScope;r(d_({videoId:i},t),(function(){a({videoId:i,visibilityScope:t.publishingScope}),e.setState({openChangeAccessScope:!1})}),(function(){e.setState({openChangeAccessScope:!1})}))})),G()(V()(e),"handleProductsLayerClick",(function(t){t.stopPropagation(),t.target.blur();var n=e.props,r=(n.isActive,n.videoId),i=n.videoOwnerId,a=n.videoTitle,o=n.subject,s=n.topic,l=n.showProductsLayer,c=n.displayProductsLayer,u=n.scrollToVideo,d=x.g.SEARCH_PARAM,h=d.KEY,f=d.VALUE;u({uid:r},!0),x.r.isPlayer()&&x.r.pause(),setTimeout((function(){var e=(null==l?void 0:l.videoId)===r;c(e?null:{videoId:r,title:a,subject:o,topic:s,videoOwnerId:i}),x.c.changeURLWithoutSideEffect([[h.VIDEO_ID,r],[h.ACTION,e?void 0:f.ACTION.OPEN_RESOURCE]])}),100)})),G()(V()(e),"handleMouseEnter",(function(t){var n=e.props,r=n.index,i=n.onMouseEnter;i&&i(r)})),G()(V()(e),"handleMouseLeave",(function(t){var n=e.props,r=n.index,i=n.onMouseLeave;i&&i(r)})),e}return c()(r,[{key:"componentWillUnmount",value:function(){this.unlistenHistory&&this.unlistenHistory()}},{key:"componentDidUpdate",value:function(e){e.isHover;var t=e.isActive,n=this.props,r=(n.isHover,n.videoOverlayMode,n.videoTitle),i=n.subject,a=n.topic,o=n.isActive,s=this.state,l=s.titleOrigin,c=s.subjectOrigin,u=s.topicOrigin;r===l&&i===c&&a===u||this.setState({titleOrigin:r,title:r,subjectOrigin:i,subject:i,topicOrigin:a,topic:a}),o!==t&&(o?(this.showFeedbackFromLocation($.a.location),this.unlistenHistory=$.a.listen(this.showFeedbackFromLocation)):this.unlistenHistory&&this.unlistenHistory())}}]),r}(c_),f_=Object(q.b)((function(e){var t,n=e.cogvid,r=e.cart,i=e.auth;return{videoOverlayMode:n.videoOverlayMode,isQuickPurchasing:r.isQuickPurchasing,currentActivevideoId:n.cogvidDetails.videoId,feedbackModal:n.feedbackModal,editVideoModal:n.editVideoModal,trustedPublisher:null===(t=i.userInfo)||void 0===t?void 0:t.trustedPublisher,showProductsLayer:n.showProductsLayer,subscriptionOptions:i.userInfo.subscriptionOptions,userId:i.userInfo.userId}}),(function(e){return{editCogvidInfo:function(t,n,r){return e(Q.e.editCogvidInfo(t,n,r))},toggleOpenPopup:function(t){return e(Q.f.toggleOpenPopup(t))},changePublishScopeCogvid:function(t,n,r){return e(Q.e.changePublishScopeCogvid(t,n,r))},publishCogvid:function(t,n,r){return e(Q.e.publishCogvid(t,n,r))},cancelPublishCogvid:function(t,n,r){return e(Q.e.cancelPublishCogvid(t,n,r))},getPublicCogvidFeedback:function(t,n,r){return e(Q.e.getPublicCogvidFeedback(t,n,r))},getPublicCogvidLastStatus:function(t,n,r){return e(Q.e.getPublicCogvidLastStatus(t,n,r))},shareVideo:function(t,n,r){return e(Q.e.shareVideo(t,n,r))},updateShareVideoChapterModal:function(t,n,r){return e(Q.e.updateShareVideoChapterModal(t,n,r))},updateExtractChaptersModal:function(t,n,r){return e(Q.e.updateExtractChaptersModal(t,n,r))},updateCanvasProperties:function(t){return e(Q.b.updateCanvasProperties(t))},updateCogvidDetails:function(t){return e(Q.e.updateCogvidDetails(t))},updateEditVideoModal:function(t){return e(Q.e.updateEditVideoModal(t))},updateSetPriceModal:function(t){return e(Q.e.updateSetPriceModal(t))},updatePublishVideoModal:function(t){return e(Q.e.updatePublishVideoModal(t))},updateSaveToMyVideoModal:function(t){return e(Q.e.updateSaveToMyVideoModal(t))},updateExportVideoModal:function(t){return e(Q.e.updateExportVideoModal(t))},updateFeedbackModal:function(t){return e(Q.e.updateFeedbackModal(t))},createDailyVideo:function(t,n,r){return e(Q.e.createDailyVideo(t,n,r))},toggleEnableCommentVideo:function(t,n,r){return e(Q.e.toggleEnableCommentVideo(t,n,r))},likeVideo:function(t,n,r){return e(Q.e.likeVideo(t,n,r))},unlikeVideo:function(t,n,r){return e(Q.e.unlikeVideo(t,n,r))},updateSharedPeopleData:function(t,n,r){return e(Q.e.updateSharedPeopleData(t,n,r))},getLikedVideoPeopleList:function(t,n,r){return e(Q.e.getLikedVideoPeopleList(t,n,r))},getShortenVideoUrl:function(t,n,r){return e(Q.e.getShortenVideoUrl(t,n,r))},displayProductsLayer:function(t,n,r){return e(Q.e.displayProductsLayer(t,n,r))},displaySubscribeModal:function(t,n,r){return e(Q.e.displaySubscribeModal(t,n,r))}}}))(h_),p_=r(52),m_=r.n(p_),g_=r(276);var v_=x.g.VIDEO_CATEGORY,b_=x.g.COGVID_ACTIONS,y_=x.g.CHAPTER_TYPES,A_=x.g.VIDEO_LIST_FILTER,__=(x.g.VIDEO_AREA_WRAPPER_ID,[{name:Object(uc.b)("filterCreated"),value:A_.CREATED},{name:Object(uc.b)("filterPurchased"),value:A_.PURCHASED}]),w_=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"renderDummyCogvidItems",(function(e,t,n,r,i){var a;return!i||e<=0?null:v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"d-flex flex-".concat(t," ").concat(m_.a.dummyCogvidWrapper," position-relative"),style:{height:i}},r?v.a.createElement("div",{className:P()("d-flex justify-content-center p-2",m_.a.spinnerWrapper)},v.a.createElement(xn.a,{animation:"border",size:"sm",variant:"primary"})):Rl()(Array(e)).map((function(e,r){if("column-reverse"===t)a=Ml()().add(n.length?r+1:r,"d");else{var i=Object(Y.get)(n,"[".concat(n.length-1,"].createdDate"),Ml()());a=Ml()(i).subtract(r+1,"d")}return v.a.createElement(f_,{key:r,createdDate:a,isDisabled:!0,displayHour:!1})}))))})),G()(V()(e),"itemRenderer",(function(t,n){var r,i=t.cognitiveVideo,a=(i=void 0===i?{}:i).title,o=void 0===a?"":a,s=i.subject,l=void 0===s?"":s,c=i.topic,u=void 0===c?"":c,d=i.author,h=void 0===d?"":d,f=i.description,p=i.visibilityScope,m=void 0===p?"":p,g=i.owner,b=i.avatar,y=i.status,A=i.course,_=i.primCourse,w=(i.publishedDate,i.childCount),E=i.keywords,S=void 0===E?[]:E,C=i.learningLevel,T=i.learningSubject,k=t.isDummyDailyVideo,O=t.uid,I=void 0===O?"-1":O,M=t.createdDate,P=void 0===M?"":M,D=t.chapters,N=void 0===D?[]:D,L=t.userScaffId,R=void 0===L?"":L,B=t.ownerScaffId,j=void 0===B?"":B,F=t.unitPrice,U=void 0===F?{}:F,H=t.accessGrantType,z=t.adminAccess,V=t.playlistUrl,W=t.videoLength,G=t.isLoading,q=t.views,Y=void 0===q?0:q,K=t.likeCount,X=void 0===K?0:K,Q=t.liked,$=t.downloaded,J=void 0===$?0:$,Z=t.lastReviewStatus,ee=void 0===Z?"":Z,te=t.highlights,ne=void 0===te?[]:te,re=t.featured,ie=t.commentsLikesEnabledOnPublic,ae=t.cloneable,oe=t.productCount,se=t.productCountDetails,le=t.thumbnailUrl,ce=t.subscription,ue=t.plan,de=e.props,he=de.videoId,fe=de.isVideoInfoEditable,pe=de.currentUserId,me=de.levelBackgrounds,ge=void 0===me?{}:me,ve=de.cogvidListLv,be=de.onChangeCommentsLikesEnabled,ye=de.subscriptionOptions,Ae=(ye=void 0===ye?{}:ye).videoManipulationPermission,_e=ye.resourceManipulationPermission,we=e.state,Ee=we.isEditingVideoMode,Se=we.courseVideoId,Ce=we.prCourseVideoId,Te=we.withCourse,ke=we.searchTerm,xe=ve.currentActiveLv,Oe=(null===(r=x.c.getRenderList())||void 0===r?void 0:r.videoList)||[];e.itemCount=Oe.length;var Ie=e.props.selectedVideoIdx===parseInt(n,0),Me=!!ke,Pe=1==xe,De=2==xe,Ne=Pe&&!De&&0==(null==_?void 0:_.serial),Le=Oe.find((function(e){var t=e.cognitiveVideo,n=t.course,r=t.primCourse;return!!r&&0==r.serial&&(!n||-1===n.uid)||!!n})),Re=(Pe||De)&&Le&&Le.accessGrantType===x.g.ACCESS_GRANT_TYPE.FREE,Be=I===he,je=Pe&&I===Ce||De&&I===Se||!Ce&&Ne,Fe=x.c.getCurrentVideoCategory(),Ue=Fe===v_.EXPLORING,He=Te&&!Pe&&!De&&!Me;Ie&&(e.scrollingVideoId=I);var ze=Q;if(!pe){var Ve=JSON.parse(localStorage.getItem("LIKE_TRACKING"))||{};ze=Q||!!Ve[I]}var We=0==xe,Ge=Oe.filter((function(e){var t;return(null==e?void 0:null===(t=e.cognitiveVideo[De?"course":"primCourse"])||void 0===t?void 0:t.serial)>0})).length,qe=w>=0&&[v_.EXPLORING,v_.COMPOSING,v_.LEARNING].includes(Fe),Ye=N.filter((function(e){return e.type===y_.EPISODIC.key})).length,Ke=Fe===v_.HOME,Xe=We&&Ue&&!Me||Ke||(null==_?void 0:_.code)&&0==(null==_?void 0:_.serial)?"lv0":(null==_?void 0:_.serial)>0||(null==A?void 0:A.code)&&0==(null==A?void 0:A.serial)?"lv1":"lv2";return v.a.createElement(f_,{key:I+n,author:h,avatar:b,videoTitle:o,subject:l,topic:u,course:A,primCourse:_,keywords:S,learningLevel:C,learningSubject:T,description:f,createdDate:P,userScaffId:R,ownerScaffId:j,thumbnailUrl:le,plan:ue,isHover:Ie,isActive:Be,editable:fe&&Ee,videoId:I,chapters:N,visibilityScope:m,onChangeVisibilityScope:e.handleChangeVisibilityScope,onActionCogvidItem:function(n,r,i){return e.handleCogvidItemButtonClick(t,n,r,i)},onCloneCogvidCourse:function(t,n){e.handleCloneCogvid(I,n,t)},onExportCogvidCourse:function(t,n,r,i){e.handleExportCogvid(I,i,o,t,n,r)},videoOwnerId:g,isOwner:x.c.isCurrentUserId(g),isAdmin:z,videoStatus:y,unitPrice:U,accessGrantType:H,isEmptyVideo:0===W||!V,isLoading:G,views:Y,likeCount:X,liked:ze,downloaded:J,lastReviewStatus:ee,highlights:ne,updateCogvidItem:e.updateCogvidItem,actualCourseCount:Ge,showCloseCourseButton:je&&!He,onCloseCourseClick:e.handleCloseCourseClick,featured:re,displayHour:!0,isDummyDailyVideo:k,commentsLikesEnabled:ie,onChangeCommentsLikesEnabled:function(e){return be(e,I)},isOpenCourseVideoList:De,isOpenPrCourseList:Pe,childCount:w,showChildCount:qe,isMainList:We,updateChildCourseStatus:e.updateChildCourseStatus,cloneable:ae,onClick:function(){e.handleItemClick(t,n)},isMasterCourseFree:Re,videoChaptersCount:Ye,colorLevel:Xe,productCount:oe,productCountDetails:se,style:{background:ge[Xe]},scrollToVideo:e.props.scrollToVideo,canManipulateVideos:Ae,canManipulateResources:_e,index:n,subscription:ce,onMouseEnter:e.handleItemMouseEnter,onMouseLeave:e.handleItemMouseLeave})})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.videoId,r=t.scrollRef,i=t.isVideoInfoEditable,a=t.editVideoModal,o=t.isLoading,s=t.openCreateCogvidForm,l=t.userInfo,c=t.cogvidListLv,u=t.updateVideoPreviewData,d=t.isFullscreenMode,h=t.hasActiveChapter,f=t.selectedVideoIdx,p=c.currentActiveLv,m=l.firstName,g=void 0===m?"":m,b=l.lastName,y=void 0===b?"":b,A=x.c.getCurrentVideoCategory(),_=this.state,w=_.scrollBarHeight,E=_.widthCB,S=_.heightCB,C=_.widthCBWrapper,T=_.heightCBWrapper,k=_.showConfirmModal,O=_.showInfoModal,M=_.showCancelEditSbConfirmation,D=_.cogvidActionItem,N=_.isEditingVideoMode,L=_.searchQueryData,R=_.showCloneVideoForm,B=_.searchTerm,j=_.filter,F=_.isMouseEnter,U=_.itemThumbnail,H=A===v_.EXPLORING,z=0!=p,V=!!B,W=x.c.getRenderList(),G=null==W?void 0:W.videoList;this.itemCount=G.length;H||this.heightToolbarInPx,z&&this.heightToolbarInPx;var q,Y,K,X=Math.ceil(this.topDummyBlocksHeight/this.heightVideoItem),Q=w-this.heightVideoItem,$=Math.ceil(Q/this.heightVideoItem);switch(D.type){case b_.CLONE:q=Object(uc.b)("modal.confirmation"),Y=Object(uc.b)("modal.cloneConfirmModalTitle",{name:D.title}),K="";break;case b_.UNPUBLISH:q=Object(uc.b)("modal.confirmation"),Y=Object(uc.b)("modal.unpublishConfirmModalTitle",{name:D.title}),K="";break;case b_.DELETE:q=Object(uc.b)("modal.confirmation"),Y=Object(uc.b)("modal.deleteConfirmModalTitle",{name:D.title}),K="";break;case b_.EXPORT_VIDEO_LINK:q=Object(uc.b)("modal.confirmation"),Y=Object(uc.b)("modal.exportConfirmModalTitle",{name:D.title}),K=""}var J=([v_.COMPOSING,v_.LEARNING].includes(A)||V)&&!z,Z=V?(null==L?void 0:L.totalElements)||(null==G?void 0:G.length):null==W?void 0:W.totalElements,ee=[v_.COMPOSING,v_.LEARNING].includes(A),te=![v_.EXPERIENCING,v_.EXPLORING,v_.LEARNING,v_.HOME].includes(A),ne=A===v_.HOME,re=[v_.COMPOSING,v_.LEARNING].includes(A),ie=F||d||h?this.wrapperRef.current:document.getElementById(x.g.VIDEO_AREA_WRAPPER_ID)||null;return v.a.createElement(v.a.Fragment,null,!!(null==U?void 0:U.url)&&U.videoId!==n&&(F?v.a.createElement("div",{className:P()(m_.a.itemThumbnail,m_.a.mini)},v.a.createElement("img",{alt:"course image",src:U.url}),v.a.createElement("div",{className:m_.a.videoIndex},U.index+1," / ",x.c.nFormatter(this.itemCount)," ",Object(uc.b)("courses",{count:this.itemCount}))):v.a.createElement("div",{className:P()(m_.a.itemThumbnail,m_.a.full,"u-flex-center"),style:{width:C,height:T},onClick:this.handleItemThumbnailClick},v.a.createElement("div",{className:"bg-white",style:{width:E,height:S}},v.a.createElement("img",{alt:"course image",src:U.url})))),v.a.createElement("div",{ref:this.wrapperRef,className:P()(m_.a.listWrapper,H&&!z&&m_.a.noToolbar,!this.itemCount&&"border-right","h-100 position-relative"),onMouseLeave:this.handleMouseLeave,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove},this.itemCount>0&&v.a.createElement(v.a.Fragment,null,this.state.showBackBtn&&v.a.createElement("div",{className:P()(m_.a.backBtn,"u-flex-center u-shadow")},v.a.createElement(Qt,{tooltipText:"Back to the current course",onClick:this.handleBackClick},v.a.createElement("i",{className:"fv fuvi-center-point u-text-red u-fs-1x1o4 u-fw-600"}))),this.state.showHomeBtn&&v.a.createElement("div",{className:P()(m_.a.homeBtn,"u-flex-center u-shadow")},v.a.createElement(Qt,{tooltipText:"Back to top",onClick:this.handleHomeClick},v.a.createElement("img",{width:24,src:I.a.homeRed,alt:"home"})))),o&&v.a.createElement(Nn,{className:"u-text-gray-400"}),H?v.a.createElement("div",{className:P()("justify-content-center",m_.a.toolbar,m_.a.homeToolbar,z&&m_.a.backToolbar),onClick:function(e){return e.stopPropagation()}},z?v.a.createElement(v.a.Fragment,null,v.a.createElement(Qt,{onClick:this.handleCloseCourseClick,tooltipText:Object(uc.b)("btn.back"),className:P()("bg-secondary px-1",m_.a.upCourseLevel),round:!0,large:!0,style:{opacity:1}},v.a.createElement("i",{className:"fv fuvi-arrow-left-bold text-white fv-lg"}))):v.a.createElement("div",{className:m_.a.homeLabel},Object(uc.b)("label.home"))):v.a.createElement("div",{className:m_.a.toolbar,onClick:function(e){return e.stopPropagation()}},v.a.createElement("div",{className:P()("d-flex",z&&"justify-content-end")},te&&v.a.createElement(Qt,{disabled:!i,onClick:this.toggleEditVideoMode,active:N,tooltipText:Object(uc.b)(N?"tooltip.cognitiveToolDisableEditText":"tooltip.cognitiveToolEnableEditText"),tooltipPlacement:"bottom"},v.a.createElement("i",{className:"fv fuvi-text-icon"})),ee&&v.a.createElement(Qt,{onClick:this.handleReloadVideoList,tooltipText:Object(uc.b)("tooltip.reloadVideoList")},v.a.createElement("i",{className:"fv fuvi-refresh"}))),J&&v.a.createElement(Qt,{badge:Z,className:"u-cursor-default u-opacity-100",classNameBadge:m_.a.totalVideosBadge,tooltipText:Object(uc.b)("videoCount",{count:Z})},v.a.createElement("i",{className:"fv fuvi-video-icon u-fs-1x1o3"})),v.a.createElement("div",{className:"flex-grow-1"}),z&&v.a.createElement(v.a.Fragment,null,v.a.createElement(Qt,{onClick:this.handleCloseCourseClick,tooltipText:Object(uc.b)("btn.back"),classNameContainer:"ml-auto",className:P()("bg-secondary px-1",m_.a.upCourseLevel),round:!0,style:{opacity:1}},v.a.createElement("i",{className:"fv fuvi-arrow-left-bold text-white fv-lg"}))),re&&v.a.createElement(wu,{className:"m-0 bg-secondary u-border-radius-1o4 u-py-1o8",classNameInput:P()(m_.a.filterDropdown,"u-fs-7o8"),value:j,options:__,onChange:this.handleFilterChange,"data-tut":"fuvi-filter"})),v.a.createElement(v.a.Fragment,null,v.a.createElement(sE,{isDisplayYNav:!0,id:"left-scroll-bar",className:"hide-scrollbar",classNameQuickNavTop:H&&!z&&m_.a.quickNavTop,ref:r,numberOfHasDataItems:20,data:G,itemRenderer:this.itemRenderer,itemHeight:this.heightVideoItem,alwaysShowTracksBar:!0,topElement:this.renderDummyCogvidItems(X,"column-reverse",G,!1,"".concat(this.topDummyBlocksHeight,"px")),bottomElement:this.renderDummyCogvidItems($,"column",G,!1,"".concat(Q,"px")),containerClassName:P()("h-100",!this.itemCount&&"invisible"),onScroll:this.handleScroll,onYReachAlmostEnd:function(t){return e.handleLoadMore(t,!1)},onYReachAlmostStart:ne?function(t){return e.handleLoadMore(t,!0)}:null,delegateTo:ie,initialScrollTop:this.props.selectedVideoIdx*this.heightVideoItem}))),v.a.createElement(g_.a,{key:this.itemCount,className:P()(!this.itemCount&&"invisible",H&&!z&&m_.a.noToolbar),min:0,max:this.itemCount-1,items:G,slideIndex:f,onChange:this.handleItemScrollTo}),v.a.createElement(IC,{show:k,header:q,icon:v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-2 text-secondary"}),title:Y,message:K,onConfirm:this.handleActionCogvidItem,onClose:this.handleCloseConfirmationModal}),a.show&&v.a.createElement(zc,Gt()({},a,{onClose:this.closeEditVideoForm,formTitle:Object(uc.b)("editCogvid"),submitBtnText:Object(uc.b)("btn.next"),isEditVideo:!0,updateCogvidItem:this.updateCogvidItem,updateVideoPreviewData:u,refreshCogvidItem:this.showCogvidUpdatedInfoModal})),s&&v.a.createElement(zc,{onShow:function(){return e.toggleDisplayCreateCogvidForm(!0)},onClose:function(){return e.toggleDisplayCreateCogvidForm(!1)},author:"".concat(g," ").concat(y),addNewCogvidItem:this.addNewCogvidItem}),!!R&&v.a.createElement(yB,Gt()({},R,{onClose:function(){e.props.toggleOpenPopup(!1),e.setState({showCloneVideoForm:null})}})),v.a.createElement(IC,{show:!!M,title:Object(uc.b)("modal.confirmNavigationModalTitle"),message:Object(uc.b)("modal.confirmCancelEditSbMessage"),onConfirm:this.navigateToConfirmVideo,onClose:function(){return e.setState({showCancelEditSbConfirmation:!1,confirmVideoItem:null})}}),!!O&&v.a.createElement(HC,{show:!0,message:Object(uc.b)("modal.infoUpdatedVideoMessage",{name:null==O?void 0:O.title}),onClose:this.handleInfoModalClose}))}}]),n}(v.a.PureComponent),E_=r(288),S_=r.n(E_);function C_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C_(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}x.g.SLIDING_TIME,x.g.COGVID_STATUS,x.g.PUBLISHING_STATUS,x.g.VIDEO_CATEGORY;var k_=x.g.VIDEO_SLIDER_THUMB,x_=function(e,t){return v.a.createElement("div",e)},O_=function(e,t){return v.a.createElement("div",Gt()({},e,{index:t.index}))},I_=function(e){return v.a.createElement("div",e,v.a.createElement("div",{className:m_.a.mark}))},M_=function(e){var n=e.index,r=e.totalVideos,i=e.thumbnailUrl,a=e.style;return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(m_.a.arrow,m_.a.horizontal),style:{left:a.left}}),v.a.createElement("div",{className:P()(m_.a.sliderTooltipWrapper,m_.a.horizontal),style:{left:a.leftTooltip}},v.a.createElement("div",{className:m_.a.sliderTooltip,style:{height:a.height,width:a.width}},v.a.createElement("div",{className:m_.a.content},v.a.createElement("img",{alt:"video-image",src:i})),v.a.createElement("div",{className:m_.a.videoIndex},n+1," / ",x.c.nFormatter(r)," ",t("courses",{count:r})))))},P_=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{tooltip:{},marks:[]}),G()(V()(e),"refWrapper",v.a.createRef()),G()(V()(e),"handleChange",(function(t){var n=function(){e.props.onChange(t),e.handleMarkMouseLeave()};x.r.paused()?n():(x.r.pause(),setTimeout(n))})),G()(V()(e),"handleSliderClick",(function(){document.activeElement.blur()})),G()(V()(e),"handleMarkMouseEnter",(function(t){e.timeout=setTimeout((function(){e.setState({tooltip:T_({},t)})}),100),e.handleMouseEnter()})),G()(V()(e),"handleMarkMouseLeave",(function(){clearTimeout(e.timeout),e.setState({tooltip:{}}),e.handleMouseLeave()})),G()(V()(e),"handleMarkRender",(function(t){var n=t.key,r=Yt()(t,["key"]),i=e.props,a=i.max,o=void 0===a?0:a,s=i.items,l=((void 0===s?[]:s)[n]||{}).thumbnailUrl,c=document.body.clientWidth,u=.3*c,d=9*u/16,h=r.style.left-u/2+12,f=c-u-96,p=h<0?5:h>f?f-10:h;return v.a.createElement(I_,Gt()({},r,{key:n,onMouseEnter:function(t){x.c.getElementCoords(t.target.children[0])&&(x.c.blurFirstArea(!0),e.handleMarkMouseEnter({index:n,totalVideos:o+1,thumbnailUrl:l,style:T_(T_({},r.style),{},{width:u,height:d,leftTooltip:p})}))},onMouseLeave:e.handleMarkMouseLeave}))})),G()(V()(e),"handleMouseEnter",(function(e){var t=document.getElementById(x.g.ID_SC_USAGE_TIP);t&&t.classList.add("animation-blink"),x.c.blurFirstArea(!0)})),G()(V()(e),"handleMouseLeave",(function(e){var t=document.getElementById(x.g.ID_SC_USAGE_TIP);t&&t.classList.remove("animation-blink"),x.c.blurFirstArea(!1)})),G()(V()(e),"render",(function(){var t=e.props,n=t.min,r=void 0===n?0:n,i=t.max,a=void 0===i?0:i,o=t.slideIndex,s=t.className,l=(t.isFullscreenMode,e.state.tooltip),c=Array.from({length:a-r+1},(function(e,t){return t+r}));return v.a.createElement("div",{ref:e.refWrapper,className:P()(m_.a.videoSliderWrapper,m_.a.horizontal,"u-flex-center",s),onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave},v.a.createElement("div",{className:P()(m_.a.sliderLabel,m_.a.horizontal,"u-font-din-condensed")},"Hover to Preview Courses"),v.a.createElement(S_.a,{orientation:"horizontal",marks:c,min:r,max:a,value:o,onChange:e.handleChange,onSliderClick:e.handleSliderClick,className:m_.a.videoSlider,markClassName:P()("video-slider-mark",m_.a.sliderMark,"u-w-".concat(parseInt(100/(a-r)),"p"),0===a&&"w-100"),thumbClassName:P()(k_,m_.a.sliderThumb),trackClassName:m_.a.sliderTrack,renderTrack:O_,renderThumb:x_,renderMark:e.handleMarkRender}),l.index>=r&&v.a.createElement(M_,l))})),e}return n}(v.a.Component);Object(q.b)((function(e){var t=e.cogvid;return{levelBackgrounds:t.levelBackgrounds,selectedVideoIdx:t.selectedVideo.idx}}),(function(e){return{displaySlide:function(t){return e(Q.d.displaySlide(t))}}}),null,{forwardRef:!0})(P_);function D_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D_(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L_=x.g.VIDEO_CATEGORY,R_=x.g.VIDEO_TYPE,B_=x.g.VIDEO_MENU_BASE_URL,j_=x.g.VIDEO_SORT,F_=x.g.VIDEO_SORT_DEFAULT,U_=x.g.SEARCH_PARAM,H_=x.g.COGVID_ACTIONS,z_=x.g.COOKIE,V_=x.g.VIDEO_OVERLAY_MODE,W_=x.g.DAILY_VIDEO_DATE_FORMAT,G_=x.g.TRACKING_USER,q_=x.g.VIDEO_SEARCH_SCOPE,Y_=x.g.TEMP_PATH,K_=x.g.VIDEO_LIST_FILTER,X_=x.g.VIDEO_COMPOSING_FILTER_DEFAULT,Q_=x.g.VIDEO_AREA_ID,$_=x.g.SCROLL_ANIMATION_TIME,J_=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{scrollBarHeight:0,heightCB:0,widthCB:0,showConfirmModal:!1,showInfoModal:null,cogvidActionItem:{},isEditingVideoMode:!1,sort:F_,searchVideoList:null,isMouseEnter:!1,courseVideoId:null,prCourseVideoId:null,searchTerm:void 0,searchQueryData:null,searchLoadingVideoList:[],selectedDate:new Date,isLoadingMore:!1,saveRefreshInfo:{videoId:"",level:""},showCancelEditSbConfirmation:!1,confirmVideoItem:null,filter:K_.ALL}),G()(V()(e),"prevLocation",void 0),G()(V()(e),"prevSearchScrollTop",0),G()(V()(e),"prevOpenCourseScrollTop",0),G()(V()(e),"prevOpenPrCourseScrollTop",0),G()(V()(e),"dailyVideos",[]),G()(V()(e),"currentDate",new Date),G()(V()(e),"loadingCogvidItemsOnTop",!1),G()(V()(e),"heightVideoItem",x.c.getCogvidItemHeight()),G()(V()(e),"heightVideoFilterInPx",x.c.convertRemToPx(Um.heightVideoFilter)),G()(V()(e),"heightToolbarInPx",x.c.convertRemToPx(Um.heightToolbar)),G()(V()(e),"heightChapterSliderInPx",x.c.convertRemToPx(Um.heightChapterSlider)),G()(V()(e),"wrapperRef",v.a.createRef()),G()(V()(e),"mousePos",{x:0,y:0,width:0,height:0}),G()(V()(e),"topDummyBlocksHeight",0),G()(V()(e),"updateWindowDimensions",(function(){var t=e.props.scrollRef;if(e.props.isFullscreenMode||window.isFullscreenMode){if(window.leftBarScrollTop)return void Object(Y.set)(t,"current.scrollRef.scrollTop",window.leftBarScrollTop)}else window.prevHoveredIndex=e.props.selectedVideoIdx;e.heightVideoItem=x.c.getCogvidItemHeight(),e.heightVideoFilterInPx=x.c.convertRemToPx(Um.heightVideoFilter),e.heightToolbarInPx=x.c.convertRemToPx(Um.heightToolbar),e.heightChapterSliderInPx=x.c.convertRemToPx(Um.heightChapterSlider),Object(Y.debounce)((function(){e.setState({scrollBarHeight:Object(Y.get)(document.getElementById("left-scroll-bar"),"clientHeight",0),heightCBWrapper:Object(Y.get)(document.getElementById(x.g.VIDEO_AREA_WRAPPER_ID),"offsetHeight",0)-e.heightChapterSliderInPx,widthCBWrapper:Object(Y.get)(document.getElementById(x.g.VIDEO_AREA_WRAPPER_ID),"offsetWidth",0),heightCB:Object(Y.get)(document.getElementById(Q_),"offsetHeight",0),widthCB:Object(Y.get)(document.getElementById(Q_),"offsetWidth",0)}),setTimeout((function(){window.leftBarScrollTop&&(Object(Y.set)(t,"current.scrollRef.scrollTop",window.leftBarScrollTop),Object(Y.get)(t,"current.scrollRef.scrollTop",0)===window.leftBarScrollTop?window.leftBarScrollTop=0:e.updateWindowDimensions())}),100)}),300)()})),G()(V()(e),"detectMousePosition",(function(t){var n,r=e.props,i=r.isLoading,a=r.scrollRef;if((null===(n=e.wrapperRef)||void 0===n?void 0:n.current)&&!i){var o,s,l=(null==t?void 0:t.target)||Array.from(document.querySelectorAll(":hover")).pop(),c=null===(o=e.wrapperRef)||void 0===o?void 0:null===(s=o.current)||void 0===s?void 0:s.contains(l);e.setState({isMouseEnter:c}),document.removeEventListener("mousemove",e.detectMousePosition);var u=Object(Y.get)(a,"current.scrollRef.scrollTop",0);e.handleItemHoverByScrolling(u)}})),G()(V()(e),"handleOnExitFullscreen",(function(){})),G()(V()(e),"handleOnEnterFullscreen",(function(){})),G()(V()(e),"handleKeyDown",(function(t){var n,r=e.props,i=r.cogvidDetails,a=r.currentHoverdVideo,o=r.resetCogvidDetail,s=r.openCreateCogvidForm,l=r.oldOpenCreateCogvidForm,c=r.isPopupOpen,u=r.isToolbarShown,d=r.openAddFilesToGalleryForm,h=r.showProductsLayer;if(!(c||s||l||d||(null==h?void 0:h.videoId)||u)&&32===t.keyCode){var f=a(null===(n=x.c.getRenderList())||void 0===n?void 0:n.videoList)||{};if((null==f?void 0:f.uid)&&f.uid!==(null==i?void 0:i.videoId)){var p=f.uid,m=f.cognitiveVideo,g=m.course,v=m.primCourse,b=g||v;t.stopPropagation(),t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),x.r.pause(),o(),(null==b?void 0:b.uid)?x.c.addURLSearchParams([[U_.KEY.COURSE_ID,b.uid]],!0):x.c.addURLSearchParams([[U_.KEY.COURSE_ID]],!0),x.c.addURLSearchParams([[U_.KEY.VIDEO_ID,p]],!0)}}})),G()(V()(e),"clearActiveVideo",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=e.props.updateVideoPreviewData;x.r.pause(),x.c.clearDataWhenExitingVideo({clearVideoTime:!0,clearWithinVideoSearch:!0,clearCogvidDetails:!0,clearChapterAttachmentData:!0}),t&&n()})),G()(V()(e),"handleURLChange",(function(t,n){var r,i=x.c.getDataFromUrl(window.location),a=i.videoId,o=i.searchTerm,s=void 0===o?"":o,l=i.courseId,c=i.withCourse,u=(i.ts,i.expanded),d=void 0!==u&&u,h=x.c.getDataFromUrl(e.prevLocation),f=h.videoId,p=h.sort,m=void 0===p?F_:p,g=h.searchTerm,v=void 0===g?"":g,b=(h.ts,h.filter),y=Object(Y.get)(t,"state",{}),A=y.refresh,_=y.subVideoId,w=y.level,E=y.noAction,S=y.forceSearch,C=i.sort,T=void 0===C?F_:C,k=i.filter,O=x.c.getCurrentVideoCategory();if(E&&e.prevLocation)e.prevLocation=t;else{var I=t.pathname===(null===(r=e.prevLocation)||void 0===r?void 0:r.pathname)&&e.isOpenCourseList(),M=n||I;if(_)e.handleOpenCourseClick(_,{uid:l},w);else{if(!e.prevLocation&&!a&&O===L_.EXPLORING)void 0===x.c.getCookie(z_.KEY.NEW_SESSION)&&x.c.setCookie(z_.KEY.NEW_SESSION,!0);if(t&&e.prevLocation&&e.prevLocation.pathname!==Y_&&e.prevLocation.pathname!==t.pathname||m===T&&b===k&&v===s&&!M&&!A){var P,D,N=e.props,L=N.activeVideoFromUrl,R=N.activeAttachmentFromLocation,B=Object(Y.get)(t,"state.attachment");if(a&&T===m&&k===b&&s===v&&(null===(P=e.prevLocation)||void 0===P?void 0:P.pathname)===t.pathname)L(t,null===(D=x.c.getRenderList())||void 0===D?void 0:D.videoList);else a===f&&B?R(t):f&&!a&&e.clearActiveVideo();if(e.prevLocation=t,!I)return}if(n&&(s||l))x.c.removeURLSearchParams([U_.KEY.SEARCH_TERM,U_.KEY.COURSE_ID],!1,!1,{refresh:!0});else{var j=!!s&&(v!==s||T!==m||S||k!==b),F=!A&&!s&&v&&a===f,U=e.props.scrollRef;if(Object.values(j_).includes(T)||(T=F_,x.c.removeURLSearchParams([U_.KEY.SORT])),Object.values(K_).includes(k)||(k&&x.c.removeURLSearchParams([U_.KEY.FILTER]),k=x.c.getCurrentVideoCategory(!0)===L_.COMPOSING?X_:void 0),(j||F)&&l&&x.c.changeURLWithoutSideEffect([[U_.KEY.COURSE_ID]]),j&&!v&&(e.prevSearchScrollTop=Object(Y.get)(U,"current.scrollRef.scrollTop",0)),(!j&&!F&&x.r.isPlayer()||f&&!a)&&e.clearActiveVideo(!1),e.prevLocation=t,e.setState({sort:T,filter:k,searchTerm:s,videoId:a}),F){var H=e.props.cogvidListLv.lv0.sort,z=e.props.resetCogvidDetail;e.setState({searchQueryData:null,courseVideoId:null,prCourseVideoId:null,sort:H,filter:k},(function(){z(),e.fetchVideoList()}))}else if(O!==L_.EXPERIENCING||j){var V=!!a&&a.includes(x.g.DUMMY_DAILY_VIDEO_ID_PREFIX);e.fetchVideoList({sort:T,filter:k,searchTerm:s,videoId:j||V?void 0:a,withCourse:!!c,expanded:Boolean(Number(d)),refresh:A},j,V?a:null,n)}else{(0,e.props.getGalleryVideo)((function(t){x.c.getCurrentVideoCategory()===L_.EXPERIENCING&&(void 0===x.c.getDataFromUrl().videoId&&e.props.activeCogvidItem({videoData:t,url:B_.EXPERIENCING,videoType:R_.GALLERY}))}))}}}}})),G()(V()(e),"fetchVideoList",(function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.sort,a=void 0===i?F_:i,o=r.filter,s=void 0===o?e.state.filter:o,l=r.searchTerm,c=void 0===l?null===(t=e.state.searchQueryData)||void 0===t?void 0:t.searchTerm:l,u=r.videoId,d=r.withCourse,h=r.expanded,f=r.refresh,p=r.learningSubject,m=void 0===p?e.props.learningSubject:p,g=arguments.length>1?arguments[1]:void 0,v=arguments.length>2?arguments[2]:void 0,b=arguments.length>3?arguments[3]:void 0,y=e.props,A=y.videoId,_=y.activateScrollingCogvidItem,w=y.updateReviewAttachment,E=y.scrollRef,S=y.onLoadSuccess,C=y.resetCogvidDetail,T=y.cogvidListLv,k=(y.updateVideoPreviewData,y.cogvidListLv.currentActiveLv),O=y.displayProductsLayer,I=y.displaySlide,M=null===(n=x.c.getRenderList(T))||void 0===n?void 0:n.videoList,P=e.state.selectedDate,D=Ml()(P).format(W_);v&&(D=Ml()(v.substring(x.g.DUMMY_DAILY_VIDEO_ID_PREFIX.length)).format(W_));var N=Object(Y.get)(E,"current.scrollRef.scrollTop",0);g&&(Object(Y.set)(E,"current.scrollRef.scrollTop",0),e.updateScrollbarDirection()),e.isInitial=b,e.props.getCogvidList({sort:a,filter:s,searchTerm:c,videoId:u,dummyVideoId:v,searchDate:D,withCourse:d,pageSize:d?1e3:void 0,expanded:h,learningSubject:m},(function(t){var n=t.videoList,r=void 0===n?[]:n,i=t.last,o=t.currentPage,l=t.totalElements,p=t.pageSize,m=t.level;if(w({attachmentId:""}),O(null),f&&I(-1),1===m||0==k?(e.prevOpenPrCourseScrollTop=N,e.prevOpenCourseScrollTop=0):e.prevOpenCourseScrollTop=N,g){if(C(),e.setState({courseVideoId:null,prCourseVideoId:null,searchQueryData:{sort:a,filter:s,last:i,searchTerm:c,currentPage:o,totalElements:l,pageSize:p,videoId:u},saveRefreshInfo:{videoId:u,level:m}}),Object(Y.isEmpty)(r))if(A){var v=Object(Y.find)(M,{uid:A});_(N_({},v||{}),!0)}else _({});else _(N_({},r[0]));!i&&x.g.WORKER_FETCH_MORE&&p*(o+1)<x.g.DEFAULT_MAX_SC_LOADED&&e.handleLoadMore(),e.handleItemScrollTo(0)}else{var y;Object(Y.set)(E,"current.scrollRef.scrollTop",0),e.setState({saveRefreshInfo:{videoId:u,level:m}});var T=x.c.getDataFromUrl(window.location),P=T.videoId,D=T.chapterId,L=T.action,R=r.find((function(e){return P===e.uid})),B=(null==R?void 0:null===(y=R.cognitiveVideo)||void 0===y?void 0:y.course)&&x.c.isExploring(),j=Object(Y.findIndex)((null==R?void 0:R.chapters)||[],{uid:D});x.c.isExploring()&&(null==R?void 0:R.videoLength)&&e.trackingPlayer(G_.ACTIONS.PLAY,0,null==R?void 0:R.uid),e.setState({searchQueryData:null,courseVideoId:null,withCourse:B||d},(function(){u||(Object(Y.set)(E,"current.scrollRef.scrollTop",0),e.updateScrollbarDirection({updatePreviewData:!0}))})),!h||b&&!D?(e.scrollToLayerVideo(u),I(j),R&&L===U_.VALUE.ACTION.OPEN_RESOURCE&&setTimeout((function(){e.props.currentUserId,O({videoId:R.uid,title:R.cognitiveVideo.title,author:R.cognitiveVideo.author,subject:R.cognitiveVideo.subject,topic:R.cognitiveVideo.topic,videoOwnerId:R.cognitiveVideo.owner})}),500)):(e.scrollToLayerVideo(u),I(j)),!u&&e.handleItemScrollTo(0),S&&S(r),!i&&x.g.WORKER_FETCH_MORE&&p*(o+1)<x.g.DEFAULT_MAX_SC_LOADED&&e.handleLoadMore()}var F=[];r.map((function(e){var t=e.thumbnailUrl;return t&&F.push(t)})),F.length>0&&e.props.getCogvidThumbnail(F),e.isInitial=!1}))})),G()(V()(e),"handleScroll",Object(Y.throttle)((function(t){var n=e.props,r=n.videoOverlayMode,i=n.showVideoOverlay;r===V_.ERROR&&i(""),!e.isScrollingBack&&!e.isInitial&&e.handleItemHoverByScrolling(t),e.checkScrollButtons(t)}),100)),G()(V()(e),"checkScrollButtons",Object(Y.debounce)((function(t){if(!(e.props.selectedVideoIdx<0)){var n=e.props.selectedVideoIdx*e.heightVideoItem,r=Math.abs(n-t)>5;e.setState({showBackBtn:r,showHomeBtn:t>5})}}),150)),G()(V()(e),"handleScrollAfter",Object(Y.debounce)((function(){!e.state.isMouseEnter&&e.handleMouseLeave()}),3e3)),G()(V()(e),"componentWillUnmount",(function(){window.removeEventListener("resize",(function(){return e.updateWindowDimensions()})),e.unlistenHistory&&e.unlistenHistory(),document.removeEventListener("mousemove",e.detectMousePosition),document.removeEventListener("keydown",e.handleKeyDown)})),G()(V()(e),"isOpenCourseList",(function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.props,i=r.currentHoverdVideo,a=r.cogvidListLv,o=(a.currentActiveLv,x.c.getCurrentVideoCategory()),s=Object(Y.isEmpty)(n)?i(null===(t=x.c.getRenderList())||void 0===t?void 0:t.videoList)||{}:n,l=s.cognitiveVideo,c=void 0===l?{}:l,u=c.childCount,d=void 0===u?{}:u,h=(c.primCourse,c.course,L_.EXPLORING,d>=0);return h&&[L_.EXPLORING,L_.COMPOSING,L_.LEARNING].includes(o)})),G()(V()(e),"handleActiveItemOrOpenListCourse",(function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.props.onClick,i=n.uid,a=(n.chapters,n.cognitiveVideo),o=a.course,s=a.primCourse,l=o||s,c=null===(t=x.c.getRenderList())||void 0===t?void 0:t.videoList;e.isOpenCourseList(n)?e.handleOpenCourseClick(i,l):r({},{},null,n,c)})),G()(V()(e),"handleActionCogvidItem",(function(){var t=e.state.cogvidActionItem,n=t.type,r=t.videoId,i=t.turnOffLoading,a=t.turnOnLoading,o=t.title,s=e.props.toggleOpenPopup,l=x.g.COGVID_ACTIONS;switch(s(!1),a(),n){case l.CLONE:e.handleCloneCogvid(r,i);break;case l.UNPUBLISH:e.handleUnpublishVideo(r,i);break;case l.DELETE:e.handleDeleteVideo(r,i,o);break;case l.EXPORT_VIDEO_LINK:e.handleExportCogvid(r,i,o)}})),G()(V()(e),"handleCogvidItemButtonClick",(function(t,n,r,i){var a=e.props.toggleOpenPopup,o=t.cognitiveVideo,s=(o=void 0===o?{}:o).title,l=void 0===s?"":s,c=o.course,u=t.uid,d=void 0===u?"-1":u;if(n===H_.CLONE){var h=x.c.getCurrentVideoCategory(),f="/".concat(h,"?v=").concat(d);if(!x.c.checkLoggedIn(f))return}if(a(!0),n!==H_.CLONE_FULLY)e.setState({cogvidActionItem:{type:n,videoId:d,title:l,turnOffLoading:r,turnOnLoading:i},showConfirmModal:!0});else{var p=!!c&&0===c.serial;e.setState({showCloneVideoForm:{videoId:d,title:l+" (copy)",isMasterVideo:p,courseCode:(null==c?void 0:c.code)||""}})}})),G()(V()(e),"handleCloneCogvid",(function(t,n,r){e.setState({showConfirmModal:!1},(function(){return e.props.cloneCogvid({videoId:t,entireCourse:r},(function(){!r&&e.updateCogvidItem({videoId:t,data:{cloneable:!1}}),n()}),n)}))})),G()(V()(e),"handleExportCogvid",(function(t,n,r,i,a,o){e.setState({showConfirmModal:!1},(function(){return e.props.exportCogvid({videoId:t,entireCourse:i,agent:a,packageId:o},(function(e){n();var t=new Blob([e],{type:"text/html;charset=UTF-8"}),i=URL.createObjectURL(t),a=document.createElement("a");a.href=i,a.download="".concat(r,".html"),document.body.appendChild(a),a.click(),document.body.removeChild(a)}),n)}))})),G()(V()(e),"calculateScrollTopAfterDeletingVideo",(function(t){var n,r=e.props.scrollRef,i=null===(n=x.c.getRenderList())||void 0===n?void 0:n.videoList,a=Object(Y.get)(r,"current.scrollRef.scrollTop",0),o=Object(Y.findIndex)(i,(function(e){return e.uid===t})),s=o*e.heightVideoItem<a?a-e.heightVideoItem:a;return o===i.length-1&&i.length>1&&(s=a-e.heightVideoItem-1),s})),G()(V()(e),"removeVideoFromList",(function(t){var n,r=null===(n=x.c.getRenderList())||void 0===n?void 0:n.videoList;Object(Y.isEmpty)(r)&&e.props.activateScrollingCogvidItem({}),e.updateScrollbarDirection()})),G()(V()(e),"handleDeleteVideo",(function(n,r,i){var a=e.props,o=a.scrollRef,s=a.attachmentReviewId,l=a.attachmentReviewVideoId,c=a.updateReviewAttachment,u=a.currentActiveVideoType,d=a.galleryVideoData,h=a.activeCogvidItem,f=a.showProductsLayer,p=a.displayProductsLayer,m=x.c.getCurrentVideoCategory(),g=e.calculateScrollTopAfterDeletingVideo(n);e.setState({showConfirmModal:!1},(function(){return e.props.deleteVideo(n,(function(){x.c.isVideoOwner({videoId:n})?x.e.success(t("message.deleteVideoSuccessfully",{name:i})):x.e.success(t("message.removeVideoSuccessfully",{name:i})),Object(Y.set)(o,"current.scrollRef.scrollTop",g),e.props.updateVideoPreviewData({videoId:n}),s&&n===l&&c({attachmentId:""}),f&&n===(null==f?void 0:f.videoId)&&p(null),m===L_.EXPERIENCING&&u!==R_.GALLERY&&h({videoData:d,url:B_.EXPERIENCING,videoType:R_.GALLERY}),e.removeVideoFromList(n)}),r)}))})),G()(V()(e),"handleUnpublishVideo",(function(t,n){var r=e.props.scrollRef,i=e.calculateScrollTopAfterDeletingVideo(t);e.setState({showConfirmModal:!1},(function(){return e.props.unpublishVideo(t,(function(t){var n=t.videoId,a=e.props.videoId;Object(Y.set)(r,"current.scrollRef.scrollTop",i),n===a&&e.props.updateVideoPreviewData({videoId:n}),e.removeVideoFromList(n)}),n)}))})),G()(V()(e),"handleCloseConfirmationModal",(function(){var t=e.state.cogvidActionItem.turnOffLoading;(0,e.props.toggleOpenPopup)(!1),e.setState({showConfirmModal:!1}),t&&t()})),G()(V()(e),"toggleEditVideoMode",(function(){return e.setState((function(e){return{isEditingVideoMode:!e.isEditingVideoMode}}))})),G()(V()(e),"handleSortChange",(function(t){if(e.state.sort!==t){var n=Object(Y.get)($.a,"location.pathname"),r=new URLSearchParams,i=x.c.getDataFromUrl(),a=i.searchTerm,o=i.videoId;t!==F_&&r.set(U_.KEY.SORT,t),a&&r.set(U_.KEY.SEARCH_TERM,a),a&&o&&r.set(U_.KEY.VIDEO_ID,o);var s=r.toString(),l=n+(s?"?"+s:"");$.a.push(l)}})),G()(V()(e),"handleLoadMore",Object(Y.throttle)((function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.props,i=r.loadMoreCogvidList,a=r.updateCogvidList,o=r.cogvidListLv,s=r.learningSubject,l=e.state,c=l.searchQueryData,u=l.sort,d=l.filter,h=l.isLoadingMore,f=o.lv0,p=f.videoId,m=f.currentPage,g=f.pageSize,v=f.last,b=o.lv0.videoList,y=void 0===b?[]:b,A=x.c.getCurrentVideoCategory(),_=A===L_.HOME,w=0!=o.currentActiveLv;if(Object(Y.isEmpty)(c)){if(!(v||w||h)){if(e.setState({isLoadingMore:!0}),_)if(n){var E,S;if(Ml()(null===(E=y[0])||void 0===E?void 0:null===(S=E.cognitiveVideo)||void 0===S?void 0:S.title.substring(0,W_.length),W_).format(W_)>=Ml()().format(W_))return void e.setState({isLoadingMore:!1});e.loadingCogvidItemsOnTop=!0}else{var C,T;if(Ml()(null===(C=y[y.length-1])||void 0===C?void 0:null===(T=C.cognitiveVideo)||void 0===T?void 0:T.title.substring(0,W_.length),W_).format(W_)<=Ml()(x.g.MINIUM_IRL_DATE).format(W_))return void e.setState({isLoadingMore:!1});e.loadingCogvidItemsOnTop=!1}var k=Object(Y.uniq)(y.filter((function(e){return e.featured})).map((function(e){return e.uid})));i({sort:u,filter:d,featureVideos:k,isLoadingVideosOnTop:n,currentPage:m,pageSize:g,videoId:p||void 0,learningSubject:s},(function(t){var r,i,l=t.videoList,c=void 0===l?[]:l,h=t.last,f=t.currentPage,m=t.totalElements,g=t.pageSize,v=t.level;a(N_(N_({},o.lv0),{},{sort:u,filter:d,last:h,currentPage:f,totalElements:m,pageSize:g,level:v,videoId:p,learningSubject:s,videoList:n?[].concat(Rl()(c),Rl()((null===(r=o.lv0)||void 0===r?void 0:r.videoList)||[])):[].concat(Rl()((null===(i=o.lv0)||void 0===i?void 0:i.videoList)||[]),Rl()(c))}));var b=[];c.map((function(e){var t=e.thumbnailUrl;return t&&b.push(t)})),b.length>0&&e.props.getCogvidThumbnail(b),!h&&x.g.WORKER_FETCH_MORE&&g*(f+1)<x.g.DEFAULT_MAX_SC_LOADED&&e.handleLoadMore(),e.setState({isLoadingMore:!1})}),(function(){e.setState({isLoadingMore:!1})}))}}else e.handleLoadMoreSearchList()}),100,{trailing:!1})),G()(V()(e),"handleLoadMoreSearchList",Object(Y.throttle)((function(){var t,n,r=e.props,i=r.loadMoreCogvidList,a=r.cogvidListLv,o=r.updateCogvidList,s=r.learningSubject,l=e.state.searchQueryData||{},c=l.videoId,u=l.sort,d=l.filter,h=l.last,f=l.pageSize,p=l.currentPage,m=l.searchTerm,g=l.totalElements,v=0!=a.currentActiveLv;h||v?e.setState({isLoadingMore:!1}):(e.setState({isLoadingMore:!0,searchLoadingVideoList:x.c.generateLoadingCogvidItems(Math.min(f,g-(null===(t=a.lv0)||void 0===t?void 0:null===(n=t.videoList)||void 0===n?void 0:n.length)))}),i({searchTerm:m,sort:u,filter:d,videoId:c,pageSize:f,currentPage:p,noUpdateData:!0,learningSubject:s},(function(t){var n,r=t.videoList,i=void 0===r?[]:r,s=t.last,l=t.currentPage,h=t.totalElements,f=t.pageSize;o(N_(N_({},a.lv0),{},{sort:u,filter:d,last:s,currentPage:l,totalElements:h,pageSize:f,videoList:[].concat(Rl()((null===(n=a.lv0)||void 0===n?void 0:n.videoList)||[]),Rl()(i))})),e.setState({searchQueryData:{searchTerm:m,sort:u,filter:d,last:s,currentPage:l,totalElements:h,pageSize:f,videoId:c},searchLoadingVideoList:[]});var p=[];i.map((function(e){var t=e.thumbnailUrl;return t&&p.push(t)})),p.length>0&&e.props.getCogvidThumbnail(p),!s&&x.g.WORKER_FETCH_MORE&&f*(l+1)<x.g.DEFAULT_MAX_SC_LOADED&&e.handleLoadMore(),e.setState({isLoadingMore:!1})}),(function(){e.setState({isLoadingMore:!1})})))}),100,{trailing:!1})),G()(V()(e),"updateHoveredVideoIndex",(function(t){var n,r=e.props,i=r.scrollRef,a=r.displayVideoDescription,o=(r.updateSelectedVideo,r.activateScrollingCogvidItem),s=void 0===t?x.c.getIndicatorVideoIndex(i,e.heightVideoItem):t;return Number.isNaN(e.props.selectedVideoIdx)||s===e.props.selectedVideoIdx||x.r.paused()||window.isFullscreenMode||x.r.pause(),s!==e.props.selectedVideoIdx&&a(!1),e.hoveredMouseIndex=s,o((null===(n=x.c.getRenderList())||void 0===n?void 0:n.videoList)[s]),s})),G()(V()(e),"handleOpenCourseClick",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=e.props,o=a.videoId,s=a.videoList,l=a.videoType,c=a.getCogvidList,u=a.activateScrollingCogvidItem,d=a.updateReviewAttachment,h=a.scrollRef,f=a.resetCogvidDetail,p=a.updateVideoPreviewData,m=a.cogvidListLv.currentActiveLv,g=a.displayProductsLayer,v=e.state.filter,b=(n.uid,Object(Y.get)(h,"current.scrollRef.scrollTop",0));!x.r.paused()&&x.r.pause(),f(),c({videoId:t,filter:v,withCourse:!0,pageSize:x.g.WORKER_FETCH_MORE?x.g.DEFAULT_PAGE_SIZE:x.g.DEFAULT_MAX_SC_LOADED,level:r},(function(n){var r=n.videoList,a=void 0===r?[]:r,c=n.level;Object(Y.set)(h,"current.scrollRef.scrollTop",0),d({attachmentId:""}),p(),g(null),1===c&&!i||0==m?(e.prevOpenPrCourseScrollTop=b,e.prevOpenCourseScrollTop=0):e.prevOpenCourseScrollTop=b,e.setState(1===c?{prCourseVideoId:t,saveRefreshInfo:{videoId:t,level:c}}:{courseVideoId:t,saveRefreshInfo:{videoId:t,level:c}},(function(){if(e.updateScrollbarDirection(),Object(Y.isEmpty)(a))if(o&&l!==R_.GALLERY){var n=Object(Y.find)(s,{uid:o});u(N_({},n||{}),!0)}else u({});else{var r,i=null===(r=x.c.getRenderList())||void 0===r?void 0:r.videoList;Object(Y.find)(i,{uid:t})?e.scrollToLayerVideo(t):u(N_({},i[0]))}e.setState({isMouseEnter:!0})})),e.handleItemScrollTo(0);var f=[];a.map((function(e){var t=e.thumbnailUrl;return t&&f.push(t)})),f.length>0&&e.props.getCogvidThumbnail(f)}))})),G()(V()(e),"handleCloseCourseClick",(function(t){var n,r,i,a;t&&t.stopPropagation();var o=e.props,s=o.videoId,l=o.scrollRef,c=o.videoType,u=o.galleryVideoData,d=o.updateVideoPreviewData,h=o.activateScrollingCogvidItem,f=o.updateCogvidList,p=o.resetCogvidDetail,m=o.displayCoverImage,g=o.setActiveChapter,v=o.cogvidListLv,b=o.displayProductsLayer,y=v.currentActiveLv;m({}),g({}),b(null);var A=function(){setTimeout((function(){var t,n=null===(t=e.props.cogvidListLv)||void 0===t?void 0:t.currentActiveLv;Object(Y.set)(l,"current.scrollRef.scrollTop",1==n?e.prevOpenCourseScrollTop:e.prevOpenPrCourseScrollTop)}))};x.c.removeURLSearchParams([U_.KEY.COURSE_ID,U_.KEY.CHAPTER_ID,U_.KEY.VIDEO_ID,U_.KEY.ACTION],!0,!1,{noAction:!0});var _,w=2==y?null===(n=v.lv2)||void 0===n?void 0:null===(r=n.videoList[0])||void 0===r?void 0:null===(i=r.cognitiveVideo)||void 0===i?void 0:i.primCourse:null;if(y>1&&Object(Y.isEmpty)(null===(a=v["lv".concat(y-1)])||void 0===a?void 0:a.videoList)&&w){var E,S,C=null===(E=v["lv".concat(y)])||void 0===E?void 0:null===(S=E.videoList[0])||void 0===S?void 0:S.uid;return e.setState((function(e){return{courseVideoId:null,saveRefreshInfo:N_(N_({},e.saveRefreshInfo),{},{level:y-1})}}),(function(){A(),f({videoList:[],level:y},y-1,!0)})),void(w&&e.handleOpenCourseClick(C,w,y-1,!0))}if(!w)return p(),e.setState((function(e){return{prCourseVideoId:null,saveRefreshInfo:N_(N_({},e.saveRefreshInfo),{},{level:0})}}),(function(){A(),d()})),f({videoList:[],level:y},"0"),void(Object(Y.isEmpty)(null===(_=v.lv0)||void 0===_?void 0:_.videoList)&&e.fetchVideoList());e.setState((function(e){return 2==y?{courseVideoId:null,saveRefreshInfo:N_(N_({},e.saveRefreshInfo),{},{level:y-1})}:{prCourseVideoId:null,saveRefreshInfo:N_(N_({},e.saveRefreshInfo),{},{level:y-1})}}),(function(){A(),p(),f({level:2==y?2:1,videoList:[]},2==y?"1":"0"),e.updateScrollbarDirection({updatePreviewData:!0})})),c===R_.GALLERY?setTimeout((function(){return h(N_({},u))})):s?h({}):d()})),G()(V()(e),"handleReloadVideoList",(function(){var t=e.props,n=t.resetCogvidDetail,r=t.setActiveChapter,i=e.state.saveRefreshInfo,a=i.videoId,o=i.level;r({}),n(),x.c.removeURLSearchParams([U_.KEY.VIDEO_ID,U_.KEY.CHAPTER_ID],!0,!1,{noAction:!0}),o?e.handleOpenCourseClick(a,{},o):e.fetchVideoList({expanded:!1,withCourse:!1,refresh:!0},!0)})),G()(V()(e),"updateChildCourseStatus",(function(t,n){var r=e.props,i=r.cogvidListLv,a=r.updateCogvidList;if(t&&n)for(var o={cognitiveVideo:{status:n}},s=0;s<=2;){var l;if(null===(l=i["lv".concat(s)])||void 0===l?void 0:l.videoList.length){var c,u=Object(Y.cloneDeep)(null===(c=i["lv".concat(s)])||void 0===c?void 0:c.videoList);u.map((function(e){var n,r;return(null===(n=e.cognitiveVideo)||void 0===n?void 0:null===(r=n.course)||void 0===r?void 0:r.code)===t?Object(Y.merge)(e,o):e})),a(N_(N_({},i["lv".concat(s)]),{},{videoList:u}))}s++}})),G()(V()(e),"toggleDisplayCreateCogvidForm",(function(t){(0,e.props.toggleCreateCogvidForm)(t)})),G()(V()(e),"toggleDisplayAddFilesToGalleryForm",(function(t){(0,e.props.toggleAddFilesToGalleryForm)(t)})),G()(V()(e),"addNewCogvidItem",(function(){var t=e.props,n=t.scrollRef,r=t.cogvidListLv,i=t.videoId;if(0==r.currentActiveLv&&!i){var a=Object(Y.get)(n,"current.scrollRef.scrollTop",0);Object(Y.set)(n,"current.scrollRef.scrollTop",a+e.heightVideoItem)}})),G()(V()(e),"updateCogvidItem",(function(t){for(var n,r,i,a,o=t.videoId,s=t.data,l=e.props,c=l.cogvidListLv,u=l.updateCogvidList,d=2==c.currentActiveLv?null===(n=c.lv2)||void 0===n?void 0:null===(r=n.videoList[0])||void 0===r?void 0:null===(i=r.cognitiveVideo)||void 0===i?void 0:i.primCourse:null,h=0;h<=2;){var f;if(null===(f=c["lv".concat(h)])||void 0===f?void 0:f.videoList.length){var p,m=Object(Y.cloneDeep)(null===(p=c["lv".concat(h)])||void 0===p?void 0:p.videoList),g=Object(Y.find)(m,{uid:o}),v=Object(Y.get)(s,"cognitiveVideo.course",{});if(g){var b;if(v.uid&&-1!==v.uid&&v.uid===(null==d?void 0:d.uid)||void 0===s.like)(null==s?void 0:s.keywords)&&(null===(b=g.cognitiveVideo)||void 0===b||delete b.keywords),Object(Y.merge)(g,s);else Object(Y.remove)(m,(function(e){return e.uid===o}));u(N_(N_({},c["lv".concat(h)]),{},{videoList:m}))}}h++}var y=null===(a=x.c.getRenderList())||void 0===a?void 0:a.videoList;Object(Y.isEmpty)(y)&&e.props.activateScrollingCogvidItem({}),e.updateScrollbarDirection()})),G()(V()(e),"showCogvidUpdatedInfoModal",(function(t){var n=t.title,r=t.videoId,i=t.userScaffId;e.setState({showInfoModal:{title:n,videoId:r,userScaffId:i}})})),G()(V()(e),"handleInfoModalClose",(function(){var t=e.props,n=t.getLectureVideo,r=t.updateCogvidListItem,i=t.activeCogvidItem,a=e.state.showInfoModal||{},o=a.videoId,s=a.userScaffId,l=x.c.getCurrentVideoCategory(),c=q_[l.toUpperCase()];e.setState({showInfoModal:null}),o&&n({videoId:o,userScaffId:s,scope:c},(function(e){r({videoId:o,data:N_({},e)}),i({videoData:e,closeAttachmentReview:!1})}))})),G()(V()(e),"closeEditVideoForm",(function(){(0,e.props.updateEditVideoModal)(N_({},HA.c))})),G()(V()(e),"updateScrollbarDirection",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.updatePreviewData,r=e.props.updateVideoPreviewData,i=Object(Y.get)(e.props,"scrollRef.current",{}),a=i.scrollRef,o=i.scrollbarRef;a&&o&&(null==o?void 0:o.handleScroll)&&setTimeout((function(){o.handleScroll(a),n&&r()}))})),G()(V()(e),"handleMouseEnter",(function(t){e.setState({isMouseEnter:!0},(function(){e.forceUpdate(),e.props.scrollRef.current.forceUpdate()}))})),G()(V()(e),"handleMouseLeave",(function(t){e.setState({isMouseEnter:!1},(function(){e.forceUpdate(),e.props.scrollRef.current.forceUpdate()})),e.handleItemMouseLeave(e.props.selectedVideoIdx),e.mousePos.y=10})),G()(V()(e),"scrollToLayerVideo",(function(t){var n,r=e.props,i=r.scrollRef,a=(r.activateScrollingCogvidItem,null===(n=x.c.getRenderList())||void 0===n?void 0:n.videoList),o=Object(Y.findIndex)(a,{uid:t});if(!(o<0)){var s=e.heightVideoItem*o;Object(Y.set)(i,"current.scrollRef.scrollTop",s),e.updateHoveredVideoIndex(o),e.hoveredMouseIndex=o,e.forceUpdate()}})),G()(V()(e),"trackingPlayer",(function(t,n,r){(0,e.props.trackingVideoCountViewData)({videoId:r,type:G_.TYPES.VIDEO,action:t,timestamp:1e3*n})})),G()(V()(e),"handleChangeVisibilityScope",(function(t){for(var n=e.props,r=n.cogvidListLv,i=n.updateCogvidList,a=t.visibilityScope,o=t.videoId,s=0;s<=2;){var l;if(null===(l=r["lv".concat(s)])||void 0===l?void 0:l.videoList.length){var c,u=Object(Y.cloneDeep)(null===(c=r["lv".concat(s)])||void 0===c?void 0:c.videoList);u.map((function(e){return e.uid===o?N_(N_({},e),{},{cognitiveVideo:N_(N_({},e.cognitiveVideo),{},{visibilityScope:a})}):e})),i(N_(N_({},r["lv".concat(s)]),{},{videoList:u}))}s++}})),G()(V()(e),"handleItemClick",(function(t,n){var r=e.props.selectedVideo;(null==t?void 0:t.uid)!==(null==r?void 0:r.uid)&&e.handleItemScrollTo(n,{thenSelect:!0,thenActive:!0,noAnimation:!0})})),G()(V()(e),"navigateToConfirmVideo",(function(){var t=e.props.updateIsEditingSb,n=e.state.confirmVideoItem;n&&(t(!1),e.handleActiveItemOrOpenListCourse(n),e.setState({showCancelEditSbConfirmation:!1,confirmVideoItem:null}))})),G()(V()(e),"handleFilterChange",(function(t){if(e.state.filter!==t){var n=Object(Y.get)($.a,"location.pathname"),r=new URLSearchParams,i=x.c.getDataFromUrl(),a=i.searchTerm,o=i.videoId;t!==X_&&r.set(U_.KEY.FILTER,t),a&&r.set(U_.KEY.SEARCH_TERM,a),a&&o&&r.set(U_.KEY.VIDEO_ID,o);var s=r.toString(),l=n+(s?"?"+s:"");$.a.push(l)}})),G()(V()(e),"handleStepScrolling",Object(Y.throttle)((function(t){var n=e.props,r=n.scrollRef,i=n.displaySlide;if(r){var a=e.props.selectedVideoIdx+t;a<0||(e.handleItemScrollTo(a),i(-1))}}),x.g.SCROLL_ANIMATION_TIME,{trailing:!1})),G()(V()(e),"handleLearningSubjectChange",(function(t){var n=e.props.videoId,r=e.state,i=r.sort,a=r.filter,o=r.searchTerm;n&&(x.c.changeURLWithoutSideEffect([[U_.KEY.VIDEO_ID],[U_.KEY.CHAPTER_ID],[U_.KEY.ACTION]]),e.clearActiveVideo()),e.fetchVideoList({sort:i,filter:a,searchTerm:o,learningSubject:t,refresh:!0},!0)})),G()(V()(e),"handleItemActivate",(function(t){var n,r=(null===(n=x.c.getRenderList())||void 0===n?void 0:n.videoList)[t];r&&(e.props.displayToc(!1),e.updateHoveredVideoIndex(t),x.c.changeURLWithoutSideEffect([[U_.KEY.VIDEO_ID,null==r?void 0:r.uid]]),e.handleItemMouseLeave())})),G()(V()(e),"handleItemScrollTo",(function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.thenSelect,a=void 0===i||i,o=r.thenActive,s=r.noAnimation,l=void 0===s||s,c=e.props,u=c.scrollRef,d=c.selectedVideo,h=null===(n=x.c.getRenderList())||void 0===n?void 0:n.videoList,f=h[t];if(f){var p,m=e.heightVideoItem*t;if(l)u.current&&(u.current.scrollRef.scrollTop=m);else(null===(p=u.current)||void 0===p?void 0:p.setScrollPosition)&&u.current.setScrollPosition(m);if((null==f?void 0:f.uid)!==(null==d?void 0:d.uid)&&a){if(e.props.hasActiveChapter){var g=document.getElementById(x.g.ID_VIDEO_BACK_BUTTON);g&&g.click()}e.updateHoveredVideoIndex(t),x.c.changeURLWithoutSideEffect([[U_.KEY.VIDEO_ID,null==f?void 0:f.uid],[U_.KEY.CHAPTER_ID]]),setTimeout((function(){o&&setTimeout((function(){var e=document.getElementById(x.g.ID_VIDEO_PLAY_BUTTON_AREA);e&&e.click()}),500),e.handleItemMouseLeave()}),l?50:$_)}}})),G()(V()(e),"getVideoIndex",(function(t){var n=e.mousePos.y,r=e.heightVideoItem,i=e.state.isMouseEnter?0:e.heightToolbarInPx,a=t||Object(Y.get)(e.props.scrollRef,"current.scrollRef.scrollTop",0),o=a+n+i-(e.topDummyBlocksHeight||0);return a%r<0||e.isScrollingToItem?-1:Math.ceil(o/r)-1})),G()(V()(e),"handleItemHoverByScrolling",Object(Y.throttle)((function(t){var n=e.getVideoIndex(t);if(-1!=n&&!e.isScrollingToItem&&n>=0&&n!==e.hoveredMouseIndex){e.hoveredMouseIndex;e.hoveredMouseIndex=n,n<e.itemCount?e.handleItemMouseEnter(n):e.handleItemMouseLeave(n),e.state.isMouseEnter||(clearTimeout(e.timeoutActivate),e.timeoutActivate=setTimeout((function(){e.handleItemActivate(n)}),500))}}),50,{trailing:!0,leading:!0})),G()(V()(e),"handleItemMouseEnter",(function(t){var n;if(window.isScrollingVideo=!0,t!=e.props.selectedVideoIdx){var r=(null===(n=x.c.getRenderList())||void 0===n?void 0:n.videoList)[t];r&&!e.isScrollingToItem&&(e.setState({itemThumbnail:{index:t,videoId:r.uid,url:r.thumbnailUrl}}),x.c.blurFirstArea(!0))}else e.handleItemMouseLeave()})),G()(V()(e),"handleItemMouseLeave",(function(){window.isScrollingVideo=!1,e.setState({itemThumbnail:null}),x.c.blurFirstArea(!1,!e.state.isMouseEnter)})),G()(V()(e),"handleMouseMove",(function(t){if(t.currentTarget){!e.state.isMouseEnter&&e.setState({isMouseEnter:!0},(function(){e.forceUpdate(),e.props.scrollRef.current.forceUpdate()}));var n=t.currentTarget.getBoundingClientRect();e.mousePos.x=t.clientX-n.left,e.mousePos.y=t.clientY-n.top,e.mousePos.width=n.width,e.mousePos.height=n.height}else e.mousePos={x:0,y:0,width:0,height:0}})),G()(V()(e),"handleItemThumbnailClick",(function(){setTimeout((function(){var e=document.getElementById(x.g.ID_VIDEO_PLAY_BUTTON_AREA);e&&e.click()}),250)})),G()(V()(e),"handleBackClick",(function(){e.handleItemScrollTo(e.props.selectedVideoIdx,{thenSelect:!1,noAnimation:!1}),e.setState({showBackBtn:!1})})),G()(V()(e),"handleHomeClick",(function(){e.handleItemScrollTo(0,{thenSelect:!0,noAnimation:!1}),e.setState({showHomeBtn:!1})})),e}return c()(r,[{key:"componentDidUpdate",value:function(e,t){var n,r,i,a,o=e.cogvidListLv,s=void 0===o?[]:o,l=e.learningSubject,c=(t.isLoadingMore,this.props),u=c.videoId,d=c.scrollToVideo,h=c.activateScrollingCogvidItem,f=c.scrollRef,p=c.cogvidListLv,m=c.learningSubject,g=null===(n=x.c.getRenderList(p))||void 0===n?void 0:n.videoList,v=null===(r=x.c.getRenderList(s))||void 0===r?void 0:r.videoList,b=x.c.getCurrentVideoCategory(),y=p.lv0.videoList[0]||{};if(u&&(null===(i=v[0])||void 0===i?void 0:i.uid)!==(null===(a=g[0])||void 0===a?void 0:a.uid)){var A;if(u&&!Object(Y.isEqual)(v[0],y))if(b===L_.EXPERIENCING&&d({uid:u}),[L_.COMPOSING,L_.HOME,L_.BRAINHIVE].includes(b)&&(null==y?void 0:y.uid)!==u&&Object(Y.isEmpty)(p.lv2.videoList)&&(null===(A=v[0])||void 0===A?void 0:A.uid)!==(null==y?void 0:y.uid)){var _=Object(Y.get)(f,"current.scrollRef.scrollTop",0);if(this.loadingCogvidItemsOnTop)return Object(Y.set)(f,"current.scrollRef.scrollTop",_+this.heightVideoItem*(g.length-v.length)),void(this.loadingCogvidItemsOnTop=!1);Object(Y.set)(f,"current.scrollRef.scrollTop",_+this.heightVideoItem)}Object(Y.isEmpty)(v)&&!Object(Y.isEmpty)(g)&&h(y)}l!==m&&this.handleLearningSubjectChange(m)}},{key:"componentDidMount",value:function(){var e=this;this.updateWindowDimensions(),window.addEventListener("resize",(function(){e.updateWindowDimensions()})),this.unlistenHistory=$.a.listen((function(t){var n,r,i,a=t.pathname==(null===(n=e.prevLocation)||void 0===n?void 0:n.pathname)&&t.search==(null===(r=e.prevLocation)||void 0===r?void 0:r.search)&&t.hash!==(null===(i=e.prevLocation)||void 0===i?void 0:i.hash),o=e.props,s=o.showRegisterModal,l=o.showCart;s||l||a?e.prevLocation=t:e.handleURLChange(t)})),this.handleURLChange($.a.location,!0),document.addEventListener("mousemove",this.detectMousePosition),document.addEventListener("keydown",this.handleKeyDown)}}]),r}(w_);J_.propTypes={activeCogvidItem:ne.a.func.isRequired,scrollToVideo:ne.a.func.isRequired};var Z_=Object(q.b)((function(e){var t,n,r,i=e.cogvid,a=e.auth,o=e.common,s=e.canvas,l=e.cart;return{isLoading:i.cogvidListLv.isLoading,cogvidListLv:i.cogvidListLv,videoOverlayMode:i.videoOverlayMode,videoId:i.cogvidDetails.videoId,videoType:i.cogvidDetails.videoType,isFullscreenMode:o.isFullscreenMode,attachmentReviewId:i.attachmentReview.attachmentId,attachmentReviewVideoId:i.attachmentReview.videoId,currentUserId:a.userInfo.userId,currentActiveVideoType:i.cogvidDetails.videoType,galleryVideoData:i.galleryVideoData,editVideoModal:i.editVideoModal,shouldReInitScScrollBar:i.shouldReInitScScrollBar,cogvidDetails:i.cogvidDetails,willCollapseMenu:o.willCollapseMenu,openCreateCogvidForm:i.openCreateCogvidForm,oldOpenCreateCogvidForm:i.oldOpenCreateCogvidForm,openAddFilesToGalleryForm:i.openAddFilesToGalleryForm,userInfo:a.userInfo,subscriptionOptions:a.userInfo.subscriptionOptions,isPopupOpen:o.isPopupOpen,isToolbarShown:s.isToolbarShown,isEditingSb:i.isEditingSb,levelBackgrounds:i.levelBackgrounds,showProductsLayer:i.showProductsLayer,showRegisterModal:a.showRegisterModal,showCart:l.isOpen,showVideoDescription:i.showVideoDescription,showVideoAttachments:i.showVideoAttachments,learningSubject:i.learningSubject,hasActiveChapter:!!(null===(t=i.chapterHighlighting)||void 0===t?void 0:t.uid),selectedVideoIdx:null===(n=i.selectedVideo)||void 0===n?void 0:n.idx,selectedVideo:null===(r=i.selectedVideo)||void 0===r?void 0:r.data}}),(function(e){return{resetCogvidDetail:function(){return e(Q.e.resetCogvidDetail())},getCogvidList:function(t,n){return e(Q.e.getCogvidList(t,n))},updateCogvidList:function(t,n,r){return e(Q.e.updateCogvidList(t,n,r))},loadMoreCogvidList:function(t,n,r){return e(Q.e.loadMoreCogvidList(t,n,r))},getCogvidThumbnail:function(t){return e(Q.e.getCogvidThumbnail(t))},showVideoOverlay:function(t){return e(Q.e.showVideoOverlay(t))},getGalleryVideo:function(t,n){return e(Q.e.getGalleryVideo(t,n))},unpublishVideo:function(t,n,r){return e(Q.e.unpublishVideo(t,n,r))},cloneCogvid:function(t,n,r){return e(Q.e.cloneCogvid(t,n,r))},exportCogvid:function(t,n,r){return e(Q.e.exportCogvid(t,n,r))},deleteVideo:function(t,n,r){return e(Q.e.deleteVideo(t,n,r))},updateReviewAttachment:function(t,n,r){return e(Q.e.updateReviewAttachment(t,n,r))},toggleOpenPopup:function(t){return e(Q.f.toggleOpenPopup(t))},updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))},updateEditVideoModal:function(t,n){return e(Q.e.updateEditVideoModal(t,n))},updateCogvidState:function(t,n,r){return e(Q.e.updateCogvidState(t,n,r))},displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))},setActiveChapter:function(t){return e(Q.e.setActiveChapter(t))},toggleCreateCogvidForm:function(t){return e(Q.e.toggleCreateCogvidForm(t))},toggleAddFilesToGalleryForm:function(t){return e(Q.e.toggleAddFilesToGalleryForm(t))},updateIsEditingSb:function(t,n,r){return e(Q.e.updateIsEditingSb(t,n,r))},displayVideoDescription:function(t){return e(Q.e.displayVideoDescription(t))},getLectureVideo:function(t,n,r){return e(Q.e.getLectureVideo(t,n,r))},displayProductsLayer:function(t,n,r){return e(Q.e.displayProductsLayer(t,n,r))},displaySlide:function(t){return e(Q.d.displaySlide(t))},displayToc:function(t){return e(Q.d.displayToc(t))},updateSelectedVideo:function(t){return e(Q.e.updateSelectedVideo(t))}}}),null,{forwardRef:!0})(Object(K.b)(Object(K.c)(J_))),ew=r(128),tw=r.n(ew),nw=r(48);function rw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rw(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aw=x.g.MEETING_STATUS,ow=function(e){var t,n,r,i=e.videoId,a=e.userScaffId,o=e.chapterContent,s=void 0===o?"":o,l=e.meetingInfo,c=void 0===l?{}:l,u=e.canStartMeeting,d=void 0!==u&&u,h=Object(q.c)(),f=(Object(nw.M)(),Object(q.d)((function(e){var t;return null===(t=e.videolive)||void 0===t?void 0:t.meetingSession})),c.schedule),p=c.meeting,m=Object(g.useState)(!1),b=pi()(m,2),y=b[0],A=b[1],_=Object(g.useState)(""),w=pi()(_,2),E=(w[0],w[1]),S=d||x.c.isVideoOwner({videoId:i}),C=null==p?void 0:p.status,T=null==f?void 0:null===(t=f.participantIds)||void 0===t?void 0:t.includes(x.c.getCurrentUserId()),k=function(e){e.stopPropagation(),p?C===aw.SCHEDULED||C===aw.STOPPED?S&&h(Q.n.startMeeting({schedUid:f&&f.uid},O,M)):C===aw.STARTED&&h(Q.n.joinMeeting({meetUid:p.uid},I,M)):S&&f&&h(Q.n.startMeeting({schedUid:f.uid},O,M))},O=function(){var e=H()(F.a.mark((function e(t){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t&&(localStorage.setItem(x.g.MEETING_INFO_KEY,JSON.stringify(iw(iw({},c),{},{meetingTitle:s,videoId:i,isVideoOwner:S,userScaffId:a}))),localStorage.removeItem(x.g.MEETING_RECORD_ID),window.open(window.location.origin+x.g.MEETING_PAGE_PATH,"_blank").focus())}catch(e){E(e.message)}A(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(e){try{e&&e.meeting?(localStorage.setItem(x.g.MEETING_INFO_KEY,JSON.stringify(iw(iw({},c),{},{meetingTitle:s,videoId:i,isVideoOwner:S,userScaffId:a}))),window.open(window.location.origin+x.g.MEETING_PAGE_PATH,"_blank").focus()):x.e.error(Object(_t.t)("meeting.joinMeetingFailedMsg"))}catch(e){}A(!1)},M=function(){A(!1)};Object(g.useEffect)((function(){window.addEventListener("storage",(function(e){}))}),[]);var D=(null==p?void 0:p.status)===aw.STARTED&&T,N=v.a.createElement("span",{className:P()("cursor-pointer d-flex align-items-center",!D&&"disabled"),onClick:y||!D?null:k},y?v.a.createElement(xn.a,{animation:"border",size:"sm"}):v.a.createElement("i",{className:"fv fuvi-join-room"}),v.a.createElement("div",{className:"ml-1"},Object(_t.t)("btn.join")));switch(C){case aw.CLOSED:n=v.a.createElement("span",{className:"u-cursor-default bg-light text-dark d-flex align-items-center"},v.a.createElement("i",{className:"fv fuvi-stop u-fs-1o2"}),v.a.createElement("div",{className:"ml-1"},Object(_t.t)("btn.ended")));break;case aw.STARTED:n=N,r=Object(_t.t)("tooltip.joinMeeting");break;case aw.STOPPED:default:S&&T?(n=v.a.createElement("span",{className:"cursor-pointer d-flex align-items-center",onClick:y?null:k},y?v.a.createElement(xn.a,{animation:"border",size:"sm"}):v.a.createElement("i",{className:P()("fv",S?"fuvi-start u-fs-1o2":"fuvi-join-room")}),v.a.createElement("div",{className:"ml-1"},S?Object(_t.t)("btn.start"):Object(_t.t)("btn.join"))),r=Object(_t.t)("tooltip.startMeeting")):(n=N,r=Object(_t.t)("tooltip.joinMeeting"))}return v.a.createElement(Kt.a,{placement:"bottom",delay:{show:800},overlay:v.a.createElement(Xt.a,null,r),trigger:r?["hover","focus"]:[]},n)},sw=r(46),lw=r.n(sw);function cw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cw(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dw=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{mousePosition:0,previewImageUrl:null}),G()(V()(e),"handleMouseMovePosition",(function(t){t.stopPropagation();var n=t.currentTarget.getBoundingClientRect(),r=e.state.mousePosition,i=e.props,a=i.data,o=void 0===a?{}:a,s=i.rootContext,l=i.rootReviewContext,c=i.displayPreviewImage,u=i.previewImage,d=void 0===u?{}:u,h=o.previewSegments,f=void 0===h?[]:h,p=o.startTime,m=o.endTime,g=(t.clientX-n.left)/(n.right-n.left);if(r!=g){var v=g*(m-p)+p,b=v?x.c.msToTimestamp(v,v>36e5?"HH:mm:ss":"mm:ss"):null,y=f.find((function(e){return e.start<=v&&e.end>=v}));if(y){var A="".concat(l||s).concat(y.image);e.setState({mousePosition:100*g,previewImageUrl:A}),(null==d?void 0:d.previewUrl)!=A&&c(uw(uw({},y),{},{leftOfTooltip:t.clientX,topOfTooltip:n.y,previewUrl:A,durationTimeDisplay:b}))}else e.setState({mousePosition:100*g})}})),G()(V()(e),"handleMouseLeave",(function(t){(0,e.props.displayPreviewImage)({})})),e}return c()(n,[{key:"render",value:function(){var e=this.state.mousePosition,t=this.props,n=t.videoTime,r=t.active,i=t.data,a=void 0===i?{}:i,o=t.onClick,s=a.startTime,l=a.endTime,c=1e3*n.currentTime,u=r?((c||1)-s)/(l-s+1)*100:0;return v.a.createElement("div",{className:lw.a.indicatorWrap,onClick:o,onMouseMove:this.handleMouseMovePosition,onMouseLeave:this.handleMouseLeave},v.a.createElement("div",{className:lw.a.indicatorProcessWrap},v.a.createElement("span",{style:{width:"".concat(u,"%")},className:P()(lw.a.processingIndicator)}),v.a.createElement("span",{className:lw.a.indicator,style:{left:"".concat(u,"%")},onClick:function(e){return e.stopPropagation()}})),v.a.createElement("div",{className:P()(lw.a.markRoundIndicatorWrap),style:{left:"".concat(e,"%")}},v.a.createElement("img",{src:I.a.markRound,className:P()(lw.a.markRoundIndicator)})))}}]),n}(g.Component),hw=Object(q.b)((function(e){var t=e.cogvid;return{previewImage:t.previewImage,videoTime:t.videoTime,rootContext:t.cogvidDetails.rootContext}}),(function(e){return{displayPreviewImage:function(t){return e(Q.e.displayPreviewImage(t))}}}))(dw),fw=x.g.SCOPE_CHAPTER_STATUS,pw=x.g.CHAPTER_PROCESSING_STATUS,mw=function(e){var t,n,r,i,a,o=e.uid,s=e.videoId,l=e.isEpisodic,c=e.isPreview,u=e.attachmentCount,d=(e.commentCount,e.likeCount),h=e.noteCount,f=e.views,p=e.accessible,m=e.durationTimeDisplay,g=e.liked,b=e.meetingInfo,y=(b=void 0===b?{}:b).schedule,A=(y=void 0===y?{}:y).startTime,_=void 0===A?"":A,w=y.timezone,E=void 0===w?"GMT":w,S=e.meetingInfo,C=e.chapterContent,T=e.userScaffId,k=e.processingStatus,O=e.visibilityPrivacyScope,I=(e.canViewComments,e.canExtractChapter),M=e.canViewNotes,D=e.canSetPrivacyChapter,N=e.canStartMeeting,L=e.canEditMeeting,R=(e.isShowComments,e.isLockedChapter),B=e.isLikeProcessing,j=e.isShowAttachment,F=e.isActiveAttachmentList,U=(e.isActiveComment,e.isDisabledAttachmentsBtn),H=e.isBrainHive,z=e.isShowNotes,V=e.isActiveNote,W=e.isShowSetPrivacyChapter,G=e.isUpdatingChapterPrivacy,q=(e.hasNewComments,e.hasNewAttachments),Y=e.isShowLikes,K=e.isLiveSession,X=e.isShowCopyChapterLink,Q=e.isMeetingLive,$=e.isMeetingEnded,J=e.showChapterButtons,Z=e.isInvisibleToggleLockBtn,ee=e.isDisabledToggleLockBtn,te=e.isTogglingChapterLock,ne=(e.isAttachmentOnly,e.isPaused,e.isActive,e.extractChapter),re=e.setPrivacyChapter,ie=e.onMeetingEdit,ae=(e.onPlayPauseBtnClick,e.onToggleChapterLock),oe=(e.onPreviewItemActivate,e.copyChapterLinkToClipBoard),se=(e.handleLikeHover,e.handleLikeLeave,e.handleCommentsClick,e.handleCommentsHover,e.handleCommentsLeave,e.handleLikeChapter),le=e.handleNotesClick,ce=e.handleNotesHover,ue=e.handleNotesLeave,de=e.handlePreviewAttachmentsClick,he=(e.handlePreviewCommentsClick,e.handlePreviewNotesClick),fe=e.handleAttachmentsClick,pe=e.isFreeFUI,me=e.onToggleFreeFUI,ge=e.isUpdatingFUI,ve=(null==S?void 0:null===(t=S.meeting)||void 0===t?void 0:t.recordingFileUri)||!1;return v.a.createElement("div",{className:P()("w-100 d-flex align-items-center px-1 flex-shrink-0 u-mt-1o8 ml-2")},v.a.createElement("div",{className:"d-flex align-items-center"},J&&v.a.createElement(Qt,{tooltipText:pe?"Turn off free F.U.I":"Turn on free F.U.I",className:P()("ml-0 mr-1 rounded-circle overflow-hidden",lw.a.badge,!pe&&"u-opacity-30"),isLoading:ge,onClick:me},v.a.createElement("i",{className:P()("fv u-fs-3o4",pe?"fuvi-like-full":"fuvi-like",pe&&lw.a.freeFUI,!pe&&lw.a.nonFreeFUI)})),J&&!Z&&v.a.createElement(Qt,{tooltipText:ee||Z?"":p?Object(_t.t)("tooltip.lockChapter"):Object(_t.t)("tooltip.unlockChapter"),className:P()("ml-0 mr-1 rounded-circle overflow-hidden",lw.a.badge,ee&&"u-cursor-default u-opacity-50",p&&"u-opacity-30",Z&&"invisible"),onClick:ae,isLoading:te,disabled:ee||Z},v.a.createElement("i",{className:P()("fv u-fs-3o4",p?"fuvi-unlock-icon":"fuvi-locked-icon")}))),v.a.createElement("div",{className:"d-flex align-items-center"},K&&!$&&!Q&&v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,x.c.convertToCurrentTZ(_,E).format("MMM DD, YYYY  HH:mm"))},v.a.createElement("div",{className:P()("px-1",lw.a.meetingTimeBadge,!K&&"u-opacity-0",!L&&"u-cursor-default"),onClick:L?ie:null},L&&v.a.createElement("i",{className:"fv fuvi-edit-copy mr-1"}),x.c.convertToCurrentTZ(_,E).format("MMM DD  HH:mm"))),Q&&v.a.createElement("div",{className:P()("px-1 u-cursor-default text-white bg-primary d-flex align-items-center",lw.a.meetingTimeBadge)},v.a.createElement("i",{className:"fv fuvi-live-icon mr-1 u-fs-1"}),Object(_t.t)("live")),K&&$&&v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,{className:"u-ws-pre-line u-wb-break-word"},"".concat(x.c.convertToCurrentTZ(null==S?void 0:null===(n=S.meeting)||void 0===n?void 0:n.startTime,E).format("MMM DD, YYYY  HH:mm"),"\n                      ").concat(Object(_t.t)("tooltip.meetingLength",{length:x.c.getReadableTimeDuration((new Date(null==S?void 0:null===(r=S.meeting)||void 0===r?void 0:r.endTime)-new Date(null==S?void 0:null===(i=S.meeting)||void 0===i?void 0:i.startTime))/6e4)})))},v.a.createElement("div",{className:P()("px-1 u-cursor-default",lw.a.meetingTimeBadge)},x.c.convertToCurrentTZ(null==S?void 0:null===(a=S.meeting)||void 0===a?void 0:a.startTime,E).format("MMM DD  HH:mm")))),k&&k!=pw.NONE?v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(lw.a.chapterProcessingStatus)},v.a.createElement(xn.a,{animation:"border",variant:"white",size:"sm",className:P()(lw.a.chapterSpinner,"mr-1")}),v.a.createElement("span",null,k||""))):v.a.createElement(v.a.Fragment,null,W&&D&&v.a.createElement("div",{className:"mr-1"},v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,Object(_t.t)(O===fw.PRIVATE?"tooltip.setChapterPrivacyPublic":"tooltip.setChapterPrivacyPrivate"))},v.a.createElement("div",null,v.a.createElement("div",{onClick:re,className:P()("position-relative",c&&"u-pointer-event-none")},v.a.createElement("div",{className:P()("position-relative",lw.a.attachmentBadgeWrap)},v.a.createElement(Qt,{className:P()("ml-0 p-0 position-relative",lw.a.btn),classNameBadge:P()(lw.a.attachmentBadge,"u-ml-3o16"),disabled:c||G},O===fw.PRIVATE?v.a.createElement("i",{className:"fv fuvi-eye-disable u-fs-1 text-secondary"}):v.a.createElement("i",{className:"fv fuvi-eye u-fs-1"}))))))),Y&&!R&&v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,Object(_t.t)("tooltip.rateChapter"))},v.a.createElement("div",{className:P()("mr-1",K&&"u-opacity-0 u-pointer-event-none")},v.a.createElement("div",{onClick:function(e){B||R||se(e,o,g,s,T)},className:P()("position-relative",R&&"u-pointer-event-none")},v.a.createElement("div",{className:P()("position-relative",lw.a.attachmentBadgeWrap)},v.a.createElement(Qt,{number:d,className:P()("mr-1 ml-0 p-0 position-relative",lw.a.btn,g&&lw.a.likeActive,d>0&&"u-text-red")},v.a.createElement("div",{className:"d-flex align-items-center"},g||d>0?v.a.createElement("i",{className:"fv fuvi-like-full u-fs-1"}):v.a.createElement("i",{className:"fv fuvi-like u-fs-1"}),v.a.createElement("span",{className:"u-fs-3o4 ml-1 u-line-height-1 text-dark"},d>0?x.c.nFormatter(d):""))))))),I&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()("mr-1")},v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,Object(_t.t)("tooltip.extractChapter"))},v.a.createElement("div",null,v.a.createElement("div",{onClick:ne,className:P()("position-relative",c&&"u-pointer-event-none")},v.a.createElement("div",{className:P()("position-relative",lw.a.attachmentBadgeWrap)},v.a.createElement(Qt,{className:P()("ml-0 p-0 position-relative",lw.a.btn),classNameBadge:P()(lw.a.attachmentBadge,"u-ml-3o16"),disabled:c},v.a.createElement("i",{className:"fv fuvi-share u-fs-1"})))))))),z&&v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,Object(_t.t)("tooltip.viewAddNote"))},v.a.createElement("div",{className:P()("mr-1")},v.a.createElement("div",{onClick:function(e){return R||!M?null:c?he(e):le(e,T)},onMouseEnter:c||R||!M?null:ce,onMouseLeave:c||R||!M?null:ue,className:P()("position-relative",(R||!M)&&"u-pointer-event-none")},v.a.createElement("div",{className:P()("position-relative u-pr-5o8",lw.a.attachmentBadgeWrap)},v.a.createElement(Qt,{badge:h>0?x.c.nFormatter(h):"",className:P()("mr-1 ml-0 p-0 position-relative",V&&"activeButton",lw.a.btn,!M&&"u-cursor-default u-opacity-50"),classNameBadge:P()(lw.a.attachmentBadge,"u-ml-3o16"),disabled:R||!M},v.a.createElement("i",{className:"fv fuvi-notes u-fs-1"})))))),ve&&H&&v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,Object(_t.t)("tooltip.downloadRecordedVideo"))},v.a.createElement("div",null,v.a.createElement("div",{id:"recorded-video-".concat(o),onClick:function(e){return window.open(ve,"_blank")},className:"position-relative mr-1"},v.a.createElement("div",{id:"recorded-video-".concat(o,"-indicator"),className:P()("position-relative",lw.a.attachmentBadgeWrap)},v.a.createElement(Qt,{badge:u>0?x.c.nFormatter(u):"",className:P()("ml-0 p-0 position-relative",lw.a.btn)},v.a.createElement("i",{className:"fv fuvi-download u-fs-1"})))))),K&&H&&v.a.createElement("div",{className:P()("position-relative text-uppercase",lw.a.btn,lw.a.startBtn)},v.a.createElement(ow,{videoId:s,userScaffId:T,meetingInfo:S,chapterContent:C,canStartMeeting:N})),j&&v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,Object(_t.t)("tooltip.viewaddAtt"))},v.a.createElement("div",{className:P()("mr-1")},v.a.createElement("div",{id:"attachments-".concat(o),onClick:function(e){return R?null:c?de(e):fe(e)},className:P()("position-relative",(U||R)&&"u-pointer-event-none")},v.a.createElement("div",{id:"attachments-".concat(o,"-indicator"),className:P()("position-relative u-pr-5o8",lw.a.attachmentBadgeWrap)},v.a.createElement(Qt,{badge:u>0?x.c.nFormatter(u):"",className:P()(U&&"u-cursor-default",F&&"activeButton","mr-1 ml-0 p-0 position-relative",lw.a.btn),disabled:U||R,classNameBadge:P()(lw.a.attachmentBadge,!q&&lw.a.badgeSawBg)},v.a.createElement("i",{className:"fv fuvi-attach-rotated-90 u-fs-1"})))))),v.a.createElement("div",{className:"flex-grow-1"}),f>=0&&!R&&v.a.createElement("div",{className:P()("ml-1",K&&"u-opacity-0 u-pointer-event-none")},v.a.createElement("div",{className:P()("position-relative u-pl-1o8 u-pr-5o8 d-flex align-items-center",lw.a.attachmentBadgeWrap)},v.a.createElement("i",{className:"fv fuvi-eye mr-1 u-fs-1 u-opacity-80"}),v.a.createElement("span",null,f>0?x.c.nFormatter(f):""))),l&&X&&v.a.createElement(Kt.a,{delay:{show:800},overlay:v.a.createElement(Xt.a,null,Object(_t.t)("tooltip.copyChapterLink"))},v.a.createElement("div",{className:"ml-1"},v.a.createElement("div",{id:"cp-ch-".concat(o),onClick:function(e){e.stopPropagation(),oe&&oe(o,C)},className:"position-relative"},v.a.createElement("div",{id:"cp-ch-".concat(o,"-indicator"),className:P()("position-relative",lw.a.attachmentBadgeWrap)},v.a.createElement(Qt,{className:P()("ml-0 p-0 position-relative",lw.a.btn)},v.a.createElement("i",{className:"fv fuvi-link-ic u-fs-1"}))))))),l&&v.a.createElement("div",{className:P()("px-1 ml-1",!m&&"invisible",lw.a.attachmentBadgeWrap,lw.a.timeDurationBadge)},m))};function gw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gw(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}x.g.SCOPE_CHAPTER_STATUS;var bw=x.g.COMMENT_LIKE_SCOPE,yw=x.g.VIDEO_CATEGORY,Aw=x.g.CHAPTER_PROCESSING_STATUS,_w=x.g.CHAPTER_TYPES,ww=x.g.MEETING_STATUS,Ew=x.g.SEARCH_PARAM.KEY,Sw=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"cgItem",v.a.createRef()),G()(V()(e),"cancelButtonClicked",!1),G()(V()(e),"state",{isEdit:!1,editValue:e.props.data.content,editTimeStart:0,editTimeEnd:0,isOpenDeletePopover:!1,deleteTarget:"",isTogglingChapterLock:!1,isAttachmentsHover:!1,isLikeProcessing:!1,isCommentsHover:!1,isNotesHover:!1,isLoadPreviewImage:!1,isUpdatingChapterPrivacy:!1,isLoadingPrivacyMember:!1,isCopying:!1,sbImages:[],isUpdatingFUI:!1}),G()(V()(e),"componentDidUpdate",(function(t){var n=t.data,r=e.props,i=r.data,a=r.chapterHighlighting,o=r.showChapterImageSlider;a.uid!==i.uid&&(null==o?void 0:o.chapterId)!==i.uid||(null==i?void 0:i.type)!==_w.EPISODIC.key||0!=e.state.sbImages.length&&i.startTime===n.startTime&&i.endTime===n.endTime||e.buildSlideImages()})),G()(V()(e),"buildSlideImages",(function(){var t=e.props,n=t.data,r=t.version,i=t.cognitiveResolutionUnit,a=t.rootContext,o=n.startBlockSeq,s=n.endTime,l=x.c.generateChapterSbImages({startBlockSeq:o,endTime:s},{version:r,cognitiveResolutionUnit:i,rootContext:a});e.setState({sbImages:l})})),G()(V()(e),"handleKeyDown",(function(t){27===t.keyCode&&e.onCancel(t),x.c.preventKeyDownSideEffect(t),32===t.keyCode&&t.ctrlKey&&(t.preventDefault(),Object(x.p)(t))})),G()(V()(e),"onFocus",(function(t){t.stopPropagation(),t.currentTarget.closest(".draggable-item").setAttribute("draggable",!1),e.setState({isEdit:!0})})),G()(V()(e),"onSave",(function(t){t.stopPropagation(),t.currentTarget.closest(".draggable-item").setAttribute("draggable",!0);var n=e.props,r=n.updateChapterItem,i=n.data,a=n.videoId,o=n.onEditModeId,s=n.showVideoAttachments,l=n.displayVideoAttachments,c=n.ownerScaffId,u=n.canFetchRawVideos,d=n.displayCoverImage,h=i.meetingInfo,f=(h=void 0===h?{}:h).schedule,p=(f=void 0===f?{}:f).startTime,m=f.endTime,g=f.reminderTime,v=f.timezone,b=e.state.editValue;if(e.setState({isEdit:!1}),i.content===b)return o("");var y=_w.LIVE_SESSION.key===i.type;r(vw(vw({},i),{},{content:b,ownerScaffId:c,canFetchRawVideos:u,videoId:a,startTime:y?new Date(p).getTime():i.startTime,endTime:y?new Date(m).getTime():i.endTime,timezone:v,reminderTime:g}),(function(){var t;o(""),(null===(t=e.props.coverImage)||void 0===t?void 0:t.content)&&d(vw(vw({},e.props.coverImage),{},{content:b||""})),i.uid===s.chapterId&&l(vw(vw({},s),{},{content:b}))}))})),G()(V()(e),"onCancel",(function(t){t.stopPropagation();var n=e.props,r=n.data,i=n.onEditModeId;e.setState({isEdit:!1,editValue:r.content}),i("")})),G()(V()(e),"componentWillUnmount",(function(){(0,e.props.onEditModeId)("")})),G()(V()(e),"handleDragging",(function(){x.r.isPlayer()&&!x.r.paused()&&x.r.pause()})),G()(V()(e),"shouldComponentUpdate",(function(t,n){var r={},i={};return Object.keys(e.props).forEach((function(n){"function"!=typeof e.props[n]&&"coverImage"!==n&&(r[n]=e.props[n],i[n]=t[n])})),!Object(Y.isEqual)(r,i)||!Object(Y.isEqual)(n,e.state)})),G()(V()(e),"handleChangeText",(function(t){t.preventDefault(),e.setState({editValue:t.target.value})})),G()(V()(e),"handleDeleteRequest",(function(t,n){t.stopPropagation(),t.persist&&t.persist();var r=!n&&t.target;e.setState((function(e){return{isOpenDeletePopover:!e.isOpenDeletePopover,deleteTarget:r||e.deleteTarget}}))})),G()(V()(e),"handleDeleteConfirm",(function(t){t.stopPropagation(),t.persist();var n=e.props,r=n.onDelete,i=n.data;e.setState({isOpenDeletePopover:!1,deleteTarget:""},(function(){return r(t,i)}))})),G()(V()(e),"handleMouseOverToDisPlayCGCoverImage",(function(t,n){var r,i=e.props,a=(i.showAttachmentReview,i.displayCoverImage),o=i.rootContext,s=i.rootReviewContext,l=e.state.editValue,c=null===(r=e.cgItem.current)||void 0===r?void 0:r.getBoundingClientRect().x,u="";n.image?Object(Y.isEmpty)(n)||(u="".concat(s||o).concat(n.image),e.setState({isLoadPreviewImage:!0})):e.setState({isLoadPreviewImage:!1}),a({image:u,content:(null==n?void 0:n.content)?l:"",attributes:(null==n?void 0:n.attributes)||{},leftOfTooltip:c})})),G()(V()(e),"handleAttachmentsClick",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var n=e.props,r=n.videoId,i=n.videoStatus,a=n.data,o=a.uid,s=a.content,l=a.permissions,c=a.seqNumber,u=a.attachments,d=void 0===u?[]:u,h=n.isAttachmentEditable,f=n.displayVideoAttachments,p=n.ownerId,m=n.showVideoAttachments,g=n.updateReviewAttachment,v=n.lastReviewStatus,b=n.videoScaffId,y=n.attachmentCount;if(r===m.videoId&&o===m.chapterId)return f({}),void g({attachmentId:""});if(0!==y||h){var A=d[0];f({videoId:r,chapterId:o,title:s,editable:h,isOwner:x.c.isCurrentUserId(p),attachmentCount:y,permissions:l,videoStatus:i,lastReviewStatus:v,videoScaffId:b,chapterSeqNumber:c,attachmentId:null==A?void 0:A.contentId}),(null==A?void 0:A.contentId)&&g({videoId:r,chapterId:o,url:null==A?void 0:A.url,fileName:null==A?void 0:A.title,fileType:null==A?void 0:A.mediaType,attachmentId:null==A?void 0:A.contentId,thumbnailUrl:null==A?void 0:A.thumbnailUrl,freeDownload:null==A?void 0:A.freeDownload})}})),G()(V()(e),"handleAttachmentsHover",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.setState({isAttachmentsHover:!0});var n=e.props,r=n.videoId,i=n.videoStatus,a=n.data,o=a.uid,s=a.content,l=a.permissions,c=n.isAttachmentEditable,u=n.displayPreviewAttachments,d=n.ownerId,h=n.videoScaffId,f=n.attachmentCount;0!==f&&u({videoId:r,chapterId:o,title:s,editable:c,isOwner:x.c.isCurrentUserId(d),hoverTime:(new Date).getTime(),attachmentCount:f,permissions:l,videoStatus:i,videoScaffId:h})})),G()(V()(e),"handleAttachmentsLeave",(function(t){e.setState({isAttachmentsHover:!1}),e.handleMouseOverToDisPlayCGCoverImage(t,e.props.data),setTimeout((function(){var t=e.props,n=t.data.uid,r=t.previewAttachmentsChapterId,i=t.displayPreviewAttachments;e.state.isAttachmentsHover||n!==r||i({})}),50)})),G()(V()(e),"toggleChapterLock",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var n=e.props,r=n.videoId,i=n.data,a=i.uid,o=i.accessible,s=n.isDisabledToggleLockBtn,l=n.showChapterButtons,c=n.updateChapterLock;l&&!s&&(e.setState({isTogglingChapterLock:!0}),c({videoId:r,chapterId:a,accessible:!o},(function(){return e.setState({isTogglingChapterLock:!1})}),(function(){return e.setState({isTogglingChapterLock:!1})})))})),G()(V()(e),"toggleChapterFreeFUI",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var n=e.props,r=n.videoId,i=n.data,a=i.uid,o=i.freeFUI,s=n.showChapterButtons,l=n.updateChapterFreeFUI;s&&(e.setState({isUpdatingFUI:!0}),l({videoId:r,chapterId:a,freeFUI:!o},(function(){return e.setState({isUpdatingFUI:!1})}),(function(){return e.setState({isUpdatingFUI:!1})})))})),G()(V()(e),"showShareVideoModal",(function(t){t&&t.stopPropagation();var n=e.props,r=n.updateShareVideoChapterModal,i=n.videoId,a=n.data,o=(a=void 0===a?{}:a).uid,s=a.content,l=n.videoOwnerId,c=n.author.userId;r({show:!0,title:s,videoId:i,chapterId:o,isEditSharing:!0,isOwner:x.c.isCurrentUserId(l)||x.c.isCurrentUserId(c),videoOwnerId:l,chapterOwnerId:c})})),G()(V()(e),"handlePreviewAttachmentsClick",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var n=e.props,r=n.videoId,i=n.videoScaffId,a=n.data,o=a.uid,s=a.attachments,l=void 0===s?[]:s,c=a.content,u=n.onPreviewItemActivate,d=l[0];u({attachment:{videoId:r,chapterId:o,chapterTitle:c,attachmentId:null==d?void 0:d.contentId,attachmentTitle:null==d?void 0:d.title,mediaType:null==d?void 0:d.mediaType,url:null==d?void 0:d.url,videoScaffId:i}})})),G()(V()(e),"handleCommentsClick",(function(t,n){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var r=e.props,i=r.videoId,a=r.videoScaffId,o=r.data,s=o.uid,l=o.content,c=o.permissions,u=r.showComments,d=r.displayComments;r.canViewComments&&(i!==(null==u?void 0:u.videoId)||s!==(null==u?void 0:u.chapterId)?d({videoId:i,chapterId:s,title:l,permissions:c,videoScaffId:a,userScaffId:n}):d({}))})),G()(V()(e),"handleNotesClick",(function(t,n){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var r=e.props,i=r.videoId,a=r.data,o=a.uid,s=a.content,l=a.permissions,c=a.seqNumber,u=r.showNotes,d=r.displayNotes,h=r.canViewNotes,f=r.isDummyDailyVideo;h&&(i!==(null==u?void 0:u.videoId)||o!==(null==u?void 0:u.chapterId)?d({videoId:i,chapterId:o,seqNumber:c,title:s,permissions:l,isDummyDailyVideo:f,userScaffId:n}):d({}))})),G()(V()(e),"handleLikeChapter",(function(t,n,r,i,a){t.stopPropagation();var o=x.c.getCurrentVideoCategory(),s=e.props,l=s.likeChapter,c=s.updateVideoPreviewData;e.setState({isLikeProcessing:!0},(function(){l({chapterId:n,liked:r,videoId:i,userScaffId:a,category:bw[o]},(function(){e.setState({isLikeProcessing:!1},(function(){return c({videoId:i})}))}),(function(t){e.setState({isLikeProcessing:!1})}))}))})),G()(V()(e),"handleShareButtonMouseLeave",(function(){(0,e.props.updateSharedPeopleData)(HA.i)})),G()(V()(e),"handlePreviewCommentsClick",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var n=e.props,r=n.videoId,i=n.videoScaffId,a=n.data,o=a.uid,s=a.content,l=a.permissions;(0,n.onPreviewItemActivate)({comment:{videoId:r,chapterId:o,chapterTitle:s,permissions:l,videoScaffId:i}})})),G()(V()(e),"handlePreviewNotesClick",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var n=e.props,r=n.videoId,i=n.data,a=i.uid,o=i.content,s=i.permissions;(0,n.onPreviewItemActivate)({note:{videoId:r,chapterId:a,chapterTitle:o,permissions:s,isDummyDailyVideo:n.isDummyDailyVideo}})})),G()(V()(e),"handleCommentsHover",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.setState({isCommentsHover:!0});var n=e.props,r=n.videoId,i=n.videoScaffId,a=n.data,o=a.uid,s=a.content,l=a.permissions,c=n.canViewComments,u=n.displayPreviewComments,d=n.commentCount,h=n.showComments;c&&0!==d&&o!==(null==h?void 0:h.chapterId)&&u({videoId:r,chapterId:o,title:s,permissions:l,videoScaffId:i})})),G()(V()(e),"handleCommentsLeave",(function(t){e.setState({isCommentsHover:!1}),e.handleMouseOverToDisPlayCGCoverImage(t,e.props.data),setTimeout((function(){var t=e.props,n=t.data.uid,r=t.previewCommentsChapterId,i=t.displayPreviewComments;e.state.isCommentsHover||n!==r||i(null)}),50)})),G()(V()(e),"handleNotesHover",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.setState({isNotesHover:!0});var n=e.props,r=n.videoId,i=n.data,a=i.uid,o=i.content,s=i.permissions,l=i.noteCount,c=n.canViewNotes,u=n.displayPreviewNotes,d=n.isDummyDailyVideo;c&&0!==l&&u({videoId:r,chapterId:a,title:o,permissions:s,isDummyDailyVideo:d})})),G()(V()(e),"handleNotesLeave",(function(t){e.setState({isNotesHover:!1}),e.handleMouseOverToDisPlayCGCoverImage(t,e.props.data),setTimeout((function(){var t=e.props,n=t.data.uid,r=t.previewNotesChapterId,i=t.displayPreviewNotes;e.state.isNotesHover||n!==r||i(null)}),50)})),G()(V()(e),"handleLikeHover",(function(t){var n=e.props,r=n.data,i=r.uid,a=r.likeCount,o=r.publicLikeCount,s=n.updateSharedPeopleData,l=n.getChapterLike,c=n.isExploringMenu,u=n.videoOwnerId,d=x.c.getCurrentVideoCategory(),h=x.c.isCurrentUserId(u);i&&0!==(c?o:a)&&(!h&&c||(s({show:!0,isLikeUserView:!0,listTitle:Object(_t.t)("peopleLiked"),iconName:"fuvi-like",isLoading:!0}),l({chapterId:i,category:bw[d]},(function(e){var t=[];e.map((function(e){t.push({userProfile:e})})),s({data:t,isLoading:!1})}),(function(e){s(HA.i)}))))})),G()(V()(e),"handleLikeLeave",(function(t){(0,e.props.updateSharedPeopleData)(HA.i)})),G()(V()(e),"setPrivacyChapter",(function(t){t.stopPropagation();var n=e.props,r=n.getChapterSharingInfo,i=n.videoId,a=n.videoOwnerId,o=n.data;r({videoId:i,chapterId:o.uid},(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.props.setChapterPrivacyData({videoId:i,chapterData:o,members:t.filter((function(e){var t;return(null==e?void 0:null===(t=e.userProfile)||void 0===t?void 0:t.userId)!=a}))})}))})),G()(V()(e),"openEditMeetingForm",(function(t){t.stopPropagation();var n=e.props,r=n.updateCreateMeetingForm,i=n.data,a=i.meetingInfo,o=(a=void 0===a?{}:a).schedule,s=(o=void 0===o?{}:o).uid,l=o.startTime,c=o.endTime,u=o.reminderTime,d=o.timezone,h=o.content,f=i.seqNumber,p=i.description;r({show:!0,startDate:x.c.toDateWithTimezone(l,d),endDate:x.c.toDateWithTimezone(c,d),isEdit:!0,reminder:"".concat(u),timezone:d,title:h,seqNumber:f,description:p,schedUid:s})})),G()(V()(e),"copyChapterLinkToClipBoard",(function(t,n){var r=window.location.href.split("?")[0],i=new URL(r);i.searchParams.append(Ew.VIDEO_ID,e.props.videoId),i.searchParams.append(Ew.CHAPTER_ID,t),i.searchParams.append(Ew.TIMESTAMP,(new Date).getTime());var a=i.href;e.setState({isCopying:!0},(function(){try{!x.c.isSafari()&&ic()(""),ic()(a),x.e.info(Object(_t.t)("copyChapterLinkToClipboard",{chapterTitle:n}),!0,"",3e3)}finally{e.setState({isCopying:!1})}}))})),G()(V()(e),"handleMouseEnter",(function(t){var n=e.props,r=n.index;(0,n.onMouseEnter)(t,r)})),G()(V()(e),"handleMouseLeave",(function(t){var n=e.props;n.chapterHighlighting;(0,n.onMouseLeave)(t)})),e}return c()(n,[{key:"render",value:function(){var e,t,n,r,i,a,o,s,l,c,u=this.props,d=u.data,h=u.inputClass,f=u.isEdittingId,p=u.index,m=u.moveCard,g=(u.videoType,u.onPlaybackBarClick),b=u.chapterHighlighting,y=void 0===b?{}:b,A=u.isEdittingChapterText,_=u.isEnabledEditContent,w=u.onDragStart,E=u.onDragEnd,S=u.onDrop,C=u.isLastItem,T=u.isAttachmentEditable,k=u.showAttachmentReview,O=u.showVideoAttachments,I=void 0===O?{}:O,M=u.attachmentReviewChapterId,D=u.showChapterButtons,N=u.isDisabledToggleLockBtn,L=u.isInvisibleToggleLockBtn,R=u.isCopyChapterStyle,B=u.isLockedChapter,j=u.isPreview,F=u.chapterWidth,U=u.canShareChapter,H=u.isShowShareChapter,z=u.isBrainHive,V=u.isExploringMenu,W=u.isMessages,G=u.isPublicProcess,q=u.permissions,Y=u.isShowComments,K=u.showComments,X=u.canViewComments,Q=u.videoPermissions,$=u.isShowNotes,J=u.showNotes,Z=u.canViewNotes,ee=u.canExtractChapter,te=u.extractChapter,ne=u.rootReviewContext,re=u.hasNewComments,ie=u.commentCount,ae=u.rootContext,oe=u.hasNewAttachments,se=u.attachmentCount,le=u.handlePlayPauseBtnClick,ce=u.isPaused,ue=u.isShowSetPrivacyChapter,de=u.canSetPrivacyChapter,he=u.isShowLikes,fe=u.videoId,pe=u.onClick,me=u.isHideCopyChapteLink,ge=u.showChapterImageSlider,ve=(u.isVideoActive,u.onPreviewItemActivate),be=u.isHighlighting,ye=u.kpiCompletedChapters,Ae=this.state,_e=Ae.editValue,we=(Ae.sbImages,Ae.isOpenDeletePopover),Ee=Ae.isEdit,Se=Ae.isTogglingChapterLock,Ce=Ae.isLikeProcessing,Te=Ae.isLoadPreviewImage,ke=Ae.isUpdatingChapterPrivacy,xe=Ae.isUpdatingFUI,Oe=d.meetingInfo,Ie=(Oe=void 0===Oe?{}:Oe).schedule,Me=((Ie=void 0===Ie?{}:Ie).startTime,Ie.timezone),Pe=void 0===Me?"GMT":Me,De=d.startTime,Ne=d.endTime,Le=d.uid,Re=d.sharedCount,Be=d.accessible,je=d.attributes,Fe=void 0===je?{background:"",fontsize:0,fontstyle:[],foreground:""}:je,Ue=d.noteCount,He=void 0===Ue?0:Ue,ze=d.views,Ve=void 0===ze?0:ze,We=d.previewSegments,Ge=void 0===We?[]:We,qe=d.visibilityScope,Ye=d.processingStatus,Ke=d.meetingInfo,Xe=d.content,Qe=d.freeFUI,$e=x.c.getCurrentVideoCategory(),Je=Ge.map((function(e){return"".concat(ne||ae).concat(e.image)})),Ze=_w.ATTACHMENT_ONLY.key===d.type,et=_w.LIVE_SESSION.key===d.type,tt=_w.EPISODIC.key===d.type,nt=Ne-De+1,rt=f&&f!==d.uid||!x.r.paused(),it=y.uid===Le,at=!nt||Ze||et?null:x.c.msToTimestamp(nt,nt>36e5?"HH:mm:ss":"mm:ss"),ot=!!(0===se&&!T||z||W)&&(!x.c.checkPermission(null==q?void 0:null===(e=q.COMPREHENSION_GUIDE)||void 0===e?void 0:e.DOANYACTION,null==q?void 0:null===(t=q.COMPREHENSION_GUIDE_ATTACHMENTS)||void 0===t?void 0:t.READ)&&!j),st=k?M===Le:I.chapterId===Le,lt=(null==K?void 0:K.chapterId)===Le,ct=(null==J?void 0:J.chapterId)===Le,ut=Fe.background&&"transparent"!=Fe.background?Fe.background:Um.dd_color,dt=(z||W?!!x.c.checkPermission(null==Q?void 0:null===(n=Q.VIDEO)||void 0===n?void 0:n.DOANYACTION,null==Q?void 0:null===(r=Q.VIDEO_COMPREHENSION_GUIDES)||void 0===r?void 0:r.WRITE):_&&!Ee&&!j)&&(Ze||et),ht=x.c.checkPermission(null==Q?void 0:null===(i=Q.VIDEO)||void 0===i?void 0:i.DOANYACTION)&&z,ft=!G&&!j&&A&&(!H||x.c.checkPermission(null==q?void 0:null===(a=q.COMPREHENSION_GUIDE)||void 0===a?void 0:a.DOANYACTION,null==q?void 0:null===(o=q.COMPREHENSION_GUIDE)||void 0===o?void 0:o.WRITE)),pt=(null==Ke?void 0:null===(s=Ke.meeting)||void 0===s?void 0:s.status)===ww.CLOSED,mt=(null==Ke?void 0:null===(l=Ke.meeting)||void 0===l?void 0:l.status)===ww.STARTED,gt=null==q?void 0:null===(c=q.COMPREHENSION_GUIDE)||void 0===c?void 0:c.DOANYACTION,vt=$e===yw.EXPLORING&&!me,bt=("".concat(ne||ae).concat(d.image),it?(ge.activeIndex,d.startBlockSeq):ge.index,ye.includes(d.uid));return v.a.createElement(Bk,{key:d.uid,id:d.uid,index:p,moveCard:m,dndType:x.g.DND_TYPE.CHAPTER_ITEM,canDrag:dt,movingCard:this.handleDragging,onDragStart:w,onDragEnd:E,onDrop:S},v.a.createElement("div",{id:"chapter-".concat(d.uid),className:P()("chapter-item",be&&"highlight-chapter",lw.a.comItem,A&&lw.a.chapterEditting,!!we&&lw.a.openDelPopover,!!it&&lw.a.comItemActive,!!it&&"comItemActive",!rt&&lw.a.editable,C&&lw.a.lastItem,R&&lw.a.comItemCopy,"position-relative"),onClick:pe,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,ref:this.cgItem,style:{backgroundColor:ut,width:"calc(".concat(F,"px - 2px)"),marginRight:2}},B&&v.a.createElement("i",{className:P()("fv fuvi-locked-icon",lw.a.markLocked)}),bt&&v.a.createElement("i",{className:P()("fv fuvi-checked-c",lw.a.markCompleted)}),v.a.createElement("div",{className:lw.a.chapterBorder},v.a.createElement("span",null),v.a.createElement("span",null)),v.a.createElement("div",{className:P()("d-flex flex-column h-100",lw.a.comItemWrap)},!1,v.a.createElement("div",{className:P()("flex-grow-1 m-0",lw.a.hoverWrapText,lw.a.inlineEditorInputWrap,Ee&&lw.a.active),style:x.c.chapterItemStyle(Fe)},et&&v.a.createElement("i",{className:"fv fuvi-meet-team mr-1 ml-1 u-fs-7o8"}),ft?v.a.createElement(v.a.Fragment,null,v.a.createElement("textarea",{maxLength:x.g.TEXT_INPUT_MAX_LENGTH,onKeyDown:this.handleKeyDown,onBlur:this.onSave,onFocus:this.onFocus,className:P()(lw.a.inlineEditorInput,"w-100 m-0 p-0 fv-custom-scroll",h,A&&lw.a.activeTitle),onChange:this.handleChangeText,readOnly:!A,value:_e,rows:6,style:vw({},x.c.chapterItemStyle(Fe))})):v.a.createElement("div",{title:_e,className:lw.a.contentDisplay},_e)),!1,v.a.createElement("div",{className:P()(lw.a.actionsWrapper)},v.a.createElement("div",{className:"d-flex align-items-center flex-shrink-0 px-1"},v.a.createElement("div",{className:P()("d-flex align-items-center position-relative w-100 h-100")},!Ze&&!et&&v.a.createElement(hw,{className:P()(A&&lw.a.disabled),data:d,active:it,disabled:B,onClick:g,rootReviewContext:ne}))),v.a.createElement(mw,{uid:Le,videoId:fe,isEpisodic:tt,accessible:Be,attachmentCount:se,commentCount:ie,noteCount:He,sharedCount:Re,likeCount:V?null==d?void 0:d.publicLikeCount:null==d?void 0:d.likeCount,views:Ve,liked:!V&&(null==d?void 0:d.liked),canShareChapter:U,canViewComments:X,canViewNotes:Z,canExtractChapter:ee,canSetPrivacyChapter:de,canStartMeeting:gt,canEditMeeting:ht,isBrainHive:z,isMessages:W,isLiveSession:et,isMeetingLive:mt,isMeetingEnded:pt,isShowShareChapter:H,isPreview:j,isShowComments:Y,isShowNotes:$,isLockedChapter:B,isShowAttachment:!1,isActiveAttachmentList:st,isActiveComment:lt,isActiveNote:ct,isDisabledAttachmentsBtn:ot,isLikeProcessing:Ce,visibilityPrivacyScope:qe,isShowSetPrivacyChapter:ue,hasNewComments:re,hasNewAttachments:oe,isUpdatingChapterPrivacy:ke,isShowLikes:he,processingStatus:V?Aw.NONE:Ye,meetingInfo:Ke,meetingTimezone:Pe,chapterContent:Xe,userScaffId:null==d?void 0:d.userScaffId,isShowCopyChapterLink:vt,showChapterButtons:D,isInvisibleToggleLockBtn:L,isDisabledToggleLockBtn:N,isTogglingChapterLock:Se,isUpdatingFUI:xe,isAttachmentOnly:Ze,isPaused:ce,isActive:it,extractChapter:te,showShareVideoModal:this.showShareVideoModal,handlePreviewAttachmentsClick:this.handlePreviewAttachmentsClick,handlePreviewCommentsClick:this.handlePreviewCommentsClick,handlePreviewNotesClick:this.handlePreviewNotesClick,handleAttachmentsClick:this.handleAttachmentsClick,handleAttachmentsHover:this.handleAttachmentsHover,handleAttachmentsLeave:this.handleAttachmentsLeave,handleCommentsClick:this.handleCommentsClick,handleCommentsHover:this.handleCommentsHover,handleCommentsLeave:this.handleCommentsLeave,handleNotesClick:this.handleNotesClick,handleNotesHover:this.handleNotesHover,handleNotesLeave:this.handleNotesLeave,handleLikeChapter:this.handleLikeChapter,setPrivacyChapter:this.setPrivacyChapter,hideSharedPeople:this.handleShareButtonMouseLeave,handleLikeHover:this.handleLikeHover,handleLikeLeave:this.handleLikeLeave,openEditMeetingForm:this.openEditMeetingForm,copyChapterLinkToClipBoard:this.copyChapterLinkToClipBoard,onMeetingEdit:this.openEditMeetingForm,durationTimeDisplay:at,onPlayPauseBtnClick:function(e){return le(e,d,ce||!it)},onToggleChapterLock:this.toggleChapterLock,onPreviewItemActivate:ve,isFreeFUI:Qe,onToggleFreeFUI:this.toggleChapterFreeFUI}))),Te&&v.a.createElement(kR,{images:Je,disabled:!0})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return tw()(e),vw({},t)}}]),n}(g.Component);Sw.propTypes={inputClass:ne.a.string,inputRows:ne.a.number,onPlaybackBarClick:ne.a.func,onEditModeId:ne.a.func},Sw.defaultProps={inputClass:"",inputRows:1,onPlaybackBarClick:function(){return null},onEditModeId:function(){}};var Cw=Object(q.b)((function(e){var t,n,r,i,a,o=e.cg,s=e.cogvid,l=e.notification;return{chapterHighlighting:s.chapterHighlighting,isEdittingChapterText:s.isEdittingChapterText,showAttachmentReview:!!s.attachmentReview.attachmentId,showVideoAttachments:s.showVideoAttachments,ownerId:s.cogvidDetails.ownerId,ownerScaffId:s.cogvidDetails.ownerScaffId,lastReviewStatus:null===(t=s.cogvidDetails)||void 0===t?void 0:t.lastReviewStatus,videoPermissions:null===(n=s.cogvidDetails)||void 0===n?void 0:n.permissions,attachmentReviewChapterId:s.attachmentReview.chapterId,isCopyChapterStyle:s.isCopyChapterStyle,previewAttachmentsChapterId:s.showPreviewAttachments.chapterId,showComments:o.showComments,showNotes:o.showNotes,coverImage:s.coverImage,previewCommentsChapterId:null===(r=o.showPreviewComments)||void 0===r?void 0:r.chapterId,previewNotesChapterId:null===(i=o.showPreviewNotes)||void 0===i?void 0:i.chapterId,isPaused:null==s?void 0:null===(a=s.videoTime)||void 0===a?void 0:a.isPaused,showChapterImageSlider:o.showChapterImageSlider,kpiCompletedChapters:l.kpiCompletedChapters}}),(function(e){return{updateChapterItem:function(t,n,r){return e(Q.e.updateChapterItem(t,n,r))},updateChapterLock:function(t,n,r){return e(Q.e.updateChapterLock(t,n,r))},updateChapterFreeFUI:function(t,n,r){return e(Q.e.updateChapterFreeFUI(t,n,r))},deleteAChapter:function(t){return e(Q.e.deleteAChapter(t))},displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))},displayVideoAttachments:function(t){return e(Q.e.displayVideoAttachments(t))},displayPreviewAttachments:function(t){return e(Q.e.displayPreviewAttachments(t))},updateReviewAttachment:function(t,n,r){return e(Q.e.updateReviewAttachment(t,n,r))},updateShareVideoChapterModal:function(t,n,r){return e(Q.e.updateShareVideoChapterModal(t,n,r))},displayComments:function(t){return e(Q.d.displayComments(t))},displayNotes:function(t){return e(Q.d.displayNotes(t))},displayPreviewComments:function(t){return e(Q.d.displayPreviewComments(t))},displayPreviewNotes:function(t){return e(Q.d.displayPreviewNotes(t))},likeChapter:function(t,n,r){return e(Q.e.likeChapter(t,n,r))},updateSharedPeopleData:function(t,n,r){return e(Q.e.updateSharedPeopleData(t,n,r))},getChapterLike:function(t,n,r){return e(Q.d.getChapterLike(t,n,r))},getChapterSharingInfo:function(t,n,r){return e(Q.e.getChapterSharingInfo(t,n,r))},updateCreateMeetingForm:function(t){return e(Q.e.updateCreateMeetingForm(t))},getShortenVideoUrl:function(t,n,r){return e(Q.e.getShortenVideoUrl(t,n,r))}}}))(Object(K.c)(Sw));function Tw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tw(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}x.g.VIDEO_TYPE;var xw=x.g.VIDEO_CATEGORY,Ow=(x.g.ACCESS_GRANT_TYPE,x.g.COGVID_STATUS,x.g.SCOPE_CHAPTER_STATUS),Iw=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e,t=this,n=this.props,r=n.className,i=n.chapters,a=n.videoType,o=n.isEnabledEditContent,s=n.galleryId,l=n.isUpdatingCG,c=n.videoId,u=n.isPreview,d=n.onPreviewItemActivate,h=n.videoOwnerId,f=n.isPublicProcess,p=n.videoStatus,m=n.isSearchingVideo,g=n.rootReviewContext,b=n.isOpenCourseVideoList,y=n.videoStatistics,A=n.videoScaffId,_=n.commentsLikesEnabledOnPublic,w=n.updateVideoPreviewData,E=(n.onMouseEnter,n.onMouseLeave,n.onMouseEnterCGItem,n.onMouseLeaveCGItem,n.videoData),S=n.onScroll,C=n.subscriptionOptions,T=n.isVideoActive,k=n.slideIndex,O=E||{},I=O.uid,M=O.isDummyDailyVideo,D=O.cognitiveVideo,N=(D=void 0===D?{}:D).version,L=D.cognitiveResolutionUnit,R=O.cognitiveVideo,B=O.rootContext,j=x.c.getCurrentVideoCategory(),F=this.state,U=F.editId,H=F.isDraging,z=F.totalCGWidth,V=(F.isFullList,F.renderItems,F.chapterWidth),W=F.extractChapterData,G=F.isExtractingChapter,q=F.chapterPrivacyData,K=(F.largeImage,x.c.isCurrentUserId(h)),X=xw.HOME===j&&!K,Q=[xw.COMPOSING].includes(j)||xw.BRAINHIVE===j&&K,$=j===xw.EXPLORING,J=[xw.EXPERIENCING,xw.LEARNING,xw.COMPOSING,xw.HOME].includes(j)&&s!==I,Z=i,ee=j===xw.BRAINHIVE,te=j===xw.MESSAGES,ne=[xw.COMPOSING].includes(j)&&(null==C?void 0:C.videoManipulationPermission)&&!X,re=!K&&(null==E?void 0:null===(e=E.cognitiveVideo)||void 0===e?void 0:e.visibilityScope)===Ow.INTERNAL,ie=.3*document.documentElement.clientWidth;return v.a.createElement("div",{ref:this.refWrapper,className:P()(lw.a.cgWrapper,r)},v.a.createElement("div",{className:"d-flex flex-grow-1 position-relative flex-shrink-0"},this.state.showBackBtn&&Z.length&&v.a.createElement("div",{className:P()(lw.a.backBtn,"u-flex-center u-shadow")},v.a.createElement(Qt,{tooltipText:"Back to the current slide",onClick:this.handleBackClick},v.a.createElement("i",{className:"fv fuvi-center-point u-text-red u-fs-1x1o4 u-fw-600"}))),v.a.createElement("div",{className:P()(lw.a.prevBtn,k<=0&&lw.a.disabled),onClick:this.handlePrevClick}),v.a.createElement("div",{className:lw.a.cgList,ref:this.refCGList,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleListMouseMove},v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{ref:this.refLargeCIArrow,className:lw.a.largeCoverImageArrow,style:{display:"none"}}),v.a.createElement("div",{ref:this.refLargeCI,className:lw.a.largeCoverImage,style:{display:"none",width:ie,height:9*ie/16+3}})),l&&v.a.createElement("div",{className:P()(lw.a.updatingCG,"d-flex align-items-center justify-content-center")},v.a.createElement("div",{className:P()("d-flex align-items-center flex-column")},v.a.createElement("div",{className:"text-white"},Object(_t.t)("ChapterIsUpdating")),v.a.createElement(xn.a,{animation:"border",variant:"white"}))),v.a.createElement("div",{className:P()("position-absolute w-100 h-100",H&&lw.a.noExpandFullcontent)},v.a.createElement(Lb,{plugins:{filterEvent:{horizontalScroll:!0}},className:"fv-smooth-scroll",ref:this.refScrollbar,onScroll:Z.length>4?this.handleListScroll:S},v.a.createElement("div",{className:"d-flex align-items-stretch"},v.a.createElement(fx,null,v.a.createElement("div",{className:P()("d-flex flex-column flex-wrap align-content-start flex-fill position-relative",lw.a.comprehensionGuideListWrap)},v.a.createElement("div",{className:"".concat(lw.a.cgGridTable),style:{width:z,backgroundSize:"".concat(V,"px calc(").concat(Um.heightChapter,")")}}),Z.map((function(e,n){var r,i,s=e.author,l=void 0===s?{}:s,S=e.permissions,C=void 0===S?{}:S,O=e.isTemplateChapter,I=l.userId,P=x.c.checkChapterPermission(null,I,null===(r=C.COMPREHENSION_GUIDE)||void 0===r?void 0:r.SHARE),D=x.g.CHAPTER_TYPES.LIVE_SESSION.key===e.type,R=ee&&(K||P),F=ee||te,H=!D&&x.c.checkPermission(null==C?void 0:null===(i=C.COMPREHENSION_GUIDE)||void 0===i?void 0:i.DOANYACTION),z=(ee||te||$&&_)&&!D,W=ee||te||$&&_,G=Object(Y.get)(y,[A,e.uid],{}),q=G.comments>0,X=$?null==e?void 0:e.publicCommentCount:null==e?void 0:e.commentCount,Z=X>0?X:G.comments||0,ie=G.attachments>0,ae=(null==e?void 0:e.attachmentCount)>0?e.attachmentCount:G.attachments||0,oe=ee||te||$,se=[xw.COMPOSING,xw.HOME].includes(j)&&!D;return v.a.createElement(Cw,{moveCard:t.moveCard,key:e.uid+e.content,index:n,data:kw(kw({},e),{},{isFirstOfPart:t.checkLastOrFirstOfPart(e,Y.minBy),isLastOfPart:t.checkLastOrFirstOfPart(e,Y.maxBy)}),videoType:a,videoId:c,onClick:function(r){u?t.isMouseOver?t.handlePreviewItemClick(n):d(e,r,null,E):t.handleItemClick(e)},onDelete:t.handleDelete,onEditModeId:function(e){return t.setState({editId:e})},isEdittingId:U,onPlaybackBarClick:function(n){return t.handlePlaybackBarClick(n,e)},onDragStart:function(){return t.setState({isDraging:!0})},onDragEnd:function(){return t.setState({isDraging:!1})},isLastItem:!((n+1)%3),showChapterButtons:Q,isDisabledToggleLockBtn:!o||f,isInvisibleToggleLockBtn:e.accessible&&$,isLockedChapter:!e.accessible&&$,onDrop:t.handleDrop,canFetchRawVideos:J,isPreview:u,canShareChapter:R,isShowShareChapter:ee,isBrainHive:ee,isExploringMenu:$,isMessages:te,chapterWidth:V,videoOwnerId:h,isPublicProcess:f,author:l,videoStatus:p,permissions:C,isShowComments:z,canViewComments:W,isSearchingVideo:m,isOpenCourseVideoList:b,rootReviewContext:g,isShowNotes:se,canExtractChapter:ne,canViewNotes:!0,extractChapter:function(n){n.stopPropagation(),t.setExtractChapterData(e)},isShowSetPrivacyChapter:F,canSetPrivacyChapter:H,setPrivacyChapter:function(n){n.stopPropagation(),t.setPrivacyChapter(e)},sharedDetails:e.sharedDetails,videoScaffId:A,hasNewComments:q,commentCount:Z,hasNewAttachments:ie,attachmentCount:ae,handlePlayPauseBtnClick:t.handleCgItemPlayPauseBtnClick,isShowLikes:oe,setChapterPrivacyData:function(e){return t.setState({chapterPrivacyData:e})},isDummyDailyVideo:M,isTemplateChapter:O,updateVideoPreviewData:w,isHideCopyChapteLink:re,onMouseEnter:t.handleItemMouseEnter,onMouseLeave:t.handleItemMouseLeave,isVideoActive:T,rootContext:B,version:N,cognitiveResolutionUnit:L,onPreviewItemActivate:function(n){return t.handlePreviewItemActivate(e,n)},isHighlighting:k===n})}))))))),!!W&&v.a.createElement(VC,{title:Object(_t.t)("modal.quickExtractChapter",{name:null==W?void 0:W.content}),onConfirm:this.extractChapter,onClose:function(){return t.setExtractChapterData(null)},isSubmittingForm:G}),v.a.createElement(tT,{show:!!q.videoId,data:q,cognitiveVideo:R,onClose:function(){return t.setState({chapterPrivacyData:{}})}})),v.a.createElement("div",{className:P()(lw.a.nextBtn,k>=i.length-1&&lw.a.disabled),onClick:this.handleNextClick})),v.a.createElement("div",{className:"u-w-20 border-top position-relative u-bg-black u-flex-center flex-shrink-0 u-mr-1x1o8"},v.a.createElement(Ys,{videoId:c,plan:E.plan}),v.a.createElement(vi,{vertical:!0,chapterCount:i.length})))}}]),n}(v.a.Component);Iw.propTypes={onMouseEnter:ne.a.func,onMouseLeave:ne.a.func,onMouseEnterCGItem:ne.a.func,onMouseLeaveCGItem:ne.a.func},Iw.defaultProps={onMouseEnter:function(){},onMouseLeave:function(){},onMouseEnterCGItem:function(){},onMouseLeaveCGItem:function(){}};var Mw=Iw;var Pw=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props.previewImage,t=void 0===e?{}:e;return!!(null==t?void 0:t.previewUrl)&&v.a.createElement("div",{className:lw.a.previewImageWrap,style:{left:null==t?void 0:t.leftOfTooltip,top:null==t?void 0:t.topOfTooltip}},v.a.createElement("div",null,v.a.createElement("img",{src:null==t?void 0:t.previewUrl,className:P()(lw.a.previewImage)})),v.a.createElement("div",{className:P()("px-2 u-border-radius-1o2",lw.a.previewTimeDurationBadge,!(null==t?void 0:t.durationTimeDisplay)&&"u-opacity-0")},null==t?void 0:t.durationTimeDisplay))}}]),n}(g.Component),Dw=Object(q.b)((function(e){return{previewImage:e.cogvid.previewImage}}))(Pw);function Nw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nw(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rw=x.g.SRC_SET_TIME,Bw=(x.g.LOOP_MODE,x.g.CHAPTER_TYPES),jw=x.g.TRACKING_USER,Fw=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"refScrollbar",Object(g.createRef)()),G()(V()(e),"refCGList",Object(g.createRef)()),G()(V()(e),"refWrapper",Object(g.createRef)()),G()(V()(e),"mousePos",{x:0,y:0,width:0,height:0}),G()(V()(e),"refLargeCI",Object(g.createRef)()),G()(V()(e),"refLargeCIArrow",Object(g.createRef)()),G()(V()(e),"state",{renderItems:0,editId:"",isDraging:!1,totalCGWidth:0,isFullList:!1,chapterWidth:0,extractChapterData:null,isExtractingChapter:!1,isUpdatingChapterPrivacyUid:"",chapterPrivacyData:{}}),G()(V()(e),"moveCard",(function(t,n){(0,e.props.updateOrderChaptersListUI)({dragIndex:t,hoverIndex:n})})),G()(V()(e),"shouldComponentUpdate",(function(t,n){t.videoTime;var r=Yt()(t,["videoTime"]),i=e.props,a=(i.videoTime,Yt()(i,["videoTime"]));return!Object(Y.isEqual)(a,r)||!Object(Y.isEqual)(e.state,n)})),G()(V()(e),"componentDidMount",(function(){!e.state.chapterWidth&&e.calculaterTotalCGWidth(),window.addEventListener("resize",e.calculaterTotalCGWidth)})),G()(V()(e),"componentWillUnmount",(function(){window.removeEventListener("resize",e.calculaterTotalCGWidth)})),G()(V()(e),"calculaterTotalCGWidth",(function(){var t=e.state,n=t.renderItems,r=t.totalCGWidth,i=e.props.chapters,a=Object(Y.get)(e.refCGList,"current.offsetWidth"),o=window.innerWidth<=1440?189:216,s=a/3,l=s<o?o+2:s,c=function(){var t=e.props,n=t.videoId,r=t.isPreview,i=t.initialScrollLeft,a=void 0===i?0:i;n&&!r&&e.isInitial&&(Object(Y.set)(e.refScrollbar,"current.scrollbar.scrollLeft",a),e.isInitial=!1)},u=1*Math.ceil(a/l);n!=u&&e.setState({renderItems:u},c);var d=Math.ceil(i.length/1)*l;d!=r&&e.setState({totalCGWidth:d,chapterWidth:l},c)})),G()(V()(e),"componentDidUpdate",(function(t){var n=e.props,r=n.chapterHighlighting,i=void 0===r?{}:r,a=n.chapters,o=n.isVideoActive,s=n.videoId,l=n.isPreview,c=n.slideIndex,u=e.state.isFullList,d=t.chapters;!Object(Y.isEqual)(c,t.slideIndex)&&e.isMouseOver&&(e.isSlideIndexChanged=!0),!Object(Y.isEqual)(s,t.videoId)&&(e.isInitial=!0),!Object(Y.isEqual)(s,t.videoId)&&!u&&e.setState({isFullList:!1,showBackBtn:!1});var h=!Object(Y.isEqual)(d.map((function(e){e.permissions,e.shares,e.attachments,e.author;return Lw({},Yt()(e,["permissions","shares","attachments","author"]))})),a.map((function(e){e.permissions,e.shares,e.attachments,e.author;return Lw({},Yt()(e,["permissions","shares","attachments","author"]))})));window.playMode;if(h&&e.calculaterTotalCGWidth(),!l&&t.isPreview&&!i.uid){var f=a[c];f&&e.props.setActiveChapter(f)}t.isVideoActive&&!o&&e.setState({showBackBtn:!1})})),G()(V()(e),"handleScrollToChapterByIndex",(function(t,n){if(!e.state.showBackBtn){var r=e.props.chapters[t];r&&e.handleScrollToChapter(r,n)}})),G()(V()(e),"handleScrollToChapter",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.props.chapterHighlighting,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.forceScroll;n.center;if(!window.stopAutoSrollCG&&!e.isInitial||r){var i=e.state.isDraging,a=document.getElementById("chapter-".concat(t.uid)),o=1;if(a&&!i){var s,l,c=e.refScrollbar.current.scrollbar,u=null==a?void 0:a.getBoundingClientRect(),d=Math.floor(t.seqNumber/o),h=null===(s=e.refCGList)||void 0===s?void 0:null===(l=s.current)||void 0===l?void 0:l.offsetWidth;c.scrollTo((u.width+2)*d-(h-u.width)/2,0,500)}}})),G()(V()(e),"handleItemClick",(function(t,n){var r=e.props,i=r.videoId,a=r.chapters,o=r.typeEditting,s=r.isEdittingChapterText,l=r.setActiveChapter,c=r.isCopyChapterStyle,u=r.attachmentId,d=r.setUpdateVideoTime,h=r.chapterHighlighting,f=(r.displayChapterCoverImage,r.displaySlide),p=r.trackingVideoCountViewData;if(window.audioPlayer&&!x.r.paused()){var m,g=null===(m=window.audioPlayer)||void 0===m?void 0:m.currentTime();p({videoId:i,type:jw.TYPES.VIDEO,action:jw.ACTIONS.PAUSE,timestamp:g,duration:g-window.startTimeVideoTracking}),window.startTimeVideoTracking=(n||t.startTime)/1e3}var v={setTimeFrom:Rw.CG,currentTime:(n||t.startTime)/1e3},b=![Bw.ATTACHMENT_ONLY.key,Bw.LIVE_SESSION.key].includes(null==t?void 0:t.type);if(c)e.updateChapterStyle(t.seqNumber);else{var y=function(e){Object(Y.set)(window.audioPlayer,"startTimeVideoTracking",e.startTime/1e3),l(e);var t=a.findIndex((function(t){return t.uid===e.uid}));f(t)};if(u&&x.r.isPlayer()&&x.r.paused())return y(t),void d(v);if(s){var A=h.uid===t.uid;x.r.isPlayer()&&!x.r.paused()?x.r.pause((function(){!A&&e.setTimeAndPlay(v),y(t)})):(!A&&e.setTimeAndPlay(v),y(t))}else{if(!b&&(x.r.pause(),!o&&(!x.r.isPlayer()||x.r.paused()&&!u)))return y(t);e.state.editId||(u&&x.r.isPlayer()&&x.r.paused()?y(t):e.setTimeAndPlay(v),!o&&y(t))}}})),G()(V()(e),"handlePlaybackBarClick",(function(t,n){t.stopPropagation();var r,i=n.startTime,a=n.endTime,o=n.uid,s=e.props,l=s.chapterHighlighting.uid,c=s.isPreview,u=s.onPreviewItemActivate,d=s.attachmentId,h=s.setUpdateVideoTime,f=s.videoId,p=s.trackingVideoCountViewData,m=t.currentTarget.getBoundingClientRect(),g=(t.clientX-m.left)/(m.right-m.left)*(a-i)+i;window.audioPlayer&&!x.r.paused()&&(p({videoId:f,type:jw.TYPES.VIDEO,action:jw.ACTIONS.PAUSE,timestamp:g/1e3,duration:(null===(r=window.audioPlayer)||void 0===r?void 0:r.currentTime())-window.startTimeVideoTracking}),window.startTimeVideoTracking=g/1e3);var v=e.state.editId;if(c)return u(n,null,g);var b={setTimeFrom:Rw.CG,currentTime:g/1e3};if(o!==l)return e.handleItemClick(n,g);d&&x.r.isPlayer()&&x.r.paused()?h(b):v||h(b)})),G()(V()(e),"setTimeAndPlay",(function(t){var n=e.props,r=n.setUpdateVideoTime,i=n.attachmentId;r(t);var a=window.playMode,o=void 0===a?{}:a;window.audioPlayer&&i?x.r.paused()?(x.r.currentTime(t.currentTime),x.r.play(t.currentTime)):x.r.currentTime(t.currentTime):!x.r.paused()&&o.isVideoPlayingHighlightMode?x.r.play(t.currentTime):x.r.currentTime(t.currentTime)})),G()(V()(e),"handleDelete",(function(t,n){t.stopPropagation();var r=e.props,i=r.deleteAChapter,a=r.videoId,o=r.getCg,s=r.videoData.ownerScaffId;i(Lw(Lw({},n),{},{videoUid:a,ownerScaffId:s}),(function(){return o({videoId:a,ownerScaffId:s})}))})),G()(V()(e),"handleDrop",(function(t){var n=t.id,r=t.dragIndex,i=t.index,a=e.props,o=a.videoId,s=a.updateOrderChaptersListAPI;r!==i&&s({videoId:o,dropIndex:i,chapterId:n,dragIndex:r})})),G()(V()(e),"updateChapterStyle",(function(t,n){var r=e.props,i=r.setChapterStyle,a=r.videoId,o=r.chapterHighlighting;i({videoId:a,chapterId:t,attributes:n?{}:o.attributes})})),G()(V()(e),"trackingPlayer",(function(t,n,r,i){var a=e.props,o=a.videoId;(0,a.trackingVideoCountViewData)({videoId:o,type:r,action:t,timestamp:n,duration:i||0})})),G()(V()(e),"setExtractChapterData",(function(t){e.setState({extractChapterData:t})})),G()(V()(e),"extractChapter",(function(t){var n=e.props,r=n.videoId,i=n.extractChapters,a=n.videoData.cognitiveVideo,o=(a=void 0===a?{}:a).title,s=a.subject,l=a.topic,c=e.state.extractChapterData,u=void 0===c?{}:c;e.setState({isExtractingChapter:!0},(function(){i({videoId:r,title:o,subject:s,topic:l,chapters:[u.uid],chapterSeqNumbers:[u.seqNumber],category:t},(function(){e.setState({isExtractingChapter:!1}),e.setExtractChapterData(!1)}),(function(){return e.setState({isExtractingChapter:!1})}))}))})),G()(V()(e),"checkLastOrFirstOfPart",(function(t,n){var r=n(e.props.chapters.filter((function(e){return e.partId===t.partId})),"seqNumber");return[Bw.ATTACHMENT_ONLY.key,Bw.LIVE_SESSION.key].includes(null==t?void 0:t.type)||r.uid===t.uid})),G()(V()(e),"handleCgItemPlayPauseBtnClick",(function(t,n,r){t.stopPropagation();var i=e.props,a=i.chapterHighlighting.uid,o=i.videoTime,s=i.isPreview,l=i.onPreviewItemActivate;if(s)l(n,null,n.startTime);else{var c=n.uid,u=n.startTime,d=void 0===u?0:u;if(!r)return x.r.pause(),void e.trackingPlayer(jw.ACTIONS.PAUSE,o.currentTime,jw.TYPES.VIDEO);c===a?Object(x.p)(t):(e.handleItemClick(n,d),x.r.paused()&&Object(x.p)(t))}})),G()(V()(e),"handleListMouseMove",(function(t){if(t.currentTarget){e.isSlideIndexChanged=!1;var n=t.currentTarget.getBoundingClientRect();e.mousePos.x=t.clientX-n.left,e.mousePos.y=t.clientY-n.top,e.mousePos.width=n.width,e.mousePos.height=n.height,e.refLargeCIArrow.current&&(e.refLargeCIArrow.current.style.left=e.mousePos.x-3+"px")}else e.mousePos={x:0,y:0,width:0,height:0}})),G()(V()(e),"handleListScroll",(function(t){e.props.onScroll&&e.props.onScroll(t),e.isMouseOver&&!e.isSlideIndexChanged&&e.handleItemHoverByScrolling(t),clearTimeout(e.timeoutScroll),e.timeoutScroll=setTimeout((function(){e.props.isVideoActive&&e.handleScrolling(t),e.isSlideIndexChanged=!1}),100)})),G()(V()(e),"handleScrolling",Object(Y.throttle)((function(t){var n=t.offset,r=t.limit.x,i=n.x,a=e.state.chapterWidth,o=0==e.props.slideIndex?0:e.props.slideIndex>e.props.chapters.length-3?r:(e.props.slideIndex-1)*a,s=Math.abs(o-i)>3;e.setState({showBackBtn:s})}),50,{trailing:!0,leading:!0})),G()(V()(e),"handleItemHoverByScrolling",Object(Y.throttle)((function(t){var n=t.offset.x,r=e.mousePos,i=(r.width,r.height),a=r.x,o=r.y,s=e.state.chapterWidth,l=n+a;if(!(l%s<0||o<0||o>i)){var c=Math.ceil(l/s)-1;c!==e.hoveredIndex&&(e.hoveredIndex=c,e.displayItemLargeImage(c))}}),50)),G()(V()(e),"handleItemHover",(function(t){var n=e.props,r=n.chapters,i=n.rootContext,a=n.displayCoverImage;e.hoveredIndex=t;var o=r[t];o&&a({image:"".concat(i).concat(o.image),content:"",attributes:(null==o?void 0:o.attributes)||{}})})),G()(V()(e),"handleItemMouseEnter",(function(t,n){e.displayItemLargeImage(n),e.props.onMouseEnterCGItem&&e.props.onMouseEnterCGItem(t),e.isSlideIndexChanged||window.isArrowKeyDown||(e.hoveredIndex=n)})),G()(V()(e),"handleItemMouseLeave",(function(t){e.displayItemLargeImage(),e.props.onMouseLeaveCGItem&&e.props.onMouseLeaveCGItem(t)})),G()(V()(e),"handlePreviewItemClick",(function(t){e.props.displaySlide(t)})),G()(V()(e),"handlePreviewItemActivate",(function(t,n){var r=e.props,i=r.videoId,a=r.videoData,o=r.onPreviewItemActivate,s=x.c.getCurrentVideoCategory(),l="/".concat(s,"?v=").concat(i,"&c=").concat(t.uid);x.c.checkLoggedIn(l)&&o(t,n,null,a)})),G()(V()(e),"handleMouseEnter",(function(t){var n=e.props,r=n.isPreview,i=n.onMouseEnter,a=e.state.isFullList;i(),e.isMouseOver=!0,r&&!a&&e.setState({isFullList:!0})})),G()(V()(e),"handleMouseLeave",(function(t){var n=e.props,r=n.isPreview,i=n.slideIndex,a=n.onMouseLeave;e.displayItemLargeImage(),a(),e.isMouseOver=!1,window.stopAutoSrollCG=!1,e.hoveredIndex=-1,r&&e.handleScrollToChapterByIndex(i,{forceScroll:!0,center:!0})})),G()(V()(e),"handleBackClick",(function(){e.handleScrollToChapter(void 0,{forceScroll:!0,center:!0}),e.setState({showBackBtn:!1})})),G()(V()(e),"displayItemLargeImage",(function(t){var n=e.refLargeCIArrow.current,r=e.refLargeCI.current;if(void 0===t)return n&&(n.style.display="none"),void(r&&(r.style.display="none"));var i=e.props,a=i.chapters,o=i.rootContext,s=a[t],l="".concat(o).concat(s.thumbnail||s.image);if(r&&l){var c=x.c.getElementCoords(document.getElementById("chapter-".concat(s.uid))),u=x.c.convertRemToPx(Um.widthLeftBar),d=.3*document.documentElement.clientWidth,h=Math.min(Math.max(u,c.left-d/3.333),document.documentElement.clientWidth-d);r.style.backgroundImage='url("'.concat(l,'")'),r.style.left=h+"px",r.style.display="block",n&&(n.style.display="block")}})),G()(V()(e),"handlePrevClick",(function(){var t=e.props,n=t.slideIndex,r=t.displaySlide;n-1<0||r(n-1)})),G()(V()(e),"handleNextClick",(function(){var t=e.props,n=t.slideIndex,r=t.displaySlide,i=t.chapters;n+1>=(void 0===i?[]:i).length||r(n+1)})),e}return n}(Mw),Uw=Object(q.b)((function(e){var t,n,r=e.cogvid,i=e.common,a=e.notification,o=e.auth,s=e.cg;return{chapterHighlighting:r.chapterHighlighting,chapterId:null===(t=r.chapterHighlighting)||void 0===t?void 0:t.uid,typeEditting:i.typeEditting,isEdittingChapterText:r.isEdittingChapterText,isCopyChapterStyle:r.isCopyChapterStyle,isUpdatingCG:r.isUpdatingCG,videoTime:r.videoTime,galleryId:r.galleryVideoData.uid,videoStatistics:a.videoStatistics,attachmentId:r.attachmentReview.attachmentId,subscriptionOptions:o.userInfo.subscriptionOptions,slideIndex:s.showChapterCoverImageSlide,isVideoActive:-1!==s.showChapterCoverImageSlide,rootContext:null===(n=r.selectedVideo.data)||void 0===n?void 0:n.rootContext}}),(function(e){return{updateOrderChaptersListUI:function(t){return e(Q.e.updateOrderChaptersListUI(t))},updateOrderChaptersListAPI:function(t,n,r){return e(Q.e.updateOrderChaptersListAPI(t,n,r))},getCg:function(t,n,r){return e(Q.e.getCg(t,n,r))},deleteAChapter:function(t,n){return e(Q.e.deleteAChapter(t,n))},addANewChapter:function(t,n){return e(Q.e.addANewChapter(t,n))},setActiveChapter:function(t){return e(Q.e.setActiveChapter(t))},setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))},setChapterStyle:function(t,n,r){return e(Q.e.setChapterStyle(t,n,r))},extractChapters:function(t,n,r){return e(Q.e.extractChapters(t,n,r))},displaySlide:function(t){return e(Q.d.displaySlide(t))},displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))}}}),null,{forwardRef:!0})(Object(K.b)(Object(K.c)(Fw))),Hw=r(95),zw=r.n(Hw);var Vw=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"componentDidUpdate",value:function(e){var t=e.videoTime;this.props.videoTime.currentTime!=t.currentTime&&x.a.stateTrackingVideoTime()}},{key:"render",value:function(){var e=this.props,t=e.cogvidDetails,n=void 0===t?{}:t,r=e.videoTime,i=(void 0===r?{}:r).currentTime,a=(void 0===i?0:i)/(n.videoLength/1e3)*100||0;return v.a.createElement("span",{className:"".concat(zw.a.indicator),style:{left:"".concat(a>100?100:a,"%")}})}}]),n}(g.Component),Ww=Object(q.b)((function(e){return{cogvidDetails:e.cogvid.cogvidDetails,videoTime:e.cogvid.videoTime}}))(Vw);var Gw=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.disabled,n=e.videoTime,r=(void 0===n?{}:n).currentTime,i=t?0:void 0===r?0:r;return v.a.createElement("span",null,x.c.msToTimestamp(1e3*i))}}]),n}(g.Component),qw=Object(q.b)((function(e){return{videoTime:e.cogvid.videoTime}}))(Gw);var Yw=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.isPaused,n=e.disabled;return v.a.createElement("div",{className:"border-right border-white"},v.a.createElement(Qt,{className:"btn p-0 d-flex align-items-center justify-content-center ".concat(zw.a.playBtn),name:x.g.PLAY_BUTTON_NAME,onClick:function(e){return n?null:Object(x.p)(e)},disabled:n},t?v.a.createElement("i",{className:"fv fuvi-play-btn fv-lg"}):v.a.createElement("i",{className:"fv fuvi-pause-btn fv-lg"})))}}]),n}(g.Component),Kw=Object(q.b)((function(e){var t,n;return{isPaused:null===(t=e.cogvid)||void 0===t?void 0:null===(n=t.videoTime)||void 0===n?void 0:n.isPaused}}))(Yw),Xw=x.g.VIDEO_PLAYBACK_RATE,Qw=x.g.VIDEO_PLAYBACK_RATE_DEFAULT;var $w=Object(q.b)((function(e){return{playbackRate:e.cogvid.videoTime.playbackRate}}),(function(e){return{changePlayBackRate:function(t){return e(Q.e.changePlayBackRate(t))}}}))((function(e){var t=e.disabled,n=e.changePlayBackRate,r=e.playbackRate;return v.a.createElement(v.a.Fragment,null,v.a.createElement(ut,{className:P()(zw.a.playbackRateWraper,t&&zw.a.disabled)},v.a.createElement(ut.Toggle,{className:zw.a.playbackRateButton},v.a.createElement("span",{className:zw.a.playbackRateValue},t?Qw:r,"x")),v.a.createElement(ut.Menu,{className:P()(zw.a.playbackWrap)},Xw.map((function(e,t){return v.a.createElement(ut.Item,{key:t,className:P()(zw.a.playbackItem,r===e&&zw.a.playbackItemActive),onClick:function(t){return function(e,t){e.stopPropagation(),n(t),window.audioPlayer.playbackRate(t)}(t,e)}},e,"x")})))))})),Jw=r(331);function Zw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zw(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tE=x.g.VIDEO_VOLUME_DEFAULT;var nE=function(e){var t,n=e.disabled,r=null===(t=window)||void 0===t?void 0:t.audioPlayer,i=Object(g.useState)([tE]),a=pi()(i,2),o=a[0],s=a[1],l=Object(g.useState)(!1),c=pi()(l,2),u=c[0],d=c[1],h=function(e){var t;s(e),d(!e[0]),null===(t=window.audioPlayer)||void 0===t||t.muted(!e[0]),r&&r.volume(e[0])};return v.a.createElement("div",{className:P()("d-flex flex-column align-items-center",zw.a.volumeWraper,n&&zw.a.disabled)},v.a.createElement(Jw.Range,{step:.01,min:0,max:1,direction:"to top",values:o,onChange:function(e){return h(e)},renderTrack:function(e){var t=e.props,n=e.children;return v.a.createElement("div",Gt()({},t,{style:eE({},t.style),className:P()(zw.a.volumeTrackBar)}),n)},renderThumb:function(e){var t=e.props;return v.a.createElement("div",Gt()({},t,{style:eE({},t.style),className:P()(zw.a.volumeTrackThumb)}),v.a.createElement("div",{className:zw.a.volumeTooltip},Math.round(100*o[0]),"%"))}}),v.a.createElement(Qt,{className:P()(zw.a.volumeBtn),onClick:function(){var e=r.volume();u&&!e?h([tE]):(d(!u),window.audioPlayer.muted(!u),s([u?e:0]))}},u||!o[0]?v.a.createElement("i",{className:"fv fuvi-speaker text-white"}):v.a.createElement("i",{className:"fv fuvi-mute-speaker text-white"})))};var rE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handlePlaybackBarClick",(function(t,n){t.stopPropagation();var r=e.props,i=r.setUpdateVideoTime,a=r.cogvidDetails.videoId,o=void 0===a?"":a,s=r.trackingVideoCountViewData,l=x.g.SRC_SET_TIME,c=x.g.TRACKING_USER,u=t.currentTarget.getBoundingClientRect(),d=(t.clientX-u.left)/(u.right-u.left)*n/1e3;s({videoId:o,type:c.TYPES.VIDEO,action:c.ACTIONS.PAUSE,timestamp:d,duration:x.r.paused()?0:window.audioPlayer.currentTime()-window.startTimeVideoTracking}),window.startTimeVideoTracking=d,i({setTimeFrom:l.PLAY_BAR,currentTime:d}),x.r.paused()||x.r.play(d)})),G()(V()(e),"handleMouseOverToDisPlayCGCoverImage",(function(t){var n=e.props.showAttachmentReview;if(x.r.paused()||Object(Y.isEmpty)(t)){var r=e.props,i=r.displayCoverImage,a=r.rootContext,o="";Object(Y.isEmpty)(t)||n||(o="".concat(a).concat(t.image)),i({image:o})}})),G()(V()(e),"handleFullscreen",(function(){if(zn.a.enabled){var t=e.props.cognitiveVideoListScrollRef;window.leftBarScrollTop=Object(Y.get)(t,"current.scrollRef.scrollTop",0),window.isFullscreenMode||(window.isFullscreenMode=!0),zn.a.toggle()}})),e}return n}(function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"renderHighlightItem",(function(t,n,r){var i=e.props.cogvidDetails.videoLength,a=2e3*t.startBlockSeq/i*100,o=2e3*(t.endBlockSeq+1)/i*100;o=o>100?100:o;var s={ORANGE:{class:zw.a.bookmarkOrange,bottom:"0.125rem"},YELLOW:{class:zw.a.bookmarkYellow,bottom:"0.625rem"},BLUE:{class:zw.a.bookmarkGray,bottom:"1.125rem"}};return t.label?v.a.createElement(Kt.a,{key:"".concat(n,"_").concat(t.color),placement:"top",delay:{show:0,hide:0},overlay:v.a.createElement(Xt.a,null,t.label)},v.a.createElement("span",{key:n,className:"".concat(zw.a.bookmark," ").concat(s[t.color].class),onMouseEnter:function(){return r?null:e.handleMouseOverToDisPlayCGCoverImage(t)},onMouseLeave:function(){return r?null:e.handleMouseOverToDisPlayCGCoverImage({})},style:{left:"".concat(a,"%"),width:"".concat(o-a,"%"),height:"0.5rem",bottom:s[t.color].bottom}})):v.a.createElement("span",{key:n,className:"".concat(zw.a.bookmark," ").concat(s[t.color].class),onMouseEnter:function(){return r?null:e.handleMouseOverToDisPlayCGCoverImage(t)},onMouseLeave:function(){return r?null:e.handleMouseOverToDisPlayCGCoverImage({})},style:{left:"".concat(a,"%"),width:"".concat(o-a,"%"),height:"0.5rem",bottom:s[t.color].bottom}})})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.cogvidDetails,i=void 0===r?{}:r,a=n.isFullscreenMode,o=n.disabled,s=n.canPlay,l=i.highlightsBookmark,c=void 0===l?[]:l,u=i.videoLength,d=void 0===u?0:u;return v.a.createElement("div",{className:"".concat(zw.a.playBackWrap," d-flex border-top border-white")},v.a.createElement("div",{className:"border-right border-white"},v.a.createElement(Kw,{disabled:o||!s})),v.a.createElement(nE,{disabled:o}),a&&v.a.createElement(Gy,null),v.a.createElement("div",{className:P()(zw.a.timeLeft,"col-auto h-100 d-flex flex-column align-items-center justify-content-center",a&&"border-left border-white")},v.a.createElement(qw,{disabled:o})),v.a.createElement("div",{className:"".concat(zw.a.playBar," col position-relative"),onClick:function(t){return o?null:e.handlePlaybackBarClick(t,d)}},!!i.videoId&&v.a.createElement(Ww,null),c.map((function(t,n){return e.renderHighlightItem(t,n,o)}))),v.a.createElement("div",{className:"".concat(zw.a.timeRight," col-auto text-right")},v.a.createElement("span",null,x.c.msToTimestamp(i.videoLength||0))),v.a.createElement("div",{className:"border-left border-white"},v.a.createElement($w,{disabled:o})),v.a.createElement("div",null,v.a.createElement(Qt,{onClick:this.handleFullscreen,className:P()(zw.a.fullscreenButton),tooltipText:t(a?"tooltip.closeFullscreen":"tooltip.openFullscreen"),tooltipPlacement:"top",disabled:o},a?v.a.createElement("i",{className:"fv fuvi-exit-fullscreen-a fv-lg"},v.a.createElement("span",{className:"path1"}),v.a.createElement("span",{className:"path2"}),v.a.createElement("span",{className:"path3"}),v.a.createElement("span",{className:"path4"}),v.a.createElement("span",{className:"path5"}),v.a.createElement("span",{className:"path6"})):v.a.createElement("i",{className:"fv fuvi-enter-fullscreen-b fv-lg text-gray-5"},v.a.createElement("span",{className:"path1"}),v.a.createElement("span",{className:"path2"}),v.a.createElement("span",{className:"path3"}),v.a.createElement("span",{className:"path4"}),v.a.createElement("span",{className:"path5"}),v.a.createElement("span",{className:"path6"})))))}}]),r}(g.Component)),iE=(Object(q.b)((function(e){return{cogvidDetails:e.cogvid.cogvidDetails,rootContext:e.cogvid.cogvidDetails.rootContext,isFullscreenMode:e.common.isFullscreenMode,videoType:e.cogvid.cogvidDetails.videoType}}),(function(e){return{setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))},displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))}}}))(Object(K.b)(rE)),r(1026)),aE=r.n(iE);var oE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"renderVirtualElement",(function(t){var n=e.props,r=n.itemHeight,i=n.classNameVirtualElement;return 0===t?null:v.a.createElement("div",{style:{minHeight:"".concat(t*r,"px")},className:P()("d-flex flex-column",i)})})),G()(V()(e),"renderHasDataItems",(function(){var t=e.props,n=t.data,r=t.itemRenderer,i=t.numberOfHasDataItems,a=t.itemHeight,o=Math.floor(e.currentScrollTop/a)-i/2,s=o>=0?o+i:i,l=[];return Object.keys(n).forEach((function(t,i){i>=o&&i<s&&l.push(r(n[t],i,e.currentScrollTop,e.setScrollPosition,n.length-1))})),l})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.data,n=e.numberOfHasDataItems,r=e.hasHorizontalIndicator,i=e.topElement,a=e.bottomElement,o=(e.itemRenderer,e.itemHeight),s=(e.scrollTop,e.showContextualImg,e.className),l=(e.updateCurrentVideoTime,e.onStopScrolling),c=e.children,u=e.alwaysShowTracksBar,d=(e.hoveredIndex,e.classNameVirtualElement,e.callbackAfterUpdate,Yt()(e,["data","numberOfHasDataItems","hasHorizontalIndicator","topElement","bottomElement","itemRenderer","itemHeight","scrollTop","showContextualImg","className","updateCurrentVideoTime","onStopScrolling","children","alwaysShowTracksBar","hoveredIndex","classNameVirtualElement","callbackAfterUpdate"])),h=(this.state.scrollPosition,Math.floor(this.currentScrollTop/o)),f=h-n/2>0?h-n/2:0,p=t.length,m=p-n-f>0?p-n-f:0;return v.a.createElement(v.a.Fragment,null,r&&v.a.createElement("div",{className:"".concat(aE.a.horizontalIndicator," w-100 position-absolute")}),v.a.createElement(Lb,Gt()({},d,{onScroll:this.handleScroll,ref:this.updateRef,className:P()("h-100 fv-smooth-scroll",u&&"fv-always-show-tracks",s),onStopScrolling:l,updateRef:this.updateRef}),c,i,this.renderVirtualElement(f),this.renderHasDataItems(),this.renderVirtualElement(m),a))}}]),n}(v.a.Component);oE.propTypes={children:ne.a.node,data:ne.a.oneOfType([ne.a.object,ne.a.array]),numberOfHasDataItems:ne.a.number.isRequired,hasHorizontalIndicator:ne.a.bool,alwaysShowTracksBar:ne.a.bool,topElement:ne.a.object,bottomElement:ne.a.object,itemRenderer:ne.a.func.isRequired,itemHeight:ne.a.number.isRequired,scrollTop:ne.a.number,onScroll:ne.a.func,className:ne.a.string},oE.defaultProps={data:[],hasHorizontalIndicator:!1,alwaysShowTracksBar:!1};var sE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{scrollPosition:0}),G()(V()(e),"scrollRef",Object(g.createRef)()),G()(V()(e),"scrollbarRef",Object(g.createRef)()),G()(V()(e),"currentScrollTop",0),G()(V()(e),"componentDidMount",(function(){})),G()(V()(e),"componentWillUnmount",(function(){})),G()(V()(e),"componentDidUpdate",(function(){var t=e.props.scrollTop;void 0!==t&&x.r.isPlayer()&&e.currentScrollTop!==t&&(e.scrollRef.scrollTop=t)})),G()(V()(e),"shouldComponentUpdate",(function(t,n){return t.topElement!==e.props.topElement||t.children!==e.props.children||t.bottomElement!==e.props.bottomElement||t.scrollTop!==e.props.scrollTop||t.hoveredIndex!==e.props.hoveredIndex||t.data.length!==e.props.data.length||t.delegateTo!==e.props.delegateTo||!Object(Y.isEqual)(t.data,e.props.data)||!Object(Y.isEqual)(t.itemHeight,e.props.itemHeight)})),G()(V()(e),"handleScroll",(function(t){var n=t.offset,r=e.props.onScroll;e.handleForceUpdate(n.y),e.currentScrollTop=n.y,r&&r(n.y)})),G()(V()(e),"handleForceUpdate",Object(Y.throttle)((function(t){var n=Math.floor(t/e.props.itemHeight);n%10==0&&n!==e.prevRatio&&(e.prevRatio=n,e.forceUpdate((function(){e.props.callbackAfterUpdate&&e.props.callbackAfterUpdate()})))}),25,{leading:!0,trailing:!0})),G()(V()(e),"setScrollPosition",(function(t,n,r){e.scrollRef.scrollTo(0,t,r>=0?r:x.g.SCROLL_ANIMATION_TIME,{callback:n});var i=e.props.onScroll;i&&i(t)})),G()(V()(e),"updateRef",(function(t){e.scrollRef=t?t.scrollbar:{},e.scrollbarRef=t})),e}return n}(oE),lE=(r(295),r(566)),cE=r.n(lE);function uE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uE(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"activeThumbClick",(function(t){var n=e.props,r=n.setEditTimeOfChapter,i=n.timeRangeOfEditting,a=i.values[0]===t?0:1;a!=i.targetActiveIndex&&r({targetActiveIndex:a})})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.cogvidDetails,r=void 0===n?{}:n,i=t.setEditTimeOfChapter,a=t.timeRangeOfEditting,o=void 0===a?{}:a,s=r.videoLength,l=o.values;return l[0]<0&&(l[0]=0),l[1]>s&&(l[1]=s),!!o.isEdit&&v.a.createElement(Jw.Range,{values:o.values,step:1,min:0,max:s,onChange:function(e){return i({values:e})},renderTrack:function(e){var t=e.props,n=e.children;return v.a.createElement("div",{className:"".concat(cE.a.editVideoWrap," w-100 d-flex"),onMouseDown:t.onMouseDown,onTouchStart:t.onTouchStart,style:dE({},t.style)},v.a.createElement("div",{ref:t.ref,className:"align-self-center w-100 h-100",style:{background:Object(Jw.getTrackBackground)({values:o.values,colors:["transparent","rgba(0, 0, 0, .3)","transparent"],min:0,max:s})}},n))},renderThumb:function(t){var n=t.props,r=(t.isDragged,t.value);return v.a.createElement("div",Gt()({},n,{onMouseDown:function(){return e.activeThumbClick(r)},className:"".concat(cE.a.editVideoIndicator),style:dE({},n.style)}))}})}}]),n}(g.Component),fE=(Object(q.b)((function(e){return{cogvidDetails:e.cogvid.cogvidDetails,timeRangeOfEditting:e.cogvid.timeRangeOfEditting}}),(function(e){return{setEditTimeOfChapter:function(t){return e(Q.e.setEditTimeOfChapter(t))},removeEditTimeOfChapter:function(){return e(Q.e.removeEditTimeOfChapter())}}}))(hE),r(567)),pE=r.n(fE);var mE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.border,n=e.placeholder,r=e.searchTerm,i=e.onChange,a=e.onClear,o=e.onKeyDown,s=e.onFocus,l=e.onBlur,c=e.children,u=e.isSearchDisabled,d=e.inputRef,h=e.className,f=e.classNameInput,p=e.classNameSuffix,m=e.noWrapper;return v.a.createElement("div",{className:"w-100 h-100 d-flex align-items-center"},v.a.createElement("div",{className:P()("w-100 pr-2",!m&&[pE.a.wrap,"searchbox-wrap"],t&&pE.a.border,h)},v.a.createElement(mu,{inputRef:d,size:"sm",className:"mb-0 w-100",classNameInput:P()("border-0 bg-transparent shadow-none u-fs-7o8",f),classNameSuffix:p,autoComplete:"off",placeholder:n,onKeyDown:o,value:r,onChange:i,onFocus:s,onBlur:l,maxLength:x.g.TEXT_INPUT_MAX_LENGTH,suffix:c,iconSuffix:""===r?"search":"delete",onIconSuffixClick:""===r?null:a,disabled:u})))}}]),n}(v.a.PureComponent);mE.propTypes={placeholder:ne.a.string,searchTerm:ne.a.string,onChange:ne.a.func,onClear:ne.a.func,onKeyDown:ne.a.func,onFocus:ne.a.func,onBlur:ne.a.func},mE.defaultProps={placeholder:"",searchTerm:""};var gE=r(1027),vE=r.n(gE);var bE=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"wrapperRef",v.a.createRef()),G()(V()(e),"inputRef",v.a.createRef()),G()(V()(e),"submittedSearchTerm",""),G()(V()(e),"state",{searchTerm:"",showSearchResults:!1}),G()(V()(e),"componentDidMount",(function(){Object(Y.invoke)(e.inputRef,"current.focus")})),G()(V()(e),"componentWillUnmount",(function(){document.removeEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"handleFocus",(function(){e.setState({showSearchResults:!0}),document.addEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"handleBlur",(function(){var t=e.state.searchTerm;e.submittedSearchTerm&&e.submittedSearchTerm!==t&&e.setState({searchTerm:e.submittedSearchTerm})})),G()(V()(e),"handleSearchTermChange",(function(t){var n=t.target.value;e.setState({searchTerm:n})})),G()(V()(e),"handleClear",(function(){var t=e.props,n=t.onSearch,r=t.isSearchDisabled;e.setState({searchTerm:""}),e.submittedSearchTerm="",n&&!r&&n(""),document.removeEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"handleKeyDown",(function(t){if(t.nativeEvent.stopImmediatePropagation(),13===t.keyCode){var n=e.props,r=n.onSearch,i=n.currentSearchResultIndex,a=n.searchResults,o=t.target.value;if(e.submittedSearchTerm===o&&i===a.length-1)return void(1===a.length&&r(o,0));e.submittedSearchTerm=o,r(o,i+1)}})),G()(V()(e),"handleStepChange",(function(t){var n=e.props.onSearch;n&&n(e.submittedSearchTerm,t-1)})),G()(V()(e),"handleClickOutside",(function(t){e.wrapperRef&&!e.wrapperRef.current.contains(t.target)&&(e.setState({showSearchResults:!1}),document.removeEventListener("mousedown",e.handleClickOutside))})),e}return c()(r,[{key:"componentDidUpdate",value:function(e){var t=e.videoId;this.props.videoId!==t&&this.handleClear()}},{key:"render",value:function(){var e=this.props,n=e.searchResults,r=void 0===n?[]:n,i=e.currentSearchResultIndex,a=e.isSearchDisabled,o=(e.inputRef,e.noWrapper),s=e.className,l=this.state.searchTerm,c=i+1,u=(r.length,r.filter((function(e){return e.docClass===x.g.SEARCH_RESULT_DOC_CLASS.SEMANTIC})).length),d=c<=u?c:0;return v.a.createElement("div",{ref:this.wrapperRef,className:P()(vE.a.searchBoxWrapper,s)},v.a.createElement(mE,{noWrapper:o,searchTerm:l,inputRef:this.inputRef,placeholder:t("searchVideoContent"),onChange:this.handleSearchTermChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onClear:this.handleClear,onKeyDown:this.handleKeyDown,isSearchDisabled:a},this.submittedSearchTerm&&v.a.createElement(RE,{value:d,onChange:this.handleStepChange,min:1,max:u},v.a.createElement("span",{className:"text-primary mr-1 u-fs-7o8"},d>0?"".concat(d,"/"):"",u))))}}]),r}(v.a.PureComponent);var yE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"jumpOnSearchTimePoint",(function(t){var n=e.props.setUpdateVideoTime,r=x.g.SRC_SET_TIME;x.r.paused()?n({setTimeFrom:r.INSIDE_VIDEO_SEARCH,currentTime:t}):(x.r.play(t),n({setTimeFrom:r.INSIDE_VIDEO_SEARCH,currentTime:t}))})),G()(V()(e),"setTimePointOnSearch",(function(t,n,r){var i=e.props,a=i.showVideoOverlay;if(i.videoOverlayMode!==x.g.VIDEO_OVERLAY_MODE.CONTEXTUAL_IMG&&x.r.paused()&&a(x.g.VIDEO_OVERLAY_MODE.CONTEXTUAL_IMG),n===x.g.SEARCH_RESULT_DOC_CLASS.SEMANTIC&&!x.r.paused()&&t/1e3-1.95>=0)e.jumpOnSearchTimePoint(t/1e3-1.95);else{e.jumpOnSearchTimePoint(t/1e3);var o=e.props,s=o.chapters,l=o.setActiveChapter,c=Object(Y.find)(s,(function(e){return e.uid===r}));Object(Y.isEmpty)(c)||l(c)}})),G()(V()(e),"handleSearch",(function(t,n){var r=e.props,i=r.withinVideoSearch,a=i.currentSearchResultIndex,o=i.keyword,s=i.searchResults,l=r.videoId,c=r.searchWithinVideo,u=r.updateWithinVideoSearch,d=r.resetWithinVideoSearch;if(0!==t.trim().length&&l)if(o===t){if(0===s.length)return;n!==a&&u({currentSearchResultIndex:n});var h=s[n],f=h.timestamp,p=void 0===f?0:f,m=h.docClass,g=void 0===m?"":m,v=h.id,b=void 0===v?"":v;e.setTimePointOnSearch(p,g,b)}else c({keyword:t,videoId:l},(function(t){var n=t.timestamp,r=t.docClass,i=t.id,a=void 0===i?"":i;e.setTimePointOnSearch(n,r,a)}));else d()})),G()(V()(e),"handleBlur",(function(t){var n=e.props.resetWithinVideoSearch;x.c.focusInCurrentTarget(t)||n()})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.withinVideoSearch,n=t.searchResults,r=t.currentSearchResultIndex,i=e.videoId,a=e.className;return v.a.createElement(bE,{videoId:i,className:a,currentSearchResultIndex:r,searchResults:n,isSearchDisabled:!i,onSearch:this.handleSearch})}}]),n}(g.Component),AE=(Object(q.b)((function(e){var t=e.cogvid;return{withinVideoSearch:t.withinVideoSearch,videoId:t.cogvidDetails.videoId,chapters:Object(Y.get)(t.cogvidDetails,"chapters",[]),videoOverlayMode:t.videoOverlayMode}}),(function(e){return{searchWithinVideo:function(t,n){return e(Q.e.searchWithinVideo(t,n))},updateWithinVideoSearch:function(t){return e(Q.e.updateWithinVideoSearch(t))},resetWithinVideoSearch:function(){return e(Q.e.resetWithinVideoSearch())},setActiveChapter:function(t){return e(Q.e.setActiveChapter(t))},showVideoOverlay:function(t){return e(Q.e.showVideoOverlay(t))},setUpdateVideoTime:function(t){return e(Q.e.setUpdateVideoTime(t))}}}))(yE),r(99)),_E=r.n(AE);function wE(e){var t=e.iconName,n=e.isDisabled,r=e.isActive,i=e.onClick,a=e.tooltipText;return v.a.createElement(Kt.a,{placement:"bottom",delay:{show:800},overlay:v.a.createElement(Xt.a,null,a),trigger:a?["hover","focus"]:""},v.a.createElement("div",{className:P()(_E.a.iconWrapper,_E.a.hoverEffect,"d-inline-flex justify-content-center align-items-center mr-2",r&&_E.a.active,n&&_E.a.disabled),onClick:i},v.a.createElement("i",{className:"fv ".concat(t," u-fs-1x1o8")})))}wE.propTypes={iconName:ne.a.string.isRequired,isDisabled:ne.a.bool,isActive:ne.a.bool,onClick:ne.a.func},wE.defaultProps={isDisabled:!0,isActive:!1,onClick:function(){return null}};var EE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handleDrawingTypeChange",(function(t){var n=x.g.CANVAS_DRAWING_TYPE,r=e.props,i=r.updateCanvasProperties;t!==r.drawingType&&([n.RESET_CANVAS,n.EXPORT,n.UNDO,n.REDO].includes(t)?i({drawingType:t,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!0,mouseCursor:"crosshair"}):i({drawingType:t,prevDrawingType:t,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!0,mouseCursor:"crosshair"}))})),G()(V()(e),"handleStrokeWidthChange",(function(t){var n=e.props,r=n.updateCanvasProperties,i=n.strokeWidth,a=(n.drawingType,n.editModeStrokeWidth);x.g.CANVAS_DRAWING_TYPE;t!==i&&r({strokeWidth:t,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1}),a!==t&&r({editModeStrokeWidth:t,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1})})),G()(V()(e),"handleColorPickerChange",(function(t){var n=e.props,r=n.updateCanvasProperties,i=n.strokeColor,a=(n.drawingType,n.editModeStrokeColor);x.g.CANVAS_DRAWING_TYPE;t!==i&&r({strokeColor:t,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1}),a!==t&&r({editModeStrokeColor:t,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1})})),G()(V()(e),"handleBackgroundColorPickerChange",(function(t){var n=e.props,r=n.updateCanvasProperties;t!==n.backgroundColor&&r(t),r({editModeBackgroundColor:t.backgroundColor,editModeLineStyle:"",isDrawingTypeChange:!1})})),G()(V()(e),"handleBorderColorPickerChange",(function(t){var n=e.props,r=n.updateCanvasProperties;t!==n.borderColor&&r({borderColor:t.borderColor,editModeBackgroundColor:null}),r({editModeStrokeColor:t.borderColor,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1})})),G()(V()(e),"handleFontChange",(function(t){var n=e.props,r=n.updateCanvasProperties;t!==n.fontName&&(r({editModeBackgroundColor:null}),r(t)),r({editModeFontStyle:t.fontName,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1})})),G()(V()(e),"handleFontSizeChange",(function(t){var n=e.props,r=n.updateCanvasProperties;t!==n.fontSize&&(r({editModeBackgroundColor:null}),r(t)),r({editModeFontSize:t.fontSize,editModeBackgroundColor:null,editModeLineStyle:"",isDrawingTypeChange:!1})})),G()(V()(e),"handleLineStyleChange",(function(t){var n=e.props,r=n.updateCanvasProperties;t!==n.lineStyle&&(r({editModeBackgroundColor:null}),r(t)),r({editModeLineStyle:t.lineStyle,editModeBackgroundColor:null,isDrawingTypeChange:!1})})),e}return n}(function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"toolbarRef",Object(g.createRef)()),G()(V()(e),"toolbarWrapRef",Object(g.createRef)()),G()(V()(e),"scrollRef",Object(g.createRef)()),G()(V()(e),"state",{isDisplayNav:!1}),G()(V()(e),"componentDidUpdate",(function(){e.handleDisplayNavScrollInSmallScreen(),window.addEventListener("resize",e.handleDisplayNavScrollInSmallScreen)})),G()(V()(e),"componentWillUnmount",(function(){window.removeEventListener("resize",e.handleDisplayNavScrollInSmallScreen)})),G()(V()(e),"handleDisplayNavScrollInSmallScreen",(function(){var t=Object(Y.get)(e.toolbarWrapRef,"current.offsetWidth",0)<Object(Y.get)(e.toolbarRef,"current.offsetWidth",0);e.state.isDisplayNav!==t&&e.setState({isDisplayNav:t})})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.strokeWidth,i=(n.strokeColor,n.backgroundColor),a=n.borderColor,o=n.fontSize,s=n.fontName,l=n.lineStyle,c=n.isDisabled,u=n.isToolbarShown,d=n.prevDrawingType,h=n.canUndo,f=n.canRedo,p=n.attachmentId,m=x.g.CANVAS_DRAWING_TYPE,g=(x.g.CANVAS_COLORS,this.state.isDisplayNav);return v.a.createElement("div",{className:"".concat(_E.a.cavasTbWrapper," d-flex align-items-center ").concat(c&&_E.a.disabled)},v.a.createElement("div",{className:"flex-fill h-100 position-relative"},v.a.createElement("div",{className:"position-absolute w-100 h-100 d-flex align-items-center"},u&&v.a.createElement(v.a.Fragment,null,v.a.createElement(Lb,{plugins:{filterEvent:{horizontalScroll:!0}},className:"fv-smooth-scroll",isDisplayXNav:g},v.a.createElement("div",{className:"h-100 d-flex justify-content-start",style:{marginTop:2},ref:this.toolbarWrapRef},v.a.createElement("div",{className:"h-100 d-flex align-items-center",ref:this.toolbarRef},v.a.createElement(wE,{iconName:"fuvi-select-icon",isActive:!c&&d===m.MOVE_AND_RESIZE,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.MOVE_AND_RESIZE)},tooltipText:t("tooltip.selectMode")}),v.a.createElement(wE,{iconName:"fuvi-toolbar-line",isActive:!c&&d===m.LINE,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.LINE)},tooltipText:t("tooltip.drawLine")}),v.a.createElement(wE,{iconName:"fuvi-check",isActive:!c&&d===m.CHECK,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.CHECK)},tooltipText:t("tooltip.drawCheck")}),v.a.createElement(wE,{iconName:"fuvi-sqrt",isActive:!c&&d===m.SQRT,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.SQRT)},tooltipText:t("tooltip.drawSqrt")}),v.a.createElement(wE,{iconName:"fuvi-toolbar-curve",isActive:!c&&d===m.CURVE,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.CURVE)},tooltipText:t("tooltip.drawCurve")}),v.a.createElement(wE,{iconName:"fuvi-toolbar-triangle",isActive:!c&&d===m.TRIANGLE,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.TRIANGLE)},tooltipText:t("tooltip.drawTriangle")}),v.a.createElement(wE,{iconName:"fuvi-toolbar-rectangle",isActive:!c&&d===m.RECT,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.RECT)},tooltipText:t("tooltip.drawRect")}),v.a.createElement(wE,{iconName:"fuvi-toolbar-circle",isActive:!c&&d===m.CIRCLE,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.CIRCLE)},tooltipText:t("tooltip.drawCircle")}),v.a.createElement(wE,{iconName:"fuvi-toolbar-hexagon",isActive:!c&&d===m.HEXAGON,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.HEXAGON)},tooltipText:t("tooltip.drawHexagon")}),v.a.createElement(wE,{iconName:"fuvi-toolbar-pentagon",isActive:!c&&d===m.POLYGON,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.POLYGON)},tooltipText:t("tooltip.drawPolygon")}),v.a.createElement("div",{className:_E.a.lineGroupLeft}),v.a.createElement(wE,{iconName:"fuvi-toolbar-item26",isActive:!c&&d===m.FREE_STYLE,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.FREE_STYLE)},tooltipText:t("tooltip.freeStyle")}),v.a.createElement(sn,{fillColor:i||x.g.BASE_CANVAS_BACKGROUND_COLOR,onChange:function(t){return e.handleBackgroundColorPickerChange({backgroundColor:t})},disabled:!1,position:"bottom",className:P()(_E.a.hoverEffect,"u-opacity-100")},v.a.createElement("i",{className:P()("fv fuvi-fill-icon u-fs-1x1o8")})),v.a.createElement(sn,{fillColor:a||x.g.BASE_CANVAS_BORDER_COLOR,onChange:function(t){return e.handleBorderColorPickerChange({borderColor:t})},disabled:!1,position:"bottom",className:P()(_E.a.hoverEffect,"u-opacity-100")},v.a.createElement("i",{className:"fv fuvi-pen-draw u-fs-1x1o8"})),v.a.createElement("div",{className:_E.a.lineGroup}),v.a.createElement(Kt.a,{rootClose:!0,trigger:"click",placement:"bottom",overlay:v.a.createElement(on,null,v.a.createElement(on.Content,null,v.a.createElement("ul",{className:_E.a.fontSizeList},x.g.TOOLBAR_LIST_LINE_STYLE.map((function(t,n){return v.a.createElement("li",{key:n,onClick:function(){return e.handleLineStyleChange({lineStyle:t})},className:P()((l||x.g.BASE_LINE_STYLE)==t&&_E.a.fontSizeListActive)},v.a.createElement("i",{className:"fv ".concat(t),style:{fontSize:"2.5rem"}}))})))))},v.a.createElement("div",{className:P()(_E.a.iconDropdownWrapper,_E.a.hoverEffect,"d-inline-flex justify-content-center align-items-center mr-1")},v.a.createElement("i",{className:"fv fuvi-border-style u-fs-1x1o8"}))),v.a.createElement(Kt.a,{rootClose:!0,trigger:"click",placement:"bottom",overlay:v.a.createElement(on,null,v.a.createElement(on.Content,null,v.a.createElement("ul",{className:_E.a.fontSizeList},x.g.TOOLBAR_LIST_BORDER_SIZE.map((function(t,n){return v.a.createElement("li",{key:n,onClick:function(){return e.handleStrokeWidthChange(t)},className:P()((r||x.g.BASE_PIXEL_BORDER_SIZE)==t&&_E.a.fontSizeListActive)},t)})))))},v.a.createElement("div",{className:P()(_E.a.iconDropdownWrapper,_E.a.hoverEffect,"d-inline-flex justify-content-center align-items-center mr-1")},v.a.createElement("i",{className:"fv fuvi-weight-border u-fs-1x1o8"}))),v.a.createElement("div",{className:_E.a.lineGroup}),v.a.createElement(Kt.a,{rootClose:!0,trigger:"click",placement:"bottom",overlay:v.a.createElement(on,null,v.a.createElement(on.Content,null,v.a.createElement("ul",{className:_E.a.fontSizeList},x.g.TOOLBAR_LIST_FONT.map((function(t,n){return v.a.createElement("li",{key:n,onClick:function(){return e.handleFontChange({fontName:t})},className:P()((s||x.g.BASE_FONT)==t&&_E.a.fontSizeListActive)},t)})))))},v.a.createElement("div",{className:_E.a.fontWrap},v.a.createElement("input",{value:s||x.g.BASE_FONT,type:"text",readOnly:!0,style:{cursor:"pointer"}}))),v.a.createElement(Kt.a,{rootClose:!0,trigger:"click",placement:"bottom",overlay:v.a.createElement(on,null,v.a.createElement(on.Content,null,v.a.createElement("ul",{className:_E.a.fontSizeList},x.g.TOOLBAR_LIST_FONT_SIZE.map((function(t,n){return v.a.createElement("li",{key:n,onClick:function(){return e.handleFontSizeChange({fontSize:t})},className:P()((o||x.g.BASE_PIXEL_FONT_SIZE)==t&&_E.a.fontSizeListActive)},t)})))))},v.a.createElement("div",{className:_E.a.fontSizeWrap},v.a.createElement("input",{value:o||x.g.BASE_PIXEL_FONT_SIZE,type:"text",readOnly:!0,style:{cursor:"pointer"}}))),v.a.createElement("div",{className:_E.a.lineGroup}),v.a.createElement(wE,{iconName:"fuvi-toolbar-textbox",isActive:!c&&d===m.TEXT,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.TEXT)},tooltipText:t("tooltip.insertText")}),v.a.createElement(wE,{iconName:"fuvi-toolbar-pen",isActive:!1,isDisabled:!0}),!p&&v.a.createElement(v.a.Fragment,null,v.a.createElement(wE,{iconName:"fuvi-undo-ex",isActive:!c&&d===m.UNDO,isDisabled:!h,onClick:function(){return e.handleDrawingTypeChange(m.UNDO)},tooltipText:t("tooltip.undo")}),v.a.createElement(wE,{iconName:"fuvi-redo-ex",isActive:!c&&d===m.REDO,isDisabled:!f,onClick:function(){return e.handleDrawingTypeChange(m.REDO)},tooltipText:t("tooltip.redo")})),v.a.createElement(wE,{iconName:"fuvi-clear-canvas",isActive:!c&&d===m.RESET_CANVAS,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.RESET_CANVAS)},tooltipText:t("tooltip.emptyCb")}),v.a.createElement(wE,{iconName:"fuvi-export-sub",isActive:!c&&d===m.EXPORT,isDisabled:!1,onClick:function(){return e.handleDrawingTypeChange(m.EXPORT)},tooltipText:t("tooltip.exportCb")}))))))))}}]),r}(v.a.PureComponent)),SE=(Object(q.b)((function(e){var t=e.canvas,n=e.cogvid;return{drawingType:t.drawingType,strokeWidth:t.strokeWidth,strokeColor:t.strokeColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,fontSize:t.fontSize,fontName:t.fontName,lineStyle:t.lineStyle,isToolbarShown:t.isToolbarShown,prevDrawingType:t.prevDrawingType,ownerId:n.cogvidDetails.ownerId,permissions:n.cogvidDetails.permissions,canUndo:t.canUndo,canRedo:t.canRedo,attachmentId:n.attachmentReview.attachmentId,mouseCursor:t.mouseCursor}}),(function(e){return{updateCanvasProperties:function(t){return e(Q.b.updateCanvasProperties(t))}}}))(EE),r(568)),CE=r.n(SE);var TE=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"handleKeyDown",(function(t){var n=e.props.onSubmit;t.nativeEvent.stopImmediatePropagation(),13===t.keyCode&&n&&n(!0),x.c.preventKeyDownSideEffect(t)})),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.searchTerm,r=e.onChange,i=e.onClear,a=e.className;return v.a.createElement("div",{className:P()(CE.a.searchBoxWrapper,a),"data-tut":"fuvi-search"},v.a.createElement(mE,{className:CE.a.searchBox,searchTerm:n,placeholder:t("searchVideo"),onChange:r,onClear:i,onKeyDown:this.handleKeyDown}))}}]),r}(v.a.Component);TE.propTypes={searchTerm:ne.a.string,searchResults:ne.a.array,currentVideoId:ne.a.string,onChange:ne.a.func,onSearchMore:ne.a.func},TE.defaultProps={searchTerm:"",searchResults:[]};var kE=TE;var xE=x.g.VIDEO_CATEGORY,OE=x.g.SEARCH_PARAM,IE=x.g.VIDEO_SORT_DEFAULT,ME=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"toastId",void 0),G()(V()(e),"prevSearchTerm",""),G()(V()(e),"state",{searchTerm:"",searchResults:[],videoSort:IE}),G()(V()(e),"getDefaultIRLSearchTerm",(function(){return Ml()().format("YYYY-MM-")})),G()(V()(e),"handleURLChange",(function(t){var n=t.isFirstLoad,r=void 0!==n&&n,i=x.c.getDataFromUrl(),a=i.searchTerm,o=void 0===a?"":a,s=i.sort,l=void 0===s?IE:s;x.c.getCurrentVideoCategory()===xE.EXPLORING&&l!==e.state.videoSort&&e.setState({searchResults:[],videoSort:l}),o===e.state.searchTerm&&o||(r&&x.c.getCurrentVideoCategory()===xE.HOME?e.setState({searchTerm:e.getDefaultIRLSearchTerm()}):e.setState({searchTerm:o}))})),G()(V()(e),"showNotFoundMessage",(function(){x.e.isActive(e.toastId)||(e.toastId=x.e.info("No videos found."))})),G()(V()(e),"hideNotFoundMessage",(function(){x.e.isActive(e.toastId)&&x.e.dismiss(e.toastId)})),G()(V()(e),"handleChange",(function(t){var n=t.target.value;e.isDirty=!0,e.setState({searchTerm:n},(function(){""===n.trim()&&e.handleSearch()}))})),G()(V()(e),"handleSubmit",(function(t){var n=e.state.searchTerm,r=n.trim();(t||!(""===r&&n.length>0)&&e.isDirty&&e.prevSearchTerm!==r)&&(r&&""!==r?(e.isDirty=!1,e.prevSearchTerm=r,!x.r.paused()&&x.r.pause(),x.c.addURLSearchParams([[OE.KEY.VIDEO_ID],[OE.KEY.COURSE_ID],[OE.KEY.SEARCH_TERM,r]],!1,!1,{forceSearch:t,refresh:t})):e.handleClear())})),G()(V()(e),"handleClear",(function(){if(!e.prevSearchTerm)return e.setState({searchTerm:""}),void(e.isDirty=!1);var t=e.props.resetCogvidLists;e.isDirty=!1,e.prevSearchTerm="";var n=x.c.getCurrentVideoCategory();x.c.addURLSearchParams([[OE.KEY.VIDEO_ID],[OE.KEY.CHAPTER_ID],[OE.KEY.ATTACHMENT_ID],[OE.KEY.CHAPTER_ATTACHMENT_ID],[OE.KEY.SEARCH_TERM],[OE.KEY.COURSE_ID]],!1,!1,{refresh:!0}),n===xE.HOME&&e.setState({searchTerm:e.getDefaultIRLSearchTerm()}),t()})),G()(V()(e),"handleSearch",Object(Y.debounce)(e.handleSubmit,x.g.DELAY_SEARCH_VIDEO_TIME)),e}return c()(n,[{key:"componentDidMount",value:function(){this.unlistenHistory=$.a.listen(this.handleURLChange),this.handleURLChange({isFirstLoad:!0})}},{key:"componentWillUnmount",value:function(){this.unlistenHistory&&this.unlistenHistory()}},{key:"componentDidUpdate",value:function(e){var t=e.userInfo,n=this.props.userInfo;Object(Y.isEmpty)(n)&&!Object(Y.isEqual)(n,t)&&this.setState({searchTerm:"",searchResults:[]})}},{key:"render",value:function(){var e=this.state,t=e.searchTerm,n=e.searchResults,r=this.props,i=r.className,a=r.currentVideoId;return v.a.createElement(kE,{className:i,searchTerm:t,searchResults:n,currentVideoId:a,onChange:this.handleChange,onSubmit:this.handleSubmit,onClear:this.handleClear,onSearchMore:this.handleSearchMore})}}]),n}(g.Component);ME.propTypes={};var PE=Object(q.b)((function(e){var t=e.auth,n=e.cogvid;return{userInfo:t.userInfo,currentVideoId:n.cogvidDetails.videoId}}),(function(e){return{searchCogvidList:function(t,n,r){return e(Q.e.searchCogvidList(t,n,r))},resetCogvidLists:function(){return e(Q.e.resetCogvidLists())}}}))(Object(K.c)(ME)),DE=r(222),NE=r.n(DE);var LE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handlePrev",(function(){var t=e.props,n=t.value,r=t.onChange;r&&r(n-1,x.g.SEARCH_NAV_LABEL.PREV)})),G()(V()(e),"handleNext",(function(){var t=e.props,n=t.value,r=t.onChange;r&&r(n+1,x.g.SEARCH_NAV_LABEL.NEXT)})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.min,r=e.max,i=e.children,a=e.className,o=e.iconLeft,s=e.iconRight;return v.a.createElement("div",{className:P()(NE.a.stepper,a)},v.a.createElement("span",{className:P()(NE.a.stepperIcon,G()({},NE.a.stepperIconDisabled,t<=n)),onClick:this.handlePrev},v.a.createElement("i",{className:"fv ".concat(o," fv-sm mr-1")})),i,v.a.createElement("span",{className:P()(NE.a.stepperIcon,G()({},NE.a.stepperIconDisabled,t>=r)),onClick:this.handleNext},v.a.createElement("i",{className:"fv ".concat(s," fv-sm mr-1")})))}}]),n}(v.a.Component);LE.propTypes={value:ne.a.number,min:ne.a.number,max:ne.a.number,onChange:ne.a.func,children:ne.a.node,className:ne.a.string,iconLeft:ne.a.string,iconRight:ne.a.string},LE.defaultProps={value:0,min:0,max:0,iconLeft:"fuvi-s-arrow-left",iconRight:"fuvi-s-arrow-right"};var RE=LE;var BE=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{inputValue:e.props.value}),G()(V()(e),"componentDidUpdate",(function(t){var n=t.value,r=e.props.value;r!==n&&e.setState({inputValue:r})})),G()(V()(e),"handleChange",(function(t){var n=t.target,r=""===n.value?"":Number(n.value),i=n.name;i&&e.setState((function(e){return G()({},i,Number.isNaN(r)?e[i]:r)}))})),G()(V()(e),"handleKeyDown",(function(t){t.nativeEvent.stopImmediatePropagation(),13===t.keyCode&&e.handleCurrentPageSubmit()})),G()(V()(e),"handleCurrentPageSubmit",(function(){var t=e.props,n=t.min,r=t.max,i=t.value,a=t.onChange,o=e.state.inputValue;o!==i&&(""===o||o>r||o<n?e.setState({inputValue:i}):a(o))})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.min,r=e.max,i=e.className,a=e.iconLeft,o=e.iconRight,s=e.onChange,l=this.state.inputValue;return v.a.createElement(RE,{value:t,onChange:s,min:n,max:r,iconLeft:a,iconRight:o,className:i},r>0?v.a.createElement(v.a.Fragment,null,v.a.createElement("input",{autoComplete:"off",className:NE.a.inputValue,name:"inputValue",value:l,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleCurrentPageSubmit}),v.a.createElement("span",{className:"ml-1 mr-2"},"/ ".concat(r))):v.a.createElement("span",{className:"mx-1"},r))}}]),n}(v.a.Component);BE.propTypes={value:ne.a.number.isRequired,min:ne.a.number.isRequired,max:ne.a.number.isRequired,onChange:ne.a.func,children:ne.a.node,className:ne.a.string,iconLeft:ne.a.string,iconRight:ne.a.string},BE.defaultProps={value:0,min:0,max:0,iconLeft:"fuvi-s-arrow-left",iconRight:"fuvi-s-arrow-right"};var jE=r(163),FE=r.n(jE);var UE=x.g.MENU_ITEMS,HE=x.g.VIDEO_MENU_BASE_URL,zE=x.g.HOME_PAGE_PATH,VE=x.g.BRAINHIVE_PAGE_PATH,WE=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{showConfirmation:!1,selectedMenuItem:null,isMenuCollapsed:!1}),G()(V()(e),"handleMenuItemClick",(function(t,n,r){var i=e.props,a=i.isEditingSb,o=i.resetCogvidReducer,s=i.updateCommonState,l=$.a.location.pathname;if(r&&s({isMenuCollapsed:!1}),l!==n.path)return a?(t.preventDefault(),void e.setState({showConfirmation:!0,selectedMenuItem:n})):void(x.c.checkLoggedIn(n.path)||[zE,VE].includes(n.path)?(o(),e.handlePersistLastState(n)):t.preventDefault());t.preventDefault()})),G()(V()(e),"navigateToSelectedMenu",(function(){var t=e.props,n=t.updateIsEditingSb,r=t.resetCogvidReducer,i=e.state.selectedMenuItem;i&&(n(!1),r(),e.handlePersistLastState(i))})),G()(V()(e),"handlePersistLastState",(function(t){var n=t.path.substring(1);n===x.g.VIDEO_CATEGORY.COMPOSING||n===x.g.VIDEO_CATEGORY.LEARNING?(0,e.props.fetchTrackingState)({context:n},(function(e){JSON.parse(e.state).videoId,$.a.push(t.path)}),(function(){$.a.push(t.path)})):$.a.push(t.path)})),G()(V()(e),"collapseMenu",(function(){var t=e.props.updateCommonState;t({willCollapseMenu:!0}),t({isMenuCollapsed:!0}),setTimeout((function(){t({willCollapseMenu:!1})}),100)})),G()(V()(e),"checkAppVersion",(function(){fetch("/app.json",{cache:"no-cache",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((function(e){return e.json()})).then((function(e){e.version&&window.APP_VERSION!==e.version&&(window.location.reload(),window.APP_VERSION=e.version)}))})),e}return c()(r,[{key:"componentDidMount",value:function(){this.checkAppVersion()}},{key:"render",value:function(){var e=this,n=this.props,r=n.noNewSharedVideo,i=n.noNewSharedMessageVideos,a=n.roles,o=n.isMenuCollapsed,s=this.state.showConfirmation,l=Object(Y.get)($.a,"location.pathname");return v.a.createElement("div",{className:"h-100 bg-primary d-flex flex-column"},!o&&v.a.createElement("div",{className:P()(FE.a.menuItem,"menu-item d-flex flex-fill flex-shrink-0 align-items-center border-top border-white text-white px-3 u-cursor-pointer"),onClick:this.collapseMenu},v.a.createElement("div",{className:"flex-grow-1"},t("menuText")),v.a.createElement("i",{className:P()("fv fuvi-left-fullscreen-op",FE.a.collapseIcon)})),Object.values(UE).flatMap((function(t){var n=t.requiredRole,s=t.path===l;return n&&Object(Y.isEmpty)(a.filter((function(e){return e===n})))||o&&!s?[]:[v.a.createElement(O.a,{className:P()(FE.a.link,t.isDisabled&&"u-pointer-event-none"),to:"#",key:t.name},v.a.createElement("div",{key:t.name,className:P()({"bg-secondary":s},FE.a.menuItem,"menu-item d-flex flex-fill align-items-center border-top border-white text-white px-3 u-cursor-pointer"),onClick:function(n){return e.handleMenuItemClick(n,t,s&&o)}},v.a.createElement("i",{className:"fv fuvi-".concat(t.icon," mr-3 u-fs-1 text-white")}),v.a.createElement("div",{className:"flex-grow-1"},t.name),t.path===HE.BRAINHIVE&&r>0&&v.a.createElement("div",{className:FE.a.notiBadge},r),t.path===HE.MESSAGES&&i>0&&v.a.createElement("div",{className:FE.a.notiBadge},i),o&&v.a.createElement("i",{className:P()("fv fuvi-left-fullscreen-op ml-2",FE.a.expandIcon)})))]})),v.a.createElement(IC,{show:!!s,title:t("modal.confirmNavigationModalTitle"),message:t("modal.confirmCancelEditSbMessage"),onConfirm:this.navigateToSelectedMenu,onClose:function(){return e.setState({showConfirmation:!1,selectedMenuItem:null})}}))}}]),r}(v.a.Component);Object(q.b)((function(e){var t=e.cogvid,n=e.notification,r=e.auth,i=e.common;return{isEditingSb:t.isEditingSb,noNewSharedVideo:n.noNewSharedVideo,noNewSharedMessageVideos:n.noNewSharedMessageVideos,roles:r.userInfo.roles,isMenuCollapsed:i.isMenuCollapsed}}),(function(e){return{updateIsEditingSb:function(t){return e(Q.e.updateIsEditingSb(t))},resetCogvidReducer:function(){return e(Q.e.resetReducer())},fetchTrackingState:function(t,n,r){return e(Q.f.fetchTrackingState(t,n,r))},updateCogvidState:function(t,n,r){return e(Q.e.updateCogvidState(t,n,r))},updateCommonState:function(t,n,r){return e(Q.f.updateCommonState(t,n,r))}}}))(WE);function GE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GE(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var YE=x.g.MENU_ITEMS,KE=(x.g.VIDEO_MENU_BASE_URL,x.g.HOME_PAGE_PATH),XE=x.g.BRAINHIVE_PAGE_PATH,QE=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{menuOptions:[],showConfirmation:!1,selectedMenuItem:null,isMenuCollapsed:!1}),G()(V()(e),"componentDidMount",(function(){e.buildMenuOptions();e.checkAppVersion(),clearInterval(e.intervalCheckAppVersion),e.intervalCheckAppVersion=setInterval(e.checkAppVersion,36e5)})),G()(V()(e),"componentWillUnmount",(function(){clearInterval(e.intervalCheckAppVersion)})),G()(V()(e),"componentDidUpdate",(function(t){Object(Y.isEqual)(t.roles,e.props.roles)||e.buildMenuOptions()})),G()(V()(e),"checkAppVersion",(function(){fetch("/app.json",{cache:"no-cache",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((function(e){return e.json()})).then((function(e){e.version&&window.APP_VERSION!==e.version&&(window.location.reload(),window.APP_VERSION=e.version)}))})),G()(V()(e),"buildMenuOptions",(function(){var t=e.props.roles,n=Object.values(YE).filter((function(e){return!e.requiredRole||t.includes(e.requiredRole)}));e.setState({menuOptions:n.map((function(e){return qE(qE({},e),{},{value:e.path})}))})})),G()(V()(e),"handleFilterToggle",(function(e,t){!e&&Object(Y.invoke)(t,"currentTarget.blur")})),G()(V()(e),"handleFilterChange",(function(t){var n=e.state.menuOptions.find((function(e){return e.value===t}));n&&e.handleMenuChange(n)})),G()(V()(e),"handleMenuChange",(function(t){var n=e.props,r=n.isEditingSb,i=n.resetCogvidReducer;$.a.location.pathname!==t.path&&(r?e.setState({showConfirmation:!0,selectedMenuItem:t}):(x.c.checkLoggedIn(t.path)||[KE,XE].includes(t.path))&&(i(),e.handlePersistLastState(t)))})),G()(V()(e),"navigateToSelectedMenu",(function(){var t=e.props,n=t.updateIsEditingSb,r=t.resetCogvidReducer,i=e.state.selectedMenuItem;i&&(n(!1),r(),e.handlePersistLastState(i))})),G()(V()(e),"handlePersistLastState",(function(t){var n=t.path.substring(1);n===x.g.VIDEO_CATEGORY.COMPOSING||n===x.g.VIDEO_CATEGORY.LEARNING?(0,e.props.fetchTrackingState)({context:n},(function(e){$.a.push(t.path)}),(function(){$.a.push(t.path)})):$.a.push(t.path)})),G()(V()(e),"collapseMenu",(function(){var t=e.props.updateCommonState;t({willCollapseMenu:!0}),t({isMenuCollapsed:!0}),setTimeout((function(){t({willCollapseMenu:!1})}),100)})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.menuOptions,i=n.showConfirmation,a=Object(Y.get)($.a,"location.pathname");return v.a.createElement("div",{className:FE.a.menuDropdown},v.a.createElement(wu,{drop:"up",className:P()(FE.a.dropdownWrapper),classNameInput:P()(FE.a.dropdown,"no-arrow"),value:a,options:r,onChange:this.handleFilterChange,onToggle:this.handleFilterToggle}),v.a.createElement("div",{className:P()(FE.a.arrow)}),v.a.createElement(IC,{show:!!i,title:t("modal.confirmNavigationModalTitle"),message:t("modal.confirmCancelEditSbMessage"),onConfirm:this.navigateToSelectedMenu,onClose:function(){return e.setState({showConfirmation:!1,selectedMenuItem:null})}}))}}]),r}(g.Component),$E=Object(q.b)((function(e){var t=e.auth;return{isEditingSb:e.cogvid.isEditingSb,roles:t.userInfo.roles}}),(function(e){return{updateIsEditingSb:function(t){return e(Q.e.updateIsEditingSb(t))},resetCogvidReducer:function(){return e(Q.e.resetReducer())},fetchTrackingState:function(t,n,r){return e(Q.f.fetchTrackingState(t,n,r))},updateCogvidState:function(t,n,r){return e(Q.e.updateCogvidState(t,n,r))},updateCommonState:function(t,n,r){return e(Q.f.updateCommonState(t,n,r))}}}))(QE);function JE(e){return(JE="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)}function ZE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eS(e,t){return!t||"object"!==JE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tS(e){var t="function"==typeof Map?new Map:void 0;return(tS=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return nS(e,arguments,aS(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),iS(r,e)})(e)}function nS(e,t,n){return(nS=rS()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&iS(i,n.prototype),i}).apply(null,arguments)}function rS(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function iS(e,t){return(iS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function aS(e){return(aS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&iS(e,t)}(r,e);var t,n=(t=r,function(){var e,n=aS(t);if(rS()){var r=aS(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return eS(this,e)});function r(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(ZE(this,r),(t=n.call(this,e)).originalRequest=a,t.originalResponse=o,t.causingError=i,null!=i&&(e+=", caused by ".concat(i.toString())),null!=a){var s=a.getHeader("X-Request-ID")||"n/a",l=a.getMethod(),c=a.getURL(),u=o?o.getStatus():"n/a",d=o?o.getBody()||"":"n/a";e+=", originated from request (method: ".concat(l,", url: ").concat(c,", response code: ").concat(u,", response text: ").concat(d,", request id: ").concat(s,")")}return t.message=e,t}return r}(tS(Error));var sS=r(1028),lS=r(1029),cS=r.n(lS),uS=!1;function dS(e){uS&&console.log(e)}function hS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hS(Object(n),!0).forEach((function(t){pS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gS={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,_onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null},vS=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"resume"in n&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=n,this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}var t,n,r;return t=e,r=[{key:"terminate",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if("function"==typeof n||"function"==typeof r)throw new Error("tus: the terminate function does not accept a callback since v2 anymore; please use the returned Promise instead");var i=AS("DELETE",t,n),a=i.send();return a.then((function(e){if(204!==e.getStatus())throw new oS("tus: unexpected response while terminating upload",null,i,e)})).catch((function(r){if(r instanceof oS||(r=new oS("tus: failed to terminate upload",r,i,null)),!_S(r,0,n))throw r;var a=n.retryDelays[0],o=n.retryDelays.slice(1),s=fS({},n,{retryDelays:o});return new Promise((function(e){return setTimeout(e,a)})).then((function(){return e.terminate(t,s)}))}))}}],(n=[{key:"findPreviousUploads",value:function(){var e=this;return this.options.fingerprint(this.file,this.options).then((function(t){return e._urlStorage.findUploadsByFingerprint(t)}))}},{key:"resumeFromPreviousUpload",value:function(e){this.url=e.uploadUrl||null,this._parallelUploadUrls=e.parallelUploadUrls||null,this._urlStorageKey=e.urlStorageKey}},{key:"start",value:function(){var e=this,t=this.file;if(t)if(this.options.endpoint||this.options.uploadUrl){var n=this.options.retryDelays;null==n||"[object Array]"===Object.prototype.toString.call(n)?(this.options.parallelUploads>1&&["uploadUrl","uploadSize","uploadLengthDeferred"].forEach((function(t){e.options[t]&&e._emitError(new Error("tus: cannot use the ".concat(t," option when parallelUploads is enabled")))})),this.options.fingerprint(t,this.options).then((function(n){return dS(null==n?"No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.":"Calculated fingerprint: ".concat(n)),e._fingerprint=n,e._source?e._source:e.options.fileReader.openFile(t,e.options.chunkSize)})).then((function(t){e._source=t,e.options.parallelUploads>1||null!=e._parallelUploadUrls?e._startParallelUpload():e._startSingleUpload()})).catch((function(t){e._emitError(t)}))):this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var t=this,n=this._size=this._source.size,r=0;this._parallelUploads=[];var i=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,a=function(e,t,n){for(var r=Math.floor(e/t),i=[],a=0;a<t;a++)i.push({start:r*a,end:r*(a+1)});return i[t-1].end=e,n&&i.forEach((function(e,t){e.uploadUrl=n[t]||null})),i}(this._source.size,i,this._parallelUploadUrls);this._parallelUploadUrls=new Array(a.length);var o,s=a.map((function(i,o){var s=0;return t._source.slice(i.start,i.end).then((function(l){var c=l.value;return new Promise((function(l,u){var d=fS({},t.options,{uploadUrl:i.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,metadata:{},headers:fS({},t.options.headers,{"Upload-Concat":"partial"}),onSuccess:l,onError:u,onProgress:function(e){r=r-s+e,s=e,t._emitProgress(r,n)},_onUploadUrlAvailable:function(){t._parallelUploadUrls[o]=h.url,t._parallelUploadUrls.filter((function(e){return!!e})).length===a.length&&t._saveUploadInUrlStorage()}}),h=new e(c,d);h.start(),t._parallelUploads.push(h)}))}))}));Promise.all(s).then((function(){(o=t._openRequest("POST",t.options.endpoint)).setHeader("Upload-Concat","final;".concat(t._parallelUploadUrls.join(" ")));var e=bS(t.options.metadata);return""!==e&&o.setHeader("Upload-Metadata",e),t._sendRequest(o,null)})).then((function(e){if(yS(e.getStatus(),200)){var n=e.getHeader("Location");null!=n?(t.url=wS(t.options.endpoint,n),dS("Created upload at ".concat(t.url)),t._emitSuccess()):t._emitHttpError(o,e,"tus: invalid or missing Location header")}else t._emitHttpError(o,e,"tus: unexpected response while creating upload")})).catch((function(e){t._emitError(e)}))}},{key:"_startSingleUpload",value:function(){if(this.options.uploadLengthDeferred)this._size=null;else if(null!=this.options.uploadSize){if(this._size=+this.options.uploadSize,isNaN(this._size))return void this._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(this._size=this._source.size,null==this._size)return void this._emitError(new Error("tus: cannot automatically derive upload's size from input and must be specified manually using the `uploadSize` option"));return this._aborted=!1,null!=this.url?(dS("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?(dS("Resuming upload from provided URL: ".concat(this.options.url)),this.url=this.options.uploadUrl,void this._resumeUpload()):(dS("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t,n){var r=this;if("function"==typeof n)throw new Error("tus: the abort function does not accept a callback since v2 anymore; please use the returned Promise instead");return null!=this._parallelUploads&&this._parallelUploads.forEach((function(e){e.abort(t)})),null!==this._req&&(this._req.abort(),this._source.close()),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?e.terminate(this.url,this.options).then((function(){return r._removeFromUrlStorage()})):Promise.resolve()}},{key:"_emitHttpError",value:function(e,t,n,r){this._emitError(new oS(n,r,e,t))}},{key:"_emitError",value:function(e){var t=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),_S(e,this._retryAttempt,this.options))){var n=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout((function(){t.start()}),n))}if("function"!=typeof this.options.onError)throw e;this.options.onError(e)}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess()}},{key:"_emitProgress",value:function(e,t){"function"==typeof this.options.onProgress&&this.options.onProgress(e,t)}},{key:"_emitChunkComplete",value:function(e,t,n){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,n)}},{key:"_createUpload",value:function(){var e=this;if(this.options.endpoint){var t=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?t.setHeader("Upload-Defer-Length",1):t.setHeader("Upload-Length",this._size);var n,r=bS(this.options.metadata);""!==r&&t.setHeader("Upload-Metadata",r),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,n=this._addChunkToRequest(t)):n=this._sendRequest(t,null),n.then((function(n){if(yS(n.getStatus(),200)){var r=n.getHeader("Location");if(null!=r){if(e.url=wS(e.options.endpoint,r),dS("Created upload at ".concat(e.url)),"function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),0===e._size)return e._emitSuccess(),void e._source.close();e._saveUploadInUrlStorage(),e.options.uploadDataDuringCreation?e._handleUploadResponse(t,n):(e._offset=0,e._performUpload())}else e._emitHttpError(t,n,"tus: invalid or missing Location header")}else e._emitHttpError(t,n,"tus: unexpected response while creating upload")})).catch((function(n){e._emitHttpError(t,null,"tus: failed to create upload",n)}))}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var e=this,t=this._openRequest("HEAD",this.url);this._sendRequest(t,null).then((function(n){var r=n.getStatus();if(!yS(r,200))return yS(r,400)&&e._removeFromUrlStorage(),423===r?void e._emitHttpError(t,n,"tus: upload is currently locked; retry later"):e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitHttpError(t,n,"tus: unable to resume upload (new upload cannot be created without an endpoint)");var i=parseInt(n.getHeader("Upload-Offset"),10);if(isNaN(i))e._emitHttpError(t,n,"tus: invalid or missing offset value");else{var a=parseInt(n.getHeader("Upload-Length"),10);if(!isNaN(a)||e.options.uploadLengthDeferred){if("function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),i===a)return e._emitProgress(a,a),void e._emitSuccess();e._offset=i,e._performUpload()}else e._emitHttpError(t,n,"tus: invalid or missing length value")}})).catch((function(n){e._emitHttpError(t,null,"tus: failed to resume upload",n)}))}},{key:"_performUpload",value:function(){var e,t=this;this._aborted||(this.options.overridePatchMethod?(e=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):e=this._openRequest("PATCH",this.url),e.setHeader("Upload-Offset",this._offset),this._addChunkToRequest(e).then((function(n){yS(n.getStatus(),200)?t._handleUploadResponse(e,n):t._emitHttpError(e,n,"tus: unexpected response while uploading chunk")})).catch((function(n){t._aborted||t._emitHttpError(e,null,"tus: failed to upload chunk at offset "+t._offset,n)})))}},{key:"_addChunkToRequest",value:function(e){var t=this,n=this._offset,r=this._offset+this.options.chunkSize;return e.setProgressHandler((function(e){t._emitProgress(n+e,t._size)})),e.setHeader("Content-Type","application/offset+octet-stream"),(r===1/0||r>this._size)&&!this.options.uploadLengthDeferred&&(r=this._size),this._source.slice(n,r).then((function(n){var r=n.value,i=n.done;return t.options.uploadLengthDeferred&&i&&(t._size=t._offset+(r&&r.size?r.size:0),e.setHeader("Upload-Length",t._size)),null===r?t._sendRequest(e):(t._emitProgress(t._offset,t._size),t._sendRequest(e,r))}))}},{key:"_handleUploadResponse",value:function(e,t){var n=parseInt(t.getHeader("Upload-Offset"),10);if(isNaN(n))this._emitHttpError(e,t,"tus: invalid or missing offset value");else{if(this._emitProgress(n,this._size),this._emitChunkComplete(n-this._offset,n,this._size),this._offset=n,n==this._size)return this._emitSuccess(),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(e,t){var n=AS(e,t,this.options);return this._req=n,n}},{key:"_removeFromUrlStorage",value:function(){var e=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch((function(t){e._emitError(t)})),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var e=this;if(this.options.storeFingerprintForResuming&&this._fingerprint){var t={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};this._parallelUploads?t.parallelUploadUrls=this._parallelUploadUrls:t.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,t).then((function(t){return e._urlStorageKey=t})).catch((function(t){e._emitError(t)}))}}},{key:"_sendRequest",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"function"==typeof this.options.onBeforeRequest&&this.options.onBeforeRequest(e),e.send(n).then((function(n){return"function"==typeof t.options.onAfterResponse&&t.options.onAfterResponse(e,n),n}))}}])&&mS(t.prototype,n),r&&mS(t,r),e}();function bS(e){var t=[];for(var n in e)t.push(n+" "+sS.Base64.encode(e[n]));return t.join(",")}function yS(e,t){return e>=t&&e<t+100}function AS(e,t,n){var r=n.httpStack.createRequest(e,t);r.setHeader("Tus-Resumable","1.0.0");var i=n.headers||{};for(var a in i)r.setHeader(a,i[a]);if(n.addRequestId){var o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));r.setHeader("X-Request-ID",o)}return r}function _S(e,t,n){var r,i=e.originalResponse?e.originalResponse.getStatus():0,a=!yS(i,400)||409===i||423===i;return null!=n.retryDelays&&t<n.retryDelays.length&&null!=e.originalRequest&&a&&(r=!0,"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(r=!1),r)}function wS(e,t){return new cS.a(t,e).toString()}vS.defaultOptions=gS;var ES=vS;function SS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var CS=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(e){return Promise.resolve([])}},{key:"removeUpload",value:function(e){return Promise.resolve()}},{key:"addUpload",value:function(e,t){return Promise.resolve(null)}}])&&SS(t.prototype,n),r&&SS(t,r),e}();function TS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var kS=!1;try{kS="localStorage"in window;localStorage.setItem("tusSupport",localStorage.getItem("tusSupport"))}catch(mm){if(mm.code!==mm.SECURITY_ERR&&mm.code!==mm.QUOTA_EXCEEDED_ERR)throw mm;kS=!1}var xS=kS,OS=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"findAllUploads",value:function(){var e=this._findEntries("tus::");return Promise.resolve(e)}},{key:"findUploadsByFingerprint",value:function(e){var t=this._findEntries("tus::".concat(e,"::"));return Promise.resolve(t)}},{key:"removeUpload",value:function(e){return localStorage.removeItem(e),Promise.resolve()}},{key:"addUpload",value:function(e,t){var n=Math.round(1e12*Math.random()),r="tus::".concat(e,"::").concat(n);return localStorage.setItem(r,JSON.stringify(t)),Promise.resolve(r)}},{key:"_findEntries",value:function(e){for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(0===r.indexOf(e))try{var i=JSON.parse(localStorage.getItem(r));i.urlStorageKey=r,t.push(i)}catch(e){}}return t}}])&&TS(t.prototype,n),r&&TS(t,r),e}();function IS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function PS(e,t,n){return t&&MS(e.prototype,t),n&&MS(e,n),e}var DS=function(){function e(){IS(this,e)}return PS(e,[{key:"createRequest",value:function(e,t){return new NS(e,t)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),e}(),NS=function(){function e(t,n){IS(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,n,!0),this._method=t,this._url=n,this._headers={}}return PS(e,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(e,t){this._xhr.setRequestHeader(e,t),this._headers[e]=t}},{key:"getHeader",value:function(e){return this._headers[e]}},{key:"setProgressHandler",value:function(e){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(t){t.lengthComputable&&e(t.loaded)})}},{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise((function(n,r){e._xhr.onload=function(){n(new LS(e._xhr))},e._xhr.onerror=function(e){r(e)},e._xhr.send(t)}))}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),LS=function(){function e(t){IS(this,e),this._xhr=t}return PS(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(e){return this._xhr.getResponseHeader(e)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),RS=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};var BS=function(){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)};function jS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function US(e,t,n){return t&&FS(e.prototype,t),n&&FS(e,n),e}var HS=function(){function e(t){jS(this,e),this._file=t,this.size=t.size}return US(e,[{key:"slice",value:function(e,t){if(BS())return n=this._file.slice(e,t),new Promise((function(e,t){var r=new FileReader;r.onload=function(){var t=new Uint8Array(r.result);e({value:t})},r.onerror=function(e){t(e)},r.readAsArrayBuffer(n)}));var n,r=this._file.slice(e,t);return Promise.resolve({value:r})}},{key:"close",value:function(){}}]),e}(),zS=function(){function e(t,n){jS(this,e),this._chunkSize=n,this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}return US(e,[{key:"slice",value:function(e,t){return e<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(e,t)}},{key:"_readUntilEnoughDataOrDone",value:function(e,t){var n=this,r=t<=this._bufferOffset+VS(this._buffer);if(this._done||r){var i=this._getDataFromBuffer(e,t),a=null==i&&this._done;return Promise.resolve({value:i,done:a})}return this._reader.read().then((function(r){var i=r.value;return r.done?n._done=!0:void 0===n._buffer?n._buffer=i:n._buffer=function(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}throw new Error("Unknown data type")}(n._buffer,i),n._readUntilEnoughDataOrDone(e,t)}))}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var n=0===VS(this._buffer);return this._done&&n?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),e}();function VS(e){return void 0===e?0:void 0!==e.size?e.size:e.length}var WS=function(){function e(){jS(this,e)}return US(e,[{key:"openFile",value:function(e,t){return RS()&&e&&void 0!==e.uri?(n=e.uri,new Promise((function(e,t){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var t=r.response;e(t)},r.onerror=function(e){t(e)},r.open("GET",n),r.send()}))).then((function(e){return new HS(e)})).catch((function(e){throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. "+e)})):"function"==typeof e.slice&&void 0!==e.size?Promise.resolve(new HS(e)):"function"==typeof e.read?(t=+t,isFinite(t)?Promise.resolve(new zS(e,t)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment"));var n}}]),e}();function GS(e){return(GS="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)}function qS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function KS(e,t){return(KS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function XS(e,t){return!t||"object"!==GS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function QS(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function $S(e){return($S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function JS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JS(Object(n),!0).forEach((function(t){eC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tC=ZS({},ES.defaultOptions,{httpStack:new DS,fileReader:new WS,urlStorage:xS?new OS:new CS,fingerprint:function(e,t){return RS()?Promise.resolve(function(e,t){var n=e.exif?function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",n,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}}),nC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KS(e,t)}(o,e);var t,n,r,i,a=(t=o,function(){var e,n=$S(t);if(QS()){var r=$S(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return XS(this,e)});function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return qS(this,o),t=ZS({},tC,{},t),a.call(this,e,t)}return n=o,i=[{key:"terminate",value:function(e,t,n){return t=ZS({},tC,{},t),ES.terminate(e,t,n)}}],(r=null)&&YS(n.prototype,r),i&&YS(n,i),o}(ES),rC=window,iC=rC.XMLHttpRequest,aC=rC.Blob,oC=(iC&&aC&&aC.prototype.slice,r(111)),sC=r.n(oC);var lC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(e){var r;s()(this,n);var i=(r=t.call(this,e)).props,a=i.radius,o=i.stroke;return r.normalizedRadius=a-2*o,r.circumference=2*r.normalizedRadius*Math.PI,r}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.radius,n=e.stroke,r=e.progress,i=void 0===r?0:r,a=e.className,o=e.children,s=this.circumference-i/100*this.circumference,l="".concat(2*t/16,"rem");x.c.convertRemToPx(l);return v.a.createElement("div",{className:P()(a,sC.a.progressRing),style:{width:l,height:l}},v.a.createElement("svg",{height:24,width:24,className:sC.a.progressRingCircle},v.a.createElement("circle",{stroke:"#FFF",fill:"transparent",strokeWidth:n,strokeDasharray:"".concat(this.circumference," ").concat(this.circumference),style:{strokeDashoffset:0},r:this.normalizedRadius,cx:t,cy:t}),v.a.createElement("circle",{stroke:Um.primary_color,fill:"transparent",strokeWidth:n,strokeDasharray:"".concat(this.circumference," ").concat(this.circumference),style:{strokeDashoffset:s},r:this.normalizedRadius,cx:t,cy:t})),v.a.createElement("div",{className:sC.a.progressRingChildren},o))}}]),n}(v.a.Component);var cC=x.g.VIDEO_TYPE,uC=x.g.VIDEO_PROCESSING_ACTION_STATES,dC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isRetryProcessing:!1}),G()(V()(e),"handleActionClick",(function(t){t.preventDefault(),t.stopPropagation();var n=e.props,r=n.itemProgress,i=(r=void 0===r?{}:r).isFailed,a=(r.status,n.onItemCancel),o=n.onItemResume,s=e.state.isRetryProcessing;if(i){if(s)return;e.setState({isRetryProcessing:!0}),o&&o((function(){e.setState({isRetryProcessing:!1})}))}else a&&a()})),G()(V()(e),"handleCancelClick",(function(t){t.preventDefault(),t.stopPropagation();var n=e.props.onItemCancel;n&&n()})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.item,n=(t=void 0===t?{}:t).name,r=t.type,i=t.noUpload,a=void 0!==i&&i,o=e.itemProgress,s=(o=void 0===o?{}:o).now,l=void 0===s?0:s,c=o.status,u=void 0===c?x.g.PROGRESS_STATUS.PROCESSING:c,d=o.isFailed,h=o.createdDate,f=o.processingStatus,p=void 0===f?{}:f,m=o.cogvidId,g=e.onClick,b=this.state.isRetryProcessing,y=u===x.g.PROGRESS_STATUS.UPLOADING,A=u===x.g.PROGRESS_STATUS.PROCESSING,_=u===x.g.PROGRESS_STATUS.DONE,w=A?(100*(p.percentage||0)).toFixed(2):l;w=Number(w)>=100?100:w;var E=p.videoType,S=void 0===E?"":E,C=p.actionState,T=S===cC.GALLERY||r===cC.GALLERY,k=r===cC.UPDATING_COGNITIVE||C===uC.UPDATING,O=!A&&!a;return v.a.createElement("div",{className:P()("p-2 pl-3",sC.a.progressItem,O&&"hover u-cursor-pointer"),onClick:O?g:null},v.a.createElement("div",{className:"d-flex u-pr-2x1o4"},v.a.createElement("div",{className:"flex-grow-1 text-dark text-truncate font-weight-bold mr-1"},n),!y&&v.a.createElement("div",{className:sC.a.createdDate},Ml()(h).format(x.g.DATE_TIME_FORMAT_PROGRESS))),v.a.createElement("div",{className:"w-100 my-n1 d-flex align-items-center"},v.a.createElement("div",{className:"flex-fill"},v.a.createElement(bt,{className:P()(d&&"failed"),now:w,animated:A})),d&&!(T&&A)&&v.a.createElement(Qt,{className:P()("ml-2 p-1 u-fs-3o4 u-shadow border rounded-circle text-secondary",_&&"invisible"),onClick:b?null:this.handleActionClick,isLoading:b,disabled:A&&!m},v.a.createElement("i",{className:"fv fuvi-refresh"})),!d&&!T&&v.a.createElement(Qt,{className:P()("ml-2 p-1 u-fs-3o4 u-shadow border rounded-circle text-secondary",_&&"invisible"),onClick:this.handleActionClick,disabled:A&&!m},v.a.createElement("i",{className:"fv fuvi-delete"}))),!d&&v.a.createElement("small",null,v.a.createElement("b",null,w,"% "),v.a.createElement("span",null,u)),d&&v.a.createElement("small",null,v.a.createElement("b",{className:"text-secondary"},"Failed "),T||k&&y?v.a.createElement("span",null,"(",y?"Uploading":"Processing"," is incomplete)"):v.a.createElement("span",null,"(".concat(y?"Uploading":"Processing"," is incomplete. Please try again or "),v.a.createElement("span",{className:P()("u-cursor-pointer text-secondary",b&&"u-cursor-default u-pointer-event-none"),onClick:b?null:this.handleCancelClick},"cancel"),")")))}}]),n}(v.a.Component);var hC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"shouldComponentUpdate",value:function(e){var t=e.progress,n=void 0===t?{}:t,r=this.props.progress;return!Object(Y.isEqual)(r,n)}},{key:"render",value:function(){var e=this.props,t=e.progress,n=void 0===t?{}:t,r=e.onActionClick,i=n.now,a=n.status,o=n.isFailed,s=n.started,l=n.resumed,c=a===x.g.PROGRESS_STATUS.DONE,u=o&&s&&!l;return v.a.createElement(v.a.Fragment,null,c&&v.a.createElement("div",{className:"d-flex justify-content-center pr-5"},v.a.createElement("div",{className:"d-flex bg-primary p-1 rounded-circle"},v.a.createElement("i",{className:"fv fuvi-check text-white"})),v.a.createElement("div",{className:"ml-2"},"Done")),!c&&v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:"flex-fill justify-content-center"},v.a.createElement("div",{className:P()("text-secondary text-center",!u&&"invisible")},"Failed"),v.a.createElement("div",{className:"w-100"},v.a.createElement(bt,{className:P()(o&&"failed"),now:i||0})),!u&&v.a.createElement("div",{className:"text-center"},s&&v.a.createElement("b",null,i||0,"% "),v.a.createElement("span",null,s?a:"Waiting to upload")),u&&v.a.createElement("div",{className:"text-center"},"(",a," is incomplete. Please try again)")),v.a.createElement(Qt,{className:P()(!u&&"invisible","ml-3 p-1 u-shadow border rounded-circle"),onClick:r},v.a.createElement("i",{className:"fv fuvi-refresh text-primary"}))))}}]),n}(v.a.Component);var fC=x.g.VIDEO_TYPE,pC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handleFileResume",(function(t){var n=e.props,r=n.item,i=n.onFileResume;i&&i(r,t)})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.item,r=(n=void 0===n?{}:n).name,i=n.files,a=n.totalVideos,o=n.totalSubtitles,s=n.totalImages,l=n.type,c=t.filesProgress,u=void 0===c?{}:c,d=t.onClose,h=t.onItemCancel,f=u.status,p=u.bytesTotal,m=f===x.g.PROGRESS_STATUS.PROCESSING,g=[fC.GALLERY,fC.UPDATING_COGNITIVE].includes(l);return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,scrollable:!0,centered:!0,size:"xl",backdrop:"static",dialogClassName:sC.a.modalDialog,onEscapeKeyDown:d},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,{className:"w-100"},v.a.createElement("div",{className:"text-truncate"},v.a.createElement("b",null,r),v.a.createElement("span",null,m?" (Upload successful)":" (Uploading)")))),v.a.createElement(Fl.a.Body,{className:"bg-light u-fs-7o8"},v.a.createElement("div",{className:"d-flex flex-column h-100 u-shadow overflow-hidden u-border-radius-1o2"},v.a.createElement(nc.a,{striped:!0,borderless:!0},v.a.createElement("thead",null,v.a.createElement("tr",null,v.a.createElement("th",{className:sC.a.fileColumn},"File"),v.a.createElement("th",{className:sC.a.dateColumn},"Date"),v.a.createElement("th",{className:sC.a.sizeColumn},"Size"),v.a.createElement("th",{className:"".concat(sC.a.statusColumn," pr-5")},"Status")))),v.a.createElement(Lb,{className:"fv-smooth-scroll h-100"},v.a.createElement(nc.a,{striped:!0,borderless:!0},v.a.createElement("tbody",null,i.map((function(t){var n=I.a.srtIcon;return x.c.isVideoFile(t)&&(n=I.a.cogvidIcon),t.type.match(/image/)&&(n=I.a.imageIcon),v.a.createElement("tr",{key:t.name+t.metadata.uploadSeqNumber},v.a.createElement("td",{className:sC.a.fileColumn},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("img",{className:"mr-3",style:{height:36,width:36,opacity:.5},src:n,alt:"Cogvid Icon"}),v.a.createElement("div",{className:"u-truncate-2"},t.name))),v.a.createElement("td",{className:sC.a.dateColumn},x.c.formatDate(t.lastModified)),v.a.createElement("td",{className:sC.a.sizeColumn},x.c.formatFileSize(t.size)),v.a.createElement("td",{className:sC.a.statusColumn},v.a.createElement(hC,{progress:u[t.metadata.uploadSeqNumber],onActionClick:function(){return e.handleFileResume(t.metadata.uploadSeqNumber)}})))}))))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex align-self-start ml-3"},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-1x1o4"})),v.a.createElement("div",{className:"u-fs-7o8"},v.a.createElement("div",null,"".concat(x.c.pluralize(a,"video"),", ").concat(x.c.pluralize(o,"subtitle")).concat(void 0!==s?", ".concat(x.c.pluralize(s,"image")):"")),v.a.createElement("div",{style:{fontWeight:600}},"Total (",x.c.formatFileSize(p),")")),v.a.createElement("div",{className:"flex-fill"}),!m&&!g&&v.a.createElement(et.a,{className:"modal-button",variant:"outline-primary",onClick:h},"Abort"),v.a.createElement(et.a,{className:"modal-button text-white ml-4",onClick:d},"Close"))))}}]),n}(v.a.Component),mC=function(e){var n=e.onConfirm,r=e.onClose,i=e.show;return v.a.createElement(IC,{show:i,title:t("modal.confirmProcessModalTitle"),message:t("modal.confirmProcessModalMessage"),onConfirm:n,onClose:r})};mC.propTypes={onConfirm:ne.a.func,onClose:ne.a.func};var gC=mC;var vC=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{showPanelContent:!1,selectedItem:null,selectedCancelItem:null}),G()(V()(e),"wrapperRef",v.a.createRef()),G()(V()(e),"componentWillUnmount",(function(){document.removeEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.items,r=t.itemsProgress,i=e.props,a=i.items,o=i.itemsProgress,s=e.state,l=s.showPanelContent,c=s.selectedItem,u=s.selectedCancelItem;l&&document.addEventListener("mousedown",e.handleClickOutside),a.length!==n.length&&(c||u)&&(c&&!a.find((function(e){return e.sessionId===c.sessionId}))&&e.setState({selectedItem:null}),u&&!a.find((function(e){return e.sessionId===u.sessionId}))&&e.setState({selectedCancelItem:null})),c&&u&&r[c.sessionId].status===x.g.PROGRESS_STATUS.UPLOADING&&o[c.sessionId].status===x.g.PROGRESS_STATUS.PROCESSING&&e.setState({selectedCancelItem:null})})),G()(V()(e),"toggleProgessContent",(function(){return e.setState((function(e){return{showPanelContent:!e.showPanelContent}}))})),G()(V()(e),"handleClickOutside",(function(t){var n=document.querySelectorAll(".modal"),r=Array.from(n).some((function(e){return e.contains(t.target)}));!e.wrapperRef||e.wrapperRef.current.contains(t.target)||r||(e.setState({showPanelContent:!1}),document.removeEventListener("mousedown",e.handleClickOutside))})),G()(V()(e),"showCancelConfirmation",(function(t){return e.setState({selectedCancelItem:t})})),G()(V()(e),"handleCancelConfirm",(function(){var t=e.props.onItemCancel,n=e.state.selectedCancelItem;e.setState({selectedCancelItem:null,selectedItem:null}),t&&t(n)})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.showPanelContent,i=n.selectedItem,a=n.selectedCancelItem,o=this.props,s=o.totalProgress,l=o.items,c=o.itemsProgress,u=o.onItemResume,d=o.onFileResume,h=o.showInfoModal,f=o.onInfoModalClose,p=Object.values(c).filter((function(e){return e.status===x.g.PROGRESS_STATUS.UPLOADING})).length,m=Object.values(c).filter((function(e){return e.status===x.g.PROGRESS_STATUS.PROCESSING})).length;return v.a.createElement("div",{ref:this.wrapperRef,className:P()(sC.a.progressPanel,0===l.length&&"invisible u-w-0x")},v.a.createElement("div",{className:P()("u-cursor-pointer",sC.a.progressRingWrap),onClick:this.toggleProgessContent},v.a.createElement(lC,{radius:12,stroke:1.5,progress:s},v.a.createElement("i",{className:"fv fuvi-up-arrow text-primary u-fs-3o4"}))),r&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:sC.a.arrow}),v.a.createElement("div",{className:"".concat(sC.a.progressPanelContent," u-shadow")},v.a.createElement("div",{className:sC.a.progressPanelHeader},"".concat(x.c.pluralize(p,"video")," (uploading) - ").concat(x.c.pluralize(m,"video")," (processing)")),v.a.createElement("div",{className:sC.a.progressItemList},v.a.createElement(Lb,{className:"fv-smooth-scroll h-100"},v.a.createElement("div",null,l.map((function(t){return v.a.createElement(dC,{key:t.sessionId,item:t,itemProgress:c[t.sessionId],onClick:function(){return e.setState({selectedItem:t})},onItemResume:function(e){u(t,e)},onItemCancel:function(){return e.showCancelConfirmation(t)}})}))))))),i&&v.a.createElement(pC,{item:i,filesProgress:c[i.sessionId],onClose:function(){return e.setState({selectedItem:null})},onItemResume:function(){return u(i)},onItemCancel:function(){return e.showCancelConfirmation(i)},onFileResume:d}),v.a.createElement(gC,{show:!!a,onClose:function(){return e.setState({selectedCancelItem:null})},onConfirm:this.handleCancelConfirm}),!!h&&v.a.createElement(HC,{show:!0,message:t("modal.infoUpdatedVideoMessage",{name:null==h?void 0:h.title}),onClose:f}))}}]),r}(v.a.Component);function bC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bC(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var AC=x.g.VIDEO_PROCESSING_ACTION_STATES,_C=x.g.VIDEO_TYPE,wC=x.g.VIDEO_MENU_CATEGORY,EC=x.g.VIDEO_LIST_FILTER,SC=x.g.VIDEO_SEARCH_SCOPE,CC=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{creatingCogvidList:[],totalProgress:0,showInfoModal:null}),G()(V()(e),"interval",void 0),G()(V()(e),"handleWindowBeforeUnload",(function(t){var n=e.props.isUploadingCogvid,r=x.c.getToken();n&&r?(t.preventDefault(),t.returnValue=""):delete t.returnValue})),G()(V()(e),"initialCreatingCogvidList",(function(){var t=e.props,n=t.creatingCogvidList,r=t.creatingCogvidProgress,i=n.filter((function(e){var t=r[e.sessionId]||{},n=Object.values(t).some((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.status;return t===x.g.PROGRESS_STATUS.UPLOADING})),i=t.status===x.g.PROGRESS_STATUS.PROCESSING;return n||i})).sort((function(e,t){return new Date(t.createdDate)-new Date(e.createdDate)}));e.setState({creatingCogvidList:Rl()(i)})})),G()(V()(e),"componentDidMount",(function(){e.initialCreatingCogvidList(),window.addEventListener("beforeunload",e.handleWindowBeforeUnload)})),G()(V()(e),"componentWillUnmount",(function(){e.interval&&clearInterval(e.interval),window.removeEventListener("beforeunload",e.handleWindowBeforeUnload),e.setState=function(e,t){}})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.creatingCogvidList,r=t.creatingCogvidProgress,i=t.shouldUpdateProgress,a=t.transcodingStatus,o=e.props,s=o.creatingCogvidList,l=o.creatingCogvidProgress,c=o.updateTotalCogvidProgress,u=o.removeACogvidProgress,d=o.updateCreatingCogvidItem,h=o.shouldUpdateProgress,f=o.changeShouldUpdateProgress,p=o.transcodingStatus,m=e.state.creatingCogvidList;if(Object.keys(r).forEach((function(t){var n,i,a=null===(n=l[t])||void 0===n?void 0:n.status,o=null===(i=r[t])||void 0===i?void 0:i.status;a&&a!==o&&d({sessionId:t,status:a}),l[t]||e.removeCreatingCogvidItem(t)})),!Object(Y.isEqual)(s,n)){var g=s.filter((function(e){var t=e.sessionId;return!m.find((function(e){return e.sessionId===t}))})),v=Rl()(m);Object(Y.remove)(v,(function(e){var t=!s.find((function(t){return t.sessionId===e.sessionId}));return t&&u({sessionId:e.sessionId}),t}));var b=g.map((function(t){return e.buildCreatingCogvidItem(t)})),y=[].concat(Rl()(b),Rl()(v)).sort((function(e,t){return new Date(t.createdDate)-new Date(e.createdDate)}));e.setState({creatingCogvidList:y},(function(){b.map((function(t){var n=t.sessionId;return e.checkCogvidFilesUpload(n)})),c()})),e.checkProcessingStatus()}h&&i!==h&&f(!1),Object(Y.isEqual)(a,p)||e.updateProcessingCodvidsStatus(p)})),G()(V()(e),"checkProcessingStatus",(function(){var t=e.props,n=t.creatingCogvidList,r=t.creatingCogvidProgress,i=Object.values(r).some((function(e){var t=e.status,n=e.isFailed;return t===x.g.PROGRESS_STATUS.PROCESSING&&!n}));i||(i=Object.values(n).some((function(t){var n=t.noUpload,r=t.sessionId,i=t.status;return n&&i!==x.g.PROGRESS_STATUS.DONE&&e.updateFileProgress(r,{status:x.g.PROGRESS_STATUS.DONE}),n})))})),G()(V()(e),"buildCreatingCogvidItem",(function(t){var n=t.files.map((function(n){return e.createResumableUpload(n,t.sessionId,t.type)}));return e.props.addUploader(G()({},t.sessionId,n)),yC(yC({},t),{},{filesUpload:n})})),G()(V()(e),"getResumableEndpoint",(function(e,t){return t===_C.GALLERY?"".concat(x.g.CONTENT_SERVICES_ENDPOINT,"galleries/").concat(e,"/files"):"".concat(x.g.CONTENT_SERVICES_ENDPOINT,"videos/").concat(e,"/files")})),G()(V()(e),"checkCogvidFilesUpload",(function(t){var n=Object(Y.get)(GA.a.getState(),"progress"),r=n.creatingCogvidProgress,i=n.uploader,a=e.state.creatingCogvidList,o=Object(Y.find)(a,{sessionId:t});if(o&&null!==r[t]){var s=Object(Y.filter)(r[t],(function(e){if(null===e||!e)return!1;var t=e.status,n=e.started,r=e.isFailed;return t===x.g.PROGRESS_STATUS.UPLOADING&&n&&!r})).length;if(s<x.g.MAX_UPLOADING_PROCESS){var l=x.g.MAX_UPLOADING_PROCESS-s;(i[t]||[]).some((function(n){var i=n.options.metadata.uploadSeqNumber,a=r[t][i];return!(!a||a.started)&&(e.updateFileProgress(t,i,{started:!0},(function(){a.isFailed?e.handleFileResume(o,i):e.props.startACogvidFileUpload({sessionId:t,uploadSeqNumber:i})}),!1),0===--l)}))}}})),G()(V()(e),"createResumableUpload",(function(t,n,r){var i=t.metadata.uploadSeqNumber,a=new nC(t,{endpoint:e.getResumableEndpoint(n,r),headers:x.c.getResumableHeaders(),metadata:t.metadata||{},retryDelays:[0,3e3,5e3,1e4,2e4],onError:function(t){var r=t.originalResponse,a=e.props.creatingCogvidProgress[n][i]||{};r&&409===r.getStatus()&&a.prevFileIds&&a.prevFileIds.length>0?e.updateFileProgress(n,i,{status:x.g.PROGRESS_STATUS.DONE,isFailed:!1,now:100},(function(){return e.checkCogvidFilesUpload(n)})):e.updateFileProgress(n,i,{isFailed:!0,resumed:!1},(function(){return e.checkCogvidFilesUpload(n)}))},onShouldRetry:function(e){var t=e.originalResponse,n=t?t.getStatus():0;return 401!==n&&403!==n&&409!==n},onProgress:function(t,r){var a=x.c.percentage(t/r);e.updateFileProgress(n,i,{bytesUploaded:t,bytesTotal:r,now:a,status:x.g.PROGRESS_STATUS.UPLOADING,isFailed:!1})},onSuccess:function(){e.updateFileProgress(n,i,{status:x.g.PROGRESS_STATUS.DONE},(function(){return e.checkCogvidFilesUpload(n)}))},onAfterResponse:function(t,r){var a=r.getHeader("location");if(a){var o=RegExp("(videos|galleries)\\/".concat(n,"\\/files\\/")),s=a.split(o)[2];e.updateFileProgress(n,i,{fileId:s},null,!1)}}});return e.updateFileProgress(n,i,{status:x.g.PROGRESS_STATUS.UPLOADING,bytesUploaded:0,bytesTotal:t.size,started:!1}),a})),G()(V()(e),"updateFileProgress",(function(t,n,r,i){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=e.props,s=o.updateCreatingCogvidProgress,l=o.updateACogvidProgress;s(G()({},t,G()({},n,r))).then((function(){a&&l({sessionId:t}).then(e.props.updateTotalCogvidProgress),i&&i()}))})),G()(V()(e),"updateProcessingCodvidsStatus",(function(n){var r=e.props,i=r.creatingCogvidList,a=r.updateCreatingCogvidList,o=r.updateCogvidListItem;if(!Object(Y.isEmpty)(n)){var s=e.props.creatingCogvidProgress,l=n.filter((function(e){var t=e.status;return t===x.g.PROCESSING_STATUS.RUNNING||t===x.g.PROCESSING_STATUS.FAILED})).map((function(t){var n=t.sessionId,r=t.processId,a=t.title,o=t.createdDate,l=Yt()(t,["sessionId","processId","title","createdDate"]),c=s[n],u=Object(Y.get)(c,"processingStatus.percentage",0);if(e.updateCogvidProgressState(n,{processingStatus:yC(yC({},l),{},{percentage:Math.max(l.percentage,u)}),name:a,cogvidId:r,status:x.g.PROGRESS_STATUS.PROCESSING,isFailed:l.status===x.g.PROCESSING_STATUS.FAILED,createdDate:o}),!c&&!Object(Y.find)(i,{sessionId:n}))return{sessionId:n,name:a,files:[],createdDate:o}})).filter(Boolean);l.length>0&&a([].concat(Rl()(l),Rl()(i)));var c=n.filter((function(e){var t=e.status,n=e.sessionId,r=e.processId,a=Object(Y.find)(i,{sessionId:n});return t!==x.g.PROCESSING_STATUS.COMPLETED&&t!==x.g.PROCESSING_STATUS.CANCELED||a||o({videoId:r,data:{cognitiveVideo:{status:x.g.COGVID_STATUS.PUBLISHED}}}),(t===x.g.PROCESSING_STATUS.COMPLETED||t===x.g.PROCESSING_STATUS.CANCELED)&&(!!s[n]||(null==a?void 0:a.noUpload))})).map((function(n){var r=n.sessionId,i=n.title,a=n.status,o=n.actionState,s=n.videoType,l=a===x.g.PROCESSING_STATUS.COMPLETED;return e.removeCreatingCogvidItem(r),s===_C.LECTURE?o===AC.UPDATING?x.e.success(t("message.updatedVideoSuccessfully",{name:i})):x.e.success(t("message.createdVideoSuccessfully",{name:i})):x.e.success(t("message.updatedGallerySuccessfully",{name:i})),l?n:void 0})).filter(Boolean);if(c.length>0){var u=e.props,d=u.getGalleryVideo,h=u.activeCogvidItem,f=u.currentActiveVideoType,p=u.videoId,m=u.userScaffId,g=u.getLectureVideo,v=u.unshiftCogvidList,b=u.cogvidListLv,y=b.currentActiveLv,A=b["lv".concat(y)].filter,_=x.g.VIDEO_CATEGORY,w=x.c.getCurrentVideoCategory();c.some((function(t){var n=t.videoType,r=t.processId,i=t.categories,a=void 0===i?[]:i,s=t.title,l=t.actionState;if(n===_C.LECTURE&&[_.COMPOSING,_.HOME,_.BRAINHIVE,_.MESSAGES].includes(w))if(o({videoId:r,data:{cognitiveVideo:{status:x.g.COGVID_STATUS.PUBLISHED}}}),r===p)x.r.pause(),e.setState({showInfoModal:{title:s,videoId:p,userScaffId:m}});else if(a.includes(wC[w.toUpperCase()])&&l===AC.CREATING){if([_.BRAINHIVE,_.MESSAGES].includes(w)&&A===EC.RECEIVED)return;g({videoId:r},(function(e){v({videoData:yC(yC({},e),{},{permissions:{VIDEO:{DOANYACTION:!0}}})})}))}n===_C.GALLERY&&f===_C.GALLERY&&w===_.EXPERIENCING&&(d((function(e){h({videoData:e,url:x.g.VIDEO_MENU_BASE_URL.EXPERIENCING,videoType:_C.GALLERY,closeAttachmentReview:!1})})),!0)}))}}})),G()(V()(e),"updateCogvidProgressState",(function(t,n,r){e.props.updateCreatingCogvidProgress(G()({},t,yC(yC({},n),{},{sessionId:t}))).then(r)})),G()(V()(e),"handleItemPause",(function(e){var t=Object(Y.get)(GA.a.getState(),"progress").uploader[e.sessionId]||[];return Promise.all(t.map((function(e){return e.abort()})))})),G()(V()(e),"handleItemResume",(function(t,n){var r=Object(Y.get)(GA.a.getState(),"progress").creatingCogvidProgress[t.sessionId];if(r.status===x.g.PROGRESS_STATUS.PROCESSING){var i=e.props.retryVideoProcessing;r.cogvidId&&i({cogvidId:r.cogvidId},(function(){e.updateCogvidProgressState(t.sessionId,{status:x.g.PROGRESS_STATUS.PROCESSING,isFailed:!1}),n&&n()}),(function(){n&&n()}))}else t.files.filter((function(e){return r[e.metadata.uploadSeqNumber].isFailed})).map((function(n,i){r[n.metadata.uploadSeqNumber].isFailed&&e.updateFileProgress(t.sessionId,n.metadata.uploadSeqNumber,{started:!1,resumed:!0},(function(){return 0===i&&e.checkCogvidFilesUpload(t.sessionId)}),!1)})),n&&n()})),G()(V()(e),"handleFileResume",(function(t,n){var r=t.sessionId,i=e.props,a=i.getUploadingFile,o=i.startACogvidFileUpload,s=Object(Y.get)(GA.a.getState(),"progress"),l=(s.uploader,s.creatingCogvidProgress[r][n]);a({sessionId:r,fileId:l.fileId},(function(t){t&&e.updateFileProgress(r,n,{status:x.g.PROGRESS_STATUS.DONE,isFailed:!1,resumed:!0,now:100})}),(function(){var t=Object(Y.uniq)([].concat(Rl()(l.prevFileIds||[]),[l.fileId]));e.updateFileProgress(r,n,{prevFileIds:t,resumed:!0}),o({sessionId:r,uploadSeqNumber:n})}))})),G()(V()(e),"handleItemCancel",(function(t){var n=Object(Y.get)(GA.a.getState(),"progress").creatingCogvidProgress,r=e.props.deleteCreatingCogvidItem,i=n[t.sessionId];if(i.status===x.g.PROGRESS_STATUS.PROCESSING){var a=e.props.cancelVideoProcessing;i.cogvidId&&a({cogvidId:i.cogvidId,sessionId:t.sessionId}),e.removeCreatingCogvidItem(t.sessionId)}else i.now<100?e.handleItemPause(t).then((function(){r(t),e.removeCreatingCogvidItem(t.sessionId)})):r(t,(function(){e.handleItemPause(t),e.removeCreatingCogvidItem(t.sessionId)}))})),G()(V()(e),"removeCreatingCogvidItem",(function(t){var n=e.props,r=n.creatingCogvidList,i=n.updateCreatingCogvidList,a=n.removeACogvidProgress;i(r.filter((function(e){return e.sessionId!==t}))),a({sessionId:t})})),G()(V()(e),"handleInfoModalClose",(function(){var t=e.props,n=t.getLectureVideo,r=t.updateCogvidListItem,i=t.activeCogvidItem,a=t.videoPreviewData,o=e.state.showInfoModal||{},s=o.videoId,l=o.userScaffId,c=x.c.getCurrentVideoCategory(),u=SC[c.toUpperCase()];e.setState({showInfoModal:null}),s&&n({videoId:s,userScaffId:l,scope:u},(function(e){r({videoId:s,data:yC({},e)}),i({videoData:e,closeAttachmentReview:!1,onlyUpdateData:!!a&&(null==a?void 0:a.uid)!==s})}))})),e}return c()(r,[{key:"render",value:function(){var e=this.props,t=e.creatingCogvidProgress,n=e.totalCogvidProgress,r=this.state,i=r.creatingCogvidList,a=r.showInfoModal;return v.a.createElement(vC,{items:i,itemsProgress:t,totalProgress:n,onItemResume:this.handleItemResume,onItemCancel:this.handleItemCancel,onFileResume:this.handleFileResume,showInfoModal:a,onInfoModalClose:this.handleInfoModalClose})}}]),r}(v.a.Component),TC=Object(K.c)(Object(q.b)((function(e){var t=e.content,n=e.cogvid,r=e.progress;return{creatingCogvidList:t.creatingCogvidList,isUploadingCogvid:r.isUploadingCogvid,currentActiveVideoType:n.cogvidDetails.videoType,uploader:r.uploader,creatingCogvidProgress:r.creatingCogvidProgress,totalCogvidProgress:r.totalCogvidProgress,shouldUpdateProgress:r.shouldUpdateProgress,videoId:n.cogvidDetails.videoId,userScaffId:n.cogvidDetails.userScaffId,transcodingStatus:r.transcodingStatus,cogvidListLv:n.cogvidListLv}}),(function(e){return{addCreatingCogvidItem:function(t){return e(Q.g.addCreatingCogvidItem(t))},updateCreatingCogvidList:function(t){return e(Q.g.updateCreatingCogvidList(t))},deleteCreatingCogvidItem:function(t,n,r){return e(Q.g.deleteCreatingCogvidItem(t,n,r))},cancelVideoProcessing:function(t,n,r){return e(Q.e.cancelVideoProcessing(t,n,r))},retryVideoProcessing:function(t,n,r){return e(Q.e.retryVideoProcessing(t,n,r))},getUploadingFile:function(t,n,r){return e(Q.g.getUploadingFile(t,n,r))},getProcessingCogvidStatusList:function(t,n){return e(Q.e.getProcessingCogvidStatusList(t,n))},updateIsUploadingCogvid:function(t){return e(Q.k.updateIsUploadingCogvid(t))},getGalleryVideo:function(t,n){return e(Q.e.getGalleryVideo(t,n))},updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))},updateCreatingCogvidProgress:function(t){return e(Q.k.updateCreatingCogvidProgress(t)),Promise.resolve()},updateACogvidProgress:function(t){return e(Q.k.updateACogvidProgress(t)),Promise.resolve()},removeACogvidProgress:function(t){return e(Q.k.removeACogvidProgress(t))},updateTotalCogvidProgress:function(t){return e(Q.k.updateTotalCogvidProgress(t))},addUploader:function(t){return e(Q.k.addUploader(t))},startACogvidFileUpload:function(t){return e(Q.k.startACogvidFileUpload(t))},updateCreatingCogvidItem:function(t,n,r){return e(Q.g.updateCreatingCogvidItem(t,n,r))},changeShouldUpdateProgress:function(t){return e(Q.k.changeShouldUpdateProgress(t))},getLectureVideo:function(t,n,r){return e(Q.e.getLectureVideo(t,n,r))},unshiftCogvidList:function(t,n,r){return e(Q.e.unshiftCogvidList(t,n,r))}}}))(CC)),kC=r(76),xC=r.n(kC);var OC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"closeButtonRef",v.a.createRef()),e}return c()(n,[{key:"componentDidMount",value:function(){this.closeButtonRef.current&&this.closeButtonRef.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.header,n=e.title,r=e.message,i=e.onConfirm,a=e.onClose,o=e.show,s=e.icon,l=e.cancelBtnText,c=e.confirmBtnText,u=e.showHeader,d=e.isProgressing,h=e.children;return v.a.createElement(Fl.a,{show:o,centered:!0,backdrop:"static",dialogClassName:xC.a.confirmationDialog,onEscapeKeyDown:a},u&&v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,t||Object(uc.b)("modal.confirmation"))),v.a.createElement(Fl.a.Body,{className:xC.a.modalBody},v.a.createElement("div",{className:"h-100 w-100 d-flex justify-content-center align-items-center"},s&&v.a.createElement("div",{className:"d-flex bg-white mr-4"},s),v.a.createElement("div",{className:P()(!s&&"w-100")},v.a.createElement("div",{className:"u-fs-1x1o6 w-100",dangerouslySetInnerHTML:{__html:n}}),!!r&&v.a.createElement("div",{className:P()("u-fs-1x",!s&&"d-flex justify-content-center"),dangerouslySetInnerHTML:{__html:r}}),h))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button",onClick:a,disabled:d},l),v.a.createElement(et.a,{variant:"outline-secondary",className:"modal-button ml-4",onClick:i,disabled:d},c,d&&v.a.createElement(xn.a,{size:"sm",animation:"border",className:"ml-2"}))))}}]),n}(v.a.Component);OC.propTypes={icon:ne.a.node,header:ne.a.string,title:ne.a.string,message:ne.a.string,onConfirm:ne.a.func,onClose:ne.a.func,show:ne.a.bool,isProgressing:ne.a.bool,cancelBtnText:ne.a.string,confirmBtnText:ne.a.string,showHeader:ne.a.bool},OC.defaultProps={onConfirm:function(){},onClose:function(){},show:!1,showHeader:!0,isProgressing:!1,icon:v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-3 text-secondary"}),cancelBtnText:Object(uc.b)("btn.no"),confirmBtnText:Object(uc.b)("btn.yes")};var IC=OC;var MC=x.g.SEARCH_PARAM,PC=x.g.PRODUCT_TYPE,DC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{show:!1,items:[],isLoading:!1,orderId:"",orderTotal:"",orderType:PC.RESOURCE}),G()(V()(e),"componentDidMount",(function(){var t=new URLSearchParams(window.location.search),n=t.get(MC.KEY.POPUP),r=t.get(MC.KEY.ORDER_ID),i=t.get(MC.KEY.ORDER_TOTAL),a=t.get(MC.KEY.USER_ID),o=t.get(MC.KEY.ORDER_TYPE);if(n===MC.VALUE.PAYMENT_SUCCESS&&r&&i&&a){var s=i.match(/(\d+)/);s&&Number(s[0]),PC.SUBSCRIPTION===o?x.b.reportCompleteSubscriptionDesktop(r,i):PC.LIVECLASS===o?x.b.reportCompletePurchaseClassDesktop(r,i):x.b.reportCompletePurchaseResourcesDesktop(r,i),x.c.removeURLSearchParams([MC.KEY.POPUP,MC.KEY.ORDER_ID,MC.KEY.ORDER_TOTAL,MC.KEY.USER_ID,MC.KEY.ORDER_TYPE],!0),x.c.isCurrentUserId(a)&&e.setState({show:!0,orderId:r,orderTotal:i,orderType:o},e.initialData)}})),G()(V()(e),"initialData",(function(){var t=e.props.getDownloadResources,n=e.state,r=n.orderId;n.orderType===PC.RESOURCE&&(e.setState({isLoading:!0}),t({orderId:r},(function(t){e.setState({items:t,isLoading:!1})}),(function(t){e.setState({isLoading:!1})})))})),G()(V()(e),"handleClose",(function(){return e.setState({show:!1})})),G()(V()(e),"handleItemClick",(function(e){x.c.download({url:e.url,name:e.filename})})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.show,r=t.items,i=t.orderId,a=t.orderTotal,o=t.orderType;if(!n)return null;var s=o!==PC.RESOURCE;return v.a.createElement(Fl.a,{show:n,centered:!0,backdrop:"static",dialogClassName:xC.a.paymentSuccessDialog,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Body,{className:"px-5 pt-5 pb-4"},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:"u-w-4"},v.a.createElement("i",{className:"fv fuvi-check u-fs-3 text-primary"})),v.a.createElement("div",{className:"u-fs-1x1o2 u-ws-pre-line"},Object(uc.b)("modal.paymentSuccessTitle"))),v.a.createElement("div",{className:"d-flex align-items-center mt-4 py-3 u-pl-4 u-fs-1x1o8 u-bg-body u-border-radius-1o3"},v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",{className:"u-fw-600 mr-1"},Object(uc.b)("orderId"),":"),v.a.createElement("div",{className:"u-opacity-80 u-fw-bold"},i)),v.a.createElement("div",{className:"d-flex ml-5"},v.a.createElement("div",{className:"u-fw-600 mr-1"},Object(uc.b)("orderTotal"),":"),v.a.createElement("div",{className:"text-secondary"},Number.isNaN(Number(a))?a:x.c.formatMoney(a)))),v.a.createElement("div",{className:"mt-4 u-ws-pre-line"},s?Object(uc.b)("modal.paymentVideoSuccessMessage"):v.a.createElement("div",{className:"pl-4"},v.a.createElement("div",null,Object(uc.b)("modal.paymentResourceSuccessMessage1")),v.a.createElement("div",{className:"mb-2 u-fs-7o8 u-opacity-80"},Object(uc.b)("modal.paymentResourceSuccessMessage2")),r.map((function(t,n){return v.a.createElement("div",{key:n,className:"u-pl-3"},v.a.createElement("div",{title:t.filename,className:"link-button u-text-dark-blue",onClick:function(n){n.preventDefault(),e.handleItemClick(t)}},t.filename))})),v.a.createElement("div",{className:"mt-5 text-center"},Object(uc.b)("modal.paymentResourceSuccessMessage3"))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"u-fs-7o8"},Object(uc.b)("modal.paymentSuccessNote"),v.a.createElement("a",{href:"#"},"contact@fuvi.us"),"."),v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"primary",className:"modal-button text-white",onClick:this.handleClose},Object(uc.b)("btn.close"))))}}]),n}(v.a.Component),NC=Object(q.b)(null,(function(e){return{getDownloadResources:function(t,n,r){return e(Q.e.getDownloadResources(t,n,r))}}}))(DC);var LC=x.g.SEARCH_PARAM,RC=x.g.PRODUCT_TYPE,BC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{show:!1}),G()(V()(e),"componentDidMount",(function(){var t=new URLSearchParams(window.location.search),n=t.get(LC.KEY.POPUP),r=t.get(LC.KEY.USER_ID),i=t.get(LC.KEY.ORDER_ID),a=t.get(LC.KEY.ORDER_TYPE);if(n===x.g.SEARCH_PARAM.VALUE.PAYMENT_CANCEL&&r){a===RC.SUBSCRIPTION?x.b.reportIncompleteSubscriptionDesktop(i):x.b.reportIncompletePurchaseDesktop(i);var o=e.props.removeOrder;x.c.removeURLSearchParams([LC.KEY.POPUP,LC.KEY.ORDER_ID,LC.KEY.ORDER_TYPE,LC.KEY.USER_ID,LC.KEY.RESOURCE_ID],!0),x.c.isCurrentUserId(r)&&e.setState({show:!0}),o({orderId:i})}})),G()(V()(e),"handleClose",(function(){return e.setState({show:!1})})),e}return c()(n,[{key:"render",value:function(){var e=this.state.show;return e?v.a.createElement(Fl.a,{show:e,centered:!0,backdrop:"static",dialogClassName:xC.a.paymentSuccessDialog,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Body,{className:"p-5"},v.a.createElement("div",{className:"d-flex justify-content-center align-items-center"},v.a.createElement("i",{className:"fv fuvi-delete u-fs-2 text-secondary"}),v.a.createElement("div",{className:"ml-4 u-fs-1x1o2 u-ws-pre-line"},Object(uc.b)("modal.paymentCancelMessage")))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{variant:"primary",className:"modal-button text-white",onClick:this.handleClose},Object(uc.b)("btn.close")))):null}}]),n}(v.a.Component),jC=Object(q.b)(null,(function(e){return{removeOrder:function(t,n,r){return e(Q.c.removeOrder(t,n,r))}}}))(BC);var FC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.show,n=e.header,r=e.onCancel,i=e.cancelTitle,a=e.onConfirm,o=e.submitTitle,s=e.content,l=e.size,c=e.animation,u=e.onClose,d=e.centered,h=v.a.isValidElement(s);return v.a.createElement("div",{onKeyDown:function(e){return e.stopPropagation()},onClick:function(e){return e.stopPropagation()}},v.a.createElement(Fl.a,{size:l,show:t,animation:c,onHide:u,centered:d,onClick:function(e){return e.stopPropagation()}},n&&v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,{className:"d-flex justify-content-between w-100"},v.a.createElement("div",{className:"".concat(Zl.a.formTitle)},n),u&&v.a.createElement("div",{className:"close-modal-btn",onClick:u,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"})))),v.a.createElement(Fl.a.Body,null,h?s:v.a.createElement("div",{className:"u-ws-pre-wrap",dangerouslySetInnerHTML:{__html:s}})),v.a.createElement(Fl.a.Footer,null,r&&v.a.createElement(et.a,{className:"modal-button",variant:"secondary",onClick:r},i),a&&v.a.createElement(et.a,{className:"modal-button",variant:"primary",onClick:a},o))))}}]),n}(g.Component);FC.propTypes={submitTitle:ne.a.string,cancelTitle:ne.a.string,header:ne.a.string,content:ne.a.oneOfType([ne.a.string,ne.a.node]),onCancel:ne.a.func,onConfirm:ne.a.func,size:ne.a.oneOf(["sm","md","lg","xl"]),closeButton:ne.a.func,animation:ne.a.bool,centered:ne.a.bool},FC.defaultProps={submitTitle:Object(uc.b)("btn.ok"),cancelTitle:Object(uc.b)("btn.cancel"),content:"",animation:!0,centered:!1,onConfirm:function(){}};var UC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"closeButtonRef",v.a.createRef()),e}return c()(n,[{key:"componentDidMount",value:function(){this.closeButtonRef.current&&this.closeButtonRef.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.message,r=e.onClose,i=e.show,a=e.icon,o=e.closeBtnText,s=e.isProgressing;return v.a.createElement(Fl.a,{show:i,centered:!0,backdrop:"static",dialogClassName:xC.a.confirmationDialog,onEscapeKeyDown:r},v.a.createElement(Fl.a.Body,{className:"p-5"},v.a.createElement("div",{className:"h-100 w-100 d-flex justify-content-center"},a&&v.a.createElement("div",{className:"d-flex bg-white mr-4"},a),v.a.createElement("div",{className:P()(!a&&"w-100")},v.a.createElement("div",{className:"u-fs-1x1o4 w-100",dangerouslySetInnerHTML:{__html:t}}),!!n&&v.a.createElement("div",{className:P()("u-fs-1x",!a&&"d-flex justify-content-center")},n)))),v.a.createElement(Fl.a.Footer,{className:"justify-content-center"},v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button",onClick:r,disabled:s},o,s&&v.a.createElement(xn.a,{size:"sm",animation:"border",className:"ml-2"}))))}}]),n}(v.a.Component);UC.propTypes={icon:ne.a.node,title:ne.a.string,show:ne.a.bool,isProgressing:ne.a.bool,closeBtnText:ne.a.string,onClose:ne.a.func},UC.defaultProps={show:!1,isProgressing:!1,icon:v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-3 text-primary"}),closeBtnText:Object(uc.b)("btn.ok"),onClose:function(){}};var HC=UC;var zC=x.g.EXTRACT_CHAPTER_TYPE,VC=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"closeButtonRef",v.a.createRef()),G()(V()(e),"state",{extractChapterType:zC.BRAINHIVE_VIDEO}),e}return c()(n,[{key:"componentDidMount",value:function(){this.closeButtonRef.current&&this.closeButtonRef.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.message,r=e.onConfirm,i=e.onClose,a=e.icon,o=e.isProgressing,s=e.isSubmittingForm,l=this.state.extractChapterType;return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",dialogClassName:xC.a.confirmationDialog,onEscapeKeyDown:i},s&&v.a.createElement(Nn,null),v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,Object(uc.b)("modal.confirmation"))),v.a.createElement(Fl.a.Body,{className:P()(xC.a.modalBody,"flex-column")},v.a.createElement("div",{className:"h-100 w-100 d-flex justify-content-center"},v.a.createElement("div",{className:"d-flex bg-white mr-4 mt-2"},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-3 text-secondary"})),v.a.createElement("div",null,v.a.createElement("div",{className:"u-fs-1x1o8 w-100",dangerouslySetInnerHTML:{__html:t}}),v.a.createElement("div",{className:P()("u-fs-1x",!a&&"d-flex justify-content-center"),dangerouslySetInnerHTML:{__html:n}})))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button",onClick:i,disabled:o},Object(uc.b)("btn.cancel")),v.a.createElement(et.a,{variant:"outline-secondary",className:"modal-button ml-4",onClick:function(){return r(l)},disabled:o},Object(uc.b)("btn.ok"),o&&v.a.createElement(xn.a,{size:"sm",animation:"border",className:"ml-2"}))))}}]),n}(v.a.Component);VC.propTypes={title:ne.a.string,message:ne.a.string,onConfirm:ne.a.func,onClose:ne.a.func,show:ne.a.bool,isProgressing:ne.a.bool},VC.defaultProps={onConfirm:function(){},onClose:function(){},show:!1,isProgressing:!1};var WC=x.g.SHARE_VIDEO_SEARCH_PEOPLE_LIMIT;function GC(e){var t=e.item,n=t.avatar;return v.a.createElement("span",{id:t.uid,className:xC.a.suggestionItem},v.a.createElement("img",{src:n,className:xC.a.suggestionAvatar}),v.a.createElement("span",null,t.name))}function qC(e){var t=e.tag,n=(e.removeButtonText,e.onDelete),r=t.name,i=t.avatar;return v.a.createElement("div",{onClick:n,className:xC.a.tagItem},v.a.createElement("img",{src:i,className:xC.a.tagAvatar}),v.a.createElement("span",{className:P()(xC.a.tagLabel,"text-truncate")},r),v.a.createElement("i",{className:"fv fuvi-delete text-danger ml-2"}))}var YC=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{showConfirmationModal:!1,isSubmitting:!1,searchingFriendResults:[],tags:[]}),G()(V()(e),"shouldComponentUpdate",(function(t,n){var r={},i={};return Object.keys(e.props).forEach((function(n){"function"!=typeof e.props[n]&&"coverImage"!==n&&(r[n]=e.props[n],i[n]=t[n])})),!Object(Y.isEqual)(r,i)||!Object(Y.isEqual)(n,e.state)})),G()(V()(e),"handleFormCancel",(function(){e.setState({tags:[]},(function(){return e.props.onClose()}))})),G()(V()(e),"handleDelete",(function(){e.setState({tags:[]})})),G()(V()(e),"handleChangeMemberShip",(function(){e.setState({isSubmitting:!0,showConfirmationModal:!1},(function(){var n=e.state.tags,r=e.props.data,i=n[0],a=r.uid;e.props.changeOwnerShip({videoId:a,newOwner:i},(function(){e.setState({isSubmitting:!1},(function(){return e.props.onClose()})),x.e.success(t("message.changeOwnerShipSuccess",{name:i.name}))}),(function(){e.setState({isSubmitting:!1})}))}))})),G()(V()(e),"handleSuggestionSelect",(function(t){e.setState({tags:[t]})})),G()(V()(e),"handleSearchPeople",Object(Y.debounce)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.props.searchFriends;e.setState({searchingFriendResults:[]},(function(){n({names:t,pageSize:WC},(function(t){var n=t.content.flatMap((function(e){var t=e.avatar,n=(t=void 0===t?{}:t).image,r=e.firstName,i=void 0===r?"":r,a=e.lastName,o=void 0===a?"":a,s=e.userId,l="".concat(i," ").concat(o);return[{avatar:n||I.a.noAvatar,fullName:l,userId:s,label:l,uid:s,name:l}]}));e.setState({searchingFriendResults:n.slice(0,5)})}))}))}),300)),e}return c()(r,[{key:"render",value:function(){var e,n=this,r=this.state,i=r.searchingFriendResults,a=r.showConfirmationModal,o=r.tags,s=r.isSubmitting,l=this.props.show;return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:l,className:"shareVideoWrapper",centered:!0,backdrop:"static",onEscapeKeyDown:this.handleFormCancel},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,t("changeOwnerShip.modalTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,null,v.a.createElement("div",{className:xC.a.ownerShipModal},v.a.createElement(sd,{labelName:t("changeOwnerShip.label"),className:P()(xC.a.leftItem),placeholderText:o.length?"":t("changeOwnerShip.placeHolder"),tags:o,suggestions:i,onInput:this.handleSearchPeople,onFocus:this.handleSearchPeople,onAddition:this.handleSuggestionSelect,onDelete:this.handleDelete,suggestionComponent:GC,tagComponent:qC,searchInputClassName:!!o.length&&"d-none"}))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100 justify-content-end"},v.a.createElement(et.a,{variant:"primary",className:P()(xC.a.footerBtn,"modal-button mr-3"),onClick:this.handleFormCancel},t("btn.cancel")),v.a.createElement(et.a,{variant:"secondary",className:P()(xC.a.footerBtn,"modal-button"),onClick:function(){return n.setState({showConfirmationModal:!0})},disabled:!o.length},s?t("btn.changing"):t("btn.change"))))),v.a.createElement(IC,{show:!!a,message:t("changeOwnerShip.informDescription",{userName:null===(e=o[0])||void 0===e?void 0:e.name}),onConfirm:this.handleChangeMemberShip,onClose:function(){return n.setState({showConfirmationModal:!1})}}))}}]),r}(g.Component),KC=Object(q.b)(null,(function(e){return{searchFriends:function(t,n,r){return e(Q.i.searchFriends2(t,n,r))},changeOwnerShip:function(t,n,r){return e(Q.e.changeOwnerShip(t,n,r))}}}))(YC);function XC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function QC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XC(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $C=x.g.SCOPE_CHAPTER_STATUS,JC=x.g.SCOPE_COGVID_STATUS;function ZC(e){var t,n=e.data,r=e.onCheck,i=e.checked,a=n.userProfile,o=n.roleDescription;return v.a.createElement("div",{className:P()("d-flex align-items-center",xC.a.memberItem),onClick:function(){return r(a.userId)}},v.a.createElement(_u,{label:"",className:P()(),type:"checkbox",checked:i,onChange:function(){}}),v.a.createElement("img",{src:(null==a?void 0:null===(t=a.avatar)||void 0===t?void 0:t.image)||I.a.noAvatar,className:P()(xC.a.memberItemAvatar,"mr-3"),alt:""}),v.a.createElement("div",{style:{minWidth:0}},v.a.createElement("div",{className:"text-truncate"},null==a?void 0:a.fullName),v.a.createElement("div",{className:"text-primary"},v.a.createElement("small",null,v.a.createElement("em",null,o)))))}var eT=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{chapterStatus:"",selectedMembers:[],isUpdatingChapterPrivacy:!1,memberSearch:""}),G()(V()(e),"handleFormCancel",(function(){e.props.onClose(),e.setState({chapterStatus:"",selectedMembers:[]})})),G()(V()(e),"handleChangeChapterPolicyStatus",(function(t){e.setState({chapterStatus:t.target.name})})),G()(V()(e),"handleChangeShareMambers",(function(t){var n=e.state.selectedMembers.map((function(e){return(null==e?void 0:e.userProfile.userId)===t?QC(QC({},e),{},{shared:!e.shared}):e}));e.setState({selectedMembers:n})})),G()(V()(e),"handleSubmitShare",(function(){var t=e.state,n=t.selectedMembers,r=void 0===n?[]:n,i=t.chapterStatus,a=e.props,o=a.setPrivacyChapter,s=a.data,l=s.chapterData,c=s.videoId,u=[];i===$C.PROTECTED&&r.map((function(e){e.shared&&u.push(e.userProfile.userId)})),e.setState({isUpdatingChapterPrivacy:!0},(function(){o({videoId:c,chapterData:l,selectedUserIds:u,visibilityScope:i},(function(){e.props.onClose(),e.setState({chapterStatus:"",isUpdatingChapterPrivacy:!1,selectedMembers:[]})}),(function(){e.setState({isUpdatingChapterPrivacy:!1})}))}))})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.chapterStatus,r=t.selectedMembers,i=void 0===r?[]:r,a=t.isUpdatingChapterPrivacy,o=t.memberSearch,s=this.props.cognitiveVideo,l=this.props.show,c=[$C.PRIVATE,$C.PUBLIC].includes(n),u=(null==s?void 0:s.visibilityScope)===JC.PUBLIC;return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:l,backdrop:"static",onEscapeKeyDown:this.handleFormCancel},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,Object(_t.t)("modal.chapterSetPrivacyHeader")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,null,v.a.createElement("div",{className:"p-3"},v.a.createElement("div",{style:{lineHeight:2},dangerouslySetInnerHTML:{__html:Object(_t.t)("modal.chapterSetPrivacyDesc")}}),v.a.createElement("div",{className:P()("pb-3",xC.a.radioGroupWrap)},v.a.createElement(_u,{className:"mt-3",labelName:Object(_t.t)("chaptersPrivacyPrivate"),type:"radio",id:$C.PRIVATE,name:$C.PRIVATE,checked:n===$C.PRIVATE,onChange:this.handleChangeChapterPolicyStatus,disabled:u}),v.a.createElement(_u,{className:"mt-3",labelName:Object(_t.t)("chaptersPrivacyPublic"),type:"radio",id:$C.PUBLIC,name:$C.PUBLIC,checked:n===$C.PUBLIC,onChange:this.handleChangeChapterPolicyStatus}),v.a.createElement(_u,{className:"mt-3",labelName:Object(_t.t)("chaptersPrivacyProtected"),type:"radio",id:$C.PROTECTED,name:$C.PROTECTED,checked:n===$C.PROTECTED,onChange:this.handleChangeChapterPolicyStatus,disabled:u})),!!i.length&&!c&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"pt-3 border-top position-relative"},v.a.createElement(mu,{className:P()(xC.a.inputSearchMembers,"mb-0"),placeholder:Object(_t.t)("SearchVideoMember"),disabled:c,value:o,onChange:function(t){return e.setState({memberSearch:t.target.value})}}),!!o&&v.a.createElement("i",{className:P()("fv fuvi-delete",xC.a.clearSearch),onClick:function(){return e.setState({memberSearch:""})}})))),!c&&v.a.createElement(v.a.Fragment,null,i.length?v.a.createElement(Lb,{className:P()("fv-smooth-scroll fv-always-show-tracks y autoshow-scrollbar",c&&xC.a.disabled),containerClassName:xC.a.memberListWrap},v.a.createElement("div",{className:"pb-3 pl-3 pr-3"},i.map((function(t,n){var r,i=(null===(r=t.userProfile)||void 0===r?void 0:r.fullName.toLocaleUpperCase())||[],a=o.toLocaleUpperCase().trim();return i.includes(a)?v.a.createElement(ZC,{key:n,data:t,onCheck:e.handleChangeShareMambers,checked:t.shared}):null})))):v.a.createElement("div",{className:"text-center pb-3 pl-3 pr-3"},v.a.createElement("i",null,Object(_t.t)("noMembers"))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100 justify-content-end"},v.a.createElement(et.a,{variant:"primary",className:P()(xC.a.footerBtn,"modal-button mr-3"),onClick:this.handleFormCancel},Object(_t.t)("btn.cancel")),v.a.createElement(et.a,{variant:"secondary",className:P()(xC.a.footerBtn,"modal-button"),onClick:this.handleSubmitShare,disabled:a},a?Object(_t.t)("btn.submiting"):Object(_t.t)("btn.submit"))))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.selectedMembers,r=void 0===n?[]:n,i=t.chapterStatus,a=void 0===i?"":i,o=e.data,s=o.members,l=void 0===s?[]:s,c=o.chapterData,u=void 0===c?{}:c;return!(r.length!=l.length||!a)||{selectedMembers:l,chapterStatus:u.visibilityScope}}}]),n}(g.Component),tT=Object(q.b)(null,(function(e){return{setPrivacyChapter:function(t,n,r){return e(Q.e.setPrivacyChapter(t,n,r))}}}))(eT);var nT=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handleClose",(function(){e.props.displayRequirePurchaseModal(!1)})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.show,n=e.userId;return t&&n?v.a.createElement(Fl.a,{show:t,centered:!0,backdrop:"static",dialogClassName:xC.a.requirePurchaseDialog,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Body,{className:"p-5"},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("i",{className:P()(xC.a.icon,"fv fuvi-exclamation")}),v.a.createElement("div",{className:"ml-4 u-fs-1x1o4 u-ws-pre-line"},Object(uc.b)("modal.requirePurchaseMessage")))),v.a.createElement(Fl.a.Footer,{className:"justify-content-center"},v.a.createElement(et.a,{variant:"primary",className:"modal-button text-white",onClick:this.handleClose},Object(uc.b)("btn.ok")))):null}}]),n}(v.a.Component);Object(q.b)((function(e){var t=e.cogvid,n=e.auth;return{show:t.showRequirePurchaseModal,userId:n.userInfo.userId}}),(function(e){return{displayRequirePurchaseModal:function(t,n,r){return e(Q.e.displayRequirePurchaseModal(t,n,r))}}}))(nT);var rT=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{showTermsAndConditions:!1,showPrivacyAndPolicies:!1,termsOfUse:"",privacyPolicy:"",clientHeight:768,clientWidth:1024}),G()(V()(e),"termScrollRef",v.a.createRef()),G()(V()(e),"privacyScrollRef",v.a.createRef()),G()(V()(e),"componentWillUnmount",(function(){window.removeEventListener("hashchange",e.handleHashChange)})),G()(V()(e),"handleHashChange",(function(){location.hash===x.g.TERM_OF_USE_HASH?e.setState({showTermsAndConditions:!0,showPrivacyAndPolicies:!1}):location.hash===x.g.PRIVACY_HASH&&e.setState({showTermsAndConditions:!1,showPrivacyAndPolicies:!0});var t,n,r,i,a,o,s,l,c,u,d,h,f=window.location.hash.substring(1),p=document.getElementById(f),m=e.state,g=m.showTermsAndConditions,v=m.showPrivacyAndPolicies;p&&g&&(null===(t=e.termScrollRef)||void 0===t||null===(n=t.current)||void 0===n||null===(r=n.scrollbar)||void 0===r||r.scrollIntoView(p,{offsetTop:-(null===(i=e.termScrollRef)||void 0===i?void 0:null===(a=i.current)||void 0===a?void 0:null===(o=a.scrollbar)||void 0===o?void 0:o.containerEl.scrollTop)}));p&&v&&(null===(s=e.privacyScrollRef)||void 0===s||null===(l=s.current)||void 0===l||null===(c=l.scrollbar)||void 0===c||c.scrollIntoView(p,{offsetTop:-(null===(u=e.privacyScrollRef)||void 0===u?void 0:null===(d=u.current)||void 0===d?void 0:null===(h=d.scrollbar)||void 0===h?void 0:h.containerEl.scrollTop)}))})),G()(V()(e),"handleModalClose",(function(){e.setState({showTermsAndConditions:!1,showPrivacyAndPolicies:!1}),history.replaceState(null,document.title,location.pathname+location.search)})),e}return c()(r,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.showCart,r=t.showRegisterModal,i=t.getTermsOfUse,a=t.getPrivacyPolicy;i(null,(function(t){e.setState({termsOfUse:t})})),a(null,(function(t){e.setState({privacyPolicy:t})})),window.addEventListener("hashchange",this.handleHashChange),(n||r)&&this.handleHashChange()}},{key:"render",value:function(){var e=this.props,n=e.showLoginModal,r=e.showRegisterModal,i=e.showActivationModal,a=this.state,o=a.showTermsAndConditions,s=a.showPrivacyAndPolicies,l=a.termsOfUse,c=a.privacyPolicy;return v.a.createElement(v.a.Fragment,null,n.show&&v.a.createElement(LR,n),r&&v.a.createElement(Poe,r),i&&v.a.createElement(cse,null),v.a.createElement(Fl.a,{show:o,backdrop:!0,onHide:this.handleModalClose,className:"termsAndConditionsModalWrap"},v.a.createElement(Fl.a.Header,{closeButton:!0},v.a.createElement(Fl.a.Title,null,t("termsAndConditions"))),v.a.createElement(Fl.a.Body,null,v.a.createElement("div",{className:"html-view",style:{height:"70vh"}},v.a.createElement(Lb,{alwaysShowTracks:!0,ref:this.termScrollRef,className:"h-100 u-smooth-scroll"},v.a.createElement("div",{dangerouslySetInnerHTML:{__html:l}})))),v.a.createElement(Fl.a.Footer,{className:"justify-content-end"},v.a.createElement(et.a,{variant:"primary",className:"text-white modal-button",onClick:this.handleModalClose},t("btn.close")))),v.a.createElement(Fl.a,{show:s,backdrop:!0,onHide:this.handleModalClose,className:"termsAndConditionsModalWrap"},v.a.createElement(Fl.a.Header,{closeButton:!0},v.a.createElement(Fl.a.Title,null,t("privacyPolicies"))),v.a.createElement(Fl.a.Body,null,v.a.createElement("div",{className:"html-view",style:{height:"70vh"}},v.a.createElement(Lb,{alwaysShowTracks:!0,ref:this.privacyScrollRef,className:"h-100 u-smooth-scroll"},v.a.createElement("div",{dangerouslySetInnerHTML:{__html:c}})))),v.a.createElement(Fl.a.Footer,{className:"justify-content-end"},v.a.createElement(et.a,{variant:"primary",className:"text-white modal-button",onClick:this.handleModalClose},t("btn.close")))))}}]),r}(v.a.Component),iT=Object(q.b)((function(e){var t=e.auth,n=e.cart;return{showLoginModal:t.showLoginModal,showRegisterModal:t.showRegisterModal,showActivationModal:t.showActivationModal,showCart:n.isOpen}}),(function(e){return{getTermsOfUse:function(t,n,r){return e(Q.a.getTermsOfUse(t,n,r))},getPrivacyPolicy:function(t,n,r){return e(Q.a.getPrivacyPolicy(t,n,r))}}}))(rT),aT=function(e){var t=e.title,n=e.urls,r=void 0===n?[]:n,i=e.onClose,a=Object(g.useState)(r[0]),o=pi()(a,2),s=o[0],l=o[1],c=".pdf"==x.c.getFileExtension(new URL(s).pathname).toLowerCase();return v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",xC.a.previewModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:i},v.a.createElement(Qt,{className:xC.a.closeBtn,classNameContainer:"m-0",onClick:i},v.a.createElement("i",{className:"fv fuvi-delete text-white u-fs-1x1o2"})),r.length>1&&v.a.createElement("div",{className:P()(xC.a.urlBtnWrapper,"fv-custom-scroll")},r.map((function(e,t){return v.a.createElement("div",{key:e,className:P()(xC.a.urlBtn,s===e&&xC.a.active),onClick:function(){l(e)}},t+1)}))),v.a.createElement(Fl.a.Body,{className:P()(xC.a.modalBody,!c&&xC.a.imageWrapper)},c?v.a.createElement("iframe",{className:"w-100 h-100",title:t,src:s}):v.a.createElement("img",{alt:"preview image",src:s})))},oT=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function sT(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=oT.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var lT=[".DS_Store","Thumbs.db"];function cT(e){return lv(this,void 0,void 0,(function(){return cv(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?dT(e.dataTransfer,e.type):uT(e))];var n}))}))}function uT(e){return(null!==e.target&&e.target.files?fT(e.target.files):[]).map((function(e){return sT(e)}))}function dT(e,t){return lv(this,void 0,void 0,(function(){var n;return cv(this,(function(r){switch(r.label){case 0:return e.items?(n=fT(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(pT))]):[3,2];case 1:return[2,hT(mT(r.sent()))];case 2:return[2,hT(fT(e.files).map((function(e){return sT(e)})))]}}))}))}function hT(e){return e.filter((function(e){return-1===lT.indexOf(e.name)}))}function fT(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function pT(e){if("function"!=typeof e.webkitGetAsEntry)return gT(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?bT(t):gT(e)}function mT(e){return e.reduce((function(e,t){return function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(uv(arguments[t]));return e}(e,Array.isArray(t)?mT(t):[t])}),[])}function gT(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=sT(t);return Promise.resolve(n)}function vT(e){return lv(this,void 0,void 0,(function(){return cv(this,(function(t){return[2,e.isDirectory?bT(e):yT(e)]}))}))}function bT(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function i(){var a=this;t.readEntries((function(t){return lv(a,void 0,void 0,(function(){var a,o,s;return cv(this,(function(l){switch(l.label){case 0:if(t.length)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=l.sent(),e(a),[3,4];case 3:return o=l.sent(),n(o),[3,4];case 4:return[3,6];case 5:s=Promise.all(t.map(vT)),r.push(s),i(),l.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function yT(e){return lv(this,void 0,void 0,(function(){return cv(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=sT(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var AT=r(1030),_T=r.n(AT);function wT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ET=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:"file-invalid-type",message:"File type must be ".concat(t)}},ST=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," bytes")}},CT=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," bytes")}},TT={code:"too-many-files",message:"Too many files"};function kT(e,t){var n="application/x-moz-file"===e.type||_T()(e,t);return[n,n?null:ET(t)]}function xT(e,t,n){if(OT(e.size))if(OT(t)&&OT(n)){if(e.size>n)return[!1,ST(n)];if(e.size<t)return[!1,CT(t)]}else{if(OT(t)&&e.size<t)return[!1,CT(t)];if(OT(n)&&e.size>n)return[!1,ST(n)]}return[!0,null]}function OT(e){return null!=e}function IT(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize;return!(!e.multiple&&t.length>1)&&t.every((function(e){var t=wT(kT(e,n),1)[0],a=wT(xT(e,r,i),1)[0];return t&&a}))}function MT(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function PT(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function DT(e){e.preventDefault()}function NT(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function LT(e){return-1!==e.indexOf("Edge/")}function RT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return NT(e)||LT(e)}function BT(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some((function(t){return!MT(e)&&t&&t.apply(void 0,[e].concat(r)),MT(e)}))}}function jT(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function FT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function UT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UT(n,!0).forEach((function(t){zT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UT(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VT(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var WT=Object(g.forwardRef)((function(e,t){var n=e.children,r=qT(VT(e,["children"])),i=r.open,a=VT(r,["open"]);return Object(g.useImperativeHandle)(t,(function(){return{open:i}}),[i]),v.a.createElement(g.Fragment,null,n(HT({},a,{open:i})))}));WT.displayName="Dropzone",WT.propTypes={children:ne.a.func,accept:ne.a.oneOfType([ne.a.string,ne.a.arrayOf(ne.a.string)]),multiple:ne.a.bool,preventDropOnDocument:ne.a.bool,noClick:ne.a.bool,noKeyboard:ne.a.bool,noDrag:ne.a.bool,noDragEventsBubbling:ne.a.bool,minSize:ne.a.number,maxSize:ne.a.number,disabled:ne.a.bool,getFilesFromEvent:ne.a.func,onFileDialogCancel:ne.a.func,onDragEnter:ne.a.func,onDragLeave:ne.a.func,onDragOver:ne.a.func,onDrop:ne.a.func,onDropAccepted:ne.a.func,onDropRejected:ne.a.func};var GT={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function qT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accept,n=e.disabled,r=void 0!==n&&n,i=e.getFilesFromEvent,a=void 0===i?cT:i,o=e.maxSize,s=void 0===o?1/0:o,l=e.minSize,c=void 0===l?0:l,u=e.multiple,d=void 0===u||u,h=e.onDragEnter,f=e.onDragLeave,p=e.onDragOver,m=e.onDrop,v=e.onDropAccepted,b=e.onDropRejected,y=e.onFileDialogCancel,A=e.preventDropOnDocument,_=void 0===A||A,w=e.noClick,E=void 0!==w&&w,S=e.noKeyboard,C=void 0!==S&&S,T=e.noDrag,k=void 0!==T&&T,x=e.noDragEventsBubbling,O=void 0!==x&&x,I=Object(g.useRef)(null),M=Object(g.useRef)(null),P=Object(g.useReducer)(YT,GT),D=FT(P,2),N=D[0],L=D[1],R=N.isFocused,B=N.isFileDialogActive,j=N.draggedFiles,F=Object(g.useCallback)((function(){M.current&&(L({type:"openDialog"}),M.current.value=null,M.current.click())}),[L]),U=function(){B&&setTimeout((function(){M.current&&(M.current.files.length||(L({type:"closeDialog"}),"function"==typeof y&&y()))}),300)};Object(g.useEffect)((function(){return window.addEventListener("focus",U,!1),function(){window.removeEventListener("focus",U,!1)}}),[M,B,y]);var H=Object(g.useCallback)((function(e){I.current&&I.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),F()))}),[I,M]),z=Object(g.useCallback)((function(){L({type:"focus"})}),[]),V=Object(g.useCallback)((function(){L({type:"blur"})}),[]),W=Object(g.useCallback)((function(){E||(RT()?setTimeout(F,0):F())}),[M,E]),G=Object(g.useRef)([]),q=function(e){I.current&&I.current.contains(e.target)||(e.preventDefault(),G.current=[])};Object(g.useEffect)((function(){return _&&(document.addEventListener("dragover",DT,!1),document.addEventListener("drop",q,!1)),function(){_&&(document.removeEventListener("dragover",DT),document.removeEventListener("drop",q))}}),[I,_]);var Y=Object(g.useCallback)((function(e){e.preventDefault(),e.persist(),ee(e),G.current=[].concat(jT(G.current),[e.target]),PT(e)&&Promise.resolve(a(e)).then((function(t){MT(e)&&!O||(L({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),h&&h(e))}))}),[a,h,O]),K=Object(g.useCallback)((function(e){if(e.preventDefault(),e.persist(),ee(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return PT(e)&&p&&p(e),!1}),[p,O]),X=Object(g.useCallback)((function(e){e.preventDefault(),e.persist(),ee(e);var t=G.current.filter((function(e){return I.current&&I.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),G.current=t,t.length>0||(L({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),PT(e)&&f&&f(e))}),[I,f,O]),Q=Object(g.useCallback)((function(e){e.preventDefault(),e.persist(),ee(e),G.current=[],PT(e)&&Promise.resolve(a(e)).then((function(n){if(!MT(e)||O){var r=[],i=[];n.forEach((function(e){var n=FT(kT(e,t),2),a=n[0],o=n[1],l=FT(xT(e,c,s),2),u=l[0],d=l[1];if(a&&u)r.push(e);else{var h=[o,d].filter((function(e){return e}));i.push({file:e,errors:h})}})),!d&&r.length>1&&(r.forEach((function(e){i.push({file:e,errors:[TT]})})),r.splice(0)),L({acceptedFiles:r,fileRejections:i,type:"setFiles"}),m&&m(r,i,e),i.length>0&&b&&b(i,e),r.length>0&&v&&v(r,e)}})),L({type:"reset"})}),[d,t,c,s,a,m,v,b,O]),$=function(e){return r?null:e},J=function(e){return C?null:$(e)},Z=function(e){return k?null:$(e)},ee=function(e){O&&e.stopPropagation()},te=Object(g.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,i=e.onKeyDown,a=e.onFocus,o=e.onBlur,s=e.onClick,l=e.onDragEnter,c=e.onDragOver,u=e.onDragLeave,d=e.onDrop,h=VT(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return HT(zT({onKeyDown:J(BT(i,H)),onFocus:J(BT(a,z)),onBlur:J(BT(o,V)),onClick:$(BT(s,W)),onDragEnter:Z(BT(l,Y)),onDragOver:Z(BT(c,K)),onDragLeave:Z(BT(u,X)),onDrop:Z(BT(d,Q))},n,I),r||C?{}:{tabIndex:0},{},h)}}),[I,H,z,V,W,Y,K,X,Q,C,k,r]),ne=Object(g.useCallback)((function(e){e.stopPropagation()}),[]),re=Object(g.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.refKey,r=void 0===n?"ref":n,i=e.onChange,a=e.onClick,o=VT(e,["refKey","onChange","onClick"]),s=zT({accept:t,multiple:d,type:"file",style:{display:"none"},onChange:$(BT(i,Q)),onClick:$(BT(a,ne)),autoComplete:"off",tabIndex:-1},r,M);return HT({},s,{},o)}}),[M,t,d,Q,r]),ie=j.length,ae=ie>0&&IT({files:j,accept:t,minSize:c,maxSize:s,multiple:d}),oe=ie>0&&!ae;return HT({},N,{isDragAccept:ae,isDragReject:oe,isFocused:R&&!r,getRootProps:te,getInputProps:re,rootRef:I,inputRef:M,open:$(F)})}function YT(e,t){switch(t.type){case"focus":return HT({},e,{isFocused:!0});case"blur":return HT({},e,{isFocused:!1});case"openDialog":return HT({},e,{isFileDialogActive:!0});case"closeDialog":return HT({},e,{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive;return HT({},e,{draggedFiles:t.draggedFiles,isDragActive:n});case"setFiles":return HT({},e,{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return HT({},e,{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}var KT=r(569),XT=r.n(KT);function QT(e){var t=this,n=e.receiveAcceptedFiles,r=e.acceptedFiles,i=e.wrapperClassName,a=e.innerWrapperClassName,o=e.classNameError,s=e.noClick,l=e.children,c=e.inputType,u=e.isDisabled,d=e.multiple,h=e.validatorElement,f=e.onCheckStatusBeforeAction,p=qT({onDrop:Object(g.useCallback)((function(e){var t,r;"file"===c&&0===(null===(t=e[0])||void 0===t?void 0:null===(r=t.path)||void 0===r?void 0:r.indexOf("/"))||n(e)}),[]),accept:r,noClick:s,multiple:d}),m=p.getRootProps,b=p.getInputProps,y=p.open,A="file"===c?v.a.createElement("input",Gt()({},b(),{disabled:s})):v.a.createElement("input",Gt()({},b(),{directory:"",webkitdirectory:""})),_=u?{}:m();return v.a.createElement("div",Gt()({},_,{className:i,onKeyDown:function(e){return e.preventDefault()},onClick:function(e){s||u||(f?f(e,y.bind(t,e)):y(e))}}),A,v.a.createElement("div",{className:P()("h-100 w-100",u&&XT.a.isDisabled,a)},l),h&&v.a.createElement("div",{className:P()(XT.a.errorMessage,o)},h))}QT.propTypes={receiveAcceptedFiles:ne.a.func.isRequired,acceptedFiles:ne.a.string.isRequired,wrapperClassName:ne.a.string,innerWrapperClassName:ne.a.string,noClick:ne.a.bool,inputType:ne.a.oneOf(["file","folder"]),isDisabled:ne.a.bool,multiple:ne.a.bool,validatorElement:ne.a.any},QT.defaultProps={noClick:!1,inputType:"file",isDisabled:!1};var $T=r(62),JT="undefined"!=typeof window?g.useLayoutEffect:g.useEffect;function ZT(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(i=n?n.call(r,u,d,c):void 0)||void 0===i&&u!==d)return!1}return!0}function ek(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ik(e,t,n){var r=nk(function(e,t,n){var r=ek(Object(g.useState)((function(){return t(e)})),2),i=r[0],a=r[1],o=Object(g.useCallback)((function(){var r=t(e);ZT(i,r)||(a(r),n&&n())}),[i,e,n]);return JT(o,[]),[i,o]}(e,t,n),2),i=r[0],a=r[1];return JT((function(){var t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(a,{handlerIds:[t]})}),[e,a]),i}var ak=r(335);function ok(){var e=Object(g.useContext)(ak.a).dragDropManager;return Object($T.a)(null!=e,"Expected drag drop context"),e}function sk(e,t){"function"==typeof e?e(t):e.current=t}function lk(e,t){var n=e.ref;return Object($T.a)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?Object(g.cloneElement)(e,{ref:function(e){sk(n,e),sk(t,e)}}):Object(g.cloneElement)(e,{ref:t})}function ck(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function uk(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var i=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Object(g.isValidElement)(t)){var r=t;return e(r,n),r}var i=t;ck(i);var a=n?function(t){return e(t,n)}:e;return lk(i,a)}}(r);t[n]=function(){return i}}})),t}function dk(e){return(dk="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)}function hk(e){return null!==e&&"object"===dk(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function fk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pk=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=uk({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,hk(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n,r;return t=e,(n=[{key:"reconnect",value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!ZT(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}},{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}}])&&fk(t.prototype,n),r&&fk(t,r),e}();function mk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gk=!1,vk=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t,n,r;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;Object($T.a)(!gk,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return gk=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{gk=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&mk(t.prototype,n),r&&mk(t,r),e}();function bk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ak(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _k(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wk(e){var t=Object(g.useRef)(e);t.current=e,Object($T.a)(null!=e.accept,"accept must be defined");var n,r=Ak((n=ok(),[Object(g.useMemo)((function(){return new vk(n)}),[n]),Object(g.useMemo)((function(){return new pk(n.getBackend())}),[n])]),2),i=r[0],a=r[1];!function(e,t,n){var r=ok(),i=Object(g.useMemo)((function(){return{canDrop:function(){var n=e.current.canDrop;return!n||n(t.getItem(),t)},hover:function(){var n=e.current.hover;n&&n(t.getItem(),t)},drop:function(){var n=e.current.drop;if(n)return n(t.getItem(),t)}}}),[t]);JT((function(){var a=bk(function(e,t,n){var r=n.getRegistry(),i=r.addTarget(e,t);return[i,function(){return r.removeTarget(i)}]}(e.current.accept,i,r),2),o=a[0],s=a[1];return t.receiveHandlerId(o),n.receiveHandlerId(o),s}),[t,n])}(t,i,a);var o=ik(i,t.current.collect||function(){return{}},(function(){return a.reconnect()})),s=Object(g.useMemo)((function(){return a.hooks.dropTarget()}),[a]);return JT((function(){a.dropTargetOptions=e.options||null,a.reconnect()}),[e.options]),[o,s]}function Ek(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Sk=!1,Ck=!1,Tk=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t,n,r;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){Object($T.a)(!Sk,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Sk=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Sk=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;Object($T.a)(!Ck,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ck=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Ck=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&Ek(t.prototype,n),r&&Ek(t,r),e}();function kk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var xk=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=uk({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,hk(e)?n.dragSourceRef=e:n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,hk(e)?n.dragPreviewRef=e:n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n,r;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();t&&this.disconnectDragPreview(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!ZT(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ZT(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}}])&&kk(t.prototype,n),r&&kk(t,r),e}();function Ok(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ik(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ik(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ik(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mk(e){return(Mk="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)}function Pk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nk(e){var t=Object(g.useRef)(e);t.current=e,Object($T.a)(null!=e.item,"item must be defined"),Object($T.a)(null!=e.item.type,"item type must be defined");var n,r=Pk((n=ok(),[Object(g.useMemo)((function(){return new Tk(n)}),[n]),Object(g.useMemo)((function(){return new xk(n.getBackend())}),[n])]),2),i=r[0],a=r[1];!function(e,t,n){var r=ok(),i=Object(g.useMemo)((function(){return{beginDrag:function(){var n=e.current,r=n.begin,i=n.item;if(r){var a=r(t);return Object($T.a)(null==a||"object"===Mk(a),"dragSpec.begin() must either return an object, undefined, or null"),a||i||{}}return i||{}},canDrag:function(){return"boolean"==typeof e.current.canDrag?e.current.canDrag:"function"!=typeof e.current.canDrag||e.current.canDrag(t)},isDragging:function(n,r){var i=e.current.isDragging;return i?i(t):r===n.getSourceId()},endDrag:function(){var r=e.current.end;r&&r(t.getItem(),t),n.reconnect()}}}),[]);JT((function(){var a=Ok(function(e,t,n){var r=n.getRegistry(),i=r.addSource(e,t);return[i,function(){return r.removeSource(i)}]}(e.current.item.type,i,r),2),o=a[0],s=a[1];return t.receiveHandlerId(o),n.receiveHandlerId(o),s}),[])}(t,i,a);var o=ik(i,t.current.collect||function(){return{}},(function(){return a.reconnect()})),s=Object(g.useMemo)((function(){return a.hooks.dragSource()}),[a]),l=Object(g.useMemo)((function(){return a.hooks.dragPreview()}),[a]);return JT((function(){a.dragSourceOptions=t.current.options||null,a.reconnect()}),[a]),JT((function(){a.dragPreviewOptions=t.current.previewOptions||null,a.reconnect()}),[a]),[o,s,l]}var Lk=r(1031),Rk=r.n(Lk);function Bk(e){var t=e.id,n=e.eleId,r=e.index,i=e.children,a=e.moveCard,o=e.onDrop,s=e.dndType,l=e.className,c=e.canDrag,u=e.canDrop,d=e.movingCard,h=e.onDragStart,f=e.onDragEnd,p=e.checkCanDrop,m=e.classNameContainer,b=Object(g.useRef)(null),y=wk({accept:s,hover:function(e,t){var n;if(b.current&&u&&(!p||p(e))){var i=e.index,o=r;if(d&&d(E),i!==o){var s=null===(n=b.current)||void 0===n?void 0:n.getBoundingClientRect(),l=(s.bottom-s.top)/2,c=t.getClientOffset().y-s.top;i<o&&c<l||i>o&&c>l||(a(i,o),e.index=o)}}},drop:function(e){o&&o(e)}}),A=pi()(y,2)[1],_=Nk({item:{type:s,id:t,index:r,dragIndex:r},collect:function(e){return{isDragging:e.isDragging()}},canDrag:c,begin:h,end:f}),w=pi()(_,2),E=w[0].isDragging,S=w[1],C=E?0:1;return S(A(b)),v.a.createElement("div",{ref:b,id:n,className:P()("draggable-item",E&&Rk.a.replaceItem,m)},v.a.createElement("div",{className:P()("position-relative",l),style:{opacity:C}},i))}Bk.propTypes={id:ne.a.oneOfType([ne.a.string,ne.a.number]).isRequired,index:ne.a.number.isRequired,moveCard:ne.a.func,checkCanDrop:ne.a.func,movingCard:ne.a.func,onDrop:ne.a.func,dndType:ne.a.string.isRequired,className:ne.a.string,canDrag:ne.a.bool,canDrop:ne.a.bool},Bk.defaultProps={canDrag:!0,canDrop:!0};var jk=r(1833);function Fk(e){var t=null;return function(){return null==t&&(t=e()),t}}function Uk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Hk=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.entered=[],this.isNodeInDocument=t}var t,n,r;return t=e,(n=[{key:"enter",value:function(e){var t=this,n=this.entered.length;return this.entered=function(e,t){var n=new Set,r=function(e){return n.add(e)};e.forEach(r),t.forEach(r);var i=[];return n.forEach((function(e){return i.push(e)})),i}(this.entered.filter((function(n){return t.isNodeInDocument(n)&&(!n.contains||n.contains(e))})),[e]),0===n&&this.entered.length>0}},{key:"leave",value:function(e){var t,n,r=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),n=e,t.filter((function(e){return e!==n}))),r>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&Uk(t.prototype,n),r&&Uk(t,r),e}(),zk=Fk((function(){return/firefox/i.test(navigator.userAgent)})),Vk=Fk((function(){return Boolean(window.safari)}));function Wk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Gk=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=t.length,i=[],a=0;a<r;a++)i.push(a);i.sort((function(e,n){return t[e]<t[n]?-1:1}));for(var o,s,l=[],c=[],u=[],d=0;d<r-1;d++)o=t[d+1]-t[d],s=n[d+1]-n[d],c.push(o),l.push(s),u.push(s/o);for(var h=[u[0]],f=0;f<c.length-1;f++){var p=u[f],m=u[f+1];if(p*m<=0)h.push(0);else{o=c[f];var g=c[f+1],v=o+g;h.push(3*v/((v+g)/p+(v+o)/m))}}h.push(u[u.length-1]);for(var b,y=[],A=[],_=0;_<h.length-1;_++){b=u[_];var w=h[_],E=1/c[_],S=w+h[_+1]-b-b;y.push((b-w-S)*E),A.push(S*E*E)}this.xs=t,this.ys=n,this.c1s=h,this.c2s=y,this.c3s=A}var t,n,r;return t=e,(n=[{key:"interpolate",value:function(e){var t=this.xs,n=this.ys,r=this.c1s,i=this.c2s,a=this.c3s,o=t.length-1;if(e===t[o])return n[o];for(var s,l=0,c=a.length-1;l<=c;){var u=t[s=Math.floor(.5*(l+c))];if(u<e)l=s+1;else{if(!(u>e))return n[s];c=s-1}}var d=e-t[o=Math.max(0,c)],h=d*d;return n[o]+r[o]*d+i[o]*h+a[o]*d*h}}])&&Wk(t.prototype,n),r&&Wk(t,r),e}();function qk(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function Yk(e){return{x:e.clientX,y:e.clientY}}function Kk(e,t,n,r,i){var a,o,s,l="IMG"===(a=t).nodeName&&(zk()||!(null===(o=document.documentElement)||void 0===o?void 0:o.contains(a))),c=qk(l?e:t),u={x:n.x-c.x,y:n.y-c.y},d=e.offsetWidth,h=e.offsetHeight,f=r.anchorX,p=r.anchorY,m=function(e,t,n,r){var i=e?t.width:n,a=e?t.height:r;return Vk()&&e&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}(l,t,d,h),g=m.dragPreviewWidth,v=m.dragPreviewHeight,b=i.offsetX,y=i.offsetY,A=0===y||y;return{x:0===b||b?b:new Gk([0,.5,1],[u.x,u.x/d*g,u.x+g-d]).interpolate(f),y:A?y:(s=new Gk([0,.5,1],[u.y,u.y/h*v,u.y+v-h]).interpolate(p),Vk()&&l&&(s+=(window.devicePixelRatio-1)*v),s)}}var Xk,Qk="__NATIVE_FILE__",$k="__NATIVE_URL__",Jk="__NATIVE_TEXT__";function Zk(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),"");return null!=r?r:n}function ex(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tx=(ex(Xk={},Qk,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),ex(Xk,$k,{exposeProperties:{urls:function(e,t){return Zk(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),ex(Xk,Jk,{exposeProperties:{text:function(e,t){return Zk(e,t,"")}},matchesTypes:["Text","text/plain"]}),Xk);function nx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var rx=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.item={},this.initializeExposedProperties()}var t,n,r;return t=e,(n=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var n={};Object.keys(this.config.exposeProperties).forEach((function(r){n[r]={value:t.config.exposeProperties[r](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,n)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&nx(t.prototype,n),r&&nx(t,r),e}();function ix(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(tx).filter((function(e){return tx[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function ax(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ox=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.globalContext=t}var t,n,r;return t=e,(n=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&ax(t.prototype,n),r&&ax(t,r),e}();function sx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sx(Object(n),!0).forEach((function(t){cx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ux(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var dx=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(e){var t=r.sourceNodes.get(e);return t&&qk(t)||null},this.endDragNativeItem=function(){r.isDraggingNativeItem()&&(r.actions.endDrag(),r.currentNativeHandle&&r.registry.removeSource(r.currentNativeHandle),r.currentNativeHandle=null,r.currentNativeSource=null)},this.isNodeInDocument=function(e){return Boolean(e&&r.document&&r.document.body&&document.body.contains(e))},this.endDragIfSourceWasRemovedFromDOM=function(){var e=r.currentDragSourceNode;r.isNodeInDocument(e)||r.clearCurrentDragSourceNode()&&r.actions.endDrag()},this.handleTopDragStartCapture=function(){r.clearCurrentDragSourceNode(),r.dragStartSourceIds=[]},this.handleTopDragStart=function(e){if(!e.defaultPrevented){var t=r.dragStartSourceIds;r.dragStartSourceIds=null;var n=Yk(e);r.monitor.isDragging()&&r.actions.endDrag(),r.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:r.getSourceClientOffset,clientOffset:n});var i=e.dataTransfer,a=ix(i);if(r.monitor.isDragging()){if(i&&"function"==typeof i.setDragImage){var o=r.monitor.getSourceId(),s=r.sourceNodes.get(o),l=r.sourcePreviewNodes.get(o)||s;if(l){var c=r.getCurrentSourcePreviewNodeOptions(),u=Kk(s,l,n,{anchorX:c.anchorX,anchorY:c.anchorY},{offsetX:c.offsetX,offsetY:c.offsetY});i.setDragImage(l,u.x,u.y)}}try{null==i||i.setData("application/json",{})}catch(e){}r.setCurrentDragSourceNode(e.target),r.getCurrentSourcePreviewNodeOptions().captureDraggingState?r.actions.publishDragSource():setTimeout((function(){return r.actions.publishDragSource()}),0)}else if(a)r.beginDragNativeItem(a);else{if(i&&!i.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}},this.handleTopDragEndCapture=function(){r.clearCurrentDragSourceNode()&&r.actions.endDrag()},this.handleTopDragEnterCapture=function(e){if(r.dragEnterTargetIds=[],r.enterLeaveCounter.enter(e.target)&&!r.monitor.isDragging()){var t=e.dataTransfer,n=ix(t);n&&r.beginDragNativeItem(n,t)}},this.handleTopDragEnter=function(e){var t=r.dragEnterTargetIds;(r.dragEnterTargetIds=[],r.monitor.isDragging())&&(r.altKeyPressed=e.altKey,zk()||r.actions.hover(t,{clientOffset:Yk(e)}),t.some((function(e){return r.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=r.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){r.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=r.dragOverTargetIds;if(r.dragOverTargetIds=[],!r.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));r.altKeyPressed=e.altKey,r.actions.hover(t||[],{clientOffset:Yk(e)}),(t||[]).some((function(e){return r.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=r.getCurrentDropEffect())):r.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){r.isDraggingNativeItem()&&e.preventDefault(),r.enterLeaveCounter.leave(e.target)&&r.isDraggingNativeItem()&&r.endDragNativeItem()},this.handleTopDropCapture=function(e){var t;(r.dropTargetIds=[],e.preventDefault(),r.isDraggingNativeItem())&&(null===(t=r.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));r.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=r.dropTargetIds;r.dropTargetIds=[],r.actions.hover(t,{clientOffset:Yk(e)}),r.actions.drop({dropEffect:r.getCurrentDropEffect()}),r.isDraggingNativeItem()?r.endDragNativeItem():r.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new ox(n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Hk(this.isNodeInDocument)}var t,n,r;return t=e,(n=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"setup",value:function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,n){var r=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var i=function(t){return r.handleDragStart(t,e)},a=function(e){return r.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",i),t.addEventListener("selectstart",a),function(){r.sourceNodes.delete(e),r.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",i),t.removeEventListener("selectstart",a),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},i=function(t){return n.handleDragOver(t,e)},a=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",i),t.addEventListener("drop",a),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",i),t.removeEventListener("drop",a)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return lx({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return lx({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(a).some((function(t){return a[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var n=new rx(tx[e]);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){return t.window&&t.window.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}}])&&ux(t.prototype,n),r&&ux(t,r),e}(),hx=Object(ak.b)((function(e,t){return new dx(e,t)}));function fx(e){var t=function(e){var t=Object(g.useRef)(hx);return e.children?v.a.createElement(jk.a,{manager:t.current.dragDropManager},e.children):null}(e);return v.a.createElement(v.a.Fragment,null,t)}var px=r(1017),mx=r(70),gx=r.n(mx);var vx=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handleFileChange",(function(t){var n=t.target.files,r=n.length;if(n&&r>0){if(r>1)return x.e.info("Please choose maximum 1 file.");var i=n[0];(0,e.props.handleSubtitleChange)(i)}})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.index,n=e.subtitleFileName;return v.a.createElement(v.a.Fragment,null,v.a.createElement($l.a.Label,{className:[gx.a.label,"mt-1"]},"Subtitle ".concat(t+1)),v.a.createElement($l.a.Control,{type:"file",readOnly:!0,placeholder:"Add subtitle",className:[gx.a.fileUpload,gx.a.cursorPointer,"position-absolute"],accept:".srt",onChange:this.handleFileChange}),v.a.createElement($l.a.Control,{readOnly:!0,value:n||"Add subtitle",className:["text-center text-truncate d-inline-block",gx.a.videoCard,gx.a.shadowBorder,gx.a.cursorPointer,!n&&"text-muted","d-none"]}))}}]),n}(g.Component);var bx=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.isFirst,n=void 0!==t&&t,r=e.isLast,i=void 0!==r&&r,a=e.fileName,o=e.onMoveUp,s=e.onMoveDown,l=e.onRemove,c=e.index,u=e.handleSubtitleChange,d=e.subtitleFileName,h=Object(Y.split)(a,"."),f=h.pop();return v.a.createElement(px.a,{className:"pt-2 d-flex flex-wrap"},v.a.createElement("div",{className:"".concat(gx.a.videoWrapper," d-inline-block position-relative")},v.a.createElement($l.a.Label,{className:[gx.a.label,"mt-1 d-block"]},"Video ".concat(c+1)),v.a.createElement($l.a.Control,{readOnly:!0,defaultValue:h.join("."),className:["text-center text-truncate d-inline-block",gx.a.videoCard,gx.a.shadowBorder,gx.a.titlePr]}),v.a.createElement("div",{className:"position-absolute d-flex align-items-center justify-content-center ".concat(gx.a.videoExtension," text-uppercase ")},".".concat(f))),v.a.createElement("div",{className:"d-inline-flex align-items-end ".concat(gx.a.short," pl-2")},v.a.createElement("div",{className:"d-inline-block h-100 w-75 position-relative"},v.a.createElement(vx,{index:c,handleSubtitleChange:u,subtitleFileName:d})),v.a.createElement("div",{className:"d-inline-flex align-items-end justify-content-around w-50 ".concat(gx.a.buttonsWrapper)},v.a.createElement("div",{className:"d-inline-flex flex-column h-100 ml-2 justify-content-between"},v.a.createElement("div",{className:"".concat(n?"".concat(gx.a.noClicks," text-black-50"):gx.a.cursorPointer," ").concat(gx.a.sort," ").concat(gx.a.shadowBorder," ")+"d-flex justify-content-center align-items-center",onClick:o,role:"button"},v.a.createElement("i",{className:"fv fuvi-arrow-left ".concat(gx.a.sortIcon),"aria-hidden":"true"})),v.a.createElement("div",{className:"".concat(i?"".concat(gx.a.noClicks," text-black-50"):gx.a.cursorPointer," ").concat(gx.a.sort," ").concat(gx.a.shadowBorder," ")+"d-flex justify-content-center align-items-center",onClick:s,role:"button"},v.a.createElement("i",{className:"fv fuvi-arrow-right ".concat(gx.a.sortIcon),"aria-hidden":"true"}))),v.a.createElement("div",{className:"".concat(gx.a.deleteWrapper," d-flex align-self-center justify-content-center align-items-center")},v.a.createElement("div",{role:"button",onClick:l,className:"d-inline-flex justify-content-center align-items-center rounded-circle "+"".concat(gx.a.shadowBorder," ").concat(gx.a.deleteBorder," ").concat(n&&i?"".concat(gx.a.noClicks," text-black-50"):gx.a.cursorPointer)},v.a.createElement("i",{className:"fv fuvi-trash-can ".concat(n&&i?"text-black-50":"text-danger"," ").concat(gx.a.deleteIcon)}))))))}}]),n}(g.Component);function yx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ax(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yx(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_x(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ex=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(e){var r;return s()(this,n),r=t.call(this,e),G()(V()(r),"handleChange",(function(e){var t=e.target,n=t.name,i=t.value;r.setState(G()({},n,i))})),G()(V()(r),"handleVideosSwapping",(function(e,t){var n=r.state.sourceVideos,i=Rl()(n),a=i[e];i[e]=i[t],i[t]=a,r.setState({sourceVideos:i})})),G()(V()(r),"handleSubtitleChange",(function(e,t){var n=r.state.sourceVideos,i=Rl()(n);i[e].subtitle=t,r.setState({sourceVideos:i})})),G()(V()(r),"handleSelectCategory",(function(e){r.setState({selectedCategories:e})})),G()(V()(r),"handleAddition",(function(e){var t=e;Object(Y.isEmpty)(t)||(t[t.length-1]=t[t.length-1].toLowerCase().replace(/\s+/g," ").trim()),r.setState({keywords:t})})),G()(V()(r),"validateKeyword",(function(e){var t=r.state.keywords,n=e.replace(/\s+/g," ").trim();return 0===n.length?(r.setState({keywordErrorMessage:"Blank keyword is not allowed"}),!1):e.length>x.g.CREATE_COGVID_CONSTRAINTS.KEYWORD_LENGTH_LIMIT?(r.setState({keywordErrorMessage:"Keyword length should be within ".concat(x.g.CREATE_COGVID_CONSTRAINTS.KEYWORD_LENGTH_LIMIT," characters")}),!1):-1!==t.lastIndexOf(n.toLowerCase())?(r.setState({keywordErrorMessage:"Duplicated keywords are not allowed"}),!1):(r.setState({keywordErrorMessage:""}),!0)})),G()(V()(r),"handleRemoveSourceVideo",(function(e){var t=r.state.sourceVideos,n=Rl()(t);n.splice(e,1),r.setState({sourceVideos:n})})),G()(V()(r),"showNotification",(function(e,t){x.e[t](e)})),G()(V()(r),"handleSubtitleUploadSuccessful",(function(e){var t=r.state.sourceVideos;Object(Y.set)(t,"[".concat(e,"].subtitle.uploaded"),!0)})),G()(V()(r),"handleSubmitForm",(function(e){if(e.preventDefault(),r.validator.allValid()){var t=r.state,n=t.selectedCategories,i=t.description,a=t.keywords,o=t.sourceVideos,s=t.title,l=t.subject,c=t.topic,u=r.props,d=u.onClose,h=u.onCogvidCreated,f=[];o.forEach((function(e,t){var n=e.subtitle,r=void 0===n?{}:n,i=r.uploaded;void 0!==i&&i||""===Object(Y.get)(r,"name","")||f.push({videoIndex:t,subtitleFile:r})}));var p={categories:n.map((function(e){return{description:e.description,id:e.id,name:e.name}})),description:i,keywords:a,sourceVideos:o.map((function(e,t){var n=e.contentId,r=e.subtitle,i=(r=void 0===r?{}:r).contentId;return{contentId:n,seqNumber:t,subtitleId:void 0===i?"":i}})),title:s,subject:l,topic:c};r.props.oldCreateCognitiveVideoAction({subtitles:f,formData:p,onSubtitleUploadSuccessful:r.handleSubtitleUploadSuccessful},(function(e,t){r.showNotification(e,t),r.setState({sourceVideos:[]}),h(),d()}),(function(e,t){return r.showNotification(e,t)}))}else r.validator.showMessages(),r.forceUpdate()})),r.state={keywords:[],sourceVideos:e.sourceVideos.map((function(e){return wx(wx({},e),{},{subtitle:{}})})),showConfirmationModal:!1,selectedCategories:[],title:"",subject:"",topic:"",description:"",keywordErrorMessage:""},r.validator=new ql.a(x.c.validatorConfig),r}return n}(function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.keywords,r=t.sourceVideos,i=t.title,a=t.subject,o=t.topic,s=t.selectedCategories,l=t.description,c=t.keywordErrorMessage,u=this.props,d=u.categories,h=u.onClose,f=d.map((function(e){return Ax(Ax({},e),{},{value:e.name,label:e.name})}));return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:"createCogvidWrapper",scrollable:!0,centered:!0,backdrop:"static"},v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"ml-3 ".concat(gx.a.formTitle)},"Create cognitive video"),v.a.createElement("div",{className:"".concat(gx.a.closeButton," ").concat(gx.a.cursorPointer," ")+"d - inline - block  d-flex justify-content-center align-items-center",onClick:h,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:gx.a.modalBody},v.a.createElement($l.a,{noValidate:!0,onSubmit:this.submitCreateCognitiveVideo},v.a.createElement(T,null,v.a.createElement(k.a,{sm:"5",className:"pl-4 pr-3 pt-1"},v.a.createElement(mu,{labelName:"Title",name:"title",value:i,placeholder:"Add title",required:!0,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("title")},validatorElement:this.validator.message("title",i,"videoTitleRequired|max:255")}),v.a.createElement(mu,{labelName:"Subject",name:"subject",value:a,placeholder:"Add subject",required:!0,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("subject")},validatorElement:this.validator.message("subject",a,"videoSubjectRequired|max:255")}),v.a.createElement(mu,{labelName:"Topic",name:"topic",value:o,placeholder:"Add topic",required:!0,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("topic")},validatorElement:this.validator.message("topic",o,"videoTopicRequired|max:255")}),v.a.createElement(px.a,null,v.a.createElement($l.a.Label,{className:[gx.a.label,gx.a.keywordsLabel,"mt-1"]},"Keywords"),v.a.createElement("div",{className:"".concat(gx.a.controlItem)},v.a.createElement(Bu,{tags:n,onChange:function(t){return e.handleAddition(t)},validator:this.validateKeyword}),c&&v.a.createElement("div",{className:"ml-2 mt-1 text-danger"},c))),v.a.createElement(hu,{labelName:"Categories",options:f,value:s,name:"selectedCategorsies",onChange:this.handleSelectCategory,hasSelectAll:!1,disableSearch:!0,selectAllMessage:"All categories are selected",className:"cogvid-input-border cogvid-input-height"}),v.a.createElement($l.a.Group,null,v.a.createElement($l.a.Label,{className:[gx.a.label,"mt-2"]},"Description"),v.a.createElement("div",{className:"".concat(gx.a.controlItem)},v.a.createElement($l.a.Control,{as:"textarea",name:"description",value:l,onChange:this.handleChange,className:["w-100",gx.a.control,gx.a.controlItem,gx.a.withValidation,"cogvid-input-border"],rows:"4"}),v.a.createElement("div",{className:"ml-2 mt-1"},this.validator.message("description",l,"max:255"))))),v.a.createElement(k.a,{sm:"7",className:gx.a.rightColumn},v.a.createElement("div",{className:"flex-column flex-fill ".concat(gx.a.controlItem)},r.map((function(t,n){var i=t.contentId,a=t.fileName,o=t.subtitle,s=(o=void 0===o?{}:o).name,l=void 0===s?"":s;return v.a.createElement(bx,{key:i,index:n,isFirst:0===n,isLast:n===r.length-1,fileName:a,subtitleFileName:l,onMoveUp:function(){return e.handleVideosSwapping(n,n-1)},onMoveDown:function(){return e.handleVideosSwapping(n,n+1)},onRemove:function(){return e.handleRemoveSourceVideo(n)},handleSubtitleChange:function(t){return e.handleSubtitleChange(n,t)}})}))))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(k.a,{sm:"2",className:"mr-2"},v.a.createElement(et.a,{variant:"outline-primary",block:!0,className:gx.a.bottomButton,onClick:h},"Cancel")),v.a.createElement(k.a,{sm:"2",className:"mr-3"},v.a.createElement(et.a,{type:"submit",variant:"primary",block:!0,className:[gx.a.bottomButton,"text-white"],onClick:this.handleSubmitForm},"Save")))))}}]),n}(g.PureComponent)),Sx=Object(q.b)((function(e){return e.common}),(function(e){return{oldCreateCognitiveVideoAction:function(t,n,r){return e(Q.g.oldCreateCognitiveVideo(t,n,r))},uploadSubtitleFile:function(t,n,r){return e(Q.g.uploadAVideo(t,n,r))}}}))(Ex),Cx=r(277),Tx=r.n(Cx),kx=r(65),xx=r.n(kx);var Ox=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{title:e.props.title,isEditing:!1,isMouseOver:!1,isUpdatingThumbnail:!1,isUpdatingPrivacy:!1,isUpdatingFreeDownload:!1}),G()(V()(e),"titleRef",v.a.createRef()),G()(V()(e),"componentDidMount",(function(){e.props.isIndicatorOver&&e.handleItemMouseOver()})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.isIndicatorOver,r=t.thumbnail,i=e.props,a=i.isIndicatorOver,o=i.thumbnail;!a||a===n&&o===r||e.handleItemMouseOver()})),G()(V()(e),"adjustTitleTextareaHeight",(function(){e.titleRef.style.height="auto",e.titleRef.style.height="".concat(e.titleRef.scrollHeight,"px")})),G()(V()(e),"handleEditClick",(function(t){t.stopPropagation(),e.state.isEditing||e.setState({isEditing:!0},(function(){var t;(!e.titleRef||(null===(t=e.titleRef)||void 0===t?void 0:t.current))&&(e.adjustTitleTextareaHeight(),e.titleRef.select())}))})),G()(V()(e),"handleTitleTextareaClick",(function(e){return e.stopPropagation()})),G()(V()(e),"handleTitleTextareaChange",(function(t){return e.setState({title:t.target.value},e.adjustTitleTextareaHeight)})),G()(V()(e),"handleTitleTextareaFocus",(function(e){e.currentTarget.closest(".draggable-item").setAttribute("draggable",!1)})),G()(V()(e),"handleTitleTextareaBlur",(function(t){t.stopPropagation(),t.currentTarget.closest(".draggable-item").setAttribute("draggable",!0);var n=e.props,r=n.title,i=n.onEdit,a=e.state.title;r!==a&&(a&&i({title:a}),""===a&&e.setState({title:r})),setTimeout((function(){e.setState({isEditing:!1})}),100)})),G()(V()(e),"handleTitleTextareaKeyDown",(function(t){t.stopPropagation(),13===t.keyCode&&t.target.blur(),27===t.keyCode&&e.setState({isEditing:!1,title:e.props.title}),x.c.preventKeyDownSideEffect(t)})),G()(V()(e),"handleItemClick",(function(t){t.stopPropagation();var n=e.props,r=n.onClick;n.editOnClick?e.handleEditClick(t):r(t)})),G()(V()(e),"handleItemMouseOver",(function(){var t=e.props,n=t.isActive,r=t.isUploading,i=t.isLoadingThumbnail,a=t.thumbnail,o=t.displayCoverImage;!t.isIndicatorOver&&e.setState({isMouseOver:!0}),n||r||a===I.a.loadingFailedIcon?o({}):o({image:a,type:x.g.COVER_IMAGE_TYPE.ATTACHMENT,isLoading:i})})),G()(V()(e),"handleItemMouseLeave",(function(){var t=e.props,n=t.displayCoverImage;t.isShowingAttachmentPreview;e.setState({isMouseOver:!1}),n({})})),G()(V()(e),"handleUpdateThumbnailMouseEnter",(function(){var t=e.props,n=t.thumbnail,r=t.displayCoverImage,i=t.displayMiniCoverImage;r({}),i(n)})),G()(V()(e),"handleUpdateThumbnailMouseLeave",(function(){var t=e.props.displayMiniCoverImage;e.handleItemMouseOver(),t()})),G()(V()(e),"handleUpdateThumbnail",(function(t){t.stopPropagation();var n=e.props,r=n.onThumbnailUpdate,i=n.displayMiniCoverImage;e.setState({isUpdatingThumbnail:!0}),i(),setTimeout((function(){r((function(){return e.setState({isUpdatingThumbnail:!1})}),(function(){return e.setState({isUpdatingThumbnail:!1})}))}))})),G()(V()(e),"handleTogglePrivacy",(function(t){t.stopPropagation();var n=e.props,r=n.sharedWithAll,i=n.onEdit;e.setState({isUpdatingPrivacy:!0}),i&&i({sharedWithAll:!r},(function(){Object(Y.delay)((function(){return e.setState({isUpdatingPrivacy:!1})}),1e3)}))})),G()(V()(e),"handleToggleFreeDownload",(function(t){t.stopPropagation();var n=e.props,r=n.freeDownload,i=n.onFreeDownloadToggle;e.setState({isUpdatingFreeDownload:!0}),i&&i(!r,(function(){Object(Y.delay)((function(){return e.setState({isUpdatingFreeDownload:!1})}),1e3)}))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.title,i=n.totalPage,a=n.progressPercentage,o=n.isFailed,s=n.isActive,l=n.onRetry,c=n.onCancel,u=n.isUploading,d=n.isAttaching,h=n.editOnClick,f=n.mediaType,p=n.canWrite,m=n.canDel,g=n.canDownload,b=n.onDelete,y=n.onDownload,A=n.isIndicatorOver,_=n.owner,w=n.disabledEdit,E=n.sharedWithAll,S=n.canSetPrivacy,C=n.downloadCount,T=n.showDownloadCount,k=n.freeDownload,x=n.canSetFreeDownload,O=this.state,M=O.title,D=O.isEditing,N=O.isMouseOver,L=O.isUpdatingThumbnail,R=O.isUpdatingPrivacy,B=O.isUpdatingFreeDownload,j=_||{},F=j.fullName,U=(j.avatar||{}).image,H="";o&&(H="danger");var z=Object(Y.get)(f.match(/pdf|jpeg|jpg|png/),"[0]");return v.a.createElement("div",{className:P()(xx.a.itemWrapper,s&&xx.a.active,!s&&A&&xx.a.hover,!u&&h&&p&&"u-cursor-text",!u&&"u-cursor-pointer"),onClick:u?null:this.handleItemClick,onMouseOver:N?null:this.handleItemMouseOver,onMouseLeave:this.handleItemMouseLeave},v.a.createElement("div",{className:xx.a.overlayWrapper},v.a.createElement("div",{className:P()(!u&&xx.a.hoverOverlay)}),v.a.createElement("div",{className:P()(xx.a.actionButtons,(!u||!p)&&"u-mb-5o16",!u&&!!_&&"u-mr-3")},u&&v.a.createElement(v.a.Fragment,null,o&&v.a.createElement(Qt,{onClick:l,tooltipText:t("tooltip.uploadRetry")},v.a.createElement("i",{className:"fv fuvi-refresh text-primary"})),d&&v.a.createElement(Ln,{className:xx.a.attachingIcon}),!d&&v.a.createElement(Qt,{onClick:c,tooltipText:t("tooltip.uploadCancel")},v.a.createElement("i",{className:"fv fuvi-delete u-fs-7o8 text-secondary"}))),!u&&v.a.createElement(v.a.Fragment,null,x&&v.a.createElement(Qt,{onClick:this.handleToggleFreeDownload,tooltipText:k?t("tooltip.lockAttachment"):t("tooltip.unlockAttachment"),isLoading:B},v.a.createElement("i",{className:k?"fv fuvi-unlock-icon":"fv fuvi-locked-icon text-secondary"})),S&&v.a.createElement(Qt,{onClick:this.handleTogglePrivacy,tooltipText:E?t("tooltip.setPrivacyPrivate"):t("tooltip.setPrivacyPublic"),isLoading:R},v.a.createElement("i",{className:E?"fv fuvi-eye":"fv fuvi-eye-disable text-secondary"})),g&&T&&v.a.createElement("div",{className:P()(xx.a.downloadBadgeWrap,!k&&xx.a.disabled),onClick:y},v.a.createElement(Qt,{number:C,badge:C>0?C:"",className:P()("mr-2 ml-0 p-0 position-relative"),classNameBadge:P()(xx.a.downloadBadge),disabled:!k,tooltipText:k?t("tooltip.attachmentDownload"):t("tooltip.disabledAttachmentDownload")},v.a.createElement("i",{className:"fv fuvi-download"}))),g&&!T&&v.a.createElement(Qt,{onClick:y,tooltipText:t("tooltip.attachmentDownload")},v.a.createElement("i",{className:"fv fuvi-download"})),p&&v.a.createElement(Qt,{isLoading:L,onClick:this.handleUpdateThumbnail,onMouseEnter:this.handleUpdateThumbnailMouseEnter,onMouseLeave:this.handleUpdateThumbnailMouseLeave,tooltipText:t("tooltip.updateAttachmentThumbnail"),disabled:w},v.a.createElement("i",{className:"fv fuvi-capture_image u-fs-1x1o4"})),m&&v.a.createElement(Qt,{onClick:b,tooltipText:t("tooltip.attachmentDelete"),disabled:w},v.a.createElement("i",{className:"fv fuvi-delete u-fs-7o8 text-secondary"}))))),v.a.createElement("div",{className:"w-100 d-flex align-items-center"},v.a.createElement("div",{className:"position-relative flex-grow-1 align-self-center w-100"},v.a.createElement(Kt.a,{placement:"right",delay:{show:800},overlay:v.a.createElement(Xt.a,null,M),trigger:!D&&M.length>25?["hover","focus"]:[]},v.a.createElement("div",{className:P()("u-fs-7o8 u-fw-500 u-truncate-1 u-wb-break-all")},M||r,D&&p&&v.a.createElement("textarea",{className:P()("u-fw-500",xx.a.textareaTitle),ref:function(t){e.titleRef=t},name:"title",value:M,autoFocus:!0,onClick:this.handleTitleTextareaClick,onChange:this.handleTitleTextareaChange,onBlur:this.handleTitleTextareaBlur,onKeyDown:this.handleTitleTextareaKeyDown,onFocus:this.handleTitleTextareaFocus}))),!u&&v.a.createElement("div",{className:"d-flex align-items-center mt-1 u-fs-3o4 u-opacity-76"},v.a.createElement("div",{className:P()(xx.a.fileTypeBadge,"pdf"===z?xx.a.typePdf:xx.a.typeImage)},z),i>0?t("pdfPageCount",{count:i}):""),u&&v.a.createElement(v.a.Fragment,null,v.a.createElement(bt,{now:a,className:P()("mb-1"),letiant:H}),v.a.createElement("div",{className:P()("flex-grow-1 u-fs-3o4",o&&"text-secondary fw-bold")},o?t("failed"):u?t("uploading"):""))),_&&v.a.createElement(Kt.a,{placement:"top",delay:{show:800},overlay:v.a.createElement(Xt.a,null,F)},v.a.createElement("div",{className:xx.a.ownerAvatar,style:{backgroundImage:"url(".concat(U||I.a.noAvatar,")")}}))))}}]),r}(v.a.Component),Ix=Object(q.b)((function(e){return{isShowingAttachmentPreview:!!e.cogvid.showPreviewAttachments.videoId}}),(function(e){return{displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))},displayMiniCoverImage:function(t){return e(Q.e.displayMiniCoverImage(t))}}}))(Object(g.memo)(Ox));var Mx=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handleScroll",(function(){if(e.indicatorScrollRef&&e.scrollRef){var t=e.indicatorScrollRef.scrollbar.scrollTop,n=e.scrollRef.scrollbar.scrollTop,r=Number.parseInt((e.heightScrollContent-(t+e.heightItem/2-n))/e.heightItem);e.props.onScroll&&e.props.onScroll(n),e.state.indicatorIndex!==r&&e.setState({indicatorIndex:r})}})),e}return c()(n,[{key:"render",value:function(){var e,t,n,r,i,a,o,s,l=this,c=this.state,u=c.attachments,d=void 0===u?[]:u,h=c.deleteAttachment,f=c.isLoadingAttachments,p=c.isEditingAttachment,m=c.attachmentCount,g=(c.indicatorIndex,this.props),b=g.videoId,y=g.chapterId,A=g.title,_=void 0===A?"":A,w=g.editable,E=g.attachmentReviewId,S=g.className,C=g.isPreviewMode,T=(g.onScroll,g.hoverTime),k=g.isEditBtnsHidden,O=g.lastReviewStatus,M=g.videoPermissions,D=void 0===M?{}:M,N=g.permissions,L=void 0===N?{}:N,R=g.videoStatus,B=g.activeChapterId,j=y?L:D,F=x.g.VIDEO_CATEGORY,U=d.some((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).status;return!t&&r!==x.g.ATTACHED_SUCCESSFULLY})),H=x.c.getCurrentVideoCategory(),z=H===F.BRAINHIVE,V=H===F.EXPLORING,W=H===F.MESSAGES,G=H===F.LEARNING,q=H===F.COMPOSING,Y=x.c.checkIsPublicProcessing(O,R),K=!w||f||G,X=x.c.checkPermission((null==j?void 0:null===(e=j.VIDEO)||void 0===e?void 0:e.DOANYACTION)||(null==j?void 0:null===(t=j.COMPREHENSION_GUIDE)||void 0===t?void 0:t.DOANYACTION),(null==j?void 0:null===(n=j.COMPREHENSION_GUIDE_ATTACHMENTS)||void 0===n?void 0:n.CREATE)||(null==j?void 0:null===(r=j.VIDEO_ATTACHMENT)||void 0===r?void 0:r.CREATE)),Q=x.c.checkPermission((null==j?void 0:null===(i=j.VIDEO)||void 0===i?void 0:i.DOANYACTION)||(null==j?void 0:null===(a=j.COMPREHENSION_GUIDE)||void 0===a?void 0:a.DOANYACTION),(null==j?void 0:null===(o=j.COMPREHENSION_GUIDE_ATTACHMENTS)||void 0===o?void 0:o.WRITE)||(null==j?void 0:null===(s=j.VIDEO_ATTACHMENT)||void 0===s?void 0:s.WRITE)),$=x.c.isVideoOwner({videoId:b}),J=function(e,t){var n;return z||W?x.c.checkPermission(e||(null==j?void 0:null===(n=j.COMPREHENSION_GUIDE)||void 0===n?void 0:n.DOANYACTION),t):w},Z=function(e,t){return z||W?x.c.checkPermission(e||Q,t):w},ee=d.some((function(e){var t;return x.c.isCurrentUserId(null==e?void 0:null===(t=e.author)||void 0===t?void 0:t.userId)})),te=this.getAttachmentStatistics().hasNewAttachments;return v.a.createElement("div",{className:P()(xx.a.modalWrapper,S),onMouseEnter:function(){window.isCAModalHovered=!0},onMouseLeave:function(){window.isCAModalHovered=!1}},v.a.createElement("img",{src:I.a.loadingFailedIcon,className:"d-none",alt:""}),v.a.createElement("img",{src:I.a.pdfIcon,className:"d-none",alt:""}),v.a.createElement("div",{className:xx.a.modalHeader},v.a.createElement("div",null,v.a.createElement(Qt,{classNameContainer:"h-100 d-flex align-items-center",className:xx.a.hideModalBtn,onClick:this.handleCloseAttachmentList},v.a.createElement("i",{className:P()("fv fuvi-prev")}))),v.a.createElement("div",{className:"h-100 flex-grow-1 text-truncate"},v.a.createElement(Kt.a,{placement:"right",delay:{show:800},overlay:v.a.createElement(Xt.a,null,_),trigger:_&&_.length>20?["hover","focus"]:[]},v.a.createElement("div",{className:"h-50 px-1 d-flex align-items-center"},v.a.createElement("div",{className:"text-truncate font-weight-bold u-wb-break-all"},_))),z||W?v.a.createElement("div",{className:P()("h-50 d-flex align-items-center bg-primary",xx.a.attachmentsTabbar)},X&&v.a.createElement(v.a.Fragment,null,v.a.createElement(QT,{acceptedFiles:".pdf,.png,.jpg,.jpeg",receiveAcceptedFiles:this.handleFilesSelect,disabled:K},v.a.createElement(Qt,{disabled:K,tooltipText:Object(_t.t)("tooltip.attachFile")},v.a.createElement("i",{className:P()("fv fuvi-add-file-icon")}))),v.a.createElement(QT,{inputType:"folder",acceptedFiles:".pdf,.png,.jpg,.jpeg",receiveAcceptedFiles:this.handleFilesSelect,disabled:K},v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.attachFolder"),disabled:K},v.a.createElement("i",{className:P()("fv fuvi-add-folder-icon")})))),v.a.createElement(Qt,{badge:m,className:"u-cursor-default u-opacity-100",classNameBadge:P()(xx.a.attachmentCountBadge,"u-cursor-default",!te&&"u-bg-grey"),tooltipText:Object(_t.t)("attachmentCount",{count:m})},v.a.createElement("i",{className:"fv fuvi-attach"})),(Q||ee)&&!V&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"h-100 ml-3 border-right border-white u-opacity-50"}),v.a.createElement(Qt,{active:p,className:P()(p&&"u-opacity-100"),tooltipText:Object(_t.t)("tooltip.attachmentEdit"),onClick:this.handleAttachmentEditClick},v.a.createElement("i",{className:P()("fv fuvi-text-icon")})))):v.a.createElement("div",{className:P()("h-50 d-flex align-items-center bg-primary",xx.a.attachmentsTabbar)},!k&&v.a.createElement(v.a.Fragment,null,v.a.createElement(QT,{acceptedFiles:".pdf,.png,.jpg,.jpeg",receiveAcceptedFiles:this.handleFilesSelect,isDisabled:K},v.a.createElement(Qt,{disabled:K,tooltipText:Object(_t.t)("tooltip.attachFile")},v.a.createElement("i",{className:P()("fv fuvi-add-file-icon")}))),v.a.createElement(QT,{inputType:"folder",acceptedFiles:".pdf,.png,.jpg,.jpeg",receiveAcceptedFiles:this.handleFilesSelect,isDisabled:K},v.a.createElement(Qt,{disabled:K,tooltipText:Object(_t.t)("tooltip.attachFolder")},v.a.createElement("i",{className:P()("fv fuvi-add-folder-icon")})))),v.a.createElement(Qt,{badge:m,className:"u-cursor-default u-opacity-100",classNameBadge:xx.a.attachmentCountBadge,tooltipText:Object(_t.t)("attachmentCount",{count:m})},v.a.createElement("i",{className:"fv fuvi-attach"})),w&&!V&&!G&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"h-100 ml-3 border-right border-white u-opacity-50"}),v.a.createElement(Qt,{active:p,disabled:!w||0===d.length||Y,className:P()(p&&"u-opacity-100"),tooltipText:Object(_t.t)("tooltip.attachmentEdit"),onClick:this.handleAttachmentEditClick},v.a.createElement("i",{className:P()("fv fuvi-text-icon")})))))),v.a.createElement("div",{className:xx.a.scrollWrapper},v.a.createElement(Lb,{key:b+y+T,className:"fv-smooth-scroll h-100",containerClassName:"h-100",ref:function(e){l.scrollRef=e},plugins:{scaleSpeed:{speed:.5}}},v.a.createElement(QT,{wrapperClassName:"h-100",acceptedFiles:".pdf,.png,.jpg,.jpeg",receiveAcceptedFiles:this.handleFilesSelect,noClick:!0,isDisabled:!w||(z||W?!X:K)},f&&v.a.createElement(Nn,null),!f&&0===d.length&&v.a.createElement("div",{className:"d-flex align-items-center justify-content-center w-100 h-100 u-fs-2x"},C&&y!==B&&K||(z||W?!X:K)?v.a.createElement("div",{className:"text-center font-italic text-black-50"},v.a.createElement("small",null,Object(_t.t)("noAttachments"))):v.a.createElement("div",{className:P()(xx.a.emptyIconWrapper,"rounded-circle bg-white")},v.a.createElement("img",{height:"50",width:"50",src:I.a.folderIcon,alt:"cogvid Icon",className:P()(xx.a.folderIcon)}),v.a.createElement("div",{className:"text-center u-fs-11o16 u-opacity-75"},v.a.createElement("div",null,Object(_t.t)("dropFilesHere")),v.a.createElement("div",{className:xx.a.dndSecondLine},Object(_t.t)("dropFilesOr",{button:Object(_t.t)("btn.addFile")}))))),!f&&d.length>0&&v.a.createElement(fx,null,v.a.createElement("div",{className:xx.a.chapterAttachments},v.a.createElement("div",{className:""},d.map((function(e,t){var n,r,i,a,o=e.id,s=void 0===o?"":o,c=e.contentId,u=void 0===c?"":c,d=e.fileName,h=void 0===d?"":d,f=e.thumbnail,m=void 0===f?"":f,g=e.uploadingProgressData,b=(g=void 0===g?{}:g).now,y=void 0===b?0:b,A=g.isFailed,_=void 0!==A&&A,S=g.status,C=void 0===S?"":S,T=g.fileId,k=void 0===T?"":T,O=e.totalPage,I=e.title,M=e.isLoadingThumbnail,P=e.mediaType,D=e.author,N=e.sharedWithAll,L=e.downloadCount,R=e.freeDownload,B=!u&&C!==x.g.ATTACHED_SUCCESSFULLY,F=!_&&B&&C===x.g.PROGRESS_STATUS.DONE,H=x.c.isCurrentUserId(null==D?void 0:D.userId);return v.a.createElement(Bk,{key:s+u,id:u||k,index:t,originalIndex:t,dndType:x.g.DND_TYPE.ATTACHMENT_ITEM,canDrag:w&&$&&!U,moveCard:l.handleAttachmentSwapping,onDrop:l.handleAttachmentOrderUpdate},v.a.createElement(Ix,{title:I||h,totalPage:O,progressPercentage:y,isFailed:_,isActive:!!E&&(E===u||E===k),editOnClick:p&&Z(H,null==j?void 0:null===(n=j.COMPREHENSION_GUIDE_ATTACHMENTS)||void 0===n?void 0:n.WRITE),mediaType:P,isUploading:B,isAttaching:F,onClick:function(t){l.handleItemClick(t,e)},onRetry:function(t){t.stopPropagation(),l.handleRetryUpload(e)},onCancel:function(t){l.handleItemCancel(t,e)},onEdit:function(t,n){l.handleAttachmentUpdate(e,t,n)},thumbnail:m,isLoadingThumbnail:M,onDelete:function(t){t.stopPropagation(),l.setState({deleteAttachment:e})},onDownload:function(t){l.handleDownloadAttachment(t,e)},canWrite:J(H,null==j?void 0:null===(r=j.COMPREHENSION_GUIDE_ATTACHMENTS)||void 0===r?void 0:r.WRITE)&&!V&&!G,canDel:J(H,null==j?void 0:null===(i=j.COMPREHENSION_GUIDE_ATTACHMENTS)||void 0===i?void 0:i.DELETE)&&!V&&!G,canDownload:J(H,null==j?void 0:null===(a=j.COMPREHENSION_GUIDE_ATTACHMENTS)||void 0===a?void 0:a.CREATE)||V,onThumbnailUpdate:function(t,n){l.handleAttachmentThumbnailUpdate(e,t,n)},owner:!z&&!W||H?void 0:D,disabledEdit:K,sharedWithAll:N,canSetPrivacy:(z||W)&&($||H),downloadCount:L,showDownloadCount:V,freeDownload:R,canSetFreeDownload:(z||q)&&($||H||Q),onFreeDownloadToggle:function(t,n){l.handleFreeDownloadToggle(e,t,n)}}))}))))))),C&&v.a.createElement(Lb,{key:b+y+"indicator",className:P()(xx.a.scrollIndicator,"fv-smooth-scroll"),containerClassName:"h-100",plugins:{reverse:{y:!0},scaleSpeed:{speed:.25}},ref:function(e){l.indicatorScrollRef=e},continuousScrolling:!0},v.a.createElement("div",{className:"w-100 h-100"},v.a.createElement("div",{style:{height:Math.min(d.length*this.heightItem,this.heightScrollView)}}),v.a.createElement("div",{style:{height:this.heightScrollView}})))),v.a.createElement(IC,{show:!!h,title:Object(_t.t)("modal.confirmDeleteAttachmentTitle"),onConfirm:function(){l.handleDeleteAttachment(h),l.setState({deleteAttachment:null})},onClose:function(){return l.setState({deleteAttachment:null})}}))}}]),n}(v.a.PureComponent);var Px=r(255);var Dx=x.g.CANVAS_DRAWING_TYPE,Nx=x.g.VIDEO_CATEGORY,Lx=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{file:null,numPages:0,isLoading:!1,pageHeight:null,pageWidth:0,canvases:[],serverCanvasData:[],areCanvasesRendered:!1,isRenderingCanvasObjects:!1}),G()(V()(e),"canvasDrawingProps",{mouseDownCoord:{},isDown:!1,marginLeft:0,marginTop:0}),G()(V()(e),"handleTextChange",Object(Y.debounce)((function(){e.saveCanvasJson()}),200)),G()(V()(e),"renderedCanvasPages",0),G()(V()(e),"prevScrollTop",0),G()(V()(e),"shouldPersistScrollPosition",!1),G()(V()(e),"sizeScrollbar",Number.parseInt(Um.sizeCustomScrollbar.replace(/px/,""))),G()(V()(e),"parseSketchDataString",(function(t){var n=[];for(var r in t)if(Object.hasOwnProperty.call(t,r)){var i=JSON.parse(t[r]),a=i.pageNumber,o=Yt()(i,["pageNumber"]);n[a]=o}e.setState({serverCanvasData:n})})),G()(V()(e),"getAndRenderSketchData",(function(){var t=e.props,n=t.getChapterAttachmentSketch,r=t.getVideoAttachmentSketch,i=t.attachmentReview,a=(i=void 0===i?{}:i).attachmentId,o=i.videoId,s=i.chapterId,l=t.videoId;(s?n:r)({videoId:o||l,chapterId:s,fileId:a},(function(t){var n=t.sketchPages;e.parseSketchDataString(n)}))})),G()(V()(e),"timer",null),G()(V()(e),"shouldComponentUpdate",(function(t,n){var r={},i={};return Object.keys(e.props).forEach((function(n){"function"!=typeof e.props[n]&&(r[n]=e.props[n],i[n]=t[n])})),e.props.isToolbarShown!==t.isToolbarShown&&(e.shouldPersistScrollPosition=!0,t.isToolbarShown?e.prevScrollTop=Object(Y.get)(e.props.pageListRef,"current.state.scrollOffset"):e.props.pageListRef.current&&(e.prevScrollTop=e.props.pageListRef.current.scrollTop)),!Object(Y.isEqual)(r,i)||!Object(Y.isEqual)(n,e.state)})),G()(V()(e),"componentDidUpdate",(function(t){var n=e.state,r=n.canvases,i=n.serverCanvasData,a=n.areCanvasesRendered,o=t.url,s=t.width,l=t.isToolbarShown,c=e.props,u=c.url,d=c.width,h=c.strokeColor,f=c.strokeWidth,p=c.drawingType,m=c.isToolbarShown,g=c.pageListRef,v=(c.backgroundColor,c.borderColor),b=c.isDrawingTypeChange,y=e.state.isRenderingCanvasObjects,A=x.c.getCurrentVideoCategory();if(u!==o&&e.setState({areCanvasesRendered:!1,canvases:[],serverCanvasData:[]},(function(){e.buildPdfFile(),e.renderedCanvasPages=0,e.getAndRenderSketchData()})),d!==s&&e.handlePageRenderSuccess(),A!==Nx.REVIEW&&l===m||(A===Nx.REVIEW||m?y||(e.setState({isRenderingCanvasObjects:!0}),e.getAndRenderSketchData()):(e.setState({areCanvasesRendered:!1,canvases:[],serverCanvasData:[]}),e.renderedCanvasPages=0)),(A===Nx.REVIEW||m)&&a&&(e.shouldPersistScrollPosition&&(g.current.scrollTop=e.prevScrollTop,e.prevScrollTop=0,e.shouldPersistScrollPosition=!1),e.setState({isRenderingCanvasObjects:!1})),!m&&e.shouldPersistScrollPosition>0&&null!==g.current&&(g.current.scrollTo(e.prevScrollTop),e.prevScrollTop=0,e.shouldPersistScrollPosition=!1),!Object(Y.isEmpty)(r)){r.forEach((function(e,t){e&&b&&p!=Dx.DELETE_SELECTED_OBJECTS&&(Qr(e),Kr(e,h,f,p,0),Jr(v,f))}));var _=e.props,w=_.editModeStrokeColor,E=_.editModeStrokeWidth,S=_.updateCanvasProperties,C=_.prevDrawingType,T=_.currentViewingPage,k=_.editModeBackgroundColor,O=_.editModeFontSize,I=_.editModeFontStyle,M=_.editModeLineStyle,P=_.shiftKeyPress,D=_.ctrlKeyPress;if(Object(Y.isEmpty)(i)||r.forEach((function(t,n){t&&!t.isLoaded&&(e.loadCanvasObjects(t,i[n]),t.isLoaded=!0)})),Wr(P,D),p===Dx.EXPORT&&e.exportToPdf(),p===Dx.RESET_CANVAS)r[T-1].clear(),Xr(),S({drawingType:C}),e.saveCanvasJson();r.forEach((function(t){if(t){if(p===Dx.FREE_STYLE?ti(t,v,f):t.isDrawingMode=!1,p===Dx.MOVE_AND_RESIZE&&(ei(t,!0),qr(t)),p===Dx.DELETE_SELECTED_OBJECTS){var n=t.getActiveObjects();n.length&&(n.forEach((function(e){t.remove(e)})),t.discardActiveObject().renderAll(),S({drawingType:C}),e.saveCanvasJson())}""===w&&0===E||e.updateSelectedObjectsStyles(t,""!==w?w:null,0!==E?E:null),k&&($r(t,k),e.saveCanvasJson()),O&&(Vr(t,O),e.saveCanvasJson()),I&&(Gr(t,I),e.saveCanvasJson()),M&&(Yr(t,M),e.saveCanvasJson())}}))}})),G()(V()(e),"getCanvasJson",(function(e){e.includeDefaultValues=!1;var t=JSON.parse(JSON.stringify(e));return t.width=2*e.pdfInfo.originalWidth,t.height=2*e.pdfInfo.originalHeight,t})),G()(V()(e),"saveCanvasJson",(function(){var t=e.state.canvases,n=e.props,r=n.editChapterAttachmentSketch,i=n.deleteChapterAttachmentSketch,a=n.editVideoAttachmentSketch,o=n.deleteVideoAttachmentSketch,s=n.attachmentReview,l=(s=void 0===s?{}:s).attachmentId,c=s.videoId,u=s.chapterId,d=n.videoId,h=!1,f={},p=(t.flatMap((function(t,n){var r=e.getCanvasJson(t).objects;if(!Object(Y.isEmpty)(r)){h=!0;var i=e.getCanvasJson(t);return i.pageNumber=n,f[n.toString()]=JSON.stringify(i),[i]}return[]})),u?i:o);h?(u?r:a)({videoId:c||d,chapterId:u,fileId:l,sketchPages:f}):p({videoId:c||d,chapterId:u,fileId:l})})),G()(V()(e),"loadCanvasObjects",(function(e,t){if(e)try{e.clear(),ni(e,JSON.stringify(t),e.pdfInfo.originalWidth,e.pdfInfo.originalHeight,!1)}catch(t){e.loadFromJSON({},e.renderAll.bind(e)),console.log("Loading pdf canvas objects from Json failed",t)}})),G()(V()(e),"toggleEditOnObject",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.selectable=t,e.hasControls=t,e.hasBorders=t,e.lockMovementX=!t,e.lockMovementY=!t,e.editable=t})),G()(V()(e),"exportToPdf",(function(){var t=e.props,n=t.updateCanvasProperties,r=t.prevDrawingType,i=e.state.canvases,a=Array.from(document.getElementsByClassName("react-pdf__Page__canvas")),o=i[0].pdfInfo.originalWidth,s=i[0].pdfInfo.originalHeight,l=new wr.a(o>s?"l":"p","px",[o,s],!0);a.forEach((function(e,t){var n=document.getElementById("canvas_".concat(t+1));o=i[t].pdfInfo.originalWidth,s=i[t].pdfInfo.originalHeight,t>0&&(l.addPage([o,s],o>s?"l":"p"),l.setPage(t+1)),l.addImage(e,"JPEG",0,0,o,s,"pdf"+t,"SLOW"),l.addImage(n,"PNG",0,0,o,s,"canvas"+t,"FAST")})),e.setState({isExportingCb:!0}),l.save("download.pdf"),n({drawingType:r})})),G()(V()(e),"updateSelectedObjectsStyles",(function(t,n,r){var i=t.getActiveObjects();(Jr(n,r),i.length)&&(i.forEach((function(e){n&&e.set("stroke",n),r&&e.set("strokeWidth",r)})),e.saveCanvasJson(),(0,e.props.resetEditModeStyles)(),t.renderAll())})),G()(V()(e),"componentWillUnmount",(function(){e.timer&&clearTimeout(e.timer)})),G()(V()(e),"buildPdfFile",(function(){var t=e.props.url;e.setState({file:{url:t},isLoading:!0,numPages:0,pageHeight:null})})),G()(V()(e),"handleDocumentLoadSuccess",(function(t){var n=e.props.onLoadSuccess;e.setState({numPages:t.numPages}),n&&n(t)})),G()(V()(e),"handlePageRenderSuccess",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(arguments.length>1&&arguments[1],e.props.isToolbarShown,e.state);n.canvases,n.numPages,n.areCanvasesRendered,t.originalWidth,t.originalHeight,t.width,t.height;e.timer=setTimeout((function(){var n=e.props.onRenderSuccess,r=t.originalHeight||document.querySelector(".react-pdf__Page").offsetHeight,i=t.originalWidth||document.querySelector(".react-pdf__Page").offsetWidth;x.c.getCurrentVideoCategory();e.setState({isLoading:!1,pageHeight:r,pageWidth:i}),n&&n({pageHeight:r,pageWidth:i})}))})),G()(V()(e),"removeTextLayerOffset",(function(){document.querySelectorAll(".react-pdf__Page__textContent").forEach((function(e){var t=e.style;t.top="0",t.left="0",t.transform=""}))})),G()(V()(e),"handlePageListScroll",(function(t){var n=e.props.onScroll;n&&n(t)})),G()(V()(e),"pageRenderer",(function(t){var n=t.index,r=t.style,i=e.props,a=i.scale,o=i.width,s=e.state.pageWidth;return v.a.createElement("div",{className:P()(s*a<o&&"d-flex justify-content-center"),style:r},v.a.createElement(Px.Page,{key:"page_".concat(n+1),pageNumber:n+1,width:s*a-e.sizeScrollbar,loading:null,renderTextLayer:!1,renderAnnotationLayer:!1}))})),e}return c()(n,[{key:"componentDidMount",value:function(){this.buildPdfFile()}},{key:"render",value:function(){var e=this,t=this.props,n=(t.url,t.width),r=t.height,i=(t.onLoadSuccess,t.onRenderSuccess,t.onScroll,t.pageListRef),a=t.currentViewingPage,o=t.isToolbarShown,s=(t.hideScrollBar,t.listClassName),l=t.scale,c=Yt()(t,["url","width","height","onLoadSuccess","onRenderSuccess","onScroll","pageListRef","currentViewingPage","isToolbarShown","hideScrollBar","listClassName","scale"]),u=this.state,d=u.file,h=u.isLoading,f=u.numPages,p=u.pageHeight,m=u.isRenderingCanvasObjects,g=x.c.getCurrentVideoCategory();return v.a.createElement(v.a.Fragment,null,o||g===Nx.REVIEW?v.a.createElement("div",{className:"w-100 h-100",style:{overflowY:"hidden"}},(h||m)&&v.a.createElement(Nn,null),v.a.createElement(Px.Document,Gt()({className:P()(h&&"loading"),loading:null,file:d,onLoadSuccess:this.handleDocumentLoadSuccess,onLoadError:function(){return e.setState({isLoading:!1})},options:{cMapUrl:"cmaps/",cMapPacked:!0}},c),h&&v.a.createElement(Px.Page,{key:"page_1",pageNumber:1,width:n,loading:null,renderTextLayer:!1,renderAnnotationLayer:!1,onRenderSuccess:this.handlePageRenderSuccess}),!h&&v.a.createElement("div",{style:{width:n,height:r,overflowY:"auto",overflowX:"hidden"},ref:i,onScroll:function(t){e.handlePageListScroll({scrollOffset:t.target.scrollTop})}},Rl()(Array(f)).map((function(t,r){return v.a.createElement("div",{key:"page_".concat(r+1),className:P()(xx.a.pdfPage,a===r+1&&xx.a.pdfPageActive),id:"pdfPageWrapper_".concat(r+1)},v.a.createElement(Px.Page,{pageNumber:r+1,width:n,loading:null,renderTextLayer:!1,renderAnnotationLayer:!1,onRenderSuccess:function(t){return e.handlePageRenderSuccess(t,r)}}),v.a.createElement("canvas",{id:"canvas_".concat(r+1),className:xx.a.pdfCanvas}))}))))):v.a.createElement("div",{className:"w-100 h-100 overflow-hidden"},h&&v.a.createElement(Nn,null),v.a.createElement(Px.Document,Gt()({className:P()(h&&"loading"),loading:null,file:d,onLoadSuccess:this.handleDocumentLoadSuccess,onLoadError:function(){return e.setState({isLoading:!1})},options:{cMapUrl:"cmaps/",cMapPacked:!0}},c),h&&v.a.createElement(Px.Page,{key:"page_1",pageNumber:1,width:n,loading:null,renderTextLayer:!1,renderAnnotationLayer:!1,onRenderSuccess:this.handlePageRenderSuccess}),!h&&v.a.createElement(fy,{ref:i,className:P()("custom-scrollbar",s),width:n,height:r,itemCount:f,itemSize:p*l,onScroll:this.handlePageListScroll},this.pageRenderer))))}}]),n}(v.a.Component),Rx=Object(q.b)((function(e){var t=e.canvas,n=e.cogvid;return{drawingType:t.drawingType,strokeWidth:t.strokeWidth,strokeColor:t.strokeColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,fontSize:t.fontSize,fontName:t.fontName,videoId:n.cogvidDetails.videoId,prevDrawingType:t.prevDrawingType,editModeStrokeColor:t.editModeStrokeColor,editModeStrokeWidth:t.editModeStrokeWidth,editModeBackgroundColor:t.editModeBackgroundColor,editModeFontSize:t.editModeFontSize,editModeFontStyle:t.editModeFontStyle,editModeLineStyle:t.editModeLineStyle,isDrawingTypeChange:t.isDrawingTypeChange,attachmentReview:n.attachmentReview,isToolbarShown:t.isToolbarShown,shiftKeyPress:t.shiftKeyPress,ctrlKeyPress:t.ctrlKeyPress}}),(function(e){return{updateCanvasProperties:function(t){return e(Q.b.updateCanvasProperties(t))},resetEditModeStyles:function(){return e(Q.b.resetEditModeStyles())},getChapterAttachmentSketch:function(t,n,r){return e(Q.e.getChapterAttachmentSketch(t,n,r))},editChapterAttachmentSketch:function(t,n,r){return e(Q.e.editChapterAttachmentSketch(t,n,r))},deleteChapterAttachmentSketch:function(t,n,r){return e(Q.e.deleteChapterAttachmentSketch(t,n,r))},getVideoAttachmentSketch:function(t,n,r){return e(Q.e.getVideoAttachmentSketch(t,n,r))},editVideoAttachmentSketch:function(t,n,r){return e(Q.e.editVideoAttachmentSketch(t,n,r))},deleteVideoAttachmentSketch:function(t,n,r){return e(Q.e.deleteVideoAttachmentSketch(t,n,r))}}}))(Lx);var Bx=x.g.VIDEO_CATEGORY,jx=25,Fx=300,Ux=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{currentPage:0,inputPage:0,totalPages:0,isLoading:!0,isHover:!1,scale:100,inputScale:100}),G()(V()(e),"pdfPageListRef",v.a.createRef()),G()(V()(e),"pdfPageHeight",1),G()(V()(e),"scrollOffset",0),G()(V()(e),"handleScroll",Object(Y.throttle)((function(t){var n=t.scrollOffset;e.closeChapterAttachments();var r=e.props.wrapperHeight,i=e.state,a=(i.totalPages,i.scale),o=e.pdfPageHeight*(a/100),s=Number.parseInt(r/o)+(r%o>0?1:0);s<2&&(s=2);var l=Math.ceil((n+r/s)/o);e.scrollOffset=n,e.state.currentPage!==l&&e.setState({currentPage:l,inputPage:l})}),100,{trailing:!1})),G()(V()(e),"closeChapterAttachments",(function(){var t=e.props,n=t.toggleDisplayChapterAttachments;t.showChapterAttachments&&n(!1)})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.attachmentId,r=t.wrapperWidth,i=e.props,a=i.attachmentId,o=i.wrapperWidth;a&&a!==n&&e.setState({isLoading:!0,currentPage:0,inputPage:0,totalPages:0,scale:1}),o!==r&&e.pdfPageListRef.current&&(e.widthChanged=!0)})),G()(V()(e),"jumpToCurrentPage",(function(){var t=e.state,n=t.currentPage,r=t.scale,i=e.props.isToolbarShown,a=x.c.getCurrentVideoCategory();i||a===Bx.REVIEW?e.pdfPageListRef.current.scrollTop=e.pdfPageHeight*r*(n-1):e.pdfPageListRef.current.scrollToItem(n-1,"start")})),G()(V()(e),"handleAttachmentReviewClose",(function(){var t=e.props,n=t.updateReviewAttachment,r=t.resetCanvasProperties;n({attachmentId:""}),r(),x.c.displayCoverImage()})),G()(V()(e),"handlePDFLoadSuccess",(function(t){e.setState({currentPage:1,inputPage:1,totalPages:t.numPages})})),G()(V()(e),"handlePDFRenderSuccess",(function(t){var n=t.pageHeight,r=t.pageWidth,i=e.props.wrapperWidth;e.pdfPageHeight=n,e.pdfPageWidth=r;var a=Number.parseInt(i/r*100);e.setState({isLoading:!1,scale:a,inputScale:a}),e.widthChanged&&(e.jumpToCurrentPage(),e.widthChanged=!1)})),G()(V()(e),"handleCurrentPageChange",(function(t){e.setState({currentPage:t,inputPage:t},e.jumpToCurrentPage)})),G()(V()(e),"handleChange",(function(t){var n=t.target,r=""===n.value?"":Number(n.value),i=n.name;i&&e.setState((function(e){return G()({},i,Number.isNaN(r)?e[i]:r)}))})),G()(V()(e),"handleKeyDown",(function(t){t.nativeEvent.stopImmediatePropagation(),13===t.keyCode&&("inputPage"===t.target.name?e.handleCurrentPageSubmit():e.handleScaleSubmit())})),G()(V()(e),"handleCurrentPageSubmit",(function(){var t=e.state,n=t.inputPage,r=t.currentPage,i=t.totalPages;n!==r&&(""===n||n>i||n<1?e.setState({inputPage:r}):e.setState({currentPage:n},e.jumpToCurrentPage))})),G()(V()(e),"handleScaleSubmit",(function(){var t=e.state,n=t.inputScale,r=t.scale;if(n!==r){var i=function(){e.adjustScrollPosition(n/r)};""===n?e.setState({inputScale:r}):n>Fx?e.setState({scale:Fx,inputScale:Fx},i):n<jx?e.setState({scale:jx,inputScale:jx},i):e.setState({scale:n},i)}})),G()(V()(e),"adjustScrollPosition",(function(t){var n=Object(Y.get)(e.pdfPageListRef,"current.state.scrollOffset",0);e.pdfPageListRef.current.scrollTo(n*t)})),G()(V()(e),"handleWrapperResize",Object(Y.debounce)((function(t){var n=e.state.scale;e.setState({inputScale:Number.parseInt(n*t)},e.handleScaleSubmit)}),100)),G()(V()(e),"handleZoomOutClick",(function(t){var n=e.state.scale;if(n!==jx){var r=n-(n%10||10);e.setState({inputScale:r},e.handleScaleSubmit)}})),G()(V()(e),"handleZoomInClick",(function(t){var n=e.state.scale;if(n!==Fx){var r=n+(10-n%10);e.setState({inputScale:r},e.handleScaleSubmit)}})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.url,i=n.attachmentId,a=n.fileName,o=n.fileType,s=n.wrapperWidth,l=n.wrapperHeight,c=n.isPaused,u=n.className,d=n.thumbnailUrl,h=n.freeDownload,f=this.state,p=f.currentPage,m=f.inputPage,g=f.isLoading,b=f.totalPages,y=f.isHover,A=f.scale,_=f.inputScale;if(!i)return null;var w=!h&&!r,E=o.match(/pdf/)&&!w,S=o.match(/jpeg|jpg|png/)&&!w;return v.a.createElement("div",{className:P()(xx.a.reviewWrapper,g&&"u-pointer-event-none",!c&&"invisible",u),onClick:this.closeChapterAttachments,onMouseOver:y?null:function(){return e.setState({isHover:!0})},onMouseLeave:function(){return e.setState({isHover:!1})}},v.a.createElement("div",{"data-html2canvas-ignore":"true",className:P()(xx.a.attachmentToolbar,c&&y&&"u-opacity-100",this.pdfPageHeight*(A/100)>l&&xx.a.withScrollbar)},v.a.createElement("div",{className:"".concat(xx.a.attachmentName," text-truncate")},a),v.a.createElement("div",{className:P()("h-100 d-flex align-items-center",g&&"u-pointer-event-none",!E&&"invisible")},v.a.createElement(RE,{value:p,onChange:this.handleCurrentPageChange,min:1,max:b},v.a.createElement("input",{autoComplete:"off",className:xx.a.pageInput,name:"inputPage",value:m,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleCurrentPageSubmit}),v.a.createElement("span",{className:"ml-1 mr-2"},"/ ".concat(b))),v.a.createElement("div",{className:"h-75 mx-2 border-dark border-left u-opacity-50"}),v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement(Qt,{className:"u-fs-3o4",disabled:A===jx,onClick:this.handleZoomOutClick},v.a.createElement("i",{className:"fv fuvi-minute-icon"})),v.a.createElement("input",{autoComplete:"off",className:xx.a.scaleInput,name:"inputScale",value:_,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleScaleSubmit}),v.a.createElement("div",{className:xx.a.percentLabel},"%"),v.a.createElement(Qt,{className:"u-fs-3o4",disabled:A===Fx,onClick:this.handleZoomInClick},v.a.createElement("i",{className:"fv fuvi-plus-icon"})))),v.a.createElement("div",{className:xx.a.closeButton},v.a.createElement(Qt,{className:"ml-2 p-1 u-fs-3o4",onClick:this.handleAttachmentReviewClose},v.a.createElement("i",{className:"fv fuvi-delete"})))),E&&v.a.createElement("div",{className:P()(xx.a.attachmentContent,"w-100 h-100")},v.a.createElement(Rx,{url:r,width:s,height:l,scale:A/100,pageListRef:this.pdfPageListRef,onScroll:g?null:this.handleScroll,onLoadSuccess:this.handlePDFLoadSuccess,onRenderSuccess:this.handlePDFRenderSuccess,currentViewingPage:p})),S&&v.a.createElement(Lb,{className:P()(xx.a.attachmentContent,"fv-smooth-scroll w-100 h-100"),containerClassName:"w-100 u-min-h-100 d-flex justify-content-center flex-column"},v.a.createElement("img",{alt:"image attachment",className:P()("w-100",g&&"invisible"),src:r,onLoad:function(){return e.setState({isLoading:!1})},onError:function(){return e.setState({isLoading:!1})}}),g&&v.a.createElement(Nn,null)),w&&v.a.createElement("div",{className:P()(xx.a.attachmentContent,"fv-smooth-scroll w-100 h-100")},v.a.createElement("img",{alt:"locked attachment",className:P()("w-100 h-100",g&&"invisible"),style:{objectFit:"contain"},src:d,onLoad:function(){return e.setState({isLoading:!1})},onError:function(){return e.setState({isLoading:!1})}}),g&&v.a.createElement(Nn,null)),!E&&!S&&!w&&v.a.createElement("div",{className:"w-100 h-100 d-flex justify-content-center align-items-center"},t("message.unsupportedFileType")))}}]),r}(v.a.Component),Hx=Object(q.b)((function(e){var t=e.cogvid,n=e.canvas;return{attachmentId:t.attachmentReview.attachmentId,url:t.attachmentReview.url,fileName:t.attachmentReview.fileName,fileType:t.attachmentReview.fileType,thumbnailUrl:t.attachmentReview.thumbnailUrl,freeDownload:t.attachmentReview.freeDownload,showChapterAttachments:t.showChapterAttachments,isPaused:t.videoTime.isPaused,isToolbarShown:n.isToolbarShown}}),(function(e){return{updateReviewAttachment:function(t,n,r){return e(Q.e.updateReviewAttachment(t,n,r))},toggleDisplayChapterAttachments:function(t){return e(Q.e.toggleDisplayChapterAttachments(t))},resetCanvasProperties:function(){return e(Q.b.resetCanvasProperties())}}}))(Ux);var zx=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{scrollTop:0}),G()(V()(e),"prevPreviewChapterId",void 0),G()(V()(e),"attachmentsRef",v.a.createRef()),G()(V()(e),"previewAttachmentsRef",v.a.createRef()),G()(V()(e),"componentDidUpdate",(function(t){var n=t.showPreviewAttachments.chapterId,r=e.props.showPreviewAttachments.chapterId;r&&r!==n&&(e.prevPreviewChapterId=r)})),G()(V()(e),"handleScroll",Object(Y.debounce)((function(t){var n=t.offset;e.setState({scrollTop:n.y})}),10)),G()(V()(e),"handlePreviewScroll",Object(Y.debounce)((function(t){var n=e.props,r=n.showVideoAttachments,i=r.videoId,a=r.chapterId,o=n.showPreviewAttachments,s=o.videoId,l=o.chapterId;if(e.setState({scrollTop:t}),i&&i===s&&a===l){if(!e.attachmentsRef||!e.attachmentsRef.scrollRef)return;e.attachmentsRef.scrollRef.scrollbar.setPosition(0,t,{withoutCallbacks:!0})}}),10)),G()(V()(e),"handlePreviewItemClick",Object(Y.debounce)((function(){e.attachmentsRef&&e.attachmentsRef.scrollRef&&e.attachmentsRef.scrollRef.scrollbar.setPosition(0,e.state.scrollTop,{withoutCallbacks:!0})}),100)),G()(V()(e),"handlePreviewAttachmentsChange",(function(){if(e.attachmentsRef&&e.attachmentsRef.scrollRef&&e.previewAttachmentsRef&&e.previewAttachmentsRef.scrollRef){var t=e.props,n=t.reviewAttachmentId,r=t.showVideoAttachments,i=r.videoId,a=r.chapterId,o=t.showPreviewAttachments,s=o.videoId,l=o.chapterId;if(i&&i===s&&a===l){var c=e.attachmentsRef.state.attachments,u=e.attachmentsRef.scrollRef.scrollbar,d=u.scrollTop,h=u.offset.y,f=u.limit.y,p=e.previewAttachmentsRef,m=p.heightItem,g=p.heightScrollView,v=p.scrollRef,b=p.indicatorScrollRef,y=Math.min(c.length*m,g);if(n){var A=c.findIndex((function(e){var t=e.contentId,r=e.uploadingProgressData,i=(r=void 0===r?{}:r).fileId;return n===t||n===i}));if(-1===A)return;var _=[h,h+y],w=d;Y.inRange.apply(void 0,[(A+.5)*m].concat(_))||(w=Math.min(A*m,f,c.length*m));var E=w+y-(A+1)*m;e.previewAttachmentsRef.setState({indicatorIndex:A}),v.scrollbar.setPosition(0,w,{withoutCallbacks:!0}),b.scrollbar.setPosition(0,E,{withoutCallbacks:e.prevPreviewChapterId!==a})}else{v.scrollbar.setPosition(0,d,{withoutCallbacks:!0});var S=Math.round(d/m),C=Math.min(S*m,f,c.length*m)+y-(S+1)*m;e.previewAttachmentsRef.setState({indicatorIndex:S}),b.scrollbar.setPosition(0,C,{withoutCallbacks:!0})}}}})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.showVideoAttachments,r=t.showPreviewAttachments;return v.a.createElement("div",{className:P()(xx.a.attachmentsView,(n.videoId||r.videoId)&&xx.a.attachmentsViewActive)},v.a.createElement(eO,Gt()({},n,{attachmentsRef:function(t){e.attachmentsRef=t},className:P()(r.videoId&&"invisible")})),v.a.createElement(eO,Gt()({isPreviewMode:!0},r,{activeChapterId:null==n?void 0:n.chapterId,attachmentsRef:function(t){e.previewAttachmentsRef=t},className:P()(!r.videoId&&"invisible"),onPreviewItemClick:this.handlePreviewItemClick,onPreviewAttachmentsChange:this.handlePreviewAttachmentsChange})))}}]),n}(g.Component),Vx=Object(q.b)((function(e){var t=e.cogvid;return{showVideoAttachments:t.showVideoAttachments,showPreviewAttachments:t.showPreviewAttachments,reviewAttachmentId:t.attachmentReview.attachmentId}}))(zx);function Wx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wx(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qx=x.g.VIDEO_CATEGORY,Yx=x.g.SEARCH_PARAM,Kx=x.g.PROGRESS_STATUS,Xx=x.g.ATTACHED_SUCCESSFULLY,Qx=x.g.CONTENT_SERVICES_ENDPOINT,$x=x.g.CHAPTER_TYPES,Jx=x.g.BASE64_IMAGE_PREFIX,Zx=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{attachments:[],deleteAttachment:null,showAddAttachmentForm:!1,toBeUploadedFiles:[],isLoadingAttachments:!0,activeAttachment:null,isEditingAttachment:!1,attachmentCount:0,indicatorIndex:0}),G()(V()(e),"updated",!1),G()(V()(e),"scrollRef",v.a.createRef()),G()(V()(e),"indicatorScrollRef",v.a.createRef()),G()(V()(e),"heightItem",0),G()(V()(e),"heightScrollView",0),G()(V()(e),"heightScrollContent",0),G()(V()(e),"handleWindowBeforeUnload",(function(e){var t=x.c.getToken();x.c.isUploadingAttachment()&&t?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),G()(V()(e),"handleKeyDown",(function(t){var n=t.code,r=t.keyCode,i=e.props.attachmentReviewId;if(i&&window.isFullscreenMode){var a=e.state.attachments,o=void 0===a?[]:a,s=Object(Y.findIndex)(o,{contentId:i});("ArrowLeft"===n||37==r)&&s>0?e.handleItemClick(null,o[s-1]):("ArrowRight"===n||39==r)&&s<o.length-1&&e.handleItemClick(null,o[s+1])}})),G()(V()(e),"componentWillUnmount",(function(){var t=e.props,n=t.attachmentsRef,r=t.chapterId;n&&n(void 0),window.removeEventListener("beforeunload",e.handleWindowBeforeUnload),window.removeEventListener("resize",e.calculateElementDimension),document.removeEventListener("keydown",e.handleKeyDown);var i=document.getElementById("attachments-".concat(r,"-indicator"));i&&i.removeEventListener("click",e.handlePreviewItemClick)})),G()(V()(e),"calculateElementDimension",(function(){e.heightItem=x.c.convertRemToPx(kx.heightAttachmentItem),e.heightScrollView=e.scrollRef?e.scrollRef.scrollbar.containerEl.offsetHeight:0;var t=e.state.attachments;e.heightScrollContent=Math.min(t.length*e.heightItem,e.heightScrollView)})),G()(V()(e),"handlePreviewItemClick",(function(t){var n=e.props,r=n.videoId,i=n.chapterId,a=n.showVideoAttachments,o=n.attachmentReviewId,s=n.displayVideoAttachments,l=n.updateReviewAttachment,c=n.onPreviewItemClick,u=e.state,d=u.attachments[u.indicatorIndex];if(d){var h=e.getAttachmentList(r,i);if(Object(Y.find)(h,{contentId:d.contentId})){var f=d.contentId,p=void 0===f?"":f,m=d.uploadingProgressData,g=(m=void 0===m?{}:m).status;if(!(!p&&(void 0===g?"":g)!==Xx)){if(o===p)return e.handleBackToShowHeadingChapterCoverImage(),s({}),l({attachmentId:""}),void t.stopPropagation();r===a.videoId&&i===a.chapterId&&t.stopPropagation(),c&&c(),e.handleItemClick(null,d)}}else e.updateVideoAttachments()}else l({attachmentId:""})})),G()(V()(e),"getAttachmentList",(function(e,t){var n=Object(Y.get)(GA.a.getState(),"cogvid"),r=n.videoAttachments,i=void 0===r?{}:r,a=n.chapterAttachments;return(t?Object(Y.get)(a,[e,t],[]):i[e])||[]})),G()(V()(e),"updateVideoAttachments",(function(t){var n=e.props,r=n.videoId,i=n.chapterId,a=n.showVideoAttachments,o=n.isPreviewMode,s=n.displayCoverImage,l=e.getAttachmentList(r,i),c=l.length!==e.state.attachments.length;e.setState((function(e){return{attachments:l,isLoadingAttachments:!1,isEditingAttachment:0!==l.length&&e.isEditingAttachment}}),(function(){l.map((function(t){!t.thumbnailUrl||t.thumbnail||t.isLoadingThumbnail||setTimeout((function(){e.loadAttachmentThumbnail(t)}),500)})),o&&(t||c)&&(e.heightScrollContent=Math.min(l.length*e.heightItem,e.heightScrollView),i!==a.chapterId&&e.indicatorScrollRef.scrollbar.setPosition(0,e.heightScrollContent),0===l.length&&s({})),c&&e.updateVideoAttachmentCount(r,i),c&&e.checkFilesUpload(r,i)}))})),G()(V()(e),"updateVideoAttachmentCount",(function(t,n){var r=e.props,i=r.updateCogvidListItem,a=r.updateChapterItemInCache;(n?a:i)({videoId:t,chapterId:n,data:{attachmentCount:e.getAttachmentList(t,n).filter((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).status;return t||r===Xx})).length}})})),G()(V()(e),"updateAttachmentInCache",(function(t){var n=t.chapterId,r=e.props,i=r.updateVideoAttachmentInCache,a=r.updateChapterAttachmentInCache;n?a(t):i(t)})),G()(V()(e),"checkFilesUpload",(function(t,n){var r=e.getAttachmentList(t,n);if(r&&r.length>0){var i=Object(Y.filter)(r,(function(e){var t=e.started,n=e.uploadingProgressData;if(!n||!t)return!1;var r=n.status,i=n.isFailed;return r!==Xx&&t&&!i})).length;if(i<1){var a=1-i,o=Object(Y.get)(GA.a.getState(),"progress").uploader;r.asMutable().reverse().some((function(r){var i=r.id,s=r.started;return!(!o[i]||s)&&(e.updateAttachmentInCache({videoId:t,chapterId:n,id:i,data:{started:!0}}),setTimeout((function(){e.props.startAFileUpload(i)})),0===--a)}))}}})),G()(V()(e),"attachFileToVideo",(function(t){var n=t.id,r=t.uploadingProgressData,i=(r=void 0===r?{}:r).fileId,a=r.videoId,o=r.chapterId,s=e.props,l=s.attachFilesToVideo,c=s.getVideoAttachments,u=s.attachFilesToChapter,d=s.getVideoChaptersAttachments,h=s.updateIsUploadingAttachment,f=s.chapterSeqNumber;(o?u:l)({attachmentIds:[i],videoId:a,chapterId:o,chapterSeqNumber:f},(function(){e.updateAttachementUploadingProgress({id:n,data:{status:Xx},videoId:a,chapterId:o}),a.includes(x.g.DUMMY_DAILY_VIDEO_ID_PREFIX)||(o?d({videoId:a}):c({videoId:a})),e.checkFilesUpload(a,o),e.updateVideoAttachmentCount(a,o),h(x.c.isUploadingAttachment())}),(function(){e.updateAttachementUploadingProgress({id:n,data:{isFailed:!0,videoId:a,chapterId:o},videoId:a,chapterId:o}),e.checkFilesUpload(a,o)}))})),G()(V()(e),"getResumableHeaders",(function(){var e=(x.c.getToken()||{}).accessToken;return{Authorization:"Bearer ".concat(e)}})),G()(V()(e),"createResumableUpload",(function(t){var n=t.file,r=t.id,i=t.title,a=t.seqNumber,o=t.videoId,s=t.chapterId;return(0,e.props.updateIsUploadingAttachment)(!0),new nC(n,{endpoint:"".concat(Qx,"attachments"),headers:e.getResumableHeaders(),metadata:{name:n.name,title:i,seqNumber:a},retryDelays:[0,3e3,5e3,1e4,2e4],onError:function(){e.updateAttachementUploadingProgress({id:r,data:{isFailed:!0,videoId:o,chapterId:s},videoId:o,chapterId:s}),e.checkFilesUpload(o,s)},onProgress:function(t,n){var i=x.c.percentage(t/n);e.updateAttachementUploadingProgress({id:r,data:{bytesUploaded:t,bytesTotal:n,now:i,status:Kx.UPLOADING,isFailed:!1},videoId:o,chapterId:s})},onSuccess:function(){e.updateAttachementUploadingProgress({id:r,data:{status:Kx.DONE},videoId:o,chapterId:s});var t=Object(Y.get)(GA.a.getState(),"cogvid"),n=t.videoAttachments,i=t.chapterAttachments,a=s?Object(Y.get)(i,[o,s],[]):n[o],l=Object(Y.find)(a,{id:r});l&&e.attachFileToVideo(l)},onAfterResponse:function(t,n){var i=n.getHeader("location");if(i){var a=i.split("attachments/")[1];e.updateAttachementUploadingProgress({id:r,data:{fileId:a,videoId:o,chapterId:s},videoId:o,chapterId:s})}}})})),G()(V()(e),"updateAttachementUploadingProgress",(function(t){var n=t.id,r=t.data,i=t.videoId,a=t.chapterId,o=e.getAttachmentList(i,a).find((function(e){return e.id===n}));o&&e.updateAttachmentInCache({videoId:i,chapterId:a,id:n,data:{uploadingProgressData:Gx(Gx({},o.uploadingProgressData),r)}})})),G()(V()(e),"handleUploaderStart",(function(t){t&&(t.options.headers=e.getResumableHeaders(),t.start())})),G()(V()(e),"handleRetryUpload",Object(Y.debounce)((function(t){var n=e.props,r=n.getAttachmentInfo,i=n.startAFileUpload,a=t.id,o=t.uploadingProgressData,s=(o=void 0===o?{}:o).status,l=o.fileId;s!==Kx.DONE?i(a):r({fileId:l},(function(n){n&&e.attachFileToVideo(t)}),(function(){i(a)}))}),500)),G()(V()(e),"handleItemCancel",(function(t,n){t&&t.stopPropagation();var r=n.uploadingProgressData,i=n.uploadingProgressData,a=(i=void 0===i?{}:i).fileId,o=n.id,s=n.started,l=e.props,c=l.videoId,u=l.chapterId,d=l.deleteVideoAttachmentInCache,h=l.deleteChapterAttachmentInCache,f=l.updateIsUploadingAttachment,p=l.removeUploader,m=Object(Y.get)(GA.a.getState(),"progress").uploader[o];m&&(s&&r&&m.abort(),p([o])),(u?h:d)({deleteFileId:a||o,videoId:c,chapterId:u}),f(x.c.isUploadingAttachment())})),G()(V()(e),"handleFilesDrop",(function(t){var n=e.handleFilesSelect(t);n&&e.setState({showAddAttachmentForm:!0,toBeUploadedFiles:n})})),G()(V()(e),"handleFilesSelect",(function(n){var r=Object(Y.sortBy)(n,(function(e){return e.path})),i=[];if(r.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),i.push(e)})),!(i.length<1))return 0===i.length?(x.e.error(t("message.attachmentRequired")),!1):void e.handleFilesAttach(i);x.e.warn(t("message.attachmentSupportedFiles"))})),G()(V()(e),"handleFilesAttach",(function(n){var r=e.props,i=r.videoId,a=r.chapterId,o=r.chapterSeqNumber,s=r.createDailyVideo,l=r.showVideoAttachments,c=r.displayVideoAttachments;0!==n.filter((function(e){return e.type.match(/pdf|png|jpg|jpeg/)})).length?i.includes(x.g.DUMMY_DAILY_VIDEO_ID_PREFIX)?s({},(function(t){var r=Object(Y.get)(t.chapters[o],"uid",a),i=t.videoId;c(Gx(Gx({},l),{},{videoId:i,chapterId:r})),e.attachFiles(n,i,r)})):e.attachFiles(n):x.e.info(t("message.attachmentSupportedFiles"))})),G()(V()(e),"attachFiles",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.props.videoId,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.props.chapterId,i=e.state.attachments,a={},o=i.length,s=t.map((function(t,i){var s=o++,l="".concat(t.name,"d=").concat(Date.now(),"i=").concat(i),c=Ql.a.basename(t.path,Ql.a.extname(t.path));return a[l]=e.createResumableUpload({file:t,id:l,title:c,seqNumber:s,videoId:n,chapterId:r}),{id:l,fileName:c,mediaType:t.type,thumbnail:"",fileSize:t.size,title:c,seqNumber:s,started:!1,uploadingProgressData:{status:Kx.UPLOADING}}})).reverse(),l=e.props,c=l.addVideoAttachments,u=l.addChapterAttachments,d=l.addUploader,h=l.chapterSeqNumber;d(a),(r?u:c)({files:s,videoId:n,chapterId:r,chapterSeqNumber:h})})),G()(V()(e),"handleDeleteAttachment",(function(t){var n=t.contentId,r=t.uploadingProgressData,i=(r=void 0===r?{}:r).fileId,a=e.props,o=a.videoId,s=a.chapterId,l=a.attachmentReviewId,c=a.deleteVideoAttachment,u=a.deleteChapterAttachment,d=a.updateReviewAttachment,h=a.userScaffId;(s?u:c)({fileId:n||i,videoId:o,chapterId:s,userScaffId:h},(function(){e.setState({activeAttachment:null}),l!==n&&l!==i||d({attachmentId:""})}))})),G()(V()(e),"handleItemClick",(function(t,n){t&&t.stopPropagation();var r=n.uploadingProgressData,i=void 0===r?{}:r,a=n.freeDownload,o=n.contentId||i.fileId,s=e.state.attachments.find((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).fileId;return o===t||o===r}));if(s){var l=e.props,c=l.updateReviewAttachment,u=l.displayCoverImage,d=l.resetCanvasProperties,h=l.chapterId;c({url:n.url,fileName:n.title||s.fileName,fileType:n.mediaType,thumbnailUrl:n.thumbnailUrl,attachmentId:o,videoId:s.videoId,chapterId:s.chapterId,freeDownload:a}),u({}),!x.r.paused()&&x.r.pause(),d(),h?x.c.changeURLWithoutSideEffect([[Yx.KEY.ATTACHMENT_ID,n.contentId],[Yx.KEY.CHAPTER_ATTACHMENT_ID,h]]):x.c.changeURLWithoutSideEffect([[Yx.KEY.ATTACHMENT_ID,n.contentId],[Yx.KEY.CHAPTER_ATTACHMENT_ID]]),e.setState({activeAttachment:n})}})),G()(V()(e),"handleDownloadAttachment",(function(t,n){t.stopPropagation();var r=n.mediaType,i=n.url,a=n.videoId,o=n.chapterId,s=n.contentId;if(n.freeDownload||i){var l=e.props,c=l.ownerScaffId,u=l.userScaffId,d=l.downloadAttachment,h=l.trackingDownloadAttachment;a&&o&&s&&h({videoId:a,chapterId:o,attachmentId:s,userScaffId:c||u}),d({url:i},(function(e){var t=new Blob([e],{type:r}),i=URL.createObjectURL(t),a=document.createElement("a");a.href=i,a.download=n.fileName,document.body.appendChild(a),a.click(),document.body.removeChild(a)}))}})),G()(V()(e),"handleAddFilesButtonClick",(function(){x.r.paused()||x.r.pause()})),G()(V()(e),"loadAttachmentThumbnail",function(){var t=H()(F.a.mark((function t(n){var r,i,a,o,s,l,c,u,d,h,f,p;return F.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.contentId,i=n.uploadingProgressData,a=(i=void 0===i?{}:i).fileId,o=i.videoId,s=i.chapterId,l=n.id,c=void 0===l?"":l,u=n.thumbnailUrl,d=o||e.props.videoId,h=s||e.props.chapterId,t.prev=5,e.updateAttachmentInCache({contentId:r||a,id:c,videoId:d,chapterId:h,data:{thumbnail:"",isLoadingThumbnail:!0}}),t.next=9,Tx.a.get(u,{responseType:"arraybuffer"});case 9:f=t.sent,p=x.c.arrayBufferToBase64(f.data),e.updateAttachmentInCache({contentId:r||a,id:c,videoId:d,chapterId:h,data:{thumbnail:"".concat(Jx,",").concat(p),isLoadingThumbnail:!1}}),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(5),e.updateAttachmentInCache({contentId:r||a,id:c,videoId:d,chapterId:h,data:{thumbnail:I.a.loadingFailedIcon,isLoadingThumbnail:!1}});case 17:case"end":return t.stop()}}),t,null,[[5,14]])})));return function(e){return t.apply(this,arguments)}}()),G()(V()(e),"handleModalMouseLeave",(function(){window.isCAModalHovered=!1,x.c.closeChapterAttachmentModal()})),G()(V()(e),"handleAttachmentUpdate",(function(t,n,r){var i=t.contentId,a=t.uploadingProgressData,o=(a=void 0===a?{}:a).fileId,s=e.props,l=s.videoId,c=s.chapterId,u=s.attachmentReviewId,d=s.updateVideoAttachment,h=s.updateReviewAttachment,f=s.updateChapterAttachment;(c?f:d)({fileId:o,contentId:i,videoId:l,chapterId:c,data:n,userScaffId:s.userScaffId},(function(){r&&r()}),(function(){r&&r()})),u!==i&&u!==o||h({fileName:n.title})})),G()(V()(e),"handleAttachmentSwapping",(function(t,n){var r=e.props,i=r.videoId,a=r.chapterId,o=r.replaceVideoAttachments,s=r.replaceVideoChapterAttachments,l=e.getAttachmentList(i,a),c=l[t];(a?s:o)({videoId:i,chapterId:a,attachments:Kl()(l,{$splice:[[t,1],[n,0,c]]})})})),G()(V()(e),"handleAttachmentOrderUpdate",(function(t){var n=t.id,r=t.index,i=e.props,a=i.videoId,o=i.chapterId,s=i.updateVideoAttachmentOrder,l=i.updateChapterAttachmentOrder;(o?l:s)({fileId:n,contentId:n,videoId:a,chapterId:o,seqNumber:r})})),G()(V()(e),"handleAttachmentEditClick",(function(){return e.setState((function(e){return{isEditingAttachment:!e.isEditingAttachment}}))})),G()(V()(e),"handleAttachmentThumbnailUpdate",(function(t,n,r){var i=t.contentId,a=t.uploadingProgressData,o=(a=void 0===a?{}:a).fileId,s=e.props,l=s.videoId,c=s.chapterId,u=s.updateVideoAttachmentThumbnail,d=s.updateChapterAttachmentThumbnail,h=s.userScaffId;x.c.snapshotFirstArea((function(e){(c?d:u)({fileId:o,contentId:i,videoId:l,chapterId:c,file:e,userScaffId:h},n,r)}))})),G()(V()(e),"handleUpdateUrl",(function(){x.c.changeURLWithoutSideEffect([[Yx.KEY.ATTACHMENT_ID],[Yx.KEY.CHAPTER_ATTACHMENT_ID]])})),G()(V()(e),"updateTrackingAttachments",(function(){var t=e.props,n=t.videoScaffId,r=t.videoId,i=t.chapterId,a=t.updateTrackingObject,o=x.c.getCurrentVideoCategory();if(n&&i&&[qx.BRAINHIVE,qx.MESSAGES].includes(o)){var s=e.getAttachmentList(r,i),l=Object(Y.get)(s,"[0].createdAt");a({trackingObject:n,trackingProperty:"".concat(i,".attachments"),maxReadValue:l})}})),G()(V()(e),"getAttachmentStatistics",(function(){var t=e.props,n=t.videoScaffId,r=t.chapterId,i=t.chapters,a=t.videoStatistics,o=Object(Y.find)(i,{uid:r}),s=Object(Y.get)(a,[n,r],{}).attachments>0;return{attachmentCount:(null==o?void 0:o.attachmentCount)||0,hasNewAttachments:s}})),G()(V()(e),"handleCloseAttachmentList",(function(){var t=e.props,n=t.displayVideoAttachments,r=t.updateReviewAttachment,i=t.resetCanvasProperties;n({}),r({attachmentId:""}),i(),e.handleBackToShowHeadingChapterCoverImage(),e.handleUpdateUrl()})),G()(V()(e),"handleBackToShowHeadingChapterCoverImage",(function(){var t=e.props,n=t.chapterHighlighting,r=t.rootReviewContext,i=t.displayCoverImage,a=t.rootContext,o="".concat(r||a).concat(n.image);n.image&&[$x.ATTACHMENT_ONLY.key,$x.LIVE_SESSION.key].includes(n.type)&&i({image:o,content:""})})),G()(V()(e),"handleFreeDownloadToggle",(function(t,n,r){var i=t.contentId,a=t.uploadingProgressData,o=(a=void 0===a?{}:a).fileId,s=e.props,l=s.videoId,c=s.chapterId;(0,s.updateChapterAttachmentLock)({fileId:o,contentId:i,videoId:l,chapterId:c,data:n,userScaffId:s.userScaffId},(function(){r&&r()}),(function(){r&&r()}))})),e}return c()(r,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.handleWindowBeforeUnload),document.addEventListener("keydown",this.handleKeyDown);var e=this.props,t=e.isPreviewMode,n=e.attachmentsRef;t&&(this.calculateElementDimension(),window.addEventListener("resize",this.calculateElementDimension)),n&&n(this)}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=e.videoId,i=e.videoAttachments,a=e.chapterId,o=e.chapterAttachments,s=e.attachmentReviewId,l=e.attachmentCount,c=e.attachmentId,u=t.attachments,d=this.props,h=d.videoId,f=d.chapterId,p=d.videoAttachments,m=d.chapterAttachments,g=d.attachmentReviewId,v=d.getVideoAttachments,b=d.getVideoChaptersAttachments,y=d.updateReviewAttachment,A=d.attachmentReviewChapterId,_=d.isPreviewMode,w=(d.onPreviewAttachmentsChange,d.attachmentCount),E=d.attachmentId,S=d.showVideoAttachments,C=this.state.attachments;if(h&&!f&&(h!==r||!Object(Y.isEqual)(p[h],i[h])||E!==c)){this.setState({isLoadingAttachments:!0});var T=(p[h]||[]).filter((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).status;return t||r===Xx})).length,k=w!==l&&w!==T,O=!!E;E&&p[h]&&(O=!p[h].find((function(e){return e.contentId===E}))),h!==r||!p[h]||k||O?v({videoId:h},this.updateVideoAttachments,(function(){return n.setState({isLoadingAttachments:!1})})):this.updateVideoAttachments()}if(h&&f&&(f!==a||!Object(Y.isEqual)(m[h],o[h])||E!==c)){var I,M=f!==a;this.setState({isLoadingAttachments:!0});var P=null===(I=m[h])||void 0===I?void 0:I[f],D=((P||[]).filter((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).status;return t||r===Xx})).length,!!E);E&&P&&(D=!P.find((function(e){return e.contentId===E}))),(M&&S.chapterId!==f||!m[h]||D)&&!h.includes(x.g.DUMMY_DAILY_VIDEO_ID_PREFIX)?b({videoId:h},(function(){n.updateVideoAttachments(M),_||n.updateTrackingAttachments()}),(function(){return n.setState({isLoadingAttachments:!1})})):(this.updateVideoAttachments(M),!_&&M&&this.updateTrackingAttachments()),!_&&M&&A&&A!==f&&y({attachmentId:""})}if(h&&h!==r||f&&f!==a){var N;if(g)N=this.getAttachmentList(h,f).find((function(e){var t=e.contentId;return g===t}));this.setState({activeAttachment:N||null,isEditingAttachment:!1})}if(g||g===s||this.setState({activeAttachment:null}),!Object(Y.isEqual)(C,u)){var L=C.filter((function(e){var t=e.contentId,n=e.uploadingProgressData,r=(n=void 0===n?{}:n).status;return t||r===Xx})).length;L!==this.state.attachmentCount&&this.setState({attachmentCount:L})}}}]),r}(Mx),eO=Object(q.b)((function(e){var t,n=e.cogvid,r=e.progress,i=e.notification;return{chapterHighlighting:n.chapterHighlighting,videoAttachments:n.videoAttachments,attachmentReviewId:n.attachmentReview.attachmentId,attachmentReviewChapterId:n.attachmentReview.chapterId,chapterAttachments:n.chapterAttachments,showVideoAttachments:n.showVideoAttachments,videoPermissions:n.cogvidDetails.permissions,userScaffId:n.cogvidDetails.userScaffId,ownerScaffId:n.cogvidDetails.ownerScaffId,uploader:r.uploader,rootContext:null===(t=n.cogvidDetails)||void 0===t?void 0:t.rootContext,chapters:n.cogvidDetails.chapters,videoStatistics:i.videoStatistics}}),(function(e){return{attachFilesToVideo:function(t,n,r){return e(Q.e.attachFilesToVideo(t,n,r))},deleteVideoAttachment:function(t,n,r){return e(Q.e.deleteVideoAttachment(t,n,r))},updateVideoAttachment:function(t,n,r){return e(Q.e.updateVideoAttachment(t,n,r))},updateVideoAttachmentOrder:function(t,n,r){return e(Q.e.updateVideoAttachmentOrder(t,n,r))},addVideoAttachments:function(t){return e(Q.e.addVideoAttachments(t))},replaceVideoAttachments:function(t){return e(Q.e.replaceVideoAttachments(t))},updateVideoAttachmentInCache:function(t){return e(Q.e.updateVideoAttachmentInCache(t))},updateReviewAttachment:function(t,n,r){return e(Q.e.updateReviewAttachment(t,n,r))},deleteVideoAttachmentInCache:function(t){return e(Q.e.deleteVideoAttachmentInCache(t))},downloadAttachment:function(t,n,r){return e(Q.e.downloadAttachment(t,n,r))},updateIsUploadingAttachment:function(t){return e(Q.k.updateIsUploadingAttachment(t))},displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))},displayVideoAttachments:function(t){return e(Q.e.displayVideoAttachments(t))},getVideoAttachments:function(t,n,r){return e(Q.e.getVideoAttachments(t,n,r))},updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))},getAttachmentInfo:function(t,n,r){return e(Q.g.getAttachmentInfo(t,n,r))},resetCanvasProperties:function(){return e(Q.b.resetCanvasProperties())},addChapterAttachments:function(t){return e(Q.e.addChapterAttachments(t))},getVideoChaptersAttachments:function(t,n,r){return e(Q.e.getVideoChaptersAttachments(t,n,r))},replaceVideoChapterAttachments:function(t){return e(Q.e.replaceVideoChapterAttachments(t))},updateChapterAttachment:function(t,n,r){return e(Q.e.updateChapterAttachment(t,n,r))},updateChapterAttachmentOrder:function(t,n,r){return e(Q.e.updateChapterAttachmentOrder(t,n,r))},updateChapterAttachmentInCache:function(t){return e(Q.e.updateChapterAttachmentInCache(t))},deleteChapterAttachment:function(t,n,r){return e(Q.e.deleteChapterAttachment(t,n,r))},updateChapterAttachmentLock:function(t,n,r){return e(Q.e.updateChapterAttachmentLock(t,n,r))},deleteChapterAttachmentInCache:function(t){return e(Q.e.deleteChapterAttachmentInCache(t))},attachFilesToChapter:function(t,n,r){return e(Q.e.attachFilesToChapter(t,n,r))},updateChapterItemInCache:function(t){return e(Q.e.updateChapterItemInCache(t))},updateVideoAttachmentThumbnail:function(t,n,r){return e(Q.e.updateVideoAttachmentThumbnail(t,n,r))},updateChapterAttachmentThumbnail:function(t,n,r){return e(Q.e.updateChapterAttachmentThumbnail(t,n,r))},addUploader:function(t){return e(Q.k.addUploader(t))},removeUploader:function(t){return e(Q.k.removeUploader(t))},startAFileUpload:function(t){return e(Q.k.startAFileUpload(t))},updateTrackingObject:function(t,n,r){return e(Q.h.updateTrackingObject(t,n,r))},trackingDownloadAttachment:function(t,n,r){return e(Q.e.trackingDownloadAttachment(t,n,r))},createDailyVideo:function(t,n,r){return e(Q.e.createDailyVideo(t,n,r))}}}))(Object(K.c)(Zx));var tO=x.g.SUPPORTED_VIDEO_TYPES,nO=x.g.SUPPORTED_IMG_TYPES;var rO=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(e){var r;return s()(this,n),r=t.call(this,e),G()(V()(r),"handleChange",(function(e){var t=e.target,n=t.name,i=t.value;r.setState(G()({},n,i))})),G()(V()(r),"groupItems",(function(e){var t=e.filter((function(e){return e.type.match(/image/)||x.c.isVideoFile(e)})),n=0,r=0,i=[];return e.forEach((function(e){var a=e.name,o=e.type;x.c.isVideoFile(e)||o.match(/image/)||(t.some((function(t){var i=t.name;t.type;if(!x.c.isVideoFile(t))return!1;var o=i.replace(/\.[^/.]+$/,""),s=a.replace(/\.[^/.]+$/,"");return""===Object(Y.get)(t,"subItem.name","")&&([o,i].includes(a)||[o,i].includes(s))?(t.subItem=e,r+=e.size,n++,!0):void 0}))||i.push('Subtitle file "'.concat(e.name,"\" doesn't match with any video.")))})),{groupedFiles:t,subtitleCount:n,subtitleSize:r,errors:i}})),G()(V()(r),"handleChooseFiles",(function(e){var t=r.state,n=t.toBeUploadedFiles,i=t.totalSubtitles,a=r.state,o=a.totalVideos,s=a.totalSize,l=a.totalImages,c=[];if(e.forEach((function(e,t){e.uid="".concat(Date.now(),"i=").concat(t),x.c.isVideoFile(e)&&(o++,s+=e.size),e.type.match(/image/)&&(l++,s+=e.size),c.push(e)})),c.length<1)x.e.warn("We are currently supporting video, .srt, files and images only.");else{var u=r.groupItems([].concat(Rl()(n),c)),d=u.groupedFiles,h=u.subtitleCount,f=u.subtitleSize;u.errors.forEach((function(e){x.e.warn(e)})),0!==d.length&&r.setState({toBeUploadedFiles:d,totalVideos:o,totalImages:l,totalSize:s+f,totalSubtitles:i+h})}})),G()(V()(r),"handleRemoveFile",(function(e){for(var t=r.state.toBeUploadedFiles,n=Rl()(t),i=r.state,a=i.totalVideos,o=i.totalImages,s=i.totalSubtitles,l=i.totalSize,c=0;c<n.length;c++){var u=n[c];if(u.uid===e){x.c.isVideoFile(u)?(u.subItem&&(s--,l-=u.subItem.size),a--):u.type.match(/image/)&&o--,l-=u.size,n.splice(c,1);break}if(u.subItem&&u.subItem.uid===e){s--,l-=u.subItem.size,delete u.subItem;break}}r.setState({toBeUploadedFiles:r.groupItems(n).groupedFiles,totalVideos:a,totalImages:o,totalSubtitles:s,totalSize:l})})),G()(V()(r),"prepareUploadFilesData",(function(e){var t=0,n=[];return e.forEach((function(e){e.metadata={filename:e.path,uploadSeqNumber:t++,lastModifiedDate:(e.lastModifiedDate||new Date(e.lastModified)||new Date).toISOString()},n.push(e),e.subItem&&(e.subItem.metadata={filename:e.subItem.path,videoSeqNumber:e.metadata.seqNumber,uploadSeqNumber:t++,lastModifiedDate:(e.lastModifiedDate||new Date(e.lastModified)||new Date).toISOString()},n.push(e.subItem),delete e.subItem)})),n})),G()(V()(r),"validateUploadFiles",(function(){return 0!==r.state.toBeUploadedFiles.length||(x.e.error("Please add at least one video or image from your device."),!1)})),G()(V()(r),"handleSubmitForm",(function(e){if(e.preventDefault(),r.validator.allValid()){var t=r.state,n=t.toBeUploadedFiles,i=t.totalSubtitles,a=t.totalVideos,o=t.totalImages,s=r.props,l=s.onClose,c=s.updateGalleryVideoData,u=s.galleryUid;s.currentActiveVideoType,s.updateSb,s.updateCg,s.updateCogvidDetails;if(!r.validateUploadFiles())return;var d=r.prepareUploadFilesData(n);r.props.addFilesToGallery({files:d,totalSubtitles:i,totalVideos:a,totalImages:o},(function(e,t){x.g.VIDEO_TYPE.GALLERY,c({uid:u||x.g.TEMP_GALLERY_UID,cognitiveVideo:{status:x.g.COGVID_STATUS.INITIALLIZING}}),x.e[t](e),l()}),(function(e,t){return x.e[t](e)}))}else r.validator.showMessages(),r.forceUpdate()})),G()(V()(r),"handleFormCancel",(function(){var e=r.props.onClose;r.isFormDirty()?r.setState({showConfirmationModal:!0}):e&&e()})),G()(V()(r),"isFormDirty",(function(){return r.state.toBeUploadedFiles.length>0})),r.state={keywords:[],toBeUploadedFiles:[],showConfirmationModal:!1,keywordErrorMessage:"",totalVideos:0,totalImages:0,totalSubtitles:0,totalSize:0},r.validator=new ql.a(x.c.validatorConfig),r}return n}(function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.toBeUploadedFiles,i=n.totalVideos,a=n.totalSubtitles,o=n.totalImages,s=n.totalSize,l=n.showConfirmationModal,c=this.props.onClose,u="".concat(tO,",").concat(nO,",.srt");return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:"createCogvidWrapper addGalleryWrapper",scrollable:!0,centered:!0,backdrop:"static",onEscapeKeyDown:this.handleFormCancel},v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"ml-3 ".concat(Zl.a.formTitle)},t("form.gallery")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:"px-0 py-0"},v.a.createElement($l.a,{noValidate:!0,onSubmit:this.submitCreateCognitiveVideo},v.a.createElement("div",{className:Zl.a.rightColumn},v.a.createElement(tc,{acceptedFiles:u,handleChooseFiles:this.handleChooseFiles,displayUserGuide:!1}),v.a.createElement("div",{className:Zl.a.uploadArea},v.a.createElement(QT,{receiveAcceptedFiles:this.handleChooseFiles,acceptedFiles:u,wrapperClassName:"w-100 h-100",noClick:!0},r.length>0?v.a.createElement(oc,{data:r,swapItem:this.handleItemSwapping,removeFile:this.handleRemoveFile,rearrangeable:!1,displayFullPath:!1,isGalleryForm:!0,hasTranscript:!1}):v.a.createElement(sc,null)))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100"},v.a.createElement("div",{className:"d-flex align-self-start ml-2"},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-1x1o4"})),v.a.createElement("div",{className:"u-fs-7o8 ml-2"},v.a.createElement("div",{className:"u-opacity-60"},"".concat(i," video").concat(i>1?"s":"",", ").concat(o," image").concat(o>1?"s":"",", ").concat(a," subtitle").concat(a>1?"s":"")),v.a.createElement("div",{className:"u-opacity-90",style:{fontWeight:600}},"Total (",x.c.formatFileSize(s),")")),v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleFormCancel},t("btn.cancel")),v.a.createElement(et.a,{type:"submit",variant:"outline-primary",className:"modal-button ml-4",onClick:this.handleSubmitForm},t("btn.add"))))),v.a.createElement(IC,{show:!!l,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:c,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),r}(g.PureComponent)),iO=Object(q.b)((function(e){var t=e.cogvid;return{galleryUid:t.galleryVideoData.uid,currentActiveVideoType:t.cogvidDetails.videoType}}),(function(e){return{addFilesToGallery:function(t,n,r){return e(Q.g.addFilesToGallery(t,n,r))},uploadSubtitleFile:function(t,n,r){return e(Q.g.uploadAVideo(t,n,r))},updateGalleryVideoData:function(t){return e(Q.e.updateGalleryVideoData(t))},updateSb:function(t){return e(Q.e.updateSb(t))},updateCg:function(t){return e(Q.e.updateCg(t))},updateCogvidDetails:function(t){return e(Q.e.updateCogvidDetails(t))}}}))(rO),aO=["title","children","bsPrefix","rootCloseEvent","variant","size","menuAlign","menuRole","renderMenuOnMount","disabled","href","id"],oO={id:ne.a.any,href:ne.a.string,onClick:ne.a.func,title:ne.a.node.isRequired,disabled:ne.a.bool,menuAlign:$e,menuRole:ne.a.string,renderMenuOnMount:ne.a.bool,rootCloseEvent:ne.a.string,bsPrefix:ne.a.string,variant:ne.a.string,size:ne.a.string},sO=v.a.forwardRef((function(e,t){var n=e.title,r=e.children,i=e.bsPrefix,a=e.rootCloseEvent,o=e.variant,s=e.size,l=e.menuAlign,c=e.menuRole,u=e.renderMenuOnMount,d=e.disabled,h=e.href,f=e.id,p=Object(y.a)(e,aO);return(v.a.createElement(ut,Object(b.a)({ref:t},p),v.a.createElement(rt,{id:f,href:h,size:s,variant:o,disabled:d,childBsPrefix:i},n),v.a.createElement(Ze,{align:l,role:c,renderOnMount:u,rootCloseEvent:a},r)))}));sO.displayName="DropdownButton",sO.propTypes=oO;var lO=sO;r(1437);var cO=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.direction,n=e.items,r=e.title,i=e.className,a=e.bsPrefix,o=e.onSelect,s=e.disabled;return v.a.createElement(lO,{className:P()(i),drop:t,title:r,bsPrefix:a,disabled:s},n.map((function(e,t){return v.a.createElement(ut.Item,{key:t,eventKey:t,onSelect:function(t){return o(t,e)},active:0===t},e.label)})))}}]),n}(g.Component);cO.propTypes={direction:ne.a.oneOf(["up","down","left","right"]),items:ne.a.array,bsPrefix:ne.a.string,onSelect:ne.a.func,disabled:ne.a.bool,title:ne.a.oneOfType([ne.a.string,ne.a.node])},cO.defaultProps={direction:"down",items:[],title:"Dropdown",bsPrefix:"btn",onSelect:function(){},disabled:!1};var uO,dO=r(105),hO=r.n(dO),fO=(uO={},G()(uO,x.g.RESOURCE_SUBTYPE.TEXTBOOK,"Textbook resource"),G()(uO,x.g.RESOURCE_SUBTYPE.SLIDE,"Slide resource"),G()(uO,x.g.RESOURCE_SUBTYPE.EXERCISE,"Exercise resource"),G()(uO,x.g.RESOURCE_SUBTYPE.NONE,"Resource"),uO),pO=function(e){var n=e.title,r=e.subject,i=e.topic,a=e.author,o=e.price,s=e.thumbnailUrl;return v.a.createElement("div",{className:P()(hO.a.cartItem,"d-flex")},v.a.createElement("div",{className:"flex-grow-1 mr-3"},v.a.createElement("div",{className:"u-ws-pre-line u-wb-break-word u-truncate-2 u-fs-1x1o4"},n),v.a.createElement("div",{className:"u-ws-pre-line u-wb-break-word u-truncate-2 u-fs-1x1o8 u-opacity-75"},r),v.a.createElement("div",{className:"u-ws-pre-line u-wb-break-word u-truncate-2 u-fs-1x1o8 u-opacity-75"},i),v.a.createElement("div",{className:"u-ws-pre-line u-wb-break-word u-truncate-2 u-fs-1x1o8 text-primary"},t("byAuthor",{author:a})),v.a.createElement("div",{className:"d-flex justify-content-end"},v.a.createElement("div",{className:hO.a.priceBadge},o))),v.a.createElement("div",{className:P()(hO.a.thumbnailWrapper,"u-shadow")},v.a.createElement("img",{alt:"item thumbnail",className:"w-100 u-border-radius-1o3",style:{objectFit:"contain"},src:s})))},mO=function(e){var n,r,i=e.uid,a=e.title,o=(e.description,e.productType),s=e.productSubtype,l=e.months,c=e.quantity,u=e.author,d=e.discount,h=e.unitPrice,f=(h=void 0===h?{}:h).amount,p=h.currency,m=e.thumbnailUrl,g=e.onRemoveItem,b=d>0;return v.a.createElement(v.a.Fragment,null,v.a.createElement(T,{className:hO.a.itemRow},v.a.createElement(k.a,null,v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",null,v.a.createElement("img",{className:P()(hO.a.thumbnail),src:m})),v.a.createElement("div",{className:"ml-3 u-ws-pre-line u-line-height-1d2 u-wb-break-word"},v.a.createElement("div",{className:"u-truncate-2 u-fs-1 u-text-dark-blue",title:a},a),v.a.createElement("div",{className:"u-truncate-2 u-fs-7o8"},t("byAuthor",{author:u})),v.a.createElement("div",{className:"u-fs-3o4 font-italic u-opacity-80"},(r=s,(n=o)===x.g.PRODUCT_TYPE.VIDEO?"Video":n===x.g.PRODUCT_TYPE.RESOURCE?fO[r]:n===x.g.PRODUCT_TYPE.LIVECLASS?"Class":n===x.g.PRODUCT_TYPE.SUBSCRIPTION?"Course subscription":""))))),v.a.createElement(k.a,null,function(e,t,n){return e===x.g.PRODUCT_TYPE.VIDEO?"".concat(t):e===x.g.PRODUCT_TYPE.RESOURCE?"".concat(t):e===x.g.PRODUCT_TYPE.LIVECLASS?"".concat(t):e===x.g.PRODUCT_TYPE.SUBSCRIPTION?"".concat(n," month(s)"):""}(o,c,l)),v.a.createElement(k.a,null,v.a.createElement("div",{className:hO.a.priceBadge},x.c.formatMoney(f,p.code))),v.a.createElement(k.a,null,v.a.createElement("div",{className:P()(hO.a.priceBadge,b&&"u-text-red")},b?d+"%":"")),v.a.createElement(k.a,null,b&&v.a.createElement("div",{className:P()(hO.a.priceBadge,"u-fs-13o16 u-text-line-through u-opacity-80")},x.c.formatMoney(f*c,p.code)),v.a.createElement("div",{className:hO.a.priceBadge},x.c.formatMoney(f*c*(1-d/100),p.code))),v.a.createElement(k.a,null,v.a.createElement(Qt,{tooltipText:"Remove",onClick:function(){return g(i)}},v.a.createElement("i",{className:"fv fuvi-delete u-fs-1 text-black"})))))},gO=function(e){return e.productType===x.g.PRODUCT_TYPE.VIDEO?v.a.createElement(pO,e):v.a.createElement(mO,e)};var vO,bO=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.totalAmount,r=e.items,i=e.onRemoveItem;return v.a.createElement("div",{className:P()(hO.a.cartItems,"flex-grow-1 px-2")},v.a.createElement(T,{className:P()(hO.a.header,"border-bottom py-2 u-fw-600")},v.a.createElement(k.a,null,v.a.createElement("span",null,"Item")),v.a.createElement(k.a,null,"Qty"),v.a.createElement(k.a,null,"Price"),v.a.createElement(k.a,null,"Discount"),v.a.createElement(k.a,null,"Subtotal"),v.a.createElement(k.a,null)),v.a.createElement("div",{className:"overflow-auto fv-custom-scroll"},r.map((function(e){var t=e.product,n=e.months,r=e.quantity,a=e.unitPrice,o=e.discount,s=void 0===o?0:o;return v.a.createElement(gO,Gt()({key:t.uid},t,{months:n,quantity:r,discount:s,unitPrice:a,onRemoveItem:i}))}))),r.length>0&&v.a.createElement(T,{className:"mt-2 pt-2 pr-3 border-top"},v.a.createElement(k.a,{md:"6"}),v.a.createElement(k.a,{md:"4",className:"u-fs-15o16 text-center"},"Subtotal (",t("itemCount",{count:r.length}),"):"),v.a.createElement(k.a,{md:"2",className:"u-text-red u-fw-500"},x.c.formatMoney(n))))}}]),r}(g.Component),yO=r(296);var AO=x.g.PAYMENT,_O=x.i.COUNTRIES.map((function(e){return{label:e.Name,value:e.Code}})),wO=(vO={},G()(vO,AO.COUNTRY.US,[{name:Object(uc.b)("payment.stripe"),value:AO.OPTION.STRIPE,icon:I.a.stripeIcon}]),G()(vO,AO.COUNTRY.OTHERS,[{name:Object(uc.b)("payment.stripe"),value:AO.OPTION.STRIPE,icon:I.a.stripeIcon}]),vO),EO=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{country:AO.COUNTRY.US,countryInput:"United States",paymentOption:AO.OPTION.STRIPE,fullname:"",email:"",address:"",city:"",state:yO[0].code,stateInput:yO[0].state,zip:""}),G()(V()(e),"componentDidMount",(function(){var t=e.props,n=t.userInfo,r=n.firstName,i=void 0===r?"":r,a=n.lastName,o=void 0===a?"":a,s=n.email,l=void 0===s?"":s,c=t.billingAddress;if(c){var u=Object(Y.get)(_O.find((function(e){return e.value===(null==c?void 0:c.country)})),"label");(null==c?void 0:c.country)===AO.COUNTRY.US||e.props.validator.purgeFields(),e.setState({fullname:"".concat(i," ").concat(o),email:l,country:null==c?void 0:c.country,countryInput:u,address:null==c?void 0:c.address,city:null==c?void 0:c.city,state:null==c?void 0:c.state,zip:null==c?void 0:c.zip},e.handleCallBack)}else e.setState({fullname:"".concat(i," ").concat(o),email:l},e.handleCallBack)})),G()(V()(e),"handleCountryChange",(function(t){var n=e.state.country;if(t!==n){var r=t===AO.COUNTRY.US,i=r?wO[AO.COUNTRY.US]:wO[AO.COUNTRY.OTHERS];r||e.props.validator.purgeFields();var a=Object(Y.get)(_O.find((function(e){return e.value===t})),"label");e.setState({country:t,countryInput:a,state:r?yO[0].code:"",paymentOption:Object(Y.get)(i[0],"value","")},e.handleCallBack)}})),G()(V()(e),"handleStateChange",(function(t){Object(Y.find)(yO,{code:t})&&e.setState({state:t},e.handleCallBack)})),G()(V()(e),"handlePaymentOptionChange",(function(t){e.setState({paymentOption:t},e.handleCallBack)})),G()(V()(e),"handleCallBack",(function(){var t=e.props.onChange,n=e.state,r=n.fullname,i=n.email,a=n.address,o=n.country,s=n.city,l=n.state,c=n.zip,u=n.paymentOption;t&&t({fullname:r,email:i,address:a,country:o,city:s,state:l,zip:c,paymentOption:u})})),G()(V()(e),"handleAddressChange",(function(t){e.setState({address:t.target.value},e.handleCallBack)})),G()(V()(e),"handleZipChange",(function(t){var n=t.target.value;e.setState({zip:n},e.handleCallBack)})),G()(V()(e),"handleInputChange",(function(t){var n=t.target,r=n.name,i=n.value;e.setState(G()({},r,i),e.handleCallBack)})),G()(V()(e),"handleInputBlur",(function(t){var n=t.target.name;e.props.validator.showMessageFor(n),e.forceUpdate()})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.fullname,r=t.email,i=t.address,a=t.country,o=t.countryInput,s=t.city,l=t.state,c=(t.stateInput,t.zip),u=t.paymentOption,d=a===AO.COUNTRY.US,h=d?wO[AO.COUNTRY.US]:wO[AO.COUNTRY.OTHERS];return v.a.createElement("div",{className:hO.a.cartPaymentSelect},v.a.createElement("div",{className:"u-fs-1 u-fw-600 py-2 border-bottom"},Object(uc.b)("billingAddress")),v.a.createElement("div",{className:"w-100 d-flex flex-wrap mt-2"},v.a.createElement(mu,{disabled:!0,type:"text",className:"w-50 mb-0 pr-3",classNameLabel:"u-fw-400",labelName:Object(uc.b)("label.fullname"),name:"fullname",value:n}),v.a.createElement(mu,{disabled:!0,type:"text",className:"w-50 mb-0",classNameLabel:"u-fw-400",labelName:Object(uc.b)("label.emailAddress"),name:"email",value:r}),v.a.createElement(mu,{required:!0,type:"text",className:"w-100 mb-0 mt-1",classNameLabel:"u-fw-400",labelName:Object(uc.b)("label.address"),name:"address",value:i,onChange:this.handleAddressChange,maxLength:255,onBlur:this.handleInputBlur,validatorElement:this.props.validator.message("address",i,"required|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))})),v.a.createElement("div",{className:"w-100 d-flex flex-wrap mt-1"},v.a.createElement("div",{className:"w-50 pr-3 mb-0"},v.a.createElement("div",{className:"form-label u-fw-400"},Object(uc.b)("label.country")),v.a.createElement(Au,{getItemValue:function(e){return e.value},shouldItemRender:function(e,t){return e.label.toLowerCase().indexOf(t.toLowerCase())>-1},classNameMenu:hO.a.autocompleteCountry,items:_O,value:o,onChange:function(t){e.setState({countryInput:t.target.value})},onSelect:this.handleCountryChange,inputProps:{onBlur:function(){e.setState({countryInput:Object(Y.get)(_O.find((function(e){return e.value===a})),"label")})}}})),v.a.createElement(mu,{required:!0,type:"text",className:"w-50 mb-0",classNameLabel:"u-fw-400",labelName:Object(uc.b)("label.cityDistrict"),name:"city",value:s,onChange:this.handleInputChange,maxLength:255,onBlur:this.handleInputBlur,validatorElement:this.props.validator.message("city",s,"required|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))}),d&&v.a.createElement(wu,{drop:"up",name:"state",labelName:Object(uc.b)("label.state"),className:"w-50 pr-3 mb-0 mt-1",classNameLabel:"u-fw-400",classNamePopup:hO.a.dropdownPopup,value:l,options:yO,propName:"label",propValue:"code",onChange:this.handleStateChange}),!d&&v.a.createElement(mu,{required:!0,type:"text",className:"w-50 pr-3 mb-0 mt-1",classNameLabel:"u-fw-400",labelName:Object(uc.b)("label.state"),name:"state",value:l,onChange:this.handleInputChange,maxLength:255,onBlur:this.handleInputBlur,validatorElement:this.props.validator.message("state",l,"required|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))}),v.a.createElement(mu,{required:d,type:"text",autoComplete:"off",className:"w-50 overflow-hidden mb-0 mt-1",classNameLabel:"u-fw-400",labelName:Object(uc.b)("label.zip"),name:"zip",value:c,maxLength:10,onChange:this.handleZipChange,onBlur:this.handleInputBlur,validatorElement:d?this.props.validator.message("zip",c,"zipRequired|validZip"):null})),v.a.createElement("div",{className:"d-flex mt-3"},h.map((function(t){var n=t.name,r=t.value,i=t.icon,a=t.disabled;return v.a.createElement("div",{key:r,className:P()(hO.a.paymentOption,r===u&&hO.a.selected,a&&hO.a.disabled),onClick:a?null:function(){return e.handlePaymentOptionChange(r)}},v.a.createElement("div",{className:P()(hO.a.paymentOptionIcon,"u-shadow")},v.a.createElement("img",{src:i,alt:"Payment Option"})),v.a.createElement("div",{className:"mt-2"},n))}))))}}]),n}(g.Component),SO=Object(q.b)((function(e){return{userInfo:e.auth.userInfo}}),null)(EO),CO=function(e){var n=e.open,r=e.totalAmount,i=e.isSubmitting,a=e.billingAddress,o=e.items,s=e.validator,l=e.onClose,c=e.onSubmit,u=e.onPaymentChange,d=e.onRemoveItem,h=(null==o?void 0:o.length)>0&&s.allValid();return v.a.createElement(Fl.a,{show:n,centered:!0,scrollable:!0,backdrop:"static",dialogClassName:hO.a.cartModal,onEscapeKeyDown:l},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,t("modal.checkout"))),v.a.createElement(Fl.a.Body,null,v.a.createElement("div",{className:"w-100 h-100 d-flex overflow-auto"},v.a.createElement(bO,{totalAmount:r,items:o,onRemoveItem:d}),v.a.createElement("div",{className:"mx-3 border-right"}),v.a.createElement(SO,{billingAddress:a,validator:s,onChange:u}))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex align-items-center w-100"},v.a.createElement("div",{className:"u-fs-7o8"},v.a.createElement("div",null,t("purchaseTerm"),v.a.createElement("a",{href:x.g.TERM_OF_USE_HASH},t("termsOfService")),".")),v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:l},t("btn.close")),v.a.createElement(et.a,{type:"submit",variant:"primary",className:P()("text-white modal-button ml-4",i&&"u-cursor-default"),disabled:i||!h,onClick:i||!h?null:c},i?v.a.createElement(Ln,{className:"text-white"}):t("btn.buy")))))};var TO=x.g.SEARCH_PARAM,kO=TO.KEY,xO=TO.VALUE,OO=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{payment:{},isSubmitting:!1}),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"componentDidMount",(function(){e.props.getCartItems()})),G()(V()(e),"handleRemoveItem",(function(t){e.props.removeCartItem({productId:t})})),G()(V()(e),"handlePaymentChange",(function(t){e.setState({payment:t})})),G()(V()(e),"handleSubmit",(function(){var t,n=e.props,r=n.stripe,i=n.items,a=n.checkout,o=n.userId,s=n.openCart,l=n.totalAmount,c=e.state.payment,u=(c=void 0===c?{}:c).fullname,d=c.email,h=c.address,f=c.country,p=c.city,m=c.state,g=c.zip,v=window.location,b=v.origin,y=v.pathname,A=v.search,_=new URLSearchParams(A);_.set(kO.USER_ID,o),_.set(kO.POPUP,xO.PAYMENT_SUCCESS),_.set(kO.ORDER_TYPE,i[0].productType),_.set(kO.RESOURCE_ID,null===(t=i[0].product)||void 0===t?void 0:t.uid);var w=b+y+"?"+_.toString();_.set(kO.POPUP,xO.PAYMENT_CANCEL);var E=b+y+"?"+_.toString();e.setState({isSubmitting:!0}),a({noItems:i.length,totalAmount:l,successUrl:w,cancelUrl:E,paymentGateway:"Stripe",paymentMethod:"card",fullname:u,email:d,address:h,country:f,city:p,state:m,zip:g},(function(t){var n=t.redirectUrl,i=t.successUrl;if(t.paymentRequired)r&&n&&r.redirectToCheckout({sessionId:n});else{var a=new URL(i),o=a.pathname,l=a.search;$.a.push(x.g.TEMP_PATH),$.a.push(o+l)}s(!1),e.setState({isSubmitting:!1})}),(function(){e.setState({isSubmitting:!1})}))})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.isOpen,n=e.items,r=e.totalAmount,i=e.openCart,a=e.billingAddress,o=this.state.isSubmitting;return v.a.createElement(CO,{open:t,isSubmitting:o,billingAddress:a,items:n,totalAmount:r,validator:this.validator,onClose:function(){return i(!1)},onSubmit:this.handleSubmit,onPaymentChange:this.handlePaymentChange,onRemoveItem:this.handleRemoveItem})}}]),n}(g.Component),IO=Object(X.a)(K.f,K.e,Object(q.b)((function(e){var t,n,r,i=e.auth,a=e.cart;return{isOpen:a.isOpen,billingAddress:null===(t=a.data)||void 0===t?void 0:t.billingAddress,items:null===(n=a.data)||void 0===n?void 0:n.items,totalAmount:null===(r=a.data)||void 0===r?void 0:r.totalAmount,userId:i.userInfo.userId}}),(function(e){return{openCart:function(t){return e(Q.c.openCart(t))},checkout:function(t,n,r){return e(Q.c.checkout(t,n,r))},removeCartItem:function(t,n,r){return e(Q.c.removeCartItem(t,n,r))},getCartItems:function(t,n){return e(Q.c.getCartItems(t,n))}}})))(OO);var MO=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handleCartClick",(function(t){t.preventDefault(),t.stopPropagation(),e.props.openCart(!0)})),e}return c()(n,[{key:"componentDidMount",value:function(){var e=this;setTimeout((function(){e.props.getCartItems()}),1e3)}},{key:"render",value:function(){var e=this.props.items;return v.a.createElement("div",{className:hO.a.shoppingCart,onClick:this.handleCartClick},v.a.createElement("img",{src:I.a.shoppingCart,width:30}),v.a.createElement("span",{className:hO.a.badge},null==e?void 0:e.length))}}]),n}(g.Component),PO=Object(q.b)((function(e){var t,n=e.auth;return{items:null===(t=e.cart.data)||void 0===t?void 0:t.items,userId:n.userInfo.userId}}),(function(e){return{getCartItems:function(t,n){return e(Q.c.getCartItems(t,n))},openCart:function(t){return e(Q.c.openCart(t))}}}))(MO),DO=r(418),NO=r.n(DO),LO=(r(917),r(64)),RO=r.n(LO);var BO={unit:"px",width:100,height:100,aspect:1},jO=function(e){d()(r,e);var t,n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"uploadAvatarRef",v.a.createRef()),G()(V()(e),"state",{blobFile:"",src:null,crop:BO}),G()(V()(e),"onImageLoaded",(function(t){e.imageRef=t})),G()(V()(e),"onCropComplete",(function(t){e.makeClientCrop(t)})),G()(V()(e),"onCropChange",(function(t){e.setState({crop:t})})),G()(V()(e),"handlePhotoUpload",(function(){var t=e.state.blobFile;(0,e.props.uploadAvatarAction)({file:t},(function(){e.handleCancel();var t=e.props,n=t.getAuthorProfile,r=t.userInfo,i=(r=void 0===r?{}:r).userId,a=void 0===i?"":i,o=t.authorInfo,s=(o=void 0===o?{}:o).id,l=void 0===s?"":s;a===l&&n({userId:l})}))})),G()(V()(e),"handleCancel",(function(t){t&&t.preventDefault(),e.setState({src:null,crop:BO}),e.uploadAvatarRef.value=""})),G()(V()(e),"handleFileChange",(function(t){if(t.target.files&&t.target.files.length>0){var n=new FileReader;n.addEventListener("load",(function(){e.setState({src:n.result})})),n.readAsDataURL(t.target.files[0])}})),e}return c()(r,[{key:"getCroppedImg",value:function(e,t,n){var r=this,i=document.createElement("canvas"),a=e.naturalWidth/e.width,o=e.naturalHeight/e.height;return i.width=t.width,i.height=t.height,i.getContext("2d").drawImage(e,t.x*a,t.y*o,t.width*a,t.height*o,0,0,t.width,t.height),new Promise((function(e){i.toBlob((function(t){t&&(t.name=n,t.fileName=n,window.URL.revokeObjectURL(r.fileUrl),r.fileUrl=window.URL.createObjectURL(t),e(r.fileUrl),r.setState({blobFile:t}))}),"image/jpeg")}))}},{key:"makeClientCrop",value:(t=H()(F.a.mark((function e(t){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.imageRef&&t.width&&t.height&&this.getCroppedImg(this.imageRef,t,"".concat((new Date).getTime(),".jpeg"));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.props,n=t.avatar,r=t.editable,i=void 0===r||r,a=this.state,o=a.crop,s=a.src;return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:RO.a.avatar,style:{backgroundImage:"url(".concat(n,")")}},i&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:RO.a.cameraIcon},v.a.createElement("i",{className:"fv fuvi-camera u-text-cyan u-fs-1x1o2"})),v.a.createElement($l.a.Control,{type:"file",readOnly:!0,placeholder:"Upload a photo",className:"".concat(RO.a.uploadAvatarInput," position-absolute w-100 h-100"),accept:"image/*",onChange:this.handleFileChange,ref:function(t){e.uploadAvatarRef=t},title:""}))),v.a.createElement(Fl.a,{show:!!s},v.a.createElement(NO.a,{src:s,crop:o,circularCrop:!0,onImageLoaded:this.onImageLoaded,onComplete:this.onCropComplete,onChange:this.onCropChange,keepSelection:!0}),v.a.createElement(Fl.a.Footer,null,v.a.createElement(k.a,{sm:"4",className:"mr-2"},v.a.createElement(et.a,{variant:"outline-primary",block:!0,className:RO.a.bottomButton,onClick:this.handleCancel},"Cancel")),v.a.createElement(k.a,{sm:"4",className:"mr-3"},v.a.createElement(et.a,{type:"submit",variant:"primary",block:!0,className:[RO.a.bottomButton,"text-white"],onClick:this.handlePhotoUpload},"Save")))))}}]),r}(g.Component),FO=Object(q.b)((function(e){return{authorInfo:e.auth.authorInfo,userInfo:e.auth.userInfo}}),(function(e){return{uploadAvatarAction:function(t,n,r){return e(Q.a.uploadAvatar(t,n,r))},getAuthorProfile:function(t,n,r){return e(Q.e.getAuthorProfile(t,n,r))}}}))(jO);function UO(e){var n=e.coverImage,r=e.avatar,i=e.fullName,a=e.headline,o=e.editable,s=e.displayEditButton,l=e.onEditButtonClick,c=e.isActionHandling,u=e.actions,d=void 0===u?[]:u,h=e.onActionClick;return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(RO.a.UPHeaderWrapper)},v.a.createElement("div",{className:RO.a.coverImage,style:{backgroundImage:"url(".concat(n,")")}},v.a.createElement("div",{className:RO.a.UPInfo},v.a.createElement("div",{className:RO.a.avatarWrapper},v.a.createElement(FO,{avatar:r||I.a.noAvatar,editable:o})),v.a.createElement("div",{className:"flex-grow-1 d-flex align-items-end overflow-hidden"},v.a.createElement("div",{className:P()("w-100 h-50 d-flex flex-column justify-content-center u-pl-1x9o16")},v.a.createElement("div",{className:P()(RO.a.fullName,"text-truncate")},i),v.a.createElement("div",{className:P()(RO.a.headline,"text-truncate")},a))),s&&v.a.createElement("div",{className:P()(RO.a.editBtn,"u-shadow"),onClick:l},v.a.createElement("i",{className:"fv fuvi-notes ml-3 u-fs-1x1o3"}),v.a.createElement("div",{className:"u-ml-2o5 u-fs-9o10"},t("btn.edit"))),v.a.createElement("div",{className:"d-flex align-items-end pb-3"},d.map((function(e,t){var n=e.type,r=e.label;return v.a.createElement(et.a,{key:n+r+t,variant:"outline-primary",className:P()("btn-rounded modal-button ml-4",c&&[RO.a.headerActionBtnDisabled,"progress-bar-striped progress-bar-animated"]),disabled:c,onClick:function(e){return h(e,n)}},r)})))),o&&v.a.createElement("div",{className:RO.a.updateCoverBtn},v.a.createElement("i",{className:"fv fuvi-camera u-fs-1x1o2"}),v.a.createElement("div",{className:"u-fs-7o8 u-fw-500"},t("btn.updateCoverPhoto"))))),v.a.createElement("div",{className:RO.a.separatorLine}))}UO.propTypes={coverImage:ne.a.string,avatar:ne.a.string,fullName:ne.a.string,headline:ne.a.string,editable:ne.a.bool,displayEditButton:ne.a.bool,onEditButtonClick:ne.a.func},UO.defaultProps={coverImage:I.a.defaultCoverImage,avatar:I.a.noAvatar,fullName:"",headline:"",editable:!1,displayEditButton:!1,onEditButtonClick:function(){return null}};x.g.PRIORITY_COUNTRIES_SELECT;var HO=x.g.TEXT_INPUT_MAX_LENGTH,zO=x.g.CREATE_COGVID_CONSTRAINTS.KEYWORD_LENGTH_LIMIT,VO=x.g.PARTICIPANT_TYPES,WO=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{skillValidationError:"",topicValidationError:"",subjectValidationError:""}),G()(V()(e),"validateKeyword",(function(t,n,r){var i=r.name,a=i.replace(/\s+/g," ").trim();return 0===a.length?(e.setState(G()({},"".concat(t,"ValidationError"),Object(_t.t)("validation.blankKeyword",{name:t}))),!1):i.length>zO?(e.setState(G()({},"".concat(t,"ValidationError"),Object(_t.t)("validation.maxLengthExceeded",{name:t.capitalize(),max:zO}))),!1):-1!==n.lastIndexOf(a.toLowerCase())?(e.setState(G()({},"".concat(t,"ValidationError"),Object(_t.t)("validation.duplicateKeywords",{name:t}))),!1):(e.setState(G()({},"".concat(t,"ValidationError"),"")),!0)})),G()(V()(e),"handleValidationOnBlur",(function(t){e.props.validator.showMessageFor(t),e.forceUpdate()})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=(t.skillValidationError,t.subjectValidationError),r=t.topicValidationError,i=this.props,a=i.firstName,o=i.lastName,s=i.email,l=(i.birthday,i.skills),c=i.subjects,u=i.topics,d=i.bio,h=i.country,f=i.education,p=i.headline,m=i.honorAndAward,g=i.location,b=i.participantType,y=i.handleChange,A=(i.handleBirthdayChange,i.handleCountrySelect),_=i.validator,w=i.topicSuggestions,E=void 0===w?[]:w,S=i.subjectSuggestions,C=void 0===S?[]:S,T=i.skillSuggestions,k=void 0===T?[]:T,x=i.handleSearchKeyword,O=i.handleKeywordSelect,I=i.handleKeywordDelete,M=i.timezone,D=i.handleTimeZoneChange;return v.a.createElement("div",{className:"w-100 h-100 u-mt-2x3o8 u-px-3x1o2"},v.a.createElement("div",{className:"d-flex justify-content-between"},v.a.createElement(mu,{labelName:"First Name",name:"firstName",required:!0,className:RO.a.divBy2,value:a,onChange:y,onBlur:function(){return e.handleValidationOnBlur("firstName")},validatorElement:_.message("firstName",a,"required|max:".concat(HO))}),v.a.createElement(mu,{labelName:"Last Name",name:"lastName",required:!0,className:RO.a.divBy2,value:o,onChange:y,onBlur:function(){return e.handleValidationOnBlur("lastName")},validatorElement:_.message("lastName",o,"required|max:".concat(HO))})),v.a.createElement("div",{className:"d-flex justify-content-between"},v.a.createElement(mu,{labelName:"Email",name:"email",className:RO.a.divBy2,readOnly:!0,value:s,required:!0}),v.a.createElement(wu,{labelName:Object(_t.t)("label.participantType"),name:"participantType",className:RO.a.divBy2,value:b,required:!0,options:VO,onChange:function(e){return y({target:{name:"participantType",value:e}})},validatorElement:_.message("participantType",b,"required|max:".concat(HO))})),v.a.createElement("div",{className:"d-flex justify-content-between"},v.a.createElement(rd,{labelName:"Country",value:h,required:!0,className:RO.a.divBy2,onChange:A,validatorElement:_.message("country",h,"required")}),v.a.createElement(mu,{labelName:"Location",name:"location",value:g,required:!0,className:RO.a.divBy2,onChange:y,onBlur:function(){return e.handleValidationOnBlur("location")},validatorElement:_.message("location",g,"required|max:".concat(HO))})),v.a.createElement(Wm,{labelName:Object(_t.t)("label.timezone"),className:P()("mb-3"),value:M,onChange:D}),v.a.createElement(mu,{labelName:"Headline",name:"headline",value:p,onChange:y,onBlur:function(){return e.handleValidationOnBlur("headline")},validatorElement:_.message("headline",p,"max:".concat(HO))}),v.a.createElement(Eu,{labelName:"Bio",name:"bio",rows:5,value:d,onChange:y,onBlur:function(){return e.handleValidationOnBlur("bio")},validatorElement:_.message("bio",d,"max:".concat(HO))}),v.a.createElement(mu,{labelName:"Education",name:"education",value:f,onChange:y,onBlur:function(){return e.handleValidationOnBlur("education")},validatorElement:_.message("education",f,"max:".concat(HO))}),v.a.createElement(mu,{labelName:"Honors and awards",name:"honorAndAward",value:m,onChange:y,onBlur:function(){return e.handleValidationOnBlur("Honors and Awards")},validatorElement:_.message("Honors and Awards",m,"max:".concat(HO))}),v.a.createElement(sd,{placeholderText:Object(_t.t)("placeholder.topic"),labelName:Object(_t.t)("label.topics"),tags:u,suggestions:E,onInput:function(e){return x("topic",e)},onFocus:function(e){return x("topic",e)},onAddition:function(e){O("topic",e)},onDelete:function(e){return I("topic",e)},minQueryLength:1,onValidate:function(t){return e.validateKeyword("topic",u,t)},validatorElement:r,searchInputClassName:RO.a.searchInputClassName}),v.a.createElement(sd,{placeholderText:Object(_t.t)("placeholder.subject"),labelName:Object(_t.t)("label.subjects"),tags:c,suggestions:C.reverse(),onInput:function(e){return x("subject",e)},onFocus:function(e){return x("subject",e)},onAddition:function(e){return O("subject",e)},onDelete:function(e){return I("subject",e)},minQueryLength:1,onValidate:function(t){return e.validateKeyword("subject",c,t)},validatorElement:n,searchInputClassName:RO.a.searchInputClassName,suggestionsDisplayTop:!0}),v.a.createElement(sd,{placeholderText:Object(_t.t)("placeholder.skill"),labelName:Object(_t.t)("label.skills"),tags:l,suggestions:k.reverse(),onInput:function(e){return x("skill",e)},onFocus:function(e){return x("skill",e)},onAddition:function(e){return O("skill",e)},onDelete:function(e){return I("skill",e)},minQueryLength:1,onValidate:function(t){return e.validateKeyword("skill",l,t)},validatorElement:n,searchInputClassName:RO.a.searchInputClassName,suggestionsDisplayTop:!0}))}}]),n}(v.a.Component),GO=r(92),qO=r.n(GO),YO=function(e){var t,n=qO.a.tz(e),r=Bm[e]||(null===(t=function(e){var t;try{t=ym.now(e)}catch(e){return}return Object.entries(Bm).map((function(e){var t=pi()(e,2),n=t[0];return{value:n,label:t[1],offset:ym.now().goto(n).timezone().current.offset}})).filter((function(e){return e.offset===t.timezone().current.offset})).map((function(e){var n=0;return t.timezones[e.value.toLowerCase()]&&!!t.timezones[e.value.toLowerCase()].dst===t.timezone().hasDst?(-1!==e.value.toLowerCase().indexOf(t.tz.substr(t.tz.indexOf("/")+1))&&(n+=8),-1!==e.label.toLowerCase().indexOf(t.tz.substr(t.tz.indexOf("/")+1))&&(n+=4),e.value.toLowerCase().indexOf(t.tz.substr(0,t.tz.indexOf("/")))&&(n+=2),n+=1):"GMT"===e.value&&(n+=1),{tz:e,score:n}})).sort((function(e,t){return t.score-e.score})).map((function(e){var t=e.tz;e.score;return t}))[0]}(e))||void 0===t?void 0:t.label);return"(GMT".concat(n.format("Z"),") ").concat(r||"")};function KO(e){var t,n=e.bio,r=e.fullName,i=(e.birthday,e.email),a=e.country,o=e.location,s=e.topics,l=e.subjects,c=e.skills,u=e.education,d=e.honorsAndAwards,h=e.isShowPersonalInfor,f=e.timezone;return v.a.createElement("div",{className:"w-100 u-mt-2x3o8 u-px-3x1o2 u-text-black pb-3"},n&&v.a.createElement("div",{className:"u-mb-2"},v.a.createElement("div",{className:P()(RO.a.sectionTitle,"mb-1")},Object(_t.t)("bio")),v.a.createElement("div",{className:"u-text-all-7 u-fs-7o8 u-ws-pre-wrap"},n)),v.a.createElement("div",{className:"u-mb-2"},v.a.createElement("div",{className:P()(RO.a.sectionTitle,"u-mb-1")},Object(_t.t)("personalInformation")),v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("fullName"),":"),v.a.createElement("div",null,r)),h&&v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("email"),":"),v.a.createElement("div",null,i)),h&&v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("livesIn"),":"),v.a.createElement("div",null,(t=[],o&&t.push(o),a&&t.push(a),t.join(", ")))),h&&v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("label.timezone"),":"),v.a.createElement("div",null,YO(f))),v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("education"),":"),v.a.createElement("div",null,u)),v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("honorsAndAwards"),":"),v.a.createElement("div",null,d))),v.a.createElement("div",null,v.a.createElement("div",{className:P()(RO.a.sectionTitle,"u-mb-3o4")},Object(_t.t)("skillsAndEndorsements")),v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("interestedTopics"),":"),v.a.createElement("div",null,s.join(", "))),v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("interestedSubjects"),":"),v.a.createElement("div",null,l.join(", "))),v.a.createElement("div",{className:RO.a.infoGroup},v.a.createElement("div",{className:RO.a.infoTitle},Object(_t.t)("skills"),":"),v.a.createElement("div",null,c.join(", ")))))}KO.propTypes={bio:ne.a.string,fullName:ne.a.string.isRequired,birthday:ne.a.string,email:ne.a.string,country:ne.a.string,location:ne.a.string,topics:ne.a.arrayOf(ne.a.string),subjects:ne.a.arrayOf(ne.a.string),skills:ne.a.arrayOf(ne.a.string),education:ne.a.string,honorsAndAwards:ne.a.string},KO.defaultProps={topics:[],subjects:[],skills:[]};var XO=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"editProfileRef",v.a.createRef()),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props.avatar,r=this.state,i=r.firstName,a=r.lastName,o=r.birthday,s=r.email,l=r.skills,c=r.subjects,u=r.topics,d=r.bio,h=r.country,f=r.education,p=r.headline,m=r.honorAndAward,g=r.phone,b=r.location,y=r.participantType,A=r.isEditMode,_=r.showConfirmationModal,w=r.topicSuggestions,E=r.subjectSuggestions,S=r.skillSuggestions,C=r.timezone,T=this.props.birthday,k=!1;return A&&(k=this.isFormDirty()),v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:"myProfileModal",centered:!0,backdrop:"static"},v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"ml-3 ".concat(RO.a.formTitle)},t("modal.myProfile")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:RO.a.modalBody},v.a.createElement($l.a,{noValidate:!0,onSubmit:this.submitCreateCognitiveVideo},v.a.createElement(UO,{fullName:"".concat(i," ").concat(a),avatar:n,headline:p,editable:!0,onEditButtonClick:this.handleEditButtonClick,displayEditButton:!A}),A?v.a.createElement(WO,{ref:function(t){return e.editProfileRef=t},firstName:i,lastName:a,birthday:o?new Date(o):"",email:s,skills:l,subjects:c,topics:u,bio:d,country:h,education:f,headline:p,honorAndAward:m,location:b,participantType:y,phone:g,handleBirthdayChange:this.handleBirthdayChange,handleCountrySelect:this.handleCountrySelect,handleChange:this.handleChange,validator:this.validator,topicSuggestions:w,subjectSuggestions:E,skillSuggestions:S,timezone:C,handleSearchKeyword:this.handleSearchKeyword,handleKeywordSelect:this.handleKeywordSelect,handleKeywordDelete:this.handleKeywordDelete,handleTimeZoneChange:this.handleTimeZoneChange}):v.a.createElement(KO,{bio:d,fullName:"".concat(i," ").concat(a),birthday:T,email:s,country:h,location:b,topics:u.map((function(e){return e.name})),subjects:c.map((function(e){return e.name})),skills:l.map((function(e){return e.name})),education:f,timezone:C,honorsAndAwards:m,isShowPersonalInfor:!0}))),v.a.createElement(Fl.a.Footer,{className:RO.a.footer},v.a.createElement(et.a,{variant:A?"outline-primary":"primary",className:P()(RO.a.footerBtn,"modal-button",!A&&"text-white"),onClick:A?this.handleFormCancel:this.handleFormClose},A?t("btn.cancel"):t("btn.close")),A&&v.a.createElement(et.a,{className:P()(RO.a.footerBtn,"modal-button ml-4 text-white",!k&&"u-pointer-event-none u-opacity-50"),onClick:this.handleSubmitProfile},t("btn.save")))),v.a.createElement(IC,{show:!!_,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:this.handleDiscardChanges,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),r}(g.PureComponent);function QO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QO(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var JO=x.g.BIRTHDAY_FORMAT,ZO=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"initialData",{firstName:e.props.firstName,lastName:e.props.lastName,birthday:e.props.birthday,email:e.props.email,skills:kc.a.asMutable(e.props.skills),subjects:kc.a.asMutable(e.props.subjects),topics:kc.a.asMutable(e.props.topics),bio:e.props.bio,country:e.props.country,education:e.props.education,headline:e.props.headline,honorAndAward:e.props.honorAndAward,location:e.props.location,phone:e.props.phone,participantType:e.props.participantType,timezone:e.props.timezone}),G()(V()(e),"state",$O($O({},e.initialData),{},{isEditMode:!0,skillValidationError:"",topicValidationError:"",subjectValidationError:"",showConfirmationModal:!1,topicSuggestions:[]})),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"handleSearchKeyword",Object(Y.debounce)((function(t,n){var r=e.props.searchKeyword;void 0===n||n.length<1||r({scope:t.toUpperCase(),terms:n},(function(r){var i=r.content,a=e.state["".concat(t,"s")],o=!1,s=i.filter((function(e){return n===e.name&&(o=!0),!Object(Y.find)(a,(function(t){return t.id===e.id}))}));o||""===n||Object(Y.find)(a,(function(e){return e.name===n}))||(s=[].concat(Rl()(s),[{id:n,name:n,isAddNew:!0}])),e.setState(G()({},"".concat(t,"Suggestions"),s))}))}),300)),G()(V()(e),"handleKeywordSelect",(function(t,n){var r,i=e.state["".concat(t,"s")];e.setState((r={},G()(r,"".concat(t,"Suggestions"),[]),G()(r,"".concat(t,"s"),[].concat(Rl()(i),[n])),r))})),G()(V()(e),"handleKeywordDelete",(function(t,n){var r=e.state["".concat(t,"s")];r.splice(n,1),e.setState(G()({},"".concat(t,"s"),r),e.forceUpdate)})),G()(V()(e),"handleBirthdayChange",(function(t){e.setState({birthday:t})})),G()(V()(e),"handleCountrySelect",(function(t){e.setState({country:t})})),G()(V()(e),"handleTimeZoneChange",(function(t){e.setState({timezone:t.value})})),G()(V()(e),"handleChange",(function(t){var n=t.target,r=n.name,i=n.value;e.setState(G()({},r,i))})),G()(V()(e),"handleFormClose",(function(){(0,e.props.toggleOpenUserProfileModal)(!1)})),G()(V()(e),"handleFormCancel",(function(t){t.stopPropagation(),e.isFormDirty()?e.setState({showConfirmationModal:!0}):e.setState({isEditMode:!1})})),G()(V()(e),"handleCloseEditMode",(function(){e.setState({isEditMode:!1})})),G()(V()(e),"handleDiscardChanges",(function(){e.resetFormData(),e.setState({isEditMode:!1}),e.setState({showConfirmationModal:!1})})),G()(V()(e),"handleEditButtonClick",(function(){e.setState({skills:kc.a.asMutable(e.props.skills),subjects:kc.a.asMutable(e.props.subjects),topics:kc.a.asMutable(e.props.topics),isEditMode:!0})})),G()(V()(e),"isFormDirty",(function(){var t=e.state,n=t.firstName,r=t.lastName,i=t.skills,a=t.subjects,o=t.topics,s=t.bio,l=t.country,c=t.education,u=t.headline,d=t.honorAndAward,h=t.location,f=t.participantType,p=t.timezone,m=e.state.birthday,g=e.props,v=g.firstName,b=g.lastName,y=g.birthday,A=g.skills,_=g.subjects,w=g.topics,E=g.bio,S=g.country,C=g.education,T=g.headline,k=g.honorAndAward,x=g.location,O=g.participantType,I=g.timezone;return m&&(m=Ml()(m).format(JO)),null===m&&(m=""),n!==v||r!==b||m!==y||!Object(Y.isEqual)(i,A)||!Object(Y.isEqual)(a,_)||!Object(Y.isEqual)(o,w)||s!==E||l!==S||c!==C||u!==T||d!==k||h!==x||f!==O||p!==I})),G()(V()(e),"getTagsDataForApi",(function(e){return e.map((function(e){e.isAddNew,e.id;var t=Yt()(e,["isAddNew","id"]);return e.isAddNew?t:e}))})),G()(V()(e),"handleSubmitProfile",(function(){var t=e.props.updateProfile,n=e.state,r=n.firstName,i=n.lastName,a=n.birthday,o=n.skills,s=n.subjects,l=n.topics,c=n.bio,u=n.country,d=n.education,h=n.headline,f=n.honorAndAward,p=n.location,m=n.participantType,g=n.timezone;e.validator.allValid()?t({firstName:r,lastName:i,birthday:a?Ml()(a).format(JO):"",skills:e.getTagsDataForApi(o),subjects:e.getTagsDataForApi(s),topics:e.getTagsDataForApi(l),bio:c,country:u,education:d,headline:h,honorAndAward:f,location:p,audience:m,timezone:g},(function(){e.setState({isEditMode:!1})})):(e.validator.showMessages(),e.forceUpdate())})),G()(V()(e),"resetFormData",(function(){e.setState({firstName:e.props.firstName,lastName:e.props.lastName,birthday:e.props.birthday,email:e.props.email,skills:kc.a.asMutable(e.props.skills),subjects:kc.a.asMutable(e.props.subjects),topics:kc.a.asMutable(e.props.topics),bio:e.props.bio,country:e.props.country,education:e.props.education,headline:e.props.headline,honorAndAward:e.props.honorAndAward,location:e.props.location,phone:e.props.phone,participantType:e.props.participantType,timezone:e.props.timezone})})),e}return n}(XO),eI=Object(q.b)((function(e){var t=e.auth.userInfo,n=t.firstName,r=t.lastName,i=t.email,a=t.skills,o=t.subjects,s=t.topics,l=t.avatar,c=t.bio,u=t.birthday,d=t.country,h=t.education,f=t.headline,p=t.honorAndAward,m=t.location,g=t.phone,v=t.audience,b=t.timezone;return{firstName:n,lastName:r,avatar:l.image,email:i,skills:a,subjects:o,topics:s,bio:c,birthday:u,country:d,education:h,headline:f,honorAndAward:p,location:m,phone:g,participantType:v,timezone:b}}),(function(e){return{toggleOpenUserProfileModal:function(t){return e(Q.a.toggleOpenUserProfileModal(t))},searchKeyword:function(t,n,r){return e(Q.a.searchKeyword(t,n,r))},updateProfile:function(t,n,r){return e(Q.a.updateProfile(t,n,r))}}}))(ZO),tI=r(57),nI=r.n(tI);var rI=x.g.PEOPLE_ACTIONS,iI=x.g.PEOPLE,aI=iI.ACTION_TYPE,oI=iI.TAB,sI=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isActionHandling:!1,isDeleting:!1,showDeleteConfirmation:!1}),G()(V()(e),"componentWillUnmount",(function(){e.setState=function(e,t){}})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.isHover,r=e.props,i=r.isHover,a=r.updatePeoplePreviewData;i&&i!==n&&a()})),G()(V()(e),"handleActionClick",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"isActionHandling";t&&t.stopPropagation();var i=e.props.onActionClick;e.state[r]||(e.setState(G()({},r,!0)),i&&i(n,(function(){return e.setState(G()({},r,!1))})))})),G()(V()(e),"handleDeleteClick",(function(t){t&&t.stopPropagation(),e.setState({showDeleteConfirmation:!0})})),G()(V()(e),"handleDeleteModalConfirm",(function(t){e.handleActionClick(t,aI.DELETE_ITEM,"isDeleting")})),G()(V()(e),"handleDeleteModalCancel",(function(t){t&&t.stopPropagation(),e.setState({showDeleteConfirmation:!1})})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.name,i=n.headline,a=n.image,o=n.isActive,s=n.friendshipStatus,l=n.canDelete,c=n.activeTab,u=this.state,d=u.isActionHandling,h=u.isDeleting,f=u.showDeleteConfirmation,p=rI[s]||[];return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(nI.a.peopleItem,o&&nI.a.peopleItemActive)},v.a.createElement("div",{className:nI.a.headerActions},l&&v.a.createElement(Qt,{tooltipText:t("tooltip.deleteGroup"),round:!0,onClick:this.handleDeleteClick,isLoading:h},v.a.createElement("i",{className:"fv fuvi-trash-can text-white fv-sm"}))),v.a.createElement("div",{className:P()(nI.a.peopleAvatar),style:{backgroundImage:"url(".concat(a||(c===oI.GROUPS?I.a.defaultGroupAvatar:I.a.noAvatar),")")}}),v.a.createElement("div",{className:P()(nI.a.peopleName,"mt-2 px-2 u-truncate-2")},r),v.a.createElement("div",{className:P()(nI.a.peopleHeadline,"px-2 u-truncate-2")},i),v.a.createElement("div",{className:"d-flex justify-content-center align-items-center mt-2 pt-1"},p.map((function(t,n){var r=t.type,i=t.label;return v.a.createElement(et.a,{key:r+i+n,size:"sm",className:P()("btn btn-rounded border-0 mx-2 px-3",nI.a.actionBtn,d&&[nI.a.actionBtnDisabled,"progress-bar-striped progress-bar-animated"]),disabled:d,onClick:function(t){return e.handleActionClick(t,r)}},i)})))),f&&v.a.createElement("div",{onClick:function(e){e.preventDefault(),e.stopPropagation()}},v.a.createElement(IC,{show:!0,title:t("modal.confirmDeleteGroupTitle"),onConfirm:this.handleDeleteModalConfirm,onClose:this.handleDeleteModalCancel})))}}]),r}(g.Component);var lI=x.g.PEOPLE.TAB,cI=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"indicatorIndex",0),G()(V()(e),"renderDummyItem",(function(e,t,n){return v.a.createElement("div",{className:"d-flex flex-".concat(t," overflow-hidden position-relative"),style:{height:n}},Rl()(Array(e)).map((function(e,t){return v.a.createElement("div",{key:t,className:nI.a.dummyPeopleItem})})))})),G()(V()(e),"renderListItem",(function(t,n){var r=t.userId,i=t.firstName,a=t.lastName,o=t.avatar,s=(o=void 0===o?{}:o).image,l=t.friendshipStatus,c=t.uid,u=t.name,d=e.props,h=d.activeItem,f=void 0===h?{}:h,p=(d.heightItemInPx,d.onListItemActionClick),m=d.updatePeoplePreviewData,g=d.canDelete,b=(d.scrollRef,d.activeTab),y=d.indicatorIndex;return v.a.createElement(sI,{key:r||c,id:r||c,name:u||"".concat(i," ").concat(a),friendshipStatus:l,image:s,isHover:y===parseInt(n,0),isActive:(r?f.userId:f.uid)===(r||c),onActionClick:function(e,n){return p(t,e,n)},updatePeoplePreviewData:function(){return m(t)},canDelete:g,activeTab:b})})),G()(V()(e),"handleListClick",(function(){var t=e.props.onListClick;t&&t(e.indicatorIndex)})),G()(V()(e),"handleToolbarClick",(function(e){e&&e.stopPropagation()})),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.scrollRef,r=e.items,i=e.heightItemInPx,a=e.heightTopDummyBlocks,o=e.heightBottomDummyBlocks,s=e.onMouseEnter,l=e.onMouseLeave,c=e.backToActiveItem,u=e.peoplePreviewData,d=void 0===u?{}:u,h=e.activeItem,f=void 0===h?{}:h,p=e.activeTab,m=e.indicatorIndex,g=e.onCreateGroupClick,b=e.onListScroll,y=d.userId!==f.userId||d.uid!==f.uid;return v.a.createElement("div",{onClick:this.handleListClick,className:"h-100 position-relative u-cursor-pointer",onMouseLeave:l,onMouseEnter:s},p===lI.GROUPS&&v.a.createElement("div",{className:P()(nI.a.toolbar,"u-cursor-default"),onClick:this.handleToolbarClick},v.a.createElement(et.a,{type:"button",className:P()(nI.a.createNewGroup),onClick:g},v.a.createElement("i",{className:"fv fuvi-group-icon-add u-fs-1x1o4"}),v.a.createElement("div",{className:"ml-2 u-fs-7o8"},t("btn.createNewGroup")))),v.a.createElement(v.a.Fragment,null,r.length>0&&v.a.createElement("div",{className:"".concat(nI.a.horizontalIndicator),style:{top:"".concat(a+i/2,"px")}},y&&v.a.createElement("div",{className:nI.a.backToActiveVideoWrapper},v.a.createElement(Qt,{round:!0,onClick:c,className:"m-0 bg-white u-opacity-90",tooltipText:t("tooltip.backToActiveItem")},v.a.createElement("i",{className:"fv fuvi-center-line u-fs-1x1o4"},v.a.createElement("span",{className:"path1"}),v.a.createElement("span",{className:"path2"}),v.a.createElement("span",{className:"path3"}))))),v.a.createElement(sE,{id:"left-scroll-bar",className:"autoshow-scrollbar y",ref:n,numberOfHasDataItems:14,data:r,itemRenderer:this.renderListItem,itemHeight:i,topElement:this.renderDummyItem(Math.ceil(a/i),"column-reverse",a),bottomElement:this.renderDummyItem(Math.ceil(o/i),"column",o),containerClassName:"h-100",onScroll:b,hoveredIndex:m})))}}]),r}(g.Component);var uI=x.g.PEOPLE.TAB,dI=x.g.PEOPLE_TABS,hI=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"submittedTerm",""),G()(V()(e),"state",{searchTerm:""}),G()(V()(e),"componentDidUpdate",(function(t){var n=t.activeTab;e.props.activeTab!==n&&(e.submittedTerm="",e.setState({searchTerm:""}))})),G()(V()(e),"handleSearchKeyDown",(function(t){var n=e.props.onPeopleSearch,r=e.state.searchTerm;t.nativeEvent.stopImmediatePropagation(),13===t.keyCode&&e.submittedTerm!==r&&(e.submittedTerm=r,n(r)),x.c.preventKeyDownSideEffect(t)})),G()(V()(e),"handleSearchChange",(function(t){e.setState({searchTerm:t.target.value})})),G()(V()(e),"handleSearchClear",(function(){var t=e.props.onPeopleSearch;e.setState({searchTerm:""}),e.submittedTerm&&t(""),e.submittedTerm=""})),G()(V()(e),"handleTabBtnClick",(function(t,n){n!==e.props.activeTab||t.preventDefault()})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.activeTab,i=n.noFriends,a=n.noIncomingRequests,o=n.noGroups,s=this.state.searchTerm;return v.a.createElement("div",{className:nI.a.peopleHeader},dI.map((function(t){var n=t.label,s=t.tab,l=t.path,c=t.icon;return v.a.createElement(O.a,{className:nI.a.link,key:s,to:l},v.a.createElement("div",{onClick:function(t){return e.handleTabBtnClick(t,s)},className:P()(nI.a.tabBtn,r===s&&nI.a.tabBtnActive)},v.a.createElement("i",{className:c}),v.a.createElement("div",null,n),s===uI.FRIENDS&&v.a.createElement("div",{className:nI.a.tabBtnBadge},i),s===uI.REQUEST&&v.a.createElement("div",{className:nI.a.tabBtnBadge},a),s===uI.GROUPS&&v.a.createElement("div",{className:nI.a.tabBtnBadge},o)))})),r===uI.PEOPLE&&v.a.createElement("div",{className:P()(nI.a.searchBoxWrapper,"ml-4")},v.a.createElement(mE,{searchTerm:s,placeholder:t("searchPeople"),onChange:this.handleSearchChange,onClear:this.handleSearchClear,onKeyDown:this.handleSearchKeyDown})))}}]),r}(g.Component);v.a.PureComponent;var fI=r(571),pI=r.n(fI),mI="grid",gI="list",vI="title",bI=x.g.VIDEO_MENU_BASE_URL,yI=x.g.VIDEO_SORT,AI=x.g.VIDEO_SORT_DEFAULT,_I=function(e){var t=e.data,n=t.cognitiveVideo,r=n.author,i=(n.avatar,n.comments,n.createdDate),a=(n.description,n.status,n.subject),o=n.title,s=n.topic,l=(n.visibilityScope,t.uid),c=t.likeCount,u=t.views,d=t.thumbnailUrl,h=(t.rootContext,t.sharedCount,t.categories),f=e.viewMode,p=(h&&-1!==h.indexOf("PUBLISHED_VIDEO")?bI.EXPLORING:bI.BRAINHIVE,"".concat(window.location.origin).concat(bI.BRAINHIVE,"?v=").concat(l,"&d=").concat(Date.now(),"&withOwnerContext=true"));return v.a.createElement("div",{className:P()(nI.a.sharedVideoItem,f===mI&&nI.a.sharedVideoItemGrid,f===gI&&nI.a.sharedVideoItemList)},v.a.createElement("div",{className:P()(nI.a.videoThumb,"w-100 d-flex")},v.a.createElement("img",{src:d||I.a.newVideoIcon,className:d?"h-100":""})),v.a.createElement("div",{className:nI.a.vidContent},v.a.createElement("div",{className:P()(nI.a.author,"text-truncate")},r),v.a.createElement("div",{className:P()(nI.a.title,"text-truncate")},o),v.a.createElement("div",{className:P()(nI.a.subject,"text-truncate")},a),v.a.createElement("div",{className:P()(nI.a.topic,"text-truncate")},s),v.a.createElement("div",{className:P()(nI.a.meta,"d-flex align-items-center mt-1")},v.a.createElement("div",{className:"date"},Ml()(i).format("DD MMM YYYY")),v.a.createElement("div",{className:"d-flex align-items-center ml-3 u-fs-13o16 font-weight-bold"},v.a.createElement("i",{className:"fv fuvi-eye u-mr-1o4"}),v.a.createElement("span",null,x.c.nFormatter(u))),v.a.createElement("div",{className:"d-flex align-items-center ml-3 u-fs-13o16 font-weight-bold"},v.a.createElement("i",{className:"fv fuvi-like u-mr-1o4"}),v.a.createElement("span",null,x.c.nFormatter(c))))),v.a.createElement("a",{href:p,className:nI.a.videoLink}))},wI=function(e){var t=e.userId,n=e.submittedTerm,r=e.yReachCount,i=void 0===r?0:r,a=(e.scrollRef,e.onSubmitSearch),o=e.userVideos,s=void 0===o?[]:o,l=Object(g.useState)(mI),c=pi()(l,2),u=c[0],d=c[1],h=Object(g.useState)(vI),f=pi()(h,2),p=f[0],m=(f[1],Object(g.useState)(0)),b=pi()(m,2),y=b[0],A=b[1],_=Object(g.useState)([]),w=pi()(_,2),E=(w[0],w[1],Object(g.useState)(window.innerWidth)),S=pi()(E,2),C=(S[0],S[1]),O=Object(g.useState)(AI),I=pi()(O,2),M=I[0],D=I[1],N=Object(g.useState)(""),L=pi()(N,2),R=(L[0],L[1],Object(g.useState)(1)),B=pi()(R,2),j=B[0],U=(B[1],Object(g.useState)(!1)),z=pi()(U,2),V=z[0],W=(z[1],Object(g.useState)({})),G=pi()(W,2),K=(G[0],G[1]),X=(Object(q.c)(),[{name:Object(uc.b)("mostRelevant"),value:yI.MOST_RELEVANT,prefix:v.a.createElement("i",{className:"fv fuvi-public-global-ic mr-2"})},{name:Object(uc.b)("mostRecent"),value:yI.MOST_RECENT,prefix:v.a.createElement("i",{className:"fv fuvi-most-recent mr-2 u-fs-7o8"})},{name:Object(uc.b)("mostView"),value:yI.MOST_VIEW,prefix:v.a.createElement("i",{className:"fv fuvi-most-view mr-2"})}]),Q=Object(Y.chunk)(s,4),$=Object(g.useCallback)(function(){var e=H()(F.a.mark((function e(r){var i,o;return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={dir:"DESC",fieldName:"relevant"},M===yI.MOST_VIEW?i={dir:"DESC",fieldName:"view"}:M===yI.MOST_RECENT&&(i={dir:"DESC",fieldName:"recent"}),t){e.next=4;break}return e.abrupt("return");case 4:return o={pageNumber:r,pageSize:x.g.USER_SHARED_VIDEO_PAGE_SIZE,searchTerm:n,userId:t,sort:i},a&&a(o),e.abrupt("return");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[M,t,n]);return Object(g.useEffect)((function(){y>1&&y<j&&$(y)}),[y]),Object(g.useEffect)((function(){A(0),$(0)}),[t,M,n]),Object(g.useEffect)((function(){!i&&(V||y>=j-1)||y<j&&A(y+1)}),[i]),Object(g.useEffect)((function(){var e=function(){return C(window.innerWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),K({})}}),[]),v.a.createElement("div",{className:P()(nI.a.tabContentWrap,"w-100")},v.a.createElement("div",{className:P()(nI.a.filters,"d-flex align-items-center")},v.a.createElement("div",{className:P()(nI.a.sortWrap,"d-flex align-items-center")},v.a.createElement("label",{className:"mb-0"},Object(uc.b)("sortBy"),": "),v.a.createElement(lO,{title:Object(uc.b)(M||""),className:P()(nI.a.sortByDrop,"sort-dropdown")},X.map((function(e){return v.a.createElement(ut.Item,{key:pI()(),href:"#",onClick:function(){return p===e.value?null:(t=e.value,void(M!==t&&D(t)));var t}},e.name)})))),v.a.createElement("div",{className:P()(nI.a.viewMode,"d-flex ml-auto align-items-center justify-content-center")},v.a.createElement("div",{onClick:function(){return u===mI?null:d(mI)},className:P()(nI.a.viewModeType,u===mI&&nI.a.active,"d-flex align-items-center justify-content-center")},v.a.createElement("i",{className:"fv fuvi-icon-grid u-fs-7o8"})),v.a.createElement("div",{onClick:function(){return u===gI?null:d(gI)},className:P()(nI.a.viewModeType,u===gI&&nI.a.active,"d-flex align-items-center justify-content-center u-ml-1o2")},v.a.createElement("i",{className:"fv fuvi-icon-list u-fs-7o8"})))),v.a.createElement("div",{className:P()(nI.a.videoList,"w-100")},u===mI?v.a.createElement(v.a.Fragment,null,Q&&Q.map((function(e){return v.a.createElement(T,{className:nI.a.videoListRow,key:pI()()},e.map((function(e,t){return v.a.createElement(k.a,{lg:"3",key:e.uid,className:""},v.a.createElement(_I,{key:e.uid,data:e,viewMode:u}))})))}))):v.a.createElement("div",{className:""},s.map((function(e){return v.a.createElement(_I,{key:e.uid,data:e,viewMode:u})}))),!V&&0===s.length&&v.a.createElement("div",{className:P()(nI.a.noSharedVideos,"mt-4 text-center font-italic font-weight-bold")},n?Object(uc.b)("noSharedVideoFound"):Object(uc.b)("noSharedVideo"))))};function EI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function SI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EI(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var CI=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isHeaderActionHandling:!1,shareTabKeys:{about:"about",sharedVideos:"sharedVideos"},searchTerm:"",submittedTerm:"",activeTab:"about",showSharedVideoTab:!1,renderCount:0,yReachCount:0,isSearchVideo:!1,totalPages:1,userVideos:[],searchParams:{pageNumber:0,pageSize:x.g.USER_SHARED_VIDEO_PAGE_SIZE,searchTerm:"",userId:e.props.userId,sort:{dir:"DESC",fieldName:"relevant"}}}),G()(V()(e),"tabRef",v.a.createRef()),G()(V()(e),"sharedVideoRef",v.a.createRef()),G()(V()(e),"handleHeaderActionClick",(function(t,n){t&&t.stopPropagation();var r=e.props.onHeaderActionClick;e.state.isHeaderActionHandling||(e.setState({isHeaderActionHandling:!0}),r&&r(n,(function(){return e.setState({isHeaderActionHandling:!1})})))})),G()(V()(e),"handleSearchKeyDown",(function(t){var n=e.state.searchTerm;t.nativeEvent.stopImmediatePropagation(),13===t.keyCode&&e.submittedTerm!==n&&e.setState({submittedTerm:n}),x.c.preventKeyDownSideEffect(t)})),G()(V()(e),"handleSearchChange",(function(t){e.setState({searchTerm:t.target.value})})),G()(V()(e),"handleSearchClear",(function(){e.setState({searchTerm:"",submittedTerm:""})})),G()(V()(e),"handleTabChanged",(function(t){t!==e.state.activeTab&&e.setState({activeTab:t})})),G()(V()(e),"componentDidMount",(function(){e.unlistenHistory=$.a.listen((function(t){e.handleURLChange(t)})),e.handleURLChange($.a.location)})),G()(V()(e),"componentWillUnmount",(function(){e.unlistenHistory&&e.unlistenHistory()})),G()(V()(e),"handleURLChange",(function(){e.props.userId===x.c.getDataFromUrl(window.location).uid&&e.setState({renderCount:e.state.renderCount+1,activeTab:e.state.shareTabKeys.about,yReachCount:0,searchTerm:"",submittedTerm:""})})),G()(V()(e),"handleLoadMore",(function(t){e.setState({yReachCount:e.state.yReachCount+1});var n=e.state,r=n.searchParams,i=n.totalPages;if(!(r.pageNumber>=i-1)){var a=SI(SI({},r),{},{pageNumber:r.pageNumber+1});e.handleSearchUserVideo(a)}})),G()(V()(e),"handleSearchUserVideo",(function(t){if(!e.state.isSearchVideo){var n=e.props.fetchUserVideos;e.setState({isSearchVideo:!0},(function(){n(t,(function(n){e.setState({userVideos:t.pageNumber>0?[].concat(Rl()(e.state.userVideos),Rl()(n.content)):n.content,isSearchVideo:!1,searchParams:t,totalPages:n.totalPages},(function(){if(0===t.pageNumber&&n.totalPages>1){var r=SI(SI({},t),{},{pageNumber:1});e.handleSearchUserVideo(r)}}))}),(function(){e.setState({isSearchVideo:!1})}))}))}})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.avatar,i=(r=void 0===r?{}:r).image,a=n.firstName,o=n.lastName,s=n.birthday,l=n.email,c=n.skills,u=void 0===c?[]:c,d=n.subjects,h=void 0===d?[]:d,f=n.topics,p=void 0===f?[]:f,m=n.bio,g=n.country,b=n.education,y=n.headline,A=n.honorAndAward,_=n.location,w=n.isHeaderActionHandling,E=n.friendshipStatus,S=n.userId,C=n.isShowPeoplePreview,T=this.state,k=T.shareTabKeys,O=T.submittedTerm,I=T.searchTerm,M=T.activeTab;T.showSharedVideoTab,T.yReachCount;if(!a)return null;var D=x.c.getDataFromUrl(window.location).uid,N=D===S?M:k.about,L=x.g.PEOPLE_ACTIONS[E]||[];return v.a.createElement("div",{className:P()(nI.a.peopleProfileWrapper,"peopleProfileWrapper")},v.a.createElement(Lb,{className:P()("fv-smooth-scroll h-100 w-100 u-shadow bg-white"),containerClassName:nI.a.peopleFirstArea,onYReachAlmostEnd:function(t){return e.handleLoadMore(t)},ref:function(t){e.scrollRef=t}},v.a.createElement("div",{className:"w-100"},v.a.createElement("div",{className:nI.a.UserProfileHeaderWrap},v.a.createElement(UO,{fullName:"".concat(a," ").concat(o),avatar:i,headline:y,editable:!1,onEditButtonClick:this.handleEditButtonClick,isActionHandling:w,actions:L,onActionClick:this.handleHeaderActionClick})),v.a.createElement("div",{className:nI.a.tabWrap},N===k.sharedVideos&&v.a.createElement("div",{className:P()(nI.a.userVideoSearchWrap,"user-videos-sb-wrap")},v.a.createElement(mE,{searchTerm:I,placeholder:t("search"),onChange:this.handleSearchChange,onClear:this.handleSearchClear,onKeyDown:this.handleSearchKeyDown})),v.a.createElement(Sl,{activeKey:N,onSelect:function(t){return e.handleTabChanged(t)},className:"fv-tabs user-profile-tabs"},v.a.createElement(kl,{eventKey:k.about,title:t("about")},v.a.createElement(KO,{bio:m,fullName:"".concat(a," ").concat(o),birthday:s,email:l,country:g,location:_,topics:p.map((function(e){return e.name})),subjects:h.map((function(e){return e.name})),skills:u.map((function(e){return e.name})),education:b,honorsAndAwards:A,isShowPersonalInfor:!1})),(!C||D===S)&&v.a.createElement(kl,{eventKey:k.sharedVideos,title:t("sharedVideos")},v.a.createElement(wI,{userId:S,submittedTerm:O,onSubmitSearch:this.handleSearchUserVideo,userVideos:this.state.userVideos})))))))}}]),r}(v.a.PureComponent),TI=Object(q.b)((function(e){return tw()(e),{}}),(function(e){return{fetchUserVideos:function(t,n,r){return e(Q.e.fetchUserVideos(t,n,r))}}}))(CI),kI=r(67),xI=r.n(kI);var OI={unit:"px",width:100,height:100,aspect:1},II=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"uploadAvatarRef",v.a.createRef()),G()(V()(e),"state",{blobFile:"",src:null,crop:OI}),G()(V()(e),"onImageLoaded",(function(t){e.imageRef=t})),G()(V()(e),"onCropComplete",(function(t){e.makeClientCrop(t)})),G()(V()(e),"onCropChange",(function(t){e.setState({crop:t})})),G()(V()(e),"handleGroupPhotoUpload",(function(){var t=e.state.blobFile,n=e.props,r=n.uploadAvatarAction,i=n.groupData,a=n.onUpdateGroupAvatar;r({file:t,uid:i.uid},(function(t){e.handleCancel(),a(t)}))})),G()(V()(e),"handleCancel",(function(t){t&&t.preventDefault(),e.setState({src:null,crop:OI}),e.uploadAvatarRef.value=""})),G()(V()(e),"handleFileChange",(function(t){if(t.target.files&&t.target.files.length>0){var n=new FileReader;n.addEventListener("load",(function(){e.setState({src:n.result})})),n.readAsDataURL(t.target.files[0])}})),e}return c()(n,[{key:"getCroppedImg",value:function(e,t,n){var r=this,i=document.createElement("canvas"),a=e.naturalWidth/e.width,o=e.naturalHeight/e.height;return i.width=t.width,i.height=t.height,i.getContext("2d").drawImage(e,t.x*a,t.y*o,t.width*a,t.height*o,0,0,t.width,t.height),new Promise((function(e){i.toBlob((function(t){t&&(t.name=n,t.fileName=n,window.URL.revokeObjectURL(r.fileUrl),r.fileUrl=window.URL.createObjectURL(t),e(r.fileUrl),r.setState({blobFile:t}))}),"image/jpeg")}))}},{key:"makeClientCrop",value:function(e){this.imageRef&&e.width&&e.height&&this.getCroppedImg(this.imageRef,e,"".concat((new Date).getTime(),".jpeg"))}},{key:"render",value:function(){var e=this,t=this.props,n=t.avatar,r=t.editable,i=void 0===r||r,a=t.className,o=this.state,s=o.crop,l=o.src;return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(xI.a.avatar,a),style:{backgroundImage:"url(".concat(n,")")}},i&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(xI.a.cameraIcon,"border")},v.a.createElement("i",{className:"fv fuvi-camera u-text-cyan u-fs-1x1o2"})),v.a.createElement($l.a.Control,{type:"file",readOnly:!0,placeholder:"Add subtitle",className:"".concat(xI.a.uploadAvatarInput," position-absolute w-100 h-100"),accept:"image/*",onChange:this.handleFileChange,ref:function(t){e.uploadAvatarRef=t},title:""}))),v.a.createElement(Fl.a,{show:!!l},v.a.createElement(NO.a,{src:l,crop:s,circularCrop:!0,onImageLoaded:this.onImageLoaded,onComplete:this.onCropComplete,onChange:this.onCropChange,keepSelection:!0}),v.a.createElement(Fl.a.Footer,null,v.a.createElement(k.a,{sm:"4",className:"mr-2"},v.a.createElement(et.a,{variant:"outline-primary",block:!0,className:xI.a.bottomButton,onClick:this.handleCancel},"Cancel")),v.a.createElement(k.a,{sm:"4",className:"mr-3"},v.a.createElement(et.a,{type:"submit",variant:"primary",block:!0,className:[xI.a.bottomButton,"text-white"],onClick:this.handleGroupPhotoUpload},"Save")))))}}]),n}(g.Component),MI=Object(q.b)((function(e){return{authorInfo:e.auth.authorInfo,userInfo:e.auth.userInfo}}),(function(e){return{uploadAvatarAction:function(t,n,r){return e(Q.i.uploadGroupAvatar(t,n,r))}}}))(II),PI=x.g.TEXT_INPUT_MAX_LENGTH;x.g.CREATE_COGVID_CONSTRAINTS.KEYWORD_LENGTH_LIMIT;function DI(e){var n=e.groupData,r=e.name,i=e.description,a=e.editable,o=e.validator,s=e.onEditButtonClick,l=e.onDeleteButtonClick,c=e.displayEditButton,u=e.handleChange,d=e.handleValidationOnBlur,h=e.onGroupSaveClick,f=(e.onGroupCancelClick,e.onUpdateGroupAvatar),p=n.uid,m=n.name,b=n.description,y=Object(Y.get)(n,"avatar.image",n.avatar),A=Object(g.useState)(!0),_=pi()(A,2),w=_[0],E=(_[1],Object(g.useState)(!1)),S=pi()(E,2),C=S[0],T=S[1],k=function(e){var t=e.target,n=t.name,r=t.value;T(!0),u({name:n,value:r})},x=function(){T(!1)};return v.a.createElement(v.a.Fragment,null,c?v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(xI.a.UPHeaderWrapper)},v.a.createElement("div",{className:xI.a.coverImage,style:{backgroundImage:"url(images/defaultCoverImage.png)"}},v.a.createElement("div",{className:xI.a.UPInfo},v.a.createElement("div",{className:xI.a.avatarWrapper},v.a.createElement(MI,{groupData:n,avatar:y||I.a.defaultGroupAvatar,editable:a})),v.a.createElement("div",{className:"flex-grow-1 d-flex align-items-end overflow-hidden"},v.a.createElement("div",{className:P()("w-100 h-50 d-flex flex-column justify-content-center u-pl-1x9o16")},v.a.createElement("div",{className:P()(xI.a.fullName,"u-truncate-2")},n.name))),c&&p&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(xI.a.editBtn,"u-shadow"),onClick:function(e){return s(e)}},v.a.createElement("i",{className:"fv fuvi-notes ml-3 u-fs-1x1o3"}),v.a.createElement("div",{className:"u-ml-2o5 u-fs-9o10"},t("btn.edit"))),v.a.createElement("div",{className:P()(xI.a.deleteBtn,"u-shadow"),onClick:function(e){return l(e)}},v.a.createElement("i",{className:"fv fuvi-trash-can ml-3 u-fs-1x1o3"}),v.a.createElement("div",{className:"u-ml-2o5 u-fs-9o10"},t("btn.delete"))))))),v.a.createElement("div",{className:P()(xI.a.groupAboutWraper,"position-relative")},v.a.createElement("div",{className:"border-bottom my-3 w-100 "}),v.a.createElement("div",{className:"text-truncate font-weight-bold u-fs-1x1o10"},t("about")),v.a.createElement("div",{className:P()(xI.a.aboutLine,"u-truncate-2 my-2 u-fs-1x1o10 position-relatives")},n.description))):v.a.createElement("div",{className:P()(xI.a.editHeaderWrapper)},v.a.createElement("div",{className:xI.a.coverImage},v.a.createElement("div",{className:P()(xI.a.UPInfo,"p-0")},v.a.createElement("div",{className:xI.a.avatarWrapper},v.a.createElement(MI,{className:"border",groupData:n,avatar:y||I.a.defaultGroupAvatar,editable:a,onUpdateGroupAvatar:f})),w?v.a.createElement("div",{className:P()(xI.a.editRegion)},v.a.createElement("div",{className:"d-flex"},v.a.createElement(mu,{name:"name",required:!0,placeholder:t("placeholder.groupName"),value:r,onChange:k,onBlur:function(){return d("group name")},validatorElement:o.message("group name",r,"groupNameRequired|max:100"),className:"flex-grow-1 pl-0 pr-0"}),v.a.createElement("div",{className:"flex-shrink-0 ml-2"},v.a.createElement(et.a,{variant:"primary",className:P()(xI.a.groupFormBtn,C&&"u-cursor-default"),onClick:function(e){return function(e){e.preventDefault(),h(x)}(e)},disabled:!o.allValid()||!C},t("btn.save")),v.a.createElement(et.a,{variant:"outline-primary",className:P()(xI.a.groupFormBtn,"ml-2"),onClick:function(e){return function(e){e.preventDefault(),u({name:"name",value:m}),u({name:"description",value:b}),T(!1)}(e)},disabled:!C},"Cancel"))),v.a.createElement(Eu,{name:"description",placeholder:t("placeholder.groupDescription"),rows:3,value:i,onChange:k,onBlur:function(){return d("group description")},validatorElement:o.message("group description",i,"max:".concat(PI))})):v.a.createElement("div",{className:P()(xI.a.editRegion)},v.a.createElement("div",{className:"col-md-8 pl-0 pr-0"},v.a.createElement("div",{className:P()(xI.a.fullName,"text-truncate")},n.name),v.a.createElement("div",{className:P()(xI.a.headline,"u-truncate-2")},n.description)),v.a.createElement("div",{className:P()(xI.a.editBtn,'u-shadow col-md-4 pr-0"'),onClick:function(e){return s(e)}},v.a.createElement("i",{className:"fv fuvi-notes ml-3 u-fs-1x1o3"}),v.a.createElement("div",{className:"u-ml-2o5 u-fs-9o10"},t("btn.edit")))),c&&v.a.createElement("div",{className:P()(xI.a.editBtn,"u-shadow"),onClick:function(e){return s(e)}},v.a.createElement("i",{className:"fv fuvi-notes ml-3 u-fs-1x1o3"}),v.a.createElement("div",{className:"u-ml-2o5 u-fs-9o10"},t("btn.edit")))))))}function NI(e){var t=e.id,n=e.userData,r=e.onRemove,i=e.canEdit,a=n.fullName,o=Object(Y.get)(n,"avatar.image",I.a.noAvatar);return v.a.createElement("div",{className:"d-flex align-items-center u-mb-1x3o8"},v.a.createElement("div",{className:P()(xI.a.leftItem,xI.a.shareItem)},v.a.createElement("img",{src:o,className:xI.a.shareItemAvatar}),v.a.createElement("div",null,a)),i&&v.a.createElement("div",{role:"button",className:xI.a.deleteIcon,onClick:function(){return r(t)}},v.a.createElement("i",{className:"fv fuvi-trash-can"})))}DI.propTypes={roles:ne.a.array,role:ne.a.object,onRoleChange:ne.a.func,onPeopleSearch:ne.a.func,onSuggestionSelect:ne.a.func,onRemove:ne.a.func,onBlur:ne.a.func,userData:ne.a.object,suggestions:ne.a.array,canEdit:ne.a.bool,isLongItem:ne.a.bool,editable:ne.a.bool,actions:ne.a.array,displayEditButton:ne.a.bool},DI.defaultProps={roles:[],role:{},suggestions:[],canEdit:!0,userData:{},editable:!0,actions:[],displayEditButton:!0,onEditButtonClick:function(){return null}},NI.propTypes={roles:ne.a.array,role:ne.a.object,onRoleChange:ne.a.func,onPeopleSearch:ne.a.func,onSuggestionSelect:ne.a.func,onRemove:ne.a.func,onBlur:ne.a.func,userData:ne.a.object,suggestions:ne.a.array,canEdit:ne.a.bool,isLongItem:ne.a.bool},NI.defaultProps={roles:[],role:{},suggestions:[],canEdit:!1};var LI=x.g.PEOPLE.ACTION_TYPE,RI=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isHeaderActionHandling:!1,showDeleteConfirmation:!1}),G()(V()(e),"handleEditGroup",(function(t){t&&t.stopPropagation();var n=e.props.onEditActionClick;n&&n()})),G()(V()(e),"handleActionClick",(function(t,n){t&&t.stopPropagation();var r=e.props.onHeaderActionClick;r&&r(n,(function(){return e.setState({showDeleteConfirmation:!1})}))})),G()(V()(e),"handleDeleteClick",(function(t){t&&t.stopPropagation(),e.setState({showDeleteConfirmation:!0})})),G()(V()(e),"handleDeleteModalConfirm",(function(t){e.handleActionClick(t,LI.DELETE_ITEM)})),G()(V()(e),"handleDeleteModalCancel",(function(t){t&&t.stopPropagation(),e.setState({showDeleteConfirmation:!1})})),G()(V()(e),"showCreateGroupModal",(function(t){t&&t.stopPropagation(),(0,e.props.toggleCreateGroupForm)(!0)})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.avatar,i=((r=void 0===r?{}:r).image,n.groupData),a=n.groupMemberList,o=n.groupList,s=this.state.showDeleteConfirmation,l=a.length>0,c=o.length>0;return v.a.createElement("div",{className:nI.a.peopleProfileWrapper},c?v.a.createElement(Lb,{className:P()("fv-smooth-scroll h-100 w-100 u-shadow bg-white"),containerClassName:nI.a.peopleFirstArea},v.a.createElement("div",{className:"w-100"},v.a.createElement(DI,{groupData:i,canEdit:!1,editable:!1,onEditButtonClick:this.handleEditGroup,onDeleteButtonClick:this.handleDeleteClick}),v.a.createElement("div",{className:nI.a.separatorLine}),v.a.createElement("div",{className:nI.a.addFriendsWrapper},v.a.createElement("div",{className:nI.a.separator}),l&&v.a.createElement("div",{className:P()(nI.a.groupMember,"text-truncate")},t("groupMembers")),a.map((function(t){if(!t.willBeDeleted)return v.a.createElement(NI,{key:t.id?t.id:t.userId,id:t.id,onPeopleSearch:e.handleSearchPeople,userData:t,suggestions:t.suggestions,canEdit:!1})}))))):v.a.createElement("div",{className:"w-100 h-100 d-flex flex-column justify-content-center align-items-center u-overflow-hidden"},v.a.createElement("div",{className:P()(nI.a.circleWrapper,"u-shadow rounded-circle")},v.a.createElement("img",{height:"120",width:"120",src:I.a.groupImage,alt:"cogvid Icon",className:P()("u-opacity-80")})),v.a.createElement("div",{className:nI.a.instructionText},v.a.createElement("div",null,t("toCreateNewGroup"),","),v.a.createElement("div",{className:P()(nI.a.clickHereBtn),onClick:this.showCreateGroupModal},t("btn.clickHere")))),s&&v.a.createElement("div",{onClick:function(e){e.preventDefault(),e.stopPropagation()}},v.a.createElement(IC,{show:!0,title:t("modal.confirmDeleteGroupTitle"),onConfirm:this.handleDeleteModalConfirm,onClose:this.handleDeleteModalCancel})),";")}}]),r}(v.a.PureComponent),BI=Object(q.b)(null,(function(e){return{toggleCreateGroupForm:function(t){return e(Q.i.toggleCreateGroupForm(t))}}}))(RI);var jI=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{heightItemInPx:x.c.convertRemToPx(Um.heightPeopleItem),heightTopDummyBlocks:0,heightBottomDummyBlocks:0,indicatorIndex:0}),G()(V()(e),"componentDidMount",(function(){e.calculateViewDimensions(),window.addEventListener("resize",e.calculateViewDimensions)})),G()(V()(e),"componentWillUnmount",(function(){window.removeEventListener("resize",e.calculateViewDimensions)})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.items;e.props.items.length!==n.length&&e.calculateViewDimensions()})),G()(V()(e),"calculateViewDimensions",(function(){e.props.isFullscreenMode||setTimeout((function(){var t=e.props.items,n=void 0===t?[]:t,r=Object(Y.get)(document.getElementById("left-scroll-bar"),"clientHeight",0),i=Object(Y.get)(document.getElementById("people-leftbar-content"),"clientHeight",0),a=x.c.convertRemToPx(Um.heightPeopleItem),o=n.length>0?i/2-a/2:i/2+a/2,s=r-i/2-a/2;e.setState({heightItemInPx:a,heightTopDummyBlocks:o,heightBottomDummyBlocks:s})}))})),G()(V()(e),"handleListClick",(function(){var t=e.props,n=t.items,r=void 0===n?[]:n,i=(t.activateItem,r[e.state.indicatorIndex]);if(i){var a=x.c.addURLSearchParams([[x.g.SEARCH_PARAM.KEY.UID,i.userId?i.userId:i.uid]],null,!0);$.a.push(a)}})),G()(V()(e),"handleBackToActiveItem",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();var n=e.props,r=n.scrollToItem,i=n.activeItem,a=void 0===i?{}:i;(0,n.updatePeoplePreviewData)(a),a.userId?r({userId:a.userId},!0):r({uid:a.uid},!0)})),G()(V()(e),"handleCreateGroupClick",(function(t){(0,e.props.toggleCreateGroupForm)(!0)})),G()(V()(e),"handleListScroll",Object(Y.throttle)((function(){var t=e.state.heightItemInPx,n=Object(Y.get)(e.props.scrollRef,"current.scrollRef.scrollTop",0);e.indicatorIndex=parseInt((n+t/2)/t,0),e.setState({indicatorIndex:e.indicatorIndex})}),100)),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.items,n=void 0===t?[]:t,r=e.scrollRef,i=e.activeItem,a=e.onListItemActionClick,o=e.updatePeoplePreviewData,s=e.onMouseLeave,l=e.onMouseEnter,c=e.scrollToItem,u=e.peoplePreviewData,d=e.activeTab,h=this.state,f=h.heightItemInPx,p=h.heightTopDummyBlocks,m=h.heightBottomDummyBlocks,g=h.indicatorIndex,b=d===x.g.PEOPLE.TAB.GROUPS;return v.a.createElement(cI,{items:n,activeItem:i,scrollRef:r,heightItemInPx:f,heightTopDummyBlocks:p,heightBottomDummyBlocks:m,onListClick:this.handleListClick,onListScroll:this.handleListScroll,onListItemActionClick:a,updatePeoplePreviewData:o,onMouseLeave:s,onMouseEnter:l,scrollToItem:c,backToActiveItem:this.handleBackToActiveItem,peoplePreviewData:u,activeTab:d,onCreateGroupClick:this.handleCreateGroupClick,canDelete:b,indicatorIndex:g})}}]),n}(g.Component),FI=Object(q.b)((function(e){return tw()(e),{}}),(function(e){return{updateCreateGroupModal:function(t,n,r){return e(Q.i.updateCreateGroupModal(t,n,r))},toggleCreateGroupForm:function(t){return e(Q.i.toggleCreateGroupForm(t))}}}))(jI),UI=r(69),HI=r.n(UI);var zI=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{peopleList:[],isLoadingItems:!1}),G()(V()(e),"fetchData",(function(){var t=e.props,n=t.groupId,r=t.getGroupMemberByVideo,i=t.videoId;e.setState({isLoadingItems:!0,items:[]}),r({groupId:n,videoId:i},(function(t){e.setState({peopleList:t,isLoadingItems:!1})}),(function(t){e.setState({isLoadingItems:!1})}))})),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.disabled,r=e.position,i=this.state,a=i.peopleList,o=i.isLoadingItems,s=v.a.createElement(on,{style:{borderRadius:10},className:HI.a.popoverGroupMemberWrapper},v.a.createElement(on.Title,{as:"h3",style:{borderTopLeftRadius:11,borderTopRightRadius:11,marginBottom:2}},t("groupMembers")),v.a.createElement(on.Content,null,v.a.createElement(Lb,{containerClassName:HI.a.popoverScrollWrapper},o&&v.a.createElement(Nn,{className:"bg-transparent text-primary"}),v.a.createElement("div",null,a.map((function(e){return v.a.createElement(NI,{key:e.userId,id:e.userId,userData:e})}))))));return v.a.createElement(v.a.Fragment,null,v.a.createElement(Kt.a,{rootClose:!0,trigger:"click",placement:r,overlay:s,onEnter:this.fetchData},v.a.createElement(Qt,{disabled:n},v.a.createElement("i",{className:P()("fv fuvi-eye u-fs-1x1o8")}))))}}]),r}(g.Component),VI=Object(q.b)((function(e){return{videoId:e.cogvid.shareVideoChapterModal.videoId}}),(function(e){return{getGroupMemberByVideo:function(t,n,r){return e(Q.i.getGroupMemberByVideo(t,n,r))}}}))(zI);function WI(e){var t=e.uid,n=e.roles,r=e.role,i=e.onRoleChange,a=e.data,o=e.onRemove,s=e.canEdit,l=e.isLongItem,c=a.name,u=a.isGroupItem,d=Object(Y.get)(a,"avatar.image",a.avatar);return v.a.createElement("div",{className:HI.a.shareVideoItem},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:P()(HI.a.leftItem,HI.a.shareItem)},v.a.createElement("div",{className:HI.a.shareItemAvatar,style:{backgroundImage:"url(".concat(d,")")}},u&&v.a.createElement("i",{className:P()("fv fuvi-group-avatar-ibg u-shadow",HI.a.groupIconWrap)},v.a.createElement("span",{className:"path1"}),v.a.createElement("span",{className:"path2"}))),v.a.createElement("div",{className:P()("text-truncate")},c),u&&v.a.createElement("div",{className:"ml-auto"},v.a.createElement(VI,{groupId:t}))),v.a.createElement(wu,{className:P()(HI.a.rightItem,l&&HI.a.longTextRoles,l?"u-w-17":"u-w-14"),options:n,value:r.name,onSelect:function(e){i(t,e)},disabled:!s}),s&&v.a.createElement("div",{role:"button",className:HI.a.deleteIcon,onClick:function(){return o(t)}},v.a.createElement("i",{className:"fv fuvi-trash-can"}))))}function GI(e){var t=e.item,n=t.avatar;return v.a.createElement("span",{id:t.uid,className:HI.a.suggestionItem},v.a.createElement("img",{src:n,className:HI.a.suggestionAvatar}),v.a.createElement("span",null,t.name))}function qI(e){var t=e.tag,n=(e.removeButtonText,e.onDelete),r=t.name,i=t.avatar;return v.a.createElement("div",{onClick:n,className:HI.a.tagItem},v.a.createElement("img",{src:i,className:HI.a.tagAvatar}),v.a.createElement("span",{className:P()(HI.a.tagLabel,"text-truncate")},r),v.a.createElement("i",{className:"fv fuvi-delete text-danger ml-2"}))}function YI(e){var t=e.roles,n=e.role,r=e.onRoleChange,i=e.onPeopleSearch,a=e.onSuggestionSelect,o=e.suggestions,s=e.onDelete,l=e.onBlur,c=e.isLongItem,u=e.data,d=e.onCreateSharingItems,h=e.canAdd,f=e.canAddMore,p=e.placeholder;return v.a.createElement("div",{className:"d-flex align-items-start u-mb-1x3o8"},v.a.createElement("div",null,v.a.createElement(sd,{className:P()(HI.a.leftItem),placeholderText:f?p:"",tags:u,suggestions:o,onInput:i,onFocus:i,onBlur:l,onAddition:a,onDelete:s,minQueryLength:0,suggestionComponent:GI,tagComponent:qI}),!f&&v.a.createElement("div",{className:"mt-1 ml-2 text-secondary"},Object(_t.t)("maxSharesReached"))),v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement(wu,{className:P()(HI.a.rightItem,c&&HI.a.longTextRoles),options:t,value:n.name,onSelect:function(e){r(null,e)}}),v.a.createElement("div",{role:"button",className:P()(HI.a.addBtn,!h&&"u-opacity-50 u-pointer-event-none"),onClick:d},v.a.createElement("i",{className:"fv fuvi-user-addlist u-mr-3o8"}),v.a.createElement("div",null,Object(_t.t)("btn.add")))))}function KI(e){var t=e.item,n=t.avatar;return v.a.createElement("span",{id:t.uid,className:HI.a.suggestionItem},v.a.createElement("img",{src:n,className:HI.a.suggestionAvatar}),v.a.createElement("span",null,t.name))}function XI(e){var t=e.tag,n=(e.removeButtonText,e.onDelete),r=t.name,i=t.avatar;return v.a.createElement("div",{onClick:n,className:HI.a.tagItem},v.a.createElement("img",{src:i,className:HI.a.tagAvatar}),v.a.createElement("span",{className:P()(HI.a.tagLabel,"text-truncate")},r),v.a.createElement("i",{className:"fv fuvi-delete text-danger ml-2"}))}WI.propTypes={roles:ne.a.array,role:ne.a.object,onRoleChange:ne.a.func,onPeopleSearch:ne.a.func,onSuggestionSelect:ne.a.func,onRemove:ne.a.func,onBlur:ne.a.func,data:ne.a.object,suggestions:ne.a.array,canEdit:ne.a.bool,isLongItem:ne.a.bool},WI.defaultProps={roles:[],role:{},suggestions:[],canEdit:!0},YI.propTypes={roles:ne.a.array,role:ne.a.object,onRoleChange:ne.a.func,onPeopleSearch:ne.a.func,onSuggestionSelect:ne.a.func,onDelete:ne.a.func,onBlur:ne.a.func,suggestions:ne.a.array,canRemove:ne.a.bool,isLongItem:ne.a.bool,canAdd:ne.a.bool,canAddMore:ne.a.bool,placeholder:ne.a.string},YI.defaultProps={roles:[],role:"",suggestions:[],canRemove:!0,canAdd:!1,canAddMore:!1};var QI=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e,n=this,r=this.state,i=r.shareVideoItems,a=r.showConfirmationModal,o=r.isSubmitting,s=r.rolesHint,l=r.isFetchingShareInfo,c=r.addingSharingItems,u=r.searchingFriendResults,d=r.role,h=r.isShareToGroups,f=r.roles,p=r.sharableRoles,m=r.showConfirmationTransferOwnerModal,g=r.isTransferingOwner,b=r.searchingTransferOwnerResults,y=r.newOwners,A=r.ownerInfo,_=r.publicView,w=this.props,E=w.title,S=w.chapterId,C=w.isOwner,T=w.maxNumberOfSharesPerVideo,k=(w.videoOwnerId,w.trustedPublisher),O=w.videoId,M=this.checkCanSubmit(),D=!s||l,N=i.filter((function(e){var t=e.willBeDeleted;return!(void 0!==t&&t)})).length+c.length<T,L=!!k&&x.c.isVideoOwner({videoId:O});return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:HI.a.shareCognitiveForm,scrollable:!1,backdrop:"static",onEscapeKeyDown:this.handleFormCancel,size:"lg"},v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a.Header,{className:"d-flex"},v.a.createElement("div",{className:"d-flex align-items-center ".concat(HI.a.formTitle," flex-fill"),style:{minWidth:0}},v.a.createElement("img",{src:I.a.emptyVideoIcon,style:{width:50},className:"h-50 u-mr-7o8"}),v.a.createElement("div",{className:"flex-fill",style:{minWidth:0}},v.a.createElement("div",{className:"text-truncate pr-4"},E))),v.a.createElement("div",null,v.a.createElement("div",{className:P()("close-modal-btn",HI.a.closeButton),onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "})))),v.a.createElement(Fl.a.Body,null,v.a.createElement("div",{className:P()(HI.a.videoOwnerWrapper,"w-100")},v.a.createElement("div",null,v.a.createElement("div",{style:{backgroundImage:"url(".concat(A.avatar,")")},className:HI.a.ownerAvatar})),v.a.createElement("div",{className:P()(HI.a.ownerName,"flex-fill"),style:{minWidth:0}},v.a.createElement("div",null,v.a.createElement("div",{className:"text-truncate "},v.a.createElement("strong",null,A.name))),v.a.createElement("div",{className:"text-primary"},v.a.createElement("small",null," ","Owner")))),v.a.createElement(tB,{ref:function(e){n.tabRef=e},contents:[{key:this.shareTabKeys.accessSetting,title:t("accessSettings"),content:v.a.createElement(v.a.Fragment,null,v.a.createElement($l.a,{noValidate:!0,onSubmit:function(e){e.preventDefault()}},v.a.createElement("div",{className:P()(HI.a.addFriendsWrapper,D&&"text-center","d-flex flex-column")},D?v.a.createElement(Ln,{className:"mt-3 u-fs-2"}):v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:HI.a.optionWrap},L&&v.a.createElement(_u,{id:"publicAccess",labelName:t("publicViewAccess"),checked:_,onChange:function(){return n.setState({publicView:!_,isSubmitting:!1})}}),v.a.createElement("div",{className:"py-2"},v.a.createElement("strong",null,t("shreWithFriendsAndGroups"))),v.a.createElement("div",{className:"d-flex u-mb-7o16"},v.a.createElement("div",{className:HI.a.leftItem},v.a.createElement(_u,{id:"shareToFriends",labelName:t("label.Friends"),type:"radio",checked:!h,onChange:function(){return n.handleShareModeSwitch(!1)},className:"ml-1"}),v.a.createElement(_u,{id:"shareToGroups",labelName:t("label.Groups"),type:"radio",checked:h,onChange:function(){return n.handleShareModeSwitch(!0)},className:"ml-4"})),v.a.createElement("div",{className:P()(HI.a.rightItem,"d-flex align-items-center")},t("permission"),v.a.createElement(Kt.a,{rootClose:!0,overlay:v.a.createElement(Xt.a,{className:"desc-tooltip"},v.a.createElement("div",{dangerouslySetInnerHTML:{__html:s}})),trigger:["click"]},v.a.createElement("i",{className:"fv fuvi-exam-ex ml-2 u-cursor-pointer u-text-cyan"})))),v.a.createElement(YI,{roles:p,role:d,onRoleChange:this.handleRoleSelect,onPeopleSearch:h?this.handleSearchGroups:this.handleSearchPeople,onSuggestionSelect:this.handleSuggestionSelect,onDelete:this.handleRemoveIncompleteSharingItem,isLongItem:!!S,data:c,suggestions:u,onCreateSharingItems:this.handleCreateSharingItems,onBlur:function(){return n.setState({searchingFriendResults:[]})},canAdd:c.length>0,canAddMore:N,placeholder:h?t("enterGroupName"):t("enterFriendName")}),v.a.createElement("div",{className:HI.a.separator})),v.a.createElement(Lb,{continuousScrolling:!0,containerClassName:HI.a.scrollWrapper,className:P()("fv-smooth-scroll h-100 autoshow-scrollbar y fv-always-show-tracks",u.length?HI.a.sectionWrapperIndex:HI.a.sectionWrapper),ref:this.scrollRef},v.a.createElement("div",{className:"pb-1"},i.map((function(e){var t=e.uid,r=e.role,i=e.data,a=e.suggestions,o=e.willBeDeleted,s=void 0!==o&&o,l=e.isNewItem,c=void 0!==l&&l;if(!s)return v.a.createElement(WI,{roles:f,role:r,key:t,uid:t,onRoleChange:n.handleItemRoleSelect,onPeopleSearch:n.handleSearchPeople,data:i,suggestions:a,onSuggestionSelect:n.handleSuggestionSelect,onRemove:n.handleRemoveShareItem,onBlur:n.handleShareVideoItemBlur,isLongItem:!!S,canEdit:c||C})}))))))),v.a.createElement("div",{className:"d-flex w-100 justify-content-end border-top pt-3"},v.a.createElement(et.a,{variant:"outline-primary",className:P()(HI.a.footerBtn,"modal-button"),onClick:this.handleFormCancel},t("btn.cancel")),v.a.createElement(et.a,{type:"submit",variant:"primary",className:P()("text-white modal-button ml-4",HI.a.footerBtn,!M&&"u-pointer-event-none u-opacity-50",o&&"u-cursor-default"),onClick:this.handleShareSubmit,disabled:o},t("btn.share"))))},{key:this.shareTabKeys.ownership,title:t(this.shareTabKeys.ownership),disabled:!C,content:v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()("pt-3",HI.a.ownerShipModal,!C&&HI.a.disabled)},v.a.createElement(sd,{labelName:t("changeOwnerShip.label"),className:P()(HI.a.leftItem),placeholderText:y.length?"":t("changeOwnerShip.placeHolder"),tags:y,suggestions:b,onInput:this.handleSearchPeopleForOwnership,onFocus:this.handleSearchPeopleForOwnership,onAddition:this.handleSuggestionOwnerSelect,onDelete:this.handleDelete,suggestionComponent:KI,tagComponent:XI,searchInputClassName:!!y.length&&"d-none"})),v.a.createElement("div",{className:"d-flex w-100 justify-content-end border-top pt-3"},v.a.createElement(et.a,{variant:"primary",className:P()(HI.a.footerBtn,"modal-button mr-3"),onClick:this.handleFormCancel},t("btn.cancel")),v.a.createElement(et.a,{variant:"secondary",className:P()(HI.a.footerBtn,"modal-button"),onClick:function(){return n.setState({showConfirmationTransferOwnerModal:!0})},disabled:!y.length||!C},g?t("btn.changing"):t("btn.change"))),v.a.createElement(IC,{show:!!m,message:t("changeOwnerShip.informDescription",{userName:null===(e=y[0])||void 0===e?void 0:e.name}),onConfirm:this.handleChangeMemberShip,onClose:function(){return n.setState({showConfirmationTransferOwnerModal:!1})}}))}]})))),v.a.createElement(IC,{show:a,showHeader:!1,message:t("modal.cancelSharingConfirm"),onConfirm:this.closeModal,onClose:function(){return n.setState({showConfirmationModal:!1})}}))}}]),r}(g.PureComponent);function $I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function JI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$I(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ZI=x.g.VIDEO_SETTINGS,eM=x.g.SHARE_VIDEO_SEARCH_PEOPLE_LIMIT,tM=(x.g.SCOPE_CHAPTER_STATUS,function(e){return{uid:Date.now(),data:{fullName:""},role:e,isNewItem:!0,suggestions:[]}}),nM=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{shareVideoItems:[],showConfirmationModal:!1,isSubmitting:!1,rolesHint:"",isFetchingShareInfo:!1,addingSharingItems:[],role:{},searchingFriendResults:[],isShareToGroups:!1,roles:[],sharableRoles:[],showConfirmationTransferOwnerModal:!1,isTransferingOwner:!1,searchingTransferOwnerResults:[],newOwners:[],ownerInfo:{},publicView:!1}),G()(V()(e),"shareTabKeys",{accessSetting:"accessSetting",ownership:"ownership"}),G()(V()(e),"scrollRef",v.a.createRef()),G()(V()(e),"tabRef",v.a.createRef()),G()(V()(e),"originalShareVideoItems",[]),G()(V()(e),"initData",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=e.props,r=n.chapterId,i=n.getChapterSharingInfo,a=n.getVideoSharingInfo,o=n.videoId,s=n.isOwner,l=n.cogvidListLv,c=l.currentActiveLv,u=l["lv".concat(c)].videoList,d=u.filter((function(e){return e.uid===o}))[0]||{},h=null==d?void 0:d.cognitiveVideo;e.setState({ownerInfo:{avatar:(null==h?void 0:h.avatar)||I.a.noAvatar,firstName:null==h?void 0:h.author,lastName:null==h?void 0:h.author,name:null==h?void 0:h.author,userId:null==h?void 0:h.owner},publicView:null==d?void 0:d.publicView});var f=r?i:a;e.setState({isFetchingShareInfo:!0,rolesHint:t.map((function(e){var t=e.description,n=e.name;return"<b>".concat(n,"</b>: ").concat(t)})).join("\n\n")},(function(){f({videoId:o,chapterId:r},(function(n){if(!Object(Y.isEmpty)(n)){var r=n.map((function(e){var n,r,i=e.sharedInfo,a=(i=void 0===i?{}:i).roles,o=void 0===a?[]:a,l=i.userId,c=e.userProfile,u=void 0===c?{}:c,d=e.groupInfo,h=void 0===d?{}:d;if(!s&&x.c.isCurrentUserId(l)){var f=t.find((function(e){return e.uid===o[0]}));f&&f.weight}var p=Object(Y.isEmpty)(h)?I.a.noAvatar:I.a.defaultGroupAvatar;return{data:JI(JI(JI({},u),h),{},{fullName:h.name||u.fullName,name:h.name||u.fullName,isGroupItem:Object(Y.isEmpty)(u),avatar:JI(JI(JI({},u.avatar),h.avatar),{},{image:(null===(n=u.avatar)||void 0===n?void 0:n.image)||(null===(r=h.avatar)||void 0===r?void 0:r.image)||p})}),uid:u.userId||h.uid,role:t.find((function(e){return e.uid===o[0]})),isGroupItem:Object(Y.isEmpty)(u)}}));e.originalShareVideoItems=r,e.setState({shareVideoItems:r,isFetchingShareInfo:!1})}s&&Number.MAX_SAFE_INTEGER,e.setState({isFetchingShareInfo:!1,roles:t})}))}))})),G()(V()(e),"handleFormCancel",(function(t){t.stopPropagation(),e.isFormDirty()?e.setState({showConfirmationModal:!0}):e.closeModal()})),G()(V()(e),"closeModal",(function(){var t=e.props.updateShareVideoChapterModal;e.setState({newOwners:[]}),t({show:!1,chapterId:"",videoId:"",isOwner:!1,videoOwnerId:"",chapterOwnerId:""})})),G()(V()(e),"isPublicChange",(function(){var t=e.state.publicView,n=e.props,r=n.videoId,i=n.cogvidListLv,a=i.currentActiveLv,o=i["lv".concat(a)].videoList.filter((function(e){return e.uid===r}))[0]||{};return t!=(null==o?void 0:o.publicView)})),G()(V()(e),"isFormDirty",(function(){var t=e.state,n=t.shareVideoItems;return t.addingSharingItems.length>0||JSON.stringify(n)!==JSON.stringify(e.originalShareVideoItems)&&!(1===n.length&&""===n[0].data.fullName)||e.isPublicChange()})),G()(V()(e),"checkCanSubmit",(function(){var t=e.state,n=t.shareVideoItems,r=t.addingSharingItems,i=n.filter((function(e){return!e.willBeDeleted})),a=0===e.originalShareVideoItems.length&&n.length>0,o=JSON.stringify(i)!==JSON.stringify(e.originalShareVideoItems),s=0===e.originalShareVideoItems.length&&0===i.length;return!Object(Y.isEmpty)(r)||a||o&&!s||e.isPublicChange()})),G()(V()(e),"handleAddShareItem",(function(){var t=e.state.shareVideoItems,n=e.props,r=n.chapterId,i=n.chapterSharingRoles,a=n.videoRoles,o=r?i:a;e.setState({shareVideoItems:[].concat(Rl()(t),[tM(o[0])])},(function(){if(e.scrollRef.current){var t=e.scrollRef.current.scrollToEndY;t&&t()}}))})),G()(V()(e),"handleRemoveIncompleteSharingItem",(function(t){var n=e.state.addingSharingItems;n.splice(t,1),e.setState({addingSharingItems:n})})),G()(V()(e),"handleRemoveShareItem",(function(t){var n=e.state.shareVideoItems.flatMap((function(e){return e.uid!==t?[e]:e.isNewItem?[]:[JI(JI({},e),{},{willBeDeleted:!0})]}));e.setState({shareVideoItems:n})})),G()(V()(e),"handleCreateSharingItems",(function(){var t=e.state,n=t.addingSharingItems,r=t.role,i=t.shareVideoItems;e.setState({shareVideoItems:[].concat(Rl()(n.map((function(e){var t=e.uid,n=e.fullName,i=e.isGroupItem;return{uid:t,role:r,data:JI(JI({},e),{},{userId:t,fullName:n}),isNewItem:!0,isGroupItem:i}}))),Rl()(i)),addingSharingItems:[],searchingFriendResults:[]})})),G()(V()(e),"handleRoleSelect",(function(t,n){var r=e.state,i=r.shareVideoItems,a=r.roles.filter((function(e){var t=e.name;return n===t}))[0];if(t){var o=i.map((function(e){return e.uid===t?JI(JI({},e),{},{role:a}):e}));e.setState({shareVideoItems:o})}else e.setState({role:a})})),G()(V()(e),"handleItemRoleSelect",(function(t,n){var r=e.state.shareVideoItems,i=e.props,a=i.videoRoles,o=i.chapterSharingRoles,s=i.chapterId?o:a,l=r.map((function(e){if(e.uid===t){var r=s.filter((function(e){var t=e.name;return n===t}))[0];return JI(JI({},e),{},{role:r})}return e}));e.setState({shareVideoItems:l})})),G()(V()(e),"handleSearchPeople",Object(Y.debounce)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.props,r=n.searchFriends,i=n.videoOwnerId,a=n.chapterOwnerId,o=n.searchingFriendResults,s=n.maxNumberOfSharesPerVideo,l=e.state,c=l.addingSharingItems,u=l.shareVideoItems,d=u.filter((function(e){var t=e.willBeDeleted;return!(void 0!==t&&t)})).length+c.length<s;if(Object(Y.isEmpty)(o)&&d){var h=""===t?c.length+u.length+eM:void 0;e.setState({searchingFriendResults:[]},(function(){r({names:t,pageSize:h},(function(t){var n=t.content.flatMap((function(t){var n=t.avatar,r=(n=void 0===n?{}:n).image,o=t.firstName,s=void 0===o?"":o,l=t.lastName,c=void 0===l?"":l,u=t.userId,d=e.state,h=d.shareVideoItems,f=d.addingSharingItems,p=[].concat(Rl()(h),Rl()(f)).some((function(e){var t=e.willBeDeleted,n=void 0!==t&&t;if(e.uid===u&&!n)return!0})),m=[i,a].includes(u);if(p||m)return[];var g="".concat(s," ").concat(c);return[{avatar:r||I.a.noAvatar,fullName:g,userId:u,label:g,uid:u,name:g}]}));e.setState({searchingFriendResults:n.slice(0,5)})}))}))}}),300)),G()(V()(e),"handleSearchGroups",Object(Y.debounce)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.props,r=n.searchGroups,i=n.searchingFriendResults,a=n.maxNumberOfSharesPerVideo,o=e.state,s=o.addingSharingItems,l=o.shareVideoItems,c=l.filter((function(e){var t=e.willBeDeleted;return!(void 0!==t&&t)})).length+s.length<a;if(Object(Y.isEmpty)(i)&&c){var u=""===t?s.length+l.length+eM:void 0;e.setState({searchingFriendResults:[]},(function(){r({terms:t,pageSize:u},(function(t){var n=t.content.flatMap((function(t){var n=t.avatar,r=(n=void 0===n?{}:n).image,i=void 0===r?I.a.defaultGroupAvatar:r,a=t.name,o=t.uid,s=e.state,l=s.shareVideoItems,c=s.addingSharingItems;return[].concat(Rl()(l),Rl()(c)).some((function(e){var t=e.willBeDeleted,n=void 0!==t&&t;if(e.uid===o&&!n)return!0}))?[]:[{avatar:i,label:a,uid:o,name:a,isGroupItem:!0}]}));e.setState({searchingFriendResults:n.slice(0,5)})}))}))}}),300)),G()(V()(e),"scrollToBottomSelectedList",(function(){var e=document.querySelector(".react-tags__selected");e&&e.scrollIntoView(!1)})),G()(V()(e),"handleSuggestionSelect",(function(t){var n=e.state,r=n.addingSharingItems,i=n.isShareToGroups;r.push(t),e.setState({addingSharingItems:Object(Y.cloneDeep)(r),searchingFriendResults:[]},(function(){i?e.handleSearchGroups():e.handleSearchPeople(),e.scrollToBottomSelectedList()}))})),G()(V()(e),"handleShareVideoItemBlur",(function(t){var n=e.state.shareVideoItems;n.some((function(e){e.uid===t&&e.suggestions})),e.setState({shareVideoItems:Object(Y.cloneDeep)(n)})})),G()(V()(e),"handleShareModeSwitch",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e.setState({isShareToGroups:t,addingSharingItems:[],searchingFriendResults:[]})})),G()(V()(e),"prepareShareApiData",(function(){var t=e.state,n=t.shareVideoItems,r=t.addingSharingItems,i=t.role,a=t.publicView,o=0,s=r.map((function(e){var t=e.uid,n=e.isGroupItem;return o++,{uid:t,roleUid:i.uid,isGroupItem:n}}));s=[].concat(Rl()(s),Rl()(n.flatMap((function(t){var n=t.willBeDeleted,r=void 0!==n&&n,i=(t.suggestions,Yt()(t,["willBeDeleted","suggestions"])),a=i.uid,s=i.role,l=(s=void 0===s?{}:s).uid,c=e.originalShareVideoItems.some((function(e){if(JSON.stringify(e)===JSON.stringify(i))return!0}));return r||o++,!c||r?[{uid:a,roleUid:l,willBeDeleted:r,isGroupItem:i.isGroupItem}]:[]})))),s=Object(Y.uniqBy)(s,(function(e){return e.uid}));var l=[],c=[];return s.forEach((function(e){var t=e.isGroupItem,n=e.uid,r=e.roleUid,i=e.willBeDeleted,a=void 0!==i&&i;t?c=[].concat(Rl()(c),[{groupId:n,role:a?null:r}]):l=[].concat(Rl()(l),[{userId:n,role:a?null:r}])})),{apiData:{userRoles:l,groupRoles:c,publicView:a},sharedCount:o}})),G()(V()(e),"handleShareSubmit",(function(){var n=e.state.shareVideoItems,r=e.props,i=r.shareVideo,a=r.shareChapter,o=r.videoId,s=r.chapterId,l=r.updateCogvidListItem,c=r.updateLocalChapterItem,u=e.prepareShareApiData(n),d=u.apiData,h=u.sharedCount,f=s?a:i;e.setState({isSubmitting:!0},(function(){f({videoId:o,shareVideoData:d,chapterId:s},(function(n){if(s){var r=n.videoSc,i=n.chapterSc;c({videoId:o,chapterId:s,data:{sharedCount:i}}),l({videoId:o,data:{sharedCount:r}}),x.e.success(t("message.editChapterSharingSuccessfully"))}else l({videoId:o,data:{sharedCount:h}}),x.e.success(t("message.shareVideoSuccessfully"));e.closeModal()}),(function(){e.setState({isSubmitting:!1})}))}))})),G()(V()(e),"handleSearchPeopleForOwnership",Object(Y.debounce)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.props.searchFriends;e.setState({searchingTransferOwnerResults:[]},(function(){n({names:t,pageSize:eM},(function(t){var n=t.content.flatMap((function(e){var t=e.avatar,n=(t=void 0===t?{}:t).image,r=e.firstName,i=void 0===r?"":r,a=e.lastName,o=void 0===a?"":a,s=e.userId,l="".concat(i," ").concat(o);return[{avatar:n||I.a.noAvatar,fullName:l,userId:s,label:l,uid:s,name:l}]}));e.setState({searchingTransferOwnerResults:n.slice(0,5)})}))}))}),300)),G()(V()(e),"handleSuggestionOwnerSelect",(function(t){e.setState({newOwners:[t]})})),G()(V()(e),"handleDelete",(function(){e.setState({newOwners:[]})})),G()(V()(e),"handleChangeMemberShip",(function(){var n=e.props.videoRoles;e.setState({isTransferingOwner:!0,showConfirmationTransferOwnerModal:!1},(function(){var r=e.state.newOwners,i=e.props,a=i.videoId,o=i.updateShareVideoChapterModal,s=i.videoOwnerId,l=r[0];e.props.changeOwnerShip({videoId:a,newOwner:l,videoOwnerId:s},(function(){e.initData(n),e.setState({isTransferingOwner:!1,ownerInfo:l},(function(){return e.tabRef.activeTabKey(e.shareTabKeys.accessSetting)})),o({isOwner:x.c.isCurrentUserId(l.userId),videoOwnerId:l.userId}),x.e.success(t("message.changeOwnerShipSuccess",{name:l.name}))}),(function(){e.setState({isTransferingOwner:!1})}))}))})),e}return c()(r,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.chapterId,r=t.getSharableVideoRoles,i=t.getVideoRoles,a=t.videoRoles,o=t.chapterSharingRoles,s=t.getVideoSetting,l=t.maxNumberOfSharesPerVideo,c=t.getChapterSharingRoles,u=t.videoId;l||s({settingKey:"maxNumberOfSharesPerVideo",defaultValue:ZI.maxNumberOfSharesPerVideo}),n?Object(Y.isEmpty)(o)?c(null,this.initData):this.initData(o):(r({videoId:u},(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.setState({sharableRoles:t,role:t[0]})})),Object(Y.isEmpty)(a)?i(null,this.initData):this.initData(a))}}]),r}(QI),rM=Object(q.b)((function(e){var t=e.cogvid,n=e.auth;return{videoRoles:t.videoRoles,cogvidListLv:null==t?void 0:t.cogvidListLv,chapterSharingRoles:t.chapterSharingRoles,maxNumberOfSharesPerVideo:t.settings.maxNumberOfSharesPerVideo,title:t.shareVideoChapterModal.title,videoId:t.shareVideoChapterModal.videoId,chapterId:t.shareVideoChapterModal.chapterId,isOwner:t.shareVideoChapterModal.isOwner,videoOwnerId:t.shareVideoChapterModal.videoOwnerId,chapterOwnerId:t.shareVideoChapterModal.chapterOwnerId,isEditSharing:t.shareVideoChapterModal.isEditSharing,trustedPublisher:n.userInfo.trustedPublisher}}),(function(e){return{getVideoSharingInfo:function(t,n,r){return e(Q.e.getVideoSharingInfo(t,n,r))},getVideoRoles:function(t,n,r){return e(Q.e.getVideoRoles(t,n,r))},searchFriends:function(t,n,r){return e(Q.i.searchFriends2(t,n,r))},getVideoSetting:function(t,n,r){return e(Q.e.getVideoSetting(t,n,r))},extractChapters:function(t,n,r){return e(Q.e.extractChapters(t,n,r))},updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))},shareVideo:function(t,n,r){return e(Q.e.shareVideo(t,n,r))},updateShareVideoChapterModal:function(t,n,r){return e(Q.e.updateShareVideoChapterModal(t,n,r))},shareChapter:function(t,n,r){return e(Q.e.shareChapter(t,n,r))},getChapterSharingInfo:function(t,n,r){return e(Q.e.getChapterSharingInfo(t,n,r))},getChapterSharingRoles:function(t,n,r){return e(Q.e.getChapterSharingRoles(t,n,r))},updateLocalChapterItem:function(t){return e(Q.e.updateLocalChapterItem(t))},searchGroups:function(t,n,r){return e(Q.a.searchGroups(t,n,r))},getSharableVideoRoles:function(t,n,r){return e(Q.e.getSharableVideoRoles(t,n,r))},changeOwnerShip:function(t,n,r){return e(Q.e.changeOwnerShip(t,n,r))}}}))(nM);function iM(e){var t=e.item,n=t.avatar;return v.a.createElement("span",{id:t.id,className:xI.a.suggestionItem},v.a.createElement("img",{src:n,className:xI.a.suggestionAvatar}),v.a.createElement("span",null,t.name))}function aM(e){var t=e.tag,n=(e.removeButtonText,e.onDelete),r=t.name,i=t.avatar;return v.a.createElement("div",{type:"button",onClick:n,className:xI.a.tagItem},v.a.createElement("img",{src:i,className:xI.a.tagAvatar}),v.a.createElement("span",{className:P()(xI.a.tagLabel,"text-truncate")},r),v.a.createElement("i",{className:"fv fuvi-delete text-danger ml-2"}))}function oM(e){var t=e.onPeopleSearch,n=e.onSuggestionSelect,r=e.suggestions,i=e.onDelete,a=e.data,o=e.onAddUserItems,s=e.canAdd,l=e.canAddMore;return v.a.createElement("div",{className:"d-flex align-items-start u-mb-1x3o8"},v.a.createElement("div",{className:"flex-grow-1"},v.a.createElement(sd,{className:P()(xI.a.leftItem),placeholderText:Object(_t.t)("enterFriendName"),tags:a,suggestions:r,onInput:t,onFocus:t,onAddition:n,onDelete:i,minQueryLength:0,suggestionComponent:iM,tagComponent:aM}),!l&&v.a.createElement("div",{className:"mt-1 ml-2 text-secondary"},Object(_t.t)("maxSharesReached"))),v.a.createElement("div",{className:"d-flex align-items-center ml-2"},v.a.createElement(et.a,{variant:"primary",role:"button",className:P()(xI.a.addBtn,!s&&"u-opacity-50 u-pointer-event-none"),onClick:o},v.a.createElement("i",{className:"fv fuvi-user-addlist u-mr-3o8"}),v.a.createElement("div",null,Object(_t.t)("btn.add")))))}oM.propTypes={roles:ne.a.array,role:ne.a.object,onRoleChange:ne.a.func,onPeopleSearch:ne.a.func,onSuggestionSelect:ne.a.func,onDelete:ne.a.func,onBlur:ne.a.func,userData:ne.a.object,suggestions:ne.a.array,canRemove:ne.a.bool,isLongItem:ne.a.bool,canAdd:ne.a.bool,canAddMore:ne.a.bool},oM.defaultProps={roles:[],role:{},suggestions:[],canRemove:!0,canAdd:!1,canAddMore:!1};var sM=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"handleValidationOnBlur",(function(t){e.validator.showMessageFor(t),e.forceUpdate()})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.shareVideoItems,i=n.showConfirmationModal,a=(n.isSubmitting,n.rolesHint,n.isFetchingShareInfo,n.addingSharingItems),o=n.searchingFriendResults,s=n.role,l=this.props,c=(l.title,l.videoRoles),u=l.chapterSharingRoles,d=l.chapterId,h=(l.isOwner,l.maxNumberOfSharesPerVideo),f=l.activeItems,p=l.handleChange,m=l.name,g=l.description,b=l.onGroupSaveClick,y=l.onGroupCancelClick,A=l.onUpdateGroupAvatar,_=(this.checkCanSubmit(),r.filter((function(e){var t=e.willBeDeleted;return!(void 0!==t&&t)})).length+a.length<h);return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,dialogClassName:xI.a.editGroupModal,centered:!0,scrollable:!0,backdrop:"static"},v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:P()(xI.a.formTitle,"ml-3")},t("editGroupUser")),v.a.createElement("div",{className:"close-modal-btn mr-3",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:xI.a.modalBody},v.a.createElement($l.a,{className:"h-100 d-flex flex-column p-3",noValidate:!0,onSubmit:function(e){e.preventDefault()}},v.a.createElement("div",{className:"w-100"},v.a.createElement(DI,{displayEditButton:!1,validator:this.validator,handleValidationOnBlur:this.handleValidationOnBlur,groupData:f,name:m,description:g,handleChange:p,onGroupSaveClick:b,onGroupCancelClick:y,onUpdateGroupAvatar:A})),v.a.createElement("div",{className:"border-bottom my-3"}),v.a.createElement("div",{className:P()("d-flex flex-column flex-grow-1 hide-scrollbar",xI.a.addFriendsWrapper,!1)},v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"mb-2 u-fs-9o10 u-fw-600"},t("addFriendToGroup")),v.a.createElement(oM,{roles:d?u:c,role:s,onRoleChange:this.handleRoleSelect,onPeopleSearch:this.handleSearchPeople,onSuggestionSelect:this.handleSuggestionSelect,onDelete:this.handleRemoveIncompleteSharingItem,isLongItem:!!d,data:a,suggestions:o,onAddUserItems:this.handleAddUserItems,canAdd:a.length>0,canAddMore:_}),v.a.createElement("div",{className:xI.a.separator}),v.a.createElement(Lb,{containerClassName:xI.a.scrollWrapper,className:"fv-smooth-scroll h-100",ref:this.scrollRef},r.map((function(t){var n=t.id,r=t.role,i=t.userData,a=t.suggestions,o=t.willBeDeleted;if(!(void 0!==o&&o))return v.a.createElement(NI,{roles:d?u:c,role:r,key:n,id:n,onRoleChange:e.handleItemRoleSelect,onPeopleSearch:e.handleSearchPeople,userData:i,suggestions:a,onSuggestionSelect:e.handleSuggestionSelect,onRemove:e.handleRemoveUserItem,onBlur:e.handleShareVideoItemBlur,canEdit:!0})}))))))))),v.a.createElement(IC,{show:i,showHeader:!1,message:t("modal.cancelSharingConfirm"),onConfirm:this.closeModal,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),r}(g.PureComponent);var lM=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{name:"",description:"",isSubmitting:!1,showConfirmationModal:!1}),G()(V()(e),"isDirty",!1),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"handleChange",(function(t){var n=t.target,r=n.name,i=n.value;e.setState(G()({},r,i)),e.isDirty=!0})),G()(V()(e),"handleClose",(function(t){Object(Y.invoke)(t,"target.blur"),e.isDirty?e.setState({showConfirmationModal:!0}):e.props.onClose()})),G()(V()(e),"handleSubmit",(function(t){Object(Y.invoke)(t,"target.blur");var n=e.props.onSubmit,r=e.state,i=r.isSubmitting,a=r.name,o=r.description;i||e.setState({isSubmitting:!0},(function(){n({name:a,description:o},(function(){return e.setState({isSubmitting:!1})}))}))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props.onClose,r=this.state,i=r.name,a=r.description,o=r.showConfirmationModal,s=r.isSubmitting;return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,centered:!0,scrollable:!0,backdrop:"static",dialogClassName:xI.a.createGroupModal,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,t("modal.createGroup")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,null,v.a.createElement("div",null,v.a.createElement(mu,{required:!0,name:"name",labelName:"Group name",value:i,placeholder:t("placeholder.groupName"),onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("group name")},validatorElement:this.validator.message("group name",i,"groupNameRequired|max:100")}),v.a.createElement(mu,{as:"textarea",labelName:"Group description",name:"description",value:a,classNameInput:xI.a.textareaDesc,placeholder:t("placeholder.groupDescription"),onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("group description")},validatorElement:this.validator.message("group description",a,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))}))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100"},v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},t("btn.cancel")),v.a.createElement(et.a,{type:"submit",variant:"primary",className:P()("modal-button ml-4",s&&"u-cursor-default"),disabled:!this.validator.allValid(),onClick:this.handleSubmit},s?v.a.createElement(Ln,{className:"text-white"}):t("btn.create"))))),v.a.createElement(IC,{show:!!o,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:n,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),r}(g.Component);function cM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cM(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dM,hM=x.g.VIDEO_SETTINGS,fM=x.g.SHARE_VIDEO_SEARCH_PEOPLE_LIMIT,pM=function(e){return{id:Date.now(),userData:{fullName:""},role:e,isNewItem:!0,suggestions:[]}},mM=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{shareVideoItems:[],showConfirmationModal:!1,isSubmitting:!1,rolesHint:"",isFetchingShareInfo:!1,addingSharingItems:[],role:{},searchingFriendResults:[]}),G()(V()(e),"scrollRef",v.a.createRef()),G()(V()(e),"originalShareVideoItems",[]),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"getRolesHint",(function(t){e.setState({rolesHint:t.map((function(e){var t=e.description,n=e.name;return"<b>".concat(n,"</b>: ").concat(t)})).join("\n\n")})})),G()(V()(e),"handleFormCancel",(function(t){t.stopPropagation(),(0,e.props.onGroupCancelClick)(),e.closeModal()})),G()(V()(e),"closeModal",(function(){(0,e.props.updateCreateGroupModal)({show:!1,chapterId:"",videoId:"",isOwner:!1,videoOwnerId:"",chapterOwnerId:""})})),G()(V()(e),"isFormDirty",(function(){var t=e.state,n=t.shareVideoItems;return t.addingSharingItems.length>0||JSON.stringify(n)!==JSON.stringify(e.originalShareVideoItems)&&!(1===n.length&&""===n[0].userData.fullName)})),G()(V()(e),"checkCanSubmit",(function(){var t=e.state,n=t.shareVideoItems,r=t.addingSharingItems,i=n.filter((function(e){return!e.willBeDeleted})),a=0===e.originalShareVideoItems.length&&n.length>0,o=JSON.stringify(i)!==JSON.stringify(e.originalShareVideoItems),s=0===e.originalShareVideoItems.length&&0===i.length;return!Object(Y.isEmpty)(r)||a||o&&!s})),G()(V()(e),"handleAddShareItem",(function(){var t=e.state.shareVideoItems,n=e.props,r=n.chapterId,i=n.chapterSharingRoles,a=n.videoRoles,o=r?i:a;e.setState({shareVideoItems:[].concat(Rl()(t),[pM(o[0])])},(function(){if(e.scrollRef.current){var t=e.scrollRef.current.scrollToEndY;t&&t()}}))})),G()(V()(e),"handleRemoveIncompleteSharingItem",(function(t){var n=e.state.addingSharingItems;n.splice(t,1),e.setState({addingSharingItems:n})})),G()(V()(e),"handleRemoveUserItem",(function(t){var n=e.state.shareVideoItems,r=e.props,i=r.groupMemberList,a=r.removeGroupMember,o=r.activeItems,s=r.handleUpdateMemberListChange,l=n.flatMap((function(e){return e.id!==t?[e]:e.isNewItem?[]:[uM(uM({},e),{},{willBeDeleted:!0})]}));e.setState({shareVideoItems:l}),i.some((function(e){return e.userId===t}))&&a({uid:o.uid,members:[t]},(function(e){s(e)}))})),G()(V()(e),"handleAddUserItems",(function(){var t=e.state,n=t.addingSharingItems,r=t.role,i=t.shareVideoItems,a=n.map((function(e){var t=e.id,n=e.fullName;return{id:t,role:r,userData:uM(uM({},e),{},{userId:t,fullName:n}),isNewItem:!0}}));e.setState({shareVideoItems:[].concat(Rl()(n.map((function(e){var t=e.id,n=e.fullName,i=e.avatar;return{id:t,role:r,userData:uM(uM({},e),{},{userId:t,fullName:n,avatar:{image:i}}),isNewItem:!0}}))),Rl()(i)),addingSharingItems:[],searchingFriendResults:[]}),e.handleAddMemberSubmit(a)})),G()(V()(e),"onGroupAddUserClick",(function(){var t=e.state,n=t.addingSharingItems,r=t.role,i=t.shareVideoItems;e.setState({shareVideoItems:[].concat(Rl()(n.map((function(e){var t=e.id,n=e.fullName;return{id:t,role:r,userData:uM(uM({},e),{},{userId:t,fullName:n}),isNewItem:!0}}))),Rl()(i)),addingSharingItems:[],searchingFriendResults:[]}),e.handleAddMemberSubmit()})),G()(V()(e),"handleSearchPeople",Object(Y.debounce)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.props,r=n.searchFriends,i=n.videoOwnerId,a=n.chapterOwnerId,o=n.searchingFriendResults,s=n.maxNumberOfSharesPerVideo,l=e.state,c=l.addingSharingItems,u=l.shareVideoItems,d=u.filter((function(e){var t=e.willBeDeleted;return!(void 0!==t&&t)})).length+c.length<s;if(Object(Y.isEmpty)(o)&&d){var h=""===t?c.length+u.length+fM:void 0;e.setState({searchingFriendResults:[]},(function(){r({names:t,pageSize:h},(function(t){var n=t.content.flatMap((function(t){var n=t.avatar,r=(n=void 0===n?{}:n).image,o=t.firstName,s=void 0===o?"":o,l=t.lastName,c=void 0===l?"":l,u=t.userId,d=e.state,h=d.shareVideoItems,f=d.addingSharingItems,p=[].concat(Rl()(h),Rl()(f)).some((function(e){var t=e.willBeDeleted,n=void 0!==t&&t;if(e.id===u&&!n)return!0})),m=[i,a].includes(u);if(p||m)return[];var g="".concat(s," ").concat(c);return[{avatar:r||I.a.noAvatar,fullName:g,userId:u,label:g,id:u,name:g}]}));e.setState({searchingFriendResults:n.slice(0,5)})}))}))}}),300)),G()(V()(e),"searchPeople",Object(Y.debounce)((function(t,n){var r=e.props,i=r.searchFriends,a=r.videoOwnerId,o=r.chapterOwnerId,s=e.state.addingSharingItems;i({names:n,pageSize:""===n?s.length+fM:void 0},(function(n){var r=n.content.flatMap((function(t){var n=t.avatar,r=(n=void 0===n?{}:n).image,i=t.firstName,s=void 0===i?"":i,l=t.lastName,c=void 0===l?"":l,u=t.userId,d=e.state.shareVideoItems.some((function(e){var t=e.willBeDeleted,n=void 0!==t&&t;if(e.userData.userId===u&&!n)return!0})),h=[a,o].includes(u);if(d||h)return[];var f="".concat(s," ").concat(c);return[{avatar:r,fullName:f,userId:u,label:f}]})),i=e.state.shareVideoItems;i.some((function(e){if(e.id===t)return e.suggestions=r.slice(0,fM),!0})),e.setState({shareVideoItems:Object(Y.cloneDeep)(i)})}))}),300)),G()(V()(e),"handleSuggestionSelect",(function(t){var n=e.state.addingSharingItems;n.push(t),e.setState({addingSharingItems:Object(Y.cloneDeep)(n),searchingFriendResults:[]},(function(){e.handleSearchPeople()}))})),G()(V()(e),"handleShareVideoItemBlur",(function(t){var n=e.state.shareVideoItems;n.some((function(e){e.id===t&&e.suggestions})),e.setState({shareVideoItems:Object(Y.cloneDeep)(n)})})),G()(V()(e),"prepareShareApiData",(function(){var t=e.state,n=t.shareVideoItems,r=t.addingSharingItems,i=t.role,a=0,o=r.map((function(e){var t=e.userId;return a++,{userId:t,roleUid:i.uid}}));return o=[].concat(Rl()(o),Rl()(n.flatMap((function(t){var n=t.willBeDeleted,r=void 0!==n&&n,i=(t.suggestions,Yt()(t,["willBeDeleted","suggestions"])),o=i.userData,s=(o=void 0===o?{}:o).userId,l=i.role,c=(l=void 0===l?{}:l).uid,u=e.originalShareVideoItems.some((function(e){if(JSON.stringify(e)===JSON.stringify(i))return!0}));return r||a++,!u||r?[{userId:s,roleUid:c,willBeDeleted:r}]:[]})))),{completeShareData:o=Object(Y.uniqBy)(o,(function(e){return e.userId})),sharedCount:a}})),G()(V()(e),"handleAddMemberSubmit",(function(t){e.state.shareVideoItems;var n=e.props,r=n.activeItems,i=n.addGroupMember,a=n.handleUpdateMemberListChange,o=[];t.forEach((function(e){o.push(e.id)})),i({uid:r.uid,members:o},(function(e){a(e)}))})),e}return c()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.getVideoSetting,n=e.maxNumberOfSharesPerVideo,r=e.groupMemberList;this.setState({shareVideoItems:r});var i=r.map((function(e){return{userData:e,id:e.userId}}));this.originalShareVideoItems=i,this.setState({shareVideoItems:i,isFetchingShareInfo:!1}),n||t({settingKey:"maxNumberOfSharesPerVideo",defaultValue:hM.maxNumberOfSharesPerVideo})}}]),n}(sM),gM=Object(q.b)((function(e){var t=e.cogvid;return{videoRoles:t.videoRoles,chapterSharingRoles:t.chapterSharingRoles,maxNumberOfSharesPerVideo:t.settings.maxNumberOfSharesPerVideo,title:t.shareVideoChapterModal.title,videoId:t.shareVideoChapterModal.videoId,chapterId:t.shareVideoChapterModal.chapterId,isOwner:t.shareVideoChapterModal.isOwner,videoOwnerId:t.shareVideoChapterModal.videoOwnerId,chapterOwnerId:t.shareVideoChapterModal.chapterOwnerId,isEditSharing:t.shareVideoChapterModal.isEditSharing}}),(function(e){return{getVideoSharingInfo:function(t,n,r){return e(Q.e.getVideoSharingInfo(t,n,r))},getVideoRoles:function(t,n,r){return e(Q.e.getVideoRoles(t,n,r))},searchFriends:function(t,n,r){return e(Q.i.searchFriends2(t,n,r))},getVideoSetting:function(t,n,r){return e(Q.e.getVideoSetting(t,n,r))},extractChapters:function(t,n,r){return e(Q.e.extractChapters(t,n,r))},updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))},shareVideo:function(t,n,r){return e(Q.e.shareVideo(t,n,r))},shareChapter:function(t,n,r){return e(Q.e.shareChapter(t,n,r))},getChapterSharingInfo:function(t,n,r){return e(Q.e.getChapterSharingInfo(t,n,r))},getChapterSharingRoles:function(t,n,r){return e(Q.e.getChapterSharingRoles(t,n,r))},updateLocalChapterItem:function(t){return e(Q.e.updateLocalChapterItem(t))},updateCreateGroupModal:function(t,n,r){return e(Q.i.updateCreateGroupModal(t,n,r))},addGroupMember:function(t,n,r){return e(Q.i.addGroupMember(t,n,r))},removeGroupMember:function(t,n,r){return e(Q.i.removeGroupMember(t,n,r))}}}))(mM),vM=r(419),bM=r.n(vM),yM=r(131),AM=r.n(yM);function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_M(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var EM=x.g.NOTIFICATION_ACTIONS,SM=x.g.NOTIFICATION,CM=SM.ACTION_TYPE,TM=SM.STATUS,kM=SM.TYPE,xM=(dM={},G()(dM,kM.FRIENDSHIP__FRIEND_REQUEST__SENT,"notification.friendRequest"),G()(dM,kM.FRIENDSHIP__FRIEND_REQUEST__ACCEPTED,"notification.friendRequestAccepted"),G()(dM,kM.FRIENDSHIP__FRIEND_REQUEST__CONFIRMED,"notification.friendRequestConfirmed"),dM),OM=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isActionHandling:!1}),G()(V()(e),"handleActionClick",(function(t,n){t&&t.stopPropagation();var r=e.props,i=r.onActionClick,a=r.onlyInfo;e.state.isActionHandling||a&&n!==CM.ITEM_CLICK||(e.setState({isActionHandling:!0}),i&&i(n,(function(){return e.setState({isActionHandling:!1})})))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.fullname,i=n.image,a=n.status,o=n.type,s=n.duration,l=n.onlyInfo,c=n.data,u=n.message,d=this.state.isActionHandling,h=EM[o]||[];return v.a.createElement("div",{className:P()(AM.a.notiItem,a===TM.READ?AM.a.read:AM.a.unread),onClick:function(t){return e.handleActionClick(t,CM.ITEM_CLICK)}},r&&v.a.createElement("div",{className:AM.a.notiAvatar,style:{backgroundImage:"url(".concat(i||I.a.noAvatar,")")}}),v.a.createElement("div",{className:"ml-3 mr-1 flex-grow-1 u-wb-break-word"},xM[o]?v.a.createElement("div",{dangerouslySetInnerHTML:{__html:t(xM[o],wM({fullname:r},c))}}):v.a.createElement(bM.a,null,u),v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("i",{className:"fv fuvi-clock-icon text-secondary mr-1"}),v.a.createElement("div",{className:"u-fs-7o8 u-opacity-50"},s)),v.a.createElement("div",{className:"d-flex align-items-center"},!l&&h.map((function(t,n){var r=t.type,i=t.label,a=t.variant;return v.a.createElement(et.a,{key:r+i+n,size:"sm",variant:a||"outline-primary",className:P()("btn-rounded px-3 mt-2",n>0&&"ml-2",d&&"progress-bar-striped progress-bar-animated"),disabled:d,onClick:function(t){return e.handleActionClick(t,r)}},i)})))),!l&&v.a.createElement("div",null,v.a.createElement("div",{className:P()(AM.a.toggleStatusBtn,a===TM.READ?AM.a.read:AM.a.unread,"u-shadow"),onClick:function(t){return e.handleActionClick(t,CM.TOGGLE_STATUS)}}),v.a.createElement(Qt,{round:!0,className:P()(AM.a.deleteBtn,"m-0 mt-2 bg-white u-opacity-100 u-shadow"),onClick:function(t){return e.handleActionClick(t,CM.DELETE)}},v.a.createElement("i",{className:"fv fuvi-delete u-fs-3o4 text-secondary"}))))}}]),r}(v.a.Component);var IM=x.g.NOTIFICATION.TYPE,MM=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.items,r=e.isLoadingItems,i=e.onLoadMoreItems,a=e.onItemActionClick,o=e.onMarkAllAsReadClick;return v.a.createElement("div",{className:P()(AM.a.notiPanel,"u-shadow")},v.a.createElement("div",{className:AM.a.notiPanelHeader},v.a.createElement("div",{className:"flex-grow-1 u-fs-1x1o4 u-fw-600"},"Notifications"),v.a.createElement("div",{className:AM.a.markAllAsReadBtn,onClick:o},v.a.createElement("i",{className:"fv fuvi-checked-mark mr-1"}),v.a.createElement("div",null,t("btn.markAllAsRead")))),v.a.createElement("div",{className:AM.a.notiItemList},v.a.createElement(Lb,{className:"fv-smooth-scroll h-100",onYReachEnd:i},v.a.createElement("div",null,!r&&0===n.length&&v.a.createElement("div",{className:"p-3 font-italic u-opacity-80"},t("noItemsFound")),n.map((function(e){var t=e.id,n=e.status,r=e.type,i=e.createdAt,o=e.creator,s=e.source,l=(s=void 0===s?{}:s).object,c=e.message,u=void 0===c?"":c,d=o||{},h=d.firstName,f=d.lastName,p=d.avatar,m=(p=void 0===p?{}:p).image,g=Ml.a.duration(-1*Ml()().diff(Ml()(i)));return v.a.createElement(OM,{key:t,onlyInfo:r===IM.FRIENDSHIP__FRIEND_REQUEST__CONFIRMED,image:m,fullname:o?"".concat(h," ").concat(f):"",status:n,type:r,duration:g.humanize(!0),onActionClick:function(t,n){return a(e,t,n)},data:l,message:u})})),r&&v.a.createElement("div",{className:"py-3 text-center"},v.a.createElement(Ln,{className:"u-fs-1x1o2"}))))))}}]),r}(v.a.Component);var PM=x.g.NOTIFICATION.ACTION_TYPE,DM=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{showNotificationPanel:!1}),G()(V()(e),"wrapperRef",v.a.createRef()),G()(V()(e),"componentDidUpdate",(function(t){tw()(t),e.state.showNotificationPanel&&document.addEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"componentWillUnmount",(function(){document.removeEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"toggleNotificationPanel",(function(){var t=e.props.onLoadNewItems;e.state.showNotificationPanel||t(),e.setState((function(e){return{showNotificationPanel:!e.showNotificationPanel}}))})),G()(V()(e),"handleClickOutside",(function(t){var n=document.querySelectorAll(".modal"),r=Array.from(n).some((function(e){return e.contains(t.target)}));e.wrapperRef&&e.wrapperRef.current&&!e.wrapperRef.current.contains(t.target)&&!r&&(e.setState({showNotificationPanel:!1}),document.removeEventListener("mousedown",e.handleClickOutside))})),G()(V()(e),"handleItemActionClick",(function(t,n,r){(0,e.props.onItemActionClick)(t,n,r),n===PM.ITEM_CLICK&&e.setState({showNotificationPanel:!1})})),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.items,r=e.noNewNotifications,i=e.isLoadingItems,a=e.onLoadMoreItems,o=e.onMarkAllAsReadClick,s=this.state.showNotificationPanel;return v.a.createElement(Kt.a,{placement:"bottom",delay:{show:800},overlay:v.a.createElement(Xt.a,null,t("notification.notifications")),trigger:["hover","focus"]},v.a.createElement("div",{ref:this.wrapperRef,className:P()(AM.a.notiWrapper)},v.a.createElement(Qt,{badge:r,className:P()(AM.a.notiBtn,"u-opacity-100",s&&"bg-white u-border-radius-1o4"),classNameBadge:AM.a.notiBadge,onClick:this.toggleNotificationPanel},v.a.createElement("i",{className:P()("fv fuvi-notification-icon u-fs-1x1o4",s?"u-text-dark-blue-bold":"text-white")})),s&&v.a.createElement(MM,{items:n,isLoadingItems:i,onLoadMoreItems:a,onItemActionClick:this.handleItemActionClick,onMarkAllAsReadClick:o})))}}]),r}(v.a.Component);function NM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function LM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NM(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var RM=x.g.NOTIFICATION,BM=RM.ACTION_TYPE,jM=RM.STATUS,FM=RM.TYPE,UM=x.g.PEOPLE_PAGE_PATH,HM=x.g.PEOPLE,zM=x.g.VIDEO_MENU_BASE_URL,VM=x.g.VIDEO_CATEGORY_TYPE_TO_MENU,WM=x.g.SEARCH_PARAM,GM=WM.KEY,qM=WM.VALUE,YM=(x.g.VIDEO_MENU_CATEGORY,function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{items:[],isLoadingItems:!0}),G()(V()(e),"paging",{pageSize:10,lastId:void 0,last:!1}),G()(V()(e),"componentWillUnmount",(function(){e.setState=function(e,t){}})),G()(V()(e),"loadItems",(function(){var t=e.props.getNotifications;e.setState({isLoadingItems:!0}),t({lastId:e.paging.lastId,pageSize:e.paging.pageSize},(function(t){var n=e.state.items,r=t.notifications,i=void 0===r?[]:r;e.paging.last=Object(Y.isEmpty)(i),e.setState({isLoadingItems:!1,items:[].concat(Rl()(n),Rl()(i))})}),(function(){return e.setState({isLoadingItems:!1})}))})),G()(V()(e),"updateListItem",(function(t){var n=e.state.items,r=Object(Y.cloneDeep)(n),i=Object(Y.find)(r,{id:t.id});i&&(i&&Object.assign(i,t),e.setState({items:r}))})),G()(V()(e),"deleteListItem",(function(t){var n=e.state.items,r=Object(Y.cloneDeep)(n);(Object(Y.remove)(r,{id:t.id})||[]).length&&e.setState({items:r})})),G()(V()(e),"handleLoadNewItems",(function(){var t=e.props;t.reduceNotificationsStatistics,t.noNewNotifications;e.paging.lastId=void 0,e.paging.pageSize=10,e.setState({items:[]},e.loadItems)})),G()(V()(e),"handleLoadMoreItems",(function(){if(!e.paging.last&&!e.state.isLoadingItems){var t=e.state.items;e.paging.lastId=Object(Y.last)(t).id,e.paging.pageSize=5,e.loadItems()}})),G()(V()(e),"handleItemActionClick",(function(t,n,r){switch(n){case BM.ITEM_CLICK:e.handleNotificationClick(t,r);break;case BM.DELETE:e.handleNotificationDelete(t,r);break;case BM.TOGGLE_STATUS:e.handleNotificationToggleStatus(t,r);break;case BM.CONFIRM_FRIEND_REQUEST:e.handleFriendRequestConfirm(t,r);break;case BM.DECLINE_FRIEND_REQUEST:e.handleFriendRequestDecline(t,r)}})),G()(V()(e),"getPublishNotiPath",(function(e){var t=VM[e||"CREATE_VIDEO"];return zM[t]})),G()(V()(e),"handleNotificationClick",(function(t,n){var r,i=t.type,a=t.creator,o=t.status,s=t.source,l=(s=void 0===s?{}:s).object,c=void 0===l?{}:l,u=(a||{}).userId;switch(n&&n(),o!==jM.UNREAD||[FM.FRIENDSHIP__FRIEND_REQUEST__CONFIRMED].includes(i)||e.handleNotificationToggleStatus(t),i){case FM.FRIENDSHIP__FRIEND_REQUEST__SENT:r=x.c.buildURLWithSearchParams(UM,[[GM.TAB,HM.TAB.REQUEST],[GM.UID,u]]),$.a.push(r);break;case FM.FRIENDSHIP__FRIEND_REQUEST__ACCEPTED:case FM.FRIENDSHIP__FRIEND_REQUEST__CONFIRMED:r=x.c.buildURLWithSearchParams(UM,[[GM.TAB,HM.TAB.FRIENDS],[GM.UID,u]]),$.a.push(r);break;case FM.COMPOSING__VIDEO_OWNERSHIP__RECEIVED:case FM.COMPOSING__COGNITIVE_VIDEO__SHARED:r=x.c.buildURLWithSearchParams(zM.BRAINHIVE,[[GM.VIDEO_ID,c.videoId]]),$.a.push(r,{refresh:!0});break;case FM.COMPOSING__PUBLISHING_VIDEO__SUCCEEDED:r=x.c.buildURLWithSearchParams(zM.EXPLORING,[[GM.VIDEO_ID,c.videoId]]),$.a.push(r,{refresh:!0});break;case FM.PUBLISHING__REVIEW__CANCELED:case FM.COMPOSING__PUBLISHING_VIDEO__FAILED:case FM.PUBLISHING__REVIEW__APPROVED:r=x.c.buildURLWithSearchParams(e.getPublishNotiPath(null==c?void 0:c.category),[[GM.VIDEO_ID,c.videoId]]),$.a.push(r);break;case FM.PUBLISHING__REVIEW__REJECTED:r=x.c.buildURLWithSearchParams(e.getPublishNotiPath(null==c?void 0:c.category),[[GM.VIDEO_ID,c.videoId]]),$.a.push(r,{showFeedbackModal:!0,videoId:c.videoId});break;case FM.COMPOSING__LIVE_CHAPTER__CREATED:case FM.COMPOSING__LIVE_CHAPTER__STATUS_CHANGED:case FM.COMPOSING__LIVE_CHAPTER__REMINDING:case FM.COMPOSING__CHAPTER__SHARED:r=x.c.buildURLWithSearchParams(zM.BRAINHIVE,[[GM.VIDEO_ID,c.videoId],[GM.CHAPTER_ID,c.chapterId]]),$.a.push(r,{refresh:!0});break;case FM.COMPOSING__CHAPTER_ATTACHMENT__ADDED:r=x.c.buildURLWithSearchParams(zM.BRAINHIVE,[[GM.VIDEO_ID,c.videoId],[GM.CHAPTER_ID,c.chapterId],[GM.STOP_AUTOPLAY,!0]]),$.a.push(r,{attachment:LM(LM({},c),{},{videoScaffId:c.userScaffId}),refresh:!0});break;case FM.COMPREHENSION_GUIDES__COMMENT__POSTED:var d=VM[c.category],h=zM[d]||zM.BRAINHIVE,f=x.c.buildURLWithSearchParams(h,[[GM.VIDEO_ID,c.videoId],[GM.CHAPTER_ID,c.chapterId],[GM.STOP_AUTOPLAY,!0]]);$.a.push(f,{comment:LM(LM({},c),{},{videoScaffId:c.userScaffId}),refresh:!0});break;case FM.COMPOSING__VIDEO_TRANSCODING__COMPLETED:case FM.COMPOSING__VIDEO_TRANSCODING__FAILED:case FM.COMPOSING__SHARE_VIDEO_TRANSCODING__COMPLETED:case FM.COMPOSING__VIDEO_TRANSCRIPTION__COMPLETED:case FM.COMPOSING__VIDEO_TRANSCRIPTION__FAILED:case FM.COMPOSING__INTERNAL_VIDEO__CLONED_FULLY:var p=VM[c.category],m=zM[p];r=m===zM.EXPERIENCING?m:x.c.buildURLWithSearchParams(m,[[GM.VIDEO_ID,c.videoId]]),$.a.push(r,{refresh:!0});break;case FM.COMPOSING__VIDEO_OWNERSHIP__CHANGED:case FM.COMPOSING__VIDEO_OWNERSHIP__FAILED:r=x.c.buildURLWithSearchParams(zM.BRAINHIVE,[[GM.VIDEO_ID,c.videoId]]),$.a.push(r,{refresh:!0});break;case FM.COMPOSING__LINKING_PRODUCT_WITH_VIDEO__SENT:case FM.COMPOSING__LINKING_PRODUCT_WITH_VIDEO__APPROVED:case FM.COMPOSING__LINKING_PRODUCT_WITH_VIDEO__REJECTED:var g=VM[c.category],v=zM[g]||zM.EXPLORING;r=x.c.buildURLWithSearchParams(v,[[GM.VIDEO_ID,c.videoId],[GM.ACTION,qM.ACTION.OPEN_RESOURCE]]),$.a.push(r,{refresh:!0})}})),G()(V()(e),"handleFriendRequestConfirm",(function(t,n){var r=e.props.confirmFriendRequest,i=Object(Y.get)(t,"source.object.requestId");i&&r({requestId:i},(function(){e.updateListItem(LM(LM({},t),{},{type:FM.FRIENDSHIP__FRIEND_REQUEST__CONFIRMED})),setTimeout((function(){return e.deleteListItem(t)}),3e3),n&&n();var r=$.a.location,i=r.pathname,a=r.search;i===UM&&$.a.replace(i+a,{refresh:!0})}),(function(e){return n&&n(e)}))})),G()(V()(e),"handleFriendRequestDecline",(function(t,n){var r=e.props.declineFriendRequest,i=Object(Y.get)(t,"source.object.requestId");i&&r({requestId:i},(function(){e.deleteListItem(t),n&&n();var r=$.a.location,i=r.pathname,a=r.search;i===UM&&$.a.replace(i+a,{refresh:!0})}),(function(e){return n&&n(e)}))})),G()(V()(e),"handleNotificationDelete",(function(t,n,r){(0,e.props.deleteNotification)(t,(function(){!r&&e.deleteListItem(t),n&&n()}),(function(e){return n&&n(e)}))})),G()(V()(e),"handleNotificationToggleStatus",(function(t,n){var r=e.props.updateNotification,i={id:t.id,status:t.status===jM.READ?jM.UNREAD:jM.READ};r(i,(function(){e.updateListItem(i),n&&n()}),(function(e){return n&&n(e)}))})),G()(V()(e),"handleMarkAllAsReadClick",(function(t){t&&t.stopPropagation();var n=e.props.markAllAsRead,r=e.state.items,i=void 0===r?[]:r;Object(Y.isEmpty)(i)||n({fromId:i[0].id},(function(){var t=Object(Y.cloneDeep)(i);t.forEach((function(e){e.status=jM.READ})),e.setState({items:t})}))})),e}return c()(n,[{key:"render",value:function(){var e=this.props.noNewNotifications,t=this.state,n=t.items,r=t.isLoadingItems;return v.a.createElement(DM,{items:n,noNewNotifications:e,isLoadingItems:r,onLoadNewItems:this.handleLoadNewItems,onLoadMoreItems:this.handleLoadMoreItems,onItemActionClick:this.handleItemActionClick,onMarkAllAsReadClick:this.handleMarkAllAsReadClick})}}]),n}(v.a.Component)),KM=Object(q.b)((function(e){return{noNewNotifications:e.notification.noNewNotifications}}),(function(e){return{getNotifications:function(t,n,r){return e(Q.h.getNotifications(t,n,r))},reduceNotificationsStatistics:function(t,n,r){return e(Q.h.reduceNotificationsStatistics(t,n,r))},updateNotification:function(t,n,r){return e(Q.h.updateNotification(t,n,r))},deleteNotification:function(t,n,r){return e(Q.h.deleteNotification(t,n,r))},markAllAsRead:function(t,n,r){return e(Q.h.markAllAsRead(t,n,r))},confirmFriendRequest:function(t,n,r){return e(Q.i.confirmFriendRequest(t,n,r))},declineFriendRequest:function(t,n,r){return e(Q.i.declineFriendRequest(t,n,r))}}}))(YM),XM=r(137),QM=r.n(XM);var $M=x.g.EXTRACT_TYPE,JM=x.g.VIDEO_MENU_CATEGORY,ZM=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.title,i=n.subject,a=n.topic,o=(n.author,n.description),s=n.showConfirmationModal,l=n.chapters,c=n.isSelectedAll,u=n.numberOfSelectedItems,d=n.isSubmittingForm,h=n.extractType,f=n.highlights,p=n.category,m=this.checkCanSubmit(),g=h===$M.CHAPTER,b=g?l:f;return v.a.createElement(v.a.Fragment,null,d&&v.a.createElement(Nn,null),v.a.createElement(Fl.a,{show:!0,className:"createCogvidWrapper",scrollable:!1,centered:!0,backdrop:"static",onEscapeKeyDown:this.handleFormCancel},v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"ml-3 text-truncate ".concat(QM.a.formTitle)},t("createVideoForSharing")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:QM.a.modalBody},v.a.createElement($l.a,{noValidate:!0,onSubmit:this.submitCreateCognitiveVideo},v.a.createElement(T,null,v.a.createElement(k.a,{sm:"5",className:"pl-4 pr-3 pt-1"},v.a.createElement("div",{className:P()(QM.a.extractTarget)},v.a.createElement("label",{className:QM.a.extractLabel},t("label.extractTo")),v.a.createElement("div",{className:"d-flex"},v.a.createElement(_u,{id:"radioBrainhiveMenu",labelName:t("btn.brainhiveMenu"),type:"radio",checked:p===JM.BRAINHIVE,onChange:function(){return e.handleExtractTargetChange(JM.BRAINHIVE)}}),v.a.createElement(_u,{id:"radioCreateVideoMenu",labelName:t("btn.createVideoMenu"),type:"radio",className:"ml-4",checked:p===JM.CREATE_VIDEO,onChange:function(){return e.handleExtractTargetChange(JM.CREATE_VIDEO)}}))),v.a.createElement(mu,{labelName:"Title",name:"title",value:r,placeholder:"Add title",required:!0,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("title")},validatorElement:this.validator.message("title",r,"videoTitleRequired|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))}),v.a.createElement(mu,{labelName:"Subject",name:"subject",value:i,placeholder:"Add subject",onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("subject")},validatorElement:this.validator.message("subject",i,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))}),v.a.createElement(mu,{labelName:"Topic",name:"topic",value:a,placeholder:"Add topic",onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("topic")},validatorElement:this.validator.message("topic",a,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))}),v.a.createElement(mu,{as:"textarea",labelName:"Description",name:"description",value:o,onChange:this.handleChange,classNameInput:QM.a.description,rows:"5",onBlur:function(){return e.validator.showMessageFor("description")},validatorElement:this.validator.message("description",o,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))})),v.a.createElement(k.a,{sm:"7",className:P()(QM.a.rightColumn,"border-left")},v.a.createElement("div",{className:P()(QM.a.selectHeader,"bg-white")},v.a.createElement(_u,{id:"radioExtractChapter",labelName:t("btn.selectChapter"),type:"radio",checked:g,onChange:function(){return e.handleExtractTypeChange($M.CHAPTER)}}),v.a.createElement(_u,{id:"radioExtractHighlight",labelName:t("btn.selectHighlight"),type:"radio",className:"ml-4",checked:h===$M.HIGHLIGHT,onChange:function(){return e.handleExtractTypeChange($M.HIGHLIGHT)}})),0===b.length&&v.a.createElement("div",{className:"flex-grow-1"},v.a.createElement("div",{className:QM.a.emptyImageContainer},v.a.createElement("div",{className:QM.a.circleBg},v.a.createElement("img",{height:"106",width:"121",src:I.a.addTemplateIcon,alt:"add template icon",className:P()(QM.a.folderIcon,"u-opacity-30")}),v.a.createElement("div",{className:QM.a.dndTextWrapper},g?t("noChaptersFound"):t("noHighlightsFound"))))),b.length>0&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:QM.a.selectHeader},v.a.createElement("div",{className:"u-cursor-pointer",onClick:this.handleSelectedAllToggle},v.a.createElement(_u,{labelName:t("label.all"),checked:c,readOnly:!0}))),v.a.createElement("div",{className:QM.a.chaptersWrap},b.map((function(t,n){var r=t.isSelected,i=t.title,a=t.duration,o=t.uid;return v.a.createElement("div",{className:QM.a.chapterItem,key:o,onClick:function(){return e.handleItemSelectToggle(n)}},v.a.createElement(_u,{labelName:"",checked:r,readOnly:!0,className:"u-cursor-pointer"}),v.a.createElement("div",{className:"d-flex u-overflow-hidden flex-grow-1 justify-content-between"},v.a.createElement("div",{className:"text-truncate"},i),a&&v.a.createElement("div",{className:"mx-3"},a)))})))))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100 align-items-center"},v.a.createElement("div",{className:"d-flex ml-2"},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-1x1o4"})),v.a.createElement("div",{className:"u-fs-7o8 ml-2"},v.a.createElement("div",{className:"u-opacity-60"},t(g?"selectedChapterCount":"selectedHighlightCount",{count:u}))),v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"outline-primary",className:P()(QM.a.footerBtn,"modal-button"),onClick:this.handleFormCancel},t("btn.cancel")),v.a.createElement(et.a,{type:"submit",variant:"primary",className:P()("text-white modal-button ml-4",QM.a.footerBtn,!m&&"u-pointer-event-none u-opacity-50"),onClick:this.handleSubmitForm},t("btn.export")))))),v.a.createElement(IC,{show:!!s,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:this.closeForm,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),r}(g.PureComponent);function eP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eP(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nP=x.g.EXTRACT_TYPE,rP=x.g.HIGHLIGHTS,iP=x.g.SB_LENGTH,aP=x.g.VIDEO_MENU_CATEGORY,oP=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(e){var r;s()(this,n),r=t.call(this,e),G()(V()(r),"handleChange",(function(e){var t=e.target,n=t.name,i=t.value;r.setState(G()({},n,i),(function(){r.state.isFormValidationPassed!==r.validator.allValid()&&r.setState({isFormValidationPassed:r.validator.allValid()})}))})),G()(V()(r),"handleSubmitForm",Object(Y.debounce)((function(e){if(e.preventDefault(),e.stopPropagation(),r.validator.allValid()){var t=r.state,n=t.title,i=t.subject,a=t.topic,o=t.description,s=t.extractType,l=t.category,c=r.props,u=c.videoId,d=c.extractChapters,h=c.extractHighlights,f=c.changeShouldUpdateProgress,p=r.getExtractItemList(),m=s===nP.CHAPTER,g=m?d:h,v=p.flatMap((function(e){var t=e.uid;return e.isSelected?[t]:[]})),b=p.flatMap((function(e){var t=e.seqNumber;return e.isSelected?[t]:[]}));r.setState({isSubmittingForm:!0},(function(){var e;g((e={videoId:u,title:n,subject:i,topic:a,description:o},G()(e,m?"chapters":"highlights",v),G()(e,"chapterSeqNumbers",b),G()(e,"category",l),e),(function(){f(!0),r.closeForm()}),(function(){r.setState({isSubmittingForm:!1})}))}))}else r.validator.showMessages(),r.forceUpdate()}),100)),G()(V()(r),"handleFormCancel",(function(e){e.stopPropagation(),r.isFormDirty()?r.setState({showConfirmationModal:!0}):r.closeForm()})),G()(V()(r),"isFormDirty",(function(){var e=r.state,t=e.title,n=e.subject,i=e.topic,a=e.isSelectedAll,o=r.props,s=o.title,l=void 0===s?"":s,c=o.subject,u=void 0===c?"":c,d=o.topic;return t!==l||n!==u||i!==(void 0===d?"":d)||!a})),G()(V()(r),"handleItemSelectToggle",(function(e){var t,n,i=r.state.extractType===nP.CHAPTER,a=r.getExtractItemList(),o=a[e].isSelected;a[e].isSelected=!o,o?n=!1:(n=!0,a.some((function(e){if(!e.isSelected)return n=!1,!1}))),r.setState((t={},G()(t,i?"chapters":"highlights",Object(Y.cloneDeep)(a)),G()(t,"isSelectedAll",n),G()(t,"numberOfSelectedItems",Object(Y.filter)(a,{isSelected:!0}).length),t))})),G()(V()(r),"handleSelectedAllToggle",(function(){var e=r.state,t=e.isSelectedAll,n=e.extractType===nP.CHAPTER,i=r.getExtractItemList();r.setState(G()({isSelectedAll:!t,numberOfSelectedItems:t?0:i.length},n?"chapters":"highlights",i.map((function(e){return tP(tP({},e),{},{isSelected:!t})}))))})),G()(V()(r),"closeForm",(function(){(0,r.props.updateExtractChaptersModal)({show:!1})})),G()(V()(r),"checkCanSubmit",(function(){var e=r.state,t=e.title;e.subject,e.topic;return r.getExtractItemList().some((function(e){return e.isSelected}))&&!!t})),G()(V()(r),"getExtractItemList",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.extractType,t=r.state,n=t.chapters,i=t.highlights,a=e===nP.CHAPTER;return a?n:i})),G()(V()(r),"handleExtractTypeChange",(function(e){var t=r.getExtractItemList(e),n=!t.some((function(e){return!e.isSelected}));r.setState({extractType:e,isSelectedAll:n,numberOfSelectedItems:Object(Y.filter)(t,{isSelected:!0}).length})})),G()(V()(r),"handleExtractTargetChange",(function(e){r.setState({category:e})}));var i=e.title,a=e.subject,o=e.topic,l=e.author,c=e.chapters,u=void 0===c?[]:c,d=e.highlights,h=e.description;return r.state={showConfirmationModal:!1,title:i,subject:a,topic:o,author:l,description:h,numberOfSelectedItems:u.length,chapters:u.asMutable().map((function(e){var t=e.startTime,n=void 0===t?0:t,r=e.endTime,i=(void 0===r?0:r)-n+1,a=1===i?"":x.c.msToTimestamp(i,i>36e5?"HH:mm:ss":"mm:ss");return tP(tP({},e),{},{isSelected:!0,duration:a,title:e.content})})),isSelectedAll:!0,isSubmittingForm:!1,extractType:nP.CHAPTER,category:aP.BRAINHIVE,highlights:Object(Y.sortBy)(d.asMutable().filter((function(e){var t=e.color,n=e.label;return t===rP.ORANGE&&!!n})),["startBlockSeq"]).map((function(e){var t=e.startBlockSeq,n=(e.endBlockSeq-t+1)*iP,r=x.c.msToTimestamp(n,n>36e5?"HH:mm:ss":"mm:ss");return tP(tP({},e),{},{isSelected:!0,uid:e.id,title:e.label,duration:r})}))},r.validator=new ql.a(x.c.validatorConfig),r}return c()(n,[{key:"componentDidMount",value:function(){this.setState({isFormValidationPassed:this.validator.allValid()})}}]),n}(ZM),sP=Object(q.b)((function(e){var t=e.cogvid;return{videoId:t.extractChaptersModal.videoId,title:t.extractChaptersModal.title,subject:t.extractChaptersModal.subject,topic:t.extractChaptersModal.topic,description:t.extractChaptersModal.description,author:t.extractChaptersModal.author,chapters:t.extractChaptersModal.chapters,highlights:t.extractChaptersModal.highlights}}),(function(e){return{updateExtractChaptersModal:function(t,n,r){return e(Q.e.updateExtractChaptersModal(t,n,r))},extractChapters:function(t,n,r){return e(Q.e.extractChapters(t,n,r))},extractHighlights:function(t,n,r){return e(Q.e.extractHighlights(t,n,r))},changeShouldUpdateProgress:function(t){return e(Q.k.changeShouldUpdateProgress(t))}}}))(oP),lP=r(207),cP=r.n(lP);var uP=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{showConfirmationModal:!1,oldPassword:"",newPassword:"",confirmPassword:"",showNoSpaceError:!1,isSubmittingForm:!1,needChangeToSubmit:!1}),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"submitChangePassword",(function(t){t.preventDefault();var n=e.props.changePassword,r=e.state,i=r.oldPassword,a=r.newPassword;e.validator.allValid()?e.setState({isSubmittingForm:!0},(function(){n({currentPwd:i,newPwd:a},e.closeModal,(function(){e.setState({isSubmittingForm:!1,needChangeToSubmit:!0})}))})):(e.validator.showMessages(),e.forceUpdate())})),G()(V()(e),"handleChange",(function(t){var n,r=t.target,i=r.name,a=r.value;e.setState((n={},G()(n,i,a),G()(n,"needChangeToSubmit",!1),n))})),G()(V()(e),"isFormDirty",(function(){var t=e.state,n=t.oldPassword,r=t.newPassword,i=t.confirmPassword;return!!n||!!r||!!i})),G()(V()(e),"closeModal",(function(){(0,e.props.toggleOpenChangePasswordModal)(!1)})),G()(V()(e),"handleFormClose",(function(){e.isFormDirty()?e.setState({showConfirmationModal:!0}):e.closeModal()})),G()(V()(e),"handlePasswordTyping",(function(t){var n=!1;" "===t.key?(t.preventDefault(),n=!0):n=!1,e.setState({showNoSpaceError:n})})),G()(V()(e),"checkCanSubmitForm",(function(){var t=e.state,n=t.oldPassword,r=t.newPassword,i=t.confirmPassword,a=t.needChangeToSubmit;return!(!n||!r||!i||a)})),e}return n}(function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"editProfileRef",v.a.createRef()),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.showConfirmationModal,i=n.oldPassword,a=n.newPassword,o=n.confirmPassword,s=n.showNoSpaceError,l=n.isSubmittingForm,c=this.checkCanSubmitForm();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:cP.a.modalWrapper,centered:!0,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleFormClose},l&&v.a.createElement(Nn,null),v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"ml-3 ".concat(cP.a.formTitle)},t("modal.changePassword")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:cP.a.modalBody},v.a.createElement($l.a,{noValidate:!0,onSubmit:this.handleRegisterSubmit},v.a.createElement(mu,{type:"password",name:"oldPassword",value:i,onChange:this.handleChange,onKeyPress:this.handlePasswordTyping,onBlur:function(){return e.validator.showMessageFor("oldPassword")},labelName:t("form.oldPassword"),classNameLabel:cP.a.label,className:"u-mb-1x3o4 u-border-radius-1o2",validatorElement:this.validator.message("oldPassword",i,"required|min:".concat(x.g.MIN_PASSWORD_LENGTH,"|max:").concat(x.g.TEXT_INPUT_MAX_LENGTH))},s&&v.a.createElement("div",{className:"text-warning ml-2"},t("message.ignoreWhiteSpaceMessage"))),v.a.createElement(mu,{type:"password",name:"newPassword",value:a,onChange:this.handleChange,onKeyPress:this.handlePasswordTyping,onBlur:function(){return e.validator.showMessageFor("newPassword")},labelName:t("form.newPassword"),classNameLabel:cP.a.label,className:"u-mb-1x3o4 u-border-radius-1o2",validatorElement:this.validator.message("newPassword",a,["required","min:".concat(x.g.MIN_PASSWORD_LENGTH),"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH),{newPasswordRule:i},"hasMixedCharacters","hasSpecial"])},s&&v.a.createElement("div",{className:"text-warning ml-2"},t("message.ignoreWhiteSpaceMessage"))),v.a.createElement(mu,{type:"password",name:"confirmPassword",value:o,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("confirm password")},labelName:t("form.confirmPassword"),classNameLabel:cP.a.label,className:"u-border-radius-1o2",validatorElement:this.validator.message("confirm password",o,["required",{confirmPasswordRule:a}])}))),v.a.createElement(Fl.a.Footer,{className:cP.a.footer},v.a.createElement(et.a,{variant:"primary",className:P()(cP.a.footerBtn,"modal-button"),onClick:this.submitChangePassword,disabled:!c},t("btn.save")))),v.a.createElement(IC,{show:!!r,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:this.closeModal,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),r}(g.PureComponent)),dP=Object(q.b)(null,(function(e){return{toggleOpenChangePasswordModal:function(t){return e(Q.a.toggleOpenChangePasswordModal(t))},changePassword:function(t,n,r){return e(Q.a.changePassword(t,n,r))}}}))(uP),hP=r(123),fP=r.n(hP);var pP=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isHover:!1}),G()(V()(e),"handleMouseOver",(function(){return e.setState({isHover:!0})})),G()(V()(e),"handleMouseLeave",(function(){return e.setState({isHover:!1})})),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.name,r=e.avatar,i=e.content,a=e.duration,o=e.canEdit,s=e.canDelete,l=(e.onEdit,e.onDelete),c=e.displayFullContent,u=this.state.isHover;return v.a.createElement("div",{className:P()(fP.a.commentItem),onMouseOver:u?null:this.handleMouseOver,onMouseLeave:this.handleMouseLeave},v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",{className:fP.a.avatar,style:{backgroundImage:"url(".concat(r||I.a.noAvatar,")")}}),v.a.createElement("div",{className:"flex-grow-1 ml-2 u-fs-7o8"},v.a.createElement(Kt.a,{placement:"left",delay:{show:800},overlay:v.a.createElement(Xt.a,null,n),trigger:n&&n.length>20?["hover","focus"]:[]},v.a.createElement("div",{className:"u-fw-600 u-truncate-1 u-pr-1"},n)),v.a.createElement("div",{className:"flex-shrink-0 u-opacity-80"},a),(o||s)&&v.a.createElement(ut,{drop:"left",className:P()(fP.a.dropdown)},v.a.createElement(ut.Toggle,{type:"button",block:!0,className:P()(fP.a.dropdownToggle,!u&&"u-opacity-0 pointer-events-none",u&&"u-opacity-100")},v.a.createElement("i",{className:"fv fuvi-three-dots-v u-opacity-80"})),v.a.createElement(ut.Menu,{className:"p-0"},o&&v.a.createElement(ut.Item,{className:fP.a.dropdownItem},v.a.createElement("i",{className:"fv fuvi-edit-copy"}),v.a.createElement("div",{className:"u-pl-3o4 u-fs-7o8"},t("btn.edit"))),s&&v.a.createElement(ut.Item,{className:fP.a.dropdownItem,onClick:l},v.a.createElement("i",{className:"fv fuvi-trash-can"}),v.a.createElement("div",{className:"u-pl-3o4 u-fs-7o8"},t("btn.delete"))))))),v.a.createElement(TR,{className:"mt-1 px-1",content:i,expanded:c}))}}]),r}(v.a.PureComponent);var mP=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{comment:"",deleteComment:null}),G()(V()(e),"textareaRef",v.a.createRef()),G()(V()(e),"updateTextareaHeight",(function(){e.textareaRef.style.height="5px",e.textareaRef.style.height="".concat(e.textareaRef.scrollHeight,"px")})),G()(V()(e),"handleKeyDown",(function(t){t.stopPropagation(),13===t.keyCode&&(t.metaKey||t.ctrlKey||t.shiftKey)&&(e.handleSubmit(t),e.textareaRef.focus()),x.c.preventKeyDownSideEffect(t)})),G()(V()(e),"handleChange",(function(t){var n=t.target.value;e.setState({comment:n},e.updateTextareaHeight)})),G()(V()(e),"handleSubmit",(function(t){t.preventDefault();var n=e.props,r=n.canAddNew,i=n.onItemAddNew,a=e.state.comment,o=void 0===a?"":a;r&&0!==o.trim().length&&(i({comment:o}),e.setState({comment:""},e.updateTextareaHeight))})),G()(V()(e),"handleDeleteModalConfirm",(function(){var t=e.props.onItemDelete,n=e.state.deleteComment||{},r=n.uid;t({chapterId:n.chapterId,commentId:r}),e.setState({deleteComment:null})})),G()(V()(e),"handleDeleteModalCancel",(function(){e.setState({deleteComment:null})})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=(t.show,t.scrollRef),r=t.title,i=t.commentCount,a=void 0===i?0:i,o=t.items,s=void 0===o?[]:o,l=t.isLoadingItems,c=t.isLoadingMore,u=t.isAddingNew,d=t.canAddNew,h=(t.canEdit,t.canDelete),f=t.onCommentEdit,p=t.onLoadMoreItems,m=t.onClose,g=t.className,b=t.hasNewComments,y=t.isLoggedIn,A=this.state,_=A.comment,w=A.deleteComment;return v.a.createElement("div",{className:P()(fP.a.sidebarWrapper,g)},v.a.createElement("div",{className:P()(fP.a.sidebarHeader)},v.a.createElement("div",{className:"h-100 px-2 d-flex align-items-center flex-grow-1 bg-primary"},v.a.createElement(Kt.a,{placement:"left",delay:{show:800},overlay:v.a.createElement(Xt.a,null,r),trigger:r&&r.length>20?["hover","focus"]:[]},v.a.createElement("div",{className:"d-flex flex-grow-1"},v.a.createElement("div",{className:"u-truncate-1 font-weight-bold u-wb-break-all"},r))),v.a.createElement("div",{className:"flex-shrink-0 mr-3"},v.a.createElement(Qt,{badge:a,className:"u-cursor-default u-opacity-100",classNameBadge:P()(fP.a.commentCountBadge,!b&&"u-bg-grey"),tooltipText:Object(_t.t)("commentCount",{count:a})},v.a.createElement("i",{className:"fv fuvi-comment text-white u-fs-1x1o8"})))),v.a.createElement("div",null,v.a.createElement(Qt,{className:fP.a.hideSidebarBtn,onClick:m},v.a.createElement("i",{className:P()("fv fuvi-next")})))),v.a.createElement("div",{className:P()(fP.a.sidebarFooter)},v.a.createElement("textarea",{ref:function(t){e.textareaRef=t},readOnly:!d,disabled:!d,maxLength:x.g.COMMENT_MAX_LENGTH,className:P()(fP.a.textarea,(!d||u)&&"u-cursor-default",!d&&"u-opacity-50",!y&&"u-fs-7o8"),name:"commentTextarea",placeholder:y?Object(_t.t)("addComment"):Object(_t.t)("loginToAddComment"),value:_,onKeyDown:this.handleKeyDown,onChange:this.handleChange,style:{height:Object(Y.get)(this.textareaRef,"scrollHeight",0)}}),v.a.createElement("div",{className:"bg-white"},v.a.createElement(Qt,{classNameContainer:"h-100 d-flex align-items-center",className:P()(fP.a.submitBtn,!d&&"u-opacity-50"),onClick:this.handleSubmit,disabled:!d||u},v.a.createElement("i",{className:P()("fv fuvi-send u-fs-1x1o4")})))),v.a.createElement(Lb,{className:P()(fP.a.sidebarContent,"fv-smooth-scroll"),containerClassName:"h-100",ref:n,onYReachEnd:p},v.a.createElement("div",null,!l&&0===s.length&&v.a.createElement("div",{className:"p-3 font-italic u-opacity-80"},Object(_t.t)("noCommentsFound")),s.map((function(t,n){var r=t.uid,i=t.text,a=t.postedAt,o=t.commenter,s=(o=void 0===o?{}:o).fullName,l=o.avatar,c=o.userId,u=t.isNew,d=(l||{}).image,p=Ml.a.duration(-1*Ml()().diff(Ml()(a))),m=x.c.isCurrentUserId(c);return v.a.createElement(pP,{key:r,name:s,avatar:d,content:i,duration:p.humanize(!0),canEdit:!1,canDelete:m||h,onEdit:f,onDelete:function(){return e.setState({deleteComment:t})},displayFullContent:m&&u})})),l&&v.a.createElement(Nn,{className:"bg-transparent text-primary"}),c&&v.a.createElement("div",{className:"py-3 text-center"},v.a.createElement(Ln,{className:"u-fs-1x1o2"})))),v.a.createElement(IC,{show:!!w,title:Object(_t.t)("modal.confirmDeleteCommentTitle"),onConfirm:this.handleDeleteModalConfirm,onClose:this.handleDeleteModalCancel}))}}]),n}(v.a.PureComponent);var gP=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.showComments,n=e.showPreviewComments,r=null==t?void 0:t.chapterId,i=null==n?void 0:n.chapterId,a=!!i&&r!==i;return v.a.createElement("div",{className:P()(fP.a.sidebar,(r||i)&&fP.a.sidebarActive)},v.a.createElement(EP,Gt()({},t,{className:P()(a&&"invisible")})),v.a.createElement(EP,Gt()({isPreviewMode:!0},n,{className:P()(!a&&"invisible")})))}}]),n}(g.Component),vP=Object(q.b)((function(e){var t=e.cg;return{showComments:t.showComments,showPreviewComments:t.showPreviewComments}}))(gP);function bP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bP(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var AP=x.g.VIDEO_CATEGORY,_P=x.g.COMMENT_LIKE_SCOPE,wP=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isLoadingItems:!1,isLoadingMore:!1,isAddingNew:!1,items:[],totalItems:0}),G()(V()(e),"paging",{pageNumber:0,pageSize:25,last:!0}),G()(V()(e),"scrollRef",v.a.createRef()),G()(V()(e),"componentDidMount",(function(){e.unlistenHistory=$.a.listen(e.handleURLChange)})),G()(V()(e),"componentWillUnmount",(function(){e.unlistenHistory&&e.unlistenHistory()})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.videoId,r=t.chapterId,i=e.props,a=i.videoId,o=i.chapterId;a&&o&&(a!==n||o!==r)&&e.loadNewItemList()})),G()(V()(e),"updateTrackingComments",(function(){var t=e.props,n=t.videoScaffId,r=t.chapterId,i=t.updateTrackingObject,a=e.state.items,o=x.c.getCurrentVideoCategory();if(n&&r&&[AP.BRAINHIVE,AP.MESSAGES].includes(o)){var s=Object(Y.get)(a,"[0].postedAt");i({trackingObject:n,trackingProperty:"".concat(r,".comments"),maxReadValue:s})}})),G()(V()(e),"handleURLChange",(function(t){var n=Object(Y.get)(t,"state.refresh"),r=Object(Y.get)(t,"state.comment");if(r&&n){var i=e.props,a=i.videoId,o=i.chapterId;a===r.videoId&&o===r.chapterId&&e.loadNewItemList()}})),G()(V()(e),"updateItemList",(function(t,n,r){var i,a=e.state,o=a.items,s=void 0===o?[]:o,l=a.totalItems,c=t.content,u=void 0===c?[]:c,d=t.number,h=t.last,f=t.totalElements,p=u.map((function(e){return yP(yP({},e),{},{isNew:r})})),m=Object(Y.uniqBy)(r?[].concat(Rl()(p),Rl()(s)):[].concat(Rl()(s),Rl()(p)),"uid");r?(i=l+f,e.paging.pageNumber+=parseInt(f/e.paging.pageSize)):(i=f,e.paging.last=h,e.paging.pageNumber=d),e.setState({items:m,totalItems:i},n)})),G()(V()(e),"loadNewItemList",(function(){var t=e.props,n=t.videoId,r=t.chapterId,i=t.getChapterComments,a=t.updateChapterItemInCache,o=x.c.getCurrentVideoCategory();e.setState({isLoadingItems:!0,items:[]}),i({chapterId:r,pageNumber:0,pageSize:e.paging.pageSize,category:_P[o]},(function(t){e.props.isPreviewMode||e.updateTrackingComments(),e.updateItemList(t,(function(){var t,i;null===(t=e.scrollRef)||void 0===t||null===(i=t.current)||void 0===i||i.scrollTo(0);var o=e.state.totalItems;a({videoId:n,chapterId:r,data:{commentCount:o}})})),e.setState({isLoadingItems:!1})}),(function(t){e.setState({isLoadingItems:!1})}))})),G()(V()(e),"loadMoreItemList",(function(){var t=e.paging,n=t.pageNumber,r=t.pageSize,i=t.last,a=e.props,o=a.chapterId,s=a.getChapterComments,l=e.state,c=l.isLoadingMore;if(!(l.isLoadingItems||c||i)){e.setState({isLoadingMore:!0});var u=x.c.getCurrentVideoCategory();s({chapterId:o,pageSize:r,pageNumber:n+1,category:_P[u]},(function(t){e.updateItemList(t),e.setState({isLoadingMore:!1})}),(function(t){e.setState({isLoadingMore:!1})}))}})),G()(V()(e),"handleSidebarClose",(function(){(0,e.props.displayComments)(null)})),G()(V()(e),"handleItemAddNew",(function(t){var n=t.parentCommentId,r=t.comment,i=void 0===r?"":r,a=e.props,o=a.videoId,s=a.chapterId,l=a.userScaffId,c=a.addChapterComment,u=a.updateChapterItemInCache,d=e.state,h=d.items,f=d.isAddingNew;if(s&&!f){e.setState({isAddingNew:!0});var p=h[0]||{},m=x.c.getCurrentVideoCategory();c({chapterId:s,parentCommentId:n,userScaffId:l,text:i,lastPostedAt:null==p?void 0:p.postedAt,category:_P[m]},(function(t){e.updateItemList(t,(function(){var t,n;null===(t=e.scrollRef)||void 0===t||null===(n=t.current)||void 0===n||n.scrollTo(0);var r=e.state.totalItems;u({videoId:o,chapterId:s,data:{commentCount:r}})}),!0),e.setState({isAddingNew:!1})}),(function(t){e.setState({isAddingNew:!1})}))}})),G()(V()(e),"handleItemUpdate",(function(t){var n=t.chapterId,r=t.parentCommentId,i=t.commentId,a=t.comment,o=void 0===a?"":a,s=e.props.updateChapterComment;n&&i&&s({chapterId:n,commentId:i,parentCommentId:r,text:o},(function(){}))})),G()(V()(e),"handleItemDelete",(function(t){var n=t.chapterId,r=t.commentId,i=e.props,a=i.videoId,o=i.deleteChapterComment,s=i.updateChapterItemInCache;n&&r&&o({chapterId:n,commentId:r},(function(){var t=e.state,i=t.items,o=t.totalItems,l=Rl()(i),c=o-Object(Y.remove)(l,(function(e){return e.chapterId===n&&e.uid===r})).length;e.setState({items:l,totalItems:c}),s({videoId:a,chapterId:n,data:{commentCount:c}})}))})),G()(V()(e),"getCommentStatistics",(function(){var t=e.props,n=t.videoScaffId,r=t.chapterId,i=t.chapters,a=t.videoStatistics,o=Object(Y.find)(i,{uid:r}),s=Object(Y.get)(a,[n,r],{}).comments>0;return{commentCount:(null==o?void 0:o.commentCount)||0,hasNewComments:s}})),e}return c()(n,[{key:"render",value:function(){var e,t,n,r,i,a,o=this.props,s=o.userId,l=o.videoId,c=o.chapterId,u=o.title,d=o.permissions,h=o.className,f=this.state,p=f.isLoadingItems,m=f.isLoadingMore,g=f.isAddingNew,b=f.items,y=!!s,A=y&&x.c.checkPermission(null==d?void 0:null===(e=d.COMPREHENSION_GUIDE)||void 0===e?void 0:e.DOANYACTION,null==d?void 0:null===(t=d.COMPREHENSION_GUIDE_COMMENTS)||void 0===t?void 0:t.CREATE),_=y&&x.c.checkPermission(null==d?void 0:null===(n=d.COMPREHENSION_GUIDE)||void 0===n?void 0:n.DOANYACTION,null==d?void 0:null===(r=d.COMPREHENSION_GUIDE_COMMENTS)||void 0===r?void 0:r.WRITE),w=y&&x.c.checkPermission(null==d?void 0:null===(i=d.COMPREHENSION_GUIDE)||void 0===i?void 0:i.DOANYACTION,null==d?void 0:null===(a=d.COMPREHENSION_GUIDE_COMMENTS)||void 0===a?void 0:a.DELETE),E=this.getCommentStatistics(),S=E.commentCount,C=E.hasNewComments;return v.a.createElement(mP,{show:!!l&&!!c,scrollRef:this.scrollRef,className:h,items:b,title:u,commentCount:S,hasNewComments:C,isLoadingItems:p,isLoadingMore:m,isAddingNew:g,canAddNew:A,canEdit:_,canDelete:w,isLoggedIn:y,onClose:this.handleSidebarClose,onLoadMoreItems:this.loadMoreItemList,onItemAddNew:this.handleItemAddNew,onItemUpdate:this.handleItemUpdate,onItemDelete:this.handleItemDelete})}}]),n}(v.a.Component),EP=Object(q.b)((function(e){var t=e.auth,n=e.cogvid,r=e.notification;return{videoPermissions:n.cogvidDetails.permissions,chapters:n.cogvidDetails.chapters,videoStatistics:r.videoStatistics,userId:t.userInfo.userId}}),(function(e){return{displayComments:function(t){return e(Q.d.displayComments(t))},getChapterComments:function(t,n,r){return e(Q.d.getChapterComments(t,n,r))},addChapterComment:function(t,n,r){return e(Q.d.addChapterComment(t,n,r))},updateChapterComment:function(t,n,r){return e(Q.d.updateChapterComment(t,n,r))},deleteChapterComment:function(t,n,r){return e(Q.d.deleteChapterComment(t,n,r))},updateChapterItemInCache:function(t){return e(Q.e.updateChapterItemInCache(t))},updateTrackingObject:function(t,n,r){return e(Q.h.updateTrackingObject(t,n,r))}}}))(wP),SP=r(243),CP=r.n(SP),TP=r(72),kP=r.n(TP);function xP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xP(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var IP=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{chapters:Object(Y.cloneDeep)(e.props.chapters.map((function(e){return OP(OP({},e),{},{isSelected:!1})}))),isSelectedAll:!1}),G()(V()(e),"handleItemSelect",(function(t,n){t&&t.stopPropagation();var r=e.state.chapters,i=!0;r.forEach((function(e){var t=e.uid,r=e.isSelected;t===n&&(e.isSelected=!r),e.isSelected||(i=!1)})),e.setState({chapters:Object(Y.cloneDeep)(r),isSelectedAll:i})})),G()(V()(e),"handleSelectAll",(function(t){t&&t.stopPropagation();var n=e.state,r=n.chapters,i=n.isSelectedAll;r.forEach((function(e){e.isSelected=!i})),e.setState({chapters:Object(Y.cloneDeep)(r),isSelectedAll:!i})})),G()(V()(e),"handleSubmit",(function(){(0,e.props.onSubmit)(e.state.chapters.flatMap((function(e){return e.isSelected?[e.content]:[]})))})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.onClose,r=t.show,i=this.state,a=i.chapters,o=i.isSelectedAll,s=!1;return a.some((function(e){var t=e.isSelected;if(void 0!==t&&t)return s=!0,!0})),v.a.createElement(Fl.a,{show:r,centered:!0,backdrop:"static",className:"createTemplateSelectChapters"},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,"Add information from chapters")),v.a.createElement(Fl.a.Body,{className:kP.a.selectChaptersBody},v.a.createElement("div",{className:kP.a.selectChaptersAll,onClick:this.handleSelectAll},v.a.createElement(_u,{id:"selectAll",labelName:"",checked:o,className:"u-pointer-event-none",onChange:function(){}}),v.a.createElement("div",{className:"text-truncate"},Object(_t.t)("label.all"))),v.a.createElement("div",{className:kP.a.itemsWrapper},a.map((function(t){var n=t.content,r=t.uid,i=t.isSelected,a=void 0!==i&&i;return v.a.createElement("div",{className:kP.a.selectChapterItem,key:r,onClick:function(t){return e.handleItemSelect(t,r)}},v.a.createElement(_u,{id:r,labelName:"",checked:a,className:"u-pointer-event-none",onChange:function(){}}),v.a.createElement("div",{className:"text-truncate"},n))})))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button",onClick:n},Object(_t.t)("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:"modal-button ml-4",onClick:this.handleSubmit,disabled:!s},Object(_t.t)("btn.add"))))}}]),n}(v.a.PureComponent);function MP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function PP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MP(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var DP=x.g.CURRENCIES,NP=x.g.ACCESS_GRANT_TYPE,LP=x.g.COURSE_SEQUENCE_MAX_LENGTH,RP=["l1","l2","l3"],BP=function(e){var t=e.typesOfLearning,n=e.onSelect;return RP.map((function(e){var r=t[e],i=r.label,a=r.color,o=r.isSelected,s=void 0!==o&&o;return v.a.createElement("div",{className:kP.a.typesOfLearningItem,onClick:function(){return n(e)},key:e},v.a.createElement("div",{style:{width:"1.25rem",border:"1px solid ".concat(a),color:"#FF5200"},className:"u-flex-center"},s?"✔":""),v.a.createElement("div",{style:{backgroundColor:a},className:"text-white flex-grow-1 u-fs-5o8 u-flex-center"},i),v.a.createElement("div",{style:{width:"1.25rem",border:"1px solid #A9A9A9"},className:"u-text-black text-capitalize u-fw-600 u-fs-9o16 u-flex-center"},e))}))},jP=function(e){var t=e.learningItems,n=e.onAddItems,r=e.toggleEditItem,i=e.onItemTextChange,a=e.onDeleteItem,o=e.isSubmitting,s=void 0!==o&&o,l=Object(g.useState)(""),c=pi()(l,2),u=c[0],d=c[1],h=function(e,t){i(e,t,u),r(e,t,!1),d("")},f=function(e){var t=e.target.value;t.length>100||d(t)};return v.a.createElement("div",{className:P()(kP.a.learningItemsWrapper,"hide-scrollbar")},t.map((function(e){var t=e.data,i=void 0===t?[]:t,o=e.label,l=e.color,c=e.level;return v.a.createElement(v.a.Fragment,{key:o},v.a.createElement("div",{className:kP.a.learningItemLabel,style:{backgroundColor:l},onClick:function(){return n(c)}},v.a.createElement("div",{className:"u-fs-7o8"},"".concat(o," video")),v.a.createElement("i",{className:P()("fv fuvi-plus-icon",s&&"d-none")})),v.a.createElement("div",{className:"u-mt-3o16"},i.map((function(e,t){var n=e.text,i=e.isEditMode,o=void 0!==i&&i;return v.a.createElement("div",{className:kP.a.learningItemText,key:t},v.a.createElement("div",{className:"u-w-1 u-h-1 u-mr-9o16",style:{backgroundColor:l,minWidth:"1rem"}}),v.a.createElement("div",{className:"d-flex justify-content-between align-items-center w-100",style:{overflow:"hidden"}},o?v.a.createElement("input",{defaultValue:n,className:kP.a.editTextInput,autoFocus:!0,onChange:f,onBlur:function(){h(c,t)},onKeyDown:function(e){return function(e,t,n){e.stopPropagation(),"Enter"===e.key&&h(t,n),"Escape"===e.key&&r(t,n,!1)}(e,c,t)},maxLength:100}):v.a.createElement("div",{className:"text-truncate"},n),v.a.createElement("div",{className:P()(kP.a.itemActions,o&&"d-flex")},o?v.a.createElement("i",{className:"fv fuvi-save-icon text-primary u-cursor-pointer",onClick:function(){h(c,t)}}):v.a.createElement(v.a.Fragment,null,v.a.createElement("i",{className:"fv fuvi-edit text-primary mr-2 u-cursor-pointer",onClick:function(){d(n),r(c,t,!0)}}),v.a.createElement("i",{className:"fv fuvi-trash-can text-danger u-cursor-pointer",onClick:function(){return a(c,t)}})))))}))))})))},FP=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isSelectingLearningItemsFor:"",courseSerial:"",totalCourse:"",isValidSequence:!0}),G()(V()(e),"validateTemplate",(function(){var t=e.props.setTemplateValidationResult,n=e.getSelectedLearningItems().canSubmit,r=e.validateCourseSequence();t(n&&r)})),G()(V()(e),"updateCourseData",(function(){var t=e.props,n=t.course,r=t.typesOfLearning,i=(r=void 0===r?{}:r).totalCourse,a=r.videoCount;if(n&&n.uid&&-1!==n.uid){var o=n.serial,s=n.total;e.setState({courseSerial:""+(0==o?"M":o),totalCourse:""+(s>0?s:i||a||"")},e.validateTemplate)}})),G()(V()(e),"validateCourseSequence",(function(){var t=e.props,n=t.didFetchTemplateData,r=t.course;if(!n)return!0;var i=!0;if(r&&r.uid&&-1!==r.uid){var a=e.state,o=a.courseSerial,s=a.totalCourse;if(""===o||""===s)i=!1;else{var l="M"==o?0:o,c=void 0===l?r.serial:l;i=Number(c)<=Number(s-1)&&Number(s)>0}}return e.setState({isValidSequence:i}),i})),G()(V()(e),"handleTypeOfLearningSelect",(function(t){var n=e.props,r=n.typesOfLearning,i=n.updateTemplateData,a=r[t].isSelected;r[t].isSelected=!a,i(Object(Y.cloneDeep)(r))})),G()(V()(e),"handleSelectLearningItems",(function(t){var n=e.props,r=n.typesOfLearning,i=n.updateTemplateData,a=e.state.isSelectingLearningItemsFor,o=r[a].data||[];r[a].data=[].concat(Rl()(o),Rl()(t.map((function(e){return{text:e}})))),i(Object(Y.cloneDeep)(r)),e.setState({isSelectingLearningItemsFor:""})})),G()(V()(e),"getSelectedLearningItems",(function(){var t=e.props.typesOfLearning,n=!0,r=RP.flatMap((function(e){var r=t[e],i=r.isSelected,a=void 0!==i&&i,o=r.data;return a?(Object(Y.isEmpty)(o)&&(n=!1),[PP(PP({},t[e]),{},{level:e})]):[]}));return n&&(n=r.length>0),{canSubmit:n,selectedLearningItems:r}})),G()(V()(e),"handleDeleteLearningItem",(function(t,n){var r=e.props,i=r.typesOfLearning,a=r.updateTemplateData;i[t].data.splice(n,1),a(Object(Y.cloneDeep)(i))})),G()(V()(e),"toggleEditLearningItem",(function(t,n,r){var i=e.props,a=i.typesOfLearning,o=i.updateTemplateData;a[t].data[n].isEditMode=r,o(Object(Y.cloneDeep)(a))})),G()(V()(e),"handleLearningItemTextChange",(function(t,n,r){var i=e.props,a=i.typesOfLearning,o=i.updateTemplateData;a[t].data[n].text=r,o(Object(Y.cloneDeep)(a))})),G()(V()(e),"updateTemplateDataCourseChange",(function(){var t=e.props,n=t.typesOfLearning,r=t.updateTemplateData,i=e.state,a=i.courseSerial,o=i.totalCourse;r(PP(PP({},Object(Y.cloneDeep)(n)),{},{totalCourse:o,courseSerial:"M"===a?"0":a}))})),G()(V()(e),"handleCourseSequenceChange",(function(t){t.stopPropagation();var n=t.target,r=n.name,i=n.value;(/^\d+$/.test(i)||""===i)&&e.setState(G()({},r,i),e.updateTemplateDataCourseChange),"courseSerial"===r&&"M"===i.toLocaleUpperCase()&&e.setState({courseSerial:"M"},e.updateTemplateDataCourseChange)})),e}return c()(r,[{key:"componentDidMount",value:function(){this.updateCourseData()}},{key:"componentDidUpdate",value:function(e){var t=e.typesOfLearning,n=e.didFetchTemplateData,r=this.props,i=r.typesOfLearning,a=r.didFetchTemplateData;t!==i&&this.validateTemplate(),!n&&a&&this.updateCourseData()}},{key:"render",value:function(){var e,n=this,r=this.props,i=r.imageSource,a=r.title,o=(r.subject,r.author),s=r.avatar,l=r.headline,c=r.location,u=r.unitPrice,d=(u=void 0===u?{}:u).amount,h=u.currency,f=(h=void 0===h?{}:h).code,p=void 0===f?DP.USD.value:f,m=(r.views,r.chapters),g=r.typesOfLearning,b=r.accessGrantType,y=r.isSubmitting,A=r.course,_=r.course,w=(_=void 0===_?{}:_).code,E=r.videoOwnerInfo,S=b===NP.FREE,C=this.state,T=C.isSelectingLearningItemsFor,k=C.isValidSequence,O=this.state,M=O.courseSerial,D=O.totalCourse;void 0!==M&&"undefined"!==M||(M=""),D||(D="");var N=this.getSelectedLearningItems().selectedLearningItems,L=!Object(Y.isEmpty)(A)&&-1!==A.uid&&!!A.uid,R=a;return M&&(R="".concat(M," - ").concat(R)),w&&(R="".concat(w," - ").concat(R)),v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:kP.a.templateWrap,id:"video-cover-template"},v.a.createElement("div",{className:kP.a.topRow},v.a.createElement("div",{className:kP.a.videoInfo},v.a.createElement("div",{className:"mt-2"},v.a.createElement("div",{className:P()(kP.a.title)},R),v.a.createElement("div",{className:"d-flex align-items-center u-mt-1o4"},L&&v.a.createElement("div",{className:P()(kP.a.sequence,"u-mr-1x7o8")},v.a.createElement("div",{className:kP.a.sequenceBadge},t("video")),v.a.createElement("div",{className:P()(kP.a.inputWrapper,!k&&kP.a.error)},v.a.createElement(mu,{size:"sm",name:"courseSerial",className:"mb-0 ml-n1 u-w-2",classNameInput:"border-0 bg-transparent shadow-none text-right px-1",autoComplete:"off",value:M,onChange:this.handleCourseSequenceChange,maxLength:LP}),v.a.createElement("div",{className:"mx-1"},"/"),v.a.createElement(mu,{size:"sm",name:"totalCourse",className:"mb-0 u-w-2",classNameInput:"u-h-1x3o4 border-0 shadow-none px-1",autoComplete:"off",value:D,onChange:this.handleCourseSequenceChange,maxLength:LP,readOnly:!0}))),S&&v.a.createElement("div",{className:kP.a.freeBadge},t("accessType.free")),!!d&&!S&&v.a.createElement("div",{className:"u-text-dark-red u-fw-500"},x.c.formatMoney(d,p)))),v.a.createElement("div",null,v.a.createElement("div",{className:"u-fs-3o4 u-text-black u-mb-1o4 u-mt-1o8 u-fw-600"},t("typesOfLearning")),v.a.createElement(BP,{typesOfLearning:g,onSelect:this.handleTypeOfLearningSelect}))),v.a.createElement("div",{className:kP.a.authorInfoWrap},v.a.createElement("img",{src:(null==E?void 0:null===(e=E.avatar)||void 0===e?void 0:e.image)||s,className:kP.a.avatar}),v.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-between"},className:"flex-fill"},v.a.createElement("div",{style:{fontWeight:"600",fontSize:"1.0625rem",color:"#000000"}},(null==E?void 0:E.fullName)||o),v.a.createElement("div",{style:{fontSize:"0.75rem",fontWeight:"500",lineHeight:"1rem"}},(null==E?void 0:E.headline)||l),v.a.createElement("div",{style:{fontSize:"0.75rem",color:"#666666",fontWeight:"400"}},(null==E?void 0:E.location)||c)))),v.a.createElement("div",{className:kP.a.bottomRow},v.a.createElement("div",{className:kP.a.bottomLeft},v.a.createElement("div",{className:kP.a.image,style:{backgroundImage:"url(".concat(i,")")}}),v.a.createElement("div",{className:kP.a.logo},v.a.createElement("img",{src:I.a.fuviTemplateLogo,style:{width:"19rem",height:"1.5rem"}}),v.a.createElement("img",{src:I.a.fuviTemplateImage,style:{height:"4.375rem"}}))),v.a.createElement("div",{className:kP.a.bottomRight},N.length>0?v.a.createElement(jP,{learningItems:N,onAddItems:function(e){return n.setState({isSelectingLearningItemsFor:e})},onDeleteItem:this.handleDeleteLearningItem,toggleEditItem:this.toggleEditLearningItem,onItemTextChange:this.handleLearningItemTextChange,isSubmitting:y}):v.a.createElement("div",{className:kP.a.chapterPlaceHolder},v.a.createElement("div",{className:kP.a.imgWrapper},v.a.createElement("img",{height:"106",width:"121",src:I.a.templateChapter,alt:"add template icon",className:kP.a.folderIcon})),v.a.createElement("div",{className:kP.a.createCoverInstruction},t("createCoverInstruction")))))),!!T&&v.a.createElement(IP,{show:!0,chapters:m,onSubmit:this.handleSelectLearningItems,onClose:function(){return n.setState({isSelectingLearningItemsFor:""})}}))}}]),r}(v.a.PureComponent);Object(q.b)((function(e){var t=e.cogvid,n=e.auth;return{title:t.cogvidDetails.cognitiveVideo.title,subject:t.cogvidDetails.cognitiveVideo.subject,author:t.cogvidDetails.cognitiveVideo.author,avatar:t.cogvidDetails.cognitiveVideo.avatar,views:t.cogvidDetails.cognitiveVideo.views,unitPrice:t.cogvidDetails.unitPrice,accessGrantType:t.cogvidDetails.accessGrantType,chapters:t.cogvidDetails.chapters,headline:n.userInfo.headline,location:n.userInfo.location,course:t.cogvidDetails.cognitiveVideo.course}}),(function(e){return{updateExtractChaptersModal:function(t,n,r){return e(cogvidActions.updateExtractChaptersModal(t,n,r))},extractChapters:function(t,n,r){return e(cogvidActions.extractChapters(t,n,r))},setVideoCoverImg:function(t,n,r){return e(cogvidActions.setVideoCoverImg(t,n,r))}}}))(FP);var UP=x.g.CREATE_COVER_MODE,HP=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.isHtmlMode,i=n.isSubmittingForm,a=n.createCoverMode,o=n.uploadedImageUrl,s=n.showConfirmationModal,l=n.isHtmlChanged,c=(n.templateData,n.didFetchTemplateData,n.videoOwnerInfo,n.html),u=this.props,d=u.thumbnail,h=u.capturedImage,f=u.onClose,p=u.videoId,m="";switch(a){case UP.UPLOAD_IMAGE:m=o;break;case UP.CAPTURED_IMAGE:m=h;break;case UP.CURRENT_COVER:m=d}var g=r?l:a!==UP.CURRENT_COVER;return v.a.createElement(v.a.Fragment,null,v.a.createElement("canvas",{id:"template-canvas",hidden:!0}),v.a.createElement(Fl.a,{show:!0,className:"createTemplateWrapper",scrollable:!1,centered:!0,backdrop:"static",enforceFocus:!1},i&&v.a.createElement(Nn,null),v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"ml-3 text-truncate ".concat(kP.a.formTitle)},t("createVideoCover")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:kP.a.modalBody},v.a.createElement($l.a,{noValidate:!0,onSubmit:this.submitCreateCognitiveVideo},v.a.createElement("div",{className:"u-h-3x1o2 u-py-3o4 pl-4 d-flex align-items-center justify-content-between"},v.a.createElement("div",{className:"d-flex"},v.a.createElement(_u,{id:"fromImage",labelName:t("btn.fromImage"),type:"radio",checked:!r,onChange:function(){return e.setState({isHtmlMode:!1,createCoverMode:UP.CAPTURED_IMAGE})},className:"mr-5"}),v.a.createElement(_u,{id:"fromHtml",labelName:t("btn.fromHtml"),type:"radio",checked:r,onChange:function(){return e.setState({isHtmlMode:!0,createCoverMode:UP.CAPTURED_IMAGE})},className:"mr-5"})),!r&&v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:P()(kP.a.toolbarBtn,"btn-border mr-3",a===UP.CAPTURED_IMAGE&&kP.a.active),onClick:function(){return e.changeCreateCoverMode(UP.CAPTURED_IMAGE)}},v.a.createElement("i",{className:P()("fv fuvi-capture_image mr-2 u-fs-1x1o4")}),v.a.createElement("div",{className:"u-fs-7o8"},t("btn.capturedPhoto"))),v.a.createElement("div",{className:P()(kP.a.toolbarBtn,"btn-border mr-3",a===UP.CURRENT_COVER&&kP.a.active),onClick:function(){return e.changeCreateCoverMode(UP.CURRENT_COVER)}},v.a.createElement("i",{className:P()("fv fuvi-current-img mr-2 u-fs-1x1o4")}),v.a.createElement("div",{className:"u-fs-7o8"},t("btn.currentPhoto"))),v.a.createElement(QT,{acceptedFiles:"image/jpeg,image/jpg,image/jpeg,image/png,image/svg+xml",receiveAcceptedFiles:this.handleFileSelect,multiple:!1,innerWrapperClassName:P()(kP.a.toolbarBtn,"btn-border",a===UP.UPLOAD_IMAGE&&kP.a.active),wrapperClassName:"mr-3"},v.a.createElement("div",{className:"d-flex",onClick:this.handleUploadImageClick},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o4"}),v.a.createElement("div",{className:"u-fs-7o8"},t("btn.uploadPhoto")))))),v.a.createElement("div",{className:P()(kP.a.imageWrap,r&&"p-4"),style:{userSelect:r?"auto":"none"}},v.a.createElement("div",{className:P()(kP.a.richTextEditorWrapper,!r&&"d-none")},v.a.createElement(t7,{value:c,videoId:p,onChange:this.handleHtmlChange})),!r&&v.a.createElement("div",{className:"w-100 h-100"},v.a.createElement(c7,{src:m}))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100 align-items-center justify-content-end"},v.a.createElement(et.a,{variant:"outline-primary",className:P()(kP.a.footerBtn,"modal-button"),onClick:this.handleFormCancel},t("btn.cancel")),v.a.createElement(et.a,{type:"submit",variant:"primary",className:P()("text-white modal-button ml-4",kP.a.footerBtn,!g&&"u-pointer-event-none u-opacity-50"),onClick:this.handleSubmitForm},t("btn.save")))))),v.a.createElement(IC,{show:s,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:f,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),r}(g.PureComponent);var zP=x.g.CREATE_COVER_MODE,VP=x.g.TYPES_OF_LEARNING,WP=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isHtmlMode:!1,createCoverMode:zP.CAPTURED_IMAGE,uploadedImageUrl:"",showConfirmationModal:!1,isSubmittingForm:!1,uploadedImageBlob:null,isTemplateValidationPassed:!1,templateData:[Object(Y.cloneDeep)(VP)],didFetchTemplateData:!1,isFetchingTemplateData:!1,videoOwnerInfo:null,html:"",isHtmlChanged:!1}),G()(V()(e),"componentDidMount",(function(){var t=e.props.thumbnail,n=void 0===t?"":t;n.match(/.htm/)&&fetch(n).then((function(e){return e.text()})).then((function(t){e.setState({html:t})})).catch((function(e){}))})),G()(V()(e),"setTemplateValidationResult",(function(t){e.state.isTemplateValidationPassed!==t&&e.setState({isTemplateValidationPassed:t})})),G()(V()(e),"changeCreateCoverMode",(function(t){e.state.createCoverMode!==t&&e.setState({createCoverMode:t})})),G()(V()(e),"handleFileSelect",(function(t){e.setState({uploadedImageUrl:URL.createObjectURL(t[0]),uploadedImageBlob:t[0],createCoverMode:zP.UPLOAD_IMAGE})})),G()(V()(e),"handleUploadImageClick",(function(){e.state.uploadedImageUrl&&e.changeCreateCoverMode(zP.UPLOAD_IMAGE)})),G()(V()(e),"handleFormCancel",(function(){e.setState({showConfirmationModal:!0})})),G()(V()(e),"handleCreateTemplate",(function(t,n){var r=e.props,i=r.onClose,a=r.setVideoCoverImg,o=r.updateVideoPreviewData;e.snapshotFirstArea((function(r){t=r,e.updateCoverImageTemplate(n),a({file:t,videoId:n},(function(e){var t=e.url;o({thumbnailUrl:t,videoId:n}),i()}),(function(){e.setState({isSubmittingForm:!1})}))}))})),G()(V()(e),"handleSubmitForm",(function(){var t=e.state,n=t.isHtmlMode,r=t.createCoverMode,i=t.uploadedImageBlob,a=t.html,o=e.props,s=o.setVideoCoverImg,l=o.snapshotBlob,c=o.videoId,u=o.onClose,d=o.isDummyDailyVideo,h=(o.createDailyVideo,o.updateVideoPreviewData),f=o.setVideoCoverImgHtml;e.setState({isSubmittingForm:!0},(function(){var t=l;n?f({videoId:c,html:a},(function(e){var t=e.url;h({thumbnailUrl:t,videoId:c}),u()}),(function(){return e.setState({isSubmittingForm:!1})})):(r===zP.UPLOAD_IMAGE&&(t=i),s({file:t,videoId:c,isDummyDailyVideo:d},(function(e){var t=e.url;h({thumbnailUrl:t,videoId:c}),u()}),(function(){return e.setState({isSubmittingForm:!1})})))}))})),G()(V()(e),"snapshotFirstArea",(function(e){var t=document.getElementById("video-cover-template");CP()(t,{useCORS:!0,width:t.offsetWidth,height:t.offsetHeight,scrollX:0,scrollY:0,allowTaint:!0}).then((function(t){t.toBlob((function(t){var n="".concat((new Date).getTime(),".jpeg");t.fileName=n,t.name=n,e&&e(t)}),"image/jpeg",1)}))})),G()(V()(e),"updateTemplateData",(function(t,n){var r=e.state.templateData;r[t]=n,e.setState({templateData:Object(Y.cloneDeep)(r)})})),G()(V()(e),"updateCoverImageTemplate",(function(t){var n=e.state.templateData,r=e.props.updateCoverImageTemplate,i={};Object.keys(n[0]).forEach((function(e){var t=n[0][e],r=t.isSelected,a=t.data;if(r){var o=(void 0===a?[]:a).map((function(e){return e.text}));i[e]=o}})),i.courseSerial=n[0].courseSerial,i.totalCourse=n[0].totalCourse,r({videoId:t,data:i})})),G()(V()(e),"getCoverImageTemplate",(function(){var t=e.state.templateData,n=e.props,r=n.getCoverImageTemplate,i=n.videoId,a=n.course;n.getCourseSerial;e.getVideoOwnerProfile(),r({videoId:i},(function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(n).map((function(e){if(["l1","l2","l3"].includes(e)){var r=n[e]||[];t[0][e].data=r.map((function(e){return{text:e}})),t[0][e].isSelected=!0}else t[0][e]=n[e]}));var r=function(){e.setState({templateData:Object(Y.cloneDeep)(t),didFetchTemplateData:!0})};if(a&&a.uid&&-1!==a.uid&&!a.total&&a.serial){var i=n.videoCount;t[0].totalCourse=i,r()}else r()}))})),G()(V()(e),"getVideoOwnerProfile",(function(){var t,n=e.props,r=n.owner,i=n.userId,a=n.videoId,o=n.videoPermissions,s=n.getVideoOwnerProfile;!(r===i)&&(null==o?void 0:null===(t=o.VIDEO)||void 0===t?void 0:t.DOANYACTION)&&s({videoId:a},(function(t){e.setState({videoOwnerInfo:t})}))})),G()(V()(e),"handleHtmlChange",(function(t){var n=!!t&&t!==e.props.thumbnail;e.setState({html:t,isHtmlChanged:n})})),e}return n}(HP),GP=Object(q.b)((function(e){var t=e.cogvid,n=e.auth;return{thumbnail:t.cogvidDetails.thumbnailUrl,title:t.cogvidDetails.cognitiveVideo.title,subject:t.cogvidDetails.cognitiveVideo.subject,topic:t.cogvidDetails.cognitiveVideo.topic,author:t.cogvidDetails.cognitiveVideo.author,avatar:t.cogvidDetails.cognitiveVideo.avatar,videoId:t.cogvidDetails.videoId,course:t.cogvidDetails.cognitiveVideo.course,description:t.cogvidDetails.cognitiveVideo.description,owner:t.cogvidDetails.cognitiveVideo.owner,videoPermissions:t.cogvidDetails.permissions,userId:n.userInfo.userId,isDummyDailyVideo:t.cogvidDetails.isDummyDailyVideo,headline:n.userInfo.headline,location:n.userInfo.location}}),(function(e){return{updateExtractChaptersModal:function(t,n,r){return e(Q.e.updateExtractChaptersModal(t,n,r))},extractChapters:function(t,n,r){return e(Q.e.extractChapters(t,n,r))},setVideoCoverImg:function(t,n,r){return e(Q.e.setVideoCoverImg(t,n,r))},setVideoCoverImgHtml:function(t,n,r){return e(Q.e.setVideoCoverImgHtml(t,n,r))},updateCoverImageTemplate:function(t,n,r){return e(Q.e.updateCoverImageTemplate(t,n,r))},getCoverImageTemplate:function(t,n,r){return e(Q.e.getCoverImageTemplate(t,n,r))},getCourseSerial:function(t,n,r){return e(Q.e.getCourseSerial(t,n,r))},getVideoOwnerProfile:function(t,n,r){return e(Q.e.getVideoOwnerProfile(t,n,r))},createDailyVideo:function(t,n,r){return e(Q.e.createDailyVideo(t,n,r))}}}))(Object(K.c)(WP)),qP=r(73),YP=r.n(qP);function KP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KP(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var QP=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{chapters:Object(Y.cloneDeep)(e.props.chapters.map((function(e){return XP(XP({},e),{},{isSelected:!1})}))),isSelectedAll:!1}),G()(V()(e),"handleItemSelect",(function(t,n){t&&t.stopPropagation();var r=e.state.chapters,i=!0;r.forEach((function(e){var t=e.uid,r=e.isSelected;t===n&&(e.isSelected=!r),e.isSelected||(i=!1)})),e.setState({chapters:Object(Y.cloneDeep)(r),isSelectedAll:i})})),G()(V()(e),"handleSelectAll",(function(t){t&&t.stopPropagation();var n=e.state,r=n.chapters,i=n.isSelectedAll;r.forEach((function(e){e.isSelected=!i})),e.setState({chapters:Object(Y.cloneDeep)(r),isSelectedAll:!i})})),G()(V()(e),"handleSubmit",(function(){(0,e.props.onSubmit)(e.state.chapters.flatMap((function(e){return e.isSelected?[e.content]:[]})))})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.onClose,r=t.show,i=this.state,a=i.chapters,o=i.isSelectedAll,s=!1;return a.some((function(e){var t=e.isSelected;if(void 0!==t&&t)return s=!0,!0})),v.a.createElement(Fl.a,{show:r,centered:!0,backdrop:"static",className:"createTemplateSelectChapters"},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,"Add information from chapters")),v.a.createElement(Fl.a.Body,{className:YP.a.selectChaptersBody},v.a.createElement("div",{className:YP.a.selectChaptersAll,onClick:this.handleSelectAll},v.a.createElement(_u,{id:"selectAll",labelName:"",checked:o,className:"u-pointer-event-none",onChange:function(){}}),v.a.createElement("div",{className:"text-truncate"},Object(_t.t)("label.all"))),v.a.createElement("div",{className:YP.a.itemsWrapper},a.map((function(t){var n=t.content,r=t.uid,i=t.isSelected,a=void 0!==i&&i;return v.a.createElement("div",{className:YP.a.selectChapterItem,key:r,onClick:function(t){return e.handleItemSelect(t,r)}},v.a.createElement(_u,{id:r,labelName:"",checked:a,className:"u-pointer-event-none",onChange:function(){}}),v.a.createElement("div",{className:"text-truncate"},n))})))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button",onClick:n},Object(_t.t)("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:"modal-button ml-4",onClick:this.handleSubmit,disabled:!s},Object(_t.t)("btn.add"))))}}]),n}(v.a.PureComponent);function $P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function JP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$P(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ZP=x.g.CURRENCIES,eD=x.g.ACCESS_GRANT_TYPE,tD=x.g.COURSE_SEQUENCE_MAX_LENGTH,nD=["l1","l2","l3"],rD=function(e){var t=e.typesOfLearning,n=e.onSelect;return nD.map((function(e){var r=t[e],i=r.label,a=r.color,o=r.isSelected,s=void 0!==o&&o;return v.a.createElement("div",{className:YP.a.typesOfLearningItem,onClick:function(){return n(e)},key:e},v.a.createElement("div",{style:{width:"1.25rem",border:"1px solid ".concat(a),color:"#FF5200"},className:"u-flex-center"},s?"✔":""),v.a.createElement("div",{style:{backgroundColor:a},className:"text-white flex-grow-1 u-fs-5o8 u-flex-center"},i),v.a.createElement("div",{style:{width:"1.25rem",border:"1px solid #A9A9A9"},className:"u-text-black text-capitalize u-fw-600 u-fs-9o16 u-flex-center"},e))}))},iD=function(e){var t=e.learningItems,n=e.onAddItems,r=e.toggleEditItem,i=e.onItemTextChange,a=e.onDeleteItem,o=e.isSubmitting,s=void 0!==o&&o,l=Object(g.useState)(""),c=pi()(l,2),u=c[0],d=c[1],h=function(e,t){i(e,t,u),r(e,t,!1),d("")},f=function(e){var t=e.target.value;t.length>100||d(t)};return v.a.createElement("div",{className:P()(YP.a.learningItemsWrapper,"hide-scrollbar")},t.map((function(e){var t=e.data,i=void 0===t?[]:t,o=e.label,l=e.color,c=e.level;return v.a.createElement(v.a.Fragment,{key:o},v.a.createElement("div",{className:YP.a.learningItemLabel,style:{backgroundColor:l},onClick:function(){return n(c)}},v.a.createElement("div",{className:"u-fs-7o8"},"".concat(o," video")),v.a.createElement("i",{className:P()("fv fuvi-plus-icon",s&&"d-none")})),v.a.createElement("div",{className:"u-mt-3o16"},i.map((function(e,t){var n=e.text,i=e.isEditMode,o=void 0!==i&&i;return v.a.createElement("div",{className:YP.a.learningItemText,key:t},v.a.createElement("div",{className:"u-w-1 u-h-1 u-mr-9o16",style:{backgroundColor:l,minWidth:"1rem"}}),v.a.createElement("div",{className:"d-flex justify-content-between align-items-center w-100",style:{overflow:"hidden"}},o?v.a.createElement("input",{defaultValue:n,className:YP.a.editTextInput,autoFocus:!0,onChange:f,onBlur:function(){h(c,t)},onKeyDown:function(e){return function(e,t,n){e.stopPropagation(),"Enter"===e.key&&h(t,n),"Escape"===e.key&&r(t,n,!1)}(e,c,t)},maxLength:100}):v.a.createElement("div",{className:"text-truncate"},n),v.a.createElement("div",{className:P()(YP.a.itemActions,o&&"d-flex")},o?v.a.createElement("i",{className:"fv fuvi-save-icon text-primary u-cursor-pointer",onClick:function(){h(c,t)}}):v.a.createElement(v.a.Fragment,null,v.a.createElement("i",{className:"fv fuvi-edit text-primary mr-2 u-cursor-pointer",onClick:function(){d(n),r(c,t,!0)}}),v.a.createElement("i",{className:"fv fuvi-trash-can text-danger u-cursor-pointer",onClick:function(){return a(c,t)}})))))}))))})))},aD=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isSelectingLearningItemsFor:"",courseSerial:"",totalCourse:"",isValidSequence:!0}),G()(V()(e),"validateTemplate",(function(){var t=e.props.setTemplateValidationResult,n=e.getSelectedLearningItems().canSubmit,r=e.validateCourseSequence();t(n&&r)})),G()(V()(e),"updateCourseData",(function(){var t=e.props,n=t.course,r=t.typesOfLearning,i=(r=void 0===r?{}:r).totalCourse,a=r.videoCount;if(n&&n.uid&&-1!==n.uid){var o=n.serial,s=n.total;e.setState({courseSerial:""+(0==o?"M":o),totalCourse:""+(s>0?s:i||a||"")},e.validateTemplate)}})),G()(V()(e),"validateCourseSequence",(function(){var t=e.props,n=t.didFetchTemplateData,r=t.course;if(!n)return!0;var i=!0;if(r&&r.uid&&-1!==r.uid){var a=e.state,o=a.courseSerial,s=a.totalCourse;if(""===o||""===s)i=!1;else{var l="M"==o?0:o,c=void 0===l?r.serial:l;i=Number(c)<=Number(s-1)&&Number(s)>0}}return e.setState({isValidSequence:i}),i})),G()(V()(e),"handleTypeOfLearningSelect",(function(t){var n=e.props,r=n.typesOfLearning,i=n.updateTemplateData,a=r[t].isSelected;r[t].isSelected=!a,i(Object(Y.cloneDeep)(r))})),G()(V()(e),"handleSelectLearningItems",(function(t){var n=e.props,r=n.typesOfLearning,i=n.updateTemplateData,a=e.state.isSelectingLearningItemsFor,o=r[a].data||[];r[a].data=[].concat(Rl()(o),Rl()(t.map((function(e){return{text:e}})))),i(Object(Y.cloneDeep)(r)),e.setState({isSelectingLearningItemsFor:""})})),G()(V()(e),"getSelectedLearningItems",(function(){var t=e.props.typesOfLearning,n=!0,r=nD.flatMap((function(e){var r=t[e],i=r.isSelected,a=void 0!==i&&i,o=r.data;return a?(Object(Y.isEmpty)(o)&&(n=!1),[JP(JP({},t[e]),{},{level:e})]):[]}));return n&&(n=r.length>0),{canSubmit:n,selectedLearningItems:r}})),G()(V()(e),"handleDeleteLearningItem",(function(t,n){var r=e.props,i=r.typesOfLearning,a=r.updateTemplateData;i[t].data.splice(n,1),a(Object(Y.cloneDeep)(i))})),G()(V()(e),"toggleEditLearningItem",(function(t,n,r){var i=e.props,a=i.typesOfLearning,o=i.updateTemplateData;a[t].data[n].isEditMode=r,o(Object(Y.cloneDeep)(a))})),G()(V()(e),"handleLearningItemTextChange",(function(t,n,r){var i=e.props,a=i.typesOfLearning,o=i.updateTemplateData;a[t].data[n].text=r,o(Object(Y.cloneDeep)(a))})),G()(V()(e),"updateTemplateDataCourseChange",(function(){var t=e.props,n=t.typesOfLearning,r=t.updateTemplateData,i=e.state,a=i.courseSerial,o=i.totalCourse;r(JP(JP({},Object(Y.cloneDeep)(n)),{},{totalCourse:o,courseSerial:"M"===a?"0":a}))})),G()(V()(e),"handleCourseSequenceChange",(function(t){t.stopPropagation();var n=t.target,r=n.name,i=n.value;(/^\d+$/.test(i)||""===i)&&e.setState(G()({},r,i),e.updateTemplateDataCourseChange),"courseSerial"===r&&"M"===i.toLocaleUpperCase()&&e.setState({courseSerial:"M"},e.updateTemplateDataCourseChange)})),e}return c()(r,[{key:"componentDidMount",value:function(){this.updateCourseData()}},{key:"componentDidUpdate",value:function(e){var t=e.typesOfLearning,n=e.didFetchTemplateData,r=this.props,i=r.typesOfLearning,a=r.didFetchTemplateData;t!==i&&this.validateTemplate(),!n&&a&&this.updateCourseData()}},{key:"render",value:function(){var e,n=this,r=this.props,i=r.imageSource,a=r.title,o=(r.subject,r.author),s=r.avatar,l=r.headline,c=r.location,u=r.unitPrice,d=(u=void 0===u?{}:u).amount,h=u.currency,f=(h=void 0===h?{}:h).code,p=void 0===f?ZP.USD.value:f,m=(r.views,r.chapters),g=r.typesOfLearning,b=r.accessGrantType,y=r.isSubmitting,A=r.course,_=r.course,w=(_=void 0===_?{}:_).code,E=r.videoOwnerInfo,S=b===eD.FREE,C=this.state,T=C.isSelectingLearningItemsFor,k=C.isValidSequence,O=this.state,M=O.courseSerial,D=O.totalCourse;void 0!==M&&"undefined"!==M||(M=""),D||(D="");var N=this.getSelectedLearningItems().selectedLearningItems,L=!Object(Y.isEmpty)(A)&&-1!==A.uid&&!!A.uid,R=a;return M&&(R="".concat(M," - ").concat(R)),w&&(R="".concat(w," - ").concat(R)),v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:YP.a.templateWrap,id:"video-cover-template"},v.a.createElement("div",{className:YP.a.topRow},v.a.createElement("div",{className:YP.a.videoInfo},v.a.createElement("div",{className:"mt-2"},v.a.createElement("div",{className:P()(YP.a.title)},R),v.a.createElement("div",{className:"d-flex align-items-center u-mt-1o4"},L&&v.a.createElement("div",{className:P()(YP.a.sequence,"u-mr-1x7o8")},v.a.createElement("div",{className:YP.a.sequenceBadge},t("video")),v.a.createElement("div",{className:P()(YP.a.inputWrapper,!k&&YP.a.error)},v.a.createElement(mu,{size:"sm",name:"courseSerial",className:"mb-0 ml-n1 u-w-2",classNameInput:"border-0 bg-transparent shadow-none text-right px-1",autoComplete:"off",value:M,onChange:this.handleCourseSequenceChange,maxLength:tD}),v.a.createElement("div",{className:"mx-1"},"/"),v.a.createElement(mu,{size:"sm",name:"totalCourse",className:"mb-0 u-w-2",classNameInput:"u-h-1x3o4 border-0 shadow-none px-1",autoComplete:"off",value:D,onChange:this.handleCourseSequenceChange,maxLength:tD,readOnly:!0}))),S&&v.a.createElement("div",{className:YP.a.freeBadge},t("accessType.free")),!!d&&!S&&v.a.createElement("div",{className:"u-text-dark-red u-fw-500"},x.c.formatMoney(d,p)))),v.a.createElement("div",null,v.a.createElement("div",{className:"u-fs-3o4 u-text-black u-mb-1o4 u-mt-1o8 u-fw-600"},t("typesOfLearning")),v.a.createElement(rD,{typesOfLearning:g,onSelect:this.handleTypeOfLearningSelect}))),v.a.createElement("div",{className:YP.a.authorInfoWrap},v.a.createElement("img",{src:(null==E?void 0:null===(e=E.avatar)||void 0===e?void 0:e.image)||s,className:YP.a.avatar}),v.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-between"},className:"flex-fill"},v.a.createElement("div",{style:{fontWeight:"600",fontSize:"1.0625rem",color:"#000000"}},(null==E?void 0:E.fullName)||o),v.a.createElement("div",{style:{fontSize:"0.75rem",fontWeight:"500",lineHeight:"1rem"}},(null==E?void 0:E.headline)||l),v.a.createElement("div",{style:{fontSize:"0.75rem",color:"#666666",fontWeight:"400"}},(null==E?void 0:E.location)||c)))),v.a.createElement("div",{className:YP.a.bottomRow},v.a.createElement("div",{className:YP.a.bottomLeft},v.a.createElement("div",{className:YP.a.image,style:{backgroundImage:"url(".concat(i,")")}}),v.a.createElement("div",{className:YP.a.logo},v.a.createElement("img",{src:I.a.fuviTemplateLogo,style:{width:"19rem",height:"1.5rem"}}),v.a.createElement("img",{src:I.a.fuviTemplateImage,style:{height:"4.375rem"}}))),v.a.createElement("div",{className:YP.a.bottomRight},N.length>0?v.a.createElement(iD,{learningItems:N,onAddItems:function(e){return n.setState({isSelectingLearningItemsFor:e})},onDeleteItem:this.handleDeleteLearningItem,toggleEditItem:this.toggleEditLearningItem,onItemTextChange:this.handleLearningItemTextChange,isSubmitting:y}):v.a.createElement("div",{className:YP.a.chapterPlaceHolder},v.a.createElement("div",{className:YP.a.imgWrapper},v.a.createElement("img",{height:"106",width:"121",src:I.a.templateChapter,alt:"add template icon",className:YP.a.folderIcon})),v.a.createElement("div",{className:YP.a.createCoverInstruction},t("createCoverInstruction")))))),!!T&&v.a.createElement(QP,{show:!0,chapters:m,onSubmit:this.handleSelectLearningItems,onClose:function(){return n.setState({isSelectingLearningItemsFor:""})}}))}}]),r}(v.a.PureComponent);Object(q.b)((function(e){var t=e.cogvid,n=e.auth;return{title:t.cogvidDetails.cognitiveVideo.title,subject:t.cogvidDetails.cognitiveVideo.subject,author:t.cogvidDetails.cognitiveVideo.author,avatar:t.cogvidDetails.cognitiveVideo.avatar,views:t.cogvidDetails.cognitiveVideo.views,unitPrice:t.cogvidDetails.unitPrice,accessGrantType:t.cogvidDetails.accessGrantType,chapters:t.cogvidDetails.chapters,headline:n.userInfo.headline,location:n.userInfo.location,course:t.cogvidDetails.cognitiveVideo.course}}),(function(e){return{updateExtractChaptersModal:function(t,n,r){return e(cogvidActions.updateExtractChaptersModal(t,n,r))},extractChapters:function(t,n,r){return e(cogvidActions.extractChapters(t,n,r))},setVideoCoverImg:function(t,n,r){return e(cogvidActions.setVideoCoverImg(t,n,r))}}}))(aD);var oD=x.g.CREATE_COVER_MODE,sD=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.isSubmittingForm,i=n.createCoverMode,a=n.uploadedImageUrl,o=n.showConfirmationModal,s=this.props,l=s.thumbnail,c=s.capturedImage,u=s.onClose,d=s.rootContext,h=s.content,f="";switch(i){case oD.UPLOAD_IMAGE:f=a;break;case oD.CAPTURED_IMAGE:f=c;break;case oD.CURRENT_COVER:f=d+l}var p=i!==oD.CURRENT_COVER;return v.a.createElement(v.a.Fragment,null,v.a.createElement("canvas",{id:"template-canvas",hidden:!0}),v.a.createElement(Fl.a,{show:!0,className:P()("createTemplateWrapper"),scrollable:!1,centered:!0,backdrop:"static"},r&&v.a.createElement(Nn,null),v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:P()("ml-3 text-truncate",YP.a.formTitle)},t("createChapterCover",{content:h})),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:YP.a.modalBody},v.a.createElement($l.a,{noValidate:!0,onSubmit:this.submitCreateCognitiveVideo},v.a.createElement("div",{className:"u-pt-3o4 u-pb-3o4 pl-4 d-flex align-items-center justify-content-end"},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:P()(YP.a.toolbarBtn,"btn-border mr-3",i===oD.CAPTURED_IMAGE&&YP.a.active),onClick:function(){return e.changeCreateCoverMode(oD.CAPTURED_IMAGE)}},v.a.createElement("i",{className:P()("fv fuvi-capture_image mr-2 u-fs-1x1o4")}),v.a.createElement("div",{className:"u-fs-7o8"},t("btn.capturedPhoto"))),v.a.createElement("div",{className:P()(YP.a.toolbarBtn,"btn-border mr-3",i===oD.CURRENT_COVER&&YP.a.active),onClick:function(){return e.changeCreateCoverMode(oD.CURRENT_COVER)}},v.a.createElement("i",{className:P()("fv fuvi-current-img mr-2 u-fs-1x1o4")}),v.a.createElement("div",{className:"u-fs-7o8"},t("btn.currentPhoto"))),v.a.createElement(QT,{acceptedFiles:"image/jpeg,image/jpg,image/jpeg,image/png",receiveAcceptedFiles:this.handleFileSelect,multiple:!1,innerWrapperClassName:P()(YP.a.toolbarBtn,"btn-border",i===oD.UPLOAD_IMAGE&&YP.a.active),wrapperClassName:"mr-3"},v.a.createElement("div",{className:"d-flex",onClick:this.handleUploadImageClick},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o4"}),v.a.createElement("div",{className:"u-fs-7o8"},t("btn.uploadPhoto")))))),v.a.createElement("div",{className:P()(YP.a.imageWrap),style:{userSelect:"none"}},v.a.createElement("img",{src:f,className:YP.a.coverImg,crossOrigin:"true"})))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100 align-items-center justify-content-end"},v.a.createElement(et.a,{variant:"outline-primary",className:P()(YP.a.footerBtn,"modal-button"),onClick:this.handleFormCancel},t("btn.cancel")),v.a.createElement(et.a,{type:"submit",variant:"primary",className:P()("text-white modal-button ml-4",YP.a.footerBtn,!p&&"u-pointer-event-none u-opacity-50"),onClick:this.handleSubmitForm},t("btn.save")))))),v.a.createElement(IC,{show:o,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:u,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),r}(g.PureComponent);var lD=x.g.CREATE_COVER_MODE,cD=x.g.TYPES_OF_LEARNING,uD=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{createCoverMode:lD.CAPTURED_IMAGE,uploadedImageUrl:"",showConfirmationModal:!1,isSubmittingForm:!1,uploadedImageBlob:null,isTemplateValidationPassed:!1,templateData:[Object(Y.cloneDeep)(cD)],isFetchingTemplateData:!1,videoOwnerInfo:null}),G()(V()(e),"changeCreateCoverMode",(function(t){e.state.createCoverMode!==t&&e.setState({createCoverMode:t})})),G()(V()(e),"handleFileSelect",(function(t){e.setState({uploadedImageUrl:URL.createObjectURL(t[0]),uploadedImageBlob:t[0],createCoverMode:lD.UPLOAD_IMAGE})})),G()(V()(e),"handleUploadImageClick",(function(){e.state.uploadedImageUrl&&e.changeCreateCoverMode(lD.UPLOAD_IMAGE)})),G()(V()(e),"handleFormCancel",(function(){e.setState({showConfirmationModal:!0})})),G()(V()(e),"handleSubmitForm",(function(){var t=e.state,n=t.createCoverMode,r=t.uploadedImageBlob,i=e.props,a=i.snapshotBlob,o=i.videoId,s=i.onClose,l=i.rootContext,c=i.chapterId,u=i.updateChapterCoverImage;e.setState({isSubmittingForm:!0},(function(){var t=a;n===lD.UPLOAD_IMAGE&&(t=r),u({file:t,videoId:o,rootContext:l,chapterId:c},(function(){s()}),(function(){return e.setState({isSubmittingForm:!1})}))}))})),G()(V()(e),"snapshotFirstArea",(function(e){var t=document.getElementById("video-cover-template");CP()(t,{useCORS:!0,width:t.offsetWidth,height:t.offsetHeight,scrollX:0,scrollY:0,allowTaint:!0}).then((function(t){t.toBlob((function(t){var n="".concat((new Date).getTime(),".jpeg");t.fileName=n,t.name=n,e&&e(t)}),"image/jpeg",1)}))})),e}return n}(sD),dD=Object(q.b)((function(e){var t=e.cogvid;return{thumbnail:t.chapterHighlighting.image,chapterId:t.chapterHighlighting.uid,content:t.chapterHighlighting.content,rootContext:t.cogvidDetails.rootContext,videoId:t.cogvidDetails.videoId}}),(function(e){return{updateChapterCoverImage:function(t,n,r){return e(Q.e.updateChapterCoverImage(t,n,r))}}}))(Object(K.c)(uD)),hD=r(124),fD=r.n(hD);var pD=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isHover:!1}),G()(V()(e),"handleMouseOver",(function(){return e.setState({isHover:!0})})),G()(V()(e),"handleMouseLeave",(function(){return e.setState({isHover:!1})})),e}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.name,r=e.avatar,i=e.content,a=e.duration,o=e.canEdit,s=e.canDelete,l=(e.onEdit,e.onDelete),c=e.displayFullContent,u=this.state.isHover;return v.a.createElement("div",{className:P()(fD.a.noteItem),onMouseOver:u?null:this.handleMouseOver,onMouseLeave:this.handleMouseLeave},v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",{className:fD.a.avatar,style:{backgroundImage:"url(".concat(r||I.a.noAvatar,")")}}),v.a.createElement("div",{className:"flex-grow-1 ml-2 u-fs-7o8"},v.a.createElement(Kt.a,{placement:"left",delay:{show:800},overlay:v.a.createElement(Xt.a,null,n),trigger:n&&n.length>20?["hover","focus"]:[]},v.a.createElement("div",{className:"u-fw-600 u-truncate-1 u-pr-1"},n)),v.a.createElement("div",{className:"flex-shrink-0 u-opacity-80"},a),(o||s)&&v.a.createElement(ut,{drop:"left",className:P()(fD.a.dropdown)},v.a.createElement(ut.Toggle,{type:"button",block:!0,className:P()(fD.a.dropdownToggle,!u&&"u-opacity-0 pointer-events-none",u&&"u-opacity-100")},v.a.createElement("i",{className:"fv fuvi-three-dots-v u-opacity-80"})),v.a.createElement(ut.Menu,{className:"p-0"},o&&v.a.createElement(ut.Item,{className:fD.a.dropdownItem},v.a.createElement("i",{className:"fv fuvi-edit-copy"}),v.a.createElement("div",{className:"u-pl-3o4 u-fs-7o8"},t("btn.edit"))),s&&v.a.createElement(ut.Item,{className:fD.a.dropdownItem,onClick:l},v.a.createElement("i",{className:"fv fuvi-trash-can"}),v.a.createElement("div",{className:"u-pl-3o4 u-fs-7o8"},t("btn.delete"))))))),v.a.createElement(TR,{className:"mt-1 px-1",content:i,expanded:c}))}}]),r}(v.a.PureComponent);var mD=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{note:"",deleteNote:null}),G()(V()(e),"textareaRef",v.a.createRef()),G()(V()(e),"updateTextareaHeight",(function(){e.textareaRef.style.height="5px",e.textareaRef.style.height="".concat(e.textareaRef.scrollHeight,"px")})),G()(V()(e),"handleKeyDown",(function(t){t.stopPropagation(),13===t.keyCode&&(t.metaKey||t.ctrlKey||t.shiftKey)&&(e.handleSubmit(t),e.textareaRef.focus()),x.c.preventKeyDownSideEffect(t)})),G()(V()(e),"handleChange",(function(t){var n=t.target.value;e.setState({note:n},e.updateTextareaHeight)})),G()(V()(e),"handleSubmit",(function(t){t.preventDefault();var n=e.props,r=n.canAddNew,i=n.onItemAddNew,a=e.state.note,o=void 0===a?"":a;r&&0!==o.trim().length&&(i({note:o}),e.setState({note:""},e.updateTextareaHeight))})),G()(V()(e),"handleDeleteModalConfirm",(function(){var t=e.props.onItemDelete,n=e.state.deleteNote||{},r=n.uid;t({chapterId:n.chapterId,noteId:r}),e.setState({deleteNote:null})})),G()(V()(e),"handleDeleteModalCancel",(function(){e.setState({deleteNote:null})})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=(t.show,t.scrollRef),r=t.title,i=t.noteCount,a=void 0===i?0:i,o=t.items,s=void 0===o?[]:o,l=t.isLoadingItems,c=t.isLoadingMore,u=t.isAddingNew,d=t.canAddNew,h=(t.canEdit,t.canDelete),f=t.onNoteEdit,p=t.onLoadMoreItems,m=t.onClose,g=t.className,b=this.state,y=b.note,A=b.deleteNote;return v.a.createElement("div",{className:P()(fD.a.sidebarWrapper,g)},v.a.createElement("div",{className:P()(fD.a.sidebarHeader)},v.a.createElement("div",{className:"h-100 px-2 d-flex align-items-center flex-grow-1 bg-primary"},v.a.createElement(Kt.a,{placement:"left",delay:{show:800},overlay:v.a.createElement(Xt.a,null,r),trigger:r&&r.length>20?["hover","focus"]:[]},v.a.createElement("div",{className:"d-flex flex-grow-1"},v.a.createElement("div",{className:"u-truncate-1 font-weight-bold u-wb-break-all"},r))),v.a.createElement("div",{className:"flex-shrink-0 mr-3"},v.a.createElement(Qt,{badge:a,className:"u-cursor-default u-opacity-100",classNameBadge:fD.a.noteCountBadge,tooltipText:Object(_t.t)("noteCount",{count:a})},v.a.createElement("i",{className:"fv fuvi-notes text-white u-fs-1x1o8"})))),v.a.createElement("div",null,v.a.createElement(Qt,{className:fD.a.hideSidebarBtn,onClick:m},v.a.createElement("i",{className:P()("fv fuvi-next")})))),v.a.createElement("div",{className:P()(fD.a.sidebarFooter)},v.a.createElement("textarea",{ref:function(t){e.textareaRef=t},readOnly:!d,disabled:!d,maxLength:x.g.NOTE_MAX_LENGTH,className:P()(fD.a.textarea,(!d||u)&&"u-cursor-default",!d&&"u-opacity-50"),name:"noteTextarea",placeholder:Object(_t.t)("addNote"),value:y,onKeyDown:this.handleKeyDown,onChange:this.handleChange,style:{height:Object(Y.get)(this.textareaRef,"scrollHeight",0)}}),v.a.createElement("div",{className:"bg-white"},v.a.createElement(Qt,{classNameContainer:"h-100 d-flex align-items-center",className:P()(fD.a.submitBtn,!d&&"u-opacity-50"),onClick:this.handleSubmit,disabled:!d||u},v.a.createElement("i",{className:P()("fv fuvi-send u-fs-1x1o4")})))),v.a.createElement(Lb,{className:P()(fD.a.sidebarContent,"fv-smooth-scroll"),containerClassName:"h-100",ref:n,onYReachEnd:p},v.a.createElement("div",null,!l&&0===s.length&&v.a.createElement("div",{className:"p-3 font-italic u-opacity-80"},Object(_t.t)("noNotesFound")),s.map((function(t,n){var r=t.uid,i=t.text,a=t.postedAt,o=t.writer,s=o.fullName,l=o.avatar,c=o.userId,u=t.isNew,d=(l||{}).image,p=Ml.a.duration(-1*Ml()().diff(Ml()(a))),m=x.c.isCurrentUserId(c);return v.a.createElement(pD,{key:r,name:s,avatar:d,content:i,duration:p.humanize(!0),canEdit:!1,canDelete:m||h,onEdit:f,onDelete:function(){return e.setState({deleteNote:t})},displayFullContent:m&&u})})),l&&v.a.createElement(Nn,{className:"bg-transparent text-primary"}),c&&v.a.createElement("div",{className:"py-3 text-center"},v.a.createElement(Ln,{className:"u-fs-1x1o2"})))),v.a.createElement(IC,{show:!!A,title:Object(_t.t)("modal.confirmDeleteNoteTitle"),onConfirm:this.handleDeleteModalConfirm,onClose:this.handleDeleteModalCancel}))}}]),n}(v.a.PureComponent);var gD=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.showNotes,n=e.showPreviewNotes,r=null==t?void 0:t.chapterId,i=null==n?void 0:n.chapterId,a=!!i&&r!==i;return v.a.createElement("div",{className:P()(fD.a.sidebar,(r||i)&&fD.a.sidebarActive)},v.a.createElement(wD,Gt()({},t,{className:P()(a&&"invisible")})),v.a.createElement(wD,Gt()({isPreviewMode:!0},n,{className:P()(!a&&"invisible")})))}}]),n}(g.Component),vD=Object(q.b)((function(e){var t=e.cg;return{showNotes:t.showNotes,showPreviewNotes:t.showPreviewNotes}}))(gD);function bD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bD(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var AD=x.g.DUMMY_DAILY_VIDEO_ID_PREFIX,_D=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isLoadingItems:!1,isLoadingMore:!1,isAddingNew:!1,items:[],totalItems:0}),G()(V()(e),"paging",{pageNumber:0,pageSize:25,last:!0}),G()(V()(e),"scrollRef",v.a.createRef()),G()(V()(e),"componentDidMount",(function(){e.unlistenHistory=$.a.listen(e.handleURLChange)})),G()(V()(e),"componentWillUnmount",(function(){e.unlistenHistory&&e.unlistenHistory()})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.videoId,r=t.chapterId,i=e.props,a=i.videoId,o=i.chapterId;a&&o&&(a!==n||o!==r)&&e.loadNewItemList()})),G()(V()(e),"handleURLChange",(function(t){var n=Object(Y.get)(t,"state.refresh"),r=Object(Y.get)(t,"state.note");if(r&&n){var i=e.props,a=i.videoId,o=i.chapterId;a===r.videoId&&o===r.chapterId&&e.loadNewItemList()}})),G()(V()(e),"updateItemList",(function(t,n,r){var i,a=e.state,o=a.items,s=void 0===o?[]:o,l=a.totalItems,c=t.content,u=void 0===c?[]:c,d=t.number,h=t.last,f=t.totalElements,p=u.map((function(e){return yD(yD({},e),{},{isNew:r})})),m=Object(Y.uniqBy)(r?[].concat(Rl()(p),Rl()(s)):[].concat(Rl()(s),Rl()(p)),"uid");r?(i=l+f,e.paging.pageNumber+=parseInt(f/e.paging.pageSize)):(i=f,e.paging.last=h,e.paging.pageNumber=d),e.setState({items:m,totalItems:i},n)})),G()(V()(e),"loadNewItemList",(function(){var t=e.props,n=t.videoId,r=t.chapterId,i=t.getChapterNotes,a=t.updateChapterItemInCache;n.includes(AD)?e.setState({items:[],totalItems:0}):(e.setState({isLoadingItems:!0,items:[]}),i({chapterId:r,pageNumber:0,pageSize:e.paging.pageSize},(function(t){e.updateItemList(t,(function(){var t,i;null===(t=e.scrollRef)||void 0===t||null===(i=t.current)||void 0===i||i.scrollTo(0);var o=e.state.totalItems;a({videoId:n,chapterId:r,data:{noteCount:o}})})),e.setState({isLoadingItems:!1})}),(function(t){e.setState({isLoadingItems:!1})})))})),G()(V()(e),"loadMoreItemList",(function(){var t=e.paging,n=t.pageNumber,r=t.pageSize,i=t.last,a=e.props,o=a.chapterId,s=a.getChapterNotes,l=e.state,c=l.isLoadingMore;l.isLoadingItems||c||i||(e.setState({isLoadingMore:!0}),s({chapterId:o,pageSize:r,pageNumber:n+1},(function(t){e.updateItemList(t),e.setState({isLoadingMore:!1})}),(function(t){e.setState({isLoadingMore:!1})})))})),G()(V()(e),"handleSidebarClose",(function(){(0,e.props.displayNotes)(null)})),G()(V()(e),"handleItemAddNew",(function(t){var n=t.note,r=void 0===n?"":n,i=e.props,a=i.videoId,o=i.chapterId,s=i.userScaffId,l=i.addChapterNote,c=i.updateChapterItemInCache,u=i.seqNumber,d=e.state,h=d.items,f=d.isAddingNew;if(o&&!f){e.setState({isAddingNew:!0});var p=h[0]||{};l({chapterId:o,userScaffId:s,seqNumber:u,text:r,lastPostedAt:null==p?void 0:p.postedAt},(function(t){e.updateItemList(t,(function(){var n,r;null===(n=e.scrollRef)||void 0===n||null===(r=n.current)||void 0===r||r.scrollTo(0);var i=e.state.totalItems;c({videoId:t.videoId||a,chapterId:t.chapterId||o,data:{noteCount:i}})}),!0),e.setState({isAddingNew:!1})}),(function(t){e.setState({isAddingNew:!1})}))}})),G()(V()(e),"handleItemUpdate",(function(t){var n=t.chapterId,r=t.noteId,i=t.note,a=void 0===i?"":i,o=e.props.updateChapterNote;n&&r&&o({chapterId:n,noteId:r,text:a},(function(){}))})),G()(V()(e),"handleItemDelete",(function(t){var n=t.chapterId,r=t.noteId,i=e.props,a=i.videoId,o=i.deleteChapterNote,s=i.updateChapterItemInCache;n&&r&&o({chapterId:n,noteId:r},(function(){var t=e.state,i=t.items,o=t.totalItems,l=Rl()(i),c=o-Object(Y.remove)(l,(function(e){return e.chapterId===n&&e.uid===r})).length;e.setState({items:l,totalItems:c}),s({videoId:a,chapterId:n,data:{noteCount:c}})}))})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.videoId,n=e.chapterId,r=e.title,i=(e.permissions,e.className),a=this.state,o=a.isLoadingItems,s=a.isLoadingMore,l=a.isAddingNew,c=a.items,u=a.totalItems;return v.a.createElement(mD,{show:!!t&&!!n,scrollRef:this.scrollRef,className:i,items:c,title:r,noteCount:u,isLoadingItems:o,isLoadingMore:s,isAddingNew:l,canAddNew:!0,canEdit:!0,canDelete:!0,onClose:this.handleSidebarClose,onLoadMoreItems:this.loadMoreItemList,onItemAddNew:this.handleItemAddNew,onItemUpdate:this.handleItemUpdate,onItemDelete:this.handleItemDelete})}}]),n}(v.a.Component),wD=Object(q.b)((function(e){var t=e.cogvid;return{videoPermissions:t.cogvidDetails.permissions,userScaffId:t.cogvidDetails.userScaffId}}),(function(e){return{displayNotes:function(t){return e(Q.d.displayNotes(t))},getChapterNotes:function(t,n,r){return e(Q.d.getChapterNotes(t,n,r))},addChapterNote:function(t,n,r){return e(Q.d.addChapterNote(t,n,r))},updateChapterNote:function(t,n,r){return e(Q.d.updateChapterNote(t,n,r))},deleteChapterNote:function(t,n,r){return e(Q.d.deleteChapterNote(t,n,r))},updateChapterItemInCache:function(t){return e(Q.e.updateChapterItemInCache(t))}}}))(_D),ED=r(252),SD=r.n(ED),CD=r(297),TD=r.n(CD);function kD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kD(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var OD=x.g.CURRENCIES,ID=x.g.ACCESS_GRANT_TYPE,MD=x.g.SUB_OPTIONS,PD=[0,1,2,3],DD=[["VIDEOS","","",""],["VIDEOS","SLIDES","",""],["SLIDES","5% discount (**)","",""],["WORKSHEETS","GUIDES","SOLUTIONS","10% discount (**)"]],ND=function(e){var t=e.currency,n=void 0===t?OD.USD.value:t,r=e.className,i=e.free,a=e.active,o=e.name,s=e.offers,l=(e.discount,e.value),c=e.validator,u=e.onChange,d=OD[n],h=d.symbol,f=(d.symbolPosition,d.step),p=d.decimalSeparator,m=d.groupSeparator,b=d.maximumFractionDigits,y=h,A=Object(g.useCallback)((function(e){u({name:o,value:e})}),[o]);return v.a.createElement("div",{className:P()("d-flex flex-column justify-content-end",r)},s.map((function(e,t){return e?v.a.createElement("div",{key:t,className:"d-flex align-items-center mb-2"},v.a.createElement("div",{className:P()(TD.a.dot,a&&TD.a.active)}),v.a.createElement("div",{className:"u-fs-15o16 u-fw-500 ml-3"},e)):v.a.createElement("div",{key:t,className:"flex-grow-1"})})),v.a.createElement(SD.a,{disabled:i,value:i?"Free":l,onChange:A,step:f,allowDecimals:!0,decimalsLimit:b,className:P()("btn-border u-w-5 u-h-input border border-primary px-2 ml-3",(!l||0==l)&&"bg-light"),prefix:y,decimalSeparator:p,groupSeparator:m,allowNegativeValue:!1}),v.a.createElement("div",{className:"ml-2 mt-1"},c.message("price",l,"validPrice|priceBoundary")))},LD=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"currencyRef",v.a.createRef()),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"state",{currency:e.props.initialCurrency||OD.USD.value,price:e.props.initialPrice,isSettingPrice:!1,accessGrantType:e.props.accessGrantType||ID.UNDEFINED,pctSaleOff:"",msgSaleOff:"",discount0:0,discount1:0,discount2:5,discount3:10}),G()(V()(e),"getSubsPrice",(function(){var t=e.props,n=t.accessGrantType,r=t.videoId,i=t.initialCurrency,a=t.getSubsPrice;n===ID.PAID&&a({productId:r,currencyCode:i||OD.USD.value},(function(t){var n=t.pctSaleOff,r=t.msgSaleOff,i=t.priceItems,a={pctSaleOff:n?n+"":"",msgSaleOff:r||""};(void 0===i?[]:i).map((function(e){a["price".concat(e.plan)]=Object(Y.isNumber)(e.amount)?e.amount+"":""})),e.setState(xD({},a))}))})),G()(V()(e),"handleChange",(function(t){var n=t.name,r=t.value;e.setState(G()({},n,r)),e.isDirty=!0})),G()(V()(e),"handleTypeChange",(function(t){e.setState({accessGrantType:t}),e.isDirty=!0})),G()(V()(e),"handleSubmit",(function(){var t=e.props,n=t.videoId,r=t.deleteSubsPrice,i=t.setSubsPrice,a=t.onClose,o=(t.videoTitle,t.postSetPriceCallback),s=t.onSubmit,l=e.state,c=l.currency,u=l.accessGrantType,d=l.pctSaleOff,h=l.msgSaleOff,f=u===ID.PAID;if(e.validator.allValid()||!f)if(e.setState({isSettingPrice:!0}),f){var p=PD.map((function(t){return{months:1,plan:t,amount:e.state["price".concat(t)]?parseFloat(e.state["price".concat(t)]):void 0,discount:e.state["discount".concat(t)],offers:MD[t].offers}}));i({productId:n,currencyCode:OD[c].value,pctSaleOff:parseFloat(d),msgSaleOff:h,priceItems:p},(function(e){s&&s({accessGrantType:u}),a(),o&&o()}),(function(){e.setState({isSettingPrice:!1})}))}else r({productId:n,currencyCode:OD[c].value,agt:u},(function(e){s&&s({accessGrantType:u}),a(),o&&o({price:""})}),(function(){e.setState({isSettingPrice:!1})}));else e.validator.showMessages(),e.forceUpdate()})),G()(V()(e),"checkCanSubmit",(function(){var t=e.props.initialCurrency,n=void 0===t?OD.USD.value:t,r=e.state,i=r.currency,a=r.accessGrantType!==ID.PAID||!0;return e.isDirty&&(i!==n||a)})),e}return c()(r,[{key:"componentDidMount",value:function(){this.getSubsPrice()}},{key:"render",value:function(){var e=this,n=this.props,r=n.onClose,i=n.videoTitle,a=this.state,o=a.currency,s=a.isSettingPrice,l=a.accessGrantType,c=a.pctSaleOff,u=a.msgSaleOff,d=this.checkCanSubmit();return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",onEscapeKeyDown:r,className:P()("createDocumentModal",TD.a.setPriceModalWrapper)},s&&v.a.createElement(Nn,null),v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,{className:"ml-2"},t("modal.pricing"))),v.a.createElement(Fl.a.Body,{className:TD.a.modalBody},v.a.createElement("div",{className:"mb-3 pb-3 border-bottom"},v.a.createElement("div",{className:"u-fs-1 u-fw-500"},i)),v.a.createElement("div",{className:"d-flex u-fs-15o16 align-items-center mt-2 mb-3"},v.a.createElement(_u,{id:"radioNone",labelName:t("none"),type:"radio",checked:l===ID.UNDEFINED,onChange:function(){return e.handleTypeChange(ID.UNDEFINED)}}),v.a.createElement(_u,{id:"radioFree",labelName:"Free",type:"radio",className:"ml-3",checked:l===ID.FREE,onChange:function(){return e.handleTypeChange(ID.FREE)}}),v.a.createElement(_u,{id:"radioPaid",labelName:t("withPriceLabel"),type:"radio",className:"ml-3",checked:l===ID.PAID,onChange:function(){return e.handleTypeChange(ID.PAID)}}),l===ID.PAID&&v.a.createElement("div",{className:P()("u-w-12 ml-4 u-flex-center")},v.a.createElement("div",{className:"u-w-5 flex-shrink-0 form-label u-mb-5o16"},t("modal.currency"),":"),v.a.createElement(wu,{name:"currency",value:o,className:"u-h-input w-100 ml-2 mb-0",options:Object.values(x.g.CURRENCIES).map((function(e){return e.value})),onChange:function(t){return e.setState({currency:t,price:""})}}))),l===ID.PAID&&v.a.createElement("div",{className:TD.a.setPriceArea},v.a.createElement("div",{className:"w-100 mb-3 d-flex align-items-center text-center u-fs-1x1o4 u-fw-600"},v.a.createElement("div",{className:"w-50"},"View"),v.a.createElement("div",{className:"w-50"},"Download / Printout")),v.a.createElement("div",{className:"w-100 mb-4 d-flex align-items-end"},v.a.createElement("div",{className:"u-w-5 flex-shrink-0 form-label"},v.a.createElement("div",{className:"u-h-2"},"Price*:")),v.a.createElement("div",{className:"w-100 d-flex"},PD.map((function(t,n){return v.a.createElement(ND,{key:t,className:"w-100 ml-2",free:0===n,active:0===n||PD.some((function(n){return n>=t&&parseFloat(e.state["price".concat(n)])>=0})),offers:DD[n],currency:o,discount:e.state["discount".concat(t)],name:"price".concat(t),value:e.state["price".concat(t)],validator:e.validator,onChange:e.handleChange})})))),v.a.createElement("div",{className:"d-flex"},v.a.createElement(mu,{className:"u-w-13",classNameLabel:"u-w-6 flex-shrink-0",type:"number",min:0,max:100,labelName:"Sale off(%):",labelPosition:"left",value:c,onChange:function(t){e.setState({pctSaleOff:t.target.value}),e.isDirty=!0}}),v.a.createElement(mu,{as:"textarea",rows:3,className:"ml-5 flex-grow-1",classNameLabel:"u-w-8",labelName:"Sale off message:",labelPosition:"left",value:u,onChange:function(t){e.setState({msgSaleOff:t.target.value}),e.isDirty=!0},validatorElement:this.validator.message("message",u,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH))})),v.a.createElement("div",{className:"u-fs-7o8 font-italic u-opacity-80"},"(**): discount for all items in the store."))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:r},t("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:P()("modal-button ml-4"),onClick:this.handleSubmit,disabled:!d},t("btn.save"))))}}]),r}(v.a.Component),RD=Object(q.b)(null,(function(e){return{getSubsPrice:function(t,n,r){return e(Q.j.getSubsPrice(t,n,r))},setSubsPrice:function(t,n,r){return e(Q.j.setSubsPrice(t,n,r))},deleteSubsPrice:function(t,n,r){return e(Q.j.deleteSubsPrice(t,n,r))}}}))(LD),BD=r(193),jD=r.n(BD);var FD=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"closeButtonRef",v.a.createRef()),G()(V()(e),"handleSetPriceClick",(function(t){t.stopPropagation();var n=e.props,r=n.updateSetPriceModal,i=n.updatePublishVideoModal,a=n.videoTitle,o=n.videoId,s=n.onPublish,l=n.isCourseMaster,c=n.trustedPublisher,u=n.onSubmit;i({show:!1}),r({show:!0,videoTitle:a,videoId:o,onSubmit:u,postSetPriceCallback:function(e){var t=e.price;i({show:!0,hasPrice:!0,price:t,videoTitle:a,onPublish:s,isCourseMaster:l,trustedPublisher:c})}})})),e}return c()(r,[{key:"componentDidMount",value:function(){this.closeButtonRef.current&&this.closeButtonRef.current.focus()}},{key:"render",value:function(){var e=this.props,n=e.onClose,r=e.videoTitle;return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",dialogClassName:jD.a.confirmationDialog,onEscapeKeyDown:n,className:"publish-video-modal"},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,t("modal.publishing"))),v.a.createElement(Fl.a.Body,{className:jD.a.modalBody},v.a.createElement("div",{className:"h-100 w-100 d-flex justify-content-center flex-column align-items-center u-ws-pre-wrap u-fs-1x1o8"},v.a.createElement("div",{dangerouslySetInnerHTML:{__html:t("modal.publishNoPriceVideo1",{name:r})}}),v.a.createElement("div",null,v.a.createElement("span",null,t("modal.publishNoPriceVideo2")," "),v.a.createElement("span",{className:"text-primary u-cursor-pointer",onClick:this.handleSetPriceClick},t("btn.clickHere")),v.a.createElement("span",null," ",t("modal.publishNoPriceVideo3"))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button u-w-9",onClick:n},t("btn.close"))))}}]),r}(v.a.Component),UD=Object(q.b)(null,(function(e){return{updateSetPriceModal:function(t){return e(Q.e.updateSetPriceModal(t))},updatePublishVideoModal:function(t){return e(Q.e.updatePublishVideoModal(t))}}}))(FD);var HD=x.g.MARKET,zD=x.g.SCOPE_CHAPTER_STATUS,VD=(x.g.ACCESS_GRANT_TYPE,[{label:Object(uc.b)("market.global"),value:HD.GLOBAL},{label:Object(uc.b)("market.us"),value:HD.US},{label:Object(uc.b)("market.vn"),value:HD.VN}]),WD=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{selectedMarkets:[VD[0]],commentsLikesEnabledOnPublic:!0,entireCoursePublished:!1,selectAllMessage:"",publishingScope:zD.PUBLIC}),G()(V()(e),"closeButtonRef",v.a.createRef()),G()(V()(e),"handlePublishButtonClick",(function(){var t=e.props,n=t.onPublish,r=t.onClose,i=e.state,a=i.selectedMarkets,o=i.commentsLikesEnabledOnPublic,s=i.entireCoursePublished,l=i.publishingScope,c=a.length;if(0!==c){n({publishingMarkets:c===VD.length?[HD.GLOBAL]:a.map((function(e){return e.value})),commentsLikesEnabledOnPublic:o,entireCoursePublished:s,publishingScope:l}),r()}})),G()(V()(e),"handleMarketChange",(function(t){var n="";t.map((function(e,t){n+=t?", "+e.label:e.label})),e.setState({selectedMarkets:t,selectAllMessage:n})})),G()(V()(e),"handleCommentsLikesEnableChange",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.target;e.setState({commentsLikesEnabledOnPublic:null==n?void 0:n.checked})})),G()(V()(e),"handlePublishEntireCourseChange",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.target;e.setState({entireCoursePublished:null==n?void 0:n.checked})})),G()(V()(e),"onChangeLimitPublish",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.target;e.setState({publishingScope:null==n?void 0:n.value})})),e}return c()(n,[{key:"componentDidMount",value:function(){this.closeButtonRef.current&&this.closeButtonRef.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.videoTitle,n=e.onClose,r=e.price,i=e.hasPrice,a=e.videoId,o=e.onPublish,s=e.isCourseMaster,l=e.trustedPublisher,c=e.onSubmit,u=this.state,d=u.selectedMarkets,h=u.commentsLikesEnabledOnPublic,f=u.selectAllMessage,p=u.entireCoursePublished;if(!i)return v.a.createElement(UD,{onClose:n,videoId:a,videoTitle:t,onPublish:o,onSubmit:c,isCourseMaster:s,trustedPublisher:l});var m=d.length>0;return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",dialogClassName:jD.a.confirmationDialog,onEscapeKeyDown:n,className:"publish-video-modal"},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,Object(uc.b)("modal.publishing",{name:t}))),v.a.createElement(Fl.a.Body,{className:jD.a.modalBody},v.a.createElement("div",{className:"h-100 w-100 d-flex justify-content-center align-items-center"},v.a.createElement("div",{className:"w-100 px-3"},v.a.createElement("div",{className:"d-flex align-items-center mb-4"},v.a.createElement("div",{className:"w-100 u-fs-1x1o8 d-flex align-items-center"},"".concat(Object(uc.b)("message.confirmPublishVideoPrice")," ").concat(Object(uc.b)("withPrice.".concat(r?"other":"zero"))),v.a.createElement("div",{className:P()("bg mr-2",jD.a.priceLabel,r?"u-bg-red":"bg-primary text-capitalize")},r||Object(uc.b)("accessType.free")))),v.a.createElement("div",{className:"mt-3 u-mb-1x1o4 border-bottom"}),v.a.createElement("div",null,v.a.createElement(hu,{disableSearch:!0,name:"multiselectMarket",className:"cogvid-input-border",classNameContainer:"mb-2",labelName:Object(uc.b)("label.selectMarket"),labelPosition:"left",placeholder:Object(uc.b)("placeholder.selectMarket"),selectAllLabel:"",selectAllMessage:f,options:VD,value:d,onChange:this.handleMarketChange})),!m&&v.a.createElement("div",{className:P()("text-danger")},Object(uc.b)("message.selectMarketRequired")),v.a.createElement("div",{style:{paddingLeft:"7rem"}},v.a.createElement("div",{className:"d-flex mt-3 ml-n1"},v.a.createElement(_u,{id:"checkboxCommentsLikesEnable",labelName:Object(uc.b)("label.enableCommentLike"),classNameInput:"custom-checkbox-md u-pl-2",checked:h,onChange:this.handleCommentsLikesEnableChange})),s&&l&&v.a.createElement("div",{className:"d-flex mt-3 ml-n1"},v.a.createElement(_u,{id:"publishEntireCourse",labelName:Object(uc.b)("label.publishEntireCourse"),classNameInput:"custom-checkbox-md u-pl-2",checked:p,onChange:this.handlePublishEntireCourseChange})))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button u-w-9",onClick:n},Object(uc.b)("btn.cancel")),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button u-w-9 u-ml-1x3o8",onClick:this.handlePublishButtonClick,disabled:!m},Object(uc.b)("btn.publish"))))}}]),n}(v.a.Component);WD.propTypes={videoTitle:ne.a.string.isRequired,onPublish:ne.a.func.isRequired,onClose:ne.a.func},WD.defaultProps={onClose:function(){return null}};var GD=r(572),qD=r.n(GD);var YD=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{entireCourse:!1}),G()(V()(e),"closeButtonRef",v.a.createRef()),G()(V()(e),"handleSubmit",(function(){var t=e.props,n=t.onSubmit,r=t.onClose,i=e.state.entireCourse;n&&n(i),r()})),G()(V()(e),"handleSaveEntireCourseChange",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.target;e.setState({entireCourse:null==n?void 0:n.checked})})),e}return c()(n,[{key:"componentDidMount",value:function(){this.closeButtonRef.current&&this.closeButtonRef.current.focus()}},{key:"render",value:function(){var e=this.props,t=(e.videoTitle,e.onClose),n=(e.videoId,e.onSubmit,e.isCourseMaster,this.state.entireCourse);return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",dialogClassName:qD.a.confirmationDialog,onEscapeKeyDown:t,className:"publish-video-modal"},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,Object(uc.b)("modal.saveToMyVideo"))),v.a.createElement(Fl.a.Body,{className:qD.a.modalBody},v.a.createElement("div",{className:"h-100 w-100 d-flex justify-content-center align-items-center"},v.a.createElement("div",{className:"w-100 px-3"},v.a.createElement("div",null,v.a.createElement("div",{className:"d-flex mt-3 ml-n1 justify-content-center"},v.a.createElement(_u,{id:"checkboxCommentsLikesEnable",labelName:Object(uc.b)("label.saveEntireCourseToMyVideo"),classNameInput:"custom-checkbox-md u-pl-2",checked:n,onChange:this.handleSaveEntireCourseChange})))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button u-w-9",onClick:t},Object(uc.b)("btn.cancel")),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button u-w-9 u-ml-1x3o8",onClick:this.handleSubmit},Object(uc.b)("btn.save"))))}}]),n}(v.a.Component);YD.propTypes={videoId:ne.a.string.isRequired,onSubmit:ne.a.func.isRequired,onClose:ne.a.func},YD.defaultProps={onClose:function(){return null}};var KD=r(573),XD=r.n(KD);var QD=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{entireCourse:!1,agent:x.g.AGENT_LIST[0].value,courseId:"",canSubmit:!0}),G()(V()(e),"closeButtonRef",v.a.createRef()),G()(V()(e),"selectAgent",{name:Object(uc.b)("btn.selectAgent"),value:""}),G()(V()(e),"selectPackage",{name:Object(uc.b)("btn.selectPackage"),value:""}),G()(V()(e),"handleSubmit",(function(){var t=e.props,n=t.videoId,r=t.onSubmit,i=t.onClose,a=e.state,o=a.entireCourse,s=a.agent,l=a.packageId;r&&r({videoId:n,entireCourse:o,agent:s,packageId:l}),i()})),G()(V()(e),"handleExportEntireCourseChange",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.target;e.setState({entireCourse:null==n?void 0:n.checked})})),G()(V()(e),"handleAgentChange",(function(t){var n=x.g.AGENT_LIST,r=e.state.packageId,i=n.find((function(e){return e.value===t}));e.setState({agent:i?i.value:"",canSubmit:!(!i||!r)})})),G()(V()(e),"handlePackageChange",(function(t){var n=e.props.packages,r=void 0===n?[]:n,i=e.state.agent,a=r.find((function(e){return e.value===t}));e.setState({packageId:a?a.value:"",canSubmit:!(!a||!i)})})),e}return c()(n,[{key:"componentDidMount",value:function(){var e;this.closeButtonRef.current&&this.closeButtonRef.current.focus();var t=this.props,n=t.videoId,r=t.packages,i=void 0===r?[]:r;this.setState({packageId:(null===(e=i[0])||void 0===e?void 0:e.value)||n})}},{key:"render",value:function(){var e=this,t=this.props,n=(t.videoTitle,t.onClose),r=(t.videoId,t.onSubmit,t.isCourseMaster),i=t.packages,a=void 0===i?[]:i,o=this.state,s=o.entireCourse,l=o.agent,c=o.canSubmit,u=o.packageId;x.g.AGENT_LIST;return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",dialogClassName:XD.a.confirmationDialog,onEscapeKeyDown:n,className:"publish-video-modal exportVideoModal"},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,Object(uc.b)("modal.exportVideoChapter"))),v.a.createElement(Fl.a.Body,{className:XD.a.modalBody},v.a.createElement("div",{className:"h-100 w-100 d-flex justify-content-center align-items-center"},v.a.createElement("div",{className:"w-100 px-3"},v.a.createElement("div",{style:{paddingLeft:"6rem",paddingRight:"6rem"}},v.a.createElement("div",{className:"d-flex ml-n1"},v.a.createElement(wu,{className:P()("agentList w-100"),disabled:0==a.length,options:a,value:u,onSelect:function(t){e.handlePackageChange(t)},placeholder:Object(uc.b)("btn.selectPackage"),labelName:Object(uc.b)("label.coursePackage")+":",size:"sm",classNameLabel:"u-mr-1o2 font-weight-normal",classNameDropdown:"flex-fill"})),v.a.createElement("div",{className:"d-flex ml-n1"},v.a.createElement(wu,{className:P()("agentList w-100"),options:x.g.AGENT_LIST,value:l,onSelect:function(t){e.handleAgentChange(t)},placeholder:Object(uc.b)("btn.selectAgent"),labelName:Object(uc.b)("label.agent")+":",size:"sm",classNameLabel:"u-mr-1o2 font-weight-normal",classNameDropdown:"flex-fill"})),r&&v.a.createElement("div",{className:"d-flex ml-n1"},v.a.createElement(_u,{id:"checkboxCommentsLikesEnable",labelName:Object(uc.b)("label.exportEntireCourse"),classNameInput:"custom-checkbox-md u-pl-2",checked:s,onChange:this.handleExportEntireCourseChange})))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button u-w-9",onClick:n},Object(uc.b)("btn.cancel")),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button u-w-9 u-ml-1x3o8",onClick:this.handleSubmit,disabled:!c},Object(uc.b)("btn.export"))))}}]),n}(v.a.Component);QD.propTypes={videoId:ne.a.string.isRequired,onSubmit:ne.a.func.isRequired,onClose:ne.a.func},QD.defaultProps={onClose:function(){return null}};var $D=r(197),JD=r.n($D);var ZD=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return n}(function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this.props.sharedPeopleData,n=e.show,r=e.data,i=void 0===r?[]:r,a=e.listTitle,o=e.iconName,s=e.isLoading,l=i.length>0,c=a===t("peopleLiked");return v.a.createElement("div",{className:P()(JD.a.sharedPeopleWrap,n&&JD.a.sharedPeopleActive)},v.a.createElement("div",{className:JD.a.header},v.a.createElement("div",null,a),v.a.createElement("div",{className:"flex-grow-1"}),v.a.createElement("i",{className:P()("fv text-white",o,!l&&"mr-2")}),l&&v.a.createElement("div",{className:"text-white ml-1 mr-2"},i.length),v.a.createElement("div",{className:JD.a.headerClose},v.a.createElement("i",{className:"fv fuvi-right-fullscreen-op text-danger"}))),s&&v.a.createElement("div",{className:P()("d-flex justify-content-center p-2 w-100 h-100",JD.a.spinnerWrapper)},v.a.createElement(xn.a,{animation:"border",size:"sm",variant:"primary"})),!s&&v.a.createElement("div",null,!l&&v.a.createElement("div",{className:"p-3 font-italic u-opacity-80"},t("nobodyLiked")),i.map((function(e){var t=e.userProfile,n=void 0===t?{}:t,r=e.groupInfo,i=(r=void 0===r?{}:r).name,a=r.avatar,o=r.uid,s=(null==n?void 0:n.fullName)||"",l=(null==n?void 0:n.userId)||Date.now(),u=null==n?void 0:n.avatar,d=null==n?void 0:n.likedAt,h=!!o,f=h?I.a.defaultGroupAvatar:I.a.noAvatar,p=s||i,m=(null==u?void 0:u.image)||(null==a?void 0:a.image)||f,b=Ml.a.duration(-1*Ml()().diff(Ml()(d)));return v.a.createElement(g.Fragment,{key:l||o},v.a.createElement("div",{className:JD.a.itemWrap},v.a.createElement("div",{className:JD.a.avatar,style:{backgroundImage:"url(".concat(m,")")}},h&&v.a.createElement("i",{className:P()("fv fuvi-group-avatar-ibg u-shadow",JD.a.groupIconWrap)},v.a.createElement("span",{className:"path1"}),v.a.createElement("span",{className:"path2"}))),v.a.createElement("div",{className:"text-truncate u-fw-500"},p,c&&v.a.createElement(v.a.Fragment,null,v.a.createElement("br",null),v.a.createElement("small",{className:"text-black-50"},v.a.createElement("em",null,b.humanize(!0)))))),v.a.createElement("div",{className:JD.a.seperator}))}))))}}]),r}(g.PureComponent)),eN=Object(q.b)((function(e){return{sharedPeopleData:e.cogvid.sharedPeopleData}}),null)(ZD),tN=(r(1511),r(1032)),nN=r.n(tN),rN=r(1033),iN=r.n(rN),aN=r(324),oN=r.n(aN);function sN(e,t){return function(e,t){var n=Object(g.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}(t,(function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))}))}var lN={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},cN=function(e){var t=e.children;return(g.createElement(g.Fragment,null,g.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:lN}),t,t&&g.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:lN})))};cN.propTypes={},cN.defaultProps={children:null};function uN(e){return e}function dN(e,t){void 0===t&&(t=uN);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function hN(e,t){return void 0===t&&(t=uN),dN(e,t)}var fN=hN({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),pN=hN(),mN=hN(),gN=function(e){void 0===e&&(e={});var t=dN(null);return t.options=ov({async:!0,ssr:!1},e),t}({async:!0}),vN=[],bN=g.forwardRef((function(e,t){var n,r=g.useState(),i=r[0],a=r[1],o=g.useRef(),s=g.useRef(!1),l=g.useRef(null),c=e.children,u=e.disabled,d=e.noFocusGuards,h=e.persistentFocus,f=e.crossFrame,p=e.autoFocus,m=(e.allowTextSelection,e.group),v=e.className,b=e.whiteList,y=e.shards,A=void 0===y?vN:y,_=e.as,w=void 0===_?"div":_,E=e.lockProps,S=void 0===E?{}:E,C=e.sideCar,T=e.returnFocus,k=e.onActivation,x=e.onDeactivation,O=g.useState({})[0],I=g.useCallback((function(){l.current=l.current||document&&document.activeElement,o.current&&k&&k(o.current),s.current=!0}),[k]),M=g.useCallback((function(){s.current=!1,x&&x(o.current)}),[x]),P=g.useCallback((function(e){var t=l.current;if(Boolean(T)&&t&&t.focus){var n="object"==typeof T?T:void 0;l.current=null,e?Promise.resolve().then((function(){return t.focus(n)})):t.focus(n)}}),[T]),D=g.useCallback((function(e){s.current&&fN.useMedium(e)}),[]),N=pN.useMedium,L=g.useCallback((function(e){o.current!==e&&(o.current=e,a(e))}),[]);var R=Object(Zb.a)(((n={})["data-focus-lock-disabled"]=u&&"disabled",n["data-focus-lock"]=m,n),S),B=!0!==d,j=B&&"tail"!==d,F=sN([t,L]);return g.createElement(g.Fragment,null,B&&[g.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:u?-1:0,style:lN}),g.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:u?-1:1,style:lN})],!u&&g.createElement(C,{id:O,sideCar:gN,observed:i,disabled:u,persistentFocus:h,crossFrame:f,autoFocus:p,whiteList:b,shards:A,onActivation:I,onDeactivation:M,returnFocus:P}),g.createElement(w,Object(Zb.a)({ref:F},R,{className:v,onBlur:N,onFocus:D}),c),j&&g.createElement("div",{"data-focus-guard":!0,tabIndex:u?-1:0,style:lN}))}));bN.propTypes={},bN.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var yN=bN;function AN(e,t){return(AN=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _N=function(e,t){return function(n){var r,i=[];function a(){r=e(i.map((function(e){return e.props}))),t(r)}var o,s,l,c=function(e){var t,o;function s(){return e.apply(this,arguments)||this}o=e,(t=s).prototype=Object.create(o.prototype),t.prototype.constructor=t,AN(t,o),s.peek=function(){return r};var l=s.prototype;return l.componentDidMount=function(){i.push(this),a()},l.componentDidUpdate=function(){a()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),a()},l.render=function(){return v.a.createElement(n,this.props)},s}(g.PureComponent);return o=c,s="displayName",l="SideEffect("+function(e){return e.displayName||e.name||"Component"}(n)+")",s in o?Object.defineProperty(o,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):o[s]=l,c}},wN=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},EN=function(e){return Array.isArray(e)?e:[e]},SN=function(e){return e.parentNode?SN(e.parentNode):e},CN=function(e){return EN(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute("data-focus-lock");return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var a=e[r].compareDocumentPosition(e[i]);(a&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(wN(SN(t).querySelectorAll('[data-focus-lock="'+n+'"]:not([data-focus-lock-disabled="disabled"])'))):[t]),e}),[])},TN=function(e){return Boolean(wN(e.querySelectorAll("iframe")).some((function(e){return e===document.activeElement})))},kN=function(e){var t=document&&document.activeElement;return!(!t||t.dataset&&t.dataset.focusGuard)&&CN(e).reduce((function(e,n){return e||n.contains(t)||TN(n)}),!1)},xN=function(e){return"INPUT"===e.tagName&&"radio"===e.type},ON=function(e,t){return xN(e)&&e.name?function(e,t){return t.filter(xN).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},IN=function(e){return e[0]&&e.length>1?ON(e[0],e):e[0]},MN=function(e,t){return e.length>1?e.indexOf(ON(e[t],e)):t},PN=function(e){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(e,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&PN(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode);var t},DN=function(e){return Boolean(e&&e.dataset&&e.dataset.focusGuard)},NN=function(e){return!DN(e)},LN=function(e){return Boolean(e)},RN=function(e,t,n,r){var i=e.length,a=e[0],o=e[i-1],s=DN(n);if(!(e.indexOf(n)>=0)){var l,c,u=t.indexOf(n),d=r?t.indexOf(r):u,h=r?e.indexOf(r):-1,f=u-d,p=t.indexOf(a),m=t.indexOf(o),g=(l=t,c=new Set,l.forEach((function(e){return c.add(ON(e,l))})),l.filter((function(e){return c.has(e)}))),v=g.indexOf(n)-(r?g.indexOf(r):u),b=MN(e,0),y=MN(e,i-1);return-1===u||-1===h?"NEW_FOCUS":!f&&h>=0?h:u<=p&&s&&Math.abs(f)>1?y:u>=m&&s&&Math.abs(f)>1?b:f&&Math.abs(v)>1?h:u<=p?y:u>m?b:f?Math.abs(f)>1?h:(i+h+f)%i:void 0}},BN=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},jN=function(e,t,n){return wN(e).map((function(e,t){return{node:e,index:t,tabIndex:n&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!t||e.tabIndex>=0})).sort(BN)},FN=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),UN=FN+", [data-focus-guard]",HN=function(e,t){return e.reduce((function(e,n){return e.concat(wN(n.querySelectorAll(t?UN:FN)),n.parentNode?wN(n.parentNode.querySelectorAll(FN)).filter((function(e){return e===n})):[])}),[])},zN=function(e){return wN(e).filter((function(e){return PN(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},VN=function(e,t){return jN(zN(HN(e,t)),!0,t)},WN=function(e){return jN(zN(HN(e)),!1)},GN=function(e){return zN(function(e){var t=e.querySelectorAll("[data-autofocus-inside]");return wN(t).map((function(e){return HN([e])})).reduce((function(e,t){return e.concat(t)}),[])}(e))},qN=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&qN(e.parentNode,t),t},YN=function(e,t){for(var n=qN(e),r=qN(t),i=0;i<n.length;i+=1){var a=n[i];if(r.indexOf(a)>=0)return a}return!1},KN=function(e,t,n){var r=EN(e),i=EN(t),a=r[0],o=!1;return i.filter(Boolean).forEach((function(e){o=YN(o||e,e)||o,n.filter(Boolean).forEach((function(e){var t=YN(a,e);t&&(o=!o||t.contains(o)?t:YN(t,o))}))})),o},XN=function(e,t){var n=document&&document.activeElement,r=CN(e).filter(NN),i=KN(n||e,e,r),a=WN(r),o=VN(r).filter((function(e){var t=e.node;return NN(t)}));if(o[0]||(o=a)[0]){var s,l,c,u,d=WN([i]).map((function(e){return e.node})),h=(s=d,l=o,c=new Map,l.forEach((function(e){return c.set(e.node,e)})),s.map((function(e){return c.get(e)})).filter(LN)),f=h.map((function(e){return e.node})),p=RN(f,d,n,t);if("NEW_FOCUS"===p){var m=a.map((function(e){return e.node})).filter((u=function(e){return e.reduce((function(e,t){return e.concat(GN(t))}),[])}(r),function(e){return e.autofocus||e.dataset&&!!e.dataset.autofocus||u.indexOf(e)>=0}));return{node:m&&m.length?IN(m):IN(f)}}return void 0===p?p:h[p]}},QN=0,$N=!1,JN=function(e,t){var n,r=XN(e,t);if(!$N&&r){if(QN>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),$N=!0,void setTimeout((function(){$N=!1}),1);QN++,(n=r.node).focus(),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus(),QN--}};function ZN(e){var t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)}var eL=function(){return document&&document.activeElement===document.body||document&&wN(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},tL=null,nL=null,rL=null,iL=!1,aL=function(){return!0};function oL(e,t,n,r){var i=null,a=e;do{var o=r[a];if(o.guard)o.node.dataset.focusAutoGuard&&(i=o);else{if(!o.lockItem)break;if(a!==e)return;i=null}}while((a+=n)!==t);i&&(i.node.tabIndex=0)}var sL=function(e){return e&&"current"in e?e.current:e},lL=function(){var e,t,n,r,i,a,o=!1;if(tL){var s=tL,l=s.observed,c=s.persistentFocus,u=s.autoFocus,d=s.shards,h=s.crossFrame,f=l||rL&&rL.portaledElement,p=document&&document.activeElement;if(f){var m=[f].concat(d.map(sL).filter(Boolean));if(p&&!function(e){return(tL.whiteList||aL)(e)}(p)||(c||(h?Boolean(iL):"meanwhile"===iL)||!eL()||!nL&&u)&&(!f||kN(m)||(a=p,rL&&rL.portaledElement===a)||(document&&!nL&&p&&!u?(p.blur&&p.blur(),document.body.focus()):(o=JN(m,nL),rL={})),iL=!1,nL=document&&document.activeElement),document){var g=document&&document.activeElement,v=(t=CN(e=m).filter(NN),n=KN(e,e,t),r=VN([n],!0),i=VN(t).filter((function(e){var t=e.node;return NN(t)})).map((function(e){return e.node})),r.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:i.indexOf(t)>=0,guard:DN(t)}}))),b=v.map((function(e){return e.node})).indexOf(g);b>-1&&(v.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),oL(b,v.length,1,v),oL(b,-1,-1,v))}}}return o},cL=function(e){lL()&&e&&(e.stopPropagation(),e.preventDefault())},uL=function(){return ZN(lL)},dL=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(rL={observerNode:n,portaledElement:t})},hL=function(){iL="just",setTimeout((function(){iL="meanwhile"}),0)};fN.assignSyncMedium(dL),pN.assignMedium(uL),mN.assignMedium((function(e){return e({moveFocusInside:JN,focusInside:kN})}));var fL=_N((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!tL&&(document.addEventListener("focusin",cL,!0),document.addEventListener("focusout",uL),window.addEventListener("blur",hL));var n=tL,r=n&&t&&t.id===n.id;tL=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(nL=null,r&&n.observed===t.observed||t.onActivation(),lL(),ZN(lL)):(document.removeEventListener("focusin",cL,!0),document.removeEventListener("focusout",uL),window.removeEventListener("blur",hL),nL=null)}))((function(){return null})),pL=g.forwardRef((function(e,t){return g.createElement(yN,Object(Zb.a)({sideCar:fL,ref:t},e))})),mL=yN.propTypes||{};mL.sideCar,Object(ny.a)(mL,["sideCar"]);pL.propTypes={};var gL,vL=pL,bL=r(32);function yL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function AL(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_L(Object(n),!0).forEach((function(t){AL(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function EL(e){return(EL=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function SL(e,t){return(SL=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function CL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TL(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?CL(e):t}function kL(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=EL(e);if(t){var i=EL(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return TL(this,n)}}function xL(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function OL(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||IL(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IL(e,t){if(e){if("string"==typeof e)return ML(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ML(e,t):void 0}}function ML(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PL(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=IL(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}var DL,NL,LL,RL=Object(bL.a)(gL||(gL=xL(["\n  .focus-outline-hidden :focus {\n      outline: none;\n  }\n"]))),BL=bL.c.button(DL||(DL=xL(["\n  display: block;\n  padding: 0;\n  border: 0;\n  background: none;\n  font-size: 0;\n  cursor: ",";\n"])),(function(e){return e.disabled?"not-allowed":"pointer"})),jL=bL.c.span(NL||(NL=xL(["\n  font-size: 12px;\n  line-height: 1;\n"])));function FL(e){var t=e.className,n=e.onClick,r=e.inverted,i=e.label,a=e.disabled;return(v.a.createElement(BL,{className:t,onClick:n,"data-tour-elem":"".concat(r?"right":"left","-arrow"),disabled:a},i?v.a.createElement(jL,null,i):v.a.createElement("svg",{viewBox:"0 0 18.4 14.4"},v.a.createElement("path",{d:r?"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2":"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeMiterlimit:"10"}))))}FL.propTypes={className:ne.a.string.isRequired,onClick:ne.a.func.isRequired,inverted:ne.a.bool,label:ne.a.node,disabled:ne.a.bool};var UL,HL=Object(bL.c)(FL)(LL||(LL=xL(["\n  color: ",";\n\n  ",";\n  ",";\n\n  &:hover {\n    color: ",";\n  }\n"])),(function(e){return e.disabled?"#caccce":"#646464"}),(function(e){return e.inverted?"margin-left: 24px;":"margin-right: 24px;"}),(function(e){return!e.label&&"\n    width: 16px;\n    height: 12px;\n    flex: 0 0 16px;\n  "}),(function(e){return e.disabled?"#caccce":"#000"}));function zL(e){var t=e.className,n=e.onClick;return(v.a.createElement(BL,{className:t,onClick:n},v.a.createElement("svg",{viewBox:"0 0 9.1 9.1"},v.a.createElement("path",{fill:"currentColor",d:"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z"}))))}zL.propTypes={className:ne.a.string.isRequired,onClick:ne.a.func.isRequired};var VL=Object(bL.c)(zL)(UL||(UL=xL(["\n  position: absolute;\n  top: 22px;\n  right: 22px;\n  width: 9px;\n  height: 9px;\n  color: #5e5e5e;\n  &:hover {\n    color: #000;\n  }\n"])));function WL(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}}function GL(e,t){if(!t.highlightedSelectors)return WL(e);var n,r=WL(e),i=PL(t.highlightedSelectors);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=document.querySelector(a);if(o&&"none"!==o.style.display&&"hidden"!==o.style.visibility){var s=WL(o);s.top<r.top&&(r.top=s.top),s.right>r.right&&(r.right=s.right),s.bottom>r.bottom&&(r.bottom=s.bottom),s.left<r.left&&(r.left=s.left)}}}catch(e){i.e(e)}finally{i.f()}return r.width=r.right-r.left,r.height=r.bottom-r.top,r}function qL(e){return e===document.querySelector("body")||e===document.querySelector("html")}var YL,KL=function(e,t){return e>t},XL=function(e,t){return e>t},QL=function(e){return e<0?0:e};var $L,JL,ZL,eR,tR,nR=bL.c.div(YL||(YL=xL(["\n  --reactour-accent: ",";\n  ","\n  position: fixed;\n  transition: transform 0.3s;\n  top: 0;\n  left: 0;\n  z-index: 1000000;\n\n  transform: ",";\n"])),(function(e){return e.accentColor}),(function(e){return e.defaultStyles?"\n  max-width: 331px;\n  min-width: 150px;\n  padding-right: 40px;\n  border-radius: ".concat(e.rounded,"px;\n  background-color: #fff;\n  padding: 24px 30px;\n  box-shadow: 0 0.5em 3em rgba(0, 0, 0, 0.3);\n  color: inherit;\n  "):""}),(function(e){var t=e.targetTop,n=e.targetRight,r=e.targetBottom,i=e.targetLeft,a=e.windowWidth,o=e.windowHeight,s=e.helperWidth,l=e.helperHeight,c=e.helperPosition,u=e.padding,d={left:i,right:a-n,top:t,bottom:o-r},h=function(e){return d[e]>(function(e){return/(left|right)/.test(e)}(e)?s+2*u:l+2*u)},f=function(e){for(var t,n=(t=d,Object.keys(t).map((function(e){return{position:e,value:t[e]}})).sort((function(e,t){return t.value-e.value})).map((function(e){return e.position}))),r=0;r<n.length;r++)if(h(n[r]))return e[n[r]];return e.center},p=function(e){if(Array.isArray(e)){var c=KL(e[0],a),d=XL(e[1],o),p=function(e,t){console.warn("".concat(e,":").concat(t," is outside window, falling back to center"))};return c&&p("x",e[0]),d&&p("y",e[1]),[c?a/2-s/2:e[0],d?o/2-l/2:e[1]]}var m=KL(i+s,a)?KL(n+u,a)?n-s:n-s+u:i-u,g=m>u?m:u,v=XL(t+l,o)?XL(r+u,o)?r-l:r-l+u:t-u,b=v>u?v:u,y={top:[g,t-l-2*u],right:[n+2*u,b],bottom:[g,r+2*u],left:[i-s-2*u,b],center:[a/2-s/2,o/2-l/2]};return"center"===e||h(e)?y[e]:f(y)}(c);return"translate(".concat(Math.round(p[0]),"px, ").concat(Math.round(p[1]),"px)")})),rR=bL.c.span($L||($L=xL(["\n  position: absolute;\n  font-family: monospace;\n  background: var(--reactour-accent);\n  background: ",";\n  height: 1.875em;\n  line-height: 2;\n  padding-left: 0.8125em;\n  padding-right: 0.8125em;\n  font-size: 1em;\n  border-radius: 1.625em;\n  color: white;\n  text-align: center;\n  box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.3);\n  top: -0.8125em;\n  left: -0.8125em;\n"])),(function(e){return e.accentColor})),iR=bL.c.div(JL||(JL=xL(["\n  display: flex;\n  margin-top: 24px;\n  align-items: center;\n  justify-content: center;\n"]))),aR=bL.c.nav(ZL||(ZL=xL(["\n  counter-reset: dot;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-wrap: wrap;\n"]))),oR=bL.c.button(eR||(eR=xL(["\n  counter-increment: dot;\n  width: 8px;\n  height: 8px;\n  border: ",";\n\n  border-radius: 100%;\n  padding: 0;\n  display: block;\n  margin: 4px;\n  transition: opacity 0.3s, transform 0.3s;\n  cursor: ",";\n  transform: scale(",");\n\n  color: ",";\n  background: ",";\n\n  color: ",";\n  background: ",";\n\n  &:before {\n    content: counter(dot);\n    position: absolute;\n    bottom: calc(100% + 0.25em);\n    left: 50%;\n    opacity: 0;\n    transform: translate(-50%, 1em);\n    transition: 0.3s;\n    display: ",";\n  }\n\n  &:hover {\n    background-color: currentColor;\n\n    &:before {\n      opacity: 0.5;\n      transform: translate(-50%, -2px);\n    }\n  }\n"])),(function(e){return e.current===e.index?"0":"1px solid #caccce"}),(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.current===e.index?1.25:1}),(function(e){return e.current===e.index?"var(--reactour-accent)":"#caccce"}),(function(e){return e.current===e.index?"var(--reactour-accent)":"none"}),(function(e){return e.current===e.index?e.accentColor:"#caccce"}),(function(e){return e.current===e.index?e.accentColor:"none"}),(function(e){return e.showNumber?"block":"none"})),sR=bL.c.div(tR||(tR=xL(["\n  opacity: ",";\n  color: ",";\n  width: 100%;\n  left: 0;\n  top: 0;\n  height: 100%;\n  position: fixed;\n  z-index: 99999;\n  pointer-events: none;\n"])),(function(e){return!e.maskClassName&&.7}),(function(e){return!e.maskClassName&&"#000"}));function lR(e){var t=e.windowWidth,n=e.windowHeight,r=e.targetWidth,i=e.targetHeight,a=e.targetTop,o=e.targetLeft,s=e.padding,l=e.rounded,c=e.roundedStep,u=e.disableInteraction,d=e.disableInteractionClassName,h=e.className,f=e.onClick,p=e.highlightedBorder,m=QL(r+2*s),g=QL(i+2*s),b=QL(a-s),y=QL(o-s),A=c?Math.min(m/2,g/2):l;return v.a.createElement(sR,{onClick:f,maskClassName:h},v.a.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg",className:h},v.a.createElement("defs",null,v.a.createElement("mask",{id:"mask-main"},v.a.createElement("rect",{x:0,y:0,width:t,height:n,fill:"white"}),v.a.createElement("rect",{x:y,y:b,width:m,height:g,fill:"black"}),v.a.createElement("rect",{x:y-1,y:b-1,width:A,height:A,fill:"white"}),v.a.createElement("circle",{cx:y+A,cy:b+A,r:A,fill:"black"}),v.a.createElement("rect",{x:y+m-A+1,y:b-1,width:A,height:A,fill:"white"}),v.a.createElement("circle",{cx:y+m-A,cy:b+A,r:A,fill:"black"}),v.a.createElement("rect",{x:y-1,y:b+g-A+1,width:A,height:A,fill:"white"}),v.a.createElement("circle",{cx:y+A,cy:b+g-A,r:A,fill:"black"}),v.a.createElement("rect",{x:y+m-A+1,y:b+g-A+1,width:A,height:A,fill:"white"}),v.a.createElement("circle",{cx:y+m-A,cy:b+g-A,r:A,fill:"black "})),v.a.createElement("clipPath",{id:"clip-path"},v.a.createElement("rect",{x:0,y:0,width:t,height:b}),v.a.createElement("rect",{x:0,y:b,width:y,height:g}),v.a.createElement("rect",{x:o+r+s,y:b,width:QL(t-r-y),height:g}),v.a.createElement("rect",{x:0,y:a+i+s,width:t,height:QL(n-i-b)}))),v.a.createElement("rect",{x:0,y:0,width:t,height:n,fill:"currentColor",mask:"url(#mask-main)"}),v.a.createElement("rect",{x:0,y:0,width:t,height:n,fill:"currentColor",clipPath:"url(#clip-path)",pointerEvents:"auto"}),v.a.createElement("rect",{x:y,y:b,width:m,height:g,pointerEvents:"auto",fill:"transparent",display:u?"block":"none",className:d}),p&&v.a.createElement("rect",{x:QL(y+p.width/2),y:QL(b+p.width/2),width:QL(m-p.width),height:QL(g-p.width),pointerEvents:"auto",fill:"none",strokeWidth:p.width,stroke:p.color,rx:A-2})))}lR.propTypes={windowWidth:ne.a.number.isRequired,windowHeight:ne.a.number.isRequired,targetWidth:ne.a.number.isRequired,targetHeight:ne.a.number.isRequired,targetTop:ne.a.number.isRequired,targetLeft:ne.a.number.isRequired,padding:ne.a.number.isRequired,rounded:ne.a.number.isRequired,roundedStep:ne.a.bool,disableInteraction:ne.a.bool.isRequired,disableInteractionClassName:ne.a.string.isRequired,highlightedBorder:ne.a.shape({color:ne.a.string.isRequired,width:ne.a.number.isRequired})};var cR=function(e){var t=e.step,n=e.refresh,r=OL(Object(g.useState)(0),2),i=r[0],a=r[1];return Object(g.useEffect)((function(){if(t.resizeObservables){var e=function(e){var n,r=PL(e);try{var o=function(){var e=n.value;if(!e.attributes)return"continue";t.resizeObservables.find((function(t){return e.matches(t)}))&&a(i+1)};for(r.s();!(n=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}},n=new MutationObserver((function(t){var n,r=PL(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;0!==i.addedNodes.length&&e(i.addedNodes),0!==i.removedNodes.length&&e(i.removedNodes)}}catch(e){r.e(e)}finally{r.f()}})),r=document.documentElement||document.body;return n.observe(r,{childList:!0,subtree:!0}),function(){n.disconnect()}}}),[t,i]),Object(g.useEffect)((function(){if(t.resizeObservables){var e,r=new ResizeObserver((function(e){n()})),i=PL(t.resizeObservables);try{for(i.s();!(e=i.n()).done;){var a=e.value,o=document.querySelector(a);o&&r.observe(o)}}catch(e){i.e(e)}finally{i.f()}return function(){r.disconnect()}}}),[t,i]),null},uR=function(e){var t=e.step,n=e.refresh;return Object(g.useEffect)((function(){if(t.mutationObservables){var e=function(e){var r,i=PL(e);try{var a=function(){var e=r.value;if(!e.attributes)return"continue";t.mutationObservables.find((function(t){return e.matches(t)}))&&n()};for(i.s();!(r=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}},r=new MutationObserver((function(t){var n,r=PL(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;0!==i.addedNodes.length&&e(i.addedNodes),0!==i.removedNodes.length&&e(i.removedNodes)}}catch(e){r.e(e)}finally{r.f()}})),i=document.documentElement||document.body;return r.observe(i,{childList:!0,subtree:!0}),function(){r.disconnect()}}}),[t]),null};function dR(e){var t=e.children,n=Object(g.useRef)(null);return null===n.current&&(n.current=document.createElement("div"),n.current.setAttribute("id","___reactour")),Object(g.useEffect)((function(){return document.body.appendChild(n.current),function(){document.body.removeChild(n.current)}}),[n]),Object(go.createPortal)(t,n.current)}var hR={disableFocusLock:ne.a.bool,badgeContent:ne.a.func,highlightedMaskClassName:ne.a.string,children:ne.a.oneOfType([ne.a.node,ne.a.element]),className:ne.a.string,closeWithMask:ne.a.bool,inViewThreshold:ne.a.number,isOpen:ne.a.bool.isRequired,lastStepNextButton:ne.a.node,maskClassName:ne.a.string,maskSpace:ne.a.number,nextButton:ne.a.node,onAfterOpen:ne.a.func,onBeforeClose:ne.a.func,onRequestClose:ne.a.func,prevButton:ne.a.node,scrollDuration:ne.a.number,scrollOffset:ne.a.number,showButtons:ne.a.bool,showCloseButton:ne.a.bool,showNavigation:ne.a.bool,showNavigationNumber:ne.a.bool,showNumber:ne.a.bool,startAt:ne.a.number,goToStep:ne.a.number,getCurrentStep:ne.a.func,nextStep:ne.a.func,prevStep:ne.a.func,steps:ne.a.arrayOf(ne.a.shape({selector:ne.a.string,content:ne.a.oneOfType([ne.a.node,ne.a.element,ne.a.func]).isRequired,position:ne.a.oneOfType([ne.a.arrayOf(ne.a.number),ne.a.oneOf(["top","right","bottom","left","center"])]),action:ne.a.func,style:ne.a.object,stepInteraction:ne.a.bool,navDotAriaLabel:ne.a.string,roundedStep:ne.a.bool})),update:ne.a.string,updateDelay:ne.a.number,disableInteraction:ne.a.bool,disableDotsNavigation:ne.a.bool,disableKeyboardNavigation:ne.a.oneOfType([ne.a.arrayOf(ne.a.oneOf(["esc","right","left"])),ne.a.bool]),rounded:ne.a.number,accentColor:ne.a.string,highlightedBorder:ne.a.shape({color:ne.a.string.isRequired,width:ne.a.number.isRequired})},fR={base:"reactour__mask",isOpen:"reactour__mask--is-open",disableInteraction:"reactour__mask--disable-interaction"},pR={base:"reactour__helper",isOpen:"reactour__helper--is-open"},mR={base:"reactour__dot",active:"reactour__dot--is-active"},gR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SL(e,t)}(a,e);var t,n,r,i=kL(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),AL(CL(e=i.call(this)),"unlockFocus",(function(t){e.setState({focusUnlocked:!0},t())})),AL(CL(e),"showStep",(function(){if(e.helper&&e.helper.current){var t=e.props.steps,n=e.state,r=n.current;n.focusUnlocked&&e.setState({focusUnlocked:!1});var i=t[r],a=i.selector?document.querySelector(i.selector):null,o=function(t){i.action&&"function"==typeof i.action&&e.unlockFocus((function(){return i.action(t)}))};if(i.observe){var s=document.querySelector(i.observe),l={attributes:!0,childList:!0,characterData:!0};e.setState((function(t){return t.observer&&setTimeout((function(){t.observer.disconnect()}),0),{observer:new MutationObserver((function(t){t.forEach((function(t){if("childList"===t.type&&t.addedNodes.length>0){var n=function(){return o(t.addedNodes[0])};setTimeout((function(){return e.calculateNode(t.addedNodes[0],i,n)}),100)}else if("childList"===t.type&&t.removedNodes.length>0){e.calculateNode(a,i,(function(){return o(a)}))}}))}))}}),(function(){return e.state.observer.observe(s,l)}))}else e.state.observer&&(e.state.observer.disconnect(),e.setState({observer:null}));if(a){e.calculateNode(a,i,(function(){return o(a)}))}else e.setState(vR(null,i,e.helper.current),o),i.selector&&console.warn("Doesn't find a DOM node '".concat(i.selector,"'. Please check the 'steps' Tour prop Array at position ").concat(r,"."))}})),AL(CL(e),"calculateNode",(function(t,n,r){var i=e.props,a=i.scrollDuration,o=i.inViewThreshold,s=i.scrollOffset,l=GL(t,n),c=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u=Math.max(document.documentElement.clientHeight,window.innerHeight||0);if(function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left,a=e.w,o=e.h,s=e.threshold,l=void 0===s?0:s;return t>=0+l&&i>=0+l&&r<=o-l&&n<=a-l}(wL(wL({},l),{},{w:c,h:u,threshold:o})))e.setState(vR(t,n,e.helper.current),r);else{var d=iN()(t),h=s||(l.height>u?-25:-u/2+l.height/2);nN.a.to(t,{context:qL(d)?window:d,duration:a,offset:h,callback:function(t){e.setState(vR(t,n,e.helper.current),r)}})}})),AL(CL(e),"recalculateNode",(function(t){var n=document.querySelector(t.selector);e.calculateNode(n,t,(function(){return r=n,void(t.action&&"function"==typeof t.action&&e.unlockFocus((function(){return t.action(r)})));var r}))})),AL(CL(e),"maskClickHandler",(function(t){var n=e.props,r=n.closeWithMask,i=n.onRequestClose;r&&!t.target.classList.contains(fR.disableInteraction)&&i(t)})),AL(CL(e),"nextStep",(function(){var t=e.props,n=t.steps,r=t.getCurrentStep;e.setState((function(e){var t=e.current<n.length-1?e.current+1:e.current;return"function"==typeof r&&r(t),{current:t}}),e.showStep)})),AL(CL(e),"prevStep",(function(){var t=e.props.getCurrentStep;e.setState((function(e){var n=e.current>0?e.current-1:e.current;return"function"==typeof t&&t(n),{current:n}}),e.showStep)})),AL(CL(e),"gotoStep",(function(t){var n=e.props,r=n.steps,i=n.getCurrentStep;e.setState((function(e){var n=r[t]?t:e.current;return"function"==typeof i&&i(n),{current:n}}),e.showStep)})),AL(CL(e),"keyDownHandler",(function(t){var n,r,i,a=e.props,o=a.onRequestClose,s=a.nextStep,l=a.prevStep,c=a.disableKeyboardNavigation;(a.showCloseButton,t.stopPropagation(),!0!==c)&&(c&&(n=c.includes("esc"),r=c.includes("right"),i=c.includes("left")),27!==t.keyCode||n||(t.preventDefault(),o()),39!==t.keyCode||r||(t.preventDefault(),"function"==typeof s?s():e.nextStep()),37!==t.keyCode||i||(t.preventDefault(),"function"==typeof l?l():e.prevStep()))})),e.state={isOpen:!1,current:0,top:0,right:0,bottom:0,left:0,width:0,height:0,w:0,h:0,inDOM:!1,observer:null,focusUnlocked:!1},e.helper=Object(g.createRef)(),e.helperElement=null,e.debouncedShowStep=oN()(e.showStep,70),e}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.isOpen,n=e.startAt;t&&this.open(n)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props,n=t.isOpen,r=t.update,i=t.updateDelay;!n&&e.isOpen?this.open(e.startAt):n&&!e.isOpen&&this.close(),n&&r!==e.update&&(e.steps[this.state.current]?setTimeout(this.showStep,i):this.props.onRequestClose()),n&&e.isOpen&&this.state.current!==e.goToStep&&this.gotoStep(e.goToStep)}},{key:"componentWillUnmount",value:function(){this.props.isOpen&&this.close(),this.state.observer&&this.state.observer.disconnect()}},{key:"open",value:function(e){var t=this,n=this.props.onAfterOpen;this.setState((function(t){return{isOpen:!0,current:void 0!==e?e:t.current}}),(function(){setTimeout(t.showStep,1),t.helperElement=t.helper.current,t.props.disableFocusLock||t.helper.current.focus(),n&&n(t.helperElement)})),window.addEventListener("resize",this.debouncedShowStep,!1),window.addEventListener("keydown",this.keyDownHandler,!1)}},{key:"close",value:function(){this.setState((function(e){return e.observer&&e.observer.disconnect(),{isOpen:!1,observer:null}}),this.onBeforeClose),window.removeEventListener("resize",this.debouncedShowStep),window.removeEventListener("keydown",this.keyDownHandler)}},{key:"onBeforeClose",value:function(){var e=this.props.onBeforeClose;e&&e(this.helperElement)}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.steps,i=t.maskClassName,a=t.showButtons,o=t.showCloseButton,s=t.showNavigation,l=t.showNavigationNumber,c=t.showNumber,u=t.onRequestClose,d=t.maskSpace,h=t.lastStepNextButton,f=t.nextButton,p=t.prevButton,m=t.badgeContent,g=t.highlightedMaskClassName,b=t.disableInteraction,y=t.disableDotsNavigation,A=t.nextStep,_=t.prevStep,w=t.rounded,E=t.accentColor,S=t.CustomHelper,C=t.disableFocusLock,T=t.highlightedBorder,k=this.state,x=k.isOpen,O=k.current,I=k.inDOM,M=k.top,D=k.right,N=k.bottom,L=k.left,R=k.width,B=k.height,j=k.w,F=k.h,U=k.helperWidth,H=k.helperHeight,z=k.helperPosition;return k.focusUnlocked,x?v.a.createElement(dR,null,v.a.createElement(RL,null),v.a.createElement(cR,{step:r[O],refresh:function(){return e.recalculateNode(r[O])}}),v.a.createElement(uR,{step:r[O],refresh:function(){return e.recalculateNode(r[O])}}),v.a.createElement(lR,{onClick:this.maskClickHandler,forwardRef:function(t){return e.mask=t},windowWidth:j,windowHeight:F,targetWidth:R,targetHeight:B,targetTop:M,targetLeft:L,padding:d,rounded:w,roundedStep:r[O].roundedStep,className:i,disableInteraction:!1===r[O].stepInteraction||b?!r[O].stepInteraction:b,disableInteractionClassName:"".concat(fR.disableInteraction," ").concat(g),highlightedBorder:T}),v.a.createElement(vL,{disabled:C,autoFocus:!1},v.a.createElement(nR,{ref:this.helper,targetHeight:B,targetWidth:R,targetTop:M,targetRight:D,targetBottom:N,targetLeft:L,windowWidth:j,windowHeight:F,helperWidth:U,helperHeight:H,helperPosition:z,padding:d,tabIndex:-1,current:O,style:r[O].style?r[O].style:{},rounded:w,className:P()(pR.base,n,AL({},pR.isOpen,x)),accentColor:E,defaultStyles:!S,role:"dialog"},S?v.a.createElement(S,{current:O,totalSteps:r.length,gotoStep:this.gotoStep,close:u,content:r[O]&&("function"==typeof r[O].content?r[O].content({close:u,goTo:this.gotoStep,inDOM:I,step:O+1}):r[O].content)},this.props.children):v.a.createElement(v.a.Fragment,null,this.props.children,r[O]&&("function"==typeof r[O].content?r[O].content({close:u,goTo:this.gotoStep,inDOM:I,step:O+1}):r[O].content),c&&v.a.createElement(rR,{"data-tour-elem":"badge",accentColor:E},"function"==typeof m?m(O+1,r.length):O+1),(a||s)&&v.a.createElement(iR,{"data-tour-elem":"controls"},a&&v.a.createElement(HL,{onClick:"function"==typeof _?_:this.prevStep,disabled:0===O,label:p||null}),s&&v.a.createElement(aR,{"data-tour-elem":"navigation"},r.map((function(t,n){return v.a.createElement(oR,{key:"".concat(t.selector?t.selector:"undef","_").concat(n),onClick:function(){return e.gotoStep(n)},current:O,index:n,accentColor:E,disabled:O===n||y,showNumber:l,"data-tour-elem":"dot",className:P()(mR.base,AL({},mR.active,O===n)),"aria-label":t.navDotAriaLabel})}))),a&&v.a.createElement(HL,{onClick:O===r.length-1?h?u:function(){}:"function"==typeof A?A:this.nextStep,disabled:!h&&O===r.length-1,inverted:!0,label:h&&O===r.length-1?h:f||null})),o?v.a.createElement(VL,{onClick:u,className:"reactour__close"}):null)))):null}}])&&yL(t.prototype,n),r&&yL(t,r),a}(g.Component),vR=function(e,t,n){if(n){var r=Math.max(document.documentElement.clientWidth,window.innerWidth||0),i=Math.max(document.documentElement.clientHeight,window.innerHeight||0),a=WL(n),o=a.width,s=a.height,l={top:i+10,right:r/2+9,bottom:i/2+9,left:r/2-o/2,width:0,height:0,w:r,h:i,helperPosition:"center"};return e&&(l=GL(e,t)),function(){return wL(wL({w:r,h:i,helperWidth:o,helperHeight:s,helperPosition:t.position},l),{},{inDOM:!!e})}}};gR.propTypes=hR,gR.defaultProps={disableFocusLock:!1,showNavigation:!0,showNavigationNumber:!0,showButtons:!0,showCloseButton:!0,showNumber:!0,scrollDuration:1,maskSpace:10,updateDelay:1,disableInteraction:!1,rounded:0,accentColor:"#007aff",closeWithMask:!0};var bR=gR;var yR=x.g.TOUR_CONFIG,AR=x.g.VIDEO_CATEGORY,_R=x.g.STEP_NUMBER_COLOR;var wR=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isTourOpen:!1}),e}return n}(function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"closeTour",(function(){(0,e.props.markUserVisited)({state:JSON.stringify({ignoreTourGuide:!0}),context:AR.EXPLORING},(function(){e.setState({isTourOpen:!1})}),(function(){e.setState({isTourOpen:!1})}))})),G()(V()(e),"openTour",(function(){e.setState({isTourOpen:!0})})),e}return c()(n,[{key:"render",value:function(){var e=this.state.isTourOpen;return v.a.createElement("div",null,v.a.createElement(bR,{onRequestClose:this.closeTour,steps:yR,isOpen:e,className:"helper",accentColor:_R,disableFocusLock:!0,closeWithMask:!1,lastStepNextButton:v.a.createElement(et.a,null,"Done")}))}}]),n}(v.a.PureComponent)),ER=(Object(q.b)(null,(function(e){return{fetchTrackingState:function(t,n,r){return e(Q.f.fetchTrackingState(t,n,r))},markUserVisited:function(t,n,r){return e(Q.f.stateTracking(t,n,r))}}}))(wR),r(340)),SR=r.n(ER);var CR=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{showToggle:!1,isExpanded:!1}),G()(V()(e),"contentRef",v.a.createRef()),G()(V()(e),"componentDidMount",(function(){e.buildContent()})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.content;e.props.content!==n&&e.setState({showToggle:!1},e.buildContent)})),G()(V()(e),"buildContent",(function(){var t=e.props,n=t.maxRows,r=t.expanded;setTimeout((function(){e.countNumOfRows()>n?e.setState({showToggle:!0,isExpanded:r}):e.setState({showToggle:!1})}),0==e.contentRef.current.offsetHeight?100:0)})),G()(V()(e),"countNumOfRows",(function(){var t=e.props,n=(t.content,t.lineHeight),r=Number.parseInt(x.c.convertRemToPx(n));return Number.parseInt(e.contentRef.current.offsetHeight/r,10)})),G()(V()(e),"handleToggleContent",(function(t){t.stopPropagation(),t.preventDefault();var n=e.state,r=n.showToggle,i=n.isExpanded;if(r){var a=e.props.onExpanded;e.setState({isExpanded:!i},(function(){!i&&a&&a()}))}})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.content,n=e.lineHeight,r=e.maxRows,i=e.className,a=e.classNameToggle,o=e.labelCollapse,s=e.labelExpand,l=this.state,c=l.showToggle,u=l.isExpanded;return v.a.createElement("div",{className:P()(SR.a.toggleContent,i)},v.a.createElement("div",{ref:this.contentRef,className:P()(SR.a.content,c&&!u&&"u-truncate-".concat(r)),style:{lineHeight:n}},t),c&&v.a.createElement("div",{className:P()(SR.a.toggleBtn,a)},v.a.createElement("span",{onClick:this.handleToggleContent},u?o:s)))}}]),n}(v.a.PureComponent);CR.propTypes={content:ne.a.string.isRequired,expanded:ne.a.bool,maxRows:ne.a.number,lineHeight:ne.a.string,className:ne.a.string,labelCollapse:ne.a.string,labelExpand:ne.a.string,onExpanded:ne.a.func},CR.defaultProps={content:"",expanded:!1,maxRows:3,lineHeight:ER.contentLineHeight,labelCollapse:Object(uc.b)("btn.seeLess"),labelExpand:Object(uc.b)("btn.seeMore"),onExpanded:function(){}};var TR=CR,kR=function(e){var t=e.images;return e.disabled?null:v.a.createElement(v.a.Fragment,null,t.map((function(e){return v.a.createElement("img",{key:e,src:e,alt:"contextual img",className:"d-none"})})))};kR.propTypes={images:ne.a.array,disabled:ne.a.bool},kR.defaultProps={images:[],disabled:!1};var xR=r(152),OR=r(1034),IR=r.n(OR);var MR=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.topMessage,i=n.redirectTo,a=this.state.showActivationForm,o=window.storeUrl||i;return v.a.createElement(Fl.a,{show:!0,centered:!0,className:"default-modal-class"},v.a.createElement(Fl.a.Header,{className:"d-flex align-items-center py-2"},v.a.createElement("div",{className:"ml-3 u-fs-2 u-text-dark-blue-bold u-fw-600"},a?t("modal.activationTitle"):t("btn.login")),v.a.createElement("div",{className:"close-modal-btn",onClick:function(){return e.handleFormCancel()},role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),r&&v.a.createElement("div",{className:"u-mt-1x1o2 u-ml-2 u-fs-1x1o8 u-fw-500"},r),v.a.createElement(xR.d,{isModal:!0,containerClassName:IR.a.container,willRedirect:!!o,loginSuccessCallback:this.handleFormCancel,hasBackToHome:!1,redirectTo:o,onActivateClick:this.handleActivationClick}))}}]),r}(v.a.Component);var PR,DR=x.g.SEARCH_PARAM,NR=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{showActivationForm:!1}),G()(V()(e),"handleFormCancel",(function(t){(0,e.props.displayLoginModal)({show:!1,topMessage:""}),t&&window.loginCallback&&setTimeout((function(){window.loginCallback(),window.loginCallback=null}),500)})),G()(V()(e),"handleActivationClick",(function(){e.setState({showActivationForm:!0})})),e}return c()(n,[{key:"componentDidMount",value:function(){x.c.storeUrl();var e=window.location.pathname+"?"+DR.KEY.ACTION+"="+DR.VALUE.ACTION.OPEN_LOGIN_FORM;window.history.replaceState({},document.title,e)}},{key:"componentWillUnmount",value:function(){x.c.restoreUrl(),(0,this.props.displayLoginModal)({show:!1,topMessage:""})}}]),n}(MR),LR=Object(q.b)((function(e){return{topMessage:e.auth.showLoginModal.topMessage}}),(function(e){return{displayLoginModal:function(t){return e(Q.a.displayLoginModal(t))}}}))(NR),RR=r(1035),BR=r.n(RR),jR=r(83),FR=r.n(jR);function UR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UR(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zR=x.g.TIME_PERIOD,VR=[{value:zR.LAST_7_DAYS,name:Object(uc.b)("timePeriod.last7days")},{value:zR.LAST_30_DAYS,name:Object(uc.b)("timePeriod.last30days")},{value:zR.PAST_3_MONTHS,name:Object(uc.b)("timePeriod.last3months")},{value:zR.DAYS,name:Object(uc.b)("timePeriod.days")},{value:zR.MONTHS,name:Object(uc.b)("timePeriod.months")},{value:zR.YEARS,name:Object(uc.b)("timePeriod.years")}],WR=(PR={},G()(PR,zR.DAYS,{dateFormat:"MM/dd/yyyy"}),G()(PR,zR.MONTHS,{dateFormat:"MM/yyyy",showMonthYearPicker:!0}),G()(PR,zR.YEARS,{dateFormat:"yyyy",showYearPicker:!0}),PR),GR=v.a.createElement("span",null," ▲"),qR=v.a.createElement("span",null," ▼"),YR=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{videoSort:{active:!1,dir:"ASC"},buyerSort:{active:!1,dir:"ASC"},dateSort:{active:!1,dir:"ASC"},priceSort:{active:!1,dir:"ASC"}}),G()(V()(e),"triggerVideoSort",(function(t){t.preventDefault(),e.setState((function(e){return{videoSort:{active:!0,dir:"ASC"===e.videoSort.dir?"DESC":"ASC"},buyerSort:HR(HR({},e.buyerSort),{},{active:!1}),dateSort:HR(HR({},e.dateSort),{},{active:!1}),priceSort:HR(HR({},e.priceSort),{},{active:!1})}}),(function(){return e.props.onColumnSort("productTitle",e.state.videoSort.dir)}))})),G()(V()(e),"triggerBuyerSort",(function(t){t.preventDefault(),e.setState((function(e){return{buyerSort:{active:!0,dir:"ASC"===e.buyerSort.dir?"DESC":"ASC"},videoSort:HR(HR({},e.videoSort),{},{active:!1}),dateSort:HR(HR({},e.dateSort),{},{active:!1}),priceSort:HR(HR({},e.priceSort),{},{active:!1})}}),(function(){return e.props.onColumnSort("buyerFullname",e.state.buyerSort.dir)}))})),G()(V()(e),"triggerDateSort",(function(t){t.preventDefault(),e.setState((function(e){return{dateSort:{active:!0,dir:"ASC"===e.dateSort.dir?"DESC":"ASC"},videoSort:HR(HR({},e.videoSort),{},{active:!1}),buyerSort:HR(HR({},e.buyerSort),{},{active:!1}),priceSort:HR(HR({},e.priceSort),{},{active:!1})}}),(function(){return e.props.onColumnSort("purchasedDate",e.state.dateSort.dir)}))})),G()(V()(e),"triggerPriceSort",(function(t){t.preventDefault(),e.setState((function(e){return{priceSort:{active:!0,dir:"ASC"===e.priceSort.dir?"DESC":"ASC"},videoSort:HR(HR({},e.videoSort),{},{active:!1}),buyerSort:HR(HR({},e.buyerSort),{},{active:!1}),dateSort:HR(HR({},e.dateSort),{},{active:!1})}}),(function(){return e.props.onColumnSort("unitPrice",e.state.priceSort.dir)}))})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.items,n=e.timePeriod,r=e.fromDate,i=e.toDate,a=e.pageNumber,o=e.totalPages,s=e.totalRevenue,l=e.subTotalRevenue,c=e.onFromDateChange,u=e.onToDateChange,d=e.onTimePeriodChange,h=e.onPageChange,f=[zR.DAYS,zR.MONTHS,zR.YEARS].includes(n);return v.a.createElement("div",{className:FR.a.revenueReport},v.a.createElement("div",{className:FR.a.header},v.a.createElement("div",{className:FR.a.info},v.a.createElement("div",{className:"u-fw-bold"},Object(uc.b)("totalRevenue")),v.a.createElement("div",{className:"u-fs-1x1o4 mt-2 text-primary"},s),v.a.createElement("div",{className:"u-fs-7o8 u-opacity-50"},Object(uc.b)("estimatedRevenue"))),v.a.createElement("div",{className:FR.a.filter},f&&v.a.createElement(v.a.Fragment,null,v.a.createElement(Hu,Gt()({name:"fromDate",labelName:Object(uc.b)("label.fromDate"),className:FR.a.datePicker,selected:r,onChange:c,minDate:new Date("1/1/1900"),maxDate:i},WR[n])),v.a.createElement(Hu,Gt()({name:"toDate",labelName:Object(uc.b)("label.toDate"),className:FR.a.datePicker,selected:i,onChange:u,minDate:r,maxDate:new Date},WR[n]))),v.a.createElement(wu,{className:"u-w-9",labelName:Object(uc.b)("label.time"),name:"timePeriod",value:n,options:VR,onChange:d}))),v.a.createElement("div",{className:FR.a.subtotal},v.a.createElement("div",{className:P()(FR.a.sumBox,"text-primary u-w-9 ml-2")},v.a.createElement("div",{className:FR.a.sumValue},l)),v.a.createElement("div",{className:"pt-1 pb-1"},Object(uc.b)("orderColumn.subtotal"),":")),v.a.createElement("div",{className:FR.a.content},v.a.createElement(nc.a,{className:FR.a.table,borderless:!0},v.a.createElement("thead",null,v.a.createElement("tr",null,v.a.createElement("th",{className:FR.a.nameColumn},v.a.createElement("a",{href:"#",onClick:this.triggerVideoSort},Object(uc.b)("orderColumn.productName"),this.state.videoSort.active?"ASC"===this.state.videoSort.dir?GR:qR:"")),v.a.createElement("th",{className:FR.a.typeColumn},Object(uc.b)("orderColumn.productType")),v.a.createElement("th",{className:FR.a.buyerColumn},v.a.createElement("a",{href:"#",onClick:this.triggerBuyerSort},Object(uc.b)("orderColumn.buyerName"),this.state.buyerSort.active?"ASC"===this.state.buyerSort.dir?GR:qR:"")),v.a.createElement("th",{className:FR.a.dateColumn},v.a.createElement("a",{href:"#",onClick:this.triggerDateSort},Object(uc.b)("orderColumn.purchasedDate"),this.state.dateSort.active?"ASC"===this.state.dateSort.dir?GR:qR:"")),v.a.createElement("th",{className:FR.a.priceColumn},v.a.createElement("a",{href:"#",onClick:this.triggerPriceSort},Object(uc.b)("orderColumn.price"),this.state.priceSort.active?"ASC"===this.state.priceSort.dir?GR:qR:"")),v.a.createElement("th",{className:FR.a.sellerColumn},Object(uc.b)("orderColumn.productOwner")),v.a.createElement("th",{className:FR.a.vOwnerColumn},Object(uc.b)("orderColumn.videoOwner")),v.a.createElement("th",{className:FR.a.textbookColumn},Object(uc.b)("orderColumn.textbookOwner")),v.a.createElement("th",{className:FR.a.transferred},Object(uc.b)("orderColumn.transferred")))),v.a.createElement("tbody",null,0===t.length&&v.a.createElement("tr",{className:"p-3 u-pl-3o4 font-italic u-opacity-80"},v.a.createElement("td",null,Object(uc.b)("noItemsFound")),v.a.createElement("td",null),v.a.createElement("td",null),v.a.createElement("td",null)),t.map((function(e){var t=e.orderId,n=e.productId,r=e.productTitle,i=e.productType,a=e.unitPrice,o=e.currencyCode,s=e.buyerFullname,l=e.purchasedDate,c=e.seller,u=e.videoOwner,d=e.textbookOwner,h=e.transferred,f="RESOURCE"===i?"Digital resource":"Video";return v.a.createElement("tr",{key:t+n,className:FR.a.row},v.a.createElement("td",{className:P()(FR.a.nameColumn,"")},r),v.a.createElement("td",{className:P()(FR.a.typeColumn,"")},f),v.a.createElement("td",{className:P()(FR.a.buyerColumn,"")},s),v.a.createElement("td",{className:P()(FR.a.dateColumn,"")},l),v.a.createElement("td",{className:P()(FR.a.priceColumn)},x.c.formatMoney(a,o)),v.a.createElement("td",{className:P()(FR.a.sellerColumn,"text-primary")},c&&x.c.formatMoney(c.earningAmount,o)),v.a.createElement("td",{className:P()(FR.a.vOwnerColumn,"text-primary")},u&&x.c.formatMoney(u.earningAmount,o)),v.a.createElement("td",{className:P()(FR.a.textbookColumn,"text-primary")},d&&x.c.formatMoney(d.earningAmount,o)),v.a.createElement("td",{className:P()(FR.a.transferred)},h?"Y":"N"))}))))),v.a.createElement("div",{className:FR.a.footer},v.a.createElement("div",null,v.a.createElement(BR.a,{previousLabel:v.a.createElement("i",{className:"fv fuvi-prev u-fs-3o4"}),nextLabel:v.a.createElement("i",{className:"fv fuvi-next u-fs-3o4"}),breakLabel:"...",forcePage:a,containerClassName:"pagination",activeClassName:"active",breakClassName:"break-me",pageCount:o,marginPagesDisplayed:2,pageRangeDisplayed:4,onPageChange:h}))))}}]),n}(v.a.Component),KR=function(e){var n=e.open,r=e.onClose,i=Yt()(e,["open","onClose"]);return v.a.createElement(Fl.a,{show:n,centered:!0,scrollable:!0,backdrop:"static",dialogClassName:FR.a.revenueReportModal,onEscapeKeyDown:r},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,t("modal.revenueReport")),v.a.createElement("div",{className:"close-modal-btn",onClick:r,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,{className:FR.a.modalBody},v.a.createElement(YR,i)),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100"},v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"primary",className:"modal-button",onClick:r},t("btn.close")))))};function XR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function QR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XR(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $R=x.g.TIME_PERIOD,JR=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{items:[],isLoading:!1,timePeriod:$R.DAYS,fromDate:new Date((new Date).getFullYear(),(new Date).getMonth(),1),toDate:new Date,pageNumber:0,totalPages:0,sortField:"purchasedDate",sortDir:"DESC"}),G()(V()(e),"paging",{pageSize:20,last:!1}),G()(V()(e),"componentDidMount",(function(){e.fetchRevenueReport()})),G()(V()(e),"fetchRevenueReport",(function(){var t=e.props.getRevenueReport,n=e.state,r=n.pageNumber,i=n.fromDate,a=n.toDate,o=n.timePeriod,s=n.sortField,l=n.sortDir,c=[$R.DAYS,$R.MONTHS,$R.YEARS].includes(o);e.setState({items:[],isLoading:!0}),t(QR(QR({pageNumber:r,pageSize:e.paging.pageSize,period:o},c?{fromDate:i,toDate:a}:{}),{},{sortField:s,sortDir:l}),(function(t){var n=t.content,r=void 0===n?[]:n,i=t.pageSize,a=t.pageNumber,o=void 0===a?0:a,s=t.total,l=void 0===s?0:s,c=t.totalRevenue,u=t.subTotalRevenue,d=void 0===u?0:u,h=t.currencyCode,f=Number.parseInt(l/i)+(l%i>0?1:0);e.setState((function(e){return{isLoading:!1,items:[].concat(Rl()(e.items),Rl()(r)),pageNumber:o,totalPages:f,totalRevenue:x.c.formatMoney(c,h),subTotalRevenue:x.c.formatMoney(d,h)}}))}),(function(){e.setState({isLoading:!1})}))})),G()(V()(e),"loadNewItems",(function(){var t=e.state,n=t.pageNumber,r=t.fromDate,i=t.toDate,a=t.timePeriod,o=[$R.DAYS,$R.MONTHS,$R.YEARS].includes(a);e.fetchRevenueReport(QR({pageNumber:n,pageSize:e.paging.pageSize,period:a},o?{fromDate:r,toDate:i}:{}))})),G()(V()(e),"handleClose",(function(){(0,e.props.toggleOpenRevenueReportModal)(!1)})),G()(V()(e),"handleFromDateChange",(function(t){e.setState({pageNumber:0,fromDate:t},e.fetchRevenueReport)})),G()(V()(e),"handleToDateChange",(function(t){e.setState({pageNumber:0,toDate:t},e.fetchRevenueReport)})),G()(V()(e),"handleTimePeriodChange",(function(t){e.setState({pageNumber:0,timePeriod:t},e.fetchRevenueReport)})),G()(V()(e),"handlePageChange",(function(t){var n=t.selected;e.setState({pageNumber:n},e.fetchRevenueReport)})),G()(V()(e),"handleColumnSort",(function(t,n){e.setState({sortField:t,sortDir:n},e.fetchRevenueReport)})),e}return c()(n,[{key:"render",value:function(){var e=this.state,t=e.items,n=e.isLoading,r=e.fromDate,i=e.toDate,a=e.timePeriod,o=e.pageNumber,s=e.totalPages,l=e.totalRevenue,c=e.subTotalRevenue;return v.a.createElement(KR,{open:!0,isLoading:n,items:t,timePeriod:a,fromDate:r,toDate:i,pageNumber:o,totalPages:s,totalRevenue:l,subTotalRevenue:c,onClose:this.handleClose,onFromDateChange:this.handleFromDateChange,onToDateChange:this.handleToDateChange,onTimePeriodChange:this.handleTimePeriodChange,onPageChange:this.handlePageChange,onColumnSort:this.handleColumnSort})}}]),n}(g.Component),ZR=Object(q.b)((function(e){e.cart;return{}}),(function(e){return{toggleOpenRevenueReportModal:function(t){return e(Q.c.toggleOpenRevenueReportModal(t))},getOrderList:function(t,n,r){return e(Q.c.getOrderList(t,n,r))},getRevenueReport:function(t,n,r){return e(Q.c.getRevenueReport(t,n,r))}}}))(JR),eB=Object(g.forwardRef)((function(e,t){var n=e.contents,r=e.activeDefaultIndex,i=e.isFullTabs,a=Object(g.useState)(n[r].key),o=pi()(a,2),s=o[0],l=o[1];return Object(g.useImperativeHandle)(t,(function(){return{activeTabKey:function(e){l(e)}}})),v.a.createElement(Sl,{activeKey:s,className:"fv-tabs",onSelect:function(e){return l(e)}},n.map((function(e,t){return v.a.createElement(kl,{tabClassName:P()(i&&"flex-fill text-center"),key:t,eventKey:e.key,title:e.title,disabled:e.disabled},e.content)})))}));eB.propTypes={contents:ne.a.array,activeDefaultIndex:ne.a.number,isFullTabs:ne.a.bool},eB.defaultProps={contents:[],activeDefaultIndex:0,isFullTabs:!1};var tB=eB,nB=r(89),rB=r.n(nB);var iB=x.g.REMINDER_OPTIONS;function aB(e){var t=e.item,n=t.avatar;return v.a.createElement("span",{id:t.uid,className:rB.a.suggestionItem},v.a.createElement("img",{src:n,className:rB.a.suggestionAvatar}),v.a.createElement("span",null,t.name))}function oB(e){var t=e.tag,n=(e.removeButtonText,e.onDelete),r=t.name,i=t.avatar;return v.a.createElement("div",{onClick:n,className:rB.a.tagItem},v.a.createElement("img",{src:i,className:rB.a.tagAvatar}),v.a.createElement("span",{className:P()(rB.a.tagLabel,"text-truncate")},r),v.a.createElement("i",{className:"fv fuvi-delete text-danger ml-2"}))}var sB=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.title,r=t.showConfirmationModal,i=t.isSubmitting,a=t.startDate,o=t.timezone,s=t.reminder,l=t.endDate,c=t.startDates,u=t.endDates,d=t.durationText,h=(t.participants,t.description),f=t.addingSharingItems,p=t.searchingFriendResults,m=t.editParticipants,g=this.props.isEdit,b=g?a>new Date?a:new Date:a,y=f.length>0;return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:"default-modal-class",scrollable:!1,centered:!0,backdrop:"static",onEscapeKeyDown:this.handleFormCancel},i&&v.a.createElement(Nn,null),v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"ml-3 ".concat(rB.a.formTitle)},g?Object(_t.t)("modal.editMeeting"):Object(_t.t)("modal.createInstantMeeting")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",{className:rB.a.leftColumnWrap},v.a.createElement(mu,{labelName:Object(_t.t)("label.eventTitle"),name:"title",value:n,placeholder:Object(_t.t)("addTitle"),onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("title")},validatorElement:this.validator.message("title",n,"eventTitleRequired|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),required:!0}),v.a.createElement(mu,{labelName:Object(_t.t)("description"),name:"description",value:h,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("description")},validatorElement:this.validator.message("description",h,"max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),classNameInput:rB.a.description,as:"textarea",rows:4}),v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",null,v.a.createElement($l.a.Label,{className:[rB.a.label,"mt-2"]},Object(_t.t)("label.startTime"),v.a.createElement("span",null," *")),v.a.createElement("div",{className:"d-flex"},v.a.createElement(Hu,{className:rB.a.datePicker,classNameWrap:rB.a.datePickerInput,selected:a,onSelect:this.handleStartDateChange,minDate:new Date,dateFormat:"MMM d, yyyy",openToDate:b}),v.a.createElement(Au,{className:"u-w-5 ml-3",items:c.map((function(e){return{label:Ml()(e).format("HH:mm"),value:e}})),value:Ml()(a).format("HH:mm"),onSelect:function(t,n){var r=n.value;return e.handleStartTimeChange(r)},focusOnMount:!1}))),v.a.createElement("div",{className:"flex-fill"}),v.a.createElement("div",null,v.a.createElement($l.a.Label,{className:[rB.a.label,"mt-2"]},Object(_t.t)("label.endTime"),v.a.createElement("span",null," *")),v.a.createElement("div",{className:"d-flex"},v.a.createElement(Hu,{className:rB.a.datePicker,classNameWrap:rB.a.datePickerInput,selected:l,onSelect:this.handleEndDateChange,minDate:a,dateFormat:"MMM d, yyyy"}),v.a.createElement(Au,{className:"u-w-5 ml-3",items:u.map((function(e){return{label:Ml()(e).format("HH:mm"),value:e}})),value:Ml()(l).format("HH:mm"),onSelect:function(t,n){var r=n.value;return e.handleEndTimeChange(r)},focusOnMount:!1})))),v.a.createElement("div",{className:"u-mb-1"},v.a.createElement("span",{className:rB.a.label},Object(_t.t)("label.duration"),":"),v.a.createElement("span",null," ",d)),v.a.createElement(Wm,{labelName:Object(_t.t)("label.timezone"),value:o,onChange:this.handleTimeZoneChange}),v.a.createElement("div",null,v.a.createElement("div",{className:P()(rB.a.label,"d-flex align-items-center")},v.a.createElement("i",{className:"fv fuvi-notification-icon u-mr-1o5"}),Object(_t.t)("label.reminder")),v.a.createElement(wu,{name:"reminder",className:"u-w-10",value:s,options:iB,onChange:this.handleReminderChange}))),v.a.createElement("div",{className:rB.a.rightColumnWrap},v.a.createElement("div",{className:"d-flex u-fw-500 justify-content-between"},v.a.createElement("div",{className:"mt-2"},Object(_t.t)("participants"))),v.a.createElement("div",{className:P()("d-flex align-items-start u-mb-1x3o8 mt-2",rB.a.addParticipantsWrap)},v.a.createElement("div",{className:P()(rB.a.leftItem,"position-relative addParticipantWrap")},v.a.createElement(sd,{className:P()("w-100",rB.a.addParticipantInput),placeholderText:"",tags:f,suggestions:p,onInput:this.handleSearchPeople,onFocus:this.handleSearchPeople,onAddition:this.handleSuggestionSelect,onDelete:this.handleRemoveIncompleteSharingItem,minQueryLength:0,suggestionComponent:aB,tagComponent:oB,maxSuggestionsLength:5})),v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{role:"button",className:P()(rB.a.addBtn,!y&&"u-opacity-50 u-pointer-event-none"),onClick:this.handleCreateSharingItems},v.a.createElement("i",{className:"fv fuvi-user-addlist u-mr-3o8"}),v.a.createElement("div",null,Object(_t.t)("btn.add"))))),v.a.createElement("div",{className:rB.a.separator}),v.a.createElement("div",{className:P()("d-flex u-fw-500",rB.a.numPartGroup)},v.a.createElement("div",{className:"d-flex align-items-center"},m.length,v.a.createElement("i",{className:"ml-1 fv fuvi-group-avatar"}))),v.a.createElement("div",{className:P()(rB.a.participantsWrap)},v.a.createElement(Lb,{continuousScrolling:!0,containerClassName:rB.a.scrollWrapper,className:"fv-smooth-scroll h-100 autoshow-scrollbar y fv-always-show-tracks",ref:this.scrollRef},m.map((function(t){var n=t.userId,r=t.firstName,i=t.lastName,a=t.avatar,o=(a=void 0===a?{}:a).image;return v.a.createElement("div",{key:n,className:P()("u-mb-5o8",rB.a.participant)},v.a.createElement("div",{className:P()(rB.a.leftItem)},v.a.createElement("div",{className:rB.a.participantAvatar,style:{backgroundImage:"url(".concat(o||I.a.noAvatar,")")}}),v.a.createElement("div",{className:P()("text-truncate")},"".concat(r," ").concat(i))),v.a.createElement("div",null,!e.isOwnerOrContentAdmin(n)&&v.a.createElement("div",{role:"button",className:P()("",rB.a.deleteIcon),onClick:function(){return e.handleRemoveParticipant(n)}},v.a.createElement("i",{className:"fv fuvi-trash-can"}))))})))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100"},v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"outline-primary",className:P()(rB.a.footerBtn,"modal-button"),onClick:this.handleFormCancel},Object(_t.t)("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:P()("text-white modal-button ml-4",rB.a.footerBtn),onClick:this.handleSubmitForm},g?Object(_t.t)("btn.save"):Object(_t.t)("btn.create"))))),v.a.createElement(IC,{show:!!r,title:Object(_t.t)("modal.confirmCancelModalTitle"),message:Object(_t.t)("modal.confirmCancelModalMessage"),onConfirm:this.closeForm,onClose:function(){return e.setState({showConfirmationModal:!1})}}))}}]),n}(g.PureComponent);var lB=x.g.REMINDER_OPTIONS,cB=x.g.DEFAULT_MEETING_DURATION,uB=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{timezone:e.props.isEdit?e.props.timezone:e.props.userProfileTimezone,reminder:e.props.isEdit?e.props.reminder:lB[0].value,duration:e.props.isEdit?(e.props.endDate.getTime()-e.props.startDate.getTime())/6e4:cB,durationText:e.props.isEdit?x.c.getReadableTimeDuration((e.props.endDate.getTime()-e.props.startDate.getTime())/6e4):x.c.getReadableTimeDuration(cB),description:e.props.isEdit?e.props.description:"",startDate:e.props.isEdit?e.props.startDate:new Date,endDate:e.props.isEdit?e.props.endDate:new Date,schedUid:e.props.isEdit?e.props.schedUid:"",startTimes:[],startTime:"",startDates:[],endDates:[],participantIds:[],participants:[],title:e.props.isEdit?e.props.title:"",isSubmitting:!1,addingSharingItems:[],searchingFriendResults:[],editParticipants:[],sharedUsers:[]}),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"initialStates",{}),G()(V()(e),"scrollRef",v.a.createRef()),G()(V()(e),"initStartEndDates",(function(){var t=e.props.isEdit,n=e.state,r=n.startDate,i=n.endDate,a=n.duration,o=n.title,s=n.reminder,l=n.timezone,c=n.description,u=t,d=[],h=[],f=new Date;f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0);var p=new Date;for(p.setHours(23),p.setMinutes(59);f<p;)f>new Date&&(u||(r=f,i=Ml()(r).add(a,"m").toDate(),u=!0),d.push(f),r&&f>=r&&h.push(f)),f=Ml()(f).add(15,"m").toDate();e.initialStates={startDate:r,endDate:i,title:o,reminder:s,timezone:l,description:c},e.setState({startDates:d,startDate:r,endDates:h,endDate:i})})),G()(V()(e),"updateEndDates",(function(){var t=e.state,n=t.duration,r=t.startDate,i=Ml()(r).add(n,"m").toDate(),a=new Date(i);a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0);var o=new Date(i);o.setHours(23),o.setMinutes(59);for(var s=[];a<o;)a>=r&&s.push(a),a=Ml()(a).add(15,"m").toDate();e.setState({endDates:s,endDate:i})})),G()(V()(e),"handleStartDateChange",(function(t){var n=e.state.startDate,r=new Date(t);r.setHours(n.getHours()),r.setMinutes(n.getMinutes()),r.setSeconds(0),r.setMilliseconds(0),r<new Date&&(r=new Date);var i=new Date(t);i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0);var a=new Date(t);a.setHours(23),a.setMinutes(59);for(var o=[];i<a;)i>=new Date&&o.push(i),i=Ml()(i).add(15,"m").toDate();e.setState({startDates:o,startDate:r},e.updateEndDates)})),G()(V()(e),"handleEndDateChange",(function(t){var n=e.state,r=n.endDate,i=n.startDate,a=new Date(t);a.setHours(r.getHours()),a.setMinutes(r.getMinutes()),a.setSeconds(0),a.setMilliseconds(0);var o=Math.round((a.getTime()-i.getTime())/6e4),s=new Date(t);s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0);var l=new Date(t);l.setHours(23),l.setMinutes(59);for(var c=[];s<l;)s>=i&&c.push(s),s=Ml()(s).add(15,"m").toDate();e.setState({endDates:c,endDate:a>i?a:i,duration:o,durationText:x.c.getReadableTimeDuration(o)})})),G()(V()(e),"handleStartTimeChange",(function(t){e.setState({startDate:t},e.updateEndDates)})),G()(V()(e),"handleEndTimeChange",(function(t){var n=e.state.startDate,r=Math.round((t.getTime()-n.getTime())/6e4);e.setState({endDate:t,duration:r,durationText:x.c.getReadableTimeDuration(r)})})),G()(V()(e),"handleTimeZoneChange",(function(t){e.setState({timezone:t.value})})),G()(V()(e),"handleReminderChange",(function(t){e.setState({reminder:t})})),G()(V()(e),"handleFormCancel",(function(){var t=e.props.updateCreateMeetingForm;e.isFormDirty()?e.setState({showConfirmationModal:!0}):t(HA.b)})),G()(V()(e),"closeForm",(function(){(0,e.props.updateCreateMeetingForm)(HA.b)})),G()(V()(e),"handleChange",(function(t){var n=t.target,r=n.name,i=n.value;e.setState(G()({},r,i))})),G()(V()(e),"handleSubmitForm",(function(t){t.preventDefault(),t.stopPropagation();var n=e.state,r=n.title,i=n.startDate,a=n.endDate,o=n.timezone,s=n.reminder,l=n.description,c=n.editParticipants,u=e.props,d=u.createMeeting,h=u.videoId,f=u.chapterHighlighting.seqNumber,p=u.isEdit,m=u.updateChapterItem,g=u.seqNumber,v=Object(Y.isNumber)(f)?f+1:0;p&&(v=g),e.validator.allValid()?e.setState({isSubmitting:!0},(function(){var t=p?m:d,n=Object(Y.cloneDeep)(c).map((function(e){return e.userId}));t({videoId:h,content:r,seqNumber:v,startTime:i.getTime()-6e4*i.getTimezoneOffset(),endTime:a.getTime()-6e4*a.getTimezoneOffset(),timezone:o,reminderTime:s,description:l,participantIds:n},e.closeForm,(function(){return e.setState({isSubmitting:!1})}))})):(e.validator.showMessages(),e.forceUpdate())})),G()(V()(e),"isFormDirty",(function(){var t=e.state,n=t.title,r=t.startDate,i=t.endDate,a=t.timezone,o=t.reminder,s=t.description;return n!==e.initialStates.title||r!==e.initialStates.startDate||i!==e.initialStates.endDate||a!==e.initialStates.timezone||o!==e.initialStates.reminder||s!==e.initialStates.description})),G()(V()(e),"isOwnerOrContentAdmin",(function(t){var n,r,i=e.props.cogvidDetails;return i.ownerId===t||!(!(null===(n=i.permissions)||void 0===n?void 0:null===(r=n.VIDEO)||void 0===r?void 0:r.DOANYACTION)||!x.c.isCurrentUserId(t))})),G()(V()(e),"getSuggestPartipants",(function(){})),G()(V()(e),"handleSuggestionSelect",(function(t){var n=e.state.addingSharingItems;n.push(t),e.setState({addingSharingItems:Object(Y.cloneDeep)(n),searchingFriendResults:[]},(function(){e.handleSearchPeople()}))})),G()(V()(e),"handleRemoveIncompleteSharingItem",(function(t){var n=e.state.addingSharingItems;n.splice(t,1),e.setState({addingSharingItems:n},(function(){e.handleSearchPeople()}))})),G()(V()(e),"handleRemoveParticipant",(function(t){var n=e.state.editParticipants.filter((function(e){return e.userId!==t}));e.setState({editParticipants:n})})),G()(V()(e),"handleSearchPeople",Object(Y.debounce)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.props,r=n.searchParticipants,i=(n.chapterOwnerId,n.searchingFriendResults),a=(n.maxNumberOfSharesPerVideo,n.cogvidDetails),o=e.state,s=(o.addingSharingItems,o.shareVideoItems,a.ownerId);if(Object(Y.isEmpty)(i)){var l=100;e.setState({searchingFriendResults:[]},(function(){r({names:t.trim(),pageSize:l},(function(n){var r=n.content,i=e.state,a=i.participants,o=i.editParticipants,l=r.flatMap((function(t){var n=t.avatar,r=(n=void 0===n?{}:n).image,i=t.firstName,a=void 0===i?"":i,o=t.lastName,l=void 0===o?"":o,c=t.userId,u=e.state,d=u.editParticipants,h=u.addingSharingItems,f=(u.participants,[].concat(Rl()(d),Rl()(h)).some((function(e){var t=e.willBeDeleted,n=void 0!==t&&t;if(e.userId===c&&!n)return!0}))),p=[s].includes(c);if(f||p)return[];var m="".concat(a," ").concat(l);return[{avatar:r||I.a.noAvatar,fullName:m,userId:c,label:m,uid:c,name:m,firstName:a,lastName:l}]})),c=a.filter((function(e){return-1!==e.fullName.toLowerCase().indexOf(t.toLowerCase())})).flatMap((function(e){var t=e.avatar,n=(t=void 0===t?{}:t).image,r=e.firstName,i=void 0===r?"":r,a=e.lastName,o=void 0===a?"":a,s=e.fullName,l=void 0===s?"":s,c=e.userId;return[{avatar:n||I.a.noAvatar,fullName:l,userId:c,label:l,uid:c,name:l,firstName:i,lastName:o}]})),u=l.flatMap((function(e){return c.find((function(t){return t.userId===e.userId}))?[]:e})),d=[].concat(Rl()(c),Rl()(u));d=d.filter((function(e){return!o.find((function(t){return t.userId===e.userId}))})),e.setState({searchingFriendResults:d})}))}))}}),300)),G()(V()(e),"handleCreateSharingItems",(function(){var t=e.state,n=t.addingSharingItems,r=t.editParticipants;e.setState({editParticipants:[].concat(Rl()(n.map((function(e){var t=e.userId,n=e.fullName;return{userId:t,firstName:e.firstName,lastName:e.lastName,fullName:n,avatar:{image:e.avatar||I.a.noAvatar},active:!0,isNewItem:!0}}))),Rl()(r)),addingSharingItems:[],searchingFriendResults:[]})})),e}return c()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.getParticipants,r=t.videoId,i=t.ownerScaffId,a=t.userScaffId,o=(t.cogvidDetails,t.isEdit),s=t.schedUid,l=t.getMeetingParticipants,c=(t.getVideoSharingInfo,t.getVideoSharedUsers);o?(c({scaffoldingId:a||i},(function(t){if(t){var n=t.flatMap((function(e){var t=e.userProfile,n=(t=void 0===t?{}:t).avatar,r=void 0===n?{}:n,i=t.firstName,a=void 0===i?"":i,o=t.lastName,s=void 0===o?"":o,l=t.fullName,c=void 0===l?"":l,u=t.userId;return[{userId:u,avatar:r,fullName:c,firstName:a,lastName:s,uid:u}]}));e.setState({participants:n})}})),l({schedUid:s},(function(t){e.setState({editParticipants:t})}))):n({userScaffId:a||i,videoId:r},(function(t){e.setState({editParticipants:t})}));this.initStartEndDates()}}]),n}(sB),dB=Object(q.b)((function(e){var t=e.cogvid;return{userProfileTimezone:e.auth.userInfo.timezone,userScaffId:t.cogvidDetails.userScaffId,ownerScaffId:t.cogvidDetails.ownerScaffId,videoId:t.cogvidDetails.videoId,chapterHighlighting:t.chapterHighlighting,cogvidDetails:t.cogvidDetails,videoOwnerId:t.shareVideoChapterModal.videoOwnerId,chapterOwnerId:t.shareVideoChapterModal.chapterOwnerId}}),(function(e){return{getParticipants:function(t,n,r){return e(Q.e.getParticipants(t,n,r))},updateCreateMeetingForm:function(t){return e(Q.e.updateCreateMeetingForm(t))},createMeeting:function(t,n,r){return e(Q.e.createMeeting(t,n,r))},updateChapterItem:function(t,n,r){return e(Q.e.updateChapterItem(t,n,r))},searchParticipants:function(t,n,r){return e(Q.i.searchFriends2(t,n,r))},getMeetingParticipants:function(t,n,r){return e(Q.n.getParticipants(t,n,r))},getVideoSharingInfo:function(t,n,r){return e(Q.e.getVideoSharingInfo(t,n,r))},getVideoSharedUsers:function(t,n,r){return e(Q.e.getVideoSharedUsers(t,n,r))}}}))(uB);var hB=x.g.SCOPE_CHAPTER_STATUS,fB=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{entireCoursePublished:!1,publishingScope:e.props.visibilityScope}),G()(V()(e),"closeButtonRef",v.a.createRef()),G()(V()(e),"handleChangeAccessScopeClick",(function(){var t=e.props,n=t.onChangeAccessScope,r=(t.onClose,e.state);n({entireCoursePublished:r.entireCoursePublished,publishingScope:r.publishingScope})})),G()(V()(e),"handleAccessEntireCourseChange",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.target;e.setState({entireCoursePublished:null==n?void 0:n.checked})})),G()(V()(e),"onChangeLimitPublish",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.target;e.setState({publishingScope:null==n?void 0:n.value})})),e}return c()(n,[{key:"componentDidMount",value:function(){this.closeButtonRef.current&&this.closeButtonRef.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.onClose,n=e.isCourseMaster,r=(e.trustedPublisher,this.state),i=r.entireCoursePublished,a=r.publishingScope;return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",dialogClassName:jD.a.confirmationDialog,onEscapeKeyDown:t,className:"publish-video-modal"},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,Object(uc.b)("accessSettings"))),v.a.createElement(Fl.a.Body,{className:jD.a.modalBody},v.a.createElement("div",{className:"h-100 w-100 d-flex px-5 align-items-center"},v.a.createElement("div",{className:"w-100"},v.a.createElement("div",{className:"mb-3"},Object(uc.b)("chooseAccessScope")),v.a.createElement("div",{className:"d-flex justify-content-center"},v.a.createElement(_u,{id:"publicShare",className:"pr-5",checked:a==hB.PUBLIC,labelName:Object(uc.b)("radioshareVideosearchPublic"),type:"radio",name:"publishingScope",value:hB.PUBLIC,onChange:this.onChangeLimitPublish}),v.a.createElement(_u,{id:"internalShareLink",checked:a==hB.INTERNAL,labelName:Object(uc.b)("radioshareVideosearchLimit"),type:"radio",name:"publishingScope",value:hB.INTERNAL,onChange:this.onChangeLimitPublish})),n&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"mt-3 u-mb-1x1o4 border-bottom"}),v.a.createElement("div",{className:"d-flex mt-3 ml-n1"},v.a.createElement(_u,{id:"applyEntireCourse",labelName:Object(uc.b)("label.applyEntireCourse"),classNameInput:"custom-checkbox-md u-pl-2",checked:i,onChange:this.handleAccessEntireCourseChange})))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{ref:this.closeButtonRef,variant:"outline-primary",className:"modal-button u-w-9",onClick:t},Object(uc.b)("btn.cancel")),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button u-w-9 u-ml-1x3o8",onClick:this.handleChangeAccessScopeClick},Object(uc.b)("btn.save"))))}}]),n}(v.a.Component);fB.propTypes={onClose:ne.a.func},fB.defaultProps={onClose:function(){return null}};var pB=r(439),mB=r.n(pB);function gB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gB(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gB(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bB=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{showCloseConfirmation:!1,title:e.props.title,course:"",cloneTo:e.props.cloneTo||x.g.VIDEO_MENU_CATEGORY.CREATE_VIDEO,entireCourse:!1,isSubmittingForm:!1,needChangeToSubmit:!1,courses:[],courseSuggestions:[]}),G()(V()(e),"isDirty",!1),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"componentDidMount",(function(){e.fetchCourses()})),G()(V()(e),"fetchCourses",(function(){var t=e.state.course;e.props.getCourses(null,(function(n){e.setState({courses:n},(function(){""===t&&e.handleCourseSearch(t)}))}))})),G()(V()(e),"handleCourseSearch",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.state.courses,r=n.flatMap((function(e){var n=e.code;return n.toLowerCase().includes(t.toLowerCase())?[vB(vB({},e),{},{label:n,name:n,score:t.length/n.length})]:[]}));e.setState({courseSuggestions:Object(Y.sortBy)(r,["score"]).reverse().slice(0,5),course:t},e.handleCourseValidate)})),G()(V()(e),"handleCourseSelect",(function(t){e.setState({course:t,courseSuggestions:[]},e.handleCourseValidate)})),G()(V()(e),"handleSubmit",(function(t){t.preventDefault();var n=e.props,r=n.videoId,i=n.cloneVideo,a=n.onClose,o=e.state,s=o.title,l=o.course,c=o.cloneTo,u=o.entireCourse;e.validator.allValid()?e.setState({isSubmittingForm:!0},(function(){i({videoId:r,title:s,courseCode:l,category:c,entireCourse:u},a,(function(){e.setState({isSubmittingForm:!1,needChangeToSubmit:!0})}))})):(e.validator.showMessages(),e.forceUpdate())})),G()(V()(e),"handleChange",(function(t){var n,r=t.target,i=r.name,a=r.value;e.setState((n={},G()(n,i,a),G()(n,"needChangeToSubmit",!1),n)),e.isDirty=!0})),G()(V()(e),"handleCloneToChange",(function(t){e.isDirty=!0,e.setState({cloneTo:t})})),G()(V()(e),"handleEntireCourseChange",(function(){e.isDirty=!0,e.setState((function(e){return{entireCourse:!e.entireCourse}}),e.handleCourseValidate)})),G()(V()(e),"handleClose",(function(){e.isDirty?e.setState({showCloseConfirmation:!0}):e.props.onClose()})),G()(V()(e),"checkCanSubmitForm",(function(){var t=e.state,n=t.title,r=t.needChangeToSubmit;return!!n&&!r&&e.validator.allValid()})),G()(V()(e),"handleCourseValidate",(function(){e.validator.showMessageFor("course"),e.forceUpdate()})),e}return n}(function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.isMasterVideo,i=n.onClose,a=this.state,o=a.title,s=a.course,l=a.cloneTo,c=a.entireCourse,u=a.showCloseConfirmation,d=a.isSubmittingForm,h=a.courseSuggestions,f=this.checkCanSubmitForm();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:mB.a.modalWrapper,centered:!0,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},d&&v.a.createElement(Nn,null),v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"modal-title h4 ml-3"},t("modal.cloneVideoTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:mB.a.modalBody},v.a.createElement($l.a,{noValidate:!0,onSubmit:this.handleRegisterSubmit},v.a.createElement(mu,{labelName:t("covidFormTitle"),name:"title",value:o,placeholder:t("covidFormTitlePlaceHolder"),required:!0,onChange:this.handleChange,onBlur:function(){e.validator.showMessageFor("title"),e.forceUpdate()},validatorElement:this.validator.message("title",o,"videoTitleRequired|max:".concat(x.g.TEXT_INPUT_MAX_LENGTH)),classNameInput:"cogvid-input-height"}),v.a.createElement("div",{className:"mb-3"},v.a.createElement($l.a.Label,{className:"my-2 u-fw-bold"},v.a.createElement("span",null,t("label.course"))),v.a.createElement(Au,{className:"u-mr-1x1o2",placeholder:t("placeholder.ccvCourse"),classNameInput:"pl-fs-7o8",items:h,value:s,name:"course",onChange:function(t){return e.handleCourseSearch(t.target.value)},onSelect:this.handleCourseSelect,focusOnMount:!1,validatorElement:this.validator.message("course",s,["max:".concat(x.g.TEXT_INPUT_MAX_LENGTH),{cloneCourseCodeRequired:c}])})),v.a.createElement(wu,{labelName:t("label.destination"),name:"cloneTo",value:l,options:x.g.CLONE_VIDEO_TO_OPTIONS,onChange:this.handleCloneToChange}),r&&v.a.createElement("div",{className:"mt-4 pl-1"},v.a.createElement(_u,{id:"checkboxEntireCourse",labelName:t("label.cloneEntireCourse"),classNameInput:"custom-checkbox-md justify-content-start",checked:c,onChange:this.handleEntireCourseChange})))),v.a.createElement(Fl.a.Footer,{className:mB.a.footer},v.a.createElement("div",{className:"w-100 d-flex justify-content-end"},v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},t("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:"text-white modal-button ml-4",onClick:this.handleSubmit,disabled:!f},t("btn.clone"))))),v.a.createElement(IC,{show:!!u,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:i,onClose:function(){return e.setState({showCloseConfirmation:!1})}}))}}]),r}(g.PureComponent)),yB=Object(q.b)(null,(function(e){return{cloneVideo:function(t,n,r){return e(Q.e.cloneVideo(t,n,r))},getCourses:function(t,n,r){return e(Q.e.getCourses(t,n,r))}}}))(bB),AB=r(106),_B=r.n(AB),wB=function(e){var n=e.isLoading,r=e.isHover,i=e.author,a=e.title,o=e.subject,s=e.topic,l=e.duration,c=e.likeCount,u=e.liked,d=e.views,h=e.price,f=e.childCount,p=e.displaySerial,m=e.colorLevel,g=e.onClick,b=e.onMouseHover,y=e.onMouseLeave;if(n)return v.a.createElement("div",{className:_B.a.subVideoItem,onMouseEnter:b,onMouseLeave:y},v.a.createElement(Nn,{className:"bg-transparent text-primary"}));var A=x.c.getLevelBackgrounds();return v.a.createElement("div",{className:P()(_B.a.subVideoItem,_B.a[m],!!g&&_B.a.clickable,r&&_B.a.isHover),style:{background:A[m]},onClick:g,onMouseEnter:b,onMouseLeave:y},v.a.createElement("div",{className:_B.a.badges},v.a.createElement("div",{className:P()(_B.a.priceBadge,!h&&"invisible",h===t("accessType.free")&&"u-bg-primary-bold",h===t("accessType.paid")&&"u-bg-grey")},h),p&&v.a.createElement("div",{className:_B.a.serialBadge},p),f>=0&&v.a.createElement("div",{className:P()(_B.a.childCountBadge)},v.a.createElement("div",{className:_B.a.badgeLeft},f||0),v.a.createElement("div",{className:_B.a.badgeRight,style:{borderColor:A[m]}},v.a.createElement("i",{className:"fv fuvi-playlist-branch text-white u-fs-7o8"}))),void 0===f&&v.a.createElement("i",{className:"fv fuvi-play-east-blue reverse-color u-fs-1x1o4"},v.a.createElement("span",{className:"path1 text-white"}),v.a.createElement("span",{className:"path2 u-text-primary-bold"}))),v.a.createElement("div",{className:P()(_B.a.info)},v.a.createElement("div",{className:P()(_B.a.author,"text-truncate")},i),v.a.createElement("div",{className:P()(_B.a.title,"text-truncate")},a),v.a.createElement("div",{className:P()(_B.a.subject,"text-truncate u-fs-15o16")},o),v.a.createElement("div",{className:P()(_B.a.topic,"text-truncate u-fs-15o16")},s)),v.a.createElement("div",{className:_B.a.stats},v.a.createElement("div",{className:"text-truncate u-fs-13o16"},l.humanize(!0)),v.a.createElement("div",{className:"d-flex align-items-center ml-3"},v.a.createElement("i",{className:"fv fuvi-eye u-fs-13o16 mr-1"}),v.a.createElement("div",null,x.c.nFormatter(d))),v.a.createElement("div",{className:"d-flex align-items-center ml-3"},v.a.createElement("i",{className:P()("mr-1 u-fs-13o16",u?"fv fuvi-like-full":"fv fuvi-like")}),v.a.createElement("div",null,c))))};var EB=x.g.ACCESS_GRANT_TYPE,SB=x.g.CURRENCIES,CB=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"getSerial",(function(t){var n=e.props.isCourseMaster?"course":"primCourse";return Object(Y.get)(t,["cognitiveVideo",n,"serial"])})),G()(V()(e),"itemRenderer",(function(n,r){var i=e.props,a=i.items,o=void 0===a?[]:a,s=i.isLoading,l=i.hoveredIndex,c=i.onItemClick,u=i.onItemMouseHover,d=i.onItemMouseLeave;if(s)return v.a.createElement("div",{key:r,className:_B.a.itemWrapper},v.a.createElement(wB,{isLoading:s,onMouseHover:function(e){return u(e,r)},onMouseLeave:d}));var h=n.uid,f=n.views,p=void 0===f?0:f,m=n.likeCount,g=void 0===m?0:m,b=n.liked,y=n.userScaffId,A=void 0===y?"":y,_=n.accessGrantType,w=n.unitPrice,E=(w=void 0===w?{}:w).amount,S=w.currency,C=(S=void 0===S?{}:S).code,T=void 0===C?SB.USD.value:C,k=n.cognitiveVideo,O=(k=void 0===k?{}:k).author,I=k.title,M=k.subject,P=k.topic,D=k.createdDate,N=(k.publishedDate,k.course),L=k.primCourse,R=k.owner,B=k.childCount,j=x.c.getCurrentVideoCategory(),F=j===x.g.VIDEO_CATEGORY.EXPLORING,U=j===x.g.VIDEO_CATEGORY.LEARNING,H=D,z=Ml.a.duration(-1*Ml()().diff(Ml()(H))),V=x.c.isCurrentUserId(R),W=0==(null==L?void 0:L.serial)?"lv0":(null==L?void 0:L.serial)>0||0==(null==N?void 0:N.serial)?"lv1":"lv2",G=_===EB.FREE,q=U?"":A&&!V?t("accessType.paid"):G?t("accessType.free"):E&&_===EB.PAID?x.c.formatMoney(E,T):"",Y=o.filter((function(t){return e.getSerial(t)>0})).length,K=e.getSerial(n),X="".concat(0==K?"M":K||"").concat(Y?"/"+Y:"");return v.a.createElement("div",{key:h,className:_B.a.itemWrapper},v.a.createElement(wB,{isLoading:s,isHover:l===r,uid:h,author:O,title:I,subject:M,topic:P,duration:z,views:p,likeCount:g,liked:b,price:F?"":q,childCount:B,displaySerial:X,colorLevel:W,onClick:function(){c(n)},onMouseHover:function(e){return u(e,r)},onMouseLeave:d}))})),e}return c()(r,[{key:"render",value:function(){var e=this.props,t=e.items,n=void 0===t?[]:t,r=e.isLoading,i=e.childCount,a=e.onListScroll,o=e.onListMouseMove,s=r?Rl()(new Array(i)):n;return v.a.createElement("div",{className:_B.a.subVideoList,onMouseMove:o},v.a.createElement(Lb,{plugins:{filterEvent:{horizontalScroll:!0}},className:"w-100 h-100 fv-smooth-scroll fv-always-show-tracks autoshow-scrollbar x",containerClassName:"h-100",onScroll:a},v.a.createElement("div",{className:P()(_B.a.itemsWrapper,s.length>4&&_B.a.hasScrollbar)},s.map(this.itemRenderer))))}}]),r}(v.a.Component);var TB=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{items:[],isLoading:!!e.props.courseId,hoveredIndex:null}),G()(V()(e),"SCItemCoverImage",""),G()(V()(e),"fetchedCourseId",""),G()(V()(e),"space",Number(AB.gapSpace.replace(/px/,""))),G()(V()(e),"scrollbarHeight",Number(Um.sizeCustomScrollbar.replace(/px/,""))),G()(V()(e),"mousePos",{x:0,y:0,width:0,height:0}),G()(V()(e),"hoveredItemId",""),G()(V()(e),"componentDidMount",(function(){e.props.courseId&&e.fetchCourseVideos()})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.videoId,r=e.props,i=r.courseId,a=r.videoId,o=r.displayCoverImage;i&&n!==a&&(o({image:e.SCItemCoverImage}),e.setState({isLoading:!0,hoveredIndex:null},e.fetchCourseVideos))})),G()(V()(e),"componentWillUnmount",(function(){e.setState=function(e,t){}})),G()(V()(e),"fetchCourseVideos",Object(Y.debounce)((function(){var t=e.props,n=t.courseId,r=t.childCount,i=t.getCourseVideos,a=t.isPrCourseMaster,o=x.g.VIDEO_CATEGORY,s=x.c.getCurrentVideoCategory(),l=x.c.getDataFromUrl().filter,c=void 0===l?x.g.VIDEO_COMPOSING_FILTER_DEFAULT:l;!n||-1==n||r<=0||![o.EXPLORING,o.LEARNING,o.COMPOSING].includes(s)?e.setState({isLoading:!1}):(e.setState({isLoading:!0}),i({courseId:n,primary:a,filter:c},(function(t){var n=t.courseId,r=t.response;e.props.courseId===n&&(e.fetchedCourseId=n,e.setState({items:r,isLoading:!1},(function(){e.handleItemMouseHover(null,e.state.hoveredIndex)})))})))}),1e3)),G()(V()(e),"handleItemClick",(function(t){var n=x.g.SEARCH_PARAM,r=t.uid,i=t.cognitiveVideo,a=(i=void 0===i?{}:i).childCount,o=e.props.courseId;e.SCItemCoverImage=t.thumbnailUrl,e.setState({hoveredIndex:null}),x.c.addURLSearchParams([[n.KEY.COURSE_ID,o]],!1,!1,{subVideoId:r,level:a>0?1:void 0})})),G()(V()(e),"handleItemMouseHover",(function(t,n){var r=e.props,i=r.displayCoverImage,a=r.onMouseEnterSubItem,o=e.state,s=o.isLoading,l=o.items;if(e.setState({hoveredIndex:n}),!s){var c=l[n];c&&(a(t),i({image:null==c?void 0:c.thumbnailUrl}))}})),G()(V()(e),"handleItemMouseLeave",(function(t){var n=e.props,r=n.displayCoverImage;(0,n.onMouseLeaveSubItem)(t),r({image:""}),e.setState({hoveredIndex:null})})),G()(V()(e),"handleListScroll",Object(Y.throttle)((function(t){var n=t.offset.x,r=e.mousePos,i=r.width,a=r.height,o=r.x,s=r.y,l=(i-e.space)/4,c=a-2*e.space-e.scrollbarHeight,u=n+o;if(u%l<e.space||s<e.space||s>e.space+c);else{var d=Math.ceil(u/l)-1;d!==e.state.hoveredIndex&&e.handleItemMouseHover(null,d)}}),50)),G()(V()(e),"handleListMouseMove",(function(t){if(t.currentTarget){var n=t.currentTarget.getBoundingClientRect();e.mousePos.x=t.clientX-n.left,e.mousePos.y=t.clientY-n.top,e.mousePos.width=n.width,e.mousePos.height=n.height}else e.mousePos={x:0,y:0,width:0,height:0}})),G()(V()(e),"activateItemByIndex",(function(t){var n=e.state.items[t];n&&e.handleItemClick(n)})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.childCount,n=e.isCourseMaster,r=e.isPrCourseMaster,i=this.state,a=i.items,o=i.isLoading,s=i.hoveredIndex;return v.a.createElement(CB,{items:a,childCount:t,isLoading:o,isCourseMaster:n,isPrCourseMaster:r,hoveredIndex:s,onItemClick:this.handleItemClick,onItemMouseHover:this.handleItemMouseHover,onItemMouseLeave:this.handleItemMouseLeave,onListScroll:t>4?this.handleListScroll:null,onListMouseMove:t>4?this.handleListMouseMove:null})}}]),n}(v.a.Component),kB=Object(q.b)((function(e){return tw()(e),{}}),(function(e){return{displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))},getCourseVideos:function(t,n,r){return e(Q.e.getCourseVideos(t,n,r))}}}),null,{forwardRef:!0})(TB),xB=r(1036),OB=r.n(xB);function IB(e){var t=Object(g.useRef)();return Object(g.useEffect)((function(){t.current=e}),[e]),t.current}Object(q.b)((function(e){return{activeVideoId:e.cogvid.cogvidDetails.videoId}}),(function(e){return{getVideoDescription:function(t,n,r){return e(Q.e.getVideoDescription(t,n,r))}}}))((function(e){var t=e.videoId,n=e.videoScaffId,r=(e.activeVideoId,e.className),i=e.onActivateChapterById,a=e.getVideoDescription,o=Object(g.useState)(!1),s=pi()(o,2),l=s[0],c=s[1],u=Object(g.useState)(e.description),d=pi()(u,2),h=d[0],f=d[1],p=IB(t),m=IB(e.description);return Object(g.useEffect)((function(){t&&p!==t&&!h&&(c(!0),a({videoId:t,scaffId:n},(function(e){f(e),Object(Y.delay)((function(){c(!1)}),250)}),(function(){c(!1)})))}),[t]),Object(g.useEffect)((function(){p===t&&m!==e.description&&f(e.description)}),[e.description]),v.a.createElement("div",{className:P()(OB.a.videoDescriptionLayer,"fv-custom-scroll",r)},l&&v.a.createElement(Nn,{className:"text-primary"}),v.a.createElement(i7,{data:h,onActivateChapterById:i}))}));var MB=v.a.createContext(null);MB.displayName="AccordionContext";var PB=MB,DB=["as","children","eventKey","onClick"];var NB,LB=v.a.forwardRef((function(e,t){var n=e.as,r=void 0===n?"button":n,i=e.children,a=e.eventKey,o=e.onClick,s=Object(y.a)(e,DB),l=function(e,t){var n=Object(g.useContext)(PB),r=Object(g.useContext)(De);return function(i){r&&r(e===n?null:e,i),t&&t(i)}}(a,o);return"button"===r&&(s.type="button"),v.a.createElement(r,Object(b.a)({ref:t,onClick:l},s),i)})),RB=r(177),BB=r(196),jB=r(404),FB=r(221),UB=r(403),HB=["onEnter","onEntering","onEntered","onExit","onExiting","className","children","dimension","getDimensionValue"],zB={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function VB(e,t){var n=t["offset"+e[0].toUpperCase()+e.slice(1)],r=zB[e];return n+parseInt(Object(RB.a)(t,r[0]),10)+parseInt(Object(RB.a)(t,r[1]),10)}var WB=((NB={})[BB.c]="collapse",NB[BB.d]="collapsing",NB[BB.b]="collapsing",NB[BB.a]="collapse show",NB),GB={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,getDimensionValue:VB},qB=v.a.forwardRef((function(e,t){var n=e.onEnter,r=e.onEntering,i=e.onEntered,a=e.onExit,o=e.onExiting,s=e.className,l=e.children,c=e.dimension,u=void 0===c?"height":c,d=e.getDimensionValue,h=void 0===d?VB:d,f=Object(y.a)(e,HB),p="function"==typeof u?u():u,m=Object(g.useMemo)((function(){return Object(FB.a)((function(e){e.style[p]="0"}),n)}),[p,n]),A=Object(g.useMemo)((function(){return Object(FB.a)((function(e){var t="scroll"+p[0].toUpperCase()+p.slice(1);e.style[p]=e[t]+"px"}),r)}),[p,r]),w=Object(g.useMemo)((function(){return Object(FB.a)((function(e){e.style[p]=null}),i)}),[p,i]),E=Object(g.useMemo)((function(){return Object(FB.a)((function(e){e.style[p]=h(p,e)+"px",Object(UB.a)(e)}),a)}),[a,h,p]),S=Object(g.useMemo)((function(){return Object(FB.a)((function(e){e.style[p]=null}),o)}),[p,o]);return v.a.createElement(BB.e,Object(b.a)({ref:t,addEndListener:jB.a},f,{"aria-expanded":f.role?f.in:null,onEnter:m,onEntering:A,onEntered:w,onExit:E,onExiting:S}),(function(e,t){return v.a.cloneElement(l,Object(b.a)({},t,{className:_()(s,l.props.className,WB[e],"width"===p&&"width")}))}))}));qB.defaultProps=GB;var YB=qB,KB=["children","eventKey"],XB=v.a.forwardRef((function(e,t){var n=e.children,r=e.eventKey,i=Object(y.a)(e,KB),a=Object(g.useContext)(PB);return v.a.createElement(De.Provider,{value:null},v.a.createElement(YB,Object(b.a)({ref:t,in:a===r},i),v.a.createElement("div",null,v.a.Children.only(n))))}));XB.displayName="AccordionCollapse";var QB=XB,$B=["as","activeKey","bsPrefix","children","className","onSelect"],JB=v.a.forwardRef((function(e,t){var n=Object(Ie.a)(e,{activeKey:"onSelect"}),r=n.as,i=void 0===r?"div":r,a=n.activeKey,o=n.bsPrefix,s=n.children,l=n.className,c=n.onSelect,u=Object(y.a)(n,$B),d=_()(l,Object(w.a)(o,"accordion"));return v.a.createElement(PB.Provider,{value:a||null},v.a.createElement(De.Provider,{value:c||null},v.a.createElement(i,Object(b.a)({ref:t},u,{className:d}),s)))}));JB.displayName="Accordion",JB.Toggle=LB,JB.Collapse=QB;var ZB=JB,ej=r(341),tj=r.n(ej);var nj=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{active:e.props.defaultOpen}),G()(V()(e),"handlePanelToggle",(function(){e.setState((function(e){return{active:!e.active}}))})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.disabled,n=e.eventKey,r=void 0===n?"0":n,i=e.className,a=e.classNameHeader,o=e.classNameBody,s=e.header,l=e.children,c=this.state.active;return t?v.a.createElement(v.a.Fragment,null,s,l):v.a.createElement(ZB,{activeKey:c?r:null,className:P()(tj.a.accordion,i)},v.a.createElement(Tn,{className:tj.a.card},v.a.createElement(ZB.Toggle,{as:Tn.Header,eventKey:r,className:P()(tj.a.cardHeader,a),onClick:this.handlePanelToggle},v.a.createElement("div",{className:"text-truncate"},s),v.a.createElement("i",{className:"fv fuvi-s-arrow-".concat(c?"up":"down"," text-primary ml-2")})),v.a.createElement(ZB.Collapse,{eventKey:r},v.a.createElement(Tn.Body,{className:P()(tj.a.cardBody,o)},l))))}}]),n}(v.a.Component);nj.propTypes={defaultOpen:ne.a.bool,header:ne.a.node,className:ne.a.string,classNameHeader:ne.a.string},nj.defaultProps={defaultOpen:!1};var rj=nj,ij=r(552),aj=r.n(ij);var oj=
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function(){return function e(){e.called=!0}};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class sj{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=oj(),this.off=oj()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const lj=new Array(256).fill().map((e,t)=>("0"+t.toString(16)).slice(-2));function cj(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0;return"e"+lj[e>>0&255]+lj[e>>8&255]+lj[e>>16&255]+lj[e>>24&255]+lj[t>>0&255]+lj[t>>8&255]+lj[t>>16&255]+lj[t>>24&255]+lj[n>>0&255]+lj[n>>8&255]+lj[n>>16&255]+lj[n>>24&255]+lj[r>>0&255]+lj[r>>8&255]+lj[r>>16&255]+lj[r>>24&255]}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */var uj={get(e){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function dj(e,t){const n=uj.get(t.priority);for(let r=0;r<e.length;r++)if(uj.get(e[r].priority)<n)return void e.splice(r,0,t);e.push(t)}r(236);var hj=r(19);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const fj=Symbol("listeningTo"),pj=Symbol("emitterId");var mj={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){let r=!1;this.listenTo(this,e,(function(e,...n){r||(r=!0,e.off(),t.call(this,e,...n))}),n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,r={}){let i,a;this[fj]||(this[fj]={});const o=this[fj];vj(e)||gj(e);const s=vj(e);(i=o[s])||(i=o[s]={emitter:e,callbacks:{}}),(a=i.callbacks[t])||(a=i.callbacks[t]=[]),a.push(n),function(e,t,n,r,i){t._addEventListener?t._addEventListener(n,r,i):e._addEventListener.call(t,n,r,i)}(this,e,t,n,r)},stopListening(e,t,n){const r=this[fj];let i=e&&vj(e);const a=r&&i&&r[i],o=a&&t&&a.callbacks[t];if(!(!r||e&&!a||t&&!o))if(n){_j(this,e,t,n),-1!==o.indexOf(n)&&(1===o.length?delete a.callbacks[t]:_j(this,e,t,n))}else if(o){for(;n=o.pop();)_j(this,e,t,n);delete a.callbacks[t]}else if(a){for(t in a.callbacks)this.stopListening(e,t);delete r[i]}else{for(i in r)this.stopListening(r[i].emitter);delete this[fj]}},fire(e,...t){try{const n=e instanceof sj?e:new sj(this,e),r=n.name;let i=function e(t,n){let r;if(!t._events||!(r=t._events[n])||!r.callbacks.length)return n.indexOf(":")>-1?e(t,n.substr(0,n.lastIndexOf(":"))):null;return r.callbacks}(this,r);if(n.path.push(this),i){const e=[n,...t];i=Array.from(i);for(let t=0;t<i.length&&(i[t].callback.apply(this,e),n.off.called&&(delete n.off.called,this._removeEventListener(r,i[t].callback)),!n.stop.called);t++);}if(this._delegations){const e=this._delegations.get(r),i=this._delegations.get("*");e&&Aj(e,n,t),i&&Aj(i,n,t)}return n.return}catch(e){hj.a.rethrowUnexpectedError(e,this)}},delegate(...e){return{to:(t,n)=>{this._delegations||(this._delegations=new Map),e.forEach(e=>{const r=this._delegations.get(e);r?r.set(t,n):this._delegations.set(e,new Map([[t,n]]))})}}},stopDelegating(e,t){if(this._delegations)if(e)if(t){const n=this._delegations.get(e);n&&n.delete(t)}else this._delegations.delete(e);else this._delegations.clear()},_addEventListener(e,t,n){!function(e,t){const n=bj(e);if(n[t])return;let r=t,i=null;const a=[];for(;""!==r&&!n[r];)n[r]={callbacks:[],childEvents:[]},a.push(n[r]),i&&n[r].childEvents.push(i),i=r,r=r.substr(0,r.lastIndexOf(":"));if(""!==r){for(const e of a)e.callbacks=n[r].callbacks.slice();n[r].childEvents.push(i)}}(this,e);const r=yj(this,e),i={callback:t,priority:uj.get(n.priority)};for(const e of r)dj(e,i)},_removeEventListener(e,t){const n=yj(this,e);for(const e of n)for(let n=0;n<e.length;n++)e[n].callback==t&&(e.splice(n,1),n--)}};function gj(e,t){e[pj]||(e[pj]=t||cj())}function vj(e){return e[pj]}function bj(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function yj(e,t){const n=bj(e)[t];if(!n)return[];let r=[n.callbacks];for(let t=0;t<n.childEvents.length;t++){const i=yj(e,n.childEvents[t]);r=r.concat(i)}return r}function Aj(e,t,n){for(let[r,i]of e){i?"function"==typeof i&&(i=i(t.name)):i=t.name;const e=new sj(t.source,i);e.path=[...t.path],r.fire(e,...n)}}function _j(e,t,n,r){t._removeEventListener?t._removeEventListener(n,r):e._removeEventListener.call(t,n,r)}var wj,Ej=function(e){if(!vv(e))return!1;var t=xv(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Sj=bv.a["__core-js_shared__"],Cj=(wj=/[^.]+$/.exec(Sj&&Sj.keys&&Sj.keys.IE_PROTO||""))?"Symbol(src)_1."+wj:"";var Tj=function(e){return!!Cj&&Cj in e},kj=Function.prototype.toString;var xj=function(e){if(null!=e){try{return kj.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Oj=/^\[object .+?Constructor\]$/,Ij=Function.prototype,Mj=Object.prototype,Pj=Ij.toString,Dj=Mj.hasOwnProperty,Nj=RegExp("^"+Pj.call(Dj).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Lj=function(e){return!(!vv(e)||Tj(e))&&(Ej(e)?Nj:Oj).test(xj(e))};var Rj=function(e,t){return null==e?void 0:e[t]};var Bj=function(e,t){var n=Rj(e,t);return Lj(n)?n:void 0},jj=function(){try{var e=Bj(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Fj=function(e,t,n){"__proto__"==t&&jj?jj(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Uj=function(e,t){return e===t||e!=e&&t!=t},Hj=Object.prototype.hasOwnProperty;var zj=function(e,t,n){var r=e[t];Hj.call(e,t)&&Uj(r,n)&&(void 0!==n||t in e)||Fj(e,t,n)};var Vj=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?Fj(n,s,l):zj(n,s,l)}return n};var Wj=function(e){return e};var Gj=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},qj=Math.max;var Yj=function(e,t,n){return t=qj(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=qj(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Gj(e,this,s)}};var Kj=function(e){return function(){return e}},Xj=jj?function(e,t){return jj(e,"toString",{configurable:!0,enumerable:!1,value:Kj(t),writable:!0})}:Wj,Qj=Date.now;var $j=function(e){var t=0,n=0;return function(){var r=Qj(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Xj);var Jj=function(e,t){return $j(Yj(e,t,Wj),e+"")};var Zj=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var eF=function(e){return null!=e&&Zj(e.length)&&!Ej(e)},tF=/^(?:0|[1-9]\d*)$/;var nF=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&tF.test(e))&&e>-1&&e%1==0&&e<t};var rF=function(e,t,n){if(!vv(n))return!1;var r=typeof t;return!!("number"==r?eF(n)&&nF(t,n.length):"string"==r&&t in n)&&Uj(n[t],e)};var iF=function(e){return Jj((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&rF(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))};var aF=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var oF=function(e){return Ov(e)&&"[object Arguments]"==xv(e)},sF=Object.prototype,lF=sF.hasOwnProperty,cF=sF.propertyIsEnumerable,uF=oF(function(){return arguments}())?oF:function(e){return Ov(e)&&lF.call(e,"callee")&&!cF.call(e,"callee")},dF=Array.isArray,hF=r(204),fF={};fF["[object Float32Array]"]=fF["[object Float64Array]"]=fF["[object Int8Array]"]=fF["[object Int16Array]"]=fF["[object Int32Array]"]=fF["[object Uint8Array]"]=fF["[object Uint8ClampedArray]"]=fF["[object Uint16Array]"]=fF["[object Uint32Array]"]=!0,fF["[object Arguments]"]=fF["[object Array]"]=fF["[object ArrayBuffer]"]=fF["[object Boolean]"]=fF["[object DataView]"]=fF["[object Date]"]=fF["[object Error]"]=fF["[object Function]"]=fF["[object Map]"]=fF["[object Number]"]=fF["[object Object]"]=fF["[object RegExp]"]=fF["[object Set]"]=fF["[object String]"]=fF["[object WeakMap]"]=!1;var pF=function(e){return Ov(e)&&Zj(e.length)&&!!fF[xv(e)]};var mF=function(e){return function(t){return e(t)}},gF=r(205),vF=gF.a&&gF.a.isTypedArray,bF=vF?mF(vF):pF,yF=Object.prototype.hasOwnProperty;var AF=function(e,t){var n=dF(e),r=!n&&uF(e),i=!n&&!r&&Object(hF.a)(e),a=!n&&!r&&!i&&bF(e),o=n||r||i||a,s=o?aF(e.length,String):[],l=s.length;for(var c in e)!t&&!yF.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||nF(c,l))||s.push(c);return s},_F=Object.prototype;var wF=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_F)};var EF=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},SF=Object.prototype.hasOwnProperty;var CF=function(e){if(!vv(e))return EF(e);var t=wF(e),n=[];for(var r in e)("constructor"!=r||!t&&SF.call(e,r))&&n.push(r);return n};var TF=function(e){return eF(e)?AF(e,!0):CF(e)},kF=iF((function(e,t){Vj(t,TF(t),e)}));
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const xF=Symbol("observableProperties"),OF=Symbol("boundObservables"),IF=Symbol("boundProperties"),MF=Symbol("decoratedMethods"),PF=Symbol("decoratedOriginal"),DF={set(e,t){if(vv(e))return void Object.keys(e).forEach(t=>{this.set(t,e[t])},this);LF(this);const n=this[xF];if(e in this&&!n.has(e))throw new hj.a("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>n.get(e),set(t){const r=n.get(e);let i=this.fire("set:"+e,e,t,r);void 0===i&&(i=t),r===i&&n.has(e)||(n.set(e,i),this.fire("change:"+e,e,i,r))}}),this[e]=t},bind(...e){if(!e.length||!jF(e))throw new hj.a("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new hj.a("observable-bind-duplicate-properties",this);LF(this);const t=this[IF];e.forEach(e=>{if(t.has(e))throw new hj.a("observable-bind-rebind",this)});const n=new Map;return e.forEach(e=>{const r={property:e,to:[]};t.set(e,r),n.set(e,r)}),{to:RF,toMany:BF,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!this[xF])return;const t=this[IF],n=this[OF];if(e.length){if(!jF(e))throw new hj.a("observable-unbind-wrong-properties",this);e.forEach(e=>{const r=t.get(e);if(!r)return;let i,a,o,s;r.to.forEach(e=>{i=e[0],a=e[1],o=n.get(i),s=o[a],s.delete(r),s.size||delete o[a],Object.keys(o).length||(n.delete(i),this.stopListening(i,"change"))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,"change")}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new hj.a("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)},this[e][PF]=t,this[MF]||(this[MF]=[]),this[MF].push(e)}};kF(DF,mj),DF.stopListening=function(e,t,n){if(!e&&this[MF]){for(const e of this[MF])this[e]=this[e][PF];delete this[MF]}mj.stopListening.call(this,e,t,n)};var NF=DF;function LF(e){e[xF]||(Object.defineProperty(e,xF,{value:new Map}),Object.defineProperty(e,OF,{value:new Map}),Object.defineProperty(e,IF,{value:new Map}))}function RF(...e){const t=function(...e){if(!e.length)throw new hj.a("observable-bind-to-parse-error",null);const t={to:[]};let n;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach(e=>{if("string"==typeof e)n.properties.push(e);else{if("object"!=typeof e)throw new hj.a("observable-bind-to-parse-error",null);n={observable:e,properties:[]},t.to.push(n)}}),t}(...e),n=Array.from(this._bindings.keys()),r=n.length;if(!t.callback&&t.to.length>1)throw new hj.a("observable-bind-to-no-callback",this);if(r>1&&t.callback)throw new hj.a("observable-bind-to-extra-callback",this);var i;
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */t.to.forEach(e=>{if(e.properties.length&&e.properties.length!==r)throw new hj.a("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),i=this._observable,this._to.forEach(e=>{const t=i[OF];let n;t.get(e.observable)||i.listenTo(e.observable,"change",(r,a)=>{n=t.get(e.observable)[a],n&&n.forEach(e=>{FF(i,e.property)})})}),function(e){let t;e._bindings.forEach((n,r)=>{e._to.forEach(i=>{t=i.properties[n.callback?0:e._bindProperties.indexOf(r)],n.to.push([i.observable,t]),function(e,t,n,r){const i=e[OF],a=i.get(n),o=a||{};o[r]||(o[r]=new Set);o[r].add(t),a||i.set(n,o)}(e._observable,n,i.observable,t)})})}(this),this._bindProperties.forEach(e=>{FF(this._observable,e)})}function BF(e,t,n){if(this._bindings.size>1)throw new hj.a("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const n=e.map(e=>[e,t]);return Array.prototype.concat.apply([],n)}(e,t),n)}function jF(e){return e.every(e=>"string"==typeof e)}function FF(e,t){const n=e[IF].get(t);let r;n.callback?r=n.callback.apply(e,n.to.map(e=>e[0][e[1]])):(r=n.to[0],r=r[0][r[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=r:e.set(t,r)}function UF(e,...t){t.forEach(t=>{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach(n=>{if(n in e.prototype)return;const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable=!1,Object.defineProperty(e.prototype,n,r)})})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class HF{constructor(e){this.editor=e,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",zF,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",zF),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function zF(e){e.return=!1,e.stop()}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */UF(HF,NF);class VF{constructor(e){this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this.affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",e=>{this.isEnabled||e.stop()},{priority:"high"}),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",WF,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",WF),this.refresh())}execute(){}destroy(){this.stopListening()}}function WF(e){e.return=!1,e.stop()}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */UF(VF,NF);class GF extends VF{constructor(e){super(e),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={priority:"normal"}){dj(this._childCommandsDefinitions,{command:e,priority:t.priority}),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find(({command:e})=>e.isEnabled);return e&&e.command}}var qF=function(e,t){return function(n){return e(t(n))}},YF=qF(Object.getPrototypeOf,Object),KF=Function.prototype,XF=Object.prototype,QF=KF.toString,$F=XF.hasOwnProperty,JF=QF.call(Object);var ZF=function(e){if(!Ov(e)||"[object Object]"!=xv(e))return!1;var t=YF(e);if(null===t)return!0;var n=$F.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&QF.call(n)==JF};var eU=function(){this.__data__=[],this.size=0};var tU=function(e,t){for(var n=e.length;n--;)if(Uj(e[n][0],t))return n;return-1},nU=Array.prototype.splice;var rU=function(e){var t=this.__data__,n=tU(t,e);return!(n<0)&&(n==t.length-1?t.pop():nU.call(t,n,1),--this.size,!0)};var iU=function(e){var t=this.__data__,n=tU(t,e);return n<0?void 0:t[n][1]};var aU=function(e){return tU(this.__data__,e)>-1};var oU=function(e,t){var n=this.__data__,r=tU(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function sU(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sU.prototype.clear=eU,sU.prototype.delete=rU,sU.prototype.get=iU,sU.prototype.has=aU,sU.prototype.set=oU;var lU=sU;var cU=function(){this.__data__=new lU,this.size=0};var uU=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var dU=function(e){return this.__data__.get(e)};var hU=function(e){return this.__data__.has(e)},fU=Bj(bv.a,"Map"),pU=Bj(Object,"create");var mU=function(){this.__data__=pU?pU(null):{},this.size=0};var gU=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},vU=Object.prototype.hasOwnProperty;var bU=function(e){var t=this.__data__;if(pU){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return vU.call(t,e)?t[e]:void 0},yU=Object.prototype.hasOwnProperty;var AU=function(e){var t=this.__data__;return pU?void 0!==t[e]:yU.call(t,e)};var _U=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pU&&void 0===t?"__lodash_hash_undefined__":t,this};function wU(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wU.prototype.clear=mU,wU.prototype.delete=gU,wU.prototype.get=bU,wU.prototype.has=AU,wU.prototype.set=_U;var EU=wU;var SU=function(){this.size=0,this.__data__={hash:new EU,map:new(fU||lU),string:new EU}};var CU=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var TU=function(e,t){var n=e.__data__;return CU(t)?n["string"==typeof t?"string":"hash"]:n.map};var kU=function(e){var t=TU(this,e).delete(e);return this.size-=t?1:0,t};var xU=function(e){return TU(this,e).get(e)};var OU=function(e){return TU(this,e).has(e)};var IU=function(e,t){var n=TU(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function MU(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}MU.prototype.clear=SU,MU.prototype.delete=kU,MU.prototype.get=xU,MU.prototype.has=OU,MU.prototype.set=IU;var PU=MU;var DU=function(e,t){var n=this.__data__;if(n instanceof lU){var r=n.__data__;if(!fU||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new PU(r)}return n.set(e,t),this.size=n.size,this};function NU(e){var t=this.__data__=new lU(e);this.size=t.size}NU.prototype.clear=cU,NU.prototype.delete=uU,NU.prototype.get=dU,NU.prototype.has=hU,NU.prototype.set=DU;var LU=NU;var RU=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},BU=qF(Object.keys,Object),jU=Object.prototype.hasOwnProperty;var FU=function(e){if(!wF(e))return BU(e);var t=[];for(var n in Object(e))jU.call(e,n)&&"constructor"!=n&&t.push(n);return t};var UU=function(e){return eF(e)?AF(e):FU(e)};var HU=function(e,t){return e&&Vj(t,UU(t),e)};var zU=function(e,t){return e&&Vj(t,TF(t),e)},VU=r(420);var WU=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var GU=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a};var qU=function(){return[]},YU=Object.prototype.propertyIsEnumerable,KU=Object.getOwnPropertySymbols,XU=KU?function(e){return null==e?[]:(e=Object(e),GU(KU(e),(function(t){return YU.call(e,t)})))}:qU;var QU=function(e,t){return Vj(e,XU(e),t)};var $U=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},JU=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)$U(t,XU(e)),e=YF(e);return t}:qU;var ZU=function(e,t){return Vj(e,JU(e),t)};var eH=function(e,t,n){var r=t(e);return dF(e)?r:$U(r,n(e))};var tH=function(e){return eH(e,UU,XU)};var nH=function(e){return eH(e,TF,JU)},rH=Bj(bv.a,"DataView"),iH=Bj(bv.a,"Promise"),aH=Bj(bv.a,"Set"),oH=Bj(bv.a,"WeakMap"),sH=xj(rH),lH=xj(fU),cH=xj(iH),uH=xj(aH),dH=xj(oH),hH=xv;(rH&&"[object DataView]"!=hH(new rH(new ArrayBuffer(1)))||fU&&"[object Map]"!=hH(new fU)||iH&&"[object Promise]"!=hH(iH.resolve())||aH&&"[object Set]"!=hH(new aH)||oH&&"[object WeakMap]"!=hH(new oH))&&(hH=function(e){var t=xv(e),n="[object Object]"==t?e.constructor:void 0,r=n?xj(n):"";if(r)switch(r){case sH:return"[object DataView]";case lH:return"[object Map]";case cH:return"[object Promise]";case uH:return"[object Set]";case dH:return"[object WeakMap]"}return t});var fH=hH,pH=Object.prototype.hasOwnProperty;var mH=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&pH.call(e,"index")&&(n.index=e.index,n.input=e.input),n},gH=bv.a.Uint8Array;var vH=function(e){var t=new e.constructor(e.byteLength);return new gH(t).set(new gH(e)),t};var bH=function(e,t){var n=t?vH(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},yH=/\w*$/;var AH=function(e){var t=new e.constructor(e.source,yH.exec(e));return t.lastIndex=e.lastIndex,t},_H=yv?yv.prototype:void 0,wH=_H?_H.valueOf:void 0;var EH=function(e){return wH?Object(wH.call(e)):{}};var SH=function(e,t){var n=t?vH(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var CH=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return vH(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return bH(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return SH(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return AH(e);case"[object Set]":return new r;case"[object Symbol]":return EH(e)}},TH=Object.create,kH=function(){function e(){}return function(t){if(!vv(t))return{};if(TH)return TH(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var xH=function(e){return"function"!=typeof e.constructor||wF(e)?{}:kH(YF(e))};var OH=function(e){return Ov(e)&&"[object Map]"==fH(e)},IH=gF.a&&gF.a.isMap,MH=IH?mF(IH):OH;var PH=function(e){return Ov(e)&&"[object Set]"==fH(e)},DH=gF.a&&gF.a.isSet,NH=DH?mF(DH):PH,LH={};LH["[object Arguments]"]=LH["[object Array]"]=LH["[object ArrayBuffer]"]=LH["[object DataView]"]=LH["[object Boolean]"]=LH["[object Date]"]=LH["[object Float32Array]"]=LH["[object Float64Array]"]=LH["[object Int8Array]"]=LH["[object Int16Array]"]=LH["[object Int32Array]"]=LH["[object Map]"]=LH["[object Number]"]=LH["[object Object]"]=LH["[object RegExp]"]=LH["[object Set]"]=LH["[object String]"]=LH["[object Symbol]"]=LH["[object Uint8Array]"]=LH["[object Uint8ClampedArray]"]=LH["[object Uint16Array]"]=LH["[object Uint32Array]"]=!0,LH["[object Error]"]=LH["[object Function]"]=LH["[object WeakMap]"]=!1;var RH=function e(t,n,r,i,a,o){var s,l=1&n,c=2&n,u=4&n;if(r&&(s=a?r(t,i,a,o):r(t)),void 0!==s)return s;if(!vv(t))return t;var d=dF(t);if(d){if(s=mH(t),!l)return WU(t,s)}else{var h=fH(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(Object(hF.a)(t))return Object(VU.a)(t,l);if("[object Object]"==h||"[object Arguments]"==h||f&&!a){if(s=c||f?{}:xH(t),!l)return c?ZU(t,zU(s,t)):QU(t,HU(s,t))}else{if(!LH[h])return a?t:{};s=CH(t,h,l)}}o||(o=new LU);var p=o.get(t);if(p)return p;o.set(t,s),NH(t)?t.forEach((function(i){s.add(e(i,n,r,i,t,o))})):MH(t)&&t.forEach((function(i,a){s.set(a,e(i,n,r,a,t,o))}));var m=d?void 0:(u?c?nH:tH:c?TF:UU)(t);return RU(m||t,(function(i,a){m&&(i=t[a=i]),zj(s,a,e(i,n,r,a,t,o))})),s};var BH=function(e,t){return RH(e,5,t="function"==typeof t?t:void 0)};var jH=function(e){return Ov(e)&&1===e.nodeType&&!ZF(e)};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class FH{constructor(e,t){this._config={},t&&this.define(UH(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,n,r=!1){if(ZF(t))return void this._setObjectToTarget(e,t,r);const i=t.split(".");t=i.pop();for(const t of i)ZF(e[t])||(e[t]={}),e=e[t];if(ZF(n))return ZF(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,r);r&&void 0!==e[t]||(e[t]=n)}_getFromSource(e,t){const n=t.split(".");t=n.pop();for(const t of n){if(!ZF(e[t])){e=null;break}e=e[t]}return e?UH(e[t]):void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach(r=>{this._setToTarget(e,r,t[r],n)})}}function UH(e){return BH(e,HH)}function HH(e){return jH(e)?e:void 0}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function zH(e){return!(!e||!e[Symbol.iterator])}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class VH{constructor(e={},t={}){const n=zH(e);if(n||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new hj.a("collection-add-item-invalid-index",this);for(let n=0;n<e.length;n++){const r=e[n],i=this._getItemIdBeforeAdding(r),a=t+n;this._items.splice(a,0,r),this._itemMap.set(i,r),this.fire("add",r,a)}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new hj.a("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}remove(e){const[t,n]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:n}),t}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new hj.a("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding(t=>new e(t))},using:e=>{"function"==typeof e?this._setUpBindToBinding(t=>e(t)):this._setUpBindToBinding(t=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,r,i)=>{const a=t._bindToCollection==this,o=t._bindToInternalToExternalMap.get(r);if(a&&o)this._bindToExternalToInternalMap.set(r,o),this._bindToInternalToExternalMap.set(o,r);else{const n=e(r);if(!n)return void this._skippedIndexesFromExternal.push(i);let a=i;for(const e of this._skippedIndexesFromExternal)i>e&&a--;for(const e of t._skippedIndexesFromExternal)a>=e&&a++;this._bindToExternalToInternalMap.set(r,n),this._bindToInternalToExternalMap.set(n,r),this.add(n,a);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)a<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)n(0,e,t.getIndex(e));this.listenTo(t,"add",n),this.listenTo(t,"remove",(e,t,n)=>{const r=this._bindToExternalToInternalMap.get(t);r&&this.remove(r),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(n<t&&e.push(t-1),n>t&&e.push(t),e),[])})}_getItemIdBeforeAdding(e){const t=this._idProperty;let n;if(t in e){if(n=e[t],"string"!=typeof n)throw new hj.a("collection-add-invalid-id",this);if(this.get(n))throw new hj.a("collection-add-item-already-exists",this)}else e[t]=n=cj();return n}_remove(e){let t,n,r,i=!1;const a=this._idProperty;if("string"==typeof e?(n=e,r=this._itemMap.get(n),i=!r,r&&(t=this._items.indexOf(r))):"number"==typeof e?(t=e,r=this._items[t],i=!r,r&&(n=r[a])):(r=e,n=r[a],t=this._items.indexOf(r),i=-1==t||!this._itemMap.get(n)),i)throw new hj.a("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(n);const o=this._bindToInternalToExternalMap.get(r);return this._bindToInternalToExternalMap.delete(r),this._bindToExternalToInternalMap.delete(o),this.fire("remove",r,t),[r,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}UF(VH,mj);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class WH{constructor(e,t=[],n=[]){this._context=e,this._plugins=new Map,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of n)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new hj.a("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],n=[]){const r=this,i=this._context;!function e(t,n=new Set){t.forEach(t=>{s(t)&&(n.has(t)||(n.add(t),t.pluginName&&!r._availablePlugins.has(t.pluginName)&&r._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,n)))})}(e),d(e);const a=[...function e(t,n=new Set){return t.map(e=>s(e)?e:r._availablePlugins.get(e)).reduce((t,r)=>n.has(r)?t:(n.add(r),r.requires&&(d(r.requires,r),e(r.requires,n).forEach(e=>t.add(e))),t.add(r)),new Set)}(e.filter(e=>!c(e,t)))];!function(e,t){for(const n of t){if("function"!=typeof n)throw new hj.a("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const t=n.pluginName;if(!t)throw new hj.a("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new hj.a("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const i=r._availablePlugins.get(t);if(!i)throw new hj.a("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const a=e.indexOf(i);if(-1===a){if(r._contextPlugins.has(i))return;throw new hj.a("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(i.requires&&i.requires.length)throw new hj.a("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(a,1,n),r._availablePlugins.set(t,n)}}(a,n);const o=function(e){return e.map(e=>{const t=r._contextPlugins.get(e)||new e(i);return r._add(e,t),t})}(a);return h(o,"init").then(()=>h(o,"afterInit")).then(()=>o);function s(e){return"function"==typeof e}function l(e){return s(e)&&e.isContextPlugin}function c(e,t){return t.some(t=>t===e||(u(e)===t||u(t)===e))}function u(e){return s(e)?e.pluginName||e.name:e}function d(e,n=null){e.map(e=>s(e)?e:r._availablePlugins.get(e)||e).forEach(e=>{!function(e,t){if(s(e))return;if(t)throw new hj.a("plugincollection-soft-required",i,{missingPlugin:e,requiredBy:u(t)});throw new hj.a("plugincollection-plugin-not-found",i,{plugin:e})}(e,n),function(e,t){if(!l(t))return;if(l(e))return;throw new hj.a("plugincollection-context-required",i,{plugin:u(e),requiredBy:u(t)})}(e,n),function(e,n){if(!n)return;if(!c(e,t))return;throw new hj.a("plugincollection-required",i,{plugin:u(e),requiredBy:u(n)})}(e,n)})}function h(e,t){return e.reduce((e,n)=>n[t]?r._contextPlugins.has(n)?e:e.then(n[t].bind(n)):e,Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;if(n){if(this._plugins.has(n))throw new hj.a("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e});this._plugins.set(n,t)}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function GH(e){return Array.isArray(e)?e:[e]}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function qH(e,t,n=1){if("number"!=typeof n)throw new hj.a("translation-service-quantity-not-a-number",null,{quantity:n});const r=Object.keys(window.CKEDITOR_TRANSLATIONS).length;1===r&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]);const i=t.id||t.string;if(0===r||!function(e,t){return!!window.CKEDITOR_TRANSLATIONS[e]&&!!window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,i))return 1!==n?t.plural:t.string;const a=window.CKEDITOR_TRANSLATIONS[e].dictionary,o=window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1);if("string"==typeof a[i])return a[i];const s=Number(o(n));return a[i][s]}UF(WH,mj),window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const YH=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function KH(e){return YH.includes(e)?"rtl":"ltr"}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class XH{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=KH(this.uiLanguage),this.contentLanguageDirection=KH(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=GH(t),"string"==typeof e&&(e={string:e});const n=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,(e,n)=>n<t.length?t[n]:e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(qH(this.uiLanguage,e,n),t)}}class QH{constructor(e){this.config=new FH(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new WH(this,t);const n=this.config.get("language")||{};this.locale=new XH({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new VH,this._contextOwner=null}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const n of e.concat(t)){if("function"!=typeof n)throw new hj.a("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new hj.a("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,e=>e.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,t){if(this._contextOwner)throw new hj.a("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise(t=>{const n=new this(e);t(n.initPlugins().then(()=>n))})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class $H{constructor(e){this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function JH(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!=t[r])return r;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}UF($H,NF);var ZH=function(e){return RH(e,4)};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class ez{constructor(e){this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new hj.a("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),r=e.getAncestors(t);let i=0;for(;n[i]==r[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),r=JH(t,n);switch(r){case"prefix":return!0;case"extension":return!1;default:return t[r]<n[r]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire("change:"+e,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=ZH(this);return delete e.parent,e}is(e){return"node"===e||"view:node"===e}}UF(ez,mj);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class tz extends ez{constructor(e,t){super(e),this._textData=t}is(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof tz&&(this===e||this.data===e.data)}_clone(){return new tz(this.document,this.data)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class nz{constructor(e,t,n){if(this.textNode=e,t<0||t>e.data.length)throw new hj.a("view-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.data.length)throw new hj.a("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this.textNode:this.parent;for(;null!==n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function rz(e){return zH(e)?new Map(e):function(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class iz{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=az(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const r=az(n,e);r&&t.push({element:n,pattern:e,match:r})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function az(e,t){if("function"==typeof t)return t(e);const n={};return t.name&&(n.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!n.name)?null:t.attributes&&(n.attributes=function(e,t){const n=new Set(t.getAttributeKeys());ZF(e)?(void 0!==e.style&&Object(hj.b)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&Object(hj.b)("matcher-pattern-deprecated-attributes-class-key",e)):(n.delete("style"),n.delete("class"));return oz(e,n,e=>t.getAttribute(e))}(t.attributes,e),!n.attributes)?null:!(t.classes&&(n.classes=function(e,t){return oz(e,t.getClassNames())}(t.classes,e),!n.classes))&&(!(t.styles&&(n.styles=function(e,t){return oz(e,t.getStyleNames(!0),e=>t.getStyle(e))}(t.styles,e),!n.styles))&&n)}function oz(e,t,n){const r=function(e){if(Array.isArray(e))return e.map(e=>ZF(e)?(void 0!==e.key&&void 0!==e.value||Object(hj.b)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]);if(ZF(e))return Object.entries(e);return[[e,!0]]}(e),i=Array.from(t),a=[];return r.forEach(([e,t])=>{i.forEach(r=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,r)&&function(e,t,n){if(!0===e)return!0;const r=n(t);return e===r||e instanceof RegExp&&!!String(r).match(e)}(t,r,n)&&a.push(r)})}),!r.length||a.length<r.length?null:a}var sz=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lz=/^\w*$/;var cz=function(e,t){if(dF(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Iv(e))||(lz.test(e)||!sz.test(e)||null!=t&&e in Object(t))};function uz(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(uz.Cache||PU),n}uz.Cache=PU;var dz=uz;var hz=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fz=/\\(\\)?/g,pz=function(e){var t=dz(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(hz,(function(e,n,r,i){t.push(r?i.replace(fz,"$1"):n||e)})),t}));var mz=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},gz=yv?yv.prototype:void 0,vz=gz?gz.toString:void 0;var bz=function e(t){if("string"==typeof t)return t;if(dF(t))return mz(t,e)+"";if(Iv(t))return vz?vz.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var yz=function(e){return null==e?"":bz(e)};var Az=function(e,t){return dF(e)?e:cz(e,t)?[e]:pz(yz(e))};var _z=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var wz=function(e){if("string"==typeof e||Iv(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var Ez=function(e,t){for(var n=0,r=(t=Az(t,e)).length;null!=e&&n<r;)e=e[wz(t[n++])];return n&&n==r?e:void 0};var Sz=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a};var Cz=function(e,t){return t.length<2?e:Ez(e,Sz(t,0,-1))};var Tz=function(e,t){return t=Az(t,e),null==(e=Cz(e,t))||delete e[wz(_z(t))]};var kz=function(e,t){return null==e||Tz(e,t)};var xz=function(e,t,n){var r=null==e?void 0:Ez(e,t);return void 0===r?n:r};var Oz=function(e,t,n){(void 0===n||Uj(e[t],n))&&(void 0!==n||t in e)||Fj(e,t,n)};var Iz=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===n(a[l],l,a))break}return t}}();var Mz=function(e){return Ov(e)&&eF(e)};var Pz=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var Dz=function(e){return Vj(e,TF(e))};var Nz=function(e,t,n,r,i,a,o){var s=Pz(e,n),l=Pz(t,n),c=o.get(l);if(c)Oz(e,n,c);else{var u=a?a(s,l,n+"",e,t,o):void 0,d=void 0===u;if(d){var h=dF(l),f=!h&&Object(hF.a)(l),p=!h&&!f&&bF(l);u=l,h||f||p?dF(s)?u=s:Mz(s)?u=WU(s):f?(d=!1,u=Object(VU.a)(l,!0)):p?(d=!1,u=SH(l,!0)):u=[]:ZF(l)||uF(l)?(u=s,uF(s)?u=Dz(s):vv(s)&&!Ej(s)||(u=xH(l))):d=!1}d&&(o.set(l,u),i(u,l,r,a,o),o.delete(l)),Oz(e,n,u)}};var Lz=function e(t,n,r,i,a){t!==n&&Iz(n,(function(o,s){if(a||(a=new LU),vv(o))Nz(t,n,s,r,e,i,a);else{var l=i?i(Pz(t,s),o,s+"",t,n,a):void 0;void 0===l&&(l=o),Oz(t,s,l)}}),TF)},Rz=iF((function(e,t,n){Lz(e,t,n)}));var Bz=function(e,t,n,r){if(!vv(e))return e;for(var i=-1,a=(t=Az(t,e)).length,o=a-1,s=e;null!=s&&++i<a;){var l=wz(t[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=o){var u=s[l];void 0===(c=r?r(u,l,s):void 0)&&(c=vv(u)?u:nF(t[i+1])?[]:{})}zj(s,l,c),s=s[l]}return e};var jz=function(e,t,n){return null==e?e:Bz(e,t,n)};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Fz{constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){const e=Object.entries(this._styles);return!Array.from(e).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const t=Array.from(function(e){let t=null,n=0,r=0,i=null;const a=new Map;if(""===e)return a;";"!=e.charAt(e.length-1)&&(e+=";");for(let o=0;o<e.length;o++){const s=e.charAt(o);if(null===t)switch(s){case":":i||(i=e.substr(n,o-n),r=o+1);break;case'"':case"'":t=s;break;case";":{const t=e.substr(r,o-r);i&&a.set(i.trim(),t.trim()),i=null,n=o+1;break}}else s===t&&(t=null)}return a}(e).entries());for(const[e,n]of t)this._styleProcessor.toNormalizedForm(e,n,this._styles)}has(e){if(this.isEmpty)return!1;const t=this._styleProcessor.getReducedForm(e,this._styles).find(([t])=>t===e);return Array.isArray(t)}set(e,t){if(vv(e))for(const[t,n]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,n,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=Hz(e);kz(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map(e=>e.join(":")).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!vv(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find(([t])=>t===e);return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map(([e])=>e)}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const n of t)e.push(...this._styleProcessor.getReducedForm(n,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const n=t.splice(0,t.length-1).join("."),r=xz(this._styles,n);r&&!Array.from(Object.keys(r)).length&&this.remove(n)}}class Uz{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,n){if(vv(t))zz(n,Hz(e),t);else if(this._normalizers.has(e)){const r=this._normalizers.get(e),{path:i,value:a}=r(t);zz(n,i,a)}else zz(n,e,t)}getNormalized(e,t){if(!e)return Rz({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const n=this._extractors.get(e);if("string"==typeof n)return xz(t,n);const r=n(e,t);if(r)return r}return xz(t,Hz(e))}getReducedForm(e,t){const n=this.getNormalized(e,t);if(void 0===n)return[];if(this._reducers.has(e)){return this._reducers.get(e)(n)}return[[e,n]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter(t=>{const n=this.getNormalized(t,e);return n&&"object"==typeof n?Object.keys(n).length:n}),n=new Set([...t,...Object.keys(e)]);return Array.from(n.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const n of t)this._mapStyleNames(n,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function Hz(e){return e.replace("-",".")}function zz(e,t,n){let r=n;vv(n)&&(r=Rz({},xz(e,t),n)),jz(e,t,r)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Vz extends ez{constructor(e,t,n,r){if(super(e),this.name=t,this._attrs=function(e){e=rz(e);for(const[t,n]of e)null===n?e.delete(t):"string"!=typeof n&&e.set(t,String(n));return e}(n),this._children=[],r&&this._insertChild(0,r),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Wz(this._classes,e),this._attrs.delete("class")}this._styles=new Fz(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._unsafeAttributesToRender=[]}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(e,t=null){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Vz))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,n]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==n)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e=!1){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new iz(...e);let n=this.parent;for(;n;){if(t.match(n))return n;n=n.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),n=Array.from(this._attrs).map(e=>`${e[0]}="${e[1]}"`).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==n?"":` ${n}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.document,this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let n=0;const r=function(e,t){if("string"==typeof t)return[new tz(e,t)];zH(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new tz(e,t):t instanceof nz?new tz(e,t.data):t)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(this.document,t);for(const t of r)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){t=String(t),this._fireChange("attributes",this),"class"==e?Wz(this._classes,t):"style"==e?this._styles.setTo(t):this._attrs.set(e,t)}_removeAttribute(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of GH(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of GH(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of GH(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Wz(e,t){const n=t.split(/\s+/);e.clear(),n.forEach(t=>e.add(t))}class Gz extends Vz{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=qz}is(e,t=null){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}}function qz(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Yz extends Gz{constructor(e,t,n,r){super(e,t,n,r),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",t=>t&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}is(e,t=null){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}destroy(){this.stopListening()}}UF(Yz,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const Kz=Symbol("rootName");class Xz extends Yz{constructor(e,t){super(e,t),this.rootName="main"}is(e,t=null){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}get rootName(){return this.getCustomProperty(Kz)}set rootName(e){this._setCustomProperty(Kz,e)}set _name(e){this.name=e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Qz{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new hj.a("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new hj.a("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=$z._createAt(e.startPosition):this.position=$z._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,r;do{r=this.position,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this.position=r)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let r;if(n instanceof tz){if(e.isAtEnd)return this.position=$z._createAfter(n),this._next();r=n.data[e.offset]}else r=n.getChild(e.offset);if(r instanceof Vz)return this.shallow?e.offset++:e=new $z(r,0),this.position=e,this._formatReturnValue("elementStart",r,t,e,1);if(r instanceof tz){if(this.singleCharacters)return e=new $z(r,0),this.position=e,this._next();{let n,i=r.data.length;return r==this._boundaryEndParent?(i=this.boundaries.end.offset,n=new nz(r,0,i),e=$z._createAfter(n)):(n=new nz(r,0,r.data.length),e.offset++),this.position=e,this._formatReturnValue("text",n,t,e,i)}}if("string"==typeof r){let r;if(this.singleCharacters)r=1;else{r=(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-e.offset}const i=new nz(n,e.offset,r);return e.offset+=r,this.position=e,this._formatReturnValue("text",i,t,e,r)}return e=$z._createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,t,e)}_previous(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let r;if(n instanceof tz){if(e.isAtStart)return this.position=$z._createBefore(n),this._previous();r=n.data[e.offset-1]}else r=n.getChild(e.offset-1);if(r instanceof Vz)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",r,t,e,1)):(e=new $z(r,r.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",r,t,e));if(r instanceof tz){if(this.singleCharacters)return e=new $z(r,r.data.length),this.position=e,this._previous();{let n,i=r.data.length;if(r==this._boundaryStartParent){const t=this.boundaries.start.offset;n=new nz(r,t,r.data.length-t),i=n.data.length,e=$z._createBefore(n)}else n=new nz(r,0,r.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",n,t,e,i)}}if("string"==typeof r){let r;if(this.singleCharacters)r=1;else{const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;r=e.offset-t}e.offset-=r;const i=new nz(n,e.offset,r);return this.position=e,this._formatReturnValue("text",i,t,e,r)}return e=$z._createBefore(n),this.position=e,this._formatReturnValue("elementStart",n,t,e,1)}_formatReturnValue(e,t,n,r,i){return t instanceof nz&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=$z._createAfter(t.textNode):(r=$z._createAfter(t.textNode),this.position=r)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=$z._createBefore(t.textNode):(r=$z._createBefore(t.textNode),this.position=r))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:r,length:i}}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class $z{constructor(e,t){this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Yz);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=$z._createAt(this),n=t.offset+e;return t.offset=n<0?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new Qz(t);return n.skip(e),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let r=0;for(;t[r]==n[r]&&t[r];)r++;return 0===r?null:t[r-1]}is(e){return"position"===e||"view:position"===e}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],n=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const r=JH(t,n);switch(r){case"prefix":return"before";case"extension":return"after";default:return t[r]<n[r]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new Qz(e)}clone(){return new $z(this.parent,this.offset)}static _createAt(e,t){if(e instanceof $z)return new this(e.parent,e.offset);{const n=e;if("end"==t)t=n.is("$text")?n.data.length:n.childCount;else{if("before"==t)return this._createBefore(n);if("after"==t)return this._createAfter(n);if(0!==t&&!t)throw new hj.a("view-createpositionat-offset-required",n)}return new $z(n,t)}}static _createAfter(e){if(e.is("$textProxy"))return new $z(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new hj.a("view-position-after-root",e,{root:e});return new $z(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new $z(e.textNode,e.offsetInText);if(!e.parent)throw new hj.a("view-position-before-root",e,{root:e});return new $z(e.parent,e.index)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Jz{constructor(e,t=null){this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new Qz({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(Zz,{direction:"backward"}),t=this.end.getLastMatchingPosition(Zz);return e.parent.is("$text")&&e.isAtStart&&(e=$z._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=$z._createAfter(t.parent)),new Jz(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(Zz);if(e.isAfter(this.end)||e.isEqual(this.end))return new Jz(e,e);let t=this.end.getLastMatchingPosition(Zz,{direction:"backward"});const n=e.nodeAfter,r=t.nodeBefore;return n&&n.is("$text")&&(e=new $z(n,0)),r&&r.is("$text")&&(t=new $z(r,r.data.length)),new Jz(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),r=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&r}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new Jz(this.start,e.start)),this.containsPosition(e.end)&&t.push(new Jz(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new Jz(t,n)}return null}getWalker(e={}){return e.boundaries=this,new Qz(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new Jz(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Qz(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Qz(e);yield t.position;for(const e of t)yield e.nextPosition}is(e){return"range"===e||"view:range"===e}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,n,r){return new this(new $z(e,t),new $z(n,r))}static _createFromPositionAndShift(e,t){const n=e,r=e.getShiftedBy(t);return t>0?new this(n,r):new this(r,n)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift($z._createBefore(e),t)}}function Zz(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function eV(e){let t=0;for(const n of e)t++;return t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class tV{constructor(e=null,t,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(e,t,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const r of e._ranges)if(t.isEqual(r)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=eV(this.getRanges());if(t!=eV(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let r of e.getRanges())if(r=r.getTrimmed(),t.start.isEqual(r.start)&&t.end.isEqual(r.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(e,t,n){if(null===e)this._setRanges([]),this._setFakeOptions(t);else if(e instanceof tV||e instanceof nV)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof Jz)this._setRanges([e],t&&t.backward),this._setFakeOptions(t);else if(e instanceof $z)this._setRanges([new Jz(e)]),this._setFakeOptions(t);else if(e instanceof ez){const r=!!n&&!!n.backward;let i;if(void 0===t)throw new hj.a("view-selection-setto-required-second-parameter",this);i="in"==t?Jz._createIn(e):"on"==t?Jz._createOn(e):new Jz($z._createAt(e,t)),this._setRanges([i],r),this._setFakeOptions(n)}else{if(!zH(e))throw new hj.a("view-selection-setto-not-selectable",this);this._setRanges(e,t&&t.backward),this._setFakeOptions(t)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new hj.a("view-selection-setfocus-no-ranges",this);const n=$z._createAt(e,t);if("same"==n.compareWith(this.focus))return;const r=this.anchor;this._ranges.pop(),"before"==n.compareWith(r)?this._addRange(new Jz(n,r),!0):this._addRange(new Jz(r,n)),this.fire("change")}is(e){return"selection"===e||"view:selection"===e}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof Jz))throw new hj.a("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new hj.a("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new Jz(e.start,e.end))}}UF(tV,mj);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class nV{constructor(e=null,t,n){this._selection=new tV,this._selection.delegate("change").to(this),this._selection.setTo(e,t,n)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}is(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setFocus(e,t){this._selection.setFocus(e,t)}}UF(nV,mj);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class rV extends sj{constructor(e,t,n){super(e,t),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const iV=Symbol("bubbling contexts");function aV(e,t,n){e instanceof rV&&(e._eventPhase=t,e._currentTarget=n)}function oV(e,t,n,...r){const i="string"==typeof t?e.get(t):sV(e,t);return!!i&&(i.fire(n,...r),n.stop.called)}function sV(e,t){for(const[n,r]of e)if("function"==typeof n&&n(t))return r;return null}function lV(e){return e[iV]||(e[iV]=new Map),e[iV]}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class cV{constructor(e){this.selection=new nV,this.roots=new VH({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(t=n(e),t)break}while(t)}}UF(cV,{fire(e,...t){try{const n=e instanceof sj?e:new sj(this,e),r=lV(this);if(!r.size)return;if(aV(n,"capturing",this),oV(r,"$capture",n,...t))return n.return;const i=n.startRange||this.selection.getFirstRange(),a=i?i.getContainedElement():null,o=!!a&&Boolean(sV(r,a));let s=a||function(e){if(!e)return null;const t=e.start.parent,n=e.end.parent,r=t.getPath(),i=n.getPath();return r.length>i.length?t:n}(i);if(aV(n,"atTarget",s),!o){if(oV(r,"$text",n,...t))return n.return;aV(n,"bubbling",s)}for(;s;){if(s.is("rootElement")){if(oV(r,"$root",n,...t))return n.return}else if(s.is("element")&&oV(r,s.name,n,...t))return n.return;if(oV(r,s,n,...t))return n.return;s=s.parent,aV(n,"bubbling",s)}return aV(n,"bubbling",this),oV(r,"$document",n,...t),n.return}catch(e){hj.a.rethrowUnexpectedError(e,this)}},_addEventListener(e,t,n){const r=GH(n.context||"$document"),i=lV(this);for(const a of r){let r=i.get(a);r||(r=Object.create(mj),i.set(a,r)),this.listenTo(r,e,t,n)}},_removeEventListener(e,t){const n=lV(this);for(const r of n.values())this.stopListening(r,e,t)}}),UF(cV,NF);class uV extends Vz{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=dV,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new hj.a("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}is(e,t=null){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function dV(){if(hV(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(hV(e)>1)return null;e=e.parent}return!e||hV(e)>1?null:this.childCount}function hV(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */uV.DEFAULT_PRIORITY=10;class fV extends Vz{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=pV}is(e,t=null){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof ez||Array.from(t).length>0))throw new hj.a("view-emptyelement-cannot-add",[this,t])}}function pV(){return null}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const mV=navigator.userAgent.toLowerCase();var gV={isMac:vV(mV),isWindows:function(e){return e.indexOf("windows")>-1}(mV),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(mV),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(mV),isiOS:function(e){return!!e.match(/iphone|ipad/i)||vV(e)&&navigator.maxTouchPoints>0}(mV),isAndroid:function(e){return e.indexOf("android")>-1}(mV),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(mV),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */()}};function vV(e){return e.indexOf("macintosh")>-1}const bV={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},yV={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},AV=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){const n=String.fromCharCode(t);e[n.toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),_V=Object.fromEntries(Object.entries(AV).map(([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)]));function wV(e){let t;if("string"==typeof e){if(t=AV[e.toLowerCase()],!t)throw new hj.a("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?AV.alt:0)+(e.ctrlKey?AV.ctrl:0)+(e.shiftKey?AV.shift:0)+(e.metaKey?AV.cmd:0);return t}function EV(e){return"string"==typeof e&&(e=function(e){return e.split("+").map(e=>e.trim())}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e)),e.map(e=>"string"==typeof e?function(e){if(e.endsWith("!"))return wV(e.slice(0,-1));const t=wV(e);return gV.isMac&&t==AV.ctrl?AV.cmd:t}(e):e).reduce((e,t)=>t+e,0)}function SV(e){let t=EV(e);return Object.entries(gV.isMac?bV:yV).reduce((e,[n,r])=>(0!=(t&AV[n])&&(t&=~AV[n],e+=r),e),"")+(t?_V[t]:"")}function CV(e,t){const n="ltr"===t;switch(e){case AV.arrowleft:return n?"left":"right";case AV.arrowright:return n?"right":"left";case AV.arrowup:return"up";case AV.arrowdown:return"down"}}class TV extends Vz{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=xV}is(e,t=null){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof ez||Array.from(t).length>0))throw new hj.a("view-uielement-cannot-add",this)}render(e){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function kV(e){e.document.on("arrowKey",(t,n)=>function(e,t,n){if(t.keyCode==AV.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),r=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(r||t.shiftKey){const t=e.focusNode,i=e.focusOffset,a=n.domPositionToView(t,i);if(null===a)return;let o=!1;const s=a.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(o=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(o){const t=n.viewPositionToDom(s);r?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(0,n,e.domConverter),{priority:"low"})}function xV(){return null}class OV extends Vz{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=IV}is(e,t=null){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof ez||Array.from(t).length>0))throw new hj.a("view-rawelement-cannot-add",[this,t])}}function IV(){return null}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class MV{constructor(e,t){this.document=e,this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"view:documentFragment"===e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let n=0;const r=function(e,t){if("string"==typeof t)return[new tz(e,t)];zH(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new tz(e,t):t instanceof nz?new tz(e,t.data):t)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(this.document,t);for(const t of r)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire("change:"+e,t)}}UF(MV,mj);class PV{constructor(e){this.document=e,this._cloneGroups=new Map,this._slotFactory=null}setSelection(e,t,n){this.document.selection._setTo(e,t,n)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createDocumentFragment(e){return new MV(this.document,e)}createText(e){return new tz(this.document,e)}createAttributeElement(e,t,n={}){const r=new uV(this.document,e,t);return"number"==typeof n.priority&&(r._priority=n.priority),n.id&&(r._id=n.id),n.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),r}createContainerElement(e,t,n={},r={}){let i=null;ZF(n)?r=n:i=n;const a=new Gz(this.document,e,t,i);return r.renderUnsafeAttributes&&a._unsafeAttributesToRender.push(...r.renderUnsafeAttributes),a}createEditableElement(e,t,n={}){const r=new Yz(this.document,e,t);return r._document=this.document,n.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),r}createEmptyElement(e,t,n={}){const r=new fV(this.document,e,t);return n.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),r}createUIElement(e,t,n){const r=new TV(this.document,e,t);return n&&(r.render=n),r}createRawElement(e,t,n,r={}){const i=new OV(this.document,e,t);return i.render=n||(()=>{}),r.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...r.renderUnsafeAttributes),i}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){ZF(e)&&void 0===n&&(n=t),n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof $z?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new hj.a("view-writer-break-non-container-element",this.document);if(!t.parent)throw new hj.a("view-writer-break-root",this.document);if(e.isAtStart)return $z._createBefore(t);if(!e.isAtEnd){const n=t._clone(!1);this.insert($z._createAfter(t),n);const r=new Jz(e,$z._createAt(t,"end")),i=new $z(n,0);this.move(r,i)}return $z._createAfter(t)}mergeAttributes(e){const t=e.offset,n=e.parent;if(n.is("$text"))return e;if(n.is("attributeElement")&&0===n.childCount){const e=n.parent,t=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new $z(e,t))}const r=n.getChild(t-1),i=n.getChild(t);if(!r||!i)return e;if(r.is("$text")&&i.is("$text"))return BV(r,i);if(r.is("attributeElement")&&i.is("attributeElement")&&r.isSimilar(i)){const e=r.childCount;return r._appendChild(i.getChildren()),i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new $z(r,e))}return e}mergeContainers(e){const t=e.nodeBefore,n=e.nodeAfter;if(!(t&&n&&t.is("containerElement")&&n.is("containerElement")))throw new hj.a("view-writer-merge-containers-invalid-position",this.document);const r=t.getChild(t.childCount-1),i=r instanceof tz?$z._createAt(r,"end"):$z._createAt(t,"end");return this.move(Jz._createIn(n),$z._createAt(t,"end")),this.remove(Jz._createOn(n)),i}insert(e,t){(function e(t,n){for(const r of t){if(!jV.some(e=>r instanceof e))throw new hj.a("view-writer-insert-invalid-node-type",n);r.is("$text")||e(r.getChildren(),n)}})(t=zH(t)?[...t]:[t],this.document);const n=t.reduce((e,t)=>{const n=e[e.length-1],r=!t.is("uiElement");return n&&n.breakAttributes==r?n.nodes.push(t):e.push({breakAttributes:r,nodes:[t]}),e},[]);let r=null,i=e;for(const{nodes:e,breakAttributes:t}of n){const n=this._insertNodes(i,e,t);r||(r=n.start),i=n.end}return r?new Jz(r,i):new Jz(e)}remove(e){const t=e instanceof Jz?e:Jz._createOn(e);if(UV(t,this.document),t.isCollapsed)return new MV(this.document);const{start:n,end:r}=this._breakAttributesRange(t,!0),i=n.parent,a=r.offset-n.offset,o=i._removeChildren(n.offset,a);for(const e of o)this._removeFromClonedElementsGroup(e);const s=this.mergeAttributes(n);return t.start=s,t.end=s.clone(),new MV(this.document,o)}clear(e,t){UV(e,this.document);const n=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const r of n){const n=r.item;let i;if(n.is("element")&&t.isSimilar(n))i=Jz._createOn(n);else if(!r.nextPosition.isAfter(e.start)&&n.is("$textProxy")){const e=n.getAncestors().find(e=>e.is("element")&&t.isSimilar(e));e&&(i=Jz._createIn(e))}i&&(i.end.isAfter(e.end)&&(i.end=e.end),i.start.isBefore(e.start)&&(i.start=e.start),this.remove(i))}}move(e,t){let n;if(t.isAfter(e.end)){const r=(t=this._breakAttributes(t,!0)).parent,i=r.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=r.childCount-i}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof uV))throw new hj.a("view-writer-wrap-invalid-attribute",this.document);if(UV(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&!function(e){return Array.from(e.getChildren()).some(e=>!e.is("uiElement"))}(n.parent)&&(n=n.getLastMatchingPosition(e=>e.item.is("uiElement"))),n=this._wrapPosition(n,t);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new Jz(n)}return this._wrapRange(e,t)}unwrap(e,t){if(!(t instanceof uV))throw new hj.a("view-writer-unwrap-invalid-attribute",this.document);if(UV(e,this.document),e.isCollapsed)return e;const{start:n,end:r}=this._breakAttributesRange(e,!0),i=n.parent,a=this._unwrapChildren(i,n.offset,r.offset,t),o=this.mergeAttributes(a.start);o.isEqual(a.start)||a.end.offset--;const s=this.mergeAttributes(a.end);return new Jz(o,s)}rename(e,t){const n=new Gz(this.document,e,t.getAttributes());return this.insert($z._createAfter(t),n),this.move(Jz._createIn(t),$z._createAt(n,0)),this.remove(Jz._createOn(t)),n}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return $z._createAt(e,t)}createPositionAfter(e){return $z._createAfter(e)}createPositionBefore(e){return $z._createBefore(e)}createRange(e,t){return new Jz(e,t)}createRangeOn(e){return Jz._createOn(e)}createRangeIn(e){return Jz._createIn(e)}createSelection(e,t,n){return new tV(e,t,n)}createSlot(e){if(!this._slotFactory)throw new hj.a("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,n){let r,i;if(r=n?DV(e):e.parent.is("$text")?e.parent.parent:e.parent,!r)throw new hj.a("view-writer-invalid-position-container",this.document);i=n?this._breakAttributes(e,!0):e.parent.is("$text")?RV(e):e;const a=r._insertChild(i.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const o=i.getShiftedBy(a),s=this.mergeAttributes(i);s.isEqual(i)||o.offset--;const l=this.mergeAttributes(o);return new Jz(s,l)}_wrapChildren(e,t,n,r){let i=t;const a=[];for(;i<n;){const t=e.getChild(i),n=t.is("$text"),o=t.is("attributeElement");if(o&&this._wrapAttributeElement(r,t))a.push(new $z(e,i));else if(n||!o||NV(r,t)){const n=r._clone();t._remove(),n._appendChild(t),e._insertChild(i,n),this._addToClonedElementsGroup(n),a.push(new $z(e,i))}else this._wrapChildren(t,0,t.childCount,r);i++}let o=0;for(const e of a){if(e.offset-=o,e.offset==t)continue;this.mergeAttributes(e).isEqual(e)||(o++,n--)}return Jz._createFromParentsAndOffsets(e,t,e,n)}_unwrapChildren(e,t,n,r){let i=t;const a=[];for(;i<n;){const t=e.getChild(i);if(t.is("attributeElement"))if(t.isSimilar(r)){const r=t.getChildren(),o=t.childCount;t._remove(),e._insertChild(i,r),this._removeFromClonedElementsGroup(t),a.push(new $z(e,i),new $z(e,i+o)),i+=o,n+=o-1}else this._unwrapAttributeElement(r,t)?(a.push(new $z(e,i),new $z(e,i+1)),i++):(this._unwrapChildren(t,0,t.childCount,r),i++);else i++}let o=0;for(const e of a){if(e.offset-=o,e.offset==t||e.offset==n)continue;this.mergeAttributes(e).isEqual(e)||(o++,n--)}return Jz._createFromParentsAndOffsets(e,t,e,n)}_wrapRange(e,t){const{start:n,end:r}=this._breakAttributesRange(e,!0),i=n.parent,a=this._wrapChildren(i,n.offset,r.offset,t),o=this.mergeAttributes(a.start);o.isEqual(a.start)||a.end.offset--;const s=this.mergeAttributes(a.end);return new Jz(o,s)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return LV(e.clone());e.parent.is("$text")&&(e=RV(e));const n=this.createAttributeElement();n._priority=Number.POSITIVE_INFINITY,n.isSimilar=()=>!1,e.parent._insertChild(e.offset,n);const r=new Jz(e,e.getShiftedBy(1));this.wrap(r,t);const i=new $z(n.parent,n.index);n._remove();const a=i.nodeBefore,o=i.nodeAfter;return a instanceof tz&&o instanceof tz?BV(a,o):LV(i)}_wrapAttributeElement(e,t){if(!HV(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(const n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(const n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(const n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!HV(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const n=e.start,r=e.end;if(UV(e,this.document),e.isCollapsed){const n=this._breakAttributes(e.start,t);return new Jz(n,n)}const i=this._breakAttributes(r,t),a=i.parent.childCount,o=this._breakAttributes(n,t);return i.offset+=i.parent.childCount-a,new Jz(o,i)}_breakAttributes(e,t=!1){const n=e.offset,r=e.parent;if(e.parent.is("emptyElement"))throw new hj.a("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new hj.a("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new hj.a("view-writer-cannot-break-raw-element",this.document);if(!t&&r.is("$text")&&FV(r.parent))return e.clone();if(FV(r))return e.clone();if(r.is("$text"))return this._breakAttributes(RV(e),t);if(n==r.childCount){const e=new $z(r.parent,r.index+1);return this._breakAttributes(e,t)}if(0===n){const e=new $z(r.parent,r.index);return this._breakAttributes(e,t)}{const e=r.index+1,i=r._clone();r.parent._insertChild(e,i),this._addToClonedElementsGroup(i);const a=r.childCount-n,o=r._removeChildren(n,a);i._appendChild(o);const s=new $z(r.parent,e);return this._breakAttributes(s,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const n=this._cloneGroups.get(t);n&&n.delete(e)}}function DV(e){let t=e.parent;for(;!FV(t);){if(!t)return;t=t.parent}return t}function NV(e,t){return e.priority<t.priority||!(e.priority>t.priority)&&e.getIdentity()<t.getIdentity()}function LV(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new $z(t,t.data.length);const n=e.nodeAfter;return n&&n.is("$text")?new $z(n,0):e}function RV(e){if(e.offset==e.parent.data.length)return new $z(e.parent.parent,e.parent.index+1);if(0===e.offset)return new $z(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new tz(e.root.document,t)),new $z(e.parent.parent,e.parent.index+1)}function BV(e,t){const n=e.data.length;return e._data+=t.data,t._remove(),new $z(e,n)}const jV=[tz,uV,Gz,fV,OV,TV];function FV(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function UV(e,t){const n=DV(e.start),r=DV(e.end);if(!n||!r||n!==r)throw new hj.a("view-writer-invalid-range-container",t)}function HV(e,t){return null===e.id&&null===t.id}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function zV(e){return"[object Text]"==Object.prototype.toString.call(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const VV=e=>e.createTextNode(" "),WV=e=>{const t=e.createElement("span");return t.dataset.ckeFiller=!0,t.innerHTML=" ",t},GV=e=>{const t=e.createElement("br");return t.dataset.ckeFiller=!0,t},qV="⁠".repeat(7);function YV(e){return zV(e)&&e.data.substr(0,7)===qV}function KV(e){return 7==e.data.length&&YV(e)}function XV(e){return YV(e)?e.data.slice(7):e.data}function QV(e,t){if(t.keyCode==AV.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;YV(t)&&n<=7&&e.collapse(t,0)}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function $V(e,t,n,r=!1){n=n||function(e,t){return e===t},Array.isArray(e)||(e=Array.prototype.slice.call(e)),Array.isArray(t)||(t=Array.prototype.slice.call(t));const i=function(e,t,n){const r=JV(e,t,n);if(-1===r)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=ZV(e,r),a=ZV(t,r),o=JV(i,a,n),s=e.length-o,l=t.length-o;return{firstIndex:r,lastIndexOld:s,lastIndexNew:l}}(e,t,n);return r?function(e,t){const{firstIndex:n,lastIndexOld:r,lastIndexNew:i}=e;if(-1===n)return Array(t).fill("equal");let a=[];n>0&&(a=a.concat(Array(n).fill("equal")));i-n>0&&(a=a.concat(Array(i-n).fill("insert")));r-n>0&&(a=a.concat(Array(r-n).fill("delete")));i<t&&(a=a.concat(Array(t-i).fill("equal")));return a}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(i,t.length):function(e,t){const n=[],{firstIndex:r,lastIndexOld:i,lastIndexNew:a}=t;a-r>0&&n.push({index:r,type:"insert",values:e.slice(r,a)});i-r>0&&n.push({index:r+(a-r),type:"delete",howMany:i-r});return n}(t,i)}function JV(e,t,n){for(let r=0;r<Math.max(e.length,t.length);r++)if(void 0===e[r]||void 0===t[r]||!n(e[r],t[r]))return r;return-1}function ZV(e,t){return e.slice(t).reverse()}function eW(e,t,n){n=n||function(e,t){return e===t};const r=e.length,i=t.length;if(r>200||i>200||r+i>300)return eW.fastDiff(e,t,n,!0);let a,o;if(i<r){const n=e;e=t,t=n,a="delete",o="insert"}else a="insert",o="delete";const s=e.length,l=t.length,c=l-s,u={},d={};function h(r){const i=(void 0!==d[r-1]?d[r-1]:-1)+1,c=void 0!==d[r+1]?d[r+1]:-1,h=i>c?-1:1;u[r+h]&&(u[r]=u[r+h].slice(0)),u[r]||(u[r]=[]),u[r].push(i>c?a:o);let f=Math.max(i,c),p=f-r;for(;p<s&&f<l&&n(e[p],t[f]);)p++,f++,u[r].push("equal");return f}let f,p=0;do{for(f=-p;f<c;f++)d[f]=h(f);for(f=c+p;f>c;f--)d[f]=h(f);d[c]=h(c),p++}while(d[c]!==l);return u[c].slice(1)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function tW(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function nW(e){const t=e.parentNode;t&&t.removeChild(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function rW(e){return e&&e.nodeType===Node.COMMENT_NODE}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function iW(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}eW.fastDiff=$V;r(1514);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class aW{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),gV.isBlink&&!gV.isAndroid&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()}),this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new hj.a("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){let e;const t=!(gV.isBlink&&!gV.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),n=t.parent.ownerDocument;YV(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=oW(n,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(this.domConverter.mapViewToDom(e).childNodes),r=Array.from(this.domConverter.viewChildrenToDom(e,t.ownerDocument,{withChildren:!1})),i=this._diffNodeLists(n,r),a=this._findReplaceActions(i,n,r);if(-1!==a.indexOf("replace")){const t={equal:0,insert:0,delete:0};for(const i of a)if("replace"===i){const i=t.equal+t.insert,a=t.equal+t.delete,o=e.getChild(i);!o||o.is("uiElement")||o.is("rawElement")||this._updateElementMappings(o,n[a]),nW(r[i]),t.equal++}else t[i]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?$z._createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&zV(t.parent)&&YV(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!YV(e))throw new hj.a("view-renderer-filler-was-lost",this);KV(e)?e.remove():e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,n=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor(e=>e.hasAttribute("contenteditable"));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(n===t.getFillerOffset())return!1;const r=e.nodeBefore,i=e.nodeAfter;return!(r instanceof tz||i instanceof tz)}_updateText(e,t){const n=this.domConverter.findCorrespondingDomText(e),r=this.domConverter.viewToDom(e,n.ownerDocument),i=n.data;let a=r.data;const o=t.inlineFillerPosition;if(o&&o.parent==e.parent&&o.offset==e.index&&(a=qV+a),i!=a){const e=$V(i,a);for(const t of e)"insert"===t.type?n.insertData(t.index,t.values.join("")):n.deleteData(t.index,t.howMany)}}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(t.attributes).map(e=>e.name),r=e.getAttributeKeys();for(const n of r)this.domConverter.setDomElementAttribute(t,n,e.getAttribute(n),e);for(const r of n)e.hasAttribute(r)||this.domConverter.removeDomElementAttribute(t,r)}_updateChildren(e,t){const n=this.domConverter.mapViewToDom(e);if(!n)return;const r=t.inlineFillerPosition,i=this.domConverter.mapViewToDom(e).childNodes,a=Array.from(this.domConverter.viewChildrenToDom(e,n.ownerDocument,{bind:!0}));r&&r.parent===e&&oW(n.ownerDocument,a,r.offset);const o=this._diffNodeLists(i,a);let s=0;const l=new Set;for(const e of o)"delete"===e?(l.add(i[s]),nW(i[s])):"equal"===e&&s++;s=0;for(const e of o)"insert"===e?(tW(n,s,a[s]),s++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(a[s])),s++);for(const e of l)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return eW(e=function(e,t){const n=Array.from(e);if(0==n.length||!t)return n;n[n.length-1]==t&&n.pop();return n}(e,this._fakeSelectionContainer),t,lW.bind(null,this.domConverter))}_findReplaceActions(e,t,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let r=[],i=[],a=[];const o={equal:0,insert:0,delete:0};for(const s of e)"insert"===s?a.push(n[o.equal+o.insert]):"delete"===s?i.push(t[o.equal+o.delete]):(r=r.concat(eW(i,a,sW).map(e=>"equal"===e?"replace":e)),r.push("equal"),i=[],a=[]),o[s]++;return r.concat(eW(i,a,sW).map(e=>"equal"===e?"replace":e))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(gV.isBlink&&!gV.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(e))return;n.parentElement&&n.parentElement==e||e.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const r=t.getSelection(),i=t.createRange();r.removeAllRanges(),i.selectNodeContents(n),r.addRange(i)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),r=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(n.parent,n.offset),t.extend(r.parent,r.offset),gV.isGecko&&function(e,t){const n=e.parent;if(n.nodeType!=Node.ELEMENT_NODE||e.offset!=n.childNodes.length-1)return;const r=n.childNodes[e.offset];r&&"BR"==r.tagName&&t.addRange(t.getRangeAt(0))}(r,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,n=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(n.anchorNode!==t&&!t.contains(n.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){if(e.getSelection().rangeCount){const t=e.activeElement,n=this.domConverter.mapDomToView(t);t&&n&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function oW(e,t,n){const r=t instanceof Array?t:t.childNodes,i=r[n];if(zV(i))return i.data=qV+i.data,i;{const i=e.createTextNode(qV);return Array.isArray(t)?r.splice(n,0,i):tW(t,n,i),i}}function sW(e,t){return iW(e)&&iW(t)&&!zV(e)&&!zV(t)&&!rW(e)&&!rW(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function lW(e,t,n){return t===n||(zV(t)&&zV(n)?t.data===n.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(n)))}UF(aW,NF);var cW={window:window,document:document};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function uW(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function dW(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const hW=GV(document),fW=VV(document),pW=WV(document),mW=["script","style"];class gW{constructor(e,t={}){this.document=e,this.renderingMode=t.renderingMode||"editing",this.blockFillerMode=t.blockFillerMode||("editing"===this.renderingMode?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new iz,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new tV(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of e.childNodes)this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,n){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===e||"srcset"===e)||("source"===n&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const n=(new DOMParser).parseFromString(t,"text/html"),r=n.createDocumentFragment(),i=n.body.childNodes;for(;i.length>0;)r.appendChild(i[0]);const a=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT),o=[];let s;for(;s=a.nextNode();)o.push(s);for(const e of o){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(yW(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(r)}viewToDom(e,t,n={}){if(e.is("$text")){const n=this._processDataFromViewText(e);return t.createTextNode(n)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let r;if(e.is("documentFragment"))r=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(r,e);else{if(e.is("uiElement"))return r="$comment"===e.name?t.createComment(e.getCustomProperty("$rawContent")):e.render(t,this),n.bind&&this.bindElements(r,e),r;this._shouldRenameElement(e.name)?(yW(e.name),r=this._createReplacementDomElement(e.name)):r=e.hasAttribute("xmlns")?t.createElementNS(e.getAttribute("xmlns"),e.name):t.createElement(e.name),e.is("rawElement")&&e.render(r,this),n.bind&&this.bindElements(r,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(r,t,e.getAttribute(t),e)}if(!1!==n.withChildren)for(const i of this.viewChildrenToDom(e,t,n))r.appendChild(i);return r}}setDomElementAttribute(e,t,n,r=null){const i=this.shouldRenderAttribute(t,n,e.tagName.toLowerCase())||r&&r.shouldRenderUnsafeAttribute(t);i||Object(hj.b)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:n}),e.hasAttribute(t)&&!i?e.removeAttribute(t):e.hasAttribute("data-ck-unsafe-attribute-"+t)&&i&&e.removeAttribute("data-ck-unsafe-attribute-"+t),e.setAttribute(i?t:"data-ck-unsafe-attribute-"+t,n)}removeDomElementAttribute(e,t){"data-ck-unsafe-element"!=t&&(e.removeAttribute(t),e.removeAttribute("data-ck-unsafe-attribute-"+t))}*viewChildrenToDom(e,t,n={}){const r=e.getFillerOffset&&e.getFillerOffset();let i=0;for(const a of e.getChildren()){r===i&&(yield this._getBlockFiller(t));const e=a.is("element")&&a.getCustomProperty("dataPipeline:transparentRendering");e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(a,t,n):(e&&Object(hj.b)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:a}),yield this.viewToDom(a,t,n)),i++}r===i&&(yield this._getBlockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),r=document.createRange();return r.setStart(t.parent,t.offset),r.setEnd(n.parent,n.offset),r}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const n=this.findCorrespondingDomText(t);if(!n)return null;let r=e.offset;return YV(n)&&(r+=7),{parent:n,offset:r}}{let n,r,i;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;i=n.childNodes[0]}else{const t=e.nodeBefore;if(r=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!r)return null;n=r.parentNode,i=r.nextSibling}if(zV(i)&&YV(i))return{parent:i,offset:7};return{parent:n,offset:r?uW(r)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const n=this.getHostViewElement(e);if(n)return n;if(rW(e)&&t.skipComments)return null;if(zV(e)){if(KV(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new tz(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new MV(this.document),t.bind&&this.bindDocumentFragments(e,n);else{n=this._createViewElement(e,t),t.bind&&this.bindElements(e,n);const r=e.attributes;if(r)for(let e=r.length-1;e>=0;e--)n._setAttribute(r[e].name,r[e].value);if(this._isViewElementWithRawContent(n,t)||rW(e)){const t=rW(e)?e.data:e.innerHTML;return n._setCustomProperty("$rawContent",t),this._encounteredRawContentDomNodes.add(e),n}}if(!1!==t.withChildren)for(const r of this.domChildrenToView(e,t))n._appendChild(r);return n}}*domChildrenToView(e,t={}){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n],i=this.domToView(r,t);null!==i&&(yield i)}}domSelectionToView(e){if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;zV(t)&&(t=t.parentNode);const n=this.fakeSelectionToView(t);if(n)return n}const t=this.isDomSelectionBackward(e),n=[];for(let t=0;t<e.rangeCount;t++){const r=e.getRangeAt(t),i=this.domRangeToView(r);i&&n.push(i)}return new tV(n,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),n=this.domPositionToView(e.endContainer,e.endOffset);return t&&n?new Jz(t,n):null}domPositionToView(e,t=0){if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,uW(e));const n=this.mapDomToView(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return $z._createBefore(n);if(zV(e)){if(KV(e))return this.domPositionToView(e.parentNode,uW(e));const n=this.findCorrespondingViewText(e);let r=t;return n?(YV(e)&&(r-=7,r=r<0?0:r),new $z(n,r)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new $z(t,0)}else{const n=e.childNodes[t-1],r=zV(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(r&&r.parent)return new $z(r.parent,r.index+1)}return null}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(KV(e))return null;const t=this.getHostViewElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){return e.nextSibling instanceof tz?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof tz?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=cW.window,r=[];vW(t,e=>{const{scrollLeft:t,scrollTop:n}=e;r.push([t,n])}),t.focus(),vW(t,e=>{const[t,n]=r.shift();e.scrollLeft=t,e.scrollTop=n}),cW.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(hW):!("BR"!==e.tagName||!bW(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(pW)||function(e,t){return e.isEqualNode(fW)&&bW(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getHostViewElement(e){const t=dW(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(e){switch(this.blockFillerMode){case"nbsp":return VV(e);case"markedNbsp":return WV(e);case"br":return GV(e)}}_isDomSelectionPositionCorrect(e,t){if(zV(e)&&YV(e)&&t<7)return!1;if(this.isElement(e)&&YV(e.childNodes[t]))return!1;const n=this.mapDomToView(e);return!n||!n.is("uiElement")&&!n.is("rawElement")}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return t;if(" "==t.charAt(0)){const n=this._getTouchingInlineViewNode(e,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const n=this._getTouchingInlineViewNode(e,!0),r=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=t.charAt(t.length-2)&&n&&!r||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){return dW(e).some(e=>e.tagName&&t.includes(e.tagName.toLowerCase()))}(e,this.preElements))return XV(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(e,!1),r=this._getTouchingInlineDomNode(e,!0),i=this._checkShouldLeftTrimDomText(e,n),a=this._checkShouldRightTrimDomText(e,r);i&&(t=t.replace(/^ /,"")),a&&(t=t.replace(/ $/,"")),t=XV(new Text(t)),t=t.replace(/ \u00A0/g,"  ");const o=r&&this.isElement(r)&&"BR"!=r.tagName,s=r&&zV(r)&&" "==r.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!r||o||s)&&(t=t.replace(/\u00A0$/," ")),(i||n&&this.isElement(n)&&"BR"!=n.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!YV(e)}_getTouchingInlineViewNode(e,t){const n=new Qz({startPosition:t?$z._createAfter(e):$z._createBefore(e),direction:t?"forward":"backward"});for(const e of n){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const n=t?"firstChild":"lastChild",r=t?"nextSibling":"previousSibling";let i=!0;do{if(!i&&e[n]?e=e[n]:e[r]?(e=e[r],i=!1):(e=e.parentNode,i=!0),!e||this._isBlockElement(e))return null}while(!zV(e)&&"BR"!=e.tagName&&!this._isInlineObjectElement(e));return e}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if(rW(e))return new TV(this.document,"$comment");const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new Vz(this.document,n)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&mW.includes(t)}_createReplacementDomElement(e,t=null){const n=document.createElement("span");if(n.setAttribute("data-ck-unsafe-element",e),t){for(;t.firstChild;)n.appendChild(t.firstChild);for(const e of t.getAttributeNames())n.setAttribute(e,t.getAttribute(e))}return n}}function vW(e,t){for(;e&&e!=cW.document;)t(e),e=e.parentNode}function bW(e,t){const n=e.parentNode;return n&&n.tagName&&t.includes(n.tagName.toLowerCase())}function yW(e){"script"===e&&Object(hj.b)("domconverter-unsafe-script-element-detected"),"style"===e&&Object(hj.b)("domconverter-unsafe-style-element-detected")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function AW(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */var _W=kF({},mj,{listenTo(e,t,n,r={}){if(iW(e)||AW(e)){const i={capture:!!r.useCapture,passive:!!r.usePassive},a=this._getProxyEmitter(e,i)||new wW(e,i);this.listenTo(a,t,n,r)}else mj.listenTo.call(this,e,t,n,r)},stopListening(e,t,n){if(iW(e)||AW(e)){const r=this._getAllProxyEmitters(e);for(const e of r)this.stopListening(e,t,n)}else mj.stopListening.call(this,e,t,n)},_getProxyEmitter(e,t){return n=this,r=EW(e,t),n[fj]&&n[fj][r]?n[fj][r].emitter:null;var n,r},_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(t=>this._getProxyEmitter(e,t)).filter(e=>!!e)}});class wW{constructor(e,t){gj(this,EW(e,t)),this._domNode=e,this._options=t}}function EW(e,t){let n=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=cj())}(e);for(const e of Object.keys(t).sort())t[e]&&(n+="-"+e);return n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */kF(wW.prototype,mj,{attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t},detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_addEventListener(e,t,n){this.attach(e),mj._addEventListener.call(this,e,t,n)},_removeEventListener(e,t){mj._removeEventListener.call(this,e,t),this.detach(e)},_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}});class SW{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}UF(SW,_W);var CW=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var TW=function(e){return this.__data__.has(e)};function kW(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new PU;++t<n;)this.add(e[t])}kW.prototype.add=kW.prototype.push=CW,kW.prototype.has=TW;var xW=kW;var OW=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var IW=function(e,t){return e.has(t)};var MW=function(e,t,n,r,i,a){var o=1&n,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=2&n?new xW:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=o?r(m,p,d,t,e,a):r(p,m,d,e,t,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!OW(t,(function(e,t){if(!IW(f,t)&&(p===e||i(p,e,n,r,a)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h};var PW=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var DW=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},NW=yv?yv.prototype:void 0,LW=NW?NW.valueOf:void 0;var RW=function(e,t,n,r,i,a,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new gH(e),new gH(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Uj(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=PW;case"[object Set]":var l=1&r;if(s||(s=DW),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var u=MW(s(e),s(t),r,i,a,o);return o.delete(e),u;case"[object Symbol]":if(LW)return LW.call(e)==LW.call(t)}return!1},BW=Object.prototype.hasOwnProperty;var jW=function(e,t,n,r,i,a){var o=1&n,s=tH(e),l=s.length;if(l!=tH(t).length&&!o)return!1;for(var c=l;c--;){var u=s[c];if(!(o?u in t:BW.call(t,u)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var f=!0;a.set(e,t),a.set(t,e);for(var p=o;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=o?r(g,m,u,t,e,a):r(m,g,u,e,t,a);if(!(void 0===v?m===g||i(m,g,n,r,a):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var b=e.constructor,y=t.constructor;b!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y)&&(f=!1)}return a.delete(e),a.delete(t),f},FW=Object.prototype.hasOwnProperty;var UW=function(e,t,n,r,i,a){var o=dF(e),s=dF(t),l=o?"[object Array]":fH(e),c=s?"[object Array]":fH(t),u="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),d="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),h=l==c;if(h&&Object(hF.a)(e)){if(!Object(hF.a)(t))return!1;o=!0,u=!1}if(h&&!u)return a||(a=new LU),o||bF(e)?MW(e,t,n,r,i,a):RW(e,t,l,n,r,i,a);if(!(1&n)){var f=u&&FW.call(e,"__wrapped__"),p=d&&FW.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return a||(a=new LU),i(m,g,n,r,a)}}return!!h&&(a||(a=new LU),jW(e,t,n,r,i,a))};var HW=function e(t,n,r,i,a){return t===n||(null==t||null==n||!Ov(t)&&!Ov(n)?t!=t&&n!=n:UW(t,n,r,i,e,a))};var zW=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?HW(e,t,void 0,n):!!r};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class VW extends SW{constructor(e){super(e),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.push(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,n=new Map,r=new Set;for(const n of e)if("childList"===n.type){const e=t.mapDomToView(n.target);if(e&&(e.is("uiElement")||e.is("rawElement")))continue;e&&!this._isBogusBrMutation(n)&&r.add(e)}for(const i of e){const e=t.mapDomToView(i.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===i.type){const e=t.findCorrespondingViewText(i.target);e&&!r.has(e.parent)?n.set(e,{type:"text",oldText:e.data,newText:XV(i.target),node:e}):!e&&YV(i.target)&&r.add(t.mapDomToView(i.target.parentNode))}}const i=[];for(const e of n.values())this.renderer.markToSync("text",e.node),i.push(e);for(const e of r){const n=t.mapViewToDom(e),r=Array.from(e.getChildren()),a=Array.from(t.domChildrenToView(n,{withChildren:!1}));zW(r,a,s)||(this.renderer.markToSync("children",e),i.push({type:"children",oldChildren:r,newChildren:a,node:e}))}const a=e[0].target.ownerDocument.getSelection();let o=null;if(a&&a.anchorNode){const e=t.domPositionToView(a.anchorNode,a.anchorOffset),n=t.domPositionToView(a.focusNode,a.focusOffset);e&&n&&(o=new tV(e),o.setFocus(n))}function s(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}i.length&&(this.document.fire("mutations",i,o),this.view.forceRender())}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class WW{constructor(e,t,n){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,kF(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class GW extends SW{constructor(e){super(e),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach(t=>{this.listenTo(e,t,(e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new WW(this.view,t,n))}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class qW extends GW{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return wV(this)}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class YW extends SW{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=zv(e=>this.document.fire("selectionChangeDone",e),200)}observe(){const e=this.document;e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&n.preventDefault()},{context:"$capture"}),e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new tV(t.getRanges(),{backward:t.isBackward,fake:!1});e!=AV.arrowleft&&e!=AV.arrowup||n.setTo(n.getFirstPosition()),e!=AV.arrowright&&e!=AV.arrowdown||n.setTo(n.getLastPosition());const r={oldSelection:t,newSelection:n,domSelection:null};this.document.fire("selectionChange",r),this._fireSelectionChangeDoneDebounced(r)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class KW extends SW{constructor(e){super(e),this.mutationObserver=e.getObserver(VW),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=zv(e=>this.document.fire("selectionChangeDone",e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=zv(()=>this.document.isSelecting=!1,5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,n=()=>{this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel()};this.listenTo(e,"selectstart",()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},{priority:"highest"}),this.listenTo(e,"keydown",n,{priority:"highest"}),this.listenTo(e,"keyup",n,{priority:"highest"}),this._documents.has(t)||(this.listenTo(t,"mouseup",n,{priority:"highest"}),this.listenTo(t,"selectionchange",(e,n)=>{this._handleSelectionChange(n,t),this._documentIsSelectingInactivityTimeoutDebounced()}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(e,t){if(!this.isEnabled)return;const n=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const r=this.domConverter.domSelectionToView(n);if(0!=r.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(r)&&this.domConverter.isDomSelectionCorrect(n)||++this._loopbackCounter>60))if(this.selection.isSimilar(r))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:r,domSelection:n};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class XW extends GW{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.change(()=>{}),50)}),t.on("blur",(n,r)=>{const i=t.selection.editableElement;null!==i&&i!==r.target||(t.isFocused=!1,e.change(()=>{}))})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class QW extends GW{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",()=>{t.isComposing=!0}),t.on("compositionend",()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class $W extends GW{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){this.fire(e.type,e)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class JW{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display="",t&&t.remove()}),this._replacedElements=[]}}var ZW=function(e){return"string"==typeof e||!dF(e)&&Ov(e)&&"[object String]"==xv(e)};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function eG(e,t,n={},r=[]){const i=n&&n.xmlns,a=i?e.createElementNS(i,t):e.createElement(t);for(const e in n)a.setAttribute(e,n[e]);!ZW(r)&&zH(r)||(r=[r]);for(let t of r)ZW(t)&&(t=e.createTextNode(t)),a.appendChild(t);return a}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function tG(e){return"[object Range]"==Object.prototype.toString.apply(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function nG(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const rG=["top","right","bottom","left","width","height"];class iG{constructor(e){const t=tG(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),jH(e)||t)if(t){const t=iG.getDomRangeRects(e);aG(this,iG.getBoundingRect(t))}else aG(this,e.getBoundingClientRect());else if(AW(e)){const{innerWidth:t,innerHeight:n}=e;aG(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else aG(this,e)}clone(){return new iG(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new iG(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!oG(e)){let n=e.parentNode||e.commonAncestorContainer;for(;n&&!oG(n);){const e=new iG(n),r=t.getIntersection(e);if(!r)return null;r.getArea()<t.getArea()&&(t=r),n=n.parentNode}}return t}isEqual(e){for(const t of rG)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}excludeScrollbarsAndBorders(){const e=this._source;let t,n,r;if(AW(e))t=e.innerWidth-e.document.documentElement.clientWidth,n=e.innerHeight-e.document.documentElement.clientHeight,r=e.getComputedStyle(e.document.documentElement).direction;else{const i=nG(this._source);t=e.offsetWidth-e.clientWidth-i.left-i.right,n=e.offsetHeight-e.clientHeight-i.top-i.bottom,r=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=i.left,this.top+=i.top,this.right-=i.right,this.bottom-=i.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===r?this.right-=t:this.left+=t,this.height-=n,this.bottom-=n,this}static getDomRangeRects(e){const t=[],n=Array.from(e.getClientRects());if(n.length)for(const e of n)t.push(new iG(e));else{let n=e.startContainer;zV(n)&&(n=n.parentNode);const r=new iG(n.getBoundingClientRect());r.right=r.left,r.width=0,t.push(r)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};let n=0;for(const r of e)n++,t.left=Math.min(t.left,r.left),t.top=Math.min(t.top,r.top),t.right=Math.max(t.right,r.right),t.bottom=Math.max(t.bottom,r.bottom);return 0==n?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new iG(t))}}function aG(e,t){for(const n of rG)e[n]=t[n]}function oG(e){return!!jH(e)&&e===e.ownerDocument.body}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class sG{constructor(e,t){sG._observerInstance||sG._createObserver(),this._element=e,this._callback=t,sG._addElementCallback(e,t),sG._observerInstance.observe(e)}destroy(){sG._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){sG._elementCallbacks||(sG._elementCallbacks=new Map);let n=sG._elementCallbacks.get(e);n||(n=new Set,sG._elementCallbacks.set(e,n)),n.add(t)}static _deleteElementCallback(e,t){const n=sG._getElementCallbacks(e);n&&(n.delete(t),n.size||(sG._elementCallbacks.delete(e),sG._observerInstance.unobserve(e))),sG._elementCallbacks&&!sG._elementCallbacks.size&&(sG._observerInstance=null,sG._elementCallbacks=null)}static _getElementCallbacks(e){return sG._elementCallbacks?sG._elementCallbacks.get(e):null}static _createObserver(){let e;e="function"==typeof cW.window.ResizeObserver?cW.window.ResizeObserver:lG,sG._observerInstance=new e(e=>{for(const t of e){const e=sG._getElementCallbacks(t.target);if(e)for(const n of e)n(t)}})}}sG._observerInstance=null,sG._elementCallbacks=null;class lG{constructor(e){this._callback=e,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(e){this._elements.add(e),this._checkElementRectsAndExecuteCallback(),1===this._elements.size&&this._startPeriodicCheck()}unobserve(e){this._elements.delete(e),this._previousRects.delete(e),this._elements.size||this._stopPeriodicCheck()}_startPeriodicCheck(){const e=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(e,100)};this.listenTo(cW.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),this._periodicCheckTimeout=setTimeout(e,100)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const e=[];for(const t of this._elements)this._hasRectChanged(t)&&e.push({target:t,contentRect:this._previousRects.get(t)});e.length&&this._callback(e)}_hasRectChanged(e){if(!e.ownerDocument.body.contains(e))return!1;const t=new iG(e),n=this._previousRects.get(e),r=!n||!n.isEqual(t);return this._previousRects.set(e,t),r}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function cG(e){return t=>t+e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function uG(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */UF(lG,_W);function dG({target:e,viewportOffset:t=0}){const n=bG(e);let r=n,i=null;for(;r;){let a;a=yG(r==n?e:i),fG(a,()=>AG(e,r));const o=AG(e,r);if(hG(r,o,t),r.parent!=r){if(i=r.frameElement,r=r.parent,!i)return}else r=null}}function hG(e,t,n){const r=t.clone().moveBy(0,n),i=t.clone().moveBy(0,-n),a=new iG(e).excludeScrollbarsAndBorders();if(![i,r].every(e=>a.contains(e))){let{scrollX:o,scrollY:s}=e;mG(i,a)?s-=a.top-t.top+n:pG(r,a)&&(s+=t.bottom-a.bottom+n),gG(t,a)?o-=a.left-t.left+n:vG(t,a)&&(o+=t.right-a.right+n),e.scrollTo(o,s)}}function fG(e,t){const n=bG(e);let r,i;for(;e!=n.document.body;)i=t(),r=new iG(e).excludeScrollbarsAndBorders(),r.contains(i)||(mG(i,r)?e.scrollTop-=r.top-i.top:pG(i,r)&&(e.scrollTop+=i.bottom-r.bottom),gG(i,r)?e.scrollLeft-=r.left-i.left:vG(i,r)&&(e.scrollLeft+=i.right-r.right)),e=e.parentNode}function pG(e,t){return e.bottom>t.bottom}function mG(e,t){return e.top<t.top}function gG(e,t){return e.left<t.left}function vG(e,t){return e.right>t.right}function bG(e){return tG(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function yG(e){if(tG(e)){let t=e.commonAncestorContainer;return zV(t)&&(t=t.parentNode),t}return e.parentNode}function AG(e,t){const n=bG(e),r=new iG(e);if(n===t)return r;{let e=n;for(;e!=t;){const t=e.frameElement,n=new iG(t).excludeScrollbarsAndBorders();r.moveBy(n.left,n.top),e=e.parent}}return r}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function _G(e){const t=e.next();return t.done?null:t.value}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */Object.assign({},{scrollViewportToShowTarget:dG,scrollAncestorsToShowTarget:function(e){fG(yG(e),()=>new iG(e))}});class wG{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new hj.a("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",()=>this._focus(e),{useCapture:!0}),this.listenTo(e,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}UF(wG,_W),UF(wG,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class EG{constructor(){this._listener=Object.create(_W)}listenTo(e){this._listener.listenTo(e,"keydown",(e,t)=>{this._listener.fire("_keydown:"+wV(t),t)})}set(e,t,n={}){const r=EV(e),i=n.priority;this._listener.listenTo(this._listener,"_keydown:"+r,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:i})}press(e){return!!this._listener.fire("_keydown:"+wV(e),e)}destroy(){this._listener.stopListening()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class SG extends SW{constructor(e){super(e),this.document.on("keydown",(e,t)=>{if(this.isEnabled&&((n=t.keyCode)==AV.arrowright||n==AV.arrowleft||n==AV.arrowup||n==AV.arrowdown)){const n=new rV(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,t),n.stop.called&&e.stop()}var n})}observe(){}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class CG extends SW{constructor(e){super(e);const t=this.document;t.on("keydown",(e,n)=>{if(!this.isEnabled||n.keyCode!=AV.tab||n.ctrlKey)return;const r=new rV(t,"tab",t.selection.getFirstRange());t.fire(r,n),r.stop.called&&e.stop()})}observe(){}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class TG{constructor(e){this.document=new cV(e),this.domConverter=new gW(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new aW(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new PV(this.document),this.addObserver(VW),this.addObserver(KW),this.addObserver(XW),this.addObserver(qW),this.addObserver(YW),this.addObserver(QW),this.addObserver(SG),this.addObserver(CG),gV.isAndroid&&this.addObserver($W),this.document.on("arrowKey",QV,{priority:"low"}),kV(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0}),this.listenTo(this.document,"change:isFocused",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(e,t="main"){const n=this.document.getRoot(t);n._name=e.tagName.toLowerCase();const r={};for(const{name:t,value:i}of Array.from(e.attributes))r[t]=i,"class"===t?this._writer.addClass(i.split(" "),n):this._writer.setAttribute(t,i,n);this._initialDomRootAttributes.set(e,r);const i=()=>{this._writer.setAttribute("contenteditable",!n.isReadOnly,n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};i(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(e.ownerDocument),n.on("change:children",(e,t)=>this._renderer.markToSync("children",t)),n.on("change:attributes",(e,t)=>this._renderer.markToSync("attributes",t)),n.on("change:text",(e,t)=>this._renderer.markToSync("text",t)),n.on("change:isReadOnly",()=>this.change(i)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const n of this._observers.values())n.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach(({name:e})=>t.removeAttribute(e));const n=this._initialDomRootAttributes.get(t);for(const e in n)t.setAttribute(e,n[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,n]of this.domRoots)t.observe(n,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&dG({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new hj.a("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){hj.a.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return $z._createAt(e,t)}createPositionAfter(e){return $z._createAfter(e)}createPositionBefore(e){return $z._createBefore(e)}createRange(e,t){return new Jz(e,t)}createRangeOn(e){return Jz._createOn(e)}createRangeIn(e){return Jz._createIn(e)}createSelection(e,t,n){return new tV(e,t,n)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}UF(TG,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class kG{constructor(e){this.parent=null,this._attrs=rz(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new hj.a("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new hj.a("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),r=e.getAncestors(t);let i=0;for(;n[i]==r[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),r=JH(t,n);switch(r){case"prefix":return!0;case"extension":return!1;default:return t[r]<n[r]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce((e,t)=>(e[t[0]]=t[1],e),{})),e}is(e){return"node"===e||"model:node"===e}_clone(){return new kG(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=rz(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class xG extends kG{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}is(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new xG(this.data,this.getAttributes())}static fromJSON(e){return new xG(e.data,e.attributes)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class OG{constructor(e,t,n){if(this.textNode=e,t<0||t>e.offsetSize)throw new hj.a("model-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.offsetSize)throw new hj.a("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}is(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class IG{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((e,t)=>e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new hj.a("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&e<t+n.offsetSize)return this.getNodeIndex(n);t+=n.offsetSize}if(t!=e)throw new hj.a("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.length}_insertNodes(e,t){for(const e of t)if(!(e instanceof kG))throw new hj.a("model-nodelist-insertnodes-not-node",this);this._nodes.splice(e,0,...t)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map(e=>e.toJSON())}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class MG extends kG{constructor(e,t,n){super(t),this.name=e,this._children=new IG,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}findAncestor(e,t={includeSelf:!1}){let n=t.includeSelf?this:this.parent;for(;n;){if(n.name===e)return n;n=n.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map(e=>e._clone(!0)):null;return new MG(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){if("string"==typeof e)return[new xG(e)];zH(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new xG(e):e instanceof OG?new xG(e.data,e.getAttributes()):e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}static fromJSON(e){let t=null;if(e.children){t=[];for(const n of e.children)n.name?t.push(MG.fromJSON(n)):t.push(xG.fromJSON(n))}return new MG(e.name,e.attributes,t)}}class PG{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new hj.a("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new hj.a("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this.position=e.startPosition.clone():this.position=NG._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,n,r,i;do{r=this.position,i=this._visitedParent,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this.position=r,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const r=LG(t,n),i=r||RG(t,n,r);if(i instanceof MG)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=i),this.position=t,DG("elementStart",i,e,t,1);if(i instanceof xG){let r;if(this.singleCharacters)r=1;else{let e=i.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),r=e-t.offset}const a=t.offset-i.startOffset,o=new OG(i,a,r);return t.offset+=r,this.position=t,DG("text",o,e,t,r)}return t.path.pop(),t.offset++,this.position=t,this._visitedParent=n.parent,this.ignoreElementEnd?this._next():DG("elementEnd",n,e,t)}_previous(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&0===t.offset)return{done:!0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};const r=t.parent,i=LG(t,r),a=i||BG(t,r,i);if(a instanceof MG)return t.offset--,this.shallow?(this.position=t,DG("elementStart",a,e,t,1)):(t.path.push(a.maxOffset),this.position=t,this._visitedParent=a,this.ignoreElementEnd?this._previous():DG("elementEnd",a,e,t));if(a instanceof xG){let r;if(this.singleCharacters)r=1;else{let e=a.startOffset;this._boundaryStartParent==n&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),r=t.offset-e}const i=t.offset-a.startOffset,o=new OG(a,i-r,r);return t.offset-=r,this.position=t,DG("text",o,e,t,r)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,DG("elementStart",n,e,t,1)}}function DG(e,t,n,r,i){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:r,length:i}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class NG{constructor(e,t,n="toNone"){if(!e.is("element")&&!e.is("documentFragment"))throw new hj.a("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new hj.a("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChild(e.offsetToIndex(this.path[t])),!e)throw new hj.a("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new hj.a("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return LG(this,this.parent)}get nodeAfter(){const e=this.parent;return RG(this,e,LG(this,e))}get nodeBefore(){const e=this.parent;return BG(this,e,LG(this,e))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=JH(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new PG(t);return n.skip(e),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const t=JH(this.path,e.path),n="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,n)}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let r=0;for(;t[r]==n[r]&&t[r];)r++;return 0===r?null:t[r-1]}getShiftedBy(e){const t=this.clone(),n=t.offset+e;return t.offset=n<0?0:n,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){let t=null,n=null;switch(this.compareWith(e)){case"same":return!0;case"before":t=NG._createAt(this),n=NG._createAt(e);break;case"after":t=NG._createAt(e),n=NG._createAt(this);break;default:return!1}let r=t.parent;for(;t.path.length+n.path.length;){if(t.isEqual(n))return!0;if(t.path.length>n.path.length){if(t.offset!==r.maxOffset)return!1;t.path=t.path.slice(0,-1),r=r.parent,t.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}is(e){return"position"===e||"model:position"===e}hasSameParentAs(e){if(this.root!==e.root)return!1;return"same"==JH(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=NG._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let n;return t.containsPosition(this)||t.start.isEqual(this)?(n=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(n=n._getTransformedByDeletion(e.deletionPosition,1))):n=this.isEqual(e.deletionPosition)?NG._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),n}_getTransformedByDeletion(e,t){const n=NG._createAt(this);if(this.root!=e.root)return n;if("same"==JH(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;n.offset-=t}}else if("prefix"==JH(e.getParentPath(),this.getParentPath())){const r=e.path.length-1;if(e.offset<=this.path[r]){if(e.offset+t>this.path[r])return null;n.path[r]-=t}}return n}_getTransformedByInsertion(e,t){const n=NG._createAt(this);if(this.root!=e.root)return n;if("same"==JH(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&"toPrevious"!=this.stickiness)&&(n.offset+=t);else if("prefix"==JH(e.getParentPath(),this.getParentPath())){const r=e.path.length-1;e.offset<=this.path[r]&&(n.path[r]+=t)}return n}_getTransformedByMove(e,t,n){if(t=t._getTransformedByDeletion(e,n),e.isEqual(t))return NG._createAt(this);const r=this._getTransformedByDeletion(e,n);return null===r||e.isEqual(this)&&"toNext"==this.stickiness||e.getShiftedBy(n).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(e,t):r._getTransformedByInsertion(t,n)}_getCombined(e,t){const n=e.path.length-1,r=NG._createAt(t);return r.stickiness=this.stickiness,r.offset=r.offset+this.path[n]-e.offset,r.path=[...r.path,...this.path.slice(n+1)],r}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t,n="toNone"){if(e instanceof NG)return new NG(e.root,e.path,e.stickiness);{const r=e;if("end"==t)t=r.maxOffset;else{if("before"==t)return this._createBefore(r,n);if("after"==t)return this._createAfter(r,n);if(0!==t&&!t)throw new hj.a("model-createpositionat-offset-required",[this,e])}if(!r.is("element")&&!r.is("documentFragment"))throw new hj.a("model-position-parent-incorrect",[this,e]);const i=r.getPath();return i.push(t),new this(r.root,i,n)}}static _createAfter(e,t){if(!e.parent)throw new hj.a("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new hj.a("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){const n=new NG(t.graveyard,e.path);return n.stickiness=e.stickiness,n}if(!t.getRoot(e.root))throw new hj.a("model-position-fromjson-no-root",t,{rootName:e.root});return new NG(t.getRoot(e.root),e.path,e.stickiness)}}function LG(e,t){const n=t.getChild(t.offsetToIndex(e.offset));return n&&n.is("$text")&&n.startOffset<e.offset?n:null}function RG(e,t,n){return null!==n?null:t.getChild(t.offsetToIndex(e.offset))}function BG(e,t,n){return null!==n?null:t.getChild(t.offsetToIndex(e.offset)-1)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class jG{constructor(e,t=null){this.start=NG._createAt(e),this.end=t?NG._createAt(t):NG._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new PG({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==JH(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),r=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&r}containsItem(e){const t=NG._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}is(e){return"range"===e||"model:range"===e}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new jG(this.start,e.start)),this.containsPosition(e.end)&&t.push(new jG(e.end,this.end))):t.push(new jG(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new jG(t,n)}return null}getJoined(e,t=!1){let n=this.isIntersecting(e);if(n||(n=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!n)return null;let r=this.start,i=this.end;return e.start.isBefore(r)&&(r=e.start),e.end.isAfter(i)&&(i=e.end),new jG(r,i)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,n=NG._createAt(this.start);let r=n.parent;for(;n.path.length>t+1;){const t=r.maxOffset-n.offset;0!==t&&e.push(new jG(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,r=r.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],r=t-n.offset;0!==r&&e.push(new jG(n,n.getShiftedBy(r))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new PG(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new PG(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new PG(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new jG(this.start,this.end)]}getTransformedByOperations(e){const t=[new jG(this.start,this.end)];for(const n of e)for(let e=0;e<t.length;e++){const r=t[e].getTransformedByOperation(n);t.splice(e,1,...r),e+=r.length-1}for(let e=0;e<t.length;e++){const n=t[e];for(let r=e+1;r<t.length;r++){const e=t[r];(n.containsRange(e)||e.containsRange(n)||n.isEqual(e))&&t.splice(r,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,t=this.end.nodeBefore;return e&&e.is("element")&&e===t?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,t=!1){return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e,t=!1){const n=e.sourcePosition,r=e.howMany,i=e.targetPosition;return this._getTransformedByMove(n,i,r,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let n=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(n=this.end.getShiftedBy(1)),t.root!=n.root&&(n=this.end.getShiftedBy(-1)),new jG(t,n)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new jG(this.start);let t=this.start._getTransformedByMergeOperation(e),n=this.end._getTransformedByMergeOperation(e);return t.root!=n.root&&(n=this.end.getShiftedBy(-1)),t.isAfter(n)?(e.sourcePosition.isBefore(e.targetPosition)?(t=NG._createAt(n),t.offset=0):(e.deletionPosition.isEqual(t)||(n=e.deletionPosition),t=e.targetPosition),new jG(t,n)):new jG(t,n)}_getTransformedByInsertion(e,t,n=!1){if(n&&this.containsPosition(e))return[new jG(this.start,e),new jG(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const n=new jG(this.start,this.end);return n.start=n.start._getTransformedByInsertion(e,t),n.end=n.end._getTransformedByInsertion(e,t),[n]}}_getTransformedByMove(e,t,n,r=!1){if(this.isCollapsed){const r=this.start._getTransformedByMove(e,t,n);return[new jG(r)]}const i=jG._createFromPositionAndShift(e,n),a=t._getTransformedByDeletion(e,n);if(this.containsPosition(t)&&!r&&(i.containsPosition(this.start)||i.containsPosition(this.end))){const r=this.start._getTransformedByMove(e,t,n),i=this.end._getTransformedByMove(e,t,n);return[new jG(r,i)]}let o;const s=this.getDifference(i);let l=null;const c=this.getIntersection(i);if(1==s.length?l=new jG(s[0].start._getTransformedByDeletion(e,n),s[0].end._getTransformedByDeletion(e,n)):2==s.length&&(l=new jG(this.start,this.end._getTransformedByDeletion(e,n))),o=l?l._getTransformedByInsertion(a,n,null!==c||r):[],c){const e=new jG(c.start._getCombined(i.start,a),c.end._getCombined(i.start,a));2==o.length?o.splice(1,0,e):o.push(e)}return o}_getTransformedByDeletion(e,t){let n=this.start._getTransformedByDeletion(e,t),r=this.end._getTransformedByDeletion(e,t);return null==n&&null==r?null:(null==n&&(n=e),null==r&&(r=e),new jG(n,r))}static _createFromPositionAndShift(e,t){const n=e,r=e.getShiftedBy(t);return t>0?new this(n,r):new this(r,n)}static _createIn(e){return new this(NG._createAt(e,0),NG._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(NG._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new hj.a("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort((e,t)=>e.start.isAfter(t.start)?1:-1);const n=e.indexOf(t),r=new this(t.start,t.end);if(n>0)for(let t=n-1;e[t].end.isEqual(r.start);t++)r.start=NG._createAt(e[t].start);for(let t=n+1;t<e.length&&e[t].start.isEqual(r.end);t++)r.end=NG._createAt(e[t].end);return r}static fromJSON(e,t){return new this(NG.fromJSON(e.start,t),NG.fromJSON(e.end,t))}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class FG{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",(e,t)=>{if(t.viewPosition)return;const n=this._modelToViewMapping.get(t.modelPosition.parent);if(!n)throw new hj.a("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(n,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;const n=this.findMappedViewAncestor(t.viewPosition),r=this._viewToModelMapping.get(n),i=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=NG._createAt(r,i)},{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const n=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(n)==e&&this._modelToViewMapping.delete(n))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e);const r=this._elementToMarkerNames.get(e)||new Set;r.add(t),this._markerNameToElements.set(t,n),this._elementToMarkerNames.set(e,r)}unbindElementFromMarkerName(e,t){const n=this._markerNameToElements.get(t);n&&(n.delete(e),0==n.size&&this._markerNameToElements.delete(t));const r=this._elementToMarkerNames.get(e);r&&(r.delete(t),0==r.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new jG(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new Jz(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={isPhantom:!1}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())n.add(t);else n.add(e);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,n){if(n!=e){return this._toModelOffset(e.parent,e.index,n)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let r=0;for(let n=0;n<t;n++)r+=this.getModelLength(e.getChild(n));return r}getModelLength(e){if(this._viewToModelLengthCallbacks.get(e.name)){return this._viewToModelLengthCallbacks.get(e.name)(e)}if(this._viewToModelMapping.has(e))return 1;if(e.is("$text"))return e.data.length;if(e.is("uiElement"))return 0;{let t=0;for(const n of e.getChildren())t+=this.getModelLength(n);return t}}findPositionIn(e,t){let n,r=0,i=0,a=0;if(e.is("$text"))return new $z(e,t);for(;i<t;)n=e.getChild(a),r=this.getModelLength(n),i+=r,a++;return i==t?this._moveViewPositionToTextNode(new $z(e,a)):this.findPositionIn(n,t-(i-r))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,n=e.nodeAfter;return t instanceof tz?new $z(t,t.data.length):n instanceof tz?new $z(n,0):e}}UF(FG,mj);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class UG{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=HG(t),e instanceof OG&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=HG(t),e instanceof OG&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=HG(t),e instanceof OG&&(e=this._getSymbolForTextProxy(e));const n=this._consumable.get(e);if(void 0===n)return null;const r=n.get(t);return void 0===r?null:r}revert(e,t){t=HG(t),e instanceof OG&&(e=this._getSymbolForTextProxy(e));const n=this.test(e,t);return!1===n?(this._consumable.get(e).set(t,!0),!0):!0!==n&&null}verifyAllConsumed(e){const t=[];for(const[n,r]of this._consumable)for(const[i,a]of r){const r=i.split(":")[0];a&&e==r&&t.push({event:i,item:n.name||n.description})}if(t.length)throw new hj.a("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const n=this._textProxyRegistry.get(e.startOffset);if(n){const r=n.get(e.endOffset);r&&(t=r.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,n=e.endOffset,r=e.parent,i=Symbol("$textProxy:"+e.data);let a,o;return a=this._textProxyRegistry.get(t),a||(a=new Map,this._textProxyRegistry.set(t,a)),o=a.get(n),o||(o=new Map,a.set(n,o)),o.set(r,i),i}}function HG(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class zG{constructor(e){this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,n){const r=this._createConversionApi(n,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,r);const i=this._reduceChanges(e.getChanges());for(const e of i)"insert"===e.type?this._convertInsert(jG._createFromPositionAndShift(e.position,e.length),r):"reinsert"===e.type?this._convertReinsert(jG._createFromPositionAndShift(e.position,e.length),r):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,r):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,r);for(const e of r.mapper.flushUnboundMarkerNames()){const n=t.get(e).getRange();this._convertMarkerRemove(e,n,r),this._convertMarkerAdd(e,n,r)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,r);r.mapper.flushDeferredBindings(),r.consumable.verifyAllConsumed("insert")}convert(e,t,n,r={}){const i=this._createConversionApi(n,void 0,r);this._convertInsert(e,i);for(const[e,n]of t)this._convertMarkerAdd(e,n,i);i.consumable.verifyAllConsumed("insert")}convertSelection(e,t,n){const r=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),i=this._createConversionApi(n);if(this._addConsumablesForSelection(i.consumable,e,r),this.fire("selection",{selection:e},i),e.isCollapsed){for(const t of r){const n=t.getRange();if(!VG(e.getFirstPosition(),t,i.mapper))continue;const r={item:e,markerName:t.name,markerRange:n};i.consumable.test(e,"addMarker:"+t.name)&&this.fire("addMarker:"+t.name,r,i)}for(const t of e.getAttributeKeys()){const n={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};i.consumable.test(e,"attribute:"+n.attributeKey)&&this.fire("attribute:"+n.attributeKey+":$text",n,i)}}}_convertInsert(e,t,n={}){n.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const n of Array.from(e.getWalker({shallow:!0})).map(WG))this._testAndFire("insert",n,t)}_convertRemove(e,t,n,r){this.fire("remove:"+n,{position:e,length:t},r)}_convertAttribute(e,t,n,r,i){this._addConsumablesForRange(i.consumable,e,`attribute:${t}`);for(const a of e){const e={item:a.item,range:jG._createFromPositionAndShift(a.previousPosition,a.length),attributeKey:t,attributeOldValue:n,attributeNewValue:r};this._testAndFire(`attribute:${t}`,e,i)}}_convertReinsert(e,t){const n=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,n);for(const e of n.map(WG))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,n){if("$graveyard"==t.root.rootName)return;const r="addMarker:"+e;if(n.consumable.add(t,r),this.fire(r,{markerName:e,markerRange:t},n),n.consumable.consume(t,r)){this._addConsumablesForRange(n.consumable,t,r);for(const i of t.getItems()){if(!n.consumable.test(i,r))continue;const a={item:i,range:jG._createOn(i),markerName:e,markerRange:t};this.fire(r,a,n)}}}_convertMarkerRemove(e,t,n){"$graveyard"!=t.root.rootName&&this.fire("removeMarker:"+e,{markerName:e,markerRange:t},n)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const n of t){const t=n.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n)}}return e}_addConsumablesForRange(e,t,n){for(const r of t.getItems())e.add(r,n);return e}_addConsumablesForSelection(e,t,n){e.add(t,"selection");for(const r of n)e.add(t,"addMarker:"+r.name);for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n);return e}_testAndFire(e,t,n){const r=function(e,t){const n=t.item.name||"$text";return`${e}:${n}`}(e,t),i=t.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(t.item):t.item,a=this._firedEventsMap.get(n),o=a.get(i);if(o){if(o.has(r))return;o.add(r)}else a.set(i,new Set([r]));this.fire(r,t,n)}_testAndFireAddAttributes(e,t){const n={item:e,range:jG._createOn(e)};for(const e of n.item.getAttributeKeys())n.attributeKey=e,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(e),this._testAndFire(`attribute:${e}`,n,t)}_createConversionApi(e,t=new Set,n={}){const r={...this._conversionApi,consumable:new UG,writer:e,options:n,convertItem:e=>this._convertInsert(jG._createOn(e),r),convertChildren:e=>this._convertInsert(jG._createIn(e),r,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,r),canReuseView:e=>!t.has(r.mapper.toModelElement(e))};return this._firedEventsMap.set(r,new Map),r}}function VG(e,t,n){const r=t.getRange(),i=Array.from(e.getAncestors());return i.shift(),i.reverse(),!i.some(e=>{if(r.containsItem(e)){return!!n.toViewElement(e).getCustomProperty("addHighlight")}})}function WG(e){return{item:e.item,range:jG._createFromPositionAndShift(e.previousPosition,e.length)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */UF(zG,mj);class GG{constructor(e,t,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setTo(e,t,n)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const r of e._ranges)if(t.isEqual(r)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new jG(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new jG(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new jG(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(e,t,n){if(null===e)this._setRanges([]);else if(e instanceof GG)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof jG)this._setRanges([e],!!t&&!!t.backward);else if(e instanceof NG)this._setRanges([new jG(e)]);else if(e instanceof kG){const r=!!n&&!!n.backward;let i;if("in"==t)i=jG._createIn(e);else if("on"==t)i=jG._createOn(e);else{if(void 0===t)throw new hj.a("model-selection-setto-required-second-parameter",[this,e]);i=new jG(NG._createAt(e,t))}this._setRanges([i],r)}else{if(!zH(e))throw new hj.a("model-selection-setto-not-selectable",[this,e]);this._setRanges(e,t&&!!t.backward)}}_setRanges(e,t=!1){const n=(e=Array.from(e)).some(t=>{if(!(t instanceof jG))throw new hj.a("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every(e=>!e.isEqual(t))});if(e.length!==this._ranges.length||n){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new hj.a("model-selection-setfocus-no-ranges",[this,e]);const n=NG._createAt(e,t);if("same"==n.compareWith(this.focus))return;const r=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(r)?(this._pushRange(new jG(n,r)),this._lastRangeBackward=!0):(this._pushRange(new jG(r,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}is(e){return"selection"===e||"model:selection"===e}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=KG(t.start,e);n&&XG(n,t)&&(yield n);for(const n of t.getWalker()){const r=n.item;"elementEnd"==n.type&&YG(r,e,t)&&(yield r)}const r=KG(t.end,e);r&&!t.end.isTouching(NG._createAt(r,0))&&XG(r,t)&&(yield r)}}containsEntireContent(e=this.anchor.root){const t=NG._createAt(e,0),n=NG._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new jG(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new hj.a("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function qG(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&e.parent)}function YG(e,t,n){return qG(e,t)&&XG(e,n)}function KG(e,t){const n=e.parent.root.document.model.schema,r=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const a=r.find(e=>!i&&(i=n.isLimit(e),!i&&qG(e,t)));return r.forEach(e=>t.add(e)),a}function XG(e,t){const n=function(e){const t=e.root.document.model.schema;let n=e.parent;for(;n;){if(t.isBlock(n))return n;n=n.parent}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e);return!n||!t.containsRange(jG._createOn(n),!0)}UF(GG,mj);class QG extends jG{constructor(e,t){super(e,t),$G.call(this)}detach(){this.stopListening()}is(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e}toRange(){return new jG(this.start,this.end)}static fromRange(e){return new QG(e.start,e.end)}}function $G(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&JG.call(this,n)},{priority:"low"})}function JG(e){const t=this.getTransformedByOperation(e),n=jG._createFromRanges(t),r=!n.isEqual(this),i=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let a=null;if(r){"$graveyard"==n.root.rootName&&(a="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",t,{deletionPosition:a})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:a})}UF(QG,mj);class ZG{constructor(e){this._selection=new eq(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}is(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return"selection:"+e}static _isStoreAttributeKey(e){return e.startsWith("selection:")}}UF(ZG,mj);class eq extends GG{constructor(e){super(),this.markers=new VH({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new hj.a("document-selection-wrong-position",this,{range:e})}),this.listenTo(this._model.markers,"update",(e,t,n,r)=>{this._updateMarker(t,r)}),this.listenTo(this._document,"change",(e,t)=>{!function(e,t){const n=e.document.differ;for(const r of n.getChanges()){if("insert"!=r.type)continue;const n=r.position.parent;r.length===n.maxOffset&&e.enqueueChange(t,e=>{const t=Array.from(n.getAttributeKeys()).filter(e=>e.startsWith("selection:"));for(const r of t)e.removeAttribute(r,n)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(this._model,t)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(e,t,n){super.setTo(e,t,n),this._updateAttributes(!0),this._updateMarkers()}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0),this._updateMarkers()}setAttribute(e,t){if(this._setAttribute(e,t)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=cj();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new hj.a("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this._updateMarkers()}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=QG.fromRange(e);return t.on("change:range",(e,n,r)=>{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=r.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}}),t}_updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const r=t.getRange();for(const n of this.getRanges())r.containsRange(n,!n.isCollapsed)&&e.push(t)}const n=Array.from(this.markers);for(const n of e)this.markers.has(n)||(this.markers.add(n),t=!0);for(const n of Array.from(this.markers))e.includes(n)||(this.markers.remove(n),t=!0);t&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(e,t){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let r=!1;const i=Array.from(this.markers),a=this.markers.has(e);if(t){let n=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){n=!0;break}n&&!a?(this.markers.add(e),r=!0):!n&&a&&(this.markers.remove(e),r=!0)}else a&&(this.markers.remove(e),r=!0);r&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(e){const t=rz(this._getSurroundingAttributes()),n=rz(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const r=[];for(const[e,t]of this.getAttributes())n.has(e)&&n.get(e)===t||r.push(e);for(const[e]of n)this.hasAttribute(e)||r.push(e);r.length>0&&this.fire("change:attribute",{attributeKeys:r,directChange:!1})}_setAttribute(e,t,n=!0){const r=n?"normal":"low";return("low"!=r||"normal"!=this._attributePriority.get(e))&&(super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,r),!0))}_removeAttribute(e,t=!0){const n=t?"normal":"low";return("low"!=n||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,n),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,n]of this.getAttributes())e.get(t)!==n&&this._removeAttribute(t,!1);for(const[n,r]of e){this._setAttribute(n,r,!1)&&t.add(n)}return t}*_getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith("selection:")){const n=t.substr("selection:".length);yield[n,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let n=null;if(this.isCollapsed){const r=e.textNode?e.textNode:e.nodeBefore,i=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=tq(r)),n||(n=tq(i)),!this.isGravityOverridden&&!n){let e=r;for(;e&&!t.isInline(e)&&!n;)e=e.previousSibling,n=tq(e)}if(!n){let e=i;for(;e&&!t.isInline(e)&&!n;)e=e.nextSibling,n=tq(e)}n||(n=this._getStoredAttributes())}else{const e=this.getFirstRange();for(const r of e){if(r.item.is("element")&&t.isObject(r.item))break;if("text"==r.type){n=r.item.getAttributes();break}}}return n}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function tq(e){return e instanceof OG||e instanceof xG?e.getAttributes():null}class nq{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}var rq=function(e){return RH(e,5)};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class iq extends nq{elementToElement(e){return this.add(function(e){(e=rq(e)).model=sq(e.model),e.view=lq(e.view,"container"),e.model.attributes.length&&(e.model.children=!0);return t=>{t.on("insert:"+e.model.name,function(e,t=gq){return(n,r,i)=>{if(!t(r.item,i.consumable,{preflight:!0}))return;const a=e(r.item,i,r);if(!a)return;t(r.item,i.consumable);const o=i.mapper.toViewPosition(r.range.start);i.mapper.bindElements(r.item,a),i.writer.insert(o,a),i.convertAttributes(r.item),pq(a,r.item.getChildren(),i,{reconversion:r.reconversion})}}(e.view,fq(e.model)),{priority:e.converterPriority||"normal"}),(e.model.children||e.model.attributes.length)&&t.on("reduceChanges",hq(e.model),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){return(e=rq(e)).model=sq(e.model),e.view=lq(e.view,"container"),e.model.children=!0,t=>{if(t._conversionApi.schema.checkChild(e.model.name,"$text"))throw new hj.a("conversion-element-to-structure-disallowed-text",t,{elementName:e.model.name});var n,r;t.on("insert:"+e.model.name,(n=e.view,r=fq(e.model),(e,t,i)=>{if(!r(t.item,i.consumable,{preflight:!0}))return;const a=new Map;i.writer._registerSlotFactory(function(e,t,n){return(r,i="children")=>{const a=r.createContainerElement("$slot");let o=null;if("children"===i)o=Array.from(e.getChildren());else{if("function"!=typeof i)throw new hj.a("conversion-slot-mode-unknown",n.dispatcher,{modeOrFilter:i});o=Array.from(e.getChildren()).filter(e=>i(e))}return t.set(a,o),a}}(t.item,a,i));const o=n(t.item,i,t);if(i.writer._clearSlotFactory(),!o)return;!function(e,t,n){const r=Array.from(t.values()).flat(),i=new Set(r);if(i.size!=r.length)throw new hj.a("conversion-slot-filter-overlap",n.dispatcher,{element:e});if(i.size!=e.childCount)throw new hj.a("conversion-slot-filter-incomplete",n.dispatcher,{element:e})}(t.item,a,i),r(t.item,i.consumable);const s=i.mapper.toViewPosition(t.range.start);i.mapper.bindElements(t.item,o),i.writer.insert(s,o),i.convertAttributes(t.item),function(e,t,n,r){n.mapper.on("modelToViewPosition",o,{priority:"highest"});let i=null,a=null;for([i,a]of t)pq(e,a,n,r),n.writer.move(n.writer.createRangeIn(i),n.writer.createPositionBefore(i)),n.writer.remove(i);function o(e,t){const n=t.modelPosition.nodeAfter,r=a.indexOf(n);r<0||(t.viewPosition=t.mapper.findPositionIn(i,r))}n.mapper.off("modelToViewPosition",o)}(o,a,i,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),t.on("reduceChanges",hq(e.model),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){let t="attribute:"+((e=rq(e)).model.key?e.model.key:e.model);e.model.name&&(t+=":"+e.model.name);if(e.model.values)for(const t of e.model.values)e.view[t]=lq(e.view[t],"attribute");else e.view=lq(e.view,"attribute");const n=cq(e);return r=>{r.on(t,function(e){return(t,n,r)=>{if(!r.consumable.test(n.item,t.name))return;const i=e(n.attributeOldValue,r,n),a=e(n.attributeNewValue,r,n);if(!i&&!a)return;r.consumable.consume(n.item,t.name);const o=r.writer,s=o.document.selection;if(n.item instanceof GG||n.item instanceof ZG)o.wrap(s.getFirstRange(),a);else{let e=r.mapper.toViewRange(n.range);null!==n.attributeOldValue&&i&&(e=o.unwrap(e,i)),null!==n.attributeNewValue&&a&&o.wrap(e,a)}}}(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t="attribute:"+((e=rq(e)).model.key?e.model.key:e.model);e.model.name&&(t+=":"+e.model.name);if(e.model.values)for(const t of e.model.values)e.view[t]=uq(e.view[t]);else e.view=uq(e.view);const n=cq(e);return r=>{var i;r.on(t,(i=n,(e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;const r=i(t.attributeOldValue,n,t),a=i(t.attributeNewValue,n,t);if(!r&&!a)return;n.consumable.consume(t.item,e.name);const o=n.mapper.toViewElement(t.item),s=n.writer;if(!o)throw new hj.a("conversion-attribute-to-attribute-on-text",n.dispatcher,t);if(null!==t.attributeOldValue&&r)if("class"==r.key){const e=GH(r.value);for(const t of e)s.removeClass(t,o)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)s.removeStyle(t,o)}else s.removeAttribute(r.key,o);if(null!==t.attributeNewValue&&a)if("class"==a.key){const e=GH(a.value);for(const t of e)s.addClass(t,o)}else if("style"==a.key){const e=Object.keys(a.value);for(const t of e)s.setStyle(t,a.value[t],o)}else s.setAttribute(a.key,a.value,o)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){return(e=rq(e)).view=lq(e.view,"ui"),t=>{var n;t.on("addMarker:"+e.model,(n=e.view,(e,t,r)=>{t.isOpening=!0;const i=n(t,r);t.isOpening=!1;const a=n(t,r);if(!i||!a)return;const o=t.markerRange;if(o.isCollapsed&&!r.consumable.consume(o,e.name))return;for(const t of o)if(!r.consumable.consume(t.item,e.name))return;const s=r.mapper,l=r.writer;l.insert(s.toViewPosition(o.start),i),r.mapper.bindElementToMarker(i,t.markerName),o.isCollapsed||(l.insert(s.toViewPosition(o.end),a),r.mapper.bindElementToMarker(a,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,(e.view,(e,t,n)=>{const r=n.mapper.markerNameToElements(t.markerName);if(r){for(const e of r)n.mapper.unbindElementFromMarkerName(e,t.markerName),n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var n;t.on("addMarker:"+e.model,(n=e.view,(e,t,r)=>{if(!t.item)return;if(!(t.item instanceof GG||t.item instanceof ZG||t.item.is("$textProxy")))return;const i=dq(n,t,r);if(!i)return;if(!r.consumable.consume(t.item,e.name))return;const a=r.writer,o=aq(a,i),s=a.document.selection;if(t.item instanceof GG||t.item instanceof ZG)a.wrap(s.getFirstRange(),o,s);else{const e=r.mapper.toViewRange(t.range),n=a.wrap(e,o);for(const e of n.getItems())if(e.is("attributeElement")&&e.isSimilar(o)){r.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on("addMarker:"+e.model,function(e){return(t,n,r)=>{if(!n.item)return;if(!(n.item instanceof MG))return;const i=dq(e,n,r);if(!i)return;if(!r.consumable.test(n.item,t.name))return;const a=r.mapper.toViewElement(n.item);if(a&&a.getCustomProperty("addHighlight")){r.consumable.consume(n.item,t.name);for(const e of jG._createIn(n.item))r.consumable.consume(e.item,t.name);a.getCustomProperty("addHighlight")(a,i,r.writer),r.mapper.bindElementToMarker(a,n.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,function(e){return(t,n,r)=>{if(n.markerRange.isCollapsed)return;const i=dq(e,n,r);if(!i)return;const a=aq(r.writer,i),o=r.mapper.markerNameToElements(n.markerName);if(o){for(const e of o)r.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("attributeElement")?r.writer.unwrap(r.writer.createRangeOn(e),a):e.getCustomProperty("removeHighlight")(e,i.id,r.writer);r.writer.clearClonedElementsGroup(n.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=rq(e)).model;e.view||(e.view=n=>({group:t,name:n.substr(e.model.length+1)}));return n=>{var r;n.on("addMarker:"+t,(r=e.view,(e,t,n)=>{const i=r(t.markerName,n);if(!i)return;const a=t.markerRange;n.consumable.consume(a,e.name)&&(oq(a,!1,n,t,i),oq(a,!0,n,t,i),e.stop())}),{priority:e.converterPriority||"normal"}),n.on("removeMarker:"+t,function(e){return(t,n,r)=>{const i=e(n.markerName,r);if(!i)return;const a=r.mapper.markerNameToElements(n.markerName);if(a){for(const e of a)r.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("containerElement")?(o(`data-${i.group}-start-before`,e),o(`data-${i.group}-start-after`,e),o(`data-${i.group}-end-before`,e),o(`data-${i.group}-end-after`,e)):r.writer.clear(r.writer.createRangeOn(e),e);r.writer.clearClonedElementsGroup(n.markerName),t.stop()}function o(e,t){if(t.hasAttribute(e)){const n=new Set(t.getAttribute(e).split(","));n.delete(i.name),0==n.size?r.writer.removeAttribute(e,t):r.writer.setAttribute(e,Array.from(n).join(","),t)}}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}}function aq(e,t){const n=e.createAttributeElement("span",t.attributes);return t.classes&&n._addClass(t.classes),"number"==typeof t.priority&&(n._priority=t.priority),n._id=t.id,n}function oq(e,t,n,r,i){const a=t?e.start:e.end,o=a.nodeAfter&&a.nodeAfter.is("element")?a.nodeAfter:null,s=a.nodeBefore&&a.nodeBefore.is("element")?a.nodeBefore:null;if(o||s){let e,a;t&&o||!t&&!s?(e=o,a=!0):(e=s,a=!1);const l=n.mapper.toViewElement(e);if(l)return void function(e,t,n,r,i,a){const o=`data-${a.group}-${t?"start":"end"}-${n?"before":"after"}`,s=e.hasAttribute(o)?e.getAttribute(o).split(","):[];s.unshift(a.name),r.writer.setAttribute(o,s.join(","),e),r.mapper.bindElementToMarker(e,i.markerName)}(l,t,a,n,r,i)}!function(e,t,n,r,i){const a=`${i.group}-${t?"start":"end"}`,o=i.name?{name:i.name}:null,s=n.writer.createUIElement(a,o);n.writer.insert(e,s),n.mapper.bindElementToMarker(s,r.markerName)}(n.mapper.toViewPosition(a),t,n,r,i)}function sq(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function lq(e,t){return"function"==typeof e?e:(n,r)=>function(e,t,n){"string"==typeof e&&(e={name:e});let r;const i=t.writer,a=Object.assign({},e.attributes);if("container"==n)r=i.createContainerElement(e.name,a);else if("attribute"==n){const t={priority:e.priority||uV.DEFAULT_PRIORITY};r=i.createAttributeElement(e.name,a,t)}else r=i.createUIElement(e.name,a);if(e.styles){const t=Object.keys(e.styles);for(const n of t)i.setStyle(n,e.styles[n],r)}if(e.classes){const t=e.classes;if("string"==typeof t)i.addClass(t,r);else for(const e of t)i.addClass(e,r)}return r}(e,r,t)}function cq(e){return e.model.values?(t,n)=>{const r=e.view[t];return r?r(t,n):null}:e.view}function uq(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function dq(e,t,n){const r="function"==typeof e?e(t,n):e;return r?(r.priority||(r.priority=10),r.id||(r.id=t.markerName),r):null}function hq(e){const t=function(e){return(t,n)=>{if(!t.is("element",e.name))return!1;if("attribute"==n.type){if(e.attributes.includes(n.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,n)=>{const r=[];n.reconvertedElements||(n.reconvertedElements=new Set);for(const e of n.changes){const i=e.position?e.position.parent:e.range.start.nodeAfter;if(i&&t(i,e)){if(!n.reconvertedElements.has(i)){n.reconvertedElements.add(i);const e=NG._createBefore(i);r.push({type:"remove",name:i.name,position:e,length:1},{type:"reinsert",name:i.name,position:e,length:1})}}else r.push(e)}n.changes=r}}function fq(e){return(t,n,r={})=>{const i=["insert"];for(const n of e.attributes)t.hasAttribute(n)&&i.push(`attribute:${n}`);return!!i.every(e=>n.test(t,e))&&(r.preflight||i.forEach(e=>n.consume(t,e)),!0)}}function pq(e,t,n,r){for(const i of t)mq(e.root,i,n,r)||n.convertItem(i)}function mq(e,t,n,r){const{writer:i,mapper:a}=n;if(!r.reconversion)return!1;const o=a.toViewElement(t);return!(!o||o.root==e)&&(!!n.canReuseView(o)&&(i.move(i.createRangeOn(o),a.toViewPosition(NG._createBefore(t))),!0))}function gq(e,t,{preflight:n}={}){return n?t.test(e,"insert"):t.consume(e,"insert")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function vq(e){const{schema:t,document:n}=e.model;for(const r of n.getRootNames()){const i=n.getRoot(r);if(i.isEmpty&&!t.checkChild(i,"$text")&&t.checkChild(i,"paragraph"))return e.insertElement("paragraph",i),!0}return!1}function bq(e,t,n){const r=n.createContext(e);return!!n.checkChild(r,"paragraph")&&!!n.checkChild(r.push("paragraph"),t)}function yq(e,t){const n=t.createElement("paragraph");return t.insert(n,e),t.createPositionAt(n,0)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Aq extends nq{elementToElement(e){return this.add(_q(e))}elementToAttribute(e){return this.add(function(e){Sq(e=rq(e));const t=Cq(e,!1),n=wq(e.view),r=n?"element:"+n:"element";return n=>{n.on(r,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=rq(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let n;if("class"==t||"style"==t){n={["class"==t?"classes":"styles"]:e.view.value}}else{const r=void 0===e.view.value?/[\s\S]*/:e.view.value;n={attributes:{[t]:r}}}e.view.name&&(n.name=e.view.name);return e.view=n,t}(e));Sq(e,t);const n=Cq(e,!0);return t=>{t.on("element",n,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){return function(e){const t=e.model;e.model=(e,n)=>{const r="string"==typeof t?t:t(e,n);return n.writer.createElement("$marker",{"data-name":r})}}(e=rq(e)),_q(e)}(e))}dataToMarker(e){return this.add(function(e){(e=rq(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t=Eq(Tq(e,"start")),n=Eq(Tq(e,"end"));return r=>{r.on("element:"+e.view+"-start",t,{priority:e.converterPriority||"normal"}),r.on("element:"+e.view+"-end",n,{priority:e.converterPriority||"normal"});const i=uj.get("low"),a=uj.get("highest"),o=uj.get(e.converterPriority)/a;r.on("element",function(e){return(t,n,r)=>{const i=`data-${e.view}`;function a(t,i){for(const a of i){const i=e.model(a,r),o=r.writer.createElement("$marker",{"data-name":i});r.writer.insert(o,t),n.modelCursor.isEqual(t)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(t,1),n.modelRange=n.modelRange._getTransformedByInsertion(t,1)[0]}}(r.consumable.test(n.viewItem,{attributes:i+"-end-after"})||r.consumable.test(n.viewItem,{attributes:i+"-start-after"})||r.consumable.test(n.viewItem,{attributes:i+"-end-before"})||r.consumable.test(n.viewItem,{attributes:i+"-start-before"}))&&(n.modelRange||Object.assign(n,r.convertChildren(n.viewItem,n.modelCursor)),r.consumable.consume(n.viewItem,{attributes:i+"-end-after"})&&a(n.modelRange.end,n.viewItem.getAttribute(i+"-end-after").split(",")),r.consumable.consume(n.viewItem,{attributes:i+"-start-after"})&&a(n.modelRange.end,n.viewItem.getAttribute(i+"-start-after").split(",")),r.consumable.consume(n.viewItem,{attributes:i+"-end-before"})&&a(n.modelRange.start,n.viewItem.getAttribute(i+"-end-before").split(",")),r.consumable.consume(n.viewItem,{attributes:i+"-start-before"})&&a(n.modelRange.start,n.viewItem.getAttribute(i+"-start-before").split(",")))}}(e),{priority:i+o})}}(e))}}function _q(e){const t=Eq(e=rq(e)),n=wq(e.view),r=n?"element:"+n:"element";return n=>{n.on(r,t,{priority:e.converterPriority||"normal"})}}function wq(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function Eq(e){const t=new iz(e.view);return(n,r,i)=>{const a=t.match(r.viewItem);if(!a)return;const o=a.match;if(o.name=!0,!i.consumable.test(r.viewItem,o))return;const s=function(e,t,n){return e instanceof Function?e(t,n):n.writer.createElement(e)}(e.model,r.viewItem,i);s&&i.safeInsert(s,r.modelCursor)&&(i.consumable.consume(r.viewItem,o),i.convertChildren(r.viewItem,s),i.updateConversionResult(s,r))}}function Sq(e,t=null){const n=null===t||(e=>e.getAttribute(t)),r="object"!=typeof e.model?e.model:e.model.key,i="object"!=typeof e.model||void 0===e.model.value?n:e.model.value;e.model={key:r,value:i}}function Cq(e,t){const n=new iz(e.view);return(r,i,a)=>{if(!i.modelRange&&t)return;const o=n.match(i.viewItem);if(!o)return;if(!function(e,t){const n="function"==typeof e?e(t):e;if("object"==typeof n&&!wq(n))return!1;return!n.classes&&!n.attributes&&!n.styles}(e.view,i.viewItem)?delete o.match.name:o.match.name=!0,!a.consumable.test(i.viewItem,o.match))return;const s=e.model.key,l="function"==typeof e.model.value?e.model.value(i.viewItem,a):e.model.value;null!==l&&(i.modelRange||Object.assign(i,a.convertChildren(i.viewItem,i.modelCursor)),function(e,t,n,r){let i=!1;for(const a of Array.from(e.getItems({shallow:n})))r.schema.checkAttribute(a,t.key)&&(i=!0,a.hasAttribute(t.key)||r.writer.setAttribute(t.key,t.value,a));return i}(i.modelRange,{key:s,value:l},t,a)&&(a.consumable.test(i.viewItem,{name:!0})&&(o.match.name=!0),a.consumable.consume(i.viewItem,o.match)))}}function Tq(e,t){const n={};return n.view=e.view+"-"+t,n.model=(t,n)=>{const r=t.getAttribute("name"),i=e.model(r,n);return n.writer.createElement("$marker",{"data-name":i})},n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class kq{constructor(e,t){this.model=e,this.view=new TG(t),this.mapper=new FG,this.downcastDispatcher=new zG({mapper:this.mapper,schema:e.schema});const n=this.model.document,r=n.selection,i=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(n,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(n.differ,i,e),this.downcastDispatcher.convertSelection(r,i,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(n,r)=>{const i=r.newSelection,a=[];for(const e of i.getRanges())a.push(t.toModelRange(e));const o=e.createSelection(a,{backward:i.isBackward});o.isEqual(e.document.selection)||e.change(e=>{e.setSelection(o)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const r=n.writer,i=n.mapper.toViewPosition(t.range.start),a=r.createText(t.item.data);r.insert(i,a)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(e,t,n)=>{n.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||n.convertChildren(t.item)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,t,n)=>{const r=n.mapper.toViewPosition(t.position),i=t.position.getShiftedBy(t.length),a=n.mapper.toViewPosition(i,{isPhantom:!0}),o=n.writer.createRange(r,a),s=n.writer.remove(o.getTrimmed());for(const e of n.writer.createRangeIn(s).getItems())n.mapper.unbindViewElement(e,{defer:!0})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=n.writer,i=r.document.selection;for(const e of i.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&n.writer.mergeAttributes(e.start);r.setSelection(null)},{priority:"high"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=t.selection;if(r.isCollapsed)return;if(!n.consumable.consume(r,"selection"))return;const i=[];for(const e of r.getRanges()){const t=n.mapper.toViewRange(e);i.push(t)}n.writer.setSelection(i,{backward:r.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const r=t.selection;if(!r.isCollapsed)return;if(!n.consumable.consume(r,"selection"))return;const i=n.writer,a=r.getFirstPosition(),o=n.mapper.toViewPosition(a),s=i.breakAttributes(o);i.setSelection(s)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;const t=new Xz(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,n=this.model.markers.get(t);if(!n)throw new hj.a("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change(()=>{this.model.markers._refresh(n)})}reconvertItem(e){this.model.change(()=>{this.model.document.differ._refreshItem(e)})}}UF(kq,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class xq{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new hj.a("commandcollection-command-not-found",this,{commandName:e});return n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Oq{constructor(){this._consumables=new Map}add(e,t){let n;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?n=this._consumables.get(e):(n=new Iq(e),this._consumables.set(e,n)),n.add(t))}test(e,t){const n=this._consumables.get(e);return void 0===n?null:e.is("$text")||e.is("documentFragment")?n:n.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const n=this._consumables.get(e);void 0!==n&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):n.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},n=e.getAttributeKeys();for(const e of n)"style"!=e&&"class"!=e&&t.attributes.push(e);const r=e.getClassNames();for(const e of r)t.classes.push(e);const i=e.getStyleNames();for(const e of i)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Oq(e)),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Oq.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const n of e.getChildren())t=Oq.createFrom(n,t);return t}}class Iq{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const n=this._test(t,e[t]);if(!0!==n)return n}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t in this._consumables)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const n=dF(t)?t:[t],r=this._consumables[e];for(const t of n){if("attributes"===e&&("class"===t||"style"===t))throw new hj.a("viewconsumable-invalid-attribute",this);if(r.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))r.set(e,!0)}}_test(e,t){const n=dF(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){const e=r.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",n=this._test(e,[...this._consumables[e].keys()]);if(!0!==n)return n}return!0}_consume(e,t){const n=dF(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){if(r.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))r.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const n=dF(t)?t:[t],r=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){!1===r.get(t)&&r.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Mq{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new Pq(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new Pq(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new hj.a("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new hj.a("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:e.is&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const n=this.getDefinition(e.last);return!!n&&n.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof NG){const t=e.nodeBefore,n=e.nodeAfter;if(!(t instanceof MG))throw new hj.a("schema-check-merge-no-element-before",this);if(!(n instanceof MG))throw new hj.a("schema-check-merge-no-element-after",this);return this.checkMerge(t,n)}for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e){this.on("checkChild",(t,[n,r])=>{if(!r)return;const i=e(n,r);"boolean"==typeof i&&(t.stop(),t.return=i)},{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",(t,[n,r])=>{const i=e(n,r);"boolean"==typeof i&&(t.stop(),t.return=i)},{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof NG)t=e.parent;else{t=(e instanceof jG?[e]:Array.from(e.getRanges())).reduce((e,t)=>{const n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n},null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const n=[...e.getFirstPosition().getAncestors(),new xG("",e.getAttributes())];return this.checkAttribute(n,t)}{const n=e.getRanges();for(const e of n)for(const n of e)if(this.checkAttribute(n.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const n of e)yield*this._getValidRangesForRange(n,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new jG(e);let n,r;const i=e.getAncestors().reverse().find(e=>this.isLimit(e))||e.root;"both"!=t&&"backward"!=t||(n=new PG({boundaries:jG._createIn(i),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(r=new PG({boundaries:jG._createIn(i),startPosition:e}));for(const e of function*(e,t){let n=!1;for(;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}(n,r)){const t=e.walker==n?"elementEnd":"elementStart",r=e.value;if(r.type==t&&this.isObject(r.item))return jG._createOn(r.item);if(this.checkChild(r.nextPosition,"$text"))return new jG(r.nextPosition)}return null}findAllowedParent(e,t){let n=e.parent;for(;n;){if(this.checkChild(n,t))return n;if(this.isLimit(n))return null;n=n.parent}return null}setAllowedAttributes(e,t,n){const r=n.model;for(const[i,a]of Object.entries(t))r.schema.checkAttribute(e,i)&&n.setAttribute(i,a,e)}removeDisallowedAttributes(e,t){for(const n of e)if(n.is("$text"))Gq(this,n,t);else{const e=jG._createIn(n).getPositions();for(const n of e){Gq(this,n.nodeBefore||n.parent,t)}}}getAttributesWithProperty(e,t,n){const r={};for(const[i,a]of e.getAttributes()){const e=this.getAttributeProperties(i);void 0!==e[t]&&(void 0!==n&&n!==e[t]||(r[i]=a))}return r}createContext(e){return new Pq(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const r of n)e[r]=Dq(t[r],r);for(const t of n)Nq(e,t);for(const t of n)Lq(e,t);for(const t of n)Rq(e,t);for(const t of n)Bq(e,t),jq(e,t);for(const t of n)Fq(e,t),Uq(e,t),Hq(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,n=t.length-1){const r=t.getItem(n);if(e.allowIn.includes(r.name)){if(0==n)return!0;{const e=this.getDefinition(r);return this._checkContextMatch(e,t,n-1)}}return!1}*_getValidRangesForRange(e,t){let n=e.start,r=e.start;for(const i of e.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange(jG._createIn(i),t)),this.checkAttribute(i,t)||(n.isEqual(r)||(yield new jG(n,r)),n=NG._createAfter(i)),r=NG._createAfter(i);n.isEqual(r)||(yield new jG(n,r))}}UF(Mq,NF);class Pq{constructor(e){if(e instanceof Pq)return e;"string"==typeof e?e=[e]:Array.isArray(e)||(e=e.getAncestors({includeSelf:!0})),this._items=e.map(Wq)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Pq([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Dq(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const n of e){const e=Object.keys(n).filter(e=>e.startsWith("is"));for(const r of e)t[r]=n[r]}}(e,n),zq(e,n,"allowIn"),zq(e,n,"allowContentOf"),zq(e,n,"allowWhere"),zq(e,n,"allowAttributes"),zq(e,n,"allowAttributesOf"),zq(e,n,"allowChildren"),zq(e,n,"inheritTypesFrom"),function(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,n),n}function Nq(e,t){const n=e[t];for(const r of n.allowChildren){const n=e[r];n&&n.allowIn.push(t)}n.allowChildren.length=0}function Lq(e,t){for(const n of e[t].allowContentOf)if(e[n]){Vq(e,n).forEach(e=>{e.allowIn.push(t)})}delete e[t].allowContentOf}function Rq(e,t){for(const n of e[t].allowWhere){const r=e[n];if(r){const n=r.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function Bq(e,t){for(const n of e[t].allowAttributesOf){const r=e[n];if(r){const n=r.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function jq(e,t){const n=e[t];for(const t of n.inheritTypesFrom){const r=e[t];if(r){const e=Object.keys(r).filter(e=>e.startsWith("is"));for(const t of e)t in n||(n[t]=r[t])}}delete n.inheritTypesFrom}function Fq(e,t){const n=e[t],r=n.allowIn.filter(t=>e[t]);n.allowIn=Array.from(new Set(r))}function Uq(e,t){const n=e[t];for(const r of n.allowIn){e[r].allowChildren.push(t)}}function Hq(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function zq(e,t,n){for(const r of e)"string"==typeof r[n]?t[n].push(r[n]):Array.isArray(r[n])&&t[n].push(...r[n])}function Vq(e,t){const n=e[t];return(r=e,Object.keys(r).map(e=>r[e])).filter(e=>e.allowIn.includes(n.name));var r}function Wq(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Gq(e,t,n){for(const r of t.getAttributeKeys())e.checkAttribute(t,r)||n.removeAttribute(r,t)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class qq{constructor(e={}){this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.safeInsert=this._safeInsert.bind(this),this.conversionApi.updateConversionResult=this._updateConversionResult.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this),this.conversionApi.keepEmptyElement=this._keepEmptyElement.bind(this)}convert(e,t,n=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let n;for(const r of new Pq(e)){const e={};for(const t of r.getAttributeKeys())e[t]=r.getAttribute(t);const i=t.createElement(r.name,e);n&&t.append(i,n),n=NG._createAt(i,0)}return n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=Oq.createFrom(e),this.conversionApi.store={};const{modelRange:r}=this._convertItem(e,this._modelCursor),i=t.createDocumentFragment();if(r){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,i);i.markers=function(e,t){const n=new Set,r=new Map,i=jG._createIn(e).getItems();for(const e of i)"$marker"==e.name&&n.add(e);for(const e of n){const n=e.getAttribute("data-name"),i=t.createPositionBefore(e);r.has(n)?r.get(n).end=i.clone():r.set(n,new jG(i.clone())),t.remove(e)}return r}(i,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(e,t){const n=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is("element")?this.fire("element:"+e.name,n,this.conversionApi):e.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof jG))throw new hj.a("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){let n=t.is("position")?t:NG._createAt(t,0);const r=new jG(n);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,n);e.modelRange instanceof jG&&(r.end=e.modelRange.end,n=e.modelCursor)}return{modelRange:r,modelCursor:n}}_safeInsert(e,t){const n=this._splitToAllowedParent(e,t);return!!n&&(this.conversionApi.writer.insert(e,n.position),!0)}_updateConversionResult(e,t){const n=this._getSplitParts(e),r=this.conversionApi.writer;t.modelRange||(t.modelRange=r.createRange(r.createPositionBefore(e),r.createPositionAfter(n[n.length-1])));const i=this._cursorParents.get(e);t.modelCursor=i?r.createPositionAt(i,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:n,writer:r}=this.conversionApi;let i=n.findAllowedParent(t,e);if(i){if(i===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return bq(t,e,n)?{position:yq(t,r)}:null;const a=this.conversionApi.writer.split(t,i),o=[];for(const e of a.range.getWalker())if("elementEnd"==e.type)o.push(e.item);else{const t=o.pop(),n=e.item;this._registerSplitPair(t,n)}const s=a.range.end.parent;return this._cursorParents.set(e,s),{position:a.position,cursorParent:s}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const n=this._splitParts.get(e);this._splitParts.set(t,n),n.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}UF(qq,mj);class Yq{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Kq{constructor(e){this.domParser=new DOMParser,this.domConverter=new gW(e,{renderingMode:"data"}),this.htmlWriter=new Yq}toData(e){const t=this.domConverter.viewToDom(e,document);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t)}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`<body>${e}</body>`);const t=this.domParser.parseFromString(e,"text/html"),n=t.createDocumentFragment(),r=t.body.childNodes;for(;r.length>0;)n.appendChild(r[0]);return n}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Xq{constructor(e,t){this.model=e,this.mapper=new FG,this.downcastDispatcher=new zG({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const r=n.writer,i=n.mapper.toViewPosition(t.range.start),a=r.createText(t.item.data);r.insert(i,a)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(e,t,n)=>{n.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||n.convertChildren(t.item)},{priority:"lowest"}),this.upcastDispatcher=new qq({schema:e.schema}),this.viewDocument=new cV(t),this.stylesProcessor=t,this.htmlProcessor=new Kq(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new PV(this.viewDocument),this.upcastDispatcher.on("text",(e,t,{schema:n,consumable:r,writer:i})=>{let a=t.modelCursor;if(!r.test(t.viewItem))return;if(!n.checkChild(a,"$text")){if(!bq(a,"$text",n))return;a=yq(a,i)}r.consume(t.viewItem);const o=i.createText(t.viewItem.data);i.insert(o,a),t.modelRange=i.createRange(a,a.getShiftedBy(o.offsetSize)),t.modelCursor=t.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:r}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=r}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:r}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=r}},{priority:"lowest"}),this.decorate("init"),this.decorate("set"),this.decorate("get"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange({isUndoable:!1},vq)},{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:n="empty"}=e;if(!this._checkIfRootsExists([t]))throw new hj.a("datacontroller-get-non-existent-root",this);const r=this.model.document.getRoot(t);return"empty"!==n||this.model.hasContent(r,{ignoreWhitespaces:!0})?this.stringify(r,e):""}stringify(e,t={}){const n=this.toView(e,t);return this.processor.toData(n)}toView(e,t={}){const n=this.viewDocument,r=this._viewWriter;this.mapper.clearBindings();const i=jG._createIn(e),a=new MV(n);this.mapper.bindElements(e,a);const o=e.is("documentFragment")?e.markers:function(e){const t=[],n=e.root.document;if(!n)return new Map;const r=jG._createIn(e);for(const e of n.model.markers){const n=e.getRange(),i=n.isCollapsed,a=n.start.isEqual(r.start)||n.end.isEqual(r.end);if(i&&a)t.push([e.name,n]);else{const i=r.getIntersection(n);i&&t.push([e.name,i])}}return t.sort(([e,t],[n,r])=>{if("after"!==t.end.compareWith(r.start))return 1;if("before"!==t.start.compareWith(r.end))return-1;switch(t.start.compareWith(r.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(r.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(e)}}}),new Map(t)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e);return this.downcastDispatcher.convert(i,o,r,t),a}init(e){if(this.model.document.version)throw new hj.a("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new hj.a("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},e=>{for(const n of Object.keys(t)){const r=this.model.document.getRoot(n);e.insert(this.parse(t[n],r),r,0)}}),Promise.resolve()}set(e,t={}){let n={};if("string"==typeof e?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new hj.a("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(n)){const r=this.model.document.getRoot(t);e.remove(e.createRangeIn(r)),e.insert(this.parse(n[t],r),r,0)}})}parse(e,t="$root"){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t="$root"){return this.model.change(n=>this.upcastDispatcher.convert(e,n,t))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRootNames().includes(t))return!1;return!0}}UF(Xq,NF);class Qq{constructor(e,t){this._helpers=new Map,this._downcast=GH(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=GH(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const n=this._downcast.includes(t);if(!this._upcast.includes(t)&&!n)throw new hj.a("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:n})}for(e){if(!this._helpers.has(e))throw new hj.a("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:n}of $q(e))this.for("upcast").elementToElement({model:t,view:n,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:n}of $q(e))this.for("upcast").elementToAttribute({view:n,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:n}of $q(e))this.for("upcast").attributeToAttribute({view:n,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:n}){if(this._helpers.has(e))throw new hj.a("conversion-group-exists",this);const r=n?new iq(t):new Aq(t);this._helpers.set(e,r)}}function*$q(e){if(e.model.values)for(const t of e.model.values){const n={key:e.model.key,value:t},r=e.view[t],i=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Jq(n,r,i)}else yield*Jq(e.model,e.view,e.upcastAlso)}function*Jq(e,t,n){if(yield{model:e,view:t},n)for(const t of GH(n))yield{model:e,view:t}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Zq{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},Object(hj.b)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:n=!0,isUndo:r=!1,isTyping:i=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=n,this.isUndo=r,this.isTyping=i}get type(){return Object(hj.b)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class eY{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e){return new this(e.baseVersion)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class tY{constructor(e){this.markers=new Map,this._children=new IG,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"model:documentFragment"===e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const n of e)n.name?t.push(MG.fromJSON(n)):t.push(xG.fromJSON(n));return new tY(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){if("string"==typeof e)return[new xG(e)];zH(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new xG(e):e instanceof OG?new xG(e.data,e.getAttributes()):e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}}function nY(e,t){const n=(t=aY(t)).reduce((e,t)=>e+t.offsetSize,0),r=e.parent;sY(e);const i=e.index;return r._insertChild(i,t),oY(r,i+t.length),oY(r,i),new jG(e,e.getShiftedBy(n))}function rY(e){if(!e.isFlat)throw new hj.a("operation-utils-remove-range-not-flat",this);const t=e.start.parent;sY(e.start),sY(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return oY(t,e.start.index),n}function iY(e,t){if(!e.isFlat)throw new hj.a("operation-utils-move-range-not-flat",this);const n=rY(e);return nY(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),n)}function aY(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;n<e.length;n++)if("string"==typeof e[n])t.push(new xG(e[n]));else if(e[n]instanceof OG)t.push(new xG(e[n].data,e[n].getAttributes()));else if(e[n]instanceof tY||e[n]instanceof IG)for(const r of e[n])t.push(r);else e[n]instanceof kG&&t.push(e[n]);for(let e=1;e<t.length;e++){const n=t[e],r=t[e-1];n instanceof xG&&r instanceof xG&&lY(n,r)&&(t.splice(e-1,2,new xG(r.data+n.data,r.getAttributes())),e--)}return t}function oY(e,t){const n=e.getChild(t-1),r=e.getChild(t);if(n&&r&&n.is("$text")&&r.is("$text")&&lY(n,r)){const i=new xG(n.data+r.data,n.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,i)}}function sY(e){const t=e.textNode,n=e.parent;if(t){const r=e.offset-t.startOffset,i=t.index;n._removeChildren(i,1);const a=new xG(t.data.substr(0,r),t.getAttributes()),o=new xG(t.data.substr(r),t.getAttributes());n._insertChild(i,[a,o])}}function lY(e,t){const n=e.getAttributes(),r=t.getAttributes();for(const e of n){if(e[1]!==t.getAttribute(e[0]))return!1;r.next()}return r.next().done}var cY=function(e,t){return HW(e,t)};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class uY extends eY{constructor(e,t,n,r,i){super(i),this.range=e.clone(),this.key=t,this.oldValue=void 0===n?null:n,this.newValue=void 0===r?null:r}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}clone(){return new uY(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new uY(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new hj.a("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!cY(e.getAttribute(this.key),this.oldValue))throw new hj.a("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new hj.a("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){cY(this.oldValue,this.newValue)||function(e,t,n){sY(e.start),sY(e.end);for(const r of e.getItems({shallow:!0})){const e=r.is("$textProxy")?r.textNode:r;null!==n?e._setAttribute(t,n):e._removeAttribute(t),oY(e.parent,e.index)}oY(e.end.parent,e.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new uY(jG.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class dY extends eY{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new hj.a("detach-operation-on-document-node",this)}_execute(){rY(jG._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class hY extends eY{constructor(e,t,n,r){super(r),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new this.constructor(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,n=this.sourcePosition.offset,r=this.targetPosition.offset;if(n+this.howMany>e.maxOffset)throw new hj.a("move-operation-nodes-do-not-exist",this);if(e===t&&n<r&&r<n+this.howMany)throw new hj.a("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==JH(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=n&&this.targetPosition.path[e]<n+this.howMany)throw new hj.a("move-operation-node-into-itself",this)}}_execute(){iY(jG._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const n=NG.fromJSON(e.sourcePosition,t),r=NG.fromJSON(e.targetPosition,t);return new this(n,e.howMany,r,e.baseVersion)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class fY extends eY{constructor(e,t,n){super(n),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new IG(aY(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}clone(){const e=new IG([...this.nodes].map(e=>e._clone(!0))),t=new fY(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new NG(e,[0]);return new hY(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new hj.a("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new IG([...e].map(e=>e._clone(!0))),nY(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const n=[];for(const t of e.nodes)t.name?n.push(MG.fromJSON(t)):n.push(xG.fromJSON(t));const r=new fY(NG.fromJSON(e.position,t),n,e.baseVersion);return r.shouldReceiveAttributes=e.shouldReceiveAttributes,r}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class pY extends eY{constructor(e,t,n,r,i,a){super(a),this.name=e,this.oldRange=t?t.clone():null,this.newRange=n?n.clone():null,this.affectsData=i,this._markers=r}get type(){return"marker"}clone(){return new pY(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new pY(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const e=this.newRange?"_set":"_remove";this._markers[e](this.name,this.newRange,!0,this.affectsData)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new pY(e.name,e.oldRange?jG.fromJSON(e.oldRange,t):null,e.newRange?jG.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class mY extends eY{constructor(e,t,n,r){super(r),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=n}get type(){return"rename"}clone(){return new mY(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new mY(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof MG))throw new hj.a("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new hj.a("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new mY(NG.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class gY extends eY{constructor(e,t,n,r,i){super(i),this.root=e,this.key=t,this.oldValue=n,this.newValue=r}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new gY(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new gY(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new hj.a("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new hj.a("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new hj.a("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new hj.a("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new gY(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class vY extends eY{constructor(e,t,n,r,i){super(i),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=r.clone()}get type(){return"merge"}get deletionPosition(){return new NG(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new jG(this.sourcePosition,e)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),n=new NG(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new bY(e,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new hj.a("merge-operation-source-position-invalid",this);if(!t.parent)throw new hj.a("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new hj.a("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;iY(jG._createIn(e),this.targetPosition),iY(jG._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const n=NG.fromJSON(e.sourcePosition,t),r=NG.fromJSON(e.targetPosition,t),i=NG.fromJSON(e.graveyardPosition,t);return new this(n,e.howMany,r,i,e.baseVersion)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class bY extends eY{constructor(e,t,n,r,i){super(i),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=n,this.graveyardPosition=r?r.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new NG(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new jG(this.splitPosition,e)}clone(){return new this.constructor(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new NG(e,[0]);return new vY(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new hj.a("split-operation-position-invalid",this);if(!e.parent)throw new hj.a("split-operation-split-in-root",this);if(this.howMany!=e.maxOffset-this.splitPosition.offset)throw new hj.a("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new hj.a("split-operation-graveyard-position-invalid",this)}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)iY(jG._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const t=e._clone();nY(this.insertionPosition,t)}iY(new jG(NG._createAt(e,this.splitPosition.offset),NG._createAt(e,e.maxOffset)),this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new NG(e.root,t,"toPrevious")}static fromJSON(e,t){const n=NG.fromJSON(e.splitPosition,t),r=NG.fromJSON(e.insertionPosition,t),i=e.graveyardPosition?NG.fromJSON(e.graveyardPosition,t):null;return new this(n,e.howMany,r,i,e.baseVersion)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class yY extends MG{constructor(e,t,n="main"){super(t),this._document=e,this.rootName=n}get document(){return this._document}is(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e}toJSON(){return this.rootName}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class AY{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new xG(e,t)}createElement(e,t){return new MG(e,t)}createDocumentFragment(){return new tY}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,n=0){if(this._assertWriterUsedCorrectly(),e instanceof xG&&""==e.data)return;const r=NG._createAt(t,n);if(e.parent){if(CY(e.root,r.root))return void this.move(jG._createOn(e),r);if(e.root.document)throw new hj.a("model-writer-insert-forbidden-move",this);this.remove(e)}const i=r.root.document?r.root.document.version:null,a=new fY(r,e,i);if(e instanceof xG&&(a.shouldReceiveAttributes=!0),this.batch.addOperation(a),this.model.applyOperation(a),e instanceof tY)for(const[t,n]of e.markers){const e=NG._createAt(n.root,0),i={range:new jG(n.start._getCombined(e,r),n.end._getCombined(e,r)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,i):this.addMarker(t,i)}}insertText(e,t,n,r){t instanceof tY||t instanceof MG||t instanceof NG?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,r)}insertElement(e,t,n,r){t instanceof tY||t instanceof MG||t instanceof NG?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,r)}append(e,t){this.insert(e,t,"end")}appendText(e,t,n){t instanceof tY||t instanceof MG?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),n,"end")}appendElement(e,t,n){t instanceof tY||t instanceof MG?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),n,"end")}setAttribute(e,t,n){if(this._assertWriterUsedCorrectly(),n instanceof jG){const r=n.getMinimalFlatRanges();for(const n of r)_Y(this,e,t,n)}else wY(this,e,t,n)}setAttributes(e,t){for(const[n,r]of rz(e))this.setAttribute(n,r,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof jG){const n=t.getMinimalFlatRanges();for(const t of n)_Y(this,e,null,t)}else wY(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof jG)for(const n of e.getItems())t(n);else t(e)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof jG))throw new hj.a("writer-move-invalid-range",this);if(!e.isFlat)throw new hj.a("writer-move-range-not-flat",this);const r=NG._createAt(t,n);if(r.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!CY(e.root,r.root))throw new hj.a("writer-move-different-document",this);const i=e.root.document?e.root.document.version:null,a=new hY(e.start,e.end.offset-e.start.offset,r,i);this.batch.addOperation(a),this.model.applyOperation(a)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof jG?e:jG._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),SY(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,n=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof MG))throw new hj.a("writer-merge-no-element-before",this);if(!(n instanceof MG))throw new hj.a("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,n){return this.model.createPositionFromPath(e,t,n)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(e,t,n){return this.model.createSelection(e,t,n)}_mergeDetached(e){const t=e.nodeBefore,n=e.nodeAfter;this.move(jG._createIn(n),NG._createAt(t,"end")),this.remove(n)}_merge(e){const t=NG._createAt(e.nodeBefore,"end"),n=NG._createAt(e.nodeAfter,0),r=e.root.document.graveyard,i=new NG(r,[0]),a=e.root.document.version,o=new vY(n,e.nodeAfter.maxOffset,t,i,a);this.batch.addOperation(o),this.model.applyOperation(o)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof MG))throw new hj.a("writer-rename-not-element-instance",this);const n=e.root.document?e.root.document.version:null,r=new mY(NG._createBefore(e),e.name,t,n);this.batch.addOperation(r),this.model.applyOperation(r)}split(e,t){this._assertWriterUsedCorrectly();let n,r,i=e.parent;if(!i.parent)throw new hj.a("writer-split-element-no-parent",this);if(t||(t=i.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new hj.a("writer-split-invalid-limit-element",this);do{const t=i.root.document?i.root.document.version:null,a=i.maxOffset-e.offset,o=bY.getInsertionPosition(e),s=new bY(e,a,o,null,t);this.batch.addOperation(s),this.model.applyOperation(s),n||r||(n=i,r=e.parent.nextSibling),i=(e=this.createPositionAfter(e.parent)).parent}while(i!==t);return{position:e,range:new jG(NG._createAt(n,"end"),NG._createAt(r,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new hj.a("writer-wrap-range-not-flat",this);const n=t instanceof MG?t:new MG(t);if(n.childCount>0)throw new hj.a("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new hj.a("writer-wrap-element-attached",this);this.insert(n,e.start);const r=new jG(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(r,NG._createAt(n,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new hj.a("writer-unwrap-element-no-parent",this);this.move(jG._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new hj.a("writer-addmarker-no-usingoperation",this);const n=t.usingOperation,r=t.range,i=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new hj.a("writer-addmarker-marker-exists",this);if(!r)throw new hj.a("writer-addmarker-no-range",this);return n?(EY(this,e,null,r,i),this.model.markers.get(e)):this.model.markers._set(e,r,n,i)}updateMarker(e,t){this._assertWriterUsedCorrectly();const n="string"==typeof e?e:e.name,r=this.model.markers.get(n);if(!r)throw new hj.a("writer-updatemarker-marker-not-exists",this);if(!t)return Object(hj.b)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),void this.model.markers._refresh(r);const i="boolean"==typeof t.usingOperation,a="boolean"==typeof t.affectsData,o=a?t.affectsData:r.affectsData;if(!i&&!t.range&&!a)throw new hj.a("writer-updatemarker-wrong-options",this);const s=r.getRange(),l=t.range?t.range:s;i&&t.usingOperation!==r.managedUsingOperations?t.usingOperation?EY(this,n,null,l,o):(EY(this,n,s,null,o),this.model.markers._set(n,l,void 0,o)):r.managedUsingOperations?EY(this,n,s,l,o):this.model.markers._set(n,l,void 0,o)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new hj.a("writer-removemarker-no-marker",this);const n=this.model.markers.get(t);n.managedUsingOperations?EY(this,t,n.getRange(),null,n.affectsData):this.model.markers._remove(t)}setSelection(e,t,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,t,n)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,n]of rz(e))this._setSelectionAttribute(t,n)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const r=ZG._getStoreAttributeKey(e);this.setAttribute(r,t,n.anchor.parent)}n._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const n=ZG._getStoreAttributeKey(e);this.removeAttribute(n,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new hj.a("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const r=n.getRange();let i=!1;if("move"===e)i=t.containsPosition(r.start)||t.start.isEqual(r.start)||t.containsPosition(r.end)||t.end.isEqual(r.end);else{const e=t.nodeBefore,n=t.nodeAfter,a=r.start.parent==e&&r.start.isAtEnd,o=r.end.parent==n&&0==r.end.offset,s=r.end.nodeAfter==n,l=r.start.nodeAfter==n;i=a||o||s||l}i&&this.updateMarker(n.name,{range:r})}}}function _Y(e,t,n,r){const i=e.model,a=i.document;let o,s,l,c=r.start;for(const e of r.getWalker({shallow:!0}))l=e.item.getAttribute(t),o&&s!=l&&(s!=n&&u(),c=o),o=e.nextPosition,s=l;function u(){const r=new jG(c,o),l=r.root.document?a.version:null,u=new uY(r,t,s,n,l);e.batch.addOperation(u),i.applyOperation(u)}o instanceof NG&&o!=c&&s!=n&&u()}function wY(e,t,n,r){const i=e.model,a=i.document,o=r.getAttribute(t);let s,l;if(o!=n){if(r.root===r){const e=r.document?a.version:null;l=new gY(r,t,o,n,e)}else{s=new jG(NG._createBefore(r),e.createPositionAfter(r));const i=s.root.document?a.version:null;l=new uY(s,t,o,n,i)}e.batch.addOperation(l),i.applyOperation(l)}}function EY(e,t,n,r,i){const a=e.model,o=a.document,s=new pY(t,n,r,a.markers,i,o.version);e.batch.addOperation(s),a.applyOperation(s)}function SY(e,t,n,r){let i;if(e.root.document){const n=r.document,a=new NG(n.graveyard,[0]);i=new hY(e,t,a,n.version)}else i=new dY(e,t);n.addOperation(i),r.applyOperation(i)}function CY(e,t){return e===t||e instanceof yY&&t instanceof yY}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class TY{constructor(e){this._markerCollection=e,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}bufferOperation(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const t=this._isInInsertedElement(e.sourcePosition.parent),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=jG._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}break}case"split":{const t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);const n=e.graveyardPosition.parent;this._markInsert(n,e.graveyardPosition.offset,1);const r=e.targetPosition.parent;this._isInInsertedElement(r)||this._markInsert(r,e.targetPosition.offset,t.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,t,n){const r=this._changedMarkers.get(e);r?(r.newMarkerData=n,null==r.oldMarkerData.range&&null==n.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:n,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.oldMarkerData.range&&e.push({name:t,range:n.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.newMarkerData.range&&e.push({name:t,range:n.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}}))}hasDataChanges(){if(this._changesInElement.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const n=e.range&&!t.range,r=!e.range&&t.range,i=e.range&&t.range&&!e.range.isEqual(t.range);if(n||r||i)return!0}}return!1}getChanges(e={includeChangesInGraveyard:!1}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const n=this._changesInElement.get(e).sort((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offset<t.offset?-1:1),r=this._elementSnapshots.get(e),i=kY(e.getChildren()),a=xY(r.length,n);let o=0,s=0;for(const n of a)if("i"===n)t.push(this._getInsertDiff(e,o,i[o])),o++;else if("r"===n)t.push(this._getRemoveDiff(e,o,r[s])),s++;else if("a"===n){const n=i[o].attributes,a=r[s].attributes;let l;if("$text"==i[o].name)l=new jG(NG._createAt(e,o),NG._createAt(e,o+1));else{const t=e.offsetToIndex(o);l=new jG(NG._createAt(e,o),NG._createAt(e.getChild(t),0))}t.push(...this._getAttributesDiff(l,a,n)),o++,s++}else o++,s++}t.sort((e,t)=>e.position.root!=t.position.root?e.position.root.rootName<t.position.root.rootName?-1:1:e.position.isEqual(t.position)?e.changeCount-t.changeCount:e.position.isBefore(t.position)?-1:1);for(let e=1,n=0;e<t.length;e++){const r=t[n],i=t[e],a="remove"==r.type&&"remove"==i.type&&"$text"==r.name&&"$text"==i.name&&r.position.isEqual(i.position),o="insert"==r.type&&"insert"==i.type&&"$text"==r.name&&"$text"==i.name&&r.position.parent==i.position.parent&&r.position.offset+r.length==i.position.offset,s="attribute"==r.type&&"attribute"==i.type&&r.position.parent==i.position.parent&&r.range.isFlat&&i.range.isFlat&&r.position.offset+r.length==i.position.offset&&r.attributeKey==i.attributeKey&&r.attributeOldValue==i.attributeOldValue&&r.attributeNewValue==i.attributeNewValue;a||o||s?(r.length++,s&&(r.range.end=r.range.end.getShiftedBy(1)),t[e]=null):n=e}t=t.filter(e=>e);for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(OY),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=jG._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,n){const r={type:"insert",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,r)}_markRemove(e,t,n){const r={type:"remove",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,r),this._removeAllNestedChanges(e,t,n)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const n=this._getChangesForElement(e);this._handleChange(t,n),n.push(t);for(let e=0;e<n.length;e++)n[e].howMany<1&&(n.splice(e,1),e--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,kY(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const n of t){const r=e.offset+e.howMany,i=n.offset+n.howMany;if("insert"==e.type&&("insert"==n.type&&(e.offset<=n.offset?n.offset+=e.howMany:e.offset<i&&(n.howMany+=e.nodesToHandle,e.nodesToHandle=0)),"remove"==n.type&&e.offset<n.offset&&(n.offset+=e.howMany),"attribute"==n.type))if(e.offset<=n.offset)n.offset+=e.howMany;else if(e.offset<i){const i=n.howMany;n.howMany=e.offset-n.offset,t.unshift({type:"attribute",offset:r,howMany:i-n.howMany,count:this._changeCount++})}if("remove"==e.type){if("insert"==n.type)if(r<=n.offset)n.offset-=e.howMany;else if(r<=i)if(e.offset<n.offset){const t=r-n.offset;n.offset=e.offset,n.howMany-=t,e.nodesToHandle-=t}else n.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=n.offset)e.nodesToHandle-=n.howMany,n.howMany=0;else if(e.offset<i){const t=i-e.offset;n.howMany-=t,e.nodesToHandle-=t}if("remove"==n.type&&(r<=n.offset?n.offset-=e.howMany:e.offset<n.offset&&(e.nodesToHandle+=n.howMany,n.howMany=0)),"attribute"==n.type)if(r<=n.offset)n.offset-=e.howMany;else if(e.offset<n.offset){const t=r-n.offset;n.offset=e.offset,n.howMany-=t}else if(e.offset<i)if(r<=i){const r=n.howMany;n.howMany=e.offset-n.offset;const i=r-n.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:i,count:this._changeCount++})}else n.howMany-=i-e.offset}if("attribute"==e.type){if("insert"==n.type)if(e.offset<n.offset&&r>n.offset){if(r>i){const e={type:"attribute",offset:i,howMany:r-i,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offset<i&&(r>i?(e.nodesToHandle=r-i,e.offset=i):e.nodesToHandle=0);if("remove"==n.type&&e.offset<n.offset&&r>n.offset){const i={type:"attribute",offset:n.offset,howMany:r-n.offset,count:this._changeCount++};this._handleChange(i,t),t.push(i),e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==n.type&&(e.offset>=n.offset&&r<=i?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&r>=i&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:"insert",position:NG._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,n){return{type:"remove",position:NG._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){const r=[];n=new Map(n);for(const[i,a]of t){const t=n.has(i)?n.get(i):null;t!==a&&r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:i,attributeOldValue:a,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(i)}for(const[t,i]of n)r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return r}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),r=e.startOffset;if(n)for(const e of n)if("insert"==e.type&&r>=e.offset&&r<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,n){const r=new jG(NG._createAt(e,t),NG._createAt(e,t+n));for(const e of r.getItems({shallow:!0}))e.is("element")&&(this._elementSnapshots.delete(e),this._changesInElement.delete(e),this._removeAllNestedChanges(e,0,e.maxOffset))}}function kY(e){const t=[];for(const n of e)if(n.is("$text"))for(let e=0;e<n.data.length;e++)t.push({name:"$text",attributes:new Map(n.getAttributes())});else t.push({name:n.name,attributes:new Map(n.getAttributes())});return t}function xY(e,t){const n=[];let r=0,i=0;for(const e of t){if(e.offset>r){for(let t=0;t<e.offset-r;t++)n.push("e");i+=e.offset-r}if("insert"==e.type){for(let t=0;t<e.howMany;t++)n.push("i");r=e.offset+e.howMany}else if("remove"==e.type){for(let t=0;t<e.howMany;t++)n.push("r");r=e.offset,i+=e.howMany}else n.push(..."a".repeat(e.howMany).split("")),r=e.offset+e.howMany,i+=e.howMany}if(i<e)for(let t=0;t<e-i-r;t++)n.push("e");return n}function OY(e){const t=e.position&&"$graveyard"==e.position.root.rootName,n=e.range&&"$graveyard"==e.range.root.rootName;return!t&&!n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class IY{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new hj.a("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const n=this._operations[0];void 0===e&&(e=n.baseVersion);let r=t-1;for(const[t,n]of this._gaps)e>t&&e<n&&(e=n),r>t&&r<n&&(r=t-1);if(r<n.baseVersion||e>this.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(e);void 0===i&&(i=0);let a=this._baseVersionToOperationIndex.get(r);return void 0===a&&(a=this._operations.length-1),this._operations.slice(i,a+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function MY(e,t){return!!(n=e.charAt(t-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t));var n}function PY(e,t){return!!(n=e.charAt(t))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n);var n}const DY=function(){const e=/\p{Regional_Indicator}{2}/u.source,t="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map(e=>e.source).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */();function NY(e,t){const n=String(e).matchAll(DY);return Array.from(n).some(e=>e.index<t&&t<e.index+e[0].length)}class LY{constructor(e){this.model=e,this.history=new IY,this.selection=new ZG(this),this.roots=new VH({idProperty:"rootName"}),this.differ=new TY(e.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root","$graveyard"),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&this.history.addOperation(n)},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,t,n,r,i)=>{const a={...t.getData(),range:r};this.differ.bufferMarkerChange(t.name,i,a),null===n&&t.on("change",(e,n)=>{const r=t.getData();this.differ.bufferMarkerChange(t.name,{...r,range:n},r)})})}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot("$graveyard")}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new hj.a("model-document-createroot-name-exists",this,{name:t});const n=new yY(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,e=>e.rootName).filter(e=>"$graveyard"!=e)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=ZH(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,n=t.schema,r=t.createPositionFromPath(e,[0]);return n.getNearestSelectionRange(r)||t.createRange(r)}_validateSelectionRange(e){return RY(e.start)&&RY(e.end)}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),t=n(e),t)break}while(t)}}function RY(e){const t=e.textNode;if(t){const n=t.data,r=e.offset-t.startOffset;return!MY(n,r)&&!PY(n,r)}return!0}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */UF(LY,mj);class BY{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof jY?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1,r=!1){const i=e instanceof jY?e.name:e;if(i.includes(","))throw new hj.a("markercollection-incorrect-marker-name",this);const a=this._markers.get(i);if(a){const e=a.getData(),o=a.getRange();let s=!1;return o.isEqual(t)||(a._attachLiveRange(QG.fromRange(t)),s=!0),n!=a.managedUsingOperations&&(a._managedUsingOperations=n,s=!0),"boolean"==typeof r&&r!=a.affectsData&&(a._affectsData=r,s=!0),s&&this.fire("update:"+i,a,o,t,e),a}const o=QG.fromRange(t),s=new jY(i,o,n,r);return this._markers.set(i,s),this.fire("update:"+i,s,null,t,{...s.getData(),range:null}),s}_remove(e){const t=e instanceof jY?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire("update:"+t,n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0)}_refresh(e){const t=e instanceof jY?e.name:e,n=this._markers.get(t);if(!n)throw new hj.a("markercollection-refresh-marker-not-exists",this);const r=n.getRange();this.fire("update:"+t,n,r,r,n.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}UF(BY,mj);class jY{constructor(e,t,n,r){this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=n,this._affectsData=r}get managedUsingOperations(){if(!this._liveRange)throw new hj.a("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new hj.a("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new hj.a("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new hj.a("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new hj.a("marker-destroyed",this);return this._liveRange.toRange()}is(e){return"marker"===e||"model:marker"===e}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}UF(jY,mj);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class FY extends eY{get type(){return"noop"}clone(){return new FY(this.baseVersion)}getReversed(){return new FY(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const UY={};UY[uY.className]=uY,UY[fY.className]=fY,UY[pY.className]=pY,UY[hY.className]=hY,UY[FY.className]=FY,UY[eY.className]=eY,UY[mY.className]=mY,UY[gY.className]=gY,UY[bY.className]=bY,UY[vY.className]=vY;
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class HY extends NG{constructor(e,t,n="toNone"){if(super(e,t,n),!this.root.is("rootElement"))throw new hj.a("model-liveposition-root-not-rootelement",e);zY.call(this)}detach(){this.stopListening()}is(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e}toPosition(){return new NG(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function zY(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&VY.call(this,n)},{priority:"low"})}function VY(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}UF(HY,mj);class WY{constructor(e,t,n){this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(e);if(n.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new hj.a("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this.nodeToSelect?jG._createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new jG(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=HY.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new hj.a("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this.nodeToSelect=e:this.nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=HY.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=HY.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof MG))return;if(!this._canMergeLeft(e))return;const t=HY._createBefore(e);t.stickiness="toNext";const n=HY.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=HY._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=HY._createAt(t.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof MG))return;if(!this._canMergeRight(e))return;const t=HY._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new hj.a("insertcontent-invalid-insertion-position",this);this.position=NG._createAt(t.nodeBefore,"end");const n=HY.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=HY._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=HY._createAt(t.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof MG&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof MG&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function GY(e,t,n="auto"){const r=e.getSelectedElement();if(r&&t.schema.isObject(r)&&!t.schema.isInline(r))return["before","after"].includes(n)?t.createRange(t.createPositionAt(r,n)):t.createRangeOn(r);const i=_G(e.getSelectedBlocks());if(!i)return t.createRange(e.focus);if(i.isEmpty)return t.createRange(t.createPositionAt(i,0));const a=t.createPositionAfter(i);return e.focus.isTouching(a)?t.createRange(a):t.createRange(t.createPositionBefore(i))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function qY(e,t,n,r,i={}){if(!e.schema.isObject(t))throw new hj.a("insertobject-element-not-an-object",e,{object:t});let a;a=n?n.is("selection")?n:e.createSelection(n,r):e.document.selection;let o=a;i.findOptimalPosition&&e.schema.isBlock(t)&&(o=e.createSelection(GY(a,e,i.findOptimalPosition)));const s=_G(a.getSelectedBlocks()),l={};return s&&Object.assign(l,e.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),e.change(n=>{o.isCollapsed||e.deleteContent(o,{doNotAutoparagraph:!0});let r=t;const a=o.anchor.parent;!e.schema.checkChild(a,t)&&e.schema.checkChild(a,"paragraph")&&e.schema.checkChild("paragraph",t)&&(r=n.createElement("paragraph"),n.insert(t,r)),e.schema.setAllowedAttributes(r,l,n);const s=e.insertContent(r,o);return s.isCollapsed?s:(i.setSelection&&function(e,t,n,r){const i=e.model;if("after"==n){let n=t.nextSibling;!(n&&i.schema.checkChild(n,"$text"))&&i.schema.checkChild(t.parent,"paragraph")&&(n=e.createElement("paragraph"),i.schema.setAllowedAttributes(n,r,e),i.insertContent(n,e.createPositionAfter(t))),n&&e.setSelection(n,0)}else{if("on"!=n)throw new hj.a("insertobject-invalid-place-parameter-value",i);e.setSelection(t,"on")}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(n,t,i.setSelection,l),s)})}function YY(e,t,n={}){if(t.isCollapsed)return;const r=t.getFirstRange();if("$graveyard"==r.root.rootName)return;const i=e.schema;e.change(e=>{if(!n.doNotResetEntireContent&&function(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const r=t.getFirstRange();if(r.start.parent==r.end.parent)return!1;return e.checkChild(n,"paragraph")}(i,t))return void function(e,t){const n=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(n)),XY(e,e.createPositionAt(n,0),t)}(e,t);const a={};if(!n.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(a,i.getAttributesWithProperty(e,"copyOnReplace",!0))}const[o,s]=function(e){const t=e.root.document.model,n=e.start;let r=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const n=function(e){const t=e.parent,n=t.root.document.model.schema,r=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of r){if(n.isLimit(e))return null;if(n.isBlock(e))return e}}(r);if(n&&r.isTouching(t.createPositionAt(n,0))){const n=t.createSelection(e);t.modifySelection(n,{direction:"backward"});const i=n.getLastPosition(),a=t.createRange(i,r);t.hasContent(a,{ignoreMarkers:!0})||(r=i)}}return[HY.fromPosition(n,"toPrevious"),HY.fromPosition(r,"toNext")]}(r);o.isTouching(s)||e.remove(e.createRange(o,s)),n.leaveUnmerged||(!function(e,t,n){const r=e.model;if(!KY(e.model.schema,t,n))return;const[i,a]=function(e,t){const n=e.getAncestors(),r=t.getAncestors();let i=0;for(;n[i]&&n[i]==r[i];)i++;return[n[i],r[i]]}(t,n);if(!i||!a)return;!r.hasContent(i,{ignoreMarkers:!0})&&r.hasContent(a,{ignoreMarkers:!0})?function e(t,n,r,i){const a=n.parent,o=r.parent;if(a==i||o==i)return;n=t.createPositionAfter(a),(r=t.createPositionBefore(o)).isEqual(n)||t.insert(a,r);for(;n.parent.isEmpty;){const e=n.parent;n=t.createPositionBefore(e),t.remove(e)}if(r=t.createPositionBefore(o),function(e,t){const n=t.nodeBefore,r=t.nodeAfter;n.name!=r.name&&e.rename(n,r.name);e.clearAttributes(n),e.setAttributes(Object.fromEntries(r.getAttributes()),n),e.merge(t)}(t,r),!KY(t.model.schema,n,r))return;e(t,n,r,i)}(e,t,n,i.parent):function e(t,n,r,i){const a=n.parent,o=r.parent;if(a==i||o==i)return;n=t.createPositionAfter(a),(r=t.createPositionBefore(o)).isEqual(n)||t.insert(o,n);t.merge(n);for(;r.parent.isEmpty;){const e=r.parent;r=t.createPositionBefore(e),t.remove(e)}if(!KY(t.model.schema,n,r))return;e(t,n,r,i)}(e,t,n,i.parent)}(e,o,s),i.removeDisallowedAttributes(o.parent.getChildren(),e)),QY(e,t,o),!n.doNotAutoparagraph&&function(e,t){const n=e.checkChild(t,"$text"),r=e.checkChild(t,"paragraph");return!n&&r}(i,o)&&XY(e,o,t,a),o.detach(),s.detach()})}function KY(e,t,n){const r=t.parent,i=n.parent;return r!=i&&(!e.isLimit(r)&&!e.isLimit(i)&&function(e,t,n){const r=new jG(e,t);for(const e of r.getWalker())if(n.isLimit(e.item))return!1;return!0}(t,n,e))}function XY(e,t,n,r={}){const i=e.createElement("paragraph");e.model.schema.setAllowedAttributes(i,r,e),e.insert(i,t),QY(e,n,e.createPositionAt(i,0))}function QY(e,t,n){t instanceof ZG?e.setSelection(n):t.setTo(n)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function $Y(e,t){const{isForward:n,walker:r,unit:i,schema:a,treatEmojiAsSingleUnit:o}=e,{type:s,item:l,nextPosition:c}=t;if("text"==s)return"word"===e.unit?function(e,t){let n=e.position.textNode;if(n){let r=e.position.offset-n.startOffset;for(;!ZY(n.data,r,t)&&!eK(n,r,t);){e.next();const i=t?e.position.nodeAfter:e.position.nodeBefore;if(i&&i.is("$text")){const r=i.data.charAt(t?0:i.data.length-1);' ,.?!:;"-()'.includes(r)||(e.next(),n=e.position.textNode)}r=e.position.offset-n.startOffset}}return e.position}(r,n):function(e,t,n){const r=e.position.textNode;if(r){const i=r.data;let a=e.position.offset-r.startOffset;for(;MY(i,a)||"character"==t&&PY(i,a)||n&&NY(i,a);)e.next(),a=e.position.offset-r.startOffset}return e.position}(r,i,o);if(s==(n?"elementStart":"elementEnd")){if(a.isSelectable(l))return NG._createAt(l,n?"after":"before");if(a.checkChild(c,"$text"))return c}else{if(a.isLimit(l))return void r.skip(()=>!0);if(a.checkChild(c,"$text"))return c}}function JY(e,t){const n=e.root,r=NG._createAt(n,t?"end":0);return t?new jG(e,r):new jG(r,e)}function ZY(e,t,n){const r=t+(n?0:-1);return' ,.?!:;"-()'.includes(e.charAt(r))}function eK(e,t,n){return t===(n?e.endOffset:0)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function tK(e,t){const n=[];Array.from(e.getItems({direction:"backward"})).map(e=>t.createRangeOn(e)).filter(t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))).forEach(e=>{n.push(e.start.parent),t.remove(e)}),n.forEach(e=>{let n=e;for(;n.parent&&n.isEmpty;){const e=t.createRangeOn(n);n=n.parent,t.remove(e)}})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function nK(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.selection,r=t.schema,i=[];let a=!1;for(const e of n.getRanges()){const t=rK(e,r);t&&!t.isEqual(e)?(i.push(t),a=!0):i.push(e)}a&&e.setSelection(function(e){const t=[...e],n=new Set;let r=1;for(;r<t.length;){const e=t[r],i=t.slice(0,r);for(const[a,o]of i.entries())if(!n.has(a))if(e.isEqual(o))n.add(a);else if(e.isIntersecting(o)){n.add(a),n.add(r);const i=e.getJoined(o);t.push(i)}r++}return t.filter((e,t)=>!n.has(t))}(i),{backward:n.isBackward})}(t,e))}function rK(e,t){return e.isCollapsed?function(e,t){const n=e.start,r=t.getNearestSelectionRange(n);if(!r){const e=n.getAncestors().reverse().find(e=>t.isObject(e));return e?jG._createOn(e):null}if(!r.isCollapsed)return r;const i=r.start;if(n.isEqual(i))return null;return new jG(i)}(e,t):function(e,t){const{start:n,end:r}=e,i=t.checkChild(n,"$text"),a=t.checkChild(r,"$text"),o=t.getLimitElement(n),s=t.getLimitElement(r);if(o===s){if(i&&a)return null;if(function(e,t,n){const r=e.nodeAfter&&!n.isLimit(e.nodeAfter)||n.checkChild(e,"$text"),i=t.nodeBefore&&!n.isLimit(t.nodeBefore)||n.checkChild(t,"$text");return r||i}(n,r,t)){const e=n.nodeAfter&&t.isSelectable(n.nodeAfter)?null:t.getNearestSelectionRange(n,"forward"),i=r.nodeBefore&&t.isSelectable(r.nodeBefore)?null:t.getNearestSelectionRange(r,"backward"),a=e?e.start:n,o=i?i.end:r;return new jG(a,o)}}const l=o&&!o.is("rootElement"),c=s&&!s.is("rootElement");if(l||c){const e=n.nodeAfter&&r.nodeBefore&&n.nodeAfter.parent===r.nodeBefore.parent,i=l&&(!e||!aK(n.nodeAfter,t)),a=c&&(!e||!aK(r.nodeBefore,t));let u=n,d=r;return i&&(u=NG._createBefore(iK(o,t))),a&&(d=NG._createAfter(iK(s,t))),new jG(u,d)}return null}(e,t)}function iK(e,t){let n=e,r=n;for(;t.isLimit(r)&&r.parent;)n=r,r=r.parent;return n}function aK(e,t){return e&&t.isSelectable(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class oK{constructor(){this.markers=new BY,this.document=new LY(this),this.schema=new Mq,this._pendingChanges=[],this._currentWriter=null,["insertContent","insertObject","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(e=>this.decorate(e)),this.on("applyOperation",(e,t)=>{t[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck((e,t)=>{if("$marker"===t.name)return!0}),nK(this),this.document.registerPostFixer(vq)}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Zq,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){hj.a.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new Zq):e instanceof Zq||(e=new Zq(e)):e=new Zq,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){hj.a.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,n){
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
return function(e,t,n,r){return e.change(i=>{let a;a=n?n instanceof GG||n instanceof ZG?n:i.createSelection(n,r):e.document.selection,a.isCollapsed||e.deleteContent(a,{doNotAutoparagraph:!0});const o=new WY(e,i,a.anchor);let s;s=t.is("documentFragment")?t.getChildren():[t],o.handleNodes(s);const l=o.getSelectionRange();l&&(a instanceof ZG?i.setSelection(l):a.setTo(l));const c=o.getAffectedRange()||e.createRange(a.anchor);return o.destroy(),c})}(this,e,t,n)}insertObject(e,t,n,r){return qY(this,e,t,n,r)}deleteContent(e,t){YY(this,e,t)}modifySelection(e,t){!function(e,t,n={}){const r=e.schema,i="backward"!=n.direction,a=n.unit?n.unit:"character",o=!!n.treatEmojiAsSingleUnit,s=t.focus,l=new PG({boundaries:JY(s,i),singleCharacters:!0,direction:i?"forward":"backward"}),c={walker:l,schema:r,isForward:i,unit:a,treatEmojiAsSingleUnit:o};let u;for(;u=l.next();){if(u.done)return;const n=$Y(c,u.value);if(n)return void(t instanceof ZG?e.change(e=>{e.setSelectionFocus(n)}):t.setFocus(n))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change(e=>{const n=e.createDocumentFragment(),r=t.getFirstRange();if(!r||r.isCollapsed)return n;const i=r.start.root,a=r.start.getCommonPath(r.end),o=i.getNodeByPath(a);let s;s=r.start.parent==r.end.parent?r:e.createRange(e.createPositionAt(o,r.start.path[a.length]),e.createPositionAt(o,r.end.path[a.length]+1));const l=s.end.offset-s.start.offset;for(const t of s.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),n):e.append(e.cloneElement(t,!0),n);if(s!=r){const t=r._getTransformedByMove(s.start,e.createPositionAt(n,0),l)[0],i=e.createRange(e.createPositionAt(n,0),t.start);tK(e.createRange(t.end,e.createPositionAt(n,"end")),e),tK(i,e)}return n})}(this,e)}hasContent(e,t={}){const n=e instanceof MG?jG._createIn(e):e;if(n.isCollapsed)return!1;const{ignoreWhitespaces:r=!1,ignoreMarkers:i=!1}=t;if(!i)for(const e of this.markers.getMarkersIntersectingRange(n))if(e.affectsData)return!0;for(const e of n.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!r)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,n){return new NG(e,t,n)}createPositionAt(e,t){return NG._createAt(e,t)}createPositionAfter(e){return NG._createAfter(e)}createPositionBefore(e){return NG._createBefore(e)}createRange(e,t){return new jG(e,t)}createRangeIn(e){return jG._createIn(e)}createRangeOn(e){return jG._createOn(e)}createSelection(e,t,n){return new GG(e,t,n)}createBatch(e){return new Zq(e)}createOperationFromJSON(e){return class{static fromJSON(e,t){return UY[e.__className].fromJSON(e,t)}}.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new AY(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),e}}UF(oK,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class sK extends EG{constructor(e){super(),this.editor=e}set(e,t,n={}){if("string"==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class lK{constructor(e={}){const t=e.language||this.constructor.defaultConfig&&this.constructor.defaultConfig.language;this._context=e.context||new QH({language:t}),this._context._addEditor(this,!e.context);const n=Array.from(this.constructor.builtinPlugins||[]);this.config=new FH(e,this.constructor.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new WH(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new xq,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new oK;const r=new Uz;this.data=new Xq(this.model,r),this.editing=new kq(this.model,r),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Qq([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new sK(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new hj.a("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new hj.a("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new hj.a("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),n=e.get("removePlugins")||[],r=e.get("extraPlugins")||[],i=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(r),n,i)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise(e=>this.once("ready",e))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(...e){try{return this.commands.execute(...e)}catch(e){hj.a.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}}UF(lK,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class cK{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(uK(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new hj.a("componentfactory-item-missing",this,{name:e});return this._components.get(uK(e)).callback(this.editor.locale)}has(e){return this._components.has(uK(e))}}function uK(e){return String(e).toLowerCase()}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class dK{constructor(e){this.editor=e,this.componentFactory=new cK(e),this.focusTracker=new wG,this.set("viewportOffset",this._readViewportOffsetFromConfig()),this._editableElementsMap=new Map,this.listenTo(e.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const n=e.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}}UF(dK,NF);var hK={setData(e){this.data.set(e)},getData(e){return this.data.get(e)}};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */var fK={updateSourceElement(){if(!this.sourceElement)throw new hj.a("editor-missing-sourceelement",this);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
var e,t;e=this.sourceElement,t=this.data.get(),e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class pK extends $H{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new VH({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new hj.a("pendingactions-add-invalid-message",this);const t=Object.create(NF);return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}var mK='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',gK='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>';
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const vK={cancel:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z"/></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M13 6H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5h11z"/></svg>',objectSizeSmall:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M7 10H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h5z"/></svg>',objectSizeMedium:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M10 8H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .5-.5h8z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:mK,quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:gK};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class bK{constructor(e){this.files=function(e){const t=Array.from(e.files||[]),n=Array.from(e.items||[]);if(t.length)return t;return n.filter(e=>"file"===e.kind).map(e=>e.getAsFile())}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class yK extends GW{constructor(e){super(e);const t=this.document;function n(e){return(n,r)=>{r.preventDefault();const i=r.dropRange?[r.dropRange]:null,a=new sj(t,e);t.fire(a,{dataTransfer:r.dataTransfer,method:n.name,targetRanges:i,target:r.target}),a.stop.called&&r.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(t,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",n("dragging"),{priority:"low"})}onDomEvent(e){const t={dataTransfer:new bK(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"!=e.type&&"dragover"!=e.type||(t.dropRange=function(e,t){const n=t.target.ownerDocument,r=t.clientX,i=t.clientY;let a;n.caretRangeFromPoint&&n.caretRangeFromPoint(r,i)?a=n.caretRangeFromPoint(r,i):t.rangeParent&&(a=n.createRange(),a.setStart(t.rangeParent,t.rangeOffset),a.collapse(!0));if(a)return e.domConverter.domRangeToView(a);return null}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(this.view,e)),this.fire(e.type,e,t)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const AK=["figcaption","li"];
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class _K extends HF{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(yK),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,n=e.editing.view,r=n.document;this.listenTo(r,"clipboardInput",t=>{e.isReadOnly&&t.stop()},{priority:"highest"}),this.listenTo(r,"clipboardInput",(e,t)=>{const r=t.dataTransfer;let i=t.content||"";var a;
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */i||(r.getData("text/html")?i=function(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,t)=>1==t.length?" ":t).replace(/<!--[\s\S]*?-->/g,"")}(r.getData("text/html")):r.getData("text/plain")&&(((a=(a=r.getData("text/plain")).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;")).includes("</p><p>")||a.includes("<br>"))&&(a=`<p>${a}</p>`),i=a),i=this.editor.data.htmlProcessor.toView(i));const o=new sj(this,"inputTransformation");this.fire(o,{content:i,dataTransfer:r,targetRanges:t.targetRanges,method:t.method}),o.stop.called&&e.stop(),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(e,n)=>{if(n.content.isEmpty)return;const r=this.editor.data.toModel(n.content,"$clipboardHolder");0!=r.childCount&&(e.stop(),t.change(()=>{this.fire("contentInsertion",{content:r,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(e,n)=>{n.resultRange=t.insertContent(n.content)},{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,n=e.editing.view.document;function r(r,i){const a=i.dataTransfer;i.preventDefault();const o=e.data.toView(e.model.getSelectedContent(t.selection));n.fire("clipboardOutput",{dataTransfer:a,content:o,method:r.name})}this.listenTo(n,"copy",r,{priority:"low"}),this.listenTo(n,"cut",(t,n)=>{e.isReadOnly?n.preventDefault():r(t,n)},{priority:"low"}),this.listenTo(n,"clipboardOutput",(n,r)=>{r.content.isEmpty||(r.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(r.content)),r.dataTransfer.setData("text/plain",function e(t){let n="";if(t.is("$text")||t.is("$textProxy"))n=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))n=t.getAttribute("alt");else if(t.is("element","br"))n="\n";else{let r=null;for(const i of t.getChildren()){const t=e(i);r&&(r.is("containerElement")||i.is("containerElement"))&&(AK.includes(r.name)||AK.includes(i.name)?n+="\n":n+="\n\n"),n+=t,r=i}}return n}(r.content))),"cut"==r.method&&e.model.deleteContent(t.selection)},{priority:"low"})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class wK extends GW{constructor(e){super(e),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class EK extends VH{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(e,t,n)=>{this._renderViewIntoCollectionParent(t,n)}),this.on("remove",(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every(e=>"string"==typeof e))throw new hj.a("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const n of this)for(const r of e)n.delegate(r).to(t);this.on("add",(n,r)=>{for(const n of e)r.delegate(n).to(t)}),this.on("remove",(n,r)=>{for(const n of e)r.stopDelegating(n,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}}r(1516);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class SK{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new VH,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,n)=>{n.locale=e}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=CK.bind(this,this)}createCollection(e){const t=new EK(e);return this._viewCollections.add(t),t}registerChild(e){zH(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){zH(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new CK(e)}extendTemplate(e){CK.extend(this.template,e)}render(){if(this.isRendered)throw new hj.a("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}UF(SK,_W),UF(SK,NF);class CK{constructor(e){Object.assign(this,LK(NK(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new hj.a("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const n of t.children)UK(n)?yield n:HK(n)&&(yield*e(n))}(this)}static bind(e,t){return{to:(n,r)=>new kK({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:r}),if:(n,r,i)=>new xK({observable:e,emitter:t,attribute:n,valueIfTrue:r,callback:i})}}static extend(e,t){if(e._isRendered)throw new hj.a("template-extend-render",[this,e]);!function e(t,n){n.attributes&&(t.attributes||(t.attributes={}),jK(t.attributes,n.attributes));n.eventListeners&&(t.eventListeners||(t.eventListeners={}),jK(t.eventListeners,n.eventListeners));n.text&&t.text.push(...n.text);if(n.children&&n.children.length){if(t.children.length!=n.children.length)throw new hj.a("ui-template-extend-children-mismatch",t);let r=0;for(const i of n.children)e(t.children[r++],i)}}(e,LK(NK(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new hj.a("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),OK(this.text)?this._bindToObservable({schema:this.text,updater:MK(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){let t,n,r,i;if(!this.attributes)return;const a=e.node,o=e.revertData;for(t in this.attributes)if(r=a.getAttribute(t),n=this.attributes[t],o&&(o.attributes[t]=r),i=vv(n[0])&&n[0].ns?n[0].ns:null,OK(n)){const s=i?n[0].value:n;o&&VK(t)&&s.unshift(r),this._bindToObservable({schema:s,updater:PK(a,t,i),data:e})}else"style"==t&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],e):(o&&r&&VK(t)&&n.unshift(r),n=n.map(e=>e&&e.value||e).reduce((e,t)=>e.concat(t),[]).reduce(BK,""),FK(n)||a.setAttributeNS(i,t,n))}_renderStyleAttribute(e,t){const n=t.node;for(const r in e){const i=e[r];OK(i)?this._bindToObservable({schema:[i],updater:DK(n,r),data:t}):n.style[r]=i}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,r=e.isApplying;let i=0;for(const a of this.children)if(zK(a)){if(!r){a.setParent(t);for(const e of a)n.appendChild(e.element)}}else if(UK(a))r||(a.isRendered||a.render(),n.appendChild(a.element));else if(iW(a))n.appendChild(a);else if(r){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),a._renderNode({node:n.childNodes[i++],isApplying:!0,revertData:t})}else n.appendChild(a.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map(n=>{const[r,i]=t.split("@");return n.activateDomEventListener(r,i,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const r=n.revertData;IK(e,t,n);const i=e.filter(e=>!FK(e)).filter(e=>e.observable).map(r=>r.activateAttributeListener(e,t,n));r&&r.bindings.push(i)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)e.textContent=t.text;else{for(const n in t.attributes){const r=t.attributes[n];null===r?e.removeAttribute(n):e.setAttribute(n,r)}for(let n=0;n<t.children.length;++n)this._revertTemplateFromNode(e.childNodes[n],t.children[n])}}}UF(CK,mj);class TK{constructor(e){Object.assign(this,e)}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,n){const r=()=>IK(e,t,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,r),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,r)}}}class kK extends TK{activateDomEventListener(e,t,n){const r=(e,n)=>{t&&!n.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,r),()=>{this.emitter.stopListening(n.node,e,r)}}}class xK extends TK{getValue(e){return!FK(super.getValue(e))&&(this.valueIfTrue||!0)}}function OK(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(OK):e instanceof TK)}function IK(e,t,{node:n}){let r=function(e,t){return e.map(e=>e instanceof TK?e.getValue(t):e)}(e,n);r=1==e.length&&e[0]instanceof xK?r[0]:r.reduce(BK,""),FK(r)?t.remove():t.set(r)}function MK(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function PK(e,t,n){return{set(r){e.setAttributeNS(n,t,r)},remove(){e.removeAttributeNS(n,t)}}}function DK(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function NK(e){return BH(e,e=>{if(e&&(e instanceof TK||HK(e)||UK(e)||zK(e)))return e})}function LK(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=GH(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)RK(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=GH(e[t].value)),RK(e,t)}(e.attributes);const t=[];if(e.children)if(zK(e.children))t.push(e.children);else for(const n of e.children)HK(n)||UK(n)||iW(n)?t.push(n):t.push(new CK(n));e.children=t}return e}function RK(e,t){e[t]=GH(e[t])}function BK(e,t){return FK(t)?e:FK(e)?t:`${e} ${t}`}function jK(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function FK(e){return!e&&0!==e}function UK(e){return e instanceof SK}function HK(e){return e instanceof CK}function zK(e){return e instanceof EK}function VK(e){return"class"==e||"style"==e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function*WK(e,t){for(const n of t)n&&e.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class GK extends VF{execute(){const e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n,r){const i=n.isCollapsed,a=n.getFirstRange(),o=a.start.parent,s=a.end.parent;if(r.isLimit(o)||r.isLimit(s))return void(i||o!=s||e.deleteContent(n));if(i){const e=WK(t.model.schema,n.getAttributes());qK(t,a.start),t.setSelectionAttribute(e)}else{const r=!(a.start.isAtStart&&a.end.isAtEnd),i=o==s;e.deleteContent(n,{leaveUnmerged:r}),r&&(i?qK(t,n.focus):t.setSelection(s,0))}}(this.editor.model,n,t.selection,e.schema),this.fire("afterExecute",{writer:n})})}}function qK(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class YK extends SW{constructor(e){super(e);const t=this.document;t.on("keydown",(e,n)=>{if(this.isEnabled&&n.keyCode==AV.enter){const r=new rV(t,"enter",t.selection.getFirstRange());t.fire(r,new WW(t,n.domEvent,{isSoft:n.shiftKey})),r.stop.called&&e.stop()}})}observe(){}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class KK extends HF{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(YK),e.commands.add("enter",new GK(e)),this.listenTo(n,"enter",(n,r)=>{r.preventDefault(),r.isSoft||(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class XK{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e){this.isLocked&&!e||(this._batch=null,this.size=0)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class QK extends VF{constructor(e,t){super(e),this.direction=t,this._buffer=new XK(e.model,e.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,r=>{this._buffer.lock();const i=r.createSelection(e.selection||n.selection),a=e.sequence||1,o=i.isCollapsed;if(i.isCollapsed&&t.modifySelection(i,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(a))return void this._replaceEntireContentWithParagraph(r);if(this._shouldReplaceFirstBlockWithParagraph(i,a))return void this.editor.execute("paragraph",{selection:i});if(i.isCollapsed)return;let s=0;i.getFirstRange().getMinimalFlatRanges().forEach(e=>{s+=eV(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(i,{doNotResetEntireContent:o,direction:this.direction}),this._buffer.input(s),r.setSelection(i),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,n=t.document.selection,r=t.schema.getLimitElement(n);if(!(n.isCollapsed&&n.containsEntireContent(r)))return!1;if(!t.schema.checkChild(r,"paragraph"))return!1;const i=r.getChild(0);return!i||"paragraph"!==i.name}_replaceEntireContentWithParagraph(e){const t=this.editor.model,n=t.document.selection,r=t.schema.getLimitElement(n),i=e.createElement("paragraph");e.remove(e.createRangeIn(r)),e.insert(i,r),e.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const n=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const r=e.getFirstPosition(),i=n.schema.getLimitElement(r),a=i.getChild(0);return r.parent==a&&(!!e.containsEntireContent(a)&&(!!n.schema.checkChild(i,"paragraph")&&"paragraph"!=a.name))}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function $K(e){if(e.newChildren.length-e.oldChildren.length!=1)return;const t=function(e,t){const n=[];let r,i=0;return e.forEach(e=>{"equal"==e?(a(),i++):"insert"==e?(o("insert")?r.values.push(t[i]):(a(),r={type:"insert",index:i,values:[t[i]]}),i++):o("delete")?r.howMany++:(a(),r={type:"delete",index:i,howMany:1})}),a(),n;function a(){r&&(n.push(r),r=null)}function o(e){return r&&r.type==e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(eW(e.oldChildren,e.newChildren,JK),e.newChildren);if(t.length>1)return;const n=t[0];return n.values[0]&&n.values[0].is("$text")?n:void 0}function JK(e,t){return e&&e.is("$text")&&t&&t.is("$text")?e.data===t.data:e===t}function ZK(e,t){const n=t.selection,r=e.shiftKey&&e.keyCode===AV.delete,i=!n.isCollapsed;return r&&i}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class eX extends SW{constructor(e){super(e);const t=e.document;let n=0;function r(e,n,r){const i=new rV(t,"delete",t.selection.getFirstRange());t.fire(i,new WW(t,n,r)),i.stop.called&&e.stop()}t.on("keyup",(e,t)=>{t.keyCode!=AV.delete&&t.keyCode!=AV.backspace||(n=0)}),t.on("keydown",(e,i)=>{if(gV.isWindows&&ZK(i,t))return;const a={};if(i.keyCode==AV.delete)a.direction="forward",a.unit="character";else{if(i.keyCode!=AV.backspace)return;a.direction="backward",a.unit="codePoint"}const o=gV.isMac?i.altKey:i.ctrlKey;a.unit=o?"word":a.unit,a.sequence=++n,r(e,i.domEvent,a)}),gV.isAndroid&&t.on("beforeinput",(t,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const i={unit:"codepoint",direction:"backward",sequence:1},a=n.domTarget.ownerDocument.defaultView.getSelection();a.anchorNode==a.focusNode&&a.anchorOffset+1!=a.focusOffset&&(i.selectionToRemove=e.domConverter.domSelectionToView(a)),r(t,n.domEvent,i)})}observe(){}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class tX extends HF{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,n=t.document,r=e.model.document;t.addObserver(eX),this._undoOnBackspace=!1;const i=new QK(e,"forward");if(e.commands.add("deleteForward",i),e.commands.add("forwardDelete",i),e.commands.add("delete",new QK(e,"backward")),this.listenTo(n,"delete",(n,r)=>{const i={unit:r.unit,sequence:r.sequence};if(r.selectionToRemove){const t=e.model.createSelection(),n=[];for(const t of r.selectionToRemove.getRanges())n.push(e.editing.mapper.toModelRange(t));t.setTo(n),i.selection=t}e.execute("forward"==r.direction?"deleteForward":"delete",i),r.preventDefault(),t.scrollToTheSelection()},{priority:"low"}),gV.isAndroid){let e=null;this.listenTo(n,"delete",(t,n)=>{const r=n.domTarget.ownerDocument.defaultView.getSelection();e={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}},{priority:"lowest"}),this.listenTo(n,"keyup",(t,n)=>{if(e){const t=n.domTarget.ownerDocument.defaultView.getSelection();t.collapse(e.anchorNode,e.anchorOffset),t.extend(e.focusNode,e.focusOffset),e=null}})}this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(t,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,e.execute("undo"),n.preventDefault(),t.stop())},{context:"$capture"}),this.listenTo(r,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class nX{constructor(){this._stack=[]}add(e,t){const n=this._stack,r=n[0];this._insertDescriptor(e);const i=n[0];r===i||rX(r,i)||this.fire("change:top",{oldDescriptor:r,newDescriptor:i,writer:t})}remove(e,t){const n=this._stack,r=n[0];this._removeDescriptor(e);const i=n[0];r===i||rX(r,i)||this.fire("change:top",{oldDescriptor:r,newDescriptor:i,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex(t=>t.id===e.id);if(rX(e,t[n]))return;n>-1&&t.splice(n,1);let r=0;for(;t[r]&&iX(t[r],e);)r++;t.splice(r,0,e)}_removeDescriptor(e){const t=this._stack,n=t.findIndex(t=>t.id===e);n>-1&&t.splice(n,1)}}function rX(e,t){return e&&t&&e.priority==t.priority&&aX(e.classes)==aX(t.classes)}function iX(e,t){return e.priority>t.priority||!(e.priority<t.priority)&&aX(e.classes)>aX(t.classes)}function aX(e){return Array.isArray(e)?e.sort().join(","):e}UF(nX,mj);r(1518);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class oX extends SK{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");for(t&&(this.viewBox=t),this.element.innerHTML="";e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}}function sX(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function lX(e,t,n={}){if(!e.is("containerElement"))throw new hj.a("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=mX,n.label&&function(e,t,n){n.setCustomProperty("widgetLabel",t,e)}(e,n.label,t),n.hasSelectionHandle&&function(e,t){const n=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),n=new oX;return n.set("content",'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>'),n.render(),t.appendChild(n.element),t}));t.insert(t.createPositionAt(e,0),n),t.addClass(["ck-widget_with-selection-handle"],e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e,t),dX(e,t),e}function cX(e,t,n){if(t.classes&&n.addClass(GH(t.classes),e),t.attributes)for(const r in t.attributes)n.setAttribute(r,t.attributes[r],e)}function uX(e,t,n){if(t.classes&&n.removeClass(GH(t.classes),e),t.attributes)for(const r in t.attributes)n.removeAttribute(r,e)}function dX(e,t,n=cX,r=uX){const i=new nX;i.on("change:top",(t,i)=>{i.oldDescriptor&&r(e,i.oldDescriptor,i.writer),i.newDescriptor&&n(e,i.newDescriptor,i.writer)}),t.setCustomProperty("addHighlight",(e,t,n)=>i.add(t,n),e),t.setCustomProperty("removeHighlight",(e,t,n)=>i.remove(t,n),e)}function hX(e){const t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function fX(e,t){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",(n,r,i)=>{t.setAttribute("contenteditable",i?"false":"true",e)}),e.on("change:isFocused",(n,r,i)=>{i?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)}),dX(e,t),e}function pX(e,t){const n=e.getSelectedElement();if(n){const r=vX(e);if(r)return t.createRange(t.createPositionAt(n,r))}return GY(e,t)}function mX(){return null}function gX(e,t,n){return e&&sX(e)&&!n.isInline(t)}function vX(e){return e.getAttribute("widget-type-around")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const bX=[wV("arrowUp"),wV("arrowRight"),wV("arrowDown"),wV("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let e=112;e<=135;e++)bX.push(e);function yX(e){return!(!e.ctrlKey&&!e.metaKey)||bX.includes(e.keyCode)}r(1520);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const AX=["before","after"],_X=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild;class wX extends HF{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[KK,tX]}constructor(e){super(e),this._currentFakeCaretModelElement=null}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(n,r,i)=>{t.change(e=>{for(const n of t.document.roots)i?e.removeClass("ck-widget__type-around_disabled",n):e.addClass("ck-widget__type-around_disabled",n)}),i||e.model.change(e=>{e.removeSelectionAttribute("widget-type-around")})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const n=this.editor,r=n.editing.view,i=n.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(e,t),attributes:i}),r.focus(),r.scrollToTheSelection()}_listenToIfEnabled(e,t,n,r){this.listenTo(e,t,(...e)=>{this.isEnabled&&n(...e)},r)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=vX(e);if(!t)return!1;const n=e.getSelectedElement();return this._insertParagraph(n,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,n=e.locale.t,r={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(e,n,i)=>{const a=i.mapper.toViewElement(n.item);gX(a,n.item,t)&&function(e,t,n){const r=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const n=this.toDomElement(e);return function(e,t){for(const n of AX){const r=new CK({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:t[n]},children:[e.ownerDocument.importNode(_X,!0)]});e.appendChild(r.render())}}(n,t),function(e){const t=new CK({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(n),n}));e.insert(e.createPositionAt(n,"end"),r)}(i.writer,r,a)},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,n=t.document.selection,r=t.schema,i=e.editing.view;function a(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(i.document,"arrowKey",(e,t)=>{this._handleArrowKeyPress(e,t)},{context:[sX,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",(t,n)=>{n.directChange&&e.model.change(e=>{e.removeSelectionAttribute("widget-type-around")})}),this._listenToIfEnabled(t.document,"change:data",()=>{const t=n.getSelectedElement();if(t){if(gX(e.editing.mapper.toViewElement(t),t,r))return}e.model.change(e=>{e.removeSelectionAttribute("widget-type-around")})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(e,t,n)=>{const i=n.writer;if(this._currentFakeCaretModelElement){const e=n.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(i.removeClass(AX.map(a),e),this._currentFakeCaretModelElement=null)}const o=t.selection.getSelectedElement();if(!o)return;const s=n.mapper.toViewElement(o);if(!gX(s,o,r))return;const l=vX(t.selection);l&&(i.addClass(a(l),s),this._currentFakeCaretModelElement=o)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(t,n,r)=>{r||e.model.change(e=>{e.removeSelectionAttribute("widget-type-around")})})}_handleArrowKeyPress(e,t){const n=this.editor,r=n.model,i=r.document.selection,a=r.schema,o=n.editing.view,s=function(e,t){const n=CV(e,t);return"down"===n||"right"===n}(t.keyCode,n.locale.contentLanguageDirection),l=o.document.selection.getSelectedElement();let c;gX(l,n.editing.mapper.toModelElement(l),a)?c=this._handleArrowKeyPressOnSelectedWidget(s):i.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(s):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(s)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,n=vX(t.document.selection);return t.change(t=>{if(!n)return t.setSelectionAttribute("widget-type-around",e?"after":"before"),!0;if(!(n===(e?"after":"before")))return t.removeSelectionAttribute("widget-type-around"),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,n=t.model,r=n.schema,i=t.plugins.get("Widget"),a=i._getObjectElementNextToSelection(e);return!!gX(t.editing.mapper.toViewElement(a),a,r)&&(n.change(t=>{i._setSelectionOverElement(a),t.setSelectionAttribute("widget-type-around",e?"before":"after")}),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,n=t.model,r=n.schema,i=t.editing.mapper,a=n.document.selection,o=e?a.getLastPosition().nodeBefore:a.getFirstPosition().nodeAfter;return!!gX(i.toViewElement(o),o,r)&&(n.change(t=>{t.setSelection(o,"on"),t.setSelectionAttribute("widget-type-around",e?"after":"before")}),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(n,r)=>{const i=r.domTarget.closest(".ck-widget__type-around__button");if(!i)return;const a=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(i),o=function(e,t){const n=e.closest(".ck-widget");return t.mapDomToView(n)}(i,t.domConverter),s=e.editing.mapper.toModelElement(o);this._insertParagraph(s,a),r.preventDefault(),n.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,n=e.editing.view;this._listenToIfEnabled(n.document,"enter",(n,r)=>{if("atTarget"!=n.eventPhase)return;const i=t.getSelectedElement(),a=e.editing.mapper.toViewElement(i),o=e.model.schema;let s;this._insertParagraphAccordingToFakeCaretPosition()?s=!0:gX(a,i,o)&&(this._insertParagraph(i,r.isSoft?"before":"after"),s=!0),s&&(r.preventDefault(),n.stop())},{context:sX})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view,t=[AV.enter,AV.delete,AV.backspace];this._listenToIfEnabled(e.document,"keydown",(e,n)=>{t.includes(n.keyCode)||yX(n)||this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,n=e.model,r=n.schema;this._listenToIfEnabled(t.document,"delete",(t,i)=>{if("atTarget"!=t.eventPhase)return;const a=vX(n.document.selection);if(!a)return;const o=i.direction,s=n.document.selection.getSelectedElement(),l="forward"==o;if("before"===a===l)e.execute("delete",{selection:n.createSelection(s,"on")});else{const t=r.getNearestSelectionRange(n.createPositionAt(s,a),o);if(t)if(t.isCollapsed){const i=n.createSelection(t.start);if(n.modifySelection(i,{direction:o}),i.focus.isEqual(t.start)){const e=function(e,t){let n=t;for(const r of t.getAncestors({parentFirst:!0})){if(r.childCount>1||e.isLimit(r))break;n=r}return n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(r,t.start.parent);n.deleteContent(n.createSelection(e,"on"),{doNotAutoparagraph:!0})}else n.change(n=>{n.setSelection(t),e.execute(l?"deleteForward":"delete")})}else n.change(n=>{n.setSelection(t),e.execute(l?"deleteForward":"delete")})}i.preventDefault(),t.stop()},{context:sX})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,n=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(e,[r,i])=>{if(i&&!i.is("documentSelection"))return;const a=vX(n);return a?(e.stop(),t.change(e=>{const i=n.getSelectedElement(),o=t.createPositionAt(i,a),s=e.createSelection(o),l=t.insertContent(r,s);return e.setSelection(s),l})):void 0},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(e,n)=>{const[,r,,i={}]=n;if(r&&!r.is("documentSelection"))return;const a=vX(t);a&&(i.findOptimalPosition=a,n[3]=i)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(e,[n])=>{if(n&&!n.is("documentSelection"))return;vX(t)&&e.stop()},{priority:"high"})}}function EX(e){const t=e.model;return(n,r)=>{const i=r.keyCode==AV.arrowup,a=r.keyCode==AV.arrowdown,o=r.shiftKey,s=t.document.selection;if(!i&&!a)return;const l=a;if(o&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(s,l))return;const c=function(e,t,n){const r=e.model;if(n){const e=t.isCollapsed?t.focus:t.getLastPosition(),n=SX(r,e,"forward");if(!n)return null;const i=r.createRange(e,n),a=CX(r.schema,i,"backward");return a?r.createRange(e,a):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),n=SX(r,e,"backward");if(!n)return null;const i=r.createRange(n,e),a=CX(r.schema,i,"forward");return a?r.createRange(a,e):null}}(e,s,l);if(c){if(c.isCollapsed){if(s.isCollapsed)return;if(o)return}(c.isCollapsed||function(e,t,n){const r=e.model,i=e.view.domConverter;if(n){const e=r.createSelection(t.start);r.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=r.createRange(e.focus,t.end))}const a=e.mapper.toViewRange(t),o=i.viewRangeToDom(a),s=iG.getDomRangeRects(o);let l;for(const e of s)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,c,l))&&(t.change(e=>{const n=l?c.end:c.start;if(o){const r=t.createSelection(s.anchor);r.setFocus(n),e.setSelection(r)}else e.setSelection(n)}),n.stop(),r.preventDefault(),r.stopPropagation())}}}function SX(e,t,n){const r=e.schema,i=e.createRangeIn(t.root),a="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:e,item:o,type:s}of i.getWalker({startPosition:t,direction:n})){if(r.isLimit(o)&&!r.isInline(o))return e;if(s==a&&r.isBlock(o))return null}return null}function CX(e,t,n){const r="backward"==n?t.end:t.start;if(e.checkChild(r,"$text"))return r;for(const{nextPosition:r}of t.getWalker({direction:n}))if(e.checkChild(r,"$text"))return r;return null}r(1522);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class TX extends HF{static get pluginName(){return"Widget"}static get requires(){return[wX,tX]}init(){const e=this.editor,t=e.editing.view,n=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(t,n,r)=>{const i=r.writer,a=n.selection;if(a.isCollapsed)return;const o=a.getSelectedElement();if(!o)return;const s=e.editing.mapper.toViewElement(o);sX(s)&&r.consumable.consume(a,"selection")&&i.setSelection(i.createRangeOn(s),{fake:!0,label:hX(s)})}),this.editor.editing.downcastDispatcher.on("selection",(e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const r=n.writer,i=r.document.selection;let a=null;for(const e of i.getRanges())for(const t of e){const e=t.item;sX(e)&&!kX(e,a)&&(r.addClass("ck-widget_selected",e),this._previouslySelected.add(e),a=e)}},{priority:"low"}),t.addObserver(wK),this.listenTo(n,"mousedown",(...e)=>this._onMousedown(...e)),this.listenTo(n,"arrowKey",(...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)},{context:[sX,"$text"]}),this.listenTo(n,"arrowKey",(...e)=>{this._preventDefaultOnArrowKeyPress(...e)},{context:"$root"}),this.listenTo(n,"arrowKey",EX(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",(e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())},{context:"$root"})}_onMousedown(e,t){const n=this.editor,r=n.editing.view,i=r.document;let a=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(sX(e))return!1;e=e.parent}return!1}(a)){if((gV.isSafari||gV.isGecko)&&t.domEvent.detail>=3){const e=n.editing.mapper,r=a.is("attributeElement")?a.findAncestor(e=>!e.is("attributeElement")):a,i=e.toModelElement(r);t.preventDefault(),this.editor.model.change(e=>{e.setSelection(i,"in")})}return}if(!sX(a)&&(a=a.findAncestor(sX),!a))return;gV.isAndroid&&t.preventDefault(),i.isFocused||r.focus();const o=n.editing.mapper.toModelElement(a);this._setSelectionOverElement(o)}_handleSelectionChangeOnArrowKeyPress(e,t){const n=t.keyCode,r=this.editor.model,i=r.schema,a=r.document.selection,o=a.getSelectedElement(),s=CV(n,this.editor.locale.contentLanguageDirection),l="down"==s||"right"==s,c="up"==s||"down"==s;if(o&&i.isObject(o)){const n=l?a.getLastPosition():a.getFirstPosition(),o=i.getNearestSelectionRange(n,l?"forward":"backward");return void(o&&(r.change(e=>{e.setSelection(o)}),t.preventDefault(),e.stop()))}if(!a.isCollapsed&&!t.shiftKey){const n=a.getFirstPosition(),o=a.getLastPosition(),s=n.nodeAfter,c=o.nodeBefore;return void((s&&i.isObject(s)||c&&i.isObject(c))&&(r.change(e=>{e.setSelection(l?o:n)}),t.preventDefault(),e.stop()))}if(!a.isCollapsed)return;const u=this._getObjectElementNextToSelection(l);if(u&&i.isObject(u)){if(i.isInline(u)&&c)return;this._setSelectionOverElement(u),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const n=this.editor.model,r=n.schema,i=n.document.selection.getSelectedElement();i&&r.isObject(i)&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document.selection;if(!t.isCollapsed)return;const n=this._getObjectElementNextToSelection(e);return n?(this.editor.model.change(e=>{let r=t.anchor.parent;for(;r.isEmpty;){const t=r;r=t.parent,e.remove(t)}this._setSelectionOverElement(n)}),!0):void 0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,r=t.document.selection,i=t.createSelection(r);if(t.modifySelection(i,{direction:e?"forward":"backward"}),i.isEqual(r))return null;const a=e?i.focus.nodeBefore:i.focus.nodeAfter;return a&&n.isObject(a)?a:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass("ck-widget_selected",t);this._previouslySelected.clear()}}function kX(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}var xX=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return vv(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),zv(e,t,{leading:r,maxWait:t,trailing:i})};r(1524);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class OX extends HF{static get pluginName(){return"DragDrop"}static get requires(){return[_K,TX]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=xX(e=>this._updateDropMarker(e),40),this._removeDropMarkerDelayed=PX(()=>this._removeDropMarker(),40),this._clearDraggableAttributesDelayed=PX(()=>this._clearDraggableAttributes(),40),t.addObserver(yK),t.addObserver(wK),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(e,t,n)=>{n||this._finalizeDragging(!1)}),gV.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,n=t.document,r=e.editing.view,i=r.document;this.listenTo(i,"dragstart",(r,a)=>{const o=n.selection;if(a.target&&a.target.is("editableElement"))return void a.preventDefault();const s=a.target?DX(a.target):null;if(s){const n=e.editing.mapper.toModelElement(s);this._draggedRange=QG.fromRange(t.createRangeOn(n)),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&sX(e)||(this._draggedRange=QG.fromRange(o.getFirstRange()))}if(!this._draggedRange)return void a.preventDefault();this._draggingUid=cj(),a.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",a.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const l=t.createSelection(this._draggedRange.toRange()),c=e.data.toView(t.getSelectedContent(l));i.fire("clipboardOutput",{dataTransfer:a.dataTransfer,content:c,method:r.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(i,"dragend",(e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)},{priority:"low"}),this.listenTo(i,"dragenter",()=>{this.isEnabled&&r.focus()}),this.listenTo(i,"dragleave",()=>{this._removeDropMarkerDelayed()}),this.listenTo(i,"dragging",(t,n)=>{if(!this.isEnabled)return void(n.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const r=IX(e,n.targetRanges,n.target);this._draggedRange||(n.dataTransfer.dropEffect="copy"),gV.isGecko||("copy"==n.dataTransfer.effectAllowed?n.dataTransfer.dropEffect="copy":["all","copyMove"].includes(n.dataTransfer.effectAllowed)&&(n.dataTransfer.dropEffect="move")),r&&this._updateDropMarkerThrottled(r)},{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",(t,n)=>{if("drop"!=n.method)return;const r=IX(e,n.targetRanges,n.target);return this._removeDropMarker(),r?(this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),"move"==MX(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0)?(this._finalizeDragging(!1),void t.stop()):void(n.targetRanges=[e.editing.mapper.toViewRange(r)])):(this._finalizeDragging(!1),void t.stop())},{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(_K);e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const n=t.targetRanges.map(e=>this.editor.editing.mapper.toModelRange(e));this.editor.model.change(e=>e.setSelection(n))},{priority:"high"}),e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const n="move"==MX(t.dataTransfer),r=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(r&&n)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,n=t.document;this.listenTo(n,"mousedown",(r,i)=>{if(gV.isAndroid||!i)return;this._clearDraggableAttributesDelayed.cancel();let a=DX(i.target);if(gV.isBlink&&!e.isReadOnly&&!a&&!n.selection.isCollapsed){const e=n.selection.getSelectedElement();e&&sX(e)||(a=n.selection.editableElement)}a&&(t.change(e=>{e.setAttribute("draggable","true",a)}),this._draggableElement=e.editing.mapper.toModelElement(a))}),this.listenTo(n,"mouseup",()=>{gV.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change(t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:n})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return n.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.innerHTML="&NoBreak;<span></span>&NoBreak;",t}))}})}_updateDropMarker(e){const t=this.editor,n=t.model.markers;t.model.change(t=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})})}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change(e=>{e.removeMarker("drop-target")})}_finalizeDragging(e){const t=this.editor,n=t.model;this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&n.deleteContent(n.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function IX(e,t,n){const r=e.model,i=e.editing.mapper;let a=null;const o=t?t[0].start:null;if(n.is("uiElement")&&(n=n.parent),a=function(e,t){const n=e.model,r=e.editing.mapper;if(sX(t))return n.createRangeOn(r.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor(e=>sX(e)||e.is("editableElement"));if(sX(e))return n.createRangeOn(r.toModelElement(e))}return null}(e,n),a)return a;const s=function(e,t){const n=e.editing.mapper,r=e.editing.view,i=n.toModelElement(t);if(i)return i;const a=r.createPositionBefore(t),o=n.findMappedViewAncestor(a);return n.toModelElement(o)}(e,n),l=o?i.toModelPosition(o):null;return l?(a=function(e,t,n){const r=e.model;if(!r.schema.checkChild(n,"$block"))return null;const i=r.createPositionAt(n,0),a=t.path.slice(0,i.path.length),o=r.createPositionFromPath(t.root,a).nodeAfter;if(o&&r.schema.isObject(o))return r.createRangeOn(o);return null}(e,l,s),a||(a=r.schema.getNearestSelectionRange(l,gV.isGecko?"forward":"backward"),a||function(e,t){const n=e.model;for(;t;){if(n.schema.isObject(t))return n.createRangeOn(t);t=t.parent}}(e,l.parent))):function(e,t){const n=e.model,r=n.schema,i=n.createPositionAt(t,0);return r.getNearestSelectionRange(i,"forward")}(e,s)}function MX(e){return gV.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function PX(e,t){let n;function r(...i){r.cancel(),n=setTimeout(()=>e(...i),t)}return r.cancel=()=>{clearTimeout(n)},r}function DX(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(sX);if(sX(e))return e;const t=e.findAncestor(e=>sX(e)||e.is("editableElement"));return sX(t)?t:null}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class NX extends HF{static get pluginName(){return"PastePlainText"}static get requires(){return[_K]}init(){const e=this.editor,t=e.model,n=e.editing.view,r=n.document,i=t.document.selection;let a=!1;n.addObserver(yK),this.listenTo(r,"keydown",(e,t)=>{a=t.shiftKey}),e.plugins.get(_K).on("contentInsertion",(e,n)=>{(a||function(e,t){if(e.childCount>1)return!1;const n=e.getChild(0);if(t.isObject(n))return!1;return 0==[...n.getAttributeKeys()].length}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(n.content,t.schema))&&t.change(e=>{const r=Array.from(i.getAttributes()).filter(([e])=>t.schema.getAttributeProperties(e).isFormatting);i.isCollapsed||t.deleteContent(i,{doNotAutoparagraph:!0}),r.push(...i.getAttributes());const a=e.createRangeIn(n.content);for(const t of a.getItems())t.is("$textProxy")&&e.setAttributes(r,t)})})}}class LX extends HF{static get pluginName(){return"Clipboard"}static get requires(){return[_K,OX,NX]}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class RX extends VF{execute(){const e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n){const r=n.isCollapsed,i=n.getFirstRange(),a=i.start.parent,o=i.end.parent,s=a==o;if(r){const r=WK(e.schema,n.getAttributes());BX(e,t,i.end),t.removeSelectionAttribute(n.getAttributeKeys()),t.setSelectionAttribute(r)}else{const r=!(i.start.isAtStart&&i.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:r}),s?BX(e,t,n.focus):r&&t.setSelection(o,0)}}(e,n,t.selection),this.fire("afterExecute",{writer:n})})}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const n=t.anchor;if(!n||!e.checkChild(n,"softBreak"))return!1;const r=t.getFirstRange(),i=r.start.parent,a=r.end.parent;if((jX(i,e)||jX(a,e))&&i!==a)return!1;return!0}(e.schema,t.selection)}}function BX(e,t,n){const r=t.createElement("softBreak");e.insertContent(r,n),t.setSelection(r,"after")}function jX(e,t){return!e.is("rootElement")&&(t.isLimit(e)||jX(e.parent,t))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class FX extends HF{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,n=e.conversion,r=e.editing.view,i=r.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),r.addObserver(YK),e.commands.add("shiftEnter",new RX(e)),this.listenTo(i,"enter",(t,n)=>{n.preventDefault(),n.isSoft&&(e.execute("shiftEnter"),r.scrollToTheSelection())},{priority:"low"})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class UX extends VF{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let n=e.schema.getLimitElement(t);if(t.containsEntireContent(n)||!HX(e.schema,n))do{if(n=n.parent,!n)return}while(!HX(e.schema,n));e.change(e=>{e.setSelection(n,"in")})}}function HX(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const zX=EV("Ctrl+A");class VX extends HF{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new UX(e)),this.listenTo(t,"keydown",(t,n)=>{wV(n)===zX&&(e.execute("selectAll"),n.preventDefault())})}}r(1526);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class WX extends SK{constructor(e){super(e),this.set("text",""),this.set("position","s");const t=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",t.to("position",e=>"ck-tooltip_"+e),t.if("text","ck-hidden",e=>!e.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:t.to("text")}]}]})}}r(1528);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class GX extends SK{constructor(e){super(e);const t=this.bindTemplate,n=cj();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(n),this.iconView=new oX,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",e=>!e),t.if("isVisible","ck-hidden",e=>!e),t.to("isOn",e=>e?"ck-on":"ck-off"),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],type:t.to("type",e=>e||"button"),tabindex:t.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${n}`,"aria-disabled":t.if("isEnabled",!0,e=>!e),"aria-pressed":t.to("isOn",e=>!!this.isToggleable&&String(e))},children:this.children,on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(e=>{this.isEnabled?this.fire("execute"):e.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createTooltipView(){const e=new WX;return e.bind("text").to(this,"_tooltipString"),e.bind("position").to(this,"tooltipPosition"),e}_createLabelView(e){const t=new SK,n=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:`ck-editor__aria-label_${e}`},children:[{text:this.bindTemplate.to("label")}]}),t}_createKeystrokeView(){const e=new SK;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",e=>SV(e))}]}),e}_getTooltipString(e,t,n){return e?"string"==typeof e?e:(n&&(n=SV(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:""}`):""}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class qX extends HF{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",t=>{const n=e.commands.get("selectAll"),r=new GX(t),i=t.t;return r.set({label:i("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",()=>{e.execute("selectAll"),e.editing.view.focus()}),r})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class YX extends HF{static get requires(){return[VX,qX]}static get pluginName(){return"SelectAll"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class KX extends VF{constructor(e,t){super(e),this._buffer=new XK(e.model,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,r=e.text||"",i=r.length,a=e.range?t.createSelection(e.range):n.selection,o=e.resultRange;t.enqueueChange(this._buffer.batch,e=>{this._buffer.lock(),t.deleteContent(a),r&&t.insertContent(e.createText(r,n.selection.getAttributes()),a),o?e.setSelection(o):a.is("documentSelection")||e.setSelection(a),this._buffer.unlock(),this._buffer.input(i)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class XX{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(function(e){if(0==e.length)return!1;for(const t of e)if("children"===t.type&&!$K(t))return!0;return!1}(e))this._handleContainerChildrenMutations(e,t);else for(const n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){const n=function(e){const t=e.map(e=>e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));if(!t)return;return t.getAncestors({includeSelf:!0,parentFirst:!0}).find(e=>e.is("containerElement")||e.is("rootElement"))}(e);if(!n)return;const r=this.editor.editing.view.domConverter.mapViewToDom(n),i=new gW(this.editor.editing.view.document),a=this.editor.data.toModel(i.domToView(r)).getChild(0),o=this.editor.editing.mapper.toModelElement(n);if(!o)return;const s=Array.from(a.getChildren()),l=Array.from(o.getChildren()),c=s[s.length-1],u=l[l.length-1],d=c&&c.is("element","softBreak"),h=u&&!u.is("element","softBreak");d&&h&&s.pop();const f=this.editor.model.schema;if(!QX(s,f)||!QX(l,f))return;const p=s.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," "),m=l.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," ");if(m===p)return;const g=eW(m,p),{firstChangeAt:v,insertions:b,deletions:y}=$X(g);let A=null;t&&(A=this.editing.mapper.toModelRange(t.getFirstRange()));const _=p.substr(v,b),w=this.editor.model.createRange(this.editor.model.createPositionAt(o,v),this.editor.model.createPositionAt(o,v+y));this.editor.execute("input",{text:_,range:w,resultRange:A})}_handleTextMutation(e,t){if("text"!=e.type)return;const n=e.newText.replace(/\u00A0/g," "),r=e.oldText.replace(/\u00A0/g," ");if(r===n)return;const i=eW(r,n),{firstChangeAt:a,insertions:o,deletions:s}=$X(i);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const c=this.editing.view.createPositionAt(e.node,a),u=this.editing.mapper.toModelPosition(c),d=this.editor.model.createRange(u,u.getShiftedBy(s)),h=n.substr(a,o);this.editor.execute("input",{text:h,range:d,resultRange:l})}_handleTextNodeInsertion(e){if("children"!=e.type)return;const t=$K(e),n=this.editing.view.createPositionAt(e.node,t.index),r=this.editing.mapper.toModelPosition(n),i=t.values[0].data;this.editor.execute("input",{text:i.replace(/\u00A0/g," "),range:this.editor.model.createRange(r)})}}function QX(e,t){return e.every(e=>t.isInline(e))}function $X(e){let t=null,n=null;for(let r=0;r<e.length;r++){"equal"!=e[r]&&(t=null===t?r:t,n=r)}let r=0,i=0;for(let a=t;a<=n;a++)"insert"!=e[a]&&r++,"delete"!=e[a]&&i++;return{insertions:i,deletions:r,firstChangeAt:t}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class JX extends HF{static get pluginName(){return"Input"}init(){const e=this.editor,t=new KX(e,e.config.get("typing.undoStep")||20);e.commands.add("input",t),function(e){let t=null;const n=e.model,r=e.editing.view,i=e.commands.get("input");function a(e){if(gV.isWindows&&ZK(e,r.document))return;const a=n.document,s=r.document.isComposing,l=t&&t.isEqual(a.selection);t=null,i.isEnabled&&(yX(e)||a.selection.isCollapsed||s&&229===e.keyCode||!s&&229===e.keyCode&&l||o())}function o(){const e=i.buffer;e.lock();const t=e.batch;n.enqueueChange(t,()=>{n.deleteContent(n.document.selection)}),e.unlock()}gV.isAndroid?r.document.on("beforeinput",(e,t)=>a(t),{priority:"lowest"}):r.document.on("keydown",(e,t)=>a(t),{priority:"lowest"}),r.document.on("compositionstart",(function(){const e=n.document,t=1!==e.selection.rangeCount||e.selection.getFirstRange().isFlat;if(e.selection.isCollapsed||t)return;o()}),{priority:"lowest"}),r.document.on("compositionend",()=>{t=n.createSelection(n.document.selection)},{priority:"lowest"})}(e),function(e){e.editing.view.document.on("mutations",(t,n,r)=>{new XX(e).handle(n,r)})}(e)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class ZX extends HF{static get requires(){return[JX,tX]}static get pluginName(){return"Typing"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function eQ(e,t){let n=e.start;return{text:Array.from(e.getItems()).reduce((e,r)=>r.is("$text")||r.is("$textProxy")?e+r.data:(n=t.createPositionAfter(r),""),""),range:t.createRange(n,e.end)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class tQ{constructor(e,t){this.model=e,this.testCallback=t,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",(t,{directChange:n})=>{n&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))}),this.listenTo(e,"change:data",(e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})})}_evaluateTextBeforeSelection(e,t={}){const n=this.model,r=n.document.selection,i=n.createRange(n.createPositionAt(r.focus.parent,0),r.focus),{text:a,range:o}=eQ(i,n),s=this.testCallback(a);if(!s&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!s,s){const n=Object.assign(t,{text:a,range:o});"object"==typeof s&&Object.assign(n,s),this.fire(`matched:${e}`,n)}}}UF(tQ,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class nQ extends HF{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,n=e.editing.view,r=e.locale,i=t.document.selection;this.listenTo(n.document,"arrowKey",(e,t)=>{if(!i.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const n=t.keyCode==AV.arrowright,a=t.keyCode==AV.arrowleft;if(!n&&!a)return;const o=r.contentLanguageDirection;let s=!1;s="ltr"===o&&n||"rtl"===o&&a?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===s&&e.stop()},{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(i,"change:range",(e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&oQ(i.getFirstPosition(),this.attributes)||this._restoreGravity())})}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,n=this.editor.model.document.selection,r=n.getFirstPosition();return!this._isGravityOverridden&&((!r.isAtStart||!rQ(n,t))&&(oQ(r,t)?(aQ(e),this._overrideGravity(),!0):void 0))}_handleBackwardMovement(e){const t=this.attributes,n=this.editor.model,r=n.document.selection,i=r.getFirstPosition();return this._isGravityOverridden?(aQ(e),this._restoreGravity(),iQ(n,t,i),!0):i.isAtStart?!!rQ(r,t)&&(aQ(e),iQ(n,t,i),!0):function(e,t){return oQ(e.getShiftedBy(-1),t)}(i,t)?i.isAtEnd&&!rQ(r,t)&&oQ(i,t)?(aQ(e),iQ(n,t,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function rQ(e,t){for(const n of t)if(e.hasAttribute(n))return!0;return!1}function iQ(e,t,n){const r=n.nodeBefore;e.change(e=>{r?e.setSelectionAttribute(r.getAttributes()):e.removeSelectionAttribute(t)})}function aQ(e){e.preventDefault()}function oQ(e,t){const{nodeBefore:n,nodeAfter:r}=e;for(const e of t){const t=n?n.getAttribute(e):void 0;if((r?r.getAttribute(e):void 0)!==t)return!0}return!1}var sQ=/[\\^$.*+?()[\]{}|]/g;RegExp(sQ.source);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
lQ('"'),lQ("'"),lQ("'"),lQ('"'),lQ('"'),lQ("'");function lQ(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function cQ(e,t,n,r){return r.createRange(uQ(e,t,n,!0,r),uQ(e,t,n,!1,r))}function uQ(e,t,n,r,i){let a=e.textNode||(r?e.nodeBefore:e.nodeAfter),o=null;for(;a&&a.getAttribute(t)==n;)o=a,a=r?a.previousSibling:a.nextSibling;return o?i.createPositionAt(o,r?"before":"after"):e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const dQ=new Map;function hQ(e,t,n){let r=dQ.get(e);r||(r=new Map,dQ.set(e,r)),r.set(t,n)}function fQ(e){return[e]}function pQ(e,t,n={}){const r=function(e,t){const n=dQ.get(e);return n&&n.has(t)?n.get(t):fQ}(e.constructor,t.constructor);try{return r(e=e.clone(),t,n)}catch(e){throw e}}function mQ(e,t,n){e=e.slice(),t=t.slice();const r=new gQ(n.document,n.useRelations,n.forceWeakRemove);r.setOriginalOperations(e),r.setOriginalOperations(t);const i=r.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:i};const a=new WeakMap;for(const t of e)a.set(t,0);const o={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let s=0;for(;s<e.length;){const n=e[s],i=a.get(n);if(i==t.length){s++;continue}const o=t[i],l=pQ(n,o,r.getContext(n,o,!0)),c=pQ(o,n,r.getContext(o,n,!1));r.updateRelation(n,o),r.setOriginalOperations(l,n),r.setOriginalOperations(c,o);for(const e of l)a.set(e,i+c.length);e.splice(s,1,...l),t.splice(i,1,...c)}if(n.padWithNoOps){const n=e.length-o.originalOperationsACount,r=t.length-o.originalOperationsBCount;bQ(e,r-n),bQ(t,n-r)}return vQ(e,o.nextBaseVersionB),vQ(t,o.nextBaseVersionA),{operationsA:e,operationsB:t,originalOperations:i}}class gQ{constructor(e,t,n=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!n,this._relations=new Map}setOriginalOperations(e,t=null){const n=t?this.originalOperations.get(t):null;for(const t of e)this.originalOperations.set(t,n||t)}updateRelation(e,t){switch(e.constructor){case hY:switch(t.constructor){case vY:e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter");break;case hY:e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter")}break;case bY:switch(t.constructor){case vY:e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");break;case hY:if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{const n=jG._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const r=n.end.offset-e.splitPosition.offset,i=e.splitPosition.offset-n.start.offset;this._setRelation(e,t,{howMany:r,offset:i})}}}break;case vY:switch(t.constructor){case vY:e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement");break;case bY:e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource")}break;case pY:{const n=e.newRange;if(!n)return;switch(t.constructor){case hY:{const r=jG._createFromPositionAndShift(t.sourcePosition,t.howMany),i=r.containsPosition(n.start)||r.start.isEqual(n.start),a=r.containsPosition(n.end)||r.end.isEqual(n.end);!i&&!a||r.containsRange(n)||this._setRelation(e,t,{side:i?"left":"right",path:i?n.start.path.slice():n.end.path.slice()});break}case vY:{const r=n.start.isEqual(t.targetPosition),i=n.start.isEqual(t.deletionPosition),a=n.end.isEqual(t.deletionPosition),o=n.end.isEqual(t.sourcePosition);(r||i||a||o)&&this._setRelation(e,t,{wasInLeftElement:r,wasStartBeforeMergedElement:i,wasEndBeforeMergedElement:a,wasInRightElement:o});break}}break}}}getContext(e,t,n){return{aIsStrong:n,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const n=this.originalOperations.get(t),r=this._history.getUndoneOperation(n);if(!r)return null;const i=this.originalOperations.get(e),a=this._relations.get(i);return a&&a.get(r)||null}_setRelation(e,t,n){const r=this.originalOperations.get(e),i=this.originalOperations.get(t);let a=this._relations.get(r);a||(a=new Map,this._relations.set(r,a)),a.set(i,n)}}function vQ(e,t){for(const n of e)n.baseVersion=t++}function bQ(e,t){for(let n=0;n<t;n++)e.push(new FY(0))}function yQ(e,t,n){const r=e.nodes.getNode(0).getAttribute(t);if(r==n)return null;const i=new jG(e.position,e.position.getShiftedBy(e.howMany));return new uY(i,t,r,n,0)}function AQ(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function _Q(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r],a=new hY(i.start,i.end.offset-i.start.offset,t,0);n.push(a);for(let t=r+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(a.sourcePosition,a.targetPosition,a.howMany)[0];t=t._getTransformedByMove(a.sourcePosition,a.targetPosition,a.howMany)}return n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */hQ(uY,uY,(e,t,n)=>{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const r=e.range.getDifference(t.range).map(t=>new uY(t,e.key,e.oldValue,e.newValue,0)),i=e.range.getIntersection(t.range);return i&&n.aIsStrong&&r.push(new uY(i,t.key,t.newValue,e.newValue,0)),0==r.length?[new FY(0)]:r}return[e]}),hQ(uY,fY,(e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const n=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(t=>new uY(t,e.key,e.oldValue,e.newValue,e.baseVersion));if(t.shouldReceiveAttributes){const r=yQ(t,e.key,e.oldValue);r&&n.unshift(r)}return n}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]}),hQ(uY,vY,(e,t)=>{const n=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&n.push(jG._createFromPositionAndShift(t.graveyardPosition,1));const r=e.range._getTransformedByMergeOperation(t);return r.isCollapsed||n.push(r),n.map(t=>new uY(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),hQ(uY,hY,(e,t)=>function(e,t){const n=jG._createFromPositionAndShift(t.sourcePosition,t.howMany);let r=null,i=[];n.containsRange(e,!0)?r=e:e.start.hasSameParentAs(n.start)?(i=e.getDifference(n),r=e.getIntersection(n)):i=[e];const a=[];for(let e of i){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const n=t.getMovedRangeStart(),r=e.start.hasSameParentAs(n);e=e._getTransformedByInsertion(n,t.howMany,r),a.push(...e)}r&&a.push(r._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return a}(e.range,t).map(t=>new uY(t,e.key,e.oldValue,e.newValue,e.baseVersion))),hQ(uY,bY,(e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const n=e.clone();return n.range=new jG(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,n]}return e.range=e.range._getTransformedBySplitOperation(t),[e]}),hQ(fY,uY,(e,t)=>{const n=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const r=yQ(e,t.key,t.newValue);r&&n.push(r)}return n}),hQ(fY,fY,(e,t,n)=>e.position.isEqual(t.position)&&n.aIsStrong?[e]:(e.position=e.position._getTransformedByInsertOperation(t),[e])),hQ(fY,hY,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),hQ(fY,bY,(e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e])),hQ(fY,vY,(e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e])),hQ(pY,fY,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e])),hQ(pY,pY,(e,t,n)=>{if(e.name==t.name){if(!n.aIsStrong)return[new FY(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]}),hQ(pY,vY,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e])),hQ(pY,hY,(e,t,n)=>{if(e.oldRange&&(e.oldRange=jG._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(n.abRelation){const r=jG._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.start.path=n.abRelation.path,e.newRange.end=r.end,[e];if("right"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=r.start,e.newRange.end.path=n.abRelation.path,[e]}e.newRange=jG._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]}),hQ(pY,bY,(e,t,n)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(n.abRelation){const r=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?e.newRange.start=NG._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!n.abRelation.wasInLeftElement&&(e.newRange.start=NG._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasInRightElement?e.newRange.end=NG._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?e.newRange.end=NG._createAt(t.insertionPosition):e.newRange.end=r.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]}),hQ(vY,fY,(e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e])),hQ(vY,vY,(e,t,n)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(n.bWasUndone){const n=t.graveyardPosition.path.slice();return n.push(0),e.sourcePosition=new NG(t.graveyardPosition.root,n),e.howMany=0,[e]}return[new FY(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const r="$graveyard"==e.targetPosition.root.rootName,i="$graveyard"==t.targetPosition.root.rootName,a=r&&!i;if(i&&!r||!a&&n.aIsStrong){const n=t.targetPosition._getTransformedByMergeOperation(t),r=e.targetPosition._getTransformedByMergeOperation(t);return[new hY(n,e.howMany,r,0)]}return[new FY(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&n.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),hQ(vY,hY,(e,t,n)=>{const r=jG._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!n.bWasUndone&&!n.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&r.containsPosition(e.sourcePosition)?[new FY(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])}),hQ(vY,bY,(e,t,n)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const r=0!=t.howMany,i=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(r||i||"mergeTargetNotMoved"==n.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==n.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}),hQ(hY,fY,(e,t)=>{const n=jG._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]}),hQ(hY,hY,(e,t,n)=>{const r=jG._createFromPositionAndShift(e.sourcePosition,e.howMany),i=jG._createFromPositionAndShift(t.sourcePosition,t.howMany);let a,o=n.aIsStrong,s=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?s=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(s=!1),a=e.targetPosition.isEqual(t.targetPosition)&&s?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),AQ(e,t)&&AQ(t,e))return[t.getReversed()];if(r.containsPosition(t.targetPosition)&&r.containsRange(i,!0))return r.start=r.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),r.end=r.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),_Q([r],a);if(i.containsPosition(e.targetPosition)&&i.containsRange(r,!0))return r.start=r.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),r.end=r.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),_Q([r],a);const l=JH(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return r.start=r.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),r.end=r.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),_Q([r],a);"remove"!=e.type||"remove"==t.type||n.aWasUndone||n.forceWeakRemove?"remove"==e.type||"remove"!=t.type||n.bWasUndone||n.forceWeakRemove||(o=!1):o=!0;const c=[],u=r.getDifference(i);for(const e of u){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const n="same"==JH(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),r=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,n);c.push(...r)}const d=r.getIntersection(i);return null!==d&&o&&(d.start=d.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),d.end=d.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(d):1==c.length?i.start.isBefore(r.start)||i.start.isEqual(r.start)?c.unshift(d):c.push(d):c.splice(1,0,d)),0===c.length?[new FY(e.baseVersion)]:_Q(c,a)}),hQ(hY,bY,(e,t,n)=>{let r=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(r=e.targetPosition._getTransformedBySplitOperation(t));const i=jG._createFromPositionAndShift(e.sourcePosition,e.howMany);if(i.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=r,[e];if(i.start.hasSameParentAs(t.splitPosition)&&i.containsPosition(t.splitPosition)){let e=new jG(t.splitPosition,i.end);return e=e._getTransformedBySplitOperation(t),_Q([new jG(i.start,t.splitPosition),e],r)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==n.abRelation&&(r=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==n.abRelation&&(r=e.targetPosition);const a=[i._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const r=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);e.howMany>1&&r&&!n.aWasUndone&&a.push(jG._createFromPositionAndShift(t.insertionPosition,1))}return _Q(a,r)}),hQ(hY,vY,(e,t,n)=>{const r=jG._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&r.containsPosition(t.sourcePosition))if("remove"!=e.type||n.forceWeakRemove){if(1==e.howMany)return n.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new FY(0)]}else if(!n.aWasUndone){const n=[];let r=t.graveyardPosition.clone(),i=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(n.push(new hY(e.sourcePosition,e.howMany-1,e.targetPosition,0)),r=r._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const a=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),o=new hY(r,1,a,0),s=o.getMovedRangeStart().path.slice();s.push(0);const l=new NG(o.targetPosition.root,s);i=i._getTransformedByMove(r,a,1);const c=new hY(i,t.howMany,l,0);return n.push(o),n.push(c),n}const i=jG._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]}),hQ(mY,fY,(e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e])),hQ(mY,vY,(e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e])),hQ(mY,hY,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),hQ(mY,mY,(e,t,n)=>{if(e.position.isEqual(t.position)){if(!n.aIsStrong)return[new FY(0)];e.oldName=t.newName}return[e]}),hQ(mY,bY,(e,t)=>{if("same"==JH(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new mY(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]}),hQ(gY,gY,(e,t,n)=>{if(e.root===t.root&&e.key===t.key){if(!n.aIsStrong||e.newValue===t.newValue)return[new FY(0)];e.oldValue=t.newValue}return[e]}),hQ(bY,fY,(e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset<t.position.offset&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByInsertOperation(t),e.insertionPosition=e.insertionPosition._getTransformedByInsertOperation(t),[e])),hQ(bY,vY,(e,t,n)=>{if(!e.graveyardPosition&&!n.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const n=t.graveyardPosition.path.slice();n.push(0);const r=new NG(t.graveyardPosition.root,n),i=bY.getInsertionPosition(new NG(t.graveyardPosition.root,n)),a=new bY(r,0,i,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=bY.getInsertionPosition(e.splitPosition),e.graveyardPosition=a.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[a,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=bY.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),hQ(bY,hY,(e,t,n)=>{const r=jG._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const i=r.start.isEqual(e.graveyardPosition)||r.containsPosition(e.graveyardPosition);if(!n.bWasUndone&&i){const n=e.splitPosition._getTransformedByMoveOperation(t),r=e.graveyardPosition._getTransformedByMoveOperation(t),i=r.path.slice();i.push(0);const a=new NG(r.root,i);return[new hY(n,e.howMany,a,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const i=e.splitPosition.isEqual(t.targetPosition);if(i&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=bY.getInsertionPosition(e.splitPosition),[e];if(i&&n.abRelation&&n.abRelation.howMany){const{howMany:t,offset:r}=n.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(r),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&r.containsPosition(e.splitPosition)){const n=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=n,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany),e.splitPosition=t.sourcePosition.clone(),e.insertionPosition=bY.getInsertionPosition(e.splitPosition),[e]}return t.sourcePosition.isEqual(t.targetPosition)||(e.splitPosition.hasSameParentAs(t.sourcePosition)&&e.splitPosition.offset<=t.sourcePosition.offset&&(e.howMany-=t.howMany),e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany)),e.splitPosition.stickiness="toNone",e.splitPosition=e.splitPosition._getTransformedByMoveOperation(t),e.splitPosition.stickiness="toNext",e.graveyardPosition?e.insertionPosition=e.insertionPosition._getTransformedByMoveOperation(t):e.insertionPosition=bY.getInsertionPosition(e.splitPosition),[e]}),hQ(bY,bY,(e,t,n)=>{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new FY(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new FY(0)];if("splitBefore"==n.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const r="$graveyard"==e.splitPosition.root.rootName,i="$graveyard"==t.splitPosition.root.rootName,a=r&&!i;if(i&&!r||!a&&n.aIsStrong){const n=[];return t.howMany&&n.push(new hY(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&n.push(new hY(e.splitPosition,e.howMany,e.moveTargetPosition,0)),n}return[new FY(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.baRelation){const n=t.insertionPosition.path.slice();n.push(0);const r=new NG(t.insertionPosition.root,n);return[e,new hY(e.insertionPosition,1,r,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset<t.splitPosition.offset&&(e.howMany-=t.howMany),e.splitPosition=e.splitPosition._getTransformedBySplitOperation(t),e.insertionPosition=bY.getInsertionPosition(e.splitPosition),[e]});class wQ extends VF{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(e.data,"set",(e,t)=>{t[1]={...t[1]};const n=t[1];n.batchType||(n.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(e.data,"set",(e,t)=>{t[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}addBatch(e){const t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,n){const r=this.editor.model,i=r.document,a=[],o=e.map(e=>e.getTransformedByOperations(n)),s=o.flat();for(const e of o){const t=e.filter(e=>e.root!=i.graveyard).filter(e=>!SQ(e,s));t.length&&(EQ(t),a.push(t[0]))}a.length&&r.change(e=>{e.setSelection(a,{backward:t})})}_undo(e,t){const n=this.editor.model,r=n.document;this._createdBatches.add(t);const i=e.operations.slice().filter(e=>e.isDocumentOperation);i.reverse();for(const e of i){const i=e.baseVersion+1,a=Array.from(r.history.getOperations(i)),o=mQ([e.getReversed()],a,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const i of o)t.addOperation(i),n.applyOperation(i),r.history.setOperationAsUndone(e,i)}}}function EQ(e){e.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let t=1;t<e.length;t++){const n=e[t-1].getJoined(e[t],!0);n&&(t--,e.splice(t,2,n))}}function SQ(e,t){return t.some(t=>t!==e&&t.containsRange(e,!0))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class CQ extends wQ{execute(e=null){const t=e?this._stack.findIndex(t=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],r=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(r,()=>{this._undo(n.batch,r);const e=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e),this.fire("revert",n.batch,r)}),this.refresh()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class TQ extends wQ{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,()=>{const n=e.batch.operations[e.batch.operations.length-1].baseVersion+1,r=this.editor.model.document.history.getOperations(n);this._restoreSelection(e.selection.ranges,e.selection.isBackward,r),this._undo(e.batch,t)}),this.refresh()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class kQ extends HF{static get pluginName(){return"UndoEditing"}constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new CQ(e),this._redoCommand=new TQ(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(e,t)=>{const n=t[0];if(!n.isDocumentOperation)return;const r=n.batch,i=this._redoCommand._createdBatches.has(r),a=this._undoCommand._createdBatches.has(r);this._batchRegistry.has(r)||(this._batchRegistry.add(r),r.isUndoable&&(i?this._undoCommand.addBatch(r):a||(this._undoCommand.addBatch(r),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(e,t,n)=>{this._redoCommand.addBatch(n)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}var xQ='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',OQ='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class IQ extends HF{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,n=e.t,r="ltr"==t.uiLanguageDirection?xQ:OQ,i="ltr"==t.uiLanguageDirection?OQ:xQ;this._addButton("undo",n("Undo"),"CTRL+Z",r),this._addButton("redo",n("Redo"),"CTRL+Y",i)}_addButton(e,t,n,r){const i=this.editor;i.ui.componentFactory.add(e,a=>{const o=i.commands.get(e),s=new GX(a);return s.set({label:t,icon:r,keystroke:n,tooltip:!0}),s.bind("isEnabled").to(o,"isEnabled"),this.listenTo(s,"execute",()=>{i.execute(e),i.editing.view.focus()}),s})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class MQ extends HF{static get requires(){return[kQ,IQ]}static get pluginName(){return"Undo"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class PQ extends HF{static get requires(){return[LX,KK,YX,FX,ZX,MQ]}static get pluginName(){return"Essentials"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class DQ extends VF{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document.selection,r=e.value;t.change(e=>{if(n.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,r):e.removeSelectionAttribute(this.attributeKey);else{const i=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of i)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function NQ({emitter:e,activator:t,callback:n,contextElements:r}){e.listenTo(document,"mousedown",(e,i)=>{if(!t())return;const a="function"==typeof i.composedPath?i.composedPath():[];for(const e of r)if(e.contains(i.target)||a.includes(e))return;n()})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function LQ(e){e.set("_isCssTransitionsDisabled",!1),e.disableCssTransitions=()=>{e._isCssTransitionsDisabled=!0},e.enableCssTransitions=()=>{e._isCssTransitionsDisabled=!1},e.extendTemplate({attributes:{class:[e.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function RQ({view:e}){e.listenTo(e.element,"submit",(t,n)=>{n.preventDefault(),e.fire("submit")},{useCapture:!0})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class BQ extends EK{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new CK({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=eG(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}r(1530);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class jQ extends GX{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new SK;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function FQ(e,t){const n=e.t,r={Black:n("Black"),"Dim grey":n("Dim grey"),Grey:n("Grey"),"Light grey":n("Light grey"),White:n("White"),Red:n("Red"),Orange:n("Orange"),Yellow:n("Yellow"),"Light green":n("Light green"),Green:n("Green"),Aquamarine:n("Aquamarine"),Turquoise:n("Turquoise"),"Light blue":n("Light blue"),Blue:n("Blue"),Purple:n("Purple")};return t.map(e=>{const t=r[e.label];return t&&t!=e.label&&(e.label=t),e})}function UQ(e){return e.map(HQ).filter(e=>!!e)}function HQ(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class zQ extends GX{constructor(e){super(e);const t=this.bindTemplate;this.set("color"),this.set("hasBorder"),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class VQ{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];"string"==typeof n&&(n=[n]);for(const r of n)e.keystrokeHandler.set(r,(e,n)=>{this[t](),n()})}}get first(){return this.focusables.find(WQ)||null}get last(){return this.focusables.filter(WQ).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,n)=>{const r=t.element===this.focusTracker.focusedElement;return r&&(e=n),r}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?"first":"last"];let r=(t+n+e)%n;do{const t=this.focusables.get(r);if(WQ(t))return t;r=(r+n+e)%n}while(r!==t);return null}}function WQ(e){return!(!e.focus||!uG(e.element))}r(1532);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class GQ extends SK{constructor(e,t){super(e);const n=t&&t.colorDefinitions||[],r={};t&&t.columns&&(r.gridTemplateColumns=`repeat( ${t.columns}, 1fr)`),this.set("selectedColor"),this.items=this.createCollection(),this.focusTracker=new wG,this.keystrokes=new EG,this._focusCycler=new VQ({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),this.items.on("add",(e,t)=>{t.isOn=t.color===this.selectedColor}),n.forEach(e=>{const t=new zQ;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})}),this.items.add(t)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:r}}),this.on("change:selectedColor",(e,t,n)=>{for(const e of this.items)e.isOn=e.color===n})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var qQ='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class YQ extends GX{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new oX;return e.content=qQ,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}r(1534);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class KQ extends SK{constructor(e){super(e);const t=this.bindTemplate;this.set("class"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new EG,this.focusTracker=new wG,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.to("class"),t.if("isVisible","ck-hidden",e=>!e),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())}),this.keystrokes.set("arrowleft",(e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const e=new GX;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new GX,t=e.bindTemplate;return e.icon=qQ,e.extendTemplate({attributes:{class:"ck-splitbutton__arrow","aria-haspopup":!0,"aria-expanded":t.to("isOn",e=>String(e))}}),e.bind("isEnabled").to(this),e.delegate("execute").to(this,"open"),e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class XQ extends SK{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",e=>`ck-dropdown__panel_${e}`),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to(e=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}r(1536);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function QQ({element:e,target:t,positions:n,limiter:r,fitInViewport:i,viewportOffsetConfig:a}){Ej(t)&&(t=t()),Ej(r)&&(r=r());const o=function(e){return e&&e.parentNode?e.offsetParent===cW.document.body?null:e.offsetParent:null}(e),s=new iG(e);let l;const c={targetRect:new iG(t),elementRect:s,positionedElementAncestor:o};if(r||i){const e=r&&new iG(r).getVisible(),t=i&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new iG(cW.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(a);Object.assign(c,{limiterRect:e,viewportRect:t}),l=function(e,t){const{elementRect:n}=t,r=n.getArea(),i=e.map(e=>new JQ(e,t)).filter(e=>!!e.name);let a=0,o=null;for(const e of i){const{_limiterIntersectionArea:t,_viewportIntersectionArea:n}=e;if(t===r)return e;const i=n**2+t**2;i>a&&(a=i,o=e)}return o}(n,c)||new JQ(n[0],c)}else l=new JQ(n[0],c);return l}function $Q(e){const{scrollX:t,scrollY:n}=cW.window;return e.clone().moveBy(t,n)}class JQ{constructor(e,t){const n=e(t.targetRect,t.elementRect,t.viewportRect);if(!n)return;const{left:r,top:i,name:a,config:o}=n;Object.assign(this,{name:a,config:o}),this._positioningFunctionCorrdinates={left:r,top:i},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get _limiterIntersectionArea(){const e=this._options.limiterRect;if(e){const t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{const n=e.getIntersection(t);if(n)return n.getIntersectionArea(this._rect)}}return 0}get _viewportIntersectionArea(){const e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect?this._cachedRect:(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top),this._cachedRect)}get _absoluteRect(){return this._cachedAbsoluteRect?this._cachedAbsoluteRect:(this._cachedAbsoluteRect=$Q(this._rect),this._options.positionedElementAncestor&&function(e,t){const n=$Q(new iG(t)),r=nG(t);let i=0,a=0;i-=n.left,a-=n.top,i+=t.scrollLeft,a+=t.scrollTop,i-=r.left,a-=r.top,e.moveBy(i,a)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor),this._cachedAbsoluteRect)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class ZQ extends SK{constructor(e,t,n){super(e);const r=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new EG,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",r.to("class"),r.if("isEnabled","ck-disabled",e=>!e)],id:r.to("id"),"aria-describedby":r.to("ariaDescribedById")},children:[t,n]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=ZQ._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set("arrowdown",(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set("arrowright",(e,t)=>{this.isOpen&&t()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:n,southWest:r,northEast:i,northWest:a,southMiddleEast:o,southMiddleWest:s,northMiddleEast:l,northMiddleWest:c}=ZQ.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,r,o,s,e,i,a,l,c,t]:[r,n,s,o,e,a,i,c,l,t]}}ZQ.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},ZQ._getOptimalPosition=QQ;
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class e$ extends SK{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class t$ extends SK{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function n$(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}r(1538);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class r$ extends SK{constructor(e,t){super(e);const n=this.bindTemplate,r=this.t;this.options=t||{},this.set("ariaLabel",r("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new wG,this.keystrokes=new EG,this.set("class"),this.set("isCompact",!1),this.itemsView=new i$(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const i="rtl"===e.uiLanguageDirection;this._focusCycler=new VQ({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[i?"arrowright":"arrowleft","arrowup"],focusNext:[i?"arrowleft":"arrowright","arrowdown"]}});const a=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact")];var o;this.options.shouldGroupWhenFull&&this.options.isFloating&&a.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:a,role:"toolbar","aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")}},children:this.children,on:{mousedown:(o=this,o.bindTemplate.to(e=>{e.target===o.element&&e.preventDefault()}))}}),this._behavior=this.options.shouldGroupWhenFull?new o$(this):new a$(this)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t){const n=n$(e),r=n.items.filter((e,r,i)=>"|"===e||-1===n.removeItems.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(Object(hj.b)("toolbarview-line-break-ignored-when-grouping-items",i),!1):!!t.has(e)||(Object(hj.b)("toolbarview-item-unavailable",{name:e}),!1))),i=this._cleanSeparators(r).map(e=>"|"===e?new e$:"-"===e?new t$:t.create(e));this.items.addMany(i)}_cleanSeparators(e){const t=e=>"-"!==e&&"|"!==e,n=e.length,r=e.findIndex(t),i=n-e.slice().reverse().findIndex(t);return e.slice(r,i).filter((e,n,r)=>{if(t(e))return!0;return!(n>0&&r[n-1]===e)})}}class i$ extends SK{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class a${constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using(e=>e),e.focusables.bindTo(e.items).using(e=>e),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class o${constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,e.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),e.children.on("add",this._updateFocusCycleableItems.bind(this)),e.children.on("remove",this._updateFocusCycleableItems.bind(this)),e.items.on("change",(e,t)=>{const n=t.index;for(const e of t.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=n;e<n+t.added.length;e++){const r=t.added[e-n];e>this.ungroupedItems.length?this.groupedItems.add(r,e-this.ungroupedItems.length):this.ungroupedItems.add(r,e)}this._updateGrouping()}),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!uG(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,n=new iG(e.lastChild),r=new iG(e);if(!this.cachedPadding){const n=cW.window.getComputedStyle(e),r="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[r])}return"ltr"===t?n.right>r.right-this.cachedPadding:n.left<r.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new sG(this.viewElement,t=>{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new e$),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,n=u$(e);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",d$(n,[]),n.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:gK}),n.toolbarView.items.bindTo(this.groupedItems).using(e=>e),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}r(1540);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class s$ extends SK{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new wG,this.keystrokes=new EG,this._focusCycler=new VQ({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class l$ extends SK{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class c$ extends SK{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}r(1542),r(1544);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function u$(e,t=YQ){const n=new t(e),r=new XQ(e),i=new ZQ(e,n,r);return n.bind("isEnabled").to(i),n instanceof YQ?n.bind("isOn").to(i,"isOpen"):n.arrowView.bind("isOn").to(i,"isOpen"),function(e){(function(e){e.on("render",()=>{NQ({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})})(e),function(e){e.on("execute",t=>{t.source instanceof jQ||(e.isOpen=!1)})}(e),function(e){e.keystrokes.set("arrowdown",(t,n)=>{e.isOpen&&(e.panelView.focus(),n())}),e.keystrokes.set("arrowup",(t,n)=>{e.isOpen&&(e.panelView.focusLast(),n())})}(e)}(i),i}function d$(e,t){const n=e.locale,r=n.t,i=e.toolbarView=new r$(n);i.set("ariaLabel",r("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map(e=>i.items.add(e)),e.panelView.children.add(i),i.items.delegate("execute").to(e)}function h$(e,t){const n=e.locale,r=e.listView=new s$(n);r.items.bindTo(t).using(({type:e,model:t})=>{if("separator"===e)return new c$(n);if("button"===e||"switchbutton"===e){const r=new l$(n);let i;return i="button"===e?new GX(n):new jQ(n),i.bind(...Object.keys(t)).to(t),i.delegate("execute").to(r),r.children.add(i),r}}),e.panelView.children.add(r),r.items.delegate("execute").to(e)}r(1546);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class f$ extends SK{constructor(e){super(e),this.body=new BQ(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}r(1548);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class p$ extends SK{constructor(e){super(e),this.set("text"),this.set("for"),this.id=`ck-editor__label_${cj()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class m$ extends f${constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new p$;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class g$ extends SK{constructor(e,t,n){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change(n=>{const r=e.document.getRoot(t.name);n.addClass(t.isFocused?"ck-focused":"ck-blurred",r),n.removeClass(t.isFocused?"ck-blurred":"ck-focused",r)})}e.isRenderingInProgress?function n(r){e.once("change:isRenderingInProgress",(e,i,a)=>{a?n(r):t(r)})}(this):t(this)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class v$ extends g${constructor(e,t,n){super(e,t,n),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView,t=this.t;e.change(n=>{const r=e.document.getRoot(this.name);n.setAttribute("aria-label",t("Rich Text Editor, %0",this.name),r)})}}r(1550);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class b$ extends SK{constructor(e,t={}){super(e);const n=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",n.to("class")]},children:this.children});const r=new SK(e);r.setTemplate({tag:"span",attributes:{class:["ck","ck-form__header__label"]},children:[{text:n.to("label")}]}),this.children.add(r)}}r(1552);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class y$ extends SK{constructor(e){super(e),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new wG,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),inputmode:t.to("inputMode"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to((...e)=>{this.fire("input",...e),this._updateIsEmpty()}),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(e,t,n)=>{this._setDomElementValue(n),this._updateIsEmpty()})}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class A$ extends y${constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */r(1554);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class _$ extends SK{constructor(e,t){super(e);const n=`ck-labeled-field-view-${cj()}`,r=`ck-labeled-field-view-status-${cj()}`;this.fieldView=t(this,n,r),this.set("label"),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.set("placeholder"),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(r),this.bind("_statusText").to(this,"errorText",this,"infoText",(e,t)=>e||t);const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",i.to("class"),i.if("isEnabled","ck-disabled",e=>!e),i.if("isEmpty","ck-labeled-field-view_empty"),i.if("isFocused","ck-labeled-field-view_focused"),i.if("placeholder","ck-labeled-field-view_placeholder"),i.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}_createLabelView(e){const t=new p$(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new SK(this.locale),n=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",e=>!e)],id:e,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function w$(e,t,n){const r=new A$(e.locale);return r.set({id:t,ariaDescribedById:n}),r.bind("isReadOnly").to(e,"isEnabled",e=>!e),r.bind("hasError").to(e,"errorText",e=>!!e),r.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused","placeholder").to(r),r}function E$(e,t,n){const r=u$(e.locale);return r.set({id:t,ariaDescribedById:n}),r.bind("isEnabled").to(e),r}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class S$ extends $H{static get pluginName(){return"Notification"}init(){this.on("show:warning",(e,t)=>{window.alert(t.message)},{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=`show:${e.type}`+(e.namespace?`:${e.namespace}`:"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class C${constructor(e,t){t&&kF(this,t),e&&this.set(e)}}UF(C$,NF);r(1556);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const T$=cG("px"),k$=cW.document.body;class x$ extends SK{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",e=>`ck-balloon-panel_${e}`),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",T$),left:t.to("left",T$)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=x$.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:k$,fitInViewport:!0},e),r=x$._getOptimalPosition(n),i=parseInt(r.left),a=parseInt(r.top),{name:o,config:s={}}=r,{withArrow:l=!0}=s;Object.assign(this,{top:a,left:i,position:o,withArrow:l})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=O$(e.target),n=e.limiter?O$(e.limiter):k$;this.listenTo(cW.document,"scroll",(r,i)=>{const a=i.target,o=t&&a.contains(t),s=n&&a.contains(n);!o&&!s&&t&&n||this.attachTo(e)},{useCapture:!0}),this.listenTo(cW.window,"resize",()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(cW.document,"scroll"),this.stopListening(cW.window,"resize")}}function O$(e){return jH(e)?e:tG(e)?e.commonAncestorContainer:"function"==typeof e?O$(e()):null}function I$({horizontalOffset:e=x$.arrowHorizontalOffset,verticalOffset:t=x$.arrowVerticalOffset,stickyVerticalOffset:n=x$.stickyVerticalOffset,config:r}={}){return{northWestArrowSouthWest:(t,n)=>({top:i(t,n),left:t.left-e,name:"arrow_sw",...r&&{config:r}}),northWestArrowSouthMiddleWest:(t,n)=>({top:i(t,n),left:t.left-.25*n.width-e,name:"arrow_smw",...r&&{config:r}}),northWestArrowSouth:(e,t)=>({top:i(e,t),left:e.left-t.width/2,name:"arrow_s",...r&&{config:r}}),northWestArrowSouthMiddleEast:(t,n)=>({top:i(t,n),left:t.left-.75*n.width+e,name:"arrow_sme",...r&&{config:r}}),northWestArrowSouthEast:(t,n)=>({top:i(t,n),left:t.left-n.width+e,name:"arrow_se",...r&&{config:r}}),northArrowSouthWest:(t,n)=>({top:i(t,n),left:t.left+t.width/2-e,name:"arrow_sw",...r&&{config:r}}),northArrowSouthMiddleWest:(t,n)=>({top:i(t,n),left:t.left+t.width/2-.25*n.width-e,name:"arrow_smw",...r&&{config:r}}),northArrowSouth:(e,t)=>({top:i(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...r&&{config:r}}),northArrowSouthMiddleEast:(t,n)=>({top:i(t,n),left:t.left+t.width/2-.75*n.width+e,name:"arrow_sme",...r&&{config:r}}),northArrowSouthEast:(t,n)=>({top:i(t,n),left:t.left+t.width/2-n.width+e,name:"arrow_se",...r&&{config:r}}),northEastArrowSouthWest:(t,n)=>({top:i(t,n),left:t.right-e,name:"arrow_sw",...r&&{config:r}}),northEastArrowSouthMiddleWest:(t,n)=>({top:i(t,n),left:t.right-.25*n.width-e,name:"arrow_smw",...r&&{config:r}}),northEastArrowSouth:(e,t)=>({top:i(e,t),left:e.right-t.width/2,name:"arrow_s",...r&&{config:r}}),northEastArrowSouthMiddleEast:(t,n)=>({top:i(t,n),left:t.right-.75*n.width+e,name:"arrow_sme",...r&&{config:r}}),northEastArrowSouthEast:(t,n)=>({top:i(t,n),left:t.right-n.width+e,name:"arrow_se",...r&&{config:r}}),southWestArrowNorthWest:(t,n)=>({top:a(t),left:t.left-e,name:"arrow_nw",...r&&{config:r}}),southWestArrowNorthMiddleWest:(t,n)=>({top:a(t),left:t.left-.25*n.width-e,name:"arrow_nmw",...r&&{config:r}}),southWestArrowNorth:(e,t)=>({top:a(e),left:e.left-t.width/2,name:"arrow_n",...r&&{config:r}}),southWestArrowNorthMiddleEast:(t,n)=>({top:a(t),left:t.left-.75*n.width+e,name:"arrow_nme",...r&&{config:r}}),southWestArrowNorthEast:(t,n)=>({top:a(t),left:t.left-n.width+e,name:"arrow_ne",...r&&{config:r}}),southArrowNorthWest:(t,n)=>({top:a(t),left:t.left+t.width/2-e,name:"arrow_nw",...r&&{config:r}}),southArrowNorthMiddleWest:(t,n)=>({top:a(t),left:t.left+t.width/2-.25*n.width-e,name:"arrow_nmw",...r&&{config:r}}),southArrowNorth:(e,t)=>({top:a(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...r&&{config:r}}),southArrowNorthMiddleEast:(t,n)=>({top:a(t),left:t.left+t.width/2-.75*n.width+e,name:"arrow_nme",...r&&{config:r}}),southArrowNorthEast:(t,n)=>({top:a(t),left:t.left+t.width/2-n.width+e,name:"arrow_ne",...r&&{config:r}}),southEastArrowNorthWest:(t,n)=>({top:a(t),left:t.right-e,name:"arrow_nw",...r&&{config:r}}),southEastArrowNorthMiddleWest:(t,n)=>({top:a(t),left:t.right-.25*n.width-e,name:"arrow_nmw",...r&&{config:r}}),southEastArrowNorth:(e,t)=>({top:a(e),left:e.right-t.width/2,name:"arrow_n",...r&&{config:r}}),southEastArrowNorthMiddleEast:(t,n)=>({top:a(t),left:t.right-.75*n.width+e,name:"arrow_nme",...r&&{config:r}}),southEastArrowNorthEast:(t,n)=>({top:a(t),left:t.right-n.width+e,name:"arrow_ne",...r&&{config:r}}),viewportStickyNorth:(e,t,i)=>e.getIntersection(i)?{top:i.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...r}}:null};function i(e,n){return e.top-n.height-t}function a(e){return e.bottom+t}}x$.arrowHorizontalOffset=25,x$.arrowVerticalOffset=10,x$.stickyVerticalOffset=20,x$._getOptimalPosition=QQ,x$.defaultPositions=I$();r(1558),r(1560);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const M$=cG("px");class P$ extends HF{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.view=new x$(e.locale),e.ui.view.body.add(this.view),e.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}destroy(){super.destroy(),this.view.destroy(),this._rotatorView.destroy(),this._fakePanelsView.destroy()}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new hj.a("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const n=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),n.set(e.view,e),this._viewToStack.set(e.view,n),n===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new hj.a("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new hj.a("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(t=>t[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new D$(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(e,n)=>{if(n<2)return"";const r=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[r,n])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new N$(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>=2?Math.min(e-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:n=!0,singleViewMode:r=!1}){this.view.class=t,this.view.withArrow=n,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),r&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class D$ extends SK{constructor(e){super(e);const t=e.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new wG,this.buttonPrevView=this._createButtonView(t("Previous"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>'),this.buttonNextView=this._createButtonView(t("Next"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>'),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",e=>e?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const n=new GX(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n}}class N$ extends SK{constructor(e,t){super(e);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",e=>e?"":"ck-hidden")],style:{top:n.to("top",M$),left:n.to("left",M$),width:n.to("width",M$),height:n.to("height",M$)}},children:this.content}),this.on("change:numberOfPanels",(e,t,n,r)=>{n>r?this._addPanels(n-r):this._removePanels(r-n),this.updatePosition()})}_addPanels(e){for(;e--;){const e=new SK;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:n,height:r}=new iG(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:n,height:r})}}}r(1562);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const L$=cG("px");class R$ extends SK{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new CK({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",e=>e?"block":"none"),height:t.to("isSticky",e=>e?L$(this._panelRect.height):null)}}}).render(),this._contentPanel=new CK({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",e=>e?L$(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_hasViewportTopOffset",e=>e?L$(this.viewportTopOffset):null),bottom:t.to("_isStickyToTheLimiter",e=>e?L$(this.limiterBottomOffset):null),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(cW.window,"scroll",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top<this.viewportTopOffset&&this._panelRect.height+this.limiterBottomOffset<t.height):this.isSticky=!1,this.isSticky?(this._isStickyToTheLimiter=t.bottom<e.height+this.limiterBottomOffset+this.viewportTopOffset,this._hasViewportTopOffset=!this._isStickyToTheLimiter&&!!this.viewportTopOffset,this._marginLeft=this._isStickyToTheLimiter?null:L$(-cW.window.scrollX)):(this._isStickyToTheLimiter=!1,this._hasViewportTopOffset=!1,this._marginLeft=null)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
cG("px");r(1564);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */cG("px");
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
cG("px");
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class B$ extends VH{constructor(e){super(e),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",0===this.length)})}add(e,t){this.find(t=>t.color===e.color)||super.add(e,t)}hasColor(e){return!!this.find(t=>t.color===e)}}UF(B$,NF);r(1566);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class j$ extends SK{constructor(e,{colors:t,columns:n,removeButtonLabel:r,documentColorsLabel:i,documentColorsCount:a}){super(e),this.items=this.createCollection(),this.colorDefinitions=t,this.focusTracker=new wG,this.keystrokes=new EG,this.set("selectedColor"),this.removeButtonLabel=r,this.columns=n,this.documentColors=new B$,this.documentColorsCount=a,this._focusCycler=new VQ({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this._documentColorsLabel=i,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._removeColorButton())}updateDocumentColors(e,t){const n=e.document,r=this.documentColorsCount;this.documentColors.clear();for(const i of n.getRootNames()){const a=n.getRoot(i),o=e.createRangeIn(a);for(const e of o.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=r))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,n=this.selectedColor;t.selectedColor=n,e&&(e.selectedColor=n)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount)){const e=CK.bind(this.documentColors,this.documentColors),t=new p$(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_removeColorButton(){const e=new GX;return e.set({withText:!0,icon:vK.eraser,tooltip:!0,label:this.removeButtonLabel}),e.class="ck-color-table__remove-color",e.on("execute",()=>{this.fire("execute",{value:null})}),e}_createStaticColorsGrid(){const e=new GQ(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.delegate("execute").to(this),e}_createDocumentColorsGrid(){const e=CK.bind(this.documentColors,this.documentColors),t=new GQ(this.locale,{columns:this.columns});return t.delegate("execute").to(this),t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using(e=>{const t=new zQ;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",()=>{this.fire("execute",{value:e.color})}),t}),this.documentColors.on("change:isEmpty",(e,n,r)=>{r&&(t.selectedColor=null)}),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find(t=>t.color===e);t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function F$(e,t){const n={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)n.model.values.push(e.model),n.view[e.model]=e.view,e.upcastAlso&&(n.upcastAlso[e.model]=e.upcastAlso);return n}function U$(e){return t=>t.getStyle(e).replace(/\s/g,"")}function H$(e){return(t,{writer:n})=>n.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class z$ extends DQ{constructor(e){super(e,"fontFamily")}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function V$(e){return e.map(W$).filter(e=>!!e)}function W$(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),n=t[0],r=t.map(G$).join(", ");return{title:n,model:r,view:{name:"span",styles:{"font-family":r},priority:7}}}(e):void 0}function G$(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class q$ extends HF{static get pluginName(){return"FontFamilyEditing"}constructor(e){super(e),e.config.define("fontFamily",{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"fontFamily"}),e.model.schema.setAttributeProperties("fontFamily",{isFormatting:!0,copyOnEnter:!0});const t=F$("fontFamily",V$(e.config.get("fontFamily.options")).filter(e=>e.model));e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(t),e.commands.add("fontFamily",new z$(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:"fontFamily",view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:"fontFamily",value:e=>e.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:"fontFamily",value:e=>e.getAttribute("face")}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class Y$ extends HF{static get pluginName(){return"FontFamilyUI"}init(){const e=this.editor,t=e.t,n=this._getLocalizedOptions(),r=e.commands.get("fontFamily");e.ui.componentFactory.add("fontFamily",i=>{const a=u$(i);return h$(a,function(e,t){const n=new VH;for(const r of e){const e={type:"button",model:new C$({commandName:"fontFamily",commandParam:r.model,label:r.title,withText:!0})};e.model.bind("isOn").to(t,"value",e=>e===r.model||!(!e||!r.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===r.model.toLowerCase()),r.view&&r.view.styles&&e.model.set("labelStyle",`font-family: ${r.view.styles["font-family"]}`),n.add(e)}return n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(n,r)),a.buttonView.set({label:t("Font Family"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>',tooltip:!0}),a.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),a.bind("isEnabled").to(r),this.listenTo(a,"execute",t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()}),a})}_getLocalizedOptions(){const e=this.editor,t=e.t;return V$(e.config.get("fontFamily").options).map(e=>("Default"===e.title&&(e.title=t("Default")),e))}}class K$ extends HF{static get requires(){return[q$,Y$]}static get pluginName(){return"FontFamily"}}r(1568);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const X$=new WeakMap;function Q$(e){const{view:t,element:n,text:r,isDirectHost:i=!0,keepOnFocus:a=!1}=e,o=t.document;X$.has(o)||(X$.set(o,new Map),o.registerPostFixer(e=>J$(o,e))),X$.get(o).set(n,{text:r,isDirectHost:i,keepOnFocus:a,hostElement:i?n:null}),t.change(e=>J$(o,e))}function $$(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function J$(e,t){const n=X$.get(e),r=[];let i=!1;for(const[e,a]of n)a.isDirectHost&&(r.push(e),Z$(t,e,a)&&(i=!0));for(const[e,a]of n){if(a.isDirectHost)continue;const n=eJ(e);n&&(r.includes(n)||(a.hostElement=n,Z$(t,e,a)&&(i=!0)))}return i}function Z$(e,t,n){const{text:r,isDirectHost:i,hostElement:a}=n;let o=!1;return a.getAttribute("data-placeholder")!==r&&(e.setAttribute("data-placeholder",r,a),o=!0),(i||1==t.childCount)&&function(e,t){if(!e.isAttached())return!1;if(Array.from(e.getChildren()).some(e=>!e.is("uiElement")))return!1;if(t)return!0;const n=e.document;if(!n.isFocused)return!0;const r=n.selection.anchor;return r&&r.parent!==e}(a,n.keepOnFocus)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,a)&&(o=!0):$$(e,a)&&(o=!0),o}function eJ(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class tJ extends GW{constructor(e){super(e),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class nJ{constructor(e){this.document=e}createDocumentFragment(e){return new MV(this.document,e)}createElement(e,t,n){return new Vz(this.document,e,t,n)}createText(e){return new tz(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,n){return n._insertChild(e,t)}removeChildren(e,t,n){return n._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const n=e.parent;if(n){const r=n.getChildIndex(e);return this.removeChildren(r,1,n),this.insertChild(r,t,n),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const n=t.getChildIndex(e);this.remove(e),this.insertChild(n,e.getChildren(),t)}}rename(e,t){const n=new Vz(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,n)?n:null}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){ZF(e)&&void 0===n&&(n=t),n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return $z._createAt(e,t)}createPositionAfter(e){return $z._createAfter(e)}createPositionBefore(e){return $z._createBefore(e)}createRange(e,t){return new Jz(e,t)}createRangeOn(e){return Jz._createOn(e)}createRangeIn(e){return Jz._createIn(e)}createSelection(e,t,n){return new tV(e,t,n)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const rJ=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,iJ=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,aJ=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,oJ=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,sJ=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,lJ=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function cJ(e){return e.startsWith("#")?rJ.test(e):e.startsWith("rgb")?iJ.test(e)||aJ.test(e):e.startsWith("hsl")?oJ.test(e)||sJ.test(e):lJ.has(e.toLowerCase())}const uJ=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function dJ(e){return uJ.includes(e)}const hJ=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function fJ(e){return hJ.test(e)}const pJ=/^[+-]?[0-9]*([.][0-9]+)?%$/;function mJ(e){return pJ.test(e)}const gJ=["repeat-x","repeat-y","repeat","space","round","no-repeat"];const vJ=["center","top","bottom","left","right"];function bJ(e){return vJ.includes(e)}const yJ=["fixed","scroll","local"];function AJ(e){return yJ.includes(e)}const _J=/^url\(/;function wJ(e){return _J.test(e)}function EJ(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=kJ(e),n=t[0],r=t[2]||n,i=t[1]||n;return{top:n,bottom:r,right:i,left:t[3]||i}}function SJ(e){return t=>{const{top:n,right:r,bottom:i,left:a}=t,o=[];return[n,r,a,i].every(e=>!!e)?o.push([e,CJ(t)]):(n&&o.push([e+"-top",n]),r&&o.push([e+"-right",r]),i&&o.push([e+"-bottom",i]),a&&o.push([e+"-left",a])),o}}function CJ({top:e,right:t,bottom:n,left:r}){const i=[];return r!==t?i.push(e,t,n,r):n!==e?i.push(e,t,n):t!==e?i.push(e,t):i.push(e),i.join(" ")}function TJ(e){return t=>({path:e,value:EJ(t)})}function kJ(e){return e.replace(/, /g,",").split(" ").map(e=>e.replace(/,/g,", "))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function xJ(e){e.setNormalizer("background",OJ),e.setNormalizer("background-color",e=>({path:"background.color",value:e})),e.setReducer("background",e=>{const t=[];return t.push(["background-color",e.color]),t}),e.setStyleRelation("background",["background-color"])}function OJ(e){const t={},n=kJ(e);for(const e of n)r=e,gJ.includes(r)?(t.repeat=t.repeat||[],t.repeat.push(e)):bJ(e)?(t.position=t.position||[],t.position.push(e)):AJ(e)?t.attachment=e:cJ(e)?t.color=e:wJ(e)&&(t.image=e);var r;return{path:"background",value:t}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function IJ(e){e.setNormalizer("border",MJ),e.setNormalizer("border-top",PJ("top")),e.setNormalizer("border-right",PJ("right")),e.setNormalizer("border-bottom",PJ("bottom")),e.setNormalizer("border-left",PJ("left")),e.setNormalizer("border-color",DJ("color")),e.setNormalizer("border-width",DJ("width")),e.setNormalizer("border-style",DJ("style")),e.setNormalizer("border-top-color",LJ("color","top")),e.setNormalizer("border-top-style",LJ("style","top")),e.setNormalizer("border-top-width",LJ("width","top")),e.setNormalizer("border-right-color",LJ("color","right")),e.setNormalizer("border-right-style",LJ("style","right")),e.setNormalizer("border-right-width",LJ("width","right")),e.setNormalizer("border-bottom-color",LJ("color","bottom")),e.setNormalizer("border-bottom-style",LJ("style","bottom")),e.setNormalizer("border-bottom-width",LJ("width","bottom")),e.setNormalizer("border-left-color",LJ("color","left")),e.setNormalizer("border-left-style",LJ("style","left")),e.setNormalizer("border-left-width",LJ("width","left")),e.setExtractor("border-top",RJ("top")),e.setExtractor("border-right",RJ("right")),e.setExtractor("border-bottom",RJ("bottom")),e.setExtractor("border-left",RJ("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",SJ("border-color")),e.setReducer("border-style",SJ("border-style")),e.setReducer("border-width",SJ("border-width")),e.setReducer("border-top",FJ("top")),e.setReducer("border-right",FJ("right")),e.setReducer("border-bottom",FJ("bottom")),e.setReducer("border-left",FJ("left")),e.setReducer("border",function(){return t=>{const n=BJ(t,"top"),r=BJ(t,"right"),i=BJ(t,"bottom"),a=BJ(t,"left"),o=[n,r,i,a],s={width:e(o,"width"),style:e(o,"style"),color:e(o,"color")},l=UJ(s,"all");return l.length?l:[...Object.entries(s).reduce((e,[t,n])=>(n&&(e.push([`border-${t}`,n]),o.forEach(e=>e[t]=null)),e),[]),...UJ(n,"top"),...UJ(r,"right"),...UJ(i,"bottom"),...UJ(a,"left")]};function e(e,t){return e.map(e=>e[t]).reduce((e,t)=>e==t?e:null)}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function MJ(e){const{color:t,style:n,width:r}=jJ(e);return{path:"border",value:{color:EJ(t),style:EJ(n),width:EJ(r)}}}function PJ(e){return t=>{const{color:n,style:r,width:i}=jJ(t),a={};return void 0!==n&&(a.color={[e]:n}),void 0!==r&&(a.style={[e]:r}),void 0!==i&&(a.width={[e]:i}),{path:"border",value:a}}}function DJ(e){return t=>({path:"border",value:NJ(t,e)})}function NJ(e,t){return{[t]:EJ(e)}}function LJ(e,t){return n=>({path:"border",value:{[e]:{[t]:n}}})}function RJ(e){return(t,n)=>{if(n.border)return BJ(n.border,e)}}function BJ(e,t){const n={};return e.width&&e.width[t]&&(n.width=e.width[t]),e.style&&e.style[t]&&(n.style=e.style[t]),e.color&&e.color[t]&&(n.color=e.color[t]),n}function jJ(e){const t={},n=kJ(e);for(const e of n)fJ(e)||/thin|medium|thick/.test(e)?t.width=e:dJ(e)?t.style=e:t.color=e;return t}function FJ(e){return t=>UJ(t,e)}function UJ(e,t){const n=[];if(e&&e.width&&n.push("width"),e&&e.style&&n.push("style"),e&&e.color&&n.push("color"),3==n.length){const r=n.map(t=>e[t]).join(" ");return["all"==t?["border",r]:[`border-${t}`,r]]}return"all"==t?[]:n.map(n=>[`border-${t}-${n}`,e[n]])}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function HJ(e){e.setNormalizer("margin",TJ("margin")),e.setNormalizer("margin-top",e=>({path:"margin.top",value:e})),e.setNormalizer("margin-right",e=>({path:"margin.right",value:e})),e.setNormalizer("margin-bottom",e=>({path:"margin.bottom",value:e})),e.setNormalizer("margin-left",e=>({path:"margin.left",value:e})),e.setReducer("margin",SJ("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function zJ(e){e.setNormalizer("padding",TJ("padding")),e.setNormalizer("padding-top",e=>({path:"padding.top",value:e})),e.setNormalizer("padding-right",e=>({path:"padding.right",value:e})),e.setNormalizer("padding-bottom",e=>({path:"padding.bottom",value:e})),e.setNormalizer("padding-left",e=>({path:"padding.left",value:e})),e.setReducer("padding",SJ("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class VJ extends DQ{constructor(e){super(e,"fontSize")}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function WJ(e){return e.map(e=>function(e){if(t=e,"object"==typeof t&&t.title&&t.model&&t.view)return qJ(e);var t;const n=function(e){return GJ[e]||GJ[e.model]}(e);if(n)return qJ(n);if("default"===e)return{model:void 0,title:"Default"};if(function(e){let t;if("object"==typeof e){if(!e.model)throw new hj.a("font-size-invalid-definition",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e))return;return function(e){"number"!=typeof e&&"string"!=typeof e||(e={title:String(e),model:`${parseFloat(e)}px`});return e.view={name:"span",styles:{"font-size":e.model}},qJ(e)}(e)}(e)).filter(e=>!!e)}const GJ={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function qJ(e){return e.view.priority||(e.view.priority=7),e}const YJ=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class KJ extends HF{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define("fontSize",{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"fontSize"}),e.model.schema.setAttributeProperties("fontSize",{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),n=F$("fontSize",WJ(this.editor.config.get("fontSize.options")).filter(e=>e.model));t?(this._prepareAnyValueConverters(n),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(n),e.commands.add("fontSize",new VJ(e))}_prepareAnyValueConverters(e){const t=this.editor,n=e.model.values.filter(e=>!fJ(String(e))&&!mJ(String(e)));if(n.length)throw new hj.a("font-size-invalid-use-of-named-presets",null,{presets:n});t.conversion.for("downcast").attributeToElement({model:"fontSize",view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:"fontSize",value:e=>e.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:"fontSize",value:e=>{const t=e.getAttribute("size"),n="-"===t[0]||"+"===t[0];let r=parseInt(t,10);n&&(r=3+r);const i=YJ.length-1,a=Math.min(Math.max(r,0),i);return YJ[a]}}})}}r(1570);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class XJ extends HF{static get pluginName(){return"FontSizeUI"}init(){const e=this.editor,t=e.t,n=this._getLocalizedOptions(),r=e.commands.get("fontSize");e.ui.componentFactory.add("fontSize",i=>{const a=u$(i);return h$(a,function(e,t){const n=new VH;for(const r of e){const e={type:"button",model:new C$({commandName:"fontSize",commandParam:r.model,label:r.title,class:"ck-fontsize-option",withText:!0})};r.view&&r.view.styles&&e.model.set("labelStyle",`font-size:${r.view.styles["font-size"]}`),r.view&&r.view.classes&&e.model.set("class",`${e.model.class} ${r.view.classes}`),e.model.bind("isOn").to(t,"value",e=>e===r.model),n.add(e)}return n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(n,r)),a.buttonView.set({label:t("Font Size"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>',tooltip:!0}),a.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),a.bind("isEnabled").to(r),this.listenTo(a,"execute",t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()}),a})}_getLocalizedOptions(){const e=this.editor,t=e.t,n={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return WJ(e.config.get("fontSize").options).map(e=>{const t=n[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e})}}class QJ extends HF{static get requires(){return[KJ,XJ]}static get pluginName(){return"FontSize"}normalizeSizeOptions(e){return WJ(e)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class $J extends DQ{constructor(e){super(e,"fontColor")}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class JJ extends HF{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define("fontColor",{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:"fontColor",value:U$("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:"fontColor",value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:"fontColor",view:H$("color")}),e.commands.add("fontColor",new $J(e)),e.model.schema.extend("$text",{allowAttributes:"fontColor"}),e.model.schema.setAttributeProperties("fontColor",{isFormatting:!0,copyOnEnter:!0})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class ZJ extends HF{constructor(e,{commandName:t,icon:n,componentName:r,dropdownLabel:i}){super(e),this.commandName=t,this.componentName=r,this.icon=n,this.dropdownLabel=i,this.columns=e.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const e=this.editor,t=e.locale,n=t.t,r=e.commands.get(this.commandName),i=FQ(t,UQ(e.config.get(this.componentName).colors)),a=e.config.get(`${this.componentName}.documentColors`);e.ui.componentFactory.add(this.componentName,t=>{const o=u$(t);return this.colorTableView=function({dropdownView:e,colors:t,columns:n,removeButtonLabel:r,documentColorsLabel:i,documentColorsCount:a}){const o=e.locale,s=new j$(o,{colors:t,columns:n,removeButtonLabel:r,documentColorsLabel:i,documentColorsCount:a});return e.colorTableView=s,e.panelView.children.add(s),s.delegate("execute").to(e,"execute"),s}({dropdownView:o,colors:i.map(e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}})),columns:this.columns,removeButtonLabel:n("Remove color"),documentColorsLabel:0!==a?n("Document colors"):void 0,documentColorsCount:void 0===a?this.columns:a}),this.colorTableView.bind("selectedColor").to(r,"value"),o.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),o.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),o.bind("isEnabled").to(r),o.on("execute",(t,n)=>{e.execute(this.commandName,n),e.editing.view.focus()}),o.on("change:isOpen",(t,n,r)=>{o.colorTableView.appendGrids(),r&&(0!==a&&this.colorTableView.updateDocumentColors(e.model,this.componentName),this.colorTableView.updateSelectedColors())}),o})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class eZ extends ZJ{constructor(e){super(e,{commandName:"fontColor",componentName:"fontColor",icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z"/></svg>',dropdownLabel:(0,e.locale.t)("Font Color")})}static get pluginName(){return"FontColorUI"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class tZ extends HF{static get requires(){return[JJ,eZ]}static get pluginName(){return"FontColor"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class nZ extends DQ{constructor(e){super(e,"fontBackgroundColor")}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class rZ extends HF{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define("fontBackgroundColor",{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(xJ),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:"fontBackgroundColor",value:U$("background-color")}}),e.conversion.for("downcast").attributeToElement({model:"fontBackgroundColor",view:H$("background-color")}),e.commands.add("fontBackgroundColor",new nZ(e)),e.model.schema.extend("$text",{allowAttributes:"fontBackgroundColor"}),e.model.schema.setAttributeProperties("fontBackgroundColor",{isFormatting:!0,copyOnEnter:!0})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class iZ extends ZJ{constructor(e){super(e,{commandName:"fontBackgroundColor",componentName:"fontBackgroundColor",icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>',dropdownLabel:(0,e.locale.t)("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class aZ extends HF{static get requires(){return[rZ,iZ]}static get pluginName(){return"FontBackgroundColor"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class oZ extends HF{static get requires(){return[K$,QJ,tZ,aZ]}static get pluginName(){return"Font"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const sZ=["left","right","center","justify"];function lZ(e){return sZ.includes(e)}function cZ(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}function uZ(e){const t=e.map(e=>{let t;return t="string"==typeof e?{name:e}:e,t}).filter(e=>{const t=!!sZ.includes(e.name);return t||Object(hj.b)("alignment-config-name-not-recognized",{option:e}),t}),n=t.filter(e=>!!e.className).length;if(n&&n<t.length)throw new hj.a("alignment-config-classnames-are-missing",{configuredOptions:e});return t.forEach((t,n,r)=>{const i=r.slice(n+1);if(i.some(e=>e.name==t.name))throw new hj.a("alignment-config-name-already-defined",{option:t,configuredOptions:e});if(t.className){if(i.some(e=>e.className==t.className))throw new hj.a("alignment-config-classname-already-defined",{option:t,configuredOptions:e})}}),t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class dZ extends VF{refresh(){const e=this.editor.locale,t=_G(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!t&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,n=t.locale,r=t.model,i=r.document,a=e.value;r.change(e=>{const t=Array.from(i.selection.getSelectedBlocks()).filter(e=>this._canBeAligned(e)),r=t[0].getAttribute("alignment");cZ(a,n)||r===a||!a?function(e,t){for(const n of e)t.removeAttribute("alignment",n)}(t,e):function(e,t,n){for(const r of e)t.setAttribute("alignment",n,r)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t,e,a)})}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,"alignment")}}class hZ extends HF{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:[...sZ.map(e=>({name:e}))]})}init(){const e=this.editor,t=e.locale,n=e.model.schema,r=uZ(e.config.get("alignment.options")).filter(e=>lZ(e.name)&&!cZ(e.name,t)),i=r.some(e=>!!e.className);n.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),i?e.conversion.attributeToAttribute(function(e){const t={model:{key:"alignment",values:e.map(e=>e.name)},view:{}};for(const n of e)t.view[n.name]={key:"class",value:n.className};return t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(r)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={model:{key:"alignment",values:e.map(e=>e.name)},view:{}};for(const{name:n}of e)t.view[n]={key:"style",value:{"text-align":n}};return t}(r));const a=function(e){const t=[];for(const{name:n}of e)t.push({view:{key:"style",value:{"text-align":n}},model:{key:"alignment",value:n}});return t}(r);for(const t of a)e.conversion.for("upcast").attributeToAttribute(t);const o=function(e){const t=[];for(const{name:n}of e)t.push({view:{key:"align",value:n},model:{key:"alignment",value:n}});return t}(r);for(const t of o)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new dZ(e))}}const fZ=new Map([["left",vK.alignLeft],["right",vK.alignRight],["center",vK.alignCenter],["justify",vK.alignJustify]]);class pZ extends HF{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const e=this.editor,t=e.ui.componentFactory,n=e.t,r=uZ(e.config.get("alignment.options"));r.map(e=>e.name).filter(lZ).forEach(e=>this._addButton(e)),t.add("alignment",e=>{const i=u$(e),a=r.map(e=>t.create(`alignment:${e.name}`));d$(i,a),i.buttonView.set({label:n("Text alignment"),tooltip:!0}),i.toolbarView.isVertical=!0,i.toolbarView.ariaLabel=n("Text alignment toolbar"),i.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const o="rtl"===e.contentLanguageDirection?fZ.get("right"):fZ.get("left");return i.buttonView.bind("icon").toMany(a,"isOn",(...e)=>{const t=e.findIndex(e=>e);return t<0?o:a[t].icon}),i.bind("isEnabled").toMany(a,"isEnabled",(...e)=>e.some(e=>e)),i})}_addButton(e){const t=this.editor;t.ui.componentFactory.add(`alignment:${e}`,n=>{const r=t.commands.get("alignment"),i=new GX(n);return i.set({label:this.localizedOptionTitles[e],icon:fZ.get(e),tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(r),i.bind("isOn").to(r,"value",t=>t===e),this.listenTo(i,"execute",()=>{t.execute("alignment",{value:e}),t.editing.view.focus()}),i})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class mZ extends HF{static get requires(){return[hZ,pZ]}static get pluginName(){return"Alignment"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class gZ extends HF{static get pluginName(){return"IndentEditing"}init(){const e=this.editor;e.commands.add("indent",new GF(e)),e.commands.add("outdent",new GF(e))}}var vZ='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',bZ='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>';
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class yZ extends HF{static get pluginName(){return"IndentUI"}init(){const e=this.editor,t=e.locale,n=e.t,r="ltr"==t.uiLanguageDirection?vZ:bZ,i="ltr"==t.uiLanguageDirection?bZ:vZ;this._defineButton("indent",n("Increase indent"),r),this._defineButton("outdent",n("Decrease indent"),i)}_defineButton(e,t,n){const r=this.editor;r.ui.componentFactory.add(e,i=>{const a=r.commands.get(e),o=new GX(i);return o.set({label:t,icon:n,tooltip:!0}),o.bind("isOn","isEnabled").to(a,"value","isEnabled"),this.listenTo(o,"execute",()=>{r.execute(e),r.editing.view.focus()}),o})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class AZ extends HF{static get pluginName(){return"Indent"}static get requires(){return[gZ,yZ]}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class _Z extends VF{constructor(e,t){super(e),this._indentBehavior=t}refresh(){const e=this.editor.model,t=_G(e.document.selection.getSelectedBlocks());t&&e.schema.checkAttribute(t,"blockIndent")?this.isEnabled=this._indentBehavior.checkEnabled(t.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const e=this.editor.model,t=function(e){const t=e.document.selection,n=e.schema;return Array.from(t.getSelectedBlocks()).filter(e=>n.checkAttribute(e,"blockIndent"))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e);e.change(e=>{for(const n of t){const t=n.getAttribute("blockIndent"),r=this._indentBehavior.getNextIndent(t);r?e.setAttribute("blockIndent",r,n):e.removeAttribute("blockIndent",n)}})}}class wZ{constructor(e){this.isForward="forward"===e.direction,this.offset=e.offset,this.unit=e.unit}checkEnabled(e){const t=parseFloat(e||0);return this.isForward||t>0}getNextIndent(e){const t=parseFloat(e||0);if(!(!e||e.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const n=t+(this.isForward?this.offset:-this.offset);return n>0?n+this.unit:void 0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class EZ{constructor(e){this.isForward="forward"===e.direction,this.classes=e.classes}checkEnabled(e){const t=this.classes.indexOf(e);return this.isForward?t<this.classes.length-1:t>=0}getNextIndent(e){const t=this.classes.indexOf(e),n=this.isForward?1:-1;return this.classes[t+n]}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const SZ=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class CZ extends HF{constructor(e){super(e),e.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){const e=this.editor,t=e.config.get("indentBlock"),n=!t.classes||!t.classes.length,r=Object.assign({direction:"forward"},t),i=Object.assign({direction:"backward"},t);n?(e.data.addStyleProcessorRules(HJ),this._setupConversionUsingOffset(e.conversion),e.commands.add("indentBlock",new _Z(e,new wZ(r))),e.commands.add("outdentBlock",new _Z(e,new wZ(i)))):(this._setupConversionUsingClasses(t.classes),e.commands.add("indentBlock",new _Z(e,new EZ(r))),e.commands.add("outdentBlock",new _Z(e,new EZ(i))))}afterInit(){const e=this.editor,t=e.model.schema,n=e.commands.get("indent"),r=e.commands.get("outdent"),i=e.config.get("heading.options");(i&&i.map(e=>e.model)||SZ).forEach(e=>{t.isRegistered(e)&&t.extend(e,{allowAttributes:"blockIndent"})}),t.setAttributeProperties("blockIndent",{isFormatting:!0}),n.registerChildCommand(e.commands.get("indentBlock")),r.registerChildCommand(e.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const e=this.editor.conversion,t="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";e.for("upcast").attributeToAttribute({view:{styles:{[t]:/[\s\S]+/}},model:{key:"blockIndent",value:e=>e.getStyle(t)}}),e.for("downcast").attributeToAttribute({model:"blockIndent",view:e=>({key:"style",value:{[t]:e}})})}_setupConversionUsingClasses(e){const t={model:{key:"blockIndent",values:[]},view:{}};for(const n of e)t.model.values.push(n),t.view[n]={key:"class",value:[n]};this.editor.conversion.attributeToAttribute(t)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class TZ extends VF{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document.selection,r=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(n.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const i=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of i)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class kZ extends HF{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"bold"}),e.model.schema.setAttributeProperties("bold",{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:"bold",view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t?"bold"==t||Number(t)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),e.commands.add("bold",new TZ(e,"bold")),e.keystrokes.set("CTRL+B","bold")}}class xZ extends HF{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("bold",n=>{const r=e.commands.get("bold"),i=new GX(n);return i.set({label:t("Bold"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(i,"execute",()=>{e.execute("bold"),e.editing.view.focus()}),i})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class OZ extends HF{static get requires(){return[kZ,xZ]}static get pluginName(){return"Bold"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class IZ extends HF{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"italic"}),e.model.schema.setAttributeProperties("italic",{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:"italic",view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add("italic",new TZ(e,"italic")),e.keystrokes.set("CTRL+I","italic")}}class MZ extends HF{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("italic",n=>{const r=e.commands.get("italic"),i=new GX(n);return i.set({label:t("Italic"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(i,"execute",()=>{e.execute("italic"),e.editing.view.focus()}),i})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class PZ extends HF{static get requires(){return[IZ,MZ]}static get pluginName(){return"Italic"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class DZ extends HF{static get pluginName(){return"UnderlineEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"underline"}),e.model.schema.setAttributeProperties("underline",{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:"underline",view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add("underline",new TZ(e,"underline")),e.keystrokes.set("CTRL+U","underline")}}class NZ extends HF{static get pluginName(){return"UnderlineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("underline",n=>{const r=e.commands.get("underline"),i=new GX(n);return i.set({label:t("Underline"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z"/></svg>',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(i,"execute",()=>{e.execute("underline"),e.editing.view.focus()}),i})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class LZ extends HF{static get requires(){return[DZ,NZ]}static get pluginName(){return"Underline"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class RZ extends HF{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"strikethrough"}),e.model.schema.setAttributeProperties("strikethrough",{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:"strikethrough",view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add("strikethrough",new TZ(e,"strikethrough")),e.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}class BZ extends HF{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("strikethrough",n=>{const r=e.commands.get("strikethrough"),i=new GX(n);return i.set({label:t("Strikethrough"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(i,"execute",()=>{e.execute("strikethrough"),e.editing.view.focus()}),i})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class jZ extends HF{static get requires(){return[RZ,BZ]}static get pluginName(){return"Strikethrough"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class FZ extends VF{refresh(){const e=this.editor.model,t=_G(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&UZ(t,e.schema)}execute(e={}){const t=this.editor.model,n=t.document;t.change(r=>{const i=(e.selection||n.selection).getSelectedBlocks();for(const e of i)!e.is("element","paragraph")&&UZ(e,t.schema)&&r.rename(e,"paragraph")})}}function UZ(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class HZ extends VF{execute(e){const t=this.editor.model,n=e.attributes;let r=e.position;t.change(e=>{const i=e.createElement("paragraph");if(n&&t.schema.setAllowedAttributes(i,n,e),!t.schema.checkChild(r.parent,i)){const n=t.schema.findAllowedParent(r,i);if(!n)return;r=e.split(r,n).position}t.insertContent(i,r),e.setSelection(i,"in")})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class zZ extends HF{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new FZ(e)),e.commands.add("insertParagraph",new HZ(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>zZ.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}zZ.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class VZ extends VF{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.schema,r=t.document.selection,i=Array.from(r.getSelectedBlocks()),a=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(a){const t=i.filter(e=>WZ(e)||qZ(n,e));this._applyQuote(e,t)}else this._removeQuote(e,i.filter(WZ))})}_getValue(){const e=_G(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!WZ(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=_G(e.getSelectedBlocks());return!!n&&qZ(t,n)}_removeQuote(e,t){GZ(e,t).reverse().forEach(t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=e.createPositionBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=e.createPositionAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){const n=[];GZ(e,t).reverse().forEach(t=>{let r=WZ(t.start);r||(r=e.createElement("blockQuote"),e.wrap(t,r)),n.push(r)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(e.createPositionAfter(t)),t):n)}}function WZ(e){return"blockQuote"==e.parent.name?e.parent:null}function GZ(e,t){let n,r=0;const i=[];for(;r<t.length;){const a=t[r],o=t[r+1];n||(n=e.createPositionBefore(a)),o&&a.nextSibling==o||(i.push(e.createRange(n,e.createPositionAfter(a))),n=null),r++}return i}function qZ(e,t){const n=e.checkChild(t.parent,"blockQuote"),r=e.checkChild(["$root","blockQuote"],t);return n&&r}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class YZ extends HF{static get pluginName(){return"BlockQuoteEditing"}static get requires(){return[KK,tX]}init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new VZ(e)),t.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer(n=>{const r=e.model.document.differ.getChanges();for(const e of r)if("insert"==e.type){const r=e.position.nodeAfter;if(!r)continue;if(r.is("element","blockQuote")&&r.isEmpty)return n.remove(r),!0;if(r.is("element","blockQuote")&&!t.checkChild(e.position,r))return n.unwrap(r),!0;if(r.is("element")){const e=n.createRangeIn(r);for(const r of e.getItems())if(r.is("element","blockQuote")&&!t.checkChild(n.createPositionBefore(r),r))return n.unwrap(r),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return n.remove(t),!0}return!1});const n=this.editor.editing.view.document,r=e.model.document.selection,i=e.commands.get("blockQuote");this.listenTo(n,"enter",(t,n)=>{if(!r.isCollapsed||!i.value)return;r.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())},{context:"blockquote"}),this.listenTo(n,"delete",(t,n)=>{if("backward"!=n.direction||!r.isCollapsed||!i.value)return;const a=r.getLastPosition().parent;a.isEmpty&&!a.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())},{context:"blockquote"})}}r(1572);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class KZ extends HF{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",n=>{const r=e.commands.get("blockQuote"),i=new GX(n);return i.set({label:t("Block quote"),icon:vK.quote,tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(i,"execute",()=>{e.execute("blockQuote"),e.editing.view.focus()}),i})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class XZ extends HF{static get requires(){return[YZ,KZ]}static get pluginName(){return"BlockQuote"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class QZ extends VF{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=_G(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>$Z(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,r=e.value;t.change(e=>{const i=Array.from(n.selection.getSelectedBlocks()).filter(e=>$Z(e,r,t.schema));for(const t of i)t.is("element",r)||e.rename(t,r)})}}function $Z(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class JZ extends HF{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[zZ]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const r of t)"paragraph"!==r.model&&(e.model.schema.register(r.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(r),n.push(r.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new QZ(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,r)=>{const i=e.model.document.selection.getFirstPosition().parent;n.some(e=>i.is("element",e.model))&&!i.is("element","paragraph")&&0===i.childCount&&r.writer.rename(i,"paragraph")})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:uj.get("low")+1})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */r(933);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class ZZ extends HF{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,n=function(e){const t=e.t,n={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map(e=>{const t=n[e.title];return t&&t!=e.title&&(e.title=t),e})}(e),r=t("Choose heading"),i=t("Heading");e.ui.componentFactory.add("heading",t=>{const a={},o=new VH,s=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[s];for(const e of n){const t={type:"button",model:new C$({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),c.push(l)):(t.model.bind("isOn").to(s,"value",t=>t===e.model),t.model.set({commandName:"heading",commandValue:e.model})),o.add(t),a[e.model]=e.title}const u=u$(t);return h$(u,o),u.buttonView.set({isOn:!1,withText:!0,tooltip:i}),u.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),u.bind("isEnabled").toMany(c,"isEnabled",(...e)=>e.some(e=>e)),u.buttonView.bind("label").to(s,"value",l,"value",(e,t)=>{const n=e||t&&"paragraph";return a[n]?a[n]:r}),this.listenTo(u,"execute",t=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),u})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class e0 extends HF{static get requires(){return[JZ,ZZ]}static get pluginName(){return"Heading"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class t0{constructor(e,t={}){this.namespaces=t.namespaces||[],this.domParser=new DOMParser,this.domConverter=new gW(e,{renderingMode:"data"}),this.htmlWriter=new Yq}toData(e){const t=this.domConverter.viewToDom(e,document);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{keepOriginalCase:!0})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e=`<xml ${this.namespaces.map(e=>`xmlns:${e}="nsp"`).join(" ")}>${e}</xml>`;const t=this.domParser.parseFromString(e,"text/xml"),n=t.querySelector("parsererror");if(n)throw new Error("Parse error - "+n.textContent);const r=t.createDocumentFragment(),i=t.documentElement.childNodes;for(;i.length>0;)r.appendChild(i[0]);return r}}class n0{static get safeXmlCharactersEntities(){return{tagOpener:"&laquo;",tagCloser:"&raquo;",doubleQuote:"&uml;",realDoubleQuote:"&quot;"}}static get safeBadBlackboardCharacters(){return{ltElement:"«mo»<«/mo»",gtElement:"«mo»>«/mo»",ampElement:"«mo»&«/mo»"}}static get safeGoodBlackboardCharacters(){return{ltElement:"«mo»§lt;«/mo»",gtElement:"«mo»§gt;«/mo»",ampElement:"«mo»§amp;«/mo»"}}static get xmlCharacters(){return{id:"xmlCharacters",tagOpener:"<",tagCloser:">",doubleQuote:'"',ampersand:"&",quote:"'"}}static get safeXmlCharacters(){return{id:"safeXmlCharacters",tagOpener:"«",tagCloser:"»",doubleQuote:"¨",ampersand:"§",quote:"`",realDoubleQuote:"¨"}}}class r0{static isMathmlInAttribute(e,t){const n=new RegExp("^['\"][\\s]*=[\\s]*[\\w-]+('[\\s]*(\"[^\"]*\"|'[^']*')[\\s]*=[\\s]*[\\w-]+[\\s]*')*[\\s]+gmi<"),r=e.substring(0,t).split("").reverse().join("");return n.test(r)}static safeXmlDecode(e){let{tagOpener:t}=n0.safeXmlCharactersEntities,{tagCloser:n}=n0.safeXmlCharactersEntities,{doubleQuote:r}=n0.safeXmlCharactersEntities,{realDoubleQuote:i}=n0.safeXmlCharactersEntities;e=(e=(e=(e=e.split(t).join(n0.safeXmlCharacters.tagOpener)).split(n).join(n0.safeXmlCharacters.tagCloser)).split(r).join(n0.safeXmlCharacters.doubleQuote)).split(i).join(n0.safeXmlCharacters.realDoubleQuote);const{ltElement:a}=n0.safeBadBlackboardCharacters,{gtElement:o}=n0.safeBadBlackboardCharacters,{ampElement:s}=n0.safeBadBlackboardCharacters;"_wrs_blackboard"in window&&window._wrs_blackboard&&(e=(e=(e=e.split(a).join(n0.safeGoodBlackboardCharacters.ltElement)).split(o).join(n0.safeGoodBlackboardCharacters.gtElement)).split(s).join(n0.safeGoodBlackboardCharacters.ampElement)),({tagOpener:t}=n0.safeXmlCharacters),({tagCloser:n}=n0.safeXmlCharacters),({doubleQuote:r}=n0.safeXmlCharacters),({realDoubleQuote:i}=n0.safeXmlCharacters);const{ampersand:l}=n0.safeXmlCharacters,{quote:c}=n0.safeXmlCharacters;e=(e=(e=(e=(e=e.split(t).join(n0.xmlCharacters.tagOpener)).split(n).join(n0.xmlCharacters.tagCloser)).split(r).join(n0.xmlCharacters.doubleQuote)).split(l).join(n0.xmlCharacters.ampersand)).split(c).join(n0.xmlCharacters.quote);let u="",d=null;for(let t=0;t<e.length;t+=1){const n=e.charAt(t);null==d?"$"===n?d="":u+=n:";"===n?(u+=`&${d}`,d=null):n.match(/([a-zA-Z0-9#._-] | '-')/)?d+=n:(u+=`$${d}`,d=null,t-=1)}return u}static safeXmlEncode(e){const{tagOpener:t}=n0.xmlCharacters,{tagCloser:n}=n0.xmlCharacters,{doubleQuote:r}=n0.xmlCharacters,{ampersand:i}=n0.xmlCharacters,{quote:a}=n0.xmlCharacters;return e=(e=(e=(e=(e=e.split(t).join(n0.safeXmlCharacters.tagOpener)).split(n).join(n0.safeXmlCharacters.tagCloser)).split(r).join(n0.safeXmlCharacters.doubleQuote)).split(i).join(n0.safeXmlCharacters.ampersand)).split(a).join(n0.safeXmlCharacters.quote)}static mathMLEntities(e){let t="";for(let n=0;n<e.length;n+=1){const r=e.charAt(n);if(e.codePointAt(n)>128)t+=`&#${e.codePointAt(n)};`,e.codePointAt(n)>65535&&(n+=1);else if("&"===r){const i=e.indexOf(";",n+1);if(i>=0){const r=document.createElement("span");r.innerHTML=e.substring(n,i+1),t+=`&#${d0.fixedCharCodeAt(r.textContent||r.innerText,0)};`,n=i}else t+=r}else t+=r}return t}static addCustomEditorClassAttribute(e,t){let n="";const r=e.indexOf("<math");if(0===r){const i=e.indexOf(">");if(-1===e.indexOf("class"))return n=`${e.substr(r,i)} class="wrs_${t}">`,n+=e.substr(i+1,e.length),n}return e}static removeCustomEditorClassAttribute(e,t){return-1===e.indexOf("class")||-1===e.indexOf(`wrs_${t}`)?e:-1!==e.indexOf(`class="wrs_${t}"`)?e.replace(`class="wrs_${t}"`,""):e.replace(`wrs_${t}`,"")}static addAnnotation(e,t,n){let r="";if(-1!==e.indexOf("<annotation")){const i=e.indexOf("</semantics>");r=`${e.substring(0,i)}<annotation encoding="${n}">${t}</annotation>${e.substring(i)}`}else if(r0.isEmpty(e)){const i=e.indexOf("/>"),a=e.indexOf(">"),o=a===i?i:a;r=`${e.substring(0,o)}><semantics><annotation encoding="${n}">${t}</annotation></semantics></math>`}else{const i=e.indexOf(">")+1,a=e.lastIndexOf("</math>"),o=e.substring(i,a);r=`${e.substring(0,i)}<semantics><mrow>${o}</mrow><annotation encoding="${n}">${t}</annotation></semantics></math>`}return r}static removeAnnotation(e,t){let n=e;const r=`<annotation encoding="${t}">`,i=e.indexOf(r);if(-1!==i){let t=!1,r=e.indexOf("<annotation");for(;-1!==r;)r!==i&&(t=!0),r=e.indexOf("<annotation",r+1);if(t){const t=e.indexOf("</annotation>",i)+"</annotation>".length;n=e.substring(0,i)+e.substring(t)}else n=r0.removeSemantics(e)}return n}static removeSemantics(e){let t=e;const n=e.indexOf("<semantics>");if(-1!==n){const r=e.indexOf("<annotation",n+"<semantics>".length);-1!==r&&(t=e.substring(0,n)+e.substring(n+"<semantics>".length,r)+"</math>")}return t}static removeSemanticsOcurrences(e,t=n0.xmlCharacters){const n=`${t.tagOpener}math`,r=`${t.tagOpener}/math${t.tagCloser}`,i=`/${t.tagCloser}`,{tagCloser:a}=t,o=`${t.tagOpener}semantics${t.tagCloser}`,s=`${t.tagOpener}annotation encoding=`;let l="",c=e.indexOf(n),u=0;for(;-1!==c;){l+=e.substring(u,c);const t=e.indexOf(r,c),d=e.indexOf(i,c),h=e.indexOf(a,c);-1!==t?u=t:d===h-1&&(u=d);const f=e.indexOf(o,c);if(-1!==f){const t=e.substring(c,f),i=e.indexOf(s,c);if(-1!==i){const a=f+o.length;l+=t+e.substring(a,i)+r,c=e.indexOf(n,c+n.length),u+=r.length}else u=c,c=e.indexOf(n,c+n.length)}else u=c,c=e.indexOf(n,c+n.length)}return l+=e.substring(u,e.length),l}static containClass(e,t){const n=e.indexOf("class");if(-1===n)return!1;const r=e.indexOf(">",n);return-1!==e.substring(n,r).indexOf(t)}static isEmpty(e){const t=e.indexOf(">"),n=e.indexOf("/>");let r=!1;if(-1!==n&&n===t-1&&(r=!0),!r){const n=new RegExp("</(.+:)?math>").exec(e);n&&(r=t+1===n.index)}return r}static encodeProperties(e){return e.replace(/\w+=".*?"/g,e=>{const t=e.indexOf('"'),n=e.substring(t+1,e.length-1),r=d0.htmlEntities(n);return`${e.substring(0,t+1)}${r}"`})}}class i0{static addConfiguration(e){Object.assign(i0.properties,e)}static get properties(){return i0._properties}static set properties(e){i0._properties=e}static get(e){return Object.prototype.hasOwnProperty.call(i0.properties,e)?i0.properties[e]:!!Object.prototype.hasOwnProperty.call(i0.properties,"_wrs_conf_")&&i0.properties[`_wrs_conf_${e}`]}static set(e,t){i0.properties[e]=t}static update(e,t){if(i0.get(e)){const n=Object.assign(i0.get(e),t);i0.set(e,n)}else i0.set(e,t)}}i0._properties={};class a0{constructor(){this.cache=[]}populate(e,t){this.cache[e]=t}get(e){return!!Object.prototype.hasOwnProperty.call(this.cache,e)&&this.cache[e]}}class o0{constructor(){this.listeners=[]}add(e){this.listeners.push(e)}fire(e,t){for(let n=0;n<this.listeners.length&&!t.cancelled;n+=1)this.listeners[n].eventName===e&&this.listeners[n].callback(t);return t.defaultPrevented}static newListener(e,t){const n={};return n.eventName=e,n.callback=t,n}}class s0{static get listeners(){return s0._listeners}static addListener(e){s0.listeners.add(e)}static fireEvent(e,t){s0.listeners.fire(e,t)}static get parameters(){return s0._parameters}static set parameters(e){s0._parameters=e}static get servicePaths(){return s0._servicePaths}static set servicePaths(e){s0._servicePaths=e}static setServicePath(e,t){s0.servicePaths[e]=t}static getServicePath(e){return s0.servicePaths[e]}static get integrationPath(){return s0._integrationPath}static set integrationPath(e){s0._integrationPath=e}static getServerURL(){const e=window.location.href.split("/");return`${e[0]}//${e[2]}`}static init(e){s0.parameters=e;let t=s0.createServiceURI("configurationjs"),n=s0.createServiceURI("createimage"),r=s0.createServiceURI("showimage"),i=s0.createServiceURI("getmathml"),a=s0.createServiceURI("service");if(0===s0.parameters.URI.indexOf("/")){const e=s0.getServerURL();t=e+t,r=e+r,n=e+n,i=e+i,a=e+a}s0.setServicePath("configurationjs",t),s0.setServicePath("showimage",r),s0.setServicePath("createimage",n),s0.setServicePath("service",a),s0.setServicePath("getmathml",i),s0.setServicePath("configurationjs",t),s0.listeners.fire("onInit",{})}static getUrl(e,t){const n=window.location.toString().substr(0,window.location.toString().lastIndexOf("/")+1),r=d0.createHttpRequest();return r?(void 0===t||void 0===t?r.open("GET",e,!1):"/"===e.substr(0,1)||"http://"===e.substr(0,7)||"https://"===e.substr(0,8)?r.open("POST",e,!1):r.open("POST",n+e,!1),void 0!==t&&t?(r.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=UTF-8"),r.send(d0.httpBuildQuery(t))):r.send(null),r.responseText):""}static getService(e,t,n){let r;if(!0===n){const n=t?`?${t}`:"",i=`${s0.getServicePath(e)}${n}`;r=s0.getUrl(i)}else{const n=s0.getServicePath(e);r=s0.getUrl(n,t)}return r}static getServerLanguageFromService(e){return-1!==e.indexOf(".php")?"php":-1!==e.indexOf(".aspx")?"aspx":-1!==e.indexOf("wirispluginengine")?"ruby":"java"}static createServiceURI(e){const t=s0.serverExtension();return d0.concatenateUrl(s0.parameters.URI,e)+t}static serverExtension(){return-1!==s0.parameters.server.indexOf("php")?".php":-1!==s0.parameters.server.indexOf("aspx")?".aspx":""}}s0._servicePaths={},s0._integrationPath="",s0._listeners=new o0,s0._parameters={};class l0{static get cache(){return l0._cache}static set cache(e){l0._cache=e}static getLatexFromMathML(e){const t=r0.removeSemantics(e),{cache:n}=l0,r={service:"mathml2latex",mml:t},i=JSON.parse(s0.getService("service",r));let a="";if("ok"===i.status){a=i.result.text;const t=d0.htmlEntities(a),r=r0.addAnnotation(e,t,"LaTeX");n.populate(a,r)}return a}static getMathMLFromLatex(e,t){const n=l0.cache;if(l0.cache.get(e))return l0.cache.get(e);const r={service:"latex2mathml",latex:e};t&&(r.saveLatex="");const i=JSON.parse(s0.getService("service",r));let a;if("ok"===i.status){let t=i.result.text;if(t=t.split("\r").join("").split("\n").join(" "),-1===t.indexOf("semantics")&&-1===t.indexOf("annotation")){const n=d0.htmlEntities(e);t=r0.addAnnotation(t,n,"LaTeX"),a=t}else a=t;n.get(e)||n.populate(e,t)}else a=`$$${e}$$`;return a}static parseMathmlToLatex(e,t){let n="";const r=`${t.tagOpener}math`,i=`${t.tagOpener}/math${t.tagCloser}`,a=`${t.tagOpener}annotation encoding=${t.doubleQuote}LaTeX${t.doubleQuote}${t.tagCloser}`,o=`${t.tagOpener}/annotation${t.tagCloser}`;let s,l,c,u=e.indexOf(r),d=0;for(;-1!==u;){if(n+=e.substring(d,u),d=e.indexOf(i,u),-1===d?d=e.length-1:d+=i.length,s=e.substring(u,d),l=s.indexOf(a),-1!==l){l+=a.length,c=s.indexOf(o);let e=s.substring(l,c);t===n0.safeXmlCharacters&&(e=r0.safeXmlDecode(e)),n+=`$$${e}$$`,l0.cache.populate(e,s)}else n+=s;u=e.indexOf(r,d)}return n+=e.substring(d,e.length),n}static getLatexFromTextNode(e,t,n){void 0!==n&&null!=n||(n={open:"$$",close:"$$"});let r,i=e;for(;i.previousSibling&&3===i.previousSibling.nodeType;)i=i.previousSibling;function a(e,t,r){let i=e.nodeValue.indexOf(r,t);for(;-1===i;){if(!(e=e.nextSibling))return null;i=e.nodeValue?e.nodeValue.indexOf(n.close):-1}return{node:e,position:i}}function o(e,t,n,r){if(e===n)return t<=r;for(;e&&e!==n;)e=e.nextSibling;return e===n}let s={node:i,position:0};const l=n.open.length;do{if(r=a(s.node,s.position,n.open),null==r||o(e,t,r.node,r.position))return null;if(s=a(r.node,r.position+l,n.close),null==s)return null;s.position+=l}while(o(s.node,s.position,e,t));let c;if(r.node===s.node)c=r.node.nodeValue.substring(r.position+l,s.position-l);else{const e=r.position+l;c=r.node.nodeValue.substring(e,r.node.nodeValue.length);let t=r.node;do{t=t.nextSibling,t===s.node?c+=s.node.nodeValue.substring(0,s.position-l):c+=t.nodeValue?t.nodeValue:""}while(t!==s.node)}return{latex:c,startNode:r.node,startPosition:r.position,endNode:s.node,endPosition:s.position}}}l0._cache=new a0;var c0=r(1038);class u0{constructor(){throw new Error("Static class StringManager can not be instantiated.")}static get(e){let{language:t}=this;return t&&t.length>2&&(t=t.slice(0,2)),this.strings.hasOwnProperty(t)||(console.warn(`Unknown language ${t} set in StringManager.`),t="en"),this.strings[t].hasOwnProperty(e)?this.strings[t][e]:(console.warn(`Unknown key ${e} for language ${t} in StringManager.`),e)}}u0.strings=c0,u0.language="en";class d0{static fireEvent(e,t){if(document.createEvent){const n=document.createEvent("HTMLEvents");return n.initEvent(t,!0,!0),!e.dispatchEvent(n)}const n=document.createEventObject();return e.fireEvent(`on${t}`,n)}static addEvent(e,t,n){e.addEventListener?e.addEventListener(t,n,!0):e.attachEvent&&e.attachEvent(`on${t}`,n)}static removeEvent(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!0):e.detachEvent&&e.detachEvent(`on${t}`,n)}static addElementEvents(e,t,n,r){t&&(this.callbackDblclick=e=>{const n=e||window.event,r=n.srcElement?n.srcElement:n.target;t(r,n)},d0.addEvent(e,"dblclick",this.callbackDblclick)),n&&(this.callbackMousedown=e=>{const t=e||window.event,r=t.srcElement?t.srcElement:t.target;n(r,t)},d0.addEvent(e,"mousedown",this.callbackMousedown)),r&&(this.callbackMouseup=e=>{const t=e||window.event,n=t.srcElement?t.srcElement:t.target;r(n,t)},d0.addEvent(document,"mouseup",this.callbackMouseup),d0.addEvent(e,"mouseup",this.callbackMouseup))}static removeElementEvents(e){d0.removeEvent(e,"dblclick",this.callbackDblclick),d0.removeEvent(e,"mousedown",this.callbackMousedown),d0.removeEvent(document,"mouseup",this.callbackMouseup),d0.removeEvent(e,"mouseup",this.callbackMouseup)}static addClass(e,t){d0.containsClass(e,t)||(e.className+=` ${t}`)}static containsClass(e,t){if(null==e||!("className"in e))return!1;const n=e.className.split(" ");for(let e=n.length-1;e>=0;e-=1)if(n[e]===t)return!0;return!1}static removeClass(e,t){let n="";const r=e.className.split(" ");for(let e=0;e<r.length;e+=1)r[e]!==t&&(n+=`${r[e]} `);e.className=n.trim()}static convertOldXmlinitialtextAttribute(e){const t="value=",n=e.indexOf("xmlinitialtext"),r=e.indexOf(t,n),i=e.charAt(r+t.length),a=r+t.length+1,o=e.indexOf(i,a),s=e.substring(a,o);let l=s.split("«").join("§lt;");return l=l.split("»").join("§gt;"),l=l.split("&").join("§"),l=l.split("¨").join("§quot;"),e=e.split(s).join(l)}static createElement(e,t,n){let r;void 0===t&&(t={}),void 0===n&&(n=document);try{let i=`<${e}`;Object.keys(t).forEach(e=>{i+=` ${e}="${d0.htmlEntities(t[e])}"`}),i+=">",r=n.createElement(i)}catch(i){r=n.createElement(e),Object.keys(t).forEach(e=>{r.setAttribute(e,t[e])})}return r}static createObject(e,t){void 0===t&&(t=document),e=(e=(e=(e=e.split("<applet ").join('<span wirisObject="WirisApplet" ').split("<APPLET ").join('<span wirisObject="WirisApplet" ')).split("</applet>").join("</span>").split("</APPLET>").join("</span>")).split("<param ").join('<br wirisObject="WirisParam" ').split("<PARAM ").join('<br wirisObject="WirisParam" ')).split("</param>").join("</br>").split("</PARAM>").join("</br>");const n=d0.createElement("div",{},t);return n.innerHTML=e,function e(n){if(n.getAttribute&&"WirisParam"===n.getAttribute("wirisObject")){const e={};for(let t=0;t<n.attributes.length;t+=1)null!==n.attributes[t].nodeValue&&(e[n.attributes[t].nodeName]=n.attributes[t].nodeValue);const r=d0.createElement("param",e,t);r.NAME&&(r.name=r.NAME,r.value=r.VALUE),r.removeAttribute("wirisObject"),n.parentNode.replaceChild(r,n)}else if(n.getAttribute&&"WirisApplet"===n.getAttribute("wirisObject")){const r={};for(let e=0;e<n.attributes.length;e+=1)null!==n.attributes[e].nodeValue&&(r[n.attributes[e].nodeName]=n.attributes[e].nodeValue);const i=d0.createElement("applet",r,t);i.removeAttribute("wirisObject");for(let t=0;t<n.childNodes.length;t+=1)e(n.childNodes[t]),"param"===n.childNodes[t].nodeName.toLowerCase()&&(i.appendChild(n.childNodes[t]),t-=1);n.parentNode.replaceChild(i,n)}else for(let t=0;t<n.childNodes.length;t+=1)e(n.childNodes[t])}(n),n.firstChild}static createObjectCode(e){if(null==e)return null;if(1===e.nodeType){let t=`<${e.tagName}`;for(let n=0;n<e.attributes.length;n+=1)e.attributes[n].specified&&(t+=` ${e.attributes[n].name}="${d0.htmlEntities(e.attributes[n].value)}"`);if(e.childNodes.length>0){t+=">";for(let n=0;n<e.childNodes.length;n+=1)t+=d0.createObject(e.childNodes[n]);t+=`</${e.tagName}>`}else"DIV"===e.nodeName||"SCRIPT"===e.nodeName?t+=`></${e.tagName}>`:t+="/>";return t}return 3===e.nodeType?d0.htmlEntities(e.nodeValue):""}static concatenateUrl(e,t){let n="";return e.indexOf("/")!==e.length&&0!==t.indexOf("/")&&(n="/"),(e+n+t).replace(/([^:]\/)\/+/g,"$1")}static htmlEntities(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")}static htmlEntitiesDecode(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}static createHttpRequest(){if("file://"===window.location.toString().substr(0,window.location.toString().lastIndexOf("/")+1).substr(0,7))throw u0.get("exception_cross_site");if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return null}}}static httpBuildQuery(e){let t="";return Object.keys(e).forEach(n=>{null!=e[n]&&(t+=`${d0.urlEncode(n)}=${d0.urlEncode(e[n])}&`)}),"&"===t.substring(t.length-1)&&(t=t.substring(0,t.length-1)),t}static propertiesToString(e){const t=[];Object.keys(e).forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&t.push(n)});const n=t.length;for(let e=0;e<n;e+=1)for(let r=e+1;r<n;r+=1){const n=t[e],i=t[r];d0.compareStrings(n,i)>0&&(t[e]=i,t[r]=n)}let r="";for(let i=0;i<n;i+=1){const n=t[i];r+=n,r+="=";let a=e[n];a=a.replace("\\","\\\\"),a=a.replace("\n","\\n"),a=a.replace("\r","\\r"),a=a.replace("\t","\\t"),r+=a,r+="\n"}return r}static compareStrings(e,t){let n;const r=e.length,i=t.length,a=r>i?i:r;for(n=0;n<a;n+=1){const r=d0.fixedCharCodeAt(e,n)-d0.fixedCharCodeAt(t,n);if(0!==r)return r}return e.length-t.length}static fixedCharCodeAt(e,t){t=t||0;const n=e.charCodeAt(t);let r,i;if(n>=55296&&n<=56319){if(r=n,i=e.charCodeAt(t+1),Number.isNaN(i))throw u0.get("exception_high_surrogate");return 1024*(r-55296)+(i-56320)+65536}return!(n>=56320&&n<=57343)&&n}static urlToAssArray(e){let t;if(t=e.indexOf("?"),t>0){const n=e.substring(t+1).split("&"),r={};for(t=0;t<n.length;t+=1){const e=n[t].split("=");e.length>1&&(r[e[0]]=decodeURIComponent(e[1].replace(/\+/g," ")))}return r}return{}}static urlEncode(e){let t="";return t=encodeURIComponent(e),t}static getWIRISImageOutput(e,t,n){const r=d0.createObject(e);if(r&&(r.className===i0.get("imageClassName")||r.getAttribute(i0.get("imageMathmlAttribute")))){if(!t)return e;const i=r.getAttribute(i0.get("imageMathmlAttribute"));let a=r0.safeXmlDecode(i);if(i0.get("saveHandTraces")||(a=r0.removeAnnotation(a,"application/json")),null==a&&(a=r.getAttribute("alt")),n){return r0.safeXmlEncode(a)}return a}return e}static getNodeLength(e){const t={IMG:1,BR:1};if(3===e.nodeType)return e.nodeValue.length;if(1===e.nodeType){let n=t[e.nodeName.toUpperCase()];void 0===n&&(n=0);for(let t=0;t<e.childNodes.length;t+=1)n+=d0.getNodeLength(e.childNodes[t]);return n}return 0}static getSelectedItem(e,t,n){let r;if(t?(r=e.contentWindow,r.focus()):(r=window,e.focus()),document.selection&&!n){const n=r.document.selection.createRange();if(n.parentElement){if(n.htmlText.length>0)return 0===n.text.length?d0.getSelectedItem(e,t,!0):null;r.document.execCommand("InsertImage",!1,"#");let i,a,o=n.parentElement();return"IMG"!==o.nodeName.toUpperCase()&&(n.pasteHTML('<span id="wrs_openEditorWindow_temporalObject"></span>'),o=r.document.getElementById("wrs_openEditorWindow_temporalObject")),o.nextSibling&&3===o.nextSibling.nodeType?(i=o.nextSibling,a=0):o.previousSibling&&3===o.previousSibling.nodeType?(i=o.previousSibling,a=i.nodeValue.length):(i=r.document.createTextNode(""),o.parentNode.insertBefore(i,o),a=0),o.parentNode.removeChild(o),{node:i,caretPosition:a}}return n.length>1?null:{node:n.item(0)}}if(r.getSelection){let e;const t=r.getSelection();try{e=t.getRangeAt(0)}catch(t){e=r.document.createRange()}const n=e.startContainer;if(3===n.nodeType)return{node:n,caretPosition:e.startOffset};if(n!==e.endContainer)return null;if(1===n.nodeType){const t=e.startOffset;if(n.childNodes[t])return{node:n.childNodes[t]}}}return null}static getSelectedItemOnTextarea(e){const t=document.createTextNode(e.value),n=l0.getLatexFromTextNode(t,e.selectionStart);return null===n?null:{node:t,caretPosition:e.selectionStart,startPosition:n.startPosition,endPosition:n.endPosition}}static getElementsByNameFromString(e,t,n){const r=[];e=e.toLowerCase(),t=t.toLowerCase();let i=e.indexOf(`<${t} `);for(;-1!==i;){let a;a=n?">":`</${t}>`;let o=e.indexOf(a,i);-1!==o?(o+=a.length,r.push({start:i,end:o})):o=i+1,i=e.indexOf(`<${t} `,o)}return r}static decode64(e){const t="+".charCodeAt(0),n="/".charCodeAt(0),r="0".charCodeAt(0),i="a".charCodeAt(0),a="A".charCodeAt(0),o="-".charCodeAt(0),s="_".charCodeAt(0),l=e.charCodeAt(0);return l===t||l===o?62:l===n||l===s?63:l<r?-1:l<r+10?l-r+26+26:l<a+26?l-a:l<i+26?l-i+26:null}static b64ToByteArray(e,t){let n;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");const r=[];let i,a,o;for(t?i=t:(a="="===e.charAt(e.length-2)?2:"="===e.charAt(e.length-1)?1:0,i=a>0?e.length-4:e.length),o=0;o<i;o+=4)n=d0.decode64(e.charAt(o))<<18|d0.decode64(e.charAt(o+1))<<12|d0.decode64(e.charAt(o+2))<<6|d0.decode64(e.charAt(o+3)),r.push(n>>16&255),r.push(n>>8&255),r.push(255&n);return a&&(2===a?(n=d0.decode64(e.charAt(o))<<2|d0.decode64(e.charAt(o+1))>>4,r.push(255&n)):1===a&&(n=d0.decode64(e.charAt(o))<<10|d0.decode64(e.charAt(o+1))<<4|d0.decode64(e.charAt(o+2))>>2,r.push(n>>8&255),r.push(255&n))),r}static readInt32(e){if(e.length<4)return!1;const t=e.splice(0,4);return t[0]<<24|t[1]<<16|t[2]<<8|t[3]<<0}static readByte(e){return e.shift()<<0}static readBytes(e,t,n){return e.splice(t,n)}static updateTextArea(e,t){if(e&&t)if(e.focus(),null!=e.selectionStart){const{selectionEnd:n}=e,r=e.value.substring(0,e.selectionStart),i=e.value.substring(n,e.value.length);e.value=r+t+i,e.selectionEnd=n+t.length}else{document.selection.createRange().text=t}}static updateExistingTextOnTextarea(e,t,n,r){e.focus();const i=e.value.substring(0,n);e.value=i+t+e.value.substring(r,e.value.length),e.selectionEnd=n+t.length}static addArgument(e,t,n){let r;return r=e.indexOf("?")>0?"&":"?",`${e+r+t}=${n}`}}class h0{static removeImgDataAttributes(e){const t=[],{attributes:n}=e;Object.keys(n).forEach(e=>{const r=n[e];void 0!==r&&void 0!==r.name&&0===r.name.indexOf("data-")&&t.push(r.name)}),t.forEach(t=>{e.removeAttribute(t)})}static clone(e,t){const n=i0.get("imageCustomEditorName");e.hasAttribute(n)||t.removeAttribute(n),[i0.get("imageMathmlAttribute"),n,"alt","height","width","style","src","role"].forEach(n=>{const r=e.getAttribute(n);r&&t.setAttribute(n,r)})}static setImgSize(e,t,n){let r,i,a,o;if(n)if("svg"===i0.get("imageFormat"))if("base64"!==i0.get("saveMode"))r=h0.getMetricsFromSvgString(t);else{i=e.src.substr(e.src.indexOf("base64,")+7,e.src.length),o="",a=d0.b64ToByteArray(i,i.length);for(let e=0;e<a.length;e+=1)o+=String.fromCharCode(a[e]);r=h0.getMetricsFromSvgString(o)}else i=e.src.substr(e.src.indexOf("base64,")+7,e.src.length),a=d0.b64ToByteArray(i,88),r=h0.getMetricsFromBytes(a);else r=d0.urlToAssArray(t);let s=r.cw;if(!s)return;let l=r.ch,c=r.cb;const{dpi:u}=r;u&&(s=96*s/u,l=96*l/u,c=96*c/u),e.width=s,e.height=l,e.style.verticalAlign=`-${l-c}px`}static fixAfterResize(e){if(e.removeAttribute("style"),e.removeAttribute("width"),e.removeAttribute("height"),e.style.maxWidth="none",-1!==e.src.indexOf("data:image"))if("svg"===i0.get("imageFormat")){const t=decodeURIComponent(e.src.substring(32,e.src.length));h0.setImgSize(e,t,!0)}else{const t=e.src.substring(22,e.src.length);h0.setImgSize(e,t,!0)}else h0.setImgSize(e,e.src)}static getMetricsFromSvgString(e){let t=e.indexOf('height="'),n=e.indexOf('"',t+8,e.length);const r=e.substring(t+8,n);t=e.indexOf('width="'),n=e.indexOf('"',t+7,e.length);const i=e.substring(t+7,n);t=e.indexOf('wrs:baseline="'),n=e.indexOf('"',t+14,e.length);const a=e.substring(t+14,n);if(void 0!==i){const e=[];return e.cw=i,e.ch=r,void 0!==a&&(e.cb=a),e}return[]}static getMetricsFromBytes(e){let t,n,r,i,a;for(d0.readBytes(e,0,8);e.length>=4;)r=d0.readInt32(e),1229472850===r?(t=d0.readInt32(e),n=d0.readInt32(e),d0.readInt32(e),d0.readByte(e)):1650545477===r?i=d0.readInt32(e):1883789683===r&&(a=d0.readInt32(e),a=Math.round(a/39.37),d0.readInt32(e),d0.readByte(e)),d0.readInt32(e);if(void 0!==t){const e=[];return e.cw=t,e.ch=n,e.dpi=a,i&&(e.cb=i),e}return[]}}class f0{static get cache(){return f0._cache}static set cache(e){f0._cache=e}static mathMLToAccessible(e,t,n){void 0===t&&(t="en"),r0.containClass(e,"wrs_chemistry")&&(n.mode="chemistry"),n.ignoreStyles=!0;let r="";if(f0.cache.get(e))r=f0.cache.get(e);else{n.service="mathml2accessible",n.lang=t;const i=JSON.parse(s0.getService("service",n));"error"!==i.status?(r=i.result.text,f0.cache.populate(e,r)):r=u0.get("error_convert_accessibility")}return r}}f0._cache=new a0;r(1575);class p0{static mathmlToImgObject(e,t,n,r){const i=e.createElement("img");i.align="middle",i.style.maxWidth="none";const a=n||{};if(a.mml=t,a.lang=r,a.metrics="true",a.centerbaseline="false","base64"===i0.get("saveMode")&&"default"===i0.get("base64savemode")&&(a.base64=!0),i.className=i0.get("imageClassName"),-1!==t.indexOf('class="')){let e=t.substring(t.indexOf('class="')+'class="'.length,t.length);e=e.substring(0,e.indexOf('"')),e=e.substring(4,e.length),i.setAttribute(i0.get("imageCustomEditorName"),e)}if(!i0.get("wirisPluginPerformance")||"xml"!==i0.get("saveMode")&&"safeXml"!==i0.get("saveMode")){const e=p0.createImageSrc(t,a);i.setAttribute(i0.get("imageMathmlAttribute"),r0.safeXmlEncode(t)),i.src=e,h0.setImgSize(i,e,"base64"===i0.get("saveMode")&&"default"===i0.get("base64savemode")),i0.get("enableAccessibility")&&(i.alt=f0.mathMLToAccessible(t,r,a))}else{let e=JSON.parse(p0.createShowImageSrc(a,r));if("warning"===e.status)try{e=JSON.parse(s0.getService("showimage",a))}catch(e){return null}({result:e}=e),"png"===e.format?i.src=`data:image/png;base64,${e.content}`:i.src=`data:image/svg+xml;charset=utf8,${d0.urlEncode(e.content)}`,i.setAttribute(i0.get("imageMathmlAttribute"),r0.safeXmlEncode(t)),h0.setImgSize(i,e.content,!0),i0.get("enableAccessibility")&&(void 0===e.alt?i.alt=f0.mathMLToAccessible(t,r,a):i.alt=e.alt)}return void 0!==p0.observer&&p0.observer.observe(i),i.setAttribute("role","math"),i}static createImageSrc(e,t){"base64"===i0.get("saveMode")&&"default"===i0.get("base64savemode")&&(t.base64=!0);let n=s0.getService("createimage",t);if(-1!==n.indexOf("@BASE@")){const e=s0.getServicePath("createimage").split("/");e.pop(),n=n.split("@BASE@").join(e.join("/"))}return n}static initParse(e,t){return e=p0.initParseSaveMode(e,t),p0.initParseEditMode(e)}static initParseSaveMode(e,t){return i0.get("saveMode")&&(e=l0.parseMathmlToLatex(e,n0.safeXmlCharacters),e=l0.parseMathmlToLatex(e,n0.xmlCharacters),e=p0.parseMathmlToImg(e,n0.safeXmlCharacters,t),e=p0.parseMathmlToImg(e,n0.xmlCharacters,t),"base64"===i0.get("saveMode")&&"image"===i0.get("base64savemode")&&(e=p0.codeImgTransform(e,"base642showimage"))),e}static initParseEditMode(e){if(-1!==i0.get("parseModes").indexOf("latex")){const t=d0.getElementsByNameFromString(e,"img",!0),n='encoding="LaTeX">';let r=0;for(let i=0;i<t.length;i+=1){const a=e.substring(t[i].start+r,t[i].end+r);if(-1!==a.indexOf(` class="${i0.get("imageClassName")}"`)){let o=` ${i0.get("imageMathmlAttribute")}="`,s=a.indexOf(o);if(-1===s&&(o=' alt="',s=a.indexOf(o)),-1!==s){s+=o.length;const l=a.indexOf('"',s),c=r0.safeXmlDecode(a.substring(s,l));let u=c.indexOf(n);if(-1!==u){u+=n.length;const a=c.indexOf("</annotation>",u),o=c.substring(u,a),s=`$$${d0.htmlEntitiesDecode(o)}$$`,l=e.substring(0,t[i].start+r),d=e.substring(t[i].end+r);e=l+s+d,r+=s.length-(t[i].end-t[i].start)}}}}}return e}static endParse(e){const t=p0.endParseEditMode(e);return p0.endParseSaveMode(t)}static endParseEditMode(e){if(-1!==i0.get("parseModes").indexOf("latex")){let t="",n=0,r=e.indexOf("$$");for(;-1!==r;){if(t+=e.substring(n,r),n=e.indexOf("$$",r+2),-1!==n){const i=e.substring(r+2,n),a=d0.htmlEntitiesDecode(i);let o=l0.getMathMLFromLatex(a,!0);i0.get("saveHandTraces")||(o=r0.removeAnnotation(o,"application/json")),t+=o,n+=2}else t+="$$",n=r+2;r=e.indexOf("$$",n)}t+=e.substring(n,e.length),e=t}return e}static endParseSaveMode(e){return i0.get("saveMode")&&("safeXml"===i0.get("saveMode")?e=p0.codeImgTransform(e,"img2mathml"):"xml"===i0.get("saveMode")?e=p0.codeImgTransform(e,"img2mathml"):"base64"===i0.get("saveMode")&&"image"===i0.get("base64savemode")&&(e=p0.codeImgTransform(e,"img264"))),e}static createShowImageSrc(e,t){const n={};["mml","color","centerbaseline","zoom","dpi","fontSize","fontFamily","defaultStretchy","backgroundColor","format"].forEach(t=>{void 0!==e[t]&&(n[t]=e[t])});const r={};return Object.keys(e).forEach(t=>{"mml"!==t&&(r[t]=e[t])}),r.formula=com.wiris.js.JsPluginTools.md5encode(d0.propertiesToString(n)),r.lang=void 0===t?"en":t,r.version=i0.get("version"),s0.getService("showimage",d0.httpBuildQuery(r),!0)}static codeImgTransform(e,t){let n="",r=0;const i=/<img/gi,a=i.source.length;for(;i.test(e);){const o=i.lastIndex-a;n+=e.substring(r,o);let s=o+1;for(;s<e.length&&r<=o;){const t=e.charAt(s);if('"'===t||"'"===t){const n=e.indexOf(t,s+1);s=-1===n?e.length:n}else">"===t&&(r=s+1);s+=1}if(r<o)return n+=e.substring(o,e.length),n;let l=e.substring(o,r);const c=d0.createObject(l);let u,d,h=c.getAttribute(i0.get("imageMathmlAttribute"));if("base642showimage"===t)null==h&&(h=c.getAttribute("alt")),h=r0.safeXmlDecode(h),l=p0.mathmlToImgObject(document,h,null,null),n+=d0.createObjectCode(l);else if("img2mathml"===t)i0.get("saveMode")&&("safeXml"===i0.get("saveMode")?(u=!0,d=!0):"xml"===i0.get("saveMode")&&(u=!0,d=!1)),n+=d0.getWIRISImageOutput(l,u,d);else if("img264"===t){null===h&&(h=c.getAttribute("alt")),h=r0.safeXmlDecode(h);const e={base64:"true"};l=p0.mathmlToImgObject(document,h,e,null),h0.setImgSize(l,l.src,!0),n+=d0.createObjectCode(l)}}return n+=e.substring(r,e.length),n}static parseMathmlToImg(e,t,n){let r="";const i=`${t.tagOpener}math`,a=`${t.tagOpener}/math${t.tagCloser}`;let o=e.indexOf(i),s=0;for(;-1!==o;){r+=e.substring(s,o);const l=e.indexOf(i0.get("imageMathmlAttribute"));if(s=e.indexOf(a,o),-1===s?s=e.length-1:s+=-1!==l?e.indexOf("/>",o):a.length,r0.isMathmlInAttribute(e,o)||-1!==l)r+=e.substring(o,s);else{let i=e.substring(o,s);i=t.id===n0.safeXmlCharacters.id?r0.safeXmlDecode(i):r0.mathMLEntities(i),r+=d0.createObjectCode(p0.mathmlToImgObject(document,i,null,n))}o=e.indexOf(i,s)}return r+=e.substring(s,e.length),r}}if("undefined"!=typeof MutationObserver){const e=new MutationObserver(e=>{e.forEach(e=>{e.oldValue===i0.get("imageClassName")&&"class"===e.attributeName&&-1===e.target.className.indexOf(i0.get("imageClassName"))&&(e.target.className=i0.get("imageClassName"))})});p0.observer=Object.create(e),p0.observer.Config={attributes:!0,attributeOldValue:!0},p0.observer.observe=function(e){Object.getPrototypeOf(this).observe(e,this.Config)}}class m0{constructor(){this.isContentChanged=!1,this.waitingForChanges=!1}setIsContentChanged(e){this.isContentChanged=e}getIsContentChanged(){return this.isContentChanged}setWaitingForChanges(e){this.waitingForChanges=e}caretPositionChanged(e){}clipboardChanged(e){}contentChanged(e){!0===this.waitingForChanges&&!1===this.isContentChanged&&(this.isContentChanged=!0)}styleChanged(e){}transformationReceived(e){}}class g0{constructor(e){if(this.editorAttributes={},!("editorAttributes"in e))throw new Error("ContentManager constructor error: editorAttributes property missed.");if(this.editorAttributes=e.editorAttributes,this.customEditors=null,"customEditors"in e&&(this.customEditors=e.customEditors),this.environment={},!("environment"in e))throw new Error("ContentManager constructor error: environment property missed");if(this.environment=e.environment,this.language="",!("language"in e))throw new Error("ContentManager constructor error: language property missed");this.language=e.language,this.editorListener=new m0,this.editor=null,this.ua=navigator.userAgent.toLowerCase(),this.deviceProperties={},this.deviceProperties.isAndroid=this.ua.indexOf("android")>-1,this.deviceProperties.isIOS=g0.isIOS(),this.toolbar=null,this.modalDialogInstance=null,this.listeners=new o0,this.mathML=null,this.isNewElement=!0,this.integrationModel=null}addListener(e){this.listeners.add(e)}setIntegrationModel(e){this.integrationModel=e}setModalDialogInstance(e){this.modalDialogInstance=e}insert(){this.updateTitle(this.modalDialogInstance),this.insertEditor(this.modalDialogInstance)}insertEditor(){if(g0.isEditorLoaded()){if(this.editor=window.com.wiris.jsEditor.JsEditor.newInstance(this.editorAttributes),this.editor.insertInto(this.modalDialogInstance.contentContainer),this.editor.focus(),this.modalDialogInstance.rtl&&this.editor.action("rtl"),this.editor.getEditorModel().isRTL()&&(this.editor.element.style.direction="rtl"),this.editor.getEditorModel().addEditorListener(this.editorListener),this.modalDialogInstance.deviceProperties.isIOS){setTimeout((function(){this.hasOwnProperty("modalDialogInstance")&&this.modalDialogInstance.hideKeyboard()}),400);const e=document.getElementsByClassName("wrs_formulaDisplay")[0];d0.addEvent(e,"focus",this.modalDialogInstance.handleOpenedIosSoftkeyboard),d0.addEvent(e,"blur",this.modalDialogInstance.handleClosedIosSoftkeyboard)}this.listeners.fire("onLoad",{})}else setTimeout(g0.prototype.insertEditor.bind(this),100)}init(){g0.isEditorLoaded()||this.addEditorAsExternalDependency()}addEditorAsExternalDependency(){const e=document.createElement("script");e.type="text/javascript";let t=i0.get("editorUrl");const n=document.createElement("a");g0.setHrefToAnchorElement(n,t),g0.setProtocolToAnchorElement(n),t=g0.getURLFromAnchorElement(n);const r=this.getEditorStats();e.src=`${t}?lang=${this.language}&stats-editor=${r.editor}&stats-mode=${r.mode}&stats-version=${r.version}`,document.getElementsByTagName("head")[0].appendChild(e)}static setHrefToAnchorElement(e,t){e.href=t}static setProtocolToAnchorElement(e){0===window.location.href.indexOf("https://")&&"http:"===e.protocol&&(e.protocol="https:")}static getURLFromAnchorElement(e){const t="80"===e.port||"443"===e.port||""===e.port;return`${e.protocol}//${e.hostname}${t?"":`:${e.port}`}${e.pathname.startsWith("/")?e.pathname:`/${e.pathname}`}`}getEditorStats(){const e={};return"editor"in this.environment?e.editor=this.environment.editor:e.editor="unknown","mode"in this.environment?e.mode=this.environment.mode:e.mode=i0.get("saveMode"),"version"in this.environment?e.version=this.environment.version:e.version=i0.get("version"),e}static isIOS(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}static isEditorLoaded(){return window.com&&window.com.wiris&&window.com.wiris.jsEditor&&window.com.wiris.jsEditor.JsEditor&&window.com.wiris.jsEditor.JsEditor.newInstance}setInitialContent(){this.isNewElement||this.setMathML(this.mathML)}setMathML(e,t){void 0===t&&(t=!1),this.editor.setMathMLWithCallback(e,()=>{this.editorListener.setWaitingForChanges(!0)}),setTimeout(()=>{this.editorListener.setIsContentChanged(!1)},500),t||this.onFocus()}onFocus(){void 0!==this.editor&&null!=this.editor&&this.editor.focus()}submitAction(){if(this.editor.isFormulaEmpty())this.integrationModel.updateFormula(null);else{let e=this.editor.getMathMLWithSemantics();if(null!==this.customEditors.getActiveEditor()){const{toolbar:t}=this.customEditors.getActiveEditor();e=r0.addCustomEditorClassAttribute(e,t)}else Object.keys(this.customEditors.editors).forEach(t=>{e=r0.removeCustomEditorClassAttribute(e,t)});const t=r0.mathMLEntities(e);this.integrationModel.updateFormula(t)}this.customEditors.disable(),this.integrationModel.notifyWindowClosed(),this.setEmptyMathML(),this.customEditors.disable()}setEmptyMathML(){this.deviceProperties.isAndroid||this.deviceProperties.isIOS?this.editor.getEditorModel().isRTL()?this.setMathML('<math dir="rtl"><semantics><annotation encoding="application/json">[]</annotation></semantics></math>',!0):this.setMathML('<math><semantics><annotation encoding="application/json">[]</annotation></semantics></math>',!0):this.editor.getEditorModel().isRTL()?this.setMathML('<math dir="rtl"/>',!0):this.setMathML("<math/>",!0)}onOpen(){if(this.isNewElement?this.setEmptyMathML():this.setMathML(this.mathML),this.updateToolbar(),this.onFocus(),this.deviceProperties.isIOS){1!=document.documentElement.clientWidth/window.innerWidth&&this.setKeyboardMode()}}setKeyboardMode(){const e=document.getElementsByClassName("wrs_handOpen wrs_disablePalette")[0];e?(e.classList.remove("wrs_handOpen"),e.classList.remove("wrs_disablePalette")):setTimeout(g0.prototype.setKeyboardMode.bind(this),100)}updateToolbar(){this.updateTitle(this.modalDialogInstance);const e=this.customEditors.getActiveEditor();if(e){const t=e.toolbar?e.toolbar:_wrs_int_wirisProperties.toolbar;null!=this.toolbar&&this.toolbar===t||this.setToolbar(t)}else{const e=this.getToolbar();null!=this.toolbar&&this.toolbar===e||(this.setToolbar(e),this.customEditors.disable())}}updateTitle(){const e=this.customEditors.getActiveEditor();e?this.modalDialogInstance.setTitle(e.title):this.modalDialogInstance.setTitle("MathType")}getToolbar(){let e="general";return"toolbar"in this.editorAttributes&&({toolbar:e}=this.editorAttributes),"general"===e&&(e="undefined"==typeof _wrs_int_wirisProperties||void 0===_wrs_int_wirisProperties.toolbar?"general":_wrs_int_wirisProperties.toolbar),e}setToolbar(e){this.toolbar=e,this.editor.setParams({toolbar:this.toolbar})}hasChanges(){return!this.editor.isFormulaEmpty()&&this.editorListener.getIsContentChanged()}onKeyDown(e){if(void 0!==e.key&&!1===e.repeat)if("Escape"===e.key||"Esc"===e.key){let t=document.getElementsByClassName("wrs_expandButton wrs_expandButtonFor3RowsLayout wrs_pressed");0===t.length&&(t=document.getElementsByClassName("wrs_expandButton wrs_expandButtonFor2RowsLayout wrs_pressed"),0===t.length&&(t=document.getElementsByClassName("wrs_select wrs_pressed"),0===t.length&&(this.modalDialogInstance.cancelAction(),e.stopPropagation(),e.preventDefault())))}else if(e.shiftKey&&"Tab"===e.key)if(document.activeElement===this.modalDialogInstance.submitButton)this.editor.focus(),e.stopPropagation(),e.preventDefault();else{const t=document.querySelector('[title="Manual"]');document.activeElement===t&&(this.modalDialogInstance.cancelButton.focus(),e.stopPropagation(),e.preventDefault())}else if("Tab"===e.key)if(document.activeElement===this.modalDialogInstance.cancelButton){document.querySelector('[title="Manual"]').focus(),e.stopPropagation(),e.preventDefault()}else{"wrs_formulaDisplay wrs_focused"===document.getElementsByClassName("wrs_formulaDisplay")[0].getAttribute("class")&&(this.modalDialogInstance.submitButton.focus(),e.stopPropagation(),e.preventDefault())}}}class v0{constructor(){this.editors=[],this.activeEditor="default"}addEditor(e,t){const n={};n.name=t.name,n.toolbar=t.toolbar,n.icon=t.icon,n.confVariable=t.confVariable,n.title=t.title,n.tooltip=t.tooltip,this.editors[e]=n}enable(e){this.activeEditor=e}disable(){this.activeEditor="default"}getActiveEditor(){return"default"!==this.activeEditor?this.editors[this.activeEditor]:null}}var b0,y0={imageCustomEditorName:"data-custom-editor",imageClassName:"Wirisformula",CASClassName:"Wiriscas"};class A0{constructor(){this.cancelled=!1,this.defaultPrevented=!1}cancel(){this.cancelled=!0}preventDefault(){this.defaultPrevented=!0}}class _0{constructor(e){this.overlayElement=e.overlayElement,this.callbacks=e.callbacks,this.overlayWrapper=this.overlayElement.appendChild(document.createElement("div")),this.overlayWrapper.setAttribute("class","wrs_popupmessage_overlay_envolture"),this.message=this.overlayWrapper.appendChild(document.createElement("div")),this.message.id="wrs_popupmessage",this.message.setAttribute("class","wrs_popupmessage_panel"),this.message.setAttribute("role","dialog"),this.message.setAttribute("aria-describedby","description_txt");const t=document.createElement("p"),n=document.createTextNode(e.strings.message);t.appendChild(n),t.id="description_txt",this.message.appendChild(t);const r=this.overlayWrapper.appendChild(document.createElement("div"));r.setAttribute("class","wrs_popupmessage_overlay"),r.addEventListener("click",this.cancelAction.bind(this)),this.buttonArea=this.message.appendChild(document.createElement("div")),this.buttonArea.setAttribute("class","wrs_popupmessage_button_area"),this.buttonArea.id="wrs_popup_button_area";const i={class:"wrs_button_accept",innerHTML:e.strings.submitString,id:"wrs_popup_accept_button"};this.closeButton=this.createButton(i,this.closeAction.bind(this)),this.buttonArea.appendChild(this.closeButton);const a={class:"wrs_button_cancel",innerHTML:e.strings.cancelString,id:"wrs_popup_cancel_button"};this.cancelButton=this.createButton(a,this.cancelAction.bind(this)),this.buttonArea.appendChild(this.cancelButton)}createButton(e,t){let n={};return n=document.createElement("button"),n.setAttribute("id",e.id),n.setAttribute("class",e.class),n.innerHTML=e.innerHTML,n.addEventListener("click",t),n}show(){"block"!==this.overlayWrapper.style.display?(document.activeElement.blur(),this.overlayWrapper.style.display="block",this.closeButton.focus()):this.overlayWrapper.style.display="none"}cancelAction(){this.overlayWrapper.style.display="none",void 0!==this.callbacks.cancelCallback&&(this.callbacks.cancelCallback(),R0.setActionsOnCancelButtons())}closeAction(){this.cancelAction(),void 0!==this.callbacks.closeCallback&&this.callbacks.closeCallback()}onKeyDown(e){void 0!==e.key&&("Escape"===e.key||"Esc"===e.key?(this.cancelAction(),e.stopPropagation(),e.preventDefault()):"Tab"===e.key&&(document.activeElement===this.closeButton?this.cancelButton.focus():this.closeButton.focus(),e.stopPropagation(),e.preventDefault()))}}var w0=new Uint8Array(16);function E0(){if(!b0&&!(b0="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b0(w0)}var S0=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var C0=function(e){return"string"==typeof e&&S0.test(e)},T0=[],k0=0;k0<256;++k0)T0.push((k0+256).toString(16).substr(1));var x0=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(T0[e[t+0]]+T0[e[t+1]]+T0[e[t+2]]+T0[e[t+3]]+"-"+T0[e[t+4]]+T0[e[t+5]]+"-"+T0[e[t+6]]+T0[e[t+7]]+"-"+T0[e[t+8]]+T0[e[t+9]]+"-"+T0[e[t+10]]+T0[e[t+11]]+T0[e[t+12]]+T0[e[t+13]]+T0[e[t+14]]+T0[e[t+15]]).toLowerCase();if(!C0(n))throw TypeError("Stringified UUID is invalid");return n};var O0=function(e,t,n){var r=(e=e||{}).random||(e.rng||E0)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return x0(r)};class I0{constructor(){throw new Error("Static class StringManager can not be instantiated.")}static get senderId(){if(!this._senderId){const e=document.cookie.split(";").map(e=>e.trim().split("="));for(const[t,n]of e)if("wiris_telemetry_mathtype_web_senderid"===t){this._senderId=n;break}this._senderId||(this._senderId=I0.composeUUID(),document.cookie=this.composeCookie("wiris_telemetry_mathtype_web_senderid",this._senderId,31536e4))}return this._senderId}static get sessionId(){return this._sessionId||(this._sessionId=I0.composeUUID()),this._sessionId}static send(e){const t={method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json","X-Api-Key":"CK20op1pOx2LAUjPFP7kB2UPveHZRidG51UJE26m","Accept-Version":"1"},body:JSON.stringify(I0.composeBody(e))};return fetch(I0.endpoint,t).then(e=>e).catch(e=>{console.warn(e)})}static get session(){return{id:I0.sessionId,page:0}}static get sender(){return{id:I0.senderId,os:navigator.oscpu,user_agent:window.navigator.userAgent,domain:window.location.hostname,deployment:I0.deployment,editor_version:WirisPlugin.currentInstance.environment.editorVersion?WirisPlugin.currentInstance.environment.editorVersion:"",language:WirisPlugin.currentInstance.language,product_version:WirisPlugin.currentInstance.version,backend:WirisPlugin.currentInstance.serviceProviderProperties.server?WirisPlugin.currentInstance.serviceProviderProperties.server:""}}static get deployment(){const{editor:e}=WirisPlugin.currentInstance.environment;let t="";return/Generic/.test(e)?t="generic":/Froala/.test(e)?t="froala":/CKEditor/.test(e)?t="ckeditor":/TinyMCE/.test(e)&&(t="tinymce"),`mathtype-web-plugin-${t}`}static composeBody(e){return{messages:e,sender:I0.sender,session:I0.session}}static composeUUID(){return O0()}static composeSenderUUID(){return this.composeUUID()}static composeCookie(e,t,n){return`${e}=${t}${null==n?"":`; max-age=${n}`}`}}I0.endpoint="https://telemetry.wiris.net",I0._senderId="",I0._sessionId="";var M0='<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.76 13.76"\n   height="13.76"\n   width="13.76"\n   id="svg3813"\n   version="1.1">\n  <metadata\n     id="metadata3819">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs3817" />\n  <image\n     y="0"\n     x="0"\n     id="image3821"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA\nnUlEQVRYw+3Z0QnCMBSF4T/FATqCG1g3cISO0NE6iiPoCE5gneD40ohPvgkJ/AcC9/EjHELgliT0\nkoGOIlasWLFixYoVK1asWLFixYoVK1bsjxy+5hlYgLEx47ofSEKSJW1nTUJJMgLPDlpwHoCpk8rO\nvgZixf4Zu3Vi3cq+WroBp4ahL+BYa3AB7o1CH7vvc7M1U4N/g2sdSk8bxjfDaMNdr+hmAQAAAABJ\nRU5ErkJggg==\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.76" />\n</svg>\n',P0='<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.76 13.76"\n   height="13.76"\n   width="13.76"\n   id="svg32"\n   version="1.1">\n  <metadata\n     id="metadata38">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs36" />\n  <image\n     y="0"\n     x="0"\n     id="image40"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA\npklEQVRYw+3ZLQ4CMRCG4bcbFOvXg99T7FG4BafAw1VALx7dWyy2mIoGgSOZJu/n6p70ZybppFIK\nvWSgo4gVK1asWLFixYoVK1asWLFixYoV+yO7r/UMHIAxiO8FZGBrsUfgDEwBN/QNXIA11S/PW1Bo\nCz4N9ein4Nd1Dyw9PbDR0iVW7J+xudax6HkOtZVdg0MfQE7N0G4GlmANYgNW4A6QepowfgDMXB26\nb1V6LAAAAABJRU5ErkJggg==\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.76" />\n</svg>\n';class D0{constructor(e){this.attributes=e;const t=navigator.userAgent.toLowerCase(),n=t.indexOf("android")>-1,r=g0.isIOS();this.iosSoftkeyboardOpened=!1,this.iosMeasureUnit=-1===t.indexOf("crios")?"%":"vh",this.iosDivHeight=`100%${this.iosMeasureUnit}`;const i=window.outerWidth,a=window.outerHeight,o=i>a,s=i<a,l=o&&this.attributes.height>a,c=s&&this.attributes.width>i,u=l||c;this.instanceId=document.getElementsByClassName("wrs_modal_dialogContainer").length,this.deviceProperties={orientation:o?"landscape":"portait",isAndroid:n,isIOS:r,isMobile:u,isDesktop:!u&&!r&&!n},this.properties={created:!1,state:"",previousState:"",position:{bottom:0,right:10},size:{height:338,width:580}},this.websiteBeforeLockParameters=null;let d={class:"wrs_modal_overlay"};d.id=this.getElementId(d.class),this.overlay=d0.createElement("div",d),d={},d.class="wrs_modal_title_bar",d.id=this.getElementId(d.class),this.titleBar=d0.createElement("div",d),d={},d.class="wrs_modal_title",d.id=this.getElementId(d.class),this.title=d0.createElement("div",d),this.title.innerHTML="",d={},d.class="wrs_modal_close_button",d.id=this.getElementId(d.class),d.title=u0.get("close"),d.style={},this.closeDiv=d0.createElement("a",d),this.closeDiv.setAttribute("role","button");let h=`background-size: 10px; background-image: url(data:image/svg+xml;base64,${window.btoa('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.76 13.76"\n   height="13.76"\n   width="13.76"\n   id="svg3783"\n   version="1.1">\n  <metadata\n     id="metadata3789">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs3787" />\n  <image\n     y="0"\n     x="0"\n     id="image3791"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAACXBIWXMAAC4jAAAuIwF4pT92AAAB\nvklEQVRYw83Z23GDMBAF0AsNhBIowSVQgjuISnAJKSEdZNOBS6CDOBUkqSC4gs2PyGhAQg92se4M\n4w8bccYW2hVumBmRdAB6ADfopQcw2SOYNoIkAL8APgB8AzgLI0/2S/iy1xkt3B9m9h0dM9/YHxM4\nJ/c4MfPkGX+y763OyYVKgUPQTXAJdC84Bg2CS6Gl4FSoF7wHmgvOhbrgzsW+8L4YJegccrEj749R\ngs7ZXGdz8wbAeNbREcDTzrHvblEgBbAUFACuy6JALJeL0E/P9sbvmBnNojcgAM+oJ58AhrlnWM5Z\nA+C9RmiokakBvIJuNTLSc7hojqY0Mo8EB6Ep2CPBm9BU7BHgKDQHqwlOguZiNcDJ0JLe4FV4iaLY\nJjF16dLqnoob+EdDs8A1QJPBtUCTwDVBo+DaoJvgNvBIR6rDl9wirbA1QIPgVgl6VwHb+dAr7Jkk\nS/Pg3mCkVOslxxV9yBFqSqTA/3N2Utkzye3pftw5OxzQ5tHeddcdzGj3o4VgClUwowgtAVOs3BpF\naA6YUnsDowhNAVNu12UUoVtgCn2+ifxp1wO42Ner4KPR5dJ2tsse2ZLvTQxbVf4AmC2z7WnSvpIA\nAAAASUVORK5CYII=\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.76" />\n</svg>\n')})`,f=`background-size: 10px; background-image: url(data:image/svg+xml;base64,${window.btoa('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.76 13.76"\n   height="13.76"\n   width="13.76"\n   id="svg2"\n   version="1.1">\n  <metadata\n     id="metadata8">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs6" />\n  <image\n     y="0"\n     x="0"\n     id="image10"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAACXBIWXMAAC4jAAAuIwF4pT92AAAB\n2ElEQVRYw9XZoXPCMBTH8S+5KfDzQ29606CH3/SmQTO96aGHHn/F0Himh8eDZSblQknSJH2F0DtE\nQw8+12vyfulr7XY7LuW4qvj+DugD18AC+AE2woa+/mz07y9cF7Y8d7YPDEtjK2AsCB4BvdLYHPi0\nXawioAA3wAfQaQiKHhuFYl1QSbAL6gWrSKgEuArqBKsEaB1wKNQKVsasHybcpRhwLNQED0zsoMbz\nFwJOhWL6Cmzd2e0D14Wi1/k9di2wFNnAEtBifd9jv4GtIPgaeBOCAkzLFayr/6idWSSY6DJ8sHT9\n6VK6zRFqKwo5gQ+grnKbA/gI6gsy5wRboT7sucBOaBX21GAvNAR7KnAlNBTbNDgIGoMtwO/C0Gko\nNBZbN525tk+dJrAj4F4YGxXgVQS019DkCgarM0OjwCoDaDBYZQINAquMoJVglRnUC1YZQp1g1RB0\nJryn65jYJ0HoRGPHguDX8hsZ6VAiGX4eUrJBbHqSArdN7LLBmCcBnpvYWfHWo6E8Wge8Ar7Kj8E4\nARwcnBPBB20BE7uJBMdAU8BH/YvyBAsFp0BjwNZGi201qALXgYaAnR0hX2upAzwDj/p8raFL5I4u\n8ALc6vNfvc+ztq5al9Rh/AfwZZ/LmlMllAAAAABJRU5ErkJggg==\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.76" />\n</svg>\n')})`;this.closeDiv.setAttribute("style",h),this.closeDiv.setAttribute("onmouseover",`this.style = "${f}";`),this.closeDiv.setAttribute("onmouseout",`this.style = "${h}";`),d={},d.class="wrs_modal_stack_button",d.id=this.getElementId(d.class),d.title=u0.get("exit_fullscreen"),this.stackDiv=d0.createElement("a",d),this.stackDiv.setAttribute("role","button"),h=`background-size: 10px; background-image: url(data:image/svg+xml;base64,${window.btoa('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.76 13.76"\n   height="13.76"\n   width="13.76"\n   id="svg3823"\n   version="1.1">\n  <metadata\n     id="metadata3829">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs3827" />\n  <image\n     y="0"\n     x="0"\n     id="image3831"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\njwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAAHOSURBVFhH1ZiLUcMwEEQNDcQl0AEuISVABZhO\nUkroICVAB6ECoINQgdmVfR5FlmQrkZzjzezEzsc8NPqcdNd1XfVfuB9ec3NAmv4yiRo5ImzBlm+c\nwZYtEHJCGsT3eSgHxKZFxs/tL+aMkCK8R3yMwu4PcsVmiXBIVDDCvh/miEtMeE5UaEsNMJcN8o64\ng26PvPSXs9S+/zRHQtgtvLRFCb9blZpnYw/9Rb6RR3M3zxtiprFbyKYwipK1+uwlnIkSrbITUaJR\n1itKtMkGRYk2WRZAQbTNBpzWtggrrwnaWja00hk0DrCgsEZZ4hXWKksmwjLAHobkgOv+V3+ZhXHQ\niWxKqXYLKNyILDdqbPKlldASPhA+Mxc7uwatkSOSix1iP//q2APshLBvfJo7hbizgQj/mDtl+KYu\nCj8h7NSqCM2zXJvZwqqEY4uCOuGYLKEwJ3kVzMlyscg5915FTFbdqhaSVbn8+mTV1gmurOqCxpZN\nEeUu9BlZd1obioTkQ7IhPGTjYZuPIoUMK/GUFrX39asuHJTlH3w1d3FCBxCrCUufZX+NCUdPSsAq\nwu4A8wnPiQrFhW1Z4govFRWKCoeOjzjoZF92CdwpZy6AquoPvJRHJxB8bJ8AAAAASUVORK5CYII=\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.76" />\n</svg>\n')})`,f=`background-size: 10px; background-image: url(data:image/svg+xml;base64,${window.btoa('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.76 13.76"\n   height="13.76"\n   width="13.76"\n   id="svg42"\n   version="1.1">\n  <metadata\n     id="metadata48">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs46" />\n  <image\n     y="0"\n     x="0"\n     id="image50"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\njwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAAG/SURBVFhH1ZgxUsMwEEUNJRyAGmp6qKGn5xRQ\nQ08NNfRQQw11DpAaanIAWrMv8WaELSlexhLLm/mRnImiF48jr7zVtm3zX9ju2ik5llxLdpdHNg4k\nT5I7yWB8Cdl9yZHkRmIRRpQxOxK+YzC+hKwSnTBBKKoMxpeUBSbkksgRE1V+CJeWhUPJ5ao7ICeq\nrIVryMKJpC88RlTZk1SThVDYIvoluZIsSqyz511SfEg4UxbRdw5qnlmFa9AsCn8hO4aBKHiUjYqC\nN9mkKHiSzYqCJ9lPSVIUPMmySqTudEu8XbOxO90ab7KQFPYoC1Fhr7IwENbagMLCUtXnoCTM1QZW\n3iS3dFT2mRfHvEjuVfZUckFnQh67dgqo1GYqC1MLn3XtZIR/sFcJW2C39FcD18KxpcutcGqddSmc\nuykg/LDq+iAnC/OudUFOVrfLbkjJWvb11YjJuhSFvqxbUQhlXYuCylpE2YXy2SkLlVEgaxVluzyT\nIEutWQ1kKZYtouF2maK4mjCyFN6bJsw9gKgmrNdsbsKNT0qEKsIqC7EJx4gqxYVDWQgntIgqRYXD\nbY3CLpcVgmdPC974BYy3/MgRNM03hR9ubFTHT48AAAAASUVORK5CYII=\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.76" />\n</svg>\n')})`,this.stackDiv.setAttribute("style",h),this.stackDiv.setAttribute("onmouseover",`this.style = "${f}";`),this.stackDiv.setAttribute("onmouseout",`this.style = "${h}";`),d={},d.class="wrs_modal_maximize_button",d.id=this.getElementId(d.class),d.title=u0.get("fullscreen"),this.maximizeDiv=d0.createElement("a",d),this.maximizeDiv.setAttribute("role","button"),h=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.76 13.76"\n   height="13.76"\n   width="13.76"\n   id="svg3793"\n   version="1.1">\n  <metadata\n     id="metadata3799">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs3797" />\n  <image\n     y="0"\n     x="0"\n     id="image3801"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\njwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAAG4SURBVFhHvZnhUYNAEEbRBkwH2oGUkA40FWgJ\nKSEdaAmxA0vQDmIHKSFWgPuAHZkEAnd8y5v5kuNHMm+WY1mSm6qqCiGlZdUspXzxopY9Wu6bpZQf\nSxlRWapwVx9p2dy2CxUHy9ryWx9pKdWyECYcIQshwlGyIBeOlAWpcLQsyISXkAWEX5tlPkvJwnP7\nns1SsnvLS7PMZwlZiShEy8pEIVJWKgpRsnJRiJBNFf2wbCzjfZgRUZi9JYWDxT9bWk6WIXbKym4t\nKRVloObO5oze6ZClWX9a5jyOcOrfmuUkXPRUH/1zVRhZpvsnCxN+jnDqHh0SdQaFu9vg0ZIqrBZ1\neoXP92yKcJSocyHcd4FNEY4WdbrCR1rGrukMF9BWVhZvLZ7U9rS2nH9HVvoq63iFu+RUlOpIuCYL\nCCPIqVjq1A9j5R3aBnMY2kKzMlbZHPQVbVHLhomCUjZUFFSy35ZQUVDIMo+Gi4JCltFwERSy75Y5\n4+VkFLLcKHLHyyRUF1jOeJmMShbChZWy0Df8yFDLgg8/cpCN6I9cdHJhZHmy7X2anAnCtDUZ/j/Y\ng2X2j709MHhTDAFF8QdK9SRpUl2yFgAAAABJRU5ErkJggg==\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.76" />\n</svg>\n')})`,f=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.76 13.76"\n   height="13.76"\n   width="13.76"\n   id="svg12"\n   version="1.1">\n  <metadata\n     id="metadata18">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs16" />\n  <image\n     y="0"\n     x="0"\n     id="image20"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\njwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAAGMSURBVFhHvdk7TsNAFIVhQ0l6elLDJqCGngXQ\nU7MA6rALahZATQ81C6APrXP/jEaKHD/i8TnzS1eaICF/2I4f4qxt20bYOmaVlrK2Mb8s1Nj3mIu0\nlPYZszlPa1kvMf9pKe02Zq3Gcrhc4JUaSzawA0sWsAtLcrATS1KwG0sycA0sAd6kZXm1sNzVHtOy\nvBpYoK8xV/tPC3JjZVByYqVQcmHlUHJgLVBSY0ugPP7xO5PXYSW2FMr19ytm8sahxD7ElEBzk3c6\nsFysn/afymKPvsXMueh3oblRMNibmPuYZ34wsyWHfqhB8OFpwKvDHLADmusFd8/ZU8FOaO4I3PcF\nmwLXgOYOwVtexdnwdUy3vg2UQPnD2eji+vZsrruHS/eoBEpjWMpgrhi1Dv1gY6fBkuRQmtqzJVmg\npMbaoKTEWqGkwtqhpMBWgZICWwVKCuwpzxKSFNi5T2vFqb5gVcAqLNnBSixZwWos2cBg/9JSmgUM\n9iMt5QFe8tZ8VP6n3WXMHQtxPzHfabm0ptkBwWhpthzMp7YAAAAASUVORK5CYII=\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.76" />\n</svg>\n')})`,this.maximizeDiv.setAttribute("style",h),this.maximizeDiv.setAttribute("onmouseover",`this.style = "${f}";`),this.maximizeDiv.setAttribute("onmouseout",`this.style = "${h}";`),d={},d.class="wrs_modal_minimize_button",d.id=this.getElementId(d.class),d.title=u0.get("minimize"),this.minimizeDiv=d0.createElement("a",d),this.minimizeDiv.setAttribute("role","button"),h=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(M0)})`,f=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(P0)})`,this.minimizeDiv.setAttribute("style",h),this.minimizeDiv.setAttribute("onmouseover",`this.style = "${f}";`),this.minimizeDiv.setAttribute("onmouseout",`this.style = "${h}";`),d={},d.class="wrs_modal_dialogContainer",d.id=this.getElementId(d.class),d.role="dialog",this.container=d0.createElement("div",d),this.container.setAttribute("aria-labeledby","wrs_modal_title[0]"),d={},d.class="wrs_modal_wrapper",d.id=this.getElementId(d.class),this.wrapper=d0.createElement("div",d),d={},d.class="wrs_content_container",d.id=this.getElementId(d.class),this.contentContainer=d0.createElement("div",d),d={},d.class="wrs_modal_controls",d.id=this.getElementId(d.class),this.controls=d0.createElement("div",d),d={},d.class="wrs_modal_buttons_container",d.id=this.getElementId(d.class),this.buttonContainer=d0.createElement("div",d),this.submitButton=this.createSubmitButton({id:this.getElementId("wrs_modal_button_accept"),class:"wrs_modal_button_accept",innerHTML:u0.get("accept")},this.submitAction.bind(this)),this.cancelButton=this.createSubmitButton({id:this.getElementId("wrs_modal_button_cancel"),class:"wrs_modal_button_cancel",innerHTML:u0.get("cancel")},this.cancelAction.bind(this)),this.contentManager=null;const p={cancelString:u0.get("cancel"),submitString:u0.get("close"),message:u0.get("close_modal_warning")},m={closeCallback:()=>{this.close()},cancelCallback:()=>{this.focus()}},g={overlayElement:this.container,callbacks:m,strings:p};this.popup=new _0(g),this.rtl=!1,"rtl"in this.attributes&&(this.rtl=this.attributes.rtl),this.handleOpenedIosSoftkeyboard=this.handleOpenedIosSoftkeyboard.bind(this),this.handleClosedIosSoftkeyboard=this.handleClosedIosSoftkeyboard.bind(this)}setContentManager(e){this.contentManager=e}getContentManager(){return this.contentManager}submitAction(){void 0!==this.contentManager.submitAction&&this.contentManager.submitAction(),this.close()}cancelAction(){void 0===this.contentManager.hasChanges?(R0.setActionsOnCancelButtons(),this.close()):this.contentManager.hasChanges()?this.showPopUpMessage():(R0.setActionsOnCancelButtons(),this.close())}createSubmitButton(e,t){return new class{constructor(){this.element=document.createElement("button"),this.element.id=e.id,this.element.className=e.class,this.element.innerHTML=e.innerHTML,d0.addEvent(this.element,"click",t)}getElement(){return this.element}}(e,t).getElement()}create(){this.titleBar.appendChild(this.closeDiv),this.titleBar.appendChild(this.stackDiv),this.titleBar.appendChild(this.maximizeDiv),this.titleBar.appendChild(this.minimizeDiv),this.titleBar.appendChild(this.title),this.deviceProperties.isDesktop&&this.container.appendChild(this.titleBar),this.wrapper.appendChild(this.contentContainer),this.wrapper.appendChild(this.controls),this.controls.appendChild(this.buttonContainer),this.buttonContainer.appendChild(this.submitButton),this.buttonContainer.appendChild(this.cancelButton),this.container.appendChild(this.wrapper),this.recalculateScrollBar(),document.body.appendChild(this.container),document.body.appendChild(this.overlay),this.deviceProperties.isDesktop?(this.createModalWindowDesktop(),this.createResizeButtons(),this.addListeners(),i0.get("modalWindowFullScreen")&&this.maximize()):this.deviceProperties.isAndroid?this.createModalWindowAndroid():this.deviceProperties.isIOS&&this.createModalWindowIos(),null!=this.contentManager&&this.contentManager.insert(this),this.properties.open=!0,this.properties.created=!0,this.isRTL()&&(this.container.style.right=`${window.innerWidth-this.scrollbarWidth-this.container.offsetWidth}px`,this.container.className+=" wrs_modal_rtl")}createResizeButtons(){this.resizerBR=document.createElement("div"),this.resizerBR.className="wrs_bottom_right_resizer",this.resizerBR.innerHTML="◢",this.resizerTL=document.createElement("div"),this.resizerTL.className="wrs_bottom_left_resizer",this.container.appendChild(this.resizerBR),this.titleBar.appendChild(this.resizerTL),d0.addEvent(this.resizerBR,"mousedown",this.activateResizeStateBR.bind(this)),d0.addEvent(this.resizerTL,"mousedown",this.activateResizeStateTL.bind(this))}activateResizeStateBR(e){this.initializeResizeProperties(e,!1)}activateResizeStateTL(e){this.initializeResizeProperties(e,!0)}initializeResizeProperties(e,t){d0.addClass(document.body,"wrs_noselect"),d0.addClass(this.overlay,"wrs_overlay_active"),this.resizeDataObject={x:this.eventClient(e).X,y:this.eventClient(e).Y},this.initialWidth=parseInt(this.container.style.width,10),this.initialHeight=parseInt(this.container.style.height,10),t?this.leftScale=!0:(this.initialRight=parseInt(this.container.style.right,10),this.initialBottom=parseInt(this.container.style.bottom,10)),this.initialRight||(this.initialRight=0),this.initialBottom||(this.initialBottom=0),document.body.style["user-select"]="none"}open(){try{I0.send([{timestamp:(new Date).toJSON(),topic:"0",level:"info",message:"HELO telemetry.wiris.net"}]).then(e=>{})}catch(e){}this.removeClass("wrs_closed");const{isIOS:e}=this.deviceProperties,{isAndroid:t}=this.deviceProperties,{isMobile:n}=this.deviceProperties;if((e||t||n)&&(this.restoreWebsiteScale(),this.lockWebsiteScroll(),setTimeout(()=>{this.hideKeyboard()},400)),this.properties.created?(this.properties.open||(this.properties.open=!0,this.deviceProperties.isAndroid||this.deviceProperties.isIOS||this.restoreState()),this.deviceProperties.isDesktop&&i0.get("modalWindowFullScreen")&&this.maximize(),this.deviceProperties.isIOS&&(this.iosSoftkeyboardOpened=!1,this.setContainerHeight(`${100+this.iosMeasureUnit}`))):this.create(),g0.isEditorLoaded())this.contentManager.onOpen(this);else{const e=o0.newListener("onLoad",()=>{this.contentManager.onOpen(this)});this.contentManager.addListener(e)}}close(){this.removeClass("wrs_maximized"),this.removeClass("wrs_minimized"),this.removeClass("wrs_stack"),this.addClass("wrs_closed"),this.saveModalProperties(),this.unlockWebsiteScroll(),this.properties.open=!1}restoreWebsiteScale(){let e=document.querySelector("meta[name=viewport]");const t=["initial-scale=","minimum-scale=","maximum-scale="],n=["1.0","1.0","1.0"],r=(e,t)=>{const r=e.getAttribute("content");if(r){const i=r.split(",");let a="";const o=[];for(let e=0;e<i.length;e+=1){let n=!1,r=0;for(;!n&&r<t.length;)i[e].indexOf(t[r])&&(n=!0),r+=1;n||o.push(i[e])}for(let e=0;e<t.length;e+=1){const r=t[e]+n[e];a+=0===e?r:`,${r}`}for(let e=0;e<o.length;e+=1)a+=`,${o[e]}`;e.setAttribute("content",a),e.setAttribute("content",""),e.setAttribute("content",r)}else e.setAttribute("content","initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"),e.removeAttribute("content")};e?r(e,t):(e=document.createElement("meta"),document.getElementsByTagName("head")[0].appendChild(e),r(e,t),e.remove())}lockWebsiteScroll(){this.websiteBeforeLockParameters={bodyStylePosition:document.body.style.position?document.body.style.position:"",bodyStyleOverflow:document.body.style.overflow?document.body.style.overflow:"",htmlStyleOverflow:document.documentElement.style.overflow?document.documentElement.style.overflow:"",windowScrollX:window.scrollX,windowScrollY:window.scrollY}}unlockWebsiteScroll(){if(this.websiteBeforeLockParameters){document.body.style.position=this.websiteBeforeLockParameters.bodyStylePosition,document.body.style.overflow=this.websiteBeforeLockParameters.bodyStyleOverflow,document.documentElement.style.overflow=this.websiteBeforeLockParameters.htmlStyleOverflow;const{windowScrollX:e}=this.websiteBeforeLockParameters,{windowScrollY:t}=this.websiteBeforeLockParameters;window.scrollTo(e,t),this.websiteBeforeLockParameters=null}}isIE11(){return navigator.userAgent.search("Msie/")>=0||navigator.userAgent.search("Trident/")>=0||navigator.userAgent.search("Edge/")>=0}isRTL(){return"ar"===this.attributes.language||"he"===this.attributes.language||this.rtl}addClass(e){d0.addClass(this.overlay,e),d0.addClass(this.titleBar,e),d0.addClass(this.overlay,e),d0.addClass(this.container,e),d0.addClass(this.contentContainer,e),d0.addClass(this.stackDiv,e),d0.addClass(this.minimizeDiv,e),d0.addClass(this.maximizeDiv,e),d0.addClass(this.wrapper,e)}removeClass(e){d0.removeClass(this.overlay,e),d0.removeClass(this.titleBar,e),d0.removeClass(this.overlay,e),d0.removeClass(this.container,e),d0.removeClass(this.contentContainer,e),d0.removeClass(this.stackDiv,e),d0.removeClass(this.minimizeDiv,e),d0.removeClass(this.maximizeDiv,e),d0.removeClass(this.wrapper,e)}createModalWindowDesktop(){this.addClass("wrs_modal_desktop"),this.stack()}createModalWindowAndroid(){this.addClass("wrs_modal_android"),window.addEventListener("resize",this.orientationChangeAndroidSoftkeyboard.bind(this))}createModalWindowIos(){this.addClass("wrs_modal_ios"),window.addEventListener("resize",this.orientationChangeIosSoftkeyboard.bind(this))}restoreState(){"maximized"===this.properties.state?this.maximize():"minimized"===this.properties.state?(this.properties.state=this.properties.previousState,this.properties.previousState="",this.minimize()):this.stack()}stack(){this.properties.previousState=this.properties.state,this.properties.state="stack",this.removeClass("wrs_maximized"),this.minimizeDiv.title=u0.get("minimize"),this.removeClass("wrs_minimized"),this.addClass("wrs_stack");const e=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(M0)})`,t=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(P0)})`;this.minimizeDiv.setAttribute("style",e),this.minimizeDiv.setAttribute("onmouseover",`this.style = "${t}";`),this.minimizeDiv.setAttribute("onmouseout",`this.style = "${e}";`),this.restoreModalProperties(),void 0!==this.resizerBR&&void 0!==this.resizerTL&&this.setResizeButtonsVisibility(),this.recalculateScrollBar(),this.recalculatePosition(),this.recalculateScale(),this.focus()}minimize(){if(this.saveModalProperties(),this.title.style.cursor="pointer","minimized"===this.properties.state&&"stack"===this.properties.previousState)this.stack();else if("minimized"===this.properties.state&&"maximized"===this.properties.previousState)this.maximize();else{this.container.style.height="30px",this.container.style.width="250px",this.container.style.bottom="0px",this.container.style.right="10px",this.removeListeners(),this.properties.previousState=this.properties.state,this.properties.state="minimized",this.setResizeButtonsVisibility(),this.minimizeDiv.title=u0.get("maximize"),d0.containsClass(this.overlay,"wrs_stack")?this.removeClass("wrs_stack"):this.removeClass("wrs_maximized"),this.addClass("wrs_minimized");const e=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.44 13.76"\n   height="13.76"\n   width="13.44"\n   id="svg3803"\n   version="1.1">\n  <metadata\n     id="metadata3809">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs3807" />\n  <image\n     y="0"\n     x="0"\n     id="image3811"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAArCAYAAAAOnxr+AAAACXBIWXMAAC4jAAAuIwF4pT92AAAA\nvElEQVRYw+3ZSw0CMRSF4b8T9iAFB4wDkDAWcICEkTA4GAeAA3AADurgsCkbAgsSMrmFczZNd1/a\n3vSVJFFDGipJNdBZaRdAB2wC2TIwAgNAkrQEjsA86GBegDZJGoF18JnfJtVR9idXvaGGGmrod/b6\nV9kD14k9LbD6FDqUM8CU2b2Deo0aaqihhhpqqKGGGhr1hH/wiP469FaBMzflEhc9PZKQ1CtmsqRO\nEunpHbeNNN3A+dFJ/mf6V+gduGPIoUgKLbAAAAAASUVORK5CYII=\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.44" />\n</svg>\n')})`,t=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   viewBox="0 0 13.44 13.76"\n   height="13.76"\n   width="13.44"\n   id="svg22"\n   version="1.1">\n  <metadata\n     id="metadata28">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs26" />\n  <image\n     y="0"\n     x="0"\n     id="image30"\n     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAArCAYAAAAOnxr+AAAACXBIWXMAAC4jAAAuIwF4pT92AAAA\nvUlEQVRYw+3ZsQ3CMBCF4d8WFekZgBqWIDUDZACmYBQWYIn0pGYAegZIexROERHRIBTdhXeVy08+\nyT4/JzMjQmWCVBjoarSugK0z3/0degKODjeyBy5Am8ysARrnnT8nM7sCa+fQLgdAAlQ6ngQVVFBB\nfzeUTK6t8VAwU328ztV6QQUVVFBBBRVUUEG9Ds41sJvZs/8GelDrlw7tAjhvmZLo9o6RD4bEGUp+\nX1My/I0T4HN4rrcASf9M/wp9ASNzIKYYz2hAAAAAAElFTkSuQmCC\n"\n     style="image-rendering:optimizeQuality"\n     preserveAspectRatio="none"\n     height="13.76"\n     width="13.44" />\n</svg>\n')})`;this.minimizeDiv.setAttribute("style",e),this.minimizeDiv.setAttribute("onmouseover",`this.style = "${t}";`),this.minimizeDiv.setAttribute("onmouseout",`this.style = "${e}";`)}}maximize(){this.saveModalProperties(),"maximized"!==this.properties.state&&(this.properties.previousState=this.properties.state,this.properties.state="maximized"),this.setResizeButtonsVisibility(),d0.containsClass(this.overlay,"wrs_minimized")?(this.minimizeDiv.title=u0.get("minimize"),this.removeClass("wrs_minimized")):d0.containsClass(this.overlay,"wrs_stack")&&(this.container.style.left=null,this.container.style.top=null,this.removeClass("wrs_stack")),this.addClass("wrs_maximized");const e=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(M0)})`,t=`background-size: 10px; background-repeat: no-repeat; background-image: url(data:image/svg+xml;base64,${window.btoa(P0)})`;this.minimizeDiv.setAttribute("style",e),this.minimizeDiv.setAttribute("onmouseover",`this.style = "${t}";`),this.minimizeDiv.setAttribute("onmouseout",`this.style = "${e}";`),this.setSize(parseInt(.8*window.innerHeight,10),parseInt(.8*window.innerWidth,10)),this.container.clientHeight>700&&(this.container.style.height="700px"),this.container.clientWidth>1200&&(this.container.style.width="1200px");const{innerHeight:n}=window,{innerWidth:r}=window,{offsetHeight:i}=this.container,{offsetWidth:a}=this.container,o=n/2-i/2,s=r/2-a/2;this.setPosition(o,s),this.recalculateScale(),this.recalculatePosition(),this.recalculateSize(),this.focus()}reExpand(){"minimized"===this.properties.state&&("maximized"===this.properties.previousState?this.maximize():this.stack(),this.title.style.cursor="")}setSize(e,t){this.container.style.height=`${e}px`,this.container.style.width=`${t}px`,this.recalculateSize()}setPosition(e,t){this.container.style.bottom=`${e}px`,this.container.style.right=`${t}px`}saveModalProperties(){"stack"===this.properties.state&&(this.properties.position.bottom=parseInt(this.container.style.bottom,10),this.properties.position.right=parseInt(this.container.style.right,10),this.properties.size.width=parseInt(this.container.style.width,10),this.properties.size.height=parseInt(this.container.style.height,10))}restoreModalProperties(){"stack"===this.properties.state&&(this.setPosition(this.properties.position.bottom,this.properties.position.right),this.setSize(this.properties.size.height,this.properties.size.width))}recalculateSize(){this.wrapper.style.width=`${this.container.clientWidth-12}px`,this.wrapper.style.height=`${this.container.clientHeight-38}px`,this.contentContainer.style.height=`${parseInt(this.wrapper.offsetHeight-50,10)}px`}setResizeButtonsVisibility(){"stack"===this.properties.state?(this.resizerTL.style.visibility="visible",this.resizerBR.style.visibility="visible"):(this.resizerTL.style.visibility="hidden",this.resizerBR.style.visibility="hidden")}addListeners(){this.maximizeDiv.addEventListener("click",this.maximize.bind(this),!0),this.stackDiv.addEventListener("click",this.stack.bind(this),!0),this.minimizeDiv.addEventListener("click",this.minimize.bind(this),!0),this.closeDiv.addEventListener("click",this.cancelAction.bind(this)),this.title.addEventListener("click",this.reExpand.bind(this)),this.overlay.addEventListener("click",this.cancelAction.bind(this)),d0.addEvent(window,"mousedown",this.startDrag.bind(this)),d0.addEvent(window,"mouseup",this.stopDrag.bind(this)),d0.addEvent(window,"mousemove",this.drag.bind(this)),d0.addEvent(window,"resize",this.onWindowResize.bind(this)),d0.addEvent(this.container,"keydown",this.onKeyDown.bind(this))}removeListeners(){d0.removeEvent(window,"mousedown",this.startDrag),d0.removeEvent(window,"mouseup",this.stopDrag),d0.removeEvent(window,"mousemove",this.drag),d0.removeEvent(window,"resize",this.onWindowResize),d0.removeEvent(this.container,"keydown",this.onKeyDown)}eventClient(e){if(void 0===e.clientX&&e.changedTouches){return{X:e.changedTouches[0].clientX,Y:e.changedTouches[0].clientY}}return{X:e.clientX,Y:e.clientY}}startDrag(e){"minimized"!==this.properties.state&&e.target===this.title&&(void 0!==this.dragDataObject&&null!==this.dragDataObject||(this.dragDataObject={x:this.eventClient(e).X,y:this.eventClient(e).Y},this.lastDrag={x:"0px",y:"0px"},""===this.container.style.right&&(this.container.style.right="0px"),""===this.container.style.bottom&&(this.container.style.bottom="0px"),this.isIE11(),d0.addClass(document.body,"wrs_noselect"),d0.addClass(this.overlay,"wrs_overlay_active"),this.limitWindow=this.getLimitWindow()))}drag(e){if(this.dragDataObject){e.preventDefault();let t=Math.min(this.eventClient(e).Y,this.limitWindow.minPointer.y);t=Math.max(this.limitWindow.maxPointer.y,t);let n=Math.min(this.eventClient(e).X,this.limitWindow.minPointer.x);n=Math.max(this.limitWindow.maxPointer.x,n);const r=`${n-this.dragDataObject.x}px`,i=`${t-this.dragDataObject.y}px`;this.lastDrag={x:r,y:i},this.container.style.transform=`translate3d(${r},${i},0)`}if(this.resizeDataObject){const{innerWidth:t}=window,{innerHeight:n}=window;let r,i=Math.min(this.eventClient(e).X,t-this.scrollbarWidth-7),a=Math.min(this.eventClient(e).Y,n-7);i<0&&(i=0),a<0&&(a=0),r=this.leftScale?-1:1,this.container.style.width=`${this.initialWidth+r*(i-this.resizeDataObject.x)}px`,this.container.style.height=`${this.initialHeight+r*(a-this.resizeDataObject.y)}px`,this.leftScale||(this.resizeDataObject.x-i-this.initialWidth<-580?this.container.style.right=`${this.initialRight-(i-this.resizeDataObject.x)}px`:(this.container.style.right=`${this.initialRight+this.initialWidth-580}px`,this.container.style.width="580px"),this.resizeDataObject.y-a<this.initialHeight-338?this.container.style.bottom=`${this.initialBottom-(a-this.resizeDataObject.y)}px`:(this.container.style.bottom=`${this.initialBottom+this.initialHeight-338}px`,this.container.style.height="338px")),this.recalculateScale(),this.recalculatePosition()}}getLimitWindow(){const e=window.innerWidth,t=window.innerHeight,{offsetHeight:n}=this.container,r=parseInt(this.container.style.bottom,10),i=parseInt(this.container.style.right,10),{pageXOffset:a}=window,o=this.dragDataObject.y,s=this.dragDataObject.x,l=n+r-(t-(o-a)),c=e-this.scrollbarWidth-(s-a)-i,u=t-this.container.offsetHeight+l,d=this.title.offsetHeight-(this.title.offsetHeight-l);return{minPointer:{x:e-c-this.scrollbarWidth,y:u},maxPointer:{x:this.container.offsetWidth-c,y:d}}}getScrollBarWidth(){const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);const n=e.offsetWidth;t.style.overflow="scroll";let r=e.offsetWidth;return n===r&&(r=t.clientWidth),document.body.removeChild(t),n-r}stopDrag(){(this.dragDataObject||this.resizeDataObject)&&(this.container.style.transform="",this.dragDataObject&&(this.container.style.right=`${parseInt(this.container.style.right,10)-parseInt(this.lastDrag.x,10)}px`,this.container.style.bottom=`${parseInt(this.container.style.bottom,10)-parseInt(this.lastDrag.y,10)}px`),this.focus(),document.body.style["user-select"]="",this.isIE11(),d0.removeClass(document.body,"wrs_noselect"),d0.removeClass(this.overlay,"wrs_overlay_active")),this.dragDataObject=null,this.resizeDataObject=null,this.initialWidth=null,this.leftScale=null}onWindowResize(){this.recalculateScrollBar(),this.recalculatePosition(),this.recalculateScale()}onKeyDown(e){void 0!==e.key&&("block"!==this.popup.overlayWrapper.style.display?"Escape"===e.key||"Esc"===e.key?this.properties.open&&this.contentManager.onKeyDown(e):e.shiftKey&&"Tab"===e.key?document.activeElement===this.cancelButton?(this.submitButton.focus(),e.stopPropagation(),e.preventDefault()):this.contentManager.onKeyDown(e):"Tab"===e.key&&(document.activeElement===this.submitButton?(this.cancelButton.focus(),e.stopPropagation(),e.preventDefault()):this.contentManager.onKeyDown(e)):this.popup.onKeyDown(e))}recalculatePosition(){this.container.style.right=`${Math.min(parseInt(this.container.style.right,10),window.innerWidth-this.scrollbarWidth-this.container.offsetWidth)}px`,parseInt(this.container.style.right,10)<0&&(this.container.style.right="0px"),this.container.style.bottom=`${Math.min(parseInt(this.container.style.bottom,10),window.innerHeight-this.container.offsetHeight)}px`,parseInt(this.container.style.bottom,10)<0&&(this.container.style.bottom="0px")}recalculateScale(){let e=!1;parseInt(this.container.style.width,10)>580?(this.container.style.width=`${Math.min(parseInt(this.container.style.width,10),window.innerWidth-this.scrollbarWidth)}px`,e=!0):(this.container.style.width="580px",e=!0),parseInt(this.container.style.height,10)>338?(this.container.style.height=`${Math.min(parseInt(this.container.style.height,10),window.innerHeight)}px`,e=!0):(this.container.style.height="338px",e=!0),e&&this.recalculateSize()}recalculateScrollBar(){this.hasScrollBar=window.innerWidth>document.documentElement.clientWidth,this.hasScrollBar?this.scrollbarWidth=this.getScrollBarWidth():this.scrollbarWidth=0}hideKeyboard(){const e=document.createElement("input");this.container.appendChild(e),e.focus(),e.blur(),e.remove()}focus(){null!=this.contentManager&&void 0!==this.contentManager.onFocus&&this.contentManager.onFocus()}portraitMode(){return window.innerHeight>window.innerWidth}handleOpenedIosSoftkeyboard(){this.iosSoftkeyboardOpened||null==this.iosDivHeight||this.iosDivHeight!==`100${this.iosMeasureUnit}`||(this.portraitMode()?this.setContainerHeight(`63${this.iosMeasureUnit}`):this.setContainerHeight(`40${this.iosMeasureUnit}`)),this.iosSoftkeyboardOpened=!0}handleClosedIosSoftkeyboard(){this.iosSoftkeyboardOpened=!1,this.setContainerHeight(`100${this.iosMeasureUnit}`)}orientationChangeIosSoftkeyboard(){this.iosSoftkeyboardOpened?this.portraitMode()?this.setContainerHeight(`63${this.iosMeasureUnit}`):this.setContainerHeight(`40${this.iosMeasureUnit}`):this.setContainerHeight(`100${this.iosMeasureUnit}`)}orientationChangeAndroidSoftkeyboard(){this.setContainerHeight("100%")}setContainerHeight(e){this.iosDivHeight=e,this.wrapper.style.height=e}showPopUpMessage(){"minimized"===this.properties.state&&this.stack(),this.popup.show()}setTitle(e){this.title.innerHTML=e}getElementId(e){return`${e}[${this.instanceId}]`}}var N0;
/*! http://mths.be/codepointat v0.1.0 by @mathias */String.prototype.codePointAt||(N0=function(e){if(null==this)throw TypeError();var t=String(this),n=t.length,r=e?Number(e):0;if(r!=r&&(r=0),!(r<0||r>=n)){var i,a=t.charCodeAt(r);return a>=55296&&a<=56319&&n>r+1&&(i=t.charCodeAt(r+1))>=56320&&i<=57343?1024*(a-55296)+i-56320+65536:a}},Object.defineProperty?Object.defineProperty(String.prototype,"codePointAt",{value:N0,configurable:!0,writable:!0}):String.prototype.codePointAt=N0),"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 n=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n},writable:!0,configurable:!0}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" s null or is not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var i,a,o=0|t,s=Math.max(o>=0?o:r-Math.abs(o),0);for(;s<r;){if((i=n[s])===(a=e)||"number"==typeof i&&"number"==typeof a&&isNaN(i)&&isNaN(a))return!0;s++}return!1}}),String.prototype.includes||(String.prototype.includes=function(e,t){if(e instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===t&&(t=0),-1!==this.indexOf(e,t)}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(e,t){var n=t>0?0|t:0;return this.substring(n,n+e.length)===e}});r(1576);class L0{constructor(e){this.language="en",this.editMode="images",this.modalDialog=null,this.customEditors=new v0;if(this.customEditors.addEditor("chemistry",{name:"Chemistry",toolbar:"chemistry",icon:"chem.png",confVariable:"chemEnabled",title:"ChemType",tooltip:"Insert a chemistry formula - ChemType"}),this.environment={},this.editionProperties={},this.editionProperties.isNewElement=!0,this.editionProperties.temporalImage=null,this.editionProperties.latexRange=null,this.editionProperties.range=null,this.integrationModel=null,this.contentManager=null,this.browser=(()=>{const e=navigator.userAgent;let t="none";return e.search("Edge/")>=0?t="EDGE":e.search("Chrome/")>=0?t="CHROME":e.search("Trident/")>=0?t="IE":e.search("Firefox/")>=0?t="FIREFOX":e.search("Safari/")>=0&&(t="SAFARI"),t})(),this.listeners=new o0,this.serviceProviderProperties={},!("serviceProviderProperties"in e))throw new Error("serviceProviderProperties property missing.");this.serviceProviderProperties=e.serviceProviderProperties}static get globalListeners(){return L0._globalListeners}static set globalListeners(e){L0._globalListeners=e}static get initialized(){return L0._initialized}static set initialized(e){L0._initialized=e}setIntegrationModel(e){this.integrationModel=e}setEnvironment(e){"editor"in e&&(this.environment.editor=e.editor),"mode"in e&&(this.environment.mode=e.mode),"version"in e&&(this.environment.version=e.version)}getModalDialog(){return this.modalDialog}init(){if(L0.initialized)this.listeners.fire("onLoad",{});else{const e=o0.newListener("onInit",()=>{const e=s0.getService("configurationjs","","get"),t=JSON.parse(e);i0.addConfiguration(t),i0.addConfiguration(y0),u0.language=this.language,this.listeners.fire("onLoad",{})});s0.addListener(e),s0.init(this.serviceProviderProperties),L0.initialized=!0}}addListener(e){this.listeners.add(e)}static addGlobalListener(e){L0.globalListeners.add(e)}beforeUpdateFormula(e,t){const n=new A0;return n.mathml=e,n.wirisProperties={},null!=t&&Object.keys(t).forEach(e=>{n.wirisProperties[e]=t[e]}),n.language=this.language,n.editMode=this.editMode,this.listeners.fire("onBeforeFormulaInsertion",n)?{}:L0.globalListeners.fire("onBeforeFormulaInsertion",n)?{}:{mathml:n.mathml,wirisProperties:n.wirisProperties}}insertFormula(e,t,n,r){const i={};if(n)if("latex"===this.editMode){if(i.latex=l0.getLatexFromMathML(n),this.integrationModel.fillNonLatexNode&&!i.latex){const r=new A0;r.editMode=this.editMode,r.windowTarget=t,r.focusElement=e,r.latex=i.latex,this.integrationModel.fillNonLatexNode(r,t,n)}else i.node=t.document.createTextNode(`$$${i.latex}$$`);this.insertElementOnSelection(i.node,e,t)}else i.node=p0.mathmlToImgObject(t.document,n,r,this.language),this.insertElementOnSelection(i.node,e,t);else this.insertElementOnSelection(null,e,t);return i}afterUpdateFormula(e,t,n,r){const i=new A0;return i.editMode=this.editMode,i.windowTarget=t,i.focusElement=e,i.node=n,i.latex=r,this.listeners.fire("onAfterFormulaInsertion",i)?{}:(L0.globalListeners.fire("onAfterFormulaInsertion",i),{})}placeCaretAfterNode(e){this.integrationModel.getSelection();const t=e.ownerDocument;if(void 0!==t.getSelection&&e.parentElement){const n=t.createRange();n.setStartAfter(e),n.collapse(!0);const r=t.getSelection();r.removeAllRanges(),r.addRange(n),t.body.focus()}}insertElementOnSelection(e,t,n){if(this.editionProperties.isNewElement)if(e)if("textarea"===t.type)d0.updateTextArea(t,e.textContent);else if(document.selection&&0===document.getSelection){let t=n.document.selection.createRange();if(n.document.execCommand("InsertImage",!1,e.src),"parentElement"in t||(n.document.execCommand("delete",!1),t=n.document.selection.createRange(),n.document.execCommand("InsertImage",!1,e.src)),"parentElement"in t){const n=t.parentElement();"IMG"===n.nodeName.toUpperCase()?n.parentNode.replaceChild(e,n):t.pasteHTML(d0.createObjectCode(e))}}else{const t=this.integrationModel.getSelection();let n=null;this.editionProperties.range?(({range:n}=this.editionProperties),this.editionProperties.range=null):n=t.getRangeAt(0),n.deleteContents();let r=n.startContainer;const i=n.startOffset;3===r.nodeType?(r=r.splitText(i),r.parentNode.insertBefore(e,r)):1===r.nodeType&&r.insertBefore(e,r.childNodes[i]),this.placeCaretAfterNode(e)}else if("textarea"===t.type)t.focus();else{const e=this.integrationModel.getSelection();if(e.removeAllRanges(),this.editionProperties.range){const{range:t}=this.editionProperties;this.editionProperties.range=null,e.addRange(t)}}else if(this.editionProperties.latexRange)document.selection&&0===document.getSelection?(this.editionProperties.isNewElement=!0,this.editionProperties.latexRange.select(),this.insertElementOnSelection(e,t,n)):(this.editionProperties.latexRange.deleteContents(),this.editionProperties.latexRange.insertNode(e),this.placeCaretAfterNode(e));else if("textarea"===t.type){let n;n=void 0!==this.integrationModel.getSelectedItem?this.integrationModel.getSelectedItem(t,!1):d0.getSelectedItemOnTextarea(t),d0.updateExistingTextOnTextarea(t,e.textContent,n.startPosition,n.endPosition)}else e&&"img"===e.nodeName.toLowerCase()?(h0.removeImgDataAttributes(this.editionProperties.temporalImage),h0.clone(e,this.editionProperties.temporalImage)):this.editionProperties.temporalImage.remove(),this.placeCaretAfterNode(this.editionProperties.temporalImage)}openModalDialog(e,t){this.editMode="images";try{if(t){e.contentWindow.focus();const t=e.contentWindow.getSelection();this.editionProperties.range=t.getRangeAt(0)}else{e.focus();const t=getSelection();this.editionProperties.range=t.getRangeAt(0)}}catch(e){this.editionProperties.range=null}if(void 0===t&&(t=!0),this.editionProperties.latexRange=null,e){let n;if(n=void 0!==this.integrationModel.getSelectedItem?this.integrationModel.getSelectedItem(e,t):d0.getSelectedItem(e,t),n){if(!n.caretPosition&&d0.containsClass(n.node,i0.get("imageClassName")))this.editionProperties.temporalImage=n.node,this.editionProperties.isNewElement=!1;else if(3===n.node.nodeType)if(this.integrationModel.getMathmlFromTextNode){const e=this.integrationModel.getMathmlFromTextNode(n.node,n.caretPosition);e&&(this.editMode="latex",this.editionProperties.isNewElement=!1,this.editionProperties.temporalImage=document.createElement("img"),this.editionProperties.temporalImage.setAttribute(i0.get("imageMathmlAttribute"),r0.safeXmlEncode(e)))}else{const r=l0.getLatexFromTextNode(n.node,n.caretPosition);if(r){const n=l0.getMathMLFromLatex(r.latex);this.editMode="latex",this.editionProperties.isNewElement=!1,this.editionProperties.temporalImage=document.createElement("img"),this.editionProperties.temporalImage.setAttribute(i0.get("imageMathmlAttribute"),r0.safeXmlEncode(n));const i=t?e.contentWindow:window;if("textarea"!==e.tagName.toLowerCase())if(document.selection){let e=0,t=r.startNode.previousSibling;for(;t;)e+=d0.getNodeLength(t),t=t.previousSibling;this.editionProperties.latexRange=i.document.selection.createRange(),this.editionProperties.latexRange.moveToElementText(r.startNode.parentNode),this.editionProperties.latexRange.move("character",e+r.startPosition),this.editionProperties.latexRange.moveEnd("character",r.latex.length+4)}else this.editionProperties.latexRange=i.document.createRange(),this.editionProperties.latexRange.setStart(r.startNode,r.startPosition),this.editionProperties.latexRange.setEnd(r.endNode,r.endPosition)}}}else"textarea"===e.tagName.toLowerCase()&&(this.editMode="latex")}const n=i0.get("editorAttributes").split(", "),r={};for(let e=0,t=n.length;e<t;e+=1){const t=n[e].split("="),i=t[0],a=t[1];r[i]=a}const i={},a=i0.get("editorParameters"),o=this.integrationModel.editorParameters;Object.assign(i,r,a),Object.assign(i,r,o),i.language=this.language,i.rtl=this.integrationModel.rtl;const s={};if(s.editorAttributes=i,s.language=this.language,s.customEditors=this.customEditors,s.environment=this.environment,null==this.modalDialog){this.modalDialog=new D0(i),this.contentManager=new g0(s);const e=o0.newListener("onLoad",()=>{if(this.contentManager.isNewElement=this.editionProperties.isNewElement,null!=this.editionProperties.temporalImage){const e=r0.safeXmlDecode(this.editionProperties.temporalImage.getAttribute(i0.get("imageMathmlAttribute")));this.contentManager.mathML=e}});this.contentManager.addListener(e),this.contentManager.init(),this.modalDialog.setContentManager(this.contentManager),this.contentManager.setModalDialogInstance(this.modalDialog)}else if(this.contentManager.isNewElement=this.editionProperties.isNewElement,null!=this.editionProperties.temporalImage){const e=r0.safeXmlDecode(this.editionProperties.temporalImage.getAttribute(i0.get("imageMathmlAttribute")));this.contentManager.mathML=e}this.contentManager.setIntegrationModel(this.integrationModel),this.modalDialog.open()}getCustomEditors(){return this.customEditors}}L0._globalListeners=new o0,L0._initialized=!1;class R0{constructor(e){if(this.language="en",this.serviceProviderProperties={},"serviceProviderProperties"in e&&(this.serviceProviderProperties=e.serviceProviderProperties),this.configurationService="","configurationService"in e&&(this.serviceProviderProperties.URI=e.configurationService,console.warn("Deprecated property configurationService. Use serviceParameters on instead.",[e.configurationService])),this.version="version"in e?e.version:"",this.target=null,!("target"in e))throw new Error("IntegrationModel constructor error: target property missed.");this.target=e.target,"scriptName"in e&&(this.scriptName=e.scriptName),this.callbackMethodArguments={},"callbackMethodArguments"in e&&(this.callbackMethodArguments=e.callbackMethodArguments),this.environment={},"environment"in e&&(this.environment=e.environment),this.isIframe=!1,null!=this.target&&(this.isIframe="IFRAME"===this.target.tagName.toUpperCase()),this.editorObject=null,"editorObject"in e&&(this.editorObject=e.editorObject),this.rtl=!1,"rtl"in e&&(this.rtl=e.rtl),this.managesLanguage=!1,"managesLanguage"in e&&(this.managesLanguage=e.managesLanguage),this.temporalImageResizing=!1,this.core=null,this.listeners=new o0,"integrationParameters"in e&&R0.integrationParameters.forEach(t=>{if(t in e.integrationParameters){const n=e.integrationParameters[t];0!==Object.keys(n).length&&(this[t]=n)}})}init(){this.language=this.getLanguage();const e=o0.newListener("onLoad",()=>{this.callbackFunction(this.callbackMethodArguments)});if(-1!==this.serviceProviderProperties.URI.indexOf("configuration")){const e=this.serviceProviderProperties.URI,t=s0.getServerLanguageFromService(e);this.serviceProviderProperties.server=t;const n=this.serviceProviderProperties.URI.indexOf("configuration"),r=this.serviceProviderProperties.URI.substring(0,n);this.serviceProviderProperties.URI=r}let t=this.serviceProviderProperties.URI;t=0===t.indexOf("/")||0===t.indexOf("http")?t:d0.concatenateUrl(this.getPath(),t),this.serviceProviderProperties.URI=t;const n={};n.serviceProviderProperties=this.serviceProviderProperties,this.setCore(new L0(n)),this.core.addListener(e),this.core.language=this.language,this.core.init(),this.core.setEnvironment(this.environment)}getPath(){if(void 0===this.scriptName)throw new Error("scriptName property needed for getPath.");const e=document.getElementsByTagName("script");let t="";for(let n=0;n<e.length;n+=1){const r=e[n].src.lastIndexOf(this.scriptName);r>=0&&(t=e[n].src.substr(0,r-1))}return t}getVersion(){return this.version}setLanguage(e){this.language=e}setCore(e){this.core=e,e.setIntegrationModel(this)}getCore(){return this.core}setTarget(e){this.target=e,this.isIframe="IFRAME"===this.target.tagName.toUpperCase()}setEditorObject(e){this.editorObject=e}openNewFormulaEditor(){this.core.editionProperties.isNewElement=!0,this.core.openModalDialog(this.target,this.isIframe)}openExistingFormulaEditor(){this.core.editionProperties.isNewElement=!1,this.core.openModalDialog(this.target,this.isIframe)}updateFormula(e){let t,n;this.editorParameters&&(e=com.wiris.editor.util.EditorUtils.addAnnotation(e,"application/vnd.wiris.mtweb-params+json",JSON.stringify(this.editorParameters)));this.isIframe?(t=this.target.contentWindow,n=this.target.contentWindow):(t=this.target,n=window);let r=this.core.beforeUpdateFormula(e,null);return r?(r=this.insertFormula(t,n,r.mathml,r.wirisProperties),r?this.core.afterUpdateFormula(r.focusElement,r.windowTarget,r.node,r.latex):""):""}insertFormula(e,t,n,r){return this.core.insertFormula(e,t,n,r)}getSelection(){return this.isIframe?(this.target.contentWindow.focus(),this.target.contentWindow.getSelection()):(this.target.focus(),window.getSelection())}addEvents(){const e=this.isIframe?this.target.contentWindow.document:this.target;d0.addElementEvents(e,(e,t)=>{this.doubleClickHandler(e,t)},(e,t)=>{this.mousedownHandler(e,t)},(e,t)=>{this.mouseupHandler(e,t)})}removeEvents(){const e=this.isIframe?this.target.contentWindow.document:this.target;d0.removeElementEvents(e)}doubleClickHandler(e){if("img"===e.nodeName.toLowerCase()){this.core.getCustomEditors().disable();const t=i0.get("imageCustomEditorName");if(e.hasAttribute(t)){const n=e.getAttribute(t);this.core.getCustomEditors().enable(n)}d0.containsClass(e,i0.get("imageClassName"))&&(this.core.editionProperties.temporalImage=e,this.core.editionProperties.isNewElement=!0,this.openExistingFormulaEditor())}}mouseupHandler(){this.temporalImageResizing&&setTimeout(()=>{h0.fixAfterResize(this.temporalImageResizing)},10)}mousedownHandler(e){"img"===e.nodeName.toLowerCase()&&d0.containsClass(e,i0.get("imageClassName"))&&(this.temporalImageResizing=e)}getLanguage(){return this.getBrowserLanguage()}getBrowserLanguage(){let e="en";return e=navigator.userLanguage?navigator.userLanguage.substring(0,2):navigator.language?navigator.language.substring(0,2):"en",e}callbackFunction(){const e=o0.newListener("onTargetReady",()=>{this.addEvents(this.target)});this.listeners.add(e)}notifyWindowClosed(){}getMathmlFromTextNode(e,t){}fillNonLatexNode(e,t,n){}getSelectedItem(e,t){}static setActionsOnCancelButtons(){WirisPlugin.currentInstance&&(WirisPlugin.currentInstance.core.editionProperties.temporalImage=null);const e=WirisPlugin.currentInstance,t=e.getSelection();if(t.removeAllRanges(),e.core.editionProperties.range){const{range:n}=e.core.editionProperties;e.core.editionProperties.range=null,t.addRange(n)}}}R0.prototype.getMathmlFromTextNode=void 0,R0.prototype.fillNonLatexNode=void 0,R0.prototype.getSelectedItem=void 0,R0.integrationParameters=["serviceProviderProperties","editorParameters"];class B0 extends R0{constructor(e){const t=e.editorObject;void 0!==t.config&&void 0!==t.config.get("mathTypeParameters")&&(e.integrationParameters=t.config.get("mathTypeParameters")),super(e),this.integrationFolderName="ckeditor_wiris"}getLanguage(){try{return this.editorParameters.language}catch(e){console.error()}const e=this.editorObject.config.get("language");return null!=e?"object"==typeof e&&e.hasOwnProperty("ui")?e.ui:e:super.getLanguage()}addEditorListeners(){const e=this.editorObject;void 0!==e.config.wirislistenersdisabled&&e.config.wirislistenersdisabled||this.checkElement()}checkElement(){const e=this.editorObject.sourceElement;e.wirisActive||(this.setTarget(e),this.addEvents(),e.wirisActive=!0)}doubleClickHandler(e,t){if(!1===this.editorObject.isReadOnly&&"img"===e.nodeName.toLowerCase()&&d0.containsClass(e,i0.get("imageClassName"))){void 0!==t.stopPropagation?t.stopPropagation():t.returnValue=!1,this.core.getCustomEditors().disable();const n=e.getAttribute(i0.get("imageCustomEditorName"));n&&this.core.getCustomEditors().enable(n),this.core.editionProperties.temporalImage=e,this.openExistingFormulaEditor()}}static getCorePath(){return null}callbackFunction(){super.callbackFunction(),this.addEditorListeners()}openNewFormulaEditor(){return this.core.editionProperties.selection=this.editorObject.editing.view.document.selection,super.openNewFormulaEditor()}insertMathml(e){return this.editorObject.model.change(t=>{const n=this.getCore(),r=t.createElement("mathml",{formula:e});if(r.data=e,n.editionProperties.isNewElement){if(!e)return;const n=this.core.editionProperties.selection||this.editorObject.editing.view.document.selection,i=this.editorObject.editing.mapper.toModelPosition(n.getLastPosition());if(t.insert(r,i),!n.isCollapsed)for(const e of n.getRanges())t.remove(this.editorObject.editing.mapper.toModelRange(e));const a=this.editorObject.model.createPositionAfter(r);t.setSelection(a)}else{const i=n.editionProperties.temporalImage,a=this.editorObject.editing.view.domConverter.domToView(i).parent,o=this.editorObject.editing.mapper.toModelElement(a),s=this.editorObject.model.createPositionBefore(o);e&&t.insert(r,s),t.remove(o)}return r})}findText(e){let t,n=e;for(;!t;)t=this.editorObject.editing.mapper.toModelElement(this.editorObject.editing.view.domConverter.domToView(n)),n=n.parentElement;const r=this.editorObject.model.createRangeIn(t),i=Array.from(r.getItems());for(const t of i)if(t.is("textProxy")&&t.data===e.data.replace(String.fromCharCode(160)," "))return t.textNode}insertFormula(e,t,n,r){const i={};if(n)if("latex"===this.core.editMode)i.latex=l0.getLatexFromMathML(n),i.node=t.document.createTextNode(`$$${i.latex}$$`),this.editorObject.model.change(e=>{const{latexRange:t}=this.core.editionProperties,n=this.findText(t.startContainer),r=this.findText(t.endContainer),a=e.createPositionAt(n.parent,n.startOffset+t.startOffset),o=e.createPositionAt(r.parent,r.startOffset+t.endOffset),s=e.createRange(a,o);e.remove(s),e.insertText(`$$${i.latex}$$`,n.getAttributes(),a)});else try{i.node=this.editorObject.editing.view.domConverter.viewToDom(this.editorObject.editing.mapper.toViewElement(this.insertMathml(n)),t.document)}catch(e){e.toString().includes("CKEditorError: Cannot read property 'parent' of undefined")&&this.core.modalDialog.cancelAction()}else this.insertMathml("");return i}notifyWindowClosed(){this.editorObject.editing.view.focus()}}class j0 extends VF{execute(e={}){if(!(e.hasOwnProperty("integration")&&e.integration instanceof B0))throw'Must pass a valid CKEditor5Integration instance as attribute "integration" of options';this.integration=e.integration,this.setEditor(),this.openEditor()}setEditor(){this.integration.core.getCustomEditors().disable()}openEditor(){const e=this._getSelectedImage();null!=e&&e.classList.contains(WirisPlugin.Configuration.get("imageClassName"))?(this.integration.core.editionProperties.temporalImage=e,this.integration.openExistingFormulaEditor()):this.integration.openNewFormulaEditor()}_getSelectedImage(){const{selection:e}=this.editor.editing.view.document;if(e.isCollapsed||1!==e.rangeCount)return;const t=e.getFirstRange();let n;for(const e of t){if("span"!==e.item.name)return;n=e.item.getChild(0);break}return n?this.editor.editing.view.domConverter.mapViewToDom(n):void 0}}class F0 extends j0{setEditor(){this.integration.core.getCustomEditors().enable("chemistry")}}let U0=null;class H0 extends HF{static get requires(){return[TX]}static get pluginName(){return"MathType"}init(){const e=this._addIntegration();U0=e,this._addCommands(),this._addViews(e),this._addSchema(),this._addConverters(),this._exposeWiris()}destroy(){U0.removeEvents()}_addIntegration(){const{editor:e}=this,t={};let n;return t.environment={},t.environment.editor="CKEditor5",t.environment.editorVersion="5.x",t.editorObject=e,t.serviceProviderProperties={},t.serviceProviderProperties.URI="https://www.wiris.net/demo/plugins/app",t.serviceProviderProperties.server="java",t.target=e.sourceElement,t.scriptName="bundle.js",t.managesLanguage=!0,t.target&&(n=new B0(t),n.init(),n.listeners.fire("onTargetReady",{}),n.checkElement(),this.listenTo(e.editing.view.document,"click",(e,t)=>{2===t.domEvent.detail&&(n.doubleClickHandler(t.domTarget,t.domEvent),e.stop())},{priority:"highest"})),n}_addCommands(){const{editor:e}=this;e.commands.add("MathType",new j0(e)),e.commands.add("ChemType",new F0(e))}_addViews(e){const{editor:t}=this;i0.get("editorEnabled")&&t.ui.componentFactory.add("MathType",n=>{const r=new GX(n);return r.bind("isEnabled").to(t.commands.get("MathType"),"isEnabled"),r.set({label:u0.get("insert_math"),icon:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 300 261.7" style="enable-background:new 0 0 300 261.7;" xml:space="preserve">\n<style type="text/css">\n\t.st0{fill:#FFFFFF;}\n\t.st1{fill:#EF4A5F;}\n\t.st2{fill:#C8202F;}\n</style>\n<path class="st0" d="M300,32.8c0-16.4-13.4-29.7-29.9-29.7c-2.9,0-7.2,0.8-7.2,0.8c-37.9,9.1-71.3,14-112,14c-0.3,0-0.6,0-1,0\n\tc-16.5,0-29.9,13.3-29.9,29.7c0,16.4,13.4,29.7,29.9,29.7l0,0c45.3,0,83.1-5.3,125.3-15.3h0C289.3,59.5,300,47.4,300,32.8"/>\n<path class="st0" d="M90.2,257.7c-11.4,0-21.9-6.4-27-16.7l-60-119.9c-7.5-14.9-1.4-33.1,13.5-40.5c14.9-7.5,33.1-1.4,40.5,13.5\n\tl27.3,54.7L121.1,39c5.3-15.8,22.4-24.4,38.2-19.1c15.8,5.3,24.4,22.4,19.1,38.2l-59.6,179c-3.9,11.6-14.3,19.7-26.5,20.6\n\tC91.6,257.7,90.9,257.7,90.2,257.7"/>\n<g>\n\t<g>\n\t\t<path class="st1" d="M90.2,257.7c-11.4,0-21.9-6.4-27-16.7l-60-119.9c-7.5-14.9-1.4-33.1,13.5-40.5c14.9-7.5,33.1-1.4,40.5,13.5\n\t\t\tl27.3,54.7L121.1,39c5.3-15.8,22.4-24.4,38.2-19.1c15.8,5.3,24.4,22.4,19.1,38.2l-59.6,179c-3.9,11.6-14.3,19.7-26.5,20.6\n\t\t\tC91.6,257.7,90.9,257.7,90.2,257.7"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path class="st2" d="M300,32.8c0-16.4-13.4-29.7-29.9-29.7c-2.9,0-7.2,0.8-7.2,0.8c-37.9,9.1-71.3,14-112,14c-0.3,0-0.6,0-1,0\n\t\t\tc-16.5,0-29.9,13.3-29.9,29.7c0,16.4,13.4,29.7,29.9,29.7l0,0c45.3,0,83.1-5.3,125.3-15.3h0C289.3,59.5,300,47.4,300,32.8"/>\n\t</g>\n</g>\n</svg>\n',tooltip:!0}),r.on("execute",()=>{t.execute("MathType",{integration:e})}),r}),i0.get("chemEnabled")&&t.ui.componentFactory.add("ChemType",n=>{const r=new GX(n);return r.bind("isEnabled").to(t.commands.get("ChemType"),"isEnabled"),r.set({label:u0.get("insert_chem"),icon:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 40.3 49.5" style="enable-background:new 0 0 40.3 49.5;" xml:space="preserve">\n<style type="text/css">\n\t.st0{fill:#A4CF61;}\n</style>\n<path class="st0" d="M39.2,12.1c0-1.9-1.1-3.6-2.7-4.4L24.5,0.9l0,0c-0.7-0.4-1.5-0.6-2.4-0.6c-0.9,0-1.7,0.2-2.4,0.6l0,0L2.3,10.8\n\tl0,0C0.9,11.7,0,13.2,0,14.9h0v19.6h0c0,1.7,0.9,3.3,2.3,4.1l0,0l17.4,9.9l0,0c0.7,0.4,1.5,0.6,2.4,0.6c0.9,0,1.7-0.2,2.4-0.6l0,0\n\tl12.2-6.9h0c1.5-0.8,2.6-2.5,2.6-4.3c0-2.7-2.2-4.9-4.9-4.9c-0.9,0-1.8,0.3-2.5,0.7l0,0l-9.7,5.6l-12.3-7V17.8l12.3-7l9.9,5.7l0,0\n\tc0.7,0.4,1.5,0.6,2.4,0.6C37,17,39.2,14.8,39.2,12.1"/>\n</svg>\n',tooltip:!0}),r.on("execute",()=>{t.execute("ChemType",{integration:e})}),r}),t.editing.view.addObserver(tJ)}_addSchema(){const{schema:e}=this.editor.model;e.register("mathml",{allowWhere:"$text",isObject:!0,isInline:!0,allowAttributes:["formula"]})}_addConverters(){const{editor:e}=this;var t,n;e.conversion.for("upcast").elementToElement({view:{name:"span",classes:"ck-math-widget"},model:(e,{writer:t})=>{const n=r0.safeXmlDecode(e.getChild(0).getAttribute("data-mathml"));return t.createElement("mathml",{formula:n})}}),e.data.upcastDispatcher.on("element:math",(t,n,r)=>{const{consumable:i,writer:a}=r,{viewItem:o}=n;if(!i.test(o,{name:!0}))return;const s=function(e){const t=e.getChild(0);if(!t||"semantics"!==t.name)return!1;for(const e of t.getChildren())if("annotation"===e.name&&"LaTeX"===e.getAttribute("encoding"))return!0;return!1}(o),l=new t0(e.editing.view.document),c=new nJ(e.editing.view.document).createDocumentFragment(o.getChildren()),u=[...o.getAttributes()].map(([e,t])=>` ${e}="${t}"`).join("");let d=l.toData(c)||"";d=`<math${u}>${d}</math>`;const h=s?a.createText(p0.initParse(d,e.config.get("language"))):a.createElement("mathml",{formula:d});h.data=d;const f=r.splitToAllowedParent(h,n.modelCursor);if(!f)return;r.writer.insert(h,f.position),i.consume(o,{name:!0});const p=r.getSplitParts(h);n.modelRange=a.createRange(r.writer.createPositionBefore(h),r.writer.createPositionAfter(p[p.length-1])),f.cursorParent?n.modelCursor=r.writer.createPositionAt(f.cursorParent,0):n.modelCursor=n.modelRange.end}),e.conversion.for("editingDowncast").elementToElement({model:"mathml",view:function(t,{writer:n}){const r=n.createContainerElement("span",{class:"ck-math-widget"}),i=function(t,{writer:n}){const r=new Kq(n.document),i=t.getAttribute("formula"),a=p0.initParse(i,e.config.get("language")),o=r.toView(a).getChild(0);return n.createEmptyElement("img",o.getAttributes(),{renderUnsafeAttributes:["src"]})}(t,{writer:n});return n.insert(n.createPositionAt(r,0),i),lX(r,n)}}),e.conversion.for("dataDowncast").elementToElement({model:"mathml",view:function(e,{writer:t}){const n=new Kq(t.document);let r=p0.endParseSaveMode(e.getAttribute("formula"));i0.get("saveHandTraces")||(r=r0.removeAnnotation(r,"application/json"));const i=n.toView(r).getChild(0);return function e(t,n){if(n.is("text"))return t.createText(n.data);if(n.is("element")){if(n.is("emptyElement"))return t.createEmptyElement(n.name,n.getAttributes());const r=t.createContainerElement(n.name,n.getAttributes());for(const i of n.getChildren())t.insert(t.createPositionAt(r,"end"),e(t,i));return r}throw new Exception("Given node has unsupported type.")}(t,i)}}),e.editing.mapper.on("viewToModelPosition",(t=e.model,n=e=>e.hasClass("ck-math-widget"),(e,r)=>{const{mapper:i,viewPosition:a}=r,o=i.findMappedViewAncestor(a);if(!n(o))return;const s=i.toModelElement(o);r.modelPosition=t.createPositionAt(s,a.isAtStart?"before":"after")}));const{get:r}=e.data;e.data.get=t=>{const n=r.bind(e.data)(t);return p0.endParse(n)}}_exposeWiris(){window.WirisPlugin={Core:L0,Parser:p0,Image:h0,MathML:r0,Util:d0,Configuration:i0,Listeners:o0,IntegrationModel:R0,currentInstance:U0,Latex:l0}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class z0{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(e,t,n)=>{if(!n.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!n.schema.isInline(t.item))return;const r=n.writer,i=r.document.selection;for(const e of this._definitions){const a=r.createAttributeElement("a",e.attributes,{priority:5});e.classes&&r.addClass(e.classes,a);for(const t in e.styles)r.setStyle(t,e.styles[t],a);r.setCustomProperty("link",!0,a),e.callback(t.attributeNewValue)?t.item.is("selection")?r.wrap(i.getFirstRange(),a):r.wrap(n.mapper.toViewRange(t.range),a):r.unwrap(n.mapper.toViewRange(t.range),a)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(e,t,{writer:n,mapper:r})=>{const i=r.toViewElement(t.item),a=Array.from(i.getChildren()).find(e=>"a"===e.name);for(const e of this._definitions){const r=rz(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of r)"class"===e?n.addClass(t,a):n.setAttribute(e,t,a);e.classes&&n.addClass(e.classes,a);for(const t in e.styles)n.setStyle(t,e.styles[t],a)}else{for(const[e,t]of r)"class"===e?n.removeClass(t,a):n.removeAttribute(e,a);e.classes&&n.removeClass(e.classes,a);for(const t in e.styles)n.removeStyle(t,a)}}})}}}var V0=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Sz(e,t,n)},W0=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var G0=function(e){return W0.test(e)};var q0=function(e){return e.split("")},Y0="[\\ud800-\\udfff]",K0="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",X0="\\ud83c[\\udffb-\\udfff]",Q0="[^\\ud800-\\udfff]",$0="(?:\\ud83c[\\udde6-\\uddff]){2}",J0="[\\ud800-\\udbff][\\udc00-\\udfff]",Z0="(?:"+K0+"|"+X0+")"+"?",e1="[\\ufe0e\\ufe0f]?"+Z0+("(?:\\u200d(?:"+[Q0,$0,J0].join("|")+")[\\ufe0e\\ufe0f]?"+Z0+")*"),t1="(?:"+[Q0+K0+"?",K0,$0,J0,Y0].join("|")+")",n1=RegExp(X0+"(?="+X0+")|"+t1+e1,"g");var r1=function(e){return e.match(n1)||[]};var i1=function(e){return G0(e)?r1(e):q0(e)};var a1=function(e){return function(t){t=yz(t);var n=G0(t)?i1(t):void 0,r=n?n[0]:t.charAt(0),i=n?V0(n,1).join(""):t.slice(1);return r[e]()+i}}("toUpperCase");
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const o1=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,s1=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,l1=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,c1=/^((\w+:(\/{2,})?)|(\W))/i;function u1(e,{writer:t}){const n=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,n),n}function d1(e){return function(e){return e.replace(o1,"").match(s1)}(e=String(e))?e:"#"}function h1(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function f1(e,t){const n=(r=e,l1.test(r)?"mailto:":t);var r;const i=!!n&&!c1.test(e);return e&&i?n+e:e}function p1(e){window.open(e,"_blank","noopener")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class m1 extends VF{constructor(e){super(e),this.manualDecorators=new VH,this.automaticDecorators=new z0}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement()||_G(t.getSelectedBlocks());h1(n,e.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(n,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const n=this.editor.model,r=n.document.selection,i=[],a=[];for(const e in t)t[e]?i.push(e):a.push(e);n.change(t=>{if(r.isCollapsed){const o=r.getFirstPosition();if(r.hasAttribute("linkHref")){const s=cQ(o,"linkHref",r.getAttribute("linkHref"),n);t.setAttribute("linkHref",e,s),i.forEach(e=>{t.setAttribute(e,!0,s)}),a.forEach(e=>{t.removeAttribute(e,s)}),t.setSelection(t.createPositionAfter(s.end.nodeBefore))}else if(""!==e){const a=rz(r.getAttributes());a.set("linkHref",e),i.forEach(e=>{a.set(e,!0)});const{end:s}=n.insertContent(t.createText(e,a),o);t.setSelection(s)}["linkHref",...i,...a].forEach(e=>{t.removeSelectionAttribute(e)})}else{const o=n.schema.getValidRanges(r.getRanges(),"linkHref"),s=[];for(const e of r.getSelectedBlocks())n.schema.checkAttribute(e,"linkHref")&&s.push(t.createRangeOn(e));const l=s.slice();for(const e of o)this._isRangeToUpdate(e,s)&&l.push(e);for(const n of l)t.setAttribute("linkHref",e,n),i.forEach(e=>{t.setAttribute(e,!0,n)}),a.forEach(e=>{t.removeAttribute(e,n)})}})}_getDecoratorStateFromModel(e){const t=this.editor.model,n=t.document.selection,r=n.getSelectedElement();return h1(r,t.schema)?r.getAttribute(e):n.getAttribute(e)}_isRangeToUpdate(e,t){for(const n of t)if(n.containsRange(e))return!1;return!0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class g1 extends VF{refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement();h1(n,e.schema)?this.isEnabled=e.schema.checkAttribute(n,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,n=t.document.selection,r=e.commands.get("link");t.change(e=>{const i=n.isCollapsed?[cQ(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),t)]:t.schema.getValidRanges(n.getRanges(),"linkHref");for(const t of i)if(e.removeAttribute("linkHref",t),r)for(const n of r.manualDecorators)e.removeAttribute(n.id,t)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class v1{constructor({id:e,label:t,attributes:n,classes:r,styles:i,defaultValue:a}){this.id=e,this.set("value"),this.defaultValue=a,this.label=t,this.attributes=n,this.classes=r,this.styles=i}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}UF(v1,NF);r(1577);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const b1=/^(https?:)?\/\//;class y1 extends HF{static get pluginName(){return"LinkEditing"}static get requires(){return[nQ,JX,_K]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:u1}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>u1(d1(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new m1(e)),e.commands.add("unlink",new g1(e));const t=function(e,t){const n={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach(e=>(e.label&&n[e.label]&&(e.label=n[e.label]),e)),t}(e.t,function(e){const t=[];if(e)for(const[n,r]of Object.entries(e)){const e=Object.assign({},r,{id:`link${a1(n)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter(e=>"automatic"===e.mode)),this._enableManualDecorators(t.filter(e=>"manual"===e.mode)),e.plugins.get(nQ).registerAttribute("linkHref"),function(e,t,n,r){const i=e.editing.view,a=new Set;i.document.registerPostFixer(i=>{const o=e.model.document.selection;let s=!1;if(o.hasAttribute(t)){const l=cQ(o.getFirstPosition(),t,o.getAttribute(t),e.model),c=e.editing.mapper.toViewRange(l);for(const e of c.getItems())e.is("element",n)&&!e.hasClass(r)&&(i.addClass(r,e),a.add(e),s=!0)}return s}),e.conversion.for("editingDowncast").add(e=>{function t(){i.change(e=>{for(const t of a.values())e.removeClass(r,t),a.delete(t)})}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})})}(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(e){const t=this.editor,n=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:"automatic",callback:e=>b1.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(e),n.length&&t.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,n=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),e=new v1(e),n.add(e),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,{writer:n,schema:r},{item:i})=>{if(r.isInline(i)&&t){const t=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,t);for(const r in e.styles)n.setStyle(r,e.styles[r],t);return n.setCustomProperty("link",!0,t),t}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...e._createPattern()},model:{key:e.id}})})}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document,n=e.model.document;this.listenTo(t,"click",(e,t)=>{if(!(gV.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let n=t.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const r=n.getAttribute("href");r&&(e.stop(),t.preventDefault(),p1(r))},{context:"$capture"}),this.listenTo(t,"enter",(e,t)=>{const r=n.selection,i=r.getSelectedElement(),a=i?i.getAttribute("linkHref"):r.getAttribute("linkHref");a&&t.domEvent.altKey&&(e.stop(),p1(a))},{context:"a"})}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",()=>{const n=t.anchor.nodeBefore,r=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&n&&n.hasAttribute("linkHref")&&(r&&r.hasAttribute("linkHref")||e.change(t=>{A1(t,w1(e.schema))}))},{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.model;e.editing.view.addObserver(wK);let n=!1;this.listenTo(e.editing.view.document,"mousedown",()=>{n=!0}),this.listenTo(e.editing.view.document,"selectionChange",()=>{if(!n)return;n=!1;const e=t.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const r=e.getFirstPosition(),i=cQ(r,"linkHref",e.getAttribute("linkHref"),t);(r.isTouching(i.start)||r.isTouching(i.end))&&t.change(e=>{A1(e,w1(t.schema))})})}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let n,r;this.listenTo(t.document,"delete",()=>{r=!0},{priority:"high"}),this.listenTo(e.model,"deleteContent",()=>{const t=e.model.document.selection;t.isCollapsed||(r?r=!1:_1(e)&&function(e){const t=e.document.selection,n=t.getFirstPosition(),r=t.getLastPosition(),i=n.nodeAfter;if(!i)return!1;if(!i.is("$text"))return!1;if(!i.hasAttribute("linkHref"))return!1;const a=r.textNode||r.nodeBefore;if(i===a)return!0;return cQ(n,"linkHref",i.getAttribute("linkHref"),e).containsRange(e.createRange(n,r),!0)}(e.model)&&(n=t.getAttributes()))},{priority:"high"}),this.listenTo(e.model,"insertContent",(t,[i])=>{r=!1,_1(e)&&n&&(e.model.change(e=>{for(const[t,r]of n)e.setAttribute(t,r,i)}),n=null)},{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,n=t.document.selection,r=e.editing.view;let i=!1,a=!1;this.listenTo(r.document,"delete",(e,t)=>{a=t.domEvent.keyCode===AV.backspace},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{i=!1;const e=n.getFirstPosition(),r=n.getAttribute("linkHref");if(!r)return;const a=cQ(e,"linkHref",r,t);i=a.containsPosition(e)||a.end.isEqual(e)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{a&&(a=!1,i||e.model.enqueueChange(e=>{A1(e,w1(t.schema))}))},{priority:"low"})}}function A1(e,t){e.removeSelectionAttribute("linkHref");for(const n of t)e.removeSelectionAttribute(n)}function _1(e){return e.model.change(e=>e.batch).isTyping}function w1(e){return e.getDefinition("$text").allowAttributes.filter(e=>e.startsWith("link"))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class E1 extends HF{static get requires(){return[P$]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",t=>{(function(e){const t=e.getSelectedElement();return!(!t||!sX(t))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */)(e.editing.view.document.selection)&&t.stop()},{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:n,getRelatedElement:r,balloonClassName:i="ck-toolbar-container"}){if(!n.length)return void Object(hj.b)("widget-toolbar-no-items",{toolbarId:e});const a=this.editor,o=a.t,s=new r$(a.locale);if(s.ariaLabel=t||o("Widget toolbar"),this._toolbarDefinitions.has(e))throw new hj.a("widget-toolbar-duplicated",this,{toolbarId:e});s.fillFromConfig(n,a.ui.componentFactory),this._toolbarDefinitions.set(e,{view:s,getRelatedElement:r,balloonClassName:i})}_updateToolbarsVisibility(){let e=0,t=null,n=null;for(const r of this._toolbarDefinitions.values()){const i=r.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const a=i.getAncestors().length;a>e&&(e=a,t=i,n=r)}else this._isToolbarVisible(r)&&this._hideToolbar(r);else this._isToolbarInBalloon(r)&&this._hideToolbar(r)}n&&this._showToolbar(n,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?S1(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:C1(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);S1(this.editor,t)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function S1(e,t){const n=e.plugins.get("ContextualBalloon"),r=C1(e,t);n.updatePosition(r)}function C1(e,t){const n=e.editing.view,r=x$.defaultPositions;return{target:n.domConverter.mapViewToDom(t),positions:[r.northArrowSouth,r.northArrowSouthWest,r.northArrowSouthEast,r.southArrowNorth,r.southArrowNorthWest,r.southArrowNorthEast,r.viewportStickyNorth]}}class T1{constructor(e){this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}begin(e,t,n){const r=new iG(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)if(e.classList.contains(`ck-widget__resizer__handle-${n}`))return n}(e),this._referenceCoordinates=function(e,t){const n=new iG(e),r=t.split("-"),i={x:"right"==r[1]?n.right:n.left,y:"bottom"==r[0]?n.bottom:n.top};return i.x+=e.ownerDocument.defaultView.scrollX,i.y+=e.ownerDocument.defaultView.scrollY,i}(t,function(e){const t=e.split("-"),n={top:"bottom",bottom:"top",left:"right",right:"left"};return`${n[t[0]]}-${n[t[1]]}`}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(this.activeHandlePosition)),this.originalWidth=r.width,this.originalHeight=r.height,this.aspectRatio=r.width/r.height;const i=n.style.width;i&&i.match(/^\d+(\.\d*)?%$/)?this.originalWidthPercents=parseFloat(i):this.originalWidthPercents=function(e,t){const n=e.parentElement,r=parseFloat(n.ownerDocument.defaultView.getComputedStyle(n).width);return t.width/r*100}(n,r)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}UF(T1,NF);class k1 extends SK{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",e=>e?`ck-orientation-${e}`:"")],style:{display:e.if("_isVisible","none",e=>!e)}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",(e,t)=>null!==e&&null!==t),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(t,n,r)=>"px"===e.unit?`${t}×${n}`:`${r}%`),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(e,t,n)=>t<50||n<50?"above-center":e)}_dismiss(){this.unbind(),this._isVisible=!1}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class x1{constructor(e){this._options=e,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())},{priority:"high"}),this.on("change:isEnabled",()=>{this.isEnabled&&this.redraw()})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(n=>{const r=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const n=this.toDomElement(t);return e._appendHandles(n),e._appendSizeUI(n),e.on("change:isEnabled",(e,t,r)=>{n.style.display=r?"":"none"}),n.style.display=e.isEnabled?"":"none",n}));n.insert(n.createPositionAt(t,"end"),r),n.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=r})}begin(e){this.state=new T1(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(e=>{const n=this._options.unit||"%",r=("%"===n?t.widthPercents:t.width)+n;e.setStyle("width",r,this._options.viewElement)});const n=this._getHandleHost(),r=new iG(n);t.handleHostWidth=Math.round(r.width),t.handleHostHeight=Math.round(r.height);const i=new iG(n);t.width=Math.round(i.width),t.height=Math.round(i.height),this.redraw(r),this.state.update(t)}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((n=t)&&n.ownerDocument&&n.ownerDocument.contains(n)))return;var n;const r=t.parentElement,i=this._getHandleHost(),a=this._viewResizerWrapper,o=[a.getStyle("width"),a.getStyle("height"),a.getStyle("left"),a.getStyle("top")];let s;if(r.isSameNode(i)){const t=e||new iG(i);s=[t.width+"px",t.height+"px",void 0,void 0]}else s=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==JH(o,s)&&this._options.editor.editing.view.change(e=>{e.setStyle({width:s[0],height:s[1],left:s[2],top:s[3]},a)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,n={x:(r=e).pageX,y:r.pageY};var r;const i=!this._options.isCentered||this._options.isCentered(this),a={x:t._referenceCoordinates.x-(n.x+t.originalWidth),y:n.y-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(a.x=n.x-(t._referenceCoordinates.x+t.originalWidth)),i&&(a.x*=2);const o={width:Math.abs(t.originalWidth+a.x),height:Math.abs(t.originalHeight+a.y)};o.dominant=o.width/t.aspectRatio>o.height?"width":"height",o.max=o[o.dominant];const s={width:o.width,height:o.height};return"width"==o.dominant?s.height=s.width/t.aspectRatio:s.width=s.height*t.aspectRatio,{width:Math.round(s.width),height:Math.round(s.height),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*s.width*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const r of t)e.appendChild(new CK({tag:"div",attributes:{class:`ck-widget__resizer__handle ${n=r,`ck-widget__resizer__handle-${n}`}`}}).render());var n}_appendSizeUI(e){this._sizeView=new k1,this._sizeView.render(),e.appendChild(this._sizeView.element)}}UF(x1,NF);r(1579);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class O1 extends HF{static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=cW.window.document;this.set("visibleResizer",null),this.set("_activeResizer",null),this._resizers=new Map,e.view.addObserver(wK),this._observer=Object.create(_W),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this));const n=()=>{this.visibleResizer&&this.visibleResizer.redraw()};this._redrawFocusedResizerThrottled=xX(n,200),this.on("change:visibleResizer",n),this.editor.ui.on("update",this._redrawFocusedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())},{priority:"lowest"}),this._observer.listenTo(cW.window,"resize",this._redrawFocusedResizerThrottled);const r=this.editor.editing.view.document.selection;r.on("change",()=>{const e=r.getSelectedElement();this.visibleResizer=this.getResizerByViewElement(e)||null})}destroy(){this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawFocusedResizerThrottled.cancel()}attachTo(e){const t=new x1(e),n=this.editor.plugins;if(t.attach(),n.has("WidgetToolbarRepository")){const e=n.get("WidgetToolbarRepository");t.on("begin",()=>{e.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{e.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{e.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);const r=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(r)==t&&(this.visibleResizer=t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const n=t.domTarget;x1.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n),this._activeResizer&&(this._activeResizer.begin(n),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}UF(O1,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
r(517),r(1582);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class I1 extends SK{constructor(e,t){super(e);const n=e.t;this.focusTracker=new wG,this.keystrokes=new EG,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),vK.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),vK.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusables=new EK,this._focusCycler=new VQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const r=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&r.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:r,tabindex:"-1"},children:this.children}),LQ(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((e,t)=>(e[t.name]=t.isOn,e),{})}render(){super.render(),RQ({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new _$(this.locale,w$);return t.label=e("Link URL"),t}_createButton(e,t,n,r){const i=new GX(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),r&&i.delegate("execute").to(this,r),i}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const n of e.manualDecorators){const r=new jQ(this.locale);r.set({name:n.id,label:n.label,withText:!0}),r.bind("isOn").toMany([n,e],"value",(e,t)=>void 0===t&&void 0===e?n.defaultValue:e),r.on("execute",()=>{n.set("value",!r.isOn)}),t.add(r)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new SK;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}r(1584);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class M1 extends SK{constructor(e){super(e);const t=e.t;this.focusTracker=new wG,this.keystrokes=new EG,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(t("Edit link"),vK.pencil,"edit"),this.set("href"),this._focusables=new EK,this._focusCycler=new VQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){const r=new GX(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.delegate("execute").to(this,n),r}_createPreviewButton(){const e=new GX(this.locale),t=this.bindTemplate,n=this.t;return e.set({withText:!0,tooltip:n("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",e=>e&&d1(e)),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",e=>e||n("This link has no URL")),e.bind("isEnabled").to(this,"href",e=>!!e),e.template.tag="a",e.template.eventListeners={},e}}var P1='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>';
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class D1 extends HF{static get requires(){return[P$]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(tJ),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(P$),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:"link-ui",view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:"link-ui",view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const e=this.editor,t=new M1(e.locale),n=e.commands.get("link"),r=e.commands.get("unlink");return t.bind("href").to(n,"value"),t.editButtonView.bind("isEnabled").to(n),t.unlinkButtonView.bind("isEnabled").to(r),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"unlink",()=>{e.execute("unlink"),this._hideUI()}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set("Ctrl+K",(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),r=new I1(e.locale,t);return r.urlInputView.fieldView.bind("value").to(t,"value"),r.urlInputView.bind("isReadOnly").to(t,"isEnabled",e=>!e),r.saveButtonView.bind("isEnabled").to(t),this.listenTo(r,"submit",()=>{const{value:t}=r.urlInputView.fieldView.element,i=f1(t,n);e.execute("link",i,r.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(r,"cancel",()=>{this._closeFormView()}),r.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),r}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),n=e.t;e.keystrokes.set("Ctrl+K",(e,n)=>{n(),t.isEnabled&&this._showUI(!0)}),e.ui.componentFactory.add("link",e=>{const r=new GX(e);return r.isEnabled=!0,r.label=n("Link"),r.icon=P1,r.keystroke="Ctrl+K",r.tooltip=!0,r.isToggleable=!0,r.bind("isEnabled").to(t,"isEnabled"),r.bind("isOn").to(t,"value",e=>!!e),this.listenTo(r,"execute",()=>this._showUI(!0)),r})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),NQ({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let n=this._getSelectedLinkElement(),r=a();const i=()=>{const e=this._getSelectedLinkElement(),t=a();n&&!e||!n&&t!==r?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=e,r=t};function a(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",i),this.listenTo(this._balloon,"change:visibleView",i)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,n=e.document;let r=null;if(t.markers.has("link-ui")){const t=Array.from(this.editor.editing.mapper.markerNameToElements("link-ui")),n=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));r=e.domConverter.viewRangeToDom(n)}else r=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:r}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,n=t.getSelectedElement();if(t.isCollapsed||n&&sX(n))return N1(t.getFirstPosition());{const n=t.getFirstRange().getTrimmed(),r=N1(n.start),i=N1(n.end);return r&&r==i&&e.createRangeIn(r).getTrimmed().isEqual(n)?r:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{const n=e.document.selection.getFirstRange();if(e.markers.has("link-ui"))t.updateMarker("link-ui",{range:n});else if(n.start.isAtEnd){const r=n.start.getLastMatchingPosition(({item:t})=>!e.schema.isContent(t),{boundaries:n});t.addMarker("link-ui",{usingOperation:!1,affectsData:!1,range:t.createRange(r,n.end)})}else t.addMarker("link-ui",{usingOperation:!1,affectsData:!1,range:n})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has("link-ui")&&e.change(e=>{e.removeMarker("link-ui")})}}function N1(e){return e.getAncestors().find(e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const L1=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class R1 extends HF{static get requires(){return[tX]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new tQ(e.model,e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=B1(e.substr(0,e.length-1));return t?{url:t}:void 0});t.on("matched:data",(t,n)=>{const{batch:r,range:i,url:a}=n;if(!r.isTyping)return;const o=i.end.getShiftedBy(-1),s=o.getShiftedBy(-a.length),l=e.model.createRange(s,o);this._applyAutoLink(a,l)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("enter");n&&n.on("execute",()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const n=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("shiftEnter");n&&n.on("execute",()=>{const e=t.document.selection.getFirstPosition(),n=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)})}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:n,range:r}=eQ(e,t),i=B1(n);if(i){const e=t.createRange(r.end.getShiftedBy(-i.length),r.end);this._applyAutoLink(i,e)}}_applyAutoLink(e,t){const n=this.editor.model,r=this.editor.plugins.get("Delete");this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t,n)&&n.enqueueChange(i=>{const a=this.editor.config.get("link.defaultProtocol"),o=f1(e,a);i.setAttribute("linkHref",o,t),n.enqueueChange(()=>{r.requestUndoOnBackspace()})})}}function B1(e){const t=L1.exec(e);return t?t[2]:null}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class j1 extends VF{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.document,r=Array.from(n.selection.getSelectedBlocks()).filter(e=>U1(e,t.schema)),i=void 0!==e.forceValue?!e.forceValue:this.value;t.change(e=>{if(i){let t=r[r.length-1].nextSibling,n=Number.POSITIVE_INFINITY,i=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e<n&&(n=e);const r=e-n;i.push({element:t,listIndent:r}),t=t.nextSibling}i=i.reverse();for(const t of i)e.setAttribute("listIndent",t.listIndent,t.element)}if(!i){let e=Number.POSITIVE_INFINITY;for(const t of r)t.is("element","listItem")&&t.getAttribute("listIndent")<e&&(e=t.getAttribute("listIndent"));e=0===e?1:e,F1(r,!0,e),F1(r,!1,e)}for(const t of r.reverse())i&&"listItem"==t.name?e.rename(t,"paragraph"):i||"listItem"==t.name?i||"listItem"!=t.name||t.getAttribute("listType")==this.type||e.setAttribute("listType",this.type,t):(e.setAttributes({listType:this.type,listIndent:0},t),e.rename(t,"listItem"));this.fire("_executeCleanup",r)})}_getValue(){const e=_G(this.editor.model.document.selection.getSelectedBlocks());return!!e&&e.is("element","listItem")&&e.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=_G(e.getSelectedBlocks());return!!n&&U1(n,t)}}function F1(e,t,n){const r=t?e[0]:e[e.length-1];if(r.is("element","listItem")){let i=r[t?"previousSibling":"nextSibling"],a=r.getAttribute("listIndent");for(;i&&i.is("element","listItem")&&i.getAttribute("listIndent")>=n;)a>i.getAttribute("listIndent")&&(a=i.getAttribute("listIndent")),i.getAttribute("listIndent")==a&&e[t?"unshift":"push"](i),i=i[t?"previousSibling":"nextSibling"]}}function U1(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class H1 extends VF{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let n=Array.from(t.selection.getSelectedBlocks());e.change(e=>{const t=n[n.length-1];let r=t.nextSibling;for(;r&&"listItem"==r.name&&r.getAttribute("listIndent")>t.getAttribute("listIndent");)n.push(r),r=r.nextSibling;this._indentBy<0&&(n=n.reverse());for(const t of n){const n=t.getAttribute("listIndent")+this._indentBy;n<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",n,t)}this.fire("_executeCleanup",n)})}_checkEnabled(){const e=_G(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),n=e.getAttribute("listType");let r=e.previousSibling;for(;r&&r.is("element","listItem")&&r.getAttribute("listIndent")>=t;){if(r.getAttribute("listIndent")==t)return r.getAttribute("listType")==n;r=r.previousSibling}return!1}return!0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function z1(e,t){const n=t.mapper,r=t.writer,i="numbered"==e.getAttribute("listType")?"ol":"ul",a=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=K1,t}(r),o=r.createContainerElement(i,null);return r.insert(r.createPositionAt(o,0),a),n.bindElements(e,a),a}function V1(e,t,n,r){const i=t.parent,a=n.mapper,o=n.writer;let s=a.toViewPosition(r.createPositionBefore(e));const l=q1(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=a.toViewElement(l);s=o.breakContainer(o.createPositionAfter(e))}else if(c&&"listItem"==c.name){s=a.toViewPosition(r.createPositionAt(c,"end"));const e=a.findMappedViewAncestor(s),t=function(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}(e);s=t?o.createPositionBefore(t):o.createPositionAt(e,"end")}else s=a.toViewPosition(r.createPositionBefore(e));if(s=G1(s),o.insert(s,i),c&&"listItem"==c.name){const e=a.toViewElement(c),n=o.createRange(o.createPositionAt(e,0),s).getWalker({ignoreElementEnd:!0});for(const e of n)if(e.item.is("element","li")){const r=o.breakContainer(o.createPositionBefore(e.item)),i=e.item.parent,a=o.createPositionAt(t,"end");W1(o,a.nodeBefore,a.nodeAfter),o.move(o.createRangeOn(i),a),n.position=r}}else{const n=i.nextSibling;if(n&&(n.is("element","ul")||n.is("element","ol"))){let r=null;for(const t of n.getChildren()){const n=a.toModelElement(t);if(!(n&&n.getAttribute("listIndent")>e.getAttribute("listIndent")))break;r=t}r&&(o.breakContainer(o.createPositionAfter(r)),o.move(o.createRangeOn(r.parent),o.createPositionAt(t,"end")))}}W1(o,i,i.nextSibling),W1(o,i.previousSibling,i)}function W1(e,t,n){return!t||!n||"ul"!=t.name&&"ol"!=t.name?null:t.name!=n.name||t.getAttribute("class")!==n.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function G1(e){return e.getLastMatchingPosition(e=>e.item.is("uiElement"))}function q1(e,t){const n=!!t.sameIndent,r=!!t.smallerIndent,i=t.listIndent;let a=e;for(;a&&"listItem"==a.name;){const e=a.getAttribute("listIndent");if(n&&i==e||r&&i>e)return a;a="forward"===t.direction?a.nextSibling:a.previousSibling}return null}function Y1(e,t,n,r){e.ui.componentFactory.add(t,i=>{const a=e.commands.get(t),o=new GX(i);return o.set({label:n,icon:r,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(a,"value","isEnabled"),o.on("execute",()=>{e.execute(t),e.editing.view.focus()}),o})}function K1(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:qz.call(this)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function X1(e){return(t,n,r)=>{const i=r.consumable;if(!i.test(n.item,"insert")||!i.test(n.item,"attribute:listType")||!i.test(n.item,"attribute:listIndent"))return;i.consume(n.item,"insert"),i.consume(n.item,"attribute:listType"),i.consume(n.item,"attribute:listIndent");const a=n.item;V1(a,z1(a,r),r,e)}}function Q1(e,t,n){if(!n.consumable.test(t.item,e.name))return;const r=n.mapper.toViewElement(t.item),i=n.writer;i.breakContainer(i.createPositionBefore(r)),i.breakContainer(i.createPositionAfter(r));const a=r.parent,o="numbered"==t.attributeNewValue?"ol":"ul";i.rename(o,a)}function $1(e,t,n){n.consumable.consume(t.item,e.name);const r=n.mapper.toViewElement(t.item).parent,i=n.writer;W1(i,r,r.nextSibling),W1(i,r.previousSibling,r)}function J1(e,t,n){if(n.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const r=n.writer,i=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=r.breakContainer(e),"li"==e.parent.name);){const t=e,n=r.createPositionAt(e.parent,"end");if(!t.isEqual(n)){const e=r.remove(r.createRange(t,n));i.push(e)}e=r.createPositionAfter(e.parent)}if(i.length>0){for(let t=0;t<i.length;t++){const n=e.nodeBefore;if(e=r.insert(e,i[t]).end,t>0){const t=W1(r,n,n.nextSibling);t&&t.parent==n&&e.offset--}}W1(r,e.nodeBefore,e.nodeAfter)}}}function Z1(e,t,n){const r=n.mapper.toViewPosition(t.position),i=r.nodeBefore,a=r.nodeAfter;W1(n.writer,i,a)}function e2(e,t,n){if(n.consumable.consume(t.viewItem,{name:!0})){const e=n.writer,r=e.createElement("listItem"),i=function(e){let t=0,n=e.parent;for(;n;){if(n.is("element","li"))t++;else{const e=n.previousSibling;e&&e.is("element","li")&&t++}n=n.parent}return t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t.viewItem);e.setAttribute("listIndent",i,r);const a=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",a,r),!n.safeInsert(r,t.modelCursor))return;const o=function(e,t,n){const{writer:r,schema:i}=n;let a=r.createPositionAfter(e);for(const o of t)if("ul"==o.name||"ol"==o.name)a=n.convertItem(o,a).modelCursor;else{const t=n.convertItem(o,r.createPositionAt(e,"end")),s=t.modelRange.start.nodeAfter;s&&s.is("element")&&!i.checkChild(e,s.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:a2(t.modelCursor),a=r.createPositionAfter(e))}return a}(r,t.viewItem.getChildren(),n);t.modelRange=e.createRange(t.modelCursor,o),n.updateConversionResult(r,t)}}function t2(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e){!(t.is("element","li")||s2(t))&&t._remove()}}}function n2(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let n=!1;for(const t of e)n&&!s2(t)&&t._remove(),s2(t)&&(n=!0)}}function r2(e){return(t,n)=>{if(n.isPhantom)return;const r=n.modelPosition.nodeBefore;if(r&&r.is("element","listItem")){const t=n.mapper.toViewElement(r),i=t.getAncestors().find(s2),a=e.createPositionAt(t,0).getWalker();for(const e of a){if("elementStart"==e.type&&e.item.is("element","li")){n.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==i){n.viewPosition=e.nextPosition;break}}}}}function i2(e,[t,n]){let r,i=t.is("documentFragment")?t.getChild(0):t;if(r=n?this.createSelection(n):this.document.selection,i&&i.is("element","listItem")){const e=r.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;i&&i.is("element","listItem");)i._setAttribute("listIndent",i.getAttribute("listIndent")+e),i=i.nextSibling}}}function a2(e){const t=new PG({startPosition:e});let n;do{n=t.next()}while(!n.value.item.is("element","listItem"));return n.value.item}function o2(e,t,n,r,i,a){const o=q1(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e,foo:"b"}),s=i.mapper,l=i.writer,c=o?o.getAttribute("listIndent"):null;let u;if(o)if(c==e){const e=s.toViewElement(o).parent;u=l.createPositionAfter(e)}else{const e=a.createPositionAt(o,"end");u=s.toViewPosition(e)}else u=n;u=G1(u);for(const e of[...r.getChildren()])s2(e)&&(u=l.move(l.createRangeOn(e),u).end,W1(l,e,e.nextSibling),W1(l,e.previousSibling,e))}function s2(e){return e.is("element","ol")||e.is("element","ul")}class l2 extends HF{static get pluginName(){return"ListEditing"}static get requires(){return[KK,tX]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,n=e.editing;var r;e.model.document.registerPostFixer(t=>function(e,t){const n=e.document.differ.getChanges(),r=new Map;let i=!1;for(const r of n)if("insert"==r.type&&"listItem"==r.name)a(r.position);else if("insert"==r.type&&"listItem"!=r.name){if("$text"!=r.name){const n=r.position.nodeAfter;n.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",n),i=!0),n.hasAttribute("listType")&&(t.removeAttribute("listType",n),i=!0),n.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",n),i=!0),n.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",n),i=!0),n.hasAttribute("listStart")&&(t.removeAttribute("listStart",n),i=!0);for(const t of Array.from(e.createRangeIn(n)).filter(e=>e.item.is("element","listItem")))a(t.previousPosition)}a(r.position.getShiftedBy(r.length))}else"remove"==r.type&&"listItem"==r.name?a(r.position):"attribute"==r.type&&"listIndent"==r.attributeKey?a(r.range.start):"attribute"==r.type&&"listType"==r.attributeKey&&a(r.range.start);for(const e of r.values())o(e),s(e);return i;function a(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(r.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,r.has(e))return;r.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&r.set(t,t)}}function o(e){let n=0,r=null;for(;e&&e.is("element","listItem");){const a=e.getAttribute("listIndent");if(a>n){let o;null===r?(r=a-n,o=n):(r>a&&(r=a),o=a-r),t.setAttribute("listIndent",o,e),i=!0}else r=null,n=e.getAttribute("listIndent")+1;e=e.nextSibling}}function s(e){let n=[],r=null;for(;e&&e.is("element","listItem");){const a=e.getAttribute("listIndent");if(r&&r.getAttribute("listIndent")>a&&(n=n.slice(0,a+1)),0!=a)if(n[a]){const r=n[a];e.getAttribute("listType")!=r&&(t.setAttribute("listType",r,e),i=!0)}else n[a]=e.getAttribute("listType");r=e,e=e.nextSibling}}}(e.model,t)),n.mapper.registerViewToModelLength("li",c2),t.mapper.registerViewToModelLength("li",c2),n.mapper.on("modelToViewPosition",r2(n.view)),n.mapper.on("viewToModelPosition",(r=e.model,(e,t)=>{const n=t.viewPosition,i=n.parent,a=t.mapper;if("ul"==i.name||"ol"==i.name){if(n.isAtEnd){const e=a.toModelElement(n.nodeBefore),i=a.getModelLength(n.nodeBefore);t.modelPosition=r.createPositionBefore(e).getShiftedBy(i)}else{const e=a.toModelElement(n.nodeAfter);t.modelPosition=r.createPositionBefore(e)}e.stop()}else if("li"==i.name&&n.nodeBefore&&("ul"==n.nodeBefore.name||"ol"==n.nodeBefore.name)){const o=a.toModelElement(i);let s=1,l=n.nodeBefore;for(;l&&s2(l);)s+=a.getModelLength(l),l=l.previousSibling;t.modelPosition=r.createPositionBefore(o).getShiftedBy(s),e.stop()}})),t.mapper.on("modelToViewPosition",r2(n.view)),e.conversion.for("editingDowncast").add(t=>{t.on("insert",J1,{priority:"high"}),t.on("insert:listItem",X1(e.model)),t.on("attribute:listType:listItem",Q1,{priority:"high"}),t.on("attribute:listType:listItem",$1,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,n,r)=>{if(!r.consumable.consume(n.item,"attribute:listIndent"))return;const i=r.mapper.toViewElement(n.item),a=r.writer;a.breakContainer(a.createPositionBefore(i)),a.breakContainer(a.createPositionAfter(i));const o=i.parent,s=o.previousSibling,l=a.createRangeOn(o);a.remove(l),s&&s.nextSibling&&W1(a,s,s.nextSibling),o2(n.attributeOldValue+1,n.range.start,l.start,i,r,e),V1(n.item,i,r,e);for(const e of n.item.getChildren())r.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,n,r)=>{const i=r.mapper.toViewPosition(n.position).getLastMatchingPosition(e=>!e.item.is("element","li")).nodeAfter,a=r.writer;a.breakContainer(a.createPositionBefore(i)),a.breakContainer(a.createPositionAfter(i));const o=i.parent,s=o.previousSibling,l=a.createRangeOn(o),c=a.remove(l);s&&s.nextSibling&&W1(a,s,s.nextSibling),o2(r.mapper.toModelElement(i).getAttribute("listIndent")+1,n.position,l.start,i,r,e);for(const e of a.createRangeIn(c).getItems())r.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",Z1,{priority:"low"})}),e.conversion.for("dataDowncast").add(t=>{t.on("insert",J1,{priority:"high"}),t.on("insert:listItem",X1(e.model))}),e.conversion.for("upcast").add(e=>{e.on("element:ul",t2,{priority:"high"}),e.on("element:ol",t2,{priority:"high"}),e.on("element:li",n2,{priority:"high"}),e.on("element:li",e2)}),e.model.on("insertContent",i2,{priority:"high"}),e.commands.add("numberedList",new j1(e,"numbered")),e.commands.add("bulletedList",new j1(e,"bulleted")),e.commands.add("indentList",new H1(e,"forward")),e.commands.add("outdentList",new H1(e,"backward"));const i=n.view.document;this.listenTo(i,"enter",(e,t)=>{const n=this.editor.model.document,r=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==r.name&&r.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())},{context:"li"}),this.listenTo(i,"delete",(e,t)=>{if("backward"!==t.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const r=n.getFirstPosition();if(!r.isAtStart)return;const i=r.parent;"listItem"===i.name&&(i.previousSibling&&"listItem"===i.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop()))},{context:"li"}),this.listenTo(e.editing.view.document,"tab",(t,n)=>{const r=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(r).isEnabled&&(e.execute(r),n.stopPropagation(),n.preventDefault(),t.stop())},{context:"li"})}afterInit(){const e=this.editor.commands,t=e.get("indent"),n=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),n&&n.registerChildCommand(e.get("outdentList"))}}function c2(e){let t=1;for(const n of e.getChildren())if("ul"==n.name||"ol"==n.name)for(const e of n.getChildren())t+=c2(e);return t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class u2 extends HF{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;Y1(this.editor,"numberedList",e("Numbered List"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>'),Y1(this.editor,"bulletedList",e("Bulleted List"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>')}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class d2 extends HF{static get requires(){return[l2,u2]}static get pluginName(){return"List"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class h2 extends VF{refresh(){const e=this.editor.model,t=e.schema,n=e.document.selection,r=f2(n);this.isEnabled=function(e,t,n){const r=function(e,t){const n=pX(e,t).start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(e,n);return t.checkChild(r,"rawHtml")}(n,t,e),this.value=r?r.getAttribute("value")||"":null}execute(e){const t=this.editor.model,n=t.document.selection;t.change(r=>{let i;null!==this.value?i=f2(n):(i=r.createElement("rawHtml"),t.insertObject(i,null,null,{setSelection:"on"})),r.setAttribute("value",e,i)})}}function f2(e){const t=e.getSelectedElement();return t&&t.is("element","rawHtml")?t:null}r(1586);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class p2 extends HF{static get pluginName(){return"HtmlEmbedEditing"}constructor(e){super(e),e.config.define("htmlEmbed",{showPreviews:!1,sanitizeHtml:e=>(Object(hj.b)("html-embed-provide-sanitize-function"),{html:e,hasChanged:!1})}),this._widgetButtonViewReferences=new Set}init(){const e=this.editor;e.model.schema.register("rawHtml",{inheritAllFrom:"$blockObject",allowAttributes:["value"]}),e.commands.add("htmlEmbed",new h2(e)),this._setupConversion()}_setupConversion(){const e=this.editor,t=e.t,n=e.editing.view,r=this._widgetButtonViewReferences,i=e.config.get("htmlEmbed");function a({domElement:e,editor:n,state:i,props:a}){e.textContent="";const s=e.ownerDocument;let l;if(i.isEditable){const t={isDisabled:!1,placeholder:a.textareaPlaceholder};l=o({domDocument:s,state:i,props:t}),e.append(l)}else if(i.showPreviews){const r={sanitizeHtml:a.sanitizeHtml};e.append(function({domDocument:e,state:n,props:r,editor:i}){const a=r.sanitizeHtml(n.getRawHtmlValue()),o=n.getRawHtmlValue().length>0?t("No preview available"):t("Empty snippet content"),s=eG(e,"div",{class:"ck ck-reset_all raw-html-embed__preview-placeholder"},o),l=eG(e,"div",{class:"raw-html-embed__preview-content",dir:i.locale.contentLanguageDirection}),c=e.createRange().createContextualFragment(a.html);return l.appendChild(c),eG(e,"div",{class:"raw-html-embed__preview"},[s,l])}({domDocument:s,state:i,props:r,editor:n}))}else{const t={isDisabled:!0,placeholder:a.textareaPlaceholder};e.append(o({domDocument:s,state:i,props:t}))}const c={onEditClick:a.onEditClick,onSaveClick:()=>{a.onSaveClick(l.value)},onCancelClick:a.onCancelClick};e.prepend(function({editor:e,domDocument:t,state:n,props:i}){const a=eG(t,"div",{class:"raw-html-embed__buttons-wrapper"});if(n.isEditable){const t=m2(e,"save",i.onSaveClick),n=m2(e,"cancel",i.onCancelClick);a.append(t.element,n.element),r.add(t).add(n)}else{const t=m2(e,"edit",i.onEditClick);a.append(t.element),r.add(t)}return a}({editor:n,domDocument:s,state:i,props:c}))}function o({domDocument:e,state:t,props:n}){const r=eG(e,"textarea",{placeholder:n.placeholder,class:"ck ck-reset ck-input ck-input-text raw-html-embed__source"});return r.disabled=n.isDisabled,r.value=t.getRawHtmlValue(),r}this.editor.editing.view.on("render",()=>{for(const e of r){if(e.element.isConnected)return;e.destroy(),r.delete(e)}},{priority:"lowest"}),e.data.registerRawContentMatcher({name:"div",classes:"raw-html-embed"}),e.conversion.for("upcast").elementToElement({view:{name:"div",classes:"raw-html-embed"},model:(e,{writer:t})=>t.createElement("rawHtml",{value:e.getCustomProperty("$rawContent")})}),e.conversion.for("dataDowncast").elementToElement({model:"rawHtml",view:(e,{writer:t})=>t.createRawElement("div",{class:"raw-html-embed"},(function(t){t.innerHTML=e.getAttribute("value")||""}))}),e.conversion.for("editingDowncast").elementToStructure({model:{name:"rawHtml",attributes:["value"]},view:(r,{writer:o})=>{let s,l,c;const u=o.createRawElement("div",{class:"raw-html-embed__content-wrapper"},(function(t){s=t,a({domElement:t,editor:e,state:l,props:c}),s.addEventListener("mousedown",()=>{if(l.isEditable){const t=e.model;t.document.selection.getSelectedElement()!==r&&t.change(e=>e.setSelection(r,"on"))}},!0)})),d={makeEditable(){l=Object.assign({},l,{isEditable:!0}),a({domElement:s,editor:e,state:l,props:c}),n.change(e=>{e.setAttribute("data-cke-ignore-events","true",u)}),s.querySelector("textarea").focus()},save(t){t!==l.getRawHtmlValue()?(e.execute("htmlEmbed",t),e.editing.view.focus()):this.cancel()},cancel(){l=Object.assign({},l,{isEditable:!1}),a({domElement:s,editor:e,state:l,props:c}),e.editing.view.focus(),n.change(e=>{e.removeAttribute("data-cke-ignore-events",u)})}};l={showPreviews:i.showPreviews,isEditable:!1,getRawHtmlValue:()=>r.getAttribute("value")||""},c={sanitizeHtml:i.sanitizeHtml,textareaPlaceholder:t("Paste raw HTML here..."),onEditClick(){d.makeEditable()},onSaveClick(e){d.save(e)},onCancelClick(){d.cancel()}};const h=o.createContainerElement("div",{class:"raw-html-embed","data-html-embed-label":t("HTML snippet"),dir:e.locale.uiLanguageDirection},u);return o.setCustomProperty("rawHtmlApi",d,h),o.setCustomProperty("rawHtml",!0,h),lX(h,o,{widgetLabel:t("HTML snippet"),hasSelectionHandle:!0})}})}}function m2(e,t,n){const r=e.locale.t,i=new GX(e.locale),a=e.commands.get("htmlEmbed");return i.set({class:`raw-html-embed__${t}-button`,icon:vK.pencil,tooltip:!0,tooltipPosition:"rtl"===e.locale.uiLanguageDirection?"e":"w"}),i.render(),"edit"===t?(i.set({icon:vK.pencil,label:r("Edit source")}),i.bind("isEnabled").to(a)):"save"===t?(i.set({icon:vK.check,label:r("Save changes")}),i.bind("isEnabled").to(a)):i.set({icon:vK.cancel,label:r("Cancel")}),i.on("execute",n),i}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class g2 extends HF{static get pluginName(){return"HtmlEmbedUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("htmlEmbed",n=>{const r=e.commands.get("htmlEmbed"),i=new GX(n);return i.set({label:t("Insert HTML"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M17 0a2 2 0 0 1 2 2v7a1 1 0 0 1 1 1v5a1 1 0 0 1-.883.993l-.118.006L19 17a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2l-.001-1.001-.116-.006A1 1 0 0 1 0 15v-5a1 1 0 0 1 .999-1L1 2a2 2 0 0 1 2-2h14zm.499 15.999h-15L2.5 17a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5l-.001-1.001zm-3.478-6.013-.014.014H14v.007l-1.525 1.525-1.46-1.46-.015.013V10h-1v5h1v-3.53l1.428 1.43.048.043.131-.129L14 11.421V15h1v-5h-.965l-.014-.014zM2 10H1v5h1v-2h2v2h1v-5H4v2H2v-2zm7 0H6v1h1v4h1v-4h1v-1zm8 0h-1v5h3v-1h-2v-4zm0-8.5H3a.5.5 0 0 0-.5.5l-.001 6.999h15L17.5 2a.5.5 0 0 0-.5-.5zM10 7v1H4V7h6zm3-2v1H4V5h9zm-3-2v1H4V3h6z"/></svg>',tooltip:!0}),i.bind("isEnabled").to(r,"isEnabled"),this.listenTo(i,"execute",()=>{e.execute("htmlEmbed"),e.editing.view.focus(),e.editing.view.document.selection.getSelectedElement().getCustomProperty("rawHtmlApi").makeEditable()}),i})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function v2(e,t,n,r,i=1){t>i?r.setAttribute(e,t,n):r.removeAttribute(e,n)}function b2(e,t,n={}){const r=e.createElement("tableCell",n);return e.insertElement("paragraph",r),e.insert(r,t),r}function y2(e,t){const n=t.parent.parent,r=parseInt(n.getAttribute("headingColumns")||0),{column:i}=e.getCellLocation(t);return!!r&&i<r}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function A2(){return e=>{e.on("element:table",(e,t,n)=>{const r=t.viewItem;if(!n.consumable.test(r,{name:!0}))return;const{rows:i,headingRows:a,headingColumns:o}=function(e){const t={headingRows:0,headingColumns:0},n=[],r=[];let i;for(const a of Array.from(e.getChildren()))if("tbody"===a.name||"thead"===a.name||"tfoot"===a.name){"thead"!==a.name||i||(i=a);const e=Array.from(a.getChildren()).filter(e=>e.is("element","tr"));for(const a of e)if("thead"===a.parent.name&&a.parent===i)t.headingRows++,n.push(a);else{r.push(a);const e=w2(a);e>t.headingColumns&&(t.headingColumns=e)}}return t.rows=[...n,...r],t}(r),s={};o&&(s.headingColumns=o),a&&(s.headingRows=a);const l=n.writer.createElement("table",s);if(n.safeInsert(l,t.modelCursor)){if(n.consumable.consume(r,{name:!0}),i.forEach(e=>n.convertItem(e,n.writer.createPositionAt(l,"end"))),n.convertChildren(r,n.writer.createPositionAt(l,"end")),l.isEmpty){const e=n.writer.createElement("tableRow");n.writer.insert(e,n.writer.createPositionAt(l,"end")),b2(n.writer,n.writer.createPositionAt(e,"end"))}n.updateConversionResult(l,t)}})}}function _2(e){return t=>{t.on(`element:${e}`,(e,t,n)=>{if(t.modelRange&&t.viewItem.isEmpty){const e=t.modelRange.start.nodeAfter,r=n.writer.createPositionAt(e,0);n.writer.insertElement("paragraph",r)}},{priority:"low"})}}function w2(e){let t=0,n=0;const r=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name);for(;n<r.length&&"th"===r[n].name;){const e=r[n];t+=parseInt(e.getAttribute("colspan")||1),n++}return t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class E2{constructor(e,t={}){this._table=e,this._startRow=void 0!==t.row?t.row:t.startRow||0,this._endRow=void 0!==t.row?t.row:t.endRow,this._startColumn=void 0!==t.column?t.column:t.startColumn||0,this._endColumn=void 0!==t.column?t.column:t.endColumn,this._includeAllSlots=!!t.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){const e=this._table.getChild(this._rowIndex);if(!e||this._isOverEndRow())return{done:!0};if(!e.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let t=null;const n=this._getSpanned();if(n)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(n.cell,n.row,n.column));else{const n=e.getChild(this._cellIndex);if(!n)return this._advanceToNextRow();const r=parseInt(n.getAttribute("colspan")||1),i=parseInt(n.getAttribute("rowspan")||1);(r>1||i>1)&&this._recordSpans(n,i,r),this._shouldSkipSlot()||(t=this._formatOutValue(n)),this._nextCellAtColumn=this._column+r}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,n=this._column){return{done:!1,value:new S2(this,e,t,n)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._row<this._startRow,n=this._column<this._startColumn,r=void 0!==this._endColumn&&this._column>this._endColumn;return e||t||n||r}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,n){const r={cell:e,row:this._row,column:this._column};for(let e=this._row;e<this._row+t;e++)for(let t=this._column;t<this._column+n;t++)e==this._row&&t==this._column||this._markSpannedCell(e,t,r)}_markSpannedCell(e,t,n){this._spannedCells.has(e)||this._spannedCells.set(e,new Map),this._spannedCells.get(e).set(t,n)}}class S2{constructor(e,t,n,r){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=n,this.cellAnchorColumn=r,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||1)}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||1)}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function C2(e,t={}){return(n,{writer:r})=>{const i=n.getAttribute("headingRows")||0,a=[];i>0&&a.push(r.createContainerElement("thead",null,r.createSlot(e=>e.is("element","tableRow")&&e.index<i))),i<e.getRows(n)&&a.push(r.createContainerElement("tbody",null,r.createSlot(e=>e.is("element","tableRow")&&e.index>=i)));const o=r.createContainerElement("figure",{class:"table"},[r.createContainerElement("table",null,a),r.createSlot(e=>!e.is("element","tableRow"))]);return t.asWidget?function(e,t){return t.setCustomProperty("table",!0,e),lX(e,t,{hasSelectionHandle:!0})}(o,r):o}}function T2(e={}){return(t,{writer:n})=>{const r=t.parent,i=r.parent,a=i.getChildIndex(r),o=new E2(i,{row:a}),s=i.getAttribute("headingRows")||0,l=i.getAttribute("headingColumns")||0;for(const r of o)if(r.cell==t){const t=r.row<s||r.column<l?"th":"td";return e.asWidget?fX(n.createEditableElement(t),n):n.createContainerElement(t)}}}function k2(e={}){return(t,{writer:n,consumable:r,mapper:i})=>{if(t.parent.is("element","tableCell")&&x2(t))return e.asWidget?n.createContainerElement("span",{class:"ck-table-bogus-paragraph"}):(r.consume(t,"insert"),void i.bindElements(t,i.toViewElement(t.parent)))}}function x2(e){return 1==e.parent.childCount&&![...e.getAttributeKeys()].length}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class O2 extends VF{refresh(){const e=this.editor.model,t=e.document.selection,n=e.schema;this.isEnabled=function(e,t){const n=e.getFirstPosition().parent,r=n===n.root?n:n.parent;return t.checkChild(r,"table")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t,n)}execute(e={}){const t=this.editor.model,n=this.editor.plugins.get("TableUtils"),r=this.editor.config.get("table"),i=r.defaultHeadings.rows,a=r.defaultHeadings.columns;void 0===e.headingRows&&i&&(e.headingRows=i),void 0===e.headingColumns&&a&&(e.headingColumns=a),t.change(r=>{const i=n.createTable(r,e);t.insertObject(i,null,null,{findOptimalPosition:"auto"}),r.setSelection(r.createPositionAt(i.getNodeByPath([0,0,0]),0))})}}class I2 extends VF{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),r="above"===this.order,i=n.getSelectionAffectedTableCells(t),a=n.getRowIndexes(i),o=r?a.first:a.last,s=i[0].findAncestor("table");n.insertRows(s,{at:r?o:o+1,copyStructureFromAbove:!r})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class M2 extends VF{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),r="left"===this.order,i=n.getSelectionAffectedTableCells(t),a=n.getColumnIndexes(i),o=r?a.first:a.last,s=i[0].findAncestor("table");n.insertColumns(s,{columns:1,at:r?o:o+1})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class P2 extends VF{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function D2(e,t,n){const{startRow:r,startColumn:i,endRow:a,endColumn:o}=t,s=n.createElement("table"),l=a-r+1;for(let e=0;e<l;e++)n.insertElement("tableRow",s,"end");const c=[...new E2(e,{startRow:r,endRow:a,startColumn:i,endColumn:o,includeAllSlots:!0})];for(const{row:e,column:t,cell:l,isAnchor:u,cellAnchorRow:d,cellAnchorColumn:h}of c){const c=e-r,f=s.getChild(c);if(u){const r=n.cloneElement(l);n.append(r,f),j2(r,e,t,a,o,n)}else(d<r||h<i)&&b2(n,n.createPositionAt(f,"end"))}return function(e,t,n,r,i){const a=parseInt(t.getAttribute("headingRows")||0);if(a>0){v2("headingRows",a-n,e,i,0)}const o=parseInt(t.getAttribute("headingColumns")||0);if(o>0){v2("headingColumns",o-r,e,i,0)}}(s,e,r,i,n),s}function N2(e,t,n=0){const r=[],i=new E2(e,{startRow:n,endRow:t-1});for(const e of i){const{row:n,cellHeight:i}=e,a=n+i-1;n<t&&t<=a&&r.push(e)}return r}function L2(e,t,n){const r=e.parent,i=r.parent,a=r.index,o=t-a,s={},l=parseInt(e.getAttribute("rowspan"))-o;l>1&&(s.rowspan=l);const c=parseInt(e.getAttribute("colspan")||1);c>1&&(s.colspan=c);const u=a+o,d=[...new E2(i,{startRow:a,endRow:u,includeAllSlots:!0})];let h,f=null;for(const t of d){const{row:r,column:i,cell:a}=t;a===e&&void 0===h&&(h=i),void 0!==h&&h===i&&r===u&&(f=b2(n,t.getPositionBefore(),s))}return v2("rowspan",o,e,n),f}function R2(e,t){const n=[],r=new E2(e);for(const e of r){const{column:r,cellWidth:i}=e,a=r+i-1;r<t&&t<=a&&n.push(e)}return n}function B2(e,t,n,r){const i=n-t,a={},o=parseInt(e.getAttribute("colspan"))-i;o>1&&(a.colspan=o);const s=parseInt(e.getAttribute("rowspan")||1);s>1&&(a.rowspan=s);const l=b2(r,r.createPositionAfter(e),a);return v2("colspan",i,e,r),l}function j2(e,t,n,r,i,a){const o=parseInt(e.getAttribute("colspan")||1),s=parseInt(e.getAttribute("rowspan")||1);if(n+o-1>i){v2("colspan",i-n+1,e,a,1)}if(t+s-1>r){v2("rowspan",r-t+1,e,a,1)}}function F2(e,t){const n=t.getColumns(e),r=new Array(n).fill(0);for(const{column:t}of new E2(e))r[t]++;const i=r.reduce((e,t,n)=>t?e:[...e,n],[]);if(i.length>0){const n=i[i.length-1];return t.removeColumns(e,{at:n}),!0}return!1}function U2(e,t){const n=[],r=t.getRows(e);for(let t=0;t<r;t++){e.getChild(t).isEmpty&&n.push(t)}if(n.length>0){const r=n[n.length-1];return t.removeRows(e,{at:r}),!0}return!1}function H2(e,t){F2(e,t)||U2(e,t)}function z2(e,t){const n=Array.from(new E2(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(n.every(({cellHeight:e})=>1===e))return t.lastRow;const r=n[0].cellHeight-1;return t.lastRow+r}function V2(e,t){const n=Array.from(new E2(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(n.every(({cellWidth:e})=>1===e))return t.lastColumn;const r=n[0].cellWidth-1;return t.lastColumn+r}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class W2 extends VF{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,n=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],r=this.value,i=this.direction;e.change(e=>{const t="right"==i||"down"==i,a=t?n:r,o=t?r:n,s=o.parent;!function(e,t,n){G2(e)||(G2(t)&&n.remove(n.createRangeIn(t)),n.move(n.createRangeIn(e),n.createPositionAt(t,"end")));n.remove(e)}(o,a,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(n.getAttribute(l)||1),u=parseInt(r.getAttribute(l)||1);e.setAttribute(l,c+u,a),e.setSelection(e.createRangeIn(a));const d=this.editor.plugins.get("TableUtils");H2(s.findAncestor("table"),d)})}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),n=t.getTableCellsContainingSelection(e.selection)[0];if(!n)return;const r=this.isHorizontal?function(e,t,n){const r=e.parent.parent,i="right"==t?e.nextSibling:e.previousSibling,a=(r.getAttribute("headingColumns")||0)>0;if(!i)return;const o="right"==t?e:i,s="right"==t?i:e,{column:l}=n.getCellLocation(o),{column:c}=n.getCellLocation(s),u=parseInt(o.getAttribute("colspan")||1),d=y2(n,o),h=y2(n,s);if(a&&d!=h)return;return l+u===c?i:void 0}(n,this.direction,t):function(e,t,n){const r=e.parent,i=r.parent,a=i.getChildIndex(r);if("down"==t&&a===n.getRows(i)-1||"up"==t&&0===a)return;const o=parseInt(e.getAttribute("rowspan")||1),s=i.getAttribute("headingRows")||0,l="down"==t&&a+o===s,c="up"==t&&a===s;if(s&&(l||c))return;const u=parseInt(e.getAttribute("rowspan")||1),d="down"==t?a+u:a,h=[...new E2(i,{endRow:d})],f=h.find(t=>t.cell===e).column,p=h.find(({row:e,cellHeight:n,column:r})=>r===f&&("down"==t?e===d:d===e+n));return p&&p.cell}(n,this.direction,t);if(!r)return;const i=this.isHorizontal?"rowspan":"colspan",a=parseInt(n.getAttribute(i)||1);return parseInt(r.getAttribute(i)||1)===a?r:void 0}}function G2(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class q2 extends VF{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),n=t[0];if(n){const r=n.findAncestor("table"),i=this.editor.plugins.get("TableUtils").getRows(r)-1,a=e.getRowIndexes(t),o=0===a.first&&a.last===i;this.isEnabled=!o}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),r=t.getRowIndexes(n),i=n[0],a=i.findAncestor("table"),o=t.getCellLocation(i).column;e.change(e=>{const n=r.last-r.first+1;t.removeRows(a,{at:r.first,rows:n});const i=function(e,t,n,r){const i=e.getChild(Math.min(t,r-1));let a=i.getChild(0),o=0;for(const e of i.getChildren()){if(o>n)return a;a=e,o+=parseInt(e.getAttribute("colspan")||1)}return a}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(a,r.first,o,t.getRows(a));e.setSelection(e.createPositionAt(i,0))})}}class Y2 extends VF{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),n=t[0];if(n){const r=n.findAncestor("table"),i=e.getColumns(r),{first:a,last:o}=e.getColumnIndexes(t);this.isEnabled=o-a<i-1}else this.isEnabled=!1}execute(){const e=this.editor.plugins.get("TableUtils"),[t,n]=function(e,t){const n=t.getSelectionAffectedTableCells(e),r=n[0],i=n.pop(),a=[r,i];return r.isBefore(i)?a:a.reverse()}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(this.editor.model.document.selection,e),r=t.parent.parent,i=[...new E2(r)],a={first:i.find(e=>e.cell===t).column,last:i.find(e=>e.cell===n).column},o=function(e,t,n,r){return parseInt(n.getAttribute("colspan")||1)>1?n:t.previousSibling||n.nextSibling?n.nextSibling||t.previousSibling:r.first?e.reverse().find(({column:e})=>e<r.first).cell:e.reverse().find(({column:e})=>e>r.last).cell}(i,t,n,a);this.editor.model.change(e=>{const t=a.last-a.first+1;this.editor.plugins.get("TableUtils").removeColumns(r,{at:a.first,columns:t}),e.setSelection(e.createPositionAt(o,0))})}}class K2 extends VF{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection),r=n.length>0;this.isEnabled=r,this.value=r&&n.every(e=>this._isInHeading(e,e.parent.parent))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),n=this.editor.model,r=t.getSelectionAffectedTableCells(n.document.selection),i=r[0].findAncestor("table"),{first:a,last:o}=t.getRowIndexes(r),s=this.value?a:o+1,l=i.getAttribute("headingRows")||0;n.change(e=>{if(s){const t=N2(i,s,s>l?l:0);for(const{cell:n}of t)L2(n,s,e)}v2("headingRows",s,i,e,0)})}_isInHeading(e,t){const n=parseInt(t.getAttribute("headingRows")||0);return!!n&&e.parent.index<n}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class X2 extends VF{refresh(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),r=n.length>0;this.isEnabled=r,this.value=r&&n.every(e=>y2(t,e))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),n=this.editor.model,r=t.getSelectionAffectedTableCells(n.document.selection),i=r[0].findAncestor("table"),{first:a,last:o}=t.getColumnIndexes(r),s=this.value?a:o+1;n.change(e=>{if(s){const t=R2(i,s);for(const{cell:n,column:r}of t)B2(n,r,s,e)}v2("headingColumns",s,i,e,0)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class Q2 extends HF{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,n=t.parent,r=n.getChildIndex(t),i=new E2(n,{row:r});for(const{cell:t,row:n,column:r}of i)if(t===e)return{row:n,column:r}}createTable(e,t){const n=e.createElement("table"),r=parseInt(t.rows)||2,i=parseInt(t.columns)||2;return $2(e,n,0,r,i),t.headingRows&&v2("headingRows",Math.min(t.headingRows,r),n,e,0),t.headingColumns&&v2("headingColumns",Math.min(t.headingColumns,i),n,e,0),n}insertRows(e,t={}){const n=this.editor.model,r=t.at||0,i=t.rows||1,a=void 0!==t.copyStructureFromAbove,o=t.copyStructureFromAbove?r-1:r,s=this.getRows(e),l=this.getColumns(e);if(r>s)throw new hj.a("tableutils-insertrows-insert-out-of-range",this,{options:t});n.change(t=>{const n=e.getAttribute("headingRows")||0;if(n>r&&v2("headingRows",n+i,e,t,0),!a&&(0===r||r===s))return void $2(t,e,r,i,l);const c=a?Math.max(r,o):r,u=new E2(e,{endRow:c}),d=new Array(l).fill(1);for(const{row:e,column:n,cellHeight:s,cellWidth:l,cell:c}of u){const u=e+s-1,h=e<=o&&o<=u;e<r&&r<=u?(t.setAttribute("rowspan",s+i,c),d[n]=-l):a&&h&&(d[n]=l)}for(let n=0;n<i;n++){const n=t.createElement("tableRow");t.insert(n,e,r);for(let e=0;e<d.length;e++){const r=d[e],i=t.createPositionAt(n,"end");r>0&&b2(t,i,r>1?{colspan:r}:null),e+=Math.abs(r)-1}}})}insertColumns(e,t={}){const n=this.editor.model,r=t.at||0,i=t.columns||1;n.change(t=>{const n=e.getAttribute("headingColumns");r<n&&t.setAttribute("headingColumns",n+i,e);const a=this.getColumns(e);if(0===r||a===r){for(const n of e.getChildren())n.is("element","tableRow")&&J2(i,t,t.createPositionAt(n,r?"end":0));return}const o=new E2(e,{column:r,includeAllSlots:!0});for(const e of o){const{row:n,cell:a,cellAnchorColumn:s,cellAnchorRow:l,cellWidth:c,cellHeight:u}=e;if(s<r){t.setAttribute("colspan",c+i,a);const e=l+u-1;for(let t=n;t<=e;t++)o.skipRow(t)}else J2(i,t,e.getPositionBefore())}})}removeRows(e,t){const n=this.editor.model,r=t.rows||1,i=this.getRows(e),a=t.at,o=a+r-1;if(o>i-1)throw new hj.a("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});n.change(t=>{const{cellsToMove:n,cellsToTrim:r}=function(e,t,n){const r=new Map,i=[];for(const{row:a,column:o,cellHeight:s,cell:l}of new E2(e,{endRow:n})){const e=a+s-1;if(a>=t&&a<=n&&e>n){const e=s-(n-a+1);r.set(o,{cell:l,rowspan:e})}if(a<t&&e>=t){let r;r=e>=n?n-t+1:e-t+1,i.push({cell:l,rowspan:s-r})}}return{cellsToMove:r,cellsToTrim:i}}(e,a,o);if(n.size){!function(e,t,n,r){const i=[...new E2(e,{includeAllSlots:!0,row:t})],a=e.getChild(t);let o;for(const{column:e,cell:t,isAnchor:s}of i)if(n.has(e)){const{cell:t,rowspan:i}=n.get(e),s=o?r.createPositionAfter(o):r.createPositionAt(a,0);r.move(r.createRangeOn(t),s),v2("rowspan",i,t,r),o=t}else s&&(o=t)}(e,o+1,n,t)}for(let n=o;n>=a;n--)t.remove(e.getChild(n));for(const{rowspan:e,cell:n}of r)v2("rowspan",e,n,t);!function(e,t,n,r){const i=e.getAttribute("headingRows")||0;if(t<i){v2("headingRows",n<i?i-(n-t+1):t,e,r,0)}}(e,a,o,t),F2(e,this)||U2(e,this)})}removeColumns(e,t){const n=this.editor.model,r=t.at,i=t.columns||1,a=t.at+i-1;n.change(t=>{!function(e,t,n){const r=e.getAttribute("headingColumns")||0;if(r&&t.first<r){const i=Math.min(r-1,t.last)-t.first+1;n.setAttribute("headingColumns",r-i,e)}}(e,{first:r,last:a},t);for(let n=a;n>=r;n--)for(const{cell:r,column:i,cellWidth:a}of[...new E2(e)])i<=n&&a>1&&i+a>n?v2("colspan",a-1,r,t):i===n&&t.remove(r);U2(e,this)||F2(e,this)})}splitCellVertically(e,t=2){const n=this.editor.model,r=e.parent.parent,i=parseInt(e.getAttribute("rowspan")||1),a=parseInt(e.getAttribute("colspan")||1);n.change(n=>{if(a>1){const{newCellsSpan:r,updatedSpan:o}=Z2(a,t);v2("colspan",o,e,n);const s={};r>1&&(s.colspan=r),i>1&&(s.rowspan=i),J2(a>t?t-1:a-1,n,n.createPositionAfter(e),s)}if(a<t){const o=t-a,s=[...new E2(r)],{column:l}=s.find(({cell:t})=>t===e),c=s.filter(({cell:t,cellWidth:n,column:r})=>t!==e&&r===l||r<l&&r+n>l);for(const{cell:e,cellWidth:t}of c)n.setAttribute("colspan",t+o,e);const u={};i>1&&(u.rowspan=i),J2(o,n,n.createPositionAfter(e),u);const d=r.getAttribute("headingColumns")||0;d>l&&v2("headingColumns",d+o,r,n)}})}splitCellHorizontally(e,t=2){const n=this.editor.model,r=e.parent,i=r.parent,a=i.getChildIndex(r),o=parseInt(e.getAttribute("rowspan")||1),s=parseInt(e.getAttribute("colspan")||1);n.change(n=>{if(o>1){const r=[...new E2(i,{startRow:a,endRow:a+o-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=Z2(o,t);v2("rowspan",c,e,n);const{column:u}=r.find(({cell:t})=>t===e),d={};l>1&&(d.rowspan=l),s>1&&(d.colspan=s);for(const e of r){const{column:t,row:r}=e,i=t===u,o=(r+a+c)%l==0;r>=a+c&&i&&o&&J2(1,n,e.getPositionBefore(),d)}}if(o<t){const r=t-o,l=[...new E2(i,{startRow:0,endRow:a})];for(const{cell:t,cellHeight:i,row:o}of l)if(t!==e&&o+i>a){const e=i+r;n.setAttribute("rowspan",e,t)}const c={};s>1&&(c.colspan=s),$2(n,i,a+1,r,1,c);const u=i.getAttribute("headingRows")||0;u>a&&v2("headingRows",u+r,i,n)}})}getColumns(e){return[...e.getChild(0).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||1),0)}getRows(e){return Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0)}createTableWalker(e,t={}){return new E2(e,t)}getSelectedTableCells(e){const t=[];for(const n of this.sortRanges(e.getRanges())){const e=n.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const n of e.getRanges()){const e=n.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map(e=>e.parent.index);return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),n=[...new E2(t)].filter(t=>e.includes(t.cell)).map(e=>e.column);return this._getFirstLastIndexesObject(n)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,n=new Set;let r=0;for(const i of e){const{row:e,column:a}=this.getCellLocation(i),o=parseInt(i.getAttribute("rowspan")||1),s=parseInt(i.getAttribute("colspan")||1);t.add(e),n.add(a),o>1&&t.add(e+o-1),s>1&&n.add(a+s-1),r+=o*s}return function(e,t){const n=Array.from(e.values()),r=Array.from(t.values()),i=Math.max(...n),a=Math.min(...n),o=Math.max(...r),s=Math.min(...r);return(i-a+1)*(o-s+1)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t,n)==r}sortRanges(e){return Array.from(e).sort(e5)}_getFirstLastIndexesObject(e){const t=e.sort((e,t)=>e-t);return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),n=this.getRowIndexes(e),r=parseInt(t.getAttribute("headingRows")||0);if(!this._areIndexesInSameSection(n,r))return!1;const i=parseInt(t.getAttribute("headingColumns")||0),a=this.getColumnIndexes(e);return this._areIndexesInSameSection(a,i)}_areIndexesInSameSection({first:e,last:t},n){return e<n===t<n}}function $2(e,t,n,r,i,a={}){for(let o=0;o<r;o++){const r=e.createElement("tableRow");e.insert(r,t,n),J2(i,e,e.createPositionAt(r,"end"),a)}}function J2(e,t,n,r={}){for(let i=0;i<e;i++)b2(t,n,r)}function Z2(e,t){if(e<t)return{newCellsSpan:1,updatedSpan:1};const n=Math.floor(e/t);return{newCellsSpan:n,updatedSpan:e-n*t+n}}function e5(e,t){const n=e.start,r=t.start;return n.isBefore(r)?-1:1}class t5 extends VF{refresh(){const e=this.editor.plugins.get(Q2),t=e.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=e.isSelectionRectangular(t,this.editor.plugins.get(Q2))}execute(){const e=this.editor.model,t=this.editor.plugins.get(Q2);e.change(n=>{const r=t.getSelectedTableCells(e.document.selection),i=r.shift(),{mergeWidth:a,mergeHeight:o}=function(e,t,n){let r=0,i=0;for(const e of t){const{row:t,column:a}=n.getCellLocation(e);r=i5(e,a,r,"colspan"),i=i5(e,t,i,"rowspan")}const{row:a,column:o}=n.getCellLocation(e);return{mergeWidth:r-o,mergeHeight:i-a}}(i,r,t);v2("colspan",a,i,n),v2("rowspan",o,i,n);for(const e of r)n5(e,i,n);H2(i.findAncestor("table"),t),n.setSelection(i,"in")})}}function n5(e,t,n){r5(e)||(r5(t)&&n.remove(n.createRangeIn(t)),n.move(n.createRangeIn(e),n.createPositionAt(t,"end"))),n.remove(e)}function r5(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}function i5(e,t,n,r){const i=parseInt(e.getAttribute(r)||1);return Math.max(n,t+i)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class a5 extends VF{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),r=t.getRowIndexes(n),i=n[0].findAncestor("table"),a=[];for(let t=r.first;t<=r.last;t++)for(const n of i.getChild(t).getChildren())a.push(e.createRangeOn(n));e.change(e=>{e.setSelection(a)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class o5 extends VF{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection),r=n[0],i=n.pop(),a=r.findAncestor("table"),o=e.getCellLocation(r),s=e.getCellLocation(i),l=Math.min(o.column,s.column),c=Math.max(o.column,s.column),u=[];for(const e of new E2(a,{startColumn:l,endColumn:c}))u.push(t.createRangeOn(e.cell));t.change(e=>{e.setSelection(u)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function s5(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.differ.getChanges();let r=!1;const i=new Set;for(const t of n){let n;"table"==t.name&&"insert"==t.type&&(n=t.position.nodeAfter),"tableRow"!=t.name&&"tableCell"!=t.name||(n=t.position.findAncestor("table")),u5(t)&&(n=t.range.start.findAncestor("table")),n&&!i.has(n)&&(r=l5(n,e)||r,r=c5(n,e)||r,i.add(n))}return r}(t,e))}function l5(e,t){let n=!1;const r=function(e){const t=parseInt(e.getAttribute("headingRows")||0),n=Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0),r=[];for(const{row:i,cell:a,cellHeight:o}of new E2(e)){if(o<2)continue;const e=i<t?t:n;if(i+o>e){const t=e-i;r.push({cell:a,rowspan:t})}}return r}(e);if(r.length){n=!0;for(const e of r)v2("rowspan",e.rowspan,e.cell,t,1)}return n}function c5(e,t){let n=!1;const r=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:n}of new E2(e,{includeAllSlots:!0}))t[n]++;return t}(e),i=[];for(const[t,n]of r.entries())!n&&e.getChild(t).is("element","tableRow")&&i.push(t);if(i.length){n=!0;for(const n of i.reverse())t.remove(e.getChild(n)),r.splice(n,1)}const a=r.filter((t,n)=>e.getChild(n).is("element","tableRow")),o=a[0];if(!a.every(e=>e===o)){const r=a.reduce((e,t)=>t>e?t:e,0);for(const[i,o]of a.entries()){const a=r-o;if(a){for(let n=0;n<a;n++)b2(t,t.createPositionAt(e.getChild(i),"end"));n=!0}}}return n}function u5(e){const t="attribute"===e.type,n=e.attributeKey;return t&&("headingRows"===n||"colspan"===n||"rowspan"===n)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function d5(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.differ.getChanges();let r=!1;for(const t of n)"insert"==t.type&&"table"==t.name&&(r=h5(t.position.nodeAfter,e)||r),"insert"==t.type&&"tableRow"==t.name&&(r=f5(t.position.nodeAfter,e)||r),"insert"==t.type&&"tableCell"==t.name&&(r=p5(t.position.nodeAfter,e)||r),m5(t)&&(r=p5(t.position.parent,e)||r);return r}(t,e))}function h5(e,t){let n=!1;for(const r of e.getChildren())r.is("element","tableRow")&&(n=f5(r,t)||n);return n}function f5(e,t){let n=!1;for(const r of e.getChildren())n=p5(r,t)||n;return n}function p5(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const n=Array.from(e.getChildren()).filter(e=>e.is("$text"));for(const e of n)t.wrap(t.createRangeOn(e),"paragraph");return!!n.length}function m5(e){return!(!e.position||!e.position.parent.is("element","tableCell"))&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function g5(e,t){if(!e.is("element","paragraph"))return!1;const n=t.toViewElement(e);return!!n&&x2(e)!==n.is("element","span")}r(1588);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class v5 extends HF{static get pluginName(){return"TableEditing"}static get requires(){return[Q2]}init(){const e=this.editor,t=e.model,n=t.schema,r=e.conversion,i=e.plugins.get(Q2);n.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),r.for("upcast").add(e=>{e.on("element:figure",(e,t,n)=>{if(!n.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const r=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!r||!n.consumable.test(r,{name:!0}))return;n.consumable.consume(t.viewItem,{name:!0,classes:"table"});const i=_G(n.convertItem(r,t.modelCursor).modelRange.getItems());i?(n.convertChildren(t.viewItem,n.writer.createPositionAt(i,"end")),n.updateConversionResult(i,t)):n.consumable.revert(t.viewItem,{name:!0,classes:"table"})})}),r.for("upcast").add(A2()),r.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:C2(i,{asWidget:!0})}),r.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:C2(i)}),r.for("upcast").elementToElement({model:"tableRow",view:"tr"}),r.for("upcast").add(e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}),r.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),r.for("upcast").elementToElement({model:"tableCell",view:"td"}),r.for("upcast").elementToElement({model:"tableCell",view:"th"}),r.for("upcast").add(_2("td")),r.for("upcast").add(_2("th")),r.for("editingDowncast").elementToElement({model:"tableCell",view:T2({asWidget:!0})}),r.for("dataDowncast").elementToElement({model:"tableCell",view:T2()}),r.for("editingDowncast").elementToElement({model:"paragraph",view:k2({asWidget:!0}),converterPriority:"high"}),r.for("dataDowncast").elementToElement({model:"paragraph",view:k2(),converterPriority:"high"}),r.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),r.for("upcast").attributeToAttribute({model:{key:"colspan",value:b5("colspan")},view:"colspan"}),r.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),r.for("upcast").attributeToAttribute({model:{key:"rowspan",value:b5("rowspan")},view:"rowspan"}),e.data.mapper.on("modelToViewPosition",(e,t)=>{const n=t.modelPosition.parent,r=t.modelPosition.nodeBefore;if(!n.is("element","tableCell"))return;if(!r||!r.is("element","paragraph"))return;const i=t.mapper.toViewElement(r),a=t.mapper.toViewElement(n);i===a&&(t.viewPosition=t.mapper.findPositionIn(a,r.maxOffset))}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new O2(e)),e.commands.add("insertTableRowAbove",new I2(e,{order:"above"})),e.commands.add("insertTableRowBelow",new I2(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new M2(e,{order:"left"})),e.commands.add("insertTableColumnRight",new M2(e,{order:"right"})),e.commands.add("removeTableRow",new q2(e)),e.commands.add("removeTableColumn",new Y2(e)),e.commands.add("splitTableCellVertically",new P2(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new P2(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new t5(e)),e.commands.add("mergeTableCellRight",new W2(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new W2(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new W2(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new W2(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new X2(e)),e.commands.add("setTableRowHeader",new K2(e)),e.commands.add("selectTableRow",new a5(e)),e.commands.add("selectTableColumn",new o5(e)),s5(t),d5(t),this.listenTo(t.document,"change:data",()=>{!function(e,t){const n=e.document.differ;for(const e of n.getChanges()){let n,r=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;n=t,r="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(n=e.position.findAncestor("table"),r="tableRow"==e.name);if(!n)continue;const i=n.getAttribute("headingRows")||0,a=n.getAttribute("headingColumns")||0,o=new E2(n);for(const e of o){const n=e.row<i||e.column<a?"th":"td",o=t.mapper.toViewElement(e.cell);o&&o.is("element")&&o.name!=n&&t.reconvertItem(r?e.cell.parent:e.cell)}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t,e.editing),function(e,t){const n=e.document.differ,r=new Set;for(const e of n.getChanges()){const t="attribute"==e.type?e.range.start.parent:e.position.parent;t.is("element","tableCell")&&r.add(t)}for(const e of r.values()){const n=Array.from(e.getChildren()).filter(e=>g5(e,t.mapper));for(const e of n)t.reconvertItem(e)}}(t,e.editing)})}}function b5(e){return t=>{const n=parseInt(t.getAttribute(e));return Number.isNaN(n)||n<=0?null:n}}r(1590);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class y5 extends SK{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(e,t)=>`${t} × ${e}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck-insert-table-dropdown__label"]},children:[{text:t.to("label")}]}],on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(e,t)=>{const{row:n,column:r}=t.target.dataset;this.set({rows:parseInt(n),columns:parseInt(r)})}),this.on("change:columns",()=>{this._highlightGridBoxes()}),this.on("change:rows",()=>{this._highlightGridBoxes()})}focus(){}focusLast(){}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((n,r)=>{const i=Math.floor(r/10)<e&&r%10<t;n.set("isOn",i)})}_createGridCollection(){const e=[];for(let t=0;t<100;t++){const n=Math.floor(t/10),r=t%10;e.push(new A5(this.locale,n+1,r+1))}return this.createCollection(e)}}class A5 extends SK{constructor(e,t,n){super(e);const r=this.bindTemplate;this.set("isOn",!1),this.setTemplate({tag:"div",attributes:{class:["ck-insert-table-dropdown-grid-box",r.if("isOn","ck-on")],"data-row":t,"data-column":n}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class _5 extends HF{static get pluginName(){return"TableUI"}init(){const e=this.editor,t=this.editor.t,n="ltr"===e.locale.contentLanguageDirection;e.ui.componentFactory.add("insertTable",n=>{const r=e.commands.get("insertTable"),i=u$(n);let a;return i.bind("isEnabled").to(r),i.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 6v3h4V6H3zm0 4v3h4v-3H3zm0 4v3h4v-3H3zm5 3h4v-3H8v3zm5 0h4v-3h-4v3zm4-4v-3h-4v3h4zm0-4V6h-4v3h4zm1.5 8a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 17V4c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13zM12 13v-3H8v3h4zm0-4V6H8v3h4z"/></svg>',label:t("Insert table"),tooltip:!0}),i.on("change:isOpen",()=>{a||(a=new y5(n),i.panelView.children.add(a),a.delegate("execute").to(i),i.buttonView.on("open",()=>{a.rows=0,a.columns=0}),i.on("execute",()=>{e.execute("insertTable",{rows:a.rows,columns:a.columns}),e.editing.view.focus()}))}),i}),e.ui.componentFactory.add("tableColumn",e=>{const r=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:n?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:n?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',r,e)}),e.ui.componentFactory.add("tableRow",e=>{const n=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',n,e)}),e.ui.componentFactory.add("mergeTableCells",e=>{const r=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:n?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:n?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z"/></svg>',r,e)})}_prepareDropdown(e,t,n,r){const i=this.editor,a=u$(r),o=this._fillDropdownWithListOptions(a,n);return a.buttonView.set({label:e,icon:t,tooltip:!0}),a.bind("isEnabled").toMany(o,"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(a,"execute",e=>{i.execute(e.source.commandName),i.editing.view.focus()}),a}_prepareMergeSplitButtonDropdown(e,t,n,r){const i=this.editor,a=u$(r,KQ),o=i.commands.get("mergeTableCells"),s=this._fillDropdownWithListOptions(a,n);return a.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),a.bind("isEnabled").toMany([o,...s],"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(a.buttonView,"execute",()=>{i.execute("mergeTableCells"),i.editing.view.focus()}),this.listenTo(a,"execute",e=>{i.execute(e.source.commandName),i.editing.view.focus()}),a}_fillDropdownWithListOptions(e,t){const n=this.editor,r=[],i=new VH;for(const e of t)w5(e,n,r,i);return h$(e,i,n.ui.componentFactory),r}}function w5(e,t,n,r){const i=e.model=new C$(e.model),{commandName:a,bindIsOn:o}=e.model;if("button"===e.type||"switchbutton"===e.type){const e=t.commands.get(a);n.push(e),i.set({commandName:a}),i.bind("isEnabled").to(e),o&&i.bind("isOn").to(e,"value")}i.set({withText:!0}),r.add(e)}r(1592);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class E5 extends HF{static get pluginName(){return"TableSelection"}static get requires(){return[Q2,Q2]}init(){const e=this.editor.model;this.listenTo(e,"deleteContent",(e,t)=>this._handleDeleteContent(e,t),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(Q2),t=this.editor.model.document.selection,n=e.getSelectedTableCells(t);return 0==n.length?null:n}getSelectionAsFragment(){const e=this.editor.plugins.get(Q2),t=this.getSelectedTableCells();return t?this.editor.model.change(n=>{const r=n.createDocumentFragment(),{first:i,last:a}=e.getColumnIndexes(t),{first:o,last:s}=e.getRowIndexes(t),l=t[0].findAncestor("table");let c=s,u=a;if(e.isSelectionRectangular(t)){const e={firstColumn:i,lastColumn:a,firstRow:o,lastRow:s};c=z2(l,e),u=V2(l,e)}const d=D2(l,{startRow:o,startColumn:i,endRow:c,endColumn:u},n);return n.insert(d,r,0),r}):null}setCellSelection(e,t){const n=this._getCellsToSelect(e,t);this.editor.model.change(e=>{e.setSelection(n.cells.map(t=>e.createRangeOn(t)),{backward:n.backward})})}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=_G(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(e=>e.on("selection",(e,n,r)=>{const i=r.writer;!function(e){for(const n of t)e.removeClass("ck-editor__editable_selected",n);t.clear()}(i);const a=this.getSelectedTableCells();if(!a)return;for(const e of a){const n=r.mapper.toViewElement(e);i.addClass("ck-editor__editable_selected",n),t.add(n)}const o=r.mapper.toViewElement(a[a.length-1]);i.setSelection(o,0)},{priority:"lowest"}))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change(n=>{const r=n.createPositionAt(t[0],0),i=e.model.schema.getNearestSelectionRange(r);n.setSelection(i)})}})}_handleDeleteContent(e,t){const n=this.editor.plugins.get(Q2),[r,i]=t,a=this.editor.model,o=!i||"backward"==i.direction,s=n.getSelectedTableCells(r);s.length&&(e.stop(),a.change(e=>{const t=s[o?s.length-1:0];a.change(e=>{for(const t of s)a.deleteContent(e.createSelection(t,"in"))});const n=a.schema.getNearestSelectionRange(e.createPositionAt(t,0));r.is("documentSelection")?e.setSelection(n):r.setTo(n)}))}_getCellsToSelect(e,t){const n=this.editor.plugins.get("TableUtils"),r=n.getCellLocation(e),i=n.getCellLocation(t),a=Math.min(r.row,i.row),o=Math.max(r.row,i.row),s=Math.min(r.column,i.column),l=Math.max(r.column,i.column),c=new Array(o-a+1).fill(null).map(()=>[]),u={startRow:a,endRow:o,startColumn:s,endColumn:l};for(const{row:t,cell:n}of new E2(e.findAncestor("table"),u))c[t-a].push(n);const d=i.row<r.row,h=i.column<r.column;return d&&c.reverse(),h&&c.forEach(e=>e.reverse()),{cells:c.flat(),backward:d||h}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class S5 extends HF{static get pluginName(){return"TableClipboard"}static get requires(){return[E5,Q2]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",(e,t)=>this._onCopyCut(e,t)),this.listenTo(t,"cut",(e,t)=>this._onCopyCut(e,t)),this.listenTo(e.model,"insertContent",(e,t)=>this._onInsertContent(e,...t),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const n=this.editor.plugins.get(E5);if(!n.getSelectedTableCells())return;if("cut"==e.name&&this.editor.isReadOnly)return;t.preventDefault(),e.stop();const r=this.editor.data,i=this.editor.editing.view.document,a=r.toView(n.getSelectionAsFragment());i.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:a,method:e.name})}_onInsertContent(e,t,n){if(n&&!n.is("documentSelection"))return;const r=this.editor.model,i=this.editor.plugins.get(Q2);let a=C5(t,r);if(!a)return;const o=i.getSelectionAffectedTableCells(r.document.selection);o.length?(e.stop(),r.change(e=>{const t={width:i.getColumns(a),height:i.getRows(a)},n=function(e,t,n,r){const i=e[0].findAncestor("table"),a=r.getColumnIndexes(e),o=r.getRowIndexes(e),s={firstColumn:a.first,lastColumn:a.last,firstRow:o.first,lastRow:o.last},l=1===e.length;l&&(s.lastRow+=t.height-1,s.lastColumn+=t.width-1,function(e,t,n,r){const i=r.getColumns(e),a=r.getRows(e);n>i&&r.insertColumns(e,{at:i,columns:n-i});t>a&&r.insertRows(e,{at:a,rows:t-a})}(i,s.lastRow+1,s.lastColumn+1,r));l||!r.isSelectionRectangular(e)?function(e,t,n){const{firstRow:r,lastRow:i,firstColumn:a,lastColumn:o}=t,s={first:r,last:i},l={first:a,last:o};k5(e,a,s,n),k5(e,o+1,s,n),T5(e,r,l,n),T5(e,i+1,l,n,r)}(i,s,n):(s.lastRow=z2(i,s),s.lastColumn=V2(i,s));return s}(o,t,e,i),r=n.lastRow-n.firstRow+1,s=n.lastColumn-n.firstColumn+1,l={startRow:0,startColumn:0,endRow:Math.min(r,t.height)-1,endColumn:Math.min(s,t.width)-1};a=D2(a,l,e);const c=o[0].findAncestor("table"),u=this._replaceSelectedCellsWithPasted(a,t,c,n,e);if(this.editor.plugins.get("TableSelection").isEnabled){const t=i.sortRanges(u.map(t=>e.createRangeOn(t)));e.setSelection(t)}else e.setSelection(u[0],0)})):H2(a,i)}_replaceSelectedCellsWithPasted(e,t,n,r,i){const{width:a,height:o}=t,s=function(e,t,n){const r=new Array(n).fill(null).map(()=>new Array(t).fill(null));for(const{column:t,row:n,cell:i}of new E2(e))r[n][t]=i;return r}(e,a,o),l=[...new E2(n,{startRow:r.firstRow,endRow:r.lastRow,startColumn:r.firstColumn,endColumn:r.lastColumn,includeAllSlots:!0})],c=[];let u;for(const e of l){const{row:t,column:n}=e;n===r.firstColumn&&(u=e.getPositionBefore());const l=t-r.firstRow,d=n-r.firstColumn,h=s[l%o][d%a],f=h?i.cloneElement(h):null,p=this._replaceTableSlotCell(e,f,u,i);p&&(j2(p,t,n,r.lastRow,r.lastColumn,i),c.push(p),u=i.createPositionAfter(p))}const d=parseInt(n.getAttribute("headingRows")||0),h=parseInt(n.getAttribute("headingColumns")||0),f=r.firstRow<d&&d<=r.lastRow,p=r.firstColumn<h&&h<=r.lastColumn;if(f){const e=T5(n,d,{first:r.firstColumn,last:r.lastColumn},i,r.firstRow);c.push(...e)}if(p){const e=k5(n,h,{first:r.firstRow,last:r.lastRow},i);c.push(...e)}return c}_replaceTableSlotCell(e,t,n,r){const{cell:i,isAnchor:a}=e;return a&&r.remove(i),t?(r.insert(t,n),t):null}getTableIfOnlyTableInContent(e,t){return C5(e,t)}}function C5(e,t){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(1==e.childCount&&e.getChild(0).is("element","table"))return e.getChild(0);const n=t.createRangeIn(e);for(const e of n.getItems())if(e.is("element","table")){const r=t.createRange(n.start,t.createPositionBefore(e));if(t.hasContent(r,{ignoreWhitespaces:!0}))return null;const i=t.createRange(t.createPositionAfter(e),n.end);return t.hasContent(i,{ignoreWhitespaces:!0})?null:e}return null}function T5(e,t,n,r,i=0){if(t<1)return;return N2(e,t,i).filter(({column:e,cellWidth:t})=>x5(e,t,n)).map(({cell:e})=>L2(e,t,r))}function k5(e,t,n,r){if(t<1)return;return R2(e,t).filter(({row:e,cellHeight:t})=>x5(e,t,n)).map(({cell:e,column:n})=>B2(e,n,t,r))}function x5(e,t,n){const r=e+t-1,{first:i,last:a}=n;return e>=i&&e<=a||e<i&&r>=i}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class O5 extends HF{static get pluginName(){return"TableKeyboard"}static get requires(){return[E5,Q2]}init(){const e=this.editor.editing.view.document;this.listenTo(e,"arrowKey",(...e)=>this._onArrowKey(...e),{context:"table"}),this.listenTo(e,"tab",(...e)=>this._handleTabOnSelectedTable(...e),{context:"figure"}),this.listenTo(e,"tab",(...e)=>this._handleTab(...e),{context:["th","td"]})}_handleTabOnSelectedTable(e,t){const n=this.editor,r=n.model.document.selection.getSelectedElement();r&&r.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),n.model.change(e=>{e.setSelection(e.createRangeIn(r.getChild(0).getChild(0)))}))}_handleTab(e,t){const n=this.editor,r=this.editor.plugins.get(Q2),i=n.model.document.selection,a=!t.shiftKey;let o=r.getTableCellsContainingSelection(i)[0];if(o||(o=this.editor.plugins.get("TableSelection").getFocusCell()),!o)return;t.preventDefault(),t.stopPropagation(),e.stop();const s=o.parent,l=s.parent,c=l.getChildIndex(s),u=s.getChildIndex(o),d=0===u;if(!a&&d&&0===c)return void n.model.change(e=>{e.setSelection(e.createRangeOn(l))});const h=u===s.childCount-1,f=c===r.getRows(l)-1;if(a&&f&&h&&(n.execute("insertTableRowBelow"),c===r.getRows(l)-1))return void n.model.change(e=>{e.setSelection(e.createRangeOn(l))});let p;if(a&&h){const e=l.getChild(c+1);p=e.getChild(0)}else if(!a&&d){const e=l.getChild(c-1);p=e.getChild(e.childCount-1)}else p=s.getChild(u+(a?1:-1));n.model.change(e=>{e.setSelection(e.createRangeIn(p))})}_onArrowKey(e,t){const n=this.editor,r=CV(t.keyCode,n.locale.contentLanguageDirection);this._handleArrowKeys(r,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const n=this.editor.plugins.get(Q2),r=this.editor.model,i=r.document.selection,a=["right","down"].includes(e),o=n.getSelectedTableCells(i);if(o.length){let n;return n=t?this.editor.plugins.get("TableSelection").getFocusCell():a?o[o.length-1]:o[0],this._navigateFromCellInDirection(n,e,t),!0}const s=i.focus.findAncestor("tableCell");if(!s)return!1;if(!i.isCollapsed)if(t){if(i.isBackward==a&&!i.containsEntireContent(s))return!1}else{const e=i.getSelectedElement();if(!e||!r.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(i,s,a)&&(this._navigateFromCellInDirection(s,e,t),!0)}_isSelectionAtCellEdge(e,t,n){const r=this.editor.model,i=this.editor.model.schema,a=n?e.getLastPosition():e.getFirstPosition();if(!i.getLimitElement(a).is("element","tableCell")){return r.createPositionAt(t,n?"end":0).isTouching(a)}const o=r.createSelection(a);return r.modifySelection(o,{direction:n?"forward":"backward"}),a.isEqual(o.focus)}_navigateFromCellInDirection(e,t,n=!1){const r=this.editor.model,i=e.findAncestor("table"),a=[...new E2(i,{includeAllSlots:!0})],{row:o,column:s}=a[a.length-1],l=a.find(({cell:t})=>t==e);let{row:c,column:u}=l;switch(t){case"left":u--;break;case"up":c--;break;case"right":u+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>o||u<0&&c<=0||u>s&&c>=o)return void r.change(e=>{e.setSelection(e.createRangeOn(i))});u<0?(u=n?0:s,c--):u>s&&(u=n?s:0,c++);const d=a.find(e=>e.row==c&&e.column==u).cell,h=["right","down"].includes(t),f=this.editor.plugins.get("TableSelection");if(n&&f.isEnabled){const t=f.getAnchorCell()||e;f.setCellSelection(t,d)}else{const e=r.createPositionAt(d,h?0:"end");r.change(t=>{t.setSelection(e)})}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class I5 extends GW{constructor(e){super(e),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class M5 extends HF{static get pluginName(){return"TableMouse"}static get requires(){return[E5,Q2]}init(){this.editor.editing.view.addObserver(I5),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(Q2);let n=!1;const r=e.plugins.get(E5);this.listenTo(e.editing.view.document,"mousedown",(i,a)=>{const o=e.model.document.selection;if(!this.isEnabled||!r.isEnabled)return;if(!a.domEvent.shiftKey)return;const s=r.getAnchorCell()||t.getTableCellsContainingSelection(o)[0];if(!s)return;const l=this._getModelTableCellFromDomEvent(a);l&&P5(s,l)&&(n=!0,r.setCellSelection(s,l),a.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{n=!1}),this.listenTo(e.editing.view.document,"selectionChange",e=>{n&&e.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,n,r=!1,i=!1;const a=e.plugins.get(E5);this.listenTo(e.editing.view.document,"mousedown",(e,n)=>{this.isEnabled&&a.isEnabled&&(n.domEvent.shiftKey||n.domEvent.ctrlKey||n.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(n)))}),this.listenTo(e.editing.view.document,"mousemove",(e,o)=>{if(!o.domEvent.buttons)return;if(!t)return;const s=this._getModelTableCellFromDomEvent(o);s&&P5(t,s)&&(n=s,r||n==t||(r=!0)),r&&(i=!0,a.setCellSelection(t,n),o.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{r=!1,i=!1,t=null,n=null}),this.listenTo(e.editing.view.document,"selectionChange",e=>{i&&e.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,n=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(n).parent.findAncestor("tableCell",{includeSelf:!0})}}function P5(e,t){return e.parent.parent==t.parent.parent}r(1594);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class D5 extends HF{static get requires(){return[v5,_5,E5,M5,O5,S5,TX]}static get pluginName(){return"Table"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function N5(e){const t=e.getSelectedElement();return t&&R5(t)?t:null}function L5(e){let t=e.getFirstPosition().parent;for(;t;){if(t.is("element")&&R5(t))return t;t=t.parent}return null}function R5(e){return!!e.getCustomProperty("table")&&sX(e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class B5 extends HF{static get requires(){return[E1]}static get pluginName(){return"TableToolbar"}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(E1),r=e.config.get("table.contentToolbar"),i=e.config.get("table.tableToolbar");r&&n.register("tableContent",{ariaLabel:t("Table toolbar"),items:r,getRelatedElement:L5}),i&&n.register("table",{ariaLabel:t("Table toolbar"),items:i,getRelatedElement:N5})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function j5(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.differ.getChanges();let r=!1;for(const t of n){if("insert"!=t.type)continue;if(t.position.parent.is("element","table")||"table"==t.name){const n="table"==t.name?t.position.nodeAfter:t.position.parent,i=Array.from(n.getChildren()).filter(e=>e.is("element","caption")),a=i.shift();if(!a)continue;for(const t of i)e.move(e.createRangeIn(t),a,"end"),e.remove(t);a.nextSibling&&(e.move(e.createRangeOn(a),n,"end"),r=!0),r=!!i.length||r}}return r}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(t,e))}function F5(e){return!!e&&e.is("element","table")}function U5(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function H5(e){const t=e.parent;return"figcaption"==e.name&&t&&"figure"==t.name&&t.hasClass("table")?{name:!0}:"caption"==e.name&&t&&"table"==t.name?{name:!0}:null}function z5(e){const t=e.getSelectedElement();return t&&t.is("element","table")?t:e.getFirstPosition().findAncestor("table")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class V5 extends VF{refresh(){const e=z5(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!U5(e):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change(e=>{this.value?this._hideTableCaption(e):this._showTableCaption(e,t)})}_showTableCaption(e,t){const n=z5(this.editor.model.document.selection),r=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||e.createElement("caption");e.append(r,n),t&&e.setSelection(r,"in")}_hideTableCaption(e){const t=z5(this.editor.model.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),r=U5(t);n._saveCaption(t,r),e.setSelection(e.createRangeIn(t.getChild(0).getChild(0))),e.remove(r)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class W5 extends HF{static get pluginName(){return"TableCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema,n=e.editing.view,r=e.t;t.isRegistered("caption")?t.extend("caption",{allowIn:"table"}):t.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new V5(this.editor)),e.conversion.for("upcast").elementToElement({view:H5,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>F5(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>{if(!F5(e.parent))return null;const i=t.createEditableElement("figcaption");return t.setCustomProperty("tableCaption",!0,i),Q$({view:n,element:i,text:r("Enter table caption"),keepOnFocus:!0}),fX(i,t)}}),j5(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?MG.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class G5 extends HF{static get pluginName(){return"TableCaptionUI"}init(){const e=this.editor,t=e.editing.view,n=e.t;e.ui.componentFactory.add("toggleTableCaption",r=>{const i=e.commands.get("toggleTableCaption"),a=new GX(r);return a.set({icon:vK.caption,tooltip:!0,isToggleable:!0}),a.bind("isOn","isEnabled").to(i,"value","isEnabled"),a.bind("label").to(i,"value",e=>n(e?"Toggle caption off":"Toggle caption on")),this.listenTo(a,"execute",()=>{if(e.execute("toggleTableCaption",{focusCaptionOnShow:!0}),i.value){const n=function(e){const t=z5(e);return t?U5(t):null}(e.model.document.selection),r=e.editing.mapper.toViewElement(n);if(!r)return;t.scrollToTheSelection(),t.change(e=>{e.addClass("table__caption_highlighted",r)})}}),a})}}r(1596);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function q5(e){return parseFloat(cW.window.getComputedStyle(e).width)}function Y5(e,t){const n=function(e,t){return[...[...t.editing.mapper.toViewElement(e).getChildren()].find(e=>e.is("element","table")).getChildren()].find(e=>e.is("element","tbody"))}(e,t);return q5(t.editing.view.domConverter.mapViewToDom(n))}function K5(e,t){const n=Y5(e,t);return e.getAttribute("columnWidths").split(",").map(e=>e.trim()).map(e=>e.endsWith("px")?parseFloat(e):parseFloat(e)*n/100)}function X5(e,t){return 4e3/Y5(e,t)}function Q5(e,t){return t.plugins.get("TableUtils").getColumns(e)}function $5(e,t){return!!function(e,t){return[...[...t.editing.mapper.toViewElement(e).getChildren()].find(e=>e.is("element","table")).getChildren()].find(e=>e.is("element","colgroup"))}(e,t)}function J5(e){const t=Math.pow(10,2),n=parseFloat(e);return Math.round(n*t)/t}function Z5(e,t,n){return J5(e<=t?t:e>=n?n:e)}function e4(e,t){return Array(e).fill(t)}function t4(e){return e.map(e=>parseFloat(e)).filter(e=>!Number.isNaN(e)).reduce((e,t)=>e+t,0)}function n4(e){const t=function(e){const t=e.split(",").map(e=>e.trim()),n=t.filter(e=>"auto"===e).length;if(0===n)return t.map(e=>J5(e));const r=t4(t),i=Math.max((100-r)/n,5);return t.map(e=>"auto"===e?i:e).map(e=>J5(e))}(e),n=t4(t);return 100===n?t:t.map(e=>J5(100*e/n)).map((e,t,n)=>t===n.length-1?J5(e+100-t4(n)):e)}function r4(e,t){let n=[...t.getChildren()].find(e=>e.hasClass("table-column-resizer"));n||(n=e.createUIElement("div",{class:"table-column-resizer"}),e.insert(e.createPositionAt(t,"end"),n))}function i4(e,t){const n=[...t.getChildren()].find(e=>e.hasClass("table-column-resizer"));n&&e.remove(n)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function a4(){return e=>e.on("attribute:columnWidths:table",(e,t,n)=>{const r=n.writer,i=t.item,a=[...n.mapper.toViewElement(i).getChildren()].find(e=>e.is("element","table"));t.attributeNewValue?t.attributeNewValue!==t.attributeOldValue&&function(e,t,n){const r=n.split(",");let i=[...t.getChildren()].find(e=>e.is("element","colgroup"));i||(i=e.createContainerElement("colgroup"));for(const t of[...i.getChildren()])e.remove(t);for(const t of Array(r.length).keys()){const n=e.createEmptyElement("col");e.setStyle("width",r[t],n),e.insert(e.createPositionAt(i,"end"),n)}e.insert(e.createPositionAt(t,"start"),i)}(r,a,t.attributeNewValue):function(e,t){const n=[...t.getChildren()].find(e=>e.is("element","colgroup"));if(!n)return;e.remove(n)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(r,a)})}class o4 extends HF{static get requires(){return[v5]}static get pluginName(){return"TableColumnResizeEditing"}constructor(e){super(e),this._isResizingActive=!1,this._isResizingAllowed=!0,this._resizingData=null,this._columnIndexMap=new Map,this._cellsModified=new Map}init(){this._extendSchema(),this._setupConversion(),this._setupPostFixer(),this._setupColumnResizers(),this._registerColgroupFixer(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",(e,t)=>!e&&t)}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth","columnWidths"]})}_setupConversion(){const e=this.editor,t=e.conversion;t.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:e=>e.getStyle("width")}}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:e=>({name:"figure",key:"style",value:{width:e}})}),t.for("upcast").add(function(e){return t=>t.on("element:colgroup",(t,n,r)=>{const i=n.modelCursor.findAncestor("table");if(!i)return;const a=r.writer,o=n.viewItem,s=Q5(i,e),l=[...Array(s).keys()].map(e=>{const t=o.getChild(e);if(!t||!t.is("element","col"))return"auto";const n=t.getStyle("width");return n&&n.endsWith("%")?n:"auto"}).join(",");a.setAttribute("columnWidths",l,i)})}(e)),t.for("downcast").add(a4())}_setupPostFixer(){const e=this.editor,t=this._columnIndexMap,n=this._cellsModified;e.model.document.registerPostFixer(r=>{const i=e.model.document.differ.getChanges();let a=!1;for(const o of
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function(e,t){const n=new Set;for(const r of e){let e=null;switch(r.type){case"insert":case"remove":e=["table","tableRow","tableCell"].includes(r.name)?r.position:null;break;case"attribute":r.range.start.nodeAfter&&(e=["table","tableRow","tableCell"].includes(r.range.start.nodeAfter.name)?r.range.start:null)}const i=[];if(e){const n=e.nodeAfter&&"table"===e.nodeAfter.name?e.nodeAfter:e.findAncestor("table");if(n){const e=t.createRangeOn(n);for(const t of e.getItems())t.is("element")&&"table"===t.name&&i.push(t)}}const a=i;if(a)for(const e of a)n.add(e)}return n}(i,e.model)){if(this.fire("disableResize",o)){if(o.hasAttribute("columnWidths")){r.removeAttribute("columnWidths",o);for(const{cell:e}of new E2(o))t.delete(e),n.set(e,"remove");a=!0}continue}const i=Q5(o,e);if(!o.hasAttribute("columnWidths")){const e=e4(i,"auto").join(",");r.setAttribute("columnWidths",e,o),a=!0}const s=n4(o.getAttribute("columnWidths"));let l=null,c=!1,u=!1;for(const{cell:d,cellWidth:h,column:f}of new E2(o)){if(!t.has(d)){t.set(d,f),n.set(d,"insert"),a=!0;continue}const p=t.get(d),m=p>f;if(p<f){if(!c){const n=X5(o,e),r=t.get(d.previousSibling)===f?l:e4(f-p,n);s.splice(p,0,...r),c=!0}t.set(d,f),n.set(d,"insert"),a=!0}if(m){if(!u){if(l=s.splice(f,p-f),!(d.nextSibling&&t.get(d.nextSibling)===f)){s[f>0?f-1:f]+=t4(l)}u=!0}t.set(d,f),n.set(d,"insert"),a=!0}if(d.hasAttribute("width")){if(1!==h)continue;if(!$5(o,e)){r.removeAttribute("width",d),a=!0;continue}const t=Y5(o,e),n=K5(o,e),l=X5(o,e),c=parseFloat(d.getAttribute("width")),u=d.getAttribute("width").endsWith("px"),p=d.getAttribute("width").endsWith("%");if(!u&&!p)continue;if(!d.nextSibling){const a=q5(e.editing.view.getDomRoot()),d=i-1,h=n[d];let f;if(u){const e=40,r=a-(t-h);n[d]=Z5(c,e,r),f=t4(n);for(let e=0;e<=d;e++)s[e]=J5(100*n[e]/f)}else{const e=l,r=100-100*(t-h)/a;s[d]=Z5(c,e,r),f=100*(t-h)/(100-s[d]);for(let e=0;e<=d-1;e++)s[e]=J5(100*n[e]/f)}r.setAttribute("width",`${J5(100*f/a)}%`,o)}else{let e=u?100*c/t:c;e=Z5(e,l,100*(n[f]+n[f+1]-40)/t);const r=e-s[f];s[f]+=r,s[f+1]-=r}r.removeAttribute("width",d),a=!0}}const d=i>s.length,h=i<s.length;if(d){const t=X5(o,e),n=e4(i-s.length,t);s.splice(s.length,0,...n)}if(h){const e=s.splice(i);s[i-1]+=t4(e)}const f=s.map(e=>`${e}%`).join(",");o.getAttribute("columnWidths")!==f&&(r.setAttribute("columnWidths",f,o),a=!0)}return a})}_setupColumnResizers(){const e=this.editor.editing.view;e.addObserver(I5),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"});const t=Object.create(_W);t.listenTo(cW.window.document,"mouseup",this._onMouseUpHandler.bind(this)),t.listenTo(cW.window.document,"mousemove",xX(this._onMouseMoveHandler.bind(this),50))}_onMouseDownHandler(e,t){const n=this.editor.editing.view;t.target.hasClass("table-column-resizer")&&this._isResizingAllowed&&(t.preventDefault(),e.stop(),this._isResizingActive=!0,this._resizingData=this._getResizingData(t),n.change(e=>{e.addClass("table-column-resizer__active",this._resizingData.elements.viewResizer)}))}_onMouseUpHandler(){const e=this.editor,t=e.editing.view;if(!this._isResizingActive)return;const{modelTable:n,viewColgroup:r,viewFigure:i,viewResizer:a}=this._resizingData.elements,o=n.getAttribute("columnWidths"),s=[...r.getChildren()].map(e=>e.getStyle("width")).join(","),l=o!==s,c=n.getAttribute("tableWidth"),u=i.getStyle("width"),d=c!==u;(l||d)&&(this._isResizingAllowed?e.model.change(e=>{l&&e.setAttribute("columnWidths",s,n),d&&e.setAttribute("tableWidth",`${J5(u)}%`,n)}):t.change(e=>{if(l){const t=o.split(",");for(const n of r.getChildren())e.setStyle("width",t.shift(),n)}d&&(c?e.setStyle("width",c,i):e.removeStyle("width",i))})),t.change(e=>{e.removeClass("table-column-resizer__active",a)}),this._isResizingActive=!1,this._resizingData=null}_onMouseMoveHandler(e,t){const n=this.editor.editing.view;if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:r,flags:{isRightEdge:i,isLtrContent:a,isTableCentered:o},widths:{viewFigureParentWidth:s,tableWidth:l,leftColumnWidth:c,rightColumnWidth:u},elements:{viewFigure:d,viewLeftColumn:h,viewRightColumn:f}}=this._resizingData,p=40-c,m=i?s-l:u-40,g=(a?1:-1)*(i&&o?2:1),v=Z5((t.clientX-r)*g,Math.min(p,0),Math.max(m,0));0!==v&&n.change(e=>{const t=J5(100*(c+v)/l);if(e.setStyle("width",`${t}%`,h),i){const t=J5(100*(l+v)/s);e.setStyle("width",`${t}%`,d)}else{const t=J5(100*(u-v)/l);e.setStyle("width",`${t}%`,f)}})}_getResizingData(e){const t=this.editor,n=e.domEvent.clientX,r=e.target,i=r.findAncestor("td")||r.findAncestor("th"),a=t.editing.mapper.toModelElement(i),o=a.findAncestor("table"),s=function(e,t){const n=t.get(e);return{leftEdge:n,rightEdge:n+(e.getAttribute("colspan")||1)-1}}(a,this._columnIndexMap).rightEdge,l=s===Q5(o,t)-1,c=!o.hasAttribute("tableAlignment"),u="rtl"!==t.locale.contentLanguageDirection,d=i.findAncestor("table"),h=d.findAncestor("figure"),f=[...d.getChildren()].find(e=>e.is("element","colgroup")),p=f.getChild(s),m=l?void 0:f.getChild(s+1),g=q5(t.editing.view.domConverter.mapViewToDom(h.parent)),v=Y5(o,t),b=K5(o,t);return{columnPosition:n,elements:{modelTable:o,viewFigure:h,viewColgroup:f,viewLeftColumn:p,viewRightColumn:m,viewResizer:r},widths:{viewFigureParentWidth:g,tableWidth:v,leftColumnWidth:b[s],rightColumnWidth:l?void 0:b[s+1]},flags:{isRightEdge:l,isTableCentered:c,isLtrContent:u}}}_registerColgroupFixer(){const e=this.editor;this.listenTo(e.editing.view.document,"layoutChanged",()=>{const t=e.model.document.selection.getFirstPosition().findAncestor("table"),n=e.editing.view.document.selection.getFirstPosition().getAncestors().reverse().find(e=>"table"===e.name),r=n&&[...n.getChildren()].find(e=>e.is("element","colgroup"));t&&t.hasAttribute("columnWidths")&&n&&!r&&e.editing.reconvertItem(t)},{priority:"low"})}_registerResizerInserter(){const e=this.editor,t=e.editing.view,n=this._cellsModified;t.on("render",()=>{for(const[r,i]of n.entries()){const n=e.editing.mapper.toViewElement(r);t.change(e=>{"insert"===i?r4(e,n):"remove"===i&&i4(e,n)})}n.clear()},{priority:"lowest"})}}r(1598);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function s4(e,t){const{viewElement:n,defaultValue:r,modelAttribute:i,styleName:a,reduceBoxSides:o=!1}=t;e.for("upcast").attributeToAttribute({view:{name:n,styles:{[a]:/[\s\S]+/}},model:{key:i,value:e=>{const t=e.getNormalizedStyle(a),n=o?d4(t):t;if(r!==n)return n}}})}function l4(e,t,n,r){e.for("upcast").add(e=>e.on("element:"+t,(e,t,i)=>{if(!t.modelRange)return;const a=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter(e=>t.viewItem.hasStyle(e));if(!a.length)return;const o={styles:a};if(!i.consumable.test(t.viewItem,o))return;const s=[...t.modelRange.getItems({shallow:!0})].pop();i.consumable.consume(t.viewItem,o);const l={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},c={style:d4(l.style),color:d4(l.color),width:d4(l.width)};c.style!==r.style&&i.writer.setAttribute(n.style,c.style,s),c.color!==r.color&&i.writer.setAttribute(n.color,c.color,s),c.width!==r.width&&i.writer.setAttribute(n.width,c.width,s)}))}function c4(e,{modelElement:t,modelAttribute:n,styleName:r}){e.for("downcast").attributeToAttribute({model:{name:t,key:n},view:e=>({key:"style",value:{[r]:e}})})}function u4(e,{modelAttribute:t,styleName:n}){e.for("downcast").add(e=>e.on(`attribute:${t}:table`,(e,t,r)=>{const{item:i,attributeNewValue:a}=t,{mapper:o,writer:s}=r;if(!r.consumable.consume(t.item,e.name))return;const l=[...o.toViewElement(i).getChildren()].find(e=>e.is("element","table"));a?s.setStyle(n,a,l):s.removeStyle(n,l)}))}function d4(e){if(!e)return;return["top","right","bottom","left"].map(t=>e[t]).reduce((e,t)=>e==t?e:null)||e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class h4 extends VF{constructor(e,t,n){super(e),this.attributeName=t,this._defaultValue=n}refresh(){const e=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,n=t.document.selection,{value:r,batch:i}=e,a=n.getFirstPosition().findAncestor("table"),o=this._getValueToSet(r);t.enqueueChange(i,e=>{o?e.setAttribute(this.attributeName,o,a):e.removeAttribute(this.attributeName,a)})}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class f4 extends h4{constructor(e,t){super(e,"tableBackgroundColor",t)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function p4(e){if(!e||!vv(e))return e;const{top:t,right:n,bottom:r,left:i}=e;return t==n&&n==r&&r==i?t:void 0}function m4(e,t){const n=parseFloat(e);return Number.isNaN(n)?e:String(n)!==String(e)?e:`${n}${t}`}function g4(e,t={}){const n=Object.assign({borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:""},e);return t.includeAlignmentProperty&&!n.alignment&&(n.alignment="center"),t.includePaddingProperty&&!n.padding&&(n.padding=""),t.includeVerticalAlignmentProperty&&!n.verticalAlignment&&(n.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!n.horizontalAlignment&&(n.horizontalAlignment=t.isRightToLeftContent?"right":"left"),n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class v4 extends h4{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=p4(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class b4 extends h4{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=p4(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class y4 extends h4{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=p4(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=m4(e,"px"))!==this._defaultValue)return e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class A4 extends h4{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=m4(e,"px"))!==this._defaultValue)return e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class _4 extends h4{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){return(e=m4(e,"px"))===this._defaultValue?null:e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class w4 extends h4{constructor(e,t){super(e,"tableAlignment",t)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const E4=/^(left|center|right)$/,S4=/^(left|none|right)$/;class C4 extends HF{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[v5]}init(){const e=this.editor,t=e.model.schema,n=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const r=g4(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(IJ),function(e,t,n){const r={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(r)}),l4(t,"table",r,n),u4(t,{modelAttribute:r.color,styleName:"border-color"}),u4(t,{modelAttribute:r.style,styleName:"border-style"}),u4(t,{modelAttribute:r.width,styleName:"border-width"})}(t,n,{color:r.borderColor,style:r.borderStyle,width:r.borderWidth}),e.commands.add("tableBorderColor",new v4(e,r.borderColor)),e.commands.add("tableBorderStyle",new b4(e,r.borderStyle)),e.commands.add("tableBorderWidth",new y4(e,r.borderWidth)),function(e,t,n){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:S4}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===n?null:t}}}).attributeToAttribute({view:{attributes:{align:E4}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===n?null:t}}})}(t,n,r.alignment),e.commands.add("tableAlignment",new w4(e,r.alignment)),T4(t,n,{modelAttribute:"tableWidth",styleName:"width",defaultValue:r.width}),e.commands.add("tableWidth",new A4(e,r.width)),T4(t,n,{modelAttribute:"tableHeight",styleName:"height",defaultValue:r.height}),e.commands.add("tableHeight",new _4(e,r.height)),e.data.addStyleProcessorRules(xJ),function(e,t,n){const{modelAttribute:r}=n;e.extend("table",{allowAttributes:[r]}),s4(t,{viewElement:"table",...n}),u4(t,n)}(t,n,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:r.backgroundColor}),e.commands.add("tableBackgroundColor",new f4(e,r.backgroundColor))}}function T4(e,t,n){const{modelAttribute:r}=n;e.extend("table",{allowAttributes:[r]}),s4(t,{viewElement:/^(table|figure)$/,...n}),c4(t,{modelElement:"table",...n})}r(1600);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class k4 extends SK{constructor(e,t){super(e);const n=this.bindTemplate;this.set("value",""),this.set("id"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.set("ariaDescribedById"),this.options=t,this._dropdownView=this._createDropdownView(),this._inputView=this._createInputTextView(),this._stillTyping=!1,this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color",n.if("hasError","ck-error")],id:n.to("id"),"aria-invalid":n.if("hasError",!0),"aria-describedby":n.to("ariaDescribedById")},children:[this._dropdownView,this._inputView]}),this.on("change:value",(e,t,n)=>this._setInputValue(n))}focus(){this._inputView.focus()}_createDropdownView(){const e=this.locale,t=e.t,n=this.bindTemplate,r=this._createColorGrid(e),i=u$(e),a=new SK,o=this._createRemoveColorButton();return a.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:n.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",n.if("value","ck-hidden",e=>""!=e)]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(a),i.buttonView.tooltip=t("Color picker"),i.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",i.panelView.children.add(o),i.panelView.children.add(r),i.bind("isEnabled").to(this,"isReadOnly",e=>!e),i}_createInputTextView(){const e=this.locale,t=new A$(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",()=>{const e=t.element.value,n=this.options.colorDefinitions.find(t=>e===t.label);this._stillTyping=!0,this.value=n&&n.color||e}),t.on("blur",()=>{this._stillTyping=!1,this._setInputValue(t.element.value)}),t.delegate("input").to(this),t}_createRemoveColorButton(){const e=this.locale,t=e.t,n=new GX(e),r=this.options.defaultColorValue||"",i=t(r?"Restore default":"Remove color");return n.class="ck-input-color__remove-color",n.withText=!0,n.icon=vK.eraser,n.label=i,n.on("execute",()=>{this.value=r,this._dropdownView.isOpen=!1,this.fire("input")}),n}_createColorGrid(e){const t=new GQ(e,{colorDefinitions:this.options.colorDefinitions,columns:this.options.columns});return t.on("execute",(e,t)=>{this.value=t.value,this._dropdownView.isOpen=!1,this.fire("input")}),t.bind("selectedColor").to(this,"value"),t}_setInputValue(e){if(!this._stillTyping){const t=x4(e),n=this.options.colorDefinitions.find(e=>t===x4(e.color));this._inputView.value=n?n.label:e||""}}}function x4(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const O4=e=>""===e;function I4(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function M4(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function P4(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function D4(e){return e=e.trim(),O4(e)||cJ(e)}function N4(e){return e=e.trim(),O4(e)||U4(e)||fJ(e)||mJ(e)}function L4(e){return e=e.trim(),O4(e)||U4(e)||fJ(e)}function R4(e,t){const n=new VH,r=I4(e.t);for(const i in r){const a={type:"button",model:new C$({_borderStyleValue:i,label:r[i],withText:!0})};"none"===i?a.model.bind("isOn").to(e,"borderStyle",e=>"none"===t?!e:e===i):a.model.bind("isOn").to(e,"borderStyle",e=>e===i),n.add(a)}return n}function B4(e){const{view:t,icons:n,toolbar:r,labels:i,propertyName:a,nameToValue:o,defaultValue:s}=e;for(const e in i){const l=new GX(t.locale);l.set({label:i[e],icon:n[e],tooltip:i[e]});const c=o?o(e):e;l.bind("isOn").to(t,a,e=>{let t=e;return""===e&&s&&(t=s),c===t}),l.on("execute",()=>{t[a]=c}),r.items.add(l)}}const j4=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function F4(e){return(t,n,r)=>{const i=new k4(t.locale,{colorDefinitions:(a=e.colorConfig,a.map(e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}}))),columns:e.columns,defaultColorValue:e.defaultColorValue});var a;return i.set({id:n,ariaDescribedById:r}),i.bind("isReadOnly").to(t,"isEnabled",e=>!e),i.bind("hasError").to(t,"errorText",e=>!!e),i.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused").to(i),i}}function U4(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}r(1602);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class H4 extends SK{constructor(e,t={}){super(e);const n=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach(e=>this.children.add(e)),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",n.to("class")],role:n.to("_role"),"aria-labelledby":n.to("_ariaLabelledBy")},children:this.children})}}r(934),r(935),r(1606);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const z4={left:vK.objectLeft,center:vK.objectCenter,right:vK.objectRight};class V4 extends SK{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:n,borderWidthInput:r,borderColorInput:i,borderRowLabel:a}=this._createBorderFields(),{backgroundRowLabel:o,backgroundInput:s}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:u,dimensionsLabel:d}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:f}=this._createAlignmentFields();this.focusTracker=new wG,this.keystrokes=new EG,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=r,this.borderColorInput=i,this.backgroundInput=s,this.widthInput=l,this.heightInput=u,this.alignmentToolbar=h;const{saveButtonView:p,cancelButtonView:m}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=m,this._focusables=new EK,this._focusCycler=new VQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new b$(e,{label:this.t("Table properties")})),this.children.add(new H4(e,{labelView:a,children:[a,n,i,r],class:"ck-table-form__border-row"})),this.children.add(new H4(e,{labelView:o,children:[o,s],class:"ck-table-form__background-row"})),this.children.add(new H4(e,{children:[new H4(e,{labelView:d,children:[d,l,c,u],class:"ck-table-form__dimensions-row"}),new H4(e,{labelView:f,children:[f,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new H4(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),RQ({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},n=F4({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),r=this.locale,i=this.t,a=new p$(r);a.text=i("Border");const o=I4(this.t),s=new _$(r,E$);s.set({label:i("Style"),class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",e=>o[e||"none"]),s.fieldView.on("execute",e=>{this.borderStyle=e.source._borderStyleValue}),s.bind("isEmpty").to(this,"borderStyle",e=>!e),h$(s.fieldView,R4(this,t.style));const l=new _$(r,w$);l.set({label:i("Width"),class:"ck-table-form__border-width"}),l.fieldView.bind("value").to(this,"borderWidth"),l.bind("isEnabled").to(this,"borderStyle",W4),l.fieldView.on("input",()=>{this.borderWidth=l.fieldView.element.value});const c=new _$(r,n);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",W4),c.fieldView.on("input",()=>{this.borderColor=c.fieldView.value}),this.on("change:borderStyle",(e,n,r,i)=>{W4(r)||(this.borderColor="",this.borderWidth=""),W4(i)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:a,borderStyleDropdown:s,borderColorInput:c,borderWidthInput:l}}_createBackgroundFields(){const e=this.locale,t=this.t,n=new p$(e);n.text=t("Background");const r=F4({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor}),i=new _$(e,r);return i.set({label:t("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",()=>{this.backgroundColor=i.fieldView.value}),{backgroundRowLabel:n,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,n=new p$(e);n.text=t("Dimensions");const r=new _$(e,w$);r.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),r.fieldView.bind("value").to(this,"width"),r.fieldView.on("input",()=>{this.width=r.fieldView.element.value});const i=new SK(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const a=new _$(e,w$);return a.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),a.fieldView.bind("value").to(this,"height"),a.fieldView.on("input",()=>{this.height=a.fieldView.element.value}),{dimensionsLabel:n,widthInput:r,operatorLabel:i,heightInput:a}}_createAlignmentFields(){const e=this.locale,t=this.t,n=new p$(e);n.text=t("Alignment");const r=new r$(e);return r.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),B4({view:this,icons:z4,toolbar:r,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:n,alignmentToolbar:r}}_createActionButtons(){const e=this.locale,t=this.t,n=new GX(e),r=new GX(e),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:t("Save"),icon:vK.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(i,"errorText",(...e)=>e.every(e=>!e)),r.set({label:t("Cancel"),icon:vK.cancel,class:"ck-button-cancel",withText:!0}),r.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:r}}get _alignmentLabels(){const e=this.locale,t=this.t,n=t("Align table to the left"),r=t("Center table"),i=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:i,center:r,left:n}:{left:n,center:r,right:i}}}function W4(e){return"none"!==e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const G4=x$.defaultPositions,q4=[G4.northArrowSouth,G4.northArrowSouthWest,G4.northArrowSouthEast,G4.southArrowNorth,G4.southArrowNorthWest,G4.southArrowNorthEast,G4.viewportStickyNorth];function Y4(e,t){const n=e.plugins.get("ContextualBalloon");if(L5(e.editing.view.document.selection)){let r;r="cell"===t?X4(e):K4(e),n.updatePosition(r)}}function K4(e){const t=e.model.document.selection.getFirstPosition().findAncestor("table"),n=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.viewToDom(n),positions:q4}}function X4(e){const t=e.editing.mapper,n=e.editing.view.domConverter,r=e.model.document.selection;if(r.rangeCount>1)return{target:()=>function(e,t){const n=t.editing.mapper,r=t.editing.view.domConverter,i=Array.from(e).map(e=>{const t=Q4(e.start),i=n.toViewElement(t);return new iG(r.viewToDom(i))});return iG.getBoundingRect(i)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(r.getRanges(),e),positions:q4};const i=Q4(r.getFirstPosition()),a=t.toViewElement(i);return{target:n.viewToDom(a),positions:q4}}function Q4(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}const $4={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class J4 extends HF{static get requires(){return[P$]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),e.config.define("table.tableProperties",{borderColors:j4,backgroundColors:j4})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=g4(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(P$),this.view=this._createPropertiesView(),this._undoStepBatch=null,e.ui.componentFactory.add("tableProperties",n=>{const r=new GX(n);r.set({label:t("Table properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',tooltip:!0}),this.listenTo(r,"execute",()=>this._showView());const i=Object.values($4).map(t=>e.commands.get(t));return r.bind("isEnabled").toMany(i,"isEnabled",(...e)=>e.some(e=>e)),r})}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),n=UQ(t.borderColors),r=FQ(e.locale,n),i=UQ(t.backgroundColors),a=FQ(e.locale,i),o=new V4(e.locale,{borderColors:r,backgroundColors:a,defaultTableProperties:this._defaultTableProperties}),s=e.t;o.render(),this.listenTo(o,"submit",()=>{this._hideView()}),this.listenTo(o,"cancel",()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()}),o.keystrokes.set("Esc",(e,t)=>{this._hideView(),t()}),NQ({emitter:o,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=M4(s),c=P4(s);return o.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle",this._defaultTableProperties.borderStyle)),o.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:o.borderColorInput,commandName:"tableBorderColor",errorText:l,validator:D4,defaultValue:this._defaultTableProperties.borderColor})),o.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:o.borderWidthInput,commandName:"tableBorderWidth",errorText:c,validator:L4,defaultValue:this._defaultTableProperties.borderWidth})),o.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:o.backgroundInput,commandName:"tableBackgroundColor",errorText:l,validator:D4,defaultValue:this._defaultTableProperties.backgroundColor})),o.on("change:width",this._getValidatedPropertyChangeCallback({viewField:o.widthInput,commandName:"tableWidth",errorText:c,validator:N4,defaultValue:this._defaultTableProperties.width})),o.on("change:height",this._getValidatedPropertyChangeCallback({viewField:o.heightInput,commandName:"tableHeight",errorText:c,validator:N4,defaultValue:this._defaultTableProperties.height})),o.on("change:alignment",this._getPropertyChangeCallback("tableAlignment",this._defaultTableProperties.alignment)),o}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries($4).map(([t,n])=>{const r=this._defaultTableProperties[t]||"";return[t,e.get(n).value||r]}).forEach(([e,n])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,n)})}_showView(){const e=this.editor;this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:K4(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;L5(e.editing.view.document.selection)?this._isViewVisible&&Y4(e,"table"):this._hideView()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(e,t){return(n,r,i,a)=>{(a||t!==i)&&this.editor.execute(e,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:n,validator:r,errorText:i,defaultValue:a}=e,o=zv(()=>{n.errorText=i},500);return(e,i,s,l)=>{o.cancel(),(l||a!==s)&&(r(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),n.errorText=null):o())}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */r(1608);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const Z4={left:vK.alignLeft,center:vK.alignCenter,right:vK.alignRight,justify:vK.alignJustify,top:vK.alignTop,middle:vK.alignMiddle,bottom:vK.alignBottom};class e3 extends SK{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:n,borderWidthInput:r,borderColorInput:i,borderRowLabel:a}=this._createBorderFields(),{backgroundRowLabel:o,backgroundInput:s}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:u,dimensionsLabel:d}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:f,alignmentLabel:p}=this._createAlignmentFields();this.focusTracker=new wG,this.keystrokes=new EG,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=r,this.borderColorInput=i,this.backgroundInput=s,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=u,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=f;const{saveButtonView:m,cancelButtonView:g}=this._createActionButtons();this.saveButtonView=m,this.cancelButtonView=g,this._focusables=new EK,this._focusCycler=new VQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new b$(e,{label:this.t("Cell properties")})),this.children.add(new H4(e,{labelView:a,children:[a,n,i,r],class:"ck-table-form__border-row"})),this.children.add(new H4(e,{labelView:o,children:[o,s],class:"ck-table-form__background-row"})),this.children.add(new H4(e,{children:[new H4(e,{labelView:d,children:[d,l,c,u],class:"ck-table-form__dimensions-row"}),new H4(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new H4(e,{labelView:p,children:[p,h,f],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new H4(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),RQ({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},n=F4({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),r=this.locale,i=this.t,a=new p$(r);a.text=i("Border");const o=I4(i),s=new _$(r,E$);s.set({label:i("Style"),class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",e=>o[e||"none"]),s.fieldView.on("execute",e=>{this.borderStyle=e.source._borderStyleValue}),s.bind("isEmpty").to(this,"borderStyle",e=>!e),h$(s.fieldView,R4(this,t.style));const l=new _$(r,w$);l.set({label:i("Width"),class:"ck-table-form__border-width"}),l.fieldView.bind("value").to(this,"borderWidth"),l.bind("isEnabled").to(this,"borderStyle",t3),l.fieldView.on("input",()=>{this.borderWidth=l.fieldView.element.value});const c=new _$(r,n);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",t3),c.fieldView.on("input",()=>{this.borderColor=c.fieldView.value}),this.on("change:borderStyle",(e,n,r,i)=>{t3(r)||(this.borderColor="",this.borderWidth=""),t3(i)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:a,borderStyleDropdown:s,borderColorInput:c,borderWidthInput:l}}_createBackgroundFields(){const e=this.locale,t=this.t,n=new p$(e);n.text=t("Background");const r=F4({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor}),i=new _$(e,r);return i.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",()=>{this.backgroundColor=i.fieldView.value}),{backgroundRowLabel:n,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,n=new p$(e);n.text=t("Dimensions");const r=new _$(e,w$);r.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),r.fieldView.bind("value").to(this,"width"),r.fieldView.on("input",()=>{this.width=r.fieldView.element.value});const i=new SK(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const a=new _$(e,w$);return a.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),a.fieldView.bind("value").to(this,"height"),a.fieldView.on("input",()=>{this.height=a.fieldView.element.value}),{dimensionsLabel:n,widthInput:r,operatorLabel:i,heightInput:a}}_createPaddingField(){const e=this.locale,t=this.t,n=new _$(e,w$);return n.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),n.fieldView.bind("value").to(this,"padding"),n.fieldView.on("input",()=>{this.padding=n.fieldView.element.value}),n}_createAlignmentFields(){const e=this.locale,t=this.t,n=new p$(e);n.text=t("Table cell text alignment");const r=new r$(e),i="rtl"===this.locale.contentLanguageDirection;r.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),B4({view:this,icons:Z4,toolbar:r,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(i){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const a=new r$(e);return a.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),B4({view:this,icons:Z4,toolbar:a,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:r,verticalAlignmentToolbar:a,alignmentLabel:n}}_createActionButtons(){const e=this.locale,t=this.t,n=new GX(e),r=new GX(e),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:t("Save"),icon:vK.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(i,"errorText",(...e)=>e.every(e=>!e)),r.set({label:t("Cancel"),icon:vK.cancel,class:"ck-button-cancel",withText:!0}),r.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:r}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,n=t("Align cell text to the left"),r=t("Align cell text to the center"),i=t("Align cell text to the right"),a=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:i,center:r,left:n,justify:a}:{left:n,center:r,right:i,justify:a}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function t3(e){return"none"!==e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const n3={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",width:"tableCellWidth",height:"tableCellHeight",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class r3 extends HF{static get requires(){return[P$]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:j4,backgroundColors:j4})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=g4(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(P$),this.view=this._createPropertiesView(),this._undoStepBatch=null,e.ui.componentFactory.add("tableCellProperties",n=>{const r=new GX(n);r.set({label:t("Cell properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',tooltip:!0}),this.listenTo(r,"execute",()=>this._showView());const i=Object.values(n3).map(t=>e.commands.get(t));return r.bind("isEnabled").toMany(i,"isEnabled",(...e)=>e.some(e=>e)),r})}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.editing.view.document,n=e.config.get("table.tableCellProperties"),r=UQ(n.borderColors),i=FQ(e.locale,r),a=UQ(n.backgroundColors),o=FQ(e.locale,a),s=new e3(e.locale,{borderColors:i,backgroundColors:o,defaultTableCellProperties:this._defaultTableCellProperties}),l=e.t;s.render(),this.listenTo(s,"submit",()=>{this._hideView()}),this.listenTo(s,"cancel",()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()}),s.keystrokes.set("Esc",(e,t)=>{this._hideView(),t()}),this.listenTo(e.ui,"update",()=>{L5(t.selection)?this._isViewVisible&&Y4(e,"cell"):this._hideView()}),NQ({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=M4(l),u=P4(l);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle",this._defaultTableCellProperties.borderStyle)),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:D4,defaultValue:this._defaultTableCellProperties.borderColor})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableCellBorderWidth",errorText:u,validator:L4,defaultValue:this._defaultTableCellProperties.borderWidth})),s.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:s.paddingInput,commandName:"tableCellPadding",errorText:u,validator:N4,defaultValue:this._defaultTableCellProperties.padding})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableCellWidth",errorText:u,validator:N4,defaultValue:this._defaultTableCellProperties.width})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableCellHeight",errorText:u,validator:N4,defaultValue:this._defaultTableCellProperties.height})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableCellBackgroundColor",errorText:c,validator:D4,defaultValue:this._defaultTableCellProperties.backgroundColor})),s.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment",this._defaultTableCellProperties.horizontalAlignment)),s.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment",this._defaultTableCellProperties.verticalAlignment)),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(n3).map(([t,n])=>{const r=this._defaultTableCellProperties[t]||"";return[t,e.get(n).value||r]}).forEach(([e,n])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,n)})}_showView(){const e=this.editor;this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:X4(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){if(!this._isViewInBalloon)return;const e=this.editor;this.stopListening(e.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(e,t){return(n,r,i,a)=>{(a||t!==i)&&this.editor.execute(e,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:n,validator:r,errorText:i,defaultValue:a}=e,o=zv(()=>{n.errorText=i},500);return(e,i,s,l)=>{o.cancel(),(l||a!==s)&&(r(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),n.errorText=null):o())}}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class i3 extends VF{constructor(e,t,n){super(e),this.attributeName=t,this._defaultValue=n}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:n}=e,r=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(r.document.selection),a=this._getValueToSet(t);r.enqueueChange(n,e=>{a?i.forEach(t=>e.setAttribute(this.attributeName,a,t)):i.forEach(t=>e.removeAttribute(this.attributeName,t))})}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every(e=>this._getAttribute(e)===t)?t:void 0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class a3 extends i3{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=p4(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=m4(e,"px"))!==this._defaultValue)return e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class o3 extends i3{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=m4(e,"px"))!==this._defaultValue)return e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class s3 extends i3{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){return(e=m4(e,"px"))===this._defaultValue?null:e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class l3 extends i3{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class c3 extends i3{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class u3 extends i3{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class d3 extends i3{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=p4(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class h3 extends i3{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=p4(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class f3 extends i3{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=p4(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=m4(e,"px"))!==this._defaultValue)return e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const p3=/^(top|middle|bottom)$/,m3=/^(left|center|right|justify)$/;class g3 extends HF{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[v5]}init(){const e=this.editor,t=e.model.schema,n=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const r=g4(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(IJ),function(e,t,n){const r={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(r)}),l4(t,"td",r,n),l4(t,"th",r,n),c4(t,{modelElement:"tableCell",modelAttribute:r.style,styleName:"border-style"}),c4(t,{modelElement:"tableCell",modelAttribute:r.color,styleName:"border-color"}),c4(t,{modelElement:"tableCell",modelAttribute:r.width,styleName:"border-width"})}(t,n,{color:r.borderColor,style:r.borderStyle,width:r.borderWidth}),e.commands.add("tableCellBorderStyle",new d3(e,r.borderStyle)),e.commands.add("tableCellBorderColor",new h3(e,r.borderColor)),e.commands.add("tableCellBorderWidth",new f3(e,r.borderWidth)),v3(t,n,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:r.width}),e.commands.add("tableCellWidth",new o3(e,r.width)),v3(t,n,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:r.height}),e.commands.add("tableCellHeight",new s3(e,r.height)),e.data.addStyleProcessorRules(zJ),v3(t,n,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:r.padding}),e.commands.add("tableCellPadding",new a3(e,r.padding)),e.data.addStyleProcessorRules(xJ),v3(t,n,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:r.backgroundColor}),e.commands.add("tableCellBackgroundColor",new l3(e,r.backgroundColor)),function(e,t,n){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":m3}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===n?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:m3}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===n?null:t}}})}(t,n,r.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new u3(e,r.horizontalAlignment)),function(e,t,n){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":p3}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===n?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:p3}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===n?null:t}}})}(t,n,r.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new c3(e,r.verticalAlignment))}}function v3(e,t,n){const{modelAttribute:r}=n;e.extend("tableCell",{allowAttributes:[r]}),s4(t,{viewElement:/^(td|th)$/,...n}),c4(t,{modelElement:"tableCell",...n})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class b3 extends VF{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,n=t.plugins.get("ImageUtils"),r=t.model,i=n.getClosestSelectedImageElement(r.document.selection);r.change(t=>{t.setAttribute("alt",e.newValue,i)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function y3(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot()])}function A3(e,t){const n=e.plugins.get("ImageUtils"),r=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>{if(!n.isInlineImageView(e))return null;if(!r)return i(e);return(e.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==t?null:i(e)};function i(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function _3(e,t){const n=_G(t.getSelectedBlocks());return!n||e.isObject(n)?"imageBlock":n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class w3 extends HF{static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,n=null){const r=this.editor,i=r.model,a=i.document.selection;n=E3(r,t||a,n),e={...Object.fromEntries(a.getAttributes()),...e};for(const t in e)i.schema.checkAttribute(n,t)||delete e[t];return i.change(r=>{const a=r.createElement(n,e);return i.insertObject(a,t,null,{setSelection:"on",findOptimalPosition:!t&&"imageInline"!=n}),a.parent?a:null})}getClosestSelectedImageWidget(e){const t=e.getSelectedElement();if(t&&this.isImageWidget(t))return t;let n=e.getFirstPosition().parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==E3(e,t)){const n=function(e,t){const n=pX(e,t).start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,e.model);if(e.model.schema.checkChild(n,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}(e)}toImageWidget(e,t,n){t.setCustomProperty("image",!0,e);return lX(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${n}`:n}})}isImageWidget(e){return!!e.getCustomProperty("image")&&sX(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:n}of t.createRangeIn(e))if(this.isInlineImageView(n))return n}}function E3(e,t,n){const r=e.model.schema,i=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?n||("inline"===i?"imageInline":"block"===i?"imageBlock":t.is("selection")?_3(r,t):r.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class S3 extends HF{static get requires(){return[w3]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new b3(this.editor))}}r(1610);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class C3 extends SK{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new wG,this.keystrokes=new EG,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),vK.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),vK.cancel,"ck-button-cancel","cancel"),this._focusables=new EK,this._focusCycler=new VQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]}),LQ(this)}render(){super.render(),this.keystrokes.listenTo(this.element),RQ({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,n,r){const i=new GX(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),r&&i.delegate("execute").to(this,r),i}_createLabeledInputView(){const e=this.locale.t,t=new _$(this.locale,w$);return t.label=e("Text alternative"),t}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function T3(e){const t=e.editing.view,n=x$.defaultPositions,r=e.plugins.get("ImageUtils");return{target:t.domConverter.viewToDom(r.getClosestSelectedImageWidget(t.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class k3 extends HF{static get requires(){return[P$]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",n=>{const r=e.commands.get("imageTextAlternative"),i=new GX(n);return i.set({label:t("Change image text alternative"),icon:vK.lowVision,tooltip:!0}),i.bind("isEnabled").to(r,"isEnabled"),this.listenTo(i,"execute",()=>{this._showForm()}),i})}_createForm(){const e=this.editor,t=e.editing.view.document,n=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new C3(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(e,t)=>{this._hideForm(!0),t()}),this.listenTo(e.ui,"update",()=>{n.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const n=T3(e);t.updatePosition(n)}}(e):this._hideForm(!0)}),NQ({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const e=this.editor,t=e.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:T3(e)}),n.fieldView.value=n.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class x3 extends HF{static get requires(){return[S3,k3]}static get pluginName(){return"ImageTextAlternative"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function O3(e,t){return e=>{e.on(`attribute:srcset:${t}`,n)};function n(t,n,r){if(!r.consumable.consume(n.item,t.name))return;const i=r.writer,a=r.mapper.toViewElement(n.item),o=e.findViewImgElement(a);if(null===n.attributeNewValue){const e=n.attributeOldValue;e.data&&(i.removeAttribute("srcset",o),i.removeAttribute("sizes",o),e.width&&i.removeAttribute("width",o))}else{const e=n.attributeNewValue;e.data&&(i.setAttribute("srcset",e.data,o),i.setAttribute("sizes","100vw",o),e.width&&i.setAttribute("width",e.width,o))}}}function I3(e,t,n){return e=>{e.on(`attribute:${n}:${t}`,r)};function r(t,n,r){if(!r.consumable.consume(n.item,t.name))return;const i=r.writer,a=r.mapper.toViewElement(n.item),o=e.findViewImgElement(a);i.setAttribute(n.attributeKey,n.attributeNewValue||"",o)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class M3 extends SW{observe(e){this.listenTo(e,"load",(e,t)=>{const n=t.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(t)},{useCapture:!0})}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class P3 extends VF{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&Object(hj.b)("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&Object(hj.b)("image-inline-plugin-required")}refresh(){this.isEnabled=this.editor.plugins.get("ImageUtils").isImageAllowed()}execute(e){const t=GH(e.source),n=this.editor.model.document.selection,r=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());t.forEach((e,t)=>{const a=n.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&a&&r.isImage(a)){const t=this.editor.model.createPositionAfter(a);r.insertImage({...e,...i},t)}else r.insertImage({...e,...i})})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class D3 extends HF{static get requires(){return[w3]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(M3),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}});const n=new P3(e);e.commands.add("insertImage",n),e.commands.add("imageInsert",n)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class N3 extends VF{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){const e=this.editor,t=this.editor.model,n=e.plugins.get("ImageUtils"),r=n.getClosestSelectedImageElement(t.document.selection),i=Object.fromEntries(r.getAttributes());return i.src||i.uploadId?t.change(e=>{const a=Array.from(t.markers).filter(e=>e.getRange().containsItem(r)),o=n.insertImage(i,t.createSelection(r,"on"),this._modelElementName);if(!o)return null;const s=e.createRangeOn(o);for(const t of a){const n=t.getRange(),r="$graveyard"!=n.root.rootName?n.getJoined(s,!0):s;e.updateMarker(t,{range:r})}return{oldElement:r,newElement:o}}):null}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class L3 extends HF{static get requires(){return[D3,w3,_K]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new N3(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,r=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>y3(t)}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:n})=>r.toImageWidget(y3(n),n,t("image widget"))}),n.for("downcast").add(I3(r,"imageBlock","src")).add(I3(r,"imageBlock","alt")).add(O3(r,"imageBlock")),n.for("upcast").elementToElement({view:A3(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:null)}).add(function(e){return e=>{e.on("element:figure",t)};function t(t,n,r){if(!r.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const i=e.findViewImgElement(n.viewItem);if(!i||!r.consumable.test(i,{name:!0}))return;r.consumable.consume(n.viewItem,{name:!0,classes:"image"});const a=_G(r.convertItem(i,n.modelCursor).modelRange.getItems());a?(r.convertChildren(n.viewItem,a),r.updateConversionResult(a,n)):r.consumable.revert(n.viewItem,{name:!0,classes:"image"})}}(r))}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,r=e.plugins.get("ImageUtils");this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(i,a)=>{const o=Array.from(a.content.getChildren());let s;if(!o.every(r.isInlineImageView))return;s=a.targetRanges?e.editing.mapper.toModelRange(a.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(s);if("imageBlock"===_3(t.schema,l)){const e=new nJ(n.document),t=o.map(t=>e.createElement("figure",{class:"image"},t));a.content=e.createDocumentFragment(t)}})}}r(518);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class R3 extends HF{static get requires(){return[L3,TX,x3]}static get pluginName(){return"ImageBlock"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class B3 extends HF{static get requires(){return[D3,w3,_K]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new N3(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,r=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:n})=>r.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(n),n,t("image widget"))}),n.for("downcast").add(I3(r,"imageInline","src")).add(I3(r,"imageInline","alt")).add(O3(r,"imageInline")),n.for("upcast").elementToElement({view:A3(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:null)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,r=e.plugins.get("ImageUtils");this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(i,a)=>{const o=Array.from(a.content.getChildren());let s;if(!o.every(r.isBlockImageView))return;s=a.targetRanges?e.editing.mapper.toModelRange(a.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(s);if("imageInline"===_3(t.schema,l)){const e=new nJ(n.document),t=o.map(t=>1===t.childCount?(Array.from(t.getAttributes()).forEach(n=>e.setAttribute(...n,r.findViewImgElement(t))),t.getChild(0)):t);a.content=e.createDocumentFragment(t)}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class j3 extends HF{static get requires(){return[B3,TX,x3]}static get pluginName(){return"ImageInline"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function F3(e){return e.map(e=>vv(e)?e.name:e)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class U3 extends VF{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils");if(!e.plugins.has(L3))return this.isEnabled=!1,void(this.value=!1);const n=e.model.document.selection,r=n.getSelectedElement();if(!r){const e=t.getCaptionFromModelSelection(n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=this.editor.plugins.get("ImageUtils").isImage(r),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(r):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change(e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)})}_showImageCaption(e,t){const n=this.editor.model.document.selection,r=this.editor.plugins.get("ImageCaptionEditing");let i=n.getSelectedElement();const a=r._getSavedCaption(i);this.editor.plugins.get("ImageUtils").isInlineImage(i)&&(this.editor.execute("imageTypeBlock"),i=n.getSelectedElement());const o=a||e.createElement("caption");e.append(o,i),t&&e.setSelection(o,"in")}_hideImageCaption(e){const t=this.editor,n=t.model.document.selection,r=t.plugins.get("ImageCaptionEditing"),i=t.plugins.get("ImageCaptionUtils");let a,o=n.getSelectedElement();o?a=i.getCaptionFromImageModelElement(o):(a=i.getCaptionFromModelSelection(n),o=a.parent),r._saveCaption(o,a),e.setSelection(o,"on"),e.remove(a)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class H3 extends HF{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[w3]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),n=e.getFirstPosition().findAncestor("caption");return n&&t.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class z3 extends HF{static get requires(){return[w3,H3]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new U3(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration()}_setupConversion(){const e=this.editor,t=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ImageCaptionUtils"),i=e.t;e.conversion.for("upcast").elementToElement({view:e=>r.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>n.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:r})=>{if(!n.isBlockImage(e.parent))return null;const a=r.createEditableElement("figcaption");return r.setCustomProperty("imageCaption",!0,a),Q$({view:t,element:a,text:i("Enter image caption"),keepOnFocus:!0}),fX(a,r)}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),r=e.commands.get("imageTypeInline"),i=e.commands.get("imageTypeBlock"),a=e=>{if(!e.return)return;const{oldElement:r,newElement:i}=e.return;if(!r)return;if(t.isBlockImage(r)){const e=n.getCaptionFromImageModelElement(r);if(e)return void this._saveCaption(i,e)}const a=this._getSavedCaption(r);a&&this._saveCaption(i,a)};r&&this.listenTo(r,"execute",a,{priority:"low"}),i&&this.listenTo(i,"execute",a,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?MG.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class V3 extends HF{static get requires(){return[H3]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,n=e.plugins.get("ImageCaptionUtils"),r=e.t;e.ui.componentFactory.add("toggleImageCaption",i=>{const a=e.commands.get("toggleImageCaption"),o=new GX(i);return o.set({icon:vK.caption,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(a,"value","isEnabled"),o.bind("label").to(a,"value",e=>r(e?"Toggle caption off":"Toggle caption on")),this.listenTo(o,"execute",()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const r=n.getCaptionFromModelSelection(e.model.document.selection);if(r){const n=e.editing.mapper.toViewElement(r);t.scrollToTheSelection(),t.change(e=>{e.addClass("image__caption_highlighted",n)})}}),o})}}r(1613);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class W3 extends HF{static get requires(){return[z3,V3]}static get pluginName(){return"ImageCaption"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class G3 extends VF{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map(e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]}))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,n=t.model,r=t.plugins.get("ImageUtils");n.change(t=>{const i=e.value;let a=r.getClosestSelectedImageElement(n.document.selection);i&&this.shouldConvertImageType(i,a)&&(this.editor.execute(r.isBlockImage(a)?"imageTypeInline":"imageTypeBlock"),a=r.getClosestSelectedImageElement(n.document.selection)),!i||this._styles.get(i).isDefault?t.removeAttribute("imageStyle",a):t.setAttribute("imageStyle",i,a)})}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const{objectFullWidth:q3,objectInline:Y3,objectLeft:K3,objectRight:X3,objectCenter:Q3,objectBlockLeft:$3,objectBlockRight:J3}=vK,Z3={get inline(){return{name:"inline",title:"In line",icon:Y3,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:K3,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:$3,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:Q3,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:X3,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:J3,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:Q3,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:X3,modelElements:["imageBlock"],className:"image-style-side"}}},e6={full:q3,left:$3,right:J3,center:Q3,inlineLeft:K3,inlineRight:X3,inline:Y3},t6=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function n6(e){Object(hj.b)("image-style-configuration-definition-invalid",e)}var r6={normalizeStyles:function(e){return(e.configuredStyles.options||[]).map(e=>function(e){e="string"==typeof e?Z3[e]?{...Z3[e]}:{name:e}:function(e,t){const n={...t};for(const r in e)Object.prototype.hasOwnProperty.call(t,r)||(n[r]=e[r]);return n}(Z3[e.name],e);"string"==typeof e.icon&&(e.icon=e6[e.icon]||e.icon);return e}(e)).filter(t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:n}){const{modelElements:r,name:i}=e;if(!(r&&r.length&&i))return n6({style:e}),!1;{const i=[t?"imageBlock":null,n?"imageInline":null];if(!r.some(e=>i.includes(e)))return Object(hj.b)("image-style-missing-dependency",{style:e,missingPlugins:r.map(e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0}(t,e))},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...t6]:[]},warnInvalidStyle:n6,DEFAULT_OPTIONS:Z3,DEFAULT_ICONS:e6,DEFAULT_DROPDOWN_DEFINITIONS:t6};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function i6(e,t){for(const n of t)if(n.name===e)return n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class a6 extends HF{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[w3]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=r6,n=this.editor,r=n.plugins.has("ImageBlockEditing"),i=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",t(r,i)),this.normalizedStyles=e({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:r,isInlinePluginLoaded:i}),this._setupConversion(r,i),this._setupPostFixer(),n.commands.add("imageStyle",new G3(n,this.normalizedStyles))}_setupConversion(e,t){const n=this.editor,r=n.model.schema,i=function(e){return(t,n,r)=>{if(!r.consumable.consume(n.item,t.name))return;const i=i6(n.attributeNewValue,e),a=i6(n.attributeOldValue,e),o=r.mapper.toViewElement(n.item),s=r.writer;a&&s.removeClass(a.className,o),i&&s.addClass(i.className,o)}}(this.normalizedStyles),a=function(e){const t={imageInline:e.filter(e=>!e.isDefault&&e.modelElements.includes("imageInline")),imageBlock:e.filter(e=>!e.isDefault&&e.modelElements.includes("imageBlock"))};return(e,n,r)=>{if(!n.modelRange)return;const i=n.viewItem,a=_G(n.modelRange.getItems());if(a&&r.schema.checkAttribute(a,"imageStyle"))for(const e of t[a.name])r.consumable.consume(i,{classes:e.className})&&r.writer.setAttribute("imageStyle",e.name,a)}}(this.normalizedStyles);n.editing.downcastDispatcher.on("attribute:imageStyle",i),n.data.downcastDispatcher.on("attribute:imageStyle",i),e&&(r.extend("imageBlock",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:figure",a,{priority:"low"})),t&&(r.extend("imageInline",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:img",a,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,n=e.plugins.get(w3),r=new Map(this.normalizedStyles.map(e=>[e.name,e]));t.registerPostFixer(e=>{let i=!1;for(const a of t.differ.getChanges())if("insert"==a.type||"attribute"==a.type&&"imageStyle"==a.attributeKey){let t="insert"==a.type?a.position.nodeAfter:a.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!n.isImage(t))continue;const o=t.getAttribute("imageStyle");if(!o)continue;const s=r.get(o);s&&s.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),i=!0)}return i})}}r(1615);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class o6 extends HF{static get requires(){return[a6]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],n=s6(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of n)this._createButton(e);const r=s6([...t.filter(vv),...r6.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of r)this._createDropdown(e,n)}_createDropdown(e,t){const n=this.editor.ui.componentFactory;n.add(e.name,r=>{let i;const{defaultItem:a,items:o,title:s}=e,l=o.filter(e=>t.find(({name:t})=>l6(t)===e)).map(e=>{const t=n.create(e);return e===a&&(i=t),t});o.length!==l.length&&r6.warnInvalidStyle({dropdown:e});const c=u$(r,KQ),u=c.buttonView;return d$(c,l),u.set({label:c6(s,i.label),class:null,tooltip:!0}),u.bind("icon").toMany(l,"isOn",(...e)=>{const t=e.findIndex(Wj);return t<0?i.icon:l[t].icon}),u.bind("label").toMany(l,"isOn",(...e)=>{const t=e.findIndex(Wj);return c6(s,t<0?i.label:l[t].label)}),u.bind("isOn").toMany(l,"isOn",(...e)=>e.some(Wj)),u.bind("class").toMany(l,"isOn",(...e)=>e.some(Wj)?"ck-splitbutton_flatten":null),u.on("execute",()=>{l.some(({isOn:e})=>e)?c.isOpen=!c.isOpen:i.fire("execute")}),c.bind("isEnabled").toMany(l,"isEnabled",(...e)=>e.some(Wj)),c})}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(l6(t),n=>{const r=this.editor.commands.get("imageStyle"),i=new GX(n);return i.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(r,"isEnabled"),i.bind("isOn").to(r,"value",e=>e===t),i.on("execute",this._executeCommand.bind(this,t)),i})}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function s6(e,t){for(const n of e)t[n.title]&&(n.title=t[n.title]);return e}function l6(e){return`imageStyle:${e}`}function c6(e,t){return(e?e+": ":"")+t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class u6 extends VF{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("width")?this.value={width:t.getAttribute("width"),height:null}:this.value=null}execute(e){const t=this.editor,n=t.model,r=t.plugins.get("ImageUtils").getClosestSelectedImageElement(n.document.selection);this.value={width:e.width,height:null},r&&n.change(t=>{t.setAttribute("width",e.width,r)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class d6 extends HF{static get requires(){return[w3]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new u6(e);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:"width"}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:"width"})}_registerConverters(e){const t=this.editor;t.conversion.for("downcast").add(t=>t.on(`attribute:width:${e}`,(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const r=n.writer,i=n.mapper.toViewElement(t.item);null!==t.attributeNewValue?(r.setStyle("width",t.attributeNewValue,i),r.addClass("image_resized",i)):(r.removeStyle("width",i),r.removeClass("image_resized",i))})),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"width",value:e=>e.getStyle("width")}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const h6={small:vK.objectSizeSmall,medium:vK.objectSizeMedium,large:vK.objectSizeLarge,original:vK.objectSizeFull};class f6 extends HF{static get requires(){return[d6]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),n=e.commands.get("resizeImage");this.bind("isEnabled").to(n);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:n,value:r,icon:i}=e,a=r?r+this._resizeUnit:null;t.ui.componentFactory.add(n,n=>{const r=new GX(n),o=t.commands.get("resizeImage"),s=this._getOptionLabelValue(e,!0);if(!h6[i])throw new hj.a("imageresizebuttons-missing-icon",t,e);return r.set({label:s,icon:h6[i],tooltip:s,isToggleable:!0}),r.bind("isEnabled").to(this),r.bind("isOn").to(o,"value",p6(a)),this.listenTo(r,"execute",()=>{t.execute("resizeImage",{width:a})}),r})}_registerImageResizeDropdown(e){const t=this.editor,n=t.t,r=e.find(e=>!e.value),i=i=>{const a=t.commands.get("resizeImage"),o=u$(i,YQ),s=o.buttonView;return s.set({tooltip:n("Resize image"),commandValue:r.value,icon:h6.medium,isToggleable:!0,label:this._getOptionLabelValue(r),withText:!0,class:"ck-resize-image-button"}),s.bind("label").to(a,"value",e=>e&&e.width?e.width:this._getOptionLabelValue(r)),o.bind("isOn").to(a),o.bind("isEnabled").to(this),h$(o,this._getResizeDropdownListItemDefinitions(e,a)),o.listView.ariaLabel=n("Image resize list"),this.listenTo(o,"execute",e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()}),o};t.ui.componentFactory.add("resizeImage",i),t.ui.componentFactory.add("imageResize",i)}_getOptionLabelValue(e,t){const n=this.editor.t;return e.label?e.label:t?e.value?n("Resize image to %0",e.value+this._resizeUnit):n("Resize image to the original size"):e.value?e.value+this._resizeUnit:n("Original")}_getResizeDropdownListItemDefinitions(e,t){const n=new VH;return e.map(e=>{const r=e.value?e.value+this._resizeUnit:null,i={type:"button",model:new C$({commandName:"resizeImage",commandValue:r,label:this._getOptionLabelValue(e),withText:!0,icon:null})};i.model.bind("isOn").to(t,"value",p6(r)),n.add(i)}),n}}function p6(e){return t=>null===e&&t===e||t&&t.width===e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const m6=/(image|image-inline)/;class g6 extends HF{static get requires(){return[O1]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view;t.addObserver(M3),this.listenTo(t.document,"imageLoaded",(n,r)=>{if(!r.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const i=e.editing.view.domConverter,a=i.domToView(r.target).findAncestor({classes:m6});let o=this.editor.plugins.get(O1).getResizerByViewElement(a);if(o)return void o.redraw();const s=e.editing.mapper,l=s.toModelElement(a);o=e.plugins.get(O1).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:l,viewElement:a,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>i.viewToDom(s.toViewElement(l.parent)),isCentered(){const e=l.getAttribute("imageStyle");return!e||"block"==e||"alignCenter"==e},onCommit(n){t.change(e=>{e.removeClass("image_resized",a)}),e.execute("resizeImage",{width:n})}}),o.on("updateSize",()=>{a.hasClass("image_resized")||t.change(e=>{e.addClass("image_resized",a)})}),o.bind("isEnabled").to(this)})}}r(1617);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class v6{constructor(){const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise((n,r)=>{t.onload=()=>{const e=t.result;this._data=e,n(e)},t.onerror=()=>{r("error")},t.onabort=()=>{r("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}UF(v6,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class b6 extends HF{static get pluginName(){return"FileRepository"}static get requires(){return[pK]}init(){this.loaders=new VH,this.loaders.on("add",()=>this._updatePendingAction()),this.loaders.on("remove",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return Object(hj.b)("filerepository-no-upload-adapter"),null;const t=new y6(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(e=>{this._loadersMap.set(e,t)}).catch(()=>{}),t.on("change:uploaded",()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on("change:uploadTotal",()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof y6?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((e,n)=>{e===t&&this._loadersMap.delete(n)})}_updatePendingAction(){const e=this.editor.plugins.get(pK);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,n=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else e.remove(this._pendingAction),this._pendingAction=null}}UF(b6,NF);class y6{constructor(e,t){this.id=cj(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new v6,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new hj.a("filerepository-read-wrong-status",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e}).catch(e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e})}upload(){if("idle"!=this.status)throw new hj.a("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise((n,r)=>{t.rejecter=r,t.isFulfilled=!1,e.then(e=>{t.isFulfilled=!0,n(e)}).catch(e=>{t.isFulfilled=!0,r(e)})}),t}}UF(y6,NF);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class A6 extends SK{constructor(e){super(e),this.buttonView=new GX(e),this._fileInputView=new _6(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class _6 extends SK{constructor(e){super(e),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class w6{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then(e=>new Promise((t,n)=>{this._initRequest(),this._initListeners(t,n,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,n){const r=this.xhr,i=this.loader,a=`Couldn't upload file: ${n.name}.`;r.addEventListener("error",()=>t(a)),r.addEventListener("abort",()=>t()),r.addEventListener("load",()=>{const n=r.response;if(!n||n.error)return t(n&&n.error&&n.error.message?n.error.message:a);const i=n.url?{default:n.url}:n.urls;e({...n,urls:i})}),r.upload&&r.upload.addEventListener("progress",e=>{e.lengthComputable&&(i.uploadTotal=e.total,i.uploaded=e.loaded)})}_sendRequest(e){const t=this.options.headers||{},n=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=n;const r=new FormData;r.append("upload",e),this.xhr.send(r)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function E6(e){const t=e.map(e=>e.replace("+","\\+"));return new RegExp(`^image\\/(${t.join("|")})$`)}function S6(e){return new Promise((t,n)=>{const r=e.getAttribute("src");fetch(r).then(e=>e.blob()).then(e=>{const n=C6(e,r),i=n.replace("image/",""),a=new File([e],`image.${i}`,{type:n});t(a)}).catch(e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise((t,n)=>{const r=cW.document.createElement("img");r.addEventListener("load",()=>{const e=cW.document.createElement("canvas");e.width=r.width,e.height=r.height,e.getContext("2d").drawImage(r,0,0),e.toBlob(e=>e?t(e):n())}),r.addEventListener("error",()=>n()),r.src=e})}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e).then(t=>{const n=C6(t,e),r=n.replace("image/","");return new File([t],`image.${r}`,{type:n})})}(r).then(t).catch(n):n(e))})}function C6(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class T6 extends HF{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,n=n=>{const r=new A6(n),i=e.commands.get("uploadImage"),a=e.config.get("image.upload.types"),o=E6(a);return r.set({acceptedType:a.map(e=>`image/${e}`).join(","),allowMultipleFiles:!0}),r.buttonView.set({label:t("Insert image"),icon:vK.image,tooltip:!0}),r.buttonView.bind("isEnabled").to(i),r.on("done",(t,n)=>{const r=Array.from(n).filter(e=>o.test(e.type));r.length&&e.execute("uploadImage",{file:r})}),r};e.ui.componentFactory.add("uploadImage",n),e.ui.componentFactory.add("imageUpload",n)}}r(1619),r(1621),r(1623);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class k6 extends HF{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",(...e)=>this.uploadStatusChange(...e)),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,n){const r=this.editor,i=t.item,a=i.getAttribute("uploadId");if(!n.consumable.consume(t.item,e.name))return;const o=r.plugins.get("ImageUtils"),s=r.plugins.get(b6),l=a?t.attributeNewValue:null,c=this.placeholder,u=r.editing.mapper.toViewElement(i),d=n.writer;if("reading"==l)return x6(u,d),void O6(o,c,u,d);if("uploading"==l){const e=s.loaders.get(a);return x6(u,d),void(e?(I6(u,d),function(e,t,n,r){const i=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),i),n.on("change:uploadedPercent",(e,t,n)=>{r.change(e=>{e.setStyle("width",n+"%",i)})})}(u,d,e,r.editing.view),function(e,t,n,r){if(r.data){const i=e.findViewImgElement(t);n.setAttribute("src",r.data,i)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(o,u,d,e)):O6(o,c,u,d))}"complete"==l&&s.loaders.get(a)&&function(e,t,n){const r=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),r),setTimeout(()=>{n.change(e=>e.remove(e.createRangeOn(r)))},3e3)}(u,d,r.editing.view),function(e,t){P6(e,t,"progressBar")}(u,d),I6(u,d),function(e,t){t.removeClass("ck-appear",e)}(u,d)}}function x6(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function O6(e,t,n,r){n.hasClass("ck-image-upload-placeholder")||r.addClass("ck-image-upload-placeholder",n);const i=e.findViewImgElement(n);i.getAttribute("src")!==t&&r.setAttribute("src",t,i),M6(n,"placeholder")||r.insert(r.createPositionAfter(i),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(r))}function I6(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),P6(e,t,"placeholder")}function M6(e,t){for(const n of e.getChildren())if(n.getCustomProperty(t))return n}function P6(e,t,n){const r=M6(e,n);r&&t.remove(t.createRangeOn(r))}class D6 extends VF{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(n)}execute(e){const t=GH(e.file),n=this.editor.model.document.selection,r=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());t.forEach((e,t)=>{const a=n.getSelectedElement();if(t&&a&&r.isImage(a)){const t=this.editor.model.createPositionAfter(a);this._uploadImage(e,i,t)}else this._uploadImage(e,i)})}_uploadImage(e,t,n){const r=this.editor,i=r.plugins.get(b6).createLoader(e),a=r.plugins.get("ImageUtils");i&&a.insertImage({...t,uploadId:i.id},n)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class N6 extends HF{static get requires(){return[b6,S$,_K,w3]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,n=e.conversion,r=e.plugins.get(b6),i=e.plugins.get("ImageUtils"),a=E6(e.config.get("image.upload.types")),o=new D6(e);e.commands.add("uploadImage",o),e.commands.add("imageUpload",o),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,n)=>{if(r=n.dataTransfer,Array.from(r.types).includes("text/html")&&""!==r.getData("text/html"))return;var r;const i=Array.from(n.dataTransfer.files).filter(e=>!!e&&a.test(e.type));i.length&&(t.stop(),e.model.change(t=>{n.targetRanges&&t.setSelection(n.targetRanges.map(t=>e.editing.mapper.toModelRange(t))),e.model.enqueueChange(()=>{e.execute("uploadImage",{file:i})})}))}),this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(t,n)=>{const a=Array.from(e.editing.view.createRangeIn(n.content)).filter(e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))}(i,e.item)&&!e.item.getAttribute("uploadProcessed")).map(e=>({promise:S6(e.item),imageElement:e.item}));if(!a.length)return;const o=new nJ(e.editing.view.document);for(const e of a){o.setAttribute("uploadProcessed",!0,e.imageElement);const t=r.createLoader(e.promise);t&&(o.setAttribute("src","",e.imageElement),o.setAttribute("uploadId",t.id,e.imageElement))}}),e.editing.view.document.on("dragover",(e,t)=>{t.preventDefault()}),t.on("change",()=>{const n=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),i=new Set;for(const t of n)if("insert"==t.type&&"$text"!=t.name){const n=t.position.nodeAfter,a="$graveyard"==t.position.root.rootName;for(const t of L6(e,n)){const e=t.getAttribute("uploadId");if(!e)continue;const n=r.loaders.get(e);n&&(a?i.has(e)||n.abort():(i.add(e),this._uploadImageElements.set(e,t),"idle"==n.status&&this._readAndUpload(n)))}}}),this.on("uploadComplete",(e,{imageElement:t,data:n})=>{const r=n.urls?n.urls:n;this.editor.model.change(e=>{e.setAttribute("src",r.default,t),this._parseAndSetSrcsetAttributeOnImage(r,t,e)})},{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,n=t.model,r=t.locale.t,i=t.plugins.get(b6),a=t.plugins.get(S$),o=t.plugins.get("ImageUtils"),s=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},t=>{t.setAttribute("uploadStatus","reading",s.get(e.id))}),e.read().then(()=>{const r=e.upload(),i=s.get(e.id);if(gV.isSafari){const e=t.editing.mapper.toViewElement(i),n=o.findViewImgElement(e);t.editing.view.once("render",()=>{if(!n.parent)return;const e=t.editing.view.domConverter.mapViewToDom(n.parent);if(!e)return;const r=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=r})}return n.enqueueChange({isUndoable:!1},e=>{e.setAttribute("uploadStatus","uploading",i)}),r}).then(t=>{n.enqueueChange({isUndoable:!1},n=>{const r=s.get(e.id);n.setAttribute("uploadStatus","complete",r),this.fire("uploadComplete",{data:t,imageElement:r})}),l()}).catch(t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&a.showWarning(t,{title:r("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},t=>{t.remove(s.get(e.id))}),l()});function l(){n.enqueueChange({isUndoable:!1},t=>{const n=s.get(e.id);t.removeAttribute("uploadId",n),t.removeAttribute("uploadStatus",n),s.delete(e.id)}),i.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,n){let r=0;const i=Object.keys(e).filter(e=>{const t=parseInt(e,10);if(!isNaN(t))return r=Math.max(r,t),!0}).map(t=>`${e[t]} ${t}w`).join(", ");""!=i&&n.setAttribute("srcset",{data:i,width:r},t)}}function L6(e,t){const n=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter(e=>n.isImage(e.item)).map(e=>e.item)}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class R6 extends HF{static get pluginName(){return"ImageUpload"}static get requires(){return[N6,T6,k6]}}r(1625);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class B6 extends SK{constructor(e,t={}){super(e);const n=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach(e=>this.children.add(e)),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",n.to("class")],role:n.to("_role"),"aria-labelledby":n.to("_ariaLabelledBy")},children:this.children})}}r(1627);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class j6 extends SK{constructor(e,t){super(e);const{insertButtonView:n,cancelButtonView:r}=this._createActionButtons(e);if(this.insertButtonView=n,this.cancelButtonView=r,this.dropdownView=this._createDropdownView(e),this.set("imageURLInputValue",""),this.focusTracker=new wG,this.keystrokes=new EG,this._focusables=new EK,this._focusCycler=new VQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.set("_integrations",new VH),t)for(const[e,n]of Object.entries(t))"insertImageViaUrl"===e&&(n.fieldView.bind("value").to(this,"imageURLInputValue",e=>e||""),n.fieldView.on("input",()=>{this.imageURLInputValue=n.fieldView.element.value.trim()})),n.name=e,this._integrations.add(n);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:"-1"},children:[...this._integrations,new B6(e,{children:[this.insertButtonView,this.cancelButtonView],class:"ck-image-insert-form__action-row"})]})}render(){super.render(),RQ({view:this});const e=[...this._integrations,this.insertButtonView,this.cancelButtonView];e.forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element);const t=e=>e.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t),this.listenTo(e[0].element,"selectstart",(e,t)=>{t.stopPropagation()},{priority:"high"})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}getIntegration(e){return this._integrations.find(t=>t.name===e)}_createDropdownView(e){const t=e.t,n=u$(e,KQ),r=n.buttonView,i=n.panelView;return r.set({label:t("Insert image"),icon:vK.image,tooltip:!0}),i.extendTemplate({attributes:{class:"ck-image-insert__panel"}}),n}_createActionButtons(e){const t=e.t,n=new GX(e),r=new GX(e);return n.set({label:t("Insert"),icon:vK.check,class:"ck-button-save",type:"submit",withText:!0,isEnabled:this.imageURLInputValue}),r.set({label:t("Cancel"),icon:vK.cancel,class:"ck-button-cancel",withText:!0}),n.bind("isEnabled").to(this,"imageURLInputValue",e=>!!e),n.delegate("execute").to(this,"submit"),r.delegate("execute").to(this,"cancel"),{insertButtonView:n,cancelButtonView:r}}focus(){this._focusCycler.focusFirst()}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function F6(e){const t=e.t,n=new _$(e,w$);return n.set({label:t("Insert image via URL")}),n.fieldView.placeholder="https://example.com/image.png",n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class U6 extends HF{static get pluginName(){return"ImageInsertUI"}init(){const e=this.editor,t=e=>this._createDropdownView(e);e.ui.componentFactory.add("insertImage",t),e.ui.componentFactory.add("imageInsert",t)}_createDropdownView(e){const t=this.editor,n=new j6(e,function(e){const t=e.config.get("image.insert.integrations"),n=e.plugins.get("ImageInsertUI"),r={insertImageViaUrl:F6(e.locale)};if(!t)return r;if(t.find(e=>"openCKFinder"===e)&&e.ui.componentFactory.has("ckfinder")){const t=e.ui.componentFactory.create("ckfinder");t.set({withText:!0,class:"ck-image-insert__ck-finder-button"}),t.delegate("execute").to(n,"cancel"),r.openCKFinder=t}return t.reduce((t,n)=>(r[n]?t[n]=r[n]:e.ui.componentFactory.has(n)&&(t[n]=e.ui.componentFactory.create(n)),t),{})}(t)),r=t.commands.get("uploadImage"),i=n.dropdownView,a=i.buttonView;return a.actionView=t.ui.componentFactory.create("uploadImage"),a.actionView.extendTemplate({attributes:{class:"ck ck-button ck-splitbutton__action"}}),this._setUpDropdown(i,n,r)}_setUpDropdown(e,t,n){const r=this.editor,i=r.t,a=t.insertButtonView,o=t.getIntegration("insertImageViaUrl"),s=e.panelView,l=this.editor.plugins.get("ImageUtils");function c(){r.editing.view.focus(),e.isOpen=!1}return e.bind("isEnabled").to(n),e.buttonView.once("open",()=>{s.children.add(t)}),e.on("change:isOpen",()=>{const n=r.model.document.selection.getSelectedElement();e.isOpen&&(t.focus(),l.isImage(n)?(t.imageURLInputValue=n.getAttribute("src"),a.label=i("Update"),o.label=i("Update image URL")):(t.imageURLInputValue="",a.label=i("Insert"),o.label=i("Insert image via URL")))},{priority:"low"}),t.delegate("submit","cancel").to(e),this.delegate("cancel").to(e),e.on("submit",()=>{c(),function(){const e=r.model.document.selection.getSelectedElement();l.isImage(e)?r.model.change(n=>{n.setAttribute("src",t.imageURLInputValue,e),n.removeAttribute("srcset",e),n.removeAttribute("sizes",e)}):r.execute("insertImage",{source:t.imageURLInputValue})}()}),e.on("cancel",()=>{c()}),e}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const H6=new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class z6 extends HF{static get requires(){return["ImageEditing","ImageUtils",y1]}static get pluginName(){return"LinkImageEditing"}init(){const e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(function(e){const t=e.plugins.has("ImageInlineEditing"),n=e.plugins.get("ImageUtils");return e=>{e.on("element:a",(e,r,i)=>{const a=r.viewItem,o=n.findViewImgElement(a);if(!o)return;const s=o.findAncestor(e=>n.isBlockImageView(e));if(t&&!s)return;if(!i.consumable.consume(a,{attributes:["href"]}))return;const l=a.getAttribute("href");if(!l)return;let c=r.modelCursor.parent;if(!c.is("element","imageBlock")){const e=i.convertItem(o,r.modelCursor);r.modelRange=e.modelRange,r.modelCursor=e.modelCursor,c=r.modelCursor.nodeBefore}c&&c.is("element","imageBlock")&&i.writer.setAttribute("linkHref",l,c)},{priority:"high"})}}(e)),e.conversion.for("downcast").add(function(e){const t=e.plugins.get("ImageUtils");return e=>{e.on("attribute:linkHref:imageBlock",(e,n,r)=>{if(!r.consumable.consume(n.item,e.name))return;const i=r.mapper.toViewElement(n.item),a=r.writer,o=Array.from(i.getChildren()).find(e=>"a"===e.name),s=t.findViewImgElement(i),l=s.parent.is("element","picture")?s.parent:s;if(o)n.attributeNewValue?a.setAttribute("href",n.attributeNewValue,o):(a.move(a.createRangeOn(l),a.createPositionAt(i,0)),a.remove(o));else{const e=a.createContainerElement("a",{href:n.attributeNewValue});a.insert(a.createPositionAt(i,0),e),a.move(a.createRangeOn(l),a.createPositionAt(e,0))}},{priority:"high"})}}(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link");for(const n of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:n.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:n.id}),e.conversion.for("downcast").add(V6(n)),e.conversion.for("upcast").add(W6(e,n))}}function V6(e){return t=>{t.on(`attribute:${e.id}:imageBlock`,(t,n,r)=>{const i=r.mapper.toViewElement(n.item),a=Array.from(i.getChildren()).find(e=>"a"===e.name);if(a){for(const[t,n]of rz(e.attributes))r.writer.setAttribute(t,n,a);e.classes&&r.writer.addClass(e.classes,a);for(const t in e.styles)r.writer.setStyle(t,e.styles[t],a)}})}}function W6(e,t){const n=e.plugins.has("ImageInlineEditing"),r=e.plugins.get("ImageUtils");return e=>{e.on("element:a",(e,i,a)=>{const o=i.viewItem,s=r.findViewImgElement(o);if(!s)return;const l=s.findAncestor(e=>r.isBlockImageView(e));if(n&&!l)return;const c=new iz(t._createPattern()).match(o);if(!c)return;if(!a.consumable.consume(o,c.match))return;const u=i.modelCursor.nodeBefore||i.modelCursor.parent;a.writer.setAttribute(t.id,!0,u)},{priority:"high"})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class G6 extends HF{static get requires(){return[y1,D1,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(t,n)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(n.preventDefault(),t.stop())},{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",n=>{const r=new GX(n),i=e.plugins.get("LinkUI"),a=e.commands.get("link");return r.set({isEnabled:!0,label:t("Link image"),icon:P1,keystroke:"Ctrl+K",tooltip:!0,isToggleable:!0}),r.bind("isEnabled").to(a,"isEnabled"),r.bind("isOn").to(a,"value",e=>!!e),this.listenTo(r,"execute",()=>{this._isSelectedLinkedImage(e.model.document.selection)?i._addActionsView():i._showUI(!0)}),r})}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}r(1629);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */var q6=[{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"imageBlock",view:"img"},{model:"imageInline",view:"img"},{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlTable",view:"table",modelSchema:{allowWhere:"$block",isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!0}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!0}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"]}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container"}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container"}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!0}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlSummary",view:"summary",modelSchema:{allowChildren:"$text",allowIn:"htmlDetails",isBlock:!0}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowChildren:["htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6"],isBlock:!0}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$container",allowChildren:["$htmlList","htmlLi"],isBlock:!0}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!0}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd"],isBlock:!0}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",isBlock:!0}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",isBlock:!0}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!0}}],Y6=[{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0}},{model:"htmlA",view:"a",priority:5,coupledAttribute:"linkHref",attributeProperties:{copyOnEnter:!0}},{model:"htmlStrong",view:"strong",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0}},{model:"htmlB",view:"b",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0}},{model:"htmlI",view:"i",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0}},{model:"htmlEm",view:"em",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0}},{model:"htmlS",view:"s",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0}},{model:"htmlDel",view:"del",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0}},{model:"htmlU",view:"u",coupledAttribute:"underline",attributeProperties:{copyOnEnter:!0}},{model:"htmlSub",view:"sub",coupledAttribute:"subscript",attributeProperties:{copyOnEnter:!0}},{model:"htmlSup",view:"sup",coupledAttribute:"superscript",attributeProperties:{copyOnEnter:!0}},{model:"htmlCode",view:"code",coupledAttribute:"code",attributeProperties:{copyOnEnter:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlOembed",view:"oembed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlScript",view:"script",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlStyle",view:"style",modelSchema:{allowWhere:["$text","$block"],isInline:!0}}],K6=iF((function(e,t,n,r){Lz(e,t,n,r)}));
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class X6 extends HF{constructor(e){super(e),this._definitions=new Map}static get pluginName(){return"DataSchema"}init(){for(const e of q6)this.registerBlockElement(e);for(const e of Y6)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.set(e.model,{...e,isBlock:!0})}registerInlineElement(e){this._definitions.set(e.model,{...e,isInline:!0})}extendBlockElement(e){this._extendDefinition({...e,isBlock:!0})}extendInlineElement(e){this._extendDefinition({...e,isInline:!0})}getDefinitionsForView(e,t){const n=new Set;for(const r of this._getMatchingViewDefinitions(e)){if(t)for(const e of this._getReferences(r.model))n.add(e);n.add(r)}return n}_getMatchingViewDefinitions(e){return Array.from(this._definitions.values()).filter(t=>t.view&&function(e,t){if("string"==typeof e)return e===t;if(e instanceof RegExp)return e.test(t);return!1}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e,t.view))}*_getReferences(e){const{modelSchema:t}=this._definitions.get(e);if(!t)return;const n=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"];for(const r of n)for(const n of GH(t[r]||[])){const t=this._definitions.get(n);n!==e&&t&&(yield*this._getReferences(t.model),yield t)}}_extendDefinition(e){const t=this._definitions.get(e.model),n=K6({},t,e,(e,t)=>Array.isArray(e)?e.concat(t):void 0);this._definitions.set(e.model,n)}}function Q6(e,t,n,r){t&&function(e,t,n){if(t.attributes)for(const[r]of Object.entries(t.attributes))e.removeAttribute(r,n);if(t.styles)for(const r of Object.keys(t.styles))e.removeStyle(r,n);t.classes&&e.removeClass(t.classes,n)}(e,t,r),n&&$6(e,n,r)}function $6(e,t,n){if(t.attributes)for(const[r,i]of Object.entries(t.attributes))e.setAttribute(r,i,n);t.styles&&e.setStyle(t.styles,n),t.classes&&e.addClass(t.classes,n)}function J6(e,t){const n=rq(e);for(const r in t)Array.isArray(t[r])?n[r]=Array.from(new Set([...e[r]||[],...t[r]])):n[r]={...e[r],...t[r]};return n}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function Z6({model:e}){return(t,n)=>n.writer.createElement(e,{htmlContent:t.getCustomProperty("$rawContent")})}function e8(e,{view:t,isInline:n}){const r=e.t;return(e,{writer:i})=>{const a=r("HTML object"),o=t8(t,e,i),s=e.getAttribute("htmlAttributes");return i.addClass("html-object-embed__content",o),s&&$6(i,s,o),lX(i.createContainerElement(n?"span":"div",{class:"html-object-embed","data-html-object-embed-label":a},o),i,{widgetLabel:a})}}function t8(e,t,n){return n.createRawElement(e,null,(e,n)=>{n.setContentOf(e,t.getAttribute("htmlContent"))})}function n8({priority:e,view:t}){return(n,r)=>{if(!n)return;const{writer:i}=r,a=i.createAttributeElement(t,null,{priority:e});return $6(i,n,a),a}}function r8({view:e},t){return n=>{n.on(`element:${e}`,(e,n,r)=>{if(!n.modelRange||n.modelRange.isCollapsed)return;const i=t.processViewAttributes(n.viewItem,r);i&&r.writer.setAttribute("htmlAttributes",i,n.modelRange)},{priority:"low"})}}function i8({model:e}){return t=>{t.on(`attribute:htmlAttributes:${e}`,(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:r,attributeNewValue:i}=t;Q6(n.writer,r,i,n.mapper.toViewElement(t.item))})}}var a8=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1};var o8=function(e){return e!=e};var s8=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1};var l8=function(e,t,n){return t==t?s8(e,t,n):a8(e,o8,n)};var c8=function(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1},u8=Array.prototype.splice;var d8=function(e,t,n,r){var i=r?c8:l8,a=-1,o=t.length,s=e;for(e===t&&(t=WU(t)),n&&(s=mz(e,mF(n)));++a<o;)for(var l=0,c=t[a],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&u8.call(s,l,1),u8.call(e,l,1);return e};var h8=Jj((function(e,t){return e&&e.length&&t&&t.length?d8(e,t):e}));r(1631);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class f8 extends HF{constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new iz,this._disallowedAttributes=new iz,this._allowedElements=new Set,this._dataInitialized=!1,this._coupledAttributes=null,this._registerElementsAfterInit(),this._registerElementHandlers(),this._registerModelPostFixer()}static get pluginName(){return"DataFilter"}static get requires(){return[X6,TX]}loadAllowedConfig(e){this._loadConfig(e,e=>this.allowAttributes(e))}loadDisallowedConfig(e){this._loadConfig(e,e=>this.disallowAttributes(e))}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._allowedElements.has(t)||(this._allowedElements.add(t),this._dataInitialized&&this._fireRegisterEvent(t),this._coupledAttributes=null)}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}_loadConfig(e,t){for(const n of e){const e=n.name||/[\s\S]+/;this.allowElement(e),b8(n).forEach(t)}}processViewAttributes(e,t){return p8(e,t,this._disallowedAttributes),p8(e,t,this._allowedAttributes)}_registerElementsAfterInit(){this.editor.data.on("init",()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)},{priority:uj.get("highest")+1})}_registerElementHandlers(){this.on("register",(e,t)=>{const n=this.editor.model.schema;if(t.isObject&&!n.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else{if(!t.isInline)throw new hj.a("data-filter-invalid-definition",null,t);this._registerInlineElement(t)}e.stop()},{priority:"lowest"})}_registerModelPostFixer(){const e=this.editor.model;e.document.registerPostFixer(t=>{const n=e.document.differ.getChanges();let r=!1;const i=this._getCoupledAttributesMap();for(const e of n){if("attribute"!=e.type||null!==e.attributeNewValue)continue;const n=i.get(e.attributeKey);if(n)for(const{item:i}of e.range.getWalker({shallow:!0}))for(const e of n)i.hasAttribute(e)&&(t.removeAttribute(e,i),r=!0)}return r})}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;this._coupledAttributes=new Map;for(const e of this._allowedElements)if(e.coupledAttribute&&e.model){const t=this._coupledAttributes.get(e.coupledAttribute);t?t.push(e.model):this._coupledAttributes.set(e.coupledAttribute,[e.model])}}_fireRegisterEvent(e){this.fire(e.view?`register:${e.view}`:"register",e)}_registerObjectElement(e){const t=this.editor,n=t.model.schema,r=t.conversion,{view:i,model:a}=e;n.register(a,e.modelSchema),i&&(n.extend(e.model,{allowAttributes:["htmlAttributes","htmlContent"]}),t.data.registerRawContentMatcher({name:i}),r.for("upcast").elementToElement({view:i,model:Z6(e),converterPriority:uj.get("low")+1}),r.for("upcast").add(r8(e,this)),r.for("editingDowncast").elementToStructure({model:{name:a,attributes:["htmlAttributes"]},view:e8(t,e)}),r.for("dataDowncast").elementToElement({model:a,view:(e,{writer:t})=>t8(i,e,t)}),r.for("dataDowncast").add(i8(e)))}_registerBlockElement(e){const t=this.editor,n=t.model.schema,r=t.conversion,{view:i,model:a}=e;if(!n.isRegistered(e.model)){if(n.register(e.model,e.modelSchema),!i)return;r.for("upcast").elementToElement({model:a,view:i,converterPriority:uj.get("low")+1}),r.for("downcast").elementToElement({model:a,view:i})}i&&(n.extend(e.model,{allowAttributes:"htmlAttributes"}),r.for("upcast").add(r8(e,this)),r.for("downcast").add(i8(e)))}_registerInlineElement(e){const t=this.editor,n=t.model.schema,r=t.conversion,i=e.model;n.extend("$text",{allowAttributes:i}),e.attributeProperties&&n.setAttributeProperties(i,e.attributeProperties),r.for("upcast").add(function({view:e,model:t},n){return r=>{r.on(`element:${e}`,(e,r,i)=>{let a=n.processViewAttributes(r.viewItem,i);if(a||i.consumable.test(r.viewItem,{name:!0})){a=a||{},i.consumable.consume(r.viewItem,{name:!0}),r.modelRange||(r=Object.assign(r,i.convertChildren(r.viewItem,r.modelCursor)));for(const e of r.modelRange.getItems())if(i.schema.checkAttribute(e,t)){const n=J6(a,e.getAttribute(t)||{});i.writer.setAttribute(t,n,e)}}},{priority:"low"})}}(e,this)),r.for("downcast").attributeToElement({model:i,view:n8(e)})}}function p8(e,t,n){const r=function(e,{consumable:t},n){const r=n.matchAll(e)||[],i=[];for(const n of r)m8(t,e,n),delete n.match.name,t.consume(e,n.match),i.push(n);return i}(e,t,n),{attributes:i,styles:a,classes:o}=function(e){const t={attributes:new Set,classes:new Set,styles:new Set};for(const n of e)for(const e in t){(n.match[e]||[]).forEach(n=>t[e].add(n))}return t}(r),s={};return i.size&&(s.attributes=g8(i,t=>e.getAttribute(t))),a.size&&(s.styles=g8(a,t=>e.getStyle(t))),o.size&&(s.classes=Array.from(o)),Object.keys(s).length?s:null}function m8(e,t,n){for(const r of["attributes","classes","styles"]){const i=n.match[r];if(i)for(const n of Array.from(i))e.test(t,{[r]:[n]})||h8(i,n)}}function g8(e,t){const n={};for(const r of e){void 0!==t(r)&&(n[r]=t(r))}return n}function v8(e,t){const{name:n}=e;return ZF(e[t])?Object.entries(e[t]).map(([e,r])=>({name:n,[t]:{[e]:r}})):Array.isArray(e[t])?e[t].map(e=>({name:n,[t]:[e]})):[e]}function b8(e){const{name:t,attributes:n,classes:r,styles:i}=e,a=[];return n&&a.push(...v8({name:t,attributes:n},"attributes")),r&&a.push(...v8({name:t,classes:r},"classes")),i&&a.push(...v8({name:t,styles:i},"styles")),a}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class y8 extends HF{static get requires(){return[f8]}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const e=this.editor.plugins.get(f8);e.on("register:pre",(t,n)=>{if("codeBlock"!==n.model)return;const r=this.editor,i=r.model.schema,a=r.conversion;i.extend("codeBlock",{allowAttributes:["htmlAttributes","htmlContentAttributes"]}),a.for("upcast").add(function(e){return t=>{t.on("element:code",(t,n,r)=>{const i=n.viewItem,a=i.parent;function o(t,i){const a=e.processViewAttributes(t,r);a&&r.writer.setAttribute(i,a,n.modelRange)}a&&a.is("element","pre")&&(o(a,"htmlAttributes"),o(i,"htmlContentAttributes"))},{priority:"low"})}}(e)),a.for("downcast").add(e=>{e.on("attribute:htmlAttributes:codeBlock",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:r,attributeNewValue:i}=t,a=n.mapper.toViewElement(t.item).parent;Q6(n.writer,r,i,a)}),e.on("attribute:htmlContentAttributes:codeBlock",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:r,attributeNewValue:i}=t,a=n.mapper.toViewElement(t.item);Q6(n.writer,r,i,a)})}),t.stop()})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class A8 extends HF{static get requires(){return[f8]}init(){this.editor.plugins.get(f8).on("register",(e,t)=>{const n=this.editor,r=n.model.schema,i=n.conversion;if(!t.paragraphLikeModel)return;if(r.isRegistered(t.model)||r.isRegistered(t.paragraphLikeModel))return;const a={model:t.paragraphLikeModel,view:t.view};r.register(t.model,t.modelSchema),r.register(a.model,{inheritAllFrom:"$block"}),i.for("upcast").elementToElement({view:t.view,model:(e,{writer:n})=>this._hasBlockContent(e)?n.createElement(t.model):n.createElement(a.model),converterPriority:uj.get("low")+1}),i.for("downcast").elementToElement({view:t.view,model:t.model}),this._addAttributeConversion(t),i.for("downcast").elementToElement({view:a.view,model:a.model}),this._addAttributeConversion(a),e.stop()})}_hasBlockContent(e){const t=this.editor.editing.view,n=t.domConverter.blockElements;for(const r of t.createRangeIn(e).getItems())if(r.is("element")&&n.includes(r.name))return!0;return!1}_addAttributeConversion(e){const t=this.editor,n=t.conversion,r=t.plugins.get(f8);t.model.schema.extend(e.model,{allowAttributes:"htmlAttributes"}),n.for("upcast").add(r8(e,r)),n.for("downcast").add(i8(e))}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class _8 extends HF{static get requires(){return[X6]}init(){const e=this.editor;if(!e.plugins.has("HeadingEditing"))return;const t=e.plugins.get(X6),n=e.config.get("heading.options"),r=[];for(const e of n)"model"in e&&"view"in e&&(t.registerBlockElement({view:e.view,model:e.model}),r.push(e.model));t.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:r}})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class w8 extends HF{static get requires(){return[f8]}init(){const e=this.editor;if(!e.plugins.has("ImageInlineEditing")&&!e.plugins.has("ImageBlockEditing"))return;const t=e.model.schema,n=e.conversion,r=e.plugins.get(f8);r.on("register:figure",()=>{n.for("upcast").add(function(e){return t=>{t.on("element:figure",(t,n,r)=>{const i=n.viewItem;if(!n.modelRange||!i.hasClass("image"))return;const a=e.processViewAttributes(i,r);a&&r.writer.setAttribute("htmlFigureAttributes",a,n.modelRange)},{priority:"low"})}}(r))}),r.on("register:img",(e,i)=>{"imageBlock"!==i.model&&"imageInline"!==i.model||(t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["htmlAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["htmlA","htmlAttributes"]}),n.for("upcast").add(function(e){return t=>{t.on("element:img",(t,n,r)=>{if(!n.modelRange)return;const i=n.viewItem,a=i.parent;function o(t,i){const a=e.processViewAttributes(t,r);a&&r.writer.setAttribute(i,a,n.modelRange)}o(i,"htmlAttributes"),a.is("element","a")&&function(e){n.modelRange&&n.modelRange.getContainedElement().is("element","imageBlock")&&o(e,"htmlLinkAttributes")}(a)},{priority:"low"})}}(r)),n.for("downcast").add(e=>{var t;function n(t,n){e.on(`attribute:${n}:imageBlock`,(e,n,r)=>{if(!r.consumable.test(n.item,e.name))return;const{attributeOldValue:i,attributeNewValue:a}=n,o=r.mapper.toViewElement(n.item),s=E8(r.writer,o,t);s&&(Q6(r.writer,i,a,s),r.consumable.consume(n.item,e.name))},{priority:"low"}),"a"===t&&e.on("attribute:linkHref:imageBlock",(e,t,n)=>{if(!n.consumable.consume(t.item,"attribute:htmlLinkAttributes:imageBlock"))return;const r=n.mapper.toViewElement(t.item),i=E8(n.writer,r,"a");$6(n.writer,t.item.getAttribute("htmlLinkAttributes"),i)},{priority:"low"})}t="htmlAttributes",e.on(`attribute:${t}:imageInline`,(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:r,attributeNewValue:i}=t,a=n.mapper.toViewElement(t.item);Q6(n.writer,r,i,a)},{priority:"low"}),n("img","htmlAttributes"),n("figure","htmlFigureAttributes"),n("a","htmlLinkAttributes")}),e.stop())})}}function E8(e,t,n){const r=e.createRangeOn(t);for(const{item:e}of r.getWalker())if(e.is("element",n))return e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class S8 extends HF{static get requires(){return[f8]}init(){const e=this.editor;if(!e.plugins.has("MediaEmbed")||e.config.get("mediaEmbed.previewsInData"))return;const t=e.model.schema,n=e.conversion,r=this.editor.plugins.get(f8),i=this.editor.plugins.get(X6),a=e.config.get("mediaEmbed.elementName");i.registerBlockElement({model:"media",view:a}),r.on("register:figure",()=>{n.for("upcast").add(function(e){return t=>{t.on("element:figure",(t,n,r)=>{const i=n.viewItem;if(!n.modelRange||!i.hasClass("media"))return;const a=e.processViewAttributes(i,r);a&&r.writer.setAttribute("htmlFigureAttributes",a,n.modelRange)},{priority:"low"})}}(r))}),r.on(`register:${a}`,(e,i)=>{"media"===i.model&&(t.extend("media",{allowAttributes:["htmlAttributes","htmlFigureAttributes"]}),n.for("upcast").add(function(e,t){return e=>{e.on(`element:${t}`,n)};function n(t,n,r){!function(t,i){const a=e.processViewAttributes(t,r);a&&r.writer.setAttribute(i,a,n.modelRange)}(n.viewItem,"htmlAttributes")}}(r,a)),n.for("dataDowncast").add(function(e){return t=>{function n(e,n){t.on(`attribute:${n}:media`,(t,n,r)=>{if(!r.consumable.consume(n.item,t.name))return;const{attributeOldValue:i,attributeNewValue:a}=n,o=r.mapper.toViewElement(n.item),s=function(e,t,n){const r=e.createRangeOn(t);for(const{item:e}of r.getWalker())if(e.is("element",n))return e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(r.writer,o,e);Q6(r.writer,i,a,s)})}n(e,"htmlAttributes"),n("figure","htmlFigureAttributes")}}(a)),e.stop())})}}class C8 extends HF{static get requires(){return[f8]}init(){const e=this.editor.plugins.get(f8);e.on("register:script",(t,n)=>{const r=this.editor,i=r.model.schema,a=r.conversion;i.register("htmlScript",n.modelSchema),i.extend("htmlScript",{allowAttributes:["htmlAttributes","htmlContent"],isContent:!0}),r.data.registerRawContentMatcher({name:"script"}),a.for("upcast").elementToElement({view:"script",model:Z6(n)}),a.for("upcast").add(r8(n,e)),a.for("downcast").elementToElement({model:"htmlScript",view:(e,{writer:t})=>t8("script",e,t)}),a.for("downcast").add(i8(n)),t.stop()})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class T8 extends HF{static get requires(){return[f8]}init(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const t=e.model.schema,n=e.conversion,r=e.plugins.get(f8);r.on("register:figure",()=>{n.for("upcast").add(function(e){return t=>{t.on("element:figure",(t,n,r)=>{const i=n.viewItem;if(!n.modelRange||!i.hasClass("table"))return;const a=e.processViewAttributes(i,r);a&&r.writer.setAttribute("htmlFigureAttributes",a,n.modelRange)},{priority:"low"})}}(r))}),r.on("register:table",(e,i)=>{"table"===i.model&&(t.extend("table",{allowAttributes:["htmlAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),n.for("upcast").add(function(e){return t=>{t.on("element:table",(t,n,r)=>{const i=n.viewItem;a(i,"htmlAttributes");for(const e of i.getChildren())e.is("element","thead")&&a(e,"htmlTheadAttributes"),e.is("element","tbody")&&a(e,"htmlTbodyAttributes");function a(t,i){const a=e.processViewAttributes(t,r);a&&r.writer.setAttribute(i,a,n.modelRange)}})}}(r)),n.for("downcast").add(e=>{function t(t,n){e.on(`attribute:${n}:table`,(e,n,r)=>{if(!r.consumable.consume(n.item,e.name))return;const i=r.mapper.toViewElement(n.item),a=function(e,t,n){const r=e.createRangeOn(t);for(const{item:e}of r.getWalker())if(e.is("element",n))return e}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(r.writer,i,t);$6(r.writer,n.attributeNewValue,a)})}t("table","htmlAttributes"),t("figure","htmlFigureAttributes"),t("thead","htmlTheadAttributes"),t("tbody","htmlTbodyAttributes")}),e.stop())})}}class k8 extends HF{static get requires(){return[f8]}init(){const e=this.editor.plugins.get(f8);e.on("register:style",(t,n)=>{const r=this.editor,i=r.model.schema,a=r.conversion;i.register("htmlStyle",n.modelSchema),i.extend("htmlStyle",{allowAttributes:["htmlAttributes","htmlContent"],isContent:!0}),r.data.registerRawContentMatcher({name:"style"}),a.for("upcast").elementToElement({view:"style",model:Z6(n)}),a.for("upcast").add(r8(n,e)),a.for("downcast").elementToElement({model:"htmlStyle",view:(e,{writer:t})=>t8("style",e,t)}),a.for("downcast").add(i8(n)),t.stop()})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class x8 extends HF{static get requires(){return[f8]}init(){const e=this.editor;if(!e.plugins.has("DocumentListEditing"))return;const t=e.model.schema,n=e.conversion,r=e.plugins.get(f8),i=e.plugins.get("DocumentListEditing");i.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast(e,t,n){$6(e,t,n)}}),i.registerDowncastStrategy({scope:"list",attributeName:"htmlListAttributes",setAttributeOnDowncast(e,t,n){$6(e,t,n)}}),r.on("register",(e,i)=>{["ul","ol","li"].includes(i.view)&&(e.stop(),t.checkAttribute("$block","htmlListAttributes")||(t.extend("$block",{allowAttributes:["htmlListAttributes","htmlLiAttributes"]}),t.extend("$blockObject",{allowAttributes:["htmlListAttributes","htmlLiAttributes"]}),t.extend("$container",{allowAttributes:["htmlListAttributes","htmlLiAttributes"]}),n.for("upcast").add(e=>{e.on("element:ul",O8("htmlListAttributes",r),{priority:"low"}),e.on("element:ol",O8("htmlListAttributes",r),{priority:"low"}),e.on("element:li",O8("htmlLiAttributes",r),{priority:"low"})})))}),i.on("postFixer",(e,{listNodes:t,writer:n})=>{const r=[];for(const{node:i,previous:a}of t){if(!a)continue;const t=i.getAttribute("listIndent"),o=a.getAttribute("listIndent");let s=null;if(t>o?r[o]=a:t<o?(s=r[t],r.length=t):s=a,s){if(s.getAttribute("listType")==i.getAttribute("listType")){const t=s.getAttribute("htmlListAttributes");cY(i.getAttribute("htmlListAttributes"),t)||(n.setAttribute("htmlListAttributes",t,i),e.return=!0)}if(s.getAttribute("listItemId")==i.getAttribute("listItemId")){const t=s.getAttribute("htmlLiAttributes");cY(i.getAttribute("htmlLiAttributes"),t)||(n.setAttribute("htmlLiAttributes",t,i),e.return=!0)}}}})}afterInit(){const e=this.editor;e.commands.get("indentList")&&this.listenTo(e.commands.get("indentList"),"afterExecute",(t,n)=>{e.model.change(e=>{for(const t of n)e.setAttribute("htmlListAttributes",{},t)})})}}function O8(e,t){return(n,r,i)=>{const a=r.viewItem;r.modelRange||Object.assign(r,i.convertChildren(r.viewItem,r.modelCursor));const o=t.processViewAttributes(a,i);for(const t of r.modelRange.getItems({shallow:!0}))t.hasAttribute("listItemId")&&(t.hasAttribute(e)||i.writer.setAttribute(e,o||{},t))}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class I8 extends HF{static get pluginName(){return"GeneralHtmlSupport"}static get requires(){return[f8,y8,A8,_8,w8,S8,C8,T8,k8,x8]}init(){const e=this.editor,t=e.plugins.get(f8);t.loadAllowedConfig(e.config.get("htmlSupport.allow")||[]),t.loadDisallowedConfig(e.config.get("htmlSupport.disallow")||[])}getGhsAttributeNameForElement(e){const t=this.editor.plugins.get("DataSchema"),n=Array.from(t.getDefinitionsForView(e,!1));return n&&n.length&&n[0].isInline&&!n[0].isObject?n[0].model:"htmlAttributes"}addModelHtmlClass(e,t,n){const r=this.editor.model,i=this.getGhsAttributeNameForElement(e);r.change(e=>{for(const a of M8(r,n,i))P8(e,a,i,"classes",e=>{for(const n of GH(t))e.add(n)})})}removeModelHtmlClass(e,t,n){const r=this.editor.model,i=this.getGhsAttributeNameForElement(e);r.change(e=>{for(const a of M8(r,n,i))P8(e,a,i,"classes",e=>{for(const n of GH(t))e.delete(n)})})}setModelHtmlAttributes(e,t,n){const r=this.editor.model,i=this.getGhsAttributeNameForElement(e);r.change(e=>{for(const a of M8(r,n,i))P8(e,a,i,"attributes",e=>{for(const[n,r]of Object.entries(t))e.set(n,r)})})}removeModelHtmlAttributes(e,t,n){const r=this.editor.model,i=this.getGhsAttributeNameForElement(e);r.change(e=>{for(const a of M8(r,n,i))P8(e,a,i,"attributes",e=>{for(const n of GH(t))e.delete(n)})})}setModelHtmlStyles(e,t,n){const r=this.editor.model,i=this.getGhsAttributeNameForElement(e);r.change(e=>{for(const a of M8(r,n,i))P8(e,a,i,"styles",e=>{for(const[n,r]of Object.entries(t))e.set(n,r)})})}removeModelHtmlStyles(e,t,n){const r=this.editor.model,i=this.getGhsAttributeNameForElement(e);r.change(e=>{for(const a of M8(r,n,i))P8(e,a,i,"styles",e=>{for(const n of GH(t))e.delete(n)})})}}function*M8(e,t,n){if(t.is("documentSelection")&&t.isCollapsed)e.schema.checkAttributeInSelection(t,n)&&(yield t);else for(const r of function(e,t,n){return t.is("node")||t.is("$text")||t.is("$textProxy")?e.schema.checkAttribute(t,n)?[e.createRangeOn(t)]:[]:e.schema.getValidRanges(e.createSelection(t).getRanges(),n)}(e,t,n))yield*r.getItems({shallow:!0})}function P8(e,t,n,r,i){const a=t.getAttribute(n),o={};for(const e of["attributes","styles","classes"])if(e!=r)a&&a[e]&&(o[e]=a[e]);else{const t="classes"==e?new Set(a&&a[e]||[]):new Map(Object.entries(a&&a[e]||{}));i(t),t.size&&(o[e]="classes"==e?Array.from(t):Object.fromEntries(t))}Object.keys(o).length?t.is("documentSelection")?e.setSelectionAttribute(n,o):e.setAttribute(n,o,t):a&&(t.is("documentSelection")?e.removeSelectionAttribute(n):e.removeAttribute(n,t))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function D8(e){const t=[{name:"address",isVoid:!1},{name:"article",isVoid:!1},{name:"aside",isVoid:!1},{name:"blockquote",isVoid:!1},{name:"br",isVoid:!0},{name:"details",isVoid:!1},{name:"dialog",isVoid:!1},{name:"dd",isVoid:!1},{name:"div",isVoid:!1},{name:"dl",isVoid:!1},{name:"dt",isVoid:!1},{name:"fieldset",isVoid:!1},{name:"figcaption",isVoid:!1},{name:"figure",isVoid:!1},{name:"footer",isVoid:!1},{name:"form",isVoid:!1},{name:"h1",isVoid:!1},{name:"h2",isVoid:!1},{name:"h3",isVoid:!1},{name:"h4",isVoid:!1},{name:"h5",isVoid:!1},{name:"h6",isVoid:!1},{name:"header",isVoid:!1},{name:"hgroup",isVoid:!1},{name:"hr",isVoid:!0},{name:"input",isVoid:!0},{name:"li",isVoid:!1},{name:"main",isVoid:!1},{name:"nav",isVoid:!1},{name:"ol",isVoid:!1},{name:"p",isVoid:!1},{name:"section",isVoid:!1},{name:"table",isVoid:!1},{name:"tbody",isVoid:!1},{name:"td",isVoid:!1},{name:"textarea",isVoid:!1},{name:"th",isVoid:!1},{name:"thead",isVoid:!1},{name:"tr",isVoid:!1},{name:"ul",isVoid:!1}],n=t.map(e=>e.name).join("|"),r=e.replace(new RegExp(`</?(${n})( .*?)?>`,"g"),"\n$&\n").split("\n");let i=0;return r.filter(e=>e.length).map(e=>function(e,t){return t.some(t=>!t.isVoid&&!!new RegExp(`<${t.name}( .*?)?>`).test(e))}(e,t)?N8(e,i++):function(e,t){return t.some(t=>new RegExp(`</${t.name}>`).test(e))}(e,t)?N8(e,--i):N8(e,i)).join("\n")}function N8(e,t,n="    "){return`${n.repeat(t)}${e}`}r(1633);function L8(e){return function(e){return e.startsWith("<")}(e)?D8(e):e}var R8=r(421);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function B8(e,t){return Array(t+1).join(e)}R8.marked.use({tokenizer:{autolink:()=>null,url:()=>null},renderer:{checkbox(...e){return Object.getPrototypeOf(this).checkbox.call(this,...e).trimRight()},code(...e){return Object.getPrototypeOf(this).code.call(this,...e).replace("\n</code>","</code>")}}});var j8=["address","article","aside","audio","blockquote","body","canvas","center","dd","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frameset","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","isindex","li","main","menu","nav","noframes","noscript","ol","output","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul"];function F8(e){return-1!==j8.indexOf(e.nodeName.toLowerCase())}var U8=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function H8(e){return-1!==U8.indexOf(e.nodeName.toLowerCase())}var z8=U8.join();var V8={};function W8(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function G8(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(q8(i,t,n))return i}}function q8(e,t,n){var r=e.filter;if("string"==typeof r){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof r)throw new TypeError("`filter` needs to be a string, array, or function");if(r.call(e,t,n))return!0}}function Y8(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function K8(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}V8.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},V8.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+"\n"}},V8.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));return"setext"===n.headingStyle&&r<3?"\n\n"+e+"\n"+B8(1===r?"=":"-",e.length)+"\n\n":"\n\n"+B8("#",r)+" "+e+"\n\n"}},V8.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},V8.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return"LI"===n.nodeName&&n.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},V8.listItem={filter:"li",replacement:function(e,t,n){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n    ");var r=n.bulletListMarker+"   ",i=t.parentNode;if("OL"===i.nodeName){var a=i.getAttribute("start"),o=Array.prototype.indexOf.call(i.children,t);r=(a?Number(a)+o:o+1)+".  "}return r+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},V8.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){return"\n\n    "+t.firstChild.textContent.replace(/\n/g,"\n    ")+"\n\n"}},V8.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){for(var r,i=((t.firstChild.className||"").match(/language-(\S+)/)||[null,""])[1],a=t.firstChild.textContent,o=n.fence.charAt(0),s=3,l=new RegExp("^"+o+"{3,}","gm");r=l.exec(a);)r[0].length>=s&&(s=r[0].length+1);var c=B8(o,s);return"\n\n"+c+i+"\n"+a.replace(/\n$/,"")+"\n"+c+"\n\n"}},V8.horizontalRule={filter:"hr",replacement:function(e,t,n){return"\n\n"+n.hr+"\n\n"}},V8.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){return"["+e+"]("+t.getAttribute("href")+(t.title?' "'+t.title+'"':"")+")"}},V8.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,n){var r,i,a=t.getAttribute("href"),o=t.title?' "'+t.title+'"':"";switch(n.linkReferenceStyle){case"collapsed":r="["+e+"][]",i="["+e+"]: "+a+o;break;case"shortcut":r="["+e+"]",i="["+e+"]: "+a+o;break;default:var s=this.references.length+1;r="["+e+"]["+s+"]",i="["+s+"]: "+a+o}return this.references.push(i),r},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},V8.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}},V8.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}},V8.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){if(!e.trim())return"";var t="`",n="",r="",i=e.match(/`+/gm);if(i)for(/^`/.test(e)&&(n=" "),/`$/.test(e)&&(r=" ");-1!==i.indexOf(t);)t+="`";return t+n+e+r+t}},V8.image={filter:"img",replacement:function(e,t){var n=t.alt||"",r=t.getAttribute("src")||"",i=t.title||"";return r?"!["+n+"]("+r+(i?' "'+i+'"':"")+")":""}},W8.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=G8(this.array,e,this.options))?t:(t=G8(this._keep,e,this.options))?t:(t=G8(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var X8="undefined"!=typeof window?window:{};var Q8,$8,J8,Z8=function(){var e=X8.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?X8.DOMParser:(Q8=function(){},$8=r(1635).JSDOM,Q8.prototype.parseFromString=function(e){return new $8(e).window.document},Q8);function e9(e){var t;"string"==typeof e?t=(J8=J8||new Z8).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):t=e.cloneNode(!0);return function(e){var t=e.element,n=e.isBlock,r=e.isVoid,i=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!i(t)){for(var a=null,o=!1,s=null,l=K8(s,t,i);l!==t;){if(3===l.nodeType||4===l.nodeType){var c=l.data.replace(/[ \r\n\t]+/g," ");if(a&&!/ $/.test(a.data)||o||" "!==c[0]||(c=c.substr(1)),!c){l=Y8(l);continue}l.data=c,a=l}else{if(1!==l.nodeType){l=Y8(l);continue}n(l)||"BR"===l.nodeName?(a&&(a.data=a.data.replace(/ $/,"")),a=null,o=!1):r(l)&&(a=null,o=!0)}var u=K8(s,l,i);s=l,l=u}a&&(a.data=a.data.replace(/ $/,""),a.data||Y8(a))}}({element:t,isBlock:F8,isVoid:H8}),t}function t9(e){return e.isBlock=F8(e),e.isCode="code"===e.nodeName.toLowerCase()||e.parentNode.isCode,e.isBlank=function(e){return-1===["A","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"].indexOf(e.nodeName)&&/^\s*$/i.test(e.textContent)&&!H8(e)&&!function(e){return e.querySelector&&e.querySelector(z8)}(e)}(e),e.flankingWhitespace=function(e){var t="",n="";if(!e.isBlock){var r=/^\s/.test(e.textContent),i=/\s$/.test(e.textContent),a=e.isBlank&&r&&i;r&&!n9("left",e)&&(t=" "),a||!i||n9("right",e)||(n=" ")}return{leading:t,trailing:n}}(e),e}function n9(e,t){var n,r,i;return"left"===e?(n=t.previousSibling,r=/ $/):(n=t.nextSibling,r=/^ /),n&&(3===n.nodeType?i=r.test(n.nodeValue):1!==n.nodeType||F8(n)||(i=r.test(n.textContent))),i}var r9=Array.prototype.reduce,i9=/^\n*/,a9=/\n*$/,o9=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function s9(e){if(!(this instanceof s9))return new s9(e);var t={rules:V8,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:"  ",blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},t,e),this.rules=new W8(this.options)}function l9(e){var t=this;return r9.call(e.childNodes,(function(e,n){var r="";return 3===(n=new t9(n)).nodeType?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(r=u9.call(t,n)),d9(e,r)}),"")}function c9(e){var t=this;return this.rules.forEach((function(n){"function"==typeof n.append&&(e=d9(e,n.append(t.options)))})),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function u9(e){var t=this.rules.forNode(e),n=l9.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function d9(e,t){var n,r,i,a=(n=t,r=[e.match(a9)[0],n.match(i9)[0]].sort(),(i=r[r.length-1]).length<2?i:"\n\n");return(e=e.replace(a9,""))+a+(t=t.replace(i9,""))}s9.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=l9.call(this,new e9(e));return c9.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return o9.reduce((function(e,t){return e.replace(t[0],t[1])}),e)}};var h9=s9,f9=/highlight-(?:text|source)-([a-z0-9]+)/;function p9(e){e.addRule("highlightedCodeBlock",{filter:function(e){var t=e.firstChild;return"DIV"===e.nodeName&&f9.test(e.className)&&t&&"PRE"===t.nodeName},replacement:function(e,t,n){var r=((t.className||"").match(f9)||[null,""])[1];return"\n\n"+n.fence+r+"\n"+t.firstChild.textContent+"\n"+n.fence+"\n\n"}})}function m9(e){e.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~"+e+"~"}})}var g9=Array.prototype.indexOf,v9=Array.prototype.every,b9={};function y9(e){var t,n,r=e.parentNode;return"THEAD"===r.nodeName||r.firstChild===e&&("TABLE"===r.nodeName||(n=(t=r).previousSibling,"TBODY"===t.nodeName&&(!n||"THEAD"===n.nodeName&&/^\s*$/i.test(n.textContent))))&&v9.call(e.childNodes,(function(e){return"TH"===e.nodeName}))}function A9(e,t){var n=" ";return 0===g9.call(t.parentNode.childNodes,t)&&(n="| "),n+e+" |"}function _9(e){for(var t in e.keep((function(e){return"TABLE"===e.nodeName&&!y9(e.rows[0])})),b9)e.addRule(t,b9[t])}function w9(e){e.addRule("taskListItems",{filter:function(e){return"checkbox"===e.type&&"LI"===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?"[x]":"[ ]")+" "}})}b9.tableCell={filter:["th","td"],replacement:function(e,t){return A9(e,t)}},b9.tableRow={filter:"tr",replacement:function(e,t){var n="",r={left:":--",right:"--:",center:":-:"};if(y9(t))for(var i=0;i<t.childNodes.length;i++){var a="---",o=(t.childNodes[i].getAttribute("align")||"").toLowerCase();o&&(a=r[o]||a),n+=A9(a,t.childNodes[i])}return"\n"+e+(n?"\n"+n:"")}},b9.table={filter:function(e){return"TABLE"===e.nodeName&&y9(e.rows[0])},replacement:function(e){return"\n\n"+(e=e.replace("\n\n","\n"))+"\n\n"}},b9.tableSection={filter:["thead","tbody","tfoot"],replacement:function(e){return e}};
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
const E9=h9.prototype.escape;function S9(e){return e=(e=E9(e)).replace(/</g,"\\<")}h9.prototype.escape=function(e){let t="",n=0;for(const r of function*(e){for(const t of e.matchAll(T9)){const e=t[0],n=k9(e);yield Object.assign([e.substring(0,n)],{index:t.index})}}(e)){const i=r.index;i>n&&(t+=S9(e.substring(n,i)));const a=r[0];t+=a,n=i+a.length}return n<e.length&&(t+=S9(e.substring(n,e.length))),t};const C9=new h9({codeBlockStyle:"fenced",hr:"---",headingStyle:"atx"});C9.use([function(e){e.use([p9,m9,_9,w9])},function(e){e.addRule("taskListItems",{filter:e=>"checkbox"===e.type&&("LI"===e.parentNode.nodeName||"LI"===e.parentNode.parentNode.nodeName),replacement:(e,t)=>(t.checked?"[x]":"[ ]")+" "})}]);const T9=new RegExp(/\b(?:(?:https?|ftp):\/\/|www\.)/.source+/(?![-_])(?:[-_a-z0-9\u00a1-\uffff]{1,63}\.)+(?:[a-z\u00a1-\uffff]{2,63})/.source+/(?:[^\s<>]*)/.source,"gi");function k9(e){let t=e.length;for(;t>0;){const n=e[t-1];if("?!.,:*_~'\"".includes(n))t--;else{if(")"!=n)break;{let n=0;for(let r=0;r<t;r++)"("==e[r]?n++:")"==e[r]&&n--;if(!(n<0))break;t--}}}return t}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function x9(e,t){if(!e.childCount)return;const n=new nJ(e.document),r=function(e,t){const n=t.createRangeIn(e),r=new iz({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),i=[];for(const e of n)if("elementStart"===e.type&&r.match(e.item)){const t=M9(e.item);i.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return i}(e,n);if(!r.length)return;let i=null,a=1;r.forEach((e,o)=>{const s=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const n=t.element.previousSibling;if(!n)return!0;return r=n,!(r.is("element","ol")||r.is("element","ul"));var r}(r[o-1],e),l=s?null:r[o-1],c=(d=e,(u=l)?d.indent-u.indent:d.indent-1);var u,d;if(s&&(i=null,a=1),!i||0!==c){const r=function(e,t){const n=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),r=/mso-level-number-format:([^;]{0,100});/gi,i=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,a=n.exec(t);let o="decimal",s="ol",l=null;if(a&&a[1]){const t=r.exec(a[1]);if(t&&t[1]&&(o=t[1].trim(),s="bullet"!==o&&"image"!==o?"ol":"ul"),"bullet"===o){const t=function(e){const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);return e.is("$text")?e:e.getChild(0)}}(e);if(!t)return null;const n=t._data;if("o"===n)return"circle";if("·"===n)return"disc";if("§"===n)return"square";return null}(e.element);t&&(o=t)}else{const e=i.exec(a[1]);e&&e[1]&&(l=parseInt(e[1]))}}return{type:s,startIndex:l,style:O9(o)}}(e,t);if(i){if(e.indent>a){const e=i.getChild(i.childCount-1),t=e.getChild(e.childCount-1);i=I9(r,t,n),a+=1}else if(e.indent<a){const t=a-e.indent;i=function(e,t){const n=e.getAncestors({parentFirst:!0});let r=null,i=0;for(const e of n)if("ul"!==e.name&&"ol"!==e.name||i++,i===t){r=e;break}return r}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(i,t),a=parseInt(e.indent)}}else i=I9(r,e.element,n);e.indent<=a&&(i.is("element",r.type)||(i=n.rename(r.type,i)))}const h=function(e,t){return function(e,t){const n=new iz({name:"span",styles:{"mso-list":"Ignore"}}),r=t.createRangeIn(e);for(const e of r)"elementStart"===e.type&&n.match(e.item)&&t.remove(e.item)}(e,t),t.rename("li",e)}(e.element,n);n.appendChild(h,i)})}function O9(e){if(e.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(e){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}function I9(e,t,n){const r=t.parent,i=n.createElement(e.type),a=r.getChildIndex(t)+1;return n.insertChild(a,i,r),e.style&&n.setStyle("list-style-type",e.style,i),e.startIndex&&e.startIndex>1&&n.setAttribute("start",e.startIndex,i),i}function M9(e){const t={},n=e.getStyle("mso-list");if(n){const e=n.match(/(^|\s{1,100})l(\d+)/i),r=n.match(/\s{0,100}lfo(\d+)/i),i=n.match(/\s{0,100}level(\d+)/i);e&&r&&i&&(t.id=e[2],t.order=r[1],t.indent=i[1])}return t}const P9=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class D9{constructor(e){this.document=e}isActive(e){return P9.test(e)}execute(e){const t=new nJ(this.document),{body:n}=e._parsedData;!
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function(e,t){for(const n of e.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const r=e.getChildIndex(n);t.remove(n),t.insertChild(r,n.getChildren(),e)}}(n,t),function(e,t){for(const n of t.createRangeIn(e)){const e=n.item;if(e.is("element","li")){const n=e.getChild(0);n&&n.is("element","p")&&t.unwrapElement(n)}}}(n,t),e.content=n}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function N9(e,t){if(!e.childCount)return;const n=new nJ;!function(e,t,n){const r=n.createRangeIn(t),i=new iz({name:"img"}),a=[];for(const t of r)if(i.match(t.item)){const n=t.item,r=n.getAttribute("v:shapes")?n.getAttribute("v:shapes").split(" "):[];r.length&&r.every(t=>e.indexOf(t)>-1)?a.push(n):n.getAttribute("src")||a.push(n)}for(const e of a)n.remove(e)}(function(e,t){const n=t.createRangeIn(e),r=new iz({name:/v:(.+)/}),i=[];for(const e of n){if("elementStart"!=e.type)continue;const t=e.item,n=t.previousSibling&&t.previousSibling.name||null;r.match(t)&&t.getAttribute("o:gfxdata")&&"v:shapetype"!==n&&i.push(e.item.getAttribute("id"))}return i}(e,n),e,n),function(e,t){const n=t.createRangeIn(e),r=new iz({name:/v:(.+)/}),i=[];for(const e of n)"elementStart"==e.type&&r.match(e.item)&&i.push(e.item);for(const e of i)t.remove(e)}(e,n);const r=function(e,t){const n=t.createRangeIn(e),r=new iz({name:"img"}),i=[];for(const e of n)r.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&i.push(e.item);return i}(e,n);r.length&&function(e,t,n){if(e.length===t.length)for(let i=0;i<e.length;i++){const a=`data:${t[i].type};base64,${r=t[i].hex,btoa(r.match(/\w{2}/g).map(e=>String.fromCharCode(parseInt(e,16))).join(""))}`;n.setAttribute("src",a,e[i])}var r}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(r,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),r=e.match(n),i=[];if(r)for(const e of r){let n=!1;e.includes("\\pngblip")?n="image/png":e.includes("\\jpegblip")&&(n="image/jpeg"),n&&i.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:n})}return i}(t),n)}const L9=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,R9=/xmlns:o="urn:schemas-microsoft-com/i;class B9{constructor(e){this.document=e}isActive(e){return L9.test(e)||R9.test(e)}execute(e){const{body:t,stylesString:n}=e._parsedData;x9(t,n),N9(t,e.dataTransfer.getData("text/rtf")),e.content=t}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function j9(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,t)=>1===t.length?" ":Array(t.length+1).join("  ").substr(0,t.length))}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */function F9(e,t){const n=new DOMParser,r=function(e){return j9(j9(e)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/ <\//g," </").replace(/ <o:p><\/o:p>/g," <o:p></o:p>").replace(/<o:p>(&nbsp;|\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)</g,"><")}(function(e){const t=e.indexOf("</body>");if(t<0)return e;const n=e.indexOf("</html>",t+"</body>".length);return e.substring(0,t+"</body>".length)+(n>=0?e.substring(n):"")}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(e=e.replace(/<!--\[if gte vml 1]>/g,""))),i=n.parseFromString(r,"text/html");!function(e){e.querySelectorAll("span[style*=spacerun]").forEach(e=>{const t=e.innerText.length||0;e.innerHTML=Array(t+1).join("  ").substr(0,t)})}(i);const a=i.body.innerHTML,o=function(e,t){const n=new cV(t),r=new gW(n,{renderingMode:"data"}),i=e.createDocumentFragment(),a=e.body.childNodes;for(;a.length>0;)i.appendChild(a[0]);return r.domToView(i,{skipComments:!0})}(i,t),s=function(e){const t=[],n=[],r=Array.from(e.getElementsByTagName("style"));for(const e of r)e.sheet&&e.sheet.cssRules&&e.sheet.cssRules.length&&(t.push(e.sheet),n.push(e.innerHTML));return{styles:t,stylesString:n.join(" ")}}(i);return{body:o,bodyString:a,styles:s.styles,stylesString:s.stylesString}}function U9(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var H9=/ck\-border--(.*?)"/,z9=function(e){d()(n,e);var t=U9(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"getDropdownItemsDefinitions",(function(e){var t=new VH,n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value,l={type:"button",model:new C$({label:" ",value:s,class:"ck-border-dropdown__option--".concat(s),withText:!0})};t.add(l)}}catch(e){r=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return t})),G()(V()(e),"initialBorder",(function(t){if(!t.startsWith('<div class="ck-border'))return"";var n=H9.exec(t)[1];e.dropdownView.element.className="ck ck-dropdown ck-border-dropdown ck-border-dropdown--".concat(n)})),G()(V()(e),"handleItemClick",(function(t){var n=t.source.value;e.dropdownView.listView.items.map((function(e){return e.element.classList.remove("active")}));var r=e.editor.getData()||"",i=r;if(r.startsWith('<div class="ck-border')&&H9.exec(r)){var a=H9.exec(r)[1];i=r.replace(a,n)}else i='<div class="ck-border ck-border--'.concat(n,'">').concat(r||"<p></p>","</div>");e.editor.setData(i),e.dropdownView.element.className="ck ck-dropdown ck-border-dropdown ck-border-dropdown--".concat(n),t.source.element.classList.add("active")})),e}return c()(n,[{key:"init",value:function(){var e=this;console.log("SimpleBoxUI#init() got called");var t=this.editor,n=t.t,r=t.config.get("borderConfig.types");t.on("ready",(function(n){t.model.document.once("change:data",(function(){e.initialBorder(t.getData())}))})),t.ui.componentFactory.add("border",(function(t){var i=u$(t);return h$(i,e.getDropdownItemsDefinitions(r)),i.set({class:"ck-border-dropdown"}),i.buttonView.set({label:n("Border"),withText:!0,tooltip:!0}),i.on("change:isOpen",(function(e){})),e.listenTo(i,"execute",e.handleItemClick),e.dropdownView=i,i}))}}]),n}(HF),V9=[{color:"#FFEBEE"},{color:"#FFCDD2"},{color:"#EF9A9A"},{color:"#E57373"},{color:"#EF5350"},{color:"#F44336"},{color:"#E53935"},{color:"#D32F2F"},{color:"#C62828"},{color:"#B71C1C"},{color:"#FCE4EC"},{color:"#F8BBD0"},{color:"#F48FB1"},{color:"#F06292"},{color:"#EC407A"},{color:"#E91E63"},{color:"#D81B60"},{color:"#C2185B"},{color:"#AD1457"},{color:"#880E4F"},{color:"#F3E5F5"},{color:"#E1BEE7"},{color:"#CE93D8"},{color:"#BA68C8"},{color:"#AB47BC"},{color:"#9C27B0"},{color:"#8E24AA"},{color:"#7B1FA2"},{color:"#6A1B9A"},{color:"#4A148C"},{color:"#EDE7F6"},{color:"#D1C4E9"},{color:"#B39DDB"},{color:"#9575CD"},{color:"#7E57C2"},{color:"#673AB7"},{color:"#5E35B1"},{color:"#512DA8"},{color:"#4527A0"},{color:"#311B92"},{color:"#E8EAF6"},{color:"#C5CAE9"},{color:"#9FA8DA"},{color:"#7986CB"},{color:"#5C6BC0"},{color:"#3F51B5"},{color:"#3949AB"},{color:"#303F9F"},{color:"#283593"},{color:"#1A237E"},{color:"#E3F2FD"},{color:"#BBDEFB"},{color:"#90CAF9"},{color:"#64B5F6"},{color:"#42A5F5"},{color:"#2196F3"},{color:"#1E88E5"},{color:"#1976D2"},{color:"#1565C0"},{color:"#0D47A1"},{color:"#E1F5FE"},{color:"#B3E5FC"},{color:"#81D4FA"},{color:"#4FC3F7"},{color:"#29B6F6"},{color:"#03A9F4"},{color:"#039BE5"},{color:"#0288D1"},{color:"#0277BD"},{color:"#01579B"},{color:"#E0F7FA"},{color:"#B2EBF2"},{color:"#80DEEA"},{color:"#4DD0E1"},{color:"#26C6DA"},{color:"#00BCD4"},{color:"#00ACC1"},{color:"#0097A7"},{color:"#00838F"},{color:"#006064"},{color:"#E0F2F1"},{color:"#B2DFDB"},{color:"#80CBC4"},{color:"#4DB6AC"},{color:"#26A69A"},{color:"#009688"},{color:"#00897B"},{color:"#00796B"},{color:"#00695C"},{color:"#004D40"},{color:"#E8F5E9"},{color:"#C8E6C9"},{color:"#A5D6A7"},{color:"#81C784"},{color:"#66BB6A"},{color:"#4CAF50"},{color:"#43A047"},{color:"#388E3C"},{color:"#2E7D32"},{color:"#1B5E20"},{color:"#F1F8E9"},{color:"#DCEDC8"},{color:"#C5E1A5"},{color:"#AED581"},{color:"#9CCC65"},{color:"#8BC34A"},{color:"#7CB342"},{color:"#689F38"},{color:"#558B2F"},{color:"#33691E"},{color:"#F9FBE7"},{color:"#F0F4C3"},{color:"#E6EE9C"},{color:"#DCE775"},{color:"#D4E157"},{color:"#CDDC39"},{color:"#C0CA33"},{color:"#AFB42B"},{color:"#9E9D24"},{color:"#827717"},{color:"#FFFDE7"},{color:"#FFF9C4"},{color:"#FFF59D"},{color:"#FFF176"},{color:"#FFEE58"},{color:"#FFEB3B"},{color:"#FDD835"},{color:"#FBC02D"},{color:"#F9A825"},{color:"#F57F17"},{color:"#fff8e1"},{color:"#ffecb3"},{color:"#ffe082"},{color:"#ffd54f"},{color:"#ffca28"},{color:"#ffc107"},{color:"#ffb300"},{color:"#ffa000"},{color:"#ff8f00"},{color:"#ff6f00"},{color:"#FFF3E0"},{color:"#FFE0B2"},{color:"#FFCC80"},{color:"#FFB74D"},{color:"#FFA726"},{color:"#FF9800"},{color:"#FB8C00"},{color:"#F57C00"},{color:"#EF6C00"},{color:"#E65100"},{color:"#FBE9E7"},{color:"#FFCCBC"},{color:"#FFAB91"},{color:"#FF8A65"},{color:"#FF7043"},{color:"#FF5722"},{color:"#F4511E"},{color:"#E64A19"},{color:"#D84315"},{color:"#BF360C"},{color:"#EFEBE9"},{color:"#D7CCC8"},{color:"#BCAAA4"},{color:"#A1887F"},{color:"#8D6E63"},{color:"#795548"},{color:"#6D4C41"},{color:"#5D4037"},{color:"#4E342E"},{color:"#3E2723"},{color:"#FAFAFA"},{color:"#F5F5F5"},{color:"#EEEEEE"},{color:"#E0E0E0"},{color:"#BDBDBD"},{color:"#9E9E9E"},{color:"#757575"},{color:"#616161"},{color:"#424242"},{color:"#212121"},{color:"#ECEFF1"},{color:"#CFD8DC"},{color:"#B0BEC5"},{color:"#90A4AE"},{color:"#78909C"},{color:"#607D8B"},{color:"#546E7A"},{color:"#455A64"},{color:"#37474F"},{color:"#263238"}],W9={columns:20,documentColors:200,colors:V9},G9={showPreviews:!0,sanitizeHtml:function(e){return{html:aj.a.sanitize(e),hasChanged:!0}}},q9={allow:[{name:/.*/,attributes:!0,classes:!0,styles:!0}]},Y9={plugins:[PQ,oZ,mZ,AZ,CZ,OZ,PZ,LZ,jZ,zZ,XZ,e0,H0,class extends HF{static get requires(){return[y1,D1,R1]}static get pluginName(){return"Link"}},d2,class extends HF{static get requires(){return[p2,g2,TX]}static get pluginName(){return"HtmlEmbed"}},D5,B5,class extends HF{static get pluginName(){return"TableCaption"}static get requires(){return[W5,G5]}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */,class extends HF{static get requires(){return[o4]}static get pluginName(){return"TableColumnResize"}},class extends HF{static get pluginName(){return"TableProperties"}static get requires(){return[C4,J4]}},class extends HF{static get pluginName(){return"TableCellProperties"}static get requires(){return[g3,r3]}},class extends HF{static get requires(){return[R3,j3]}static get pluginName(){return"Image"}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */,class extends HF{static get requires(){return[E1,w3]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(E1),r=e.plugins.get("ImageUtils");n.register("image",{ariaLabel:t("Image toolbar"),items:F3(e.config.get("image.toolbar")||[]),getRelatedElement:e=>r.getClosestSelectedImageWidget(e)})}},W3,class extends HF{static get requires(){return[a6,o6]}static get pluginName(){return"ImageStyle"}},class extends HF{static get requires(){return[d6,g6,f6]}static get pluginName(){return"ImageResize"}},class extends HF{static get pluginName(){return"ImageInsert"}static get requires(){return[R6,U6]}},class extends HF{static get requires(){return[z6,G6]}static get pluginName(){return"LinkImage"}},class extends HF{static get requires(){return[LX,w3,MQ,tX]}static get pluginName(){return"AutoImage"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document;this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",()=>{const e=t.selection.getFirstRange(),n=HY.fromPosition(e.start);n.stickiness="toPrevious";const r=HY.fromPosition(e.end);r.stickiness="toNext",t.once("change:data",()=>{this._embedImageBetweenPositions(n,r),n.detach(),r.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(cW.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedImageBetweenPositions(e,t){const n=this.editor,r=new QG(e,t),i=r.getWalker({ignoreElementEnd:!0}),a=Object.fromEntries(n.model.document.selection.getAttributes()),o=this.editor.plugins.get("ImageUtils");let s="";for(const e of i)e.item.is("$textProxy")&&(s+=e.item.data);s=s.trim(),s.match(H6)?(this._positionToInsert=HY.fromPosition(e),this._timeoutId=cW.window.setTimeout(()=>{n.commands.get("insertImage").isEnabled?(n.model.change(e=>{let t;this._timeoutId=null,e.remove(r),r.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert.toPosition()),o.insertImage({...a,src:s},t),this._positionToInsert.detach(),this._positionToInsert=null}),n.plugins.get("Delete").requestUndoOnBackspace()):r.detach()},100)):r.detach()}},
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class extends HF{static get requires(){return[b6]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(b6).createUploadAdapter=t=>new w6(t,e):Object(hj.b)("simple-upload-adapter-missing-uploadurl"))}},class extends HF{static get pluginName(){return"HtmlComment"}init(){const e=this.editor;e.model.schema.addAttributeCheck((e,t)=>{if(e.endsWith("$root")&&t.startsWith("$comment"))return!0}),e.conversion.for("upcast").elementToMarker({view:"$comment",model:(e,{writer:t})=>{const n=this.editor.model.document.getRoot(),r=e.getCustomProperty("$rawContent"),i=`$comment:${cj()}`;return t.setAttribute(i,r,n),i}}),e.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(e,{writer:t})=>{const n=this.editor.model.document.getRoot(),r=e.markerName,i=n.getAttribute(r),a=t.createUIElement("$comment");return t.setCustomProperty("$rawContent",i,a),a}}),e.model.document.registerPostFixer(t=>{const n=e.model.document.getRoot(),r=e.model.document.differ.getChangedMarkers().filter(e=>e.name.startsWith("$comment")).filter(e=>{const t=e.data.newRange;return t&&"$graveyard"===t.root.rootName});if(0===r.length)return!1;for(const e of r)t.removeMarker(e.name),t.removeAttribute(e.name,n);return!0}),e.data.on("set",()=>{for(const t of e.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(t.name)},{priority:"high"}),e.model.on("deleteContent",(t,[n])=>{for(const t of n.getRanges()){const n=e.model.schema.getLimitElement(t),r=e.model.createPositionAt(n,0),i=e.model.createPositionAt(n,"end");let a;a=r.isTouching(t.start)&&i.isTouching(t.end)?this.getHtmlCommentsInRange(e.model.createRange(r,i)):this.getHtmlCommentsInRange(t,{skipBoundaries:!0});for(const e of a)this.removeHtmlComment(e)}},{priority:"high"})}createHtmlComment(e,t){const n=cj(),r=this.editor.model,i=r.document.getRoot(),a=`$comment:${n}`;return r.change(n=>{const r=n.createRange(e);return n.addMarker(a,{usingOperation:!0,affectsData:!0,range:r}),n.setAttribute(a,t,i),a})}removeHtmlComment(e){const t=this.editor,n=t.model.document.getRoot(),r=t.model.markers.get(e);return!!r&&(t.model.change(t=>{t.removeMarker(r),t.removeAttribute(e,n)}),!0)}getHtmlCommentData(e){const t=this.editor,n=t.model.markers.get(e),r=t.model.document.getRoot();return n?{content:r.getAttribute(e),position:n.getStart()}:null}getHtmlCommentsInRange(e,{skipBoundaries:t=!1}={}){const n=!t;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter(t=>function(e,t){const r=e.getRange().start;return(r.isAfter(t.start)||n&&r.isEqual(t.start))&&(r.isBefore(t.end)||n&&r.isEqual(t.end))}(t,e)).map(e=>e.name)}},class extends HF{static get pluginName(){return"SourceEditing"}static get requires(){return[pK]}constructor(e){super(e),this.set("isSourceEditingMode",!1),this._elementReplacer=new JW,this._replacedRoots=new Map,this._dataFromRoots=new Map}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("sourceEditing",n=>{const r=new GX(n);return r.set({label:t("Source"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 0 5 4.5v15.003h-16V0h11zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692L3 1.5z"/><path d="M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14l3.496-2.5zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22l-3.496 2.5zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0z"/></svg>',tooltip:!0,withText:!0,class:"ck-source-editing-button"}),r.bind("isOn").to(this,"isSourceEditingMode"),r.bind("isEnabled").to(this,"isEnabled",e,"isReadOnly",e.plugins.get(pK),"hasAny",(e,t,n)=>!!e&&(!t&&!n)),this.listenTo(r,"execute",()=>{this.isSourceEditingMode=!this.isSourceEditingMode}),r}),this._isAllowedToHandleSourceEditingMode()&&(this.on("change:isSourceEditingMode",(e,t,n)=>{n?(this._showSourceEditing(),this._disableCommands()):(this._hideSourceEditing(),this._enableCommands())}),this.on("change:isEnabled",(e,t,n)=>this._handleReadOnlyMode(!n)),this.listenTo(e,"change:isReadOnly",(e,t,n)=>this._handleReadOnlyMode(n))),e.data.on("get",()=>{this.isSourceEditingMode&&this._updateEditorData()},{priority:"high"})}afterInit(){const e=this.editor;["RealTimeCollaborativeEditing","CommentsEditing","TrackChangesEditing","RevisionHistory"].some(t=>e.plugins.has(t))&&console.warn("You initialized the editor with the source editing feature and at least one of the collaboration features. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the collaboration features."),e.plugins.has("RestrictedEditingModeEditing")&&console.warn("You initialized the editor with the source editing feature and restricted editing feature. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the restricted editing feature.")}_showSourceEditing(){const e=this.editor,t=e.editing.view,n=e.model;n.change(e=>{e.setSelection(null),e.removeSelectionAttribute(n.document.selection.getAttributeKeys())});for(const[n,r]of t.domRoots){const i=L8(e.data.get({rootName:n})),a=eG(r.ownerDocument,"textarea",{rows:"1"}),o=eG(r.ownerDocument,"div",{class:"ck-source-editing-area","data-value":i},[a]);a.value=i,a.setSelectionRange(0,0),a.addEventListener("input",()=>{o.dataset.value=a.value}),t.change(e=>{const r=t.document.getRoot(n);e.addClass("ck-hidden",r)}),this._replacedRoots.set(n,o),this._elementReplacer.replace(r,o),this._dataFromRoots.set(n,i)}this._focusSourceEditing()}_hideSourceEditing(){const e=this.editor.editing.view;this._updateEditorData(),e.change(t=>{for(const[n]of this._replacedRoots)t.removeClass("ck-hidden",e.document.getRoot(n))}),this._elementReplacer.restore(),this._replacedRoots.clear(),this._dataFromRoots.clear(),e.focus()}_updateEditorData(){const e=this.editor,t={};for(const[e,n]of this._replacedRoots){const r=this._dataFromRoots.get(e),i=n.dataset.value;r!==i&&(t[e]=i)}Object.keys(t).length&&e.data.set(t,{batchType:{isUndoable:!0}})}_focusSourceEditing(){const[e]=this._replacedRoots.values();e.querySelector("textarea").focus()}_disableCommands(){const e=this.editor;for(const t of e.commands.commands())t.forceDisabled("SourceEditingMode")}_enableCommands(){const e=this.editor;for(const t of e.commands.commands())t.clearForceDisabled("SourceEditingMode")}_handleReadOnlyMode(e){if(this.isSourceEditingMode)for(const[,t]of this._replacedRoots)t.querySelector("textarea").readOnly=e}_isAllowedToHandleSourceEditingMode(){const e=this.editor.ui.view.editable;return e&&!e._hasExternalElement}},class extends HF{static get pluginName(){return"PasteFromOffice"}static get requires(){return[_K]}init(){const e=this.editor,t=e.editing.view.document,n=[];n.push(new B9(t)),n.push(new D9(t)),e.plugins.get("ClipboardPipeline").on("inputTransformation",(r,i)=>{if(i._isTransformedWithPasteFromOffice)return;if(e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const a=i.dataTransfer.getData("text/html"),o=n.find(e=>e.isActive(a));o&&(i._parsedData=F9(a,t.stylesProcessor),o.execute(i),i._isTransformedWithPasteFromOffice=!0)},{priority:"high"})}},I8,function(e){d()(n,e);var t=U9(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,null,[{key:"requires",get:function(){return[z9]}}]),n}(HF)],toolbar:["fontSize","fontFamily","fontColor","fontBackgroundColor","|","bold","italic","underline","strikethrough","link","|","alignment","|","outdent","indent","|","bulletedList","numberedList","|","insertTable","htmlEmbed","uploadImage","|","sourceEditing","border"],image:{styles:{options:["alignLeft","alignRight","alignBlockLeft","alignBlockRight","inline","block"]},toolbar:["imageStyle:inline",{name:"imageStyle:1",items:["imageStyle:alignLeft","imageStyle:alignRight"],defaultItem:"imageStyle:alignLeft"},{name:"imageStyle:2",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"],defaultItem:"imageStyle:block"},"|","toggleImageCaption","linkImage"]},fontFamily:{supportAllValues:!0,options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"]},fontSize:{options:[10,12,"default",18,22,26,30,36,40,48,56,64],supportAllValues:!0},fontColor:W9,fontBackgroundColor:W9,placeholder:Object(uc.b)("placeholder.videoDescription"),htmlEmbed:G9,htmlSupport:q9,borderConfig:{types:["primary","secondary","transparent"]},table:{contentToolbar:["toggleTableCaption","tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties"],tableProperties:{borderColors:V9,backgroundColors:V9},tableCellProperties:{borderColors:V9,backgroundColors:V9}}},K9={plugins:[PQ,oZ,mZ,AZ,CZ,OZ,PZ,LZ,jZ,zZ,XZ,e0,H0,d2,D5,B5,W3,I8],htmlSupport:q9,isReadOnly:!0},X9=r(1039);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
class Q9 extends dK{constructor(e,t){super(e),this.view=t,this._toolbarConfig=n$(e.config.get("toolbar")),this._elementReplacer=new JW}get element(){return this.view.element}init(e){const t=this.editor,n=this.view,r=t.editing.view,i=n.editable,a=r.document.getRoot();i.name=a.rootName,n.render();const o=i.element;this.setEditableElement(i.name,o),this.focusTracker.add(o),n.editable.bind("isFocused").to(this.focusTracker),r.attachDomRoot(o),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.editor,t=this.view,n=e.editing.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({top:e})=>e),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),function({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:r,beforeFocus:i,afterBlur:a}){n.add(r.element),t.set("Alt+F10",(e,t)=>{n.isFocused&&!r.focusTracker.isFocused&&(i&&i(),r.focus(),t())}),r.keystrokes.set("Esc",(t,n)=>{r.focusTracker.isFocused&&(e.focus(),a&&a(),n())})}({origin:n,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbar})}_initPlaceholder(){const e=this.editor,t=e.editing.view,n=t.document.getRoot(),r=e.sourceElement,i=e.config.get("placeholder")||r&&"textarea"===r.tagName.toLowerCase()&&r.getAttribute("placeholder");i&&Q$({view:t,element:n,text:i,isDirectHost:!1,keepOnFocus:!0})}}r(1636);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class $9 extends m${constructor(e,t,n={}){super(e),this.stickyPanel=new R$(e),this.toolbar=new r$(e,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull}),this.editable=new v$(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */class J9 extends lK{constructor(e,t={}){if(!jH(e)&&void 0!==t.initialData)throw new hj.a("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return jH(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e)),jH(e)&&(this.sourceElement=e),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=new $9(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n});this.ui=new Q9(this,r),
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */
function(e){if(!Ej(e.updateSourceElement))throw new hj.a("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){let n;const r=t.form,i=()=>e.updateSourceElement();Ej(r.submit)&&(n=r.submit,r.submit=()=>{i(),n.apply(r)}),r.addEventListener("submit",i),e.on("destroy",()=>{r.removeEventListener("submit",i),n&&(r.submit=n)})}}
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise(n=>{const r=new this(e,t);n(r.initPlugins().then(()=>r.ui.init(jH(e)?e:null)).then(()=>r.data.init(r.config.get("initialData"))).then(()=>r.fire("ready")).then(()=>r))})}}function Z9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function e7(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z9(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z9(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}UF(J9,hK),UF(J9,fK);var t7=function(e){var t,n=e.value,r=e.onChange,i=e.onReady,a=e.readonly,o=e.videoId;return v.a.createElement(X9.CKEditor,{editor:J9,data:n,config:a?K9:e7(e7({},Y9),{},{simpleUpload:{uploadUrl:"".concat(x.g.CONTENT_SERVICES_ENDPOINT,"cms/").concat(o,"/files"),withCredentials:!0,headers:{Authorization:"Bearer ".concat(null===(t=x.c.getToken())||void 0===t?void 0:t.accessToken)}}}),disabled:a,onReady:function(e){i&&i(e),e.isReadOnly?(document.body.className+=" ck-readonly",e.ui.view.element.className+=" readonly",e.ui.view.stickyPanel.element.style.display="none",e.ui.view.toolbar.element.style.display="none"):document.body.className=document.body.className.replaceAll("ck-readonly","")},onChange:function(e,t){var n=t.getData();r&&r(n)}})},n7=void 0,r7=(Object(q.b)((function(e){return{user:e.auth.user}}))((function(){return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:styles.loading},v.a.createElement(Spinner,{animation:"border",variant:"primary"})),v.a.createElement("i",{id:"play-preview-video-btn",className:"fv fuvi-play-btn fv-3x",onClick:function(e){e.stopPropagation(),n7.activateHoveredCognitiveVideo()}}))})),function(e){var t=e.src,n=e.data,r=Object(g.useState)(n||null),i=pi()(r,2),a=i[0],o=i[1],s=Object(g.useState)(!1),l=pi()(s,2),c=(l[0],l[1]),u=Object(g.useState)(!1),d=pi()(u,2),h=d[0],f=d[1];return Object(g.useEffect)((function(){t&&fetch(t).then((function(e){return e.text()})).then(o).catch(f).then((function(){return c(!0)}))}),[t]),h?v.a.createElement("img",{alt:"svg image",className:"w-100 h-100",style:{objectFit:"contain"},src:t}):v.a.createElement("div",{className:"w-100 h-100",dangerouslySetInnerHTML:{__html:n||a}})}),i7=function(e){var t=e.data,n=void 0===t?"":t,r=function(e){for(var t=!1,n=e.target;n!==e.currentTarget;){if("a"===n.nodeName.toLowerCase()){t=!0;break}n=n.parentNode}if(t){Object(Y.invoke)(e,"target.blur"),Object(Y.invoke)(e,"preventDefault"),Object(Y.invoke)(e,"stopPropagation");var r=n.href,i=new URL(r);if(r.match(/localhost:8080|internal.fuvi.vn|ifuvi.com|fuvi.com/)){var a=x.c.getDataFromUrl(i),o=a.videoId,s=a.chapterId;o&&s&&o===activeVideoId?onActivateChapterById&&onActivateChapterById(s):window.location.hostname.replace("www.","")===i.hostname.replace("www.","")?$.a.push(i.pathname+i.search,{refresh:!0}):window.open(i,"_blank")}else window.open(i,"_blank")}};return v.a.createElement("div",{className:"w-100 h-100"},v.a.createElement(t7,{readonly:!0,value:n,onReady:function(e){var t=document.querySelector(".ck-content");t&&t.addEventListener("click",r)}}))},a7=r(91),o7=r.n(a7),s7=x.g.FIRST_AREA_PLACE_HOLDER_TYPE;function l7(e){var t,n=e.type,r=v.a.createElement("img",{height:160,width:"192",src:I.a.imageIcon,alt:"icon"});switch(n){case s7.EMPTY_VIDEO:r=v.a.createElement("img",{height:160,width:"192",src:I.a.iconPlayDocument,alt:"icon"});break;case s7.LOADING_VIDEO:t=v.a.createElement("div",{className:o7.a.topTitle},Object(_t.t)("loadingVideos"));break;case s7.EMPTY_SEARCH_LIST:t=v.a.createElement("div",{className:o7.a.topTitle},Object(_t.t)("noVideosFound"));break;case s7.LOADING_VIDEOS:t=v.a.createElement("div",{className:o7.a.topTitle},Object(_t.t)("loadingVideos"))}return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"w-100 h-100 d-flex justify-content-center align-items-center u-overflow-hidden"},v.a.createElement("div",{className:P()(o7.a.circleWrapper,"u-shadow rounded-circle")},t,r,void 0)))}l7.propTypes={type:ne.a.oneOf(Object.values(s7))},l7.defaultProps={type:s7.EMPTY_GALLERY};var c7=function(e){var t=e.src,n=void 0===t?"":t,r=e.onActivateChapterById,i=Object(g.useState)(""),a=pi()(i,2),o=a[0],s=a[1],l=Object(g.useState)(!1),c=pi()(l,2),u=(c[0],c[1]),d=Object(g.useState)(!1),h=pi()(d,2),f=h[0],p=h[1];if(!n)return null;var m=n.startsWith(x.g.BASE64_IMAGE_PREFIX),b=!m&&n.match(/.svg/),y=!m&&n.match(/.htm/);return Object(g.useEffect)((function(){(b||y)&&(u(!0),fetch(n).then((function(e){return e.text()})).then(s).catch(p).then((function(){return u(!1)})))}),[n]),!f&&b?v.a.createElement(r7,{data:o}):!f&&y?v.a.createElement(i7,{data:o,onActivateChapterById:r}):v.a.createElement("img",{key:n,alt:"cover image",className:"w-100 h-100",style:{objectFit:"contain"},src:n})},u7=(Object(q.b)((function(e){return{image:e.cogvid.coverImage.image}}))((function(e){var t=e.isLoadingVideo,n=e.image;return n?v.a.createElement(c7,{src:n}):v.a.createElement(l7,{type:t?x.g.FIRST_AREA_PLACE_HOLDER_TYPE.LOADING_VIDEO:x.g.FIRST_AREA_PLACE_HOLDER_TYPE.EMPTY_VIDEO})})),r(77)),d7=r.n(u7),h7=r(1040),f7=(r(936),r(937),r(1041)),p7=r.n(f7);var m7=function(e){var t=e.slide,n=e.speed,r=e.children,i=(e.disabledPrevArrow,e.disabledNextArrow,e.afterChange),a=e.beforeChange,o=e.onChange,s=Yt()(e,["slide","speed","children","disabledPrevArrow","disabledNextArrow","afterChange","beforeChange","onChange"]),l=Object(g.useRef)(null),c=(Object(g.useRef)(null),Object(g.useRef)(!0)),u=Object(g.useRef)(!1);Object(g.useEffect)((function(){c.current=!0,setTimeout((function(){c.current=!1}),100)}),[]),Object(g.useEffect)((function(){var e=Object(Y.get)(l,"current.innerSlider.state.currentSlide");t>=0&&t!==e&&!c.current&&(u.current=!0,window.isSliding?window.slideQueue.push(t):Object(Y.invoke)(l,"current.slickGoTo",t,Math.abs(t-e)>3)),0===t&&0===e&&(c.current=!1,Object(Y.invoke)(l,"current.slickGoTo",0,!0))}),[t]);var d=Object(g.useCallback)(Object(Y.debounce)((function(){window.slideQueue.length>0||(window.isSliding=!1,u.current=!1)}),2*n),[]);return v.a.createElement(p7.a,Gt()({lazyLoad:"ondemand",initialSlide:0,ref:l,draggable:!1,infinite:!1,dots:!1,swipeToSlide:!1,speed:n,arrows:!1,beforeChange:function(e,t){window.isSliding=!0,a&&a(e,t),u.current||o&&o(t),d()},afterChange:function(e){if(window.isSliding=!1,i&&i(e),u.current)if(window.slideQueue.length>0){for(var t=Object(Y.get)(l,"current.innerSlider.state.currentSlide"),n=window.slideQueue.shift();n==t;)n=window.slideQueue.shift();setTimeout((function(){n>=0&&Object(Y.invoke)(l,"current.slickGoTo",n)}),10)}else u.current=!1}},s),r)},g7=function(e){var t=e.isFullscreenMode,n=e.disabledPrevArrow,r=e.disabledNextArrow,i=e.slideIndex,a=e.displaySlide,o=Object(g.useCallback)((function(){n||a(i-1)}),[n,i]),s=Object(g.useCallback)((function(){r||a(i+1)}),[r,i]);return v.a.createElement(v.a.Fragment,null,v.a.createElement("button",{className:P()("slick-arrow slick-prev",n&&"slick-disabled",t&&"fullscreen"),onClick:o}),v.a.createElement("button",{className:P()("slick-arrow slick-next",r&&"slick-disabled",t&&"fullscreen"),onClick:s}))},v7=x.g.SLIDING_TIME,b7=x.g.VIDEO_CATEGORY,y7=x.g.CHAPTER_VIEW_COUNT_TIME,A7=(x.g.TRACKING_USER,x.g.SLIDE_TYPE),_7=x.g.ID_CHAPTER_CI_WRAPPER,w7=function(e){var t=e.url,n=e.onClick;return v.a.createElement("div",{className:d7.a.slide,onClick:n},t?v.a.createElement("img",{alt:"slide image",src:t}):v.a.createElement(l7,null))},E7={lastTs:Date.now(),processing:!1},S7=-1!=navigator.userAgent.toUpperCase().indexOf("MAC"),C7=S7?200:800,T7=S7?50:120,k7=Object(X.a)(K.b,Object(q.b)((function(e){var t,n=e.auth,r=e.cg,i=e.cogvid;return{showSlideType:r.showSlideType,showChapterCoverImage:r.showChapterCoverImage,showChapterCoverImageSlide:r.showChapterCoverImageSlide,userId:n.userInfo.userId,chapterId:null===(t=i.chapterHighlighting)||void 0===t?void 0:t.uid}}),(function(e){return{displayChapterCoverImage:function(t){return e(Q.d.displayChapterCoverImage(t))},displaySlide:function(t){return e(Q.d.displaySlide(t))},updateChapterImageSlider:function(t){return e(Q.d.updateChapterImageSlider(t))},updateChapterItemInCache:function(t){return e(Q.e.updateChapterItemInCache(t))},increaseChapterViewCount:function(t,n,r){return e(Q.e.increaseChapterViewCount(t,n,r))},getCogvidThumbnail:function(t){return e(Q.e.getCogvidThumbnail(t))},displaySlideType:function(t){return e(Q.d.displaySlideType(t))},updateSlidesExistance:function(t){return e(Q.d.updateSlidesExistance(t))},setActiveChapter:function(t){return e(Q.e.setActiveChapter(t))},updateFreeFUIFlag:function(t){return e(Q.d.updateFreeFUIFlag(t))}}})))((function(e){var t=e.className,n=e.invisible,r=e.userId,i=e.videoId,a=e.chapterId,o=e.chapterListRef,s=e.chapters,l=void 0===s?[]:s,c=e.isFullscreenMode,u=e.isVideoPaused,d=(e.isVideoPlayable,e.videoCoverImage),h=e.rootContext,f=e.showSlideType,p=e.showChapterCoverImage,m=e.showChapterCoverImageSlide,b=e.displayChapterCoverImage,y=e.displaySlide,A=e.updateChapterImageSlider,_=(e.updateChapterItemInCache,e.increaseChapterViewCount),w=e.getCogvidThumbnail,E=e.updateSlidesExistance,S=e.displaySlideType,C=e.refVideoList,T=e.setActiveChapter,k=e.updateFreeFUIFlag,O=Object(g.useMemo)((function(){return new h7.Lethargy(7,30,.05)}),[]),I=Object(g.useRef)(m),M=Object(K.a)(u),D=Object(K.a)(m),N=!c&&-1!==m,L=-1!==m;Object(g.useEffect)((function(){window.isSliding=!1,window.slideQueue=[],window.isArrowKeyDown=!1,!L&&y(-1)}),[i]),Object(g.useEffect)((function(){var e=document.getElementById(x.g.VIDEO_AREA_ID);N&&e&&e.addEventListener("wheel",B);var t=[];return l.map((function(e){var n=(null==e?void 0:e.image)?"".concat(h).concat(null==e?void 0:e.image):"";""!==n&&t.push(n)})),t.length>0&&w(t),function(){var e=document.getElementById(x.g.VIDEO_AREA_ID);e&&e.removeEventListener("wheel",B)}}),[l,N]),Object(g.useEffect)((function(){I.current=m}),[m]),Object(g.useEffect)((function(){!u&&M&&F(a)}),[a,u]),Object(g.useEffect)((function(){var e=Object(Y.findIndex)(l,{uid:a});a&&-1!=e&&(setTimeout((function(){F(a)}),100),y(e))}),[a,l]),Object(g.useEffect)((function(){var e=l[m];L&&m!==D&&((null==e?void 0:e.uid)!==a&&j(null==e?void 0:e.uid,!0),Object(Y.invoke)(o,"current.handleScrollToChapterByIndex",m),c&&T(e));var t=(null==e?void 0:e.type)===x.g.CHAPTER_TYPES.EPISODIC.key;if(L&&!t&&b(!0),A(L||-1==m?{videoId:i,chapterId:"",isEpisodic:t}:{videoId:i,chapterId:null==e?void 0:e.uid,index:0,isEpisodic:t}),e&&m!==D&&H(null==e?void 0:e.uid),e&&m!==D){var n=!!e.foundation,r=!!e.understanding,s=!!e.thumbnail;E({fslideExisted:n,uslideExisted:r,thumbnailExisted:s});var u=!!e.freeFUI;if(k({freeFUI:u}),f)(f===A7.FOUNDATION&&!n||f===A7.THUMBNAIL&&!s||f===A7.UNDERSTANDING&&!r)&&(S(null),b(!0))}}),[m,L,l]),Object(g.useEffect)((function(){document.querySelectorAll(".chapter-item").forEach((function(e){return e.classList.remove("highlight-chapter")}));var e=l[m];if(p&&-1!=m&&(null==e?void 0:e.uid)){var t=function(){var t=document.getElementById("chapter-".concat(a));t&&t.classList.add("hide-active");var n=document.getElementById("chapter-".concat(null==e?void 0:e.uid));n&&n.classList.add("highlight-chapter"),Object(Y.invoke)(o,"current.handleScrollToChapterByIndex",m)};Object(Y.get)(o,"current.state.isFullList")?t():Object(Y.invoke)(o,"current.setState",{isFullList:!0},t)}else{if(a&&(null==e?void 0:e.uid)===a){var n=document.getElementById("chapter-".concat(a));n&&n.classList.remove("hide-active")}-1==m&&Object(Y.invoke)(o,"current.handleScrollToChapterByIndex",0)}}),[p,a,m,L]);var R=Object(g.useCallback)(Object(Y.throttle)((function(e,t){var n=I.current-t,i=l.length-1;n>=10&&!r||n>i||n<0||window.isSliding||(I.current=n,y(n))}),v7,{leading:!0,trailing:!1}),[l,r]),B=Object(g.useCallback)((function(e){var t=Date.now();e.preventDefault(),e.stopPropagation();var n=e.wheelDelta,r=e.wheelDeltaX,i=e.wheelDeltaY,a=Math.abs(r),o=Math.abs(i),s=Math.abs(a-o),l=function(e,t){return 0==e&&t%120==0}(r,i);if((l||!(a<=o||a<12))&&((l||!(s<T7))&&!1!==O.check(e))){if(E7.processing)return void console.log("Skip event, previous execution existed");var c=t-E7.lastTs;if(!l&&c<C7)return;E7.processing=!0;var u=a<o?Math.sign(i):Math.sign(r);try{if(x.r.isPlayer()&&!x.r.paused())return void setTimeout((function(){R(n,u)}));R(n,u)}finally{E7.lastTs=t,E7.processing=!1}}}),[l]),j=Object(g.useCallback)((function(e,t){if(e!==a){var n=x.c.getCurrentVideoCategory(),r="/".concat(n,"?v=").concat(i,"&c=").concat(e);if(t||x.c.checkLoggedIn(r)){var o=document.getElementById("chapter-".concat(e));o&&o.click()}}}),[i,a]),F=(Object(g.useCallback)((function(e){var t=Object(Y.findIndex)(l,{uid:e});-1!==t&&y(t)}),[l]),Object(g.useCallback)((function(e){var t=document.getElementById("chapter-".concat(e));t&&t.classList.remove("hide-active")}),[])),U=Object(g.useCallback)((function(e){if(e.stopPropagation(),!window.isScrollingVideo&&-1!=m||!C){if(-1!=m){var t=l[m],n=(null==t?void 0:t.type)===x.g.CHAPTER_TYPES.EPISODIC.key;-1!=m?!n&&x.c.isExploring()||(L?L&&n&&Object(x.p)({willPlay:!0}):window.audioPlayer.player_&&(null==t?void 0:t.type)===x.g.CHAPTER_TYPES.EPISODIC.key&&(window.audioPlayer.paused()?window.audioPlayer.play():window.audioPlayer.pause())):y(0)}}else Object(Y.invoke)(C,"current.handleItemThumbnailClick")}),[m,l,r]),H=Object(g.useCallback)(Object(Y.debounce)((function(e){x.c.getCurrentVideoCategory()===b7.EXPLORING&&_({chapterId:e},(function(e){}))}),y7),[]),z=l[m],V=(null==z?void 0:z.type)===x.g.CHAPTER_TYPES.EPISODIC.key,W=(!p||n)&&-1!==m;return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{id:_7,className:P()(d7.a.chapterCoverImage,t,-1==m||-1!==m&&V?"u-cursor-pointer":"u-cursor-default"),onClick:U},i&&-1==m&&v.a.createElement("i",{className:P()("fv fuvi-play-btn fv-4x blink",d7.a.videoPlayBtn)}),v.a.createElement(m7,{key:i,className:P()(d7.a.slider,W&&d7.a.hide),slide:m+1,speed:v7,disabledPrevArrow:c||-1==m,disabledNextArrow:c||-1==m,onChange:function(e){x.r.isPlayer()&&!x.r.paused()&&x.r.pause(),y(e-1)}},v.a.createElement(w7,{url:d}),l.map((function(e){var t=f?f===A7.FOUNDATION?e.foundation:f===A7.UNDERSTANDING?e.understanding:e.thumbnail:null==e?void 0:e.image,n=t?"".concat(h).concat(t):"";return v.a.createElement(w7,{key:e.uid,url:n})})))),v.a.createElement(g7,{isFullscreenMode:c,slideIndex:m,disabledPrevArrow:m<=0,disabledNextArrow:-1==m||m+1>=l.length,displaySlide:y}))}));function x7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O7(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x7(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x7(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I7=function(e,t){return v.a.createElement("div",e,-1==t.valueNow?"":t.valueNow+1)},M7=function(e){e.index;var t=e.active,n=Yt()(e,["index","active"]);return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",n,v.a.createElement("div",{className:d7.a.mark})),t&&v.a.createElement("div",{className:P()(d7.a.sliderThumb,"position-absolute"),style:{top:n.style.top,left:n.style.left}}))},P7=function(e){e.index;var t=e.vertical,n=(e.content,e.arrowTop,e.arrowLeft),r=e.imageUrl,i=e.onMouseEnter,a=e.width,o=e.height,s=e.topTooltip,l=Yt()(e,["index","vertical","content","arrowTop","arrowLeft","imageUrl","onMouseEnter","width","height","topTooltip"]);return v.a.createElement("div",{className:P()(d7.a.sliderTooltip,t&&d7.a.vertical),onMouseEnter:i,style:O7(O7({},l),{},{width:a,top:s})},v.a.createElement("img",{alt:"slide image",style:{width:a,height:o},src:r}),!t&&v.a.createElement("div",{className:P()(d7.a.arrow),style:{left:n,borderTopColor:l.background}}))},D7=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{tooltip:{},marks:[],showVideoCI:!1}),G()(V()(e),"refWrapper",v.a.createRef()),G()(V()(e),"heightChapterSliderInPx",x.c.convertRemToPx(Um.heightChapterSlider)),G()(V()(e),"componentDidUpdate",(function(t){t.videoId!==e.props.videoId&&(e.marks=[],e.setState({marks:[]}))})),G()(V()(e),"handleChange",(function(t){var n=function(){e.props.displaySlide(t)};x.r.paused()?n():(x.r.pause(),setTimeout(n))})),G()(V()(e),"handleSliderClick",(function(t){var n=e.props,r=n.slideIndex,i=n.chapterListRef;i&&t==r&&Object(Y.invoke)(i,"current.handleScrollToChapterByIndex",r)})),G()(V()(e),"handleMarkMouseEnter",(function(t){t.vertical;var n=t.index,r=t.content,i=t.top,a=t.left,o=t.background,s=t.foreground,l=t.topImageUrl,c=t.width,u=t.height,d=e.refWrapper.current.offsetWidth,h=c,f=a-h/2+12,p=d-h-(e.props.isFullscreenMode?96:0),m=f<0?0:f>p?p:f,g=e.props.chapters[n],v="".concat(e.props.rootContext).concat((null==g?void 0:g.thumbnail)||(null==g?void 0:g.image)),b=u,y=Math.min(Math.max(0,i-b/2)+b,document.documentElement.clientHeight-b/2);e.timerMark=setTimeout((function(){e.setState({tooltip:{index:n,content:r,width:h,height:u,left:m,arrowLeft:a-m,background:o,color:s,imageUrl:v,topImageUrl:l,topTooltip:y,onMouseEnter:e.handleMouseLeave}}),x.c.blurFirstArea(!0)}),25)})),G()(V()(e),"handleMarkMouseLeave",(function(t){clearTimeout(e.timer),clearTimeout(e.timerMark),x.c.blurFirstArea(!1)})),G()(V()(e),"handleStepSliding",Object(Y.throttle)((function(t){var n=e.props,r=n.slideIndex,i=n.min,a=n.max,o=n.displaySlide,s=r+t;window.isArrowKeyDown&&o(s<i?i:s>a?a:s)}),x.g.SLIDING_TIME+100)),G()(V()(e),"handleMouseEnter",(function(t){var n=e.props,r=n.rootContext,i=n.chapters,a=void 0===i?[]:i,o=n.displayCoverImage,s=n.onMouseEnter,l=a[0];l&&(e.timer=setTimeout((function(){var e="".concat(r).concat(l.image);o({image:e}),s&&s()}),100))})),G()(V()(e),"handleMouseLeave",(function(t){e.handleMarkMouseLeave(),clearTimeout(e.timer);var n=e.props,r=n.displayCoverImage,i=n.onMouseLeave;e.setState({tooltip:{}}),r({image:""}),i&&i(),x.c.blurFirstArea(!1)})),G()(V()(e),"handleBackClick",(function(){x.c.clearDataWhenExitingVideo({clearVideoTime:!0,clearWithinVideoSearch:!0,clearCogvidDetails:!0,clearChapterAttachmentData:!0}),e.props.displayToc(!1),e.props.displaySlide(-1),e.props.displaySlideType(null),e.props.displayChapterCoverImage(!1),Object(Y.invoke)(window,"audioPlayer.currentTime",0)})),G()(V()(e),"handleBackMouseEnter",(function(){e.setState({showVideoCI:!0})})),G()(V()(e),"handleBackMouseLeave",(function(){e.setState({showVideoCI:!1})})),G()(V()(e),"handleTocClick",(function(){var t=e.props,n=t.showToc;(0,t.displayToc)(!n)})),G()(V()(e),"render",(function(){var t,n,r,i=e.props,a=i.isFullscreenMode,o=i.isVideoActive,s=i.vertical,l=i.min,c=void 0===l?0:l,u=i.max,d=void 0===u?0:u,h=(i.width,i.sliderWidth),f=i.slideIndex,p=i.chapters,m=void 0===p?[]:p,g=(i.videoId,i.videoTitle),b=i.className,y=i.rootContext,A=i.displayCoverImage,_=i.heightFirstArea,w=void 0===_?0:_,E=i.videoCoverImage,S=i.tocUrl,C=i.showToc,T=e.state,k=T.tooltip,O=T.showVideoCI,M=Array.from({length:d-c+1},(function(e,t){return t+c})),D=(null===(t=e.refWrapper)||void 0===t?void 0:null===(n=t.current)||void 0===n?void 0:n.offsetHeight)||40,N=1==M.length?"200%":(100/(d-c)+.15).toFixed(2)+"%",L=s||a?.3*document.body.clientHeight:w/2-D,R=16*L/9,B=S||"".concat(y).concat(null===(r=m[0])||void 0===r?void 0:r.image);return v.a.createElement(v.a.Fragment,null,(O||C)&&v.a.createElement("div",{className:P()(d7.a.firstSlideWrapper,a&&d7.a.isFullscreenMode)},v.a.createElement("img",{alt:"first slide image",style:s?void 0:{width:h,height:h/16*9},src:O?E:B})),v.a.createElement("div",{ref:e.refWrapper,className:P()(d7.a.chapterSliderWrapper,a&&d7.a.isFullscreenMode,s&&d7.a.vertical,b),onMouseLeave:e.handleMouseLeave},a&&v.a.createElement(Qt,{classNameWrapper:"u-w-6 h-100 m-0 u-flex-center u-z-index-1",onClick:function(){return e.handleChange(f-1)},disabled:!o||f<=0},v.a.createElement("img",{width:36,src:I.a.prevFill})),!a&&v.a.createElement("div",{id:x.g.ID_VIDEO_BACK_BUTTON,onClick:e.handleBackClick,className:P()(d7.a.backBtn,-1!==f&&"u-cursor-pointer"),onMouseEnter:-1!==f?e.handleBackMouseEnter:null,onMouseLeave:e.handleBackMouseLeave},v.a.createElement("img",{height:34,src:-1!==f?I.a.backRed:I.a.back})),v.a.createElement("div",{className:P()("position-relative flex-grow-1",!s&&!a&&"mx-3"),onMouseLeave:e.handleMouseLeave},v.a.createElement("div",{className:P()(d7.a.label,s?"u-fs-1x1o4":"u-fs-15o16 ","u-font-din-condensed u-flex-center text-white")},"Hover to Preview Topics Inside the Course"),v.a.createElement(S_.a,{snapDragDisabled:!0,orientation:"horizontal",marks:M,min:c,max:d,value:f,className:d7.a.chapterSlider,markClassName:P()(d7.a.sliderMark),thumbClassName:P()(x.g.CHAPTER_SLIDER_THUMB,d7.a.sliderThumb,"invisible"),trackClassName:d7.a.sliderTrack,renderThumb:I7,renderTrack:function(e,t){var n=Object(Y.get)(m,[0===t.index?0:m.length-1,"attributes","background"],"#ddd");return v.a.createElement("div",Gt()({},e,{index:t.index,style:O7(O7({},e.style),{},{background:n})}))},renderMark:function(t){var n,r,i,a=t.key,o=Yt()(t,["key"]),l=m[a],c=O7(O7({},o.style),{},{background:-1===a?null===(n=m[0])||void 0===n?void 0:null===(r=n.attributes)||void 0===r?void 0:r.background:null==l?void 0:null===(i=l.attributes)||void 0===i?void 0:i.background,width:s?"100%":N,height:s?N:"100%",minWidth:1,minHeight:1}),u=function(t){x.r.pause(),e.handleChange(a),l&&A({image:"".concat(y).concat(null==l?void 0:l.image)})},h=function(t){e.handleMarkMouseEnter(O7(O7(O7({},o.style),(null==l?void 0:l.attributes)||{}),{},{vertical:s,index:a,content:-1===a?g:null==l?void 0:l.content,imageUrl:-1===a?E:"".concat(y).concat(null==l?void 0:l.image),topImageUrl:B,width:R,height:L}))};return 0==e.state.marks.length&&(e.marks||(e.marks=[]),e.marks.push({key:a,style:c,onClick:u,onMouseEnter:h}),a==d&&(e.setState({marks:e.marks}),e.marks=[])),v.a.createElement(M7,Gt()({},o,{key:a,index:a,active:f===a,style:c,onMouseEnter:h,onMouseLeave:e.handleMarkMouseLeave,onClick:u}))}}),k.index>=c&&v.a.createElement(P7,Gt()({},k,{vertical:s,width:R,height:L}))),a&&v.a.createElement(Qt,{classNameWrapper:"u-w-6 h-100 m-0 u-flex-center u-z-index-1",onClick:function(){return e.handleChange(f+1)},disabled:!o||f>=d-1},v.a.createElement("img",{width:36,src:I.a.nextFill})),!a&&v.a.createElement("div",{className:P()("d-flex pl-1"),onClick:e.handleTocClick},v.a.createElement("div",{className:P()(d7.a.backBtn,"m-0 u-cursor-pointer",C&&"blink")},v.a.createElement("img",{height:32,src:I.a.tocVertical}))),k.index>=c&&v.a.createElement("div",{className:P()(d7.a.topImageWrapper,a&&d7.a.isFullscreenMode),style:a?void 0:{top:-w+e.heightChapterSliderInPx+2}},v.a.createElement("img",{alt:"top image",style:{width:R,height:L},src:B}))))})),e}return n}(v.a.Component),N7=Object(q.b)((function(e,t){var n=e.cg,r=e.cogvid;return{showToc:n.showToc,slideIndex:n.showChapterCoverImageSlide,isVideoActive:-1!==n.showChapterCoverImageSlide,chapters:r.cogvidDetails.videoId?r.cogvidDetails.chapters:t.chapters}}),(function(e){return{displaySlide:function(t){return e(Q.d.displaySlide(t))},displayCoverImage:function(t){return e(Q.e.displayCoverImage(t))},displayToc:function(t){return e(Q.d.displayToc(t))},displaySlideType:function(t){return e(Q.d.displaySlideType(t))},displayChapterCoverImage:function(t){return e(Q.d.displayChapterCoverImage(t))}}}),null,{forwardRef:!0})(D7),L7=function(e){var t=e.logRequests;return Object(g.useEffect)((function(){return"undefined"!=typeof Worker?(console.log("Web worker is supported!"),window.imageWorker||(console.log("Web worker not found, create a new one!"),window.imageWorker=new Worker(URL.createObjectURL(new Blob(["\n  self.addEventListener('message', event => {\n    const urlArray = Array.isArray(event.data) ? event.data : [event.data];\n    const chunkSize = 10;\n    for (let i = 0; i < urlArray.length; i += chunkSize) {\n      const chunk = urlArray.slice(i, i + chunkSize);\n      const options = {\n        method: 'GET',\n        mode: 'no-cors',\n        cache: 'default'\n      };\n      Promise.all(\n        chunk.map(url => {\n          const fetchUrl = url + (url.indexOf('?')>-1 ? '&src=IW' : '?src=IW');\n          return fetch(fetchUrl, options);\n        }));\n    }    \n  });\n"],{type:"application/javascript"}))),window.imageWorker.onmessage=function(e){t&&console.log("Image worker loaded image: "+e.data)})):console.log("Web worker is not supported!"),function(){window.imageWorker&&(console.log("Release worker"),window.imageWorker.terminate(),window.imageWorker=null)}}),[t]),null},R7=function(){return Object(g.useEffect)((function(){return"undefined"!=typeof Worker?(console.log("Web worker is supported!"),window.videoListWorker||(console.log("Web worker not found, create a new one!"),window.videoListWorker=new Worker(URL.createObjectURL(new Blob(["\n  self.addEventListener('message', event => {\n    const { accessToken, endPoint, category, body} = event.data;\n    const bearer = accessToken ? ('Bearer ' + accessToken) : '';\n    fetch(endPoint, {\n        method: 'POST',\n        headers: {\n          'Content-Type': 'application/json',\n          'Authorization': bearer\n        },\n        body: JSON.stringify(body)\n    }).then((response) => response.json()) // Parse the response as JSON\n      .then((data) => postMessage({category, data})) // Notify with the data\n      .catch((error) => console.error(error)); // Handle errors\n  })\n"],{type:"application/javascript"}))))):console.log("Web worker is not supported!"),function(){window.videoListWorker&&(console.log("Release worker"),window.videoListWorker.terminate(),window.videoListWorker=null)}}),[]),null};var B7=0,j7=1,F7=(g.PureComponent,function(e){var t=e.className,n=e.pageIndex,r=void 0===n?0:n,i=(e.pageSize,e.pageCount),a=e.onChange,o=Object(g.useCallback)((function(e){e<0||e>=i||a&&a({pageIndex:e})}),[i]),s=(Object(g.useCallback)((function(e){a&&a({pageSize:e})}),[]),r>0),l=r<i-1;return v.a.createElement("div",{className:P()(d7.a.pagination,t)},v.a.createElement(Qt,{border:!0,className:d7.a.btn,onClick:function(){return o(0)},disabled:!s},v.a.createElement("div",{className:""},"<<")),v.a.createElement(Qt,{border:!0,className:d7.a.btn,onClick:function(){return o(r-1)},disabled:!s},v.a.createElement("div",{className:""},"<")),v.a.createElement("div",{className:"mx-2 u-fs-7o8 flex-shrink-0"},"Page",v.a.createElement("input",{type:"number",className:"u-w-3 mx-2 border-0 text-center u-bg-body",min:1,max:i,value:r+1,onChange:function(e){var t=e.target.value?Number(e.target.value)-1:0;o(t)}}),v.a.createElement("strong",null,"of ",i)),v.a.createElement(Qt,{border:!0,className:d7.a.btn,onClick:function(){return o(r+1)},disabled:!l},v.a.createElement("div",{className:""},">")),v.a.createElement(Qt,{border:!0,className:d7.a.btn,onClick:function(){return o(i-1)},disabled:!l},v.a.createElement("div",{className:""},">>")))}),U7=r(186),H7="object"===("undefined"==typeof window||"undefined"==typeof window?"undefined":r.n(U7)()(window)),z7=H7?document:{},V7=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange"];function W7(e,t){var n;function r(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){e.apply(void 0,i),n=null}),t)}return r.cancel=function(){clearTimeout(n)},r}function G7(e,t){var n=0;return function(){var r=(new Date).getTime();if(!(r-n<t))return n=r,e.apply(void 0,arguments)}}var q7=0,Y7=0;function K7(){var e=(new Date).getTime();return e===q7?1e3*e+ ++Y7:(q7=e,Y7=0,1e3*e)}function X7(){return Math.random().toString(36).substring(2)}function Q7(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(t){return setTimeout(t,e)}))}function $7(){return(new Date).getTime()}var J7={create:function(e){var t={messagesCallback:null,bc:new BroadcastChannel(e)};return t.bc.onmessage=function(e){t.messagesCallback&&t.messagesCallback(e.data)},t},close:function(e){e.bc.close()},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){try{return e.bc.postMessage(t,!1),Promise.resolve()}catch(e){return Promise.reject(e)}},canBeUsed:function(){return"function"==typeof BroadcastChannel},type:"broadcastChannel",averageResponseTime:function(){return 150},microSeconds:K7},Z7=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e4;s()(this,e),this.ttl=t,this.set=new Set,this.timeMap=new Map}return c()(e,[{key:"has",value:function(e){return this.set.has(e)}},{key:"add",value:function(e){this.timeMap.set(e,$7()),this.set.add(e),this._removeTooOldValues()}},{key:"clear",value:function(){this.set.clear(),this.timeMap.clear()}},{key:"_removeTooOldValues",value:function(){for(var e=$7()-this.ttl,t=this.set[Symbol.iterator]();;){var n=t.next().value;if(!n)return;if(!(this.timeMap.get(n)<e))return;this.timeMap.delete(n),this.set.delete(n)}}}]),e}();function eee(){var e;if("undefined"==typeof window)return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch(e){}return e}function tee(e,t){var n=e,r=function(e){e.key===n&&t(JSON.parse(e.newValue))};return window.addEventListener("storage",r),r}function nee(){var e=eee();if(!e)return!1;try{var t="__check";e.setItem(t,"works"),e.removeItem(t)}catch(e){return!1}return!0}var ree={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!nee())throw new Error("❌ localStorage cannot be used.");var n=X7(),r=new Z7(t.removeTimeout),i={channelName:e,uuid:n,eMIs:r};return i.listener=tee(e,(function(e){i.messagesCallback&&e.uuid!==n&&e.token&&!r.has(e.token)&&(e.data.time&&e.data.time<i.messagesCallbackTime||(r.add(e.token),i.messagesCallback(e.data)))})),i},close:function(e){var t;t=e.listener,window.removeEventListener("storage",t)},onMessage:function(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t},postMessage:function(e,t){return new Promise((function(n){var r=e.channelName,i={token:X7(),time:(new Date).getTime(),data:t,uuid:e.uuid},a=JSON.stringify(i);eee().setItem(r,a);var o=document.createEvent("Event");o.initEvent("storage",!0,!0),o.key=r,o.newValue=a,window.dispatchEvent(o),n()}))},canBeUsed:nee,type:"localStorage",averageResponseTime:function(){var e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?240:120},microSeconds:K7},iee=new Set,aee={create:function(e){var t={name:e,messagesCallback:null};return iee.add(t),t},close:function(e){iee.delete(e)},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){return new Promise((function(n){return setTimeout((function(){Array.from(iee).filter((function(t){return t.name===e.name})).filter((function(t){return t!==e})).filter((function(e){return!!e.messagesCallback})).forEach((function(e){return e.messagesCallback(t)})),n()}),5)}))},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:K7},oee=[J7,ree];function see(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.type){if("simulate"===e.type)return aee;var t=oee.find((function(t){return t.type===e.type}));if(t)return t;throw new Error("❌ Method ".concat(e.type," is not supported."))}var n=oee.find((function(e){return e.canBeUsed()}));if(!n)throw new Error("❌ No method found ".concat(JSON.stringify(oee.map((function(e){return e.type})))));return n}var lee=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.name=t,this.options=n,this.method=see(this.options),this.closed=!1,this._isListening=!1,this._onMessageListener=null,this._addEventListeners={message:[],internal:[]},this._unSendMessagePromises=new Set,this._beforeClose=[],this._preparePromises=null,uee(this)}return c()(e,[{key:"postMessage",value:function(e){if(this.closed)throw new Error("❌ Cannot post message after channel has closed");return cee(this,"message",e)}},{key:"postInternal",value:function(e){return cee(this,"internal",e)}},{key:"onmessage",get:function(){return this._onMessageListener},set:function(e){var t={time:this.method.microSeconds(),fn:e};fee(this,"message",this._onMessageListener),e&&"function"==typeof e?(this._onMessageListener=t,hee(this,"message",t)):this._onMessageListener=null}},{key:"addEventListener",value:function(e,t){hee(this,e,{time:this.method.microSeconds(),fn:t})}},{key:"removeEventListener",value:function(e,t){fee(this,e,this._addEventListeners[e].find((function(e){return e.fn===t})))}},{key:"close",value:function(){var e=this;if(!this.closed){this.closed=!0;var t=this._preparePromises?this._preparePromises:Promise.resolve();return this._onMessageListener=null,this._addEventListeners.message=[],t.then((function(){return Promise.all(Array.from(e._unSendMessagePromises))})).then((function(){return Promise.all(e._beforeClose.map((function(e){return e()})))})).then((function(){return e.method.close(e._state)}))}}},{key:"type",get:function(){return this.method.type}},{key:"isClosed",value:function(){return this.closed}}]),e}();function cee(e,t,n){var r={time:e.method.microSeconds(),type:t,data:n};return(e._preparePromises?e._preparePromises:Promise.resolve()).then((function(){var t=e.method.postMessage(e._state,r);return e._unSendMessagePromises.add(t),t.catch().then((function(){return e._unSendMessagePromises.delete(t)})),t}))}function uee(e){var t,n=e.method.create(e.name,e.options);(t=n)&&"function"==typeof t.then?(e._preparePromises=n,n.then((function(t){e._state=t}))):e._state=n}function dee(e){return e._addEventListeners.message.length>0||e._addEventListeners.internal.length>0}function hee(e,t,n){e._addEventListeners[t].push(n),function(e){if(!e._isListening&&dee(e)){var t=function(t){e._addEventListeners[t.type].forEach((function(e){t.time>=e.time&&e.fn(t.data)}))},n=e.method.microSeconds();e._preparePromises?e._preparePromises.then((function(){e._isListening=!0,e.method.onMessage(e._state,t,n)})):(e._isListening=!0,e.method.onMessage(e._state,t,n))}}(e)}function fee(e,t,n){e._addEventListeners[t]=e._addEventListeners[t].filter((function(e){return e!==n})),function(e){if(e._isListening&&!dee(e)){e._isListening=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}var pee=function(){function e(t,n){var r=this;s()(this,e),this._channel=t,this._options=n,this.isLeader=!1,this.isDead=!1,this.token=X7(),this._isApplying=!1,this._reApply=!1,this._unloadFns=[],this._listeners=[],this._intervals=[],this._duplicateListeners=function(){},this._duplicateCalled=!1,this._onBeforeDie=H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));var i=function(){var e=H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.die());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();H7&&(window.addEventListener("beforeUnload",i),window.addEventListener("unload",i),this._unloadFns.push(["beforeUnload",i]),this._unloadFns.push(["unload",i]))}var t;return c()(e,[{key:"applyOnce",value:function(){var e=this;if(this.isLeader)return Promise.resolve(!1);if(this.isDead)return Promise.resolve(!1);if(this._isApplying)return this._reApply=!0,Promise.resolve(!1);this._isApplying=!0;var t=!1,n=function(n){"leader"===n.context&&n.token!==e.token&&("apply"===n.action&&n.token>e.token&&(t=!0),"tell"===n.action&&(t=!0))};return this._channel.addEventListener("internal",n),mee(this,"apply").then((function(){return Q7(e._options.responseTime)})).then((function(){return t?Promise.reject(new Error):mee(e,"apply")})).then((function(){return Q7(e._options.responseTime)})).then((function(){return t?Promise.reject(new Error):mee(e)})).then((function(){return function(e){e.isLeader=!0;var t=function(t){"leader"===t.context&&"apply"===t.action&&mee(e,"tell"),"leader"!==t.context||"tell"!==t.action||e._duplicateCalled||(e._duplicateCalled=!0,e._duplicateListeners(),mee(e,"tell"))};return e._channel.addEventListener("internal",t),e._listeners.push(t),mee(e,"tell")}(e)})).then((function(){return!0})).catch((function(){return!1})).then((function(t){return e._channel.removeEventListener("internal",n),e._isApplying=!1,!t&&e._reApply?(e._reApply=!1,e.applyOnce()):t}))}},{key:"awaitLeadership",value:function(){var e;return this._awaitLeadershipPromise||(this._awaitLeadershipPromise=(e=this).isLeader?Promise.resolve():new Promise((function(t){var n=!1;function r(){n||(n=!0,clearInterval(i),e._channel.removeEventListener("internal",a),t(!0))}e.applyOnce().then((function(){e.isLeader&&r()}));var i=setInterval((function(){e.applyOnce().then((function(){e.isLeader&&r()}))}),e._options.fallbackInterval);e._intervals.push(i);var a=function(t){"leader"===t.context&&"death"===t.action&&e.applyOnce().then((function(){e.isLeader&&r()}))};e._channel.addEventListener("internal",a),e._listeners.push(a)}))),this._awaitLeadershipPromise}},{key:"onDuplicate",get:function(){return this._duplicateListeners},set:function(e){this._duplicateListeners=e}},{key:"onBeforeDie",get:function(){return this._onBeforeDie},set:function(e){this._onBeforeDie=e}},{key:"die",value:(t=H()(F.a.mark((function e(){var t=this;return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isDead){e.next=2;break}return e.abrupt("return");case 2:return this.isDead=!0,e.next=5,this.onBeforeDie();case 5:return this._listeners.forEach((function(e){return t._channel.removeEventListener("internal",e)})),this._intervals.forEach((function(e){return clearInterval(e)})),this._unloadFns.forEach((function(e){H7&&window.removeEventListener(e[0],e[1])})),e.abrupt("return",mee(this,"death"));case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();function mee(e,t){var n={context:"leader",action:t,token:e.token};return e._channel.postInternal(n)}var gee=function(e){var t=e.type,n=e.channelName,r=e.fallbackInterval,i=e.responseTime,a=e.emitOnAllTabs,o=e.callbacks,s=e.start,l=e.reset,c=e.pause,u=e.resume,d=new lee(n,{type:t}),h=function(e,t){if(e._leaderElector)throw new Error("❌ MessageChannel already has a leader-elector");var n=new pee(e,t);return e._beforeClose.push(H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.die());case 1:case"end":return e.stop()}}),e)})))),e._leaderElector=n,n}(d,{fallbackInterval:r,responseTime:i}),f={};f[h.token]=!1;var p=!1,m=!0,g=function(){return p};h.awaitLeadership().then((function(){p=!0})),d.addEventListener("message",(function(e){var t=pi()(e,2),n=t[0],r=t[1];switch(n){case"register":f[r]=!1;break;case"deregister":delete f[r];break;case"idle":v(r);break;case"active":b(r);break;case"emitIdle":o.onIdle();break;case"emitActive":o.onActive();break;case"start":s(!0);break;case"reset":l(!0);break;case"pause":c(!0);break;case"resume":u(!0)}}));var v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.token;f[e]=!0;var t=Object.values(f).every((function(e){return e}));!m&&t&&(m=!0,g()?(o.onIdle(),a&&y("emitIdle")):y("idle"))},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.token;f[e]=!1;var t=Object.values(f).some((function(e){return!e}));m&&t&&(m=!1,g()?(o.onActive(),a&&y("emitActive")):y("active"))};h.onDuplicate=H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.die();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),h.onBeforeDie=H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y("deregister");case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));var y=function(){var e=H()(F.a.mark((function e(t){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d.postMessage([t,h.token]));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.die();case 2:return e.next=4,d.close();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return y("register"),{close:A,send:y,isLeader:g,idle:v,active:b,isAllIdle:function(){return m},setAllIdle:function(e){m=e}}};var vee=function(e){d()(n,g.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(e){var r;if(s()(this,n),(r=t.call(this,e)).state={idle:!1,oldDate:+new Date,lastActive:+new Date,lastIdle:null,idleTime:0,remaining:null,pageX:null,pageY:null},r.tId=null,r.eventsBound=!1,r.callbackRefs={},e.debounce>0&&e.throttle>0)throw new Error("onAction can either be throttled or debounced (not both)");return e.debounce>0?r._onAction=W7(e.onAction,e.debounce):e.throttle>0?r._onAction=G7(e.onAction,e.throttle):r._onAction=e.onAction,e.eventsThrottle>0?r.handleEvent=G7(r._handleEvent.bind(V()(r)),e.eventsThrottle):r.handleEvent=r._handleEvent.bind(V()(r)),e.startOnMount&&!e.startManually||(r.state.idle=!0),r._toggleIdleState=r._toggleIdleState.bind(V()(r)),r.start=r.start.bind(V()(r)),r.reset=r.reset.bind(V()(r)),r.pause=r.pause.bind(V()(r)),r.resume=r.resume.bind(V()(r)),r.isIdle=r.isIdle.bind(V()(r)),r.getRemainingTime=r.getRemainingTime.bind(V()(r)),r.getElapsedTime=r.getElapsedTime.bind(V()(r)),r.getLastActiveTime=r.getLastActiveTime.bind(V()(r)),r.getLastIdleTime=r.getLastIdleTime.bind(V()(r)),r.getTotalIdleTime=r.getTotalIdleTime.bind(V()(r)),r.getTotalActiveTime=r.getTotalActiveTime.bind(V()(r)),r}return c()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.startOnMount,n=e.startManually;this._setupTabManager(),n||(t?this.start():this._bindEvents())}},{key:"componentDidUpdate",value:function(e){e.debounce!==this.props.debounce&&this.props.debounce>0?(this._onAction.cancel&&this._onAction.cancel(),this._onAction=W7(this.props.onAction,this.props.debounce)):e.throttle!==this.props.throttle&&this.props.throttle>0?(this._onAction.cancel&&this._onAction.cancel(),this._onAction=G7(this.props.onAction,this.props.throttle)):(e.throttle&&0===this.props.throttle||e.debounce&&0===this.props.debounce)&&(this._onAction.cancel&&this._onAction.cancel(),this._onAction=this.props.onAction),e.eventsThrottle!==this.props.eventsThrottle&&(this._unbindEvents(),this.handleEvent=G7(this._handleEvent.bind(this),this.props.eventsThrottle),this._bindEvents()),e.timeout!==this.props.timeout&&this.state.idle&&this.reset(),e.onActive!==this.props.onActive&&(this.callbackRefs.onActive=this.props.onActive),e.onIdle!==this.props.onIdle&&(this.callbackRefs.onIdle=this.props.onIdle)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.tId),this._unbindEvents(!0),this._onAction.cancel&&this._onAction.cancel(),this.manager&&this.manager.close().catch(console.error)}},{key:"render",value:function(){return this.props.children||null}},{key:"_setupTabManager",value:function(){var e=this.props,t=e.crossTab,n=e.onIdle,r=e.onActive;if(this.callbackRefs={onIdle:n,onActive:r},t){var i=Object.assign({channelName:"idle-timer",fallbackInterval:2e3,responseTime:100,removeTimeout:6e4,emitOnAllTabs:!1},!0===t?{}:t),a=i.type,o=i.channelName,s=i.fallbackInterval,l=i.responseTime,c=i.emitOnAllTabs;this.manager=gee({type:a,channelName:o,fallbackInterval:s,responseTime:l,emitOnAllTabs:c,callbacks:this.callbackRefs,start:this.start,reset:this.reset,pause:this.pause,resume:this.resume})}}},{key:"_bindEvents",value:function(){var e=this;if(H7){var t=this.props,n=t.element,r=t.events,i=t.passive,a=t.capture;this.eventsBound||(r.forEach((function(t){n.addEventListener(t,e.handleEvent,{capture:a,passive:i})})),this.eventsBound=!0)}}},{key:"_unbindEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(H7){var n=this.props,r=n.element,i=n.events,a=n.passive,o=n.capture;(this.eventsBound||t)&&(i.forEach((function(t){r.removeEventListener(t,e.handleEvent,{capture:o,passive:a})})),this.eventsBound=!1)}}},{key:"_toggleIdleState",value:function(e){var t=this;this.setState((function(e){return{idle:!e.idle,lastIdle:e.idle?e.lastIdle:+new Date-t.props.timeout,idleTime:e.idle?e.idleTime+ +new Date-e.lastIdle:e.idleTime}}),(function(){var n=t.props,r=n.onActive,i=n.onIdle,a=n.stopOnIdle;t.state.idle?(a&&(clearTimeout(t.tId),t.tId=null,t._unbindEvents()),t.manager?t.manager.idle():i(e)):(t._bindEvents(),t.manager?t.manager.active():r(e))}))}},{key:"_handleEvent",value:function(e){var t=this.state,n=t.remaining,r=t.pageX,i=t.pageY,a=t.idle,o=this.props,s=o.timeout,l=o.stopOnIdle;if(this._onAction(e),!n){if("mousemove"===e.type){if(e.pageX===r&&e.pageY===i)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(this.getElapsedTime()<200)return}clearTimeout(this.tId),this.tId=null;var c=+new Date-this.getLastActiveTime();(a&&!l||!a&&c>s)&&this._toggleIdleState(e),this.setState({lastActive:+new Date,pageX:e.pageX,pageY:e.pageY}),a&&l||(this.tId=setTimeout(this._toggleIdleState,s))}}},{key:"start",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null}),this.manager&&(this.manager.setAllIdle(!1),!e&&this.props.crossTab.emitOnAllTabs&&this.manager.send("start"));var t=this.props.timeout;this.tId=setTimeout(this._toggleIdleState,t)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];clearTimeout(this.tId),this.tId=null,this._bindEvents(),this.state.idle&&(this.manager?this.manager.active():this.props.onActive()),this.manager&&(this.manager.setAllIdle(!1),!e&&this.props.crossTab.emitOnAllTabs&&this.manager.send("reset")),this.setState({idle:!1,oldDate:+new Date,lastActive:+new Date,remaining:null});var t=this.props.timeout;this.tId=setTimeout(this._toggleIdleState,t)}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.state.remaining;null===t&&(this._unbindEvents(),clearTimeout(this.tId),this.tId=null,this.manager&&!e&&this.props.crossTab.emitOnAllTabs&&this.manager.send("pause"),this.setState({remaining:this.getRemainingTime()}))}},{key:"resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.state,n=t.remaining,r=t.idle;null!==n&&(this._bindEvents(),this.manager&&!e&&this.props.crossTab.emitOnAllTabs&&this.manager.send("resume"),r||(this.tId=setTimeout(this._toggleIdleState,n),this.setState({remaining:null,lastActive:+new Date})))}},{key:"getRemainingTime",value:function(){var e=this.state,t=e.remaining,n=e.lastActive,r=this.props.timeout;if(null!==t)return t<0?0:t;var i=r-(+new Date-n);return i<0?0:i}},{key:"getElapsedTime",value:function(){var e=this.state.oldDate;return+new Date-e}},{key:"getLastIdleTime",value:function(){return this.state.lastIdle}},{key:"getTotalIdleTime",value:function(){var e=this.state,t=e.idle,n=e.lastIdle,r=e.idleTime;return t?+new Date-n+r:r}},{key:"getLastActiveTime",value:function(){return this.state.lastActive}},{key:"getTotalActiveTime",value:function(){return this.getElapsedTime()-this.getTotalIdleTime()}},{key:"isIdle",value:function(){return this.state.idle}},{key:"isLeader",value:function(){return!this.manager||this.manager.isLeader()}}]),n}();function bee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.timeout,n=void 0===t?12e5:t,r=e.element,i=void 0===r?z7:r,a=e.events,o=void 0===a?V7:a,s=e.onIdle,l=void 0===s?function(){}:s,c=e.onActive,u=void 0===c?function(){}:c,d=e.onAction,h=void 0===d?function(){}:d,f=e.debounce,p=void 0===f?0:f,m=e.throttle,v=void 0===m?0:m,b=e.eventsThrottle,y=void 0===b?200:b,A=e.startOnMount,_=void 0===A||A,w=e.startManually,E=void 0!==w&&w,S=e.stopOnIdle,C=void 0!==S&&S,T=e.capture,k=void 0===T||T,x=e.passive,O=void 0===x||x,I=e.crossTab,M=void 0!==I&&I,P=Object(g.useRef)(!1),D=Object(g.useRef)(!0),N=Object(g.useRef)(+new Date),L=Object(g.useRef)(null),R=Object(g.useRef)(null),B=Object(g.useRef)(null),j=Object(g.useRef)(null),U=Object(g.useRef)(null),z=Object(g.useRef)(null),V=Object(g.useRef)(0),W=Object(g.useRef)(!0),G=Object(g.useRef)(n),q=Object(g.useRef)(null);M&&(!0===M&&(M={}),M=Object.assign({channelName:"idle-timer",fallbackInterval:2e3,responseTime:100,removeTimeout:6e4,emitOnAllTabs:!1},M));var Y=Object(g.useRef)(l),K=Object(g.useRef)(u),X=Object(g.useRef)(h);Object(g.useEffect)((function(){Y.current=l}),[l]),Object(g.useEffect)((function(){K.current=u}),[u]),Object(g.useEffect)((function(){X.current=h}),[h]);var Q=Object(g.useMemo)((function(){function e(e){X.current(e)}return e.cancel&&e.cancel(),p>0?W7(e,p):v>0?G7(e,v):e}),[v,p]),$=function(e){var t=!D.current;D.current=t,t?(C&&(clearTimeout(j.current),j.current=null,te()),z.current=+new Date-G.current,q.current?q.current.idle():Y.current(e)):(V.current+=+new Date-z.current,ee(),q.current?q.current.active():K.current(e))},J=function(e){if(Q(e),!L.current){if("mousemove"===e.type){if(e.pageX===R&&e.pageY===B)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(re()<200)return}clearTimeout(j.current),j.current=null;var t=+new Date-oe();(D.current&&!C||!D.current&&t>G.current)&&$(e),U.current=+new Date,R.current=e.pageX,B.current=e.pageY,D.current||(j.current=setTimeout($,G.current))}},Z=Object(g.useRef)(J),ee=function(){H7&&(P.current||(o.forEach((function(e){i.addEventListener(e,Z.current,{capture:k,passive:O})})),P.current=!0))},te=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];H7&&(P.current||e)&&(o.forEach((function(e){i.removeEventListener(e,Z.current,{capture:k,passive:O})})),P.current=!1)},ne=function(){if(null!==L.current)return L.current<0?0:L.current;var e=G.current-(+new Date-U.current);return e<0?0:e},re=function(){return+new Date-N.current},ie=function(){return z.current},ae=function(){return D.current?+new Date-z.current+V.current:V.current},oe=function(){return U.current},se=function(){return re()-ae()},le=function(){return D.current},ce=function(){return!q.current||q.current.isLeader()},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];clearTimeout(j.current),j.current=null,ee(),D.current=!1,N.current=+new Date,U.current=+new Date,L.current=null,q.current&&(q.current.setAllIdle(!1),!e&&M.emitOnAllTabs&&q.current.send("start")),j.current=setTimeout($,G.current)},de=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];clearTimeout(j.current),j.current=null,ee(),D.current&&(q.current?q.current.active():K.current()),D.current=!1,N.current=+new Date,U.current=+new Date,L.current=null,q.current&&(q.current.setAllIdle(!1),!e&&M.emitOnAllTabs&&q.current.send("reset")),j.current=setTimeout($,G.current)},he=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===L.current&&(te(),clearTimeout(j.current),j.current=null,L.current=ne(),q.current&&!e&&M.emitOnAllTabs&&q.current.send("pause"))},fe=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null!==L.current&&(ee(),D.current||(j.current=setTimeout($,L.current),L.current=null,U.current=+new Date),q.current&&!e&&M.emitOnAllTabs&&q.current.send("resume"))};return Object(g.useEffect)((function(){if(p>0&&v>0)throw new Error("onAction can either be throttled or debounced (not both)");return M&&(q.current=gee({type:M.type,channelName:M.channelName,fallbackInterval:M.fallbackInterval,responseTime:M.responseTime,emitOnAllTabs:M.emitOnAllTabs,callbacks:{onIdle:Y.current,onActive:K.current},start:ue,reset:de,pause:he,resume:fe})),E?H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(clearTimeout(j.current),te(!0),!M){e.next=5;break}return e.next=5,q.current.close();case 5:case"end":return e.stop()}}),e)}))):(_?ue():ee(),H()(F.a.mark((function e(){return F.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(clearTimeout(j.current),te(!0),Q.cancel&&Q.cancel(),!M){e.next=6;break}return e.next=6,q.current.close();case 6:case"end":return e.stop()}}),e)}))))}),[]),Object(g.useEffect)((function(){var e=P.current;e&&te(),Z.current=y>0?G7(J,y):J,e&&ee()}),[y]),Object(g.useEffect)((function(){G.current=n,!W.current&&D.current&&de(),W.current=!1}),[n]),{isIdle:le,isLeader:ce,start:ue,pause:he,reset:de,resume:fe,getLastIdleTime:ie,getTotalIdleTime:ae,getLastActiveTime:oe,getTotalActiveTime:se,getElapsedTime:re,getRemainingTime:ne}}vee.propTypes={timeout:ne.a.number,events:ne.a.arrayOf(ne.a.string),onIdle:ne.a.func,onActive:ne.a.func,onAction:ne.a.func,debounce:ne.a.number,throttle:ne.a.number,eventsThrottle:ne.a.number,element:ne.a.oneOfType([ne.a.object,ne.a.element]),startOnMount:ne.a.bool,startManually:ne.a.bool,stopOnIdle:ne.a.bool,passive:ne.a.bool,capture:ne.a.bool,crossTab:ne.a.oneOfType([ne.a.bool,ne.a.shape({type:ne.a.oneOf(["broadcastChannel","localStorage","simulate"]),channelName:ne.a.string,fallbackInterval:ne.a.number,responseTime:ne.a.number,removeTimeout:ne.a.number,emitOnAllTabs:ne.a.bool})])},vee.defaultProps={timeout:12e5,element:z7,events:V7,onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,eventsThrottle:200,startOnMount:!0,startManually:!1,stopOnIdle:!1,capture:!0,passive:!0,crossTab:!1},bee.propTypes={timeout:ne.a.number,events:ne.a.arrayOf(ne.a.string),onIdle:ne.a.func,onActive:ne.a.func,onAction:ne.a.func,debounce:ne.a.number,throttle:ne.a.number,eventsThrottle:ne.a.number,element:ne.a.oneOfType([ne.a.object,ne.a.element]),startOnMount:ne.a.bool,startManually:ne.a.bool,stopOnIdle:ne.a.bool,passive:ne.a.bool,capture:ne.a.bool,crossTab:ne.a.oneOfType([ne.a.bool,ne.a.shape({type:ne.a.oneOf(["broadcastChannel","localStorage","simulate"]),channelName:ne.a.string,fallbackInterval:ne.a.number,responseTime:ne.a.number,removeTimeout:ne.a.number,emitOnAllTabs:ne.a.bool})])},bee.defaultProps={timeout:12e5,element:z7,events:V7,onIdle:function(){},onActive:function(){},onAction:function(){},debounce:0,throttle:0,eventsThrottle:200,startOnMount:!0,startManually:!1,stopOnIdle:!1,capture:!0,passive:!0,crossTab:!1};var yee=function(e){var t=e.userId,n=e.reportUserSessionState,r=bee({timeout:3e5,throttle:500}),i=r.isIdle,a=r.reset;return Object(g.useEffect)((function(){var e=setInterval((function(){if(i())window.audioPlayer&&!window.audioPlayer.paused()?(console.log("Idle but video is playing"),a()):console.log("Idle");else if(n){var e=Date.now(),r={userId:t,lastActive:new Date(e-1e4),trackedAt:new Date(e)};n(r)}}),1e4);return function(){clearInterval(e)}}),[t]),null},Aee=r(118),_ee=r.n(Aee),wee=function(e){var t=e.message;return v.a.createElement("div",{className:"flex-grow-1"},v.a.createElement("div",{className:_ee.a.emptyImageContainer},v.a.createElement("div",{className:_ee.a.circleBg},v.a.createElement("img",{height:"106",width:"121",src:I.a.addTemplateIcon,alt:"add template icon",className:P()(_ee.a.folderIcon,"u-opacity-30")}),v.a.createElement("div",{className:_ee.a.dndTextWrapper},t))))},Eee=function(e){var t=e.uid,n=e.selectable,r=void 0===n||n,i=e.radio,a=e.isSelected,o=e.title,s=e.duration,l=e.onClick;return v.a.createElement("div",{className:P()(_ee.a.chapterItem,a&&_ee.a.isSelected),key:t,onClick:l},r&&v.a.createElement(_u,{readOnly:!0,id:"".concat(i?"radio":"checkbox","CopyChapter-").concat(t),type:i?"radio":"checkbox",labelName:"",checked:a,className:"u-pointer-event-none"}),v.a.createElement("div",{className:"d-flex u-overflow-hidden flex-grow-1 justify-content-between"},v.a.createElement("div",{className:"text-truncate"},o),s&&v.a.createElement("div",{className:"mx-3"},s)))},See=function(e){var t=e.uid,n=e.name,r=e.isSelected,i=e.chapters,a=void 0===i?[]:i,o=e.onClick;return v.a.createElement("div",{className:P()("d-block",_ee.a.rawVideoItem,r&&_ee.a.isSelected),key:t,onClick:o},v.a.createElement("div",{className:"d-flex align-items-center "},v.a.createElement(_u,{readOnly:!0,id:"radioCopyChapter-".concat(t),type:"radio",labelName:"",checked:r,className:"u-pointer-event-none"}),v.a.createElement("div",{className:"text-truncate u-fs-7o8 u-fw-500"},n)),v.a.createElement("div",{className:"w-100 mt-2 u-pl-1x1o3"},a.map((function(e){var t=e.title,n=e.duration,r=e.uid;return v.a.createElement(Eee,{selectable:!1,key:r,uid:r,title:t,duration:n})}))))},Cee="BEFORE",Tee="AFTER",kee=function(e){var t=Object(g.useState)(!1),n=pi()(t,2),r=n[0],i=n[1],a=e.step,o=void 0===a?1:a,s=e.items,l=void 0===s?[]:s,c=e.targetRawVideos,u=void 0===c?[]:c,d=e.noSelectedItems,h=e.canSubmit,f=e.isDirty,p=e.isValidTargetVideoId,m=e.targetVideoId,b=e.selectedRawVideoId,y=e.insertPosition,A=e.inclSemanticTexts,_=e.inclHighlights,w=(e.isSelectedAll,e.isSubmitting),E=e.isLoadingTargetRawVideos,S=e.isSubmittedTargetRawVideos,C=e.onStepNext,T=e.onStepBack,k=e.onSubmit,O=e.onClose,I=(e.onSelectAllChange,e.onChapterSelectChange),M=e.onTargetPositionChange,D=e.onTargetVideoIdChange,N=e.onTargetVideoChaptersRefresh,L=e.onInsertPositionChange,R=e.onInclSemanticTextsChange,B=e.onInclHighlightsChange,j=function(e){f?i(!0):O(e)},F=u.length;return v.a.createElement(v.a.Fragment,null,w&&v.a.createElement(Nn,null),v.a.createElement(Fl.a,{show:!0,className:"copyChaptersModal",scrollable:!1,centered:!0,backdrop:"static",onEscapeKeyDown:j},v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"modal-title h4 ml-3 text-truncate "},1===o?Object(_t.t)("modal.copyChaptersTitle1"):Object(_t.t)("modal.copyChaptersTitle2")),v.a.createElement("div",{className:"close-modal-btn",onClick:j,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:_ee.a.modalBody},1===o&&v.a.createElement(v.a.Fragment,null,0===l.length&&v.a.createElement(wee,{message:Object(_t.t)("noVideoChaptersFound")}),l.length>0&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(_ee.a.stepHeader,"pl-3")},Object(_t.t)("selectCopiedChapters")),v.a.createElement("div",{className:_ee.a.stepHeader},v.a.createElement(_u,{id:"inclSemanticTexts",labelName:Object(_t.t)("btn.includeSemanticTexts"),checked:A,onChange:R}),v.a.createElement(_u,{id:"inclHighlights",labelName:Object(_t.t)("btn.includeHighlights"),className:"ml-3",checked:_,onChange:B})),v.a.createElement("div",{className:P()(_ee.a.chaptersWrap,"fv-custom-scroll")},l.map((function(e,t){var n=e.isSelected,r=e.title,i=e.duration,a=e.uid;return v.a.createElement(Eee,{key:a,uid:a,isSelected:n,title:r,duration:i,onClick:function(e){I(t)}})}))))),2===o&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:P()(_ee.a.stepHeader,"pl-3 u-py-3o4")},v.a.createElement(mu,{labelName:"",name:"targetVideoId",value:m,className:"u-w-22 m-0",classNameInput:"u-h-2x1o4",placeholder:Object(_t.t)("placeholder.targetVideoId"),onChange:D,onKeyDown:function(e){e.nativeEvent.stopImmediatePropagation(),13===e.keyCode&&m&&N(),x.c.preventKeyDownSideEffect(e)},maxLength:x.g.TEXT_INPUT_MAX_LENGTH}),v.a.createElement(Qt,{disabled:!m,isLoading:E,className:_ee.a.refreshBtn,onClick:N,tooltipText:Object(_t.t)("tooltip.loadTargetVideo")},v.a.createElement("i",{className:"fv fuvi-refresh text-white"}))),v.a.createElement("div",{className:_ee.a.stepHeader},v.a.createElement(_u,{disabled:0===F,id:"insertBeforeRadio",type:"radio",labelName:Object(_t.t)("btn.insertBefore"),checked:y===Cee,onChange:function(){return L(Cee)}}),v.a.createElement(_u,{disabled:0===F,id:"insertAfterRadio",type:"radio",labelName:Object(_t.t)("btn.insertAfter"),className:"ml-3",checked:y===Tee,onChange:function(){return L(Tee)}})),v.a.createElement("div",{className:P()(_ee.a.chaptersWrap,"fv-custom-scroll")},E&&v.a.createElement(Nn,{className:"u-opacity-70"}),0===u.length&&v.a.createElement(wee,{message:S?p?Object(_t.t)("appendCopiedChapters"):Object(_t.t)("invalidTargetVideoId"):""}),u.map((function(e){var t=e.uid,n=e.name,r=e.chapters,i=void 0===r?[]:r;return v.a.createElement(See,{key:t,uid:t,name:n,chapters:i,isSelected:b===t,onClick:function(e){M(t)}})}))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100 align-items-center"},v.a.createElement("div",{className:"d-flex ml-2"},v.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-1x1o4"})),v.a.createElement("div",{className:"u-fs-7o8 ml-2"},v.a.createElement("div",{className:"u-opacity-60"},Object(_t.t)("selectedChapterCount",{count:d}))),v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"outline-primary",className:P()(_ee.a.footerBtn,"modal-button"),onClick:j},Object(_t.t)("btn.cancel")),1===o&&v.a.createElement(et.a,{disabled:0===d,type:"submit",variant:"primary",className:P()("text-white modal-button ml-3",_ee.a.footerBtn,0===d&&"u-pointer-event-none u-opacity-50"),onClick:C},Object(_t.t)("btn.next")),2===o&&v.a.createElement(v.a.Fragment,null,v.a.createElement(et.a,{type:"submit",variant:"primary",className:P()("text-white modal-button ml-3",_ee.a.footerBtn),onClick:T},Object(_t.t)("btn.back")),v.a.createElement(et.a,{disabled:!h||w,type:"submit",variant:"primary",className:P()("text-white modal-button ml-3",_ee.a.footerBtn,!h&&"u-pointer-event-none u-opacity-50"),onClick:k},w?v.a.createElement(Ln,{className:"text-white"}):Object(_t.t)("btn.proceed"))))))),v.a.createElement(IC,{show:r,title:Object(_t.t)("modal.confirmCancelModalTitle"),message:Object(_t.t)("modal.confirmCancelModalMessage"),onConfirm:O,onClose:function(){return i(!1)}}))};function xee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xee(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Iee=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Mee=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{items:[],noSelectedItems:0,isDirty:!1,isSelectedAll:!1,isSubmitting:!1,step:1,targetVideoId:"",isValidTargetVideoId:!1,selectedRawVideoId:"",isSubmittedTargetRawVideos:!1,isLoadingTargetRawVideos:!1,insertPosition:Cee,inclSemanticTexts:!0,inclHighlights:!1}),G()(V()(e),"submittedTargetVideoId",""),G()(V()(e),"buildListChapter",(function(e){return e.map((function(e){var t=e.content,n=e.startTime,r=void 0===n?0:n,i=e.endTime,a=(void 0===i?0:i)-r+1,o=1===a?"":x.c.msToTimestamp(a,a>36e5?"HH:mm:ss":"mm:ss");return Oee(Oee({},e),{},{isSelected:!1,duration:o,title:t})}))})),G()(V()(e),"buildListItem",(function(){var t=e.props.chapters,n=(void 0===t?[]:t).filter((function(e){return e.type===x.g.CHAPTER_TYPES.EPISODIC.key})),r=e.buildListChapter(n);e.setState({items:r,isSelectedAll:!1,noSelectedItems:0})})),G()(V()(e),"getListItem",(function(){var t=e.state.items;return Object(Y.cloneDeep)(t)})),G()(V()(e),"handleChapterSelectChange",(function(t){var n,r=e.getListItem(),i=r[t].isSelected;r[t].isSelected=!i,i?n=!1:(n=!0,r.some((function(e){if(!e.isSelected)return n=!1,!1}))),e.setState({items:r,isSelectedAll:n,isDirty:!0,noSelectedItems:Object(Y.filter)(r,{isSelected:!0}).length})})),G()(V()(e),"handleSelectAllChange",(function(){var t=e.state.isSelectedAll,n=e.getListItem();e.setState({isDirty:!0,isSelectedAll:!t,noSelectedItems:t?0:n.length,items:n.map((function(e){return Oee(Oee({},e),{},{isSelected:!t})}))})})),G()(V()(e),"handleTargetVideoChaptersRefresh",(function(){var t=e.props.getRawVideos,n=e.state.targetVideoId;e.setState({isLoadingTargetRawVideos:!0,selectedRawVideoId:""}),e.submittedTargetVideoId=n,Iee.test(n)?t({videoId:n,hideError:!0},(function(t){var n=t.map((function(t){return Oee(Oee({},t),{},{isExistingVideo:!0,type:"video",uid:t.partId,size:t.contentLength,chapters:e.buildListChapter(t.chapters)})}));Object(Y.delay)((function(){e.setState((function(e){return{isValidTargetVideoId:!0,isSubmittedTargetRawVideos:!0,isLoadingTargetRawVideos:!1,targetRawVideos:n,insertPosition:0===n.length?Tee:e.insertPosition}}))}),500)}),(function(){Object(Y.delay)((function(){e.setState({isValidTargetVideoId:!1,isSubmittedTargetRawVideos:!0,isLoadingTargetRawVideos:!1,targetRawVideos:[]})}),500)})):Object(Y.delay)((function(){e.setState({isValidTargetVideoId:!1,isLoadingTargetRawVideos:!1,isSubmittedTargetRawVideos:!0})}),500)})),G()(V()(e),"handleFormClose",(function(){(0,e.props.displayCopyChaptersModal)(null)})),G()(V()(e),"handleFormSubmit",(function(t){t.stopPropagation();var n=e.props,r=n.videoId,i=n.copyChapters,a=e.state,o=a.isDirty,s=a.isSubmitting,l=a.items,c=a.selectedRawVideoId,u=a.insertPosition,d=a.inclSemanticTexts,h=a.inclHighlights;if(o&&e.checkCanSubmit()&&!s){e.setState({isSubmitting:!0});var f=l.filter((function(e){return e.isSelected})).map((function(e){return e.uid}));i({srcVideoId:r,targetVideoId:e.submittedTargetVideoId,srcChapterIds:f,dstPart:c,dstVideoId:e.submittedTargetVideoId,position:u,inclSemanticTexts:d,inclHighlights:h},(function(){e.setState({isSubmitting:!1}),e.handleFormClose()}),(function(){e.setState({isSubmitting:!1})}))}})),G()(V()(e),"checkCanSubmit",(function(){var t=e.state,n=t.selectedRawVideoId,r=t.targetRawVideos,i=t.isSubmittedTargetRawVideos,a=t.isValidTargetVideoId;return e.getListItem().some((function(e){return e.isSelected}))&&a&&(n||i&&Object(Y.isEmpty)(r))})),G()(V()(e),"handleStepNext",(function(){e.setState({step:2})})),G()(V()(e),"handleStepBack",(function(){e.setState({step:1})})),G()(V()(e),"handleTargetVideoIdChange",(function(t){var n;e.setState({targetVideoId:(null===(n=t.target)||void 0===n?void 0:n.value)||"",isDirty:!0})})),G()(V()(e),"handleTargetPositionChange",(function(t){e.setState({selectedRawVideoId:t,isDirty:!0})})),G()(V()(e),"handleInsertPositionChange",(function(t){e.setState({insertPosition:t,isDirty:!0})})),G()(V()(e),"handleInclSemanticTextsChange",(function(t){e.setState({inclSemanticTexts:t.target.checked,isDirty:!0})})),G()(V()(e),"handleInclHighlightsChange",(function(t){e.setState({inclHighlights:t.target.checked,isDirty:!0})})),G()(V()(e),"render",(function(){var t=e.state,n=t.step,r=t.items,i=void 0===r?[]:r,a=t.targetRawVideos,o=void 0===a?[]:a,s=t.noSelectedItems,l=t.targetVideoId,c=t.selectedRawVideoId,u=t.insertPosition,d=t.inclSemanticTexts,h=t.inclHighlights,f=t.isDirty,p=t.isValidTargetVideoId,m=t.isSelectedAll,g=t.isSubmitting,b=t.isLoadingTargetRawVideos,y=t.isSubmittedTargetRawVideos;return v.a.createElement(kee,{step:n,items:i,targetRawVideos:o,noSelectedItems:s,canSubmit:e.checkCanSubmit(),targetVideoId:l,selectedRawVideoId:c,insertPosition:u,inclSemanticTexts:d,inclHighlights:h,isDirty:f,isValidTargetVideoId:p,isSelectedAll:m,isSubmitting:g,isLoadingTargetRawVideos:b,isSubmittedTargetRawVideos:y,onStepNext:e.handleStepNext,onStepBack:e.handleStepBack,onSubmit:e.handleFormSubmit,onClose:e.handleFormClose,onSelectAllChange:e.handleSelectAllChange,onChapterSelectChange:e.handleChapterSelectChange,onTargetPositionChange:e.handleTargetPositionChange,onTargetVideoIdChange:e.handleTargetVideoIdChange,onTargetVideoChaptersRefresh:e.handleTargetVideoChaptersRefresh,onInsertPositionChange:e.handleInsertPositionChange,onInclSemanticTextsChange:e.handleInclSemanticTextsChange,onInclHighlightsChange:e.handleInclHighlightsChange})})),e}return c()(n,[{key:"componentDidMount",value:function(){this.buildListItem()}}]),n}(v.a.Component),Pee=Object(q.b)((function(e){e.cogvid;return{}}),(function(e){return{displayCopyChaptersModal:function(t,n,r){return e(Q.e.displayCopyChaptersModal(t,n,r))},getRawVideos:function(t,n,r){return e(Q.e.getRawVideos(t,n,r))},copyChapters:function(t,n,r){return e(Q.e.copyChapters(t,n,r))}}}))(Mee),Dee=r(27),Nee=r.n(Dee),Lee=x.g.RESOURCE.APPROVED_STATUS,Ree=(x.g.SEARCH_PARAM,function(e){e.videoId;var t=e.readonly,n=e.selectable,r=(e.index,e.id),i=e.title,a=e.description,o=e.titleLine2,s=void 0===o?" ":o,l=e.titleLine3,c=void 0===l?" ":l,u=e.titleLine4,d=void 0===u?" ":u,h=e.thumbnailUrl,f=e.ownerDetail,p=(f=void 0===f?{}:f).avatar,m=f.fullName,b=e.free,y=e.price,A=e.previews,_=void 0===A?[]:A,w=e.approvalStatus,E=e.message,S=e.alreadyBought,C=e.isOwner,T=e.isStoreOwner,k=e.selected,O=e.prefixId,M=e.withLinks,D=e.productLinks,N=void 0===D?[]:D,L=e.filenames,R=void 0===L?[]:L,B=e.fileLinks,j=void 0===B?[]:B,F=e.downloads,U=e.completedOrders,H=void 0===U?0:U,z=e.views,V=e.canEdit,W=e.isSelected,G=e.liked,q=e.likeCount,Y=e.contentTypeLink,K=e.onEdit,X=e.onDelete,Q=e.onSelect,$=e.onClick,J=e.onReview,Z=e.onDownload,ee=e.onPurchase,te=e.onPreview,ne=e.onProductLinkClick,re=e.onProductUnlinkClick,ie=e.onProductDescExpanded,ae=e.onDoLikeProduct,oe=(x.c.isExploring(),Object(g.useState)(!1)),se=pi()(oe,2),le=se[0],ce=se[1],ue=Object(g.useState)(!1),de=pi()(ue,2),he=de[0],fe=de[1],pe=Object(g.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;x.c.checkLoggedIn()&&(ce(!0),Z(e,t,(function(){setTimeout((function(){return ce(!1)}),500)})))}),[r]),me=Object(g.useCallback)((function(e){ce(!0),ee(e,(function(){setTimeout((function(){return ce(!1)}),500)}))}),[r]),ge=y||{},ve=ge.amount,be=ge.currency,ye=b?Object(_t.t)("freePriceLabel"):x.c.formatMoney(ve,null==be?void 0:be.code),Ae=w===Lee.PENDING,_e=b||C||S||Ae&&T,we="".concat(O,"-").concat(r),Ee=x.c.getElementCoords(document.getElementById(we)),Se=Y?j:R;return v.a.createElement("div",{id:we,className:P()(W&&Nee.a.selected,Nee.a.productItem,$&&Nee.a.clickable),onClick:$},v.a.createElement("div",{className:"w-100 d-flex"},v.a.createElement("div",{className:Nee.a.thumbnailWrapper},v.a.createElement("div",{className:"position-relative"},he&&h&&v.a.createElement("div",{className:P()(Nee.a.largeThumbnail),style:{backgroundImage:'url("'.concat(h,'")'),top:Math.min(Math.max(150,Ee.top-160),document.documentElement.clientHeight-480)-Ee.top-16}}),v.a.createElement("div",{onMouseEnter:function(){return fe(!0)},onMouseLeave:function(){return fe(!1)},className:P()(Nee.a.thumbnail),style:{backgroundImage:h?'url("'.concat(h,'")'):void 0}})),!t&&v.a.createElement("div",{className:P()(Nee.a.previewBtn,!_.length&&Nee.a.disabled),onClick:te},v.a.createElement("div",{className:"u-fs-15o16 u-fw-500"},Object(_t.t)("btn.preview")))),v.a.createElement("div",{className:P()(Nee.a.info,"ml-5",!t&&"pb-4")},v.a.createElement("div",{className:"w-100 d-flex align-items-center"},v.a.createElement("div",{className:P()(Nee.a.avatar),style:{backgroundImage:p?"url(".concat(p,")"):void 0}}),v.a.createElement("div",{className:"w-100 ml-2 u-truncate-2 u-fs-7o8 u-fw-500"},m)),v.a.createElement("div",{title:i,className:P()("u-truncate-2 u-fw-600 u-fs-1x1o6",Nee.a.title)},i),v.a.createElement("div",{title:s,className:P()("u-truncate-2 u-fw-600 u-fs-1x1o6",Nee.a.title)},s),v.a.createElement("div",{title:c,className:P()("u-truncate-2 u-fw-600 u-fs-1x1o16",Nee.a.title)},c),v.a.createElement("div",{title:d,className:P()("u-truncate-2 u-fs-1x1o16 font-italic",Nee.a.title)},d)),v.a.createElement("div",{className:P()(Nee.a.actionsWrapper,"mx-5")},v.a.createElement("div",{className:Nee.a.actions},n&&v.a.createElement(_u,{id:"product-".concat(r),type:"radio",className:"mt-1 u-ml-3o4 u-fs-15o16",checked:k,onChange:Q}),v.a.createElement("div",{className:"w-100 d-flex align-items-center justify-content-between"},C||T?v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"u-flex-center u-fw-500 u-fs-1"},v.a.createElement("i",{className:"fv fuvi-eye u-fs-1x1o4 u-opacity-75"}),v.a.createElement("span",{className:"ml-2 u-text-red"},x.c.nFormatter(z))),v.a.createElement("div",{className:"u-flex-center ml-3 u-fw-500"},v.a.createElement("span",{className:"text-white u-fs-15o16"},b?"Downloads":"Purchases"),v.a.createElement("span",{className:"ml-2 u-text-red u-fs-1"},x.c.nFormatter(b?F:H))),v.a.createElement(Qt,{classNameWrapper:"ml-3",className:P()("ml-0 p-0 position-relative",G&&"u-text-red"),onClick:ae},v.a.createElement("div",{className:"d-flex align-items-center"},G?v.a.createElement("i",{className:"fv fuvi-like-full u-fs-1x1o3 text-white"}):v.a.createElement("i",{className:"fv fuvi-like u-fs-1x1o3 text-white"}),v.a.createElement("div",{className:"ml-2 u-fs-1 u-line-height-1"},q>0?x.c.nFormatter(q):" ")))):v.a.createElement("div",null)),v.a.createElement("div",{className:"w-100 u-flex-center"},v.a.createElement("div",{className:P()("u-fs-1x1o6 u-line-height-1 u-fw-600",b?"u-text-cyan":"text-secondary")},ye),v.a.createElement("div",{className:"flex-grow-1"}),!t&&(_e&&Se.length>1?v.a.createElement(ut,null,v.a.createElement(ut.Toggle,{className:P()(Nee.a.textBtn,"w-100 bg-secondary text-white",le&&Nee.a.disabled)},le?v.a.createElement(xn.a,{animation:"border",size:"sm"}):Object(_t.t)("btn.download")),v.a.createElement(ut.Menu,{className:"u-w-20"},Se.map((function(e,t){return v.a.createElement(ut.Item,{key:e,title:e,onClick:function(e){pe(e,t)}},v.a.createElement("div",{className:"u-text-cyan text-truncate"},e))})))):v.a.createElement("div",{className:P()(Nee.a.textBtn,_e&&"bg-secondary",le&&Nee.a.disabled),onClick:le?null:_e?pe:me},le?v.a.createElement(xn.a,{animation:"border",size:"sm"}):_e?Object(_t.t)("btn.download"):Object(_t.t)("btn.buy")))),!t&&v.a.createElement("div",{className:"ml-n2 d-flex align-items-center"},C&&Ae&&v.a.createElement(Qt,{disabled:!0,tooltipText:Object(_t.t)("publishingStatus.PENDING")},v.a.createElement("img",{width:24,height:24,src:I.a.pendingIcon,alt:"review icon"})),(T||C)&&w===Lee.REJECTED&&v.a.createElement(Qt,{disabled:C,onClick:T?J:void 0,tooltipText:"".concat(Object(_t.t)("publishingStatus.REJECTED"),": ").concat(E)},v.a.createElement("img",{width:24,height:24,src:I.a.rejectedIcon,alt:"review icon"})),T&&!C&&Ae&&v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.reviewResource"),onClick:J},v.a.createElement("img",{width:24,height:24,src:I.a.reviewIcon,alt:"review icon"})),C&&v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.editResource"),onClick:V?K:null,disabled:!V},v.a.createElement("i",{className:"fv fuvi-edit u-fs-1x1o4 text-white"})),(T||C)&&v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.removeResource"),onClick:X},v.a.createElement("i",{className:"fv fuvi-trash-can u-fs-1x1o4 text-white"}))))),M&&(null==N?void 0:N.length)>0&&v.a.createElement("div",{className:"flex-shrink-0 u-w-20p px-2"},(N||[]).map((function(e){var t=e.storeId,n=e.storeTitle;return v.a.createElement("div",{className:"w-100 d-flex",id:t},v.a.createElement("span",{className:"u-truncate-2 u-text-green"},n),v.a.createElement(Qt,{tooltipText:"Unlink from community",onClick:re},v.a.createElement("i",{className:"fv fuvi-delete u-fs-1x1o4 text-white"})))}))),M&&0==(null==N?void 0:N.length)&&v.a.createElement("div",{className:"flex-shrink-0 u-w-20p px-2"},v.a.createElement(Qt,{tooltipText:"Link to community",onClick:ne},v.a.createElement("div",{className:"u-flex-center"},v.a.createElement("i",{className:"fv fuvi-add-item u-fs-1x1o4"}),"Link to community")))),!!a&&v.a.createElement("div",{className:"mt-3"},v.a.createElement("div",{className:"u-fw-600 u-fs-15o16"},"Description:"),v.a.createElement(TR,{className:"mt-2 u-fs-7o8 text-white",content:a,lineHeight:"1.1rem",maxRows:8,onExpanded:ie})))}),Bee=x.g.RESOURCE.APPROVED_STATUS,jee=(x.g.WEEK_DAYS,function(e){e.videoId;var t=e.readonly,n=e.selectable,r=(e.index,e.id),i=e.title,a=e.description,o=e.schedule,s=(o=void 0===o?{}:o).startDate,l=o.endDate,c=o.capacity,u=o.days,d=o.timezone,h=o.registered,f=o.totalHours,p=(e.profile,e.hourlyCostDisplayed),m=e.thumbnailUrl,b=e.ownerDetail,y=(b=void 0===b?{}:b).avatar,A=b.fullName,_=b.firstName,w=e.free,E=e.price,S=e.approvalStatus,C=e.message,T=e.alreadyBought,k=e.isOwner,O=e.isStoreOwner,M=e.views,D=e.selected,N=e.prefixId,L=e.withLinks,R=e.productLinks,B=void 0===R?[]:R,j=e.canEdit,F=e.isSelected,U=e.liveSessionLink,H=e.onEdit,z=e.onDelete,V=e.onSelect,W=e.onClick,G=e.onReview,q=e.onPreview,Y=e.onPurchase,K=e.onProductLinkClick,X=e.onProductUnlinkClick,Q=e.onProductDescExpanded,$=Object(g.useState)(!1),J=pi()($,2),Z=J[0],ee=J[1],te=Object(g.useState)(!1),ne=pi()(te,2),re=ne[0],ie=ne[1],ae=c-h,oe=Object(g.useCallback)((function(e){!k&&ae&&(ee(!0),Y(e,(function(){setTimeout((function(){return ee(!1)}),500)})))}),[r,k,ae]),se=E||{},le=se.amount,ce=se.currency,ue=w?Object(_t.t)("freePriceLabel"):x.c.formatMoney(le,null==ce?void 0:ce.code),de=w||!f?"":f+" hours",he=w||!f?"":x.c.formatMoney(parseFloat(le),null==ce?void 0:ce.code)+"/course",fe=w||!f?"":x.c.formatMoney(parseFloat(le/f).toFixed(2),null==ce?void 0:ce.code)+"/hour",pe=S===Bee.PENDING,me=w||k||T||pe&&O,ge="".concat(N,"-").concat(r),ve=x.c.getElementCoords(document.getElementById(ge));return v.a.createElement("div",{id:ge,className:P()(F&&Nee.a.selected,Nee.a.classItem,W&&Nee.a.clickable),onClick:W},v.a.createElement("div",{className:"w-100 d-flex"},v.a.createElement("div",{className:Nee.a.thumbnailWrapper},v.a.createElement("div",{className:"position-relative"},re&&m&&v.a.createElement("div",{className:P()(Nee.a.largeThumbnail),style:{backgroundImage:'url("'.concat(m,'")'),top:Math.min(Math.max(150,ve.top-160),document.documentElement.clientHeight-480)-ve.top-16}}),v.a.createElement("div",{onMouseEnter:function(){return ie(!0)},onMouseLeave:function(){return ie(!1)},className:P()(Nee.a.thumbnail),style:{backgroundImage:m?'url("'.concat(m,'")'):void 0}})),v.a.createElement("div",{className:"mt-1 u-fs-7o8 u-fw-600 text-center text-uppercase"},A)),v.a.createElement("div",{className:P()(Nee.a.info,"ml-5")},v.a.createElement("div",{className:"w-100 d-flex align-items-center"},v.a.createElement("div",{className:P()(Nee.a.avatar),style:{backgroundImage:y?"url(".concat(y,")"):void 0}}),v.a.createElement("div",{className:"w-100 ml-2 u-truncate-2 u-fs-7o8 u-fw-500"},A)),v.a.createElement("div",{title:i,className:P()("u-truncate-2 u-fw-600 u-fs-1x1o6",Nee.a.title)},i),v.a.createElement("div",{className:P()("u-truncate-2 u-fs-1x1o16")},v.a.createElement("span",{className:"font-italic"},"From"),v.a.createElement("span",{className:"u-fw-600 ml-5"},Ml()(s).format("ll")),v.a.createElement("span",{className:"font-italic mx-5"},"to"),v.a.createElement("span",{className:"u-fw-600"},Ml()(l).format("ll"))),u.map((function(e,t){return v.a.createElement("div",{key:"timeRange-".concat(t),className:P()("d-flex u-fw-500 u-fs-7o8 ml-3")},v.a.createElement("div",{className:"u-w-10"},x.c.toTitleCase(e.day)),v.a.createElement("div",{className:"u-opacity-80"},e.startTime," - ",e.endTime))})),v.a.createElement("div",{className:P()("u-truncate-2 u-fw-500 u-fs-7o8 ml-3")},v.a.createElement("span",null,"Timezone: GMT ",Ml.a.tz(d).format("Z"))),v.a.createElement("div",{className:P()("u-truncate-2 u-fs-1x1o16 font-italic")},v.a.createElement("span",{className:""},"Capacity: "),v.a.createElement("span",{className:"u-fw-600"},c),v.a.createElement("span",{className:"ml-5"},"Registered: "),v.a.createElement("span",{className:"u-fw-600"},h),v.a.createElement("span",{className:"ml-5"},"Available: "),v.a.createElement("span",{className:"u-fw-600"},ae)),v.a.createElement("div",{className:"d-flex"},v.a.createElement("div",{className:P()("bg-transparent text-dark u-py-1o3 px-4 border font-italic",Nee.a.textBtn),style:{textTransform:"none"},onClick:q},"View ",_,"'s profile"))),v.a.createElement("div",{className:P()(Nee.a.actionsWrapper,"mx-5")},v.a.createElement("div",{className:Nee.a.actions},n&&v.a.createElement(_u,{id:"product-".concat(r),type:"radio",className:"mt-1 u-ml-3o4 u-fs-15o16",checked:D,onChange:V}),v.a.createElement("div",{className:"w-100 u-flex-center justify-content-start"},(k||O)&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"u-flex-center u-fw-500 u-fs-1"},v.a.createElement("i",{className:"fv fuvi-eye u-fs-1x1o4 u-opacity-75"}),v.a.createElement("span",{className:"ml-2 u-text-red"},x.c.nFormatter(M))),v.a.createElement("div",{className:"u-flex-center ml-5 u-fw-500"},v.a.createElement("span",{className:"u-text-dark-blue-bold u-fs-15o16"},"Registrations"),v.a.createElement("span",{className:"ml-2 u-text-red u-fs-1"},x.c.nFormatter(h))))),v.a.createElement("div",null,v.a.createElement("div",{className:"w-100 u-flex-center align-items-start"},v.a.createElement("div",{"d-flex":!0,"flex-column":!0},v.a.createElement("div",{className:P()("u-fs-1x1o6 u-line-height-1 u-fw-600",w&&"u-text-cyan")},p?fe:ue),v.a.createElement("div",{className:P()("u-fs-4o5 u-fw-600 text-right")},de),p&&v.a.createElement("div",{className:P()("u-fs-4o5 u-fw-600 text-right")},he)),v.a.createElement("div",{className:"flex-grow-1"}),v.a.createElement("div",{className:P()(Nee.a.textBtn,"text-uppercase",!me&&"bg-danger",Z||k&&Nee.a.disabled,!ae&&Nee.a.disabled,T&&"u-cursor-default bg-transparent text-success"),onClick:Z||T||!ae?null:oe},Z?v.a.createElement(xn.a,{animation:"border",size:"sm"}):T?"Registered":Object(_t.t)("btn.register"))),me&&!!U&&v.a.createElement("div",{className:"mt-1"},v.a.createElement("a",{target:"_blank",href:null==U?void 0:U.url,title:(null==U?void 0:U.title)||"Live link",className:"u-fs-15o16 u-fw-500 u-truncate-5"},(null==U?void 0:U.title)||"Live link"))),!t&&v.a.createElement("div",{className:"ml-n2 d-flex align-items-center"},k&&pe&&v.a.createElement(Qt,{disabled:!0,tooltipText:Object(_t.t)("publishingStatus.PENDING")},v.a.createElement("img",{width:24,height:24,src:I.a.pendingIcon,alt:"review icon"})),(O||k)&&S===Bee.REJECTED&&v.a.createElement(Qt,{disabled:k,onClick:O?G:void 0,tooltipText:"".concat(Object(_t.t)("publishingStatus.REJECTED"),": ").concat(C)},v.a.createElement("img",{width:24,height:24,src:I.a.rejectedIcon,alt:"review icon"})),O&&!k&&pe&&v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.reviewResource"),onClick:G},v.a.createElement("img",{width:24,height:24,src:I.a.reviewIcon,alt:"review icon"})),k&&v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.editResource"),onClick:j?H:null,disabled:!j},v.a.createElement("img",{width:23,height:23,src:I.a.editIcon,alt:"edit icon"})),(O||k)&&v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.removeResource"),onClick:z},v.a.createElement("i",{className:"fv fuvi-trash-can u-fs-1x1o4"}))))),L&&(null==B?void 0:B.length)>0&&v.a.createElement("div",{className:"flex-shrink-0 u-w-20p px-2"},(B||[]).map((function(e){var t=e.storeId,n=e.storeTitle;return v.a.createElement("div",{className:"w-100 d-flex",id:t},v.a.createElement("span",{className:"u-truncate-2 u-text-green"},n),v.a.createElement(Qt,{tooltipText:"Unlink from community",onClick:X},v.a.createElement("i",{className:"fv fuvi-delete u-fs-1x1o4"})))}))),L&&0==(null==B?void 0:B.length)&&v.a.createElement("div",{className:"flex-shrink-0 u-w-20p px-2"},v.a.createElement(Qt,{tooltipText:"Link to community",onClick:K},v.a.createElement("div",{className:"u-flex-center"},v.a.createElement("i",{className:"fv fuvi-add-item mr-2 u-fs-1x1o4"}),"Link to community")))),!!a&&v.a.createElement("div",{className:"mt-3"},v.a.createElement("div",{className:"u-fw-600 u-fs-15o16"},"Description:"),v.a.createElement(TR,{className:"mt-2 u-fs-7o8 u-text-black",content:a,lineHeight:"1.1rem",maxRows:8,onExpanded:Q})))});var Fee=x.g.WEEK_DAYS,Uee=x.g.PROGRESS_STATUS,Hee=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"calculateTotalHours",(function(t,n,r){var i=Object(Y.cloneDeep)(n||e.props.startDate),a=Object(Y.cloneDeep)(r||e.props.endDate);if(!i||!a||!t)return 0;var o=0,s=[0,0,0,0,0,0,0];t.map((function(e,t){e.selected&&e.startTime&&e.endTime&&(s[0==t?6:t-1]=x.c.hhmmToMinutes(e.endTime)-x.c.hhmmToMinutes(e.startTime))}));for(var l=Object(Y.cloneDeep)(i);l<=a;l.setDate(l.getDate()+1))o+=s[l.getDay()];return Math.round(o/60)})),G()(V()(e),"handleFormChange",(function(t){var n=e.props.onChange;n&&n(t)})),G()(V()(e),"handleDateChange",(function(t,n){var r=e.props.hourlyPrice;if("startDate"===n){var i=t,a=e.props.endDate;Ml()(a).diff(Ml()(i))<0&&(a=i);var o=e.calculateTotalHours(e.props.days,i,a),s=r*o;e.handleFormChange({startDate:i,endDate:a,totalHours:o,price:s})}else{var l=e.props.startDate,c=t,u=e.calculateTotalHours(e.props.days,l,c),d=r*u;e.handleFormChange({startDate:l,endDate:c,totalHours:u,price:d})}})),G()(V()(e),"handleDaySelectedChange",(function(t){var n=e.props.hourlyPrice,r=Object(Y.cloneDeep)(e.props.days);r[t].selected?r[t]={selected:!1,startTime:"",endTime:""}:r[t]={selected:!0,startTime:"",endTime:""};var i=e.calculateTotalHours(r),a=n*i;e.handleFormChange({days:r,totalHours:i,price:a})})),G()(V()(e),"handleTimeChange",(function(t,n,r){var i=e.props.hourlyPrice,a=Object(Y.cloneDeep)(e.props.days);if("startTime"===n){a[r].startTime=t.target.value;var o=e.calculateTotalHours(a),s=i*o;e.handleFormChange({days:a,totalHours:o,price:s})}else{a[r].endTime=t.target.value;var l=e.calculateTotalHours(a),c=i*l;e.handleFormChange({days:a,totalHours:l,price:c})}})),G()(V()(e),"handleTimezoneChange",(function(t){e.handleFormChange({timezone:t.value})})),G()(V()(e),"handleTextInputChange",(function(t){var n=t.target,r=n.name,i=n.value;e.handleFormChange(G()({},r,i))})),G()(V()(e),"handleInputBlur",(function(t){var n=t.target.name;e.props.validator.showMessageFor(n),e.forceUpdate()})),G()(V()(e),"handleProfileSelect",(function(n){var r,i=Object(Y.sortBy)(n,(function(e){return e.path})),a=[];if(i.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),a.push(e)})),a.length<1)x.e.warn(t("message.imageSupportedFiles"));else{if(0===a.length)return x.e.error(t("message.imageRequired")),!1;if(a[0].size>524288e3)return x.e.error(t("message.maxFileSize",{size:"500 MB"})),!1;e.isDirtyProfile=!0,e.handleFormChange({profile:null===(r=a[0])||void 0===r?void 0:r.name,profileFile:a[0]})}})),G()(V()(e),"handleProfileRefresh",(function(t){t.stopPropagation(),e.props.isEdit&&(e.isDirtyProfile=!1,e.handleFormChange({profile:e.props.initialProfile,profileFile:null}))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.isEdit,i=n.isSubmitting,a=n.validator,o=n.startDate,s=n.endDate,l=n.capacity,c=n.timezone,u=n.days,d=n.totalHours,h=n.profile,f=n.profileFile,p=n.profileUploadStatus;return v.a.createElement("div",{className:"w-100 mt-3"},v.a.createElement(T,null,v.a.createElement(k.a,{md:"2"},v.a.createElement($l.a.Label,{className:["mt-2"]},"Start date *"),v.a.createElement(Hu,{className:Nee.a.datePicker,classNameWrap:Nee.a.datePickerInput,disabled:i,selected:o,onSelect:function(t){e.handleDateChange(t,"startDate")},minDate:new Date,dateFormat:"MMM d, yyyy"})),v.a.createElement(k.a,{md:"2"},v.a.createElement($l.a.Label,{className:["mt-2"]},"End date *"),v.a.createElement(Hu,{className:Nee.a.datePicker,classNameWrap:Nee.a.datePickerInput,disabled:i,selected:s,onSelect:function(t){e.handleDateChange(t,"endDate")},minDate:o,dateFormat:"MMM dd, yyyy"})),v.a.createElement(k.a,{md:"2"},v.a.createElement($l.a.Label,{className:["mt-2"]},"Total hours"),v.a.createElement(mu,{name:"totalHours",disabled:i,value:""+d,onChange:function(e){},validatorElement:a.message("totalHours",d,"required|validTotalHours")})),v.a.createElement(k.a,{md:"2"},v.a.createElement($l.a.Label,{className:["mt-2"]},"Capacity"),v.a.createElement(mu,{required:!0,name:"capacity",type:"number",min:0,disabled:i,value:"".concat(l),onChange:this.handleTextInputChange,onBlur:this.handleInputBlur,validatorElement:a.message("capacity",l,"required")}))),v.a.createElement(T,{className:"mt-2"},v.a.createElement(k.a,{md:"2"}," "),v.a.createElement(k.a,{md:"10",className:"d-flex"},u.map((function(t,n){return v.a.createElement("div",{key:"day-".concat(n),className:P()("mr-1",Nee.a.dayItem)},v.a.createElement(_u,{type:"checkbox",id:"day-".concat(n),key:"day-".concat(n),name:Fee[n].CODE,labelName:Fee[n].SHORT,value:Fee[n].CODE,disabled:i,checked:t.selected,onChange:function(){return e.handleDaySelectedChange(n)}}))})))),v.a.createElement(T,{className:"mt-2"},v.a.createElement(k.a,{md:"2",className:"text-right u-fw-500 u-fs-15o16"},"Start time:"),v.a.createElement(k.a,{md:"10",className:"d-flex"},u.map((function(t,n){return v.a.createElement("div",{key:"st-col-".concat(n),className:P()("mr-1",Nee.a.dayItem)},v.a.createElement(mu,{required:!0,type:"time",name:"startTime",disabled:!t.selected||i,value:t.startTime,className:"fv-input u-fs-15o16",classNameError:"u-fs-3o4",onChange:function(t){return e.handleTimeChange(t,"startTime",n)},onBlur:e.handleInputBlur,validatorElement:t.selected?a.message("startTime",t.startTime,"required"):void 0}))})))),v.a.createElement(T,{className:"mt-2"},v.a.createElement(k.a,{md:"2",className:"text-right u-fw-500 u-fs-15o16"},"End time:"),v.a.createElement(k.a,{md:"10",className:"d-flex"},u.map((function(t,n){return v.a.createElement("div",{key:"et-col-".concat(n),className:P()("mr-1",Nee.a.dayItem)},v.a.createElement(mu,{required:!0,type:"time",name:"endTime",disabled:!t.selected||i,value:t.endTime,className:"fv-input u-fs-15o16",classNameError:"u-fs-3o4",onChange:function(t){return e.handleTimeChange(t,"endTime",n)},onBlur:e.handleInputBlur,validatorElement:t.selected?a.message("endTime",u[n].endTime,"required"):void 0}))})))),v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement($l.a.Label,{className:["mt-2"]},t("label.timezone")),v.a.createElement(Wm,{classNameInput:"u-fs-13o16",disabled:i,value:c,onChange:this.handleTimezoneChange})),v.a.createElement(k.a,null,v.a.createElement($l.a.Group,null,v.a.createElement($l.a.Label,{className:["mt-2"]},"Profile *"),v.a.createElement(QT,{isDisabled:i,multiple:!1,acceptedFiles:".pdf,.png,.jpg,.jpeg",receiveAcceptedFiles:this.handleProfileSelect,wrapperClassName:"",innerWrapperClassName:P()(Nee.a.uploadBtn,"fv-input form-control d-flex align-items-center")},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o2"}),v.a.createElement("div",{className:P()("text-truncate flex-grow-1",!h&&"u-opacity-80 u-fs-15o16 font-italic",this.isDirtyProfile&&"text-primary")},h||t("placeholder.addProfile")),r&&f&&v.a.createElement(Qt,{className:"mr-n2",disabled:i,onClick:this.handleProfileRefresh},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-1"}))),p&&v.a.createElement(bt,{animated:!0,className:P()("mt-2",p.status===Uee.FAILED&&"failed"),now:p.now})))))}}]),r}(g.PureComponent),zee=(r(1652),r(80)),Vee=r.n(zee),Wee=r(56),Gee=r.n(Wee),qee=r(88),Yee=r.n(qee);function Kee(e){return"string"==typeof e?e:"label"}function Xee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Qee=0;function $ee(e){return"function"==typeof e}function Jee(e){return"string"==typeof e}function Zee(){}function ete(e,t){var n={};return t.forEach((function(t){n[t]=e[t]})),n}function tte(e){return Qee+=1,(null==e?"":String(e))+Qee}var nte=function(e,t){return Jee(e)||!Xee(e,"paginationOption")&&!Xee(e,"customOption")?(n=$ee(t)?t(e):Jee(e)?e:e[t],Jee(n)||oe()(!1),n):e[Kee(t)];var n};var rte=function(e,t){var n=t.allowNew,r=t.labelKey,i=t.text;return!(!n||!i.trim())&&($ee(n)?n(e,t):!e.some((function(e){return nte(e,r)===i})))},ite=r(253),ate=r.n(ite);function ote(e,t){if(!Jee(e))return e[t]}var ste=[{base:"A",letters:"AⒶＡÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷＢḂḄḆɃƂƁ"},{base:"C",letters:"CⒸＣĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹＤḊĎḌḐḒḎĐƋƊƉꝹÐ"},{base:"DZ",letters:"ǱǄ"},{base:"Dz",letters:"ǲǅ"},{base:"E",letters:"EⒺＥÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻＦḞƑꝻ"},{base:"G",letters:"GⒼＧǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽＨĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾＩÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿＪĴɈ"},{base:"K",letters:"KⓀＫḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁＬĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"Ǉ"},{base:"Lj",letters:"ǈ"},{base:"M",letters:"MⓂＭḾṀṂⱮƜ"},{base:"N",letters:"NⓃＮǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"Ǌ"},{base:"Nj",letters:"ǋ"},{base:"O",letters:"OⓄＯÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"Œ"},{base:"oe",letters:"œ"},{base:"P",letters:"PⓅＰṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆＱꝖꝘɊ"},{base:"R",letters:"RⓇＲŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈＳẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉＴṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊＵÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋＶṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌＷẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍＸẊẌ"},{base:"Y",letters:"YⓎＹỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏＺŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐａẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑｂḃḅḇƀƃɓ"},{base:"c",letters:"cⓒｃćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓｄḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"ǳǆ"},{base:"e",letters:"eⓔｅèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕｆḟƒꝼ"},{base:"g",letters:"gⓖｇǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗｈĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘｉìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙｊĵǰɉ"},{base:"k",letters:"kⓚｋḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛｌŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"ǉ"},{base:"m",letters:"mⓜｍḿṁṃɱɯ"},{base:"n",letters:"nⓝｎǹńñṅňṇņṋṉƞɲŉꞑꞥ"},{base:"nj",letters:"ǌ"},{base:"o",letters:"oⓞｏòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟｐṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠｑɋꝗꝙ"},{base:"r",letters:"rⓡｒŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢｓßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣｔṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤｕùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥｖṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦｗẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧｘẋẍ"},{base:"y",letters:"yⓨｙỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩｚźẑżžẓẕƶȥɀⱬꝣ"}].reduce((function(e,t){var n=t.base;return t.letters.split("").forEach((function(t){e[t]=n})),e}),{});function lte(e){return e.normalize("NFD").replace(new RegExp("[".concat("̀-ͯ").concat("゙゚","]"),"g"),"").replace(/[^\u0000-\u007E]/g,(function(e){return ste[e]||e}))}var cte={};function ute(e,t){if(!e&&-1!==t.indexOf("deprecated")){if(cte[t])return;cte[t]=!0}for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];We.a.apply(void 0,[e,"[react-bootstrap-typeahead] ".concat(t)].concat(r))}function dte(e,t,n){var r=e,i=t;return n.caseSensitive||(r=r.toLowerCase(),i=i.toLowerCase()),n.ignoreDiacritics&&(r=lte(r),i=lte(i)),-1!==i.indexOf(r)}function hte(e,t){var n=t.filterBy,r=t.labelKey,i=t.multiple,a=t.selected,o=t.text;if(i&&a.some((function(t){return ate()(t,e)})))return!1;if($ee(r))return dte(o,r(e),t);var s=n.slice();return Jee(r)&&-1===s.indexOf(r)&&s.unshift(r),Jee(e)?(ute(s.length<=1,"You cannot filter by properties when `option` is a string."),dte(o,e,t)):s.some((function(n){var r=ote(e,n);return Jee(r)||(ute(!1,"Fields passed to `filterBy` should have string values. Value will be converted to a string; results may be unexpected."),r=String(r)),dte(o,r,t)}))}function fte(e){return null!=e.selectionStart}var pte=/[\u0300-\u036F]/;function mte(e,t){var n=new RegExp(function(e){return"string"!=typeof e&&oe()(!1),e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(lte(t)),"i").exec(lte(e));if(!n)return null;var r=n.index,i=n[0].length;if(pte.test(e)){for(var a=0;a<=r;a++)pte.test(e[a])&&(r+=1);for(var o=r;o<=r+i;o++)pte.test(e[o])&&(i+=1)}return{end:r+i,start:r}}var gte=function(e){var t=e.activeIndex,n=e.initialItem,r=e.isFocused,i=e.isMenuShown,a=e.labelKey,o=e.multiple,s=e.selected,l=e.text;if(!l||!r||!i||!n||!Jee(n)&&Xee(n,"customOption")||t>-1||s.length&&!o)return"";var c=nte(n,a),u=mte(c.toLowerCase(),l.toLowerCase());return u&&0===u.start?l+c.slice(u.end,c.length):""};function vte(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"".concat(e,"-item-").concat(t)}var bte=["activeIndex","id","isFocused","isMenuShown","multiple","onClick","onFocus","placeholder"];function yte(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ate(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yte(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yte(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _te=function(e){var t=e.activeIndex,n=e.id,r=e.isFocused,i=e.isMenuShown,a=e.multiple,o=e.onClick,s=e.onFocus,l=e.placeholder,c=Yee()(e,bte);return function(){var e,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=Xee(u,"className")?String(u.className):void 0;return Ate(Ate(Ate(Ate({autoComplete:"off",placeholder:l,type:"text"},u),c),{},{"aria-activedescendant":t>=0?vte(n,t):void 0,"aria-autocomplete":"both","aria-expanded":i,"aria-haspopup":"listbox","aria-multiselectable":a||void 0,"aria-owns":i?n:void 0,className:P()((e={},Gee()(e,d||"",!a),Gee()(e,"focus",r),e))},a&&{inputClassName:d}),{},{onClick:o,onFocus:s,role:"combobox"})}};var wte=function(e){var t=e.activeItem,n=e.labelKey,r=e.multiple,i=e.selected,a=e.text;return t?nte(t,n):!r&&i.length&&i[0]?nte(i[0],n):a};var Ete=function(e){var t=e.allowNew,n=e.highlightOnlyResult,r=e.results;return!(!n||t)&&(1===r.length&&!ote(r[0],"disabled"))};var Ste=function(e,t){return!t||t>=e.length?e:e.slice(0,t)};function Cte(e,t){var n=t[e];return!!n&&!!ote(n,"disabled")}function Tte(e,t,n){for(var r=e;Cte(r,n);)r+="ArrowUp"===t?-1:1;return r}function kte(e,t,n){var r=e;return(r=Tte(r+="ArrowUp"===t?-1:1,t,n))===n.length?r=-1:-2===r&&(r=Tte(r=n.length-1,t,n)),r}function xte(e){e.preventDefault()}function Ote(e){return"lg"===e}function Ite(e){return"sm"===e}var Mte=["className","isInvalid","isValid","size"];function Pte(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dte(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pte(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pte(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nte(e){var t=e.className,n=e.isInvalid,r=e.isValid,i=e.size;return Dte(Dte({},Yee()(e,Mte)),{},{className:P()("form-control","rbt-input",{"form-control-lg":Ote(i),"form-control-sm":Ite(i),"is-invalid":n,"is-valid":r},t)})}var Lte=[{alt:"onBlur",prop:"onBlur"},{alt:"onInputChange",prop:"onChange"},{alt:"onFocus",prop:"onFocus"},{alt:"onKeyDown",prop:"onKeyDown"}],Rte=ne.a.oneOf(["lg","sm"]);function Bte(e,t){return function(n,r,i){ne.a.checkPropTypes(Gee()({},r,e),n,"prop",i),$ee(t)&&t(n,r,i)}}function jte(e,t,n){ute(null!=e[t],"The prop `".concat(t,"` is required to make `").concat(n,"` ")+"accessible for users of assistive technologies such as screen readers.")}var Fte=ne.a.oneOfType([ne.a.object,ne.a.string]);var Ute=["allowNew","delay","emptyLabel","isLoading","minLength","onInputChange","onSearch","options","promptText","searchText","useCache"];function Hte(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zte(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hte(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hte(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}ne.a.number,ne.a.bool.isRequired,ne.a.number,ne.a.func.isRequired,ne.a.arrayOf(Fte),ne.a.node,ne.a.node,ne.a.bool;function Vte(e){var t=e.allowNew,n=e.delay,r=void 0===n?200:n,i=e.emptyLabel,a=e.isLoading,o=e.minLength,s=void 0===o?2:o,l=e.onInputChange,c=e.onSearch,u=e.options,d=void 0===u?[]:u,h=e.promptText,f=void 0===h?"Type to search...":h,p=e.searchText,m=void 0===p?"Searching...":p,v=e.useCache,b=void 0===v||v,y=Yee()(e,Ute),A=Object(g.useRef)({}),_=Object(g.useRef)(null),w=Object(g.useRef)(e.defaultInputValue||""),E=function(){const[,e]=Object(g.useReducer)(e=>!e,!1);return e}(),S=function(e){const t=Object(g.useRef)(null);return Object(g.useEffect)(()=>{t.current=e}),t.current}(e),C=Object(g.useCallback)((function(e){w.current=e,!e||s&&e.length<s||(b&&A.current[e]?E():c(e))}),[E,s,c,b]);Object(g.useEffect)((function(){return _.current=oN()(C,r),function(){_.current&&_.current.cancel()}}),[r,C]),Object(g.useEffect)((function(){!a&&S&&S.isLoading&&b&&(A.current[w.current]=d)}));var T=Object(g.useCallback)((function(e,t){l&&l(e,t),_.current&&_.current(e)}),[l]),k=A.current[w.current];return zte(zte({},y),{},{allowNew:$ee(t)?t:t&&!a,emptyLabel:w.current.length?a?m:i:f,isLoading:a,minLength:s,onInputChange:T,options:b&&k?k:d})}var Wte=r(422),Gte=r.n(Wte),qte=r(423),Yte=r.n(qte),Kte=r(86),Xte=r.n(Kte),Qte=r(424),$te=r.n(Qte),Jte=r(425),Zte=r.n(Jte),ene=r(292),tne=r.n(ene),nne={activeIndex:-1,hintText:"",id:"",initialItem:null,inputNode:null,isOnlyResult:!1,onActiveItemChange:Zee,onAdd:Zee,onInitialItemChange:Zee,onMenuItemClick:Zee,setItem:Zee},rne=Object(g.createContext)(nne),ine=function(){return Object(g.useContext)(rne)};function ane(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function one(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ane(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ane(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sne=["activeIndex","disabled","id","inputRef","isFocused","isMenuShown","multiple","onBlur","onChange","onClick","onFocus","onKeyDown","placeholder"],lne=["activeIndex","hideMenu","isMenuShown","labelKey","onClear","onHide","onRemove","results","selected","text","toggleMenu"],cne=["activeIndex","id","initialItem","inputNode","onActiveItemChange","onAdd","onInitialItemChange","onMenuItemClick","setItem"],une=function(e){var t=e.allowNew,n=e.children,r=e.initialItem,i=e.isMenuShown,a=e.onAdd,o=e.onInitialItemChange,s=e.onKeyDown,l=e.onMenuToggle,c=e.results,u=e.selectHint,d=gte(e);Object(g.useEffect)((function(){t||c.length||o()}));var h=Object(g.useRef)(!0);Object(g.useEffect)((function(){h.current?h.current=!1:l(i)}),[i,l]);var f=one(one({},ete(e,lne)),{},{getInputProps:_te(one(one({},ete(e,sne)),{},{onKeyDown:function(t){if(s(t),r){var n="Enter"===t.key&&Ete(e),i=d&&function(e,t){var n=!1;return"ArrowRight"===e.key&&(n=!fte(e.currentTarget)||e.currentTarget.selectionStart===e.currentTarget.value.length),"Tab"===e.key&&(e.preventDefault(),n=!0),t?t(n,e):n}(t,u);(n||i)&&a(r)}},value:wte(e)}))}),p=one(one({},ete(e,cne)),{},{hintText:d,isOnlyResult:Ete(e)});return v.a.createElement(rne.Provider,{value:p},$ee(n)?n(f):n)};function dne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dne(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fne(e){var t=e.defaultInputValue,n=e.defaultOpen,r=e.defaultSelected,i=e.maxResults,a=e.multiple,o=e.selected?e.selected.slice():r.slice(),s=t;return!a&&o.length&&(s=nte(o[0],e.labelKey),o.length>1&&(o=o.slice(0,1))),{activeIndex:-1,activeItem:void 0,initialItem:void 0,isFocused:!1,selected:o,showMenu:n,shownResults:i,text:s}}function pne(e,t){return hne(hne({},fne(t)),{},{isFocused:e.isFocused,selected:[],text:""})}function mne(e){return hne(hne({},e),{},{isFocused:!0,showMenu:!0})}function gne(e,t){var n=fne(t),r=n.activeIndex,i=n.activeItem,a=n.initialItem,o=n.shownResults;return hne(hne({},e),{},{activeIndex:r,activeItem:i,initialItem:a,showMenu:!1,shownResults:o})}function vne(e,t){return e.showMenu?gne(e,t):hne(hne({},e),{},{showMenu:!0})}var bne=["onChange"];function yne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ane(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yne(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tne()(e);if(t){var i=tne()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zte()(this,n)}}var wne={allowNew:ne.a.oneOfType([ne.a.bool,ne.a.func]),autoFocus:ne.a.bool,caseSensitive:Bte(ne.a.bool,(function(e){var t=e.caseSensitive,n=e.filterBy;ute(!t||"function"!=typeof n,"Your `filterBy` function will override the `caseSensitive` prop.")})),defaultInputValue:Bte(ne.a.string,(function(e){var t=e.defaultInputValue,n=e.defaultSelected,r=e.multiple,i=e.selected,a=n.length?"defaultSelected":"selected";ute(!(!r&&t&&(n.length||i&&i.length)),"`defaultInputValue` will be overridden by the value from `".concat(a,"`."))})),defaultOpen:ne.a.bool,defaultSelected:Bte(ne.a.arrayOf(Fte),(function(e){var t=e.defaultSelected;ute(e.multiple||t.length<=1,"You are passing multiple options to the `defaultSelected` prop of a Typeahead in single-select mode. The selections will be truncated to a single selection.")})),filterBy:ne.a.oneOfType([ne.a.arrayOf(ne.a.string.isRequired),ne.a.func]),highlightOnlyResult:Bte(ne.a.bool,(function(e){var t=e.allowNew;ute(!(e.highlightOnlyResult&&t),"`highlightOnlyResult` will not work with `allowNew`.")})),id:Bte(ne.a.oneOfType([ne.a.number,ne.a.string]),jte),ignoreDiacritics:Bte(ne.a.bool,(function(e){var t=e.filterBy;ute(e.ignoreDiacritics||"function"!=typeof t,"Your `filterBy` function will override the `ignoreDiacritics` prop.")})),labelKey:Bte(ne.a.oneOfType([ne.a.string,ne.a.func]),(function(e){var t=e.allowNew;ute(!($ee(e.labelKey)&&t),"`labelKey` must be a string when `allowNew={true}`.")})),maxResults:ne.a.number,minLength:ne.a.number,multiple:ne.a.bool,onBlur:ne.a.func,onChange:ne.a.func,onFocus:ne.a.func,onInputChange:ne.a.func,onKeyDown:ne.a.func,onMenuToggle:ne.a.func,onPaginate:ne.a.func,open:ne.a.bool,options:ne.a.arrayOf(Fte).isRequired,paginate:ne.a.bool,selected:Bte(ne.a.arrayOf(Fte),(function(e){var t=e.multiple,n=e.onChange,r=e.selected;ute(t||!r||r.length<=1,"You are passing multiple options to the `selected` prop of a Typeahead in single-select mode. This may lead to unexpected behaviors or errors."),ute(!r||r&&$ee(n),"You provided a `selected` prop without an `onChange` handler. If you want the typeahead to be uncontrolled, use `defaultSelected`. Otherwise, set `onChange`.")}))},Ene={allowNew:!1,autoFocus:!1,caseSensitive:!1,defaultInputValue:"",defaultOpen:!1,defaultSelected:[],filterBy:[],highlightOnlyResult:!1,ignoreDiacritics:!0,labelKey:"label",maxResults:100,minLength:0,multiple:!1,onBlur:Zee,onFocus:Zee,onInputChange:Zee,onKeyDown:Zee,onMenuToggle:Zee,onPaginate:Zee,paginate:!0};function Sne(e,t){var n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value");n&&n.set&&n.set.call(e,t);var r=new Event("input",{bubbles:!0});e.dispatchEvent(r)}var Cne=function(e){$te()(n,e);var t=_ne(n);function n(){var e;Gte()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),Gee()(Xte()(e),"state",fne(e.props)),Gee()(Xte()(e),"inputNode",null),Gee()(Xte()(e),"isMenuShown",!1),Gee()(Xte()(e),"items",[]),Gee()(Xte()(e),"blur",(function(){e.inputNode&&e.inputNode.blur(),e.hideMenu()})),Gee()(Xte()(e),"clear",(function(){e.setState(pne)})),Gee()(Xte()(e),"focus",(function(){e.inputNode&&e.inputNode.focus()})),Gee()(Xte()(e),"getInput",(function(){return e.inputNode})),Gee()(Xte()(e),"inputRef",(function(t){e.inputNode=t})),Gee()(Xte()(e),"setItem",(function(t,n){e.items[n]=t})),Gee()(Xte()(e),"hideMenu",(function(){e.setState(gne)})),Gee()(Xte()(e),"toggleMenu",(function(){e.setState(vne)})),Gee()(Xte()(e),"_handleActiveIndexChange",(function(t){e.setState((function(e){return{activeIndex:t,activeItem:t>=0?e.activeItem:void 0}}))})),Gee()(Xte()(e),"_handleActiveItemChange",(function(t){ate()(t,e.state.activeItem)||e.setState({activeItem:t})})),Gee()(Xte()(e),"_handleBlur",(function(t){t.persist(),e.setState({isFocused:!1},(function(){return e.props.onBlur(t)}))})),Gee()(Xte()(e),"_handleChange",(function(t){e.props.onChange&&e.props.onChange(t)})),Gee()(Xte()(e),"_handleClear",(function(){e.inputNode&&Sne(e.inputNode,""),e.setState(pne,(function(){e.props.multiple&&e._handleChange([])}))})),Gee()(Xte()(e),"_handleClick",(function(t){var n;t.persist();var r=null===(n=e.props.inputProps)||void 0===n?void 0:n.onClick;e.setState(mne,(function(){return $ee(r)&&r(t)}))})),Gee()(Xte()(e),"_handleFocus",(function(t){t.persist(),e.setState(mne,(function(){return e.props.onFocus(t)}))})),Gee()(Xte()(e),"_handleInitialItemChange",(function(t){ate()(t,e.state.initialItem)||e.setState({initialItem:t})})),Gee()(Xte()(e),"_handleInputChange",(function(t){t.persist();var n=t.currentTarget.value,r=e.props,i=r.multiple,a=r.onInputChange,o=e.state.selected.length&&!i;e.setState((function(e,t){var r=fne(t),i=r.activeIndex,a=r.activeItem,s=r.shownResults;return{activeIndex:i,activeItem:a,selected:o?[]:e.selected,showMenu:!0,shownResults:s,text:n}}),(function(){a(n,t),o&&e._handleChange([])}))})),Gee()(Xte()(e),"_handleKeyDown",(function(t){var n=e.state.activeItem;if(!e.isMenuShown)return"ArrowUp"!==t.key&&"ArrowDown"!==t.key||e.setState({showMenu:!0}),void e.props.onKeyDown(t);switch(t.key){case"ArrowUp":case"ArrowDown":t.preventDefault(),e._handleActiveIndexChange(kte(e.state.activeIndex,t.key,e.items));break;case"Enter":t.preventDefault(),n&&e._handleMenuItemSelect(n,t);break;case"Escape":case"Tab":e.hideMenu()}e.props.onKeyDown(t)})),Gee()(Xte()(e),"_handleMenuItemSelect",(function(t,n){ote(t,"paginationOption")?e._handlePaginate(n):e._handleSelectionAdd(t)})),Gee()(Xte()(e),"_handlePaginate",(function(t){t.persist(),e.setState((function(e,t){return{shownResults:e.shownResults+t.maxResults}}),(function(){return e.props.onPaginate(t,e.state.shownResults)}))})),Gee()(Xte()(e),"_handleSelectionAdd",(function(t){var n,r,i=e.props,a=i.multiple,o=i.labelKey,s=t;!Jee(s)&&s.customOption&&(s=Ane(Ane({},s),{},{id:tte("new-id-")})),a?(n=e.state.selected.concat(s),r=""):(n=[s],r=nte(s,o)),e.setState((function(e,t){return Ane(Ane({},gne(e,t)),{},{initialItem:s,selected:n,text:r})}),(function(){return e._handleChange(n)}))})),Gee()(Xte()(e),"_handleSelectionRemove",(function(t){var n=e.state.selected.filter((function(e){return!ate()(e,t)}));e.focus(),e.setState((function(e,t){return Ane(Ane({},gne(e,t)),{},{selected:n})}),(function(){return e._handleChange(n)}))})),e}return Yte()(n,[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.focus()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.labelKey,i=n.multiple,a=n.selected;!function(e,t){var n,r,i,a=!e&&t;a?(n="uncontrolled",r="controlled",i="an"):(n="controlled",r="uncontrolled",i="a"),ute(!(a||e&&!t),"You are changing ".concat(i," ").concat(n," typeahead to be ").concat(r,". ")+"Input elements should not switch from ".concat(n," to ").concat(r," (or vice versa). ")+"Decide between using a controlled or uncontrolled element for the lifetime of the component.")}(a,e.selected),a&&!ate()(a,t.selected)&&(this.setState({selected:a}),i||this.setState({text:a.length?nte(a[0],r):""}))}},{key:"render",value:function(){var e=this.props,t=(e.onChange,Ane(Ane({},Yee()(e,bne)),this.state)),n=t.filterBy,r=t.labelKey,i=t.options,a=t.paginate,o=t.shownResults,s=t.text;this.isMenuShown=function(e){var t=e.open,n=e.minLength,r=e.showMenu,i=e.text;return t||!1===t?t:!(i.length<n)&&r}(t),this.items=[];var l=[];if(this.isMenuShown){var c=$ee(n)?n:hte;l=i.filter((function(e){return c(e,t)}));var u,d=a&&l.length>o;if(l=Ste(l,o),rte(l,t)&&l.push(Gee()({customOption:!0},Kee(r),s)),d)l.push((u={},Gee()(u,Kee(r),""),Gee()(u,"paginationOption",!0),u))}return(v.a.createElement(une,Vee()({},t,{hideMenu:this.hideMenu,inputNode:this.inputNode,inputRef:this.inputRef,isMenuShown:this.isMenuShown,onActiveItemChange:this._handleActiveItemChange,onAdd:this._handleSelectionAdd,onBlur:this._handleBlur,onChange:this._handleInputChange,onClear:this._handleClear,onClick:this._handleClick,onFocus:this._handleFocus,onHide:this.hideMenu,onInitialItemChange:this._handleInitialItemChange,onKeyDown:this._handleKeyDown,onMenuItemClick:this._handleMenuItemSelect,onRemove:this._handleSelectionRemove,results:l,setItem:this.setItem,toggleMenu:this.toggleMenu})))}}]),n}(v.a.Component);Gee()(Cne,"propTypes",wne),Gee()(Cne,"defaultProps",Ene);var Tne=Cne,kne=["className","label","onClick","onKeyDown","size"],xne={label:ne.a.string,onClick:ne.a.func,onKeyDown:ne.a.func,size:Rte},One=function(e){var t=e.className,n=e.label,r=void 0===n?"Clear":n,i=e.onClick,a=e.onKeyDown,o=e.size,s=Yee()(e,kne);return(v.a.createElement("button",Vee()({},s,{"aria-label":r,className:P()("close","btn-close","rbt-close",{"rbt-close-lg":Ote(o),"rbt-close-sm":Ite(o)},t),onClick:function(e){e.stopPropagation(),i&&i(e)},onKeyDown:function(e){"Backspace"===e.key&&e.preventDefault(),a&&a(e)},type:"button"}),v.a.createElement("span",{"aria-hidden":"true",className:"rbt-close-content"},"×"),v.a.createElement("span",{className:"sr-only visually-hidden"},r)))};One.propTypes=xne;var Ine=One,Mne={label:ne.a.string},Pne=function(e){var t=e.label,n=void 0===t?"Loading...":t;return(v.a.createElement("div",{className:"rbt-loader spinner-border spinner-border-sm",role:"status"},v.a.createElement("span",{className:"sr-only visually-hidden"},n)))};Pne.propTypes=Mne;var Dne=Pne,Nne=r(332),Lne=r.n(Nne),Rne=r(427),Bne=r(399),jne=r(397),Fne=r(398),Une=r(136),Hne=r(90);var zne={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];Object(Hne.b)(i)&&Object(Une.a)(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Object(Hne.b)(r)&&Object(Une.a)(r)&&(Object.assign(r.style,a),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},Vne=r(400),Wne=r(428),Gne=r(434),qne=r(401),Yne=r(391),Kne=[Bne.a,jne.a,Fne.a,zne,Vne.a,Wne.a,Gne.a,qne.a,Yne.a],Xne=Object(Rne.a)({defaultModifiers:Kne}),Qne=r(1042),$ne=r.n(Qne),Jne=function(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})},Zne="undefined"!=typeof window&&window.document&&window.document.createElement?g.useLayoutEffect:g.useEffect,ere=[];function tre(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nre(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tre(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tre(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rre={enabled:!0,fn:function(e){e.state.styles.popper.width="".concat(e.state.rects.reference.width,"px")},name:"setPopperWidth",phase:"write"};function ire(e){var t="right"===e.align?"end":"start",n=e.dropup?"top":"bottom";return"".concat(n,"-").concat(t)}var are=function(e,t){var n,r,i=Object(g.useState)(null),a=Lne()(i,2),o=a[0],s=a[1],l=function(e,t,n){void 0===n&&(n={});var r=g.useRef(null),i={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||ere},a=g.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),o=a[0],s=a[1],l=g.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);go.flushSync((function(){s({styles:Jne(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:Jne(n.map((function(e){return[e,t.attributes[e]]})))})}))},requires:["computeStyles"]}}),[]),c=g.useMemo((function(){var e={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[l,{name:"applyStyles",enabled:!1}])};return $ne()(r.current,e)?r.current||e:(r.current=e,e)}),[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,l]),u=g.useRef();return Zne((function(){u.current&&u.current.setOptions(c)}),[c]),Zne((function(){if(null!=e&&null!=t){var r=(n.createPopper||Xne)(e,t,c);return u.current=r,function(){r.destroy(),u.current=null}}}),[e,t,n.createPopper]),{state:u.current?u.current.state:null,styles:o.styles,attributes:o.attributes,update:u.current?u.current.update:null,forceUpdate:u.current?u.current.forceUpdate:null}}(e,o,{modifiers:(n=t,r=[{enabled:!!n.flip,name:"flip"}],"right"!==n.align&&"left"!==n.align&&r.push(rre),r),placement:ire(t),strategy:t.positionFixed?"fixed":"absolute"}),c=l.attributes,u=l.styles,d=l.forceUpdate,h=null==e?void 0:e.offsetHeight;return Object(g.useEffect)((function(){d&&d()}),[h]),nre(nre({},c.popper),{},{innerRef:s,style:u.popper})},ore=["referenceElement","isMenuShown"],sre="undefined"==typeof Element?Zee:Element,lre={align:ne.a.oneOf(["justify","left","right"]),children:ne.a.func.isRequired,dropup:ne.a.bool,flip:ne.a.bool,isMenuShown:ne.a.bool,positionFixed:ne.a.bool,referenceElement:ne.a.instanceOf(sre)},cre=function(e){var t=e.referenceElement,n=e.isMenuShown,r=Yee()(e,ore),i=are(t,r);return n?r.children(i):null};cre.propTypes=lre;var ure=cre;var dre=!("undefined"==typeof window||!window.document||!window.document.createElement),hre=!1,fre=!1;try{var pre={get passive(){return hre=!0},get once(){return fre=hre=!0}};dre&&(window.addEventListener("test",pre,pre),window.removeEventListener("test",pre,!0))}catch(mm){}var mre=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!fre){var i=r.once,a=r.capture,o=n;!fre&&i&&(o=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=o),e.addEventListener(t,o,hre?r:a)}e.addEventListener(t,n,r)};var gre=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)};var vre=function(e,t,n,r){return mre(e,t,n,r),function(){gre(e,t,n,r)}};var bre=function(e){const t=Object(g.useRef)(e);return Object(g.useEffect)(()=>{t.current=e},[e]),t};function yre(e){const t=bre(e);return Object(g.useCallback)((function(...e){return t.current&&t.current(...e)}),[t])}var Are=function(e){return(t=function(e){return e&&"setState"in e?vo.a.findDOMNode(e):null!=e?e:null}(e))&&t.ownerDocument||document;var t},_re=function(){};var wre=function(e){return e&&("current"in e?e.current:e)};var Ere=function(e,t,n){var r=void 0===n?{}:n,i=r.disabled,a=r.clickTrigger,o=void 0===a?"click":a,s=Object(g.useRef)(!1),l=t||_re,c=Object(g.useCallback)((function(t){var n,r,i,a,o=wre(e);We()(!!o,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),s.current=!(o&&(a=t,!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey))&&function(e){return 0===e.button}(t)&&(r=o,i=null!=(n=null==t.composedPath?void 0:t.composedPath()[0])?n:t.target,!(r.contains?r.contains(i):r.compareDocumentPosition?r===i||16&r.compareDocumentPosition(i):void 0)))}),[e]),u=yre((function(e){s.current||l(e)})),d=yre((function(e){27===e.keyCode&&l(e)}));Object(g.useEffect)((function(){if(!i&&null!=e){var t=window.event,n=Are(wre(e)),r=vre(n,o,c,!0),a=vre(n,o,(function(e){e!==t?u(e):t=void 0})),s=vre(n,"keyup",(function(e){e!==t?d(e):t=void 0})),l=[];return"ontouchstart"in n.documentElement&&(l=[].slice.call(n.body.children).map((function(e){return vre(e,"mousemove",_re)}))),function(){r(),a(),s(),l.forEach((function(e){return e()}))}}}),[e,i,o,c,u,d])};var Sre=function(e,t){var n=Object(g.useRef)(null);return Ere(n.current,e,t),n},Cre=["children","onRootClose"];var Tre=function(e){var t=e.children,n=e.onRootClose,r=Yee()(e,Cre);return t(Sre(n,r))},kre=["onBlur","onClick","onFocus","onRemove","option"];function xre(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ore(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xre(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xre(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}ne.a.func,ne.a.func,ne.a.func,ne.a.func,Fte.isRequired;function Ire(e){var t=e.onBlur,n=e.onClick,r=e.onFocus,i=e.onRemove,a=e.option,o=Yee()(e,kre),s=Object(g.useState)(!1),l=Lne()(s,2),c=l[0],u=l[1],d=Object(g.useState)(null),h=Lne()(d,2),f=h[0],p=h[1],m=function(e){u(!1),t&&t(e)},v=function(){i&&i(a)};return Ere(f,m,Ore(Ore({},o),{},{disabled:!c})),{active:c,onBlur:m,onClick:function(e){u(!0),n&&n(e)},onFocus:function(e){u(!0),r&&r(e)},onKeyDown:function(e){"Backspace"===e.key&&c&&(e.preventDefault(),v())},onRemove:$ee(i)?v:void 0,ref:p}}var Mre=["active","children","className","onRemove","tabIndex"],Pre=["children","option","readOnly"],Dre=["ref"];function Nre(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lre(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nre(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nre(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rre=Object(g.forwardRef)((function(e,t){var n=e.active,r=e.children,i=e.className,a=e.onRemove,o=e.tabIndex,s=Yee()(e,Mre);return(v.a.createElement("div",Vee()({},s,{className:P()("rbt-token","rbt-token-removeable",{"rbt-token-active":!!n},i),ref:t,tabIndex:o||0}),r,v.a.createElement(Ine,{className:"rbt-token-remove-button",label:"Remove",onClick:a,tabIndex:-1})))})),Bre=function(e){var t=e.children,n=e.className,r=e.disabled,i=e.href,a=P()("rbt-token",{"rbt-token-disabled":r},n);return i&&!r?v.a.createElement("a",{className:a,href:i},t):v.a.createElement("div",{className:a},t)},jre=function(e){var t=e.children,n=e.option,r=e.readOnly,i=Yee()(e,Pre),a=Ire(Lre(Lre({},i),{},{option:n})),o=a.ref,s=Yee()(a,Dre),l=v.a.createElement("div",{className:"rbt-token-label"},t);return i.disabled||r||!$ee(s.onRemove)?v.a.createElement(Bre,i,l):v.a.createElement(Rre,Vee()({},i,s,{ref:o}),l)};function Fre(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n&&(n=n.replace(n[0],n[0].toUpperCase())),["Top","Right","Bottom","Left"].map((function(r){return e["".concat(t).concat(r).concat(n)]})).join(" ")}var Ure=function(){var e=ine(),t=e.hintText,n=e.inputNode,r=Object(g.useRef)(null);return Object(g.useEffect)((function(){n&&r.current&&function(e,t){var n=window.getComputedStyle(e);t.style.borderStyle=Fre(n,"border","style"),t.style.borderWidth=Fre(n,"border","width"),t.style.fontSize=n.fontSize,t.style.fontWeight=n.fontWeight,t.style.height=n.height,t.style.lineHeight=n.lineHeight,t.style.margin=Fre(n,"margin"),t.style.padding=Fre(n,"padding")}(n,r.current)})),{hintRef:r,hintText:t}},Hre=function(e){var t=e.children,n=e.className,r=Ure(),i=r.hintRef,a=r.hintText;return v.a.createElement("div",{className:n,style:{display:"flex",flex:1,height:"100%",position:"relative"}},t,v.a.createElement("input",{"aria-hidden":!0,className:"rbt-input-hint",ref:i,readOnly:!0,style:{backgroundColor:"transparent",borderColor:"transparent",boxShadow:"none",color:"rgba(0, 0, 0, 0.54)",left:0,pointerEvents:"none",position:"absolute",top:0,width:"100%"},tabIndex:-1,value:a}))},zre=Object(g.forwardRef)((function(e,t){return v.a.createElement("input",Vee()({},e,{className:P()("rbt-input-main",e.className),ref:t}))})),Vre=["children","className","inputClassName","inputRef","referenceElementRef","selected"];var Wre=function(e){var t=v.a.useRef(null),n=v.a.useRef(null),r=Nte(e),i=r.children,a=r.className,o=r.inputClassName,s=(r.inputRef,r.referenceElementRef),l=r.selected,c=Yee()(r,Vre);function u(t){if(e.disabled)t.currentTarget.blur();else{var r=n.current;!r||t.currentTarget.contains(t.target)&&t.currentTarget!==t.target||(fte(r)&&(r.selectionStart=r.value.length),r.focus())}}return v.a.createElement("div",{className:P()("rbt-input-multi",{disabled:e.disabled},a),onClick:u,onFocus:u,ref:s,tabIndex:-1},v.a.createElement("div",{className:"rbt-input-wrapper",ref:t},i,v.a.createElement(Hre,null,v.a.createElement(zre,Vee()({},c,{className:o,onKeyDown:function(n){if("Backspace"===n.key&&l.length&&!e.value){var r;n.preventDefault();var i=null===(r=t.current)||void 0===r?void 0:r.children;if(null!=i&&i.length){var a=i[i.length-2];null==a||a.focus()}}e.onKeyDown&&e.onKeyDown(n)},ref:function(t){n.current=t,e.inputRef(t)},style:{backgroundColor:"transparent",border:0,boxShadow:"none",cursor:"inherit",outline:"none",padding:0,width:"100%",zIndex:1}})))))},Gre=["inputRef","referenceElementRef"],qre=function(e){var t=e.inputRef,n=e.referenceElementRef,r=Yee()(e,Gre);return(v.a.createElement(Hre,null,v.a.createElement(zre,Vee()({},Nte(r),{ref:function(e){t(e),n(e)}}))))},Yre={children:ne.a.string.isRequired,highlightClassName:ne.a.string,search:ne.a.string.isRequired},Kre=function(e){var t=e.children,n=e.highlightClassName,r=void 0===n?"rbt-highlight-text":n,i=e.search;if(!i||!t)return v.a.createElement(v.a.Fragment,null,t);for(var a=0,o=t,s=[];o;){var l=mte(o,i);if(!l){s.push(o);break}var c=o.slice(0,l.start);c&&s.push(c);var u=o.slice(l.start,l.end);s.push(v.a.createElement("mark",{className:r,key:a},u)),a+=1,o=o.slice(l.end)}return(v.a.createElement(v.a.Fragment,null,s))};Kre.propTypes=Yre;var Xre=Kre;const Qre=e=>"object"==typeof e&&null!=e&&1===e.nodeType,$re=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Jre=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return $re(n.overflowY,t)||$re(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Zre=(e,t,n,r,i,a,o,s)=>a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0,eie=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},tie=(e,t)=>{var n,r,i,a;if("undefined"==typeof document)return[];const{scrollMode:o,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=t,d="function"==typeof c?c:e=>e!==c;if(!Qre(e))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,f=[];let p=e;for(;Qre(p)&&d(p);){if(p=eie(p),p===h){f.push(p);break}null!=p&&p===document.body&&Jre(p)&&!Jre(document.documentElement)||null!=p&&Jre(p,u)&&f.push(p)}const m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(a=null==(i=window.visualViewport)?void 0:i.height)?a:innerHeight,{scrollX:v,scrollY:b}=window,{height:y,width:A,top:_,right:w,bottom:E,left:S}=e.getBoundingClientRect(),{top:C,right:T,bottom:k,left:x}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let O="start"===s||"nearest"===s?_-C:"end"===s?E+k:_+y/2-C+k,I="center"===l?S+A/2-x+T:"end"===l?w+T:S-x;const M=[];for(let e=0;e<f.length;e++){const t=f[e],{height:n,width:r,top:i,right:a,bottom:c,left:u}=t.getBoundingClientRect();if("if-needed"===o&&_>=0&&S>=0&&E<=g&&w<=m&&_>=i&&E<=c&&S>=u&&w<=a)return M;const d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),C=parseInt(d.borderTopWidth,10),T=parseInt(d.borderRightWidth,10),k=parseInt(d.borderBottomWidth,10);let x=0,P=0;const D="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-T:0,N="offsetHeight"in t?t.offsetHeight-t.clientHeight-C-k:0,L="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(h===t)x="start"===s?O:"end"===s?O-g:"nearest"===s?Zre(b,b+g,g,C,k,b+O,b+O+y,y):O-g/2,P="start"===l?I:"center"===l?I-m/2:"end"===l?I-m:Zre(v,v+m,m,p,T,v+I,v+I+A,A),x=Math.max(0,x+b),P=Math.max(0,P+v);else{x="start"===s?O-i-C:"end"===s?O-c+k+N:"nearest"===s?Zre(i,c,n,C,k+N,O,O+y,y):O-(i+n/2)+N/2,P="start"===l?I-u-p:"center"===l?I-(u+r/2)+D/2:"end"===l?I-a+T+D:Zre(u,a,r,p,T+D,I,I+A,A);const{scrollLeft:e,scrollTop:o}=t;x=0===R?0:Math.max(0,Math.min(o+x/R,t.scrollHeight-n/R+N)),P=0===L?0:Math.max(0,Math.min(e+P/L,t.scrollWidth-r/L+D)),O+=o-x,I+=e-P}M.push({el:t,top:x,left:P})}return M};function nie(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(tie(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:i,top:a,left:o}of tie(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=a-n.top+n.bottom,t=o-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}var rie=["label","onClick","option","position"];function iie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iie(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Fte.isRequired,ne.a.number;function oie(e){var t=e.label,n=e.onClick,r=e.option,i=e.position,a=Yee()(e,rie),o=ine(),s=o.activeIndex,l=o.id,c=o.isOnlyResult,u=o.onActiveItemChange,d=o.onInitialItemChange,h=o.onMenuItemClick,f=o.setItem,p=Object(g.useRef)(null);Object(g.useEffect)((function(){0===i&&d(r)})),Object(g.useEffect)((function(){if(i===s){u(r);var e=p.current;e&&nie(e,{boundary:e.parentNode,scrollMode:"if-needed"})}}),[s,u,r,i]);var m=Object(g.useCallback)((function(e){h(r,e),n&&n(e)}),[n,h,r]),v=c||s===i;return f(r,i),aie(aie({},a),{},{active:v,"aria-label":t,"aria-selected":v,id:vte(l,i),onClick:m,onMouseDown:xte,ref:p,role:"option"})}var sie=["active","children","className","disabled","onClick"],lie=Object(g.forwardRef)((function(e,t){var n=e.active,r=e.children,i=e.className,a=e.disabled,o=e.onClick,s=Yee()(e,sie);return(v.a.createElement("a",Vee()({},s,{className:P()("dropdown-item",{active:n,disabled:a},i),href:s.href||"#",onClick:function(e){e.preventDefault(),!a&&o&&o(e)},ref:t}),r))}));function cie(e){return v.a.createElement(lie,oie(e))}var uie=["emptyLabel","innerRef","maxHeight","style"];function die(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?die(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):die(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fie={"aria-label":ne.a.string,emptyLabel:ne.a.node,id:Bte(ne.a.oneOfType([ne.a.number,ne.a.string]),jte),maxHeight:ne.a.string},pie=function(e){var t=e.emptyLabel,n=void 0===t?"No matches found.":t,r=e.innerRef,i=e.maxHeight,a=void 0===i?"300px":i,o=e.style,s=Yee()(e,uie),l=0===g.Children.count(s.children)?v.a.createElement(lie,{disabled:!0,role:"option"},n):s.children;return v.a.createElement("div",Vee()({},s,{"aria-label":s["aria-label"]||"menu-options",className:P()("rbt-menu","dropdown-menu","show",s.className),onMouseDown:xte,ref:r,role:"listbox",style:hie(hie({},o),{},{display:"block",maxHeight:a,overflow:"auto"})}),l)};pie.propTypes=fie,pie.Divider=function(){return v.a.createElement("div",{className:"dropdown-divider",role:"separator"})},pie.Header=function(e){return v.a.createElement("div",Vee()({},e,{className:"dropdown-header",role:"heading"}))};var mie=pie,gie=["labelKey","newSelectionPrefix","options","paginationText","renderMenuItemChildren","text"],vie={newSelectionPrefix:ne.a.node,paginationText:ne.a.node,renderMenuItemChildren:ne.a.func};function bie(e,t){return v.a.createElement(Xre,{search:t.text},nte(e,t.labelKey))}var yie=function(e){var t=e.labelKey,n=e.newSelectionPrefix,r=void 0===n?"New selection: ":n,i=e.options,a=e.paginationText,o=void 0===a?"Display additional results...":a,s=e.renderMenuItemChildren,l=void 0===s?bie:s,c=e.text,u=Yee()(e,gie);return v.a.createElement(mie,Vee()({},u,{key:c}),i.map((function(n,i){var a=nte(n,t),s={disabled:!!ote(n,"disabled"),label:a,option:n,position:i};return ote(n,"customOption")?v.a.createElement(cie,Vee()({},s,{className:"rbt-menu-custom-option",key:i,label:a}),r,v.a.createElement(Xre,{search:c},a)):ote(n,"paginationOption")?v.a.createElement(v.a.Fragment,{key:"pagination-option-divider"},v.a.createElement(mie.Divider,null),v.a.createElement(cie,Vee()({},s,{className:"rbt-menu-pagination-option",label:Jee(o)?o:""}),o)):v.a.createElement(cie,Vee()({},s,{key:i}),l(n,e,i))})))};yie.propTypes=vie;var Aie=yie;function _ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_ie(Object(n),!0).forEach((function(t){Gee()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Eie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tne()(e);if(t){var i=tne()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zte()(this,n)}}var Sie={clearButton:ne.a.bool,inputProps:Bte(ne.a.object,(function(e){var t=e.inputProps;t&&"[object Object]"===Object.prototype.toString.call(t)&&Lte.forEach((function(e){var n=e.alt,r=e.prop,i=n?" Use the top-level `".concat(n,"` prop instead."):null;ute(!t[r],"The `".concat(r,"` property of `inputProps` will be ignored.").concat(i))}))})),isInvalid:ne.a.bool,isLoading:ne.a.bool,isValid:ne.a.bool,renderInput:ne.a.func,renderMenu:ne.a.func,renderToken:ne.a.func,size:Rte},Cie=function(e,t,n){return v.a.createElement(Aie,Vee()({},t,{labelKey:n.labelKey,options:e,text:n.text}))},Tie=function(e,t,n){return v.a.createElement(jre,{disabled:t.disabled,key:n,onRemove:t.onRemove,option:e,tabIndex:t.tabIndex},nte(e,t.labelKey))},kie=["align","dropup","flip","positionFixed"];var xie=function(e){$te()(n,e);var t=Eie(n);function n(){var e;Gte()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),Gee()(Xte()(e),"_referenceElement",null),Gee()(Xte()(e),"referenceElementRef",(function(t){e._referenceElement=t})),Gee()(Xte()(e),"_renderInput",(function(t,n){var r=e.props,i=r.isInvalid,a=r.isValid,o=r.multiple,s=r.renderInput,l=r.renderToken,c=r.size;if($ee(s))return s(t,n);var u=wie(wie({},t),{},{isInvalid:i,isValid:a,size:c});if(!o)return v.a.createElement(qre,u);var d=n.labelKey,h=n.onRemove,f=n.selected;return(v.a.createElement(Wre,Vee()({},u,{placeholder:f.length?"":t.placeholder,selected:f}),f.map((function(e,t){return(l||Tie)(e,wie(wie({},u),{},{labelKey:d,onRemove:h}),t)}))))})),Gee()(Xte()(e),"_renderMenu",(function(t,n,r){var i=e.props,a=i.emptyLabel,o=i.id,s=i.maxHeight,l=i.newSelectionPrefix,c=i.paginationText,u=i.renderMenu,d=i.renderMenuItemChildren;return(u||Cie)(t,wie(wie({},n),{},{emptyLabel:a,id:o,maxHeight:s,newSelectionPrefix:l,paginationText:c,renderMenuItemChildren:d}),r)})),Gee()(Xte()(e),"_renderAux",(function(t){var n,r=t.onClear,i=t.selected,a=e.props,o=a.clearButton,s=a.disabled,l=a.isLoading,c=a.size;return l?n=v.a.createElement(Dne,null):o&&!s&&i.length&&(n=v.a.createElement(Ine,{onClick:r,onMouseDown:xte,size:c})),n?v.a.createElement("div",{className:P()("rbt-aux",{"rbt-aux-lg":Ote(c)})},n):null})),e}return Yte()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,i=t.instanceRef,a=t.open,o=t.options,s=t.style;return v.a.createElement(Tne,Vee()({},this.props,{options:o,ref:i}),(function(t){var i=t.hideMenu,o=t.isMenuShown,l=t.results,c=e._renderAux(t);return v.a.createElement(Tre,{disabled:a||!o,onRootClose:i},(function(i){return v.a.createElement("div",{className:P()("rbt",{"has-aux":!!c,"is-invalid":e.props.isInvalid,"is-valid":e.props.isValid},r),ref:i,style:wie(wie({},s),{},{outline:"none",position:"relative"}),tabIndex:-1},e._renderInput(wie(wie({},t.getInputProps(e.props.inputProps)),{},{referenceElementRef:e.referenceElementRef}),t),v.a.createElement(ure,Vee()({},function(e){return ete(e,kie)}(e.props),{isMenuShown:o,referenceElement:e._referenceElement}),(function(n){return e._renderMenu(l,n,t)})),c,$ee(n)?n(t):n)}))}))}}]),n}(v.a.Component);Gee()(xie,"propTypes",Sie),Gee()(xie,"defaultProps",{isLoading:!1});var Oie=Object(g.forwardRef)((function(e,t){return v.a.createElement(xie,Vee()({},e,{instanceRef:t}))})),Iie=Object(g.forwardRef)((function(e,t){return v.a.createElement(Oie,Vee()({},Vte(e),{ref:t}))})),Mie=["bsPrefix","size","hasValidation","className","as"],Pie=Object(it.a)("input-group-append"),Die=Object(it.a)("input-group-prepend"),Nie=Object(it.a)("input-group-text",{Component:"span"}),Lie=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.size,i=e.hasValidation,a=e.className,o=e.as,s=void 0===o?"div":o,l=Object(y.a)(e,Mie);return n=Object(w.a)(n,"input-group"),v.a.createElement(s,Object(b.a)({ref:t},l,{className:_()(a,n,r&&n+"-"+r,i&&"has-validation")}))}));Lie.displayName="InputGroup",Lie.Text=Nie,Lie.Radio=function(e){return v.a.createElement(Nie,null,v.a.createElement("input",Object(b.a)({type:"radio"},e)))},Lie.Checkbox=function(e){return v.a.createElement(Nie,null,v.a.createElement("input",Object(b.a)({type:"checkbox"},e)))},Lie.Append=Pie,Lie.Prepend=Die;var Rie=Lie;var Bie=x.g.KEYWORD_CATEGORIES,jie=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{courses:[],options:[],selectedCourse:void 0,keywords:[],keywordSuggestions:[]}),G()(V()(e),"performStateMerge",(function(t){var n=e.props.onPerformingStateMerge;n&&n(t)})),G()(V()(e),"executeSearch",(function(t){var n=e.props.searchPublicCourses;n&&(e.setState({isLoading:!0}),n({keyword:t},(function(t){var n=Object(Y.sortBy)(t,(function(e){return e.title}));e.setState({options:n,isLoading:!1})}),(function(t){console.log(t),e.setState({isLoading:!1})})))})),G()(V()(e),"handleSearch",(function(t){e.executeSearch(t)})),G()(V()(e),"handleSelectedVideoChange",(function(t){t&&t.length>0?e.setState({selectedCourse:t[0]}):e.setState({selectedCourse:void 0})})),G()(V()(e),"handleAddSelectedCourse",(function(){var t=e.state,n=t.selectedCourse,r=t.courses;if(n)if(r.some((function(e){return e.id===n.id})))e.setState({selectedCourse:void 0});else{var i=Object(Y.cloneDeep)(r);i.push(n),e.setState({courses:i,selectedCourse:void 0},(function(){e.performStateMerge({linkedCourses:i})}))}})),G()(V()(e),"handleRemoveCourse",(function(t){var n=e.state.courses.filter((function(e){return e.id!==t}));e.setState({courses:n},(function(){e.performStateMerge({linkedCourses:n})}))})),G()(V()(e),"handleSearchKeyword",Object(Y.debounce)((function(t){var n=e.props.searchKeyword;void 0===t||t.length<1||e.validateKeyword({name:t})&&n({category:Bie.VIDEO_KEYWORD,terms:t},(function(n){var r=n.content,i=e.state.keywords;t=t.toLowerCase().trim();var a=r.filter((function(e){return!Object(Y.find)(i,(function(t){var n=t.name;return n&&n.toLowerCase()===e.name.toLowerCase()}))}));0==a.length?a.push({id:t,name:t,isAddNew:!0}):(a=a.filter((function(e){return e.name.toLowerCase().indexOf(t)>-1})).sort((function(e,n){var r=e.name.toLowerCase(),i=n.name.toLowerCase();if(r===i)return 0;var a=r.indexOf(t),o=i.indexOf(t);return a==o?r.localeCompare(i):a-o})),-1==r.findIndex((function(e){return e.name.toLowerCase()===t}))&&a.push({id:t,name:t,isAddNew:!0}));a.length>10&&(a=[].concat(Rl()(a.slice(0,9)),[a[a.length-1]])),e.setState({keywordSuggestions:a})}))}),500)),G()(V()(e),"handleKeywordSelect",(function(t){var n=e.state.keywords;if(t&&t.isAddNew){(0,e.props.createVideoKeyword)({category:Bie.VIDEO_KEYWORD,names:[t.name]},(function(){var r=[].concat(Rl()(n),[{name:t.name}]).map((function(e){return e.name}));e.performStateMerge({tags:r})}))}else{var r=[].concat(Rl()(n),[{name:t.name}]).map((function(e){return e.name}));e.performStateMerge({tags:r})}})),G()(V()(e),"handleKeywordDelete",(function(t){var n=e.state.keywords;n.splice(t,1);var r=n.map((function(e){return e.name}));e.performStateMerge({tags:r})})),G()(V()(e),"validateKeyword",(function(t){var n=e.state.keywords,r=(null==t?void 0:t.name)?null==t?void 0:t.name.replace(/\s+/g," ").trim():"";return 0!==r.length&&(!(r.length>x.g.CREATE_COGVID_CONSTRAINTS.KEYWORD_LENGTH_LIMIT)&&!Object(Y.find)(n,(function(e){var t=e.name;return t&&t.toLowerCase()===r.toLowerCase()})))})),G()(V()(e),"componentDidUpdate",(function(){var t=e.props,n=t.linkedCourses,r=t.tags;e.setState({courses:n||[],keywords:r||[]})})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.options,r=t.courses,i=t.selectedCourse,a=t.keywords,o=t.keywordSuggestions,s=i?[i]:[];return v.a.createElement(T,{className:"mt-2"},v.a.createElement(k.a,{md:"8"},v.a.createElement($l.a.Group,null,v.a.createElement($l.a.Label,{className:["mt-2"]},"Courses"),v.a.createElement(Rie,null,v.a.createElement(Iie,{filterBy:function(){return!0},id:"coursePicker",minLength:0,labelKey:function(e){return"".concat(e.title," - ").concat(e.author)},options:n,selected:s,placeholder:"Select course",renderMenuItemChildren:function(e,t){t.text;return v.a.createElement("div",null,v.a.createElement("div",null,e.title," - ",e.author),v.a.createElement("div",{className:"ml-3"},v.a.createElement("small",null,v.a.createElement("i",null,e.subject,"   ",e.topic))))},onSearch:this.handleSearch,onInputChange:this.handleInputChange,onChange:this.handleSelectedVideoChange}),v.a.createElement(et.a,{title:"add",disabled:null==i,onClick:this.handleAddSelectedCourse},"+")),v.a.createElement("div",{style:{minHeight:"120px",border:"1px solid #86c9cf",marginTop:"-1px",padding:"0.375rem 0.75rem"}},r.map((function(t){return v.a.createElement(T,{key:t.id},v.a.createElement(k.a,{md:"6",className:"text-truncate",title:"".concat(t.title," - ").concat(t.author)},v.a.createElement("a",{href:t.url,target:"_blank"},"".concat(t.title," - ").concat(t.author))),v.a.createElement(k.a,{md:"5",className:"d-flex"},v.a.createElement("div",{className:"text-truncate w-50",title:t.subject},v.a.createElement("small",null,v.a.createElement("i",null,t.subject))),v.a.createElement("div",{className:"text-truncate w-50",title:t.topic},v.a.createElement("small",null,v.a.createElement("i",null,t.topic)))),v.a.createElement(k.a,{md:"1",className:"pl-1 pr-1"},v.a.createElement(Qt,{className:"ml-2 mr-n2",onClick:function(){return e.handleRemoveCourse(t.id)},title:"remove"},v.a.createElement("i",{className:P()("fv u-fs-7o8","fuvi-delete")}))))}))))),v.a.createElement(k.a,{md:"4"},v.a.createElement($l.a.Group,null,v.a.createElement($l.a.Label,{className:"mt-2"},"Tags"),v.a.createElement(sd,{placeholderText:"Add tags",labelName:"",tags:a,suggestions:o,suggestionsFilter:function(e,t){return!(null==e||null==t||t.length<1)&&e.name.toLowerCase().indexOf(t.toLowerCase().trim())>-1},onInput:function(t){return e.handleSearchKeyword(t)},onFocus:function(t){return e.handleSearchKeyword(t)},onAddition:function(t){e.handleKeywordSelect(t)},onDelete:function(t){return e.handleKeywordDelete(t)}}))))}}]),n}(g.PureComponent);r(220);function Fie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fie(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hie=x.g.TEXT_INPUT_MAX_LENGTH,zie=x.g.ACCESS_GRANT_TYPE,Vie=x.g.CURRENCIES,Wie=x.g.POSITION,Gie=x.g.CONTENT_SERVICES_ENDPOINT,qie=x.g.PROGRESS_STATUS,Yie=x.g.WEEK_DAYS,Kie=x.g.RESOURCE_TYPE,Xie=x.g.RESOURCE_SUBTYPE,Qie=(Object.values(Vie).map((function(e){return e.value})),"basic"),$ie="description",Jie="links",Zie="Origin",eae="Others",tae="FILE",nae="LINK",rae=[{selected:!1},{selected:!1},{selected:!1},{selected:!1},{selected:!1},{selected:!1},{selected:!1}],iae=function(e){var t=e.deleted,n=e.filename,r=e.className,i=e.disabled,a=e.onDelete;return v.a.createElement("div",{className:P()(Nee.a.uploadItem,r)},v.a.createElement("div",{className:P()("w-100 text-truncate",t&&"u-text-line-through")},n),v.a.createElement(Qt,{className:"ml-2 mr-n2",disabled:i,onClick:a},v.a.createElement("i",{className:P()("fv u-fs-7o8",t?"fuvi-refresh":"fuvi-delete")})))},aae={TEXTBOOK:"Textbook",SLIDE:"Slide",EXERCISE:"Exercise",NONE:"Textbook"},oae=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{showCloseConfirmation:!1,filenames:[],previews:[],thumbnail:"",title:"",description:"",titleLine2:"",titleLine4:"",titleLine3:"",resourceType:Kie.PDF_PPT.value,resourceSubtype:e.props.resourceSubtype||Xie.TEXTBOOK,price:"",priceType:zie.FREE,currency:Vie.USD.value,isSubmitting:!1,fileUploadStatus:null,thumbnailUploadStatus:null,previewUploadStatus:null,productSource:Zie,linkedCourses:[],tags:[],resourceCount:0,previewCount:0,fileLink:"",fileLinks:[],contentType:tae,hourlyCostDisplayed:!1,startDate:new Date,endDate:new Date,capacity:30,duration:1,totalHours:0,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,days:Object(Y.cloneDeep)(rae),liveSessionLinkTitle:"",liveSessionLinkUrl:"",liveSessionLinkAccessCode:"",profile:"",profileFile:null,profileUploadStatus:null}),G()(V()(e),"isDirty",!1),G()(V()(e),"isDirtyResource",!1),G()(V()(e),"isDirtyThumbnail",!1),G()(V()(e),"isDirtyPreview",!1),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"resourceUploads",[]),G()(V()(e),"resourceFiles",[]),G()(V()(e),"thumbnailUpload",null),G()(V()(e),"thumbnailFile",null),G()(V()(e),"previewUploads",[]),G()(V()(e),"previewFiles",[]),G()(V()(e),"resourceLinks",[]),G()(V()(e),"componentDidMount",(function(){if(e.props.isEdit){var t=e.props,n=t.filenames,r=void 0===n?[]:n,i=t.fileLinks,a=void 0===i?[]:i,o=t.previews,s=void 0===o?[]:o,l=t.thumbnail,c=void 0===l?"":l,u=t.title,d=void 0===u?"":u,h=t.description,f=void 0===h?"":h,p=t.titleLine2,m=void 0===p?"":p,g=t.titleLine4,v=void 0===g?"":g,b=t.titleLine3,y=void 0===b?"":b,A=t.resourceType,_=void 0===A?Kie.PDF_PPT.value:A,w=t.resourceSubtype,E=void 0===w?Xie.NONE:w,S=t.linkedCourses,C=t.tags,T=t.price,k=void 0===T?{}:T,O=t.hourlyPrice,I=void 0===O?0:O,M=t.hourlyCostDisplayed,P=void 0!==M&&M,D=t.free,N=t.productSource,L=void 0===N?Zie:N,R=t.schedule,B=void 0===R?{}:R,j=t.liveSessionLink,F=void 0===j?{}:j,U=t.profile,H=void 0===U?"":U,z=_===Kie.LIVE_CLASS.value,V=Object(Y.cloneDeep)(rae);z&&B.days.map((function(e){var t=Yie.findIndex((function(t){var n=t.CODE;return e.day===n}));t>-1&&(V[t]=Uie({selected:!0},e))}));var W=a.length>0?nae:tae;e.setState(Uie({title:d,description:f,titleLine2:m,titleLine4:v,titleLine3:y,resourceType:_,resourceSubtype:E,linkedCourses:S,tags:C,price:(null==k?void 0:k.amount)||"",hourlyCostDisplayed:P,priceType:D?zie.FREE:zie.PAID,productSource:L,thumbnail:c,contentType:W},z?{startDate:new Date(B.startDate),endDate:new Date(B.endDate),duration:B.duration,totalHours:B.totalHours,hourlyPrice:x.c.defaultIfEmpty(I,""),capacity:B.capacity||30,timezone:B.timezone||Intl.DateTimeFormat().resolvedOptions().timeZone,days:V,profile:H,liveSessionLinkTitle:(null==F?void 0:F.title)||"",liveSessionLinkUrl:(null==F?void 0:F.url)||"",liveSessionLinkAccessCode:(null==F?void 0:F.accessCode)||""}:{filenames:r.map((function(e){return{name:e,delete:!1,new:!1}})),resourceCount:r.length,previews:s.map((function(e){return{name:e,delete:!1,new:!1}})),fileLinks:a.map((function(e){return{name:e,delete:!1,new:!1}})),fileLinkCount:a.length}),(function(){e.countFileLinks(),e.countResources(),e.countPreviews()}))}})),G()(V()(e),"checkCanSubmitForm",(function(){var t=e.state,n=t.resourceCount,r=t.previewCount,i=t.fileLinkCount,a=t.thumbnail,o=t.price,s=t.priceType,l=t.resourceType,c=t.contentType,u=t.startDate,d=t.endDate,h=t.totalHours,f=t.capacity,p=t.timezone,m=t.days,g=t.liveSessionLinkTitle,v=t.liveSessionLinkUrl,b=t.profile,y=s===zie.FREE||!!o,A=!1;if(l===Kie.PDF_PPT.value){var _=c===nae?i:n;A=_>0&&_<=10&&r<=10&&a}else{var w=m.find((function(e){return e.selected}));A=a&&u&&p&&d&&w&&g&&v&&b&&Number(h)>0&&f>0}return A&&y&&e.isDirty&&e.validator.allValid()})),G()(V()(e),"handleClose",(function(t){t.stopPropagation(),e.isDirty?e.setState({showCloseConfirmation:!0}):e.props.onClose()})),G()(V()(e),"handleCloseConfirm",(function(t){t.stopPropagation();var n=e.props,r=n.isEdit,i=n.deleteProductId,a=n.onClose;e.resourceUploads.length>0&&e.resourceUploads.map((function(e){return e.abort()})),e.thumbnailUpload&&e.thumbnailUpload.abort(),e.previewUpload&&e.previewUpload.abort(),!r&&e.submittedProductId&&i({productId:e.submittedProductId}),a()})),G()(V()(e),"handleInputChange",(function(t){var n=t.target,r=n.name,i=n.value;e.isDirty=!0,e.setState(G()({},r,i),(function(){e.handleFormFieldValidate(r)}))})),G()(V()(e),"handleInputBlur",(function(t){var n=t.target.name;e.handleFormFieldValidate(n)})),G()(V()(e),"handleFormFieldValidate",(function(t){e.validator.showMessageFor(t),e.forceUpdate()})),G()(V()(e),"handleHourlyPriceChange",(function(t){e.isDirty=!0;var n=e.state,r=n.totalHours,i=n.price,a=isNaN(parseFloat(t))?i:(r*t).toFixed(2);e.setState({hourlyPrice:t,price:a},(function(){e.handleFormFieldValidate("hourlyPrice")}))})),G()(V()(e),"handlePriceChange",(function(t){e.isDirty=!0;var n=e.state,r=n.totalHours,i=n.hourlyPrice,a=isNaN(parseFloat(t))?i:(t/r).toFixed(2);e.setState({price:t,hourlyPrice:a},(function(){e.handleFormFieldValidate("price")}))})),G()(V()(e),"handleCurrencyChange",(function(t){e.isDirty=!0,e.setState({currency:t,price:""})})),G()(V()(e),"handlePriceTypeChange",(function(t){e.isDirty=!0,t===zie.FREE&&(e.validator.fields.price=!0),e.setState({priceType:t})})),G()(V()(e),"handleProductSourceChange",(function(t){e.isDirty=!0,e.setState({productSource:t})})),G()(V()(e),"countResources",(function(){var t=e.state.filenames,n=Object(Y.uniq)([].concat(Rl()(e.resourceFiles.map((function(e){return e.name}))),Rl()(t.filter((function(e){return!e.delete})).map((function(e){return e.name})))));e.setState({resourceCount:n.length},e.forceUpdate)})),G()(V()(e),"handleResourceSelect",(function(t){var n=Object(Y.sortBy)(t,(function(e){return e.path})),r=[];if(n.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),r.push(e)})),r.length<1)x.e.warn(Object(_t.t)("message.resourceSupportedFiles"));else{if(0===r.length)return x.e.error(Object(_t.t)("message.resourceRequired")),!1;r.some((function(e){return e.size>524288e3}))&&x.e.error(Object(_t.t)("message.maxFileSize",{size:"500 MB"}));var i=r.filter((function(e){return e.size<=524288e3}));if(0!==i.length){e.isDirty=!0,e.isDirtyResource=!0,e.resourceFiles=Object(Y.uniqBy)([].concat(Rl()(i),Rl()(e.resourceFiles)),"name");var a=Object(Y.cloneDeep)(e.state.filenames);e.resourceFiles.map((function(e){var t=a.find((function(t){var n=t.name;return e.name===n}));t&&(t.delete=!0,t.disabled=!0)})),e.setState({filenames:a},e.countResources)}}})),G()(V()(e),"handleResourceDelete",(function(t,n){e.isDirty=!0;var r=e.state.contentType===nae,i=r?"fileLinks":"filenames";r?e.isDirtyLink=!0:e.isDirtyResource=!0;var a=Object(Y.cloneDeep)(e.state[i]);if(n){var o=e.resourceFiles.splice(t,1),s=a.find((function(e){var t;return e.name===(null===(t=o[0])||void 0===t?void 0:t.name)}));s&&(s.delete=!s.delete,s.disabled=!1)}else{var l=a[t];l&&(l.delete=!l.delete)}e.setState(G()({},i,a),r?e.countFileLinks:e.countResources)})),G()(V()(e),"handleResourceRefresh",(function(t){t.stopPropagation(),e.isDirty=!0;var n=e.state.contentType===nae,r=n?"fileLinks":"filenames";n?(e.isDirtyLink=!1,e.resourceLinks=[]):(e.isDirtyResource=!1,e.resourceFiles=[]);var i=Object(Y.cloneDeep)(e.state[r]);i.map((function(e){e.delete=!1,e.disabled=!1})),e.setState(G()({},r,i),n?e.countFileLinks:e.countResources)})),G()(V()(e),"countPreviews",(function(){var t=e.state.previews,n=Object(Y.uniq)([].concat(Rl()(e.previewFiles.map((function(e){return e.name}))),Rl()(t.filter((function(e){return!e.delete})).map((function(e){return e.name})))));e.setState({previewCount:n.length},e.forceUpdate)})),G()(V()(e),"handlePreviewSelect",(function(t){var n=Object(Y.sortBy)(t,(function(e){return e.path})),r=[];if(n.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),r.push(e)})),r.length<1)x.e.warn(Object(_t.t)("message.previewSupportedFiles"));else{if(0===r.length)return x.e.error(Object(_t.t)("message.previewRequired")),!1;r.some((function(e){return e.size>524288e3}))&&x.e.error(Object(_t.t)("message.maxFileSize",{size:"500 MB"}));var i=r.filter((function(e){return e.size<=524288e3}));if(0!==i.length){e.isDirty=!0,e.isDirtyPreview=!0,e.previewFiles=Object(Y.uniqBy)([].concat(Rl()(i),Rl()(e.previewFiles)),"name");var a=Object(Y.cloneDeep)(e.state.previews);e.previewFiles.map((function(e){var t=a.find((function(t){var n=t.name;return e.name===n}));t&&(t.delete=!0,t.disabled=!0)})),e.setState({previews:a},e.countPreviews)}}})),G()(V()(e),"handlePreviewRefresh",(function(t){t.stopPropagation(),e.isDirty=!0,e.isDirtyPreview=!1;var n=Object(Y.cloneDeep)(e.state.previews);e.previewFiles=[],n.map((function(e){e.delete=!1,e.disabled=!1})),e.setState({previews:n},e.countPreviews)})),G()(V()(e),"handlePreviewDelete",(function(t,n){e.isDirty=!0,e.isDirtyPreview=!0;var r=Object(Y.cloneDeep)(e.state.previews);if(n){var i=e.previewFiles.splice(t,1),a=r.find((function(e){var t;return e.name===(null===(t=i[0])||void 0===t?void 0:t.name)}));a&&(a.delete=!a.delete,a.disabled=!1)}else{var o=r[t];o&&(o.delete=!o.delete)}e.setState({previews:r},e.countPreviews)})),G()(V()(e),"handleImageSelect",(function(t){var n,r=Object(Y.sortBy)(t,(function(e){return e.path})),i=[];if(r.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),i.push(e)})),i.length<1)x.e.warn(Object(_t.t)("message.imageSupportedFiles"));else{if(0===i.length)return x.e.error(Object(_t.t)("message.imageRequired")),!1;if(i[0].size>524288e3)return x.e.error(Object(_t.t)("message.maxFileSize",{size:"500 MB"})),!1;e.isDirty=!0,e.isDirtyThumbnail=!0,e.thumbnailFile=i[0],e.setState({thumbnail:null===(n=i[0])||void 0===n?void 0:n.name},e.forceUpdate)}})),G()(V()(e),"handleThumbnailRefresh",(function(t){t.stopPropagation(),e.props.isEdit&&(e.isDirtyThumbnail=!1,e.thumbnailFile=null,e.setState({thumbnail:e.props.thumbnail},e.forceUpdate))})),G()(V()(e),"handleSubmit",(function(t){(t.stopPropagation(),e.checkCanSubmitForm())?e.props.isEdit?e.handleProductUpdate():e.handleProductCreate():(e.validator.showMessages(),e.forceUpdate())})),G()(V()(e),"createResumableUpload",(function(t,n,r,i){var a=new nC(n,{endpoint:"".concat(Gie,"products/").concat(t,"/uploads"),headers:x.c.getResumableHeaders(),metadata:{filename:n.name},retryDelays:[0,3e3,5e3,1e4,2e4],onError:function(){e.setState((function(e){return G()({isSubmitting:!1},r,Uie(Uie({},e[r]),{},{status:qie.FAILED}))}))},onProgress:function(t,n){var i=x.c.percentage(t/n);e.setState((function(e){return G()({},r,Uie(Uie({},e[r]),{},{bytesUploaded:t,bytesTotal:n,now:i,status:qie.UPLOADING}))}))},onSuccess:function(){e.setState((function(e){return G()({},r,Uie(Uie({},e[r]),{},{status:qie.DONE}))}),(function(){e.handleProductUploadSuccess(t)}))}});return e.setState((function(e){return G()({},r,Uie(Uie({},e[r]),{},{status:qie.UPLOADING}))})),a})),G()(V()(e),"handleProductCreate",(function(){var t=e.props.createProductId;e.setState({isSubmitting:!0}),t(null,(function(t){e.submittedProductId=t,e.handleProductUpload(t)}),(function(){e.setState({isSubmitting:!1})}))})),G()(V()(e),"handleProductUpdate",(function(){var t=e.props.id;e.setState({isSubmitting:!0}),e.resourceFiles.length>0||e.thumbnailFile||e.previewFiles.length>0||e.state.profileFile?e.handleProductUpload(t):e.handleProductUploadSuccess(t)})),G()(V()(e),"handleProductUpload",(function(t){e.state.resourceType===Kie.PDF_PPT.value?(e.resourceFiles.length>0&&e.resourceFiles.map((function(n,r){e.resourceUploads[r]=e.createResumableUpload(t,n,"fileUploadStatus.".concat(r)),e.resourceUploads[r].start()})),e.previewFiles.length>0&&e.previewFiles.map((function(n,r){e.previewUploads[r]=e.createResumableUpload(t,n,"previewUploadStatus.".concat(r)),e.previewUploads[r].start()}))):e.state.profileFile&&(e.profileUpload=e.createResumableUpload(t,e.state.profileFile,"profileUploadStatus"),e.profileUpload.start()),e.thumbnailFile&&(e.thumbnailUpload=e.createResumableUpload(t,e.thumbnailFile,"thumbnailUploadStatus"),e.thumbnailUpload.start())})),G()(V()(e),"handleProductUploadSuccess",(function(t){var n=e.props,r=n.isEdit,i=n.videoId,a=n.createProduct,o=n.updateProduct,s=n.onClose,l=e.state,c=l.thumbnailUploadStatus,u=l.filenames,d=l.thumbnail,h=l.previews,f=l.title,p=l.linkedCourses,m=l.tags,g=l.description,v=l.titleLine2,b=l.titleLine3,y=l.titleLine4,A=l.resourceType,_=l.resourceSubtype,w=l.price,E=l.priceType,S=l.currency,C=l.productSource,T=l.contentType,k=l.fileLinks,O=l.startDate,I=l.endDate,M=l.duration,P=l.totalHours,D=l.capacity,N=l.timezone,L=l.days,R=l.profile,B=l.profileFile,j=l.profileUploadStatus,F=l.hourlyCostDisplayed,U=l.liveSessionLinkTitle,H=l.liveSessionLinkUrl,z=l.liveSessionLinkAccessCode,V=!1,W=A===Kie.LIVE_CLASS.value,G=!e.thumbnailFile||e.thumbnailFile&&(null==c?void 0:c.status)===qie.DONE;if(W){var q=!B||B&&(null==j?void 0:j.status)===qie.DONE;V=G&&q}else{var K=!e.resourceFiles.length||e.resourceFiles.length>0&&!e.resourceFiles.some((function(t,n){var r;return(null===(r=e.state["fileUploadStatus.".concat(n)])||void 0===r?void 0:r.status)!==qie.DONE})),X=!e.previewFiles.length||e.previewFiles.length>0&&!e.previewFiles.some((function(t,n){var r;return(null===(r=e.state["previewUploadStatus.".concat(n)])||void 0===r?void 0:r.status)!==qie.DONE}));V=K&&G&&X}if(V){var Q=T===nae,$=r?o:a;e.isDirty=!1;var J=m.map((function(e){return e.toLowerCase()}));$(Uie({id:t,videoId:i,title:f,linkedCourses:p,tags:J,description:g,titleLine2:v,titleLine3:b,titleLine4:y,resourceType:A,resourceSubtype:_,free:E===zie.FREE,price:{amount:Number.parseFloat(w),currencyCode:S},productSource:C,thumbnail:d},W?{profile:R,hourlyCostDisplayed:F,liveSessionLink:{title:U,url:H,accessCode:z},schedule:{startDate:O,endDate:I,duration:M,totalHours:P,capacity:D,timezone:N,days:L.map((function(e,t){if(e.selected)return{day:Yie[t].CODE,startTime:e.startTime,endTime:e.endTime}})).filter(Boolean)}}:Uie(Uie({},Q?{fileLinks:Object(Y.uniq)([].concat(Rl()(e.resourceLinks.map((function(e){return e.name}))),Rl()(k.filter((function(e){return!e.delete})).map((function(e){return e.name})))))}:{filenames:Object(Y.uniq)([].concat(Rl()(e.resourceFiles.map((function(e){return e.name}))),Rl()(u.filter((function(e){return!e.delete})).map((function(e){return e.name})))))}),{},{previews:Object(Y.uniq)([].concat(Rl()(e.previewFiles.map((function(e){return e.name}))),Rl()(h.filter((function(e){return!e.delete})).map((function(e){return e.name})))))})),(function(){e.setState({isSubmitting:!1}),x.b.reportTeacherCreatedProductDesktop(),s(!0,t)}),(function(){e.setState({isSubmitting:!1})}))}})),G()(V()(e),"handleResourceTypeChange",(function(t){e.props.isEdit||(e.isDirty=!0,e.setState({resourceType:t}))})),G()(V()(e),"handleResourceSubtypeChange",(function(t){e.isDirty=!0,e.setState({resourceSubtype:t})})),G()(V()(e),"handleFormDataChange",(function(t){e.isDirty=!0,e.setState(Uie({},t),e.forceUpdate)})),G()(V()(e),"handleHourlyDisplayChange",(function(){e.isDirty=!0,e.setState((function(e){return{hourlyCostDisplayed:!e.hourlyCostDisplayed}}),e.forceUpdate)})),G()(V()(e),"handleContentTypeChange",(function(t){e.props.isEdit||(e.isDirty=!0,e.setState({contentType:t}))})),G()(V()(e),"handleFileLinkKeyDown",(function(t){t.stopPropagation(),13===t.keyCode&&e.handleFileLinkAdd(),x.c.preventKeyDownSideEffect(t)})),G()(V()(e),"handleFileLinkAdd",(function(){var t=e.state,n=t.fileLink,r=t.fileLinkCount;if(n&&!(r>=10)){e.isDirty=!0,e.isDirtyLink=!0,e.resourceLinks=Object(Y.uniqBy)([{name:n}].concat(Rl()(e.resourceLinks)),"name");var i=Object(Y.cloneDeep)(e.state.fileLinks);e.resourceLinks.map((function(e){var t=i.find((function(t){var n=t.name;return e.name===n}));t&&(t.delete=!0,t.disabled=!0)})),e.setState({fileLinks:i,fileLink:""},e.countFileLinks)}})),G()(V()(e),"countFileLinks",(function(){var t=e.state.fileLinks,n=Object(Y.uniq)([].concat(Rl()(e.resourceLinks.map((function(e){return e.name}))),Rl()(t.filter((function(e){return!e.delete})).map((function(e){return e.name})))));e.setState({fileLinkCount:n.length},e.forceUpdate)})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.isEdit,r=t.onSubmit,i=t.thumbnailUrl,a=this.state,o=a.showCloseConfirmation,s=a.filenames,l=a.thumbnail,c=a.previews,u=a.title,d=a.description,h=a.titleLine2,f=a.titleLine3,p=a.titleLine4,m=a.resourceType,g=a.resourceSubtype,b=a.linkedCourses,y=a.tags,A=a.price,_=a.priceType,w=a.currency,E=a.isSubmitting,S=a.thumbnailUploadStatus,C=a.productSource,T=a.resourceCount,k=a.previewCount,x=a.contentType,O=a.fileLink,I=a.fileLinks,M=a.fileLinkCount,D=a.hourlyPrice,N=a.hourlyCostDisplayed,L=a.startDate,R=a.endDate,B=a.duration,j=a.totalHours,F=a.capacity,U=a.timezone,H=a.days,z=a.liveSessionLinkTitle,V=a.liveSessionLinkUrl,W=a.liveSessionLinkAccessCode,G=a.profile,q=a.profileFile,Y=a.profileUploadStatus,K=this.checkCanSubmitForm(),X=Vie[w],Q=X.symbol,$=(X.symbolPosition,X.step),J=X.decimalSeparator,Z=X.groupSeparator,ee=X.maximumFractionDigits,te=Object(_t.t)("modal.enterYourPrice");te=(Wie.LEFT,"".concat(Q," ").concat(te));var ne=m===Kie.PDF_PPT.value,re=m===Kie.LIVE_CLASS.value,ie=_==zie.PAID&&ne,ae=_==zie.PAID&&re;return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.createModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"pl-4"},v.a.createElement("div",{className:"modal-title h4"},n?Object(_t.t)("modal.editProductTitle"):Object(_t.t)("modal.createProductTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},v.a.createElement($l.a,{noValidate:!0,onSubmit:r,className:"h-100"},v.a.createElement(Sl,{className:"px-3 fv-tabs"},v.a.createElement(kl,{className:"h-100",tabClassName:"u-w-12 text-center",eventKey:Qie,title:Object(_t.t)("basicInformation")},v.a.createElement("div",{className:"h-100 d-flex flex-column"},v.a.createElement("div",{className:"u-h-input mt-3 d-flex align-items-center flex-shrink-0"},v.a.createElement(_u,{id:"radioTextbook",labelName:"Textbook",type:"radio",className:"mr-4 u-fs-15o16",checked:g===Xie.TEXTBOOK,onChange:function(){return e.handleResourceSubtypeChange(Xie.TEXTBOOK)}}),v.a.createElement(_u,{id:"radioSlide",labelName:"Slide",type:"radio",className:"mr-3 u-fs-15o16",checked:g===Xie.SLIDE,onChange:function(){return e.handleResourceSubtypeChange(Xie.SLIDE)}}),v.a.createElement(_u,{id:"radioExercise",labelName:"Exercise",type:"radio",className:"mr-3 u-fs-15o16",checked:g===Xie.EXERCISE,onChange:function(){return e.handleResourceSubtypeChange(Xie.EXERCISE)}})),v.a.createElement("div",{className:"w-100 d-flex"},v.a.createElement("div",{className:"w-50 flex-shrink-0"},v.a.createElement(mu,{required:!0,disabled:E,labelName:Object(_t.t)("label.title"),name:"title",value:u,placeholder:Object(_t.t)("placeholder.addResourceTitle"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("title",u,"resourceTitleRequired|max:".concat(Hie)),classNameInput:"cogvid-input-height"}),!re&&v.a.createElement(v.a.Fragment,null,v.a.createElement(mu,{disabled:E,labelName:Object(_t.t)("label.titleLine2"),name:"titleLine2",value:h,placeholder:Object(_t.t)("placeholder.addTitleLine2"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("titleLine2",h,"max:".concat(Hie)),classNameInput:"cogvid-input-height"}),v.a.createElement(mu,{disabled:E,labelName:Object(_t.t)("label.titleLine3"),name:"titleLine3",value:f,placeholder:Object(_t.t)("placeholder.addTitleLine3"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("titleLine3",f,"max:".concat(Hie)),classNameInput:"cogvid-input-height"}),v.a.createElement(mu,{disabled:E,labelName:Object(_t.t)("label.titleLine4"),name:"titleLine4",value:p,placeholder:Object(_t.t)("placeholder.addTitleLine4"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("titleLine4",p,"max:".concat(Hie)),classNameInput:"cogvid-input-height"})),re&&v.a.createElement(v.a.Fragment,null,v.a.createElement($l.a.Label,{className:["mt-2"]},"Live session link"),v.a.createElement(mu,{required:!0,disabled:E,labelName:"",className:"ml-3",name:"liveSessionLinkTitle",value:z,placeholder:"Live session link title *",onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("liveSessionLinkTitle",z,"required|max:".concat(Hie)),classNameInput:"cogvid-input-height"}),v.a.createElement(mu,{required:!0,disabled:E,labelName:"",className:"ml-3",name:"liveSessionLinkUrl",value:V,placeholder:"Live session link URL *",onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("liveSessionLinkUrl",V,"required|max:".concat(Hie)),classNameInput:"cogvid-input-height"}),v.a.createElement(mu,{disabled:E,labelName:"",className:"ml-3",name:"liveSessionLinkAccessCode",value:W,placeholder:"Live session link access code",onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("liveSessionLinkAccessCode",W,"max:".concat(Hie)),classNameInput:"cogvid-input-height"}))),v.a.createElement("div",{className:"w-50 d-flex flex-column flex-shrink-0 pl-3"},v.a.createElement($l.a.Group,null,v.a.createElement($l.a.Label,{className:["mt-2"]},Object(_t.t)("label.thumbnail")," *"),v.a.createElement(QT,{isDisabled:E,multiple:!1,acceptedFiles:".png,.jpg,.jpeg",receiveAcceptedFiles:this.handleImageSelect,wrapperClassName:"",innerWrapperClassName:P()(Nee.a.uploadBtn,"fv-input form-control d-flex align-items-center")},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o2"}),v.a.createElement("div",{className:P()("text-truncate flex-grow-1",!l&&"u-opacity-80 u-fs-15o16 font-italic",this.isDirtyThumbnail&&"text-primary")},l||Object(_t.t)("placeholder.addThumbnail")),n&&this.thumbnailFile&&v.a.createElement(Qt,{className:"mr-n2",disabled:E,onClick:this.handleThumbnailRefresh},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-1"}))),S&&v.a.createElement(bt,{animated:!0,className:P()("mt-2",S.status===qie.FAILED&&"failed"),now:S.now})),v.a.createElement("div",{className:"h-100 u-flex-center flex-grow-1 overflow-hidden"},(this.thumbnailFile||i)&&v.a.createElement("div",{className:Nee.a.previewThumbnail,style:{backgroundImage:"url(".concat(this.thumbnailFile?URL.createObjectURL(this.thumbnailFile):i,")")},alt:"preview thumbnail"})))),v.a.createElement("div",{className:"w-100 d-flex"},v.a.createElement("div",{className:"u-h-input mt-3 d-flex align-items-center"},v.a.createElement(_u,{id:"freeRadio",labelName:Object(_t.t)("freePriceLabel"),type:"radio",className:"mr-4 u-fs-15o16",checked:_===zie.FREE,onChange:function(){return e.handlePriceTypeChange(zie.FREE)},disabled:E}),v.a.createElement(_u,{id:"withPriceRadio",labelName:Object(_t.t)("withPriceLabel"),type:"radio",className:"mr-3 u-fs-15o16",checked:_===zie.PAID,onChange:function(){return e.handlePriceTypeChange(zie.PAID)},disabled:E}),ie&&v.a.createElement("div",{className:"align-self-start"},v.a.createElement(SD.a,{placeholder:te,value:A,disabled:E,onChange:this.handlePriceChange,step:$,allowDecimals:!0,decimalsLimit:ee,className:"btn-border u-h-input u-w-7 border border-primary px-2",prefix:Q,decimalSeparator:J,groupSeparator:Z,allowNegativeValue:!1}),v.a.createElement("div",{className:"ml-2 mt-1 u-fs-7o8"},this.validator.message("price",A,"validPrice|priceBoundary"))),ae&&v.a.createElement(v.a.Fragment,null,v.a.createElement($l.a.Group,{className:"mr-3"},v.a.createElement($l.a.Label,null,"hourly price"),v.a.createElement(SD.a,{placeholder:"hourly price",value:D,disabled:E,onChange:this.handleHourlyPriceChange,step:$,allowDecimals:!0,decimalsLimit:ee,className:"d-block btn-border u-h-input u-w-7 border border-primary px-2",prefix:Q,decimalSeparator:J,groupSeparator:Z,allowNegativeValue:!1}),v.a.createElement("div",{className:"ml-2 mt-1 u-fs-7o8"},this.validator.message("hourlyPrice",D,"validPrice|priceBoundary"))),v.a.createElement($l.a.Group,{className:"mr-3"},v.a.createElement($l.a.Label,null,"hours"),v.a.createElement(SD.a,{readOnly:!0,value:j,disabled:E,className:"d-block btn-border u-h-input mb-1 u-w-5 border border-primary px-2"})),v.a.createElement($l.a.Group,{className:"mr-3"},v.a.createElement($l.a.Label,null,"price"),v.a.createElement(SD.a,{placeholder:te,value:A,disabled:E,onChange:this.handlePriceChange,step:$,allowDecimals:!0,decimalsLimit:ee,className:"d-block btn-border u-h-input u-w-7 border border-primary px-2",prefix:Q,decimalSeparator:J,groupSeparator:Z,allowNegativeValue:!1}),v.a.createElement("div",{className:"ml-2 mt-1 u-fs-7o8"},this.validator.message("price",A,"validPrice|priceBoundary"))),v.a.createElement(_u,{id:"hourlyCostDisplayed",labelName:"Display hourly price",className:"ml-3 u-fs-15o16",checked:N,onChange:this.handleHourlyDisplayChange,disabled:E})))),v.a.createElement(mu,{name:"description",value:d,disabled:E,labelName:Object(_t.t)("description"),placeholder:Object(_t.t)("placeholder.addResourceDescription"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("description",d,"max:".concat(4e3)),className:P()(Nee.a.resourceDescription,"mt-2 pb-3"),classNameInput:P()("fv-custom-scroll"),as:"textarea",rows:8}))),v.a.createElement(kl,{className:"h-100",tabClassName:"u-w-12 text-center",eventKey:$ie,title:"".concat(aae[g]," - details")},v.a.createElement("div",{className:"h-100 d-flex flex-column"},m===Kie.PDF_PPT.value?v.a.createElement("div",{className:"w-100 d-flex flex-grow-1 overflow-hidden"},v.a.createElement("div",{className:"w-50 d-flex flex-column flex-shrink-0"},v.a.createElement("div",{className:"d-flex align-items-center mt-3"},v.a.createElement(_u,{type:"radio",id:"radioPdf",labelName:"Upload files",className:"u-fs-7o8",checked:x===tae,onChange:function(){return e.handleContentTypeChange(tae)},disabled:E||n}),v.a.createElement(_u,{type:"radio",id:"radioUrl",labelName:"Link",className:"ml-3 u-fs-7o8",checked:x===nae,onChange:function(){return e.handleContentTypeChange(nae)},disabled:E||n})),x===nae?v.a.createElement($l.a.Group,{className:"h-50 d-flex flex-column m-0"},v.a.createElement($l.a.Label,{className:"my-2"},Object(_t.t)("label.resource")," *"),v.a.createElement("div",{className:P()(Nee.a.uploadZone,"h-100")},v.a.createElement("div",{className:P()(Nee.a.uploadBtn)},v.a.createElement("i",{className:"fv fuvi-link-ic mr-2 u-fs-1 u-opacity-70"}),v.a.createElement(mu,{disabled:E||M>=10,labelName:"",name:"fileLink",value:O,placeholder:Object(_t.t)("placeholder.addFileLink"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,onKeyDown:this.handleFileLinkKeyDown,validatorElement:this.validator.message("fileLink",O,"max:".concat(Hie)),className:"flex-grow-1 m-0",classNameInput:"border-0 cogvid-input-height"}),v.a.createElement(Qt,{disabled:!O.length||E||M>=10,className:"ml-2 mr-n2",onClick:this.handleFileLinkAdd},v.a.createElement("i",{className:"fv fuvi-plus-icon u-fs-7o8"})),this.isDirtyLink&&v.a.createElement(Qt,{disabled:E,className:"ml-2 mr-n2",onClick:this.handleResourceRefresh},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-7o8"}))),v.a.createElement("div",{className:"h-100 fv-custom-scroll overflow-auto border-top border-primary p-2"},!this.resourceLinks.length&&!I.length&&v.a.createElement("div",{className:"w-100 h-100 u-flex-center u-fs-7o8 u-opacity-40"},"Add file links"),this.resourceLinks.map((function(t,n){return v.a.createElement(v.a.Fragment,{key:"new-".concat(t.name)},v.a.createElement(iae,{className:"text-primary",disabled:E,filename:t.name,onDelete:function(t){t.stopPropagation(),e.handleResourceDelete(n,!0)}}))})),I.map((function(t,n){return v.a.createElement(iae,{key:"existing-".concat(t.name),deleted:t.delete,filename:t.name,disabled:E||t.disabled,onDelete:function(t){t.stopPropagation(),e.handleResourceDelete(n)}})}))))):v.a.createElement($l.a.Group,{className:"h-50 d-flex flex-column m-0"},v.a.createElement($l.a.Label,{className:"my-2"},Object(_t.t)("label.resource")," *"),v.a.createElement(QT,{isDisabled:E||T>=10,multiple:!0,receiveAcceptedFiles:this.handleResourceSelect,acceptedFiles:"",wrapperClassName:Nee.a.uploadZoneWrapper,innerWrapperClassName:P()(Nee.a.uploadZone,"")},v.a.createElement("div",{className:P()(Nee.a.uploadBtn)},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o2"}),v.a.createElement("div",{className:P()("flex-grow-1 text-truncate u-opacity-80 u-fs-15o16 font-italic",T>10&&"text-danger")},T>10?Object(_t.t)("message.maxResources"):Object(_t.t)("placeholder.addResource")),this.isDirtyResource&&v.a.createElement(Qt,{disabled:E,className:"ml-2 mr-n2",onClick:this.handleResourceRefresh},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-7o8"}))),v.a.createElement("div",{className:"h-100 fv-custom-scroll overflow-auto border-top border-primary p-2"},!this.resourceFiles.length&&!s.length&&v.a.createElement("div",{className:"w-100 h-100 u-flex-center u-fs-7o8 u-opacity-40"},Object(_t.t)("placeholder.dropzone")),this.resourceFiles.map((function(t,n){var r=e.state["fileUploadStatus.".concat(n)];return v.a.createElement(v.a.Fragment,{key:"new-".concat(t.name)},v.a.createElement(iae,{className:"text-primary",disabled:E,filename:t.name,onDelete:function(t){t.stopPropagation(),e.handleResourceDelete(n,!0)}}),r&&v.a.createElement(bt,{animated:!0,className:P()(r.status===qie.FAILED&&"failed"),now:r.now}))})),s.map((function(t,n){return v.a.createElement(iae,{key:"existing-".concat(t.name),deleted:t.delete,filename:t.name,disabled:E||t.disabled,onDelete:function(t){t.stopPropagation(),e.handleResourceDelete(n)}})})))))),v.a.createElement("div",{className:"w-50 d-flex flex-column flex-shrink-0 pl-3"},v.a.createElement($l.a.Group,{className:"h-50 d-flex flex-column mb-0"},v.a.createElement($l.a.Label,{className:"my-2"},Object(_t.t)("label.preview")),v.a.createElement(QT,{isDisabled:E||k>=10,multiple:!0,receiveAcceptedFiles:this.handlePreviewSelect,acceptedFiles:".pdf,.png,.jpg,.jpeg",wrapperClassName:Nee.a.uploadZoneWrapper,innerWrapperClassName:P()(Nee.a.uploadZone,"")},v.a.createElement("div",{className:P()(Nee.a.uploadBtn)},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o2"}),v.a.createElement("div",{className:P()("flex-grow-1 text-truncate u-opacity-80 u-fs-15o16 font-italic",k>10&&"text-danger")},k>10?Object(_t.t)("message.maxPreviews"):Object(_t.t)("placeholder.addPreview")),this.isDirtyPreview&&v.a.createElement(Qt,{disabled:E,className:"ml-2 mr-n2",onClick:this.handlePreviewRefresh},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-7o8"}))),v.a.createElement("div",{className:"h-100 fv-custom-scroll overflow-auto border-top border-primary p-2"},!this.previewFiles.length&&!c.length&&v.a.createElement("div",{className:"w-100 h-100 u-flex-center u-fs-7o8 u-opacity-40"},Object(_t.t)("placeholder.dropzone")),this.previewFiles.map((function(t,n){var r=e.state["previewUploadStatus.".concat(n)];return v.a.createElement(v.a.Fragment,{key:"new-".concat(t.name)},v.a.createElement(iae,{className:"text-primary",disabled:E,filename:t.name,onDelete:function(t){t.stopPropagation(),e.handlePreviewDelete(n,!0)}}),r&&v.a.createElement(bt,{animated:!0,className:P()(r.status===qie.FAILED&&"failed"),now:r.now}))})),c.map((function(t,n){return v.a.createElement(iae,{key:"existing-".concat(t.name),deleted:t.delete,filename:t.name,disabled:E||t.disabled,onDelete:function(t){t.stopPropagation(),e.handlePreviewDelete(n)}})}))))))):v.a.createElement(Hee,{isEdit:n,isSubmitting:E,onChange:this.handleFormDataChange,onInputBlur:this.handleInputBlur,validator:this.validator,startDate:L,endDate:R,duration:B,totalHours:j,capacity:F,timezone:U,days:H,hourlyPrice:D,initialProfile:this.props.profile,profile:G,profileFile:q,profileUploadStatus:Y}),v.a.createElement("div",{className:"my-3"},v.a.createElement($l.a.Label,{className:["mt-2"]},"Copyright"),v.a.createElement("div",null,"Intellectual Property Rights: By uploading the selected material I certify that I have read and agree to the FUVI"," ",v.a.createElement("a",{href:"/common/termsOfUse.html",target:"_blank"},"terms & conditions")," ","and that the selected material does not infringe the copyrights, trademark rights, or any other rights of any third party, and:"),v.a.createElement("div",{className:"mt-1 ml-3"},v.a.createElement(_u,{id:"originRadio",labelName:Object(_t.t)("copyrightOptions.originalContent"),type:"radio",className:"mr-5 u-fs-15o16",checked:C===Zie,onChange:function(){return e.handleProductSourceChange(Zie)},disabled:E}),v.a.createElement(_u,{id:"othersRadio",labelName:Object(_t.t)("copyrightOptions.others"),type:"radio",className:"mr-3 u-fs-15o16",checked:C===eae,onChange:function(){return e.handleProductSourceChange(eae)},disabled:E}))))),ne&&v.a.createElement(kl,{className:"h-100",tabClassName:"u-w-16 text-center",eventKey:Jie,title:"Linked courses and tags"},v.a.createElement(jie,{linkedCourses:b,tags:y.map((function(e){return{name:e}})),searchPublicCourses:this.props.searchPublicCourses,searchKeyword:this.props.searchKeyword,createVideoKeyword:this.props.createVideoKeyword,onPerformingStateMerge:this.handleFormDataChange}))))),v.a.createElement(Fl.a.Footer,{className:Nee.a.footer},v.a.createElement("div",{className:"w-100 d-flex justify-content-end"},v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},Object(_t.t)("btn.cancel")),v.a.createElement(et.a,{disabled:!K||E,variant:"primary",className:"u-flex-center text-white modal-button ml-4",onClick:this.handleSubmit},E?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):Object(_t.t)("btn.save"))))),v.a.createElement(IC,{show:!!o,title:Object(_t.t)("modal.confirmCancelModalTitle"),message:Object(_t.t)("modal.confirmCancelModalMessage"),onConfirm:this.handleCloseConfirm,onClose:function(){return e.setState({showCloseConfirmation:!1})}}))}}]),n}(g.PureComponent),sae=Object(q.b)(null,(function(e){return{createProductId:function(t,n,r){return e(Q.g.createProductId(t,n,r))},deleteProductId:function(t,n,r){return e(Q.g.deleteProductId(t,n,r))},createProduct:function(t,n,r){return e(Q.e.createProduct(t,n,r))},updateProduct:function(t,n,r){return e(Q.e.updateProduct(t,n,r))},searchPublicCourses:function(t,n,r){return e(Q.e.searchPublicCourses(t,n,r))},searchKeyword:function(t,n,r){return e(Q.e.searchKeyword(t,n,r))},createVideoKeyword:function(t,n,r){return e(Q.e.createVideoKeyword(t,n,r))}}}))(oae);var lae=x.g.RESOURCE.APPROVED_STATUS,cae=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{option:lae.APPROVED,remark:"",isSubmitting:!1,showCloseConfirmation:!1}),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"isDirty",!1),G()(V()(e),"componentDidMount",(function(){var t=e.props.remark;e.setState({remark:t,option:t?lae.REJECTED:lae.APPROVED})})),G()(V()(e),"checkCanSubmitForm",(function(){return e.state.option===lae.APPROVED||e.validator.allValid()})),G()(V()(e),"handleOptionChange",(function(t){e.setState({option:t})})),G()(V()(e),"handleInputChange",(function(t){var n=t.target,r=n.name,i=n.value;e.isDirty=!0,e.setState(G()({},r,i),(function(){e.handleFormFieldValidate(r)}))})),G()(V()(e),"handleInputBlur",(function(t){var n=t.target.name;e.handleFormFieldValidate(n)})),G()(V()(e),"handleFormFieldValidate",(function(t){e.validator.showMessageFor(t),e.forceUpdate()})),G()(V()(e),"handleSubmit",(function(t){t.stopPropagation();var n=e.props,r=n.videoId,i=n.productId,a=n.title,o=n.onClose,s=n.approveProduct,l=n.rejectProduct,c=e.state,u=c.option,d=c.remark;u&&(e.setState({isSubmitting:!0}),(u===lae.APPROVED?s:l)({videoId:r,productId:i,title:a,remark:d},(function(){e.setState({isSubmitting:!1}),o(!0)}),(function(t){e.setState({isSubmitting:!1})})))})),G()(V()(e),"handleClose",(function(t){t.stopPropagation(),e.isDirty?e.setState({showCloseConfirmation:!0}):e.props.onClose()})),G()(V()(e),"handleCloseConfirm",(function(t){t.stopPropagation(),(0,e.props.onClose)()})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.option,i=n.remark,a=n.showCloseConfirmation,o=n.isSubmitting,s=this.checkCanSubmitForm();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.reviewModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"pl-4"},v.a.createElement("div",{className:"modal-title h4"},t("modal.reviewProductTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},v.a.createElement("div",{className:"d-flex"},v.a.createElement(_u,{id:"approvedRadio",labelName:t("label.approved"),type:"radio",className:"mr-5 u-fs-15o16",checked:r===lae.APPROVED,onChange:function(){return e.handleOptionChange(lae.APPROVED)},disabled:o}),v.a.createElement(_u,{id:"rejectRadio",labelName:t("label.rejected"),type:"radio",className:"mr-3 u-fs-15o16",checked:r===lae.REJECTED,onChange:function(){return e.handleOptionChange(lae.REJECTED)},disabled:o})),v.a.createElement(mu,{required:!0,labelName:t("label.remark"),name:"remark",value:i,disabled:o||r===lae.APPROVED,placeholder:t("placeholder.addReason"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("remark",i,"remarkRequired|max:".concat(200)),className:"mt-2",classNameInput:P()(Nee.a.description,"fv-custom-scroll"),as:"textarea",rows:6})),v.a.createElement(Fl.a.Footer,{className:Nee.a.footer},v.a.createElement("div",{className:"w-100 d-flex justify-content-end"},v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},t("btn.cancel")),v.a.createElement(et.a,{disabled:!s||o,variant:"primary",className:"u-flex-center text-white modal-button ml-4",onClick:this.handleSubmit},o?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):t("btn.save"))))),v.a.createElement(IC,{show:!!a,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:this.handleCloseConfirm,onClose:function(){return e.setState({showCloseConfirmation:!1})}}))}}]),r}(g.PureComponent),uae=Object(q.b)(null,(function(e){return{approveProduct:function(t,n,r){return e(Q.e.approveProduct(t,n,r))},rejectProduct:function(t,n,r){return e(Q.e.rejectProduct(t,n,r))}}}))(cae),dae=function(e){var n=e.show,r=e.thumbnailUrl,i=e.title,a=e.isOwner,o=e.forcePermanentlyDelete,s=e.onConfirm,l=e.onClose,c=Object(g.useState)(o),u=pi()(c,2),d=u[0],h=u[1];return v.a.createElement(IC,{show:n,onConfirm:function(){s(d)},onClose:l},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:P()(Nee.a.confirmDeleteThumbnail),style:{backgroundImage:r?'url("'.concat(r,'")'):void 0}}),v.a.createElement("div",{className:"ml-3 u-truncate-2 u-fw-500 u-fs-1x1o3 text-secondary"},i)),v.a.createElement("div",{className:"mt-2 u-fs-1x1o6 u-fw-500"},t("modal.confirmDeleteResourceTitle")),a&&v.a.createElement(_u,{id:"checkboxPermanentlyDeleteResource",labelName:t("modal.confirmDeleteResourceOption"),className:"mt-2 pl-2 u-fs-7o8",classNameInput:"custom-checkbox-md justify-content-start",checked:d,onChange:function(e){h(e.target.checked||o)},disabled:o}),v.a.createElement("div",{className:"mt-2 u-fs-15o16 text-right"},t("modal.wantToContinue")))},hae=r(333),fae=r.n(hae);x.g.RESOURCE.APPROVED_STATUS;var pae=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{stars:0,comment:"",alreadyRated:!1,isLoading:!1,isSubmitting:!1,showCloseConfirmation:!1}),G()(V()(e),"previousRating",null),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"isDirty",!1),G()(V()(e),"componentDidMount",(function(){e.getMyRating()})),G()(V()(e),"getMyRating",(function(){var t=e.props,n=t.productId,r=t.getProductMyRating;e.setState({isLoading:!0}),r({productId:n},(function(t){t&&(e.previousRating=t,e.setState({alreadyRated:!0,stars:t.stars||0,comment:t.comment||""})),setTimeout((function(){e.setState({isLoading:!1})}),500)}),(function(t){setTimeout((function(){e.setState({isLoading:!1})}),500)}))})),G()(V()(e),"checkCanSubmitForm",(function(){return e.state.stars>0&&e.validator.allValid()})),G()(V()(e),"handleOptionChange",(function(t){e.setState({option:t})})),G()(V()(e),"handleStarsChange",(function(t){e.setState({stars:t})})),G()(V()(e),"handleInputChange",(function(t){var n=t.target,r=n.name,i=n.value;e.isDirty=!0,e.setState(G()({},r,i),(function(){e.handleFormFieldValidate(r)}))})),G()(V()(e),"handleInputBlur",(function(t){var n=t.target.name;e.handleFormFieldValidate(n)})),G()(V()(e),"handleFormFieldValidate",(function(t){e.validator.showMessageFor(t),e.forceUpdate()})),G()(V()(e),"handleSubmit",(function(t){var n;t.stopPropagation();var r=e.props,i=r.productId,a=r.title,o=r.onClose,s=r.ratingProduct,l=r.updateRating,c=e.state,u=c.stars,d=c.comment,h=c.alreadyRated;e.setState({isSubmitting:!0}),(h?l:s)({productId:i,title:a,comment:d,stars:u,ratingId:null===(n=e.previousRating)||void 0===n?void 0:n.id},(function(){e.setState({isSubmitting:!1}),o(!0)}),(function(t){e.setState({isSubmitting:!1})}))})),G()(V()(e),"handleClose",(function(t){t.stopPropagation(),e.isDirty?e.setState({showCloseConfirmation:!0}):e.props.onClose()})),G()(V()(e),"handleCloseConfirm",(function(t){t.stopPropagation(),(0,e.props.onClose)()})),G()(V()(e),"handleDeleteConfirm",(function(){(0,e.props.deleteRating)({ratingId:e.previousRating.id},(function(){e.setState({alreadyRated:!1,stars:0,comment:"",showDeleteConfirmation:!1}),e.previousRating=null}))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.stars,i=n.comment,a=n.showCloseConfirmation,o=n.showDeleteConfirmation,s=n.isSubmitting,l=n.alreadyRated,c=this.checkCanSubmitForm();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.reviewModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"pl-4"},v.a.createElement("div",{className:"modal-title h4"},t("modal.ratingProductTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:"u-fw-500 mr-4"},t("label.yourRating")),v.a.createElement(fae.a,{key:r,classNames:"u-line-height-1",count:5,size:36,value:r,onChange:this.handleStarsChange}),v.a.createElement("div",{className:"flex-grow-1"}),l&&v.a.createElement(Qt,{tooltipText:t("tooltip.deleteRating"),onClick:function(){return e.setState({showDeleteConfirmation:!0})}},v.a.createElement("i",{className:"fv fuvi-trash-can u-fs-1x1o4"}))),v.a.createElement(mu,{labelName:t("label.comment"),name:"comment",value:i,disabled:s,placeholder:t("placeholder.addComment"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("comment",i,"max:".concat(200)),className:"mt-2",classNameInput:P()(Nee.a.description,"fv-custom-scroll"),as:"textarea",rows:6})),v.a.createElement(Fl.a.Footer,{className:Nee.a.footer},v.a.createElement("div",{className:"w-100 d-flex justify-content-end"},v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},t("btn.cancel")),v.a.createElement(et.a,{disabled:!c||s,variant:"primary",className:"u-flex-center text-white modal-button ml-4",onClick:this.handleSubmit},s?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):t("btn.save"))))),v.a.createElement(IC,{show:!!o,title:t("modal.confirmDeleteRatingTitle"),onConfirm:this.handleDeleteConfirm,onClose:function(){return e.setState({showDeleteConfirmation:!1})}}),v.a.createElement(IC,{show:!!a,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:this.handleCloseConfirm,onClose:function(){return e.setState({showCloseConfirmation:!1})}}))}}]),r}(g.PureComponent),mae=Object(q.b)(null,(function(e){return{ratingProduct:function(t,n,r){return e(Q.d.ratingProduct(t,n,r))},deleteRating:function(t,n,r){return e(Q.d.deleteRating(t,n,r))},updateRating:function(t,n,r){return e(Q.d.updateRating(t,n,r))},getProductMyRating:function(t,n,r){return e(Q.d.getProductMyRating(t,n,r))}}}))(pae);var gae=[1,2,3,4,5],vae=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{items:[],filteredItems:[],isLoading:!1,summaryRating:{count:0,stars:0},rating:{1:{show:!0,count:0},2:{show:!0,count:0},3:{show:!0,count:0},4:{show:!0,count:0},5:{show:!0,count:0}}}),G()(V()(e),"componentDidMount",(function(){e.getProductRatings()})),G()(V()(e),"getProductRatings",(function(){var t=e.props,n=t.productId,r=t.getProductRatings,i=t.getProductSummaryRating,a=t.onRenderItemUpdate;e.state.rating;n&&(e.setState({isLoading:!0}),i({productId:n},(function(t){e.setState({summaryRating:t}),a(n,{ratingSum:t})})),r({productId:n},(function(t){var n=Object(Y.cloneDeep)(e.state.rating);[1,2,3,4,5].map((function(e){n[e].count=Object(Y.filter)(t,{stars:e}).length})),e.setState({items:t,filteredItems:t,rating:n}),Object(Y.delay)((function(){return e.setState({isLoading:!1})}),500)}),(function(t){Object(Y.delay)((function(){return e.setState({isLoading:!1})}),500)})))})),G()(V()(e),"handleFilterChange",(function(t){var n=t.target,r=n.name,i=n.checked,a=e.state,o=a.rating,s=a.items,l=Object(Y.cloneDeep)(o);Object(Y.merge)(l,G()({},r,{show:i}));var c=[];Object(Y.forEach)(l,(function(e,t){e.show&&c.push(Number(t))}));var u=s.filter((function(e){return c.includes(e.stars)}));e.setState({rating:l,filteredItems:u})})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.filteredItems,i=n.rating,a=n.summaryRating,o=this.props.onClose,s=x.c.getDisplayRating(a.stars);return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.viewRatingsModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:o},v.a.createElement(Fl.a.Header,{className:"pl-4"},v.a.createElement("div",{className:"modal-title h4"},t("modal.viewRatingsTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:o,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:"u-w-10 u-fs-15o16 u-fw-500 mr-4"},t("overallScore")),v.a.createElement(fae.a,{key:a.stars,isHalf:!0,edit:!1,classNames:"u-line-height-1",count:5,size:28,value:(null==s?void 0:s.stars)||0}),s&&v.a.createElement("div",{className:"ml-3 u-fw-500 u-fs-15o16"},"".concat(a.stars," - ").concat(s.label))),v.a.createElement("div",{className:"mt-2 d-flex"},v.a.createElement("div",{className:"u-w-9 u-fs-15o16 u-fw-500"},t("summary")),v.a.createElement("div",null,gae.map((function(n){return v.a.createElement("div",{key:n,className:"d-flex align-items-center"},v.a.createElement(_u,{id:"checkboxStar".concat(n),name:n,className:"mt-1 mx-2",classNameInput:"custom-checkbox-md justify-content-start",checked:i[n].show,onChange:e.handleFilterChange}),v.a.createElement(fae.a,{edit:!1,classNames:"u-line-height-1",count:5,size:28,value:n}),v.a.createElement("div",{className:"ml-3 u-fs-7o8"},t("ratingCount",{count:i[n].count})))})))),v.a.createElement("div",{className:"my-4"},v.a.createElement("div",{className:"d-flex u-fs-15o16 u-fw-500 border-bottom"},v.a.createElement("div",{className:"u-w-4 flex-shrink-0"},t("label.stars")),v.a.createElement("div",{className:"u-w-8 flex-shrink-0"},t("label.addedAt")),v.a.createElement("div",{className:"w-100"},t("label.comment"))),v.a.createElement("div",{className:P()(Nee.a.ratingsWrapper,"fv-custom-scroll mt-2")},0===r.length&&v.a.createElement("div",{className:"u-fs-7o8 u-opacity-75 font-italic"},t("noRatingFound")),r.map((function(e){var t=e.id,n=e.stars,r=e.reviewedAt,i=e.comment;return v.a.createElement("div",{key:t,className:"d-flex"},v.a.createElement("div",{className:"u-w-4 flex-shrink-0"},n),v.a.createElement("div",{className:"u-w-8 flex-shrink-0"},qO()(r).format("ll")),v.a.createElement("div",{className:"w-100"},i))}))))),v.a.createElement(Fl.a.Footer,{className:Nee.a.footer},v.a.createElement("div",{className:"w-100 d-flex justify-content-end"},v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:o},t("btn.close"))))))}}]),r}(g.PureComponent),bae=Object(q.b)(null,(function(e){return{getProductRatings:function(t,n,r){return e(Q.d.getProductRatings(t,n,r))},getProductSummaryRating:function(t,n,r){return e(Q.d.getProductSummaryRating(t,n,r))}}}))(vae);var yae=x.g.RESOURCE_TYPE,Aae=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{editItem:null,deleteItem:null,reviewItem:null,ratingItem:null,viewRatingsItem:null,previewItem:null}),G()(V()(e),"handleItemEdit",(function(t){e.setState({editItem:t})})),G()(V()(e),"handleEditModalClose",(function(t,n){e.setState({editItem:null}),t&&e.props.onItemsRefresh(n)})),G()(V()(e),"handleItemDelete",(function(t){e.setState({deleteItem:t})})),G()(V()(e),"handleItemDeleteConfirm",(function(t){var n=e.state.deleteItem;if(n){var r=e.props,i=r.videoId,a=r.deleteProduct,o=r.deleteLinkedProduct;(t?a:o)({videoId:i,productId:n.id,title:n.title},(function(){e.props.onItemsRefresh()})),e.setState({deleteItem:null})}})),G()(V()(e),"handleItemDeleteCancel",(function(){e.setState({deleteItem:null})})),G()(V()(e),"handleItemReview",(function(t){e.setState({reviewItem:t})})),G()(V()(e),"handleReviewModalClose",(function(t){e.setState({reviewItem:null}),t&&e.props.onItemsRefresh()})),G()(V()(e),"handleItemRating",(function(t){var n=window.location,r=n.pathname+n.search;x.c.checkLoggedIn(r)&&e.setState({ratingItem:t})})),G()(V()(e),"handleRatingModalClose",(function(t){e.setState({ratingItem:null}),t&&e.props.onItemsRefresh()})),G()(V()(e),"handleItemViewRatings",(function(t){e.setState({viewRatingsItem:t})})),G()(V()(e),"handleViewRatingsModalClose",(function(){e.setState({viewRatingsItem:null})})),G()(V()(e),"handleItemPreview",(function(t){var n=t.resourceType===yae.LIVE_CLASS.value;if((!n||t.profileUrl)&&(n||t.previewUrls.length)){var r=e.props.incrProductCounts;e.setState({previewItem:t},(function(){n?x.b.reportTeacherProfileViewDesktopLoaded():x.b.reportResourcePreviewDesktopLoaded(),r({productId:t.id,flags:"V"})}))}})),G()(V()(e),"handlePreviewModalClose",(function(){e.setState({previewItem:null})})),G()(V()(e),"handleItemDownload",(function(t,n,r){if(t){var i=e.props,a=i.items,o=i.incrProductCounts,s=Object(Y.find)(a,{id:t.id})||t,l=s.id,c=s.contentUrls,u=void 0===c?[]:c,d=s.filenames,h=void 0===d?[]:d;if(u.length>0)x.c.download({url:u[n],name:h[n],callback:function(){o({productId:t.id,flags:"V,D"}),t.free&&x.b.reportFreeResourceDownloadDesktop(),r&&r()}});else{var f=e.props,p=f.videoId,m=f.downloadProduct,g=f.onRenderItemUpdate;m({videoId:p,productId:l},(function(e){g(l,{contentUrls:e}),x.c.download({url:e[n],name:h[n],callback:function(){o({productId:t.id,flags:"V,D"}),t.free&&x.b.reportFreeResourceDownloadDesktop(),r&&r()}})}),(function(e){r&&r()}))}}})),G()(V()(e),"handleItemPurchase",(function(t,n){if(t){var r=e.props,i=r.videoId,a=(r.incrProductCounts,r.registerForFreeCourse),o=r.addItemToCart,s=t.id,l=t.title,c=t.resourceType,u="PDF_PPT"==c?x.g.PRODUCT_TYPE.RESOURCE:x.g.PRODUCT_TYPE.LIVECLASS,d=window.location,h=d.pathname+d.search;if(x.c.checkLoggedIn(h))if(c===yae.LIVE_CLASS.value&&t.free)a({videoId:i,productId:t.id,title:t.title},(function(e){n&&n()}));else o({productId:s,productTitle:l,productType:u},n&&n());else n&&n()}})),G()(V()(e),"handleProductLinkClick",(function(t){e.props.displayMyResourcesModal(null),e.props.displayProductsLayer(null);var n=new URL(t.url);$.a.push(n.pathname+n.search,{refresh:!0})})),G()(V()(e),"handleItemDescExpand",(function(t){(0,e.props.incrProductCounts)({productId:t,flags:"V"})})),G()(V()(e),"handleProductLikeness",(function(t){var n=e.props,r=n.likeProduct,i=n.onRenderItemUpdate;null!=t&&t.liked||r({productId:t.id},(function(e){i(t.id,{liked:!0,likeCount:e||t.likeCount})}))})),G()(V()(e),"handleItemDownloadLink",(function(t,n,r){if(t){var i=e.props.incrProductCounts,a=(t.fileLinks||[])[n];a&&window.open(a,"_blank").focus(),i({productId:t.id,flags:"V,D"}),t.free&&x.b.reportFreeResourceDownloadDesktop(),r&&r()}})),G()(V()(e),"handleLinkProductToCommunity",(function(t){var n=e.props.isStoreOwner,r={productId:t.id,isStoreOwner:n};e.props.linkProduct(r,(function(){return e.props.onItemsRefresh()}))})),G()(V()(e),"handleUnlinkProductFromCommunity",(function(t){var n={productId:t.id,title:t.title};e.props.deleteLinkedProduct(n,(function(){return e.props.onItemsRefresh()}))})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.items,r=t.isLoading,i=t.isStoreOwner,a=t.userId,o=t.videoId,s=t.withLinks,l=t.prefixId,c=void 0===l?"product":l,u=t.subscriptionOptions,d=t.onRenderItemUpdate,h=t.selectedId,f=this.state,p=f.editItem,m=f.deleteItem,g=f.reviewItem,b=f.ratingItem,y=f.viewRatingsItem,A=f.previewItem,_=(null==u?void 0:u.resourceManipulationPermission)||i;return v.a.createElement(v.a.Fragment,null,!r&&0===n.length&&v.a.createElement("div",{className:"w-100 h-100 flex-column u-flex-center"},v.a.createElement("img",{width:"180",height:"180",className:"u-opacity-40",src:I.a.resourceIcon})),v.a.createElement("div",{className:P()(Nee.a.productList)},n.map((function(t,n){var r=t.resourceType===x.g.RESOURCE_TYPE.LIVE_CLASS.value?jee:Ree;return v.a.createElement(r,Gt()({videoId:o,key:"".concat(c,"-").concat(t.id),index:n,withLinks:s,prefixId:c},t,{ratingSum:t.ratingSum||{},isLoggedIn:!!a,isOwner:t.createdBy===a,isStoreOwner:i,canEdit:_,isSelected:h===t.id,onEdit:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleItemEdit(t)},onDelete:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleItemDelete(t)},onReview:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleItemReview(t)},onDownload:function(n,r,i){Object(Y.invoke)(n,"target.blur"),t.contentTypeLink?e.handleItemDownloadLink(t,r,i):e.handleItemDownload(t,r,i)},onPurchase:function(n,r){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleItemPurchase(t,r)},onRating:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleItemRating(t)},onViewRatings:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleItemViewRatings(t)},onPreview:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleItemPreview(t)},onProductLinkClick:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleLinkProductToCommunity(t)},onProductUnlinkClick:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleUnlinkProductFromCommunity(t)},onProductDescExpanded:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleItemDescExpand(t.id)},onDoLikeProduct:function(n){Object(Y.invoke)(n,"stopPropagation"),Object(Y.invoke)(n,"target.blur"),e.handleProductLikeness(t)}}))}))),p&&v.a.createElement(sae,Gt()({},p||{},{isEdit:!!p,videoId:o,onClose:this.handleEditModalClose})),g&&v.a.createElement(uae,{videoId:o,productId:g.id,title:g.title,remark:g.message,onClose:this.handleReviewModalClose}),!!m&&v.a.createElement(dae,{show:!0,forcePermanentlyDelete:!o,title:null==m?void 0:m.title,thumbnailUrl:null==m?void 0:m.thumbnailUrl,isOwner:(null==m?void 0:m.createdBy)===a,onConfirm:this.handleItemDeleteConfirm,onClose:this.handleItemDeleteCancel}),b&&v.a.createElement(mae,{productId:b.id,title:b.title,onClose:this.handleRatingModalClose}),y&&v.a.createElement(bae,{productId:y.id,onRenderItemUpdate:d,onClose:this.handleViewRatingsModalClose}),A&&v.a.createElement(aT,{productId:A.id,title:A.title,urls:A.resourceType===yae.LIVE_CLASS.value?[A.profileUrl]:A.previewUrls,onClose:this.handlePreviewModalClose}))}}]),n}(g.Component),_ae=Object(q.b)((function(e){var t=e.auth;return{userId:t.userInfo.userId,subscriptionOptions:t.userInfo.subscriptionOptions}}),(function(e){return{deleteProduct:function(t,n,r){return e(Q.e.deleteProduct(t,n,r))},linkProduct:function(t,n,r){return e(Q.e.linkProduct(t,n,r))},deleteLinkedProduct:function(t,n,r){return e(Q.e.deleteLinkedProduct(t,n,r))},downloadProduct:function(t,n,r){return e(Q.e.downloadProduct(t,n,r))},displayMyResourcesModal:function(t){return e(Q.e.displayMyResourcesModal(t))},displayProductsLayer:function(t,n,r){return e(Q.e.displayProductsLayer(t,n,r))},incrProductCounts:function(t,n,r){return e(Q.e.incrProductCounts(t,n,r))},likeProduct:function(t,n,r){return e(Q.d.likeProduct(t,n,r))},registerForFreeCourse:function(t,n,r){return e(Q.e.registerForFreeCourse(t,n,r))},addItemToCart:function(t,n,r){return e(Q.c.addItemToCart(t,n,r))}}}))(Aae);var wae=x.g.TEXT_INPUT_MAX_LENGTH,Eae=x.g.PARTICIPANT,Sae=x.g.PARTICIPANT_TYPES,Cae=x.g.PRIORITY_COUNTRIES_SELECT,Tae=[{label:"Upload Live Classes",value:"upload"},{label:"Sell Resources",value:"sell"},{label:"Buy Resources",value:"buy"},{label:"Teaching & Learning Discussion",value:"teach"}],kae=[{label:"Classes",value:"classes"},{label:"Resources",value:"resources"},{label:"Teaching & Learning Discussion",value:"teach"}],xae=[{label:"Arithmetic",value:"arithmetic"},{label:"Algebra",value:"algebra"}],Oae=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{firstname:"",lastname:"",email:"",phone:"",country:"",city:"",joinAs:Eae.LEARNER,expectedGrade:"",expectedFirstClass:"",interestAreas:[],interestSubjects:[],subjects:"",years:"",grades:"",students:"",textbooks:"",reviewMessage:""}),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"isDirty",!1),G()(V()(e),"componentDidMount",(function(){var t=e.props,n=t.isEdit,r=t.isReview,i=t.userInfo,a=n||r?{}:void 0===i?{}:i,o=e.props,s=o.firstname,l=void 0===s?(null==a?void 0:a.firstName)||"":s,c=o.lastname,u=void 0===c?(null==a?void 0:a.lastName)||"":c,d=o.email,h=void 0===d?(null==a?void 0:a.email)||"":d,f=o.phone,p=void 0===f?(null==a?void 0:a.phone)||"":f,m=o.country,g=void 0===m?(null==a?void 0:a.country)||"":m,v=o.city,b=void 0===v?(null==a?void 0:a.location)||"":v,y=o.joinAs,A=void 0===y?(null==a?void 0:a.audience)||"":y,_=o.expectedGrade,w=void 0===_?"":_,E=o.expectedFirstClass,S=void 0===E?"":E,C=o.interestAreas,T=void 0===C?[]:C,k=o.interestSubjects,x=void 0===k?[]:k,O=o.subjects,I=void 0===O?"":O,M=o.years,P=void 0===M?"":M,D=o.grades,N=void 0===D?"":D,L=o.students,R=void 0===L?"":L,B=o.textbooks,j=void 0===B?"":B,F=(A===Eae.TEACHER?Tae:kae).filter((function(e){return(T||[]).includes(e.value)})),U=xae.filter((function(e){return(x||[]).includes(e.value)}));e.setState({firstname:l,lastname:u,email:h,phone:p,country:g,city:b,joinAs:A,expectedGrade:w,expectedFirstClass:S?new Date(S):"",interestAreas:F,interestSubjects:U,subjects:I,years:""+P,grades:N,students:""+R,textbooks:j},(function(){e.validator.purgeFields()}))})),G()(V()(e),"handleSubmit",(function(t){t.preventDefault();var n=e.props,r=n.isEdit,i=n.isReview,a=n.storeId,o=n.avatar,s=n.avatarUrl,l=n.addStoreMember,c=n.updateStoreMember,u=n.onClose,d=n.uploadAvatar,h=n.updateJoinAs,f=n.userInfo,p=e.state,m=p.firstname,g=p.lastname,v=p.email,b=p.phone,y=p.country,A=p.city,_=p.joinAs,w=p.expectedGrade,E=p.expectedFirstClass,S=p.interestAreas,C=void 0===S?[]:S,T=p.interestSubjects,k=void 0===T?[]:T,x=p.subjects,O=p.years,I=p.grades,M=p.students,P=p.textbooks,D=p.reviewMessage;if(e.setState({isSubmitting:!0}),e.validator.allValid()){if(_===Eae.TEACHER&&!o&&!s&&!e.avatarFile)return e.validator.showMessageFor("avatar"),e.forceUpdate(),void e.setState({isSubmitting:!1});e.avatarFile&&d({file:e.avatarFile}),_!==(null==f?void 0:f.audience)&&h(_),(r?c:l)({storeId:a,firstname:m,lastname:g,email:v,phone:b,country:y,city:A,joinAs:_,interestAreas:C.map((function(e){return e.value})).join(", "),subjects:x,years:M?Number(O):"",grades:I,students:M?Number(M):"",textbooks:P,expectedFirstClass:E,expectedGrade:w,interestSubjects:k.map((function(e){return e.value})).join(", ")},(function(){i&&D?e.handleReview():(e.setState({isSubmitting:!1}),u&&u(!0))}),(function(){e.setState({isSubmitting:!1})}))}else e.setState({isSubmitting:!1}),e.validator.showMessages(),e.forceUpdate()})),G()(V()(e),"handleCountrySelect",(function(t){e.isDirty=!0,e.setState({country:t})})),G()(V()(e),"handleInputChange",(function(t){var n=t.target,r=n.name,i=n.value,a=n.type,o=n.checked,s="checkbox"===a?o:i;e.isDirty=!0,e.setState(G()({},r,s))})),G()(V()(e),"handleInputBlur",(function(t){var n=t.target.name;e.validator.showMessageFor(n),e.forceUpdate()})),G()(V()(e),"handleClose",(function(n){n.stopPropagation(),e.isDirty?e.setState({showConfirmation:{action:e.props.onClose,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage")}}):e.props.onClose()})),G()(V()(e),"handleConfirm",(function(t){var n;t.stopPropagation();var r=null===(n=e.state.showConfirmation)||void 0===n?void 0:n.action;r&&r(),e.setState({showConfirmation:null})})),G()(V()(e),"checkCanSubmitForm",(function(){var t=e.props.isReview,n=e.state,r=n.isSubmitting,i=n.joinAs;return e.isDirty&&!r&&(!!i||t)})),G()(V()(e),"handleAudienceChange",(function(t){e.validator.purgeFields(),e.setState({joinAs:t,interestAreas:[],interestSubjects:[]},(function(){}))})),G()(V()(e),"handleAvatarSelect",(function(n){var r,i=[];if(n.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),i.push(e)})),i.length<1)Toast.warn(t("message.imageSupportedFiles"));else{if(0===i.length)return Toast.error(t("message.imageRequired")),!1;if(i[0].size>524288e3)return Toast.error(t("message.maxFileSize",{size:"500 MB"})),!1;e.isDirty=!0,e.isDirtyAvatar=!0,e.avatarFile=i[0],e.setState({avatar:null===(r=i[0])||void 0===r?void 0:r.name},e.forceUpdate)}})),G()(V()(e),"handleAvatarRefresh",(function(t){t.stopPropagation(),e.isDirtyAvatar=!1,e.avatarFile=null,e.setState({avatar:e.props.avatar},e.forceUpdate)})),G()(V()(e),"handleReview",(function(t){t&&t.preventDefault();var n=e.props,r=n.storeId,i=n.memberId,a=n.reviewStoreMember,o=n.onClose,s=e.state.reviewMessage,l=void 0===s?"":s;if(l.length>2e4)return e.validator.showMessageFor("message"),void e.forceUpdate();e.setState({isSubmitting:!0}),a({storeId:r,memberId:i,message:l},(function(){e.setState({isSubmitting:!1}),o&&o(!0)}),(function(){e.setState({isSubmitting:!1})}))})),G()(V()(e),"handleApprove",(function(t){t&&t.preventDefault();var n=e.props,r=n.storeId,i=n.memberId,a=n.approveStoreMember,o=n.onClose,s=e.state.reviewMessage;e.setState({isSubmitting:!0}),a({storeId:r,memberId:i,message:s},(function(){e.setState({isSubmitting:!1}),o&&o(!0)}),(function(){e.setState({isSubmitting:!1})}))})),G()(V()(e),"handleRemove",(function(t){t&&t.preventDefault();var n=e.props,r=n.storeId,i=n.memberId,a=n.removeStoreMember,o=n.onClose,s=n.onStoreRefresh;e.setState({isSubmitting:!0}),a({storeId:r,memberId:i},(function(){e.setState({isSubmitting:!1}),o&&o(!0),s&&s()}),(function(){e.setState({isSubmitting:!1})}))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props,r=n.isApproved,i=n.isStoreOwner,a=n.userInfo,o=n.isReview,s=n.reviewLogs,l=void 0===s?[]:s,c=n.avatarUrl,u=n.memberId,d=n.storeOwnerAvatarUrl,h=this.state,f=h.isSubmitting,p=h.firstname,m=h.lastname,g=h.email,b=h.phone,y=h.country,A=h.city,_=h.joinAs,w=h.subjects,E=h.years,S=h.grades,C=h.students,T=h.textbooks,k=h.avatar,O=h.expectedGrade,I=h.expectedFirstClass,M=h.interestAreas,D=void 0===M?[]:M,N=h.interestSubjects,L=void 0===N?[]:N,R=h.reviewMessage,B=h.showConfirmation,j=this.checkCanSubmitForm();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.storeMemberApplicationModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"w-100 pl-4 u-flex-center"},v.a.createElement("div",{className:"modal-title h4"},"Member Application"),r&&v.a.createElement("div",{className:P()(Nee.a.badgeApproved,"ml-4")},"APPROVED"),v.a.createElement("div",{className:"flex-grow-1"}),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},v.a.createElement("div",{className:P()(Nee.a.formWrapper)},v.a.createElement("div",{className:Nee.a.storeMemberApplicationForm},v.a.createElement($l.a,{className:"",id:"joinForm",name:"joinForm",noValidate:!0,onSubmit:i||r?this.handleReview:this.handleSubmit},v.a.createElement(rj,{disabled:!o,defaultOpen:!0,header:v.a.createElement("div",{className:"my-2 u-fs-1x1o6 u-fw-500 u-opacity-80"},i?"Member Contact":"Your Contact")},v.a.createElement("div",{className:"u-flex-center"},v.a.createElement(mu,{required:!0,disabled:i||f||r,className:"w-50 mr-3",type:"text",placeholder:t("form.firstName"),labelName:t("form.firstName"),name:"firstname",value:p,onChange:this.handleInputChange,onBlur:function(){return e.handleInputBlur({target:{name:"first name"}})},validatorElement:this.validator.message("first name",p,"required|max:".concat(wae))}),v.a.createElement(mu,{required:!0,disabled:i||f||r,className:"w-50",type:"text",placeholder:t("form.lastName"),labelName:t("form.lastName"),name:"lastname",value:m,onChange:this.handleInputChange,onBlur:function(){return e.handleInputBlur({target:{name:"last name"}})},validatorElement:this.validator.message("last name",m,"required|max:".concat(wae))})),v.a.createElement(mu,{required:!0,disabled:i||f||r,type:"text",placeholder:t("email"),labelName:t("email"),name:"email",value:g,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("email",g,"emailAddressRequired|max:".concat(wae))}),v.a.createElement(mu,{disabled:i||f||r,type:"text",placeholder:t("label.phone"),labelName:t("label.phone"),name:"phone",value:b,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("phone",b,"phone|max:".concat(wae))}),v.a.createElement("div",{className:"u-flex-center"},v.a.createElement(rd,{required:!0,labelName:"Country",className:"w-50 mr-3",disabled:i||f||r,name:"country",value:y,onChange:this.handleCountrySelect,onBlur:function(t,n){return e.handleInputBlur(n)},priorityOptions:Cae,validatorElement:this.validator.message("country",y,"required")}),v.a.createElement(mu,{required:!0,disabled:i||f||r,className:"w-50",type:"text",placeholder:t("label.city"),labelName:t("label.city"),name:"city",value:A,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("city",A,"required|max:".concat(wae))})),v.a.createElement(wu,{disabled:i||f||r,labelName:t("placeholder.joinAs"),name:"joinAs",value:_,options:Sae,onChange:this.handleAudienceChange,placeholder:t("placeholder.joinAs")}),(_===Eae.LEARNER||_===Eae.PARENT)&&v.a.createElement(v.a.Fragment,null,v.a.createElement(mu,{required:!0,disabled:i||f||r,type:"text",labelName:_===Eae.LEARNER?"Grade":"Grade of your student(s)",name:"expectedGrade",value:O,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("grade",O,"required|max:".concat(wae))}),v.a.createElement(hu,{required:!0,disableSearch:!0,disabled:i||f||r,className:"cogvid-input-border",classNameContainer:"mb-3 u-z-index-2",labelName:t("placeholder.interestSubjects"),placeholder:"Select subject(s)",options:xae,value:L,onChange:function(t){e.handleInputChange({target:{name:"interestSubjects",value:t}})},validatorElement:this.validator.message("interestSubjects",L,"required|max:".concat(wae))}),v.a.createElement(hu,{required:!0,disableSearch:!0,disabled:i||f||r,className:"cogvid-input-border",classNameContainer:"mb-3 u-z-index-1",labelName:t("placeholder.interestAreas"),placeholder:"Select area(s)",options:kae,value:D,onChange:function(t){e.handleInputChange({target:{name:"interestAreas",value:t}})},validatorElement:this.validator.message("interestAreas",D,"required|max:".concat(wae))})),v.a.createElement($l.a.Label,null,"Avatar ",_===Eae.TEACHER?"*":""),v.a.createElement(QT,{isDisabled:i||f||r,multiple:!1,acceptedFiles:".png,.jpg,.jpeg",receiveAcceptedFiles:this.handleAvatarSelect,wrapperClassName:"mb-3",innerWrapperClassName:P()(Nee.a.uploadBtn,"fv-input form-control d-flex align-items-center"),validatorElement:_===Eae.TEACHER?this.validator.message("avatar",k||c,"requiredAvatar"):null},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o2"}),v.a.createElement("div",{className:P()("text-truncate flex-grow-1",!k&&"u-opacity-80 u-fs-15o16 font-italic",this.isDirtyAvatar&&"text-primary")},k||t("placeholder.addAvatar")),this.avatarFile&&v.a.createElement(Qt,{className:"mr-n2",disabled:i||f||r,onClick:this.handleAvatarRefresh},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-1"}))),(this.avatarFile||c)&&v.a.createElement("div",{className:"w-100 u-h-8 mb-3 u-flex-center flex-grow-1 overflow-hidden"},v.a.createElement("div",{className:Nee.a.previewThumbnail,style:{backgroundImage:"url(".concat(this.avatarFile?URL.createObjectURL(this.avatarFile):c,")")},alt:"preview avatar"})),_===Eae.TEACHER&&v.a.createElement(v.a.Fragment,null,v.a.createElement(hu,{required:!0,disableSearch:!0,disabled:i||f||r,className:"cogvid-input-border",classNameContainer:"mb-3",labelName:t("placeholder.interestAreas"),placeholder:"Select area(s)",options:Tae,value:D,onChange:function(t){e.handleInputChange({target:{name:"interestAreas",value:t}})},validatorElement:this.validator.message("interestAreas",D,"required|max:".concat(wae))}),D.find((function(e){return"upload"===e.value}))&&v.a.createElement("div",null,v.a.createElement($l.a.Label,null,"When is your first class expected to start?"),v.a.createElement(Hu,{className:Nee.a.datePicker,classNameWrap:Nee.a.datePickerInput,disabled:i||f||r,selected:I,onSelect:function(t){e.handleInputChange({target:{name:"expectedFirstClass",value:t}})},minDate:new Date,dateFormat:"MMM d, yyyy"})),v.a.createElement("div",{className:"my-2 u-fs-1x1o6 u-fw-500 u-opacity-80"},i?"Member Experience":"Your Experience"),v.a.createElement(mu,{required:!0,disabled:i||f||r,type:"text",labelName:t("placeholder.storeMemberSubjects"),name:"subjects",value:w,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("subjects",w,"required|max:".concat(wae))}),v.a.createElement(mu,{required:!0,disabled:i||f||r,type:"number",labelName:t("placeholder.storeMemberYears"),name:"years",value:E,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("years",E,"required|max:".concat(wae))}),v.a.createElement(mu,{disabled:i||f||r,type:"text",labelName:t("placeholder.storeMemberGrades"),name:"grades",value:S,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("grades",S,"max:".concat(wae))}),v.a.createElement(mu,{disabled:i||f||r,type:"number",labelName:t("placeholder.storeMemberStudents"),name:"students",value:C,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("students",C,"max:".concat(wae))}),v.a.createElement(mu,{disabled:i||f||r,type:"text",labelName:t("placeholder.storeMemberTextbooks"),name:"textbooks",value:T,onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("textbooks",T,"max:".concat(wae))}))),(i||l.length>0)&&v.a.createElement("div",{className:"my-2 u-fs-1x1o6 u-fw-500 u-opacity-80"},"Request of additional information"),v.a.createElement("div",{className:"mt-2 mb-3"},l.map((function(e,t){var n,r=(null==a?void 0:a.userId)===e.poster,i=u===e.poster,o=e.postedAtZ||e.postedAt,s=i?c:d,h=e.poster!==(null===(n=l[t+1])||void 0===n?void 0:n.poster);return v.a.createElement("div",{key:o,className:P()("mt-1 d-flex",r&&"flex-row-reverse")},v.a.createElement("div",{className:"u-w-2 u-flex-center align-items-end"},h&&v.a.createElement("div",{className:Nee.a.avatar,style:{backgroundImage:s?"url(".concat(s,")"):void 0}})),v.a.createElement("div",{key:o,className:P()(Nee.a.reviewLog,r&&"text-right ml-auto",i?Nee.a.purple:Nee.a.gray)},v.a.createElement(TR,{className:P()("u-fs-7o8 u-line-height-1 u-ws-pre-line u-wb-break-word text-dark"),classNameToggle:"u-text-purple",content:e.content,lineHeight:"1rem",maxRows:10}),v.a.createElement("div",{className:"u-fs-7o10 u-opacity-80"},x.c.formatDateTime(o))))}))),o&&v.a.createElement(Eu,{rows:3,name:"reviewMessage",value:R,placeholder:"Message",onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("message",R,"max:".concat(2e4))}),v.a.createElement(et.a,{variant:"primary",type:"submit",block:!0,className:"u-h-3 btn-border text-white mt-4 mb-3",disabled:!j||f},f?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):t("btn.submit")),i&&!r&&v.a.createElement(et.a,{variant:"secondary",block:!0,className:"u-h-3 btn-border text-white mb-3",onClick:function(){e.setState({showConfirmation:{action:e.handleApprove}})}},f?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):"Approve"),i&&r&&v.a.createElement(et.a,{variant:"secondary",block:!0,className:"u-h-3 btn-border text-white mb-3",onClick:function(){e.setState({showConfirmation:{action:e.handleRemove}})}},f?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):"Remove")))))),v.a.createElement(IC,{show:!!B,title:(null==B?void 0:B.title)||t("modal.confirmDoThis"),message:null==B?void 0:B.message,onConfirm:this.handleConfirm,onClose:function(){return e.setState({showConfirmation:null})}}))}}]),r}(g.Component),Iae=Object(q.b)((function(e){return{userInfo:e.auth.userInfo||{}}}),(function(e){return{addStoreMember:function(t,n,r){return e(Q.e.addStoreMember(t,n,r))},updateStoreMember:function(t,n,r){return e(Q.e.updateStoreMember(t,n,r))},reviewStoreMember:function(t,n,r){return e(Q.e.reviewStoreMember(t,n,r))},approveStoreMember:function(t,n,r){return e(Q.e.approveStoreMember(t,n,r))},removeStoreMember:function(t,n,r){return e(Q.e.removeStoreMember(t,n,r))},uploadAvatar:function(t,n,r){return e(Q.a.uploadAvatar(t,n,r))},updateJoinAs:function(t,n,r){return e(Q.a.updateJoinAs(t,n,r))}}}))(Oae),Mae=r(440),Pae=r(1043);function Dae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dae(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lae=x.g.MEMBERSHIP_STATUS,Rae=x.g.MEMBERSHIP_STATUS_DISPLAY;function Bae(e){var t=e.data,n=void 0===t?[]:t,r=e.onRowClick,i=v.a.useMemo((function(){return[{Header:"No",accessor:"no",width:50},{Header:"Name",accessor:"name",width:"40%",disableSortBy:!0},{Header:"Email",accessor:"email",disableSortBy:!0,width:"60%"},{Header:"Date of Applications",accessor:"requestedAt",width:200,Cell:function(e){return v.a.createElement("div",null,x.c.formatDateTime(e.row.original.requestedAt))}},{Header:"Country",accessor:"country",width:200},{Header:"Join as",accessor:"joinAs",width:120},{Header:"Status",accessor:"statusDisplay",width:180,Cell:function(e){var t=e.row.original,n=t.status===Lae.PENDING,r=t.status===Lae.APPROVED,i=t.statusDisplay===Rae.MESSAGE_RECEIVED;return v.a.createElement("div",{className:P()(!t.read&&i&&"u-fw-bold",n&&"u-fw-bold u-text-red",i?"u-text-dark-blue":r&&"u-text-green")},t.statusDisplay)}}]}),[]),a=Object(Mae.useTable)({columns:i,data:n,autoResetSortBy:!1},Mae.useSortBy,Mae.useBlockLayout,Pae.useSticky),o=a.getTableProps,s=a.getTableBodyProps,l=a.headerGroups,c=a.rows,u=a.prepareRow;return v.a.createElement("table",Gt()({},o(),{className:P()(Nee.a.table,"fv-table sticky")}),v.a.createElement("thead",null,l.map((function(e){return v.a.createElement("tr",e.getHeaderGroupProps(),e.headers.map((function(e){return v.a.createElement("th",e.getHeaderProps(e.getSortByToggleProps({style:{width:e.width,maxWidth:e.width}})),e.render("Header"),v.a.createElement("span",{className:Nee.a.sortIcon},e.isSorted?e.isSortedDesc?v.a.createElement("i",{className:"fv fuvi-s-arrow-down ml-1 u-fs-3o4"}):v.a.createElement("i",{className:"fv fuvi-s-arrow-up ml-1 u-fs-3o4"}):""))})))}))),v.a.createElement("tbody",s(),c.map((function(e,t){u(e);var n=[Lae.APPROVED,Lae.MESSAGING].includes(e.original.status);return v.a.createElement("tr",Gt()({},e.getRowProps(),{className:P()("u-cursor-pointer u-fs-7o8",n&&"u-bg-light-blue"),onClick:function(){r(Nae({index:e.index},e.original))}}),e.cells.map((function(e){return v.a.createElement("td",e.getCellProps({style:{width:e.column.width,maxWidth:e.column.width}}),e.render("Cell"))})))}))))}var jae=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isLoading:!0,members:[],searchTerm:"",filter:{},queryParams:{pageIndex:0,pageSize:1e6,pageCount:-1,status:[]},countryOptions:[],countryFilters:[]}),G()(V()(e),"componentDidMount",(function(){e.fetchStoreMembers(!0);var t={};Object.values(Lae).map((function(e){return t[e]=!0})),e.setState({filter:t})})),G()(V()(e),"fetchStoreMembers",Object(Y.debounce)((function(t){var n=e.props,r=n.storeId,i=n.userId,a=n.searchStoreMembers,o=e.state,s=o.queryParams,l=s.search,c=s.pageIndex,u=s.pageSize,d=o.filter,h=void 0===d?{}:d,f=o.countryFilters,p=void 0===f?[]:f,m=Object.keys(h).filter((function(e){return h[e]})),g=p.map((function(e){return e.value}));e.setState({isLoading:!0}),a({storeId:r,params:{terms:l,pageNumber:c,pageSize:u,statuses:m,countries:g}},(function(n){var r=n.content,a=void 0===r?[]:r,o=n.number,s=n.size,l=n.totalPages,d=n.totalElements,h=a.map((function(e,t){var n=Rl()(e.reviewLogs).pop(),r=[Lae.MESSAGING,Lae.NEED_ATTENTION].includes(e.status)?(null==n?void 0:n.poster)===i?Rae.MESSAGE_SENT:Rae.MESSAGE_RECEIVED:Rae.OWNER[e.status];return Nae(Nae({},e),{},{no:c*u+t+1,name:e.firstname+" "+e.lastname,statusDisplay:r,read:null==n?void 0:n.read})})),f=Object(Y.uniq)(a.map((function(e){return e.country.trim().capitalize()}))).sort((function(e,t){return e>t?1:-1})).map((function(e){return{label:e,value:e}}));setTimeout(e.setState((function(e){return Nae({isLoading:!1,members:h,queryParams:Nae(Nae({},e.queryParams),{},{pageIndex:o,pageSize:s,pageCount:l,totalElements:d})},t?{countryOptions:f}:{})})),500)}),(function(){setTimeout(e.setState({isLoading:!1}),500)}))}),500)),G()(V()(e),"handleMemberUpdate",(function(t,n){var r=Object(Y.cloneDeep)(e.state.members),i=r.find((function(e){return e.id===t}));i&&(Object.assign(i,n),e.setState({members:r}))})),G()(V()(e),"handleClose",(function(t){t.stopPropagation(),e.isDirty?e.setState({showCloseConfirmation:!0}):e.props.onClose()})),G()(V()(e),"handleRowClick",(function(t){var n;t.read||e.props.readStoreMemberMessages({storeId:e.props.storeId,memberId:null==t?void 0:t.userId},(function(){e.handleMemberUpdate(t.id,{read:!0})})),e.setState({showMemberApplicationModal:Nae({isReview:!0,isStoreOwner:!0,isApproved:[Lae.APPROVED,Lae.MESSAGING].includes(t.status),storeId:e.props.storeId,storeOwnerId:null===(n=e.props)||void 0===n?void 0:n.storeOwnerId,memberId:null==t?void 0:t.userId,avatarUrl:t.avatar,storeOwnerAvatarUrl:e.props.userAvatar},t)})})),G()(V()(e),"handleQueryParamsChange",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setState((function(e){return{isLoading:!0,queryParams:Nae(Nae({},e.queryParams),t)}}),e.fetchStoreMembers)})),G()(V()(e),"handleSearchKeyDown",(function(t){var n=e.state.searchTerm;t.nativeEvent.stopImmediatePropagation(),13===t.keyCode&&e.handleQueryParamsChange({search:n,pageIndex:0}),x.c.preventKeyDownSideEffect(t)})),G()(V()(e),"handleSearchChange",(function(t){e.setState({searchTerm:t.target.value})})),G()(V()(e),"handleSearchClear",(function(){var t;e.setState({searchTerm:""}),(null===(t=e.state.queryParams)||void 0===t?void 0:t.search)&&e.handleQueryParamsChange({search:"",pageIndex:0})})),G()(V()(e),"handleFilterToggle",(function(t){e.setState((function(e){return{filter:Nae(Nae({},e.filter),{},G()({},t,!e.filter[t]))}}))})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.props.onStoreRefresh,r=this.state,i=r.isLoading,a=r.members,o=void 0===a?[]:a,s=r.queryParams,l=r.searchTerm,c=r.filter,u=r.showMemberApplicationModal,d=r.countryOptions,h=r.countryFilters;return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.storeMembersModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"pl-4"},v.a.createElement("div",{className:"modal-title h4"},"Community Members"),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody,"d-flex flex-column")},v.a.createElement("div",{className:"mb-2 d-flex align-items-center flex-wrap u-z-index-1"},v.a.createElement("div",{className:"u-w-20 u-h-2"},v.a.createElement(mE,{className:Nee.a.memberSearchBox,classNameInput:"u-fs-15o16",classNameSuffix:"text-dark",searchTerm:l,placeholder:"Email or name",onChange:this.handleSearchChange,onClear:this.handleSearchClear,onKeyDown:this.handleSearchKeyDown})),v.a.createElement("div",{className:"ml-3 u-w-20"},v.a.createElement(hu,{simple:!0,disableSearch:!1,selectAllLabel:"All countries",placeholder:"Countries",className:"u-fs-15o16",options:d,value:h,onChange:function(t){return e.setState({countryFilters:t})}}))),v.a.createElement("div",{className:"w-100 u-flex-center"},v.a.createElement("div",{className:"u-w-41 u-flex-center"},Object.values(Lae).map((function(t){return v.a.createElement(_u,{key:t,id:"cbFilterStatus-"+t,labelName:Rae.FILTER[t],className:"mr-1",classNameInput:"u-pl-2 u-fs-13o16",checked:c[t],onChange:function(){e.handleFilterToggle(t)}})})),v.a.createElement("div",{className:"flex-grow-1 "}),v.a.createElement(et.a,{variant:"primary",size:"sm",className:"u-w-6 ml-3 btn-border",onClick:this.handleQueryParamsChange,disabled:i},v.a.createElement("i",{className:"fv fuvi-search u-fs-3o4 mr-2"}),"Search")),v.a.createElement("div",{className:"flex-grow-1 "}),v.a.createElement(F7,{className:"my-2",pageIndex:s.pageIndex,pageSize:s.pageSize,pageCount:s.pageCount,onChange:this.handleQueryParamsChange})),!i&&0==o.length&&v.a.createElement("div",{className:"u-h-18 u-flex-center"},v.a.createElement("img",{width:"60",height:"60",className:"u-opacity-40",src:I.a.defaultGroupAvatar})),o.length>0&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"my-2 ml-2 u-fw-500 u-fs-7o8 font-italic u-opacity-80"},t("memberCount",{count:s.totalElements})),v.a.createElement("div",{className:P()("w-100 h-100 position-relative fv-custom-scroll overflow-auto u-z-index-0",Nee.a.memberList)},i&&v.a.createElement(Nn,{className:"text-primary"}),v.a.createElement(Bae,{data:o,onRowClick:this.handleRowClick})))),u&&v.a.createElement(Iae,Gt()({},u,{onClose:function(t){e.setState({showMemberApplicationModal:null}),t&&e.fetchStoreMembers()},onStoreRefresh:n}))))}}]),r}(g.Component);Object(q.b)((function(e){var t,n,r,i=e.auth;return{userId:null===(t=i.userInfo)||void 0===t?void 0:t.userId,userAvatar:null===(n=i.userInfo)||void 0===n?void 0:null===(r=n.avatar)||void 0===r?void 0:r.image}}),(function(e){return{getStoreMembers:function(t,n,r){return e(Q.e.getStoreMembers(t,n,r))},readStoreMemberMessages:function(t,n,r){return e(Q.e.readStoreMemberMessages(t,n,r))},searchStoreMembers:function(t,n,r){return e(Q.e.searchStoreMembers(t,n,r))}}}))(jae);var Fae=x.g.RESOURCE_SUBTYPE,Uae=(x.g.MEMBERSHIP_STATUS,x.g.MEMBERSHIP_STATUS_DISPLAY,Fae.TEXTBOOK,Fae.SLIDE,Fae.EXERCISE,x.g.RESOURCE_SUBTYPE),Hae=x.g.VIDEO_CATEGORY,zae=x.g.ID_VIDEO_BACK_BUTTON,Vae=function(e){var t=e.videoId,n=e.show,r=e.canOpenStore,i=e.topic,a=e.subject,o=e.resourceStore,s=e.editable,l=e.filter,c=e.isStoreOwner,u=e.isVideoActive,d=e.isAuthenticated,h=e.isFullscreenMode,f=e.videoSearchComponent,p=e.productSearchComponent,m=e.chapterSearchComponent,b=e.onCreateClick,y=e.onToggle,A=e.onArrangeClick,_=e.onStoreSettingsClick,w=e.onToggleStoreConnectedFlag,E=(x.c.getCurrentVideoCategory(),Hae.COMPOSING,"".concat(a?"".concat(a," - "):"","\n  ").concat(i?"".concat(i," - "):"","\n  Videos/Slides, PDFs, PPTs, Classes, & Community"),!!o),S=E&&o.videos.includes(t),C=n?p:f,T=Object(g.useCallback)((function(){var e=document.getElementById(zae);e&&e.click()}),[]);Object(g.useCallback)((function(){var e=document.getElementById(x.g.ID_CHAPTER_CI_WRAPPER);e&&e.click()}),[]);return v.a.createElement("div",{className:P()(Nee.a.header,"u-shadow")},v.a.createElement("div",{className:"w-100 h-100 u-flex-center u-font-din-condensed"},h&&v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"u-w-10 ml-3"},v.a.createElement($E,null))),v.a.createElement("div",{className:"u-w-17 pl-2 u-pr-4"},v.a.createElement(yse,null)),v.a.createElement("div",{className:P()(Nee.a.border,"u-w-17 flex-shrink-0",h&&"ml-3")},C),!n&&u&&v.a.createElement("div",{className:P()(Nee.a.border,"u-w-17 flex-shrink-0 ml-3 mr-2")},m),v.a.createElement("div",{className:"flex-grow-1"}),v.a.createElement("div",{id:"id-upload-resource",className:"invisible position-absolute",onClick:b}),!r&&v.a.createElement("div",{className:"u-w-17 border-left"}),r&&v.a.createElement("div",{className:P()("h-100 u-flex-center u-font-din-condensed px-3")},v.a.createElement("div",{className:P()(Nee.a.border,"mx-2 u-flex-center",n||!n&&u?"u-cursor-pointer":"u-cursor-default",!n&&!u&&"u-bg-red"),onClick:n?function(){return y("")}:u?T:null},v.a.createElement("div",{className:"flex-grow-1 text-center"},"Courses"),v.a.createElement("i",{className:"fv u-fs-15o16 fuvi-checked-mark-single text-white"})),v.a.createElement("div",{className:P()(Nee.a.border,"mx-2 u-flex-center u-cursor-pointer",n&&l===Uae.TEXTBOOK&&"u-bg-red"),onClick:function(){y(Uae.TEXTBOOK)}},v.a.createElement("div",{className:"flex-grow-1 text-center"},"Textbooks"),v.a.createElement("img",{height:22,src:I.a.store,alt:"store icon"})),v.a.createElement("div",{className:P()(Nee.a.border,"mx-2 u-flex-center u-cursor-pointer",n&&l===Uae.SLIDE&&"u-bg-red"),onClick:function(){y(Uae.SLIDE)}},v.a.createElement("div",{className:"flex-grow-1 text-center"},"Slides"),v.a.createElement("img",{height:22,src:I.a.store,alt:"store icon"})),v.a.createElement("div",{className:P()(Nee.a.border,"mx-2 u-flex-center u-cursor-pointer",n&&l===Uae.EXERCISE&&"u-bg-red"),onClick:function(){y(Uae.EXERCISE)}},v.a.createElement("div",{className:"flex-grow-1 text-center"},"Exercises"),v.a.createElement("img",{height:22,src:I.a.store,alt:"store icon"})))),n&&d&&r&&v.a.createElement("div",{className:P()(Nee.a.actions,"u-font-din-condensed border-left")},n&&c&&v.a.createElement(v.a.Fragment,null,v.a.createElement(Qt,{className:P()(Nee.a.iconButton),tooltipText:Object(_t.t)("tooltip.storeSetting"),onClick:_,disabled:!n},v.a.createElement("img",{width:22,height:22,src:I.a.storeSettingWhiteIcon,alt:"Store setting icon"})),v.a.createElement(Qt,{className:P()(Nee.a.iconButton),tooltipText:Object(_t.t)("tooltip.arrangeResources"),onClick:A,disabled:!n||!E},v.a.createElement("img",{width:22,height:22,src:I.a.sortingWhiteIcon,alt:"sorting icon"}))),v.a.createElement("div",null),v.a.createElement(Qt,{className:P()(Nee.a.iconButton),tooltipText:s?Object(_t.t)("tooltip.uploadResource"):Object(_t.t)("tooltip.subscriptionRequired"),onClick:s&&n?b:void 0,disabled:!s||!n||!E},v.a.createElement("img",{height:24,src:I.a.uploadWhiteIcon,alt:"upload icon"})),c&&v.a.createElement(_u,{id:"storeConnected",labelName:"Store connected",classNameInput:"u-pl-2 u-fs-7o8",checked:S,onChange:function(){return w()}})))},Wae=function(e){var n=e.show,r=e.title,i=e.author,a=void 0===i?"":i,o=e.subject,s=e.topic,l=e.editable,c=e.isLoading,u=e.resourceStore,d=e.items,h=void 0===d?[]:d,f=e.userId,p=(e.userAvatar,e.isStoreOwner),m=e.className,g=e.canOpenStore,b=e.onCreateClick,y=e.onLinkClick,A=e.onToggle,_=e.onClose,w=e.onKeywordsChange,E=e.onKeydown,S=e.onKeywordsCleared,C=e.keywords,T=e.videoId,k=e.videoOwnerId,O=e.selectedId,I=e.isSearching,M=e.isVideoActive,D=e.isFullscreenMode,N=e.filter,L=e.videoSearchComponent,R=e.chapterSearchComponent,B=e.onRenderItemUpdate,j=e.onItemsRefresh,F=e.onArrangeClick,U=e.onStoreSettingsClick,H=(e.onDeleteStoreHeading,e.onStoreHeadingExpanded,e.onCallActionClick,e.onToggleStoreConnectedFlag);e.onStoreRefresh,e.onStoreMemberApplicationRemove,e.onFilterChange;return v.a.createElement("div",{className:P()(m,Nee.a.productsLayer,n&&Nee.a.show)},v.a.createElement("div",{className:Nee.a.productsWrapper},c&&v.a.createElement(Nn,{className:Nee.a.loadingWrapper}),v.a.createElement(Vae,{videoId:T,show:n,canOpenStore:g,author:a,title:r,subject:o,topic:s,resourceStore:u,editable:l,filter:N,isAuthenticated:!!f,isVideoActive:M,isStoreOwner:p,isFullscreenMode:D,videoSearchComponent:L,chapterSearchComponent:R,productSearchComponent:v.a.createElement(mE,{searchTerm:C,placeholder:t("message.searchResources"),className:P()(Nee.a.searchBox,I&&Nee.a.isSearching),onChange:w,onClear:S,onKeyDown:E}),onCreateClick:b,onLinkClick:y,onToggle:A,onClose:_,onArrangeClick:F,onStoreSettingsClick:U,onToggleStoreConnectedFlag:H}),v.a.createElement("div",{id:x.g.ID_PRODUCTS_LAYER,className:P()(Nee.a.content,"fv-custom-scroll")},v.a.createElement(_ae,{items:h,isLoading:c,isStoreOwner:p,videoId:T,videoTitle:r,videoOwnerId:k,selectedId:O,onItemsRefresh:j,onRenderItemUpdate:B}))))};tw()(x.g);var Gae=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{items:[],selectedItem:null,isLoading:!1,isSubmitting:!1,showCloseConfirmation:!1}),G()(V()(e),"isDirty",!1),G()(V()(e),"componentDidMount",(function(){e.fetchItems()})),G()(V()(e),"fetchItems",(function(){var t=e.props,n=t.videoId,r=t.getMyProducts;e.setState({isLoading:!0}),r({videoId:n},(function(t){e.setState({items:t,isLoading:!1})}),(function(t){e.setState({isLoading:!1})}))})),G()(V()(e),"checkCanSubmitForm",(function(){return!!e.state.selectedItem})),G()(V()(e),"handleSubmit",(function(t){var n=e.props,r=n.videoId,i=n.isStoreOwner,a=n.onClose,o=n.linkProduct,s=e.state.selectedItem;s&&(e.setState({isSubmitting:!0}),o({videoId:r,isStoreOwner:i,productId:s.id},(function(){e.setState({isSubmitting:!1}),a(!0,s.id)}),(function(t){e.setState({isSubmitting:!1})})))})),G()(V()(e),"handleClose",(function(t){t.stopPropagation(),e.isDirty?e.setState({showCloseConfirmation:!0}):e.props.onClose()})),G()(V()(e),"handleCloseConfirm",(function(t){t.stopPropagation(),(0,e.props.onClose)()})),G()(V()(e),"handleItemSelect",(function(t){e.isDirty=!0,e.setState({selectedItem:t})})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.items,i=n.selectedItem,a=n.isLoading,o=n.showCloseConfirmation,s=n.isSubmitting,l=this.checkCanSubmitForm();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.linkModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"pl-4"},v.a.createElement("div",{className:"modal-title h4"},t("modal.linkProductTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},a&&v.a.createElement(Nn,{className:"text-primary bg-white"}),!a&&0===r.length&&v.a.createElement("div",{className:"w-100 h-100 my-5 flex-column u-flex-center"},v.a.createElement("img",{width:"180",height:"180",className:"u-opacity-40",src:I.a.resourceIcon})),v.a.createElement("div",{className:P()(Nee.a.productList)},r.map((function(t,n){return v.a.createElement(Ree,Gt()({readonly:!0,selectable:!0,key:t.id},t,{selected:(null==i?void 0:i.id)===t.id,onClick:function(){e.handleItemSelect(t)},onSelect:function(){e.handleItemSelect(t)}}))})))),v.a.createElement(Fl.a.Footer,{className:Nee.a.footer},v.a.createElement("div",{className:"w-100 d-flex align-items-center"},v.a.createElement("div",{className:"flex-grow-1 text-truncate u-fs-15o16 u-opacity-80"},t("resourceCount",{count:r.length})),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},t("btn.cancel")),v.a.createElement(et.a,{disabled:!l||s,variant:"primary",className:"u-flex-center text-white modal-button ml-4",onClick:this.handleSubmit},s?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):t("btn.save"))))),v.a.createElement(IC,{show:!!o,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:this.handleCloseConfirm,onClose:function(){return e.setState({showCloseConfirmation:!1})}}))}}]),r}(g.PureComponent),qae=Object(q.b)(null,(function(e){return{getMyProducts:function(t,n,r){return e(Q.e.getMyProducts(t,n,r))},linkProduct:function(t,n,r){return e(Q.e.linkProduct(t,n,r))}}}))(Gae);function Yae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yae(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xae=x.g.RESOURCE.APPROVED_STATUS,Qae=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{isLoading:!1,items:[],showCreateModal:!1}),G()(V()(e),"prefixId","my-product"),G()(V()(e),"componentDidMount",(function(){e.props.getMySubsOptions(),e.fetchItems()})),G()(V()(e),"fetchItems",(function(t){var n=e.props.getMyProducts;e.setState({isLoading:!0}),n({},(function(n){var r=n.map((function(e){var t;return Kae(Kae({},e),{},{approvalStatus:Xae.APPROVED,filenames:e.filenames||[],previews:e.previews||[],previewUrls:e.previewUrls||[],fileLinks:e.fileLinks||[],contentTypeLink:(null===(t=e.fileLinks)||void 0===t?void 0:t.length)>0})}));e.setState({items:r},(function(){t&&x.c.scrollToElementById("".concat(e.prefixId,"-").concat(t))})),setTimeout((function(){e.setState({isLoading:!1})}),500)}),(function(t){setTimeout((function(){e.setState({isLoading:!1})}),500)}))})),G()(V()(e),"handleRenderItemUpdate",(function(t,n){var r=e.state.items,i=Object(Y.cloneDeep)(r),a=Object(Y.find)(i,{id:t});a&&(Object.assign(a,n),e.setState({items:i}))})),G()(V()(e),"handleClose",(function(){e.props.displayMyResourcesModal(!1)})),G()(V()(e),"handleCreateModalOpen",(function(){e.setState({showCreateModal:!0})})),G()(V()(e),"handleCreateModalClose",(function(t,n){e.setState({showCreateModal:!1}),t&&e.fetchItems(n)})),e}return c()(r,[{key:"render",value:function(){var e=this.props.subscriptionOptions,n=this.state,r=n.isLoading,i=n.items,a=n.showCreateModal,o=null==e?void 0:e.resourceManipulationPermission;return v.a.createElement(v.a.Fragment,null,a&&v.a.createElement(sae,{onClose:this.handleCreateModalClose}),v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.myProductsModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"align-items-center pl-4"},v.a.createElement("div",{className:"modal-title h4 flex-grow-1"},t("modal.myProductsTitle")),v.a.createElement(Qt,{className:"mr-4",tooltipText:t("tooltip.uploadResource"),onClick:o?this.handleCreateModalOpen:null,disabled:!o},v.a.createElement("img",{width:28,height:28,src:I.a.uploadIcon,alt:"upload icon"})),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},v.a.createElement(_ae,{withLinks:!0,prefixId:this.prefixId,items:i,isLoading:r,onItemsRefresh:this.fetchItems,onRenderItemUpdate:this.handleRenderItemUpdate})),v.a.createElement(Fl.a.Footer,{className:Nee.a.footer},v.a.createElement("div",{className:"w-100 d-flex align-items-center"},v.a.createElement("div",{className:"flex-grow-1 text-truncate u-fs-15o16 u-opacity-80"},t("resourceCount",{count:i.length})),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},t("btn.close"))))))}}]),r}(g.PureComponent),$ae=Object(q.b)((function(e){return{subscriptionOptions:e.auth.userInfo.subscriptionOptions}}),(function(e){return{getMyProducts:function(t,n,r){return e(Q.e.getMyProducts(t,n,r))},displayMyResourcesModal:function(t){return e(Q.e.displayMyResourcesModal(t))},getMySubsOptions:function(t,n){return e(Q.l.getMySubsOptions(t,n))}}}))(Qae);var Jae=x.g.DND_TYPE,Zae=function(e){var n=e.index,r=e.title,i=e.price,a=e.free,o=e.thumbnailUrl,s=e.ownerDetail,l=(s=void 0===s?{}:s).avatar,c=s.fullName,u=e.onTopClick,d=Object(g.useState)(!1),h=pi()(d,2),f=h[0],p=h[1],m=i||{},b=m.amount,y=m.currency,A=a?t("freePriceLabel"):x.c.formatMoney(b,null==y?void 0:y.code);return v.a.createElement("div",{onMouseEnter:function(){p(!0)},onMouseLeave:function(){p(!1)},className:P()(Nee.a.productItem,Nee.a.arrangeProductItem)},v.a.createElement("div",{className:P()(Nee.a.thumbnail),style:{backgroundImage:o?'url("'.concat(o,'")'):void 0}}),v.a.createElement("div",{className:"flex-grow-1 ml-3"},v.a.createElement("div",{className:P()("u-truncate-2 u-fw-500 u-fs-1x1o8 u-line-height-1d1",Nee.a.title)},r),v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement("div",{className:P()(Nee.a.avatar),style:{backgroundImage:l?"url(".concat(l,")"):void 0}}),v.a.createElement("div",{className:"w-100 ml-2 u-truncate-2 u-fs-7o8 u-fw-500"},c))),v.a.createElement("div",{className:"u-w-6 ml-3 flex-shrink-0"},v.a.createElement("div",{className:P()("u-fs-1x1o6 u-line-height-1 u-fw-600",a&&"u-text-cyan")},A),f&&n>0&&v.a.createElement("div",{className:"d-flex"},v.a.createElement(Qt,{className:"mt-1",title:t("tooltip.toTop"),onClick:u},v.a.createElement("img",{width:18,height:18,src:I.a.toTopIcon,alt:"to top icon"})))))},eoe=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{items:[],isLoading:!1,isSubmitting:!1,showCloseConfirmation:!1}),G()(V()(e),"isDirty",!1),G()(V()(e),"componentDidMount",(function(){e.fetchItems()})),G()(V()(e),"fetchItems",(function(){var t=e.props,n=t.videoId,r=t.getVideoProducts;e.setState({isLoading:!0}),r({videoId:n,approvalStatuses:[]},(function(t){e.setState({items:t,isLoading:!1})}),(function(t){e.setState({isLoading:!1})}))})),G()(V()(e),"checkCanSubmitForm",(function(){return e.isDirty})),G()(V()(e),"handleSubmit",(function(t){var n=e.props,r=n.videoId,i=n.onClose,a=n.arrangeProducts,o=e.state.items;if(o){var s=o.map((function(e){return e.id}));e.setState({isSubmitting:!0}),a({videoId:r,productIds:s},(function(){e.setState({isSubmitting:!1}),i(!0)}),(function(t){e.setState({isSubmitting:!1})}))}})),G()(V()(e),"handleClose",(function(t){t.stopPropagation(),e.isDirty?e.setState({showCloseConfirmation:!0}):e.props.onClose()})),G()(V()(e),"handleCloseConfirm",(function(t){t.stopPropagation(),(0,e.props.onClose)()})),G()(V()(e),"handleItemSwapping",(function(t,n){var r=e.state.items,i=r[t],a=Kl()(r,{$splice:[[t,1],[n,0,i]]});e.isDirty=!0,e.setState({items:a})})),G()(V()(e),"handleItemToTop",(function(t){var n=Object(Y.findIndex)(e.state.items,{id:t});-1!==n&&e.handleItemSwapping(n,0)})),e}return c()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.items,i=n.isLoading,a=n.showCloseConfirmation,o=n.isSubmitting,s=this.checkCanSubmitForm();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.arrangeModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"pl-4"},v.a.createElement("div",{className:"modal-title h4"},t("modal.arrangeProductsTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},i&&v.a.createElement(Nn,{className:"text-primary bg-white"}),!i&&0===r.length&&v.a.createElement("div",{className:"w-100 h-100 my-5 flex-column u-flex-center"},v.a.createElement("img",{width:"180",height:"180",className:"u-opacity-40",src:I.a.resourceIcon})),v.a.createElement("div",{className:P()(Nee.a.productList)},v.a.createElement(fx,null,r.map((function(t,n){return v.a.createElement(Bk,{key:t.id,id:t.id,index:n,originalIndex:n,dndType:Jae.PRODUCT_ITEM,moveCard:e.handleItemSwapping},v.a.createElement(Zae,Gt()({},t,{index:n,onTopClick:function(n){n.target.blur(),e.handleItemToTop(t.id)}})))}))))),v.a.createElement(Fl.a.Footer,{className:Nee.a.footer},v.a.createElement("div",{className:"w-100 d-flex align-items-center"},v.a.createElement("div",{className:"flex-grow-1 text-truncate u-fs-15o16 u-opacity-80"},t("resourceCount",{count:r.length})),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},t("btn.cancel")),v.a.createElement(et.a,{disabled:!s||o,variant:"primary",className:"u-flex-center text-white modal-button ml-4",onClick:this.handleSubmit},o?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):t("btn.save"))))),v.a.createElement(IC,{show:!!a,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:this.handleCloseConfirm,onClose:function(){return e.setState({showCloseConfirmation:!1})}}))}}]),r}(g.PureComponent),toe=Object(q.b)(null,(function(e){return{getVideoProducts:function(t,n,r){return e(Q.e.getVideoProducts(t,n,r))},arrangeProducts:function(t,n,r){return e(Q.e.arrangeProducts(t,n,r))}}}))(eoe),noe=["bsPrefix","fluid","as","className"],roe=v.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.fluid,i=e.as,a=void 0===i?"div":i,o=e.className,s=Object(y.a)(e,noe),l=Object(w.a)(n,"container"),c="string"==typeof r?"-"+r:"-fluid";return v.a.createElement(a,Object(b.a)({ref:t},s,{className:_()(o,r?""+l+c:l)}))}));roe.displayName="Container",roe.defaultProps={fluid:!1};var ioe=roe;function aoe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ooe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aoe(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aoe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var soe=x.g.TEXT_INPUT_MAX_LENGTH,loe=x.g.DESCRIPTION_INPUT_MAX_LENGTH,coe="basic",uoe="textbook",doe="AUTHOR",hoe="PUBLISHER";function foe(e){var t=e.item,n=t.avatar;return v.a.createElement("span",{id:t.uid,className:Nee.a.suggestionItem},v.a.createElement("img",{src:n,className:Nee.a.suggestionAvatar}),v.a.createElement("span",null,t.fullName))}function poe(e){var t=e.tag,n=(e.removeButtonText,e.onDelete),r=t.fullName,i=t.avatar;return v.a.createElement("div",{className:Nee.a.tagItem,onClick:n},v.a.createElement("img",{src:i,className:Nee.a.tagAvatar}),v.a.createElement("span",{className:P()(Nee.a.tagLabel,"text-truncate")},r),v.a.createElement("i",{className:"fv fuvi-delete text-danger ml-2"}))}var moe=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{title:"",undermaintenance:!1,description:"",thumbnail:"",intro:"",havingtextbook:!1,textbookTitle:"",textbookDescription:"",tbAuthorId:"",tbPublisherId:"",isCreating:!0,isLoading:!1,isSubmitting:!1,showCloseConfirmation:!1,showDeleteConfirmation:!1,suggestedAuthors:[],suggestedPublishers:[],selectedAuthor:[],selectedPublisher:[]}),G()(V()(e),"isDirty",!1),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"componentDidMount",(function(){e.loadResourceStore()})),G()(V()(e),"loadResourceStore",(function(){var t=e.props,n=t.videoId,r=t.getResourceStore;e.setState({isLoading:!0}),r({videoId:n},(function(t){e.resourceStore=t;var n=t.textbook,r=!!n,i=r?[n.author]:[],a=r?[n.publisher]:[];e.setState(ooe(ooe({},t),{},{havingtextbook:r,textbookTitle:null==n?void 0:n.title,textbookDescription:null==n?void 0:n.description,selectedAuthor:i,selectedPublisher:a,isLoading:!1,isCreating:!t}))}),(function(t){e.setState({isLoading:!1})}))})),G()(V()(e),"handlePeopleSearch",Object(Y.debounce)((function(t,n){(0,e.props.searchPeople)({pageNumber:0,pageSize:10,searchTerm:n,excludeMyself:!1},(function(n){var r=n.items,i=[];r.map((function(e){var t,n="".concat(e.firstName," ").concat(e.lastName);i.push({avatar:(null===(t=e.avatar)||void 0===t?void 0:t.image)||I.a.noAvatar,fullName:n,name:n,userId:e.userId,label:n})})),t===doe?e.setState({suggestedAuthors:i}):e.setState({suggestedPublishers:i})}),(function(e){return console.log("Error search people")}))}))),G()(V()(e),"handleFormFieldValidate",(function(t){e.validator.showMessageFor(t),e.forceUpdate()})),G()(V()(e),"handleTextbookFlagChange",(function(t){e.setState({havingtextbook:t}),e.isDirty=!0})),G()(V()(e),"handleMaintainingFlagToggle",(function(){var t=e.state.undermaintenance;e.setState({undermaintenance:!t}),e.isDirty=!0})),G()(V()(e),"checkCanSubmitForm",(function(){var t=e.state,n=t.selectedAuthor,r=t.selectedPublisher,i=t.havingtextbook,a=t.thumbnail,o=!0;e.validator.fieldValid("title")||(o=!1),e.validator.fieldValid("description")||(o=!1),a||(o=!1);var s=!0;return i&&(e.validator.fieldValid("textbookTitle")||(s=!1),e.validator.fieldValid("textbookDescription")||(s=!1),n&&0!=n.length||(s=!1),r&&0!=r.length||(s=!1)),o&&s})),G()(V()(e),"handleSubmit",(function(t){var n,r;e.setState({isSubmitting:!0});var i=e.props,a=i.videoId,o=i.onClose,s=i.createResourceStore,l=i.updateResourceStore,c=i.onStoreUpdate,u=e.state,d=u.isCreating,h=u.title,f=u.undermaintenance,p=u.description,m=u.havingtextbook,g=u.textbookTitle,v=u.textbookDescription,b=u.selectedAuthor,y=u.selectedPublisher,A={title:h,undermaintenance:f,description:p,havingtextbook:m,tbTitle:g,tbDescription:v,tbAuthorId:null===(n=b[0])||void 0===n?void 0:n.userId,tbPublisherId:null===(r=y[0])||void 0===r?void 0:r.userId},_=JSON.stringify(A),w=new FormData;w.append("stringifiedStoreInfo",_),w.append("storeThumbnail",e.thumbnailFile),w.append("storeIntro",e.introFile),d?s({videoId:a,formData:w},(function(t){e.setState({isSubmitting:!1}),c(t),o(!0)}),(function(t){e.setState({isSubmitting:!1})})):l({videoId:a,formData:w},(function(t){e.setState({isSubmitting:!1}),c(t),o(!0)}),(function(t){e.setState({isSubmitting:!1})}))})),G()(V()(e),"handleClose",(function(t){t.stopPropagation(),e.isDirty?e.setState({showCloseConfirmation:!0}):e.props.onClose()})),G()(V()(e),"handleInputChange",(function(t){var n=t.target,r=n.name,i=n.value;e.isDirty=!0,e.setState(G()({},r,i),(function(){e.handleFormFieldValidate(r)}))})),G()(V()(e),"handleInputBlur",(function(t){var n=t.target.name;e.handleFormFieldValidate(n)})),G()(V()(e),"handleImageSelect",(function(t){var n,r=Object(Y.sortBy)(t,(function(e){return e.path})),i=[];if(r.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),i.push(e)})),i.length<1)x.e.warn(Object(_t.t)("message.imageSupportedFiles"));else{if(0===i.length)return x.e.error(Object(_t.t)("message.imageRequired")),!1;if(i[0].size>524288e3)return x.e.error(Object(_t.t)("message.maxFileSize",{size:"500 MB"})),!1;e.isDirty=!0,e.isDirtyThumbnail=!0,e.thumbnailFile=i[0],e.setState({thumbnail:null===(n=i[0])||void 0===n?void 0:n.name},e.forceUpdate)}})),G()(V()(e),"handleThumbnailRefresh",(function(t){t.stopPropagation(),e.props.isEdit&&(e.isDirtyThumbnail=!1,e.thumbnailFile=null,e.setState({thumbnail:e.resourceStore.thumbnail},e.forceUpdate))})),G()(V()(e),"handleIntroSelect",(function(t){var n,r=Object(Y.sortBy)(t,(function(e){return e.path})),i=[];if(r.forEach((function(e,t){var n=Ql.a.dirname(e.path);"/"===n.charAt(0)&&(n=n.substring(1)),e.uid="".concat(Date.now(),"i=").concat(t),i.push(e)})),i.length<1)x.e.warn(Object(_t.t)("message.imageSupportedFiles"));else{if(0===i.length)return x.e.error(Object(_t.t)("message.imageRequired")),!1;if(i[0].size>524288e3)return x.e.error(Object(_t.t)("message.maxFileSize",{size:"500 MB"})),!1;e.isDirty=!0,e.isDirtyIntro=!0,e.introFile=i[0],e.setState({intro:null===(n=i[0])||void 0===n?void 0:n.name},e.forceUpdate)}})),G()(V()(e),"handleIntroRefresh",(function(t){t.stopPropagation(),e.props.isEdit&&(e.isDirtyIntro=!1,e.introFile=null,e.setState({intro:e.resourceStore.intro},e.forceUpdate))})),G()(V()(e),"handleDeleteConfirmationCancel",(function(){e.setState({showDeleteConfirmation:!1})})),G()(V()(e),"handleDeleteStoreHeading",(function(){e.setState({showDeleteConfirmation:!0})})),G()(V()(e),"handleDeleteStoreHeadingProceed",(function(){e.setState({showDeleteConfirmation:!1});var t=e.props.onDeleteStoreHeading;t&&t()})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.isEdit,r=t.onClose,i=this.state,a=i.title,o=i.undermaintenance,s=i.description,l=i.thumbnail,c=i.thumbnailURL,u=i.intro,d=i.introURL,h=i.havingtextbook,f=i.textbookTitle,p=i.textbookDescription,m=i.isLoading,g=i.showCloseConfirmation,b=i.showDeleteConfirmation,y=i.isSubmitting,A=i.suggestedAuthors,_=i.suggestedPublishers,w=i.selectedAuthor,E=i.selectedPublisher,S=this.checkCanSubmitForm();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:P()("createDocumentModal",Nee.a.storeModal),centered:!0,enforceFocus:!1,backdrop:"static",scrollable:!1,onEscapeKeyDown:this.handleClose},v.a.createElement(Fl.a.Header,{className:"pl-4"},v.a.createElement("div",{className:"modal-title h4"},Object(_t.t)("modal.resourceStoreFormTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:P()(Nee.a.modalBody)},m&&v.a.createElement(Nn,{className:"text-primary bg-white"}),!m&&v.a.createElement($l.a,{className:"h-100",noValidate:!0,onSubmit:this.handleSubmit},v.a.createElement(Sl,{className:"fv-tabs"},v.a.createElement(kl,{className:"h-100 py-2",eventKey:coe,title:Object(_t.t)("storeInformation")},v.a.createElement(ioe,{fluid:!0},v.a.createElement(T,null,v.a.createElement(k.a,{xs:7},v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement(mu,{required:!0,disabled:y,labelName:Object(_t.t)("label.headline"),name:"title",value:a,placeholder:Object(_t.t)("placeholder.addResourceTitle"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("title",a,"resourceStoreTitleRequired|max:".concat(soe)),className:P()(Nee.a.storeTitle,"h-auto"),classNameInput:P()("fv-custom-scroll")}))),v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement(mu,{name:"description",value:s,disabled:y,labelName:Object(_t.t)("description"),placeholder:Object(_t.t)("placeholder.addResourceDescription"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,validatorElement:this.validator.message("description",s,"max:".concat(loe)),className:P()(Nee.a.storeDescription,"h-auto"),classNameInput:P()("fv-custom-scroll"),as:"textarea",rows:12}))),v.a.createElement(_u,{id:"undermaintenance",name:"undermaintenance",labelName:"Under maintenance",classNameInput:"u-pl-2 mb-2",checked:o,onChange:this.handleMaintainingFlagToggle})),v.a.createElement(k.a,{xs:5},v.a.createElement("div",{className:"w-100 h-50 d-flex flex-column flex-shrink-0"},v.a.createElement($l.a.Group,null,v.a.createElement($l.a.Label,{className:["mt-2"]},Object(_t.t)("label.thumbnail")," *"),v.a.createElement(QT,{isDisabled:y,multiple:!1,acceptedFiles:".png,.jpg,.jpeg",receiveAcceptedFiles:this.handleImageSelect,wrapperClassName:"",innerWrapperClassName:P()(Nee.a.uploadBtn,"fv-input form-control d-flex align-items-center"),validatorElement:this.validator.message("thumbnail",l,"resourceStoreThumbnailRequired|max:".concat(soe))},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o2"}),v.a.createElement("div",{className:P()("text-truncate flex-grow-1",!l&&"u-opacity-80 u-fs-15o16 font-italic",this.isDirtyThumbnail&&"text-primary")},l||Object(_t.t)("placeholder.addThumbnail")),n&&this.thumbnailFile&&v.a.createElement(Qt,{className:"mr-n2",disabled:y,onClick:this.handleThumbnailRefresh},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-1"})))),v.a.createElement("div",{className:P()(Nee.a.storeThumbnailPreview,"u-h-8 u-flex-center overflow-hidden")},(this.thumbnailFile||c)&&v.a.createElement("div",{className:Nee.a.previewThumbnail,style:{backgroundImage:"url(".concat(this.thumbnailFile?URL.createObjectURL(this.thumbnailFile):c,")")},alt:"preview thumbnail"}))),v.a.createElement("div",{className:"w-100 h-50 d-flex flex-column flex-shrink-0"},v.a.createElement($l.a.Group,null,v.a.createElement($l.a.Label,{className:["mt-2"]},"Intro"),v.a.createElement(QT,{isDisabled:y,multiple:!1,acceptedFiles:".png,.jpg,.jpeg",receiveAcceptedFiles:this.handleIntroSelect,wrapperClassName:"",innerWrapperClassName:P()(Nee.a.uploadBtn,"fv-input form-control d-flex align-items-center")},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o2"}),v.a.createElement("div",{className:P()("text-truncate flex-grow-1",!u&&"u-opacity-80 u-fs-15o16 font-italic",this.isDirtyIntro&&"text-primary")},u||Object(_t.t)("placeholder.addIntro")),n&&this.introFile&&v.a.createElement(Qt,{className:"mr-n2",disabled:y,onClick:this.handleIntroRefresh},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-1"})))),v.a.createElement("div",{className:P()(Nee.a.storeThumbnailPreview,"u-h-8 u-flex-center overflow-hidden")},(this.introFile||d)&&v.a.createElement("div",{className:Nee.a.previewThumbnail,style:{backgroundImage:"url(".concat(this.introFile?URL.createObjectURL(this.introFile):d,")")},alt:"preview intro"}))))))),v.a.createElement(kl,{className:"h-100 py-2",eventKey:uoe,title:Object(_t.t)("textbookInfo")},v.a.createElement(ioe,{fluid:!0},v.a.createElement(T,{className:"py-2"},v.a.createElement(k.a,{xs:"auto"},v.a.createElement("div",{className:"u-fs-15o16 u-fw-500"},Object(_t.t)("modal.withTextbook"))),v.a.createElement(k.a,{xs:"auto"},v.a.createElement(_u,{id:"withTextbook",labelName:Object(_t.t)("btn.yes"),type:"radio",className:"u-fs-15o16",checked:h,onChange:function(){return e.handleTextbookFlagChange(!0)},disabled:y})),v.a.createElement(k.a,{xs:"auto"},v.a.createElement(_u,{id:"withNoTextbook",labelName:Object(_t.t)("btn.no"),type:"radio",className:"u-fs-15o16",checked:!h,onChange:function(){return e.handleTextbookFlagChange(!1)},disabled:y}))),v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement(mu,{required:!0,disabled:y||!h,labelName:Object(_t.t)("label.title"),name:"textbookTitle",value:f,placeholder:Object(_t.t)("placeholder.addResourceTitle"),onChange:this.handleInputChange,onBlur:this.handleInputBlur,classNameInput:"cogvid-input-height",validatorElement:h?this.validator.message("textbookTitle",f,"textbookTitleRequired|max:".concat(soe)):void 0}))),v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement("div",null,v.a.createElement(sd,{labelName:"Author",required:!0,placeholderText:w?"":"Select author",suggestions:A,tags:w,searchDisabled:y||!h,onInput:function(t){e.handlePeopleSearch(doe,t)},onFocus:function(t){e.handlePeopleSearch(doe,t)},onAddition:function(t){e.setState({selectedAuthor:[t]}),e.isDirty=!0},onDelete:function(){!y&&h&&(e.setState({selectedAuthor:[]}),e.validator.showMessageFor("selectedAuthor"))},onBlur:function(){var t=e.state.selectedAuthor;t&&0!=t.length?e.validator.hideMessageFor("selectedAuthor"):e.validator.showMessageFor("selectedAuthor")},suggestionComponent:foe,tagComponent:poe,searchInputClassName:!!w.length&&"d-none",validatorElement:h?this.validator.message("selectedAuthor",w,"textbookAuthorRequired"):void 0}))),v.a.createElement(k.a,null,v.a.createElement("div",{disabled:y||!h},v.a.createElement(sd,{labelName:"Publisher",name:"selectedPublisher",required:!0,placeholderText:E?"":"Select publisher",suggestions:_,tags:E,searchDisabled:y||!h,onInput:function(t){e.handlePeopleSearch(hoe,t)},onFocus:function(t){e.handlePeopleSearch(hoe,t)},onAddition:function(t){e.setState({selectedPublisher:[t]}),e.isDirty=!0},onDelete:function(){!y&&h&&(e.setState({selectedPublisher:[]}),e.validator.showMessageFor("selectedPublisher"))},onBlur:function(){var t=e.state.selectedPublisher;t&&0!=t.length?e.validator.hideMessageFor("selectedPublisher"):e.validator.showMessageFor("selectedPublisher")},suggestionComponent:foe,tagComponent:poe,searchInputClassName:!!E.length&&"d-none",validatorElement:h?this.validator.message("selectedPublisher",E,"textbookPublisherRequired"):void 0})))),v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement(mu,{name:"textbookDescription",value:p,disabled:y||!h,labelName:Object(_t.t)("description"),placeholder:Object(_t.t)("placeholder.addResourceDescription"),onChange:this.handleInputChange,validatorElement:this.validator.message("textbookDescription",p,"max:".concat(loe)),className:P()(Nee.a.storeDescription,"h-auto"),classNameInput:P()("fv-custom-scroll"),as:"textarea",rows:2})))))))),v.a.createElement(Fl.a.Footer,{className:Nee.a.footer},v.a.createElement("div",{className:"w-100 d-flex align-items-center"},n&&v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button ml-4",onClick:this.handleDeleteStoreHeading,disabled:!n},Object(_t.t)("btn.delete")),v.a.createElement("div",{className:"flex-grow-1"}),v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:this.handleClose},Object(_t.t)("btn.cancel")),v.a.createElement(et.a,{disabled:!S||y,variant:"primary",className:"u-flex-center text-white modal-button ml-4",onClick:this.handleSubmit},y?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):Object(_t.t)("btn.save"))))),v.a.createElement(IC,{show:!!g,title:Object(_t.t)("modal.confirmCancelModalTitle"),message:Object(_t.t)("modal.confirmCancelModalMessage"),onConfirm:r,onClose:function(){return e.setState({showCloseConfirmation:!1})}}),v.a.createElement(IC,{show:!!b,title:Object(_t.t)("modal.confirmDeleteStoreTitle"),onConfirm:this.handleDeleteStoreHeadingProceed,onClose:this.handleDeleteConfirmationCancel}))}}]),n}(g.PureComponent),goe=Object(q.b)(null,(function(e){return{getResourceStore:function(t,n,r){return e(Q.e.getResourceStore(t,n,r))},createResourceStore:function(t,n,r){return e(Q.e.createResourceStore(t,n,r))},updateResourceStore:function(t,n,r){return e(Q.e.updateResourceStore(t,n,r))},deleteResourceStore:function(t,n,r){return e(Q.e.deleteResourceStore(t,n,r))},searchPeople:function(t,n,r){return e(Q.i.searchPeople(t,n,r))}}}))(moe);function voe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function boe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?voe(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):voe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yoe=x.g.VIDEO_CATEGORY,Aoe=x.g.SEARCH_PARAM,_oe=Aoe.KEY,woe=Aoe.VALUE,Eoe=x.g.RESOURCE_TYPE,Soe=x.g.RESOURCE_SUBTYPE,Coe=(x.g.RESOURCE.APPROVED_STATUS,function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{items:[],isLoading:!1,showCreateModal:!1,showLinkModal:!1,keywords:"",selectedId:"",canOpenStore:!1,filter:Soe.TEXTBOOK}),G()(V()(e),"componentDidMount",(function(){})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.show,r=t.showSubtype,i=t.videoId,a=t.userId,o=e.props,s=o.show,l=o.videoId,c=o.showVideoId,u=o.userId,d=o.showSubtype;if(i===l&&a===u||(e.setState({resourceStore:null,canOpenStore:!1}),l&&e.fetchResourceStoreDebounce(l)),s&&n&&r!==d&&e.setState({filter:d},e.fetchItems),n!==s){if(!s)return void e.setState({show:!1});x.b.reportResourceStoreDesktopLoaded(),e.fetchResourceStore(c,(function(){e.state.canOpenStore||e.props.displayProductsLayer(null);var t=new URLSearchParams(window.location.search).get(_oe.RESOURCE_ID);x.r.isPlayer()&&x.r.pause(),e.setState({show:s,items:[],keywords:"",selectedId:"",filter:d||Soe.TEXTBOOK},(function(){e.fetchItems(t)}))}))}})),G()(V()(e),"fetchResourceStoreDebounce",Object(Y.debounce)((function(t,n){e.fetchResourceStore(t,n)}),500)),G()(V()(e),"fetchResourceStore",(function(t,n){var r=e.props,i=r.userId,a=r.getResourceStore;r.subscriptionOptions;a({videoId:t},(function(r){var a=r||{},o=a.videos,s=void 0===o?[]:o,l=a.undermaintenance,c=r.ownerId===i,u=(x.c.isExploring()||c||s.includes(t),!l);e.setState({resourceStore:r,canOpenStore:u},(function(){n&&n()}))}))})),G()(V()(e),"fetchItems",(function(t){var n=e.props,r=n.userId,i=n.videoId,a=n.getVideoProducts,o=(n.updateCogvidListItem,n.getMySubsOptions),s=(n.getResourceStore,n.incrStoreViews),l=e.state,c=l.keywords,u=l.resourceStore,d=l.filter;i&&(r&&o(),e.setState({isLoading:!0}),u&&s({storeId:u.id},(function(e){return u.views=e})),a({videoId:i,approvalStatuses:[],keywords:c,subtypes:[d],types:[Eoe.PDF_PPT.value]},(function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=n.map((function(e){var t;return boe(boe({},e),{},{filenames:e.filenames||[],previews:e.previews||[],previewUrls:e.previewUrls||[],fileLinks:e.fileLinks||[],contentTypeLink:(null===(t=e.fileLinks)||void 0===t?void 0:t.length)>0})}));if(t){var i=r.find((function(e){return e.id===t}));i||x.c.changeURLWithoutSideEffect([[_oe.RESOURCE_ID]])}e.setState({items:r},(function(){t&&x.c.scrollElementIntoView("product-".concat(t),{block:"nearest",inline:"end",behavior:"smooth"})})),Object(Y.delay)((function(){e.setState({isLoading:!1,isSearching:!!c,selectedId:t})}),500)}),(function(){Object(Y.delay)((function(){e.setState({isLoading:!1,isSearching:!!c,selectedId:t})}),500)})))})),G()(V()(e),"handleCreateModalOpen",(function(){e.setState({showCreateModal:!0})})),G()(V()(e),"handleCreateModalClose",(function(t,n){e.setState({showCreateModal:!1}),t&&e.fetchItems(n)})),G()(V()(e),"handleLayerToggle",(function(t){var n=e.props,r=n.videoId,i=n.showSubtype,a=n.displayProductsLayer,o=e.state.show&&(!t||t===i);e.state.canOpenStore&&(o&&e.setState({show:!1}),a(o?null:{videoId:r,subtype:t}),x.c.changeURLWithoutSideEffect([[_oe.RESOURCE_ID],[_oe.VIDEO_ID,r],[_oe.ACTION,o?void 0:woe.ACTION.OPEN_RESOURCE]]))})),G()(V()(e),"handleLayerClose",(function(){e.props.displayProductsLayer(null)})),G()(V()(e),"handleLinkModalOpen",(function(t){e.setState({showLinkModal:!0})})),G()(V()(e),"handleLinkModalClose",(function(t,n){e.setState({showLinkModal:!1}),t&&e.fetchItems(n)})),G()(V()(e),"handleRenderItemUpdate",(function(t,n){var r=e.state.items,i=Object(Y.cloneDeep)(r),a=Object(Y.find)(i,{id:t});a&&(Object.assign(a,n),e.setState({items:i}))})),G()(V()(e),"handleKeywordsChanged",(function(t){var n=t.target.value;e.setState({keywords:n},(function(){""===n.trim()&&e.fetchItems()}))})),G()(V()(e),"handleKeywordsCleared",(function(){e.setState({keywords:""},e.fetchItems)})),G()(V()(e),"handleKeyDown",(function(t){if(t.nativeEvent.stopImmediatePropagation(),13===t.keyCode){var n=t.target.value?t.target.value.trim():void 0;n?e.setState({keywords:n},e.fetchItems):e.fetchItems()}x.c.preventKeyDownSideEffect(t)})),G()(V()(e),"handleArrangeModalOpen",(function(t){t.target.blur(),e.setState({showArrangeModal:!0})})),G()(V()(e),"handleArrangeModalClose",(function(t){e.setState({showArrangeModal:!1}),t&&e.fetchItems()})),G()(V()(e),"handleResourceStoreOpen",(function(t){t.target.blur(),e.setState({showResourceStoreModal:!0})})),G()(V()(e),"handleStoreHeadingDelete",(function(t){var n=e.props,r=n.videoId;(0,n.deleteResourceStore)({videoId:r},(function(){return e.setState({showResourceStoreModal:!1},(function(){return e.fetchItems()}))}))})),G()(V()(e),"handleResourceStoreClose",(function(t){e.setState({showResourceStoreModal:!1}),t&&e.fetchItems()})),G()(V()(e),"handleStoreHeadingExpand",(function(){var t=e.props.incrStoreViews,n=e.state.resourceStore;t&&n&&t({storeId:n.id})})),G()(V()(e),"handleCallActionClick",(function(){var t=window.location,n=t.pathname,r=t.search,i="".concat(n).concat(r);x.c.checkLoggedIn(i)&&e.props.showSubscriptionModalForm(!0)})),G()(V()(e),"handleToggleStoreConnectedFlag",(function(){var t=e.state.resourceStore;if(t){var n=e.props,r=n.videoId,i=n.connectResourceStore,a=n.disconnectResourceStore,o=n.getResourceStore;(t.videos.includes(r)?a:i)({videoId:r},(function(){return o({videoId:r},(function(t){e.setState({resourceStore:t})}))}))}})),G()(V()(e),"handleStoreUpdate",(function(t){e.setState({resourceStore:t})})),G()(V()(e),"handleStoreRefresh",(function(t){e.fetchResourceStore(e.props.videoId,t)})),G()(V()(e),"handleStoreMemberApplicationRemove",(function(t){var n=e.props,r=n.videoId,i=n.userId,a=n.removeStoreMember,o=e.state.resourceStore;i&&(null==o?void 0:o.id)&&(t(!0),a({storeId:o.id,memberId:i},(function(){e.fetchResourceStore(r),t(!1)}),(function(e){t(!1)})))})),G()(V()(e),"handleFilterChange",(function(t){if(t!==e.state.filter){var n=e.props,r=n.videoId;(0,n.displayProductsLayer)({videoId:r,subtype:t})}})),G()(V()(e),"getItemList",(function(){var t=e.state,n=(t.filter,t.items);return void 0===n?[]:n})),e}return c()(n,[{key:"render",value:function(){var e=this.state,t=e.show,n=e.canOpenStore,r=e.isLoading,i=(e.items,e.showCreateModal),a=e.showLinkModal,o=e.showArrangeModal,s=e.showResourceStoreModal,l=e.keywords,c=e.resourceStore,u=e.isSearching,d=e.selectedId,h=e.filter,f=this.props,p=f.userId,m=f.userAvatar,g=f.videoId,b=f.videoOwnerId,y=f.author,A=f.title,_=f.subject,w=f.topic,E=f.className,S=f.subscriptionOptions,C=(f.onToggle,f.videoSearchComponent),T=f.chapterSearchComponent,k=f.isVideoActive,O=f.isFullscreenMode,I=x.c.getCurrentVideoCategory(),M=(null==S?void 0:S.resourceManipulationPermission)&&(I===yoe.COMPOSING||I===yoe.EXPLORING),P=(null==c?void 0:c.ownerId)===p,D=this.getItemList();return v.a.createElement(v.a.Fragment,null,v.a.createElement(Wae,{show:t,canOpenStore:n,videoId:g,videoOwnerId:b,editable:M,keywords:l,userId:p,userAvatar:m,author:y,title:A,subject:_,topic:w,className:E,isLoading:r,items:D,isStoreOwner:P,resourceStore:c,selectedId:d,isSearching:u,isVideoActive:k,isFullscreenMode:O,filter:h,videoSearchComponent:C,chapterSearchComponent:T,onKeywordsChange:this.handleKeywordsChanged,onKeydown:this.handleKeyDown,onKeywordsCleared:this.handleKeywordsCleared,onCreateClick:this.handleCreateModalOpen,onLinkClick:this.handleLinkModalOpen,onClose:this.handleLayerClose,onToggle:this.handleLayerToggle,onRenderItemUpdate:this.handleRenderItemUpdate,onItemsRefresh:this.fetchItems,onArrangeClick:this.handleArrangeModalOpen,onStoreSettingsClick:this.handleResourceStoreOpen,onDeleteStoreHeading:this.handleStoreHeadingDelete,onStoreHeadingExpanded:this.handleStoreHeadingExpand,onCallActionClick:this.handleCallActionClick,onToggleStoreConnectedFlag:this.handleToggleStoreConnectedFlag,onStoreRefresh:this.handleStoreRefresh,onStoreMemberApplicationRemove:this.handleStoreMemberApplicationRemove,onFilterChange:this.handleFilterChange}),i&&v.a.createElement(sae,{videoId:g,resourceSubtype:h,onClose:this.handleCreateModalClose}),a&&v.a.createElement(qae,{videoId:g,isStoreOwner:P,onClose:this.handleLinkModalClose}),o&&v.a.createElement(toe,{videoId:g,onClose:this.handleArrangeModalClose}),s&&v.a.createElement(goe,{isEdit:!!c,videoId:g,onClose:this.handleResourceStoreClose,onDeleteStoreHeading:this.handleStoreHeadingDelete,onStoreUpdate:this.handleStoreUpdate}))}}]),n}(g.Component)),Toe=Object(q.b)((function(e){var t,n,r,i,a,o=e.auth,s=e.cogvid;return{userId:o.userInfo.userId,userAvatar:null===(t=o.userInfo)||void 0===t?void 0:null===(n=t.avatar)||void 0===n?void 0:n.image,subscriptionOptions:o.userInfo.subscriptionOptions,show:!!(null===(r=s.showProductsLayer)||void 0===r?void 0:r.videoId),showVideoId:null===(i=s.showProductsLayer)||void 0===i?void 0:i.videoId,showSubtype:null===(a=s.showProductsLayer)||void 0===a?void 0:a.subtype}}),(function(e){return{displayProductsLayer:function(t,n,r){return e(Q.e.displayProductsLayer(t,n,r))},getVideoProducts:function(t,n,r){return e(Q.e.getVideoProducts(t,n,r))},updateCogvidListItem:function(t){return e(Q.e.updateCogvidListItem(t))},deleteProduct:function(t,n,r){return e(Q.e.deleteProduct(t,n,r))},deleteLinkedProduct:function(t,n,r){return e(Q.e.deleteLinkedProduct(t,n,r))},downloadProduct:function(t,n,r){return e(Q.e.downloadProduct(t,n,r))},getMySubsOptions:function(t,n){return e(Q.l.getMySubsOptions(t,n))},getResourceStore:function(t,n,r){return e(Q.e.getResourceStore(t,n,r))},connectResourceStore:function(t,n,r){return e(Q.e.connectResourceStore(t,n,r))},disconnectResourceStore:function(t,n,r){return e(Q.e.disconnectResourceStore(t,n,r))},deleteResourceStore:function(t,n,r){return e(Q.e.deleteResourceStore(t,n,r))},incrStoreViews:function(t,n,r){return e(Q.e.incrStoreViews(t,n,r))},removeStoreMember:function(t,n,r){return e(Q.e.removeStoreMember(t,n,r))},showSubscriptionModalForm:function(t){return e(Q.l.displaySubscriptionModal(t))},getStoreMembers:function(t,n,r){return e(Q.e.getStoreMembers(t,n,r))}}}))(Coe),koe=r(1044),xoe=r.n(koe);var Ooe=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.topMessage,r=e.redirectTo,i=this.state.showActivationForm,a=window.storeUrl||r;return v.a.createElement(Fl.a,{show:!0,centered:!0,className:"default-modal-class"},v.a.createElement(Fl.a.Header,{className:"d-flex align-items-center py-2"},v.a.createElement("div",{className:"ml-3 u-fs-1x2o3 u-text-dark-blue-bold u-fw-600"},i?t("modal.activationTitle"):t("btn.register")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormCancel,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),n&&v.a.createElement("div",{className:"u-mt-1x1o2 u-ml-2 u-fs-1x1o8 u-fw-500"},n),v.a.createElement(xR.g,{isModal:!0,useAuthContainer:!1,containerClassName:xoe.a.container,willRedirect:!!a,onRegisterSuccess:this.handleRegisterSuccess,redirectTo:a,onActivateClick:this.handleActivationClick}))}}]),r}(v.a.Component);var Ioe=x.g.SEARCH_PARAM,Moe=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{showActivationForm:!1}),G()(V()(e),"handleFormCancel",(function(){(0,e.props.displayRegisterModal)(!1)})),G()(V()(e),"handleRegisterSuccess",(function(){e.setState({showActivationForm:!0},(function(){x.b.reportRegFormDesktopSubmitted()}))})),G()(V()(e),"handleActivationClick",(function(){e.setState({showActivationForm:!0})})),e}return c()(n,[{key:"componentDidMount",value:function(){x.c.storeUrl();var e=window.location.pathname+"?"+Ioe.KEY.ACTION+"="+Ioe.VALUE.ACTION.OPEN_REGISTER_FORM;window.history.replaceState({},document.title,e)}},{key:"componentWillUnmount",value:function(){x.c.restoreUrl(),(0,this.props.displayRegisterModal)(!1)}}]),n}(Ooe),Poe=Object(q.b)((function(e){e.auth;return{}}),(function(e){return{displayRegisterModal:function(t){return e(Q.a.displayRegisterModal(t))}}}))(Moe),Doe=r(132),Noe=r.n(Doe);function Loe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Roe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Loe(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Loe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Boe="PROCESSING";function joe(e){var t,n,r=e.plan,i=e.listingOrderNumber,a=e.subsId,o=e.disabled,s=e.onPlanSubscribed,l=e.onPlanChanged,c=e.onPlanUnsubscribe,u=e.onMySubscriptionsRefresh,d=Object(g.useState)(!1),h=pi()(d,2),f=h[0],p=h[1],m=Object(g.useState)(!1),b=pi()(m,2),y=b[0],A=b[1],_=r.state===Boe,w=i==r.listingOrderNumber,E=w?"Subscribed":-1==i?"Subscribe":i<r.listingOrderNumber?"Upgrade":"Downgrade",S=r.trialPeriod&r.trialPeriod?v.a.createElement("div",{className:"u-fs-7o8 text-right pr-3 text-danger"},(t=r.trialPeriod,n=r.trialTimeUnit,t+"-"+("DAYS"===n?"day":"MONTHS"===n?"month":"QUARTERS"===n?"quarter":"YEARS"===n?"year":"unit"))," free trial"):"";return v.a.createElement("div",{className:""},v.a.createElement("div",{className:"u-flex-center"},_&&w&&v.a.createElement(Qt,{className:"mr-3",tooltipText:Object(_t.t)("tooltip.refresh"),onClick:function(e){p(!0),u((function(){p(!1)}))},disabled:f},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-1x1o4"})),v.a.createElement(et.a,{type:"button",className:Noe.a.subscribeBtn,variant:w?"success":"secondary",onClick:function(e){A(!0);var t=function(){A(!1)};w?c(a,t):-1==i?s(r,t):l(a,r,t)},disabled:o},y?v.a.createElement(xn.a,{animation:"border",variant:"dark",size:"sm"}):_?"Updating...":E)),S)}var Foe=function(e){var t=e.plan,n=void 0===t?{}:t,r=e.listingOrderNumber,i=e.subsId,a=e.disabled,o=e.onPlanSubscribed,s=e.onPlanChanged,l=e.onPlanUnsubscribe,c=e.onMySubscriptionsRefresh,u=n.planGroup,d=n.displayPrice,h=n.options,f=void 0===h?[]:h;return v.a.createElement("div",{className:P()(Noe.a.plan,"position-relative"),style:{order:3==n.id?2:2==n.id?3:n.id}},v.a.createElement("div",{className:"u-text-cyan u-fs-1x1o4 u-fw-600"},u),v.a.createElement("div",{className:Noe.a.subscribeBtnWrapper},v.a.createElement(joe,{plan:n,listingOrderNumber:r,subsId:i,disabled:a,onPlanSubscribed:o,onPlanChanged:s,onPlanUnsubscribe:l,onMySubscriptionsRefresh:c})),v.a.createElement("div",{className:"u-fs-1 text-secondary u-fw-500"},d),v.a.createElement("div",{className:P()(Noe.a.options,"u-fs-15o16")},[f[0]].map((function(e,t){return v.a.createElement("div",{key:t,className:"d-flex align-items-center"},v.a.createElement("div",{className:"flex-shrink-0 mr-2"},e.label,":"),v.a.createElement("div",{className:""},e.value))}))))},Uoe=function(e){var t=e.isSubmitting,n=e.mySubscriptions,r=e.subsPlans,i=e.subsOptions,a=e.onPlanSubscribed,o=e.onPlanChanged,s=e.onPlanUnsubscribe,l=e.onClose,c=e.onMySubscriptionsRefresh,u=(e.onOpenFinanceAccounts,Object(g.useState)(n)),d=pi()(u,2),h=d[0],f=d[1],p=Object(g.useState)([]),m=pi()(p,2),b=m[0],y=m[1];Object(g.useEffect)((function(){var e=new Map;n.forEach((function(t){return e.set(t.kbPlanName,t)}));var t=-1,a="",o=r.map((function(n){var r,o=new Map;n.options.forEach((function(e){return o.set(e.optionType,"YES or NO"===e.valueUnit?e.value:e.description)}));var s=i.map((function(e){return{label:e.description,value:o.get(e.name)}}));return e.has(n.kbPlanName)&&t<n.listingOrderNumber&&(t=n.listingOrderNumber,a=e.get(n.kbPlanName).subscriptionId),n.state=null===(r=e.get(n.kbPlanName))||void 0===r?void 0:r.state,Roe(Roe({},n),{},{options:s,billing:n.paymentMethodRequired?"Billed monthly":"Free"})}));y(o),f(Roe(Roe({},n),{},{subsId:a,listingOrderNumber:t}))}),[r,i,n]);var A=n.some((function(e){return e.state===Boe}));return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",className:P()("createDocumentModal",Noe.a.subscriptionModalForm),onEscapeKeyDown:l},v.a.createElement(Fl.a.Body,{className:Noe.a.modalBody},v.a.createElement("div",{className:P()(Noe.a.btnClose),onClick:l},v.a.createElement("div",{className:"u-flex-center"},v.a.createElement("i",{className:"fv fuvi-delete u-fs-3o4"}))),v.a.createElement("div",{className:"position-relative"},v.a.createElement("h2",{className:""},"Join FUVI’s partner program:"),v.a.createElement("div",{className:"u-flex-center justify-content-between"},v.a.createElement("div",{className:"u-flex-center"},v.a.createElement("i",{className:"fv fuvi-like-full u-text-cyan"}),v.a.createElement("div",{className:"ml-2"},"Upload your resources.")),v.a.createElement("div",{className:"u-flex-center"},v.a.createElement("img",{src:I.a.heart,width:24}),v.a.createElement("div",{className:"ml-2"},"Earn monthly payouts.")),v.a.createElement("div",{className:"u-fw-600"},"Subscribe NOW!")),v.a.createElement("div",{className:Noe.a.plans},b.map((function(e){return v.a.createElement(Foe,{key:e.id,plan:e,disabled:t||A,subsId:h.subsId,listingOrderNumber:h.listingOrderNumber,onPlanSubscribed:a,onPlanChanged:o,onPlanUnsubscribe:s,onMySubscriptionsRefresh:c})}))),v.a.createElement("div",{className:"mt-5 d-flex justify-content-end"},v.a.createElement("a",{href:x.g.TERM_OF_USE_HASH,className:"u-text-cyan u-cursor-pointer"},Object(_t.t)("termsAndConditions"))))))};var Hoe=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"planOffers",(function(e){var t;switch(e){case 1:t=v.a.createElement("div",null,e,": View videos with F, U, V, I buttons");break;case 1:t=v.a.createElement("div",null,e,": View videos with F, U, V, I buttons; Download slides");break;case 1:t=v.a.createElement("div",null,e,": View videos with F, U, V, I buttons; Download slides, worksheets, HW guides, HW solutions");break;default:t=v.a.createElement("div",null,e,": View videos")}return t})),e}return c()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.subscribedCourses,r=t.displaySubscribeModal;return v.a.createElement("div",null,v.a.createElement(T,{className:P()(Noe.a.headingRow)},v.a.createElement(k.a,{md:4},v.a.createElement("div",{className:Noe.a.headingCol},"Course title")),v.a.createElement(k.a,{md:4},v.a.createElement("div",{className:Noe.a.headingCol},"Plan #")),v.a.createElement(k.a,{md:2},v.a.createElement("div",{className:Noe.a.headingCol},"Subscribed on")),v.a.createElement(k.a,{md:1},v.a.createElement("div",{className:Noe.a.headingCol},"Status")),v.a.createElement(k.a,null,v.a.createElement("div",null," "))),n.map((function(t){return v.a.createElement(T,null,v.a.createElement(k.a,{md:4},v.a.createElement("a",{href:"javascript:void(0)",onClick:function(){var e=document.getElementById(x.g.ID_VIDEO_BACK_BUTTON);e&&e.click(),$.a.push("/exploring?v=".concat(t.courseId))}}," ",t.courseTitle)),v.a.createElement(k.a,{md:4},e.planOffers(t.plan)),v.a.createElement(k.a,{md:2},t.createdDate),v.a.createElement(k.a,{md:1},t.status),v.a.createElement(k.a,null,v.a.createElement(Qt,{tooltipText:"Edit",onClick:function(){r({videoId:t.courseId,videoTitle:t.courseTitle,videoPlan:"CANCELED"==t.status?0:t.plan})}},v.a.createElement("i",{className:"fv fuvi-pen-draw u-fs-7o8"}))))})))}}]),n}(v.a.Component);var zoe=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"state",{subscribedCourses:[]}),G()(V()(e),"componentDidMount",(function(){(0,e.props.getMySubscribedCourses)({},(function(t){e.setState({subscribedCourses:t})}))})),G()(V()(e),"handleFormClose",(function(){e.props.displaySubscribedCoursesForm(!1)})),e}return c()(r,[{key:"render",value:function(){var e=this.props.displaySubscribeModal;return v.a.createElement(Fl.a,{show:!0,centered:!0,scrollable:!0,backdrop:"static",dialogClassName:Noe.a.mySubscribedCoursesForm,onEscapeKeyDown:this.handleFormClose},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,t("modal.mySubscribedCourses")),v.a.createElement("div",{className:"close-modal-btn",onClick:this.handleFormClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,{className:Noe.a.modalBodyCourses},v.a.createElement(Hoe,{subscribedCourses:this.state.subscribedCourses,displaySubscribeModal:e})),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100"},v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"primary",className:"modal-button",onClick:this.handleFormClose},t("btn.close")))))}}]),r}(v.a.Component),Voe=Object(q.b)(null,(function(e){return{displaySubscribedCoursesForm:function(t){return e(Q.l.displaySubscribedCoursesModal(t))},getMySubscribedCourses:function(t,n,r){return e(Q.l.getMySubscribedCourses(t,n,r))},displaySubscribeModal:function(t,n,r){return e(Q.e.displaySubscribeModal(t,n,r))}}}))(zoe);var Woe=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{mySubscriptions:[],subsPlans:[],subsOptions:[],semaphore:4,isSubmitting:!1}),G()(V()(e),"componentDidUpdate",(function(e){tw()(e)})),G()(V()(e),"showHideSubscriptionModalForm",(function(t){(0,e.props.displaySubscriptionModal)(t)})),G()(V()(e),"handlePlanSubscribed",(function(t,n){if(x.c.checkLoggedIn("",{showLogin:!0,callback:function(){e.props.displaySubscriptionModal(!0)}})){var r=e.state.myPaymentMethods,i={planName:t.kbPlanName,planGroup:t.planGroup};if(t.paymentMethodRequired)!r||0==r.length?e.handleAddingPaymentMethod(t.kbPlanName,n):e.handlePlanSubscribe(i,n);else e.handlePlanSubscribe(i,n)}})),G()(V()(e),"handlePlanSubscribe",(function(n,r){var i=n.planName,a=n.planGroup;e.setState({isSubmitting:!0}),e.props.subscribeToPlan(i,(function(n){setTimeout((function(){x.b.reportTeacherSubscribedPlanDesktop(),e.getMySubscriptions((function(){e.setState({isSubmitting:!1}),r&&r()})),e.setState({showInfoModal:!0}),x.e.success(t("message.subscribedOk",{name:a}))}),500)}),(function(){e.setState({isSubmitting:!1}),r&&r(),x.e.error(t("message.subscribedFailed",{name:a}))}))})),G()(V()(e),"handlePlanChanged",(function(t,n,r){var i=e.state.myPaymentMethods,a={subsId:t,planName:n.kbPlanName,planGroup:n.planGroup};n.paymentMethodRequired?!i||0==i.length?e.handleAddingPaymentMethod(n.kbPlanName,r):e.handleSubscribedPlanChange(a,r):e.handleSubscribedPlanChange(a,r)})),G()(V()(e),"handleSubscribedPlanChange",(function(n,r){var i=n.subsId,a=n.planName,o=n.planGroup;e.setState({isSubmitting:!0}),e.props.changeSubscribedPlan({subsId:i,planName:a},(function(n){setTimeout((function(){e.getMySubscriptions((function(){e.setState({isSubmitting:!1}),r&&r()})),x.e.success(t("message.subscribedOk",{name:o}))}),500)}),(function(){e.setState({isSubmitting:!1}),r&&r(),x.e.error(t("message.subscribedFailed",{name:o}))}))})),G()(V()(e),"handleAddingPaymentMethod",(function(t,n){var r=x.g.SEARCH_PARAM,i=r.KEY,a=r.VALUE,o=window.location,s=o.origin,l=o.pathname,c=o.search,u=new URLSearchParams(c);u.set(i.POPUP,a.SUBSCRIBE_SUCCESS);var d=s+l+"?"+u.toString();u.set(i.POPUP,a.SUBSCRIBE_CANCEL);var h={kbPlanName:t,successUrl:d,cancelUrl:s+l+"?"+u.toString()},f=e.props,p=f.checkoutSubscription,m=f.stripe;e.setState({isSubmitting:!0}),p(h,(function(t){var r=t.redirectUrl;e.setState({isSubmitting:!1}),n&&n(),m&&r&&m.redirectToCheckout({sessionId:r})}),(function(){e.setState({isSubmitting:!1}),n&&n()}))})),G()(V()(e),"handleClose",(function(){e.showHideSubscriptionModalForm(!1),e.props.getMySubsOptions((function(){}),(function(){}))})),G()(V()(e),"handleFormshown",(function(){e.props.getMySubscriptions((function(t){e.setState({mySubscriptions:t}),e.setState((function(e){return{semaphore:e.semaphore-1}}))}),(function(){e.setState({mySubscriptions:[]}),e.setState((function(e){return{semaphore:e.semaphore-1}}))})),e.props.getMyPaymentMethods((function(t){e.setState({myPaymentMethods:t}),e.setState((function(e){return{semaphore:e.semaphore-1}}))}),(function(){e.setState({myPaymentMethods:[]}),e.setState((function(e){return{semaphore:e.semaphore-1}}))})),e.props.getSubsPlans((function(t){e.setState({subsPlans:t}),e.setState((function(e){return{semaphore:e.semaphore-1}}))}),(function(){e.setState({subsPlans:[]}),e.setState((function(e){return{semaphore:e.semaphore-1}}))})),e.props.getSubsOptions({productName:"system"},(function(t){e.setState({subsOptions:t}),e.setState((function(e){return{semaphore:e.semaphore-1}}))}),(function(){e.setState({subsOptions:[]}),e.setState((function(e){return{semaphore:e.semaphore-1}}))}))})),G()(V()(e),"handlePlanUnsubscribe",(function(t){var n=t.subsId,r=t.callback;e.setState({isSubmitting:!0,showUnsubConfirmation:null}),e.props.unsubscribePlan({subsId:n},(function(){e.setState({mySubscriptions:[],isSubmitting:!1}),r&&r()}),(function(){e.setState({isSubmitting:!1}),r&&r()}))})),G()(V()(e),"getMySubscriptions",(function(t){e.props.getMySubscriptions((function(n){e.setState({mySubscriptions:n}),t&&t()}),(function(){t&&t()}))})),G()(V()(e),"handleOpeningFinanceAccounts",(function(){e.props.displayFinanceAccountsModal(!0)})),e}return c()(r,[{key:"componentDidMount",value:function(){this.handleFormshown()}},{key:"render",value:function(){var e=this,n=this.state,r=n.mySubscriptions,i=void 0===r?[]:r,a=n.myPaymentMethods,o=void 0===a?[]:a,s=n.subsPlans,l=void 0===s?[]:s,c=n.subsOptions,u=void 0===c?[]:c,d=n.semaphore,h=void 0===d?4:d,f=n.isSubmitting,p=n.showUnsubConfirmation;return h>0?v.a.createElement(Nn,{className:"position-fixed"}):h<=0&&v.a.createElement(v.a.Fragment,null,v.a.createElement(Uoe,{isSubmitting:f,mySubscriptions:i,myPaymentMethods:o,subsPlans:l,subsOptions:u,onClose:this.handleClose,onPlanSubscribed:this.handlePlanSubscribed,onPlanChanged:this.handlePlanChanged,onPlanUnsubscribe:function(t,n){e.setState({showUnsubConfirmation:{subsId:t,callback:n}})},onMySubscriptionsRefresh:this.getMySubscriptions,onOpenFinanceAccounts:this.handleOpeningFinanceAccounts}),v.a.createElement(HC,{show:this.state.showInfoModal,message:v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"u-fs-1x1o6 u-fw-500 text-secondary"},"Congratulations! You're now subscribed!"),v.a.createElement("div",null,"Please go to the store to upload your resources. Thank you!")),closeBtnText:"Close",onClose:function(){return e.setState({showInfoModal:!1})}}),v.a.createElement(IC,{show:!!p,title:t("message.confirmUnsubMessage"),onConfirm:function(){return e.handlePlanUnsubscribe(p)},onClose:function(){Object(Y.invoke)(p,"callback"),e.setState({showUnsubConfirmation:null})}}))}}]),r}(v.a.Component),Goe=Object(X.a)(K.f,K.e,Object(q.b)(null,(function(e){return{getMySubscriptions:function(t,n){return e(Q.l.getMySubscriptions(t,n))},getMyPaymentMethods:function(t,n){return e(Q.l.getMyPaymentMethods(t,n))},checkoutSubscription:function(t,n,r){return e(Q.l.checkoutSubscription(t,n,r))},getSubsPlans:function(t,n){return e(Q.l.getSubsPlans(t,n))},getSubsOptions:function(t,n,r){return e(Q.l.getSubsOptions(t,n,r))},displaySubscriptionModal:function(t){return e(Q.l.displaySubscriptionModal(t))},subscribeToPlan:function(t,n,r){return e(Q.l.subscribeToPlan(t,n,r))},changeSubscribedPlan:function(t,n,r){return e(Q.l.changeSubscribedPlan(t,n,r))},unsubscribePlan:function(t,n,r){return e(Q.l.unsubscribePlan(t,n,r))},getMySubsOptions:function(t,n){return e(Q.l.getMySubsOptions(t,n))},displayFinanceAccountsModal:function(t){return e(Q.l.displayFinanceAccountsModal(t))},showSubscribedCoursesForm:function(t){return e(Q.l.displaySubscribedCoursesModal(t))}}})))(Woe),qoe=r(125),Yoe=r.n(qoe),Koe=function(e){e.isSubmitting;var t=e.isAddingPaymentMethod,n=e.onClose,r=e.onAddPaymentMethod,i=e.onDeletePaymentMethod,a=e.onSetDefaultPaymentMethod,o=e.onAddPayoutAccount,s=e.onDeletePayoutAccount,l=e.onSetDefaultPayoutAccount,c=e.onResubmitAccountInfo,u=e.myPaymentMethods,d=e.myPayoutAccounts;function h(e){var t=e.bgColor,n=e.methodId,r=e.gateway,o=e.propMap,s=e.isDefault;return v.a.createElement(T,{className:Yoe.a.dataRow,style:{backgroundColor:t}},v.a.createElement(k.a,{md:4,lg:4},n),v.a.createElement(k.a,{md:1,lg:1},o.get("card_brand")),v.a.createElement(k.a,{md:1,lg:1},o.get("card_country")),v.a.createElement(k.a,{md:1,lg:1},o.get("card_last4")),v.a.createElement(k.a,{md:1,lg:1},o.get("card_exp_month"),"/",o.get("card_exp_year")),v.a.createElement(k.a,{md:1,lg:1},r),v.a.createElement(k.a,{md:1,lg:1},o.get("type")),v.a.createElement(k.a,{md:1,lg:1},v.a.createElement("b",null,s?"YES":"NO")),v.a.createElement(k.a,{md:1,lg:1},v.a.createElement("div",{className:"d-flex align-items-center"},v.a.createElement(Qt,{disabled:s,tooltipText:Object(_t.t)("tooltip.setDefault"),onClick:function(){return a(n)}},v.a.createElement("img",{width:22,height:22,className:"mr-1",src:I.a.setDefault,alt:"Set as default"})),v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.removePM"),onClick:function(){return i(n)}},v.a.createElement("i",{className:"fv fuvi-trash-can u-fs-1x1o4"})))))}function f(e){var t=e.bgColor,n=e.account;return v.a.createElement(T,{className:Yoe.a.dataRow,style:{backgroundColor:t}},v.a.createElement(k.a,{md:4,lg:4},v.a.createElement("div",{style:{display:"block"}},v.a.createElement("div",null,v.a.createElement("b",null,n.gatewayAccountId)),v.a.createElement("div",null,v.a.createElement("span",{className:Yoe.a.subtext},n.fullName)),v.a.createElement("div",null,v.a.createElement("span",{className:Yoe.a.subtext},n.emailAddress)))),v.a.createElement(k.a,{md:1,lg:1},n.transfersEnabled?"YES":"NO"),v.a.createElement(k.a,{md:1,lg:1},n.payoutsEnabled?"YES":"NO"),v.a.createElement(k.a,{md:1,lg:1},n.submitCompleted?v.a.createElement(v.a.Fragment,null,v.a.createElement("div",null,v.a.createElement("b",null,"YES")),v.a.createElement("div",null,v.a.createElement("a",{disabled:!n.loginUrl,href:"#",onClick:function(e){e.preventDefault(),window.open(n.loginUrl,"_blank")}},"Login"))):v.a.createElement(v.a.Fragment,null,v.a.createElement("div",null,"NO"),v.a.createElement("div",null,v.a.createElement("a",{href:"#",onClick:function(e){e.preventDefault(),c(n.accountId)}},"Re-submit")))),v.a.createElement(k.a,{md:1,lg:1},"Stripe"),v.a.createElement(k.a,{md:1,lg:1},n.active?"YES":"NO"),v.a.createElement(k.a,{md:1,lg:1},n.defaultAccount?"YES":"NO"),v.a.createElement(k.a,{md:2,lg:2,className:Yoe.a.actionCol},v.a.createElement(Qt,{disabled:n.defaultAccount,tooltipText:Object(_t.t)("tooltip.setDefault"),onClick:function(){return l(n.accountId)}},v.a.createElement("img",{width:22,height:22,className:"mr-1",src:I.a.setDefault,alt:"Set as default"})),v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.removePM"),onClick:function(){return s(n.accountId)}},v.a.createElement("i",{className:"fv fuvi-trash-can u-fs-1x1o4"}))))}return v.a.createElement(Fl.a,{show:!0,centered:!0,scrollable:!0,backdrop:"static",dialogClassName:Yoe.a.financeAccountsModalForm,onEscapeKeyDown:n},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,Object(_t.t)("modal.myFinanceAccountTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:n,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,{className:Yoe.a.modalBody},v.a.createElement("div",{className:Yoe.a.sectionTitle},"Subsciption payment methods:"),v.a.createElement("div",{style:{border:"1px solid gray"}},v.a.createElement(ioe,{fluid:!0},v.a.createElement(T,{className:Yoe.a.headerRow},["ID","Card brand","Card country","Last 4 digits","Expired in","Payment gateway","Payment type","Default"].map((function(e,t){var n=0==t?4:1,r=0==t?"center":"left";return v.a.createElement(k.a,{key:"col_"+t,md:n,lg:n,className:Yoe.a.paymentHeaderColumn,style:{justifyContent:r}},e)})),v.a.createElement(k.a,{className:"u-flex-center"},v.a.createElement(Qt,{isLoading:t,tooltipText:Object(_t.t)("tooltip.addPM"),onClick:r},v.a.createElement("i",{className:"fv fuvi-add-item u-fs-1x1o4"})))),v.a.createElement((function(e){var t=e.myPaymentMethods,n=new Map;return t.map((function(e,t){n.clear(),e.pluginInfo.properties.map((function(e){return n.set(e.key,e.value)}));var r=e.pluginName.replace("killbill-",""),i=t%2==0?"white":"rgba(169, 188, 199, 0.2)";return v.a.createElement(h,{key:e.paymentMethodId,bgColor:i,methodId:e.paymentMethodId,gateway:r,propMap:n,isDefault:e.isDefault})}))}),{myPaymentMethods:u}),0==(null==u?void 0:u.length)&&v.a.createElement(T,{className:Yoe.a.dataRow},v.a.createElement(k.a,null,"No payment method is found.")))),v.a.createElement("div",{className:Yoe.a.sectionTitle,style:{marginTop:"40px"}},"Payout accounts:"),v.a.createElement("div",{style:{border:"1px solid gray"}},v.a.createElement(ioe,{fluid:!0},v.a.createElement(T,{className:Yoe.a.headerRow},["ID","Transfer enabled","Payout enabled","Submit completed","Payment gateway","Active","Default"].map((function(e,t){var n=0==t?4:1,r=0==t?"center":"left";return v.a.createElement(k.a,{key:"col_"+t,md:n,lg:n,className:Yoe.a.paymentHeaderColumn,style:{justifyContent:r}},e)})),v.a.createElement(k.a,{className:"u-flex-center"},v.a.createElement(Qt,{tooltipText:Object(_t.t)("tooltip.addPA"),onClick:o},v.a.createElement("i",{className:"fv fuvi-add-item u-fs-1x1o4"})))),v.a.createElement((function(e){return e.myPayoutAccounts.map((function(e,t){var n=t%2==0?"white":"rgba(169, 188, 199, 0.2)";return v.a.createElement(f,{key:t,account:e,bgColor:n})}))}),{myPayoutAccounts:d}),0==(null==d?void 0:d.length)&&v.a.createElement(T,{className:Yoe.a.dataRow},v.a.createElement(k.a,null,"No payout account is found."))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex align-items-center w-100 "},v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"primary",className:"modal-button",onClick:n},Object(_t.t)("btn.close")))))};var Xoe=x.g.TEXT_INPUT_MAX_LENGTH,Qoe=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isSubmitting:!1,firstname:"",lastname:"",emailAddress:"",isDefault:!1}),G()(V()(e),"validator",new ql.a(x.c.validatorConfig)),G()(V()(e),"handleCreate",(function(){if(!e.validator.allValid())return e.validator.showMessages(),void e.forceUpdate();var t=e.props,n=t.onClose,r=t.onSavePayoutAccount,i=e.state,a=i.firstname,o=i.lastname,s=i.emailAddress,l=i.isDefault;n(),r({firstname:a,lastname:o,emailAddress:s,isDefault:l})})),G()(V()(e),"handleFormFieldValidate",(function(t){e.validator.showMessageFor(t),e.forceUpdate()})),G()(V()(e),"toggleSelection",(function(){e.setState((function(e){return{isDefault:!e.isDefault}}))})),G()(V()(e),"handleInputChange",(function(t){var n=t.target,r=n.name,i=n.value;e.setState(G()({},r,i),(function(){e.handleFormFieldValidate(r)}))})),G()(V()(e),"handleInputBlur",(function(t){var n=t.target.name;e.handleFormFieldValidate(n)})),e}return c()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.userInfo,n=e.isDefault;console.log(t),this.setState({firstname:null==t?void 0:t.firstName,lastname:null==t?void 0:t.lastName,emailAddress:null==t?void 0:t.email,isDefault:n})}},{key:"render",value:function(){var e=this.props.onClose,t=this.state,n=t.isSubmitting,r=t.firstname,i=t.lastname,a=t.emailAddress,o=t.isDefault;return v.a.createElement(Fl.a,{show:!0,centered:!0,scrollable:!0,backdrop:"static",dialogClassName:Yoe.a.payoutModalForm,onEscapeKeyDown:e},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,null,Object(_t.t)("modal.payoutAccountTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:e,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,{className:Yoe.a.modalBody},v.a.createElement(ioe,{fluid:!0},v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement(mu,{required:!0,disabled:n,labelName:Object(_t.t)("label.firstname"),name:"firstname",value:r,onChange:this.handleInputChange,onBlur:this.handleInputBlur,classNameInput:"cogvid-input-height",validatorElement:this.validator.message("firstname",r,"firstnameRequired|max:".concat(Xoe))}))),v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement(mu,{required:!0,disabled:n,labelName:Object(_t.t)("label.lastname"),name:"lastname",value:i,onChange:this.handleInputChange,onBlur:this.handleInputBlur,classNameInput:"cogvid-input-height",validatorElement:this.validator.message("lastname",i,"lastnameRequired|max:".concat(Xoe))}))),v.a.createElement(T,null,v.a.createElement(k.a,null,v.a.createElement(mu,{required:!0,disabled:n,labelName:Object(_t.t)("label.emailAddress"),name:"emailAddress",value:a,onChange:this.handleInputChange,onBlur:this.handleInputBlur,classNameInput:"cogvid-input-height",validatorElement:this.validator.message("emailAddress",a,"emailAddressRequired|max:".concat(Xoe))}))),v.a.createElement(T,null,v.a.createElement(k.a,{className:"d-flex"},v.a.createElement("div",{className:"align-items-left mr-1"},v.a.createElement(_u,{id:"isDefault",type:"checkbox",labelName:Object(_t.t)("label.defaultAccount"),className:"u-fs-15o16",checked:o,onChange:this.toggleSelection,disabled:n})))),v.a.createElement(T,{className:"mt-4"},v.a.createElement(k.a,null,v.a.createElement("p",null,v.a.createElement("b",null,Object(_t.t)("notes"),":")),v.a.createElement("p",null,Object(_t.t)("modal.payoutAccountNote")))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex align-items-center w-100 "},v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"primary",className:"modal-button",onClick:this.handleCreate},Object(_t.t)("btn.save")))))}}]),n}(v.a.Component);var $oe=x.g.SEARCH_PARAM,Joe="NONE",Zoe="PM",ese="PA",tse=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{semaphore:2,isSubmitting:!1,myPaymentMethods:[],myPayoutAccounts:[],deletedType:Joe,deletedId:void 0,confirmationMsg:"",creatingPayoutAccount:!1}),G()(V()(e),"savedAct",void 0),G()(V()(e),"componentDidUpdate",(function(e){tw()(e)})),G()(V()(e),"showHideFinanceAccountsModalForm",(function(t){(0,e.props.displayFinanceAccountsModal)(t),t||(e.savedAct===$oe.VALUE.ACTION.OPEN_FINANCE_ACCOUNTS&&(e.savedAct=void 0),x.c.changeURLWithoutSideEffect([[$oe.KEY.ACTION,e.savedAct]]))})),G()(V()(e),"handleClose",(function(){e.showHideFinanceAccountsModalForm(!1)})),G()(V()(e),"handleFormshown",(function(){e.props.getMyPaymentMethods((function(t){e.setState({myPaymentMethods:t}),e.setState((function(e){return{semaphore:e.semaphore-1}}))}),(function(){e.setState({myPaymentMethods:[]}),e.setState((function(e){return{semaphore:e.semaphore-1}}))})),e.props.getMyPayoutAccounts((function(t){e.setState({myPayoutAccounts:t}),e.setState((function(e){return{semaphore:e.semaphore-1}}))}),(function(){e.setState({myPayoutAccounts:[]}),e.setState((function(e){return{semaphore:e.semaphore-1}}))}))})),G()(V()(e),"doDeleteObject",(function(){var t=e.props,n=t.deletePaymentMethod,r=t.deletePayoutAccount,i=e.state,a=i.deletedType,o=i.deletedId;a!=Joe&&o?a==Zoe?n({methodId:o},(function(){e.setState({deletedType:Joe,deletedId:void 0,confirmationMsg:""},(function(){return e.handleFormshown()}))}),(function(){e.setState({deletedType:Joe,deletedId:void 0,confirmationMsg:""},(function(){return e.handleFormshown()}))})):r({accountId:o},(function(){e.setState({deletedType:Joe,deletedId:void 0,confirmationMsg:""},(function(){return e.handleFormshown()}))}),(function(){e.setState({deletedType:Joe,deletedId:void 0,confirmationMsg:""},(function(){return e.handleFormshown()}))})):e.setState({deletedType:Joe,deletedId:void 0,confirmationMsg:""})})),G()(V()(e),"cancelDeletion",(function(){e.setState({deletedType:Joe,deletedId:void 0,confirmationMsg:""}),e.handleFormshown()})),G()(V()(e),"handleAddingPaymentMethod",(function(){var t=x.g.SEARCH_PARAM,n=t.KEY,r=t.VALUE,i=window.location,a=i.origin,o=i.pathname,s=i.search,l=new URLSearchParams(s);l.set(n.POPUP,r.ADD_PAYMENT_METHOD_SUCCESS);var c=a+o+"?"+l.toString();l.set(n.POPUP,r.ADD_PAYMENT_METHOD_CANCEL);var u={successUrl:c,cancelUrl:a+o+"?"+l.toString(),defaultPaymentMethod:!1},d=e.props,h=d.addPaymentMethod,f=d.stripe;e.setState({isAddingPaymentMethod:!0}),h(u,(function(t){var n=t.redirectUrl;e.setState({isAddingPaymentMethod:!1}),f&&n&&f.redirectToCheckout({sessionId:n})}),(function(){e.setState({isAddingPaymentMethod:!1})}))})),G()(V()(e),"handleSettingDefaultPaymentMethod",(function(t){e.props.setDefaultPaymentMethod({methodId:t},(function(){e.handleFormshown()}))})),G()(V()(e),"handleDeletingPaymentMethod",(function(n){var r=t("modal.confirmDeletePaymentMethod");e.setState({deletedType:Zoe,deletedId:n,confirmationMsg:r})})),G()(V()(e),"handleAddingPayoutAccount",(function(){e.setState({creatingPayoutAccount:!0})})),G()(V()(e),"savePayoutAccount",(function(t){e.setState({creatingPayoutAccount:!1}),e.props.addPayoutAccount(t,(function(e){window.location=e,console.log("Payout account url: ",e)}))})),G()(V()(e),"handleClosingPayoutAccountModalForm",(function(){e.setState({creatingPayoutAccount:!1})})),G()(V()(e),"handleSettingDefaultPayoutAccount",(function(t){e.props.setDefaultPayoutAccount({accountId:t},(function(){e.handleFormshown()}))})),G()(V()(e),"handleSubmitAccountInfo",(function(t){var n={accountId:t,refreshUrl:window.location.href,returnUrl:window.location.href};console.log(n),e.props.resubmitAccountInfo(n,(function(t){console.log("response:",t),"null"==t?e.handleFormshown():(window.location=t,console.log("Resubmited and redirected to url: ",t))}))})),G()(V()(e),"handleDeletingPayoutAccount",(function(n){var r=t("modal.confirmDeletePayoutAccount");e.setState({deletedType:ese,deletedId:n,confirmationMsg:r})})),e}return c()(r,[{key:"componentDidMount",value:function(){var e=new URLSearchParams(window.location.search).get($oe.KEY.ACTION);e&&(this.savedAct=e),x.c.changeURLWithoutSideEffect([[$oe.KEY.ACTION,$oe.VALUE.ACTION.OPEN_FINANCE_ACCOUNTS]]),this.handleFormshown()}},{key:"render",value:function(){var e=this.state,t=e.semaphore,n=void 0===t?2:t,r=e.isSubmitting,i=e.isAddingPaymentMethod,a=e.myPaymentMethods,o=e.myPayoutAccounts,s=e.deletedType,l=void 0===s?Joe:s,c=e.deletedId,u=void 0===c?void 0:c,d=e.confirmationMsg,h=void 0===d?"":d,f=e.creatingPayoutAccount,p=void 0!==f&&f,m=this.props.userInfo,g=0==(null==o?void 0:o.length),b=l!=Joe&&u;return n>0?v.a.createElement(Nn,{className:"position-fixed"}):n<=0&&v.a.createElement(v.a.Fragment,null,v.a.createElement(Koe,{isSubmitting:r,isAddingPaymentMethod:i,myPaymentMethods:a,myPayoutAccounts:o,onClose:this.handleClose,onAddPaymentMethod:this.handleAddingPaymentMethod,onSetDefaultPaymentMethod:this.handleSettingDefaultPaymentMethod,onDeletePaymentMethod:this.handleDeletingPaymentMethod,onAddPayoutAccount:this.handleAddingPayoutAccount,onSetDefaultPayoutAccount:this.handleSettingDefaultPayoutAccount,onResubmitAccountInfo:this.handleSubmitAccountInfo,onDeletePayoutAccount:this.handleDeletingPayoutAccount}),p&&v.a.createElement(Qoe,{userInfo:m,isDefault:g,onClose:this.handleClosingPayoutAccountModalForm,onSavePayoutAccount:this.savePayoutAccount}),b&&v.a.createElement("div",{onClick:function(e){e.preventDefault(),e.stopPropagation()}},v.a.createElement(IC,{show:!0,title:h,onConfirm:this.doDeleteObject,onClose:this.cancelDeletion})))}}]),r}(v.a.Component),nse=Object(X.a)(K.f,K.e,Object(q.b)((function(e){return{userInfo:e.auth.userInfo}}),(function(e){return{getMyPaymentMethods:function(t,n){return e(Q.l.getMyPaymentMethods(t,n))},addPaymentMethod:function(t,n,r){return e(Q.l.checkoutSubscription(t,n,r))},setDefaultPaymentMethod:function(t,n,r){return e(Q.l.setDefaultPaymentMethod(t,n,r))},deletePaymentMethod:function(t,n,r){return e(Q.l.deletePaymentMethod(t,n,r))},getMyPayoutAccounts:function(t,n){return e(Q.l.getMyPayoutAccounts(t,n))},addPayoutAccount:function(t,n,r){return e(Q.l.addPayoutAccount(t,n,r))},setDefaultPayoutAccount:function(t,n,r){return e(Q.l.setDefaultPayoutAccount(t,n,r))},resubmitAccountInfo:function(t,n,r){return e(Q.l.resubmitAccountInfo(t,n,r))},deletePayoutAccount:function(t,n,r){return e(Q.l.deletePayoutAccount(t,n,r))},displayFinanceAccountsModal:function(t){return e(Q.l.displayFinanceAccountsModal(t))}}})))(tse),rse=r(554),ise=r.n(rse),ase=new RegExp(/^[a-z0-9]+$/i),ose=Object(q.b)(null,(function(e){return{verifyAccount:function(t,n,r){return e(Q.a.verifyAccount(t,n,r))},sendConfirmationEmail:function(t,n,r){return e(Q.a.sendConfirmationEmail(t,n,r))}}}))((function(e){var t=e.code,n=void 0===t?"":t,r=e.email,i=e.message,a=e.verifyAccount,o=e.sendConfirmationEmail,s=e.onClose,l=Object(g.useState)(n||""),c=pi()(l,2),u=c[0],d=c[1],h=Object(g.useState)(!0),f=pi()(h,2),p=f[0],m=f[1],b=Object(g.useState)(!1),y=pi()(b,2),A=y[0],_=y[1],w=Object(g.useState)(!1),E=pi()(w,2),S=E[0],C=E[1],T=Object(g.useState)(0),k=pi()(T,2),O=k[0],I=k[1],M=Object(g.useState)(""),D=pi()(M,2),N=D[0],L=D[1];Object(g.useEffect)((function(){x.c.changeURLWithoutSideEffect([[x.g.SEARCH_PARAM.KEY.ACTION],[x.g.SEARCH_PARAM.KEY.ACTION,x.g.SEARCH_PARAM.VALUE.ACTION.OPEN_ACTIVATION_FORM]])}),[]),Object(g.useEffect)((function(){var e=setInterval((function(){O>0&&I(O-1),0===O&&clearInterval(e)}),1e3);return function(){clearInterval(e)}}),[O]),Object(g.useEffect)((function(){d(n||"")}),[n]);var R=Object(g.useCallback)((function(e){var t=e.target.value;d(t)}),[]),B=Object(g.useCallback)((function(e){r&&(C(!0),o(r,(function(){I(60),setTimeout((function(){C(!1)}),500)}),(function(){setTimeout((function(){C(!1)}),500)})))}),[r]),j=Object(g.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),_(!0);var t=ase.test(u);m(t),t?a(u,(function(){_(!1),s(!0),x.b.reportAccountActivationDesktopSubmitted()}),(function(e){L(e),setTimeout((function(){_(!1)}),500)})):setTimeout((function(){_(!1)}),500)}),[u]),F=8===(null==u?void 0:u.length),U=F&&!A,H=!r||S||O>0;return v.a.createElement("div",null,v.a.createElement("div",{className:P()(ise.a.activationDesc,"u-fs-15o16")},i||Object(_t.t)("modal.activationDesc")),v.a.createElement($l.a,{noValidate:!0,onSubmit:j},v.a.createElement(mu,{type:"text",autoComplete:"off",className:"mt-3",labelName:Object(_t.t)("label.activationCode"),name:"activationCode",value:u,onChange:R,maxLength:8,validatorElement:A?"":N||(!p&&F?Object(_t.t)("message.invalidActivationCode"):""),classNameError:"text-danger"}),v.a.createElement("div",{className:"u-fs-15o16 u-opacity-80 text-right"},Object(_t.t)("modal.activationDesc2")),v.a.createElement("div",{className:"d-flex justify-content-end"},v.a.createElement("div",{className:P()("text-btn u-fs-15o16",H&&"disabled"),onClick:H?void 0:B},Object(_t.t)("btn.resendEmail")," ",O>0?"(".concat(O,"s)"):"")),v.a.createElement(et.a,{block:!0,disabled:!U,variant:"primary",className:"u-h-3x btn-border text-white mt-4",onClick:U?j:void 0},A?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):Object(_t.t)("btn.activate"))))}));var sse=x.g.SEARCH_PARAM,lse=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),G()(V()(e),"state",{code:"",email:""}),G()(V()(e),"savedAct",void 0),G()(V()(e),"handleFormClose",(function(){(0,e.props.displayActivationModal)(!1),x.c.changeURLWithoutSideEffect([[sse.KEY.ACTION],[sse.KEY.ACTIVATION_CODE],[sse.KEY.EMAIL]])})),G()(V()(e),"render",(function(){var n=e.state,r=n.code,i=n.email;return v.a.createElement(Fl.a,{show:!0,centered:!0,className:"default-modal-class"},v.a.createElement(Fl.a.Header,{className:"align-items-center"},v.a.createElement("div",{className:"u-fs-1x1o3 ml-3"},t("modal.activationTitle")),v.a.createElement("div",{className:"close-modal-btn",onClick:e.handleFormClose,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,{className:"u-w-32 u-p-2"},v.a.createElement(ose,{email:i,code:r,onClose:e.handleFormClose})))})),e}return c()(r,[{key:"componentDidMount",value:function(){var e=new URLSearchParams(window.location.search),t=e.get(sse.KEY.ACTION),n=e.get(sse.KEY.ACTIVATION_CODE),r=e.get(sse.KEY.EMAIL);this.setState({code:n,email:r}),t&&(this.savedAct=t),x.c.changeURLWithoutSideEffect([[sse.KEY.ACTION],[sse.KEY.ACTION,sse.VALUE.ACTION.OPEN_ACTIVATION_FORM]])}},{key:"componentWillUnmount",value:function(){this.savedAct===sse.VALUE.ACTION.OPEN_ACTIVATION_FORM&&(this.savedAct=void 0),x.c.changeURLWithoutSideEffect([[sse.KEY.ACTION,this.savedAct]]),(0,this.props.displayActivationModal)(!1)}}]),r}(v.a.Component),cse=Object(q.b)((function(e){return tw()(e),{}}),(function(e){return{displayActivationModal:function(t){return e(Q.a.displayActivationModal(t))}}}))(lse),use=r(574),dse=r.n(use);var hse=function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){var e;s()(this,r);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=n.call.apply(n,[this].concat(i)),G()(V()(e),"wrapperRef",v.a.createRef()),G()(V()(e),"inputRef",v.a.createRef()),G()(V()(e),"submittedSearchTerm",""),G()(V()(e),"state",{searchTerm:"",showSearchResults:!1}),G()(V()(e),"componentDidMount",(function(){Object(Y.invoke)(e.inputRef,"current.focus")})),G()(V()(e),"componentWillUnmount",(function(){document.removeEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"handleFocus",(function(){e.setState({showSearchResults:!0}),document.addEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"handleBlur",(function(){var t=e.state.searchTerm;e.submittedSearchTerm&&e.submittedSearchTerm!==t&&e.setState({searchTerm:e.submittedSearchTerm})})),G()(V()(e),"handleSearchTermChange",(function(t){var n=t.target.value;e.setState({searchTerm:n})})),G()(V()(e),"handleClear",(function(){var t=e.props,n=t.onSearch,r=t.isSearchDisabled;e.setState({searchTerm:""}),e.submittedSearchTerm="",n&&!r&&n(""),document.removeEventListener("mousedown",e.handleClickOutside)})),G()(V()(e),"handleKeyDown",(function(t){if(t.nativeEvent.stopImmediatePropagation(),13===t.keyCode){var n=e.props,r=n.onSearch,i=n.currentResultIndex,a=n.searchResults,o=t.target.value;if(e.submittedSearchTerm===o&&i>=a.length-1)return void r(o,0);e.submittedSearchTerm=o,r(o,i+1)}})),G()(V()(e),"handleStepChange",(function(t){var n=e.props.onSearch;n&&n(e.submittedSearchTerm,t-1)})),G()(V()(e),"handleClickOutside",(function(t){e.wrapperRef&&!e.wrapperRef.current.contains(t.target)&&(e.setState({showSearchResults:!1}),document.removeEventListener("mousedown",e.handleClickOutside))})),e}return c()(r,[{key:"componentDidUpdate",value:function(e){var t=e.videoId;this.props.videoId!==t&&this.handleClear()}},{key:"render",value:function(){var e=this.props,n=(e.border,e.className),r=e.searchResults,i=void 0===r?[]:r,a=e.currentResultIndex,o=e.isSearchDisabled,s=this.state.searchTerm,l=a+1,c=i.length,u=l<=c?l:0;return v.a.createElement("div",{ref:this.wrapperRef,className:P()(dse.a.searchBoxWrapper,"u-font-din-condensed",n)},v.a.createElement(mE,{className:dse.a.searchBox,searchTerm:s,inputRef:this.inputRef,placeholder:t("searchChapter"),onChange:this.handleSearchTermChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onClear:this.handleClear,onKeyDown:this.handleKeyDown,isSearchDisabled:o},this.submittedSearchTerm&&v.a.createElement(RE,{className:"text-white",value:u,onChange:this.handleStepChange,min:1,max:c},v.a.createElement("span",{className:"text-white mr-1 u-fs-7o8"},u>0?"".concat(u,"/"):"",c))))}}]),r}(v.a.PureComponent);var fse=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{currentResultIndex:0,searchTerm:"",searchResults:[],searchList:[]}),G()(V()(e),"componentDidMount",(function(){e.buildSearchList()})),G()(V()(e),"componentDidUpdate",(function(t){var n=t.videoId,r=e.props.videoId;r&&r!==n&&e.buildSearchList()})),G()(V()(e),"buildSearchList",(function(){var t=e.props.chapters,n=void 0===t?[]:t,r=new Qb.a;n.map((function(e,t){var n=e.content;r.addText(t,x.c.normalizeText(n.replace("\n"," ")))})),e.setState({searchList:r})})),G()(V()(e),"handleSearch",(function(t,n){var r=e.props.videoId,i=e.state,a=i.currentResultIndex,o=i.searchTerm,s=i.searchResults,l=x.c.normalizeText(t);if(0!==l.trim().length&&r)if(o===l){if(0===s.length)return;n!==a&&e.setState({currentResultIndex:n},e.handleSearchAfter)}else e.handleSearchResults(l);else e.handleSearchClear()})),G()(V()(e),"handleSearchResults",(function(t){var n=e.state.searchList,r=n.accurateSearch(t);Object(Y.isEmpty)(r)&&(r=n.fuzzySearch(t)),r.sort((function(e,t){return e-t})),e.setState({currentResultIndex:0,searchTerm:t,searchResults:r},e.handleSearchAfter)})),G()(V()(e),"handleSearchAfter",(function(){var t=e.props.onSearchAfter,n=e.state,r=n.searchTerm,i=n.currentResultIndex,a=n.searchResults;if(t&&t(r,a.length),a.length){var o=a[i];e.props.displaySlide(Number(o))}})),G()(V()(e),"handleSearchClear",(function(){e.setState({currentResultIndex:0,searchTerm:"",searchResults:[]}),e.props.onSearchAfter&&e.props.onSearchAfter("",0)})),G()(V()(e),"handleBlur",(function(t){x.c.focusInCurrentTarget(t)||e.handleSearchClear()})),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.videoId,n=e.chapters,r=void 0===n?[]:n,i=e.className,a=this.state,o=a.currentResultIndex,s=a.searchResults;return v.a.createElement(hse,{videoId:t,className:i,currentResultIndex:o,searchResults:s,isSearchDisabled:!r.length,onSearch:this.handleSearch})}}]),n}(g.Component),pse=Object(q.b)((function(e){e.cogvid;return{}}),(function(e){return{displaySlide:function(t){return e(Q.d.displaySlide(t))}}}))(fse),mse=r(342),gse=r.n(mse);var vse=Object(Y.cloneDeep)(Rl()(x.g.LEARNING_SUBJECTS));vse[0].name="All";var bse=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"handleFilterChange",(function(t){e.props.setLearningSubject(t)})),G()(V()(e),"handleFilterToggle",(function(e,t){!e&&Object(Y.invoke)(t,"currentTarget.blur")})),e}return c()(n,[{key:"render",value:function(){var e=this.props.learningSubject;return v.a.createElement("div",{className:gse.a.videoFilter},v.a.createElement(wu,{drop:"up",className:P()(gse.a.dropdownWrapper),classNameInput:P()(gse.a.dropdown,"no-arrow"),value:e,options:vse,onChange:this.handleFilterChange,onToggle:this.handleFilterToggle}),v.a.createElement("div",{className:P()(gse.a.arrow)}))}}]),n}(g.Component),yse=Object(q.b)((function(e){return{learningSubject:e.cogvid.learningSubject}}),(function(e){return{setLearningSubject:function(t){return e(Q.e.setLearningSubject(t))}}}))(bse);function Ase(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ase(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ase(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wse=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isLoading:!1}),G()(V()(e),"handleKeyDown",(function(t){if(x.c.preventKeyDownSideEffect(t),13===t.keyCode)return e.handleSaveHighlightEditInfo()})),G()(V()(e),"handleOnChangeLabel",(function(t){var n=e.props,r=n.highlightEditInfo,i=n.setEditHighLightBookmark,a="string"==typeof t;!a&&t.preventDefault(),i(_se(_se({},r),{},{label:a?t:t.target.value}))})),G()(V()(e),"handleResetHighlightEditInfo",(function(){e.setState({isLoading:!1},(function(){x.r.updateHighlightPlayMode(),e.props.setEditHighLightBookmark({editMode:"",id:"",color:"",label:"",endTime:null,startTime:null})}))})),G()(V()(e),"handleSaveHighlightEditInfo",(function(){var t=e.props,n=t.highlightEditInfo,r=t.postHighLightBookmark,i=t.cogvidDetails;e.setState({isLoading:!0},(function(){return r(_se(_se({},n),{},{label:n.label.trim(),videoId:i.videoId}),(function(){e.handleResetHighlightEditInfo()}))}))})),e}return n}(function(e){d()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return s()(this,r),n.apply(this,arguments)}return c()(r,[{key:"render",value:function(){var e=this.props,n=e.highlightEditInfo,r=e.cogvidDetails.highlightsBookmark,i=void 0===r?[]:r,a=this.state.isLoading,o=Object(Y.uniqBy)(i,"label");return v.a.createElement(Fl.a,{show:!!n.endTime,onHide:this.handleResetHighlightEditInfo,backdrop:"static"},v.a.createElement(Fl.a.Header,{closeButton:!0},v.a.createElement(Fl.a.Title,null,t("modal.highlightHighlightLabel"))),v.a.createElement(Fl.a.Body,null,v.a.createElement(Au,{items:o,value:n.label,inputProps:{onKeyDown:this.handleKeyDown},onChange:this.handleOnChangeLabel,onSelect:this.handleOnChangeLabel,autoFocus:!0,shouldItemRender:function(e,t){return!!e.label&&e.label.toLowerCase().indexOf(t.toLowerCase())>-1}})),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{disabled:a,variant:"outline-secondary",onClick:this.handleResetHighlightEditInfo,className:"modal-button"},t("btn.cancel")),v.a.createElement(et.a,{disabled:a,variant:"outline-primary",onClick:this.handleSaveHighlightEditInfo,className:"modal-button"},a?t("btn.saving"):t("btn.save"))))}}]),r}(g.PureComponent)),Ese=Object(q.b)((function(e){return{highlightEditInfo:e.cogvid.highlightEditInfo,cogvidDetails:e.cogvid.cogvidDetails}}),(function(e){return{postHighLightBookmark:function(t,n){return e(Q.e.postHighLightBookmark(t,n))},updateHighLightBookmark:function(t,n){return e(Q.e.updateHighLightBookmark(t,n))},setEditHighLightBookmark:function(t){return e(Q.e.setEditHighLightBookmark(t))}}}))(wse),Sse=r(298),Cse=r.n(Sse),Tse=function(e){var t=Object(g.useState)(!1),n=pi()(t,2),r=n[0],i=n[1],a=e.chapter,o=e.chapterId1,s=e.chapterId2,l=e.chapters,c=e.canSubmit,u=e.isSubmitting,d=e.onChapterChanged,h=e.onSubmit,f=e.onClose,p=function(e){f&&f(e)},m=l.filter((function(e){return e.uid!==o})).map((function(e){return{name:e.content,value:e.uid}}));return console.log(m),v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a,{show:!0,className:"copyChaptersModal",scrollable:!1,centered:!0,backdrop:"static",onEscapeKeyDown:p},v.a.createElement(v.a.Fragment,null,v.a.createElement(Fl.a.Header,null,v.a.createElement("div",{className:"modal-title h4 ml-3 text-truncate "},"Swapping slides"),v.a.createElement("div",{className:"close-modal-btn",onClick:p,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete "}))),v.a.createElement(Fl.a.Body,{className:Cse.a.modalBody},v.a.createElement("div",{className:"mb-1 mt-2"},"Swap the information between slide:"),v.a.createElement("div",{className:"mb-1 pl-2 u-fw-bold"},a.content),v.a.createElement("div",{className:"mb-1"},"and slide:"),v.a.createElement("div",{className:P()(Cse.a.dropdownWrapper,"ml-2")},v.a.createElement(wu,{classNameInput:"u-fw-bold",classNamePopup:Cse.a.dropdownPopup,placeholder:"Select a slide",value:s,options:m,onChange:function(e){d&&d(e)}})),v.a.createElement("div",null," ")),v.a.createElement(Fl.a.Footer,null,v.a.createElement("div",{className:"d-flex w-100 align-items-center"},v.a.createElement("div",{className:"flex-fill"}),v.a.createElement(et.a,{variant:"outline-primary",className:P()(Cse.a.footerBtn,"modal-button"),onClick:p},Object(_t.t)("btn.cancel")),v.a.createElement(et.a,{disabled:u,type:"submit",variant:"primary",className:P()("text-white modal-button ml-3",Cse.a.footerBtn,!c&&"u-pointer-event-none u-opacity-50"),onClick:h},u?v.a.createElement(Ln,{className:"text-white"}):Object(_t.t)("btn.proceed")))))),v.a.createElement(IC,{show:r,title:Object(_t.t)("modal.confirmCancelModalTitle"),message:Object(_t.t)("modal.confirmCancelModalMessage"),onConfirm:f,onClose:function(){return i(!1)}}))};var kse=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),G()(V()(e),"state",{isSubmitting:!1,videoId:void 0,chapterId1:void 0,chapterId2:void 0}),G()(V()(e),"componentDidMount",(function(){var t=e.props,n=t.videoId,r=t.chapter;e.setState({videoId:n,chapterId1:null==r?void 0:r.uid})})),G()(V()(e),"handleChapterChange",(function(t){e.setState({chapterId2:t})})),G()(V()(e),"handleFormClose",(function(){e.props.displaySwapChaptersModal(null)})),G()(V()(e),"checkCanSubmit",(function(){var t=e.state,n=t.videoId,r=t.chapterId1,i=t.chapterId2;return n&&r&&i})),G()(V()(e),"handleFormSubmit",(function(){var t=e.state,n=t.videoId,r=t.chapterId1,i=t.chapterId2;e.props.swapChapters({videoId:n,chapterId1:r,chapterId2:i},(function(){e.handleFormClose()}),(function(){}))})),G()(V()(e),"render",(function(){var t=e.state,n=t.isSubmitting,r=t.chapterId1,i=t.chapterId2,a=e.props,o=a.videoId,s=a.chapter,l=a.chapters;return v.a.createElement(Tse,{videoId:o,chapterId1:r,chapterId2:i,chapter:s,chapters:l,canSubmit:e.checkCanSubmit(),isSubmitting:n,onChapterChanged:e.handleChapterChange,onSubmit:e.handleFormSubmit,onClose:e.handleFormClose})})),e}return n}(v.a.Component),xse=Object(q.b)((function(e){e.cogvid;return{}}),(function(e){return{displaySwapChaptersModal:function(t){return e(Q.e.displaySwapChaptersModal(t))},swapChapters:function(t,n,r){return e(Q.e.swapChapters(t,n,r))}}}))(kse),Ose=r(160),Ise=r.n(Ose);function Mse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mse(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mse(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dse=[{name:"Plan0",text:"Free",value:"0"},{name:"Plan1",text:"Plan 1",value:"1"},{name:"Plan2",text:"Plan 2",value:"2"},{name:"Plan3",text:"Plan 3",value:"3"}],Nse=function(e){return Pse(Pse({},e),{},{colors:Pse(Pse({},e.colors),{},{primary:"#86c9cf"})})},Lse=function(e){var n=e.isSubmitting,r=e.editFile,i=e.displayName,a=e.file,o=e.minPlan,s=e.canSubmit,l=e.type,c=e.onDisplayNameChange,u=e.onTypeChange,d=e.onFileSelect,h=e.onMinPlanChange,f=e.onClose,p=e.onSubmit,m=(null==r?void 0:r.fileUrl)?null==r?void 0:r.fileUrl.split("/").pop().split("?")[0]:void 0;return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",onEscapeKeyDown:f,className:P()("createDocumentModal",Ise.a.chapterFileUploadModal)},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,{className:"ml-2"},r?"Edit file":"Upload files"),v.a.createElement("div",{className:"close-modal-btn",onClick:f,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,{className:P()(Ise.a.modalBody,"u-fs-15o16")},v.a.createElement("div",{className:"u-fw-500 mb-1"},"Resource type:"),v.a.createElement(tv,{isDisabled:!!r,value:l,onChange:u,options:Gse,theme:Nse}),v.a.createElement("div",{className:"u-fw-500 mt-2 mb-1"},"Display name:"),v.a.createElement(mu,{name:"displayName",value:i,onChange:c}),v.a.createElement("div",{className:P()("u-fw-500 mt-2 mb-1",null==o&&"text-danger")},"Minimum required plan:"),v.a.createElement("div",{className:"d-flex"},Dse.map((function(e){return v.a.createElement($l.a.Check,{className:"ml-4",type:"radio",id:e.name,name:"plan",value:e.value,label:e.text,onChange:h,checked:o===e.value})}))),v.a.createElement("div",{className:"u-fw-500 mt-2 mb-1"},"Resource file:"),v.a.createElement(QT,{isDisabled:n,multiple:!1,acceptedFiles:".pdf,.png,.jpg,.jpeg,.ppt,.pptx",receiveAcceptedFiles:d,wrapperClassName:"",innerWrapperClassName:P()(Ise.a.uploadBtn,"fv-input form-control d-flex align-items-center")},v.a.createElement("i",{className:"fv fuvi-upload-file mr-2 u-fs-1x1o2"}),v.a.createElement("div",{className:P()("text-truncate flex-grow-1",!a&&"u-opacity-80 u-fs-15o16 font-italic",a&&"text-primary")},(null==a?void 0:a.name)||"Select file")),m&&v.a.createElement("div",{className:P()("mt-1 u-text-green font-italic",(null==a?void 0:a.name)&&"u-text-line-through")},m)),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:f},t("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:P()("modal-button ml-4"),onClick:p,disabled:!s||n},n?v.a.createElement(xn.a,{animation:"border",variant:"light",size:"sm"}):t("btn.submit"))))},Rse=function(e){return null==e||null==e||""===e},Bse=function(e){return!Rse(e)},jse=Object(q.b)((function(e){var t,n,r,i,a,o=e.cg,s=e.cogvid;return{show:!!(null===(t=o.showChapterFileUploadModal)||void 0===t?void 0:t.videoId),videoId:null===(n=o.showChapterFileUploadModal)||void 0===n?void 0:n.videoId,callback:null===(r=o.showChapterFileUploadModal)||void 0===r?void 0:r.callback,editFile:null===(i=o.showChapterFileUploadModal)||void 0===i?void 0:i.editFile,rootContext:null===(a=s.selectedVideo.data)||void 0===a?void 0:a.rootContext}}),(function(e){return{uploadCourseFile:function(t,n,r){return e(Q.e.uploadCourseFile(t,n,r))},updateCourseFile:function(t,n,r){return e(Q.e.updateCourseFile(t,n,r))},displayChapterFileUploadModal:function(t){return e(Q.d.displayChapterFileUploadModal(t))}}}))((function(e){var n=e.show,r=e.videoId,i=e.chapterId,a=e.editFile,o=e.callback,s=e.uploadCourseFile,l=e.updateCourseFile,c=e.displayChapterFileUploadModal,u=Rse(null==a?void 0:a.minPlan)?"":(null==a?void 0:a.minPlan)+"",d=Object(g.useState)(!1),h=pi()(d,2),f=h[0],p=h[1],m=Object(g.useState)(!1),b=pi()(m,2),y=b[0],A=b[1],_=Object(g.useState)(null==a?void 0:a.fileName),w=pi()(_,2),E=w[0],S=w[1],C=Object(g.useState)(null),T=pi()(C,2),k=T[0],O=T[1],I=Object(g.useState)(u),M=pi()(I,2),P=M[0],D=M[1],N=Object(g.useState)(a?Object(Y.find)(Gse,{value:a.type}):Gse[0]),L=pi()(N,2),R=L[0],B=L[1],j=Object(g.useState)(!1),F=pi()(j,2),U=F[0],H=F[1],z=Bse(P)&&P!=u,V=Bse(E)&&E!==(null==a?void 0:a.fileName),W=a?Bse(k)||V||z:Bse(P)&&Bse(R)&&Bse(k)&&Bse(E),G=Object(g.useCallback)((function(e){S(e.target.value),A(!0)}),[]),q=Object(g.useCallback)((function(e){O(null),S(null),D(""),A(!1)}),[]),K=Object(g.useCallback)((function(e){var t=x.c.handleFileSelect(e||[]);t&&(O(t),A(!0),E||S(t.name))}),[]),X=Object(g.useCallback)((function(e){B(e),A(!0)}),[]),Q=Object(g.useCallback)((function(e){D(e.target.value),A(!0)}),[]),$=Object(g.useCallback)((function(){y?H(!0):c(null)}),[y]),J=Object(g.useCallback)((function(){W&&(p(!0),(a?l:s)({videoId:r,fileId:null==a?void 0:a.id,displayName:E,minPlan:P,file:k,type:R.value},(function(e){setTimeout((function(){p(!1),a?c(null):q(),o&&o(e)}),500)}),(function(e){setTimeout((function(){p(!1)}),500)})))}),[W,r,i,k,a,R,E,P]);return n?v.a.createElement(v.a.Fragment,null,v.a.createElement(Lse,{isSubmitting:f,canSubmit:W,displayName:E,file:k,editFile:a,type:R,minPlan:P,onDisplayNameChange:G,onFileSelect:K,onTypeChange:X,onMinPlanChange:Q,onClose:$,onSubmit:J}),v.a.createElement(IC,{show:U,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:function(){return c(null)},onClose:function(){return H(!1)}})):null})),Fse=function(e){var n=e.isSubmitting,r=e.canSubmit,i=e.type,a=e.mainFile,o=e.previewFile,s=e.deleteMain,l=e.deletePreview,c=e.onTypeChange,u=e.onDeleteMainChange,d=e.onDeletePreviewChange,h=e.onClose,f=e.onSubmit;return v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",onEscapeKeyDown:h,className:P()("createDocumentModal",Ise.a.chapterFileDeleteModal)},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,{className:"ml-2"},"Delete resources"),v.a.createElement("div",{className:"close-modal-btn",onClick:h,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,{className:P()(Ise.a.modalBody,"u-fs-15o16")},v.a.createElement("div",{className:"u-fw-500 mb-1"},"Resource type:"),v.a.createElement(tv,{value:i,onChange:c,options:Gse}),v.a.createElement(_u,{id:"checkboxDeleteMain",labelName:"Resource file",className:"mt-3 u-fw-500",disabled:!a,checked:s&&!!a,onChange:u}),v.a.createElement("div",{className:P()("mt-2 u-fw-500 u-text-green",s&&"u-text-line-through")},a),v.a.createElement(_u,{id:"checkboxDeletePreview",labelName:"Preview file",className:"mt-3 u-fw-500",disabled:!o,checked:l&&!!o,onChange:d}),v.a.createElement("div",{className:P()("mt-2 u-fw-500 u-text-green",l&&"u-text-line-through")},o)),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:h},t("btn.cancel")),v.a.createElement(et.a,{variant:"primary",className:P()("modal-button ml-4"),onClick:f,disabled:!r||n},t("btn.delete"))))},Use=Object(q.b)((function(e){var t,n,r,i,a=e.cg;e.cogvid;return{show:!!(null===(t=a.showChapterFileDeleteModal)||void 0===t?void 0:t.videoId),videoId:null===(n=a.showChapterFileDeleteModal)||void 0===n?void 0:n.videoId,chapterId:null===(r=a.showChapterFileDeleteModal)||void 0===r?void 0:r.chapterId,data:null===(i=a.showChapterFileDeleteModal)||void 0===i?void 0:i.data}}),(function(e){return{deleteChapterFile:function(t,n,r){return e(Q.e.deleteChapterFile(t,n,r))},displayChapterFileDeleteModal:function(t){return e(Q.d.displayChapterFileDeleteModal(t))}}}))((function(e){var n=e.show,r=e.videoId,i=e.chapterId,a=e.data,o=e.deleteChapterFile,s=e.displayChapterFileDeleteModal,l=Object(g.useState)(!1),c=pi()(l,2),u=c[0],d=c[1],h=Object(g.useState)(!1),f=pi()(h,2),p=f[0],m=f[1],b=Object(g.useState)(Gse[0]),y=pi()(b,2),A=y[0],_=y[1],w=Object(g.useState)(!0),E=pi()(w,2),S=E[0],C=E[1],T=Object(g.useState)(!0),k=pi()(T,2),x=k[0],O=k[1],I=Object(g.useState)(!1),M=pi()(I,2),P=M[0],D=M[1],N=Object(g.useCallback)((function(){return"SLIDES"===A.value?{mainFile:a.slides}:"WORKSHEETS"===A.value?{mainFile:a.worksheets,previewFile:a.worksheetsPrev}:"HWGUIDES"===A.value?{mainFile:a.hwGuides,previewFile:a.hwGuidesPrev}:"SOLUTIONS"===A.value?{mainFile:a.solutions,previewFile:a.solutionsPrev}:{}}),[A,a])(),L=N.mainFile,R=N.previewFile,B=A&&(S&&L||x&&R),j=Object(g.useCallback)((function(e){_(e),m(!0)}),[]),F=Object(g.useCallback)((function(){C(!S),m(!0)}),[S]),U=Object(g.useCallback)((function(){O(!x),m(!0)}),[x]),H=Object(g.useCallback)((function(){p?D(!0):s(null)}),[p]),z=Object(g.useCallback)((function(){if(B){var e=[];S&&e.push("MAIN"),x&&e.push("PREVIEW"),d(!0),o({videoId:r,chapterId:i,attribute:A.value,targetFiles:e},(function(e){setTimeout((function(){d(!1),s(null)}),500)}),(function(e){setTimeout((function(){d(!1)}),500)}))}}),[B,r,i,S,x,A]);return n?v.a.createElement(v.a.Fragment,null,v.a.createElement(Fse,{isSubmitting:u,canSubmit:B,type:A,mainFile:L,previewFile:R,deleteMain:S,deletePreview:x,onTypeChange:j,onDeleteMainChange:F,onDeletePreviewChange:U,onClose:H,onSubmit:z}),v.a.createElement(IC,{show:P,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:function(){return s(null)},onClose:function(){return D(!1)}})):null}));function Hse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var zse=function(e){var n,r=e.file,i=e.isDisabled,a=e.onEdit,o=e.onUpdate,s=e.onDelete,l=e.onTop,c=Gse.find((function(e){return e.value===r.type}));return v.a.createElement("div",{className:P()(Ise.a.file,"w-100 d-flex align-items-center")},v.a.createElement("div",{className:"flex-grow-1 u-text-truncate-2"},r.fileName),v.a.createElement("div",{className:"u-w-8 mx-2 flex-shrink-0 u-fs-7o8"},(n=null==r?void 0:r.minPlan)&&0!=n?v.a.createElement("span",null,"Min plan#: ",v.a.createElement("b",null,n)):v.a.createElement("span",null,"Min plan#: ",v.a.createElement("b",null,"none"))),v.a.createElement("div",{className:"u-w-8 mx-2 flex-shrink-0 u-fs-7o8"},(null==c?void 0:c.label)||r.type),v.a.createElement("div",{className:P()(Ise.a.action,"u-flex-center")},v.a.createElement(Qt,{className:P()(!l&&"invisible u-opacity-0"),title:t("tooltip.toTop"),onClick:function(){return l(r)}},v.a.createElement("img",{width:18,height:18,className:"u-opacity-75",src:I.a.toTopIcon,alt:"to top icon"})),a&&v.a.createElement(Qt,{isDisabled:i,tooltipText:"Update",onClick:function(){return a(r)}},v.a.createElement("i",{className:"fv fuvi-pen-draw u-fs-7o8"})),o&&v.a.createElement(QT,{isDisabled:i,multiple:!1,acceptedFiles:r.isPreview?".pdf,.png,.jpg,.jpeg":".pdf,.png,.jpg,.jpeg,.ppt,.pptx",receiveAcceptedFiles:function(e){return o(r,e)},wrapperClassName:"",innerWrapperClassName:"u-flex-center"},v.a.createElement(Qt,{isDisabled:i,tooltipText:"Update",onClick:function(){}},v.a.createElement("i",{className:"fv fuvi-pen-draw u-fs-7o8"}))),v.a.createElement(Qt,{isDisabled:i,tooltipText:"Delete",onClick:function(){return s(r)}},v.a.createElement("i",{className:"fv fuvi-delete u-fs-7o8"}))))},Vse=function(e){var n=e.isDirty,r=e.isLoading,i=e.isSubmitting,a=e.files,o=void 0===a?[]:a,s=e.onClose,l=e.onItemSwapping,c=e.onItemToTop,u=e.onFilesArrange,d=e.onFilesRevert,h=e.onEdit,f=e.onUpload,p=(e.onUpdate,e.onDelete),m=Object(g.useState)([]),b=pi()(m,2),y=b[0],A=b[1];return Object(g.useEffect)((function(){var e=[];o.forEach((function(t){t.fileName&&e.push(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hse(Object(n),!0).forEach((function(t){G()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hse(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t))})),A(e)}),[o]),v.a.createElement(Fl.a,{show:!0,centered:!0,backdrop:"static",onEscapeKeyDown:s,className:P()("createDocumentModal",Ise.a.chapterFileManagerModal)},v.a.createElement(Fl.a.Header,null,v.a.createElement(Fl.a.Title,{className:"ml-2"},"File manager"),v.a.createElement("div",{className:"close-modal-btn",onClick:s,role:"button"},v.a.createElement("i",{className:"fv fuvi-delete"}))),v.a.createElement(Fl.a.Body,{className:P()(Ise.a.modalBody,"u-fs-15o16")},r&&v.a.createElement(Nn,null),v.a.createElement("div",{className:"w-100 d-flex justify-content-end align-items-center"},n&&v.a.createElement(Qt,{className:"mr-3",tooltipText:"Revert files order",onClick:d},v.a.createElement("i",{className:"fv fuvi-refresh u-fs-1x1o3"})),v.a.createElement(et.a,{variant:"primary",className:"u-flex-center u-fs-7o8 u-border-radius-1o4",onClick:f},v.a.createElement("i",{className:"fv fuvi-add-file-icon u-fs-1x1o3 mr-1"}),"Upload file")),v.a.createElement("div",{className:"mt-3"},!r&&!y.length&&v.a.createElement("div",{className:"u-opacity-75 font-italic"},"No files found."),v.a.createElement(fx,null,o.map((function(e,t){return v.a.createElement(Bk,{key:e.id,id:e.id,index:t,originalIndex:t,dndType:x.g.DND_TYPE.FILE_ITEM,moveCard:l},v.a.createElement(zse,{file:e,isDisabled:i,onEdit:h,onDelete:p,onTop:t>0?c:void 0}))}))))),v.a.createElement(Fl.a.Footer,null,v.a.createElement(et.a,{variant:"outline-primary",className:"modal-button",onClick:s},t("btn.close")),v.a.createElement(et.a,{disabled:!n||i,variant:"primary",className:"modal-button ml-3",onClick:u},t("btn.save"))))},Wse=Object(q.b)((function(e){var t,n,r,i,a,o=e.cg;e.cogvid;return{show:!!(null===(t=o.showChapterFileManagerModal)||void 0===t?void 0:t.videoId),videoId:null===(n=o.showChapterFileManagerModal)||void 0===n?void 0:n.videoId,chapterId:null===(r=o.showChapterFileManagerModal)||void 0===r?void 0:r.chapterId,files:null===(i=o.showChapterFileManagerModal)||void 0===i?void 0:i.files,chapters:null===(a=o.showChapterFileManagerModal)||void 0===a?void 0:a.chapters}}),(function(e){return{getCourseFiles:function(t,n,r){return e(Q.e.getCourseFiles(t,n,r))},updateCourseFile:function(t,n,r){return e(Q.e.updateCourseFile(t,n,r))},deleteCourseFile:function(t,n,r){return e(Q.e.deleteCourseFile(t,n,r))},arrangeCourseFiles:function(t,n,r){return e(Q.e.arrangeCourseFiles(t,n,r))},displayChapterFileManagerModal:function(t){return e(Q.d.displayChapterFileManagerModal(t))},displayChapterFileUploadModal:function(t){return e(Q.d.displayChapterFileUploadModal(t))}}}))((function(e){var n=e.show,r=e.videoId,i=e.getCourseFiles,a=e.updateCourseFile,o=e.deleteCourseFile,s=e.arrangeCourseFiles,l=e.displayChapterFileManagerModal,c=e.displayChapterFileUploadModal,u=Object(g.useState)(!1),d=pi()(u,2),h=d[0],f=d[1],p=Object(g.useState)(!1),m=pi()(p,2),b=m[0],y=m[1],A=Object(g.useState)(!1),_=pi()(A,2),w=_[0],E=_[1],S=Object(g.useState)([]),C=pi()(S,2),T=C[0],k=C[1],O=Object(g.useState)(null),I=pi()(O,2),M=I[0],P=I[1],D=Object(g.useState)(!1),N=pi()(D,2),L=N[0],R=N[1],B=Object(g.useRef)(null);Object(g.useEffect)((function(){r&&(f(!0),i({videoId:r},(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];k(e),B.current=e,f(!1)}),(function(){f(!1)})))}),[r]);var j=Object(g.useCallback)((function(){w?R(!0):l(null)}),[w]),F=Object(g.useCallback)((function(){c({videoId:r,callback:function(e){E(!1),k(e),B.current=e,window.refreshCourseFiles=!0}})}),[r,T]),U=Object(g.useCallback)((function(e){(null==e?void 0:e.id)&&c({videoId:r,editFile:e,callback:function(e){k(e),B.current=e,window.refreshCourseFiles=!0}})}),[r]),H=Object(g.useCallback)((function(e,t){var n,i=x.c.handleFileSelect(t||[]);i&&(y(!0),a((n={videoId:r,fileId:e.id},G()(n,e.isPreview?"previewFile":"file",i),G()(n,"type",e.type),n),(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];y(!1),E(!1),k(e),B.current=e,window.refreshCourseFiles=!0}),(function(e){setTimeout((function(){y(!1)}),500)})))}),[r]),z=Object(g.useCallback)((function(e){e&&(y(!0),o({videoId:r,fileId:e.id,target:e.isPreview?1:0},(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];y(!1),E(!1),k(e),B.current=e,P(null),window.refreshCourseFiles=!0}),(function(e){setTimeout((function(){y(!1)}),500)})))}),[r]),V=Object(g.useCallback)((function(e){e&&(y(!0),s({videoId:r,idList:T.map((function(e){return e.id}))},(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];y(!1),E(!1),k(e),B.current=e,window.refreshCourseFiles=!0}),(function(e){setTimeout((function(){y(!1)}),500)})))}),[r,T]),W=Object(g.useCallback)((function(e,t){var n=T[e],r=Kl()(T,{$splice:[[e,1],[t,0,n]]});E(!0),k(r)}),[T]),q=Object(g.useCallback)((function(e){var t=Object(Y.findIndex)(T,{id:e.id});-1!==t&&W(t,0)}),[T]),K=Object(g.useCallback)((function(){k(B.current),E(!1)}),[]);return n?v.a.createElement(v.a.Fragment,null,v.a.createElement(Vse,{isDirty:w,isLoading:h,isSubmitting:b,files:T,onEdit:U,onUpload:F,onUpdate:H,onItemSwapping:W,onItemToTop:q,onFilesArrange:V,onFilesRevert:K,onDelete:P,onClose:j}),v.a.createElement(IC,{show:!!M,title:t("modal.confirmDeleteFileTitle"),isProgressing:b,onConfirm:function(){return z(M)},onClose:function(){return P(null)}}),v.a.createElement(IC,{show:L,title:t("modal.confirmCancelModalTitle"),message:t("modal.confirmCancelModalMessage"),onConfirm:function(){return l(null)},onClose:function(){return R(!1)}})):null})),Gse=[{label:"Slides",value:"SLIDES"},{label:"Worksheets",value:"WORKSHEETS"},{label:"HW Guides",value:"HWGUIDES"},{label:"HW Solutions",value:"SOLUTIONS"}]},function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));var r=n(0),i=n.n(r),a=n(152),o=n(1),s=n(162);n.d(t,"a",(function(){return s.a}));var l=o.g.VIDEO_MENU_BASE_URL,c=o.g.PAGE_AUTH_TYPE,u=[{path:"/forgot-password",component:a.a,type:c.UNAUTHENTICATED},{path:o.g.MOBILE_COMING_SOON_PAGE_PATH,component:a.e},{path:"/fuvi-icons",component:a.b},{path:l.COMPOSING,component:a.c,type:c.AUTHENTICATED},{path:l.BRAINHIVE,component:a.c},{path:l.EXPLORING,component:a.c},{path:o.g.VIDEO_MENU_BASE_URL.REVIEW,component:a.c,type:c.AUTHENTICATED},{path:o.g.PEOPLE_PAGE_PATH,component:a.f,type:c.AUTHENTICATED},{path:o.g.MEETING_PAGE_PATH,component:a.h,type:c.AUTHENTICATED},{path:o.g.TEMP_PATH,component:function(){return i.a.createElement("div",null)}}]},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(30);function i(e){Object(r.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return L})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return B})),n.d(t,"d",(function(){return _})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return F})),n.d(t,"g",(function(){return q})),n.d(t,"h",(function(){return U})),n.d(t,"i",(function(){return X})),n.d(t,"j",(function(){return te})),n.d(t,"k",(function(){return ne})),n.d(t,"l",(function(){return ee})),n.d(t,"m",(function(){return re})),n.d(t,"n",(function(){return N})),n.d(t,"o",(function(){return M})),n.d(t,"p",(function(){return R})),n.d(t,"q",(function(){return z})),n.d(t,"r",(function(){return D})),n.d(t,"s",(function(){return ae})),n.d(t,"t",(function(){return J})),n.d(t,"u",(function(){return Q})),n.d(t,"v",(function(){return $})),n.d(t,"w",(function(){return j})),n.d(t,"x",(function(){return ie})),n.d(t,"y",(function(){return H})),n.d(t,"z",(function(){return u})),n.d(t,"A",(function(){return V})),n.d(t,"B",(function(){return P})),n.d(t,"C",(function(){return W})),n.d(t,"D",(function(){return G})),n.d(t,"E",(function(){return Y})),n.d(t,"F",(function(){return y})),n.d(t,"G",(function(){return T})),n.d(t,"H",(function(){return s})),n.d(t,"I",(function(){return C})),n.d(t,"J",(function(){return A})),n.d(t,"K",(function(){return I})),n.d(t,"L",(function(){return p})),n.d(t,"M",(function(){return d})),n.d(t,"N",(function(){return v})),n.d(t,"O",(function(){return f})),n.d(t,"P",(function(){return S})),n.d(t,"Q",(function(){return l})),n.d(t,"R",(function(){return h})),n.d(t,"S",(function(){return k})),n.d(t,"T",(function(){return E})),n.d(t,"U",(function(){return w}));var r=n(81),i=n(55),a=n(66),o=n(382),s=function(e){return function(){return e}}(!0),l=function(){};var c=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;function u(e,t,n){if(!t(e))throw new Error(n)}var d=function(e,t){Object(i.a)(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(n){e[n]=t[n]}))},h=function(e,t){var n;return(n=[]).concat.apply(n,t.map(e))};function f(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function p(e){var t=!1;return function(){t||(t=!0,e())}}var m=function(e){throw e},g=function(e){return{value:e,done:!0}};function v(e,t,n){void 0===t&&(t=m),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:g,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function b(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var y=function(e){return new Error("\n  redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n  in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n  Error: "+e+"\n")},A=function(e){return Array.apply(null,new Array(e))},_=function(e){return function(t){return e(Object.defineProperty(t,r.f,{value:!0}))}},w=function(e){return e===r.k},E=function(e){return e===r.j},S=function(e){return w(e)||E(e)};function C(e,t){var n=Object.keys(e),r=n.length;var i,o=0,s=Object(a.a)(e)?A(r):{},c={};return n.forEach((function(e){var n=function(n,a){i||(a||S(n)?(t.cancel(),t(n,a)):(s[e]=n,++o===r&&(i=!0,t(s))))};n.cancel=l,c[e]=n})),t.cancel=function(){i||(i=!0,n.forEach((function(e){return c[e].cancel()})))},c}function T(e){return{name:e.name||"anonymous",location:k(e)}}function k(e){return e[r.g]}var x={isEmpty:s,put:l,take:l};function O(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,i=0,a=0,o=function(t){n[i]=t,i=(i+1)%e,r++},s=function(){if(0!=r){var t=n[a];return n[a]=null,r--,a=(a+1)%e,t}},l=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var c;if(r<e)o(s);else switch(t){case 1:throw new Error("Channel's Buffer overflow!");case 3:n[i]=s,a=i=(i+1)%e;break;case 4:c=2*e,n=l(),r=n.length,i=n.length,a=0,n.length=c,e=c,o(s)}},take:s,flush:l}}var I=function(){return x},M=function(e){return O(e,3)},P=function(e){return O(e,4)},D="TAKE",N="PUT",L="ALL",R="RACE",B="CALL",j="CPS",F="FORK",U="JOIN",H="CANCEL",z="SELECT",V="ACTION_CHANNEL",W="CANCELLED",G="FLUSH",q="GET_CONTEXT",Y="SET_CONTEXT",K=function(e,t){var n;return(n={})[r.c]=!0,n.combinator=!1,n.type=e,n.payload=t,n};function X(e,t){return void 0===e&&(e="*"),Object(a.i)(e)?K(D,{pattern:e}):Object(a.f)(e)&&Object(a.g)(t)&&Object(a.i)(t)?K(D,{channel:e,pattern:t}):Object(a.b)(e)?K(D,{channel:e}):void 0}function Q(e,t){return Object(a.n)(t)&&(t=e,e=void 0),K(N,{channel:e,action:t})}function $(e){var t=K(L,e);return t.combinator=!0,t}function J(e){var t=K(R,e);return t.combinator=!0,t}function Z(e,t){var n,r=null;return Object(a.d)(e)?n=e:(Object(a.a)(e)?(r=e[0],n=e[1]):(r=e.context,n=e.fn),r&&Object(a.k)(n)&&Object(a.d)(r[n])&&(n=r[n])),{context:r,fn:n,args:t}}function ee(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return K(B,Z(e,n))}function te(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return K(F,Z(e,n))}function ne(e){return void 0===e&&(e=r.h),K(H,e)}function re(e,t){return K(V,{pattern:e,buffer:t})}function ie(){return K(W,{})}var ae=ee.bind(null,o.a)},function(e,t,n){var r=n(542);e.exports=function(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){var r;
/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var o=i.apply(null,r);o&&e.push(o)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r;!function(){"use strict";var i=function e(t){var n,r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element"),i={use_static:!1};function a(e){var t=Object.getPrototypeOf(e);return t?Object.create(t):{}}function o(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:n})}function s(e,t){o(e,t,(function(){throw new m("The "+t+" method cannot be invoked on an Immutable data structure.")}))}function l(e){return"object"!=typeof e||(null===e||Boolean(Object.getOwnPropertyDescriptor(e,"__immutable_invariants_hold")))}function c(e,t){return e===t||e!=e&&t!=t}function u(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof Date)}"object"!=typeof(n=t)||Array.isArray(n)||null===n||void 0!==t.use_static&&(i.use_static=Boolean(t.use_static));var d=["setPrototypeOf"],h=d.concat(["push","pop","sort","splice","shift","unshift","reverse"]),f=["keys"].concat(["map","filter","slice","concat","reduce","reduceRight"]),p=d.concat(["setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear"]);function m(e){this.name="MyError",this.message=e,this.stack=(new Error).stack}function g(e,t){for(var n in o(e,"__immutable_invariants_hold",!0),t)t.hasOwnProperty(n)&&s(e,t[n]);return Object.freeze(e),e}function v(e,t){var n=e[t];o(e,t,(function(){return W(n.apply(e,arguments))}))}function b(e,t,n){var r=n&&n.deep;if(e in this&&(r&&this[e]!==t&&u(t)&&u(this[e])&&(t=W.merge(this[e],t,{deep:!0,mode:"replace"})),c(this[e],t)))return this;var i=C.call(this);return i[e]=W(t),_(i)}m.prototype=new Error,m.prototype.constructor=Error;var y=W([]);function A(e,t,n){var r=e[0];if(1===e.length)return b.call(this,r,t,n);var i,a=e.slice(1),o=this[r];if("object"==typeof o&&null!==o)i=W.setIn(o,a,t);else{var s=a[0];i=""!==s&&isFinite(s)?A.call(y,a,t):L.call(N,a,t)}if(r in this&&o===i)return this;var l=C.call(this);return l[r]=i,_(l)}function _(e){for(var t in f){if(f.hasOwnProperty(t))v(e,f[t])}i.use_static||(o(e,"flatMap",E),o(e,"asObject",T),o(e,"asMutable",C),o(e,"set",b),o(e,"setIn",A),o(e,"update",B),o(e,"updateIn",F),o(e,"getIn",U));for(var n=0,r=e.length;n<r;n++)e[n]=W(e[n]);return g(e,h)}function w(){return new Date(this.getTime())}function E(e){if(0===arguments.length)return this;var t,n=[],r=this.length;for(t=0;t<r;t++){var i=e(this[t],t,this);Array.isArray(i)?n.push.apply(n,i):n.push(i)}return _(n)}function S(e){if(void 0===e&&0===arguments.length)return this;if("function"!=typeof e){var t=Array.isArray(e)?e.slice():Array.prototype.slice.call(arguments);t.forEach((function(e,t,n){"number"==typeof e&&(n[t]=e.toString())})),e=function(e,n){return-1!==t.indexOf(n)}}var n=a(this);for(var r in this)this.hasOwnProperty(r)&&!1===e(this[r],r)&&(n[r]=this[r]);return V(n)}function C(e){var t,n,r=[];if(e&&e.deep)for(t=0,n=this.length;t<n;t++)r.push(k(this[t]));else for(t=0,n=this.length;t<n;t++)r.push(this[t]);return r}function T(e){"function"!=typeof e&&(e=function(e){return e});var t,n={},r=this.length;for(t=0;t<r;t++){var i=e(this[t],t,this),a=i[0],o=i[1];n[a]=o}return V(n)}function k(e){return!e||"object"!=typeof e||!Object.getOwnPropertyDescriptor(e,"__immutable_invariants_hold")||e instanceof Date?e:W.asMutable(e,{deep:!0})}function x(e,t){for(var n in e)Object.getOwnPropertyDescriptor(e,n)&&(t[n]=e[n]);return t}function O(e,t){if(0===arguments.length)return this;if(null===e||"object"!=typeof e)throw new TypeError("Immutable#merge can only be invoked with objects or arrays, not "+JSON.stringify(e));var n,r,i=Array.isArray(e),o=t&&t.deep,s=t&&t.mode||"merge",l=t&&t.merger;function d(e,r,i){var s,d=W(r[i]),h=l&&l(e[i],d,t),f=e[i];void 0===n&&void 0===h&&e.hasOwnProperty(i)&&c(d,f)||(c(f,s=void 0!==h?h:o&&u(f)&&u(d)?W.merge(f,d,t):d)&&e.hasOwnProperty(i)||(void 0===n&&(n=x(e,a(e))),n[i]=s))}function h(e,t){for(var r in e)t.hasOwnProperty(r)||(void 0===n&&(n=x(e,a(e))),delete n[r])}if(i)for(var f=0,p=e.length;f<p;f++){var m=e[f];for(r in m)m.hasOwnProperty(r)&&d(void 0!==n?n:this,m,r)}else{for(r in e)Object.getOwnPropertyDescriptor(e,r)&&d(this,e,r);"replace"===s&&h(this,e)}return void 0===n?this:V(n)}function I(e,t){var n=t&&t.deep;if(0===arguments.length)return this;if(null===e||"object"!=typeof e)throw new TypeError("Immutable#replace can only be invoked with objects or arrays, not "+JSON.stringify(e));return W.merge(this,e,{deep:n,mode:"replace"})}var M,P,D,N=W({});function L(e,t,n){if(!Array.isArray(e)||0===e.length)throw new TypeError('The first argument to Immutable#setIn must be an array containing at least one "key" string.');var r=e[0];if(1===e.length)return R.call(this,r,t,n);var i,o=e.slice(1),s=this[r];if(i=this.hasOwnProperty(r)&&"object"==typeof s&&null!==s?W.setIn(s,o,t):L.call(N,o,t),this.hasOwnProperty(r)&&s===i)return this;var l=x(this,a(this));return l[r]=i,V(l)}function R(e,t,n){var r=n&&n.deep;if(this.hasOwnProperty(e)&&(r&&this[e]!==t&&u(t)&&u(this[e])&&(t=W.merge(this[e],t,{deep:!0,mode:"replace"})),c(this[e],t)))return this;var i=x(this,a(this));return i[e]=W(t),V(i)}function B(e,t){var n=Array.prototype.slice.call(arguments,2),r=this[e];return W.set(this,e,t.apply(r,[r].concat(n)))}function j(e,t){for(var n=0,r=t.length;null!=e&&n<r;n++)e=e[t[n]];return n&&n==r?e:void 0}function F(e,t){var n=Array.prototype.slice.call(arguments,2),r=j(this,e);return W.setIn(this,e,t.apply(r,[r].concat(n)))}function U(e,t){var n=j(this,e);return void 0===n?t:n}function H(e){var t,n=a(this);if(e&&e.deep)for(t in this)this.hasOwnProperty(t)&&(n[t]=k(this[t]));else for(t in this)this.hasOwnProperty(t)&&(n[t]=this[t]);return n}function z(){return{}}function V(e){return i.use_static||(o(e,"merge",O),o(e,"replace",I),o(e,"without",S),o(e,"asMutable",H),o(e,"set",R),o(e,"setIn",L),o(e,"update",B),o(e,"updateIn",F),o(e,"getIn",U)),g(e,d)}function W(e,t,n){if(l(e)||function(e){return"object"==typeof e&&null!==e&&(60103===e.$$typeof||e.$$typeof===r)}(e)||function(e){return"undefined"!=typeof File&&e instanceof File}(e)||function(e){return"undefined"!=typeof Blob&&e instanceof Blob}(e)||function(e){return e instanceof Error}(e))return e;if(function(e){return"object"==typeof e&&"function"==typeof e.then}(e))return e.then(W);if(Array.isArray(e))return _(e.slice());if(e instanceof Date)return a=new Date(e.getTime()),i.use_static||o(a,"asMutable",w),g(a,p);var a,s=t&&t.prototype,c=(s&&s!==Object.prototype?function(){return Object.create(s)}:z)();if(null==n&&(n=64),n<=0)throw new m("Attempt to construct Immutable from a deeply nested object was detected. Have you tried to wrap an object with circular references (e.g. React element)? See https://github.com/rtfeldman/seamless-immutable/wiki/Deeply-nested-object-was-detected for details.");for(var u in n-=1,e)Object.getOwnPropertyDescriptor(e,u)&&(c[u]=W(e[u],void 0,n));return V(c)}function G(e){return function(){var t=[].slice.call(arguments),n=t.shift();return e.apply(n,t)}}function q(e,t){return function(){var n=[].slice.call(arguments),r=n.shift();return Array.isArray(r)?t.apply(r,n):e.apply(r,n)}}return W.from=W,W.isImmutable=l,W.ImmutableError=m,W.merge=G(O),W.replace=G(I),W.without=G(S),W.asMutable=(M=H,P=C,D=w,function(){var e=[].slice.call(arguments),t=e.shift();return Array.isArray(t)?P.apply(t,e):t instanceof Date?D.apply(t,e):M.apply(t,e)}),W.set=q(R,b),W.setIn=q(L,A),W.update=G(B),W.updateIn=G(F),W.getIn=G(U),W.flatMap=G(E),W.asObject=G(T),i.use_static||(W.static=e({use_static:!0})),Object.freeze(W),W}();void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},a=n(1205);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r}).call(this,n(68))},function(e,t,n){"use strict";n.d(t,"m",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"k",(function(){return a})),n.d(t,"f",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"l",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"o",(function(){return h})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"n",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"g",(function(){return v}));var r="top",i="bottom",a="right",o="left",s="auto",l=[r,i,a,o],c="start",u="end",d="clippingParents",h="viewport",f="popper",p="reference",m=l.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+u])}),[]),g=[].concat(l,[s]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+u])}),[]),v=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"]},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",noneCursor:"noneCursor--2TQRd",cgWrapper:"cgWrapper--3DkQh",cgList:"cgList--JY0WI",updatingCG:"updatingCG--3TZXa",comprehensionGuideListWrap:"comprehensionGuideListWrap--4h66t",comItem:"comItem--3gWxY",markLocked:"markLocked--1SnAk",markCompleted:"markCompleted--1OVGU",comItemShowText:"comItemShowText--2M4G_",chapterBorder:"chapterBorder--3h12Y",timeDurationBadge:"timeDurationBadge--3U7k7",comItemHover:"comItemHover--1FO7I",comItemCopy:"comItemCopy--3YIl2",inlineEditorInput:"inlineEditorInput--qP6Xx",lastItem:"lastItem--OgF4z",comItemShowTextWrap:"comItemShowTextWrap--YGquG",bgBlackChapter:"bgBlackChapter--17Uw-",bgOrChapter:"bgOrChapter--3UMbM",badge:"badge--2VW5G",comItemWrap:"comItemWrap--1i0or",comItemActive:"comItemActive--pfPNl",noExpandFullcontent:"noExpandFullcontent--YvilC",comItemFullText:"comItemFullText--rmO5a",comItemShowTextWrapLock:"comItemShowTextWrapLock--2IOGB",chapterTextHoverWrap:"chapterTextHoverWrap--VbsTi",hoverWrapText:"hoverWrapText--3dWBj",active:"active--2P5WY",hiddenChapterTitle:"hiddenChapterTitle--2Hqy7",AddItem:"AddItem--Ag_6a",iconActive:"iconActive--3vJte",editable:"editable--3SJQv",cgGridTable:"cgGridTable--3NFWO",disabled:"disabled--2-ANF",indicatorWrap:"indicatorWrap--2j8nH",markRoundIndicator:"markRoundIndicator--SYjqb",indicatorProcessWrap:"indicatorProcessWrap--2s0G0",processingIndicator:"processingIndicator--29iBh",indicator:"indicator--23sry",markRoundIndicatorWrap:"markRoundIndicatorWrap--3bWJc",buttonArea:"buttonArea--cxR-i",editButtonGroup:"editButtonGroup--1CexK",inlineEditorInputWrap:"inlineEditorInputWrap--3T33M",contentDisplay:"contentDisplay--1pBwu",likeActive:"likeActive--1Rxn_",activeTitle:"activeTitle--3wLI6",csgBorder:"csgBorder--1gGLW",chapterIndex:"chapterIndex--2idXq",badgeSawBg:"badgeSawBg--24enX",attachmentBadge:"attachmentBadge--2EVvV",attachmentBadgeWrap:"attachmentBadgeWrap--s_XED",btn:"btn--1Xrig",meetingTimeBadge:"meetingTimeBadge--126JP",previewImageWrap:"previewImageWrap--2vurl",previewImage:"previewImage--2o6LI",previewTimeDurationBadge:"previewTimeDurationBadge--1Rs-z",chapterProcessingStatus:"chapterProcessingStatus--2DmNp",chapterSpinner:"chapterSpinner--Ztrk4",startBtn:"startBtn--1j_6g",imageSliderWrapper:"imageSliderWrapper--3A5hH",imageSlider:"imageSlider--3PN0Z",actionsWrapper:"actionsWrapper--1hSs9",largeCoverImage:"largeCoverImage--2bsi3",image:"image--SMw8f",largeCoverImageArrow:"largeCoverImageArrow--2nfr_",prevBtn:"prevBtn--Y5Kzw",nextBtn:"nextBtn--27nRs",backBtn:"backBtn--2wJx1",freeFUI:"freeFUI--Hp9iG",nonFreeFUI:"nonFreeFUI--2EKO5"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(33);var r=n(0),i=n.n(r),a=i.a.createContext({});a.Consumer,a.Provider;function o(e,t){var n=Object(r.useContext)(a);return e||n[t]||t}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Ko})),n.d(t,"b",(function(){return Jo})),n.d(t,"c",(function(){return Vo})),n.d(t,"d",(function(){return es})),n.d(t,"e",(function(){return $o})),n.d(t,"f",(function(){return Ue})),n.d(t,"g",(function(){return er})),n.d(t,"h",(function(){return ro})),n.d(t,"i",(function(){return me})),n.d(t,"j",(function(){return us})),n.d(t,"k",(function(){return ir})),n.d(t,"l",(function(){return wr})),n.d(t,"m",(function(){return yr})),n.d(t,"n",(function(){return as})),n.d(t,"o",(function(){return zo})),n.d(t,"p",(function(){return Xr})),n.d(t,"q",(function(){return Qr})),n.d(t,"r",(function(){return $r})),n.d(t,"s",(function(){return we})),n.d(t,"t",(function(){return ss})),n.d(t,"u",(function(){return Wo})),n.d(t,"v",(function(){return cs})),n.d(t,"w",(function(){return wa})),n.d(t,"x",(function(){return vs})),n.d(t,"y",(function(){return Sa})),n.d(t,"z",(function(){return Y})),n.d(t,"A",(function(){return Uo})),n.d(t,"B",(function(){return Ma})),n.d(t,"C",(function(){return pa})),n.d(t,"D",(function(){return Qo})),n.d(t,"E",(function(){return gs})),n.d(t,"F",(function(){return No})),n.d(t,"G",(function(){return Ro})),n.d(t,"H",(function(){return Io})),n.d(t,"I",(function(){return To})),n.d(t,"J",(function(){return _o})),n.d(t,"K",(function(){return ys})),n.d(t,"L",(function(){return yo})),n.d(t,"M",(function(){return xo})),n.d(t,"N",(function(){return bs})),n.d(t,"O",(function(){return vo})),n.d(t,"P",(function(){return mo})),n.d(t,"Q",(function(){return Ho})),n.d(t,"R",(function(){return Pa})),n.d(t,"S",(function(){return jo}));var r=n(0),i=n.n(r),a=n(32),o=n(336),s=n(79),l=n.n(s),c=n(1050),u=n(98),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function h(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function f(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function p(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function m(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}function g(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var v,b,y,A,_,w,E,S,C,T,k,x,O,I,M,P=function(e){var t=e.css;return t?"@media { "+t+" };":""},D=function(e){return Object(o.b)(e)},N=a.c.span(v||(v=g(["\n  ","\n  display: inline-block;\n  padding: ",";\n  border-radius: 0.5rem;\n  line-height: ",";\n  color: ",";\n  font-size: 0.65rem;\n  background-color: ",";\n\n  ",";\n  ","\n"],["\n  ","\n  display: inline-block;\n  padding: ",";\n  border-radius: 0.5rem;\n  line-height: ",";\n  color: ",";\n  font-size: 0.65rem;\n  background-color: ",";\n\n  ",";\n  ","\n"])),(function(e){if("object"==typeof e.value){var t=e.value;return"width: "+(t.props&&t.props.width||"1rem")+";"}return null}),(function(e){return"object"==typeof e.value?"0":"0.1rem 0.4rem 0.125rem"}),(function(e){return"object"==typeof e.value?"1":"1.43"}),(function(e){return e.theme.colors.greys.white}),(function(e){return"alert"===e.status?e.theme.colors.error.primary:e.theme.colors.greys.grey60}),D,P),L=function(e){var t=e.value,n=e.status,r=void 0===n?"default":n,a=e.className,o=e.tag,s=h(e,["value","status","className","tag"]);return i.a.createElement(N,d({className:a||"",as:o,status:r,value:t,"data-testid":"badge"},s),t)},R=Object(a.b)(b||(b=g(["\n  clip: rect(1px, 1px, 1px, 1px);\n  height: 1px;\n  width: 1px;\n  overflow: hidden;\n  position: absolute !important;\n"],["\n  clip: rect(1px, 1px, 1px, 1px);\n  height: 1px;\n  width: 1px;\n  overflow: hidden;\n  position: absolute !important;\n"]))),B=Object(a.b)(y||(y=g(["\n  overflow: hidden;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n"],["\n  overflow: hidden;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n"]))),j=Object(a.b)(A||(A=g(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n"],["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n"]))),F=function(e,t){var n;if(void 0===t&&(t=1),!function(e){return/^#[0-9A-F]{6}$/i.test(e)}(e))return"";var r=null===(n=e.match(/\w\w/g))||void 0===n?void 0:n.map((function(e){return parseInt(e,16)}));return"rgba("+r[0]+", "+r[1]+", "+r[2]+", "+(t||1)+")"},U=a.c.button(_||(_=g(["\n  border-radius: ",";\n  font-size: ",";\n  padding: 0.5rem 1rem;\n  border-color: transparent;\n  transition: background-color 0.1s ease;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n\n  &:hover {\n    cursor: pointer;\n  }\n\n  &:focus {\n    outline: none;\n  }\n\n  .ch-icon {\n    width: ",";\n    height: ",";\n    margin-right: 0.25rem;\n  }\n\n  /* variant styles */\n  ","\n  ","\n  ","\n\n  ","\n  ","\n"],["\n  border-radius: ",";\n  font-size: ",";\n  padding: 0.5rem 1rem;\n  border-color: transparent;\n  transition: background-color 0.1s ease;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n\n  &:hover {\n    cursor: pointer;\n  }\n\n  &:focus {\n    outline: none;\n  }\n\n  .ch-icon {\n    width: ",";\n    height: ",";\n    margin-right: 0.25rem;\n  }\n\n  /* variant styles */\n  ","\n  ","\n  ","\n\n  ","\n  ","\n"])),(function(e){return e.theme.radii.default}),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.iconButtonSizes[e.iconSize||"sm"]}),(function(e){return e.theme.iconButtonSizes[e.iconSize||"sm"]}),(function(e){return"primary"===e.variant&&H}),(function(e){return"secondary"===e.variant&&z}),(function(e){return"icon"===e.variant&&W}),D,P),H=Object(a.b)(w||(w=g(["\n  background-color: ",";\n  color: ",";\n  border: ",";\n  box-shadow: ",";\n\n  &:focus {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:hover {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:focus:hover {\n    box-shadow: ",";\n  }\n\n  &:active {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:disabled {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    cursor: not-allowed;\n  }\n"],["\n  background-color: ",";\n  color: ",";\n  border: ",";\n  box-shadow: ",";\n\n  &:focus {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:hover {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:focus:hover {\n    box-shadow: ",";\n  }\n\n  &:active {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:disabled {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    cursor: not-allowed;\n  }\n"])),(function(e){return e.selected?e.theme.buttons.primary.selected.bgd:e.theme.buttons.primary.static.bgd}),(function(e){return e.selected?e.theme.buttons.primary.selected.text:e.theme.buttons.primary.static.text}),(function(e){return e.selected?e.theme.buttons.primary.selected.border:e.theme.buttons.primary.static.border}),(function(e){return e.theme.buttons.primary.static.shadow}),(function(e){return e.theme.buttons.primary.focus.bgd}),(function(e){return e.theme.buttons.primary.focus.border}),(function(e){return e.theme.buttons.primary.focus.text}),(function(e){return e.theme.buttons.primary.focus.shadow}),(function(e){return e.theme.buttons.primary.hover.bgd}),(function(e){return e.theme.buttons.primary.hover.border}),(function(e){return e.theme.buttons.primary.hover.text}),(function(e){return e.theme.buttons.primary.hover.shadow}),(function(e){return e.theme.buttons.primary.focus.shadow}),(function(e){return e.theme.buttons.primary.active.bgd}),(function(e){return e.theme.buttons.primary.active.border}),(function(e){return e.theme.buttons.primary.active.text}),(function(e){return e.theme.buttons.primary.active.shadow}),(function(e){return e.theme.buttons.primary.disabled.bgd}),(function(e){return e.theme.buttons.primary.disabled.border}),(function(e){return e.theme.buttons.primary.disabled.text})),z=Object(a.b)(E||(E=g(["\n  background-color: ",";\n  color: ",";\n  border: ",";\n  box-shadow: ",";\n\n  &:focus {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:hover {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:focus:hover {\n    box-shadow: ",";\n  }\n\n  &:active {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:disabled {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    cursor: not-allowed;\n  }\n"],["\n  background-color: ",";\n  color: ",";\n  border: ",";\n  box-shadow: ",";\n\n  &:focus {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:hover {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:focus:hover {\n    box-shadow: ",";\n  }\n\n  &:active {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:disabled {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    cursor: not-allowed;\n  }\n"])),(function(e){return e.selected?e.theme.buttons.secondary.selected.bgd:e.theme.buttons.secondary.static.bgd}),(function(e){return e.selected?e.theme.buttons.secondary.selected.text:e.theme.buttons.secondary.static.text}),(function(e){return e.selected?e.theme.buttons.secondary.selected.border:e.theme.buttons.secondary.static.border}),(function(e){return e.theme.buttons.secondary.shadow}),(function(e){return e.theme.buttons.secondary.focus.bgd}),(function(e){return e.theme.buttons.secondary.focus.border}),(function(e){return e.theme.buttons.secondary.focus.text}),(function(e){return e.theme.buttons.secondary.focus.shadow}),(function(e){return e.theme.buttons.secondary.hover.bgd}),(function(e){return e.theme.buttons.secondary.hover.border}),(function(e){return e.theme.buttons.secondary.hover.text}),(function(e){return e.theme.buttons.secondary.hover.shadow}),(function(e){return e.theme.buttons.secondary.focus.shadow}),(function(e){return e.theme.buttons.secondary.active.bgd}),(function(e){return e.theme.buttons.secondary.active.border}),(function(e){return e.theme.buttons.secondary.active.text}),(function(e){return e.theme.buttons.secondary.focus.shadow}),(function(e){return e.theme.buttons.secondary.disabled.bgd}),(function(e){return e.theme.buttons.secondary.disabled.border}),(function(e){return e.theme.buttons.secondary.disabled.text})),V={sm:Object(a.b)(S||(S=g(["top: -15%; left: 76%;"],["top: -15%; left: 76%;"]))),md:Object(a.b)(C||(C=g(["top: 4%; left: 76%;"],["top: 4%; left: 76%;"]))),lg:Object(a.b)(T||(T=g(["top: 10%; left: 76%;"],["top: 10%; left: 76%;"])))},W=Object(a.b)(k||(k=g(["\n  background-color: ",";\n  color: ",";\n  border: ",";\n  border-radius: ",";\n  padding: 0.1875rem;\n  position: relative;\n\n  > .ch-label {\n    ",";\n  }\n\n  > .ch-icon {\n    width: ",";\n    height: ",";\n    margin: 0;\n  }\n\n  &:focus {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:hover {\n    background-color: ",";\n    border: ",";\n    color: ",";\n  }\n\n  &:active {\n    background-color: ",";\n    border: ",";\n    color: ",";\n  }\n\n  &:disabled {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    cursor: not-allowed;\n  }\n\n  + * {\n    position: absolute;\n    font-size: 0.55rem;\n    z-index: 1;\n    ","\n  }\n"],["\n  background-color: ",";\n  color: ",";\n  border: ",";\n  border-radius: ",";\n  padding: 0.1875rem;\n  position: relative;\n\n  > .ch-label {\n    ",";\n  }\n\n  > .ch-icon {\n    width: ",";\n    height: ",";\n    margin: 0;\n  }\n\n  &:focus {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    color: ",";\n    box-shadow: ",";\n  }\n\n  &:hover {\n    background-color: ",";\n    border: ",";\n    color: ",";\n  }\n\n  &:active {\n    background-color: ",";\n    border: ",";\n    color: ",";\n  }\n\n  &:disabled {\n    background-color: ",";\n    border: ",";\n    color: ",";\n    cursor: not-allowed;\n  }\n\n  + * {\n    position: absolute;\n    font-size: 0.55rem;\n    z-index: 1;\n    ","\n  }\n"])),(function(e){return e.selected?e.theme.buttons.icon.selected.bgd:e.theme.buttons.icon.static.bgd}),(function(e){return e.selected?e.theme.buttons.icon.selected.text:e.theme.buttons.icon.static.text}),(function(e){return e.selected?e.theme.buttons.icon.selected.border:e.theme.buttons.icon.static.border}),(function(e){return e.theme.radii.circle}),R,(function(e){return e.theme.iconButtonSizes[e.iconSize||"sm"]}),(function(e){return e.theme.iconButtonSizes[e.iconSize||"sm"]}),(function(e){var t=e.theme;return e.selected?t.buttons.icon.selected.bgd:t.buttons.icon.static.bgd}),(function(e){return e.theme.buttons.icon.focus.border}),(function(e){return e.theme.buttons.icon.focus.text}),(function(e){var t=e.theme;return e.selected?t.buttons.icon.selected.text:t.buttons.icon.static.text}),(function(e){return e.theme.buttons.icon.focus.shadow}),(function(e){return e.theme.buttons.icon.hover.bgd}),(function(e){return e.theme.buttons.icon.hover.border}),(function(e){return e.theme.buttons.icon.hover.text}),(function(e){return e.theme.buttons.icon.active.bgd}),(function(e){return e.theme.buttons.icon.active.border}),(function(e){return e.theme.buttons.icon.active.text}),(function(e){return e.theme.buttons.icon.disabled.bgd}),(function(e){return e.theme.buttons.icon.disabled.border}),(function(e){return e.theme.buttons.icon.disabled.text}),(function(e){var t=e.iconSize;return t?V[t]:V.sm})),G=a.c.span(x||(x=g(["\n  display: inline-block;\n  position: relative;\n"],["\n  display: inline-block;\n  position: relative;\n"]))),q=Object(r.forwardRef)((function(e,t){return i.a.createElement(U,d({},e,{className:e.className||"",as:e.tag,ref:t,"aria-label":e.label,"data-testid":"button",disabled:e.disabled}),e.icon&&i.a.createElement("span",{className:"ch-icon","data-testid":"button-icon"},e.icon),i.a.createElement("span",{className:"ch-label","data-testid":"button-label"},e.label))})),Y=(Object(r.forwardRef)((function(e,t){return i.a.createElement(q,d({variant:"primary"},e))})),Object(r.forwardRef)((function(e,t){return i.a.createElement(q,d({variant:"secondary"},e))}))),K=Object(r.forwardRef)((function(e,t){return i.a.createElement(G,null,i.a.createElement(q,d({ref:t,variant:"icon"},e)),e.badge)})),X=a.c.input(O||(O=g(["\n  ",";\n\n  &[aria-invalid='true'] + .ch-checkbox {\n    border: ",";\n    box-shadow: ",";\n  }\n"],["\n  ",";\n\n  &[aria-invalid='true'] + .ch-checkbox {\n    border: ",";\n    box-shadow: ",";\n  }\n"])),R,(function(e){return e.theme.inputs.error.border}),(function(e){return e.theme.inputs.error.shadow})),Q=(a.c.div(I||(I=g(["\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  color: ",";\n  display: inline-block;\n  height: 1rem;\n  position: relative;\n  width: 1rem;\n  transition: box-shadow 0.05s ease-in;\n\n  > svg {\n    left: -0.03125rem;\n    position: absolute;\n    transform: scale(1.5);\n  }\n\n  ",":checked ~ & {\n    background-color: ",";\n    border: ",";\n    box-shadow: ",";\n    color: ",";\n  }\n\n  ",":focus ~ & {\n    border: ",";\n    box-shadow: ",";\n  }\n"],["\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  color: ",";\n  display: inline-block;\n  height: 1rem;\n  position: relative;\n  width: 1rem;\n  transition: box-shadow 0.05s ease-in;\n\n  > svg {\n    left: -0.03125rem;\n    position: absolute;\n    transform: scale(1.5);\n  }\n\n  ",":checked ~ & {\n    background-color: ",";\n    border: ",";\n    box-shadow: ",";\n    color: ",";\n  }\n\n  ",":focus ~ & {\n    border: ",";\n    box-shadow: ",";\n  }\n"])),(function(e){return e.theme.inputs.bgd}),(function(e){return e.theme.inputs.border}),(function(e){return e.theme.radii.default}),(function(e){return e.theme.inputs.shadow}),(function(e){return e.theme.inputs.fontColor}),X,(function(e){return e.theme.inputs.checked.bgd}),(function(e){return e.theme.inputs.checked.border}),(function(e){return e.theme.inputs.checked.shadow}),(function(e){return e.theme.inputs.checked.fontColor}),X,(function(e){return e.theme.inputs.focus.border}),(function(e){return e.theme.inputs.focus.shadow})),function(e){var t=e.className,n=e.children,r=e.viewBox,a=void 0===r?"0 0 24 24":r,o=e.xmlns,s=void 0===o?"http://www.w3.org/2000/svg":o,l=e.width,c=e.height,u=e.title,f=h(e,["className","children","viewBox","xmlns","width","height","title"]),p={width:l,height:c};return i.a.createElement("svg",d({xmlns:s,className:"Svg "+(t||""),height:c,style:p,viewBox:a,width:l},f),u&&i.a.createElement("title",null,u),i.a.createElement("g",{fillRule:"evenodd",fill:"currentColor"},n))}),$={up:"0",right:"90",down:"180",left:"270"},J=(Object(a.c)(Q)(M||(M=g(["\n  transform: ",";\n"],["\n  transform: ",";\n"])),(function(e){var t=e.direction;return"rotate("+$[t||"up"]+"deg)"})),function(e){var t=e.disabled,n=void 0!==t&&t,r=h(e,["disabled"]);return i.a.createElement(Q,d({},r),n?i.a.createElement("path",{xmlns:"http://www.w3.org/2000/svg",d:"M4.146 4.146c.196-.195.512-.195.708 0L7.707 7h.007l1 1h-.007L15 14.293v-.007l.894.894-.001.006 3.961 3.96c.195.196.195.512 0 .708-.098.097-.226.146-.354.146-.128 0-.256-.049-.354-.146l-3.747-3.748c-.459.542-1.134.894-1.899.894h-7C5.121 17 4 15.879 4 14.5v-5c0-1.314 1.022-2.383 2.312-2.481L4.146 4.854c-.195-.196-.195-.512 0-.708zM7.293 8H6.5C5.673 8 5 8.673 5 9.5v5c0 .827.673 1.5 1.5 1.5h7c.488 0 .919-.238 1.192-.601L7.293 8zM13.5 7C14.879 7 16 8.121 16 9.5v.566l1.813-1.303c.426-.306.983-.349 1.456-.107.451.231.731.684.731 1.181v4.326c0 .497-.28.95-.731 1.181-.205.104-.424.156-.642.156-.287 0-.571-.089-.814-.263l-1.592-1.144L15 12.873V9.5c0-.827-.673-1.5-1.5-1.5h-3.372l-1-1zm5.313 2.546c-.051-.026-.233-.1-.416.03l-2.256 1.621c-.089.064-.141.16-.141.262v1.082c0 .102.051.197.141.262l2.256 1.622c.182.131.365.054.416.03.055-.029.187-.116.187-.292V9.837c0-.176-.132-.263-.187-.29z"}):i.a.createElement("path",{d:"M19 14.164c0 .176-.131.262-.187.29-.052.027-.234.1-.416-.028l-2.256-1.622v-.001c-.09-.064-.141-.16-.141-.262v-1.082c0-.102.051-.197.141-.262l2.255-1.622c.081-.057.159-.075.227-.075.09 0 .16.03.19.046.056.029.187.115.187.29v4.328zm-4 .336c0 .828-.673 1.5-1.5 1.5h-7c-.827 0-1.5-.672-1.5-1.5v-5C5 8.673 5.673 8 6.5 8h7c.827 0 1.5.673 1.5 1.5v5zm4.27-5.843c-.471-.242-1.028-.202-1.457.106L16 10.066V9.5C16 8.122 14.879 7 13.5 7h-7C5.121 7 4 8.122 4 9.5v5C4 15.879 5.121 17 6.5 17h7c1.379 0 2.5-1.121 2.5-2.5v-.566l1.814 1.304c.243.174.527.262.813.262.219 0 .438-.051.643-.156.45-.231.73-.683.73-1.18V9.837c0-.497-.28-.95-.73-1.18z"}))});J.displayName="Camera";var Z,ee={up:"0",right:"90",down:"180",left:"270"},te=Object(a.c)(Q)(Z||(Z=g(["\n  transform: ",";\n"],["\n  transform: ",";\n"])),(function(e){var t=e.direction;return"rotate("+ee[t||"up"]+"deg)"})),ne=function(e){var t=e.direction,n=void 0===t?"up":t,r=h(e,["direction"]);return i.a.createElement(te,d({direction:n},r),i.a.createElement("path",{"transform-origin":"center",d:"M8.824 13.88c-.21.18-.526.154-.705-.056-.159-.187-.156-.457-.006-.64l.063-.065 3.523-3c.165-.14.397-.156.577-.05l.074.052 3.477 3c.209.18.232.497.052.706-.16.185-.428.224-.632.104l-.074-.052-3.151-2.72-3.198 2.722z"}))};ne.displayName="Caret";var re,ie,ae,oe,se={default:Object(a.b)(re||(re=g(["\n  .ch-caution-background {\n    fill: transparent;\n  }\n"],["\n  .ch-caution-background {\n    fill: transparent;\n  }\n"]))),"fill-warning":Object(a.b)(ie||(ie=g(["\n  .ch-caution-background {\n    fill: ",";\n  }  \n\n  .ch-caution-exclamation {\n    fill: ",";\n  }  \n\n  .ch-caution-border {\n    fill: ",";\n  }  \n"],["\n  .ch-caution-background {\n    fill: ",";\n  }  \n\n  .ch-caution-exclamation {\n    fill: ",";\n  }  \n\n  .ch-caution-border {\n    fill: ",";\n  }  \n"])),(function(e){return e.theme.colors.warning.primary}),(function(e){return e.theme.colors.greys.white}),(function(e){return e.theme.colors.warning.primary})),"fill-error":Object(a.b)(ae||(ae=g(["\n  .ch-caution-background {\n    fill: ",";\n  }  \n\n  .ch-caution-exclamation {\n    fill: ",";\n  }  \n\n  .ch-caution-border {\n    fill: ",";\n  }  \n"],["\n  .ch-caution-background {\n    fill: ",";\n  }  \n\n  .ch-caution-exclamation {\n    fill: ",";\n  }  \n\n  .ch-caution-border {\n    fill: ",";\n  }  \n"])),(function(e){return e.theme.colors.error.primary}),(function(e){return e.theme.colors.greys.white}),(function(e){return e.theme.colors.error.primary}))},le=a.c.g(oe||(oe=g(["\n\n  ",";\n\n"],["\n\n  ",";\n\n"])),(function(e){return se[e.variant||"default"]})),ce=function(e){return i.a.createElement(Q,d({},e),i.a.createElement(le,{fill:"currentColor",variant:e.variant},i.a.createElement("path",{className:"ch-caution-background",d:"M18.728 15.186l-5.085-8.281C13.293 6.338 12.68 6 12 6c-.68 0-1.294.338-1.642.905l-5.085 8.281c-.351.571-.365 1.258-.04 1.841.336.6.98.972 1.68.972h10.17c.704 0 1.348-.372 1.683-.972.326-.583.312-1.27-.04-1.841"}),i.a.createElement("path",{className:"ch-caution-exclamation",d:"M12.572 14.609v1.219h-1.166v-1.219h1.166zm.023-5.388v1.83l-.288 2.727h-.597l-.305-2.727V9.22h1.19z"}),i.a.createElement("path",{className:"ch-caution-border",d:"M17.894 16.539c-.161.288-.463.46-.81.46H6.915c-.343 0-.645-.172-.806-.46-.15-.266-.143-.568.017-.829l5.085-8.281c.33-.536 1.25-.538 1.58 0l5.086 8.281c.16.261.167.563.018.829m.834-1.353l-5.085-8.281C13.293 6.338 12.68 6 12 6c-.68 0-1.294.338-1.642.905l-5.085 8.281c-.351.571-.365 1.258-.04 1.841.336.6.98.972 1.68.972h10.17c.704 0 1.348-.372 1.683-.972.326-.583.312-1.27-.04-1.841"})))};ce.displayName="Caution";var ue=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M16.834 9.178c-.18-.21-.494-.238-.705-.061l-5.912 4.975-2.33-2.846c-.175-.214-.491-.245-.703-.07-.214.175-.246.49-.071.703l2.652 3.238.004.006c.037.044.085.073.132.1.015.01.026.025.04.032.068.03.138.046.21.046.056 0 .113-.01.166-.028.038-.013.07-.037.106-.06.015-.01.03-.014.045-.025v-.001l.006-.003 6.299-5.301c.21-.178.239-.493.06-.705"}))};ue.displayName="Check";var de=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8zm0 1c-3.86 0-7 3.141-7 7s3.14 7 7 7 7-3.141 7-7-3.14-7-7-7zm3.493 4.873c.211-.179.526-.15.705.061.177.211.15.527-.061.705l-4.476 3.764-.003.002v.001c-.029.024-.061.035-.091.051-.02.011-.039.027-.061.035-.054.019-.11.028-.166.028-.072 0-.143-.015-.209-.045-.016-.007-.027-.023-.042-.032-.047-.028-.095-.056-.132-.1l-.001-.002-.003-.004-1.84-2.246c-.175-.213-.143-.529.07-.703.213-.177.529-.145.704.07l1.518 1.853z"}))};de.displayName="CheckRound";var he=function(e){return i.a.createElement(Q,d({},e,{title:"Clear"}),i.a.createElement("path",{d:"M12 5c3.866 0 7 3.134 7 7s-3.134 7-7 7-7-3.134-7-7 3.134-7 7-7zM9.172 9.17c-.196.196-.196.513 0 .708L11.293 12l-2.12 2.12c-.197.197-.197.513 0 .708.096.098.224.147.352.147.128 0 .256-.05.354-.147L12 12.707l2.121 2.12c.098.099.226.148.353.148.128 0 .256-.05.354-.147.195-.195.195-.511 0-.707L12.708 12l2.12-2.122c.195-.195.195-.512 0-.707-.195-.195-.512-.195-.707 0l-2.12 2.12-2.122-2.12c-.196-.195-.512-.195-.707 0z"}))};he.displayName="Clear";var fe=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8zm0 1c-3.859 0-7 3.141-7 7s3.141 7 7 7 7-3.141 7-7-3.141-7-7-7zm0 2.559c.276 0 .5.223.5.5V11.5h3c.276 0 .5.224.5.5s-.224.5-.5.5H12c-.276 0-.5-.224-.5-.5V8.059c0-.277.224-.5.5-.5z"}))};fe.displayName="Clock";var pe=function(e){var t=e.title,n=void 0===t?"Screen share":t,r=h(e,["title"]);return i.a.createElement(Q,d({},r,{title:n}),i.a.createElement("path",{d:"M15.5 17c.276 0 .5.224.5.5s-.224.5-.5.5h-7c-.276 0-.5-.224-.5-.5s.224-.5.5-.5zM18 6c1.103 0 2 .897 2 2v6c0 1.103-.897 2-2 2H6c-1.103 0-2-.897-2-2V8c0-1.103.897-2 2-2zm0 1H6c-.552 0-1 .449-1 1v6c0 .551.448 1 1 1h12c.552 0 1-.449 1-1V8c0-.551-.448-1-1-1z"}))};pe.displayName="ScreenShare";var me=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M12 4c4.418 0 8 3.582 8 8s-3.582 8-8 8-8-3.582-8-8 3.582-8 8-8zm0 1c-3.86 0-7 3.14-7 7 0 3.859 3.14 7 7 7 3.859 0 7-3.141 7-7 0-3.86-3.141-7-7-7zm-3 6c.552 0 1 .448 1 1s-.448 1-1 1-1-.448-1-1 .448-1 1-1zm6 0c.553 0 1 .448 1 1s-.447 1-1 1c-.553 0-1-.448-1-1s.447-1 1-1zm-3 0c.552 0 1 .448 1 1s-.448 1-1 1-1-.448-1-1 .448-1 1-1z"}))};me.displayName="Dots";var ge=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M16.042 18H7.959C7.43 18 7 17.57 7 17.042V6.959C7 6.431 7.43 6 7.959 6h5.461v2.131c0 .899.732 1.632 1.632 1.632H17v7.279c0 .528-.43.958-.958.958zm.63-9.293c.014.017.019.038.033.056h-1.653c-.348 0-.632-.284-.632-.632V6.2c.125.074.243.163.34.277l1.912 2.23zm.759-.65L15.52 5.826C15.069 5.301 14.416 5 13.725 5H7.959C6.878 5 6 5.879 6 6.959v10.083C6 18.122 6.878 19 7.959 19h8.083c1.08 0 1.958-.878 1.958-1.958V9.595c0-.564-.202-1.11-.569-1.538z"}))};ge.displayName="Document";a.c.circle(ve||(ve=g(["\n  fill: ",";\n"],["\n  fill: ",";\n"])),(function(e){return e.theme.colors.primary.main}));var ve,be=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8zm0 1c-3.859 0-7 3.141-7 7s3.141 7 7 7 7-3.141 7-7-3.141-7-7-7zm.016 6.476c.276 0 .5.224.5.5v2.498c0 .276-.224.5-.5.5s-.5-.224-.5-.5v-2.498c0-.276.224-.5.5-.5zM12 8.709c.414 0 .75.335.75.75 0 .414-.336.75-.75.75s-.75-.336-.75-.75c0-.415.336-.75.75-.75z"}))};be.displayName="Information";var ye,Ae=Object(a.c)((function(e){e.poorConnection,e.muted;var t=h(e,["poorConnection","muted"]);return i.a.createElement(Q,d({},t))}))(ye||(ye=g(["\n  ","\n"],["\n  ","\n"])),(function(e){return e.poorConnection?"color: "+e.theme.colors.error.light:""}));var _e=function(e){var t=e.muted,n=void 0!==t&&t,r=e.poorConnection,a=void 0!==r&&r,o=e.mutedTitle,s=void 0===o?"Muted microphone":o,l=e.unmutedTitle,c=void 0===l?"Microphone":l,u=h(e,["muted","poorConnection","mutedTitle","unmutedTitle"]),f=function(e,t){return e?t?"M4.146 4.146c.196-.195.513-.195.708 0L9.168 8.46h.018l.813.815v.018l5.854 5.854c.002-.005.005-.008.008-.01l.724.724-.008.01 3.276 3.275c.195.195.195.512 0 .707-.098.098-.226.147-.354.147-.127 0-.255-.049-.352-.146l-3.281-3.281C14.82 17.459 13.475 18 11.998 18c-3.308 0-6-2.691-6-6 0-.277.224-.5.5-.5.278 0 .5.223.5.5 0 2.757 2.244 5 5 5 1.2 0 2.29-.436 3.147-1.146l-1.439-1.438c-.14.105-.287.207-.445.285l-.447-.895c.062-.03.116-.073.174-.11l-2.99-2.989v.941H9v-1.063h.88L4.147 4.853c-.196-.194-.196-.511 0-.707zM14.5 19c.276 0 .5.224.5.5s-.224.5-.5.5h-5c-.276 0-.5-.224-.5-.5s.224-.5.5-.5zm3-7.5c.276 0 .5.224.5.5 0 1.106-.307 2.14-.83 3.031l-.748-.748c.357-.687.578-1.456.578-2.283 0-.276.224-.5.5-.5zm-6.293 2.317c.25.121.517.183.793.183l.016 1.001-.098-.008c-.359-.012-.76-.089-1.147-.275zm-1.085-1.278c.093.282.234.536.42.757l-.766.644c-.267-.319-.47-.685-.603-1.089zM15 11.618v.155c0 .325-.051.643-.139.95l-.867-.868c.001-.027.006-.055.006-.082v-.155h1zm0-2.126v1.062h-1V9.492h1zm0-2.125v1.062h-1V7.367h1zM9.155 6.201l.955.297c-.073.235-.11.48-.11.73v.17h-.463l-.512-.512c.024-.232.061-.463.13-.685zm5.079-1.128c.268.321.469.689.599 1.093l-.951.307c-.091-.283-.231-.537-.415-.759zm-3.514-.765l.453.891c-.246.126-.474.312-.656.535l-.776-.63c.274-.338.603-.604.979-.796zM12 4c.434 0 .853.098 1.245.29l-.44.897C12.553 5.064 12.282 5 12 5l-.031-1z":"M14.5 19c.276 0 .5.224.5.5s-.224.5-.5.5h-5c-.276 0-.5-.224-.5-.5s.224-.5.5-.5zM4.146 4.146c.196-.195.512-.195.708 0l15 15c.195.196.195.512 0 .708-.098.097-.226.146-.354.146-.128 0-.256-.049-.354-.146l-3.282-3.283C14.819 17.458 13.475 18 12 18c-3.309 0-6-2.691-6-6 0-.276.224-.5.5-.5s.5.224.5.5c0 2.757 2.243 5 5 5 1.199 0 2.288-.437 3.146-1.146l-1.452-1.453c-.483.366-1.058.599-1.694.599-1.654 0-3-1.448-3-3.228V9.707L4.146 4.854c-.195-.196-.195-.512 0-.708zM17.5 11.5c.276 0 .5.224.5.5 0 1.112-.31 2.152-.84 3.046l-.747-.746c.362-.693.587-1.467.587-2.3 0-.276.224-.5.5-.5zm-7.5-.793v1.065c0 1.229.897 2.228 2 2.228.362 0 .7-.111.992-.301L10 10.707zm2-6.708c1.654 0 3 1.45 3 3.228v4.546c0 .337-.062.655-.151.962l-.859-.858.01-.104V7.228C14 5.998 13.103 5 12 5s-2 .998-2 2.228v.658l-.971-.97C9.178 5.284 10.445 3.998 12 3.998z":t?"M14.5 19c.276 0 .5.224.5.5s-.224.5-.5.5h-5c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h5zm3-7.5c.276 0 .5.224.5.5 0 3.309-2.691 6-6 6s-6-2.691-6-6c0-.276.224-.5.5-.5s.5.224.5.5c0 2.757 2.243 5 5 5s5-2.243 5-5c0-.276.224-.5.5-.5zm-6.293 2.318c.25.12.517.183.793.183l.013.958v-.46l.085.492H12.014c-.486-.002-.876-.096-1.242-.274l.435-.9zm2.268-.543l.77.637c-.275.335-.606.6-.983.79l-.447-.896c.25-.125.473-.303.66-.53zm-3.353-.736c.093.283.235.537.42.757l-.765.645c-.268-.32-.472-.687-.604-1.09l.949-.312zM15 11.619v.155c0 .359-.053.71-.16 1.043l-.953-.305c.075-.233.113-.482.113-.738v-.155h1zm-5-1.033v1.063H9v-1.063h1zm5-1.093v1.063h-1V9.492h1zm-5-1.03v1.062H9V8.46h1zm5-1.095V8.43h-1V7.367h1zM9.156 6.2l.955.3c-.074.232-.111.478-.111.728v.17H9v-.17c0-.351.053-.696.156-1.027zm5.08-1.127c.267.32.468.688.598 1.093l-.951.306c-.091-.282-.23-.537-.415-.759l.768-.64zm-3.516-.766l.453.891c-.246.126-.473.311-.656.535l-.775-.63c.273-.337.602-.603.978-.795zM12 4c.433 0 .852.098 1.245.29l-.44.899C12.55 5.064 12.28 5 12 5l-.031-1h.03z":"M14.5 19c.276 0 .5.224.5.5s-.224.5-.5.5h-5c-.276 0-.5-.224-.5-.5s.224-.5.5-.5zm3-7.5c.276 0 .5.224.5.5 0 3.309-2.691 6-6 6s-6-2.691-6-6c0-.276.224-.5.5-.5s.5.224.5.5c0 2.757 2.243 5 5 5s5-2.243 5-5c0-.276.224-.5.5-.5zM12 4c1.654 0 3 1.448 3 3.227v4.546C15 13.552 13.654 15 12 15s-3-1.448-3-3.227V7.227C9 5.447 10.346 4 12 4zm0 1c-1.103 0-2 .999-2 2.227v4.546C10 13 10.897 14 12 14s2-1 2-2.227V7.227C14 5.999 13.103 5 12 5z"}(n,a);return i.a.createElement(Ae,d({},u,{muted:n,poorConnection:a,title:n?s:c,"data-testid":a?"poor-connection-mic":"good-connection-mic"}),i.a.createElement("path",{d:f}))};_e.displayName="Microphone";var we=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M11.999 10.19c.738 0 3.194.089 3.792 1.241.08.158.117.315.138.418l.228 1.112c.033.167.116.318.239.438l.423.414c.349.341.919.343 1.27 0l.649-.635c.308-.3.347-.777.09-1.107-.776-1.005-2.696-2.698-6.83-2.771-4.132.073-6.052 1.766-6.828 2.77-.257.331-.218.808.09 1.108l.649.635c.349.341.919.343 1.27 0L7.6 13.4c.124-.121.207-.272.24-.438l.228-1.116c.02-.1.058-.257.137-.412.599-1.155 3.055-1.244 3.793-1.244m5.455 4.877c-.483 0-.966-.18-1.334-.539l-.422-.413c-.266-.26-.447-.59-.521-.953l-.23-1.115c-.008-.047-.022-.113-.046-.158-.145-.28-1.17-.699-2.902-.699-1.732 0-2.757.419-2.903.702-.023.042-.037.108-.046.152l-.23 1.119c-.073.362-.254.692-.521.953l-.421.412c-.736.719-1.932.719-2.668 0l-.65-.635c-.67-.656-.75-1.703-.181-2.435.887-1.146 3.056-3.08 7.61-3.158h.019c4.555.078 6.724 2.012 7.61 3.159.569.731.49 1.778-.181 2.434l-.65.635c-.367.359-.85.539-1.333.539"}))};we.displayName="Phone";var Ee=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M14.5 5C16.981 5 19 7.019 19 9.5v5c0 2.481-2.019 4.5-4.5 4.5h-5C7.019 19 5 16.981 5 14.5v-5C5 7.019 7.019 5 9.5 5zm0 1h-5C7.57 6 6 7.57 6 9.5v5C6 16.43 7.57 18 9.5 18h5c1.93 0 3.5-1.57 3.5-3.5v-5C18 7.57 16.43 6 14.5 6zM9.172 9.17c.195-.194.511-.194.707 0L12 11.293l2.121-2.121c.195-.195.512-.195.707 0 .195.195.195.512 0 .707L12.708 12l2.12 2.12c.195.197.195.513 0 .708-.098.098-.226.147-.354.147-.127 0-.255-.05-.353-.147l-2.12-2.121-2.122 2.12c-.098.099-.226.148-.354.148-.128 0-.256-.05-.353-.147-.196-.195-.196-.511 0-.707L11.293 12l-2.12-2.122c-.197-.195-.197-.512 0-.707z"}))};Ee.displayName="Remove";var Se=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M11 16c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5m7.852 2.145l-3.294-3.253C16.455 13.843 17 12.485 17 11c0-3.309-2.691-6-6-6s-6 2.691-6 6 2.691 6 6 6c1.464 0 2.807-.528 3.849-1.403l3.299 3.258c.098.097.225.145.352.145.129 0 .258-.05.355-.148.195-.197.193-.514-.003-.707"}))};Se.displayName="Search";var Ce=function(e){var t=e.disabled,n=h(e,["disabled"]);return i.a.createElement(Q,d({},n),t?i.a.createElement("path",{d:"M10.939 7.261c.393-.297.914-.344 1.361-.124.431.213.7.638.7 1.11v7.506c0 .472-.269.897-.7 1.11-.187.092-.385.137-.582.137-.28 0-.557-.09-.788-.268l-2.486-1.728c-.087-.06-.193-.093-.302-.093H6.256C5.563 14.911 5 14.36 5 13.682v-3.358c0-.68.566-1.235 1.263-1.235h1.88c.108 0 .213-.032.298-.092zm.918.772c-.042-.019-.182-.077-.32.03l-.018.012-2.505 1.741c-.253.178-.555.273-.871.273h-1.88c-.145 0-.263.105-.263.235v3.358c0 .127.115.23.256.23h1.886c.316 0 .618.093.874.272l2.503 1.741c.159.12.297.062.338.042.053-.027.143-.089.143-.214V8.247c0-.125-.09-.187-.143-.214zM14.9 10.13c.195-.195.512-.195.707 0l1.163 1.163 1.163-1.163c.195-.195.512-.195.707 0 .195.195.195.512 0 .707L17.477 12l1.163 1.163c.195.195.195.512 0 .707-.098.098-.226.147-.352.147-.128 0-.256-.049-.355-.147l-1.163-1.163-1.162 1.163c-.099.098-.226.147-.354.147-.128 0-.255-.049-.354-.147-.194-.195-.194-.512 0-.707L16.064 12 14.9 10.837c-.194-.195-.194-.512 0-.707z"}):i.a.createElement("path",{d:"M10.939 7.26c.397-.295.914-.343 1.361-.123.431.213.7.638.7 1.11v7.506c0 .473-.269.898-.7 1.111-.187.092-.386.137-.582.137-.28 0-.557-.091-.788-.269l-2.486-1.727c-.088-.061-.194-.094-.302-.094H6.256c-.693 0-1.256-.552-1.256-1.229v-3.357c0-.681.566-1.236 1.263-1.236h1.88c.108 0 .214-.033.3-.092zm5.148.054c.176-.211.49-.241.704-.065 1.406 1.164 2.213 2.896 2.213 4.751 0 1.855-.807 3.588-2.213 4.752-.094.077-.207.115-.319.115-.144 0-.286-.061-.385-.18-.177-.213-.147-.529.065-.705 1.177-.974 1.852-2.425 1.852-3.982 0-1.556-.675-3.007-1.852-3.981-.212-.176-.242-.492-.065-.705zm-4.23.719c-.041-.02-.183-.077-.32.029l-.018.013-2.505 1.742c-.255.178-.556.272-.871.272h-1.88c-.145 0-.263.106-.263.236v3.357c0 .127.115.229.256.229h1.886c.315 0 .617.095.874.274l2.503 1.741c.157.117.298.062.337.042.054-.027.144-.09.144-.215V8.247c0-.125-.09-.187-.143-.214zm2.841 1.62c.181-.21.496-.232.705-.053.707.608 1.112 1.483 1.112 2.4 0 .917-.405 1.793-1.112 2.402-.095.08-.21.12-.326.12-.14 0-.28-.058-.379-.173-.18-.21-.156-.524.053-.705.486-.42.764-1.018.764-1.644 0-.625-.278-1.223-.764-1.642-.209-.181-.233-.496-.053-.705z"}))};Ce.displayName="Sound";var Te=function(e){return i.a.createElement(Q,d({},e,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.a.createElement("g",{fill:"none",fillRule:"evenodd"},i.a.createElement("path",{d:"M0 0H24V24H0z"}),i.a.createElement("g",{fill:"currentColor"},i.a.createElement("path",{d:"M8 0c.316 0 .571.256.571.571V4c0 .316-.255.571-.571.571-.316 0-.571-.255-.571-.571V.571C7.429.256 7.684 0 8 0z",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M14.928 4c.158.273.064.623-.209.78l-2.97 1.715c-.272.158-.622.064-.78-.21-.158-.273-.064-.622.21-.78l2.969-1.714c.273-.158.622-.064.78.209z",opacity:".2",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M12 1.072c.273.158.367.507.21.78l-1.715 2.97c-.158.273-.507.367-.78.209-.274-.158-.368-.508-.21-.78l1.714-2.97c.158-.273.508-.367.781-.21z",opacity:".12",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M16 8c0 .316-.256.571-.571.571H12c-.316 0-.571-.255-.571-.571 0-.316.255-.571.571-.571h3.429c.315 0 .571.255.571.571z",opacity:".28",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M12 14.928c-.273.158-.623.064-.78-.209l-1.715-2.97c-.158-.272-.064-.622.21-.78.273-.158.622-.064.78.21l1.714 2.969c.158.273.064.622-.209.78z",opacity:".44",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M14.928 12c-.158.273-.507.367-.78.21l-2.97-1.715c-.273-.158-.367-.507-.209-.78.158-.274.508-.368.78-.21l2.97 1.714c.273.158.367.508.21.781z",opacity:".36",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M8 16c-.316 0-.571-.256-.571-.571V12c0-.316.255-.571.571-.571.316 0 .571.255.571.571v3.429c0 .315-.255.571-.571.571z",opacity:".52",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M1.072 12c-.158-.273-.064-.623.209-.78l2.97-1.715c.272-.158.622-.064.78.21.158.273.064.622-.21.78l-2.969 1.714c-.273.158-.622.064-.78-.209z",opacity:".68",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M4 14.928c-.273-.158-.367-.507-.21-.78l1.715-2.97c.158-.273.507-.367.78-.209.274.158.368.508.21.78L4.78 14.72c-.158.273-.508.367-.781.21z",opacity:".6",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M0 8c0-.316.256-.571.571-.571H4c.316 0 .571.255.571.571 0 .316-.255.571-.571.571H.571C.256 8.571 0 8.316 0 8z",opacity:".76",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M4 1.072c.273-.158.623-.064.78.209l1.715 2.97c.158.272.064.622-.21.78-.273.158-.622.064-.78-.21L3.791 1.853c-.158-.273-.064-.622.209-.78z",opacity:".92",transform:"translate(4 4)"}),i.a.createElement("path",{d:"M1.072 4c.158-.273.507-.367.78-.21l2.97 1.715c.273.158.367.507.209.78-.158.274-.508.368-.78.21L1.28 4.78c-.273-.158-.367-.508-.21-.781z",opacity:".84",transform:"translate(4 4)"}))))};Te.displayName="Spinner";var ke=function(e){return i.a.createElement(Q,d({},e),i.a.createElement("path",{d:"M8.824 9.88c-.21.18-.526.154-.705-.056-.159-.187-.156-.457-.006-.64l.063-.065 3.523-3c.165-.14.397-.156.577-.05l.074.052 3.477 3c.209.18.232.497.052.706-.16.185-.428.224-.632.104l-.074-.052-3.151-2.72-3.198 2.722zM15.176 14.12c.21-.18.526-.154.705.056.159.187.157.457.006.64l-.063.065-3.523 3c-.165.14-.397.156-.577.05l-.074-.052-3.477-3c-.209-.18-.232-.497-.052-.706.16-.185.428-.224.632-.104l.074.052 3.151 2.72 3.198-2.722z"}))};ke.displayName="UpAndDownCaret";var xe,Oe,Ie,Me=Object(r.createContext)({showLabels:!1,layout:"top"}),Pe={"undocked-vertical":"flex-direction: column;","undocked-horizontal":"flex-direction: row;",top:"flex-direction: row; width: 100%; top: 0; position: fixed;",bottom:"flex-direction: row; width: 100%; bottom: 0; position: fixed;",right:"flex-direction: column; height: 100%; right: 0; position: fixed;",left:"flex-direction: column; height: 100%; left: 0; position: fixed;"},De="grid-template-columns: 2.5rem minmax(0.5rem, auto);",Ne="grid-template-columns: 1.5rem 1.5rem 1.5rem",Le=function(e){return"right"===e||"left"===e||"undocked-vertical"===e},Re=function(e){return"undocked-vertical"===e||"undocked-horizontal"===e},Be={top:"unset;",bottom:"unset;",right:"unset;",left:"unset;"},je=a.c.div(Oe||(Oe=g(["\n  display: inline-flex;\n  justify-content: center;\n  align-items: center;\n  border-radius: ",";\n  background-color: ",";\n  opacity: ",";\n  border: ",";\n  box-shadow: ",";\n  ",";\n\n  ","\n\n  width: ",";\n  height: ",";\n\n  ","\n  ","\n"],["\n  display: inline-flex;\n  justify-content: center;\n  align-items: center;\n  border-radius: ",";\n  background-color: ",";\n  opacity: ",";\n  border: ",";\n  box-shadow: ",";\n  ",";\n\n  ","\n\n  width: ",";\n  height: ",";\n\n  ","\n  ","\n"])),(function(e){var t=e.theme,n=e.layout;return Re(n)?t.radii.default:"0"}),(function(e){return e.theme.controlBar.bgd}),(function(e){return e.theme.controlBar.opacity}),(function(e){var t=e.theme,n=e.layout;return Re(n)?"none":t.controlBar.border}),(function(e){var t=e.theme,n=e.layout;return Re(n)?t.controlBar.shadow:"none"}),(function(e){var t=e.layout;return Pe[""+t]}),(function(e){return e.responsive&&Object(a.b)(xe||(xe=g(["\n    "," {\n      ","\n      ",";\n      box-shadow: ",";\n      border: none;\n      height: ",";\n      width: ",";\n    }\n\n    "," {\n      justify-content: ",";\n      ","\n      ",";\n      box-shadow: ",";\n      border: none;\n    }\n  "],["\n    "," {\n      ","\n      ",";\n      box-shadow: ",";\n      border: none;\n      height: ",";\n      width: ",";\n    }\n\n    "," {\n      justify-content: ",";\n      ","\n      ",";\n      box-shadow: ",";\n      border: none;\n    }\n  "])),(function(e){return e.theme.mediaQueries.max.sm}),Be,(function(e){return Le(e.layout)?Pe.left:Pe.bottom}),(function(e){return e.theme.controlBar.shadow}),(function(e){return Le(e.layout)&&"100%"}),(function(e){return!Le(e.layout)&&"100%"}),(function(e){return e.theme.mediaQueries.max.xs}),(function(e){return Le(e.layout)?"center":"space-around"}),Be,(function(e){return Le(e.layout)?Pe.left:Pe.bottom}),(function(e){return e.theme.controlBar.shadow}))}),(function(e){var t=e.layout;return Le(t)&&"5rem"}),(function(e){var t=e.layout;return!Le(t)&&"5rem"}),D,P),Fe=a.c.div(Ie||(Ie=g(["\n  margin: ",";\n  display: grid;\n  grid-template-rows: ",";\n  justify-items: center;\n  align-items: center;\n  ",";\n\n  > :first-child {\n    grid-column-start: ",";\n  }\n\n  .ch-control-bar-item-iconButton {\n\n    .ch-icon {\n      width: 1.5rem;\n      height: 1.5rem;\n      border-radius: 100%;\n    }\n  }\n\n  .ch-control-bar-item-caret {\n    width: 1.25rem;\n    height: 1.25rem;\n    padding: 0;\n\n    .ch-icon {\n      width: 100%;\n      height: 100%;\n    }\n\n    // setting this transform on the shape so we\n    // don't overwrite the rotate transform on the Caret\n    .Svg g {\n      transform: scale(1.333);\n      transform-origin: 50% 50%;\n    }\n  }\n\n  .ch-control-bar-popover {\n    background-color: inherit;\n    grid-column-start: ",";\n    color: ",";\n\n    .isOpen.ch-control-bar-item-caret {\n      color: ",";\n    }\n  }\n\n  .ch-control-bar-item-label {\n    color: ",";\n    grid-row-start: 2;\n    font-size: ","; /* TODO: get updated font size from design */\n    padding-top: 0.25rem;\n    justify-self: center;\n    grid-column: ",";\n  }\n\n  "," {\n    justify-content: space-around;\n    button ~ span {\n      display: none;\n    }\n  }\n\n  "," {\n    margin: ",";\n    button ~ span {\n      display: none;\n    }\n  }\n"],["\n  margin: ",";\n  display: grid;\n  grid-template-rows: ",";\n  justify-items: center;\n  align-items: center;\n  ",";\n\n  > :first-child {\n    grid-column-start: ",";\n  }\n\n  .ch-control-bar-item-iconButton {\n\n    .ch-icon {\n      width: 1.5rem;\n      height: 1.5rem;\n      border-radius: 100%;\n    }\n  }\n\n  .ch-control-bar-item-caret {\n    width: 1.25rem;\n    height: 1.25rem;\n    padding: 0;\n\n    .ch-icon {\n      width: 100%;\n      height: 100%;\n    }\n\n    // setting this transform on the shape so we\n    // don't overwrite the rotate transform on the Caret\n    .Svg g {\n      transform: scale(1.333);\n      transform-origin: 50% 50%;\n    }\n  }\n\n  .ch-control-bar-popover {\n    background-color: inherit;\n    grid-column-start: ",";\n    color: ",";\n\n    .isOpen.ch-control-bar-item-caret {\n      color: ",";\n    }\n  }\n\n  .ch-control-bar-item-label {\n    color: ",";\n    grid-row-start: 2;\n    font-size: ","; /* TODO: get updated font size from design */\n    padding-top: 0.25rem;\n    justify-self: center;\n    grid-column: ",";\n  }\n\n  "," {\n    justify-content: space-around;\n    button ~ span {\n      display: none;\n    }\n  }\n\n  "," {\n    margin: ",";\n    button ~ span {\n      display: none;\n    }\n  }\n"])),(function(e){var t=e.layout;return Le(t)?"0.625rem 0":"0 0.625rem"}),(function(e){return e.showLabels?"1.5rem 1rem":"1.5rem"}),(function(e){var t=e.popOver,n=e.layout,r=e.children;return"\n    "+(!Le(n)&&(t||r)&&De||"")+"\n    "+(Le(n)&&(t||r)&&Ne||"")+"\n  "}),(function(e){var t=e.layout,n=e.popOver,r=e.children;return Le(t)&&(n||r)?"2":"1"}),(function(e){var t=e.layout,n=e.popOver,r=e.children;return Le(t)&&(n||r)?"2":"1"}),(function(e){return e.theme.controlBar.text}),(function(e){return e.theme.colors.primary.main}),(function(e){return e.theme.controlBar.text}),(function(e){return e.theme.fontSizes.footnote.fontSize}),(function(e){var t=e.layout,n=e.popOver,r=e.children;return Le(t)&&(n||r)?"2":"1"}),(function(e){return e.theme.mediaQueries.max.sm}),(function(e){return e.theme.mediaQueries.max.xs}),(function(e){var t=e.layout;return Le(t)?"0.75rem 0":"0"})),Ue=function(e){var t=e.tag,n=e.layout,r=e.showLabels,a=void 0!==r&&r,o=e.responsive,s=void 0===o||o,l=e.className,c=e.children,u=h(e,["tag","layout","showLabels","responsive","className","children"]),f={layout:n,showLabels:a};return i.a.createElement(Me.Provider,{value:f},i.a.createElement(je,d({className:l||"",responsive:s,as:t},f,{"data-testid":"control-bar"},u),c))},He=Object(r.createContext)(),ze=Object(r.createContext)();function Ve(e){var t=e.children,n=Object(r.useState)(null),i=n[0],a=n[1];return Object(r.useEffect)((function(){return function(){a(null)}}),[a]),Object(r.createElement)(He.Provider,{value:i},Object(r.createElement)(ze.Provider,{value:a},t))}var We=function(e){return Array.isArray(e)?e[0]:e},Ge=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},qe=function(e,t){if("function"==typeof e)return Ge(e,t);null!=e&&(e.current=t)},Ye=function(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})},Ke="undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,Xe="top",Qe="bottom",$e="right",Je="left",Ze=[Xe,Qe,$e,Je],et=Ze.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),tt=[].concat(Ze,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),nt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function rt(e){return e?(e.nodeName||"").toLowerCase():null}function it(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function at(e){return e instanceof it(e).Element||e instanceof Element}function ot(e){return e instanceof it(e).HTMLElement||e instanceof HTMLElement}function st(e){return"undefined"!=typeof ShadowRoot&&(e instanceof it(e).ShadowRoot||e instanceof ShadowRoot)}var lt={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];ot(i)&&rt(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});ot(r)&&rt(r)&&(Object.assign(r.style,a),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function ct(e){return e.split("-")[0]}function ut(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function dt(e){var t=ut(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=.5&&(n=t.width),Math.abs(t.height-r)<=.5&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ht(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&st(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ft(e){return it(e).getComputedStyle(e)}function pt(e){return["table","td","th"].indexOf(rt(e))>=0}function mt(e){return((at(e)?e.ownerDocument:e.document)||window.document).documentElement}function gt(e){return"html"===rt(e)?e:e.assignedSlot||e.parentNode||(st(e)?e.host:null)||mt(e)}function vt(e){return ot(e)&&"fixed"!==ft(e).position?e.offsetParent:null}function bt(e){for(var t=it(e),n=vt(e);n&&pt(n)&&"static"===ft(n).position;)n=vt(n);return n&&("html"===rt(n)||"body"===rt(n)&&"static"===ft(n).position)?t:n||function(e){for(var t=navigator.userAgent.toLowerCase().includes("firefox"),n=gt(e);ot(n)&&["html","body"].indexOf(rt(n))<0;){var r=ft(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||["transform","perspective"].includes(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function yt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var At=Math.max,_t=Math.min,wt=Math.round;function Et(e,t,n){return At(e,_t(t,n))}function St(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Ct(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kt(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,o=e.position,s=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,u=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:wt(wt(t*r)/r)||0,y:wt(wt(n*r)/r)||0}}(a):"function"==typeof c?c(a):a,d=u.x,h=void 0===d?0:d,f=u.y,p=void 0===f?0:f,m=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),v=Je,b=Xe,y=window;if(l){var A=bt(n),_="clientHeight",w="clientWidth";A===it(n)&&"static"!==ft(A=mt(n)).position&&(_="scrollHeight",w="scrollWidth"),i===Xe&&(b=Qe,p-=A[_]-r.height,p*=s?1:-1),i===Je&&(v=$e,h-=A[w]-r.width,h*=s?1:-1)}var E,S=Object.assign({position:o},l&&Tt);return s?Object.assign({},S,((E={})[b]=g?"0":"",E[v]=m?"0":"",E.transform=(y.devicePixelRatio||1)<2?"translate("+h+"px, "+p+"px)":"translate3d("+h+"px, "+p+"px, 0)",E)):Object.assign({},S,((t={})[b]=g?p+"px":"",t[v]=m?h+"px":"",t.transform="",t))}var xt={passive:!0};var Ot={left:"right",right:"left",bottom:"top",top:"bottom"};function It(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ot[e]}))}var Mt={start:"end",end:"start"};function Pt(e){return e.replace(/start|end/g,(function(e){return Mt[e]}))}function Dt(e){var t=it(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Nt(e){return ut(mt(e)).left+Dt(e).scrollLeft}function Lt(e){var t=ft(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Rt(e,t){var n;void 0===t&&(t=[]);var r=function e(t){return["html","body","#document"].indexOf(rt(t))>=0?t.ownerDocument.body:ot(t)&&Lt(t)?t:e(gt(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=it(r),o=i?[a].concat(a.visualViewport||[],Lt(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(Rt(gt(o)))}function Bt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jt(e,t){return"viewport"===t?Bt(function(e){var t=it(e),n=mt(e),r=t.visualViewport,i=n.clientWidth,a=n.clientHeight,o=0,s=0;return r&&(i=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=r.offsetLeft,s=r.offsetTop)),{width:i,height:a,x:o+Nt(e),y:s}}(e)):ot(t)?function(e){var t=ut(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}(t):Bt(function(e){var t,n=mt(e),r=Dt(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=At(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=At(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Nt(e),l=-r.scrollTop;return"rtl"===ft(i||n).direction&&(s+=At(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}(mt(e)))}function Ft(e,t,n){var r="clippingParents"===t?function(e){var t=Rt(gt(e)),n=["absolute","fixed"].indexOf(ft(e).position)>=0&&ot(e)?bt(e):e;return at(n)?t.filter((function(e){return at(e)&&ht(e,n)&&"body"!==rt(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],o=i.reduce((function(t,n){var r=jt(e,n);return t.top=At(r.top,t.top),t.right=_t(r.right,t.right),t.bottom=_t(r.bottom,t.bottom),t.left=At(r.left,t.left),t}),jt(e,a));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Ut(e){return e.split("-")[1]}function Ht(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?ct(i):null,o=i?Ut(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(a){case Xe:t={x:s,y:n.y-r.height};break;case Qe:t={x:s,y:n.y+n.height};break;case $e:t={x:n.x+n.width,y:l};break;case Je:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?yt(a):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case"start":t[c]=t[c]-(n[u]/2-r[u]/2);break;case"end":t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function zt(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,a=n.boundary,o=void 0===a?"clippingParents":a,s=n.rootBoundary,l=void 0===s?"viewport":s,c=n.elementContext,u=void 0===c?"popper":c,d=n.altBoundary,h=void 0!==d&&d,f=n.padding,p=void 0===f?0:f,m=St("number"!=typeof p?p:Ct(p,Ze)),g="popper"===u?"reference":"popper",v=e.elements.reference,b=e.rects.popper,y=e.elements[h?g:u],A=Ft(at(y)?y:y.contextElement||mt(e.elements.popper),o,l),_=ut(v),w=Ht({reference:_,element:b,strategy:"absolute",placement:i}),E=Bt(Object.assign({},b,w)),S="popper"===u?E:_,C={top:A.top-S.top+m.top,bottom:S.bottom-A.bottom+m.bottom,left:A.left-S.left+m.left,right:S.right-A.right+m.right},T=e.modifiersData.offset;if("popper"===u&&T){var k=T[i];Object.keys(C).forEach((function(e){var t=[$e,Qe].indexOf(e)>=0?1:-1,n=[Xe,Qe].indexOf(e)>=0?"y":"x";C[e]+=k[n]*t}))}return C}function Vt(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?tt:l,u=Ut(r),d=u?s?et:et.filter((function(e){return Ut(e)===u})):Ze,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=zt(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[ct(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}function Wt(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 Gt(e){return[Xe,$e,Qe,Je].some((function(t){return e[t]>=0}))}function qt(e,t,n){void 0===n&&(n=!1);var r,i,a=mt(t),o=ut(e),s=ot(t),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&(("body"!==rt(t)||Lt(a))&&(l=(r=t)!==it(r)&&ot(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:Dt(r)),ot(t)?((c=ut(t)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Nt(a))),{x:o.left+l.scrollLeft-c.x,y:o.top+l.scrollTop-c.y,width:o.width,height:o.height}}function Yt(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(r){if(!n.has(r)){var i=t.get(r);i&&e(i)}})),r.push(i)}(e)})),r}var Kt={placement:"bottom",modifiers:[],strategy:"absolute"};function Xt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Qt(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,a=void 0===i?Kt:i;return function(e,t,n){void 0===n&&(n=a);var i,o,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Kt,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(n){d(),s.options=Object.assign({},a,s.options,n),s.scrollParents={reference:at(e)?Rt(e):e.contextElement?Rt(e.contextElement):[],popper:Rt(t)};var i=function(e){var t=Yt(e);return nt.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var a=i({state:s,name:t,instance:u,options:r});l.push(a||function(){})}})),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(Xt(t,n)){s.rects={reference:qt(t,bt(n),"fixed"===s.options.strategy),popper:dt(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var i=s.orderedModifiers[r],a=i.fn,o=i.options,l=void 0===o?{}:o,d=i.name;"function"==typeof a&&(s=a({state:s,options:l,name:d,instance:u})||s)}else s.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(s)}))},function(){return o||(o=new Promise((function(e){Promise.resolve().then((function(){o=void 0,e(i())}))}))),o}),destroy:function(){d(),c=!0}};if(!Xt(e,t))return u;function d(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var $t=Qt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=void 0===i||i,o=r.resize,s=void 0===o||o,l=it(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,xt)})),s&&l.addEventListener("resize",n.update,xt),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,xt)})),s&&l.removeEventListener("resize",n.update,xt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Ht({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,a=n.adaptive,o=void 0===a||a,s=n.roundOffsets,l=void 0===s||s,c={placement:ct(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,kt(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,kt(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},lt,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=tt.reduce((function(e,n){return e[n]=function(e,t,n){var r=ct(e),i=[Je,Xe].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Je,$e].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,a),e}),{}),s=o[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=ct(g),b=l||(v===g||!p?[It(g)]:function(e){if("auto"===ct(e))return[];var t=It(e);return[Pt(e),t,Pt(t)]}(g)),y=[g].concat(b).reduce((function(e,n){return e.concat("auto"===ct(n)?Vt(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),A=t.rects.reference,_=t.rects.popper,w=new Map,E=!0,S=y[0],C=0;C<y.length;C++){var T=y[C],k=ct(T),x="start"===Ut(T),O=[Xe,Qe].indexOf(k)>=0,I=O?"width":"height",M=zt(t,{placement:T,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),P=O?x?$e:Je:x?Qe:Xe;A[I]>_[I]&&(P=It(P));var D=It(P),N=[];if(a&&N.push(M[k]<=0),s&&N.push(M[P]<=0,M[D]<=0),N.every((function(e){return e}))){S=T,E=!1;break}w.set(T,N)}if(E)for(var L=function(e){var t=y.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},R=p?3:1;R>0;R--){if("break"===L(R))break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,m=void 0===p?0:p,g=zt(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=ct(t.placement),b=Ut(t.placement),y=!b,A=yt(v),_="x"===A?"y":"x",w=t.modifiersData.popperOffsets,E=t.rects.reference,S=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T={x:0,y:0};if(w){if(a||s){var k="y"===A?Xe:Je,x="y"===A?Qe:$e,O="y"===A?"height":"width",I=w[A],M=w[A]+g[k],P=w[A]-g[x],D=f?-S[O]/2:0,N="start"===b?E[O]:S[O],L="start"===b?-S[O]:-E[O],R=t.elements.arrow,B=f&&R?dt(R):{width:0,height:0},j=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},F=j[k],U=j[x],H=Et(0,E[O],B[O]),z=y?E[O]/2-D-H-F-C:N-H-F-C,V=y?-E[O]/2+D+H+U+C:L+H+U+C,W=t.elements.arrow&&bt(t.elements.arrow),G=W?"y"===A?W.clientTop||0:W.clientLeft||0:0,q=t.modifiersData.offset?t.modifiersData.offset[t.placement][A]:0,Y=w[A]+z-q-G,K=w[A]+V-q;if(a){var X=Et(f?_t(M,Y):M,I,f?At(P,K):P);w[A]=X,T[A]=X-I}if(s){var Q="x"===A?Xe:Je,$="x"===A?Qe:$e,J=w[_],Z=J+g[Q],ee=J-g[$],te=Et(f?_t(Z,Y):Z,J,f?At(ee,K):ee);w[_]=te,T[_]=te-J}}t.modifiersData[r]=T}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=ct(n.placement),l=yt(s),c=[Je,$e].indexOf(s)>=0?"height":"width";if(a&&o){var u=function(e,t){return St("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ct(e,Ze))}(i.padding,n),d=dt(a),h="y"===l?Xe:Je,f="y"===l?Qe:$e,p=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],m=o[l]-n.rects.reference[l],g=bt(a),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,y=u[h],A=v-d[c]-u[f],_=v/2-d[c]/2+b,w=Et(y,_,A),E=l;n.modifiersData[r]=((t={})[E]=w,t.centerOffset=w-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ht(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=zt(t,{elementContext:"reference"}),s=zt(t,{altBoundary:!0}),l=Wt(o,r),c=Wt(s,i,a),u=Gt(l),d=Gt(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Jt="undefined"!=typeof Element,Zt="function"==typeof Map,en="function"==typeof Set,tn="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;var nn=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(Zt&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o=t.entries();!(i=o.next()).done;)if(!n.has(i.value[0]))return!1;for(o=t.entries();!(i=o.next()).done;)if(!e(i.value[1],n.get(i.value[0])))return!1;return!0}if(en&&t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o=t.entries();!(i=o.next()).done;)if(!n.has(i.value[0]))return!1;return!0}if(tn&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;if(Jt&&t instanceof Element)return!1;for(i=r;0!=i--;)if(("_owner"!==a[i]&&"__v"!==a[i]&&"__o"!==a[i]||!t.$$typeof)&&!e(t[a[i]],n[a[i]]))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}},rn=[],an=function(){},on=function(){return Promise.resolve(null)},sn=[];function ln(e){var t=e.placement,n=void 0===t?"bottom":t,i=e.strategy,a=void 0===i?"absolute":i,o=e.modifiers,s=void 0===o?sn:o,l=e.referenceElement,c=e.onFirstUpdate,u=e.innerRef,d=e.children,h=Object(r.useContext)(He),f=Object(r.useState)(null),p=f[0],m=f[1],g=Object(r.useState)(null),v=g[0],b=g[1];Object(r.useEffect)((function(){qe(u,p)}),[u,p]);var y=Object(r.useMemo)((function(){return{placement:n,strategy:a,onFirstUpdate:c,modifiers:[].concat(s,[{name:"arrow",enabled:null!=v,options:{element:v}}])}}),[n,a,c,s,v]),A=function(e,t,n){void 0===n&&(n={});var i=Object(r.useRef)(null),a={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||rn},o=Object(r.useState)({styles:{popper:{position:a.strategy,left:"0",top:"0"}},attributes:{}}),s=o[0],l=o[1],c=Object(r.useMemo)((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);l({styles:Ye(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:Ye(n.map((function(e){return[e,t.attributes[e]]})))})},requires:["computeStyles"]}}),[]),u=Object(r.useMemo)((function(){var e={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[c,{name:"applyStyles",enabled:!1}])};return nn(i.current,e)?i.current||e:(i.current=e,e)}),[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,c]),d=Object(r.useRef)();return Ke((function(){d.current&&d.current.setOptions(u)}),[u]),Ke((function(){if(null!=e&&null!=t){var r=(n.createPopper||$t)(e,t,u);return d.current=r,function(){r.destroy(),d.current=null}}}),[e,t,n.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}}(l||h,p,y),_=A.state,w=A.styles,E=A.forceUpdate,S=A.update,C=Object(r.useMemo)((function(){return{ref:m,style:w.popper,placement:_?_.placement:n,hasPopperEscaped:_&&_.modifiersData.hide?_.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:_&&_.modifiersData.hide?_.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:w.arrow,ref:b},forceUpdate:E||an,update:S||on}}),[m,b,n,_,w,S,E]);return We(d)(C)}var cn=function(){},un=cn;function dn(e){var t=e.children,n=e.innerRef,i=Object(r.useContext)(ze),a=Object(r.useCallback)((function(e){qe(n,e),Ge(i,e)}),[n,i]);return Object(r.useEffect)((function(){return function(){return qe(n,null)}})),Object(r.useEffect)((function(){un(Boolean(i),"`Reference` should not be used outside of a `Manager` component.")}),[i]),We(t)({ref:a})}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self;function hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fn(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var pn=fn((function(e){
/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var a=typeof i;if("string"===a||"number"===a)e.push(i);else if(Array.isArray(i)){if(i.length){var o=n.apply(null,i);o&&e.push(o)}}else if("object"===a)if(i.toString===Object.prototype.toString)for(var s in i)t.call(i,s)&&i[s]&&e.push(s);else e.push(i.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()})),mn=9,gn=27,vn=38,bn=40,yn="360p (nHD) @ 15 fps (600 Kbps max)",An="540p (qHD) @ 15 fps (1.4 Mbps max)",_n="720p (HD) @ 15 fps (1.4 Mbps max)";function wn(e,t){var n=function(n){(function(t){return!!e.current&&!e.current.contains(t.target)})(n)&&t&&t(n)};Object(r.useEffect)((function(){return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),function(){document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}))}function En(e,t){var n=function(n){if(9===n.keyCode&&e.current&&!e.current.contains(document.activeElement))return t(n)};Object(r.useEffect)((function(){return document.addEventListener("keyup",n),function(){document.removeEventListener("keyup",n)}}))}var Sn,Cn,Tn,kn,xn,On,In,Mn,Pn,Dn,Nn,Ln,Rn,Bn,jn,Fn,Un=a.c.ul(Sn||(Sn=g(["\n  width: fit-content;\n  max-width: 22rem;\n  background-color: ",";\n  border: ",";\n  margin: 0;\n  border-radius: 0.25rem;\n  backdrop-filter: blur(1rem);\n  list-style: none;\n  padding: 0.5rem 0;\n  box-shadow: ",";\n  z-index: ",";\n  display: table;\n  overflow: inherit;\n"],["\n  width: fit-content;\n  max-width: 22rem;\n  background-color: ",";\n  border: ",";\n  margin: 0;\n  border-radius: 0.25rem;\n  backdrop-filter: blur(1rem);\n  list-style: none;\n  padding: 0.5rem 0;\n  box-shadow: ",";\n  z-index: ",";\n  display: table;\n  overflow: inherit;\n"])),(function(e){return e.theme.popOver.menuBgd}),(function(e){return e.theme.popOver.menuBorder}),(function(e){return e.theme.popOver.shadow}),(function(e){return e.theme.zIndex.popOver})),Hn=a.c.button(Cn||(Cn=g(["\n  background-color: transparent;\n  padding: 0;\n  border: none;\n  cursor: pointer;\n  &:focus {\n    outline: 0;\n  }\n"],["\n  background-color: transparent;\n  padding: 0;\n  border: none;\n  cursor: pointer;\n  &:focus {\n    outline: 0;\n  }\n"]))),zn=a.c.li(Tn||(Tn=g(["\n  height: 2rem;\n  position: relative;\n\n  button,\n  a {\n    width: 100%;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    border: none;\n    cursor: pointer;\n    background-color: ",";\n    color: ",";\n    line-height: ",";\n    font-size: ",";\n    padding: 0 2.5rem;\n    text-decoration: none;\n    outline: 0;\n\n    &:hover,\n    &:focus {\n      background-color: ",";\n      color: ",";\n      outline: 0;\n    }\n\n    &:disabled {\n      color: ",";\n    }\n  }\n\n  a {\n    width: unset;\n  }\n\n  .ch-content > * {\n    ",";\n  }\n\n  .ch-check {\n    position: absolute;\n    left: 0.5rem;\n    width: 1.5rem;\n    height: 1.5rem;\n    top: 0.33rem;\n  }\n\n  &:hover .ch-check g,\n  &:focus .ch-check g {\n    fill: ",";\n  }\n"],["\n  height: 2rem;\n  position: relative;\n\n  button,\n  a {\n    width: 100%;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    border: none;\n    cursor: pointer;\n    background-color: ",";\n    color: ",";\n    line-height: ",";\n    font-size: ",";\n    padding: 0 2.5rem;\n    text-decoration: none;\n    outline: 0;\n\n    &:hover,\n    &:focus {\n      background-color: ",";\n      color: ",";\n      outline: 0;\n    }\n\n    &:disabled {\n      color: ",";\n    }\n  }\n\n  a {\n    width: unset;\n  }\n\n  .ch-content > * {\n    ",";\n  }\n\n  .ch-check {\n    position: absolute;\n    left: 0.5rem;\n    width: 1.5rem;\n    height: 1.5rem;\n    top: 0.33rem;\n  }\n\n  &:hover .ch-check g,\n  &:focus .ch-check g {\n    fill: ",";\n  }\n"])),(function(e){return e.theme.popOver.itemBgd}),(function(e){return e.theme.popOver.itemText}),(function(e){return e.theme.fontSizes.text.lineHeight}),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.popOver.active.itemBgd}),(function(e){return e.theme.popOver.active.itemText}),(function(e){return e.theme.popOver.disabled}),B,(function(e){return e.theme.popOver.active.itemText})),Vn=(Object(a.c)(zn)(kn||(kn=g(["\n  > span {\n    width: 100%;\n    height: 100%;\n    display: block;\n    height: 2rem;\n  }\n\n  > button {\n    position: relative;\n  }\n\n  .ch-caret {\n    position: absolute;\n    width: 1.5rem;\n    height: 1.5rem;\n    right: 0;\n    color: inherit;\n    fill: inherit;\n  }\n"],["\n  > span {\n    width: 100%;\n    height: 100%;\n    display: block;\n    height: 2rem;\n  }\n\n  > button {\n    position: relative;\n  }\n\n  .ch-caret {\n    position: absolute;\n    width: 1.5rem;\n    height: 1.5rem;\n    right: 0;\n    color: inherit;\n    fill: inherit;\n  }\n"]))),a.c.header(xn||(xn=g(["\n  border-bottom: 0.0625rem solid ",";\n  margin-bottom: 0.75rem;\n  max-width: 22rem;\n\n  img {\n    width: 100%;\n    display: inline-block;\n    margin-top: -0.5rem;\n    border-radius: 0.25rem 0.25rem 0 0;\n  }\n\n  img + .ch-title {\n    margin-top: 0.75rem;\n  }\n\n  .ch-title {\n    ",";\n    padding: 0 2.5rem;\n    margin-top: 0.5rem;\n    margin-bottom: 0;\n    color: ",";\n    font-size: 1.18125rem;\n    line-height: ",";\n  }\n\n  .ch-subtitle {\n    ",";\n    padding: 0 2.5rem;\n    color: #616672;\n    font-size: ",";\n    line-height: ",";\n    line-height: 1.43;\n    margin: 0 0 1rem;\n  }\n"],["\n  border-bottom: 0.0625rem solid ",";\n  margin-bottom: 0.75rem;\n  max-width: 22rem;\n\n  img {\n    width: 100%;\n    display: inline-block;\n    margin-top: -0.5rem;\n    border-radius: 0.25rem 0.25rem 0 0;\n  }\n\n  img + .ch-title {\n    margin-top: 0.75rem;\n  }\n\n  .ch-title {\n    ",";\n    padding: 0 2.5rem;\n    margin-top: 0.5rem;\n    margin-bottom: 0;\n    color: ",";\n    font-size: 1.18125rem;\n    line-height: ",";\n  }\n\n  .ch-subtitle {\n    ",";\n    padding: 0 2.5rem;\n    color: #616672;\n    font-size: ",";\n    line-height: ",";\n    line-height: 1.43;\n    margin: 0 0 1rem;\n  }\n"])),(function(e){return e.theme.popOver.separator}),B,(function(e){return e.theme.popOver.titleText}),(function(e){return e.theme.fontSizes.text.lineHeight}),B,(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.fontSizes.text.lineHeight})),a.c.li(On||(On=g(["\n  margin: 0;\n  border-width: 0.0625rem 0 0 0;\n  border-style: solid;\n  border-color: ",";\n  margin-bottom: 0.75rem;\n  opacity: 0.8;\n"],["\n  margin: 0;\n  border-width: 0.0625rem 0 0 0;\n  border-style: solid;\n  border-color: ",";\n  margin-bottom: 0.75rem;\n  opacity: 0.8;\n"])),(function(e){return e.theme.popOver.separator}))),Wn=function(e){return e.querySelectorAll("button, [href]")},Gn=function(e){var t=e.renderButton,n=e.renderButtonWrapper,a=e.onPopOverClick,o=e.children,s=e.isSubMenu,l=void 0!==s&&s,c=e.placement,u=void 0===c?"bottom-start":c,f=e.a11yLabel,p=e.className,m=e.closeOnClick,g=void 0===m||m,v=h(e,["renderButton","renderButtonWrapper","onPopOverClick","children","isSubMenu","placement","a11yLabel","className","closeOnClick"]),b=Object(r.createRef)(),y=Object(r.useState)(!1),A=y[0],_=y[1];Object(r.useEffect)((function(){if(A&&b.current){var e=Wn(b.current);e&&e[0].focus()}}),[A]);var w=function(e){var t=b.current;if(!l&&t)for(var n=Wn(t),r=document.activeElement,i=0;i<n.length;i++)if(n[i]===r){if("down"===e&&i!==n.length-1)return n[i+1].focus();if("up"===e&&i>0)return n[i-1].focus();break}},E=function(){_(!A),a&&a(A)};return wn(b,(function(){return _(!1)})),En(b,(function(){return _(!1)})),i.a.createElement("span",{ref:b,onKeyDown:function(e){switch(e.keyCode){case gn:return _(!1);case vn:return w("up");case bn:return w("down")}},"data-testid":"popover"},i.a.createElement(Ve,null,i.a.createElement(dn,null,(function(e){var r={ref:e.ref,className:pn(p,"ch-popover-toggle"),onClick:E,"data-menu":l?"submenu":null,"aria-label":f,"aria-haspopup":!0,"aria-expanded":A,"data-testid":"popover-toggle"};if(t)return i.a.createElement(Hn,d({},r),t(A));if(n){var a=r.ref,o=h(r,["ref"]);return i.a.createElement("span",{ref:a},n(A,o))}return null})),A&&i.a.createElement(ln,d({placement:u,modifiers:[{name:"offset",options:{offset:[-8,0]}}]},v),(function(e){var t=e.ref,n=e.style,r=e.placement;return i.a.createElement(Un,{"data-placement":r,onClick:function(e){return function(e){if(g)return!e.target.closest("[data-menu='submenu']")&&_(!1)}(e)},ref:t,style:n,"data-testid":"menu",className:"ch-popover-menu"},o)}))))},qn=function(e){var t=e.as,n=void 0===t?"button":t,r=e.children,a=e.checked,o=e.testId,s=void 0===o?"popover-item":o,l=h(e,["as","children","checked","testId"]),c=n;return i.a.createElement(zn,{"data-testid":s},a&&i.a.createElement(ue,{className:"ch-check","data-testid":"popover-check"}),i.a.createElement(c,d({className:"ch-content"},l),r))},Yn=Object(a.b)(In||(In=g(["\n  top: calc(\n    ","px -\n      ","rem\n  );\n  left: ","px;\n  transform: translateX(-50%) translateY(-50%);\n\n  &::before {\n    transform: rotateZ(180deg);\n    top: 100%;\n    left: calc(50% - ","rem);\n  }\n"],["\n  top: calc(\n    ","px -\n      ","rem\n  );\n  left: ","px;\n  transform: translateX(-50%) translateY(-50%);\n\n  &::before {\n    transform: rotateZ(180deg);\n    top: 100%;\n    left: calc(50% - ","rem);\n  }\n"])),(function(e){var t,n;return null!==(n=null===(t=e.bounds)||void 0===t?void 0:t.top)&&void 0!==n?n:0}),1.75,(function(e){var t,n,r,i;return((null!==(n=null===(t=e.bounds)||void 0===t?void 0:t.left)&&void 0!==n?n:0)+(null!==(i=null===(r=e.bounds)||void 0===r?void 0:r.right)&&void 0!==i?i:0))/2}),.5),Kn=Object(a.b)(Mn||(Mn=g(["\n  top: calc(\n    ","px +\n      ","rem\n  );\n  left: ","px;\n  transform: translateX(-50%) translateY(-50%);\n\n  &::before {\n    transform: rotateZ(0deg);\n    top: -","rem;\n    left: calc(50% - ","rem);\n  }\n"],["\n  top: calc(\n    ","px +\n      ","rem\n  );\n  left: ","px;\n  transform: translateX(-50%) translateY(-50%);\n\n  &::before {\n    transform: rotateZ(0deg);\n    top: -","rem;\n    left: calc(50% - ","rem);\n  }\n"])),(function(e){var t,n;return null!==(n=null===(t=e.bounds)||void 0===t?void 0:t.bottom)&&void 0!==n?n:0}),1.75,(function(e){var t,n,r,i;return((null!==(n=null===(t=e.bounds)||void 0===t?void 0:t.left)&&void 0!==n?n:0)+(null!==(i=null===(r=e.bounds)||void 0===r?void 0:r.right)&&void 0!==i?i:0))/2}),.5,.5),Xn=Object(a.b)(Pn||(Pn=g(["\n  top: ","px;\n  left: calc(\n    ","px - ","rem\n  );\n  transform: translateY(-50%) translateX(-100%);\n\n  &::before {\n    transform: rotateZ(90deg);\n    top: calc(50% - ","rem);\n    left: calc(100% - ","rem);\n  }\n"],["\n  top: ","px;\n  left: calc(\n    ","px - ","rem\n  );\n  transform: translateY(-50%) translateX(-100%);\n\n  &::before {\n    transform: rotateZ(90deg);\n    top: calc(50% - ","rem);\n    left: calc(100% - ","rem);\n  }\n"])),(function(e){var t,n,r,i;return((null!==(n=null===(t=e.bounds)||void 0===t?void 0:t.top)&&void 0!==n?n:0)+(null!==(i=null===(r=e.bounds)||void 0===r?void 0:r.bottom)&&void 0!==i?i:0))/2}),(function(e){var t,n;return null!==(n=null===(t=e.bounds)||void 0===t?void 0:t.left)&&void 0!==n?n:0}),.75,.25,.25),Qn=Object(a.b)(Dn||(Dn=g(["\n  top: ","px;\n  left: calc(\n    ","px + ","rem\n  );\n  transform: translateY(-50%);\n\n  &::before {\n    transform: rotateZ(270deg);\n    top: calc(50% - ","rem);\n    left: -","rem;\n  }\n"],["\n  top: ","px;\n  left: calc(\n    ","px + ","rem\n  );\n  transform: translateY(-50%);\n\n  &::before {\n    transform: rotateZ(270deg);\n    top: calc(50% - ","rem);\n    left: -","rem;\n  }\n"])),(function(e){var t,n,r,i;return((null!==(n=null===(t=e.bounds)||void 0===t?void 0:t.top)&&void 0!==n?n:0)+(null!==(i=null===(r=e.bounds)||void 0===r?void 0:r.bottom)&&void 0!==i?i:0))/2}),(function(e){var t,n;return null!==(n=null===(t=e.bounds)||void 0===t?void 0:t.right)&&void 0!==n?n:0}),.75,.25,.75),$n=a.c.span(Nn||(Nn=g(["\n  @keyframes fadeIn {\n    0% {\n      opacity: 0;\n    }\n\n    100% {\n      opacity: 1;\n    }\n  }\n\n  position: fixed;\n  z-index: 9999;\n  color: white;\n  white-space: nowrap;\n  pointer-events: none;\n  line-height: normal;\n  background-color: rgba(0, 0, 0, 0.8);\n  border-radius: ","rem;\n  font-size: ","rem;\n  font-weight: 300;\n  padding: ","rem ","rem;\n  white-space: nowrap;\n  animation: fadeIn 0.3s;\n\n  &::before {\n    border-bottom: ","rem solid rgba(0, 0, 0, 0.8);\n    border-left: ","rem solid transparent;\n    border-right: ","rem solid transparent;\n    content: '';\n    height: 0;\n    transform: translateX(-100%) translateY(-50%);\n    width: 0;\n    z-index: 1;\n    position: absolute;\n  }\n\n  ","\n  ","\n  ","\n  ","\n"],["\n  @keyframes fadeIn {\n    0% {\n      opacity: 0;\n    }\n\n    100% {\n      opacity: 1;\n    }\n  }\n\n  position: fixed;\n  z-index: 9999;\n  color: white;\n  white-space: nowrap;\n  pointer-events: none;\n  line-height: normal;\n  background-color: rgba(0, 0, 0, 0.8);\n  border-radius: ","rem;\n  font-size: ","rem;\n  font-weight: 300;\n  padding: ","rem ","rem;\n  white-space: nowrap;\n  animation: fadeIn 0.3s;\n\n  &::before {\n    border-bottom: ","rem solid rgba(0, 0, 0, 0.8);\n    border-left: ","rem solid transparent;\n    border-right: ","rem solid transparent;\n    content: '';\n    height: 0;\n    transform: translateX(-100%) translateY(-50%);\n    width: 0;\n    z-index: 1;\n    position: absolute;\n  }\n\n  ","\n  ","\n  ","\n  ","\n"])),.5,1,.5,.75,.5,.5,.5,(function(e){return"top"===e.position&&Yn}),(function(e){return"bottom"===e.position&&Kn}),(function(e){return"left"===e.position&&Xn}),(function(e){return"right"===e.position&&Qn})),Jn={show:!1,bounds:null},Zn=function(e,t){return function(n){var a,o=Object(r.useState)(Jn),s=o[0],c=s.show,u=s.bounds,h=o[1],f=Object(r.useState)(null),p=f[0],m=f[1],g=null!==(a=n.tooltipPosition)&&void 0!==a?a:"top",v=Object(r.useCallback)((function(e){e.preventDefault(),e.stopPropagation();for(var t=e.target;!t.getAttribute("data-tooltip");)t=t.parentElement;var n=t.getBoundingClientRect();h({show:!0,bounds:n})}),[]),b=Object(r.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),h(Jn)}),[]);return Object(r.useEffect)((function(){return document.addEventListener("scroll",b,!0),function(){return document.removeEventListener("scroll",b,!0)}}),[]),Object(r.useEffect)((function(){var e=document.getElementById(t||"Tooltip__container");e?m(e):console.warn("\n        Attempted to use 'WithTooltip' but could not find container element.\n        Pass a valid element ID or add 'Tooltip__container' ID to existing element\n      ")}),[t]),i.a.createElement(i.a.Fragment,null,c&&u&&p&&l.a.createPortal(i.a.createElement($n,{position:g,bounds:u},n.tooltipContent||n.label),p),i.a.createElement(e,d({},n,{"data-tooltip":!0,"data-tooltip-position":g,onClick:function(e){var t,r;c&&b(e),null===(r=null===(t=n)||void 0===t?void 0:t.onClick)||void 0===r||r.call(t,e)},onFocus:function(e){var t,r;c||v(e),null===(r=null===(t=n)||void 0===t?void 0:t.onFocus)||void 0===r||r.call(t,e)},onBlur:function(e){var t,r;c&&b(e),null===(r=null===(t=n)||void 0===t?void 0:t.onBlur)||void 0===r||r.call(t,e)},onMouseEnter:function(e){var t,r;c||v(e),null===(r=null===(t=n)||void 0===t?void 0:t.onMouseEnter)||void 0===r||r.call(t,e)},onMouseLeave:function(e){var t,r;c&&b(e),null===(r=null===(t=n)||void 0===t?void 0:t.onMouseLeave)||void 0===r||r.call(t,e)}})))}},er=function(e){var t=e.icon,n=e.onClick,a=e.label,o=e.isSelected,s=void 0!==o&&o,l=e.popOver,c=void 0===l?null:l,u=e.popOverPlacement,f=e.popOverLabel,p=e.tooltipContainerId,m=e.tooltipContent,g=e.children,v=h(e,["icon","onClick","label","isSelected","popOver","popOverPlacement","popOverLabel","tooltipContainerId","tooltipContent","children"]),b=Object(r.useContext)(Me),y=Object(r.useMemo)((function(){return Zn(K,p)}),[p]),A=v["data-tooltip"]?y:K,_=v["data-tooltip-position"]?{tooltipPosition:v["data-tooltip-position"],tooltipContent:m}:{};return i.a.createElement(Fe,d({isSelected:s,"data-testid":"control-bar-item"},v,b,{popOver:c}),i.a.createElement(A,d({},_,{onClick:n,label:a,icon:t,className:"ch-control-bar-item-iconButton",selected:s})),(c||g)&&i.a.createElement(Gn,{renderButtonWrapper:function(e,t){return i.a.createElement(K,d({},t,{icon:i.a.createElement(ne,{direction:Le(b.layout)?"right":"up","data-testid":"control-bar-item-caret"}),label:f||a,selected:e,className:"ch-control-bar-item-caret "+(e?"isOpen":"")}))},a11yLabel:a,className:"ch-control-bar-popover",placement:u},null==c?void 0:c.map((function(e,t){return i.a.createElement(qn,d({},e,{key:t}))})),g),b.showLabels&&i.a.createElement("div",{className:"ch-control-bar-item-label"},a))},tr=Object(a.b)(Ln||(Ln=g(["\n  display: flex;\n  width: 100%;\n  height: 100%;\n"],["\n  display: flex;\n  width: 100%;\n  height: 100%;\n"]))),nr={"fill-space":tr,"fill-space-centered":Object(a.b)(Rn||(Rn=g(["\n  ",";\n  align-items: center;\n  justify-content: center;\n"],["\n  ",";\n  align-items: center;\n  justify-content: center;\n"])),tr),"equal-columns":Object(a.b)(Bn||(Bn=g(["\n  display: flex;\n  flex-direction: row;\n  height: 100%;\n  align-items: stretch;\n\n  > * {\n    flex-grow: 1;\n    flex-basis: 50%;\n  }\n"],["\n  display: flex;\n  flex-direction: row;\n  height: 100%;\n  align-items: stretch;\n\n  > * {\n    flex-grow: 1;\n    flex-basis: 50%;\n  }\n"]))),stack:Object(a.b)(jn||(jn=g(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n\n  > * {\n    width: 100%;\n  }\n"],["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n\n  > * {\n    width: 100%;\n  }\n"])))},rr=a.c.div(Fn||(Fn=g(["\n  align-items: ",";\n  display: ",";\n  flex: ",";\n  flex-basis: ",";\n  flex-direction: ",";\n  flex-grow: ",";\n  flex-shrink: ",";\n  flex-wrap: ",";\n  justify-content: ",";\n\n  // layout variants\n  ","\n\n  ","\n  ","\n"],["\n  align-items: ",";\n  display: ",";\n  flex: ",";\n  flex-basis: ",";\n  flex-direction: ",";\n  flex-grow: ",";\n  flex-shrink: ",";\n  flex-wrap: ",";\n  justify-content: ",";\n\n  // layout variants\n  ","\n\n  ","\n  ","\n"])),(function(e){return e.alignItems}),(function(e){return e.container?"flex":"block"}),(function(e){return e.flex||""}),(function(e){return e.flexBasis}),(function(e){return e.flexDirection}),(function(e){return e.flexGrow||""}),(function(e){return e.flexShrink}),(function(e){return e.flexWrap}),(function(e){return e.justifyContent}),(function(e){return!!e.layout&&nr[e.layout]}),D,P),ir=function(e){var t=e.children,n=e.className,r=e.tag,a=e.alignItems,o=void 0===a?"stretch":a,s=e.container,l=void 0!==s&&s,c=e.flexBasis,u=void 0===c?"auto":c,f=e.flexDirection,p=void 0===f?"row":f,m=e.flexShrink,g=void 0===m?1:m,v=e.flexWrap,b=void 0===v?"nowrap":v,y=e.justifyContent,A=void 0===y?"flex-start":y,_=h(e,["children","className","tag","alignItems","container","flexBasis","flexDirection","flexShrink","flexWrap","justifyContent"]);return i.a.createElement(rr,d({alignItems:o,container:l,flexBasis:u,flexDirection:p,flexShrink:g,flexWrap:b,justifyContent:A,as:r,"data-testid":"flex",className:n||""},_),t)};function ar(){return Object(r.useState)((function(){return Object(c.a)()}))[0]}var or,sr,lr,cr,ur,dr,hr,fr,pr,mr=Object(a.b)(or||(or=g(["\n  &.ch-form-field-input,\n  &.ch-form-field-select,\n  &.ch-form-field-textarea {\n    display: flex;\n    flex-direction: column;\n\n    label {\n      display: block;\n      margin-bottom: 0.5rem;\n    }\n\n    input,\n    select {\n      width: 100%;\n    }\n  }\n\n  &.ch-form-field-checkbox {\n    display: grid;\n    grid-template-columns: 1.5rem 1fr;\n    grid-template-rows: auto;\n    gap: 0px 0.5rem;\n\n    .ch-checkbox {\n      grid-column: 1;\n      grid-row: 1;\n    }\n\n    .ch-checkbox-label {\n      line-height: 1.3;\n      grid-column: 2;\n    }\n\n    .ch-help-text {\n      grid-row: 2;\n      grid-column: 1/3;\n    }\n  }\n\n  &.ch-form-field-radiogroup {\n    flex-direction: column;\n\n    .ch-radio-wrapper {\n      display: block;\n      margin-bottom: 0.5rem;\n      padding-left: 0.125rem;\n      display: grid;\n      grid-template-columns: 1.5rem 1fr;\n      grid-template-rows: auto;\n\n      align-items: center;\n    }\n\n    .ch-radio-label {\n      margin-left: 1rem;\n      position: relative;\n      bottom: -0.5px;\n    }\n  }\n"],["\n  &.ch-form-field-input,\n  &.ch-form-field-select,\n  &.ch-form-field-textarea {\n    display: flex;\n    flex-direction: column;\n\n    label {\n      display: block;\n      margin-bottom: 0.5rem;\n    }\n\n    input,\n    select {\n      width: 100%;\n    }\n  }\n\n  &.ch-form-field-checkbox {\n    display: grid;\n    grid-template-columns: 1.5rem 1fr;\n    grid-template-rows: auto;\n    gap: 0px 0.5rem;\n\n    .ch-checkbox {\n      grid-column: 1;\n      grid-row: 1;\n    }\n\n    .ch-checkbox-label {\n      line-height: 1.3;\n      grid-column: 2;\n    }\n\n    .ch-help-text {\n      grid-row: 2;\n      grid-column: 1/3;\n    }\n  }\n\n  &.ch-form-field-radiogroup {\n    flex-direction: column;\n\n    .ch-radio-wrapper {\n      display: block;\n      margin-bottom: 0.5rem;\n      padding-left: 0.125rem;\n      display: grid;\n      grid-template-columns: 1.5rem 1fr;\n      grid-template-rows: auto;\n\n      align-items: center;\n    }\n\n    .ch-radio-label {\n      margin-left: 1rem;\n      position: relative;\n      bottom: -0.5px;\n    }\n  }\n"]))),gr={stack:mr,horizontal:Object(a.b)(sr||(sr=g(["\n  @media (max-width: 599px) {\n    ",";\n  }\n\n  @media (min-width: 600px) {\n    &.ch-form-field-input,\n    &.ch-form-field-select,\n    &.ch-form-field-textarea,\n    &.ch-form-field-checkbox {\n      display: grid;\n      grid-template-columns: 30% 1fr;\n      grid-template-rows: auto;\n      gap: 0px 0.5rem;\n      align-items: center;\n\n      input {\n        width: 100%;\n      }\n\n      .ch-help-text {\n        grid-column: 2;\n      }\n    }\n\n    &.ch-form-field-radiogroup {\n      flex-wrap: wrap;\n\n      fieldset {\n        width: 100%;\n      }\n\n      .ch-radio-wrapper {\n        display: grid;\n        grid-template-columns: 30% 1fr;\n        grid-template-rows: auto;\n        gap: 0px 0.5rem;\n        align-items: center;\n        margin-bottom: 0.5rem;\n      }\n\n      .ch-radio {\n        grid-column: 2;\n        grid-row: 1;\n        margin-top: -4px;\n      }\n\n      .ch-radio-label {\n        grid-column: 1;\n        padding-right: 1rem;\n        margin-left: 0;\n      }\n\n      .ch-help-text {\n        width: 100%;\n      }\n    }\n  }\n"],["\n  @media (max-width: 599px) {\n    ",";\n  }\n\n  @media (min-width: 600px) {\n    &.ch-form-field-input,\n    &.ch-form-field-select,\n    &.ch-form-field-textarea,\n    &.ch-form-field-checkbox {\n      display: grid;\n      grid-template-columns: 30% 1fr;\n      grid-template-rows: auto;\n      gap: 0px 0.5rem;\n      align-items: center;\n\n      input {\n        width: 100%;\n      }\n\n      .ch-help-text {\n        grid-column: 2;\n      }\n    }\n\n    &.ch-form-field-radiogroup {\n      flex-wrap: wrap;\n\n      fieldset {\n        width: 100%;\n      }\n\n      .ch-radio-wrapper {\n        display: grid;\n        grid-template-columns: 30% 1fr;\n        grid-template-rows: auto;\n        gap: 0px 0.5rem;\n        align-items: center;\n        margin-bottom: 0.5rem;\n      }\n\n      .ch-radio {\n        grid-column: 2;\n        grid-row: 1;\n        margin-top: -4px;\n      }\n\n      .ch-radio-label {\n        grid-column: 1;\n        padding-right: 1rem;\n        margin-left: 0;\n      }\n\n      .ch-help-text {\n        width: 100%;\n      }\n    }\n  }\n"])),mr),"input-only":Object(a.b)(lr||(lr=g(["\n  &.ch-form-field-input,\n  &.ch-form-field-select,\n  &.ch-form-field-textarea {\n    display: flex;\n    flex-direction: column;\n\n    input {\n      width: 100%;\n    }\n  }\n\n  &.ch-form-field-checkbox {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n\n    .ch-checkbox {\n      order: 1;\n    }\n\n    .ch-checkbox-label {\n      order: 2;\n      padding-left: 1rem;\n    }\n\n    .ch-help-text {\n      width: 100%;\n      order: 3;\n    }\n  }\n\n  &.ch-form-field-radiogroup {\n    flex-direction: column;\n\n    .ch-radio-wrapper {\n      display: block;\n      margin-bottom: 0.5rem;\n    }\n\n    .ch-radio-label {\n      margin-left: 1rem;\n    }\n  }\n"],["\n  &.ch-form-field-input,\n  &.ch-form-field-select,\n  &.ch-form-field-textarea {\n    display: flex;\n    flex-direction: column;\n\n    input {\n      width: 100%;\n    }\n  }\n\n  &.ch-form-field-checkbox {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n\n    .ch-checkbox {\n      order: 1;\n    }\n\n    .ch-checkbox-label {\n      order: 2;\n      padding-left: 1rem;\n    }\n\n    .ch-help-text {\n      width: 100%;\n      order: 3;\n    }\n  }\n\n  &.ch-form-field-radiogroup {\n    flex-direction: column;\n\n    .ch-radio-wrapper {\n      display: block;\n      margin-bottom: 0.5rem;\n    }\n\n    .ch-radio-label {\n      margin-left: 1rem;\n    }\n  }\n"])))},vr=a.c.div(cr||(cr=g(["\n  display: flex;\n  margin-bottom: 1rem;\n  position: relative;\n\n  fieldset {\n    margin: 0;\n    border: none;\n    padding: 0;\n  }\n\n  .ch-help-text {\n    font-size: ",";\n    margin-top: 0.5rem;\n    color: ",";\n  }\n\n  legend {\n    font-size: ",";\n    color: ",";\n    margin-bottom: 0.5rem;\n  }\n\n  ","\n\n  ","\n  ","\n"],["\n  display: flex;\n  margin-bottom: 1rem;\n  position: relative;\n\n  fieldset {\n    margin: 0;\n    border: none;\n    padding: 0;\n  }\n\n  .ch-help-text {\n    font-size: ",";\n    margin-top: 0.5rem;\n    color: ",";\n  }\n\n  legend {\n    font-size: ",";\n    color: ",";\n    margin-bottom: 0.5rem;\n  }\n\n  ","\n\n  ","\n  ","\n"])),(function(e){return e.theme.fontSizes.small.fontSize}),(function(e){return e.error?e.theme.inputs.error.fontColor:e.theme.inputs.fontColor}),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.inputs.fontColor}),(function(e){return!!e.layout&&gr[e.layout]}),D,P),br=a.c.label(ur||(ur=g(["\n  color: ",";\n  font-size: ",";\n  line-height: ",";\n\n  ","\n  ","\n"],["\n  color: ",";\n  font-size: ",";\n  line-height: ",";\n\n  ","\n  ","\n"])),(function(e){return e.theme.inputs.fontColor}),(function(e){return e.theme.fontSizes.label.fontSize}),(function(e){return e.theme.fontSizes.label.lineHeight}),D,P),yr=Object(r.forwardRef)((function(e,t){var n=e.className,r=e.tag,a=h(e,["className","tag"]);return i.a.createElement(br,d({as:r,"data-testid":"label",className:n||""},a),e.children)})),Ar=Object(r.forwardRef)((function(e,t){var n,r=e.field,a=e.label,o=e.layout,s=void 0===o?"stack":o,l=e.errorText,c=e.fieldProps,u=e.infoText,f=e.error,p=e.onChange,m=e.value,g=e.checked,v=e.options,b=e.className,y=h(e,["field","label","layout","errorText","fieldProps","infoText","error","onChange","value","checked","options","className"]),A=(null===(n=r.displayName)||void 0===n?void 0:n.toLowerCase())||"",_=ar(),w=ar(),E=f&&l||u;return i.a.createElement(vr,d({layout:s,error:f,className:"ch-form-field-"+A+" "+(b||""),"data-testid":"form-field"},y),"input-only"===s&&"checkbox"!==A?null:"radiogroup"!==A&&i.a.createElement(yr,{htmlFor:_,className:"ch-"+A+"-label"},a),"radiogroup"===A?i.a.createElement("fieldset",{"aria-describedby":E&&w,"aria-invalid":f},a&&i.a.createElement("legend",null,a),i.a.createElement(r,d({options:v,ref:t,id:_,onChange:p,value:m},c))):i.a.createElement(r,d({options:v,"aria-label":"input-only"===s&&a||null,"aria-describedby":E&&w,"aria-invalid":f,ref:t,id:_,onChange:p,value:m,checked:g},c)),E&&i.a.createElement("span",{className:"ch-help-text",id:w},E))})),_r=a.c.h1(dr||(dr=g(["\n  display: block;\n  margin: 0;\n\n  font-size: ",";\n  font-weight: ",";\n  line-height: ",";\n\n  "," {\n    font-size: ",";\n    font-weight: ",";\n    line-height: ",";\n  }\n\n  ","\n  ","\n"],["\n  display: block;\n  margin: 0;\n\n  font-size: ",";\n  font-weight: ",";\n  line-height: ",";\n\n  "," {\n    font-size: ",";\n    font-weight: ",";\n    line-height: ",";\n  }\n\n  ","\n  ","\n"])),(function(e){return e.theme.fontSizes["h"+e.level].mobile.fontSize}),(function(e){return e.theme.fontSizes["h"+e.level].mobile.fontWeight}),(function(e){return e.theme.fontSizes["h"+e.level].mobile.lineHeight}),(function(e){return e.theme.mediaQueries.min.md}),(function(e){return e.theme.fontSizes["h"+e.level].fontSize}),(function(e){return e.theme.fontSizes["h"+e.level].fontWeight}),(function(e){return e.theme.fontSizes["h"+e.level].lineHeight}),D,P),wr=Object(r.forwardRef)((function(e,t){var n=e.tag,r=e.children,a=e.className,o=e.level,s=h(e,["tag","children","className","level"]);return i.a.createElement(_r,d({as:n||"h"+o,className:a||"",level:o,ref:t,"data-testid":"heading"},s),r)})),Er=a.c.span(hr||(hr=g(["\n  position: relative;\n\n  > .ch-icon {\n    position: absolute;\n    width: 1rem;\n    left: 0.1875rem;\n    position: absolute;\n    top: 54%;\n    transform: translateY(-50%);\n  }\n\n  > input {\n    padding: ",";\n  }\n"],["\n  position: relative;\n\n  > .ch-icon {\n    position: absolute;\n    width: 1rem;\n    left: 0.1875rem;\n    position: absolute;\n    top: 54%;\n    transform: translateY(-50%);\n  }\n\n  > input {\n    padding: ",";\n  }\n"])),(function(e){return function(e){var t=e.sizing,n=e.leadingIcon;return"sm"===t?"0.125rem 1.75rem 0.125rem "+(n?"1.3125rem":"0.5rem"):"0.34375rem 1.75rem 0.34375rem "+(n?"1.3125rem":"0.5rem")}(e)})),Sr=a.c.input(fr||(fr=g(["\n  align-items: center;\n  display: flex;\n  letter-spacing: -0.005625rem;\n  transition: box-shadow 0.05s ease-in;\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  color: ",";\n  font-size: ",";\n  line-height: ",";\n\n  &::placeholder {\n    color: ",";\n  }\n\n  &:focus,\n  &[aria-invalid='true']:focus {\n    border: ",";\n    box-shadow: ",";\n    outline: none;\n  }\n\n  &[aria-invalid='true'] {\n    border: ",";\n    box-shadow: ",";\n  }\n\n  // Hides native clear button\n  &::-webkit-search-decoration,\n  ::-webkit-search-cancel-button,\n  ::-webkit-search-results-button,\n  ::-webkit-search-results-decoration {\n    display: none;\n  }\n\n  &::-ms-clear,\n  &::-ms-reveal {\n    display: none;\n    width: 0;\n    height: 0;\n  }\n"],["\n  align-items: center;\n  display: flex;\n  letter-spacing: -0.005625rem;\n  transition: box-shadow 0.05s ease-in;\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  color: ",";\n  font-size: ",";\n  line-height: ",";\n\n  &::placeholder {\n    color: ",";\n  }\n\n  &:focus,\n  &[aria-invalid='true']:focus {\n    border: ",";\n    box-shadow: ",";\n    outline: none;\n  }\n\n  &[aria-invalid='true'] {\n    border: ",";\n    box-shadow: ",";\n  }\n\n  // Hides native clear button\n  &::-webkit-search-decoration,\n  ::-webkit-search-cancel-button,\n  ::-webkit-search-results-button,\n  ::-webkit-search-results-decoration {\n    display: none;\n  }\n\n  &::-ms-clear,\n  &::-ms-reveal {\n    display: none;\n    width: 0;\n    height: 0;\n  }\n"])),(function(e){return e.theme.inputs.bgd}),(function(e){return e.theme.inputs.border}),(function(e){return e.theme.inputs.borderRadius}),(function(e){return e.theme.inputs.shadow}),(function(e){return e.theme.inputs.fontColor}),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.fontSizes.text.lineHeight}),(function(e){return e.theme.inputs.placeholder}),(function(e){return e.theme.inputs.focus.border}),(function(e){return e.theme.inputs.focus.shadow}),(function(e){return e.theme.inputs.error.border}),(function(e){return e.theme.inputs.error.shadow})),Cr=a.c.button(pr||(pr=g(["\n  position: absolute;\n  top: 50%;\n  right: 0.125rem;\n  transform: translateY(-44%);\n  border: none;\n  background: none;\n  cursor: pointer;\n  display: ",";\n\n  path {\n    fill: ",";\n  }\n\n  &:active,\n  &:focus {\n    outline: none;\n  }\n"],["\n  position: absolute;\n  top: 50%;\n  right: 0.125rem;\n  transform: translateY(-44%);\n  border: none;\n  background: none;\n  cursor: pointer;\n  display: ",";\n\n  path {\n    fill: ",";\n  }\n\n  &:active,\n  &:focus {\n    outline: none;\n  }\n"])),(function(e){return e.active?"block":"none"}),(function(e){return e.theme.inputs.clearBg})),Tr=Object(r.forwardRef)((function(e,t){var n=e.leadingIcon,r=e.children;return i.a.createElement(Er,d({ref:t},e,{"data-testid":"input-wrapper"}),n&&i.a.createElement("span",{className:"ch-icon"},n),r)})),kr=Object(r.forwardRef)((function(e,t){var n=e.type,a=e.value,o=e.sizing,s=e.onClear,l=e.onChange,c=e.className,u=e.leadingIcon,f=e.showClear,p=void 0===f||f,m=h(e,["type","value","sizing","onClear","onChange","className","leadingIcon","showClear"]),g=Object(r.useState)(!1),v=g[0],b=g[1],y=Object(r.useRef)(!1),A=Object(r.useRef)(null),_=t||A,w=Object(r.useRef)(null),E=e["aria-label"]?"clear "+e["aria-label"]:"clear";return Object(r.useEffect)((function(){var e=!1,t=function(t){if(y.current)return t.target!==w.current&&t.target!==_.current?(y.current=!1,void b(!1)):void(e&&(e=!1))},n=function(t){y.current&&(e=!0,setTimeout((function(){e&&(y.current=!1,b(!1)),e=!1}),10))};return document.addEventListener("focusin",t),document.addEventListener("focusout",n),function(){document.removeEventListener("focusin",t),document.removeEventListener("focusout",n)}}),[]),i.a.createElement(Tr,{leadingIcon:u,sizing:o,className:"ch-input-wrapper "+(c||"")},i.a.createElement(Sr,d({},m,{value:a,type:n||"text",ref:_,className:"ch-input",onChange:l,"data-testid":"input",onFocus:function(){y.current=!0,b(!0)}})),p&&i.a.createElement(Cr,{type:"button",active:!!(s||v&&a.length),tabIndex:-1,"aria-label":E,onClick:function(){var e;if(s)s();else{var t=_.current,n=null===(e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))||void 0===e?void 0:e.set;n&&t&&(n.call(t,""),t.dispatchEvent(new Event("input",{bubbles:!0}))),t.focus()}},ref:w},i.a.createElement(he,{width:"1.25rem"})))}));kr.displayName="Input";Object(r.forwardRef)((function(e,t){var n=d(d({},e),{sizing:"sm",type:"search",leadingIcon:i.a.createElement(Se,{"data-testid":"search-icon"})});return i.a.createElement(kr,d({},n,{ref:t}))}));var xr,Or,Ir,Mr,Pr,Dr,Nr,Lr,Rr,Br,jr,Fr,Ur,Hr=Object(a.d)(xr||(xr=g(["\n  0% {\n    opacity: 0;\n  }\n  100% {\n    opacity: 1;\n  }\n"],["\n  0% {\n    opacity: 0;\n  }\n  100% {\n    opacity: 1;\n  }\n"]))),zr=Object(a.d)(Or||(Or=g(["\n  0% {\n    opacity: 0;\n    transform: translateY(4rem) scale(0.4);\n  }\n  100% {\n    opacity: 1;\n    transform: translateY(0) scale(1);\n  }\n"],["\n  0% {\n    opacity: 0;\n    transform: translateY(4rem) scale(0.4);\n  }\n  100% {\n    opacity: 1;\n    transform: translateY(0) scale(1);\n  }\n"]))),Vr=a.c.div(Ir||(Ir=g(["\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: ",";\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  z-index: ",";\n  overflow-x: hidden;\n  animation: "," 0.25s ease 0s forwards;\n  will-change: opacity;\n\n  > section {\n    position: relative;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    border-radius: ",";\n    color: ",";\n    background-color: ",";\n    width: ",";\n    box-shadow: ",";\n    max-width: ",";\n    height: ",";\n    max-height: ",";\n    will-change: transform, opacity;\n    animation: "," 0.15s ease 0s forwards;\n\n    @media only screen and (max-height: 25rem) {\n      position: absolute;\n      top: 2rem;\n      height: auto;\n      max-height: none;\n    }\n  }\n"],["\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: ",";\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  z-index: ",";\n  overflow-x: hidden;\n  animation: "," 0.25s ease 0s forwards;\n  will-change: opacity;\n\n  > section {\n    position: relative;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    border-radius: ",";\n    color: ",";\n    background-color: ",";\n    width: ",";\n    box-shadow: ",";\n    max-width: ",";\n    height: ",";\n    max-height: ",";\n    will-change: transform, opacity;\n    animation: "," 0.15s ease 0s forwards;\n\n    @media only screen and (max-height: 25rem) {\n      position: absolute;\n      top: 2rem;\n      height: auto;\n      max-height: none;\n    }\n  }\n"])),(function(e){return e.theme.modal.wrapperBgd}),(function(e){return e.theme.zIndex.modal}),Hr,(function(e){return e.theme.radii.default}),(function(e){return e.theme.modal.text}),(function(e){return e.theme.modal.bgd}),(function(e){return e.theme.modalSizes[e.size||"md"].width}),(function(e){return e.theme.modal.shadow}),(function(e){return"fullscreen"===e.size?e.theme.modalSizes[e.size].width:"90vw"}),(function(e){return"fullscreen"===e.size?e.theme.modalSizes[e.size].height:"auto"}),(function(e){return e.theme.modalSizes[e.size||"md"].height}),zr),Wr=a.c.header(Mr||(Mr=g(["\n  padding: 1rem 1.5rem;\n\n  .ch-close-button {\n    position: absolute;\n    right: 1.55rem;\n    top: 1rem;\n  }\n\n  .ch-title {\n    padding-right: 2rem;\n    margin: 0;\n    font-size: ",";\n    font-weight: ",";\n  }\n"],["\n  padding: 1rem 1.5rem;\n\n  .ch-close-button {\n    position: absolute;\n    right: 1.55rem;\n    top: 1rem;\n  }\n\n  .ch-title {\n    padding-right: 2rem;\n    margin: 0;\n    font-size: ",";\n    font-weight: ",";\n  }\n"])),(function(e){return e.theme.modal.titleSize}),(function(e){return e.theme.modal.titleWeight})),Gr=a.c.div(Pr||(Pr=g(["\n  font-size: ",";\n  line-height: ",";\n  padding: 0 1.5rem;\n  flex-grow: 1;\n  overflow-y: auto;\n"],["\n  font-size: ",";\n  line-height: ",";\n  padding: 0 1.5rem;\n  flex-grow: 1;\n  overflow-y: auto;\n"])),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.fontSizes.text.lineHeight})),qr=(a.c.footer(Dr||(Dr=g(["\n  padding: 1.5rem;\n  border-top: 1px solid ",";\n  display: flex;\n  flex-direction: row-reverse;\n  justify-content: space-between;\n\n  div:first-child {\n    display: flex;\n    flex-direction: row-reverse;\n  }\n\n  button + button {\n    margin: 0 0.5rem 0 0.5rem;\n  }\n\n  @media (max-width: 35rem) {\n    flex-direction: column;\n\n    button {\n      width: 100%;\n    }\n\n    div:first-child {\n      display: flex;\n      flex-direction: column;\n    }\n\n    button + button,\n    div + div {\n      margin: 0.5rem 0 0;\n    }\n  }\n"],["\n  padding: 1.5rem;\n  border-top: 1px solid ",";\n  display: flex;\n  flex-direction: row-reverse;\n  justify-content: space-between;\n\n  div:first-child {\n    display: flex;\n    flex-direction: row-reverse;\n  }\n\n  button + button {\n    margin: 0 0.5rem 0 0.5rem;\n  }\n\n  @media (max-width: 35rem) {\n    flex-direction: column;\n\n    button {\n      width: 100%;\n    }\n\n    div:first-child {\n      display: flex;\n      flex-direction: column;\n    }\n\n    button + button,\n    div + div {\n      margin: 0.5rem 0 0;\n    }\n  }\n"])),(function(e){return e.theme.modal.border})),function(e){var t,n,i=e.children,a=e.rootId,o=Object(r.useState)(),l=o[0],c=o[1];return Object(r.useEffect)((function(){return a&&(t=document.getElementById(a)),t?c(t):(n=document.createElement("div"),document.body.appendChild(n),c(n)),function(){n&&n.remove()}}),[a]),l?Object(s.createPortal)(i,l):null}),Yr=Object(r.createContext)({onClose:function(){},labelID:"",dismissible:!0}),Kr=function(){return Object(r.useContext)(Yr)},Xr=function(e){var t=e.size,n=void 0===t?"md":t,a=e.onClose,o=void 0===a?function(){return null}:a,s=e.children,l=e.rootId,c=e.dismissible,u=void 0===c||c,f=h(e,["size","onClose","children","rootId","dismissible"]),p=ar(),m=Object(r.useRef)(null),g=Object(r.useRef)(null),v={onClose:o,labelID:p,dismissible:u};return u&&wn(g,o),Object(r.useEffect)((function(){var e=document.activeElement;return function(){return!!e&&e.focus()}}),[]),Object(r.useEffect)((function(){setTimeout((function(){var e;return null===(e=g.current)||void 0===e?void 0:e.focus()}),0);var e=function(e){e.keyCode===gn&&o?o():function(e,t){if(t){var n=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),r=n[0],i=n[n.length-1];e.keyCode===mn&&(e.shiftKey&&document.activeElement===r?(e.preventDefault(),i.focus()):e.shiftKey||document.activeElement!==i||(e.preventDefault(),r.focus()))}}(e,m.current)};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}}),[]),i.a.createElement(qr,{rootId:l},i.a.createElement(Yr.Provider,{value:v},i.a.createElement(Vr,d({},f,{size:n,onClose:o,ref:m,"data-testid":"modal"}),i.a.createElement("section",{"aria-modal":!0,ref:g,role:"dialog",tabIndex:0,"aria-labelledby":p},s))))},Qr=function(e){var t=e.children,n=h(e,["children"]);return i.a.createElement(Gr,d({"data-testid":"modal-body"},n),t)},$r=function(e){var t=e.tag,n=void 0===t?"div":t,r=e.displayClose,a=void 0===r||r,o=e.title,s=h(e,["tag","displayClose","title"]),l=Kr();return i.a.createElement(Wr,d({},s),i.a.createElement(n,{className:"ch-title",id:l.labelID},o),a&&(null==l?void 0:l.dismissible)&&i.a.createElement("span",{className:"ch-close-button"},i.a.createElement(K,{label:"Close",icon:i.a.createElement(Ee,null),onClick:function(){return l&&l.onClose()}})))},Jr=a.c.div(Nr||(Nr=g(["\n  display: flex;\n  height: 3rem;\n  align-items: center;\n  border-bottom: ",";\n  padding: 1rem;\n\n  .ch-title {\n    flex: 1;\n  }\n\n  .ch-btn-close {\n    margin-left: auto;\n    margin-right: 1rem;\n  }\n\n  "," {\n    display: none;\n  }\n"],["\n  display: flex;\n  height: 3rem;\n  align-items: center;\n  border-bottom: ",";\n  padding: 1rem;\n\n  .ch-title {\n    flex: 1;\n  }\n\n  .ch-btn-close {\n    margin-left: auto;\n    margin-right: 1rem;\n  }\n\n  "," {\n    display: none;\n  }\n"])),(function(e){return"0.03125rem solid "+e.theme.navbar.headerBorder}),(function(e){return e.theme.mediaQueries.min.md})),Zr=a.c.div(Lr||(Lr=g(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 4.25rem;\n  min-height: 3rem;\n  flex-direction: column;\n  padding: 0 0.25rem;\n\n\n  .ch-navigation-bar-item-label {\n    text-align: center;\n    display: ","; \n    font-size: ",";\n    width: 100%;\n    padding: 0 0.25rem;\n    margin-bottom: 1.5rem;\n  }\n"],["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 4.25rem;\n  min-height: 3rem;\n  flex-direction: column;\n  padding: 0 0.25rem;\n\n\n  .ch-navigation-bar-item-label {\n    text-align: center;\n    display: ","; \n    font-size: ",";\n    width: 100%;\n    padding: 0 0.25rem;\n    margin-bottom: 1.5rem;\n  }\n"])),(function(e){return e.showLabel?"block":"none"}),(function(e){return e.theme.fontSizes.footnote.fontSize})),ei=(Object(a.c)(ir)(Rr||(Rr=g(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  max-width: 100%;\n  color: ",";\n  background-color: ",";\n  width: 4.25rem;\n  padding-top: 1rem;\n\n  "," {\n    width: ",";\n    padding-top: ",";\n\n    "," {\n      display: ",";\n    }\n\n    "," {\n      ",";\n    }\n  }\n\n  ","\n  ","\n"],["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  max-width: 100%;\n  color: ",";\n  background-color: ",";\n  width: 4.25rem;\n  padding-top: 1rem;\n\n  "," {\n    width: ",";\n    padding-top: ",";\n\n    "," {\n      display: ",";\n    }\n\n    "," {\n      ",";\n    }\n  }\n\n  ","\n  ","\n"])),(function(e){return e.theme.navbar.text}),(function(e){return e.theme.navbar.bgd}),(function(e){var t=e.theme;return e.responsive,t.mediaQueries.max.md}),(function(e){return e.responsive?"20rem":"4.25rem;"}),(function(e){return e.responsive?"0":"1rem"}),Jr,(function(e){return e.responsive?"flex":"none"}),Zr,(function(e){return e.responsive&&" \n        width: auto;\n        flex-direction: row;\n\n        .ch-navigation-bar-item-label {\n          font-size: 1rem;\n          text-align: left;\n          margin-left: 1.5rem;\n          margin-bottom: 0;\n          display: block;\n        }"}),P,D),Object(a.c)(K)(Br||(Br=g([""],[""])))),ti=Object(a.c)(Y)(jr||(jr=g([""],[""])));a.c.div(Fr||(Fr=g(["\n  align-items: center;\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  color: ",";\n  background-color: ",";\n  padding: 0.75rem;\n  box-shadow: ",";\n  border-radius: 0.25rem;\n  margin: 0.75rem;\n  max-width: 45rem;\n  pointer-events: auto;\n\n  .ch-severity-icon {\n    width: 1.5rem;\n    flex-shrink: 0;\n  }\n\n  .ch-message {\n    display: flex;\n    flex-flow: column wrap;\n    font-size: ",";\n    line-height: ",";\n    letter-spacing: -0.005625rem;\n    margin: 0.5rem 0.75rem;\n\n    &:empty {\n      margin: 0;\n    }\n  }\n\n  "," {\n    margin-right: 1.6rem;\n    border-color: ",";\n  }\n\n  ",",\n  "," {\n    background-color: ",";\n    color: ","};\n  }\n\n  ",":hover, ",":focus, ",":hover, ",":focus {\n    background-color: ",";\n    color: ",";\n  }\n\n  ",":active, ",":active {\n    background-color: ",";\n    color: ",";\n  }\n\n  ","\n  ","\n"],["\n  align-items: center;\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  color: ",";\n  background-color: ",";\n  padding: 0.75rem;\n  box-shadow: ",";\n  border-radius: 0.25rem;\n  margin: 0.75rem;\n  max-width: 45rem;\n  pointer-events: auto;\n\n  .ch-severity-icon {\n    width: 1.5rem;\n    flex-shrink: 0;\n  }\n\n  .ch-message {\n    display: flex;\n    flex-flow: column wrap;\n    font-size: ",";\n    line-height: ",";\n    letter-spacing: -0.005625rem;\n    margin: 0.5rem 0.75rem;\n\n    &:empty {\n      margin: 0;\n    }\n  }\n\n  "," {\n    margin-right: 1.6rem;\n    border-color: ",";\n  }\n\n  ",",\n  "," {\n    background-color: ",";\n    color: ","};\n  }\n\n  ",":hover, ",":focus, ",":hover, ",":focus {\n    background-color: ",";\n    color: ",";\n  }\n\n  ",":active, ",":active {\n    background-color: ",";\n    color: ",";\n  }\n\n  ","\n  ","\n"])),(function(e){var t=e.theme,n=e.severity;return t.notification[n].text}),(function(e){var t=e.theme,n=e.severity;return t.colors[n].primary}),(function(e){return e.theme.notification.shadow}),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.fontSizes.text.lineHeight}),ti,(function(e){var t=e.theme,n=e.severity;return t.notification[n].text}),ei,ti,(function(e){var t=e.theme,n=e.severity;return t.colors[n].primary}),(function(e){var t=e.theme,n=e.severity;return t.notification[n].closeButton.text}),ei,ei,ti,ti,(function(e){var t=e.theme,n=e.severity;return t.notification[n].closeButton.hover.bgd}),(function(e){var t=e.theme,n=e.severity;return t.notification[n].closeButton.hover.text}),ei,ti,(function(e){var t=e.theme,n=e.severity;return t.notification[n].closeButton.active.bgd}),(function(e){var t=e.theme,n=e.severity;return t.notification[n].closeButton.active.text}),D,P);!function(e){e.ERROR="error",e.SUCCESS="success",e.INFO="info",e.WARNING="warning"}(Ur||(Ur={}));var ni,ri;i.a.createElement(de,null),i.a.createElement(fe,null),i.a.createElement(ce,null),i.a.createElement(be,null);!function(e){e.ERROR="error",e.SUCCESS="success",e.INFO="info",e.WARNING="warning"}(ni||(ni={})),function(e){e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.REMOVE_ALL=2]="REMOVE_ALL"}(ri||(ri={}));var ii,ai,oi,si,li,ci,ui={notifications:[]},di=(i.a.createContext(ui),i.a.createContext((function(){})),a.c.div(ii||(ii=g(["\n  position: fixed;\n  top: 2rem;\n  left: 0;\n  right: 0;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  z-index: ",";\n  pointer-events: none;\n"],["\n  position: fixed;\n  top: 2rem;\n  left: 0;\n  right: 0;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  z-index: ",";\n  pointer-events: none;\n"])),(function(e){return e.theme.zIndex.notificationGroup})),function(e){return i.a.createElement(Vn,d({"data-testid":"popover-separator"},e))}),hi=a.c.input(ai||(ai=g(["\n  ",";\n\n  &[aria-invalid='true'] + .ch-radio {\n    border: ",";\n    box-shadow: ",";\n  }\n"],["\n  ",";\n\n  &[aria-invalid='true'] + .ch-radio {\n    border: ",";\n    box-shadow: ",";\n  }\n"])),R,(function(e){return e.theme.inputs.error.border}),(function(e){return e.theme.inputs.error.shadow})),fi=a.c.span(oi||(oi=g(["\n  > label {\n    margin-left: 0.5rem;\n  }\n"],["\n  > label {\n    margin-left: 0.5rem;\n  }\n"]))),pi=a.c.div(si||(si=g(["\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  margin-bottom: -0.1875rem;\n  transition: box-shadow 0.05s ease-in;\n\n  ",":checked ~ & {\n    background-color: ",";\n    border: ",";\n    box-shadow: ",";\n  }\n\n  ",":focus ~ & {\n    border: ",";\n    box-shadow: ",";\n  }\n"],["\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  margin-bottom: -0.1875rem;\n  transition: box-shadow 0.05s ease-in;\n\n  ",":checked ~ & {\n    background-color: ",";\n    border: ",";\n    box-shadow: ",";\n  }\n\n  ",":focus ~ & {\n    border: ",";\n    box-shadow: ",";\n  }\n"])),(function(e){return e.theme.inputs.bgd}),(function(e){return e.theme.inputs.border}),(function(e){return e.theme.radii.circle}),(function(e){return e.theme.inputs.shadow}),hi,(function(e){return e.theme.inputs.checked.bgd}),(function(e){return e.theme.inputs.checked.border}),(function(e){return e.theme.inputs.checked.shadow}),hi,(function(e){return e.theme.inputs.focus.border}),(function(e){return e.theme.inputs.focus.shadow})),mi=Object(a.c)(pi)(li||(li=g(["\n  display: inline-block;\n  height: 1rem;\n  position: relative;\n  width: 1rem;\n\n  &:after {\n    background-color: ",";\n    border-radius: ",";\n    content: '';\n    display: block;\n    height: 0.375rem;\n    padding: 0.03125rem;\n    width: 0.375rem;\n    ",";\n  }\n"],["\n  display: inline-block;\n  height: 1rem;\n  position: relative;\n  width: 1rem;\n\n  &:after {\n    background-color: ",";\n    border-radius: ",";\n    content: '';\n    display: block;\n    height: 0.375rem;\n    padding: 0.03125rem;\n    width: 0.375rem;\n    ",";\n  }\n"])),(function(e){return e.checked?e.theme.inputs.checked.fontColor:e.theme.inputs.bgd}),(function(e){return e.theme.radii.circle}),j),gi=Object(a.c)(pi)(ci||(ci=g(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 0.5rem;\n  border-color: ",";\n  box-shadow: none;\n  margin: 0.1rem;\n\n  ",":checked ~ & {\n    svg {\n      stroke: ",";\n    }\n  }\n"],["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 0.5rem;\n  border-color: ",";\n  box-shadow: none;\n  margin: 0.1rem;\n\n  ",":checked ~ & {\n    svg {\n      stroke: ",";\n    }\n  }\n"])),(function(e){return e.theme.colors.greys.white}),hi,(function(e){return e.theme.colors.greys.white})),vi=function(e){var t=e.value,n=e.checked,a=e.label,o=e.icon,s=e.onChange,l=e.testId,c=h(e,["value","checked","label","icon","onChange","testId"]),u=Object(r.useRef)(null),f=ar(),p=function(){var e,t;null===(e=u.current)||void 0===e||e.click(),null===(t=u.current)||void 0===t||t.focus()};return i.a.createElement(fi,{className:"ch-radio-wrapper","data-testid":l},i.a.createElement(hi,d({checked:n,id:f,onChange:s,type:"radio",value:t,ref:u,"data-testid":"hidden-radio","aria-label":a},c)),o?i.a.createElement(i.a.Fragment,null,i.a.createElement(gi,{checked:n,className:"ch-radio",onClick:p,"data-testid":"styled-radio-icon"},i.a.createElement("span",{className:"ch-icon"},o))):i.a.createElement(i.a.Fragment,null,i.a.createElement(mi,{checked:n,className:"ch-radio",onClick:p,"data-testid":"styled-radio"}),i.a.createElement(yr,{htmlFor:f,className:"ch-radio-label"},a)))};vi.displayName="Radio";var bi,yi,Ai=a.c.div(bi||(bi=g(["\n  position: relative;\n\n  .ch-select-icon {\n    pointer-events: none;\n  }\n"],["\n  position: relative;\n\n  .ch-select-icon {\n    pointer-events: none;\n  }\n"]))),_i=a.c.select(yi||(yi=g(["\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  color: ",";\n  font-size: ",";\n  line-height: ",";\n  height: 2rem;\n  letter-spacing: -0.005625rem;\n  width: 100%;\n  padding: 0.375rem 1.5rem 0.375rem 0.5rem;\n  transition: box-shadow 0.05s ease-in;\n  display: inline-block;\n  appearance: none;\n\n  &:focus,\n  &[aria-invalid='true']:focus {\n    border: ",";\n    box-shadow: ",";\n    outline: none;\n  }\n\n  &[aria-invalid='true'] {\n    border: ",";\n    box-shadow: ",";\n  }\n"],["\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  color: ",";\n  font-size: ",";\n  line-height: ",";\n  height: 2rem;\n  letter-spacing: -0.005625rem;\n  width: 100%;\n  padding: 0.375rem 1.5rem 0.375rem 0.5rem;\n  transition: box-shadow 0.05s ease-in;\n  display: inline-block;\n  appearance: none;\n\n  &:focus,\n  &[aria-invalid='true']:focus {\n    border: ",";\n    box-shadow: ",";\n    outline: none;\n  }\n\n  &[aria-invalid='true'] {\n    border: ",";\n    box-shadow: ",";\n  }\n"])),(function(e){return e.theme.inputs.bgd}),(function(e){return e.theme.inputs.border}),(function(e){return e.theme.inputs.borderRadius}),(function(e){return e.theme.inputs.shadow}),(function(e){return e.theme.inputs.fontColor}),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.fontSizes.text.lineHeight}),(function(e){return e.theme.inputs.focus.border}),(function(e){return e.theme.inputs.focus.shadow}),(function(e){return e.theme.inputs.error.border}),(function(e){return e.theme.inputs.error.shadow})),wi={position:"absolute",top:"50%",transform:"translateY(-50%)",right:"0.2rem",width:"1.5rem",height:"1.5rem"},Ei=Object(r.forwardRef)((function(e,t){return i.a.createElement(Ai,null,i.a.createElement(_i,d({className:"ch-select","data-testid":"select",ref:t},e),e.options.map((function(e){var t=e.value,n=e.label;return i.a.createElement("option",{key:t,value:t},n)}))),i.a.createElement(ke,{style:wi,className:"ch-select-icon","data-testid":"select-icon"}))}));Ei.displayName="Select";var Si,Ci=a.c.textarea(Si||(Si=g(["\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  color: ",";\n  font-size: ",";\n  padding: 0.5rem;\n  position: relative;\n  min-height: 4rem;\n  transition: box-shadow 0.05s ease-in;\n  width: 100%;\n\n  &:focus,\n  &[aria-invalid='true']:focus {\n    border: ",";\n    box-shadow: ",";\n    outline: none;\n  }\n\n  &[aria-invalid='true'] {\n    border: ",";\n    box-shadow: ",";\n  }\n"],["\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  color: ",";\n  font-size: ",";\n  padding: 0.5rem;\n  position: relative;\n  min-height: 4rem;\n  transition: box-shadow 0.05s ease-in;\n  width: 100%;\n\n  &:focus,\n  &[aria-invalid='true']:focus {\n    border: ",";\n    box-shadow: ",";\n    outline: none;\n  }\n\n  &[aria-invalid='true'] {\n    border: ",";\n    box-shadow: ",";\n  }\n"])),(function(e){return e.theme.inputs.bgd}),(function(e){return e.theme.inputs.border}),(function(e){return e.theme.inputs.borderRadius}),(function(e){return e.theme.inputs.shadow}),(function(e){return e.theme.inputs.fontColor}),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.inputs.focus.border}),(function(e){return e.theme.inputs.focus.shadow}),(function(e){return e.theme.inputs.error.border}),(function(e){return e.theme.inputs.error.shadow}));i.a.forwardRef((function(e,t){var n=e.label,r=h(e,["label"]);return i.a.createElement(Ci,d({"aria-label":n,className:"ch-textarea","data-testid":"textarea",ref:t},r))})).displayName="Textarea";var Ti,ki=["slim","r1by2","r2by3","r1by1","r4by3","r3by2","r16by9"],xi={1:"grid-template: 1fr / 1fr;","1.slim":"grid-template: repeat(2, 1fr) / 1fr;","1.r2by3":"grid-template: 1fr / 1fr;","1.featured":'grid-template: "ft" 1fr / 1fr;',2:"grid-template: 1fr / repeat(2,1fr);","2.slim":"grid-template: repeat(3,1fr) / 1fr;","2.r1by2":"grid-template: repeat(2,1fr) / 1fr;","2.r2by3":"grid-template: repeat(2,1fr) / 1fr;","2.r4by3":"grid-template: repeat(2,1fr) / repeat(2,1fr);","2.r16by9":"grid-template: 1fr / repeat(2,1fr);","2.featured":"grid-template: repeat(3,1fr) / repeat(2,1fr);\n  grid-template-areas: 'ft ft' 'ft ft';","2.r16by9.featured":"grid-template: repeat(2,1fr) / repeat(3,1fr);\n    grid-template-areas: 'ft ft v' 'ft ft v' 'ft ft v';",3:"grid-template: repeat(3,1fr) / 1fr;","3.r2by3":"grid-template: repeat(3,1fr) / repeat(1,1fr);","3.r1by1":"grid-template: repeat(2,1fr) / repeat(2,1fr);","3.featured":"grid-template: repeat(3,1fr) / repeat(2,1fr);\n    grid-template-areas: 'ft ft' 'ft ft';\n  ","3.r16by9.featured":"grid-template: repeat(2,1fr) / repeat(3,1fr);\n    grid-template-areas: 'ft ft v' 'ft ft v';",4:"grid-template: repeat(2,1fr) / repeat(2,1fr);","4.slim":"grid-template: repeat(4,1fr) / 1fr;","4.r2by3":"grid-template: repeat(2,1fr) / repeat(2,1fr);","4.featured":"grid-template: repeat(3,1fr) / repeat(3,1fr);\n    grid-template-areas: 'ft ft ft' 'ft ft ft';","4.r16by9.featured":"grid-template-areas: 'ft ft v' 'ft ft v' 'ft ft v';",5:"grid-template: repeat(2,1fr) / repeat(3,1fr);","5.slim":"grid-template: repeat(5,1fr) / 1fr;","5.r1by2":"grid-template: repeat(3,1fr) / repeat(2,1fr);","5.r2by3":"grid-template: repeat(3,1fr) / repeat(2,1fr);","5.r3by2":"grid-template: repeat(2,1fr) / repeat(3,1fr);","5.r16by9":"grid-template: repeat(2,1fr) / repeat(3,1fr);","5.featured":"grid-template: repeat(4,1fr) / repeat(2,1fr);\n    grid-template-areas: 'ft ft' 'ft ft';","5.r1by1.featured":"grid-template: repeat(3,1fr) / repeat(3,1fr);\n    grid-template-areas: 'ft ft v' 'ft ft v';",6:"grid-template: repeat(3,1fr) / repeat(3,1fr);","6.slim":"grid-template: repeat(4,1fr) / repeat(2,1fr);","6.r1by2":"grid-template: repeat(3,1fr) / repeat(2,1fr);","6.r1by1":"grid-template: repeat(3,1fr) / repeat(2,1fr);","6.r2by3":"grid-template: repeat(3,1fr) / repeat(2,1fr);","6.r3by2":"grid-template: repeat(2,1fr) / repeat(3,1fr);","6.r16by9":"grid-template: repeat(2,1fr) / repeat(3,1fr);","6.featured":"grid-template: repeat(4,1fr) / repeat(3,1fr);\n    grid-template-areas: 'ft ft ft' 'ft ft ft';","6.r1by1.featured":"grid-template: repeat(3,1fr) / repeat(3,1fr);\n    grid-template-areas: 'ft ft v' 'ft ft v';",7:"grid-template: repeat(3,1fr) / repeat(3,1fr);","7.slim":"grid-template: repeat(4,1fr) / repeat(2,1fr);","7.r4by3":"grid-template: repeat(3,1fr) / repeat(3,1fr);","7.r16by9":"grid-template: repeat(2,1fr) / repeat(4,1fr);","7.featured":"grid-template: repeat(4,1fr) / repeat(3,1fr);\n    grid-template-areas: 'ft ft ft' 'ft ft ft';","7.r1by1.featured":"grid-template: repeat(4,1fr) / repeat(4,1fr);\n    grid-template-areas: 'ft ft ft v' 'ft ft ft v' 'ft ft ft v';",8:"grid-template: repeat(3,1fr) / repeat(3,1fr);","8.slim":"grid-template: repeat(4,1fr) / repeat(2,1fr);","8.r4by3":"grid-template: repeat(3,1fr) / repeat(3,1fr);","8.r16by9":"grid-template: repeat(2,1fr) / repeat(4,1fr);","8.featured":"grid-template: repeat(5,1fr) / repeat(4,1fr);\n    grid-template-areas: 'ft ft ft ft ft' 'ft ft ft ft ft' 'ft ft ft ft ft';","8.r1by1.featured":"grid-template: repeat(4,1fr) / repeat(4,1fr);\n    grid-template-areas: 'ft ft ft v' 'ft ft ft v' 'ft ft ft x';","8.r16by9.featured":"grid-template-areas: 'ft ft ft v' 'ft ft ft v' 'ft ft ft x';",9:"grid-template: repeat(3,1fr) / repeat(3,1fr);","9.slim":"grid-template: repeat(5,1fr) / repeat(2,1fr);","9.r1by1":"grid-template: repeat(3,1fr) / repeat(3,1fr);","9.r16by9":"grid-template: repeat(3,1fr) / repeat(4,1fr);","9.featured":"grid-template: repeat(5,1fr) / repeat(4,1fr);\n    grid-template-areas: 'ft ft ft ft ft' 'ft ft ft ft ft' 'ft ft ft ft ft';","9.r1by1.featured":"grid-template: repeat(5,1fr) / repeat(5,1fr);\n    grid-template-areas: 'ft ft ft ft v' 'ft ft ft ft v' 'ft ft ft ft v' 'ft ft ft ft v';",10:"grid-template: repeat(4,1fr) / repeat(3,1fr);","10.slim":"grid-template: repeat(5,1fr) / repeat(2,1fr);","10.r1by1":"grid-template: repeat(4,1fr) / repeat(3,1fr);","10.r3by2":"grid-template: repeat(3,1fr) / repeat(4,1fr);","10.featured":"grid-template: repeat(5,1fr) / repeat(4,1fr);\n    grid-template-areas: 'ft ft ft ft ft' 'ft ft ft ft ft' 'ft ft ft ft ft';","10.r1by1.featured":"grid-template: repeat(5,1fr) / repeat(5,1fr);\n    grid-template-areas: 'ft ft ft ft v' 'ft ft ft ft v' 'ft ft ft ft v' 'ft ft ft ft v';",11:"grid-template: repeat(4,1fr) / repeat(3,1fr);","11.slim":"grid-template: repeat(6,1fr) / repeat(2,1fr);","11.r1by1":"grid-template: repeat(4,1fr) / repeat(3,1fr);","11.r3by2":"grid-template: repeat(3,1fr) / repeat(4,1fr);","11.r16by9":"grid-template: repeat(3,1fr) / repeat(4,1fr);","11.featured":"grid-template: repeat(6,1fr) / repeat(6,1fr);\n    grid-template-areas: 'ft ft ft ft ft ft' 'ft ft ft ft ft ft' 'ft ft ft ft ft ft' 'ft ft ft ft ft ft';","11.r1by1.featured":"grid-template-areas:\n      'ft ft ft ft ft v' 'ft ft ft ft ft v' 'ft ft ft ft ft v'\n      'ft ft ft ft ft v' 'ft ft ft ft ft x';",12:"grid-template: repeat(4,1fr) / repeat(3,1fr);","12.slim":"grid-template: repeat(6,1fr) / repeat(2,1fr);","12.r2by3":"grid-template: repeat(4,1fr) / repeat(3,1fr);","12.r3by2":"grid-template: repeat(3,1fr) / repeat(4,1fr);","12.featured":"grid-template: repeat(6,1fr) / repeat(6,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft' 'ft ft ft ft ft ft' 'ft ft ft ft ft ft'\n      'ft ft ft ft ft ft';","12.r1by1.featured":"grid-template-areas:\n    'ft ft ft ft ft v' 'ft ft ft ft ft v' 'ft ft ft ft ft v'\n    'ft ft ft ft ft v' 'ft ft ft ft ft x';",13:"grid-template: repeat(4,1fr) / repeat(4,1fr);","13.slim":"grid-template: repeat(7,1fr) / repeat(2,1fr);","13.r2by3":"grid-template: repeat(5,1fr) / repeat(3,1fr);","13.r1by1":"grid-template: repeat(4,1fr) / repeat(4,1fr);","13.r3by2":"grid-template: repeat(4,1fr) / repeat(4,1fr);","13.r16by9":"grid-template: repeat(3,1fr) / repeat(5,1fr);","13.featured":"grid-template: repeat(7,1fr) / repeat(6,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft' 'ft ft ft ft ft ft' 'ft ft ft ft ft ft' 'ft ft ft ft ft ft'\n      'ft ft ft ft ft ft';","13.r1by1.featured":"grid-template-areas:\n      'ft ft ft ft ft v' 'ft ft ft ft ft v' 'ft ft ft ft ft v' 'ft ft ft ft ft v'\n      'ft ft ft ft ft v' 'ft ft ft ft ft x';",14:"grid-template: repeat(4,1fr) / repeat(4,1fr);","14.slim":"grid-template: repeat(7,1fr) / repeat(2,1fr);","14.r2by3":"grid-template: repeat(5,1fr) / repeat(3,1fr);","14.r3by2":"grid-template: repeat(4,1fr) / repeat(4,1fr);","14.r16by9":"grid-template: repeat(3,1fr) / repeat(5,1fr);","14.featured":"grid-template: repeat(7,1fr) / repeat(7,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft'\n      'ft ft ft ft ft ft ft';","14.r1by1.featured":"grid-template-areas:\n      'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v'\n      'ft ft ft ft ft ft v' 'ft ft ft ft ft ft x';",15:"grid-template: repeat(5,1fr) / repeat(3,1fr);","15.slim":"grid-template: repeat(8,1fr) / repeat(2,1fr);","15.r1by2":"grid-template: repeat(5,1fr) / repeat(3,1fr);","15.r3by2":"grid-template: repeat(4,1fr) / repeat(4,1fr);","15.r16by9":"grid-template: repeat(3,1fr) / repeat(5,1fr);","15.featured":"grid-template: repeat(8,1fr) / repeat(8,1fr);\n    grid-template-areas:\n     'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft'\n     'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft';","15.r1by1.featured":"grid-template-areas:\n     'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v'\n     'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft x';",16:"grid-template: repeat(4,1fr) / repeat(4,1fr);","16.slim":"grid-template: repeat(8,1fr) / repeat(2,1fr);","16.r1by2":"grid-template: repeat(6,1fr) / repeat(3,1fr);","16.r1by1":"grid-template: repeat(4,1fr) / repeat(4,1fr);","16.featured":"grid-template: repeat(8,1fr) / repeat(8,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft'\n      'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft';","16.r1by1.featured":"grid-template-areas:\n      'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v'\n      'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft x';",17:"grid-template: repeat(5,1fr) / repeat(4,1fr);","17.slim":"grid-template: repeat(8,1fr) / repeat(3,1fr);","17.r1by2":"grid-template: repeat(6,1fr) / repeat(4,1fr);","17.r1by1":"grid-template: repeat(4,1fr) / repeat(5,1fr);","17.featured":"grid-template: repeat(8,1fr) / repeat(9,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft'\n      'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft';","17.r1by1.featured":"grid-template-areas:\n      'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v'\n      'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft x';",18:"grid-template: repeat(5,1fr) / repeat(4,1fr);","18.slim":"grid-template: repeat(8,1fr) / repeat(3,1fr);","18.r1by2":"grid-template: repeat(6,1fr) / repeat(4,1fr);","18.r1by1":"grid-template: repeat(4,1fr) / repeat(5,1fr);","18.featured":"grid-template: repeat(8,1fr) / repeat(9,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft'\n      'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft';","18.r1by1.featured":"grid-template: repeat(9,1fr) / repeat(9,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v'\n      'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft x';",19:"grid-template: repeat(5,1fr) / repeat(4,1fr);","19.slim":"grid-template: repeat(8,1fr) / repeat(3,1fr);","19.r1by2":"grid-template: repeat(6,1fr) / repeat(4,1fr);","19.r1by1":"grid-template: repeat(4,1fr) / repeat(5,1fr);","19.featured":"grid-template: repeat(8,1fr) / repeat(9,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft'\n      'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft';","19.r1by1.featured":"grid-template: repeat(9,1fr) / repeat(10,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' \n      'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' \n      'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft x';",20:"grid-template: repeat(5,1fr) / repeat(4,1fr);","20.slim":"grid-template: repeat(8,1fr) / repeat(3,1fr);","20.r1by2":"grid-template: repeat(6,1fr) / repeat(4,1fr);","20.r1by1":"grid-template: repeat(4,1fr) / repeat(5,1fr);","20.featured":"grid-template: repeat(11,1fr) / repeat(7,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' \n      'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft';","20.r1by1.featured":"grid-template: repeat(10,1fr) / repeat(10,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' \n      'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' \n      'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft ft x';",21:"grid-template: repeat(5,1fr) / repeat(5,1fr);","21.slim":"grid-template: repeat(8,1fr) / repeat(3,1fr);","21.r1by2":"grid-template: repeat(6,1fr) / repeat(4,1fr);","21.r1by1":"grid-template: repeat(5,1fr) / repeat(5,1fr);","21.featured":"grid-template: repeat(11,1fr) / repeat(7,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' \n      'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft';","21.r1by1.featured":"grid-template: repeat(8,1fr) / repeat(7,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v'  \n      'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v' 'ft ft ft ft ft ft x';",22:"grid-template: repeat(5,1fr) / repeat(5,1fr);","22.slim":"grid-template: repeat(8,1fr) / repeat(3,1fr);","22.r1by2":"grid-template: repeat(6,1fr) / repeat(4,1fr);","22.r1by1":"grid-template: repeat(5,1fr) / repeat(5,1fr);","22.featured":"grid-template: repeat(11,1fr) / repeat(7,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' \n      'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft';","22.r1by1.featured":"grid-template: repeat(9,1fr) / repeat(7,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v' \n      'ft ft ft ft ft ft v' 'ft ft ft ft ft ft v' 'ft ft ft ft ft ft x';",23:"grid-template: repeat(5,1fr) / repeat(5,1fr);","23.slim":"grid-template: repeat(8,1fr) / repeat(3,1fr);","23.r1by2":"grid-template: repeat(6,1fr) / repeat(4,1fr);","23.r1by1":"grid-template: repeat(5,1fr) / repeat(5,1fr);","23.featured":"grid-template: repeat(11,1fr) / repeat(8,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' \n      'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft';","23.r1by1.featured":"grid-template: repeat(8,1fr) / repeat(8,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v'  \n      'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft x';",24:"grid-template: repeat(5,1fr) / repeat(5,1fr);","24.slim":"grid-template: repeat(8,1fr) / repeat(3,1fr);","24.r1by2":"grid-template: repeat(6,1fr) / repeat(4,1fr);","24.r1by1":"grid-template: repeat(5,1fr) / repeat(5,1fr);","24.featured":"grid-template: repeat(11,1fr) / repeat(8,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' \n      'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft';","24.r1by1.featured":"grid-template: repeat(9,1fr) / repeat(8,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' \n      'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft x';",25:"grid-template: repeat(5,1fr) / repeat(5,1fr);","25.slim":"grid-template: repeat(9,1fr) / repeat(3,1fr);","25.r1by2":"grid-template: repeat(7,1fr) / repeat(4,1fr);","25.r1by1":"grid-template: repeat(5,1fr) / repeat(5,1fr);","25.featured":"grid-template: repeat(11,1fr) / repeat(8,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' \n      'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft';","25.r1by1.featured":"grid-template: repeat(10,1fr) / repeat(8,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' \n      'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft x';",26:"grid-template: repeat(6,1fr) / repeat(5,1fr);","26.slim":"grid-template: repeat(9,1fr) / repeat(3,1fr);","26.r1by2":"grid-template: repeat(7,1fr) / repeat(4,1fr);","26.r1by1":"grid-template: repeat(6,1fr) / repeat(5,1fr);","26.featured":"grid-template: repeat(11,1fr) / repeat(9,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft'\n      'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft' 'ft ft ft ft ft ft ft ft ft';","26.r1by1.featured":"grid-template: repeat(9,1fr) / repeat(9,1fr);\n    grid-template-areas:\n      'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' \n      'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft v' 'ft ft ft ft ft ft ft ft x';"},Oi={"2.featured":"\n    @media (max-width: 600px) {\n      grid-template-columns: 1fr;\n      grid-template-rows: calc(100% / 3);\n      grid-auto-rows: calc(100% / 3);\n    }\n  ","3.r16by9":"\n    @media (max-height: 600px) {\n      grid-template-rows: repeat(2,1fr);\n      grid-template-columns: 50%;\n      grid-auto-columns: 50%;\n      grid-auto-flow: column;\n    }\n  ","3.featured":"\n    @media (max-width: 600px) {\n      grid-template-areas: 'ft' 'ft';\n      grid-template-columns: 1fr;\n      grid-template-rows: 25%;\n      grid-auto-rows: 25%;\n    }\n  ","4.r16by9":"\n    @media (max-height: 600px) {\n      grid-template-rows: repeat(2,1fr);\n      grid-template-columns: 50%;\n      grid-auto-columns: 50%;\n      grid-auto-flow: column;\n    }\n  ","5.r16by9":"grid-template: repeat(2,1fr) / repeat(3,1fr);\n    @media (max-height: 600px) {\n      grid-template-rows: repeat(2,1fr);\n      grid-template-columns: calc(100% / 3);\n      grid-auto-columns: calc(100% / 3);\n      grid-auto-flow: column;\n    }\n  ","6.r16by9":"grid-template: repeat(2,1fr) / repeat(3,1fr);\n    @media (max-height: 600px) {\n      grid-template-rows: repeat(2,1fr);\n      grid-template-columns: calc(100% / 3);\n      grid-auto-columns: calc(100% / 3);\n      grid-auto-flow: column;\n    }\n  ","7.r16by9":"\n    @media (max-height: 600px) {\n      grid-template-rows: repeat(2,1fr);\n      grid-template-columns: 25%;\n      grid-auto-columns: 25%;\n      grid-auto-flow: column;\n    }\n  "},Ii=a.c.div(Ti||(Ti=g(["\n  position: relative;\n  display: grid;\n  height: 100%;\n  width: 100%;\n  overflow: auto;\n  background-color: ",";\n\n  ","\n  ",";\n"],["\n  position: relative;\n  display: grid;\n  height: 100%;\n  width: 100%;\n  overflow: auto;\n  background-color: ",";\n\n  ","\n  ",";\n"])),(function(e){return e.theme.videoGrid.bgd}),(function(e){var t=e.size,n=e.featured;return xi[t+(n?".featured":"")]||""}),(function(e){var t=e.size,n=e.featured,r=e.ratio;if(r){for(var i="",a=ki.indexOf(r),o=0;o<=a;o++){var s=ki[o];i+=xi[t+"."+s+(n?".featured":"")]||""}var l=Oi[t+"."+r+(n?".featured":"")]||Oi[t+(n?".featured":"")];return l?i+=l:"r16by9"===r&&(t>7||n)?i+="\n  @media (max-height: 600px) {\n    grid-template-areas: 'ft ft' 'ft ft';\n    grid-template-rows: repeat(2,1fr);\n    grid-template-columns: 25%;\n    grid-auto-columns: 25%;\n    grid-auto-flow: column;\n  }\n":(t>7||n)&&(i+="\n  @media (max-width: 600px) {\n    grid-template-areas: 'ft ft' 'ft ft';\n    grid-template-columns: repeat(2,1fr);\n    grid-template-rows: 25%;\n    grid-auto-rows: 25%;\n  }\n"),i}})),Mi=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}())}(),Pi="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Di=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Ni="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Di):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var Li=["top","right","bottom","left","width","height","size","weight"],Ri="undefined"!=typeof MutationObserver,Bi=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Ni(a)}function s(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Pi&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ri?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Pi&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Li.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),ji=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},Fi=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Di},Ui=qi(0,0,0,0);function Hi(e){return parseFloat(e)||0}function zi(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Hi(e["border-"+n+"-width"])}),0)}function Vi(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Ui;var r=Fi(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],a=e["padding-"+i];t[i]=Hi(a)}return t}(r),a=i.left+i.right,o=i.top+i.bottom,s=Hi(r.width),l=Hi(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==t&&(s-=zi(r,"left","right")+a),Math.round(l+o)!==n&&(l-=zi(r,"top","bottom")+o)),!function(e){return e===Fi(e).document.documentElement}(e)){var c=Math.round(s+a)-t,u=Math.round(l+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(u)&&(l-=u)}return qi(i.left,i.top,s,l)}var Wi="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof Fi(e).SVGGraphicsElement}:function(e){return e instanceof Fi(e).SVGElement&&"function"==typeof e.getBBox};function Gi(e){return Pi?Wi(e)?function(e){var t=e.getBBox();return qi(0,0,t.width,t.height)}(e):Vi(e):Ui}function qi(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Yi=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=qi(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Gi(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Ki=function(e,t){var n,r,i,a,o,s,l,c=(r=(n=t).x,i=n.y,a=n.width,o=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),ji(l,{x:r,y:i,width:a,height:o,top:i,right:r+a,bottom:o+i,left:r}),l);ji(this,{target:e,contentRect:c})},Xi=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Mi,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof Fi(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Yi(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof Fi(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new Ki(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Qi="undefined"!=typeof WeakMap?new WeakMap:new Mi,$i=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Bi.getInstance(),r=new Xi(t,n,this);Qi.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){$i.prototype[e]=function(){var t;return(t=Qi.get(this))[e].apply(t,arguments)}}));var Ji=void 0!==Di.ResizeObserver?Di.ResizeObserver:$i,Zi=hn(fn((function(e,t){!function(e){function t(e,t,n,r){var i,a=!1,o=0;function s(){i&&clearTimeout(i)}function l(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=this,h=Date.now()-o;function f(){o=Date.now(),n.apply(d,c)}function p(){i=void 0}a||(r&&!i&&f(),s(),void 0===r&&h>e?f():!0!==t&&(i=setTimeout(r?p:f,void 0===r?e-h:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),a=!0},l}e.debounce=function(e,n,r){return void 0===r?t(e,n,!1):t(e,r,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)})));function ea(e,t){var n=t/e;return n>1.6?"r16by9":n>1.4?"r3by2":n>1.25?"r4by3":n>.9?"r1by1":n>.7?"r2by3":n>.4?"r1by2":"slim"}var ta,na,ra,ia,aa,oa,sa,la,ca,ua,da,ha={usingGrid:!0},fa=Object(r.createContext)(null),pa=function(e){var t=e.size,n=e.children,a=e.layout,o=void 0===a?"standard":a,s=h(e,["size","children","layout"]),l=Object(r.createRef)(),c=function(e){var t=Object(r.useState)(null),n=t[0],i=t[1];return Object(r.useLayoutEffect)((function(){if(e.current){var t=e.current.getBoundingClientRect(),n=t.height,r=t.width;i(ea(n,r))}}),[]),Object(r.useEffect)((function(){if(e.current){var t=Zi.debounce(50,(function(e){var t=e[0].contentRect,n=t.height,r=t.width;i(ea(n,r))})),n=new Ji(t);return n.observe(e.current),function(){return n.disconnect()}}}),[]),n}(l),u="number"==typeof t?t:i.a.Children.count(n);return i.a.createElement(fa.Provider,{value:ha},i.a.createElement(Ii,d({ref:l},s,{size:u,ratio:c,featured:"featured"===o,"data-testid":"video-grid"}),n))},ma=a.c.div(ta||(ta=g(["\n  height: 100%;\n  width: 100%;\n  position: relative;\n  background: ",";\n\n  video {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    width: 100%;\n    height: 100%;\n    object-fit: ","};\n  }\n\n  .ch-icon {\n    width: 1.5rem;\n    height: 1.5rem;\n    display: inline-block;\n    background-color: papayawhip; /* TODO: figure out what this is supposed to be */\n    margin-right: 0.5rem;\n    flex: 0 0 1.5rem;\n  }\n\n  .ch-nameplate {\n    backdrop-filter: blur(20px);\n    background-color: rgba(46, 47, 52, 0.85);\n    border-radius: 0.25rem;\n    bottom: 0.5rem;\n    color: ",";\n    left: 0.5rem;\n    max-width: calc(100% - 2rem);\n    padding: 0.5rem;\n    position: absolute;\n\n    div {\n      ",";\n      display: flex;\n      align-items: center;\n    }\n\n    .ch-text {\n      font-size: ",";\n      ",";\n      margin: 0;\n    }\n  }\n\n  ","\n  ","\n"],["\n  height: 100%;\n  width: 100%;\n  position: relative;\n  background: ",";\n\n  video {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    width: 100%;\n    height: 100%;\n    object-fit: ","};\n  }\n\n  .ch-icon {\n    width: 1.5rem;\n    height: 1.5rem;\n    display: inline-block;\n    background-color: papayawhip; /* TODO: figure out what this is supposed to be */\n    margin-right: 0.5rem;\n    flex: 0 0 1.5rem;\n  }\n\n  .ch-nameplate {\n    backdrop-filter: blur(20px);\n    background-color: rgba(46, 47, 52, 0.85);\n    border-radius: 0.25rem;\n    bottom: 0.5rem;\n    color: ",";\n    left: 0.5rem;\n    max-width: calc(100% - 2rem);\n    padding: 0.5rem;\n    position: absolute;\n\n    div {\n      ",";\n      display: flex;\n      align-items: center;\n    }\n\n    .ch-text {\n      font-size: ",";\n      ",";\n      margin: 0;\n    }\n  }\n\n  ","\n  ","\n"])),(function(e){return e.theme.colors.greys.grey100}),(function(e){return e.objectFit||"cover"}),(function(e){return e.theme.colors.greys.white}),B,(function(e){return e.theme.fontSizes.text.fontSize}),B,D,P),ga=Object(r.forwardRef)((function(e,t){var n=e.tag,r=e.className,a=e.nameplate,o=h(e,["tag","className","nameplate"]);return i.a.createElement(ma,d({as:n,className:r||"","data-testid":"video-tile"},o),i.a.createElement("video",{ref:t,className:"ch-video"}),a&&i.a.createElement("header",{className:"ch-nameplate"},i.a.createElement("p",{className:"ch-text"},a)))})),va=(a.c.div(na||(na=g(["\n  display: grid;\n  width: 100%;\n  height: 100%;\n\n  ","\n  ","\n  ","\n\n  ","\n\n  ","\n"],["\n  display: grid;\n  width: 100%;\n  height: 100%;\n\n  ","\n  ","\n  ","\n\n  ","\n\n  ","\n"])),o.a,D,P,(function(e){var t=e.responsive,n=e.theme;return t?"\n    "+n.mediaQueries.max.md+" {\n      grid-template-columns: 1fr 1fr;\n    }\n\n    "+n.mediaQueries.max.sm+" {\n      grid-template-columns: 1fr;\n    }\n  ":""}),(function(e){return e.css||""})),a.c.div(ra||(ra=g(["\n  ","\n  ","\n\n  ","\n"],["\n  ","\n  ","\n\n  ","\n"])),D,o.a,(function(e){return e.css||""})),a.c.aside(ia||(ia=g(["\n  width: 100%;\n  height: 100%;\n  padding-bottom: 1rem;\n  overflow-y: auto;\n  background-color: ",";\n  box-shadow: 1rem 1rem 3.75rem 0 rgba(0, 0, 0, 0.1);\n  border-left: 0.0625rem solid ",";\n  border-right: 0.0625rem solid ",";\n\n  "," {\n    width: ",";\n  }\n\n  ","\n  ","\n"],["\n  width: 100%;\n  height: 100%;\n  padding-bottom: 1rem;\n  overflow-y: auto;\n  background-color: ",";\n  box-shadow: 1rem 1rem 3.75rem 0 rgba(0, 0, 0, 0.1);\n  border-left: 0.0625rem solid ",";\n  border-right: 0.0625rem solid ",";\n\n  "," {\n    width: ",";\n  }\n\n  ","\n  ","\n"])),(function(e){return e.theme.roster.bgd}),(function(e){return e.theme.roster.containerBorder}),(function(e){return e.theme.roster.containerBorder}),(function(e){return e.theme.mediaQueries.min.md}),(function(e){return e.theme.roster.maxWidth}),D,P)),ba=a.c.span(aa||(aa=g(["\n  display: inline-block;\n  margin: 0 0.625rem 0 0;\n  font-weight: 600;\n  font-size: 0.675rem;\n  color: ",";\n"],["\n  display: inline-block;\n  margin: 0 0.625rem 0 0;\n  font-weight: 600;\n  font-size: 0.675rem;\n  color: ",";\n"])),(function(e){return e.theme.roster.secondaryText})),ya=a.c.div(oa||(oa=g(["\n  margin: 0 0.5rem;\n\n  & + & {\n    margin-top: 1rem;\n  }\n\n  ","\n  ","\n"],["\n  margin: 0 0.5rem;\n\n  & + & {\n    margin-top: 1rem;\n  }\n\n  ","\n  ","\n"])),D,P),Aa=a.c.div(sa||(sa=g(["\n  background-color: ",";\n  border-radius: ",";\n\n  ","\n  ","\n"],["\n  background-color: ",";\n  border-radius: ",";\n\n  ","\n  ","\n"])),(function(e){return e.theme.roster.fgd}),(function(e){return e.theme.radii.default}),D,P),_a=(a.c.div(la||(la=g(["\n  position: relative;\n  display: flex;\n  align-items: center;\n  padding: 0.75rem 1rem;\n  margin-bottom: 0.5rem;\n  border-bottom: 0.0625rem solid ",";\n\n  .ch-title {\n    font-size: 0.875rem;\n    color: ",";\n    ","\n    ",";\n  }\n\n  .ch-badge {\n    margin-left: 0.5rem;\n    ","\n  }\n\n  .ch-buttons {\n    margin-left: auto;\n    display: flex;\n\n    > * {\n      margin-left: 0.5rem;\n    }\n\n    ","\n  }\n\n  .ch-search-wrapper {\n    position: absolute !important;\n    bottom: 0.75rem;\n    left: 0.5rem;\n    right: 0.5rem;\n\n    .ch-search-input {\n      flex: 1;\n\n      input {\n        width: 100%;\n      }\n    }\n\n    .ch-search-close {\n      margin-left: 0.5rem;\n    }\n  }\n\n  .ch-navigation-icon {\n    margin-right: 0.5rem;\n    margin-left: -0.5rem;\n\n    "," {\n      display: none;\n    }\n  }\n\n  ","\n  ","\n"],["\n  position: relative;\n  display: flex;\n  align-items: center;\n  padding: 0.75rem 1rem;\n  margin-bottom: 0.5rem;\n  border-bottom: 0.0625rem solid ",";\n\n  .ch-title {\n    font-size: 0.875rem;\n    color: ",";\n    ","\n    ",";\n  }\n\n  .ch-badge {\n    margin-left: 0.5rem;\n    ","\n  }\n\n  .ch-buttons {\n    margin-left: auto;\n    display: flex;\n\n    > * {\n      margin-left: 0.5rem;\n    }\n\n    ","\n  }\n\n  .ch-search-wrapper {\n    position: absolute !important;\n    bottom: 0.75rem;\n    left: 0.5rem;\n    right: 0.5rem;\n\n    .ch-search-input {\n      flex: 1;\n\n      input {\n        width: 100%;\n      }\n    }\n\n    .ch-search-close {\n      margin-left: 0.5rem;\n    }\n  }\n\n  .ch-navigation-icon {\n    margin-right: 0.5rem;\n    margin-left: -0.5rem;\n\n    "," {\n      display: none;\n    }\n  }\n\n  ","\n  ","\n"])),(function(e){return e.theme.roster.headerBorder}),(function(e){return e.theme.roster.primaryText}),(function(e){return e.isSearching?"opacity: 0;":""}),B,(function(e){return e.isSearching?"opacity: 0;":""}),(function(e){return e.isSearching?"opacity: 0;":""}),(function(e){return e.theme.mediaQueries.min.md}),D,P),a.c.div(ca||(ca=g(["\n  flex-grow: 1;\n  min-width: 0;\n  line-height: 1.5;\n\n  .ch-name {\n    ",";\n    font-size: 0.875rem;\n    color: ",";\n  }\n\n  .ch-subtitle {\n    ",";\n    font-size: 0.65rem;\n    color: ",";\n  }\n"],["\n  flex-grow: 1;\n  min-width: 0;\n  line-height: 1.5;\n\n  .ch-name {\n    ",";\n    font-size: 0.875rem;\n    color: ",";\n  }\n\n  .ch-subtitle {\n    ",";\n    font-size: 0.65rem;\n    color: ",";\n  }\n"])),B,(function(e){return e.theme.roster.primaryText}),B,(function(e){return e.theme.roster.secondaryText}))),wa=function(e){var t=e.children,n=h(e,["children"]);return i.a.createElement(va,d({},n),t)},Ea=function(e){var t=e.menu,n=e.buttonProps,a=e.tooltipContainerId,o=e.a11yMenuLabel,s=void 0===o?"":o,l=h(e,["menu","buttonProps","tooltipContainerId","a11yMenuLabel"]),c=Object(r.useMemo)((function(){return Zn(K,a)}),[a]),u=l["data-tooltip"]?c:K,f=l["data-tooltip-position"]?{tooltipPosition:l["data-tooltip-position"]}:{};return i.a.createElement(Gn,{className:"ch-menu",a11yLabel:s,renderButtonWrapper:function(e,t){return i.a.createElement(u,d({},f,n,t,l,{className:pn("ch-menu",null==n?void 0:n.className),icon:i.a.createElement(me,null),label:s}))}},t)},Sa=function(e){var t=e.tag,n=e.title,r=e.badge,a=e.className,o=e.children,s=h(e,["tag","title","badge","className","children"]);return i.a.createElement(ya,d({as:t,className:a||""},s),n&&i.a.createElement(ir,{alignItems:"center",pl:".5rem",mb:".5rem"},i.a.createElement(ba,null,n),"number"==typeof r&&r>-1&&i.a.createElement(L,{value:r})),i.a.createElement(Aa,null,o))},Ca=function(e){var t=e.name,n=e.subtitle;return i.a.createElement(_a,null,i.a.createElement("div",{className:"ch-name"},t),n&&i.a.createElement("div",{className:"ch-subtitle"},n))},Ta=a.c.div(ua||(ua=g(["\n  display: flex;\n  align-items: center;\n  padding: 0.625rem 1rem;\n\n  .ch-mic {\n    flex-shrink: 0;\n    width: 1.5rem;\n    line-height: 0;\n\n    ","\n  }\n\n  .ch-menu {\n    color: ",";\n\n    &:hover,\n    &:focus {\n      color: ",";\n    }\n  }\n\n  svg {\n    width: 1.5rem;\n    flex-shrink: 0;\n  }\n\n  > * {\n    margin-right: 0.5rem;\n  }\n\n  > :last-child {\n    margin-right: 0;\n  }\n\n  ","\n  ","\n"],["\n  display: flex;\n  align-items: center;\n  padding: 0.625rem 1rem;\n\n  .ch-mic {\n    flex-shrink: 0;\n    width: 1.5rem;\n    line-height: 0;\n\n    ","\n  }\n\n  .ch-menu {\n    color: ",";\n\n    &:hover,\n    &:focus {\n      color: ",";\n    }\n  }\n\n  svg {\n    width: 1.5rem;\n    flex-shrink: 0;\n  }\n\n  > * {\n    margin-right: 0.5rem;\n  }\n\n  > :last-child {\n    margin-right: 0;\n  }\n\n  ","\n  ","\n"])),(function(e){return"leading"===e.micPosition?"\n        order: -1;\n        margin-right: .75rem;\n      ":""}),(function(e){return e.theme.buttons.icon.hover.bgd}),(function(e){return e.theme.buttons.icon.hover.text}),D,P),ka=a.c.div(da||(da=g(["\n  display: flex;\n  align-items: center;\n  white-space: nowrap;\n  font-size: 0.65rem;\n  color: ",";\n\n  > svg {\n    margin-right: 0.25rem;\n    color: ",";\n  }\n"],["\n  display: flex;\n  align-items: center;\n  white-space: nowrap;\n  font-size: 0.65rem;\n  color: ",";\n\n  > svg {\n    margin-right: 0.25rem;\n    color: ",";\n  }\n"])),(function(e){return e.theme.roster.secondaryText}),(function(e){return e.theme.roster.secondaryText})),xa=function(e){var t=e.children;return i.a.createElement(ka,null,i.a.createElement(fe,null),t)};var Oa=function(e){var t,n,r=e.tag,a=e.name,o=e.menu,s=e.subtitle,l=e.className,c=e.runningLate,u=e.muted,f=e.videoEnabled,p=e.sharingContent,m=e.poorConnection,g=void 0!==m&&m,v=e.microphone,b=e.a11yMenuLabel,y=void 0===b?"":b,A=e.extraIcon,_=e.buttonProps,w=h(e,["tag","name","menu","subtitle","className","runningLate","muted","videoEnabled","sharingContent","poorConnection","microphone","a11yMenuLabel","extraIcon","buttonProps"]),E=(n=f,p?i.a.createElement(pe,null):"boolean"==typeof n?i.a.createElement(J,{disabled:!n}):null),S="boolean"==typeof u,C=v||i.a.createElement(_e,{muted:u,poorConnection:g}),T=w["data-tooltip"]?((t={})["data-tooltip-position"]=w["data-tooltip-position"],t["data-tooltip"]=w["data-tooltip"],t):{};return i.a.createElement(Ta,d({className:l||"",as:r},e,{"data-testid":"roster-cell"}),i.a.createElement(Ca,{name:a,subtitle:s}),c?i.a.createElement(xa,null,c):i.a.createElement(i.a.Fragment,null,S&&i.a.createElement("div",{className:"ch-mic"},C),A,E),o&&i.a.createElement(Ea,d({},T,{menu:o,a11yMenuLabel:y,buttonProps:_})))};var Ia=Object(r.createContext)(null),Ma=function(e){var t=e.children,n=Object(r.useRef)(null),a=function(e,t){void 0===t&&(t=3e3);var n=Object(r.useRef)(null),i=Object(r.useState)(!1),a=i[0],o=i[1];return Object(r.useEffect)((function(){if(e.current){var r=function(){clearTimeout(n.current),o(!0)},i=function(){clearTimeout(n.current),n.current=setTimeout((function(){o(!1)}),t)};return e.current.addEventListener("focusin",r),e.current.addEventListener("focusout",i),function(){var t,a;n.current&&clearTimeout(n.current),null===(t=e.current)||void 0===t||t.removeEventListener("focusin",r),null===(a=e.current)||void 0===a||a.removeEventListener("focusout",i)}}}),[e]),{isFocused:a}}(n).isFocused,o=function(e,t){void 0===t&&(t=3e3);var n=Object(r.useRef)(null),i=Object(r.useState)(!1),a=i[0],o=i[1];return Object(r.useEffect)((function(){if(e.current){var r=function(){clearTimeout(n.current),o(!0),n.current=setTimeout((function(){o(!1)}),t)};return e.current.addEventListener("mousemove",r),function(){var t;n.current&&clearTimeout(n.current),null===(t=e.current)||void 0===t||t.removeEventListener("mousemove",r)}}}),[e]),{isMouseMoving:a}}(n).isMouseMoving,s=a||o,l=Object(r.useMemo)((function(){return{isUserActive:s}}),[s]);return i.a.createElement("div",{ref:n},i.a.createElement(Ia.Provider,{value:l},t))};function Pa(){var e=Object(r.useContext)(Ia);if(!e)throw new Error("useUserActivityState must be used within an UserActivityContextProvider");return e}a.c.div(Da||(Da=g(["\n  z-index: ",";\n  visibility: ",";\n\n  &.ch-active {\n    animation: "," 0.25s ease 0s forwards;\n  }\n"],["\n  z-index: ",";\n  visibility: ",";\n\n  &.ch-active {\n    animation: "," 0.25s ease 0s forwards;\n  }\n"])),(function(e){return e.isActive?e.theme.zIndex.controlBar:"-10"}),(function(e){return e.isActive?"visible":"hidden"}),Hr),a.c.ul(Na||(Na=g(["\n  display: flex;\n  flex-direction: column;\n  width: 20rem;\n\n  ","\n  ","\n"],["\n  display: flex;\n  flex-direction: column;\n  width: 20rem;\n\n  ","\n  ","\n"])),P,D),a.c.li(La||(La=g(["\n  position: relative;\n\n  ",";\n  ",";\n\n  & .ch-channel-button {\n    width: 100%;\n    height: 100%;\n    padding: 11px 0;\n    background-color: ",";\n    border: none;\n    border-radius: unset;\n    justify-content: left;\n    padding-left: 1rem;\n    color: ",";\n    border: ",";\n    font-family: ",";\n\n    &:hover {\n      background-color: ",";\n    }\n\n    &:active {\n      background-color: ",";\n      color: ",";\n    }\n\n    &:focus {\n      border: ",";\n    }\n  }\n\n  & .ch-label {\n    padding-left: 1.5rem;\n  }\n\n  & .ch-unread-badge {\n    display: ",";\n    position: absolute;\n    z-index: 2;\n    top: 12px;\n    left: 5px;\n    background-color: ",";\n  }\n\n  &.ch-unread .ch-channel-button {\n    font-weight: bold;\n  }\n\n  &.ch-selected .ch-channel-button {\n    background-color: ",";\n    color: ",";\n\n    &:focus {\n      border: ",";\n    }\n  }\n\n  & .ch-popover-toggle {\n    position: absolute;\n    right: 1rem;\n    margin: 0.5rem 0;\n    height: 1.5rem;\n    border-radius: 50%;\n\n    .ch-channel-actions {\n      border: 1px solid transparent;\n    }\n\n    & g {\n      fill: ",";\n    }\n\n    & button:focus .ch-channel-actions {\n      border: ",";\n      border-radius: 50%;\n    }\n\n    &:hover,\n    &:active {\n      background-color: ",";\n\n      & g {\n        fill: ",";\n      }\n    }\n  }\n"],["\n  position: relative;\n\n  ",";\n  ",";\n\n  & .ch-channel-button {\n    width: 100%;\n    height: 100%;\n    padding: 11px 0;\n    background-color: ",";\n    border: none;\n    border-radius: unset;\n    justify-content: left;\n    padding-left: 1rem;\n    color: ",";\n    border: ",";\n    font-family: ",";\n\n    &:hover {\n      background-color: ",";\n    }\n\n    &:active {\n      background-color: ",";\n      color: ",";\n    }\n\n    &:focus {\n      border: ",";\n    }\n  }\n\n  & .ch-label {\n    padding-left: 1.5rem;\n  }\n\n  & .ch-unread-badge {\n    display: ",";\n    position: absolute;\n    z-index: 2;\n    top: 12px;\n    left: 5px;\n    background-color: ",";\n  }\n\n  &.ch-unread .ch-channel-button {\n    font-weight: bold;\n  }\n\n  &.ch-selected .ch-channel-button {\n    background-color: ",";\n    color: ",";\n\n    &:focus {\n      border: ",";\n    }\n  }\n\n  & .ch-popover-toggle {\n    position: absolute;\n    right: 1rem;\n    margin: 0.5rem 0;\n    height: 1.5rem;\n    border-radius: 50%;\n\n    .ch-channel-actions {\n      border: 1px solid transparent;\n    }\n\n    & g {\n      fill: ",";\n    }\n\n    & button:focus .ch-channel-actions {\n      border: ",";\n      border-radius: 50%;\n    }\n\n    &:hover,\n    &:active {\n      background-color: ",";\n\n      & g {\n        fill: ",";\n      }\n    }\n  }\n"])),P,D,(function(e){return e.theme.channelList.bgd}),(function(e){return e.theme.channelList.fontColor}),(function(e){return e.theme.channelList.border}),(function(e){return e.theme.fonts.body}),(function(e){return e.theme.channelList.hover.bgd}),(function(e){return e.theme.channelList.active.bgd}),(function(e){return e.theme.channelList.active.fontColor}),(function(e){return e.theme.channelList.focus.border}),(function(e){return e.unread?"inline":"none"}),(function(e){return e.theme.colors.primary.light}),(function(e){return e.theme.colors.primary.light}),(function(e){return e.theme.channelList.selected.fontColor}),(function(e){return e.theme.channelList.focus.selectedBorder}),(function(e){return e.theme.channelList.active.fontColor}),(function(e){return e.theme.channelList.focus.selectedBorder}),(function(e){return e.theme.channelList.iconButton.activeBgd}),(function(e){return e.theme.colors.primary.light}));var Da,Na,La,Ra,Ba,ja,Fa,Ua,Ha,za,Va=a.c.div(Ra||(Ra=g(["\n  display: flex;\n  flex-direction: row;\n  font-size: 0.65rem;\n  margin-left: 1rem;\n  align-items: center;\n  background-color: ",";\n  width: 100%;\n\n  .ch-timestamp {\n    padding-right: ",";\n  }\n\n  ","\n  ","\n"],["\n  display: flex;\n  flex-direction: row;\n  font-size: 0.65rem;\n  margin-left: 1rem;\n  align-items: center;\n  background-color: ",";\n  width: 100%;\n\n  .ch-timestamp {\n    padding-right: ",";\n  }\n\n  ","\n  ","\n"])),(function(e){return e.theme.chatBubble.container.bgd}),(function(e){return e.actions?"1rem":"2.5rem"}),D,P),Wa=(a.c.div(Ba||(Ba=g(["\n  background-color: ",";\n  padding: 0.625rem 1rem;\n  border-radius: 4px;\n  width: fit-content;\n  color: ",";\n  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);\n  line-height: 20px;\n  width: ",";\n  max-width: 70.6%;\n  font-size: 0.875rem;\n  position: relative;\n  margin-bottom: ",";\n  overflow-wrap: break-word;\n  word-break: break-word;\n  hyphens: auto;\n\n  & .ch-header {\n    display: flex;\n    flex-direction: row;\n    margin-bottom: 0.5rem;\n    align-items: baseline;\n  }\n\n  & .ch-sender-name {\n    font-weight: bold;\n    padding-right: 0.5rem;\n  }\n\n  & .ch-header-timestamp {\n    font-size: 0.65rem;\n  }\n\n  & svg {\n    position: absolute;\n    height: 19px;\n    width: 11px;\n    margin-top: -14px;\n    margin-left: -25px;\n\n    & .ch-chat-bubble-tail {\n      fill: ",";\n    }\n  }\n\n  .ch-input {\n    width: 100%;\n  }\n\n  .ch-edit-buttons {\n    position: absolute;\n    margin-top: 1rem;\n    display: flex;\n    flex-direction: row-reverse;\n    width: 10rem;\n    justify-content: space-between;\n  }\n\n  ",";\n  ",";\n"],["\n  background-color: ",";\n  padding: 0.625rem 1rem;\n  border-radius: 4px;\n  width: fit-content;\n  color: ",";\n  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);\n  line-height: 20px;\n  width: ",";\n  max-width: 70.6%;\n  font-size: 0.875rem;\n  position: relative;\n  margin-bottom: ",";\n  overflow-wrap: break-word;\n  word-break: break-word;\n  hyphens: auto;\n\n  & .ch-header {\n    display: flex;\n    flex-direction: row;\n    margin-bottom: 0.5rem;\n    align-items: baseline;\n  }\n\n  & .ch-sender-name {\n    font-weight: bold;\n    padding-right: 0.5rem;\n  }\n\n  & .ch-header-timestamp {\n    font-size: 0.65rem;\n  }\n\n  & svg {\n    position: absolute;\n    height: 19px;\n    width: 11px;\n    margin-top: -14px;\n    margin-left: -25px;\n\n    & .ch-chat-bubble-tail {\n      fill: ",";\n    }\n  }\n\n  .ch-input {\n    width: 100%;\n  }\n\n  .ch-edit-buttons {\n    position: absolute;\n    margin-top: 1rem;\n    display: flex;\n    flex-direction: row-reverse;\n    width: 10rem;\n    justify-content: space-between;\n  }\n\n  ",";\n  ",";\n"])),(function(e){return e.theme.chatBubble[e.variant].bgd}),(function(e){return e.theme.chatBubble[e.variant].fontColor}),(function(e){return e.editable?"100%":"fit-content"}),(function(e){return e.editable?"4rem":"unset"}),(function(e){return e.theme.chatBubble[e.variant].bgd}),D,P),a.c.div(ja||(ja=g(["\n  display: flex;\n  margin-right: 0.5rem;\n  margin-left: auto;\n  color: ",";\n  align-items: center;\n\n  & .ch-message-actions {\n    border: 1px solid transparent;\n    border-radius: 50%;\n  }\n\n  & button:hover .ch-message-actions {\n    background-color: ",";\n\n    & g {\n      fill: ",";\n    }\n  }\n\n  & button:focus .ch-message-actions {\n    border: 1px solid ",";\n    border-radius: 50%;\n  }\n\n  & .ch-message-actions g {\n    fill: ",";\n  }\n\n  & .ch-message-actions.isOpen {\n    background-color: ",";\n    border-radius: 50%;\n\n    & g {\n      fill: ",";\n    }\n  }\n"],["\n  display: flex;\n  margin-right: 0.5rem;\n  margin-left: auto;\n  color: ",";\n  align-items: center;\n\n  & .ch-message-actions {\n    border: 1px solid transparent;\n    border-radius: 50%;\n  }\n\n  & button:hover .ch-message-actions {\n    background-color: ",";\n\n    & g {\n      fill: ",";\n    }\n  }\n\n  & button:focus .ch-message-actions {\n    border: 1px solid ",";\n    border-radius: 50%;\n  }\n\n  & .ch-message-actions g {\n    fill: ",";\n  }\n\n  & .ch-message-actions.isOpen {\n    background-color: ",";\n    border-radius: 50%;\n\n    & g {\n      fill: ",";\n    }\n  }\n"])),(function(e){return e.theme.chatBubble.container.fontColor}),(function(e){return e.theme.buttons.icon.hover.bgd}),(function(e){return e.theme.buttons.icon.hover.text}),(function(e){return e.theme.colors.primary.dark}),(function(e){return e.theme.chatBubble.container.fontColor}),(function(e){return e.theme.buttons.icon.active.bgd}),(function(e){return e.theme.buttons.icon.active.text}))),Ga=(i.a.forwardRef((function(e,t){var n=e.timestamp,a=e.actions,o=e.tooltipContainerId,s=e.a11yLabel,l=void 0===s?"Open channel options":s,c=h(e,["timestamp","actions","tooltipContainerId","a11yLabel"]),u=Object(r.useMemo)((function(){return Zn(K,o)}),[o]),f=c["data-tooltip"]?u:K,p=c["data-tooltip-position"]?{tooltipPosition:c["data-tooltip-position"]}:{};return i.a.createElement(Va,d({"data-testid":"chat-bubble-container",ref:t,actions:a},c),e.children,i.a.createElement(Wa,null,n&&i.a.createElement("span",{className:"ch-timestamp","data-testid":"message-time"},n),a&&i.a.createElement(Gn,{a11yLabel:l,placement:"bottom-end",renderButtonWrapper:function(e,t){return i.a.createElement(f,d({},p,{icon:i.a.createElement(me,{width:"1.5rem",height:"1.5rem"}),selected:e},t,{label:l}))},children:a})))})),Object(a.d)(Fa||(Fa=g(["\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n"],["\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n"]))));a.c.ul(Ua||(Ua=g(["\n  background-color: ",";\n  overflow-y: scroll;\n  display: flex;\n  flex-direction: column;\n  list-style: none;\n  padding: 0;\n\n  /* disable scrolling while fetching */\n  &.ch-not-scrollable {\n    overflow-y: hidden;\n  }\n\n  ","\n  ","\n\n  .ch-spinner {\n    margin: 0 auto;\n  }\n\n  .ch-spinner svg {\n    width: 2rem;\n    height: 2rem;\n    animation: "," 2s linear infinite;\n    display: block;\n  }\n"],["\n  background-color: ",";\n  overflow-y: scroll;\n  display: flex;\n  flex-direction: column;\n  list-style: none;\n  padding: 0;\n\n  /* disable scrolling while fetching */\n  &.ch-not-scrollable {\n    overflow-y: hidden;\n  }\n\n  ","\n  ","\n\n  .ch-spinner {\n    margin: 0 auto;\n  }\n\n  .ch-spinner svg {\n    width: 2rem;\n    height: 2rem;\n    animation: "," 2s linear infinite;\n    display: block;\n  }\n"])),(function(e){return e.theme.chatBubble.container.bgd}),D,P,Ga),a.c.div(Ha||(Ha=g(["\n  display: flex;\n  flex-direction: row;\n  padding: 10px;\n\n  & .ch-attachment-icon {\n    height: 2rem;\n    width: 2rem;\n    margin: auto;\n    background-color: ",";\n    border-radius: 25px;\n\n    & .ch-document-icon {\n      margin: auto 0;\n      color: ",";\n    }\n  }\n  & .ch-attachment-name {\n    margin-left: 1rem;\n\n    & a:link,\n    a:visited,\n    a:hover,\n    a:active {\n      color: ",";\n      text-decoration: none;\n    }\n  }\n  & .ch-attachment-size {\n    font-size: ",";\n    color: ",";\n    display: block;\n    padding-top: 3px;\n  }\n"],["\n  display: flex;\n  flex-direction: row;\n  padding: 10px;\n\n  & .ch-attachment-icon {\n    height: 2rem;\n    width: 2rem;\n    margin: auto;\n    background-color: ",";\n    border-radius: 25px;\n\n    & .ch-document-icon {\n      margin: auto 0;\n      color: ",";\n    }\n  }\n  & .ch-attachment-name {\n    margin-left: 1rem;\n\n    & a:link,\n    a:visited,\n    a:hover,\n    a:active {\n      color: ",";\n      text-decoration: none;\n    }\n  }\n  & .ch-attachment-size {\n    font-size: ",";\n    color: ",";\n    display: block;\n    padding-top: 3px;\n  }\n"])),(function(e){return e.theme.messageAttachment.icon.bgd}),(function(e){return e.theme.messageAttachment.icon.color}),(function(e){return e.theme.messageAttachment.name.fontColor}),(function(e){return e.theme.messageAttachment.size.fontSize}),(function(e){return e.theme.messageAttachment.size.fontColor})),a.c.div(za||(za=g(["\n  color: ",";\n  display: flex;\n  flex-direction: column;\n  width: fit-content;\n  border-radius: 4px;\n  overflow: hidden;\n  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);\n  background-color: ",";\n  letter-spacing: ",";\n  font-size: ",";\n  line-height: ",";\n\n  & img {\n    ",";\n  }\n\n  ","\n  ","\n"],["\n  color: ",";\n  display: flex;\n  flex-direction: column;\n  width: fit-content;\n  border-radius: 4px;\n  overflow: hidden;\n  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);\n  background-color: ",";\n  letter-spacing: ",";\n  font-size: ",";\n  line-height: ",";\n\n  & img {\n    ",";\n  }\n\n  ","\n  ","\n"])),(function(e){return e.theme.messageAttachment.content.fontColor}),(function(e){return e.theme.messageAttachment.content.bgd}),(function(e){return e.theme.messageAttachment.content.letterSpacing}),(function(e){return e.theme.fontSizes.text.fontSize}),(function(e){return e.theme.fontSizes.text.lineHeight}),(function(e){return e.imgStyles}),D,P);function qa(e,t,n,r){var i,a=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),o=t.get(a);return void 0===o&&(o=e.call(this,r),t.set(a,o)),o}function Ya(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return void 0===a&&(a=e.apply(this,r),t.set(i,a)),a}function Ka(e,t,n,r,i){return n.bind(t,e,r,i)}function Xa(e,t){return Ka(e,this,1===e.length?qa:Ya,t.cache.create(),t.serializer)}function Qa(){return JSON.stringify(arguments)}function $a(){this.cache=Object.create(null)}$a.prototype.has=function(e){return e in this.cache},$a.prototype.get=function(e){return this.cache[e]},$a.prototype.set=function(e,t){this.cache[e]=t};var Ja={create:function(){return new $a}},Za=function(e,t){var n=t&&t.cache?t.cache:Ja,r=t&&t.serializer?t.serializer:Qa;return(t&&t.strategy?t.strategy:Xa)(e,{cache:n,serializer:r})},eo={variadic:function(e,t){return Ka(e,this,Ya,t.cache.create(),t.serializer)},monadic:function(e,t){return Ka(e,this,qa,t.cache.create(),t.serializer)}};Za.strategies=eo;var to,no,ro,io,ao={weekday:"long",year:"numeric",month:"long",day:"numeric"},oo=(Za((function(e,t,n,r,i){var a=n||ao,o=new Date(e).toLocaleDateString(t,a),s=new Date;return s.setDate(s.getDate()-1),o===s.toLocaleDateString(t,a)?i||"Yesterday":o===(new Date).toLocaleDateString(t,a)?r||"Today":o})),function(e){return Object.entries(e).map((function(e){return{deviceId:e[0].toLowerCase(),label:e[1]}}))}),so=function(e){return"blue"===e?u.DefaultDeviceController.synthesizeVideoDevice("blue"):"smpte"===e?u.DefaultDeviceController.synthesizeVideoDevice("smpte"):"none"===e?null:e},lo=function(e){return"440"===e?u.DefaultDeviceController.synthesizeAudioDevice(440):"none"===e?null:e},co=function(e,t){return"none"===t&&null===e||t===e},uo=function(){return"setSinkId"in HTMLAudioElement.prototype};function ho(){return Promise.resolve(new MediaStream)}!function(e){e[e.Loading=0]="Loading",e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.Ended=3]="Ended",e[e.JoinedFromAnotherDevice=4]="JoinedFromAnotherDevice",e[e.Left=5]="Left",e[e.TerminalFailure=6]="TerminalFailure"}(to||(to={})),function(e){e.UNSET="UNSET",e.IN_PROGRESS="IN_PROGRESS",e.GRANTED="GRANTED",e.DENIED="DENIED"}(no||(no={})),function(e){e[e.None=0]="None",e[e.Audio=1]="Audio",e[e.Video=2]="Video",e[e.AudioAndVideo=3]="AudioAndVideo"}(ro||(ro={})),function(e){e.UNSET="UNSET",e.IN_PROGRESS="IN_PROGRESS",e.GRANTED="GRANTED",e.DENIED="DENIED"}(io||(io={}));!function(){function e(e){var t=this;this.meetingManagerConfig=e,this.meetingSession=null,this.meetingStatus=to.Loading,this.meetingStatusObservers=[],this.audioVideo=null,this.audioVideoObservers={},this.configuration=null,this.meetingId=null,this.meetingRegion=null,this.selectedAudioOutputDevice=null,this.selectedAudioOutputDeviceObservers=[],this.selectedAudioInputDevice=null,this.selectedAudioInputTransformDevice=null,this.selectedAudioInputDeviceObservers=[],this.selectedAudioInputTransformDeviceObservers=[],this.selectAudioInputDeviceError=null,this.selectAudioInputDeviceErrorObservers=[],this.selectedVideoInputDevice=null,this.selectedVideoInputDeviceObservers=[],this.selectVideoInputDeviceError=null,this.selectVideoInputDeviceErrorObservers=[],this.deviceLabelTriggerChangeObservers=[],this.audioInputDevices=null,this.audioOutputDevices=null,this.videoInputDevices=null,this.devicePermissionStatus=io.UNSET,this.devicePermissionsObservers=[],this.activeSpeakerListener=null,this.activeSpeakerCallbacks=[],this.activeSpeakers=[],this.audioVideoCallbacks=[],this.devicesUpdatedCallbacks=[],this.logLevel=u.LogLevel.WARN,this.postLoggerConfig=null,this.simulcastEnabled=!1,this.meetingEventObserverSet=new Set,this.eventDidReceive=function(e,n){t.publishEventDidReceiveUpdate(e,n)},this.audioVideoDidStart=function(){console.log("[MeetingManager audioVideoDidStart] Meeting started successfully"),t.meetingStatus=to.Succeeded,t.publishMeetingStatus()},this.audioVideoDidStop=function(e){var n=e.statusCode();switch(n){case u.MeetingSessionStatusCode.AudioCallEnded:console.log("[MeetingManager audioVideoDidStop] Meeting ended for all: "+n),t.meetingStatus=to.Ended,t.publishMeetingStatus(),t.leave();break;case u.MeetingSessionStatusCode.Left:console.log("[MeetingManager audioVideoDidStop] Left the meeting: "+n),t.meetingStatus=to.Left,t.publishMeetingStatus(),t.leave();break;case u.MeetingSessionStatusCode.AudioJoinedFromAnotherDevice:console.log("[MeetingManager audioVideoDidStop] Meeting joined from another device: "+n),t.meetingStatus=to.JoinedFromAnotherDevice,t.publishMeetingStatus(),t.leave();break;default:e.isFailure()?(console.log("[MeetingManager audioVideoDidStop] Non-Terminal failure occured: "+n),t.meetingStatus=to.Failed,t.publishMeetingStatus()):e.isTerminal()&&(console.log("[MeetingManager audioVideoDidStop] Terminal failure occured: "+n),t.meetingStatus=to.TerminalFailure,t.publishMeetingStatus()),console.log("[MeetingManager audioVideoDidStop] session stopped with code "+n),t.leave()}t.audioVideo&&t.audioVideo.removeObserver(t.audioVideoObservers)},this.selectAudioInputDevice=function(e){return f(t,void 0,void 0,(function(){var t,n,r,i,a,o,s;return p(this,(function(l){switch(l.label){case 0:if(t=e,"string"==typeof e&&(t=lo(e)),null!==t)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,null===(o=this.audioVideo)||void 0===o?void 0:o.chooseAudioInputDevice(null)];case 2:return l.sent(),this.selectAudioInputDeviceError=null,[3,4];case 3:return n=l.sent(),this.selectAudioInputDeviceError=n,console.error("Failed to choose audio input device.",n),[3,4];case 4:return this.selectedAudioInputTransformDevice=null,this.selectedAudioInputDevice=null,[3,12];case 5:return l.trys.push([5,7,,8]),[4,null===(s=this.audioVideo)||void 0===s?void 0:s.chooseAudioInputDevice(t)];case 6:return l.sent(),this.selectAudioInputDeviceError=null,[3,8];case 7:return r=l.sent(),this.selectAudioInputDeviceError=r,console.error("Failed to choose audio input device.",r),[3,8];case 8:return i=null,Object(u.isAudioTransformDevice)(e)?[4,e.intrinsicDevice()]:[3,10];case 9:return i=l.sent(),[3,11];case 10:i=e,l.label=11;case 11:null===i?this.selectedAudioInputDevice=null:"string"==typeof i?this.selectedAudioInputDevice=i:i instanceof MediaStream?this.selectedAudioInputDevice=i.id:(a=this.getDeviceID(i),this.selectedAudioInputDevice=a),this.selectedAudioInputTransformDevice=e,l.label=12;case 12:return this.publishSelectedAudioInputDevice(),this.publishSelectAudioInputDeviceError(),this.publishSelectedAudioInputTransformDevice(),[2]}}))}))},this.getDeviceID=function(e){Array.isArray(e)&&(e=e[0]);var t=e.deviceId;return"string"==typeof t?t:Array.isArray(t)?t[0]:Array.isArray(null==t?void 0:t.exact)&&(null==t?void 0:t.exact)?t.exact[0]:"string"==typeof(null==t?void 0:t.exact)?t.exact:""},this.selectAudioOutputDevice=function(e){return f(t,void 0,void 0,(function(){var t,n;return p(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,null===(n=this.audioVideo)||void 0===n?void 0:n.chooseAudioOutputDevice(e)];case 1:return r.sent(),this.selectedAudioOutputDevice=e,this.publishSelectedAudioOutputDevice(),[3,3];case 2:return t=r.sent(),console.error("Error setting audio output - "+t),[3,3];case 3:return[2]}}))}))},this.selectVideoInputDevice=function(e){return f(t,void 0,void 0,(function(){var t,n,r,i,a;return p(this,(function(o){switch(o.label){case 0:if(null!==(t=so(e)))return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,null===(i=this.audioVideo)||void 0===i?void 0:i.chooseVideoInputDevice(null)];case 2:return o.sent(),this.selectVideoInputDeviceError=null,[3,4];case 3:return n=o.sent(),this.selectVideoInputDeviceError=n,console.error("Failed to choose video input device.",n),[3,4];case 4:return this.selectedVideoInputDevice=null,[3,9];case 5:return o.trys.push([5,7,,8]),[4,null===(a=this.audioVideo)||void 0===a?void 0:a.chooseVideoInputDevice(t)];case 6:return o.sent(),this.selectVideoInputDeviceError=null,[3,8];case 7:return r=o.sent(),this.selectVideoInputDeviceError=r,console.error("Failed to choose video input device.",r),[3,8];case 8:this.selectedVideoInputDevice=e,o.label=9;case 9:return this.publishSelectedVideoInputDevice(),this.publishSelectVideoInputDeviceError(),[2]}}))}))},this.invokeDeviceProvider=function(e){t.setupDeviceLabelTrigger(e),t.publishDeviceLabelTriggerChange()},this.subscribeToAudioVideo=function(e){t.audioVideoCallbacks.push(e)},this.unsubscribeFromAudioVideo=function(e){t.audioVideoCallbacks=t.audioVideoCallbacks.filter((function(t){return t!==e}))},this.publishAudioVideo=function(){t.audioVideoCallbacks.forEach((function(e){e(t.audioVideo)}))},this.subscribeToActiveSpeaker=function(e){t.activeSpeakerCallbacks.push(e),e(t.activeSpeakers)},this.unsubscribeFromActiveSpeaker=function(e){t.activeSpeakerCallbacks=t.activeSpeakerCallbacks.filter((function(t){return t!==e}))},this.publishActiveSpeaker=function(){t.activeSpeakerCallbacks.forEach((function(e){e(t.activeSpeakers)}))},this.subscribeToDevicePermissionStatus=function(e){t.devicePermissionsObservers.push(e)},this.unsubscribeFromDevicePermissionStatus=function(e){t.devicePermissionsObservers=t.devicePermissionsObservers.filter((function(t){return t!==e}))},this.publishDevicePermissionStatus=function(){for(var e=0,n=t.devicePermissionsObservers;e<n.length;e++){(0,n[e])(t.devicePermissionStatus)}},this.subscribeToSelectedVideoInputDevice=function(e){t.selectedVideoInputDeviceObservers.push(e)},this.unsubscribeFromSelectedVideoInputDevice=function(e){t.selectedVideoInputDeviceObservers=t.selectedVideoInputDeviceObservers.filter((function(t){return t!==e}))},this.publishSelectedVideoInputDevice=function(){for(var e=0,n=t.selectedVideoInputDeviceObservers;e<n.length;e++){(0,n[e])(t.selectedVideoInputDevice)}},this.subscribeToSelectedAudioInputDevice=function(e){t.selectedAudioInputDeviceObservers.push(e)},this.subscribeToSelectedAudioInputTransformDevice=function(e){t.selectedAudioInputTransformDeviceObservers.push(e)},this.unsubscribeFromSelectedAudioInputDevice=function(e){t.selectedAudioInputDeviceObservers=t.selectedAudioInputDeviceObservers.filter((function(t){return t!==e}))},this.unsubscribeFromSelectedAudioInputTransformDevice=function(e){t.selectedAudioInputTransformDeviceObservers=t.selectedAudioInputTransformDeviceObservers.filter((function(t){return t!==e}))},this.publishSelectedAudioInputDevice=function(){for(var e=0,n=t.selectedAudioInputDeviceObservers;e<n.length;e++){(0,n[e])(t.selectedAudioInputDevice)}},this.publishSelectedAudioInputTransformDevice=function(){for(var e=0,n=t.selectedAudioInputTransformDeviceObservers;e<n.length;e++){(0,n[e])(t.selectedAudioInputTransformDevice)}},this.subscribeToSelectedAudioOutputDevice=function(e){t.selectedAudioOutputDeviceObservers.push(e)},this.unsubscribeFromSelectedAudioOutputDevice=function(e){t.selectedAudioOutputDeviceObservers=t.selectedAudioOutputDeviceObservers.filter((function(t){return t!==e}))},this.publishSelectedAudioOutputDevice=function(){for(var e=0,n=t.selectedAudioOutputDeviceObservers;e<n.length;e++){(0,n[e])(t.selectedAudioOutputDevice)}},this.subscribeToMeetingStatus=function(e){t.meetingStatusObservers.push(e),e(t.meetingStatus)},this.unsubscribeFromMeetingStatus=function(e){t.meetingStatusObservers=t.meetingStatusObservers.filter((function(t){return t!==e}))},this.publishMeetingStatus=function(){t.meetingStatusObservers.forEach((function(e){e(t.meetingStatus)}))},this.subscribeToSelectAudioInputDeviceError=function(e){t.selectAudioInputDeviceErrorObservers.push(e)},this.unsubscribeFromSelectAudioInputDeviceError=function(e){t.selectAudioInputDeviceErrorObservers=t.selectAudioInputDeviceErrorObservers.filter((function(t){return t!==e}))},this.publishSelectAudioInputDeviceError=function(){for(var e=0,n=t.selectAudioInputDeviceErrorObservers;e<n.length;e++){(0,n[e])(t.selectAudioInputDeviceError)}},this.subscribeToSelectVideoInputDeviceError=function(e){t.selectVideoInputDeviceErrorObservers.push(e)},this.unsubscribeFromSelectVideoInputDeviceError=function(e){t.selectVideoInputDeviceErrorObservers=t.selectVideoInputDeviceErrorObservers.filter((function(t){return t!==e}))},this.publishSelectVideoInputDeviceError=function(){for(var e=0,n=t.selectVideoInputDeviceErrorObservers;e<n.length;e++){(0,n[e])(t.selectVideoInputDeviceError)}},this.subscribeToDeviceLabelTriggerChange=function(e){t.deviceLabelTriggerChangeObservers.push(e)},this.unsubscribeFromDeviceLabelTriggerChange=function(e){t.deviceLabelTriggerChangeObservers=t.deviceLabelTriggerChangeObservers.filter((function(t){return t!==e}))},this.publishDeviceLabelTriggerChange=function(){for(var e=0,n=t.deviceLabelTriggerChangeObservers;e<n.length;e++){(0,n[e])()}},this.subscribeToEventDidReceive=function(e){t.meetingEventObserverSet.add(e)},this.unsubscribeFromEventDidReceive=function(e){t.meetingEventObserverSet.delete(e)},this.publishEventDidReceiveUpdate=function(e,n){t.meetingEventObserverSet.forEach((function(t){return t(e,n)}))};var n=this.meetingManagerConfig,r=n.simulcastEnabled,i=n.logger,a=n.logLevel,o=n.postLogConfig,s=n.videoDownlinkBandwidthPolicy;r&&(this.simulcastEnabled=r),i?this.logger=i:(this.logLevel=a,o&&(this.postLoggerConfig=o)),s&&(this.videoDownlinkBandwidthPolicy=s)}e.prototype.initializeMeetingManager=function(){this.meetingSession=null,this.audioVideo=null,this.configuration=null,this.meetingId=null,this.meetingRegion=null,this.selectedAudioOutputDevice=null,this.selectedAudioInputDevice=null,this.selectedAudioInputTransformDevice=null,this.selectedVideoInputDevice=null,this.selectAudioInputDeviceError=null,this.selectVideoInputDeviceError=null,this.audioInputDevices=[],this.audioOutputDevices=[],this.videoInputDevices=[],this.activeSpeakers=[],this.activeSpeakerListener=null,this.audioVideoObservers={}},e.prototype.join=function(e){var t=e.meetingInfo,n=e.attendeeInfo,r=e.deviceLabels,i=void 0===r?ro.AudioAndVideo:r,a=e.eventReporter,o=e.meetingManagerConfig;return f(this,void 0,void 0,(function(){return p(this,(function(e){switch(e.label){case 0:return o&&(this.meetingManagerConfig=o),this.configuration=new u.MeetingSessionConfiguration(t,n),this.meetingRegion=t.MediaRegion,this.meetingId=this.configuration.meetingId,a&&(this.eventReporter=a),[4,this.initializeMeetingSession(this.configuration,i)];case 1:return e.sent(),[2]}}))}))},e.prototype.start=function(){var e;return f(this,void 0,void 0,(function(){return p(this,(function(t){return null===(e=this.audioVideo)||void 0===e||e.start(),[2]}))}))},e.prototype.leave=function(){return f(this,void 0,void 0,(function(){return p(this,(function(e){switch(e.label){case 0:if(!this.audioVideo)return[3,7];this.audioVideo.stopContentShare(),this.audioVideo.stopLocalVideoTile(),this.audioVideo.unbindAudioElement(),e.label=1;case 1:return e.trys.push([1,5,,6]),[4,this.audioVideo.chooseVideoInputDevice(null)];case 2:return e.sent(),[4,this.audioVideo.chooseAudioInputDevice(null)];case 3:return e.sent(),[4,this.audioVideo.chooseAudioOutputDevice(null)];case 4:return e.sent(),[3,6];case 5:return e.sent(),console.log("Unable to set device to null on leave."),[3,6];case 6:this.activeSpeakerListener&&this.audioVideo.unsubscribeFromActiveSpeakerDetector(this.activeSpeakerListener),this.audioVideo.stop(),e.label=7;case 7:return this.initializeMeetingManager(),this.publishAudioVideo(),this.publishActiveSpeaker(),[2]}}))}))},e.prototype.initializeMeetingSession=function(e,t){return void 0===t&&(t=ro.AudioAndVideo),f(this,void 0,void 0,(function(){var n,r,i,a,o,s,l,c;return p(this,(function(d){switch(d.label){case 0:return n=this.meetingManagerConfig,r=n.simulcastEnabled,i=n.enableWebAudio,a=n.logger,o=n.videoUplinkBandwidthPolicy,s=n.videoDownlinkBandwidthPolicy,r&&(e.enableUnifiedPlanForChromiumBasedBrowsers=!0,e.enableSimulcastForUnifiedPlanChromiumBasedBrowsers=!0),l=a||this.createLogger(e),o&&(e.videoUplinkBandwidthPolicy=o),s&&(e.videoDownlinkBandwidthPolicy=s),c=new u.DefaultDeviceController(l,{enableWebAudio:i}),this.meetingSession=new u.DefaultMeetingSession(e,l,c,this.eventReporter),this.audioVideo=this.meetingSession.audioVideo,this.publishAudioVideo(),this.audioVideo.removeObserver({eventDidReceive:this.eventDidReceive}),this.audioVideo.addObserver({eventDidReceive:this.eventDidReceive}),this.setupAudioVideoObservers(),this.setupDeviceLabelTrigger(t),[4,this.listAndSelectDevices(t)];case 1:return d.sent(),this.setupActiveSpeakerDetection(),this.meetingStatus=to.Loading,this.publishMeetingStatus(),[2]}}))}))},e.prototype.createLogger=function(e){var t=this.meetingManagerConfig,n=t.logLevel,r=t.postLogConfig,i=new u.ConsoleLogger("SDK",n),a=i;if(r){var o=r.name,s=r.batchSize,l=r.intervalMs,c=r.url,d=r.logLevel;a=new u.MultiLogger(i,new u.MeetingSessionPOSTLogger(o,e,s,l,c,d))}return a},e.prototype.setupAudioVideoObservers=function(){this.audioVideo&&(this.audioVideoObservers={audioVideoDidStart:this.audioVideoDidStart,audioVideoDidStop:this.audioVideoDidStop},this.audioVideo.addObserver(this.audioVideoObservers))},e.prototype.updateDeviceLists=function(){var e,t,n;return f(this,void 0,void 0,(function(){var r,i,a;return p(this,(function(o){switch(o.label){case 0:return r=this,[4,null===(e=this.audioVideo)||void 0===e?void 0:e.listAudioInputDevices()];case 1:return r.audioInputDevices=o.sent()||[],i=this,[4,null===(t=this.audioVideo)||void 0===t?void 0:t.listVideoInputDevices()];case 2:return i.videoInputDevices=o.sent()||[],a=this,[4,null===(n=this.audioVideo)||void 0===n?void 0:n.listAudioOutputDevices()];case 3:return a.audioOutputDevices=o.sent()||[],[2]}}))}))},e.prototype.setupDeviceLabelTrigger=function(e){var t,n,r=this;if(void 0===e&&(e=ro.AudioAndVideo),"function"==typeof e)n=e;else if(e===ro.None)n=ho;else{var i={};switch(e){case ro.Audio:i.audio=!0;break;case ro.Video:i.video=!0;break;case ro.AudioAndVideo:i.audio=!0,i.video=!0}n=function(){return f(r,void 0,void 0,(function(){var e,t,n,r;return p(this,(function(a){switch(a.label){case 0:this.devicePermissionStatus=io.IN_PROGRESS,this.publishDevicePermissionStatus(),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,navigator.mediaDevices.enumerateDevices()];case 2:return e=a.sent(),t=e.some((function(e){return"videoinput"===e.kind})),[4,navigator.mediaDevices.getUserMedia({audio:i.audio,video:i.video&&t})];case 3:return n=a.sent(),this.devicePermissionStatus=io.GRANTED,this.publishDevicePermissionStatus(),[2,n];case 4:throw r=a.sent(),console.error("Failed to get device permissions"),this.devicePermissionStatus=io.DENIED,this.publishDevicePermissionStatus(),new Error(r);case 5:return[2]}}))}))}}null===(t=this.audioVideo)||void 0===t||t.setDeviceLabelTrigger(n)},e.prototype.setupActiveSpeakerDetection=function(){var e,t=this,n=this.meetingManagerConfig.activeSpeakerPolicy;this.publishActiveSpeaker(),this.activeSpeakerListener=function(e){t.activeSpeakers=e,t.activeSpeakerCallbacks.forEach((function(t){return t(e)}))},null===(e=this.audioVideo)||void 0===e||e.subscribeToActiveSpeakerDetector(n||new u.DefaultActiveSpeakerPolicy,this.activeSpeakerListener)},e.prototype.listAndSelectDevices=function(e){var t,n;return void 0===e&&(e=ro.AudioAndVideo),f(this,void 0,void 0,(function(){var r,i,a,o;return p(this,(function(s){switch(s.label){case 0:return[4,this.updateDeviceLists()];case 1:if(s.sent(),"function"==typeof e)return[2];switch(r=!1,i=!1,e){case ro.None:break;case ro.Audio:r=!0;break;case ro.Video:i=!0;break;case ro.AudioAndVideo:r=!0,i=!0}if(!r||this.selectedAudioInputDevice||!this.audioInputDevices||!this.audioInputDevices.length)return[3,6];this.selectedAudioInputDevice=this.audioInputDevices[0].deviceId,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,null===(t=this.audioVideo)||void 0===t?void 0:t.chooseAudioInputDevice(this.audioInputDevices[0].deviceId)];case 3:return s.sent(),[3,5];case 4:return a=s.sent(),console.error("Error in selecting audio input device - "+a),[3,5];case 5:this.publishSelectedAudioInputDevice(),s.label=6;case 6:if(!r||this.selectedAudioOutputDevice||!this.audioOutputDevices||!this.audioOutputDevices.length)return[3,11];if(this.selectedAudioOutputDevice=this.audioOutputDevices[0].deviceId,!uo())return[3,10];s.label=7;case 7:return s.trys.push([7,9,,10]),[4,null===(n=this.audioVideo)||void 0===n?void 0:n.chooseAudioOutputDevice(this.audioOutputDevices[0].deviceId)];case 8:return s.sent(),[3,10];case 9:return o=s.sent(),console.error("Failed to choose audio output device.",o),[3,10];case 10:this.publishSelectedAudioOutputDevice(),s.label=11;case 11:return i&&!this.selectedVideoInputDevice&&this.videoInputDevices&&this.videoInputDevices.length&&(this.selectedVideoInputDevice=this.videoInputDevices[0].deviceId,this.publishSelectedVideoInputDevice()),[2]}}))}))}}();var fo,po=i.a.createContext(null);function mo(){var e=Object(r.useContext)(po);if(!e)throw new Error("userRosterState must be used within RosterProvider");return e}!function(e){e[e.UPDATE=0]="UPDATE",e[e.REMOVE=1]="REMOVE",e[e.RESET=2]="RESET"}(fo||(fo={}));var go=Object(r.createContext)(null),vo=function(){var e=Object(r.useContext)(go);if(!e)throw new Error("useRemoteVideoTileState must be used within a RemoteVideoTileProvider");return e},bo=Object(r.createContext)(null),yo=function(){var e=Object(r.useContext)(bo);if(!e)throw new Error("useLocalVideo must be used within LocalVideoProvider");return e},Ao=Object(r.createContext)(null);function _o(){var e=Object(r.useContext)(Ao);if(!e)throw new Error("useFeaturedTileState must be used within an FeaturedVideoTileProvider");return e}var wo,Eo=Object(r.createContext)(null);!function(e){e[e.STARTING=0]="STARTING",e[e.DID_STOP=1]="DID_STOP",e[e.UPDATE=2]="UPDATE",e[e.TOGGLE_PAUSE=3]="TOGGLE_PAUSE",e[e.REMOVE=4]="REMOVE",e[e.DENIED=5]="DENIED",e[e.RESET=6]="RESET"}(wo||(wo={}));var So=Object(r.createContext)(null),Co=Object(r.createContext)(null),To=function(){var e=Object(r.useContext)(So);if(!e)throw new Error("useContentShareState must be used within a ContentShareProvider");return e},ko=(Object(r.createContext)(void 0),Object(r.createContext)(null)),xo=function(){var e=Object(r.useContext)(ko);if(!e)throw new Error("useMeetingManager must be used within MeetingProvider");return e},Oo=Object(r.createContext)(null),Io=function(){return Object(r.useContext)(Oo)},Mo={NONE:"None",BLUE:"Blue",SMPTE:"SMPTE Color Bars"},Po={NONE:"None",440:"440 Hz"},Do=Object(r.createContext)(null),No=function(e){var t=e&&e.additionalDevices,n=Object(r.useContext)(Do);if(!n)throw new Error("useAudioInputs must be used within AudioInputProvider");var i=n.devices,a=n.selectedDevice,o=n.selectDeviceError;if(t){var s=oo(Po);null!==s&&(i=m(m([],i),s))}return{devices:i,selectedDevice:a,selectDeviceError:o}},Lo=Object(r.createContext)(null),Ro=function(){var e=Object(r.useContext)(Lo);if(!e)throw new Error("useAudioOutputs must be used within AudioOutputProvider");return e},Bo=Object(r.createContext)(null),jo=function(e){var t=e&&e.additionalDevices,n=e&&Mo,i=Object(r.useContext)(Bo);if(!i)throw new Error("useVideoInputs must be used within VideoInputProvider");var a=i.devices,o=i.selectedDevice,s=i.selectDeviceError;if(t){var l=oo(n);null!==l&&(a=m(m([],a),l))}return{devices:a,selectedDevice:o,selectDeviceError:s}},Fo=function(e){var t=e.onChange,n=e.label,r=e.devices,a=e.selectedDeviceId,o=e.notFoundMsg,s=r.map((function(e){return{value:e.deviceId,label:e.label}})),l=s.length?s:[{value:"not-available",label:o}];return i.a.createElement(Ar,{field:Ei,options:l,onChange:function(e){return f(this,void 0,void 0,(function(){var n;return p(this,(function(r){return"not-available"===(n=e.target.value)?[2]:(t(n),[2])}))}))},value:a||"",label:n})},Uo=function(e){var t,n=e.notFoundMsg,a=void 0===n?"No speaker devices found":n,o=e.label,s=void 0===o?"Speaker source":o,l=e.onChange,c=Ro(),u=c.devices,d=c.selectedDevice,h=(t=xo(),Object(r.useCallback)((function(e){return f(void 0,void 0,void 0,(function(){return p(this,(function(n){switch(n.label){case 0:return uo()?[4,t.selectAudioOutputDevice(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}),[]));return i.a.createElement(Fo,{label:s,devices:u,onChange:function(e){return f(this,void 0,void 0,(function(){return p(this,(function(t){return h(e),l&&l(e),[2]}))}))},selectedDeviceId:d,notFoundMsg:a})},Ho=function(){var e=xo();return Object(r.useCallback)((function(t){return f(void 0,void 0,void 0,(function(){return p(this,(function(n){switch(n.label){case 0:return[4,e.selectAudioInputDevice(t)];case 1:return n.sent(),[2]}}))}))}),[])},zo=function(e){var t=e.notFoundMsg,n=void 0===t?"No microphone devices found":t,r=e.label,a=void 0===r?"Microphone source":r,o=Ho(),s=No(),l=s.devices,c=s.selectedDevice;return i.a.createElement(Fo,{label:a,onChange:o,devices:l,selectedDeviceId:c,notFoundMsg:n})},Vo=function(e){var t=e.notFoundMsg,n=void 0===t?"No camera devices found":t,r=e.label,a=void 0===r?"Camera source":r,o=xo(),s=jo(),l=s.devices,c=s.selectedDevice;return i.a.createElement(Fo,{label:a,onChange:function(e){return f(this,void 0,void 0,(function(){return p(this,(function(t){return o.selectVideoInputDevice(e),[2]}))}))},devices:l,selectedDeviceId:c,notFoundMsg:n})};var Wo=function(e){var t,n=e.label,a=void 0===n?"Video quality":n,o=e.labelForUnselected,s=void 0===o?"Select video quality":o,l=(t=Io(),Object(r.useCallback)((function(e){if(t)switch(console.log("Selecting video quality: "+e),e){case"360p":t.chooseVideoInputQuality(640,360,15,600);break;case"540p":t.chooseVideoInputQuality(960,540,15,1400);break;case"720p":t.chooseVideoInputQuality(1280,720,15,1400);break;default:console.log("Unsupported video quality: "+e)}}),[t])),c=Object(r.useState)("unselected"),u=c[0],d=c[1],h=[{label:s,value:"unselected"},{label:_n,value:"720p"},{label:An,value:"540p"},{label:yn,value:"360p"}];return i.a.createElement(Ar,{field:Ei,options:h,onChange:function(e){return f(this,void 0,void 0,(function(){var t;return p(this,(function(n){return t=e.target.value,d(t),l(t),[2]}))}))},value:u,label:a})};function Go(){var e=Io(),t=Object(r.useState)((function(){return(null==e?void 0:e.realtimeIsLocalAudioMuted())||!1})),n=t[0],i=t[1];Object(r.useEffect)((function(){var t=function(e){i(e)};return null==e||e.realtimeSubscribeToMuteAndUnmuteLocalAudio(t),i((null==e?void 0:e.realtimeIsLocalAudioMuted())||!1),function(){null==e||e.realtimeUnsubscribeToMuteAndUnmuteLocalAudio(t)}}),[e]);var a=Object(r.useCallback)((function(){n?null==e||e.realtimeUnmuteLocalAudio():null==e||e.realtimeMuteLocalAudio()}),[n,e]);return{muted:n,toggleMute:a}}var qo,Yo=Object(r.createContext)(null),Ko=function(e){var t=e.muteLabel,n=void 0===t?"Mute":t,a=e.unmuteLabel,o=void 0===a?"Unmute":a,s=e.mutedIconTitle,l=e.unmutedIconTitle,c=e.voiceFocusOnLabel,d=void 0===c?"Amazon Voice Focus enabled":c,h=e.voiceFocusOffLabel,m=void 0===h?"Enable Amazon Voice Focus":h,g=xo(),v=Object(r.useState)(!1),b=v[0],y=v[1],A=Object(r.useState)(!1),_=A[0],w=A[1],E=Object(r.useState)(!1),S=E[0],C=E[1],T=Object(r.useState)(null),k=T[0],x=T[1],O=Go(),I=O.muted,M=O.toggleMute,P=Object(r.useState)(g.selectedAudioInputDevice),D=P[0],N=P[1],L=function(){var e=Object(r.useContext)(Yo);if(!e)throw new Error("useVoiceFocus must be used within VoiceFocusProvider");return e}(),R=L.isVoiceFocusSupported,B=L.addVoiceFocus,j=No({additionalDevices:!0}),F=j.devices,U=j.selectedDevice;return Object(r.useEffect)((function(){return g.subscribeToSelectedAudioInputTransformDevice(N),function(){g.unsubscribeFromSelectedAudioInputTransformDevice(N)}}),[]),Object(r.useEffect)((function(){D instanceof u.VoiceFocusTransformDevice?C(!0):C(!1)}),[D]),Object(r.useEffect)((function(){var e=F.map((function(e){return i.a.createElement(qn,{key:e.deviceId,children:i.a.createElement("span",null,e.label),checked:co(U,e.deviceId),onClick:function(){return f(void 0,void 0,void 0,(function(){var t,n;return p(this,(function(r){switch(r.label){case 0:return!_||b?[3,3]:(y(!0),t=lo(e.deviceId),[4,B(t)]);case 1:return n=r.sent(),[4,g.selectAudioInputDevice(n)];case 2:return r.sent(),y(!1),[3,5];case 3:return[4,g.selectAudioInputDevice(e.deviceId)];case 4:r.sent(),r.label=5;case 5:return[2]}}))}))}})}));if(R){var t=i.a.createElement(qn,{key:"voicefocus",children:i.a.createElement(i.a.Fragment,null,b&&i.a.createElement(Te,{width:"1.5rem",height:"1.5rem"}),S?d:m),checked:S,disabled:b,onClick:function(){y(!0),w((function(e){return!e}))}});null==e||e.push(i.a.createElement(di,{key:"separator"})),null==e||e.push(t)}x(e)}),[B,D,F.length,F[0].label,b,S,_,R,U]),Object(r.useEffect)((function(){!function(){f(this,void 0,void 0,(function(){var e,t;return p(this,(function(n){switch(n.label){case 0:return e=D,_?"string"!=typeof D?[3,2]:(t=lo(D),[4,B(t)]):[3,3];case 1:e=n.sent(),n.label=2;case 2:return[3,4];case 3:D instanceof u.VoiceFocusTransformDevice&&(e=D.getInnerDevice()),n.label=4;case 4:return[4,g.selectAudioInputDevice(e)];case 5:return n.sent(),y(!1),[2]}}))}))}()}),[_]),i.a.createElement(er,{icon:i.a.createElement(_e,{muted:I,mutedTitle:s,unmutedTitle:l}),onClick:M,label:I?o:n,children:k})},Xo={additionalDevices:!0},Qo=function(e){var t=e.label,n=void 0===t?"Video":t,a=jo(Xo),o=a.devices,s=a.selectedDevice,l=yo(),c=l.isVideoEnabled,u=l.toggleVideo,d=function(){var e=yo(),t=e.isVideoEnabled,n=e.toggleVideo,i=xo();return Object(r.useCallback)((function(e){return f(void 0,void 0,void 0,(function(){return p(this,(function(r){switch(r.label){case 0:return"none"===e&&t?[4,n()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[4,i.selectVideoInputDevice(e)];case 3:return r.sent(),[2]}}))}))}),[t])}(),h=o.map((function(e){return{children:i.a.createElement("span",null,e.label),checked:co(s,e.deviceId),onClick:function(){return d(e.deviceId)}}}));return i.a.createElement(er,{icon:i.a.createElement(J,{disabled:!c}),onClick:u,label:n,popOver:h})},$o=function(e){var t=e.label,n=void 0===t?"Content":t,a=e.pauseLabel,o=void 0===a?"Pause":a,s=e.unpauseLabel,l=void 0===s?"Unpause":s,c=e.iconTitle,u=To().isLocalUserSharing,d=function(){var e=Object(r.useContext)(Co);if(!e)throw new Error("useContentShareControlContext must be used within ContentShareControlProvider");return e}(),h=d.paused,f=d.toggleContentShare,p=d.togglePauseContentShare,m=[{children:i.a.createElement("span",null,h?l:o),onClick:p}];return i.a.createElement(i.a.Fragment,null,i.a.createElement(er,{icon:i.a.createElement(pe,{title:c}),onClick:f,label:n,popOver:u?m:null}))},Jo=function(e){var t=e.label,n=void 0===t?"Speaker":t,a=xo(),o=Ro(),s=o.devices,l=o.selectedDevice,c=function(){var e=Object(r.useContext)(Eo);if(!e)throw new Error("useLocalAudioOutput must be used within LocalAudioOutputProvider");return e}(),u=c.isAudioOn,d=c.toggleAudio,h=s.map((function(e){return{children:i.a.createElement("span",null,e.label),checked:co(l,e.deviceId),onClick:function(){return t=e.deviceId,f(void 0,void 0,void 0,(function(){return p(this,(function(e){switch(e.label){case 0:return uo()?[4,a.selectAudioOutputDevice(t)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}));var t}}}));return i.a.createElement(i.a.Fragment,null,i.a.createElement(er,{icon:i.a.createElement(Ce,{disabled:!u}),onClick:d,label:n,popOver:h.length?h:null}))},Zo=Object(a.c)(ga)(qo||(qo=g(["\n  background-color: ",";\n"],["\n  background-color: ",";\n"])),(function(e){return e.theme.colors.greys.grey80})),es=function(e){var t=e.className,n=h(e,["className"]),a=Io(),o=To().tileId,s=Object(r.useRef)(null);return Object(r.useEffect)((function(){if(a&&s.current&&o)return a.bindVideoElement(o,s.current),function(){a.getVideoTile(o)&&a.unbindVideoElement(o)}}),[a,o]),o?i.a.createElement(Zo,d({objectFit:"contain",className:t||""},n,{ref:s})):null};function ts(e){Object(r.useEffect)((function(){var t;function n(){if(e.current){var t=e.current.videoHeight,n=e.current.videoWidth;e.current.style.objectFit=t>n?"contain":"cover"}}return null===(t=e.current)||void 0===t||t.addEventListener("loadedmetadata",n),function(){var t;return null===(t=e.current)||void 0===t?void 0:t.removeEventListener("loadedmetadata",n)}}),[e])}var ns,rs,is=Object(a.c)(ga)(ns||(ns=g(["\n  ",";\n"],["\n  ",";\n"])),(function(e){return e.active?"":"display: none"})),as=function(e){var t=e.nameplate,n=h(e,["nameplate"]),a=yo(),o=a.tileId,s=a.isVideoEnabled,l=Io(),c=Object(r.useRef)(null);return ts(c),Object(r.useEffect)((function(){if(l&&o&&c.current&&s)return l.bindVideoElement(o,c.current),function(){l.getVideoTile(o)&&l.unbindVideoElement(o)}}),[l,o,s]),i.a.createElement(is,d({active:s,nameplate:t,ref:c},n))},os=Object(a.c)(ga)(rs||(rs=g(["\n  height: auto;\n  background: unset;\n\n  video {\n    position: static;\n  }\n"],["\n  height: auto;\n  background: unset;\n\n  video {\n    position: static;\n  }\n"]))),ss=function(e){var t=Io(),n=Object(r.useRef)(null),a=jo().selectedDevice,o=yo(),s=o.isVideoEnabled,l=o.setIsVideoEnabled;return Object(r.useEffect)((function(){if(t&&a&&n.current){var e=!0,r=n.current;return function(){f(this,void 0,void 0,(function(){return p(this,(function(r){switch(r.label){case 0:return t?[4,t.chooseVideoInputDevice(a)]:[2];case 1:return r.sent(),n.current&&e&&t.startVideoPreviewForVideoInput(n.current),[2]}}))}))}(),function(){e=!1,r&&(t.stopVideoPreviewForVideoInput(r),s&&l(!1))}}}),[t,a]),i.a.createElement(os,d({},e,{ref:n}))},ls=function(e){var t=e.name,n=e.className,a=e.tileId,o=h(e,["name","className","tileId"]),s=Io(),l=Object(r.useRef)(null);return ts(l),Object(r.useEffect)((function(){if(s&&l.current)return s.bindVideoElement(a,l.current),function(){s.getVideoTile(a)&&s.unbindVideoElement(a)}}),[s,a]),i.a.createElement(ga,d({},o,{ref:l,nameplate:t,className:"ch-remote-video--"+a+" "+(n||"")}))},cs=function(e){var t=mo().roster,n=vo(),r=n.tiles,a=n.tileIdToAttendeeId;return i.a.createElement(i.a.Fragment,null,r.map((function(n){var r=(t[a[n]]||{}).name;return i.a.createElement(ls,d({},e,{key:n,tileId:n,name:r}))})))};Object(r.memo)(cs);var us=function(e){var t=Object(r.useContext)(fa),n=mo().roster,a=_o().tileId,o=To().tileId,s=vo(),l=s.tiles,c=s.tileIdToAttendeeId;return i.a.createElement(i.a.Fragment,null,l.map((function(r){var s=!o&&a===r,l=t&&s?"grid-area: ft;":"",u=(s?"ch-featured-tile":"")+" "+(e.className||""),h=(n[c[r]]||{}).name;return i.a.createElement(ls,d({tileId:r,name:h},e,{className:u,key:r,css:l}))})))};Object(r.memo)(us);var ds,hs=a.c.div(ds||(ds=g(["\n  position: relative;\n  height: inherit;\n  line-height: 0;\n\n  ","\n\n  .ch-mic-icon {\n    position: relative;\n    z-index: 2;\n    width: 100%;\n  }\n\n  .ch-bg-volume-wrapper {\n    position: absolute;\n    bottom: 41%;\n    left: 40%;\n    height: 38%;\n    width: 21%;\n    border-radius: 20%;\n    overflow: hidden;\n  }\n\n  .ch-bg-volume-fill {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    transform-origin: bottom;\n    will-change: transform;\n    background-color: ",";\n  }\n"],["\n  position: relative;\n  height: inherit;\n  line-height: 0;\n\n  ","\n\n  .ch-mic-icon {\n    position: relative;\n    z-index: 2;\n    width: 100%;\n  }\n\n  .ch-bg-volume-wrapper {\n    position: absolute;\n    bottom: 41%;\n    left: 40%;\n    height: 38%;\n    width: 21%;\n    border-radius: 20%;\n    overflow: hidden;\n  }\n\n  .ch-bg-volume-fill {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    transform-origin: bottom;\n    will-change: transform;\n    background-color: ",";\n  }\n"])),P,(function(e){return e.signalStrength&&e.signalStrength<=.5?e.theme.colors.error.light:e.theme.colors.primary.light})),fs=Object(r.forwardRef)((function(e,t){var n=e.muted,r=void 0!==n&&n,a=e.signalStrength,o=e.className,s=h(e,["muted","signalStrength","className"]),l=void 0!==a&&a<=.5,c=o?o+" ch-mic-volume-indicator":"ch-mic-volume-indicator";return i.a.createElement(hs,d({className:c,signalStrength:a,muted:r},s),i.a.createElement(_e,{muted:r,className:"ch-mic-icon",poorConnection:l}),i.a.createElement("div",{className:"ch-bg-volume-wrapper"},i.a.createElement("div",{ref:t,className:"ch-bg-volume-fill","data-testid":"volume-fill"})))}));function ps(e){var t=Io(),n=Object(r.useState)(!1),i=n[0],a=n[1],o=Object(r.useState)(1),s=o[0],l=o[1];return Object(r.useEffect)((function(){if(t){var n=function(e,t,n,r){null!==n&&a(n),null!==r&&l(r)};return t.realtimeSubscribeToVolumeIndicator(e,n),function(){return t.realtimeUnsubscribeFromVolumeIndicator(e,n)}}}),[t,e]),{muted:i,signalStrength:s}}var ms=function(e){var t=e.attendeeId,n=h(e,["attendeeId"]),a=Io(),o=Object(r.useRef)(null),s=ps(t),l=s.signalStrength,c=s.muted;return Object(r.useEffect)((function(){if(a&&t&&o.current){var e=function(e,t,n,r){o.current&&(o.current.style.transform="scaleY("+t+")")};return a.realtimeSubscribeToVolumeIndicator(t,e),function(){return a.realtimeUnsubscribeFromVolumeIndicator(t,e)}}}),[t]),i.a.createElement(fs,d({},n,{ref:o,muted:c,signalStrength:l}))};function gs(e){var t=Io(),n=ps(e),i=Object(r.useState)((function(){var n,r,i;if(!t)return null;var a=null===(i=null===(r=null===(n=t.audioVideoController)||void 0===n?void 0:n.realtimeController)||void 0===r?void 0:r.state)||void 0===i?void 0:i.localAttendeeId,o=e===a,s=t.getAllVideoTiles().find((function(t){var n=t.state();return!(n.isContent||o&&!n.active)&&n.boundAttendeeId===e}));return s?s.state().tileId:null})),a=i[0],o=i[1],s=Object(r.useState)((function(){if(!t)return null;var n=t.getAllVideoTiles().find((function(t){var n=t.state();return!(!n.boundAttendeeId||!n.isContent)&&new u.DefaultModality(n.boundAttendeeId).base()===e}));return n?n.state().tileId:null})),l=s[0],c=s[1];Object(r.useEffect)((function(){if(t){var n={videoTileDidUpdate:function(t){t.boundAttendeeId===e&&(t.localTile&&a&&!t.boundVideoStream?o(null):a||!t.tileId||t.isContent||o(t.tileId))},videoTileWasRemoved:function(e){e===a&&o(null)}};return t.addObserver(n),function(){return t.removeObserver(n)}}}),[t,a,e]),Object(r.useEffect)((function(){if(t){var n={videoTileDidUpdate:function(t){t.isContent&&t.boundAttendeeId&&!l&&(new u.DefaultModality(t.boundAttendeeId).base()===e&&c(t.tileId))},videoTileWasRemoved:function(e){e===l&&c(null)}};return t.addObserver(n),function(){return t.removeObserver(n)}}}),[t,l,e]);var h="number"==typeof a&&a>-1,f="number"==typeof l&&l>-1;return d(d({},n),{videoEnabled:h,sharingContent:f})}var vs=function(e){var t,n=e.attendeeId,r=h(e,["attendeeId"]),a=gs(n),o=a.muted,s=a.videoEnabled,l=a.sharingContent,c=(null===(t=mo().roster[n])||void 0===t?void 0:t.name)||"";return i.a.createElement(Oa,d({name:c,muted:o,videoEnabled:s,sharingContent:l,microphone:i.a.createElement(ms,{attendeeId:n})},r))};var bs=function(){var e=xo(),t=Object(r.useState)((function(){return e.meetingStatus})),n=t[0],i=t[1];return Object(r.useEffect)((function(){var t=function(e){i(e)};return e.subscribeToMeetingStatus(t),function(){e.unsubscribeFromMeetingStatus(t)}}),[]),n},ys=function(e,t){void 0===t&&(t="horizontal"),function(e){var t=Io(),n=No().selectedDevice;Object(r.useEffect)((function(){if(t){var n,r,i,a,o=!1,s=!0;return t.addDeviceChangeObserver({audioInputsChanged:function(){o=!0}}),l(),function(){s=!1}}function l(){t&&s&&(null==(n=t.createAnalyserNodeForAudioInput())?void 0:n.getByteTimeDomainData)&&(r=new Uint8Array(n.fftSize),i=0,o=!1,requestAnimationFrame(c))}function c(){if(n){if(0===i){n.getByteTimeDomainData(r);for(var t=.01,u=0,d=r;u<d.length;u++){var h=d[u];t=Math.max(t,(h-128)/128)}var f=(Math.log(.01)-Math.log(t))/Math.log(.01);a!==f&&(a=f,e&&e(f))}i=(i+1)%2,o?setTimeout(l,500):s&&requestAnimationFrame(c)}}}),[t,n,e])}(Object(r.useCallback)((function(n){e.current&&(e.current.style.transform="horizontal"===t?"scaleX("+n+")":"scaleY("+n+")")}),[t]))};var As=["20rem","35.5rem","48rem","64rem","90rem"];As.xs=As[0],As.sm=As[1],As.md=As[2],As.lg=As[3],As.xl=As[4];var _s,ws,Es={breakpoints:As,mediaQueries:{min:{xs:"@media screen and (min-width: "+As.xs+")",sm:"@media screen and (min-width: "+As.sm+")",md:"@media screen and (min-width: "+As.md+")",lg:"@media screen and (min-width: "+As.lg+")",xl:"@media screen and (min-width: "+As.xl+")"},max:{xs:"@media screen and (max-width: "+As.xs+")",sm:"@media screen and (max-width: "+As.sm+")",md:"@media screen and (max-width: "+As.md+")",lg:"@media screen and (max-width: "+As.lg+")",xl:"@media screen and (max-width: "+As.xl+")"}},fonts:{body:"'Ember', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;",monospace:"Menlo, monospace"},fontSizes:{baseFontSize:"16px",fontWeight:"normal",h1:{fontSize:"5.3rem",fontWeight:"normal",lineHeight:"5.625rem",mobile:{fontSize:"3.8125rem",fontWeight:"normal",lineHeight:"5.625rem"}},h2:{fontSize:"3.925rem",fontWeight:"normal",lineHeight:"3.75rem",mobile:{fontSize:"3.05rem",fontWeight:"normal",lineHeight:"4.5rem"}},h3:{fontSize:"2.44125rem",fontWeight:"normal",lineHeight:"3.75rem",mobile:{fontSize:"2.90625rem",fontWeight:"normal",lineHeight:"3rem"}},h4:{fontSize:"1.953125rem",fontWeight:"normal",lineHeight:"3.75rem",mobile:{fontSize:"2.15rem",fontWeight:"normal",lineHeight:"3rem"}},h5:{fontSize:"1.5625rem",fontWeight:"normal",lineHeight:"3rem",mobile:{fontSize:"1.59375rem",fontWeight:"normal",lineHeight:"1.875rem"}},h6:{fontSize:"1.25rem",fontWeight:"normal",lineHeight:"1.875rem",mobile:{fontSize:"1.18125rem",fontWeight:"normal",lineHeight:"1.5rem"}},text:{fontSize:"0.875rem",lineHeight:"1.43"},label:{fontSize:"0.875rem",lineHeight:"1.43"},small:{fontSize:"0.75rem",lineHeight:"1.43"},footnote:{fontSize:"0.65rem",lineHeight:"1rem"}},radii:{default:"0.25rem",circle:"50%"},zIndex:{navigation:10,controlBar:15,modal:20,popOver:30,notificationGroup:40},modalSizes:{md:{width:"35rem",height:"94vh"},lg:{width:"50rem",height:"94vh"},fullscreen:{width:"98vw",height:"96vh"}},iconButtonSizes:{sm:"1.5rem",md:"2.5rem",lg:"4rem"}},Ss={primary:{lightest:"#88b2ff",lighter:"#5d96ff",light:"#327aff",main:"#075fff",dark:"#004ddb",darker:"#0042bb",darkest:"#002f85"},secondary:{light:"#ff8e74",main:"#ff7654",dark:"#e86c4d"},error:{lightest:"#FCF7F6",lighter:"#F5DDD5",light:"#FF927C",primary:"#C52000",dark:"#9E3319",darker:"#89301A",darkest:"#791800"},success:{lightest:"#EBF1EA",lighter:"#CEE0C8",light:"#50CD49",primary:"#067000",dark:"#305D1D",darker:"#2C511D",darkest:"#184206"},info:{lightest:"#DADFE7",lighter:"#C4CCD9",light:"#418AFD",primary:"#2555A0",dark:"#264A82",darker:"#243F6B",darkest:"#123366"},warning:{lightest:"#FAF8EA",lighter:"#F7E79E",light:"#F9DC60",primary:"#F9CC09",dark:"#665A2A",darker:"#584E26",darkest:"#534201"},greys:{black:"#000000",grey100:"#1b1c20",grey90:"#2e2f34",grey80:"#3f4149",grey70:"#50545e",grey60:"#616672",grey50:"#7d818b",grey40:"#989da5",grey30:"#d4d5d8",grey20:"#e4e9f2",grey10:"#f0f1f2",white:"#ffffff"}},Cs={bgd:Ss.greys.white,text:Ss.greys.grey80,fontSize:Es.fontSizes.baseFontSize},Ts={none:"none",small:"0 0.09375rem 0.0625rem 0 "+F(Ss.greys.grey100,.15),medium:"0 0.5rem 0.85rem 0 "+F(Ss.greys.black,.15),large:"0 0.75rem 1.875rem 0 "+F(Ss.greys.black,.15)},ks={primary:{shadow:Ts.none,static:{bgd:Ss.primary.light,border:"0.03125rem solid "+Ss.primary.darker,text:Ss.greys.white,shadow:"none"},hover:{bgd:Ss.primary.dark,border:"0.03125rem solid "+Ss.primary.darkest,text:Ss.greys.white,shadow:"none"},focus:{bgd:Ss.primary.dark,border:"0.03125rem solid "+Ss.primary.darker,text:Ss.greys.white,shadow:"0 0 0 0.25rem "+Ss.primary.lightest},active:{bgd:Ss.primary.darker,border:"0.03125rem solid "+Ss.greys.black,text:Ss.greys.white,shadow:"0 0 0 0.25rem "+Ss.primary.lightest},selected:{bgd:Ss.primary.light,border:"0.03125rem solid "+Ss.primary.dark,text:Ss.greys.white,shadow:"none"},disabled:{bgd:Ss.greys.white,border:"0.03125rem solid "+Ss.greys.grey10,text:Ss.greys.grey40,shadow:"none"}},secondary:{shadow:Ts.none,static:{bgd:Ss.greys.white,border:"0.03125rem solid "+Ss.greys.grey30,text:Ss.greys.grey80,shadow:"none"},hover:{bgd:Ss.greys.grey10,border:"0.03125rem solid "+Ss.greys.grey30,text:Ss.greys.grey80,shadow:"none"},focus:{bgd:Ss.greys.grey10,border:"0.03125rem solid "+Ss.primary.dark,text:Ss.greys.grey80,shadow:"0 0 0 0.25rem "+Ss.primary.light},active:{bgd:Ss.greys.grey20,border:"0.03125rem solid "+Ss.greys.grey40,text:Ss.greys.grey80,shadow:"0 0 0 0.25rem "+Ss.primary.dark},selected:{bgd:Ss.greys.grey10,border:"0.03125rem solid "+Ss.greys.grey30,text:Ss.greys.grey80,shadow:"0 0 0 0.25rem "+Ss.primary.dark},disabled:{bgd:Ss.greys.white,border:"0.03125rem solid "+Ss.greys.grey10,text:Ss.greys.grey40,shadow:"none"}},icon:{shadow:Ts.none,static:{bgd:"transparent",border:"0.03125rem  solid transparent",text:Ss.greys.grey80,shadow:"none"},hover:{bgd:Ss.primary.dark,border:"0.03125rem  solid transparent",text:Ss.greys.white,shadow:"none"},focus:{bgd:"transparent",border:"0.03125rem  solid "+Ss.primary.darker,text:Ss.greys.grey80,shadow:"0 0 0 0.25rem "+Ss.primary.lightest},active:{bgd:Ss.primary.darker,border:"0.03125rem  solid "+Ss.primary.darker,text:Ss.greys.white,shadow:"0 0 0 0.25rem "+Ss.primary.lightest},selected:{bgd:Ss.primary.light,border:"0.03125rem  solid "+Ss.primary.darker,text:Ss.greys.white,shadow:"none"},disabled:{bgd:"transparent",border:"none",text:Ss.greys.grey40,shadow:"none"}}},xs={bgd:Ss.greys.white,border:"0.03125rem solid "+Ss.greys.grey30,borderRadius:Es.radii.default,fontColor:Ss.greys.grey80,placeholder:Ss.greys.grey40,shadow:"0 0.0625rem 0.0625rem 0 "+F(Ss.greys.black,.1),clearBg:Ss.greys.grey50,focus:{bgd:Ss.greys.white,border:"solid 0.03125rem "+Ss.primary.lighter,shadow:"0 0 0 0.125rem "+Ss.primary.lightest},error:{border:"0.03125rem solid "+Ss.error.dark,fontColor:Ss.error.primary,shadow:"0 0 0 0.125rem "+Ss.error.light},checked:{bgd:Ss.primary.main,border:"solid 0.03125rem "+Ss.primary.main,fontColor:Ss.greys.white,shadow:"0 0.03125rem 0.03125rem 0 "+F(Ss.primary.dark,.7)}},Os={bgd:Ss.greys.white,text:Ss.greys.grey80,wrapperBgd:F(Ss.greys.grey50,.9),titleSize:Es.fontSizes.h5.fontSize,titleWeight:"normal",shadow:Ts.large,border:Ss.greys.grey30},Is={menuBgd:""+F(Ss.greys.grey10,.85),menuBorder:"0.5px solid "+Ss.greys.grey20,shadow:Ts.large,itemBgd:"transparent",itemText:Ss.greys.grey70,titleText:Ss.greys.grey60,active:{itemBgd:Ss.primary.dark,itemText:Ss.greys.white},disabled:Ss.greys.grey40,separator:""+F(Ss.greys.grey40,.3)},Ms={shadow:Ts.large,error:{text:Ss.error.lightest,closeButton:{text:Ss.error.lighter,hover:{bgd:Ss.error.lighter,text:Ss.error.dark},active:{bgd:Ss.error.lightest,text:Ss.error.darker}}},success:{text:Ss.success.lightest,closeButton:{text:Ss.success.lighter,hover:{bgd:Ss.success.lighter,text:Ss.success.dark},active:{bgd:Ss.success.lightest,text:Ss.success.darker}}},info:{text:Ss.info.lightest,closeButton:{text:Ss.info.lighter,hover:{bgd:Ss.info.lighter,text:Ss.info.dark},active:{bgd:Ss.info.lightest,text:Ss.info.darker}}},warning:{text:Ss.warning.darker,closeButton:{text:Ss.warning.dark,hover:{bgd:Ss.warning.dark,text:Ss.greys.white},active:{bgd:Ss.warning.darker,text:Ss.greys.white}}}},Ps={fontColor:Ss.primary.main,fontColorHover:Ss.primary.dark,fontColorActive:Ss.primary.darker,fontColorVisited:Ss.primary.darkest},Ds={text:Ss.greys.grey70,shadow:Ts.large,bgd:Ss.greys.white,border:"0.03125rem solid "+Ss.greys.grey20,opacity:1,selected:{text:ks.primary.selected.text,bgd:ks.primary.selected.bgd}},Ns={title:Ss.greys.grey100,primaryText:Ss.greys.grey80,secondaryText:Ss.greys.grey50,headerBorder:Ss.greys.grey40,containerBorder:Ss.greys.grey30,bgd:Ss.greys.grey10,fgd:Ss.greys.white,shadow:Ts.large,maxWidth:"18.5rem"},Ls={text:Ss.greys.grey80,bgd:Ss.greys.grey10,headerBorder:Ss.greys.grey40,wrapperBgd:F(Ss.greys.grey50,.9)},Rs={bgd:Ss.greys.white},Bs={incoming:{bgd:Ss.greys.white,fontColor:Ss.greys.grey60,linkColor:Ss.primary.main,linkColorHover:Ss.primary.dark,linkColorActive:Ss.primary.darker,linkColorVisited:Ss.primary.darkest},outgoing:{bgd:Ss.primary.main,fontColor:Ss.greys.grey10,linkColor:Ss.greys.white,linkColorHover:Ss.greys.grey10,linkColorActive:Ss.greys.grey20,linkColorVisited:Ss.greys.grey30},container:{fontColor:Ss.greys.grey70,bgd:Ss.greys.grey10}},js={size:{fontColor:Ss.greys.grey40,bgd:Ss.greys.white,letterSpacing:"-0.07px",lineHight:"16px",fontSize:"10.4px"},icon:{bgd:Ss.greys.grey10,color:Ss.greys.grey80},name:{fontColor:Ss.greys.grey80},content:{letterSpacing:"-0.09px",bgd:Ss.greys.white,fontColor:Ss.greys.grey80}},Fs={bgd:Ss.greys.white,fontColor:Ss.greys.grey70,border:"1px solid transparent",active:{bgd:Ss.primary.dark,fontColor:Ss.greys.white},hover:{bgd:Ss.greys.grey10},focus:{border:"1px solid "+Ss.primary.dark,selectedBorder:"1px solid "+Ss.greys.grey10},selected:{bgd:Ss.primary.light,fontColor:Ss.greys.white},iconButton:{activeBgd:Ss.greys.white}},Us={bgd:Ss.greys.grey60,fontColor:Ss.greys.white},Hs=(d({name:"Light Theme",buttons:ks,colors:Ss,global:Cs,links:Ps,shadows:Ts,inputs:xs,modal:Os,popOver:Is,notification:Ms,controlBar:Ds,roster:Ns,navbar:Ls,videoGrid:Rs,chatBubble:Bs,channelList:Fs,chatDateHeader:Us,messageAttachment:js},Es),{primary:{lightest:"#9DEFFB",lighter:"#8AEBFA",light:"#62E5F9",main:"#4FE2F8",dark:"#29DCF8",darker:"#22B6CB",darkest:"#1FA1B5"},secondary:{light:"#FF8B70",main:"#FF9B83",dark:"#FFB4A1"},error:{lightest:"#FBC1C0",lighter:"#FDA8A6",light:"#FD9B99",primary:"#FF8B8A",dark:"#583A39",darker:"#452F2E",darkest:"#302020"},success:{lightest:"#F4FBF1",lighter:"#D2F1C5",light:"#BAF39E",primary:"#A3E881",dark:"#4F6444",darker:"#46573D",darkest:"#324129"},info:{lightest:"#F0F5FD",lighter:"#D8E6FB",light:"#C4DBFF",primary:"#BAD4FF",dark:"#555B69",darker:"#494F59",darkest:"#343C48"},warning:{lightest:"#FDFDF7",lighter:"#3F4149",light:"#FFEB96",primary:"#FBDF64",dark:"#6D653C",darker:"#5E5736",darkest:"#47422D"},greys:{black:"#000000",grey100:"#1b1c20",grey90:"#2e2f34",grey80:"#3f4149",grey70:"#50545e",grey60:"#616672",grey50:"#7d818b",grey40:"#989da5",grey30:"#d4d5d8",grey20:"#e4e9f2",grey10:"#f0f1f2",white:"#ffffff"}}),zs={bgd:Hs.greys.grey80,text:Hs.greys.white,fontSize:Es.fontSizes.baseFontSize},Vs={none:"none",small:"",medium:"",large:"0 0.75rem 1.875rem 0 "+F(Hs.greys.black,.15)},Ws={primary:{shadow:Vs.none,static:{bgd:Hs.primary.main,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"none"},hover:{bgd:Hs.primary.dark,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"none"},focus:{bgd:Hs.primary.dark,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"0 0 0 0.25rem "+Hs.primary.darkest},active:{bgd:Hs.primary.darker,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"none"},selected:{bgd:Hs.primary.light,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"none"},disabled:{bgd:Hs.greys.grey80,border:"0.03125rem solid "+F(Hs.greys.black,.4),text:Hs.greys.grey40,shadow:"none"}},secondary:{shadow:Vs.none,static:{bgd:Hs.greys.grey50,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.white,shadow:"none"},hover:{bgd:Hs.greys.grey60,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.white,shadow:"none"},focus:{bgd:Hs.greys.grey60,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.white,shadow:"0 0 0 0.25rem "+Hs.primary.lighter},active:{bgd:Hs.greys.grey70,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.white,shadow:"none"},selected:{bgd:Hs.greys.grey60,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.white,shadow:"none"},disabled:{bgd:Hs.greys.grey80,border:"0.03125rem solid "+F(Hs.greys.black,.6),text:Hs.greys.grey40,shadow:"none"}},icon:{shadow:Vs.none,static:{bgd:"transparent",border:"0.03125rem solid transparent",text:Hs.greys.grey20,shadow:"none"},hover:{bgd:Hs.primary.dark,border:"0.03125rem  solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"none"},focus:{bgd:"transparent",border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"0 0 0 0.25rem "+Hs.primary.darker},active:{bgd:Hs.primary.darker,border:"0.03125rem solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"none"},selected:{bgd:Hs.primary.light,border:"0 solid "+Hs.greys.black,text:Hs.greys.grey80,shadow:"none"},disabled:{bgd:"transparent",border:"none",text:Hs.greys.grey40,shadow:"none"}}},Gs={bgd:Hs.greys.grey80,border:"0.03125rem solid "+Hs.greys.black,borderRadius:Es.radii.default,fontColor:Hs.greys.white,placeholder:Hs.greys.grey50,shadow:"0 0.0625rem 0.0625rem 0 "+F(Hs.greys.black,.1),clearBg:Hs.greys.white,focus:{bgd:Hs.greys.white,border:"solid 0.03125rem "+Hs.primary.main,shadow:"0 0 0 0.125rem "+Hs.primary.lighter},error:{border:"0.03125rem solid "+Hs.error.primary,fontColor:Hs.error.primary,shadow:"0 0 0 0.125rem "+Hs.error.light},checked:{bgd:Hs.primary.main,border:"solid 0.03125rem "+Hs.primary.dark,fontColor:Hs.greys.grey80,shadow:"inset 0 0.03125rem 0 0 "+F(Hs.greys.white,.1)}},qs={bgd:Hs.greys.grey80,text:Hs.greys.white,wrapperBgd:F(Hs.greys.grey60,.9),titleSize:Es.fontSizes.h5.fontSize,titleWeight:"normal",shadow:"0 1rem 2rem 0 rgba(0, 0, 0, "+F(Hs.greys.black,.15)+")",border:Hs.greys.black},Ys={menuBgd:""+F(Hs.greys.grey90,.85),menuBorder:Hs.greys.grey100,shadow:Vs.large,itemBgd:"transparent",itemText:Hs.greys.white,titleText:Hs.greys.white,active:{itemBgd:Hs.primary.dark,itemText:Hs.greys.grey80},disabled:Hs.greys.grey40,separator:Hs.greys.grey100},Ks={shadow:Vs.large,error:{text:Hs.error.darker,closeButton:{text:Hs.error.dark,hover:{bgd:Hs.error.dark,text:Hs.greys.white},active:{bgd:Hs.error.darker,text:Hs.greys.white}}},success:{text:Hs.success.darker,closeButton:{text:Hs.success.dark,hover:{bgd:Hs.success.dark,text:Hs.greys.white},active:{bgd:Hs.success.darker,text:Hs.greys.white}}},info:{text:Hs.info.darker,closeButton:{text:Hs.info.dark,hover:{bgd:Hs.info.dark,text:Hs.greys.white},active:{bgd:Hs.info.darker,text:Hs.greys.white}}},warning:{text:Hs.warning.darker,closeButton:{text:Hs.warning.dark,hover:{bgd:Hs.warning.dark,text:Hs.greys.white},active:{bgd:Hs.warning.darker,text:Hs.greys.white}}}},Xs={fontColor:Hs.primary.main,fontColorHover:Hs.primary.dark,fontColorActive:Hs.primary.darker,fontColorVisited:Hs.primary.darkest},Qs={text:Hs.greys.grey20,shadow:Vs.large,bgd:Hs.greys.grey100,border:"none",opacity:1,selected:{text:Ws.primary.selected.text,bgd:Ws.primary.selected.bgd}},$s={title:Hs.greys.white,primaryText:Hs.greys.white,secondaryText:Hs.greys.grey20,headerBorder:Hs.greys.black,containerBorder:Hs.greys.black,bgd:Hs.greys.grey100,fgd:Hs.greys.grey60,shadow:Vs.large,maxWidth:"18.5rem"},Js={text:Hs.greys.white,bgd:Hs.greys.grey100,headerBorder:Hs.greys.black,wrapperBgd:F(Hs.greys.grey60,.9)},Zs={bgd:Hs.greys.grey90},el={incoming:{bgd:Hs.greys.grey80,fontColor:Hs.greys.grey30,linkColor:Hs.primary.main,linkColorHover:Hs.primary.dark,linkColorActive:Hs.primary.darker,linkColorVisited:Hs.primary.darkest},outgoing:{bgd:Hs.primary.dark,fontColor:Hs.greys.grey70,linkColor:Hs.greys.grey80,linkColorHover:Hs.greys.grey70,linkColorActive:Hs.greys.grey60,linkColorVisited:Hs.greys.grey50},container:{fontColor:Hs.greys.grey30,bgd:Hs.greys.black}},tl={size:{fontColor:Hs.greys.grey30,bgd:Hs.greys.grey10,letterSpacing:"-0.07px",lineHight:"16px",fontSize:"10.4px"},icon:{bgd:Hs.greys.grey40,color:Hs.greys.grey10},name:{fontColor:Hs.greys.white},content:{letterSpacing:"-0.09px",bgd:Hs.greys.grey60,fontColor:Hs.greys.white}},nl={bgd:Hs.greys.grey80,fontColor:Hs.greys.grey10,border:"1px solid transparent",active:{bgd:Hs.primary.dark,fontColor:Hs.greys.grey70},hover:{bgd:Hs.greys.grey70},focus:{border:"1px solid "+Hs.primary.dark,selectedBorder:"1px solid "+Hs.greys.grey70},selected:{bgd:Hs.primary.light,fontColor:Hs.greys.grey70},iconButton:{activeBgd:Hs.greys.grey80}},rl={bgd:Hs.greys.grey10,fontColor:Hs.greys.grey80},il=(d({name:"Dark Theme",buttons:Ws,colors:Hs,global:zs,links:Xs,shadows:Vs,inputs:Gs,modal:qs,popOver:Ys,notification:Ks,controlBar:Qs,roster:$s,navbar:Js,videoGrid:Zs,chatBubble:el,channelList:nl,chatDateHeader:rl,messageAttachment:tl},Es),Object(a.b)(_s||(_s=g(["\n  /* http://meyerweb.com/eric/tools/css/reset/\n    v2.0 | 20110126\n    License: none (public domain)\n  */\n\n  html, body, div, span, applet, object, iframe,\n  h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n  a, abbr, acronym, address, big, cite, code,\n  del, dfn, em, img, ins, kbd, q, s, samp,\n  small, strike, strong, sub, sup, tt, var,\n  b, u, i, center,\n  dl, dt, dd, ol, ul, li,\n  fieldset, form, label, legend,\n  table, caption, tbody, tfoot, thead, tr, th, td,\n  article, aside, canvas, details, embed,\n  figure, figcaption, footer, header, hgroup,\n  menu, nav, output, ruby, section, summary,\n  time, mark, audio, video {\n    margin: 0;\n    padding: 0;\n    border: 0;\n    font-size: 100%;\n    font: inherit;\n    vertical-align: baseline;\n  }\n  /* HTML5 display-role reset for older browsers */\n  article, aside, details, figcaption, figure,\n  footer, header, hgroup, menu, nav, section {\n    display: block;\n  }\n  body {\n    line-height: 1;\n  }\n  ol, ul {\n    list-style: none;\n  }\n  blockquote, q {\n    quotes: none;\n  }\n  blockquote:before, blockquote:after,\n  q:before, q:after {\n    content: '';\n    content: none;\n  }\n  table {\n    border-collapse: collapse;\n    border-spacing: 0;\n  }\n\n"],["\n  /* http://meyerweb.com/eric/tools/css/reset/\n    v2.0 | 20110126\n    License: none (public domain)\n  */\n\n  html, body, div, span, applet, object, iframe,\n  h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n  a, abbr, acronym, address, big, cite, code,\n  del, dfn, em, img, ins, kbd, q, s, samp,\n  small, strike, strong, sub, sup, tt, var,\n  b, u, i, center,\n  dl, dt, dd, ol, ul, li,\n  fieldset, form, label, legend,\n  table, caption, tbody, tfoot, thead, tr, th, td,\n  article, aside, canvas, details, embed,\n  figure, figcaption, footer, header, hgroup,\n  menu, nav, output, ruby, section, summary,\n  time, mark, audio, video {\n    margin: 0;\n    padding: 0;\n    border: 0;\n    font-size: 100%;\n    font: inherit;\n    vertical-align: baseline;\n  }\n  /* HTML5 display-role reset for older browsers */\n  article, aside, details, figcaption, figure,\n  footer, header, hgroup, menu, nav, section {\n    display: block;\n  }\n  body {\n    line-height: 1;\n  }\n  ol, ul {\n    list-style: none;\n  }\n  blockquote, q {\n    quotes: none;\n  }\n  blockquote:before, blockquote:after,\n  q:before, q:after {\n    content: '';\n    content: none;\n  }\n  table {\n    border-collapse: collapse;\n    border-spacing: 0;\n  }\n\n"]))));Object(a.a)(ws||(ws=g(["\n  ",";\n\n  *,\n  *::before,\n  *::after {\n    box-sizing: border-box;\n  }\n\n  html {\n    font-size: ",";\n    font-family: ",";;\n    background-color: ",";\n    color: ",";\n    min-height: 100%;\n  }\n"],["\n  ",";\n\n  *,\n  *::before,\n  *::after {\n    box-sizing: border-box;\n  }\n\n  html {\n    font-size: ",";\n    font-family: ",";;\n    background-color: ",";\n    color: ",";\n    min-height: 100%;\n  }\n"])),il,(function(e){return e.theme.fontSizes.baseFontSize}),(function(e){return e.theme.fonts.body}),(function(e){return e.theme.global.bgd}),(function(e){return e.theme.global.text})),function(){function e(){}Object.defineProperty(e,"sdkName",{get:function(){return"amazon-chime-sdk-component-library-react"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"sdkVersion",{get:function(){return"2.10.1"},enumerable:!1,configurable:!0})}()}).call(this,n(68))},function(e,t,n){var r=n(351);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",cogvidItemWrapper:"cogvidItemWrapper--UTq25",vTitle:"vTitle---vF36",vSubject:"vSubject--3HXQn",vTopic:"vTopic--1Vqyj",videoStats:"videoStats--6FakM",activeItem:"activeItem--2EqaB",IRLCogvidItem:"IRLCogvidItem--3jcYK",cogvidCellBorder:"cogvidCellBorder--1b1fW",disableOverlay:"disableOverlay--NOzSt",disabledWrapper:"disabledWrapper--1Yw0X",content:"content--1PU41",detailInfo:"detailInfo--x5aNa",vAuthor:"vAuthor--2S83G",editTextarea:"editTextarea--3bAB9",attachmentsBtnWrapper:"attachmentsBtnWrapper--334KL",disabledAttachmentsBtn:"disabledAttachmentsBtn--2QH5b",priceLabel:"priceLabel--xLSZS",publicLabel:"publicLabel--17IdZ",clickable:"clickable--34kd0",disabled:"disabled--QjjtP",pendingStyle:"pendingStyle--2Hh-m",processingStyle:"processingStyle--3TkwR",spinnerWrapper:"spinnerWrapper--nm9md",loadingBg:"loadingBg--XvExu",courseIndexBadge:"courseIndexBadge--37pLW",scAvatar:"scAvatar--wRLve",ribbonContainer:"ribbonContainer--uBJiC",likeBtn:"likeBtn--3wd36",childCountBadge:"childCountBadge--301_d",videoLabel:"videoLabel--36YQH",videoLabelLeft:"videoLabelLeft--1YwNf",videoLabelRight:"videoLabelRight--3kWBI",videoLabelRightActive:"videoLabelRightActive--2ihPS",videoPrimLabel:"videoPrimLabel--1dRYu",itemActionsRow:"itemActionsRow--1VO-X",learningLevelLabel:"learningLevelLabel--1Vm-C",learningLevelIcon:"learningLevelIcon--ntkh_",productCountBadge:"productCountBadge--2fpVW",resourceBtn:"resourceBtn--2vDXt",empty:"empty--37RgR",icon:"icon--1dziI",resourceCount:"resourceCount--2PouP",videoSubscribeModal:"videoSubscribeModal--33mmk",modalBody:"modalBody--3xjXH",saleOff:"saleOff--3BaXQ",saleOffBadge:"saleOffBadge--6UF-C",btnClose:"btnClose--1MG0y",point:"point--2pdpr"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",animated:"animated--_xKs1","d-2":"d-2--2y0o8","d-3":"d-3--2NeVs",pulse:"pulse--2xp1d","toggle-menu":"toggle-menu--21_By",toggleMenu:"toggleMenu--1BtrW",blink:"blink--1G6Z5",scUsageTipWrapper:"scUsageTipWrapper--kZyNe",scUsageTip:"scUsageTip--3dflA",dummyCogvidWrapper:"dummyCogvidWrapper--3asDn",spinnerWrapper:"spinnerWrapper--28jhw",horizontalIndicator:"horizontalIndicator--2DDSv",showIndicator:"showIndicator--284LG",toolbar:"toolbar--1V0GC",filterDropdown:"filterDropdown--2jSmO",backToActiveVideoWrapper:"backToActiveVideoWrapper--2nFyb",listWrapper:"listWrapper--x-UO_",noToolbar:"noToolbar--3mjFl",homeToolbar:"homeToolbar--2yUVU",listWrapperHome:"listWrapperHome--3bnpb",totalVideosBadge:"totalVideosBadge--1z7lL",backToolbar:"backToolbar--3i8Ge",homeLabel:"homeLabel--3awXF",quickNavHome:"quickNavHome--1sto_",upCourseLevel:"upCourseLevel--35xvN",withCourseBar:"withCourseBar--2h0oL",label:"label--23oyG",text:"text--3AOE0",arrowIcon:"arrowIcon--3ou8S",quickNavTop:"quickNavTop--3D2Mm",videoSliderWrapper:"videoSliderWrapper--2eYjB",isFullscreenMode:"isFullscreenMode--q5awp",horizontal:"horizontal--S-Jry",sliderThumb:"sliderThumb--3ulcE",sliderMark:"sliderMark--1JXzp",videoSlider:"videoSlider--DXBXa",sliderTrack:"sliderTrack--3NzR2",mark:"mark--27hVS",arrow:"arrow--9DM2S",videoIndex:"videoIndex--2T7cl",sliderTooltipWrapper:"sliderTooltipWrapper--nRI8n",sliderTooltip:"sliderTooltip--2oHtl",content:"content--rwRSH",resourceBtn:"resourceBtn--ocSQ1",empty:"empty--3Njg9",icon:"icon--1WJNd",resourceCount:"resourceCount--2W5aj",videoLabel:"videoLabel--1TPKe",videoLabelLeft:"videoLabelLeft--3XZ_w",videoLabelRight:"videoLabelRight--35m_o",videoLabelRightActive:"videoLabelRightActive--3-qk9",videoPrimLabel:"videoPrimLabel--1h2v8",courseIndexBadge:"courseIndexBadge--2-rc2",clickable:"clickable--3t8I7",disabled:"disabled--2x776",pendingStyle:"pendingStyle--3V0a2",processingStyle:"processingStyle--1vtzj",itemThumbnail:"itemThumbnail--2mCPK",mini:"mini--3Kyc3",full:"full--3wuXW",sliderLabel:"sliderLabel--2XlQT",backBtn:"backBtn--3RTEW",homeBtn:"homeBtn--3rxfs"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",webkitPosition:"webkitPosition--2GYtS",control:"control--2_Mny",controlItem:"controlItem--1o6i_",label:"label--28MIe",formGroupSm:"formGroupSm--1_bis",formInputSm:"formInputSm--2__AY",textArea:"textArea--3nxix",disableTextAreaResize:"disableTextAreaResize--3Av1t",iconSuffix:"iconSuffix--3Vtvf",iconSuffixClickable:"iconSuffixClickable--2aeYi",calendarIcon:"calendarIcon--1ffpd",errorMessage:"errorMessage--1JwBI",addNew:"addNew--5iKDI",suggestionsDisplayTop:"suggestionsDisplayTop--13hQ3",isFocused:"isFocused--VliCv",timezoneSelect:"timezoneSelect--250me",autocompleteMenu:"autocompleteMenu--3iTd-",isHighlighted:"isHighlighted--1GakI"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(939);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",horizontalIndicator:"horizontalIndicator--edQ0I",dummyPeopleItem:"dummyPeopleItem--3GLYn",peopleItem:"peopleItem--202sc",headerActions:"headerActions--2Q9pc",peopleName:"peopleName--1UQfK",peopleHeadline:"peopleHeadline--rIb3Y",peopleAvatar:"peopleAvatar--2NQhy",actionBtn:"actionBtn--2Kb-B",actionBtnDisabled:"actionBtnDisabled--2v_SI",peopleItemActive:"peopleItemActive--78vC-",peopleHeader:"peopleHeader--1FeQG",link:"link--21uO6",tabBtn:"tabBtn--1Do2P",tabBtnBadge:"tabBtnBadge--1QsQa",tabBtnActive:"tabBtnActive--3lls_",searchBoxWrapper:"searchBoxWrapper--3v9Rh",peopleVideoListWrapper:"peopleVideoListWrapper--KdNHl",peopleFirstArea:"peopleFirstArea--6othn",peopleProfileWrapper:"peopleProfileWrapper--3Srvf",backToActiveVideoWrapper:"backToActiveVideoWrapper--aIyUi",addFriendsWrapper:"addFriendsWrapper--3ARd0",leftItem:"leftItem--3qSdB",rightItem:"rightItem--2W0AV",longTextRoles:"longTextRoles--2KOp4",deleteIcon:"deleteIcon--1YiDu",addBtn:"addBtn--2Atov",addMoreWrapper:"addMoreWrapper--2UJGK",longAddMore:"longAddMore--kFTYM",suggestionItem:"suggestionItem--30j29",suggestionAvatar:"suggestionAvatar--3J_lx",toolbar:"toolbar--1UOQZ",groupMember:"groupMember--1VubX",separatorLine:"separatorLine--Ipt4l",createNewGroup:"createNewGroup--uTEcS",circleWrapper:"circleWrapper--3Tbu_",instructionText:"instructionText--3a60j",clickHereBtn:"clickHereBtn--3mRv8",UserProfileHeaderWrap:"UserProfileHeaderWrap--9bTNY",tabWrap:"tabWrap--2CSWE",tabContentWrap:"tabContentWrap--2Bmuf",sharedVideoWrap:"sharedVideoWrap--Vzrfy",sortWrap:"sortWrap--AZXio",sortByDrop:"sortByDrop--FhuXc",userVideoSearchWrap:"userVideoSearchWrap--1NqCD",viewMode:"viewMode--18zHL",viewModeType:"viewModeType--1VhlW",active:"active--3Ndxz",videoListRow:"videoListRow--1depo",sharedVideoItem:"sharedVideoItem--1NIah",videoThumb:"videoThumb--2--ya",author:"author--3WMk5",title:"title--1kMhl",subject:"subject--3BeuI",topic:"topic--3s6wK",meta:"meta--2mGCu",videoLink:"videoLink--2YIlf",sharedVideoItemGrid:"sharedVideoItemGrid--u_7cz",sharedVideoItemList:"sharedVideoItemList--3C9BH",vidContent:"vidContent--2w8w8"}},function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function s(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],i=0;i<e.length;i++){var a=e[i],l=t.base?a[0]+t.base:a[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=s(u),h={css:a[1],media:a[2],sourceMap:a[3]};-1!==d?(o[d].references++,o[d].updater(h)):o.push({identifier:u,updater:g(h,t),references:1}),r.push(u)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function h(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function f(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,m=0;function g(e,t){var n,r,i;if(t.singleton){var a=m++;n=p||(p=c(t)),r=h.bind(null,n,a,!1),i=h.bind(null,n,a,!0)}else n=c(t),r=f.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);o[i].references--}for(var a=l(e,t),c=0;c<n.length;c++){var u=s(n[c]);0===o[u].references&&(o[u].updater(),o.splice(u,1))}n=a}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(a).concat([i]).join("\n")}var o,s,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t){function n(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,l,"next",e)}function l(e){n(o,i,a,s,l,"throw",e)}s(void 0)}))}}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",contextualImgWrapper:"contextualImgWrapper--1U7Hg",imageDisplay:"imageDisplay--2mnfO",videoOverlay:"videoOverlay--WrbLb",errorMessage:"errorMessage--1h-5z",purchaseOverlayContainer:"purchaseOverlayContainer--2F2To",purchaseOverlayBox:"purchaseOverlayBox--1C1fx",videoSpinner:"videoSpinner--2Uw1Q",playBtn:"playBtn--284A9",videpPlayBtn:"videpPlayBtn--PqiFW",disabled:"disabled--YwzeP",active:"active--1zZd_",clickable:"clickable--3JzJQ",arrowLeft:"arrowLeft--1AyHU",arrowRight:"arrowRight--3fw_K",videoPlayBtn:"videoPlayBtn--1ozjq",videpPlayBtnTooltip:"videpPlayBtnTooltip--22OKK",arrow:"arrow--3BtM2",videoPlaybar:"videoPlaybar--3Uv-R",iconButton:"iconButton--1goII",videoToggleBtnWrapper:"videoToggleBtnWrapper--3LaaM",vertical:"vertical--3evHO",videoToggleBtn:"videoToggleBtn--1Y0Kh",toggleLabel:"toggleLabel--KDyrv",icon:"icon--1SY0z",iconU:"iconU--23l32",iconI:"iconI--19IUn",switch:"switch--3TEbc",switchActive:"switchActive--35qgG",label:"label--1WepY",toggleLayer:"toggleLayer--1WkXM",videoStatistics:"videoStatistics--SAmQL",left:"left--3V3XG",right:"right--MyMeR",hide:"hide--3P_I_",center:"center--2ooLo",questionIcon:"questionIcon--o45lp",blink:"blink--X7FQV",dimButton:"dimButton--4_a9K",iconBtn:"iconBtn--3_Wh8",withArrow:"withArrow--exiw_",videoSbFilterWrapper:"videoSbFilterWrapper--3Rik8",videoSbFilter:"videoSbFilter--IQHdU",dropdownWrapper:"dropdownWrapper--3QnUV",dropdown:"dropdown--2KrWi",hiddenSelect:"hiddenSelect--3JvX1",btnClose:"btnClose--1XK7Y"}},function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;(a=new Error(t.replace(/%s/g,(function(){return r[o++]})))).name="Invariant Violation"}throw a.framesToPop=1,a}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"f",(function(){return A})),n.d(t,"e",(function(){return _})),n.d(t,"d",(function(){return Q})),n.d(t,"b",(function(){return J})),n.d(t,"a",(function(){return Z}));var r=n(31),i=n.n(r),a=n(0),o=n.n(a),s=n(384),l=function(e){return Object(a.forwardRef)((function(t,n){return o.a.createElement(s.a.Consumer,null,(function(r){return o.a.createElement(e,i()({ref:n},t,r))}))}))},c=n(386),u="https://js.stripe.com/v3",d=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,h="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",f=null,p=function(e){return null!==f?f:f=new Promise((function(t,n){if("undefined"!=typeof window)if(window.Stripe&&e&&console.warn(h),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(u,'"]')),t=0;t<e.length;t++){var n=e[t];if(d.test(n.src))return n}return null}();r&&e?console.warn(h):r||(r=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(u).concat(t);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n}(e)),r.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))},m=function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.11.0",startTime:t})}(r,n),r},g=Promise.resolve().then((function(){return p(null)})),v=!1;g.catch((function(e){v||console.warn(e)}));var b=n(1),y=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];v=!0;var r=Date.now();return g.then((function(e){return m(e,t,r)}))}(b.g.STRIPE_API_KEY),A=function(e){return function(t){return o.a.createElement(c.Elements,{stripe:y},o.a.createElement(e,t))}},_=function(e){return function(t){return o.a.createElement(c.ElementsConsumer,null,(function(n){var r=n.stripe;return o.a.createElement(e,i()({},t,{stripe:r}))}))}},w=n(1008),E=n.n(w),S=n(2),C=n.n(S),T=n(29),k=n.n(T),x=n(1009),O=n.n(x),I=n(7),M=n(17),P=n(8),D=n(26);function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){C()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R="notification/noNewNotifications",B="notification/noNewSharedVideos",j="notification/noNewSharedMessageVideos",F="notification/videoTranscodingStatus",U="brainhive/",H="notification/popup",z="notification/learningKPI",V="analytics/userSession",W="status",G="error",q=b.g.NOTIFICATION,Y=b.g.VIDEO_CATEGORY,K=b.g.TRACKING_USER,X=function(e,t){try{window.mqttTracking||(window.mqttTracking={});var n=Object(I.get)(window.mqttTracking,e,[]);n.length>=100&&(n=n.slice(n.length-99)),e===W?n.push(new Date+" - "+t):n.push({data:t,datetime:new Date}),Object(I.set)(window.mqttTracking,e,n)}catch(e){}},Q=function(e){function t(e){var t=Object(a.useRef)();return Object(a.useEffect)((function(){t.current=e})),t.current}return Object(M.b)((function(e){var t,n,r=e.auth,i=e.cogvid;return{userId:r.userInfo.userId,videoScaffId:(null===(t=i.cogvidDetails)||void 0===t?void 0:t.ownerScaffId)||(null===(n=i.cogvidDetails)||void 0===n?void 0:n.userScaffId)}}),(function(e){return{updateNoNewNotifications:function(t){return e(P.h.updateNoNewNotifications(t))},updateNoNewSharedVideos:function(t){return e(P.h.updateNoNewSharedVideos(t))},updateNotificationState:function(t){return e(P.h.updateNotificationState(t))},updateTranscodingStatus:function(t){return e(P.k.updateTranscodingStatus(t))},updateVideoStatistics:function(t){return e(P.h.updateVideoStatistics(t))},resetVideoStatistics:function(t){return e(P.h.resetVideoStatistics(t))},updateChapterItemInCache:function(t){return e(P.e.updateChapterItemInCache(t))},setKpiChanges:function(t){return e(P.h.setKpiChanges(t))}}}))((function(n){var r=n.userId,i=n.videoScaffId,s=n.updateNoNewNotifications,l=n.updateNoNewSharedVideos,c=n.updateNotificationState,u=n.updateTranscodingStatus,d=n.updateVideoStatistics,h=n.resetVideoStatistics,f=n.updateChapterItemInCache,p=n.setKpiChanges,m=Object(a.useState)(null),g=k()(m,2),v=g[0],y=g[1],A="".concat(b.g.MQTT_TOPIC_DOMAIN_BASE_URL,"/").concat(r,"/"),_=[b.g.VIDEO_CATEGORY.BRAINHIVE,b.g.VIDEO_CATEGORY.MESSAGES].includes(b.c.getCurrentVideoCategory()),w=t(_),S=t(i),T=t(r);Object(a.useEffect)((function(){var e={clientId:"mmWeb_"+Math.random().toString(16).substr(2,10),username:b.g.MQTT_USERNAME,password:b.g.MQTT_PASSWORD,keepalive:b.g.MQTT_KEEPALIVE,reconnectPeriod:b.g.MQTT_RECONNECT_PERIOD,clean:!0},t=O.a.connect(b.g.MQTT_SERVICES_ENDPOINT,e);return t.on("disconnect",(function(){X(W,"mqtt client disconnect")})),t.on("reconnect",(function(){X(W,"mqtt client reconnect")})),t.on("close",(function(){X(W,"mqtt client close")})),t.on("error",(function(e){X(W,"mqtt client error"),X(G,e)})),y(t),function(){(null==v?void 0:v.end)&&v.end(!0),X(W,"mqtt client end")}}),[]);var x=function(){if(v&&r){var e="".concat(b.g.MQTT_TOPIC_DOMAIN_BASE_URL,"/").concat(r,"/");v.subscribe(e+R),v.subscribe(e+B),v.subscribe(e+F),v.subscribe(e+j),v.subscribe(e+H),v.subscribe(e+z)}};Object(a.useEffect)((function(){var e=(b.c.getToken()||{}).accessToken;if(T&&T!==r&&v){var t="".concat(b.g.MQTT_TOPIC_DOMAIN_BASE_URL,"/").concat(T,"/");return v.unsubscribe(t+R),v.unsubscribe(t+B),v.unsubscribe(t+F),v.unsubscribe(t+j),v.unsubscribe(t+H),void v.unsubscribe(t+z)}!T&&r&&v&&x(),r&&e&&v&&(v.on("connect",(function(){x(),X(W,"mqtt client connected")})),v.on("message",(function(e,t,n){var i=JSON.parse(t.toString()),a=function(e){var t=e.match(r)?A:"".concat(b.g.MQTT_TOPIC_DOMAIN_BASE_URL,"/");return Object(I.get)(e.split(t),"[1]")}(e);switch(a){case R:var o=i.noNewNotifications;s(o),X(a,i);break;case B:var h=i.noNewSharedVideos;l(h),X(a,i);break;case F:if(r!==i.userId)return;u([L({},i)]);var m=i.sessionId;X(a+"."+m,i);break;case j:var g=i.noNewSharedMessageVideos;c({noNewSharedMessageVideos:g}),X(a,i);break;case H:var v=i.source,y=(v=void 0===v?{}:v).object,_=void 0===y?{}:y,w=i.type,S=_.videoId,T=_.chapterId;w===q.TYPE.COMPOSING__LIVE_CHAPTER__STATUS_CHANGED&&f({videoId:S,chapterId:T,data:{meetingInfo:{meeting:L(L({},_),{},{status:Object(I.get)(_,"meetingStatus","").toUpperCase(),uid:Object(I.get)(_,"meetingId","")})}}}),w===q.TYPE.COMPOSING__LIVE_CHAPTER__REMINDING&&b.e.meetingReminder(_),X(a,i);break;case z:console.log("Received notification for KPI changes: "+i),p(i);break;default:if(a.startsWith(U)){var k=i.trackingObject,x=i.propertyToCountMap,O={};Object(I.forEach)(x,(function(e,t){var n=t.split("."),r=E()(n),i=r[0],a=r.slice(1).join(".");Object(I.merge)(O,C()({},i,C()({},a,e)))})),d({videoScaffId:k,data:O}),X(a.replace("/","."),O)}}})))}),[r,v]),Object(a.useEffect)((function(){if(v){if(S&&w){try{v.unsubscribe(A+U+S)}catch(e){}h()}if(i&&_)try{v.subscribe(A+U+i)}catch(e){}}}),[v,i]);var M=Object(a.useRef)(),P=Object(a.useCallback)((function(e){clearTimeout(M.current),M.current=setTimeout((function(){var t=b.c.getCurrentVideoCategory(),n=(null==e?void 0:e.action)===K.ACTIONS.PLAY,i=(null==e?void 0:e.action)===K.ACTIONS.PAUSE;if([Y.EXPLORING,Y.LEARNING,Y.BRAINHIVE].includes(t)&&e.videoId&&(null==v?void 0:v.publish)){window.audioPlayer&&n&&(window.startTimeVideoTracking=null==e?void 0:e.timestamp);var a=e.chapterId||Object(I.get)(D.a.getState(),"cogvid.chapterHighlighting.uid",""),o=n?0:e.duration<0?0:e.duration;if(n||i&&o<.01)return;var s=L(L({},e),{},{timestamp:e.timestamp<0?0:e.timestamp,menu:t.toUpperCase(),userId:r||"",chapterId:a,duration:o});window.trackingObj=s,v.publish("".concat(b.g.MQTT_TOPIC_DOMAIN_BASE_URL,"/analytics/userEvent"),JSON.stringify(s))}}),10)}),[v,r]),N=Object(a.useCallback)((function(e){v.publish("".concat(b.g.MQTT_TOPIC_DOMAIN_BASE_URL,"/").concat(V),JSON.stringify(e))}),[v,r]);return o.a.createElement(e,{trackingVideoCountViewData:P,reportUserSessionState:N})}))},$=(n(140),n(244),n(387)),J=function(e){return Object(a.forwardRef)((function(t,n){return o.a.createElement($.a.Consumer,null,(function(r){return o.a.createElement(e,i()({ref:n},t,r))}))}))},Z=function(e){var t=Object(a.useRef)();return Object(a.useEffect)((function(){t.current=e})),t.current}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",UPHeaderWrapper:"UPHeaderWrapper--1BPkv",coverImage:"coverImage--x9oCG",UPInfo:"UPInfo--3pVCZ",avatarWrapper:"avatarWrapper--1tGnn",avatar:"avatar--ZU_a7",cameraIcon:"cameraIcon--3j--4",uploadAvatarInput:"uploadAvatarInput--1R2SP",fullName:"fullName--2BRyL",headline:"headline--LCvea",editBtn:"editBtn--1xUeO",headerActionBtnDisabled:"headerActionBtnDisabled--3yAHx",updateCoverBtn:"updateCoverBtn--2NzBC",separatorLine:"separatorLine--PIAz7",formTitle:"formTitle--1rZXY",shortInput:"shortInput--6TDVW",footer:"footer--38QKk",footerBtn:"footerBtn--1QL0g",sectionTitle:"sectionTitle--1PTPk",infoGroup:"infoGroup--1ywoI",infoTitle:"infoTitle--7uc4P",modalBody:"modalBody--2SFej",searchInputClassName:"searchInputClassName--1WSBo",divBy2:"divBy2--1Bq-V",divBy3:"divBy3--325lY"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",heightPdfToolbar:"1.8125rem",heightAttachmentItem:"4rem",modalWrapper:"modalWrapper--3tCST",modalHeader:"modalHeader--1HB24",hideModalBtn:"hideModalBtn---5A3x",addFilesBtn:"addFilesBtn--3-UQQ",attachmentCountBadge:"attachmentCountBadge--2kA_F",scrollWrapper:"scrollWrapper--3D5R7",chapterAttachments:"chapterAttachments--1kgxJ",active:"active--18xVJ",hover:"hover--2hqlf",itemWrapper:"itemWrapper--QZVlh",retryButton:"retryButton--1eRzZ",cancelButton:"cancelButton--IHNLL",buttonWrapper:"buttonWrapper--ICmz3",attachingIcon:"attachingIcon--2b3QK",thumbnailWrapper:"thumbnailWrapper--1OuxZ",thumbnail:"thumbnail--2y8aZ",overlayWrapper:"overlayWrapper--378XT",hoverOverlay:"hoverOverlay--1o-gl",progressBar:"progressBar--JgJIw",actionButtons:"actionButtons--EyCWT",uploadActionButtons:"uploadActionButtons--2UxyG",textareaTitle:"textareaTitle--YX1Ig",ownerAvatar:"ownerAvatar--3ElUa",accordion:"accordion--V1_XQ",card:"card--3N3HI",cardHeader:"cardHeader--3VbvZ",cardBody:"cardBody--ttl7l",emptyIconWrapper:"emptyIconWrapper--2K1Cy",attachmentsTabbar:"attachmentsTabbar--N5l91",fileTypeBadge:"fileTypeBadge--33Wb1",typePdf:"typePdf--2rEqD",typeImage:"typeImage--1sXMe",indicator:"indicator--3J3_y",scrollIndicator:"scrollIndicator--25Jzb",downloadBadge:"downloadBadge--g7r3k",downloadBadgeWrap:"downloadBadgeWrap--UPSx_",disabled:"disabled--xyvQC",triangleDown:"triangleDown--2IQvC",reviewWrapper:"reviewWrapper--aMtbq",attachmentToolbar:"attachmentToolbar--ROKps",withScrollbar:"withScrollbar--1f0n2",attachmentName:"attachmentName--UM2dl",closeButton:"closeButton--39YIn",pageInput:"pageInput--3rG0C",scaleInput:"scaleInput--3hGzw",percentLabel:"percentLabel--2e7zU",attachmentsView:"attachmentsView--9Mbum",attachmentsViewActive:"attachmentsViewActive--37Ms2",pdfCanvas:"pdfCanvas--3oEWJ",pdfPage:"pdfPage--2u3kB",pdfPageActive:"pdfPageActive--38x3x"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return g})),n.d(t,"g",(function(){return a})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return h})),n.d(t,"j",(function(){return u})),n.d(t,"k",(function(){return s})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return m})),n.d(t,"n",(function(){return i}));var r=n(81),i=function(e){return null==e},a=function(e){return null!=e},o=function(e){return"function"==typeof e},s=function(e){return"string"==typeof e},l=Array.isArray,c=function(e){return e&&!l(e)&&"object"==typeof e},u=function(e){return e&&o(e.then)},d=function(e){return e&&o(e.next)&&o(e.throw)},h=function e(t){return t&&(s(t)||m(t)||o(t)||l(t)&&t.every(e))},f=function(e){return e&&o(e.take)&&o(e.close)},p=function(e){return o(e)&&e.hasOwnProperty("toString")},m=function(e){return Boolean(e)&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype},g=function(e){return f(e)&&e[r.e]},v=function(e){return e&&e[r.c]}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",editGroupModal:"editGroupModal--1inrZ",formTitle:"formTitle--24yvL",videoTitleWrapper:"videoTitleWrapper--2XSLa",addFriendsWrapper:"addFriendsWrapper--2Vn6v",leftItem:"leftItem--3AYsq",rightItem:"rightItem--du0wI",longTextRoles:"longTextRoles--3YrEE",deleteIcon:"deleteIcon--1GzHa",addBtn:"addBtn--3jGJ_",addMoreWrapper:"addMoreWrapper--2jpRO",longAddMore:"longAddMore--2MPND",suggestionItem:"suggestionItem--CtkIu",suggestionAvatar:"suggestionAvatar--3RfoL",scrollWrapper:"scrollWrapper--hZH24",disabled:"disabled--29UFA",tagItem:"tagItem--3bC52",tagLabel:"tagLabel--tduYk",tagAvatar:"tagAvatar--PxdF8",shareItem:"shareItem--ka-J1",shareItemAvatar:"shareItemAvatar--2uLh5",separator:"separator--2Sgp5",UPHeaderWrapper:"UPHeaderWrapper--10WTj",coverImage:"coverImage--26DkF",UPInfo:"UPInfo--FrFXu",avatarWrapper:"avatarWrapper--2JfYA",avatar:"avatar--31SJI",cameraIcon:"cameraIcon--qRL0b",uploadAvatarInput:"uploadAvatarInput--3OJxq",fullName:"fullName--mrMAu",headline:"headline--3mfpG",editBtn:"editBtn--39rMC",deleteBtn:"deleteBtn--1sCaO",headerActionBtnDisabled:"headerActionBtnDisabled--2PEn5",updateCoverBtn:"updateCoverBtn--3vhP2",editHeaderWrapper:"editHeaderWrapper--zN3OP",editRegion:"editRegion--2kSFW",groupFormBtn:"groupFormBtn--1N5Y1",textareaDesc:"textareaDesc--1Mszx",groupAboutWraper:"groupAboutWraper--YETu6",aboutLine:"aboutLine--1F1dA"}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",optionWrap:"optionWrap--iR4pA",disabled:"disabled--zfLa3",shareCognitiveForm:"shareCognitiveForm--1kevx",formTitle:"formTitle--rjRZv",videoOwnerWrapper:"videoOwnerWrapper--2u9ky",ownerAvatar:"ownerAvatar--3SnE8",ownerName:"ownerName---fEYI",addFriendsWrapper:"addFriendsWrapper--3yCzI",leftItem:"leftItem--C_C1_",rightItem:"rightItem--12My3",longTextRoles:"longTextRoles--3ATdD",deleteIcon:"deleteIcon--2tq03",addBtn:"addBtn--34MG4",addMoreWrapper:"addMoreWrapper--fIKsn",longAddMore:"longAddMore--3lzJH",suggestionItem:"suggestionItem--1unLm",suggestionAvatar:"suggestionAvatar--3g9uq",scrollWrapper:"scrollWrapper--cJlyQ",sectionWrapper:"sectionWrapper--1XHuT",sectionWrapperIndex:"sectionWrapperIndex--2qF7j",tagItem:"tagItem--o2ZgO",tagLabel:"tagLabel--3dMU_",tagAvatar:"tagAvatar--3DrME",shareItem:"shareItem--1hOgJ",shareItemAvatar:"shareItemAvatar--2r2Zl",groupIconWrap:"groupIconWrap--2h2Uv",separator:"separator--1PNUS",popoverScrollWrapper:"popoverScrollWrapper--14J7n",popoverGroupMemberWrapper:"popoverGroupMemberWrapper--22kIG",shareVideoItem:"shareVideoItem--3WwZ5"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",formTitle:"formTitle--1nk6F",control:"control--1ruFH",label:"label--3Ttbq",closeButton:"closeButton--2OxI8",sort:"sort--2YIAa",sortIcon:"sortIcon--18F4k",buttonsWrapper:"buttonsWrapper--zl7xi",pseudoButton:"pseudoButton--vYlyH",pseudoButtonCenter:"pseudoButtonCenter--1LCLg",pseudoDescButtonPosition:"pseudoDescButtonPosition--okhSn",sortAscCenter:"sortAscCenter--3tc5_",sortDescCenter:"sortDescCenter--252yJ",deleteWrapper:"deleteWrapper--2TUq-",deleteBorder:"deleteBorder--3LIMT",cursorPointer:"cursorPointer--1euFS",noClicks:"noClicks--1TH8Z",controlItem:"controlItem--CD4ZL",multiSelect:"multiSelect--3RsuM",withValidation:"withValidation--306te",upperModal:"upperModal---vilk",bottomButton:"bottomButton--23IYp",rightColumn:"rightColumn--3eAOa",modalBody:"modalBody--2Qx8a",videoWrapper:"videoWrapper--1IOUL",videoCard:"videoCard--DSREs",titlePr:"titlePr--1De9e",videoExtension:"videoExtension--3rcvi",short:"short--2YINl",shadowBorder:"shadowBorder--WRJCY",fileUpload:"fileUpload--cz8lp"}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",formTitle:"formTitle--3BTrs",modalBody:"modalBody--2a6Tb",bodyRow:"bodyRow--3MRMW",transcribeLabel:"transcribeLabel--3QtHf",footerBtn:"footerBtn--2-6Vx",coverImg:"coverImg--30oa-",imageWrap:"imageWrap--3-zHU",templateWrap:"templateWrap--SOD4s",topRow:"topRow--2rGzu",authorInfoWrap:"authorInfoWrap--3ru4S",videoInfo:"videoInfo--TrQaW",title:"title--1nRkT",subject:"subject--3Cn8I",typesOfLearningItem:"typesOfLearningItem--X9lvK",bottomRow:"bottomRow--RUNd6",bottomRight:"bottomRight--3sLQm",bottomLeft:"bottomLeft--2KyxT",image:"image--1zgdF",logo:"logo--2W8es",avatar:"avatar--T-Zwb",roundBtn:"roundBtn--3ShLG",rightColumn:"rightColumn--3Q3kW",toolbarBtn:"toolbarBtn--30Y1F",active:"active--36RaB",chapterPlaceHolder:"chapterPlaceHolder--2pL1X",imgWrapper:"imgWrapper--3r5oI",folderIcon:"folderIcon--1RWr9",createCoverInstruction:"createCoverInstruction--107TI",learningItemsWrapper:"learningItemsWrapper--21YYT",learningItemLabel:"learningItemLabel--2J_Tp",learningItemText:"learningItemText--2fJNX",editTextInput:"editTextInput--1oiJB",itemActions:"itemActions--1gIn7",selectChaptersBody:"selectChaptersBody--1ur8H",itemsWrapper:"itemsWrapper--26W9Z",selectChaptersAll:"selectChaptersAll--2BpkG",selectChapterItem:"selectChapterItem--3wEAC",freeBadge:"freeBadge--dCvkj",sequence:"sequence--1J-Bl",sequenceBadge:"sequenceBadge--sHYWE",inputWrapper:"inputWrapper--2y_QY",error:"error--lA6Tx",richTextEditorWrapper:"richTextEditorWrapper--kPfD6"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",formTitle:"formTitle--1ZxR6",modalBody:"modalBody--3sv3S",bodyRow:"bodyRow--xgRgZ",transcribeLabel:"transcribeLabel--2Ssig",footerBtn:"footerBtn--2iVR5",coverImg:"coverImg--1Hl_i",imageWrap:"imageWrap--2fI7N",templateWrap:"templateWrap--1Jh3T",topRow:"topRow--qcOwu",authorInfoWrap:"authorInfoWrap--39asP",videoInfo:"videoInfo--3t74P",title:"title--3EIei",subject:"subject--1Hq02",typesOfLearningItem:"typesOfLearningItem--8H7lA",bottomRow:"bottomRow--1jRaf",bottomRight:"bottomRight---VqwW",bottomLeft:"bottomLeft--2kSwE",image:"image--1Q0le",logo:"logo--kCfzS",avatar:"avatar--gRZdQ",roundBtn:"roundBtn--1A9Dx",rightColumn:"rightColumn--2Fx4V",toolbarBtn:"toolbarBtn--3vBRh",active:"active--3bsDo",chapterPlaceHolder:"chapterPlaceHolder--3z0CB",imgWrapper:"imgWrapper--38Oz1",folderIcon:"folderIcon--1MoBq",createCoverInstruction:"createCoverInstruction--3R5iE",learningItemsWrapper:"learningItemsWrapper--EJvup",learningItemLabel:"learningItemLabel--2SQBQ",learningItemText:"learningItemText--J7rpV",editTextInput:"editTextInput--3r8DM",itemActions:"itemActions--X3qp3",selectChaptersBody:"selectChaptersBody--1GcGK",itemsWrapper:"itemsWrapper--hqFI1",selectChaptersAll:"selectChaptersAll--1Efv6",selectChapterItem:"selectChapterItem--F74dl",freeBadge:"freeBadge--3KhcB",sequence:"sequence--3NusM",sequenceBadge:"sequenceBadge--1ZjHO",inputWrapper:"inputWrapper--2IwG_",error:"error--9--d-"}},function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return o[e];var n,a=String(e);return(n=r[a.toLowerCase()])?n:(n=i[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var a;if(a=r[t.toLowerCase()])return a===n;if(a=i[t.toLowerCase()])return a===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};
/*!
 * Programatically add the following
 */
for(a=97;a<123;a++)r[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)r[a-48]=a;for(a=1;a<13;a++)r["f"+a]=a+111;for(a=0;a<10;a++)r["numpad "+a]=a+96;var o=t.names=t.title={};for(a in r)o[r[a]]=a;for(var s in i)r[s]=i[s]},function(e,t,n){var r,i,a;i=[n(0)],void 0===(a="function"==typeof(r=function(e){"use strict";function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}(e,t)||r(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=r(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=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,a,o=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw a}}}}function r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return(a="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)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(){function r(){var t=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),u(this,"showMessageFor",(function(e){t.visibleFields.includes(e)||t.visibleFields.push(e),t.helpers.forceUpdateIfNeeded()})),u(this,"hideMessageFor",(function(e){var n=t.visibleFields.indexOf(e);-1<n&&t.visibleFields.splice(n,1),t.helpers.forceUpdateIfNeeded()})),u(this,"helpers",{parent:this,passes:function(e,t,n,r){return r.hasOwnProperty(e)?!(this.isRequired(e,r)||!this.isBlank(t))||!1!==r[e].rule(t,n,this.parent):(console.error("Rule Not Found: There is no rule with the name ".concat(e,".")),!0)},isRequired:function(e,t){return t[e].hasOwnProperty("required")&&t[e].required},isBlank:function(e){return null==e||this.testRegex(e,/^[\s]*$/)},normalizeValues:function(e,t){return[this.valueOrEmptyString(e),this.getValidation(t),this.getOptions(t)]},getValidation:function(e){return e===Object(e)&&Object.keys(e).length?Object.keys(e)[0]:e.split(":")[0]},getOptions:function(e){if(e===Object(e)&&Object.values(e).length){var t=Object.values(e)[0];return Array.isArray(t)?t:[t]}return 1<(t=e.split(":")).length?t[1].split(","):[]},valueOrEmptyString:function(e){return null==e?"":e},toSentence:function(e){return e.slice(0,-2).join(", ")+(e.slice(0,-2).length?", ":"")+e.slice(-2).join(2<e.length?", or ":" or ")},testRegex:function(e,t){return null!==e.toString().match(t)},forceUpdateIfNeeded:function(){this.parent.autoForceUpdate&&this.parent.autoForceUpdate.forceUpdate()},message:function(e,t,n,r){return n.messages=n.messages||{},(n.messages[e]||n.messages.default||this.parent.messages[e]||this.parent.messages.default||r[e].message).replace(":attribute",this.humanizeFieldName(t))},humanizeFieldName:function(e){return e.replace(/([A-Z])/g," $1").replace(/_/g," ").toLowerCase()},element:function(e,t){return(t.element||this.parent.element)(e,t.className)},momentInstalled:function(){return!(!window||!window.moment)||(console.warn("Date validators require using momentjs https://momentjs.com and moment objects."),!1)},size:function(e,t){return"string"===t||void 0===t||"array"===t?e.length:"num"===t?parseFloat(e):void 0},sizeText:function(e){return"string"===e||void 0===e?" characters":"array"===e?" elements":""}}),this.fields={},this.visibleFields=[],this.errorMessages={},this.messagesShown=!1,this.rules=s({accepted:{message:"The :attribute must be accepted.",rule:function(e){return!0===e},required:!0},after:{message:"The :attribute must be after :date.",rule:function(e,n){return t.helpers.momentInstalled()&&moment.isMoment(e)&&e.isAfter(n[0],"day")},messageReplace:function(e,t){return e.replace(":date",t[0].format("MM/DD/YYYY"))}},after_or_equal:{message:"The :attribute must be after or on :date.",rule:function(e,n){return t.helpers.momentInstalled()&&moment.isMoment(e)&&e.isSameOrAfter(n[0],"day")},messageReplace:function(e,t){return e.replace(":date",t[0].format("MM/DD/YYYY"))}},alpha:{message:"The :attribute may only contain letters.",rule:function(e){return t.helpers.testRegex(e,/^[A-Z]*$/i)}},alpha_space:{message:"The :attribute may only contain letters and spaces.",rule:function(e){return t.helpers.testRegex(e,/^[A-Z\s]*$/i)}},alpha_num:{message:"The :attribute may only contain letters and numbers.",rule:function(e){return t.helpers.testRegex(e,/^[A-Z0-9]*$/i)}},alpha_num_space:{message:"The :attribute may only contain letters, numbers, and spaces.",rule:function(e){return t.helpers.testRegex(e,/^[A-Z0-9\s]*$/i)}},alpha_num_dash:{message:"The :attribute may only contain letters, numbers, and dashes.",rule:function(e){return t.helpers.testRegex(e,/^[A-Z0-9_-]*$/i)}},alpha_num_dash_space:{message:"The :attribute may only contain letters, numbers, dashes, and spaces.",rule:function(e){return t.helpers.testRegex(e,/^[A-Z0-9_-\s]*$/i)}},array:{message:"The :attribute must be an array.",rule:function(e){return Array.isArray(e)}},before:{message:"The :attribute must be before :date.",rule:function(e,n){return t.helpers.momentInstalled()&&moment.isMoment(e)&&e.isBefore(n[0],"day")},messageReplace:function(e,t){return e.replace(":date",t[0].format("MM/DD/YYYY"))}},before_or_equal:{message:"The :attribute must be before or on :date.",rule:function(e,n){return t.helpers.momentInstalled()&&moment.isMoment(e)&&e.isSameOrBefore(n[0],"day")},messageReplace:function(e,t){return e.replace(":date",t[0].format("MM/DD/YYYY"))}},between:{message:"The :attribute must be between :min and :max:type.",rule:function(e,n){return t.helpers.size(e,n[2])>=parseFloat(n[0])&&t.helpers.size(e,n[2])<=parseFloat(n[1])},messageReplace:function(e,n){return e.replace(":min",n[0]).replace(":max",n[1]).replace(":type",t.helpers.sizeText(n[2]))}},boolean:{message:"The :attribute must be a boolean.",rule:function(e){return!1===e||!0===e}},card_exp:{message:"The :attribute must be a valid expiration date.",rule:function(e){return t.helpers.testRegex(e,/^(([0]?[1-9]{1})|([1]{1}[0-2]{1}))\s?\/\s?(\d{2}|\d{4})$/)}},card_num:{message:"The :attribute must be a valid credit card number.",rule:function(e){return t.helpers.testRegex(e,/^\d{4}\s?\d{4,6}\s?\d{4,5}\s?\d{0,8}$/)}},currency:{message:"The :attribute must be a valid currency.",rule:function(e){return t.helpers.testRegex(e,/^\$?(\d{1,3})(\,?\d{3})*\.?\d{0,2}$/)}},date:{message:"The :attribute must be a date.",rule:function(e){return t.helpers.momentInstalled()&&moment.isMoment(e)}},date_equals:{message:"The :attribute must be on :date.",rule:function(e,n){return t.helpers.momentInstalled()&&moment.isMoment(e)&&e.isSame(n[0],"day")},messageReplace:function(e,t){return e.replace(":date",t[0].format("MM/DD/YYYY"))}},email:{message:"The :attribute must be a valid email address.",rule:function(e){return t.helpers.testRegex(e,/^[A-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i)}},in:{message:"The selected :attribute must be :values.",rule:function(e,t){return t.includes(e)},messageReplace:function(e,n){return e.replace(":values",t.helpers.toSentence(n))}},integer:{message:"The :attribute must be an integer.",rule:function(e){return t.helpers.testRegex(e,/^\d*$/)}},max:{message:"The :attribute may not be greater than :max:type.",rule:function(e,n){return t.helpers.size(e,n[1])<=parseFloat(n[0])},messageReplace:function(e,n){return e.replace(":max",n[0]).replace(":type",t.helpers.sizeText(n[1]))}},min:{message:"The :attribute must be at least :min:type.",rule:function(e,n){return t.helpers.size(e,n[1])>=parseFloat(n[0])},messageReplace:function(e,n){return e.replace(":min",n[0]).replace(":type",t.helpers.sizeText(n[1]))}},not_in:{message:"The selected :attribute must not be :values.",rule:function(e,t){return!t.includes(e)},messageReplace:function(e,n){return e.replace(":values",t.helpers.toSentence(n))}},not_regex:{message:"The :attribute must not match the required pattern.",rule:function(e,n){return!t.helpers.testRegex(e,"string"==typeof n[0]||n[0]instanceof String?new RegExp(n[0]):n[0])}},numeric:{message:"The :attribute must be a number.",rule:function(e){return t.helpers.testRegex(e,/^\-?\d*\.?\d+$/)}},phone:{message:"The :attribute must be a valid phone number.",rule:function(e){return t.helpers.testRegex(e,/^(\+?\d{0,4})?\s?-?\s?(\(?\d{3}\)?)\s?-?\s?(\(?\d{3}\)?)\s?-?\s?(\(?\d{4}\)?)$/)&&!t.helpers.testRegex(e,/^\b(\d)\1{8,}\b$/)}},regex:{message:"The :attribute must match the required pattern.",rule:function(e,n){return t.helpers.testRegex(e,"string"==typeof n[0]||n[0]instanceof String?new RegExp(n[0]):n[0])}},required:{message:"The :attribute field is required.",rule:function(e){return!t.helpers.isBlank(e)},required:!0},size:{message:"The :attribute must be :size:type.",rule:function(e,n){return t.helpers.size(e,n[1])==parseFloat(n[0])},messageReplace:function(e,n){return e.replace(":size",n[0]).replace(":type",t.helpers.sizeText(n[1]))}},string:{message:"The :attribute must be a string.",rule:function(e){return a(e)===a("string")}},typeof:{message:"The :attribute is not the correct type of :type.",rule:function(e,t){return a(e)===a(t[0])},messageReplace:function(e,t){return e.replace(":type",a(t[0]))}},url:{message:"The :attribute must be a url.",rule:function(e){return t.helpers.testRegex(e,/^https?:\/\/[-a-z0-9@:%._\+~#=]{1,256}\.[a-z0-9()]{2,6}\b([-a-z0-9()@:%_\+.~#?&//=]*)$/i)}}},n.validators||{}),n.locale&&!r.locales.hasOwnProperty(n.locale)&&console.warn("Locale not found! Make sure it is spelled correctly and the locale file is loaded.");var i=r.locales[n.locale]||{};Object.keys(this.rules).forEach((function(e){t.rules[e].message=i[e]||t.rules[e].message})),this.messages=n.messages||{},this.className=n.className,this.autoForceUpdate=n.autoForceUpdate||!1,!1===n.element?this.element=function(e){return e}:n.hasOwnProperty("element")?this.element=n.element:"object"===("undefined"==typeof navigator?"undefined":a(navigator))&&"ReactNative"===navigator.product?this.element=function(e){return e}:this.element=function(n,r){return e.createElement("div",{className:r||t.className||"srv-validation-message"},n)}}return c(r,null,[{key:"addLocale",value:function(e,t){this.locales[e]=t}}]),c(r,[{key:"getErrorMessages",value:function(){return this.errorMessages}},{key:"showMessages",value:function(){this.messagesShown=!0,this.helpers.forceUpdateIfNeeded()}},{key:"hideMessages",value:function(){this.messagesShown=!1,this.helpers.forceUpdateIfNeeded()}},{key:"allValid",value:function(){for(var e in this.fields)if(!1===this.fieldValid(e))return!1;return!0}},{key:"fieldValid",value:function(e){return this.fields.hasOwnProperty(e)&&!0===this.fields[e]}},{key:"purgeFields",value:function(){this.fields={},this.errorMessages={}}},{key:"messageWhenPresent",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!this.helpers.isBlank(e)&&this.messagesShown)return this.helpers.element(e,t)}},{key:"messageAlways",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(console.warn("The messageAlways() method is deprecated in SimpleReactValidator. Please see the documentation and switch to the messageWhenPresent() method."),t&&this.messagesShown)return this.helpers.element(t,n)}},{key:"check",value:function(e,r){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(r)||(r=r.split("|"));var a,o=i.validators?s({},this.rules,{},i.validators):this.rules,l=n(r);try{for(l.s();!(a=l.n()).done;){var c=a.value,u=t(this.helpers.normalizeValues(e,c),3),d=u[0],h=u[1],f=u[2];if(!this.helpers.passes(h,d,f,o))return!1}}catch(e){l.e(e)}finally{l.f()}return!0}},{key:"message",value:function(e,r,i){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};this.errorMessages[e]=null,this.fields[e]=!0,Array.isArray(i)||(i=i.split("|"));var o,l=a.validators?s({},this.rules,{},a.validators):this.rules,c=n(i);try{for(c.s();!(o=c.n()).done;){var u=o.value,d=t(this.helpers.normalizeValues(r,u),3),h=d[0],f=d[1],p=d[2];if(!this.helpers.passes(f,h,p,l)){this.fields[e]=!1;var m=this.helpers.message(f,e,a,l);if(0<p.length&&l[f].hasOwnProperty("messageReplace")&&(m=l[f].messageReplace(m,p)),this.errorMessages[e]=m,this.messagesShown||this.visibleFields.includes(e))return this.helpers.element(m,a)}}}catch(e){c.e(e)}finally{c.f()}}}]),r}();return u(d,"version","1.4.6"),u(d,"locales",{en:{}}),d})?r.apply(t,i):r)||(e.exports=a)},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",confirmationDialog:"confirmationDialog--SwELj",modalBody:"modalBody--QZ2IO",paymentSuccessDialog:"paymentSuccessDialog--2bD_f",suggestionItem:"suggestionItem--eD3jv",suggestionAvatar:"suggestionAvatar--2B1Mm",tagItem:"tagItem--2j_Le",tagLabel:"tagLabel--3Dl54",tagAvatar:"tagAvatar--123ng",ownerShipModal:"ownerShipModal--hs3zC",memberItem:"memberItem--262Si",radioGroupWrap:"radioGroupWrap--3CK9O",inputSearchMembers:"inputSearchMembers--1L-T2",memberItemAvatar:"memberItemAvatar--3iMHE",memberListWrap:"memberListWrap--2zhrL",disabled:"disabled--2OA2M",clearSearch:"clearSearch--3YDms",requirePurchaseDialog:"requirePurchaseDialog--1Kmv2",icon:"icon--1CzhO",previewModal:"previewModal--3qoam",closeBtn:"closeBtn--1uN0J",urlBtnWrapper:"urlBtnWrapper--3RF8b",urlBtn:"urlBtn--14qxT",active:"active--wWVtO",imageWrapper:"imageWrapper--1PLgo"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",chapterCoverImage:"chapterCoverImage--3NBfs",slide:"slide--KFZHn",iconCenterPlayer:"iconCenterPlayer--3bnD4",iconOfSC:"iconOfSC--1T6d5",markAreaWrapper:"markAreaWrapper--3KbM8",vertical:"vertical--1TyfH",sliderMarkArea:"sliderMarkArea--3WpUv",chapterSlider:"chapterSlider--1M30-",sliderMark:"sliderMark--1E8XS",mark:"mark--1TV69",sliderThumb:"sliderThumb--QF5ip",sliderTrack:"sliderTrack--fiydE",slider:"slider--2ipV0",hide:"hide--xNTaY",chapterSliderWrapper:"chapterSliderWrapper--2e915",sliderTooltip:"sliderTooltip--1zBml",isFullscreenMode:"isFullscreenMode--XV3Ut",label:"label--2Lwkx",content:"content--mT3QO",arrow:"arrow--25QmT",indexBadge:"indexBadge--3-coz",topImageWrapper:"topImageWrapper--Ubruw",switchButtonGroup:"switchButtonGroup--1s7Sx",switchButton:"switchButton--3hlCh",active:"active--3ZGfC",backBtn:"backBtn--3gNaQ",firstSlideWrapper:"firstSlideWrapper--3qPiO",pagination:"pagination--1DwAT",btn:"btn--16ULr",videoPlayBtn:"videoPlayBtn--UiecD"}},,function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(1059)},function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(null,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return p})),n.d(t,"h",(function(){return u})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return h})),n.d(t,"k",(function(){return f}));var r=function(e){return"@@redux-saga/"+e},i=r("CANCEL_PROMISE"),a=r("CHANNEL_END"),o=r("IO"),s=r("MATCH"),l=r("MULTICAST"),c=r("SAGA_ACTION"),u=r("SELF_CANCELLATION"),d=r("TASK"),h=r("TASK_CANCEL"),f=r("TERMINATE"),p=r("LOCATION")},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",cursorDefault:"cursorDefault--3Czeh",cursorPointer:"cursorPointer--2yqsw",socialButton:"socialButton--27E3o",twitter:"twitter--24pEo",quickBtn:"quickBtn--1gfB9",iconBtnWrapper:"iconBtnWrapper--BSSea",iconBtn:"iconBtn--XjXD-",fontActive:"fontActive--1hi_L",round:"round--cVUmu",large:"large--1yB6L",badge:"badge--2OOAz",badgeOnTop:"badgeOnTop--1UM4N",colorFill:"colorFill--29aPa",active:"active--14y8Z",iconCircleBtn:"iconCircleBtn--Fl9u8",smallSize:"smallSize--3QvKV",IconRoundBtn:"IconRoundBtn--1ipTP",highlightBtnLabel:"highlightBtnLabel--3Kb8Y",labelOnly:"labelOnly--3a2pX",BLUE:"BLUE--2q9kw","color-BLUE":"color-BLUE--2YkY-",ORANGE:"ORANGE--3-VBd","color-ORANGE":"color-ORANGE--3172e",YELLOW:"YELLOW--1fbxp","color-YELLOW":"color-YELLOW--1PRrN",disabled:"disabled--1PXcm",colorListPicker:"colorListPicker--mwQIp",colorListPickerItem:"colorListPickerItem--Udhzv"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",revenueReportModal:"revenueReportModal--2oNtO",modalBody:"modalBody--1Intt",revenueReport:"revenueReport--3v8zF",header:"header--2bLLa",info:"info--2AfWI",total:"total--2JZhi",filter:"filter--2NG67",datePicker:"datePicker--17cNI",subtotal:"subtotal--37KdP",sumBox:"sumBox--fzFyd",sumValue:"sumValue--2ug6g",content:"content--A1eh_",table:"table--Fd_dM",nameColumn:"nameColumn--1N7Ca",typeColumn:"typeColumn--3hfAN",buyerColumn:"buyerColumn--1eZ_N",dateColumn:"dateColumn--1kcq9",priceColumn:"priceColumn--34Frl",sellerColumn:"sellerColumn--3a_PC",vOwnerColumn:"vOwnerColumn--1a1-S",textbookColumn:"textbookColumn--1kLkL",transferred:"transferred--3u0qi",footer:"footer--1skKY"}},function(e,t,n){(function(t){var r;e.exports=(r=r||function(e,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==t&&t.crypto&&(i=t.crypto),!i)try{i=n(1667)}catch(e){}var a=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},l=s.lib={},c=l.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=l.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||h).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(a());return new u.init(t,e)}}),d=s.enc={},h=d.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=d.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},p=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(4*o),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,c=e.min(4*l,a);if(l){for(var d=0;d<l;d+=o)this._doProcessBlock(i,d);n=i.splice(0,l),r.sigBytes-=c}return new u.init(n,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(l.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}}),s.algo={});return s}(Math),r)}).call(this,n(68))},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(1654);e.exports=function(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",leftColumnWrap:"leftColumnWrap--LIqNI",rightColumnWrap:"rightColumnWrap--3Hf5S",label:"label--158x5",datePicker:"datePicker--23umX",datePickerInput:"datePickerInput--2FElZ",formTitle:"formTitle--2TWn8",participant:"participant--Mlptg",participantAvatar:"participantAvatar--lK0lC",groupIconWrap:"groupIconWrap--3oLXn",leftItem:"leftItem--1bGTN",participantsWrap:"participantsWrap--U2wyu",deleteIcon:"deleteIcon--z11zm",footerBtn:"footerBtn--cCsyl",description:"description--33p5q",separator:"separator--10gwB",addBtn:"addBtn--1vnT2",tagItem:"tagItem--HFc_C",tagLabel:"tagLabel--3L4QP",tagAvatar:"tagAvatar--2kLoI",suggestionItem:"suggestionItem--1Eo26",suggestionAvatar:"suggestionAvatar--2h-7I",addParticipantsWrap:"addParticipantsWrap--3GFCE",addParticipantInput:"addParticipantInput--2u8SA",numPartGroup:"numPartGroup--1Laav",scrollWrapper:"scrollWrapper--3iASV"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o}));var r=n(119);function i(e){return e instanceof Object(r.a)(e).Element||e instanceof Element}function a(e){return e instanceof Object(r.a)(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Object(r.a)(e).ShadowRoot||e instanceof ShadowRoot)}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",headerToolNav:"headerToolNav--17ucS",headerToolNavLeft:"headerToolNavLeft--HPyJw",headerToolNavRight:"headerToolNavRight--NInHb",videoContent:"videoContent--30O5H",quickMenuWrapper:"quickMenuWrapper--1YMnT",fakeComprehensionGuides:"fakeComprehensionGuides--S_Aej",addBtn:"addBtn--Gt9jM",ccvButton:"ccvButton--h8nC2",cgvButton:"cgvButton--2TDDd",circleWrapper:"circleWrapper--Yih90",topTitle:"topTitle--yb7iy",bottomTitle:"bottomTitle--2STEI",clickHereBtn:"clickHereBtn--2aogs",coverImageWrap:"coverImageWrap--2xllv",iconCenterPlayer:"iconCenterPlayer--3Fcj7",iconOfSC:"iconOfSC--1QpM3",coverImage:"coverImage--6gRPY",miniCoverImage:"miniCoverImage--263QV",fillScreenInFirstArea:"fillScreenInFirstArea--3NZwK",showAttachmentReview:"showAttachmentReview--y-kNj",videoPlayerArea:"videoPlayerArea--3jJUK",isFullscreenMode:"isFullscreenMode--8Hmck",volumeControl:"volumeControl--1rGiN",fullscreenMode:"fullscreenMode--3Wbmt",formTitle:"formTitle--2AkMy",chapterTooltip:"chapterTooltip--16bSp",subVideoList:"subVideoList--1IfTO",toolbarWrapper:"toolbarWrapper--62Mu2",toolbar:"toolbar--1iu5v",label:"label--2IB3N",videoControlWrapper:"videoControlWrapper--1LHae",withHeader:"withHeader--3RkQH",videoPlayBtn:"videoPlayBtn--3UCRe",videoPlayer:"videoPlayer--lMfSZ",firstAreaWrapper:"firstAreaWrapper--jsSTO",chapterCISliderWrapper:"chapterCISliderWrapper--3K9Qm",firstAreaToolbar:"firstAreaToolbar--2G6TJ",lockLayer:"lockLayer--1DTHg",btnClose:"btnClose--3eSPH",fullscreenRightBar:"fullscreenRightBar--2uQHu",startBtn:"startBtn--2KZlr",fullscreenBottomBar:"fullscreenBottomBar--1bB6h"}},function(e,t,n){(e.exports=n(1086)).tz.load(n(1088))},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",playBackWrap:"playBackWrap--1VZ3s",playBtn:"playBtn--2X9Ic",bookmark:"bookmark--3l4Bm",bookmarkOrange:"bookmarkOrange--ieh-b",bookmarkYellow:"bookmarkYellow--11_W3",bookmarkGray:"bookmarkGray--2XJaI",timeLeft:"timeLeft--1Qa_0",timeRight:"timeRight--1IVL5",playBar:"playBar--3AVy7",indicator:"indicator--2_Ifl",playbackRateWraper:"playbackRateWraper--1LFIO",playbackRateButton:"playbackRateButton--1XpYe",playbackRateValue:"playbackRateValue--nbtcQ",playbackWrap:"playbackWrap--1J1TM",playbackItem:"playbackItem--zj-yL",playbackItemActive:"playbackItemActive--CUNJ9",disabled:"disabled--2jlmB",volumeTrackBar:"volumeTrackBar--1wtIM",volumeTrackThumb:"volumeTrackThumb--T9COd",volumeTooltip:"volumeTooltip--1Ad8T",volumeWraper:"volumeWraper--mm91I"}},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var e=s(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(33),i=n(41),a=n(42),o=n.n(a),s=/-(.)/g;var l=n(0),c=n.n(l),u=n(47),d=["className","bsPrefix","as"],h=function(e){return e[0].toUpperCase()+(t=e,t.replace(s,(function(e,t){return t.toUpperCase()}))).slice(1);var t};function f(e,t){var n=void 0===t?{}:t,a=n.displayName,s=void 0===a?h(e):a,l=n.Component,f=n.defaultProps,p=c.a.forwardRef((function(t,n){var a=t.className,s=t.bsPrefix,h=t.as,f=void 0===h?l||"div":h,p=Object(i.a)(t,d),m=Object(u.a)(s,e);return c.a.createElement(f,Object(r.a)({ref:n,className:o()(a,m)},p))}));return p.defaultProps=f,p.displayName=s,p}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultModality=t.DefaultMessagingSession=t.DefaultMeetingSession=t.DefaultMeetingReadinessChecker=t.DefaultMeetingEventReporter=t.DefaultMediaDeviceFactory=t.DefaultEventController=t.DefaultDevicePixelRatioMonitor=t.DefaultDeviceController=t.DefaultContentShareController=t.DefaultClientMetricReport=t.DefaultBrowserBehavior=t.DefaultAudioVideoFacade=t.DefaultAudioVideoController=t.DefaultAudioMixController=t.DefaultActiveSpeakerPolicy=t.DefaultActiveSpeakerDetector=t.DataMessage=t.CreateSDPTask=t.CreatePeerConnectionTask=t.ContentShareMediaStreamBroker=t.ContentShareConstants=t.ConsoleLogger=t.ConnectionHealthPolicyConfiguration=t.ConnectionHealthData=t.ClientVideoStreamReceivingReport=t.ClientMetricReportMediaType=t.ClientMetricReportDirection=t.CleanStoppedSessionTask=t.CleanRestartedSessionTask=t.CheckVideoInputFeedback=t.CheckVideoConnectivityFeedback=t.CheckNetworkUDPConnectivityFeedback=t.CheckNetworkTCPConnectivityFeedback=t.CheckContentShareConnectivityFeedback=t.CheckCameraResolutionFeedback=t.CheckAudioOutputFeedback=t.CheckAudioInputFeedback=t.CheckAudioConnectivityFeedback=t.CanvasVideoFrameBuffer=t.BitrateParameters=t.BaseTask=t.BaseConnectionHealthPolicy=t.AudioVideoControllerState=t.AudioProfile=t.AudioLogEvent=t.Attendee=t.AttachMediaInputTask=t.AsyncScheduler=t.AllHighestVideoBandwidthPolicy=void 0,t.MeetingSessionStatusCode=t.MeetingSessionStatus=t.MeetingSessionPOSTLogger=t.MeetingSessionLifecycleEventCondition=t.MeetingSessionLifecycleEvent=t.MeetingSessionCredentials=t.MeetingSessionConfiguration=t.MeetingReadinessCheckerConfiguration=t.MeetingEventsClientConfiguration=t.MediaDeviceProxyHandler=t.Maybe=t.LogLevel=t.Log=t.ListenForVolumeIndicatorsTask=t.LeaveAndReceiveLeaveAckTask=t.JoinAndReceiveIndexTask=t.IntervalScheduler=t.InMemoryJSONEventBuffer=t.GlobalMetricReport=t.GetUserMediaError=t.FullJitterLimitedBackoff=t.FullJitterBackoffFactory=t.FullJitterBackoff=t.FinishGatheringICECandidatesTask=t.EventIngestionConfiguration=t.EventBufferConfiguration=t.DeviceSelection=t.DevicePixelRatioWindowSource=t.DefaultWebSocketAdapter=t.DefaultVolumeIndicatorAdapter=t.DefaultVideoTransformDevice=t.DefaultVideoTileFactory=t.DefaultVideoTileController=t.DefaultVideoTile=t.DefaultVideoStreamIndex=t.DefaultVideoStreamIdSet=t.DefaultVideoFrameProcessorPipeline=t.DefaultVideoCaptureAndEncodeParameter=t.DefaultUserAgentParser=t.DefaultTranscriptionController=t.DefaultTransceiverController=t.DefaultStatsCollector=t.DefaultSimulcastUplinkPolicy=t.DefaultSignalingClient=t.DefaultSigV4=t.DefaultSessionStateController=t.DefaultSDP=t.DefaultReconnectController=t.DefaultRealtimeController=t.DefaultPingPong=void 0,t.SignalingClientEvent=t.SignalingClientConnectionRequest=t.SignalingAndMetricsConnectionMonitor=t.SetRemoteDescriptionTask=t.SetLocalDescriptionTask=t.SessionStateControllerTransitionResult=t.SessionStateControllerState=t.SessionStateControllerDeferPriority=t.SessionStateControllerAction=t.SerialGroupTask=t.SendAndReceiveDataMessagesTask=t.SDPCandidateType=t.RunnableTask=t.ReleaseMediaStreamsTask=t.ReconnectionHealthPolicy=t.ReceiveVideoStreamIndexTask=t.ReceiveVideoInputTask=t.ReceiveTURNCredentialsTask=t.ReceiveAudioInputTask=t.RealtimeVolumeIndicator=t.RealtimeState=t.RealtimeAttendeePositionInFrame=t.PermissionDeniedError=t.ParallelGroupTask=t.OverconstrainedError=t.OpenSignalingConnectionTask=t.OnceTask=t.NotReadableError=t.NotFoundError=t.None=t.NoVideoUplinkBandwidthPolicy=t.NoVideoDownlinkBandwidthPolicy=t.NoOpVideoFrameProcessor=t.NoOpVideoElementFactory=t.NoOpTask=t.NoOpMediaStreamBroker=t.NoOpLogger=t.NoOpEventReporter=t.NoOpDeviceController=t.NoOpDebugLogger=t.NoOpAudioVideoController=t.NScaleVideoUplinkBandwidthPolicy=t.MutableVideoPreferences=t.MultiLogger=t.MonitorTask=t.MessagingSessionConfiguration=t.Message=t.MeetingSessionVideoAvailability=t.MeetingSessionURLs=t.MeetingSessionTURNCredentials=void 0,t.isVideoTransformDevice=t.isDestroyable=t.isAudioTransformDevice=t.WebSocketReadyState=t.WaitForAttendeePresenceTask=t.VoiceFocusTransformDevice=t.VoiceFocusDeviceTransformer=t.VideoTileState=t.VideoStreamDescription=t.VideoSource=t.VideoQualitySettings=t.VideoPriorityBasedPolicyConfig=t.VideoPriorityBasedPolicy=t.VideoPreferences=t.VideoPreference=t.VideoOnlyTransceiverController=t.VideoLogEvent=t.VideoAdaptiveProbePolicy=t.Versioning=t.UnusableAudioWarningConnectionHealthPolicy=t.TypeError=t.TranscriptionStatusType=t.TranscriptionStatus=t.TranscriptResult=t.TranscriptItemType=t.TranscriptItem=t.TranscriptAlternative=t.Transcript=t.TimeoutTask=t.TimeoutScheduler=t.TaskStatus=t.TargetDisplaySize=t.SubscribeAndReceiveSubscribeAckTask=t.StreamMetricReport=t.Some=t.SingleNodeAudioTransformDevice=t.SimulcastVideoStreamIndex=t.SimulcastTransceiverController=t.SimulcastLayers=t.SignalingClientVideoSubscriptionConfiguration=t.SignalingClientSubscribe=t.SignalingClientJoin=t.SignalingClientEventType=void 0;const r=n(479);t.AllHighestVideoBandwidthPolicy=r.default;const i=n(182);t.AsyncScheduler=i.default;const a=n(797);t.AttachMediaInputTask=a.default;const o=n(1361);t.Attendee=o.default;const s=n(481);t.AudioLogEvent=s.default;const l=n(799);t.AudioProfile=l.default;const c=n(800);t.AudioVideoControllerState=c.default;const u=n(482);t.BaseConnectionHealthPolicy=u.default;const d=n(101);t.BaseTask=d.default;const h=n(801);t.BitrateParameters=h.default;const f=n(802);t.CanvasVideoFrameBuffer=f.default;const p=n(803);t.CheckAudioConnectivityFeedback=p.default;const m=n(804);t.CheckAudioInputFeedback=m.default;const g=n(805);t.CheckAudioOutputFeedback=g.default;const v=n(806);t.CheckCameraResolutionFeedback=v.default;const b=n(807);t.CheckContentShareConnectivityFeedback=b.default;const y=n(808);t.CheckNetworkTCPConnectivityFeedback=y.default;const A=n(809);t.CheckNetworkUDPConnectivityFeedback=A.default;const _=n(810);t.CheckVideoConnectivityFeedback=_.default;const w=n(811);t.CheckVideoInputFeedback=w.default;const E=n(812);t.CleanRestartedSessionTask=E.default;const S=n(813);t.CleanStoppedSessionTask=S.default;const C=n(306);t.ClientMetricReportDirection=C.default;const T=n(364);t.ClientMetricReportMediaType=T.default;const k=n(814);t.ClientVideoStreamReceivingReport=k.default;const x=n(815);t.ConnectionHealthData=x.default;const O=n(816);t.ConnectionHealthPolicyConfiguration=O.default;const I=n(1362);t.ConsoleLogger=I.default;const M=n(307);t.ContentShareConstants=M.default;const P=n(817);t.ContentShareMediaStreamBroker=P.default;const D=n(830);t.CreatePeerConnectionTask=D.default;const N=n(831);t.CreateSDPTask=N.default;const L=n(833);t.DataMessage=L.default;const R=n(834);t.DefaultActiveSpeakerDetector=R.default;const B=n(1364);t.DefaultActiveSpeakerPolicy=B.default;const j=n(487);t.DefaultAudioMixController=j.default;const F=n(488);t.DefaultAudioVideoController=F.default;const U=n(893);t.DefaultAudioVideoFacade=U.default;const H=n(157);t.DefaultBrowserBehavior=H.default;const z=n(855);t.DefaultClientMetricReport=z.default;const V=n(894);t.DefaultContentShareController=V.default;const W=n(483);t.DefaultDeviceController=W.default;const G=n(887);t.DefaultDevicePixelRatioMonitor=G.default;const q=n(836);t.DefaultEventController=q.default;const Y=n(820);t.DefaultMediaDeviceFactory=Y.default;const K=n(895);t.DefaultMeetingEventReporter=K.default;const X=n(1383);t.DefaultMeetingReadinessChecker=X.default;const Q=n(1384);t.DefaultMeetingSession=Q.default;const $=n(1385);t.DefaultMessagingSession=$.default;const J=n(308);t.DefaultModality=J.default;const Z=n(840);t.DefaultPingPong=Z.default;const ee=n(841);t.DefaultRealtimeController=ee.default;const te=n(369);t.DefaultReconnectController=te.default;const ne=n(309);t.DefaultSDP=ne.default;const re=n(849);t.DefaultSessionStateController=re.default;const ie=n(903);t.DefaultSigV4=ie.default;const ae=n(851);t.DefaultSignalingClient=ae.default;const oe=n(890);t.DefaultSimulcastUplinkPolicy=oe.default;const se=n(854);t.DefaultStatsCollector=se.default;const le=n(366);t.DefaultTransceiverController=le.default;const ce=n(842);t.DefaultTranscriptionController=ce.default;const ue=n(897);t.DefaultUserAgentParser=ue.default;const de=n(311);t.DefaultVideoCaptureAndEncodeParameter=de.default;const he=n(904);t.DefaultVideoFrameProcessorPipeline=he.default;const fe=n(268);t.DefaultVideoStreamIdSet=fe.default;const pe=n(499);t.DefaultVideoStreamIndex=pe.default;const me=n(484);t.DefaultVideoTile=me.default;const ge=n(886);t.DefaultVideoTileController=ge.default;const ve=n(889);t.DefaultVideoTileFactory=ve.default;const be=n(1386);t.DefaultVideoTransformDevice=be.default;const ye=n(892);t.DefaultVolumeIndicatorAdapter=ye.default;const Ae=n(370);t.DefaultWebSocketAdapter=Ae.default;const _e=n(888);t.DevicePixelRatioWindowSource=_e.default;const we=n(824);t.DeviceSelection=we.default;const Ee=n(900);t.EventBufferConfiguration=Ee.default;const Se=n(899);t.EventIngestionConfiguration=Se.default;const Ce=n(860);t.FinishGatheringICECandidatesTask=Ce.default;const Te=n(235);t.FullJitterBackoff=Te.default;const ke=n(1387);t.FullJitterBackoffFactory=ke.default;const xe=n(905);t.FullJitterLimitedBackoff=xe.default;const Oe=n(233);t.GetUserMediaError=Oe.default;const Ie=n(856);t.GlobalMetricReport=Ie.default;const Me=n(896);t.InMemoryJSONEventBuffer=Me.default;const Pe=n(211);t.IntervalScheduler=Pe.default;const De=n(861);t.JoinAndReceiveIndexTask=De.default;const Ne=n(863);t.LeaveAndReceiveLeaveAckTask=Ne.default;const Le=n(864);t.ListenForVolumeIndicatorsTask=Le.default;const Re=n(906);t.Log=Re.default;const Be=n(210);t.LogLevel=Be.default;const je=n(158);t.Maybe=je.default;const Fe=n(821);t.MediaDeviceProxyHandler=Fe.default;const Ue=n(901);t.MeetingEventsClientConfiguration=Ue.default;const He=n(898);t.MeetingReadinessCheckerConfiguration=He.default;const ze=n(502);t.MeetingSessionConfiguration=ze.default;const Ve=n(368);t.MeetingSessionCredentials=Ve.default;const We=n(858);t.MeetingSessionLifecycleEvent=We.default;const Ge=n(859);t.MeetingSessionLifecycleEventCondition=Ge.default;const qe=n(1388);t.MeetingSessionPOSTLogger=qe.default;const Ye=n(310);t.MeetingSessionStatus=Ye.default;const Ke=n(183);t.MeetingSessionStatusCode=Ke.default;const Xe=n(493);t.MeetingSessionTURNCredentials=Xe.default;const Qe=n(504);t.MeetingSessionURLs=Qe.default;const $e=n(489);t.MeetingSessionVideoAvailability=$e.default;const Je=n(902);t.Message=Je.default;const Ze=n(1389);t.MessagingSessionConfiguration=Ze.default;const et=n(865);t.MonitorTask=et.default;const tt=n(1390);t.MultiLogger=tt.default;const nt=n(501);t.NScaleVideoUplinkBandwidthPolicy=nt.default;const rt=n(1391);t.NoOpAudioVideoController=rt.default;const it=n(907);t.NoOpDebugLogger=it.default;const at=n(1392);t.NoOpDeviceController=at.default;const ot=n(1393);t.NoOpEventReporter=ot.default;const st=n(908);t.NoOpLogger=st.default;const lt=n(506);t.NoOpMediaStreamBroker=lt.default;const ct=n(1394);t.NoOpTask=ct.default;const ut=n(1395);t.NoOpVideoElementFactory=ut.default;const dt=n(1396);t.NoOpVideoFrameProcessor=dt.default;const ht=n(1397);t.NoVideoDownlinkBandwidthPolicy=ht.default;const ft=n(1398);t.NoVideoUplinkBandwidthPolicy=ft.default;const pt=n(818);t.None=pt.default;const mt=n(825);t.NotFoundError=mt.default;const gt=n(826);t.NotReadableError=gt.default;const vt=n(798);t.OnceTask=vt.default;const bt=n(868);t.OpenSignalingConnectionTask=bt.default;const yt=n(827);t.OverconstrainedError=yt.default;const At=n(870);t.ParallelGroupTask=At.default;const _t=n(485);t.PermissionDeniedError=_t.default;const wt=n(1399);t.RealtimeAttendeePositionInFrame=wt.default;const Et=n(847);t.RealtimeState=Et.default;const St=n(848);t.RealtimeVolumeIndicator=St.default;const Ct=n(871);t.ReceiveAudioInputTask=Ct.default;const Tt=n(872);t.ReceiveTURNCredentialsTask=Tt.default;const kt=n(873);t.ReceiveVideoInputTask=kt.default;const xt=n(874);t.ReceiveVideoStreamIndexTask=xt.default;const Ot=n(866);t.ReconnectionHealthPolicy=Ot.default;const It=n(875);t.ReleaseMediaStreamsTask=It.default;const Mt=n(1400);t.RunnableTask=Mt.default;const Pt=n(832);t.SDPCandidateType=Pt.default;const Dt=n(876);t.SendAndReceiveDataMessagesTask=Dt.default;const Nt=n(877);t.SerialGroupTask=Nt.default;const Lt=n(490);t.SessionStateControllerAction=Lt.default;const Rt=n(850);t.SessionStateControllerDeferPriority=Rt.default;const Bt=n(491);t.SessionStateControllerState=Bt.default;const jt=n(492);t.SessionStateControllerTransitionResult=jt.default;const Ft=n(878);t.SetLocalDescriptionTask=Ft.default;const Ut=n(879);t.SetRemoteDescriptionTask=Ut.default;const Ht=n(835);t.SignalingAndMetricsConnectionMonitor=Ht.default;const zt=n(869);t.SignalingClientConnectionRequest=zt.default;const Vt=n(852);t.SignalingClientEvent=Vt.default;const Wt=n(146);t.SignalingClientEventType=Wt.default;const Gt=n(862);t.SignalingClientJoin=Gt.default;const qt=n(881);t.SignalingClientSubscribe=qt.default;const Yt=n(853);t.SignalingClientVideoSubscriptionConfiguration=Yt.default;const Kt=n(891);t.SimulcastLayers=Kt.default;const Xt=n(495);t.SimulcastTransceiverController=Xt.default;const Qt=n(885);t.SimulcastVideoStreamIndex=Qt.default;const $t=n(1401);t.SingleNodeAudioTransformDevice=$t.default;const Jt=n(819);t.Some=Jt.default;const Zt=n(857);t.StreamMetricReport=Zt.default;const en=n(880);t.SubscribeAndReceiveSubscribeAckTask=en.default;const tn=n(497);t.TargetDisplaySize=tn.default;const nn=n(480);t.TaskStatus=nn.default;const rn=n(362);t.TimeoutScheduler=rn.default;const an=n(494);t.TimeoutTask=an.default;const on=n(843);t.Transcript=on.default;const sn=n(1402);t.TranscriptAlternative=sn.default;const ln=n(1403);t.TranscriptItem=ln.default;const cn=n(846);t.TranscriptItemType=cn.default;const un=n(1404);t.TranscriptResult=un.default;const dn=n(844);t.TranscriptionStatus=dn.default;const hn=n(845);t.TranscriptionStatusType=hn.default;const fn=n(828);t.TypeError=fn.default;const pn=n(867);t.UnusableAudioWarningConnectionHealthPolicy=pn.default;const mn=n(212);t.Versioning=mn.default;const gn=n(1405);t.VideoAdaptiveProbePolicy=gn.default;const vn=n(363);t.VideoLogEvent=vn.default;const bn=n(883);t.VideoOnlyTransceiverController=bn.default;const yn=n(498);t.VideoPreference=yn.default;const An=n(367);t.VideoPreferences=An.default;const _n=n(496);t.VideoPriorityBasedPolicy=_n.default;const wn=n(884);t.VideoPriorityBasedPolicyConfig=wn.default;const En=n(829);t.VideoQualitySettings=En.default;const Sn=n(1406);t.VideoSource=Sn.default;const Cn=n(500);t.VideoStreamDescription=Cn.default;const Tn=n(822);t.VideoTileState=Tn.default;const kn=n(1407);t.VoiceFocusDeviceTransformer=kn.default;const xn=n(910);t.VoiceFocusTransformDevice=xn.default;const On=n(882);t.WaitForAttendeePresenceTask=On.default;const In=n(365);t.WebSocketReadyState=In.default;const Mn=n(367);Object.defineProperty(t,"MutableVideoPreferences",{enumerable:!0,get:function(){return Mn.MutableVideoPreferences}});const Pn=n(823);Object.defineProperty(t,"isAudioTransformDevice",{enumerable:!0,get:function(){return Pn.isAudioTransformDevice}});const Dn=n(505);Object.defineProperty(t,"isDestroyable",{enumerable:!0,get:function(){return Dn.isDestroyable}});const Nn=n(486);Object.defineProperty(t,"isVideoTransformDevice",{enumerable:!0,get:function(){return Nn.isVideoTransformDevice}})},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",cavasTbWrapper:"cavasTbWrapper--2EHRh",tbToggle:"tbToggle--3kdF2",tbClose:"tbClose--pjMlM",iconWrapper:"iconWrapper--q77vo",hoverEffect:"hoverEffect--1mWqV",iconDropdownWrapper:"iconDropdownWrapper--aUKlR",upButton:"upButton--1I3Ek",downButton:"downButton--3rWRm",colorPicker:"colorPicker--1QoUs",active:"active--3TNys",disabled:"disabled--2KwYP",strokeWidthLabel:"strokeWidthLabel--E5wQY",strokeIndicator:"strokeIndicator--2T996",lineGroupLeft:"lineGroupLeft--2tkSK",lineGroupRight:"lineGroupRight--1NQQV",lineGroup:"lineGroup--cZo8b",fontSizeWrap:"fontSizeWrap--3zWWl",fontSizeList:"fontSizeList--2ow0E",fontSizeListActive:"fontSizeListActive--ti4qa",fontWrap:"fontWrap--2RbVR"}},function(e,t){function n(t){return e.exports=n="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.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(798),a=n(480);t.default=class{constructor(e){this.logger=e,this.taskName="BaseTask",this.parentTask=null,this.status=a.default.IDLE,this.run=this.baseRun.bind(this,this.run),this.cancel=this.baseCancel.bind(this,this.cancel)}once(...e){return new i.default(this.logger,this,e)}cancel(){}name(){return this.parentTask?`${this.parentTask.name()}/${this.taskName}`:this.taskName}setParent(e){this.parentTask=e}getStatus(){return this.status}logAndThrow(e){throw this.logger.info(e),new Error(e)}baseRun(e){return r(this,void 0,void 0,(function*(){try{const t=Date.now();switch(this.logger.info(`running task ${this.name()}`),this.status){case a.default.RUNNING:this.logAndThrow(`${this.name()} is already running`);case a.default.CANCELED:this.logAndThrow(`${this.name()} was canceled before running`);case a.default.FINISHED:this.logAndThrow(`${this.name()} was already finished`)}this.status=a.default.RUNNING,yield e.call(this),this.logger.info(`${this.name()} took ${Math.round(Date.now()-t)} ms`)}catch(e){throw e}finally{this.status!==a.default.CANCELED&&(this.status=a.default.FINISHED)}}))}baseCancel(e){this.status!==a.default.CANCELED&&this.status!==a.default.FINISHED?(this.logger.info(`canceling task ${this.name()}`),this.status=a.default.CANCELED,e.call(this)):this.logger.info(`Not canceling ${this.name()}: state is ${this.status}`)}}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",uploadArea:"uploadArea--3Wj0g",uploadAreaWrap:"uploadAreaWrap--S5B9U",uploadAreaDisabled:"uploadAreaDisabled--yeDq6",textUploadFileName:"textUploadFileName--3s_ws",listUploading:"listUploading--16CGf",myMediaListSideBar:"myMediaListSideBar--QBIHO",myMediaListActive:"myMediaListActive--3VYjX",createCogVideo:"createCogVideo--2Wfup",videoReview:"videoReview--1uadZ",noneHoverItem:"noneHoverItem--25iEX",isHoverItem:"isHoverItem--3tSfR",myCogvidThumb:"myCogvidThumb--2iA35",rightMyItem:"rightMyItem--2nKVy",statusLabel:"statusLabel--1x9UX",myMediaItem:"myMediaItem--3b7gi",myMediaItemChecked:"myMediaItemChecked--18dmW",checkIcon:"checkIcon--25mpj",centerIcon:"centerIcon--35AK9"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",semanticBlockWrapper:"semanticBlockWrapper--2wtLD",fakeSemanticBlockWrapper:"fakeSemanticBlockWrapper--2LoMR",bookmarkOrange:"bookmarkOrange--3lssS",bookmarkYellow:"bookmarkYellow--2xNUn",bookmarkGrey:"bookmarkGrey--2zBPF",errorBorder:"errorBorder--1uyWy",editIconWrapper:"editIconWrapper--2DVBQ",bookmarksWrapper:"bookmarksWrapper--2z094",semanticTextWrapper:"semanticTextWrapper--3DjeO",timestamp:"timestamp--2dxYO",textarea:"textarea--aElkB",semanticTextCell:"semanticTextCell--368B3",active:"active--1aohM",isEditing:"isEditing--1Ty9r",editingWrapper:"editingWrapper--38r7c",editIcon:"editIcon--1Q3ZH",saveIcon:"saveIcon--1FgjF",cancelIcon:"cancelIcon---y5tC",indicator:"indicator--1JInC",spinnerWrapper:"spinnerWrapper--2OlXU",createdDate:"createdDate--31rh4",virtualTextarea:"virtualTextarea--2rYFB",numOfRows:"numOfRows--2Xka8",textError:"textError--3CfPj",hasCanvasMark:"hasCanvasMark--lMOGN"}},function(e,t,n){"use strict";n.d(t,"i",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return h})),n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n(130),i=n.n(r),a={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},o=["video","audio","text"],s=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},c=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),o.forEach((function(r){var i=a[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var o=e.substring(0,i[1].length),s=e.replace(o,"");n.push({type:o,details:s,mediaType:r})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},u=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return c(i.playlists[0].attributes.CODECS)}return null},d=function(e){return void 0===e&&(e=""),a.audio.test(e.trim().toLowerCase())},h=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),r="video";1===n.length&&d(n[0])?r="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),a.text.test(t.trim().toLowerCase()))&&(r="application");var i="mp4";return n.every((function(e){return a.mp4.test(e)}))?i="mp4":n.every((function(e){return a.webm.test(e)}))?i="webm":n.every((function(e){return a.ogg.test(e)}))&&(i="ogg"),r+"/"+i+';codecs="'+e+'"'}},f=function(e){return void 0===e&&(e=""),i.a.MediaSource&&i.a.MediaSource.isTypeSupported&&i.a.MediaSource.isTypeSupported(h(e))||!1},p=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<s.length;t++){if(a["muxer"+s[t]].test(e))return!0}return!1}))},m="mp4a.40.2",g="avc1.4d400d"},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",cartModal:"cartModal--1bsMk",cartItems:"cartItems--1Z1cK",header:"header--2mV-h",itemRow:"itemRow--FMMCg",cartItem:"cartItem--2v6Rl",thumbnailWrapper:"thumbnailWrapper--a4h9z",resourceThumbnail:"resourceThumbnail--21KEg",priceBadge:"priceBadge--26dBC",cartPaymentSelect:"cartPaymentSelect--CYmt_",paymentOption:"paymentOption--DYHIs",selected:"selected--1Ldvo",disabled:"disabled--1LeOj",paymentOptionIcon:"paymentOptionIcon--1aFhA",autocompleteCountry:"autocompleteCountry--1V_W9",dropdownPopup:"dropdownPopup--3R14t",thumbnail:"thumbnail--2vFUf",shoppingCart:"shoppingCart--2XD9x",badge:"badge--2FaFs"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",gapSpace:"4px",subVideoList:"subVideoList--3vwQm",itemsWrapper:"itemsWrapper--31C7D",hasScrollbar:"hasScrollbar--pxu_1",itemWrapper:"itemWrapper--Z8hGl",subVideoItem:"subVideoItem--1HgRQ",isHover:"isHover--2eJg7",clickable:"clickable--1cA2p",badges:"badges--3sxFc",priceBadge:"priceBadge--3MIT9",serialBadge:"serialBadge--2qzUX",childCountBadge:"childCountBadge--2ncQx",badgeLeft:"badgeLeft--1YPKx",badgeRight:"badgeRight--1aX0c",badgeRightActive:"badgeRightActive--332m1",info:"info--2yMKC",author:"author--1fRr4",title:"title--1sk5V",subject:"subject--1LKSo",topic:"topic--1Q618",stats:"stats--2g0uj",lv1:"lv1--3-pcg",lv2:"lv2--2wzfW"}},function(e,t,n){"use strict";var r=TypeError,i=Object.getOwnPropertyDescriptor;if(i)try{i({},"")}catch(e){i=null}var a=function(){throw new r},o=i?function(){try{return arguments.callee,a}catch(e){try{return i(arguments,"callee").get}catch(e){return a}}}():a,s=n(770)(),l=Object.getPrototypeOf||function(e){return e.__proto__},c=void 0,u="undefined"==typeof Uint8Array?void 0:l(Uint8Array),d={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":s?l([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":c&&s&&Symbol.asyncIterator?c[Symbol.asyncIterator]():void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":s?l(l([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%JSONParse%":"object"==typeof JSON?JSON.parse:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&s?l((new Map)[Symbol.iterator]()):void 0,"%MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&s?l((new Set)[Symbol.iterator]()):void 0,"%SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":s?l(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":s?Symbol:void 0,"%SymbolPrototype%":s?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":o,"%TypedArray%":u,"%TypedArrayPrototype%":u?u.prototype:void 0,"%TypeError%":r,"%TypeErrorPrototype%":r.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},h=n(302).call(Function.call,String.prototype.replace),f=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,p=/\\(\\)?/g,m=function(e){var t=[];return h(e,f,(function(e,n,r,i){t[t.length]=r?h(i,p,"$1"):n||e})),t},g=function(e,t){if(!(e in d))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===d[e]&&!t)throw new r("intrinsic "+e+" exists, but is not available. Please file an issue!");return d[e]};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=m(e),a=g("%"+(n.length>0?n[0]:"")+"%",t),o=1;o<n.length;o+=1)if(null!=a)if(i&&o+1>=n.length){var s=i(a,n[o]);if(!(t||n[o]in a))throw new r("base intrinsic for "+e+" exists, but the property is not available.");a=s?s.get||s.value:a[n[o]]}else a=a[n[o]];return a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(140),i=n(85),a=n(0),o=n.n(a),s=n(153),l=(n(6),n(55)),c=n(87),u=n(161);o.a.Component;o.a.Component;var d=function(e,t){return"function"==typeof e?e(t):e},h=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=o.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Object(c.a)(e,["innerRef","navigate","onClick"]),s=a.target,u=Object(l.a)({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,o.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,a=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=h(d(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=d(s,e.location);(a?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,o.a.createElement(i,m)}))})),v=function(e){return e},b=o.a.forwardRef;void 0===b&&(b=v);b((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,f=e.activeStyle,p=e.className,m=e.exact,y=e.isActive,A=e.location,_=e.strict,w=e.style,E=e.to,S=e.innerRef,C=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","strict","style","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=A||e.location,a=h(d(E,n),n),c=a.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),k=T?Object(r.f)(n.pathname,{path:T,exact:m,strict:_}):null,x=!!(y?y(k,n):k),O=x?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(p,s):p,I=x?Object(l.a)({},w,{},f):w,M=Object(l.a)({"aria-current":x&&i||null,className:O,style:I,to:a},C);return v!==b?M.ref=t||S:M.innerRef=S,o.a.createElement(g,M)}))}))},function(e,t,n){"use strict";n.d(t,"j",(function(){return D})),n.d(t,"c",(function(){return N})),n.d(t,"h",(function(){return L})),n.d(t,"f",(function(){return R})),n.d(t,"g",(function(){return B})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return F})),n.d(t,"i",(function(){return U})),n.d(t,"b",(function(){return H}));var r,i=n(40),a=n.n(i),o=n(24),s=n.n(o),l=n(2),c=n.n(l),u=n(187),d=n.n(u),h=n(7),f=n(1),p=n(43),m=n.n(p),g=n(5);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=f.g.DEFAULT_LIST,A=f.g.PLAYING_CHAPTER_ORDER,_=f.g.MAX_PRELOAD_SBS,w=f.g.ATTACHED_SUCCESSFULLY,E=f.g.VIDEO_TYPE,S=f.g.SEARCH_PARAM,C=f.g.COMMENT_LIKE_SCOPE,T=f.g.VIDEO_PLAYBACK_RATE_DEFAULT,k=f.g.DEFAULT_LEARNING_SUBJECT,x={chapters:[],cognitiveVideo:{},highlightsBookmark:[],videoId:"",videoLength:null,ownerId:"",contextualImgVersion:1,createdDate:"",videoType:"",rawVideos:[],unitPrice:null,accessGrantType:"",userScaffId:"",ownerScaffId:"",isVideoDataLoading:!1},O={currentSearchResultIndex:0,keyword:"",searchResults:[]},I={blockSeq:0,contextualImg:"",timestamp:"",userComprehension:"",hightLightActive:{}},M={editMode:"",id:"",color:"",label:"",endTime:null,startTime:null},P={isLoadingMore:!1,isLoading:!1,videoList:[],loadingCogvidItems:[],currentPage:0,last:!1,totalElements:0,videoListRendered:[]},D={setTimeFrom:"",isPaused:!0,currentTime:0,remainingTime:0,duration:0,limitTime:null,playbackRate:T},N=(r={show:!1,videoId:"",title:"",subject:"",topic:"",author:"",course:null,description:""},c()(r,"author",""),c()(r,"ownerScaffId",""),r),L={show:!1,videoTitle:"",videoId:"",initialPrice:"",initialCurrency:"",accessGrantType:"",hasPrice:!1},R={show:!1,videoTitle:"",price:"",onPublish:function(){return null}},B={show:!1,videoId:"",title:"",saveEntireCourse:!1,onSaveToMyVideo:function(){return null}},j={show:!1,videoId:"",title:"",agent:"",entireCourse:!1,isCourseMaster:!1,packages:[],onSubmit:function(){return null}},F={show:!1,content:""},U={show:!1,data:[],listTitle:"",iconName:"",isLoading:!1},H={show:!1,isEdit:!1},z={color:"",loop:!1},V=m()({cogvidListLv:{lv0:P,lv1:P,lv2:P,isLoading:!1,currentActiveLv:"0"},selectedVideo:{idx:-1,uid:"",data:{}},myCogvidList:{},cogvidDetails:x,isLoading:!1,videoTime:D,currentSbData:I,openCreateCogvidForm:!1,createMeetingForm:H,oldOpenCreateCogvidForm:!1,withinVideoSearch:O,isVideoPlayingChapterMode:A,isVideoPlayingHighlightMode:"",isEdittingChapterText:!1,sbList:{data:[],isLoading:!1},highlightMode:z,highlightEditInfo:M,chapterHighlighting:{},videoOverlayMode:"",showVideoAttachments:{},showPreviewAttachments:{},showChapterAttachments:!1,videoAttachments:{},chapterAttachments:{},attachmentReview:{fileName:"",chapterAttachentId:""},coverImage:{},previewImage:{},miniCoverImage:"",openAddFilesToGalleryForm:!1,galleryVideoData:{},isFetchingGalleryVideo:!1,isCopyChapterStyle:!1,videoRoles:[],chapterSharingRoles:[],settings:{},isUpdatingCG:!1,shareVideoChapterModal:{show:!1,videoId:"",chapterId:"",title:"",isEditSharing:!1,isOwner:!1,videoOwnerId:"",chapterOwnerId:""},extractChaptersModal:{show:!1,videoId:"",chapters:[],title:"",subject:"",topic:"",author:""},saveToMyVideosModal:B,exportVideoModal:j,editVideoModal:N,setPriceModal:L,publishVideoModal:R,feedbackModal:F,sharedPeopleData:U,shouldReInitScScrollBar:!1,isEditingSb:!1,dailyVideoTemplate:{},levelBackgrounds:{lv0:"",lv1:"",lv2:""},showRequirePurchaseModal:!1,showVideoDescription:!1,showCopyChaptersModal:null,showProductsLayer:null,showSubscribeModal:null,showMyResourcesModal:!1,showSubscriptionForm:!1,showFinanceAccountsForm:!1,learningSubject:k});t.a=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,r=arguments.length>1?arguments[1]:void 0,i=window,o=(i.globalTypeEditting,i.playMode,function(e){for(var t=m.a.asMutable(Object(h.get)(n,"cogvidListLv",{}),{deep:!0}),r=0;r<=2;){var i;(null===(i=n.cogvidListLv["lv".concat(r)])||void 0===i?void 0:i.videoList.length)&&(t["lv".concat(r)]=e(n.cogvidListLv["lv".concat(r)])),r++}return t});try{switch(r.type){case g.e.GET_MY_COGVID_LIST_SUCCESS:return n.setIn(["myCogvidList","content"],!n.myCogvidList.content||r.isRefresh?r.data.content:n.myCogvidList.content.concat(r.data.content));case g.e.GET_COGVID_LIST:return n.merge({cogvidListLv:b(b({},n.cogvidListLv),{},{isLoading:!0,loadingCogvidItems:[],isLoadingMore:!1})},{deep:!0});case g.e.CHANGE_OWNERSHIP_SUCCESS:var l=r.data,u=l.uid,p=l.oldOwnerId;return m()(b(b({},n),{},{cogvidListLv:b(b({},n.cogvidListLv),{},c()({},"lv".concat(n.cogvidListLv.currentActiveLv),b(b({},n.cogvidListLv["lv".concat(n.cogvidListLv.currentActiveLv)]),{},{videoList:n.cogvidListLv["lv".concat(n.cogvidListLv.currentActiveLv)].videoList.map((function(e){if(e.uid===r.data.videoId){var t,n=p?null===(t=e.playlistUrl)||void 0===t?void 0:t.replace(p,u):e.playlistUrl;return b(b({},e),{},{cognitiveVideo:b(b({},e.cognitiveVideo),{},{owner:r.data.uid,author:r.data.name,avatar:r.data.avatar}),playlistUrl:n})}return e}))}))),cogvidDetails:r.data.videoId===n.cogvidDetails.videoId?b(b({},n.cogvidDetails),{},{cognitiveVideo:b(b({},n.cogvidDetails.cognitiveVideo),{},{owner:r.data.uid,author:r.data.name,avatar:r.data.avatar})}):b({},n.cogvidDetails)}));case g.e.CHANGE_PUBLIC_COGVID_VIDEO_STATUS:var v,k=r.data,N=k.videoId,L=k.lastReviewStatus,R=k.status,B=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){return e.uid===N&&(e.lastReviewStatus=L||(null==e?void 0:e.lastReviewStatus),e.cognitiveVideo=b(b({},e.cognitiveVideo),{},{status:R||e.cognitiveVideo.status})),e})),t}));return m()(b(b({},n),{},{cogvidListLv:B,cogvidDetails:b(b({},n.cogvidDetails),{},{lastReviewStatus:n.cogvidDetails.videoId===r.data.videoId?null===(v=r.data)||void 0===v?void 0:v.lastReviewStatus:n.cogvidDetails.lastReviewStatus,cognitiveVideo:b(b({},n.cogvidDetails.cognitiveVideo),{},{status:n.cogvidDetails.videoId===r.data.videoId?r.data.status:n.cogvidDetails.cognitiveVideo.status})})}));case g.e.CHANGE_PUBLIC_COGVID_VIDEO_VISBILITY_SCOPE:var j=r.data,F=j.videoId,U=j.visibilityScope,H=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){return e.uid===F&&(e.cognitiveVideo=b(b({},e.cognitiveVideo),{},{visibilityScope:U||e.cognitiveVideo.visibilityScope})),e})),t}));return m()(b(b({},n),{},{cogvidListLv:H,cogvidDetails:b(b({},n.cogvidDetails),{},{cognitiveVideo:b(b({},n.cogvidDetails.cognitiveVideo),{},{visibilityScope:n.cogvidDetails.videoId===r.data.videoId?r.data.visibilityScope:n.cogvidDetails.cognitiveVideo.visibilityScope})})}));case g.e.CHANGE_PUBLIC_COGVID_VIDEO_PUBLIC_VIEW:var W=r.data,G=W.videoId,q=W.publicView,Y=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){return e.uid===G&&(e.publicView=q),e})),t}));return m()(b(b({},n),{},{cogvidListLv:Y,cogvidDetails:b(b({},n.cogvidDetails),{},{publicView:n.cogvidDetails.videoId===r.data.videoId?r.data.publicView:n.cogvidDetails.publicView})}));case g.e.REMOVE_VIDEO_FROM_COGVID_LIST:var K=r.data.videoId,X=o((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object(h.cloneDeep)(t),r=Object(h.cloneDeep)(null==n?void 0:n.videoList),i=null===(e=Object(h.remove)(r,(function(e){return e.uid===K})))||void 0===e?void 0:e.length;if(i){var a=Object(h.get)(n,"totalElements",r.length),o=Math.max(a-i,0);n.videoList=r,n.totalElements=o}return n}));return n.merge({cogvidListLv:X},{deep:!0});case g.e.UNSHIFT_COGVID_LIST:var Q=r.data.videoData,$=m.a.asMutable(Object(h.get)(n,"cogvidListLv[".concat(y,"].videoList"),[]),{deep:!0}),J=Object(h.get)(n,"cogvidListLv[".concat(y,"].totalElements"),$.length);return $=[Q].concat(s()($)),n.merge({cogvidListLv:{lv0:{videoList:$,totalElements:J+1}}},{deep:!0});case g.e.CLONE_COGNITIVE_VIDEO_SUCCESS:var Z=r.data.videoId,ee=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){return e.uid===Z&&(e.userScaffId=!0),e})),t}));return m()(b(b({},n),{},{cogvidListLv:ee}));case g.e.RESET_ALL_COGVID_LIST:return m()(b(b({},n),{},{cogvidListLv:{lv0:P,lv1:P,lv2:P,isLoading:!0,currentActiveLv:"0"}}));case g.e.UPDATE_COGVID_LIST:var te=b(b({},n.cogvidListLv),{},{isLoading:r.isLoading,currentActiveLv:r.currentActiveLv>=0?r.currentActiveLv:n.cogvidListLv.currentActiveLv});return te["lv".concat(r.data.level||0)]=r.data,m()(b(b({},n),{},{cogvidListLv:te}));case g.e.MERGE_COGVID_LIST:var ne=r.data,re=ne.newCogvidItems,ie=void 0===re?[]:re,ae=ne.insertTop,oe=void 0!==ae&&ae,se=a()(ne,["newCogvidItems","insertTop"]),le=oe?[].concat(s()(ie),s()(n.cogvidListLv[y].videoList)):[].concat(s()(n.cogvidListLv[y].videoList),s()(ie));return m()(b(b({},n),{},{cogvidListLv:b(b({},n.cogvidListLv),{},{lv0:b(b(b({},n.cogvidListLv[y]),se),{},{insertTop:oe,videoList:le})})}));case g.e.UPDATE_COGVID_LIST_ITEM:var ce=r.data,ue=ce.videoId,de=ce.data,he=Object(h.cloneDeep)(n.cogvidDetails),fe=Object(h.cloneDeep)(n.selectedVideo.data);he.videoId===ue&&Object.assign(he,de),fe.uid===ue&&Object.assign(fe,de);var pe=o((function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Object(h.cloneDeep)(n),i=Object(h.get)(r,"videoList",[]),a=Object(h.find)(i,{uid:ue});a&&((null===(e=de.cognitiveVideo)||void 0===e?void 0:e.keywords)&&(null===(t=a.cognitiveVideo)||void 0===t||delete t.keywords),Object(h.merge)(a,de));return r}));return n.merge({cogvidListLv:pe,cogvidDetails:he},{deep:!0}).setIn(["selectedVideo","data"],fe);case g.e.UPDATE_COGVID_CHILD_VIDEOS_STATUS:var me=r.data,ge=me.courseCode,ve=me.status,be=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e),r=Object(h.get)(t,"videoList",[]);if(!r||!ge||!ve)return m()(b({},n));var i={cognitiveVideo:{status:ve}};return null!==r&&r.map((function(e){var t,n;return(null===(t=e.cognitiveVideo)||void 0===t?void 0:null===(n=t.course)||void 0===n?void 0:n.code)===ge?Object(h.merge)(e,i):e})),t}));return m()(b(b({},n),{},{cogvidListLv:be}));case g.e.GET_COGVID_DETAILS:return m()(b(b({},n),{},{cogvidDetails:b(b({},n.cogvidDetails),{},{createdDate:r.data.videoData.createdDate,cognitiveVideo:r.data.videoData.cognitiveVideo,thumbnailUrl:r.data.videoData.thumbnailUrl,unitPrice:r.data.videoData.unitPrice,accessGrantType:r.data.videoData.accessGrantType,userScaffId:r.data.videoData.userScaffId,ownerScaffId:r.data.videoData.ownerScaffId,archived:r.data.videoData.archived,permissions:r.data.videoData.permissions,rootContext:r.data.videoData.rootContext}),withinVideoSearch:O,isVideoPlayingChapterMode:A,isVideoPlayingHighlightMode:"",highlightEditInfo:M,currentSbData:I,videoTime:b(b({},n.videoTime),{},{playbackRate:T,isPaused:!0}),isCopyChapterStyle:!1}));case g.e.SHOW_VIDEO_OVERLAY:return m()(b(b({},n),{},{videoOverlayMode:r.overlayMode}));case g.e.HIGHLIGHTS_GET_SUCCESS:var ye=r.data.map((function(e){var t=b({},e);return t.startTime=2e3*t.startBlockSeq,t.endTime=2e3*(t.endBlockSeq+1),t})),Ae=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){return e.uid===r.videoId?(e.highlights=r.data,e):e})),t}));return m()(b(b({},n),{},{cogvidDetails:b(b({},n.cogvidDetails),{},{highlightsBookmark:ye}),cogvidListLv:Ae}));case g.e.HIGHLIGHTS_SET:return m()(b(b({},n),{},{highlightEditInfo:r.data?b(b({},n.highlightEditInfo),r.data):M}));case g.e.UPDATE_SB_CONTENT:var _e=r.data,we=_e.content,Ee=_e.index,Se=m.a.asMutable(n.sbList,{deep:!0});return Object(h.isEmpty)(Se.data[Ee])||(Se.data[Ee].semanticText=we),n.merge({isLoading:!0,sbList:Se});case g.e.UPDATE_MULTIPLE_SB_CONTENT_SUCCESS:var Ce=r.data,Te=Ce.videoId,ke=Ce.sbList,xe=m.a.asMutable(Object(h.get)(n,"sbList.data",[]),{deep:!0}),Oe=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e),n=Object(h.find)(Object(h.get)(t,"videoList",[]),{uid:Te});return ke.map((function(e){var t=e.blockSeq,r=e.semanticText,i=e.semanticNote,a=xe[t];Object(h.isEmpty)(a)||(a.semanticText=r,a.semanticNote=i),t<=_&&n&&(Object(h.set)(n,"semantics[".concat(t,"].semanticText"),r),Object(h.set)(n,"semantics[".concat(t,"].semanticNote"),i))})),t}));return n.merge({cogvidListLv:Oe},{deep:!0});case g.e.UPDATE_SB_CONTENT_SUCCESS:var Ie=m.a.asMutable(n.cogvidList,{deep:!0}),Me=Ie.videoList,Pe=void 0===Me?[]:Me,De=r.data,Ne=De.content,Le=De.videoId,Re=De.timestamp;return Re<=2e3*_&&Pe.some((function(e){if(e.uid===Le){var t=e.semantics;return(void 0===t?[]:t).some((function(e){if(e.startTime===Re)return e.semanticText=Ne,!0})),!0}})),n.merge({isLoading:!1,cogvidList:{videoList:Pe}},{deep:!0});case g.e.REORDER_CHAPTER_SUCCESS:var Be=r.data.videoId,je=m.a.asMutable(Object(h.get)(n,"cogvidDetails.chapters",[]),{deep:!0}),Fe=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e),n=Object(h.cloneDeep)(null==t?void 0:t.videoList);return n.some((function(e){if(e.uid===Be)return e.chapters=je,!0})),t.videoList=n,t}));return n.merge({cogvidListLv:Fe},{deep:!0});case g.e.UPDATE_LOCAL_CHAPTER_ITEM:var Ue=r.data,He=Ue.videoId,ze=Ue.chapterId,Ve=Ue.data,We=m.a.asMutable(n.cogvidDetails.chapters);We=We.map((function(e){return e.uid===ze&&(e=b(b({},e),Ve)),e}));var Ge=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){var t=b({},e);if(e.uid===He){var n=e.chapters,r=void 0===n?[]:n;r=r.map((function(e){return e.uid===ze&&(e=b(b({},e),Ve)),e})),t.chapters=r}return t})),t}));return n.merge({cogvidDetails:{chapters:We},cogvidListLv:Ge},{deep:!0});case g.e.SET_PRIVACY_CHAPTER_SUCCESS:var qe=n.cogvidDetails.chapters.map((function(e){return e.uid===r.data.uid?b({},r.data):e})),Ye=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){return e.uid===r.videoId&&(e.chapters=qe),e})),t}));return m()(b(b({},n),{},{cogvidListLv:Ye,cogvidDetails:b(b({},n.cogvidDetails),{},{chapters:qe})}));case g.e.UPDATE_CHAPTER_ITEM_SUCCESS:var Ke=m.a.asMutable(n.cogvidDetails.chapters);return Ke.map((function(e){return e.uid===r.data.uid&&(e.content=r.data.content,e.startTime=r.data.startTime,e.endTime=r.data.endTime),e})),n.setIn(["cogvidDetails","chapters"],Ke);case g.e.UPDATE_SB_CONTENT_FAILURE:return n.set("isLoading",!1);case g.e.DISPLAY_COVER_IMAGE:return n.set("coverImage",r.data);case g.e.DISPLAY_PREVIEW_IMAGE:return n.set("previewImage",r.data);case g.e.DISPLAY_MINI_COVER_IMAGE:return n.set("miniCoverImage",r.data||"");case g.e.GET_CG_SUCCESS:var Xe=r.dummyDailyVideoId,Qe=r.videoId,$e=r.data,Je=n.chapterHighlighting||{},Ze=Qe===n.cogvidDetails.videoId,et=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){return Ze?(e.uid===Qe&&(e.chapters=$e),Xe&&e.uid===Xe&&(e.uid=videoIdl,e.isDummyDailyVideo=falsel,e.chapters=datal)):e.uid===Qe&&(e.chapters=$e),e})),t}));if($e&&Boolean($e.length)&&!Object(h.isEmpty)(n.chapterHighlighting)&&Ze){var tt,nt=(null==n?void 0:null===(tt=n.cogvidDetails)||void 0===tt?void 0:tt.chapters)||[];if($e.length-(null==nt?void 0:nt.length)==1){var rt=$e.filter((function(e){var t=e.uid;return!nt.some((function(e){return e.uid===t}))}))[0];Je=rt||{}}else $e.some((function(e){return e.uid===n.chapterHighlighting.uid&&(Je=e,!0)}))}return Ze?m()(b(b({},n),{},{cogvidListLv:et,cogvidDetails:b(b({},n.cogvidDetails),{},{chapters:s()($e)}),chapterHighlighting:Je})):m()(b(b({},n),{},{cogvidListLv:et}));case g.e.REORDER_CHAPTER_ON_UI:var it=m.a.asMutable(n.cogvidDetails.chapters,{deep:!0}),at=r.data,ot=at.dragIndex,st=at.hoverIndex,lt=it[ot],ct=d()(it,{$splice:[[ot,1],[st,0,lt]]});return ct[ot]=b(b({},ct[ot]),{},{seqNumber:ot}),ct[st]=b(b({},ct[st]),{},{seqNumber:st}),n.setIn(["cogvidDetails","chapters"],ct);case g.e.RESET_COGVID_DETAILS:return m()(b(b({},n),{},{cogvidDetails:x,withinVideoSearch:O,chapterHighlighting:{},isVideoPlayingChapterMode:A,isVideoPlayingHighlightMode:"",highlightEditInfo:M,highlightMode:z,videoTime:b(b({},n.videoTime),{},{playbackRate:T,isPaused:!0})}));case g.e.UPDATE_CURRENT_SB_DATA:return n.merge({currentSbData:b({},r.data)});case g.e.TOGGLE_CREATE_COGVID_FORM:return n.set("openCreateCogvidForm",r.open);case g.e.UPDATE_CREATE_MEETING_MODAL:return n.merge({createMeetingForm:r.data});case g.e.TOGGLE_ADD_FILES_TO_GALLERY_FORM:return n.set("openAddFilesToGalleryForm",r.open);case g.e.OLD_TOGGLE_CREATE_COGVID_FORM:return n.set("oldOpenCreateCogvidForm",r.open);case g.e.UPDATE_SB:return n.merge({sbList:r.data},{deep:!0});case g.e.SEARCH_WITHIN_VIDEO_SUCCESS:return n.merge({withinVideoSearch:b(b({},r.data),{},{currentSearchResultIndex:0})});case g.e.UPDATE_WITHIN_VIDEO_SEARCH:return n.merge({withinVideoSearch:r.data},{deep:!0});case g.e.RESET_WITHIN_VIDEO_SEARCH:return n.set("withinVideoSearch",O);case g.e.SET_ACTIVE_CHAPTER:return f.c.changeURLWithoutSideEffect([[S.KEY.CHAPTER_ID,null===(e=r.data)||void 0===e?void 0:e.uid]]),n.set("chapterHighlighting",b({},r.data));case g.e.RESET_VIDEO_TIME:return n.set("videoTime",D);case g.e.LIMIT_VIDEO_TIME:return n.setIn(["videoTime","limitTime"],r.data);case g.e.UPDATE_VIDEO_PLAY_BACK_RATE:return n.setIn(["videoTime","playbackRate"],r.data);case g.e.UPDATE_VIDEO_TIME:n.chapterHighlighting;var ut=n.videoTime,dt=(ut=void 0===ut?{}:ut).limitTime,ht=isNaN(r.data.currentTime)?1e3*n.videoTime.currentTime:1e3*r.data.currentTime;return dt&&(ht<dt.from&&(ht=dt.from,f.r.pause(),Object(h.invoke)(window,"player.currentTime",ht/1e3)),ht>dt.to&&(ht=dt.to,f.r.pause(),Object(h.invoke)(window,"player.currentTime",ht/1e3))),n.merge({videoTime:b(b({},r.data),{},{currentTime:ht/1e3})},{deep:!0});case g.e.UPDATE_HIGHLIGHT_MODE:return Object(h.isEmpty)(r.data)?n.set("highlightMode",{}):n.merge({highlightMode:r.data},{deep:!0});case g.e.TOGGLE_CHAPTER_TEXT_EDITTING_MODE:return n.set("isEdittingChapterText",r.data);case g.e.GET_AUTHOR_PROFILE_SUCCESS:return n.merge({authorInfo:b({},r.data)},{deep:!0});case g.e.RESET_AUTHOR_INFO:return n.set("authorInfo",{});case g.e.COMPREHENSION_GUIDE_UPDATING:return n.set("isUpdatingCG",r.data);case g.e.UPDATE_COGVID_DETAILS:return n.merge({cogvidDetails:r.data},{deep:!0});case g.e.RESET_VIDEO_LIST:return n.setIn(["cogvidList","videoList"],[]);case g.e.EDIT_COGVID_INFO_SUCCESS:var ft=r.data,pt=ft.videoId,mt=ft.changeVideoIdTo,gt=ft.outerProps,vt=a()(ft,["videoId","changeVideoIdTo","outerProps"]),bt=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.some((function(e,t){if(e.uid===pt)return b(b(b({},e),gt),{},{cognitiveVideo:b(b(b({},e.cognitiveVideo),vt),{},{uid:mt})})})),t}));return m()(b(b({},n),{},{cogvidListLv:bt}));case g.e.TOGGLE_DISPLAY_CHAPTER_ATTACHMENTS:return n.set("showChapterAttachments",r.data);case g.e.ADD_VIDEO_ATTACHMENTS:var yt=r.data,At=yt.videoId,_t=yt.files,wt=m.a.asMutable(n.videoAttachments,{deep:!0}),Et=Object(h.get)(wt,At,[]);return n.merge({videoAttachments:c()({},At,[].concat(s()(_t),s()(Et)))},{deep:!0});case g.e.REPLACE_VIDEO_ATTACHMENTS:var St=r.data,Ct=St.videoId,Tt=St.attachments;return n.merge({videoAttachments:c()({},Ct,s()(Tt))},{deep:!0});case g.e.GET_VIDEO_ATTACHMENTS_SUCCESS:var kt=r.data,xt=kt.files,Ot=kt.videoId,It=m.a.asMutable(n.videoAttachments,{deep:!0}),Mt=Object(h.get)(It,Ot,[]),Pt=[];return Mt.forEach((function(e){var t=e.uploadingProgressData,n=(t=void 0===t?{}:t).fileId,r=t.status,i=xt.find((function(t){var r=t.contentId;return r===n||r===e.contentId}));(i||!!r&&r!==w)&&Pt.push(b(b(b({},e),i),{},{videoId:Ot}))})),xt.forEach((function(e){var t=e.contentId;!Pt.find((function(e){var n=e.contentId,r=e.uploadingProgressData,i=(r=void 0===r?{}:r).fileId;return t===n||t===i}))&&Pt.push(b(b({},e),{},{videoId:Ot}))})),It[Ot]=[].concat(Pt),n.set("videoAttachments",b({},It));case g.e.DELETE_VIDEO_ATTACHMENT_IN_CACHE:var Dt=r.data,Nt=Dt.deleteFileId,Lt=Dt.videoId,Rt=m.a.asMutable(n.videoAttachments,{deep:!0}),Bt=Object(h.cloneDeep)(Object(h.get)(Rt,Lt,[]));return Object(h.remove)(Bt,(function(e){var t=e.id,n=e.contentId,r=e.uploadingProgressData,i=(r=void 0===r?{}:r).fileId;return t===Nt||n===Nt||(void 0===i?"":i)===Nt})),n.merge({videoAttachments:c()({},Lt,Bt)},{deep:!0});case g.e.UPDATE_VIDEO_ATTACHMENT_IN_CACHE:var jt=r.data,Ft=jt.videoId,Ut=jt.contentId,Ht=void 0===Ut?"":Ut,zt=jt.fileId,Vt=void 0===zt?"":zt,Wt=jt.id,Gt=void 0===Wt?"":Wt,qt=jt.data,Yt=m.a.asMutable(n.videoAttachments,{deep:!0}),Kt=Object(h.cloneDeep)(Object(h.get)(Yt,Ft,[])),Xt=Kt.find((function(e){return e.contentId===Ht||e.id===Gt||Object(h.get)(e,"uploadingProgressData.fileId")===Vt}));return Xt&&Object.assign(Xt,qt),n.merge({videoAttachments:c()({},Ft,s()(Kt))},{deep:!0});case g.e.GET_VIDEO_CHAPTERS_ATTACHMENTS_SUCCESS:var Qt=r.data,$t=Qt.files,Jt=Qt.videoId,Zt=m.a.asMutable(n.chapterAttachments,{deep:!0}),en=Object(h.get)(Zt,Jt,{});return Object.keys(en).forEach((function(e){var t=en[e],n=[];t.forEach((function(t){var r=t.uploadingProgressData,i=(r=void 0===r?{}:r).fileId,a=r.status,o=$t.find((function(t){return t.uid===e})),s=Object(h.get)(o,"attachments",[]).find((function(e){var n=e.contentId;return n===i||n===t.contentId}));(s||!!a&&a!==w)&&n.push(b(b(b({},t),s),{},{videoId:Jt,chapterId:e,chapterName:null==o?void 0:o.content}))})),en[e]=[].concat(n)})),$t.forEach((function(e){var t=e.uid,n=e.attachments,r=e.content,i=en[t]||[];n.forEach((function(e){var n=e.contentId;i.find((function(e){var t=e.contentId,r=e.uploadingProgressData,i=(r=void 0===r?{}:r).fileId;return n===t||n===i}))||(i=[].concat(s()(i),[b(b({},e),{},{videoId:Jt,chapterId:t,chapterName:r})]))})),en[t]=s()(i)})),Zt[Jt]=en,n.set("chapterAttachments",b({},Zt));case g.e.DELETE_CHAPTER_ATTACHMENT_IN_CACHE:var tn=r.data,nn=tn.deleteFileId,rn=tn.videoId,an=tn.chapterId,on=m.a.asMutable(n.chapterAttachments,{deep:!0}),sn=on[rn],ln=s()(sn[an]);return Object(h.remove)(ln,(function(e){var t=e.id,n=e.contentId,r=e.uploadingProgressData,i=(r=void 0===r?{}:r).fileId;return n===nn||(void 0===i?"":i)===nn||t===nn})),n.merge({chapterAttachments:c()({},rn,c()({},an,ln))},{deep:!0});case g.e.UPDATE_CHAPTER_ATTACHMENT_IN_CACHE:var cn=r.data,un=cn.videoId,dn=cn.chapterId,hn=cn.contentId,fn=void 0===hn?"":hn,pn=cn.id,mn=void 0===pn?"":pn,gn=cn.fileId,vn=void 0===gn?"":gn,bn=cn.data,yn=m.a.asMutable(n.chapterAttachments,{deep:!0}),An=Object(h.get)(yn,un,{}),_n=s()(Object(h.get)(An,dn,[])),wn=_n.find((function(e){return e.contentId===fn||e.id===mn||Object(h.get)(e,"uploadingProgressData.fileId")===vn}));return wn&&Object.assign(wn,bn),n.merge({chapterAttachments:c()({},un,c()({},dn,s()(_n)))},{deep:!0});case g.e.ADD_CHAPTER_ATTACHMENTS:var En=r.data,Sn=En.videoId,Cn=En.chapterId,Tn=En.files,kn=m.a.asMutable(n.chapterAttachments,{deep:!0}),xn=Object(h.get)(kn,Sn,{}),On=Object(h.get)(xn,Cn,[]);return n.merge({chapterAttachments:c()({},Sn,c()({},Cn,[].concat(s()(Tn),s()(On))))},{deep:!0});case g.e.REPLACE_VIDEO_CHAPTER_ATTACHMENTS:var In=r.data,Mn=In.videoId,Pn=In.chapterId,Dn=In.attachments;return n.merge({chapterAttachments:c()({},Mn,c()({},Pn,s()(Dn)))},{deep:!0});case g.e.UPDATE_REVIEW_ATTACHMENT:return m()(b(b({},n),{},{attachmentReview:b(b({},n.attachmentReview),r.data)}));case g.e.RESET_CHAPTER_ATTACHMENT_DATA:return m()(b(b({},n),{},{chapterAttachments:b({},n.chapterAttachments)}));case g.e.RESET_REDUCER:return V.merge({videoAttachments:b({},n.videoAttachments),chapterAttachments:b({},n.chapterAttachments),levelBackgrounds:b({},n.levelBackgrounds)},{deep:!0});case g.e.GET_GALLERY_VIDEO_SUCCESS:return n.merge({galleryVideoData:r.data,isFetchingGalleryVideo:!1});case g.e.DISPLAY_VIDEO_ATTACHMENTS:return n.set("showVideoAttachments",r.data);case g.e.DISPLAY_PREVIEW_ATTACHMENTS:return n.set("showPreviewAttachments",r.data);case g.e.UPDATE_GALLERY_VIDEO_DATA:return n.merge({galleryVideoData:r.data},{deep:!0});case g.e.SET_VIDEO_COVER_IMG_SUCCESS:var Nn=r.data,Ln=Nn.videoId,Rn=Nn.coverImgUrl,Bn=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.some((function(e){if(e.uid===Ln)return e.thumbnailUrl=Rn,!0})),t}));return m()(b(b({},n),{},{cogvidListLv:Bn}));case g.e.UPDATE_CHAPTER_ITEM_IN_CACHE:var jn,Fn,Un=r.data,Hn=Un.videoId,zn=Un.chapterSeqNumber,Vn=Un.chapterId,Wn=Un.data,Gn=m.a.asMutable(n.cogvidDetails.chapters,{deep:!0}),qn=m.a.asMutable(n.chapterHighlighting,{deep:!0});(Fn=Vn?Gn.find((function(e){return e.uid===Vn})):Gn[zn])&&Object(h.merge)(Fn,Wn),qn.uid&&(null===(jn=Fn)||void 0===jn?void 0:jn.uid)===qn.uid&&Object(h.merge)(qn,Wn);var Yn=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e),n=m.a.asMutable(t.videoList,{deep:!0})||[],r=Object(h.find)(n,{uid:Hn});if(r){var i=Object(h.find)(r.chapters||[],{uid:Vn});i&&Object(h.merge)(i,Wn)}return t}));return n.merge({cogvidListLv:Yn,cogvidDetails:{chapters:Gn},chapterHighlighting:qn},{deep:!0});case g.e.UPDATE_CHAPTER_ITEMS_IN_CACHE:var Kn=r.data,Xn=Kn.videoId,Qn=Kn.chapterIds,$n=Kn.data,Jn=m.a.asMutable(n.cogvidDetails.chapters,{deep:!0}),Zn=m.a.asMutable(n.chapterHighlighting,{deep:!0});Qn.map((function(e){var t=Jn.find((function(t){return t.uid===e}));t&&Object(h.merge)(t,$n)})),Qn.includes(null==Zn?void 0:Zn.uid)&&Object(h.merge)(Zn,$n);var er=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e),n=m.a.asMutable(t.videoList,{deep:!0})||[],r=Object(h.find)(n,{uid:Xn});return r&&Object(h.merge)(r.chapters,Jn),t}));return n.merge({cogvidListLv:er,cogvidDetails:{chapters:Jn},chapterHighlighting:Zn},{deep:!0});case g.e.GET_VIDEO_SETTING_SUCCESS:return n.merge({settings:r.data},{deep:!0});case g.e.SET_STYLE_FOR_CHAPTER_SUCCESS:if(n.cogvidDetails.videoType===E.GALLERY){var tr=m.a.asMutable(n.cogvidDetails.chapters,{deep:!0});return tr.some((function(e){return e.uid===r.chapterId&&(e.attributes=r.data,!0)})),n.setIn(["chapterHighlighting","attributes"],r.data).setIn(["cogvidDetails","chapters"],tr)}var nr=m.a.asMutable(n.cogvidListLv["lv".concat(n.cogvidListLv.currentActiveLv)].videoList,{deep:!0}),rr=0;return nr.some((function(e,t){if(e.uid===r.videoId)return rr=t,e.chapters.some((function(e){if(e.seqNumber===r.chapterSeqNumber)return e.attributes=r.data,!0})),!0})),n.setIn(["chapterHighlighting","attributes"],r.data).merge({cogvidListLv:c()({},"lv".concat(n.cogvidListLv.currentActiveLv),{videoList:nr})},{deep:!0}).setIn(["cogvidDetails","chapters"],nr[rr].chapters);case g.e.ENABLED_COPY_CHAPTER_STYLE:return n.set("isCopyChapterStyle",!n.isCopyChapterStyle);case g.e.GET_VIDEO_ROLES_SUCCESS:return n.set("videoRoles",r.data);case g.e.GET_CHAPTER_SHARING_ROLES_SUCCESS:return n.set("chapterSharingRoles",r.data);case g.e.UPDATE_SHARE_VIDEO_CHAPTER_MODAL:return n.merge({shareVideoChapterModal:b(b({},n.shareVideoChapterModal),r.data)});case g.e.UPDATE_EXTRACT_CHAPTERS_MODAL:return n.merge({extractChaptersModal:b({},r.data)});case g.e.UPDATE_SAVE_TO_MY_VIDEO_MODAL:return n.merge({saveToMyVideosModal:b({},r.data)});case g.e.UPDATE_EXPORT_VIDEO_MODAL:return n.merge({exportVideoModal:b({},r.data)});case g.e.UPDATE_EDIT_VIDEO_MODAL:return n.merge({editVideoModal:b({},r.data)});case g.e.UPDATE_SET_PRICE_MODAL:return n.merge({setPriceModal:b({},r.data)});case g.e.UPDATE_PUBLISH_VIDEO_MODAL:return n.merge({publishVideoModal:b({},r.data)});case g.e.UPDATE_FEEDBACK_MODAL:return n.merge({feedbackModal:b({},r.data)});case g.e.UPDATE_SHARED_PEOPLE_DATA:return n.merge({sharedPeopleData:r.data},{deep:!0});case g.e.UPDATE_IS_EDITTING_SB:return n.set("isEditingSb",r.data);case g.e.CHAPTER_LIKE_COMPLETE:var ir=r.data,ar=ir.videoId,or=ir.chapterId,sr=ir.category,lr=ir.liked,cr=ir.likeCount,ur=sr===C.exploring,dr=m.a.asMutable(n.cogvidListLv["lv".concat(n.cogvidListLv.currentActiveLv)].videoList,{deep:!0}),hr=Object(h.find)(dr,{uid:ar}),fr=(null==hr?void 0:hr.chapters)||[],pr=fr.map((function(e){return e.uid===or?b(b({},e),{},{likeCount:ur?0:cr,publicLikeCount:ur?cr:0,liked:lr}):e})),mr=o((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(h.cloneDeep)(e);return t.videoList.map((function(e){return e.uid===ar&&(e.chapters=pr),e})),t}));return m()(b(b({},n),{},{cogvidListLv:mr,cogvidDetails:b(b({},n.cogvidDetails),{},{chapters:n.cogvidDetails.videoId===r.data.videoId?pr:n.cogvidDetails.chapters})}));case g.e.UPDATE_STATE:return n.merge(r.data);case g.e.GET_LEVEL_BACKGROUNDS_SUCCESS:var gr=r.data||"",vr=gr.split(";");return n.set("levelBackgrounds",{lv0:vr[0],lv1:vr[1],lv2:vr[2]});case g.e.DISPLAY_REQUIRE_PURCHASE_MODAL:return n.set("showRequirePurchaseModal",r.data);case g.e.DISPLAY_VIDEO_DESCRIPTION:return n.set("showVideoDescription",r.data);case g.e.DISPLAY_COPY_CHAPTERS_MODAL:return n.set("showCopyChaptersModal",r.data);case g.e.DISPLAY_CHAPTERS_SWAPPING:return n.set("showSwapChaptersModal",r.data);case g.e.DISPLAY_PRODUCTS_LAYER:return n.set("showProductsLayer",r.data);case g.e.DISPLAY_MY_RESOURCES_MODAL:return n.set("showMyResourcesModal",r.data);case g.m.SHOW_SUBSCRIPTION_FORM:return n.set("showSubscriptionForm",r.data);case g.m.SHOW_FINANCE_ACCOUNT_FORM:return n.set("showFinanceAccountsForm",r.data);case g.m.SHOW_SUBSCRIBED_COURSES_FORM:return n.set("showSubscribedCoursesForm",r.data);case g.e.SET_LEARNING_SUBJECT:return n.set("learningSubject",r.data);case g.e.DISPLAY_SUBSCRIBE_MODAL:return n.set("showSubscribeModal",r.data);case g.e.UPDATE_SELECTED_VIDEO:return n.merge({selectedVideo:r.data},{deep:!0}).setIn(["selectedVideo","data"],(null===(t=r.data)||void 0===t?void 0:t.data)||n.selectedVideo.data);default:return n}}catch(e){console.debug("error: ",e)}}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",dummySbsWrapper:"dummySbsWrapper--kwlNI",toolbar:"toolbar--27_vJ",navbar:"navbar--2510b",hasNavbar:"hasNavbar--5WFDg",invisible:"invisible--2Rt6R",navbarItem:"navbarItem--2LBWQ",isActive:"isActive--1vYYY",noteCountBadge:"noteCountBadge--GW9vu",fontSizeBtn:"fontSizeBtn--3kpj-",hideSbContent:"hideSbContent--ruUzQ",horizontalIndicator:"horizontalIndicator--3QHw9",verticalIndicatorWrapper:"verticalIndicatorWrapper--1KbFR",verticalIndicator:"verticalIndicator--3IUls",fakeScrollContainer:"fakeScrollContainer--1XwqA",highlightElement:"highlightElement--18duU",highlightOutOfRawVideo:"highlightOutOfRawVideo--3H1SV",highlightActiveChapter:"highlightActiveChapter--2473a",highlightChapter:"highlightChapter--2n3wm",virtualTextarea:"virtualTextarea--2WXBe",scrollWrapper:"scrollWrapper--2cQAc",noToolbar:"noToolbar--rZFYG",toggleSearch:"toggleSearch--1Ucug",showInput:"showInput--2GysE",sgUsageTip:"sgUsageTip--1F7Z_",centerArrow:"centerArrow--3_Vf3",keywordsLayer:"keywordsLayer--155Zp",virtualBookmark:"virtualBookmark--B4XBu",audioVideoWrapper:"audioVideoWrapper--zaCAs",dummySpaceTop:"dummySpaceTop--2yd73",dummySpaceBottom:"dummySpaceBottom--3H4zi"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",progressPanel:"progressPanel--3M1a-",arrow:"arrow--3G0Zl",progressPanelContent:"progressPanelContent--3rW3o",progressPanelHeader:"progressPanelHeader--19Ymw",progressItemList:"progressItemList--15bUl",progressItem:"progressItem--2SSXU",fileColumn:"fileColumn--1a_hl",dateColumn:"dateColumn--3ZpgG",sizeColumn:"sizeColumn--2TGNw",statusColumn:"statusColumn--mspnq",modalDialog:"modalDialog--1nnND",progressRingWrap:"progressRingWrap--8NLBD",progressRing:"progressRing--19bNq",progressRingCircle:"progressRingCircle--3rluR",progressRingChildren:"progressRingChildren--1OYXr",createdDate:"createdDate--CbuGL"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",fullscreenButton:"fullscreenButton--1GnR2",topBar:"topBar--3pRVG",shadow:"shadow--1SvUs",fuviAppContainer:"fuviAppContainer--3Fnyr",fuviAppWrap:"fuviAppWrap--2ABS2",topbarScrollWrap:"topbarScrollWrap--1AQnH",logoWrapper:"logoWrapper--3Nkl1",headerToolNav:"headerToolNav--2xdtP",headerToolNavLeft:"headerToolNavLeft--pGkaP",headerToolNavRight:"headerToolNavRight--35ckW",rightBar:"rightBar--30Z2H",rightBarContent:"rightBarContent--1pZKk",leftBar:"leftBar--1gDLo",noPaddingBottom:"noPaddingBottom--MFQAP",toolbar:"toolbar--U3QyK",footer:"footer--3jV4n",centerApp:"centerApp--1N-m9",isFullscreenMode:"isFullscreenMode--3F_of",leftBarContent:"leftBarContent--3DyEs",videoContent:"videoContent--1KqYZ",caWrapper:"caWrapper--2sSc9",caWrapperActive:"caWrapperActive--zJtbZ",contentWrapper:"contentWrapper--23aXt",productsLayerWrapper:"productsLayerWrapper--2gdXp",fakeComprehensionGuides:"fakeComprehensionGuides--pOFNj",addDropDownWrap:"addDropDownWrap--3To44",addBtn:"addBtn--1056W",dropDownMenu:"dropDownMenu--1fh9T",dropDownItem:"dropDownItem--3fr36",ccvButton:"ccvButton--1XmkU",cgvButton:"cgvButton--1mJpH",topHeader:"topHeader--1A246",hide:"hide--3cXDx",circleWrapper:"circleWrapper--2RZaL",emptyGalleryTitle:"emptyGalleryTitle--182vd",instructionText:"instructionText--cLH0s",clickHereBtn:"clickHereBtn--3qAkc",coverImage:"coverImage--3Ioap",miniCoverImage:"miniCoverImage--3uBE5",tbToggle:"tbToggle--1cTjj",tbClose:"tbClose--1VyZI",userActionsWrapper:"userActionsWrapper--3PeSG",policyLink:"policyLink--2hHrU"}},function(e,t,n){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var r=n(1093),i=n(1094),a=n(1095);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|f(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&a(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|f(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|f(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return x(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;a<s;a++)if(c(e,a)===c(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){for(var d=!0,h=0;h<l;h++)if(c(e,a+h)!==c(t,h)){d=!1;break}if(d)return a}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function A(e,t,n,r){return z(U(t,e.length-n),e,n,r)}function _(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return z(H(t),e,n,r)}function S(e,t,n,r){return z(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):m.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n),d=0;d<s;++d)if(c[d]!==u[d]){a=c[d],o=u[d];break}return a<o?-1:o<a?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return A(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=F(e[a]);return i}function I(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function L(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,a){return a||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=l.isBuffer(e)?e:U(new l(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(68))},function(e,t,n){"use strict";var r=n(416),i="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||i||Function("return this")();t.a=a},function(e,t,n){"use strict";var r=n(1227),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,o,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(o=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=i[t.format]||i.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),c&&document.body.removeChild(c),o()}return u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a}));var r=Math.max,i=Math.min,a=Math.round},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(68))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",modalBody:"modalBody--3QtJa",footerBtn:"footerBtn--3sMCb",infoIcon:"infoIcon--fEeFa",reviewInfoWrapper:"reviewInfoWrapper--1vCHg",stepHeader:"stepHeader--58M0P",refreshBtn:"refreshBtn---ANZz",chaptersWrap:"chaptersWrap--2mcoT",rawVideoItem:"rawVideoItem--1avKC",chapterItem:"chapterItem--31b7L",isSelected:"isSelected--2Z68b",emptyImageContainer:"emptyImageContainer--2oXqD",circleBg:"circleBg--F3BEA",folderIcon:"folderIcon--1nwLB",dndTextWrapper:"dndTextWrapper--2SmY_",dndSecondLine:"dndSecondLine--KIfEr"}},function(e,t,n){"use strict";function r(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n.n(r).a.createContext({controlId:void 0});t.a=i},function(e,t,n){"use strict";e.exports=function(e){return e<-2}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var a=t.isAbsolute(e),o="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l<o;l++)if(i[l]!==a[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push("..");return(c=c.concat(a.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(96))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",sidebar:"sidebar--AoaxJ",sidebarActive:"sidebarActive--bQoMO",sidebarWrapper:"sidebarWrapper--MdzOd",sidebarHeader:"sidebarHeader--37mB2",hideSidebarBtn:"hideSidebarBtn--QElUM",commentCountBadge:"commentCountBadge--3PbjH",headerToolbar:"headerToolbar--3XDuU",sidebarContent:"sidebarContent--2Hnsx",chapterAttachments:"chapterAttachments--2y4s5",emptyIconWrapper:"emptyIconWrapper--349XI",sidebarFooter:"sidebarFooter--1VYFY",textarea:"textarea--3dC_0",submitBtn:"submitBtn--3g4Uc",commentItem:"commentItem--zajSx",avatar:"avatar---TJXw",dropdown:"dropdown--1ICF2",dropdownToggle:"dropdownToggle--nREdX",dropdownItem:"dropdownItem--1CGyQ"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",sidebar:"sidebar--3Twb6",sidebarActive:"sidebarActive--1rhVr",sidebarWrapper:"sidebarWrapper--16pE-",sidebarHeader:"sidebarHeader--36--2",hideSidebarBtn:"hideSidebarBtn--1erFj",noteCountBadge:"noteCountBadge--1MV8S",headerToolbar:"headerToolbar--1BNkj",sidebarContent:"sidebarContent--3xDZx",chapterAttachments:"chapterAttachments--2wtLH",emptyIconWrapper:"emptyIconWrapper--eszPK",sidebarFooter:"sidebarFooter--19W2T",textarea:"textarea--3jRr9",submitBtn:"submitBtn--22Q6O",noteItem:"noteItem--2hoBF",avatar:"avatar--roGtQ",dropdown:"dropdown--2NALS",dropdownToggle:"dropdownToggle--2JNXy",dropdownItem:"dropdownItem--258ra"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",financeAccountsModalForm:"financeAccountsModalForm--38C4c",modalBody:"modalBody--SNZrl",sectionTitle:"sectionTitle--1XCe-",headerRow:"headerRow--16y3t",paymentHeaderColumn:"paymentHeaderColumn--1A_lC",dataRow:"dataRow--1R25p",payoutModalForm:"payoutModalForm--1U3pZ",subtext:"subtext--zQTMs",actionCol:"actionCol--2OnwE"}},function(e,t,n){
/**
 * @license
 * Video.js 6.13.0 <http://videojs.com/>
 * Copyright Brightcove, Inc. <https://www.brightcove.com/>
 * Available under Apache License Version 2.0
 * <https://github.com/videojs/video.js/blob/master/LICENSE>
 *
 * Includes vtt.js <https://github.com/mozilla/vtt.js>
 * Available under Apache License Version 2.0
 * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
 */
function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i,a=r(n(117)),o=r(n(262)),s=r(n(743)),l=r(n(383)),c=r(n(1153)),u=r(n(1154)),d=a.navigator&&a.navigator.userAgent||"",h=/AppleWebKit\/([\d.]+)/i.exec(d),f=h?parseFloat(h.pop()):null,p=/iPad/i.test(d),m=/iPhone/i.test(d)&&!p,g=/iPod/i.test(d),v=m||p||g,b=(i=d.match(/OS (\d+)_/i))&&i[1]?i[1]:null,y=/Android/i.test(d),A=function(){var e=d.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),_=y&&/webkit/i.test(d)&&A<2.3,w=y&&A<5&&f<537,E=/Firefox/i.test(d),S=/Edge/i.test(d),C=!S&&(/Chrome/i.test(d)||/CriOS/i.test(d)),T=function(){var e=d.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),k=/MSIE\s8\.0/.test(d),x=function(){var e=/MSIE\s(\d+)\.\d/.exec(d),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(d)&&/rv:11.0/.test(d)&&(t=11),t}(),O=/Safari/i.test(d)&&!C&&!y&&!S,I=(O||v)&&!C,M=J()&&("ontouchstart"in a||a.navigator.maxTouchPoints||a.DocumentTouch&&a.document instanceof a.DocumentTouch),P=J()&&"backgroundSize"in a.document.createElement("video").style,D=(Object.freeze||Object)({IS_IPAD:p,IS_IPHONE:m,IS_IPOD:g,IS_IOS:v,IOS_VERSION:b,IS_ANDROID:y,ANDROID_VERSION:A,IS_OLD_ANDROID:_,IS_NATIVE_ANDROID:w,IS_FIREFOX:E,IS_EDGE:S,IS_CHROME:C,CHROME_VERSION:T,IS_IE8:k,IE_VERSION:x,IS_SAFARI:O,IS_ANY_SAFARI:I,TOUCH_ENABLED:M,BACKGROUND_SIZE_SUPPORTED:P}),N="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},L=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},R=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},B=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},j=function(e,t){return e.raw=t,e},F=Object.prototype.toString,U=function(e){return V(e)?Object.keys(e):[]};function H(e,t){U(e).forEach((function(n){return t(e[n],n)}))}function z(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[e].concat(n)):(n.forEach((function(t){t&&H(t,(function(t,n){e[n]=t}))})),e)}function V(e){return!!e&&"object"===(void 0===e?"undefined":N(e))}function W(e){return V(e)&&"[object Object]"===F.call(e)&&e.constructor===Object}var G=[];var q=function e(t){var n="info",r=void 0,i=function e(){for(var t=e.stringify||x&&x<11,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];r("log",n,a,t)};return r=function(e,t){return function(n,r,i,o){var s=t.levels[r],l=new RegExp("^("+s+")$");if("log"!==n&&i.unshift(n.toUpperCase()+":"),i.unshift(e+":"),G&&G.push([].concat(i)),a.console){var c=a.console[n];c||"debug"!==n||(c=a.console.info||a.console.log),c&&s&&l.test(n)&&(o&&(i=i.map((function(e){if(V(e)||Array.isArray(e))try{return JSON.stringify(e)}catch(t){return String(e)}return String(e)})).join(" ")),c.apply?c[Array.isArray(i)?"apply":"call"](a.console,i):c(i))}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},(i.history=function(){return G?[].concat(G):[]}).filter=function(e){return(G||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){G&&(G.length=0)},i.history.disable=function(){null!==G&&(G.length=0,G=null)},i.history.enable=function(){null===G&&(G=[])},i.error=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("error",n,t)},i.warn=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("warn",n,t)},i.debug=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("debug",n,t)},i}("VIDEOJS"),Y=q.createLogger;function K(e,t){if(!e||!t)return"";if("function"==typeof a.getComputedStyle){var n=a.getComputedStyle(e);return n?n[t]:""}return e.currentStyle[t]||""}var X=j(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]);function Q(e){return"string"==typeof e&&/\S/.test(e)}function $(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function J(){return o===a.document&&void 0!==o.createElement}function Z(e){return V(e)&&1===e.nodeType}function ee(){try{return a.parent!==a.self}catch(e){return!0}}function te(e){return function(t,n){if(!Q(t))return o[e](null);Q(n)&&(n=o.querySelector(n));var r=Z(n)?n:o;return r[e]&&r[e](t)}}function ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=o.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(q.warn(s(X,e,n)),i.setAttribute(e,n)):"textContent"===e?re(i,n):i[e]=n})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&we(i,r),i}function re(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function ie(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ae(e,t){return $(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function oe(e,t){return e.classList?e.classList.add(t):ae(e,t)||(e.className=(e.className+" "+t).trim()),e}function se(e,t){return e.classList?e.classList.remove(t):($(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function le(e,t,n){var r=ae(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?oe(e,t):se(e,t),e}function ce(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function ue(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var a=r[i].name,o=r[i].value;"boolean"!=typeof e[a]&&-1===n.indexOf(","+a+",")||(o=null!==o),t[a]=o}return t}function de(e,t){return e.getAttribute(t)}function he(e,t,n){e.setAttribute(t,n)}function fe(e,t){e.removeAttribute(t)}function pe(){o.body.focus(),o.onselectstart=function(){return!1}}function me(){o.onselectstart=function(){return!0}}function ge(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(K(e,"height"))),n.width||(n.width=parseFloat(K(e,"width"))),n}}function ve(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var n=o.documentElement,r=o.body,i=n.clientLeft||r.clientLeft||0,s=a.pageXOffset||r.scrollLeft,l=t.left+s-i,c=n.clientTop||r.clientTop||0,u=a.pageYOffset||r.scrollTop,d=t.top+u-c;return{left:Math.round(l),top:Math.round(d)}}function be(e,t){var n={},r=ve(e),i=e.offsetWidth,a=e.offsetHeight,o=r.top,s=r.left,l=t.pageY,c=t.pageX;return t.changedTouches&&(c=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(o-l+a)/a)),n.x=Math.max(0,Math.min(1,(c-s)/i)),n}function ye(e){return V(e)&&3===e.nodeType}function Ae(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function _e(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Z(e)||ye(e)?e:"string"==typeof e&&/\S/.test(e)?o.createTextNode(e):void 0})).filter((function(e){return e}))}function we(e,t){return _e(t).forEach((function(t){return e.appendChild(t)})),e}function Ee(e,t){return we(Ae(e),t)}function Se(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(9===x||0===e.button&&1===e.buttons))}var Ce=te("querySelector"),Te=te("querySelectorAll"),ke=(Object.freeze||Object)({isReal:J,isEl:Z,isInFrame:ee,createEl:ne,textContent:re,prependTo:ie,hasClass:ae,addClass:oe,removeClass:se,toggleClass:le,setAttributes:ce,getAttributes:ue,getAttribute:de,setAttribute:he,removeAttribute:fe,blockTextSelection:pe,unblockTextSelection:me,getBoundingClientRect:ge,findPosition:ve,getPointerPosition:be,isTextNode:ye,emptyEl:Ae,normalizeContent:_e,appendContent:we,insertContent:Ee,isSingleLeftClick:Se,$:Ce,$$:Te}),xe=1;function Oe(){return xe++}var Ie={},Me="vdata"+(new Date).getTime();function Pe(e){var t=e[Me];return t||(t=e[Me]=Oe()),Ie[t]||(Ie[t]={}),Ie[t]}function De(e){var t=e[Me];return!!t&&!!Object.getOwnPropertyNames(Ie[t]).length}function Ne(e){var t=e[Me];if(t){delete Ie[t];try{delete e[Me]}catch(t){e.removeAttribute?e.removeAttribute(Me):e[Me]=null}}}function Le(e,t){var n=Pe(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Ne(e)}function Re(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Be(e){function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||a.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||o),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var s=o.documentElement,l=o.body;e.pageX=e.clientX+(s&&s.scrollLeft||l&&l.scrollLeft||0)-(s&&s.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(s&&s.scrollTop||l&&l.scrollTop||0)-(s&&s.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var je=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){je=!0}});a.addEventListener("test",null,e),a.removeEventListener("test",null,e)}catch(e){}}();var Fe=["touchstart","touchmove"];function Ue(e,t,n){if(Array.isArray(t))return Re(Ue,e,t,n);var r=Pe(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=Oe()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=Be(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),o=0,s=a.length;o<s&&!t.isImmediatePropagationStopped();o++)try{a[o].call(e,t,n)}catch(e){q.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;je&&Fe.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function He(e,t,n){if(De(e)){var r=Pe(e);if(r.handlers){if(Array.isArray(t))return Re(He,e,t,n);var i=function(e,t){r.handlers[t]=[],Le(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var o=0;o<a.length;o++)a[o].guid===n.guid&&a.splice(o--,1);Le(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function ze(e,t,n){var r=De(e)?Pe(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Be(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)ze.call(null,i,t,n);else if(!i&&!t.defaultPrevented){var a=Pe(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function Ve(e,t,n){if(Array.isArray(t))return Re(Ve,e,t,n);var r=function r(){He(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Oe(),Ue(e,t,r)}var We=(Object.freeze||Object)({fixEvent:Be,on:Ue,off:He,trigger:ze,one:Ve}),Ge=!1,qe=void 0,Ye=function(){if(J()&&!1!==qe.options.autoSetup){var e=o.getElementsByTagName("video"),t=o.getElementsByTagName("audio"),n=o.getElementsByTagName("video-js"),r=[];if(e&&e.length>0)for(var i=0,a=e.length;i<a;i++)r.push(e[i]);if(t&&t.length>0)for(var s=0,l=t.length;s<l;s++)r.push(t[s]);if(n&&n.length>0)for(var c=0,u=n.length;c<u;c++)r.push(n[c]);if(r&&r.length>0)for(var d=0,h=r.length;d<h;d++){var f=r[d];if(!f||!f.getAttribute){Ke(1);break}void 0===f.player&&null!==f.getAttribute("data-setup")&&qe(f)}else Ge||Ke(1)}};function Ke(e,t){t&&(qe=t),a.setTimeout(Ye,e)}J()&&"complete"===o.readyState?Ge=!0:Ve(a,"load",(function(){Ge=!0}));var Xe=function(e){var t=o.createElement("style");return t.className=e,t},Qe=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},$e=function(e,t,n){t.guid||(t.guid=Oe());var r=function(){return t.apply(e,arguments)};return r.guid=n?n+"_"+t.guid:t.guid,r},Je=function(e,t){var n=Date.now();return function(){var r=Date.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},Ze=function(){};Ze.prototype.allowedEvents_={},Ze.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Ue(this,e,t),this.addEventListener=n},Ze.prototype.addEventListener=Ze.prototype.on,Ze.prototype.off=function(e,t){He(this,e,t)},Ze.prototype.removeEventListener=Ze.prototype.off,Ze.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Ve(this,e,t),this.addEventListener=n},Ze.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Be(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ze(this,e)},Ze.prototype.dispatchEvent=Ze.prototype.trigger;var et=function(e){return e instanceof Ze||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},tt=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},nt=function(e){if(!e.nodeName&&!et(e))throw new Error("Invalid target; must be a DOM node or evented object.")},rt=function(e){if(!tt(e))throw new Error("Invalid event type; must be a non-empty string or array.")},it=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},at=function(e,t){var n=t.length<3||t[0]===e||t[0]===e.eventBusEl_,r=void 0,i=void 0,a=void 0;return n?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),nt(r),rt(i),it(a),{isTargetingSelf:n,target:r,type:i,listener:a=$e(e,a)}},ot=function(e,t,n,r){nt(e),e.nodeName?We[t](e,n,r):e[t](n,r)},st={on:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=at(this,n),a=i.isTargetingSelf,o=i.target,s=i.type,l=i.listener;if(ot(o,"on",s,l),!a){var c=function(){return e.off(o,s,l)};c.guid=l.guid;var u=function(){return e.off("dispose",c)};u.guid=l.guid,ot(this,"on","dispose",c),ot(o,"on","dispose",u)}},one:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=at(this,n),a=i.isTargetingSelf,o=i.target,s=i.type,l=i.listener;if(a)ot(o,"one",s,l);else{var c=function t(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.off(o,s,t),l.apply(null,r)};c.guid=l.guid,ot(o,"one",s,c)}},off:function(e,t,n){if(!e||tt(e))He(this.eventBusEl_,e,t);else{var r=e,i=t;nt(r),rt(i),it(n),n=$e(this,n),this.off("dispose",n),r.nodeName?(He(r,i,n),He(r,"dispose",n)):et(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){return ze(this.eventBusEl_,e,t)}};function lt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=ne("span",{className:"vjs-event-bus"});return z(e,st),e.on("dispose",(function(){e.off(),a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var ct={state:{},setState:function(e){var t=this;"function"==typeof e&&(e=e());var n=void 0;return H(e,(function(e,r){t.state[r]!==e&&((n=n||{})[r]={from:t.state[r],to:e}),t.state[r]=e})),n&&et(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function ut(e,t){return z(e,ct),e.state=z({},e.state,t),"function"==typeof e.handleStateChanged&&et(e)&&e.on("statechanged",e.handleStateChanged),e}function dt(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function ht(){for(var e={},t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&H(t,(function(t,n){W(t)?(W(e[n])||(e[n]={}),e[n]=ht(e[n],t)):e[n]=t}))})),e}var ft=function(){function e(t,n,r){if(L(this,e),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=ht({},this.options_),n=this.options_=ht(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var i=t&&t.id&&t.id()||"no_player";this.id_=i+"_component_"+Oe()}this.name_=n.name||null,n.el?this.el_=n.el:!1!==n.createEl&&(this.el_=this.createEl()),!1!==n.evented&&lt(this,{eventBusKey:this.el_?"el_":null}),ut(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==n.initChildren&&this.initChildren(),this.ready(r),!1!==n.reportTouchActivity&&this.enableTouchActivity()}return e.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Ne(this.el_),this.el_=null),this.player_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return q.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=ht(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,n){return ne(e,t,n)},e.prototype.localize=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),a=i&&i[r],o=r&&r.split("-")[0],s=i&&i[o],l=n;return a&&a[e]?l=a[e]:s&&s[e]&&(l=s[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),l},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=dt(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=void 0,a=void 0;if("string"==typeof t){a=dt(t);var o=n.componentClass||a;n.name=a;var s=e.getComponent(o);if(!s)throw new Error("Component "+o+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(this.children_.splice(r,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(a=a||i.name&&dt(i.name()))&&(this.childNameIndex_[a]=i),"function"==typeof i.el&&i.el()){var l=this.contentEl().children,c=l[r]||null;this.contentEl().insertBefore(i.el(),c)}return i},e.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,n=this.options_.children;if(n){var r=this.options_,i=void 0,a=e.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!i.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r=void 0,i=void 0;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||dt(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,i=e.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var a=t.addChild(n,i);a&&(t[n]=a)}}))}},e.prototype.buildCSSClass=function(){return""},e.prototype.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},e.prototype.$=function(e,t){return Ce(e,t||this.contentEl())},e.prototype.$$=function(e,t){return Te(e,t||this.contentEl())},e.prototype.hasClass=function(e){return ae(this.el_,e)},e.prototype.addClass=function(e){oe(this.el_,e)},e.prototype.removeClass=function(e){se(this.el_,e)},e.prototype.toggleClass=function(e,t){le(this.el_,e,t)},e.prototype.show=function(){this.removeClass("vjs-hidden")},e.prototype.hide=function(){this.addClass("vjs-hidden")},e.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},e.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.prototype.getAttribute=function(e){return de(this.el_,e)},e.prototype.setAttribute=function(e,t){he(this.el_,e,t)},e.prototype.removeAttribute=function(e){fe(this.el_,e)},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.prototype.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+dt(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"==typeof a.getComputedStyle){var n=a.getComputedStyle(this.el_);t=n.getPropertyValue(e)||n[e]}if(0===(t=parseFloat(t))){var r="offset"+dt(e);t=this.el_[r]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,n=void 0;this.on("touchstart",(function(r){1===r.touches.length&&(t={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},e=(new Date).getTime(),n=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)n=!1;else if(t){var r=e.touches[0].pageX-t.pageX,i=e.touches[0].pageY-t.pageY;Math.sqrt(r*r+i*i)>10&&(n=!1)}}));var r=function(){n=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(t=null,!0===n)&&((new Date).getTime()-e<200&&(r.preventDefault(),this.trigger("tap")))}))},e.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=$e(this.player(),this.player().reportUserActivity),t=void 0;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));var n=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}},e.prototype.setTimeout=function(e,t){var n,r,i=this;return e=$e(this,e),n=a.setTimeout((function(){i.off("dispose",r),e()}),t),(r=function(){return i.clearTimeout(n)}).guid="vjs-timeout-"+n,this.on("dispose",r),n},e.prototype.clearTimeout=function(e){a.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},e.prototype.setInterval=function(e,t){var n=this;e=$e(this,e);var r=a.setInterval(e,t),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},e.prototype.clearInterval=function(e){a.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},e.prototype.requestAnimationFrame=function(e){var t,n,r=this;return this.supportsRaf_?(e=$e(this,e),t=a.requestAnimationFrame((function(){r.off("dispose",n),e()})),(n=function(){return r.cancelAnimationFrame(t)}).guid="vjs-raf-"+t,this.on("dispose",n),t):this.setTimeout(e,1e3/60)},e.prototype.cancelAnimationFrame=function(e){if(this.supportsRaf_){a.cancelAnimationFrame(e);var t=function(){};return t.guid="vjs-raf-"+e,this.off("dispose",t),e}return this.clearTimeout(e)},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r=e.getComponent("Tech"),i=r&&r.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(i||!a){var o=void 0;throw o=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+o+".")}t=dt(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var l=s.players,c=Object.keys(l);if(l&&c.length>0&&c.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,n},e.getComponent=function(t){if(t)return t=dt(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();function pt(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function mt(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:pt.bind(null,"start",0,e),end:pt.bind(null,"end",1,e)}}function gt(e,t){return Array.isArray(e)?mt(e):void 0===e||void 0===t?mt():mt([[e,t]])}function vt(e,t){var n=0,r=void 0,i=void 0;if(!t)return 0;e&&e.length||(e=gt(0,0));for(var a=0;a<e.length;a++)r=e.start(a),(i=e.end(a))>t&&(i=t),n+=i-r;return n/t}ft.prototype.supportsRaf_="function"==typeof a.requestAnimationFrame&&"function"==typeof a.cancelAnimationFrame,ft.registerComponent("Component",ft);for(var bt={},yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],At=yt[0],_t=void 0,wt=0;wt<yt.length;wt++)if(yt[wt][1]in o){_t=yt[wt];break}if(_t)for(var Et=0;Et<_t.length;Et++)bt[At[Et]]=_t[Et];function St(e){if(e instanceof St)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:V(e)&&("number"==typeof e.code&&(this.code=e.code),z(this,e)),this.message||(this.message=St.defaultMessages[this.code]||"")}St.prototype.code=0,St.prototype.message="",St.prototype.status=null,St.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],St.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Ct=0;Ct<St.errorTypes.length;Ct++)St[St.errorTypes[Ct]]=Ct,St.prototype[St.errorTypes[Ct]]=Ct;function Tt(e){return null!=e&&"function"==typeof e.then}function kt(e){Tt(e)&&e.then(null,(function(e){}))}var xt=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},Ot=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=xt(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(xt))},It=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},Mt=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=ne("div",{className:"vjs-modal-dialog-content"},{role:"document"}),i.descEl_=ne("p",{className:"vjs-modal-dialog-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),re(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},t.prototype.handleKeyPress=function(e){27===e.which&&this.closeable()&&this.close()},t.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},t.prototype.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.prototype.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",$e(this,this.handleKeyPress)),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},t.prototype.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},t.prototype.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",$e(this,this.handleKeyPress)),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},t.prototype.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},t.prototype.fill=function(){this.fillWith(this.content())},t.prototype.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),Ee(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},t.prototype.empty=function(){this.trigger("beforemodalempty"),Ae(this.contentEl()),this.trigger("modalempty")},t.prototype.content=function(e){return void 0!==e&&(this.content_=e),this.content_},t.prototype.conditionalFocus_=function(){var e=o.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus(),this.on(o,"keydown",this.handleKeyDown))},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(o,"keydown",this.handleKeyDown)},t.prototype.handleKeyDown=function(e){if(9===e.which){for(var t=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<t.length;i++)if(n===t[i]){r=i;break}o.activeElement===this.el_&&(r=0),e.shiftKey&&0===r?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||r!==t.length-1||(t[0].focus(),e.preventDefault())}},t.prototype.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof a.HTMLAnchorElement||e instanceof a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof a.HTMLInputElement||e instanceof a.HTMLSelectElement||e instanceof a.HTMLTextAreaElement||e instanceof a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof a.HTMLIFrameElement||e instanceof a.HTMLObjectElement||e instanceof a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(ft);Mt.prototype.options_={pauseOnOpen:!0,temporary:!0},ft.registerComponent("ModalDialog",Mt);var Pt=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;L(this,t);var i=B(this,e.call(this));if(!r&&(r=i,k))for(var a in r=o.createElement("custom"),t.prototype)"constructor"!==a&&(r[a]=t.prototype[a]);r.tracks_=[],Object.defineProperty(r,"length",{get:function(){return this.tracks_.length}});for(var s=0;s<n.length;s++)r.addTrack(n[s]);return B(i,r)}return R(t,e),t.prototype.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack"}))},t.prototype.removeTrack=function(e){for(var t=void 0,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack"})},t.prototype.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(Ze);for(var Dt in Pt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Pt.prototype.allowedEvents_)Pt.prototype["on"+Dt]=null;var Nt=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},Lt=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];L(this,t);for(var i=void 0,a=r.length-1;a>=0;a--)if(r[a].enabled){Nt(r,r[a]);break}if(k){for(var s in i=o.createElement("custom"),Pt.prototype)"constructor"!==s&&(i[s]=Pt.prototype[s]);for(var l in t.prototype)"constructor"!==l&&(i[l]=t.prototype[l])}return(i=n=B(this,e.call(this,r,i))).changing_=!1,B(n,i)}return R(t,e),t.prototype.addTrack=function(t){var n=this;t.enabled&&Nt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",(function(){n.changing_||(n.changing_=!0,Nt(n,t),n.changing_=!1,n.trigger("change"))}))},t}(Pt),Rt=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},Bt=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];L(this,t);for(var i=void 0,a=r.length-1;a>=0;a--)if(r[a].selected){Rt(r,r[a]);break}if(k){for(var s in i=o.createElement("custom"),Pt.prototype)"constructor"!==s&&(i[s]=Pt.prototype[s]);for(var l in t.prototype)"constructor"!==l&&(i[l]=t.prototype[l])}return(i=n=B(this,e.call(this,r,i))).changing_=!1,Object.defineProperty(i,"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),B(n,i)}return R(t,e),t.prototype.addTrack=function(t){var n=this;t.selected&&Rt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",(function(){n.changing_||(n.changing_=!0,Rt(n,t),n.changing_=!1,n.trigger("change"))}))},t}(Pt),jt=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];L(this,t);var i=void 0;if(k){for(var a in i=o.createElement("custom"),Pt.prototype)"constructor"!==a&&(i[a]=Pt.prototype[a]);for(var s in t.prototype)"constructor"!==s&&(i[s]=t.prototype[s])}return n=B(this,e.call(this,r,i)),B(n,i=n)}return R(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",$e(this,(function(){this.trigger("change")})));-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",$e(this,(function(){this.trigger("selectedlanguagechange")})))},t}(Pt),Ft=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];L(this,e);var n=this;if(k)for(var r in n=o.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,a=t.length;i<a;i++)n.addTrackElement_(t[i]);if(k)return n}return e.prototype.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},e.prototype.getTrackElementByTrack_=function(e){for(var t=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},e.prototype.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},e}(),Ut=function(){function e(t){L(this,e);var n=this;if(k)for(var r in n=o.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);if(e.prototype.setCues_.call(n,t),Object.defineProperty(n,"length",{get:function(){return this.length_}}),k)return n}return e.prototype.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},e.prototype.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),Ht={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},zt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Vt={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Wt={disabled:"disabled",hidden:"hidden",showing:"showing"},Gt=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var r=B(this,e.call(this)),i=r;if(k)for(var a in i=o.createElement("custom"),t.prototype)"constructor"!==a&&(i[a]=t.prototype[a]);var s={id:n.id||"vjs_track_"+Oe(),kind:n.kind||"",label:n.label||"",language:n.language||""},l=function(e){Object.defineProperty(i,e,{get:function(){return s[e]},set:function(){}})};for(var c in s)l(c);return B(r,i)}return R(t,e),t}(Ze),qt=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=o.createElement("a");n.href=e;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&((i=o.createElement("div")).innerHTML='<a href="'+e+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),o.body.appendChild(i));for(var s={},l=0;l<t.length;l++)s[t[l]]=n[t[l]];return"http:"===s.protocol&&(s.host=s.host.replace(/:80$/,"")),"https:"===s.protocol&&(s.host=s.host.replace(/:443$/,"")),s.protocol||(s.protocol=a.location.protocol),r&&o.body.removeChild(i),s},Yt=function(e){if(!e.match(/^https?:\/\//)){var t=o.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},Kt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},Xt=function(e){var t=a.location,n=qt(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Qt=(Object.freeze||Object)({parseUrl:qt,getAbsoluteURL:Yt,getFileExtension:Kt,isCrossOrigin:Xt}),$t=function(e,t){var n=new a.WebVTT.Parser(a,a.vttjs,a.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(a.console&&a.console.groupCollapsed&&a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return q.error(e)})),a.console&&a.console.groupEnd&&a.console.groupEnd()),n.flush()},Jt=function(e,t){var n={uri:e},r=Xt(e);r&&(n.cors=r),c(n,$e(this,(function(e,n,r){if(e)return q.error(e,n);if(t.loaded_=!0,"function"!=typeof a.WebVTT){if(t.tech_){var i=function(){return $t(r,t)};t.tech_.on("vttjsloaded",i),t.tech_.on("vttjserror",(function(){q.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",i)}))}}else $t(r,t)})))},Zt=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(L(this,t),!r.tech)throw new Error("A tech was not provided.");var i=ht(r,{kind:Vt[r.kind]||"subtitles",language:r.language||r.srclang||""}),a=Wt[i.mode]||"disabled",o=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(a="hidden");var s=n=B(this,e.call(this,i));if(s.tech_=i.tech,k)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);s.cues_=[],s.activeCues_=[];var c=new Ut(s.cues_),u=new Ut(s.activeCues_),d=!1,h=$e(s,(function(){this.activeCues=this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==a&&s.tech_.ready((function(){s.tech_.on("timeupdate",h)}),!0),Object.defineProperty(s,"default",{get:function(){return o},set:function(){}}),Object.defineProperty(s,"mode",{get:function(){return a},set:function(e){var t=this;Wt[e]&&("disabled"!==(a=e)?this.tech_.ready((function(){t.tech_.on("timeupdate",h)}),!0):this.tech_.off("timeupdate",h),this.trigger("modechange"))}}),Object.defineProperty(s,"cues",{get:function(){return this.loaded_?c:null},set:function(){}}),Object.defineProperty(s,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return u;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=e&&i.endTime>=e?t.push(i):i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e&&t.push(i)}if(d=!1,t.length!==this.activeCues_.length)d=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(d=!0);return this.activeCues_=t,u.setCues_(this.activeCues_),u},set:function(){}}),i.src?(s.src=i.src,Jt(i.src,s)):s.loaded_=!0,B(n,s)}return R(t,e),t.prototype.addCue=function(e){var t=e;if(a.vttjs&&!(e instanceof a.vttjs.VTTCue)){for(var n in t=new a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.prototype.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(Gt);Zt.prototype.allowedEvents_={cuechange:"cuechange"};var en=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var i=ht(r,{kind:zt[r.kind]||""}),a=n=B(this,e.call(this,i)),o=!1;if(k)for(var s in t.prototype)"constructor"!==s&&(a[s]=t.prototype[s]);return Object.defineProperty(a,"enabled",{get:function(){return o},set:function(e){"boolean"==typeof e&&e!==o&&(o=e,this.trigger("enabledchange"))}}),i.enabled&&(a.enabled=i.enabled),a.loaded_=!0,B(n,a)}return R(t,e),t}(Gt),tn=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var i=ht(r,{kind:Ht[r.kind]||""}),a=n=B(this,e.call(this,i)),o=!1;if(k)for(var s in t.prototype)"constructor"!==s&&(a[s]=t.prototype[s]);return Object.defineProperty(a,"selected",{get:function(){return o},set:function(e){"boolean"==typeof e&&e!==o&&(o=e,this.trigger("selectedchange"))}}),i.selected&&(a.selected=i.selected),B(n,a)}return R(t,e),t}(Gt),nn=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var r=B(this,e.call(this)),i=void 0,a=r;if(k)for(var s in a=o.createElement("custom"),t.prototype)"constructor"!==s&&(a[s]=t.prototype[s]);var l=new Zt(n);return a.kind=l.kind,a.src=l.src,a.srclang=l.language,a.label=l.label,a.default=l.default,Object.defineProperty(a,"readyState",{get:function(){return i}}),Object.defineProperty(a,"track",{get:function(){return l}}),i=0,l.addEventListener("loadeddata",(function(){i=2,a.trigger({type:"load",target:a})})),k?B(r,a):r}return R(t,e),t}(Ze);nn.prototype.allowedEvents_={load:"load"},nn.NONE=0,nn.LOADING=1,nn.LOADED=2,nn.ERROR=3;var rn={audio:{ListClass:Lt,TrackClass:en,capitalName:"Audio"},video:{ListClass:Bt,TrackClass:tn,capitalName:"Video"},text:{ListClass:jt,TrackClass:Zt,capitalName:"Text"}};Object.keys(rn).forEach((function(e){rn[e].getterName=e+"Tracks",rn[e].privateName=e+"Tracks_"}));var an={remoteText:{ListClass:jt,TrackClass:Zt,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ft,TrackClass:nn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},on=ht(rn,an);an.names=Object.keys(an),rn.names=Object.keys(rn),on.names=[].concat(an.names).concat(rn.names);var sn=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};L(this,t),n.reportTouchActivity=!1;var i=B(this,e.call(this,null,n,r));return i.hasStarted_=!1,i.on("playing",(function(){this.hasStarted_=!0})),i.on("loadstart",(function(){this.hasStarted_=!1})),on.names.forEach((function(e){var t=on[e];n&&n[t.getterName]&&(i[t.privateName]=n[t.getterName])})),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===n["native"+e+"Tracks"]&&(i["featuresNative"+e+"Tracks"]=!1)})),!1===n.nativeCaptions||!1===n.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new on.text.ListClass,i.initTrackListeners(),n.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}return R(t,e),t.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval($e(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return gt(0,0)},t.prototype.bufferedPercent=function(){return vt(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(rn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},t.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new St(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?gt(0,0):gt()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;rn.names.forEach((function(t){var n=rn[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!a.WebVTT)if(o.body.contains(this.el())){if(!this.options_["vtt.js"]&&W(u)&&Object.keys(u).length>0)return void this.trigger("vttjsloaded");var t=o.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},o=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};o(),t.addEventListener("change",o),t.addEventListener("addtrack",o),t.addEventListener("removetrack",o),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",o),t.removeEventListener("addtrack",o),t.removeEventListener("removetrack",o);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}}))},t.prototype.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var o=new on.text.TrackClass(i);return a.addTrack(o),o}(this,e,t,n)},t.prototype.createRemoteTextTrack=function(e){var t=ht(e,{tech:this});return new an.remoteTextEl.TrackClass(t)},t.prototype.addRemoteTextTrack=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(t);return!0!==n&&!1!==n&&(q.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready((function(){return e.autoRemoteTextTracks_.addTrack(r.track)})),r},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=dt(e),t.techs_[e]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return e=dt(e),t.techs_&&t.techs_[e]?t.techs_[e]:a&&a.videojs&&a.videojs[e]?(q.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),a.videojs[e]):void 0},t}(ft);on.names.forEach((function(e){var t=on[e];sn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),sn.prototype.featuresVolumeControl=!0,sn.prototype.featuresMuteControl=!0,sn.prototype.featuresFullscreenResize=!1,sn.prototype.featuresPlaybackRate=!1,sn.prototype.featuresProgressEvents=!1,sn.prototype.featuresSourceset=!1,sn.prototype.featuresTimeupdateEvents=!1,sn.prototype.featuresNativeTextTracks=!1,sn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n=e.sourceHandlers||[],r=void 0,i=0;i<n.length;i++)if(r=n[i].canPlayType(t))return r;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:q.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},ft.registerComponent("Tech",sn),sn.registerTech("Tech",sn),sn.defaultTechOrder_=[];var ln={},cn={},un={};function dn(e,t,n){e.setTimeout((function(){return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],i=arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=n[0],l=n.slice(1);if("string"==typeof s)e(t,ln[s],r,i,a,o);else if(s){var c=bn(i,s);if(!c.setSource)return a.push(c),e(t,l,r,i,a,o);c.setSource(z({},t),(function(n,s){if(n)return e(t,l,r,i,a,o);a.push(c),e(s,t.type===s.type?l:ln[s.type],r,i,a,o)}))}else l.length?e(t,l,r,i,a,o):o?r(t,a):e(t,ln["*"],r,i,a,!0)}(t,ln[t.type],n,e)}),1)}function hn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i="call"+dt(n),a=e.reduce(gn(i),r),o=a===un,s=o?null:t[n](a);return vn(e,n,s,o),s}var fn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},pn={setCurrentTime:1},mn={play:1,pause:1};function gn(e){return function(t,n){return t===un?un:n[e]?n[e](t):t}}function vn(e,t,n,r){for(var i=e.length-1;i>=0;i--){var a=e[i];a[t]&&a[t](r,n)}}function bn(e,t){var n=cn[e.id()],r=null;if(null==n)return r=t(e),cn[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var a=n[i],o=a[0],s=a[1];o===t&&(r=s)}return null===r&&(r=t(e),n.push([t,r])),r}var yn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},An=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=Kt(e),n=yn[t.toLowerCase()];return n||""},_n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var a=r[i];if(a.type&&a.src&&a.src===t)return a.type}return An(t)};function wn(e){var t=An(e.src);return!e.type&&t&&(e.type=t),e}var En=function(e){function t(n,r,i){L(this,t);var a=ht({createEl:!1},r),o=B(this,e.call(this,n,a,i));if(r.playerOptions.sources&&0!==r.playerOptions.sources.length)n.src(r.playerOptions.sources);else for(var s=0,l=r.playerOptions.techOrder;s<l.length;s++){var c=dt(l[s]),u=sn.getTech(c);if(c||(u=ft.getComponent(c)),u&&u.isSupported()){n.loadTech_(c);break}}return o}return R(t,e),t}(ft);ft.registerComponent("MediaLoader",En);var Sn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.emitTapEvents(),i.enable(),i}return R(t,e),t.prototype.createEl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=z({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&q.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=z({role:"button"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=ne("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,re(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){Ue(o,"keydown",$e(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){He(o,"keydown",$e(this,this.handleKeyPress))},t}(ft);ft.registerComponent("ClickableComponent",Sn);var Cn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.update(),n.on("posterchange",$e(i,i.update)),i}return R(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=ne("div",{className:"vjs-poster",tabIndex:-1});return P||(this.fallbackImg_=ne("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?kt(this.player_.play()):this.player_.pause())},t}(Sn);ft.registerComponent("PosterImage",Cn);var Tn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function kn(e,t){var n=void 0;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function xn(e,t,n){try{e.style[t]=n}catch(e){return}}var On=function(e){function t(n,r,i){L(this,t);var o=B(this,e.call(this,n,r,i)),s=$e(o,o.updateDisplay);return n.on("loadstart",$e(o,o.toggleDisplay)),n.on("texttrackchange",s),n.on("loadstart",$e(o,o.preselectTrack)),n.ready($e(o,(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",s),n.on("playerresize",s),a.addEventListener&&a.addEventListener("orientationchange",s),n.on("dispose",(function(){return a.removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}}))),o}return R(t,e),t.prototype.preselectTrack=function(){for(var e={captions:1,subtitles:1},t=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r=void 0,i=void 0,a=void 0,o=0;o<t.length;o++){var s=t[o];n&&n.enabled&&n.language===s.language?s.kind===n.kind?a=s:a||(a=s):n&&!n.enabled?(a=null,r=null,i=null):s.default&&("descriptions"!==s.kind||r?s.kind in e&&!i&&(i=s):r=s)}a?a.mode="showing":i?i.mode="showing":r&&(r.mode="showing")},t.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.prototype.clearDisplay=function(){"function"==typeof a.WebVTT&&a.WebVTT.processCues(a,[],this.el_)},t.prototype.updateDisplay=function(){var e=this.player_.textTracks();this.clearDisplay();for(var t=null,n=null,r=e.length;r--;){var i=e[r];"showing"===i.mode&&("descriptions"===i.kind?t=i:n=i)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))},t.prototype.updateForTrack=function(e){if("function"==typeof a.WebVTT&&e.activeCues){for(var t=[],n=0;n<e.activeCues.length;n++)t.push(e.activeCues[n]);if(a.WebVTT.processCues(a,t,this.el_),this.player_.textTrackSettings)for(var r=this.player_.textTrackSettings.getValues(),i=t.length;i--;){var o=t[i];if(o){var s=o.displayState;if(r.color&&(s.firstChild.style.color=r.color),r.textOpacity&&xn(s.firstChild,"color",kn(r.color||"#fff",r.textOpacity)),r.backgroundColor&&(s.firstChild.style.backgroundColor=r.backgroundColor),r.backgroundOpacity&&xn(s.firstChild,"backgroundColor",kn(r.backgroundColor||"#000",r.backgroundOpacity)),r.windowColor&&(r.windowOpacity?xn(s,"backgroundColor",kn(r.windowColor,r.windowOpacity)):s.style.backgroundColor=r.windowColor),r.edgeStyle&&("dropshadow"===r.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===r.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),r.fontPercent&&1!==r.fontPercent){var l=a.parseFloat(s.style.fontSize);s.style.fontSize=l*r.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}r.fontFamily&&"default"!==r.fontFamily&&("small-caps"===r.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Tn[r.fontFamily])}}}},t}(ft);ft.registerComponent("TextTrackDisplay",On);var In=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=ne("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(ft);ft.registerComponent("LoadingSpinner",In);var Mn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=z({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=z({type:"button"},n);var r=ft.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(r),r},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return q.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),ft.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(Sn);ft.registerComponent("Button",Mn);var Pn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)kt(t);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};Tt(t)?t.then(i,(function(){})):this.setTimeout(i,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(Mn);Pn.prototype.controlText_="Play Video",ft.registerComponent("BigPlayButton",Pn);var Dn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(Mn);ft.registerComponent("CloseButton",Dn);var Nn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"play",i.handlePlay),i.on(n,"pause",i.handlePause),i.on(n,"ended",i.handleEnded),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(Mn);Nn.prototype.controlText_="Play",ft.registerComponent("PlayToggle",Nn);var Ln=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||o>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},Rn=Ln;var Bn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return Rn(e,t)},jn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.throttledUpdateContent=Je($e(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return R(t,e),t.prototype.createEl=function(t){var n=this.buildCSSClass(),r=e.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=ne("span",{className:n+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=o.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return Bn(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(ft);jn.prototype.labelText_="Time",jn.prototype.controlText_="Time",ft.registerComponent("TimeDisplay",jn);var Fn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(jn);Fn.prototype.labelText_="Current Time",Fn.prototype.controlText_="Current Time",ft.registerComponent("CurrentTimeDisplay",Fn);var Un=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(jn);Un.prototype.labelText_="Duration",Un.prototype.controlText_="Duration",ft.registerComponent("DurationDisplay",Un);var Hn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},t}(ft);ft.registerComponent("TimeDivider",Hn);var zn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(jn);zn.prototype.labelText_="Remaining Time",zn.prototype.controlText_="Remaining Time",ft.registerComponent("RemainingTimeDisplay",zn);var Vn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}return R(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=ne("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(ft);ft.registerComponent("LiveDisplay",Vn);var Wn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return R(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=z({tabIndex:0},n),r=z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||C||e.preventDefault(),pe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;me(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=n:r.width=n,e}}},t.prototype.calculateDistance=function(e){var t=be(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(ft);ft.registerComponent("Slider",Wn);var Gn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,a=function(e,t){var n=e/t||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=a(r,n);for(var o=0;o<t.length;o++){var s=t.start(o),l=t.end(o),c=i[o];c||(c=this.el_.appendChild(ne()),i[o]=c),c.style.left=a(s,r),c.style.width=a(l-s,r)}for(var u=i.length;u>t.length;u--)this.el_.removeChild(i[u-1]);i.length=t.length},t}(ft);ft.registerComponent("LoadProgressBar",Gn);var qn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,n){var r=ge(this.el_),i=ge(this.player_.el()),a=e.width*t;if(i&&r){var o=e.left-i.left+a,s=e.width-a+(i.right-e.right),l=r.width/2;o<l?l+=l-o:s<l&&(l=s),l<0?l=0:l>r.width&&(l=r.width),this.el_.style.right="-"+l+"px",re(this.el_,n)}},t}(ft);ft.registerComponent("TimeTooltip",qn);var Yn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),i=Bn(r,n.player_.duration()),a=n.getChild("timeTooltip");a&&a.update(e,t,i)}))},t}(ft);Yn.prototype.options_={children:[]},x&&!(x>8)||v||y||Yn.prototype.options_.children.push("timeTooltip"),ft.registerComponent("PlayProgressBar",Yn);var Kn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.update=Je($e(i,i.update),25),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.duration(),i=Bn(t*r,r);n.el_.style.left=e.width*t+"px",n.getChild("timeTooltip").update(e,t,i)}))},t}(ft);Kn.prototype.options_={children:["timeTooltip"]},ft.registerComponent("MouseTimeDisplay",Kn);var Xn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.setEventHandlers_(),i}return R(t,e),t.prototype.setEventHandlers_=function(){var e=this;this.update=Je($e(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval((function(){e.requestAnimationFrame((function(){e.update()}))}),30)})),this.on(this.player_,["ended","pause","waiting"],(function(){e.clearInterval(e.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Bn(e,n),Bn(n,n)],"{1} of {2}")),this.bar.update(ge(this.el_),t)},t.prototype.update=function(t){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){Se(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(Se(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&kt(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(Wn);Xn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},x&&!(x>8)||v||y||Xn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Xn.prototype.playerEvent="timeupdate",ft.registerComponent("SeekBar",Xn);var Qn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.handleMouseMove=Je($e(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=Je($e(i,i.handleMouseSeek),25),i.enable(),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),r=t.el(),i=ge(r),a=be(r,e).x;a>1?a=1:a<0&&(a=0),n&&n.update(i,a)}},t.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(ft);Qn.prototype.options_={children:["seekBar"]},ft.registerComponent("ProgressControl",Qn);var $n=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),!1===o[bt.fullscreenEnabled]&&i.disable(),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Mn);$n.prototype.controlText_="Fullscreen",ft.registerComponent("FullscreenToggle",$n);var Jn=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},Zn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(ft);ft.registerComponent("VolumeLevel",Zn);var er=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on("slideractive",i.updateLastVolume_),i.on(n,"volumechange",i.updateARIAAttributes),n.ready((function(){return i.updateARIAAttributes()})),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){Se(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){Se(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(Wn);er.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},er.prototype.playerEvent="volumechange",ft.registerComponent("VolumeBar",er);var tr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t),r.vertical=r.vertical||!1,(void 0===r.volumeBar||W(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=B(this,e.call(this,n,r));return Jn(i,n),i.throttledHandleMouseMove=Je($e(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],(function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")})),i.on(i.volumeBar,["blur","sliderinactive"],(function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")})),i}return R(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(ft);tr.prototype.options_={children:["volumeBar"]},ft.registerComponent("VolumeControl",tr);var nr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;v&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)se(this.el_,"vjs-vol-"+n);oe(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Mn);nr.prototype.controlText_="Mute",ft.registerComponent("MuteToggle",nr);var rr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t),void 0!==r.inline?r.inline=r.inline:r.inline=!0,(void 0===r.volumeControl||W(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=B(this,e.call(this,n,r));return i.on(n,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}return R(t,e),t.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(ft);rr.prototype.options_={children:["muteToggle","volumeControl"]},ft.registerComponent("VolumePanel",rr);var ir=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return R(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",$e(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=ne(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ue(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice(),n=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);n&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(ft);ft.registerComponent("Menu",ir);var ar=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t);var i=B(this,e.call(this,n,r));i.menuButton_=new Mn(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var a=Mn.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+a,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return R(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new ir(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=ne("li",{className:"vjs-menu-title",innerHTML:dt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),ie(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},t.prototype.createItems=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.prototype.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Mn.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",$e(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){Ue(o,"keydown",$e(this,this.handleKeyPress))},t.prototype.handleBlur=function(){He(o,"keydown",$e(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),v&&ee())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(ft);ft.registerComponent("MenuButton",ar);var or=function(e){function t(n,r){L(this,t);var i=r.tracks,a=B(this,e.call(this,n,r));if(a.items.length<=1&&a.hide(),!i)return B(a);var o=$e(a,a.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),a.player_.on("ready",o),a.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o)})),a}return R(t,e),t}(ar);ft.registerComponent("TrackButton",or);var sr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.selectable=r.selectable,i.isSelected_=r.selected||!1,i.multiSelectable=r.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}return R(t,e),t.prototype.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",z({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Sn);ft.registerComponent("MenuItem",sr);var lr=function(e){function t(n,r){L(this,t);var i=r.track,s=n.textTracks();r.label=i.label||i.language||"Unknown",r.selected="showing"===i.mode;var l=B(this,e.call(this,n,r));l.track=i;var c=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];l.handleTracksChange.apply(l,t)},u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];l.handleSelectedLanguageChange.apply(l,t)};if(n.on(["loadstart","texttrackchange"],c),s.addEventListener("change",c),s.addEventListener("selectedlanguagechange",u),l.on("dispose",(function(){n.off(["loadstart","texttrackchange"],c),s.removeEventListener("change",c),s.removeEventListener("selectedlanguagechange",u)})),void 0===s.onchange){var d=void 0;l.on(["tap","click"],(function(){if("object"!==N(a.Event))try{d=new a.Event("change")}catch(e){}d||(d=o.createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(d)}))}return l.handleTracksChange(),l}return R(t,e),t.prototype.handleClick=function(t){var n=this.track.kind,r=this.track.kinds,i=this.player_.textTracks();if(r||(r=[n]),e.prototype.handleClick.call(this,t),i)for(var a=0;a<i.length;a++){var o=i[a];o===this.track&&r.indexOf(o.kind)>-1?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled")}},t.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(sr);ft.registerComponent("TextTrackMenuItem",lr);var cr=function(e){function t(n,r){return L(this,t),r.track={player:n,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,r.multiSelectable=!1,B(this,e.call(this,n,r))}return R(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(lr);ft.registerComponent("OffTextTrackMenuItem",cr);var ur=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L(this,t),r.tracks=n.textTracks(),B(this,e.call(this,n,r))}return R(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lr,n=void 0;this.label_&&(n=this.label_+" off"),e.push(new cr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var a=r[i];if(this.kinds_.indexOf(a.kind)>-1){var o=new t(this.player_,{track:a,selectable:!0,multiSelectable:!1});o.addClass("vjs-"+a.kind+"-menu-item"),e.push(o)}}return e},t}(or);ft.registerComponent("TextTrackButton",ur);var dr=function(e){function t(n,r){L(this,t);var i=r.track,a=r.cue,o=n.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=a.text,r.selected=a.startTime<=o&&o<a.endTime;var s=B(this,e.call(this,n,r));return s.track=i,s.cue=a,i.addEventListener("cuechange",$e(s,s.update)),s}return R(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.prototype.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(sr);ft.registerComponent("ChaptersTrackMenuItem",dr);var hr=function(e){function t(n,r,i){return L(this,t),B(this,e.call(this,n,r,i))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},t.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(dt(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],a=new dr(this.player_,{track:this.track_,cue:i});e.push(a)}return e},t}(ur);hr.prototype.kind_="chapters",hr.prototype.controlText_="Chapters",ft.registerComponent("ChaptersButton",hr);var fr=function(e){function t(n,r,i){L(this,t);var a=B(this,e.call(this,n,r,i)),o=n.textTracks(),s=$e(a,a.handleTracksChange);return o.addEventListener("change",s),a.on("dispose",(function(){o.removeEventListener("change",s)})),a}return R(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},t.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(ur);fr.prototype.kind_="descriptions",fr.prototype.controlText_="Descriptions",ft.registerComponent("DescriptionsButton",fr);var pr=function(e){function t(n,r,i){return L(this,t),B(this,e.call(this,n,r,i))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(ur);pr.prototype.kind_="subtitles",pr.prototype.controlText_="Subtitles",ft.registerComponent("SubtitlesButton",pr);var mr=function(e){function t(n,r){L(this,t),r.track={player:n,kind:r.kind,label:r.kind+" settings",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="CaptionSettingsMenuItem";var i=B(this,e.call(this,n,r));return i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+r.kind+" settings dialog"),i}return R(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(lr);ft.registerComponent("CaptionSettingsMenuItem",mr);var gr=function(e){function t(n,r,i){return L(this,t),B(this,e.call(this,n,r,i))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new mr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(ur);gr.prototype.kind_="captions",gr.prototype.controlText_="Captions",ft.registerComponent("CaptionsButton",gr);var vr=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n      "),i+="</span>",e.prototype.createEl.call(this,t,z({innerHTML:i},n),r)},t}(lr);ft.registerComponent("SubsCapsMenuItem",vr);var br=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t);var i=B(this,e.call(this,n,r));return i.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(dt(i.label_)),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new mr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,vr)},t}(ur);br.prototype.kinds_=["captions","subtitles"],br.prototype.controlText_="Subtitles",ft.registerComponent("SubsCapsButton",br);var yr=function(e){function t(n,r){L(this,t);var i=r.track,a=n.audioTracks();r.label=i.label||i.language||"Unknown",r.selected=i.enabled;var o=B(this,e.call(this,n,r));o.track=i,o.addClass("vjs-"+i.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.handleTracksChange.apply(o,t)};return a.addEventListener("change",s),o.on("dispose",(function(){a.removeEventListener("change",s)})),o}return R(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n      "),i+="</span>",e.prototype.createEl.call(this,t,z({innerHTML:i},n),r)},t.prototype.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},t.prototype.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(sr);ft.registerComponent("AudioTrackMenuItem",yr);var Ar=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L(this,t),r.tracks=n.audioTracks(),B(this,e.call(this,n,r))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new yr(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(or);Ar.prototype.controlText_="Audio Track",ft.registerComponent("AudioTrackButton",Ar);var _r=function(e){function t(n,r){L(this,t);var i=r.rate,a=parseFloat(i,10);r.label=i,r.selected=1===a,r.selectable=!0,r.multiSelectable=!1;var o=B(this,e.call(this,n,r));return o.label=i,o.rate=a,o.on(n,"ratechange",o.update),o}return R(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(sr);_r.prototype.contentElType="button",ft.registerComponent("PlaybackRateMenuItem",_r);var wr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.updateVisibility(),i.updateLabel(),i.on(n,"loadstart",i.updateVisibility),i.on(n,"ratechange",i.updateLabel),i}return R(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=ne("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},t.prototype.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createMenu=function(){var e=new ir(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new _r(this.player(),{rate:t[n]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(ar);wr.prototype.controlText_="Playback Rate",ft.registerComponent("PlaybackRateMenuButton",wr);var Er=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(ft);ft.registerComponent("Spacer",Er);var Sr=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Er);ft.registerComponent("CustomControlSpacer",Sr);var Cr=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(ft);Cr.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},ft.registerComponent("ControlBar",Cr);var Tr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"error",i.open),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Mt);Tr.prototype.options_=ht(Mt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ft.registerComponent("ErrorDisplay",Tr);var kr=["#000","Black"],xr=["#00F","Blue"],Or=["#0FF","Cyan"],Ir=["#0F0","Green"],Mr=["#F0F","Magenta"],Pr=["#F00","Red"],Dr=["#FFF","White"],Nr=["#FF0","Yellow"],Lr=["1","Opaque"],Rr=["0.5","Semi-Transparent"],Br=["0","Transparent"],jr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[kr,Dr,Pr,Ir,xr,Nr,Mr,Or]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Lr,Rr,Br]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Dr,kr,Pr,Ir,xr,Nr,Mr,Or]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Lr,Rr]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Br,Rr,Lr]}};function Fr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}jr.windowColor.options=jr.backgroundColor.options;var Ur=function(e){function t(n,r){L(this,t),r.temporary=!1;var i=B(this,e.call(this,n,r));return i.updateDisplay=$e(i,i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=ne("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===r.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",(function(){i.saveSettings(),i.close()})),i.on(i.$(".vjs-default-button"),"click",(function(){i.setDefaults(),i.updateDisplay()})),H(jr,(function(e){i.on(i.$(e.selector),"change",i.updateDisplay)})),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}return R(t,e),t.prototype.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},t.prototype.createElSelect_=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",i=jr[e],a=i.id.replace("%s",this.id_),o=[n,a].join(" ").trim();return["<"+r+' id="'+a+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),"</"+r+">",'<select aria-labelledby="'+o+'">'].concat(i.options.map((function(e){var n=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+n+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+n+'">',t.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},t.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElColors_=function(){return ne("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.prototype.createElFont_=function(){return ne("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return ne("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.prototype.label=function(){return this.localize("Caption Settings Dialog")},t.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.prototype.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.prototype.getValues=function(){var e=this;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return U(e).reduce((function(n,r){return t(n,e[r],r)}),n)}(jr,(function(t,n,r){var i,a,o=(i=e.$(n.selector),a=n.parser,Fr(i.options[i.options.selectedIndex].value,a));return void 0!==o&&(t[r]=o),t}),{})},t.prototype.setValues=function(e){var t=this;H(jr,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(Fr(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},t.prototype.setDefaults=function(){var e=this;H(jr,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},t.prototype.restoreSettings=function(){var e=void 0;try{e=JSON.parse(a.localStorage.getItem("vjs-text-track-settings"))}catch(e){q.warn(e)}e&&this.setValues(e)},t.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):a.localStorage.removeItem("vjs-text-track-settings")}catch(e){q.warn(e)}}},t.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(o,"keydown",this.handleKeyDown);var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(Mt);ft.registerComponent("TextTrackSettings",Ur);var Hr=function(e){function t(n,r){L(this,t);var i=r.ResizeObserver||a.ResizeObserver;null===r.ResizeObserver&&(i=!1);var o=ht({createEl:!i},r),s=B(this,e.call(this,n,o));return s.ResizeObserver=r.ResizeObserver||a.ResizeObserver,s.loadListener_=null,s.resizeObserver_=null,s.debouncedHandler_=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a,i=void 0,o=function(){r.clearTimeout(i),i=null},s=function(){var a=this,o=arguments,s=function(){i=null,s=null,n||e.apply(a,o)};!i&&n&&e.apply(a,o),r.clearTimeout(i),i=r.setTimeout(s,t)};return s.cancel=o,s}((function(){s.resizeHandler()}),100,!1,s),i?(s.resizeObserver_=new s.ResizeObserver(s.debouncedHandler_),s.resizeObserver_.observe(n.el())):(s.loadListener_=function(){s.el_&&s.el_.contentWindow&&Ue(s.el_.contentWindow,"resize",s.debouncedHandler_)},s.one("load",s.loadListener_)),s}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},t.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},t.prototype.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&He(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},t}(ft);ft.registerComponent("ResizeManager",Hr);var zr=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var o=n[a].src;o&&-1===r.indexOf(o)&&r.push(o)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},Vr={};k||(Vr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=o.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=o.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",a.Element.prototype.appendChild.call(this,n),this.innerHTML}}));var Wr=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},Gr=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return Wr([e.el(),a.HTMLMediaElement.prototype,a.Element.prototype,Vr],"innerHTML")}(e),i=function(n){return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=n.apply(t,i);return zr(e),o}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",ht(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},qr={};k||(qr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Yt(a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return a.Element.prototype.setAttribute.call(this,"src",e),e}}));var Yr=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return Wr([e.el(),a.HTMLMediaElement.prototype,qr],"src")}(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",ht(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var a=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=i.call(t);return zr(e)||(e.triggerSourceset(""),Gr(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):zr(e)||Gr(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},Kr=j(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]),Xr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r)),a=n.source,o=!1;if(a&&(i.el_.currentSrc!==a.src||n.tag&&3===n.tag.initNetworkState_)?i.setSource(a):i.handleLateInit_(i.el_),n.enableSourceset&&i.setupSourcesetHandling_(),i.el_.hasChildNodes()){for(var l=i.el_.childNodes,c=l.length,u=[];c--;){var d=l[c];"track"===d.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(d),i.remoteTextTracks().addTrack(d.track),i.textTracks().addTrack(d.track),o||i.el_.hasAttribute("crossorigin")||!Xt(d.src)||(o=!0)):u.push(d))}for(var h=0;h<u.length;h++)i.el_.removeChild(u[h])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&o&&q.warn(s(Kr)),i.restoreMetadataTracksInIOSNativePlayer_(),(M||m||w)&&!0===n.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}return R(t,e),t.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},t.prototype.setupSourcesetHandling_=function(){Yr(this)},t.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),t=void 0,n=function(){t=[];for(var n=0;n<e.length;n++){var r=e[n];"metadata"===r.kind&&t.push({track:r,storedMode:r.mode})}};n(),e.addEventListener("change",n),this.on("dispose",(function(){return e.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<t.length;r++){var i=t[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){e.removeEventListener("change",n),e.removeEventListener("change",r),e.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",r)}))},t.prototype.proxyNativeTracks_=function(){var e=this;rn.names.forEach((function(t){var n=rn[t],r=e.el()[n.getterName],i=e[n.getterName]();if(e["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var a={change:function(e){i.trigger({type:"change",target:i,currentTarget:i,srcElement:i})},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},o=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,a=0;a<r.length;a++)if(r[a]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};Object.keys(a).forEach((function(t){var n=a[t];r.addEventListener(t,n),e.on("dispose",(function(e){return r.removeEventListener(t,n)}))})),e.on("loadstart",o),e.on("dispose",(function(t){return e.off("loadstart",o)}))}}))},t.prototype.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=o.createElement("video");var r=ht({},this.options_.tag&&ue(this.options_.tag));M&&!0===this.options_.nativeControlsForTouch||delete r.controls,ce(e,z(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&he(e,"preload",this.options_.preload);for(var i=["loop","muted","playsinline","autoplay"],a=0;a<i.length;a++){var s=i[a],l=this.options_[s];void 0!==l&&(l?he(e,s,s):fe(e,s),e[s]=l)}return e},t.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){q(e,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;if(this.el_.duration===1/0&&y&&C&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=a.navigator&&a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){e.pause(),e.webkitEnterFullScreen()}),0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=o.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},t.prototype.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},t.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),a.performance&&"function"==typeof a.performance.now?e.creationTime=a.performance.now():a.performance&&a.performance.timing&&"number"==typeof a.performance.timing.navigationStart&&(e.creationTime=a.Date.now()-a.performance.timing.navigationStart),e},t}(sn);if(J()){Xr.TEST_VID=o.createElement("video");var Qr=o.createElement("track");Qr.kind="captions",Qr.srclang="en",Qr.label="English",Xr.TEST_VID.appendChild(Qr)}Xr.isSupported=function(){try{Xr.TEST_VID.volume=.5}catch(e){return!1}return!(!Xr.TEST_VID||!Xr.TEST_VID.canPlayType)},Xr.canPlayType=function(e){return Xr.TEST_VID.canPlayType(e)},Xr.canPlaySource=function(e,t){return Xr.canPlayType(e.type)},Xr.canControlVolume=function(){try{var e=Xr.TEST_VID.volume;return Xr.TEST_VID.volume=e/2+.1,e!==Xr.TEST_VID.volume}catch(e){return!1}},Xr.canMuteVolume=function(){try{var e=Xr.TEST_VID.muted;return Xr.TEST_VID.muted=!e,Xr.TEST_VID.muted?he(Xr.TEST_VID,"muted","muted"):fe(Xr.TEST_VID,"muted"),e!==Xr.TEST_VID.muted}catch(e){return!1}},Xr.canControlPlaybackRate=function(){if(y&&C&&T<58)return!1;try{var e=Xr.TEST_VID.playbackRate;return Xr.TEST_VID.playbackRate=e/2+.1,e!==Xr.TEST_VID.playbackRate}catch(e){return!1}},Xr.canOverrideAttributes=function(){if(k)return!1;try{var e=function(){};Object.defineProperty(o.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(o.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(o.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(o.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Xr.supportsNativeTextTracks=function(){return I||v&&C},Xr.supportsNativeVideoTracks=function(){return!(!Xr.TEST_VID||!Xr.TEST_VID.videoTracks)},Xr.supportsNativeAudioTracks=function(){return!(!Xr.TEST_VID||!Xr.TEST_VID.audioTracks)},Xr.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Xr.prototype.featuresVolumeControl=Xr.canControlVolume(),Xr.prototype.featuresMuteControl=Xr.canMuteVolume(),Xr.prototype.featuresPlaybackRate=Xr.canControlPlaybackRate(),Xr.prototype.featuresSourceset=Xr.canOverrideAttributes(),Xr.prototype.movingMediaElementInDOM=!v,Xr.prototype.featuresFullscreenResize=!0,Xr.prototype.featuresProgressEvents=!0,Xr.prototype.featuresTimeupdateEvents=!0,Xr.prototype.featuresNativeTextTracks=Xr.supportsNativeTextTracks(),Xr.prototype.featuresNativeVideoTracks=Xr.supportsNativeVideoTracks(),Xr.prototype.featuresNativeAudioTracks=Xr.supportsNativeAudioTracks();var $r=Xr.TEST_VID&&Xr.TEST_VID.constructor.prototype.canPlayType,Jr=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Zr=/^video\/mp4/i;Xr.patchCanPlayType=function(){A>=4&&!E&&!C?Xr.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Jr.test(e)?"maybe":$r.call(this,e)}:_&&(Xr.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Zr.test(e)?"maybe":$r.call(this,e)})},Xr.unpatchCanPlayType=function(){var e=Xr.TEST_VID.constructor.prototype.canPlayType;return Xr.TEST_VID.constructor.prototype.canPlayType=$r,e},Xr.patchCanPlayType(),Xr.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Xr.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Xr.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Xr.prototype["set"+dt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(e){Xr.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(e){Xr.prototype["set"+dt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Xr.prototype[e]=function(){return this.el_[e]()}})),sn.withSourceHandlers(Xr),Xr.nativeSourceHandler={},Xr.nativeSourceHandler.canPlayType=function(e){try{return Xr.TEST_VID.canPlayType(e)}catch(e){return""}},Xr.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Xr.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Kt(e.src);return Xr.nativeSourceHandler.canPlayType("video/"+n)}return""},Xr.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Xr.nativeSourceHandler.dispose=function(){},Xr.registerSourceHandler(Xr.nativeSourceHandler),sn.registerTech("Html5",Xr);var ei=j(["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "],["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "]),ti=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ni={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ri=["tiny","xsmall","small","medium","large","xlarge","huge"],ii={};ri.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;ii[e]="vjs-layout-"+t}));var ai={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},oi=function(e){function t(n,r,i){if(L(this,t),n.id=n.id||r.id||"vjs_video_"+Oe(),(r=z(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var a=n.closest("[lang]");a&&a.getAttribute&&(r.language=a.getAttribute("lang"))}else for(var o=n;o&&1===o.nodeType;){if(ue(o).hasOwnProperty("lang")){r.language=o.getAttribute("lang");break}o=o.parentNode}var s=B(this,e.call(this,null,r,i));if(s.log=Y(s.id_),s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&ue(n),s.language(s.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(e){l[e.toLowerCase()]=r.languages[e]})),s.languages_=l}else s.languages_=t.prototype.options_.languages;s.cache_={},s.poster_=r.poster||"",s.controls_=!!r.controls,s.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?s.options_.autoplay=!0:s.autoplay(s.options_.autoplay),s.scrubbing_=!1,s.el_=s.createEl(),s.cache_.lastPlaybackRate=s.defaultPlaybackRate(),lt(s,{eventBusKey:"el_"});var c=ht(s.options_);if(r.plugins){var u=r.plugins;Object.keys(u).forEach((function(e){if("function"!=typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](u[e])}),s)}s.options_.playerOptions=c,s.middleware_=[],s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),v||s.addClass("vjs-workinghover"),t.players[s.id_]=s;var d="6.13.0".split(".")[0];return s.addClass("vjs-v"+d),s.userActive(!0),s.reportUserActivity(),s.one("play",s.listenForUserActivity_),s.on("fullscreenchange",s.handleFullscreenChange_),s.on("stageclick",s.handleStageClick_),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s.changingSrc_=!1,s.playWaitingForReady_=!1,s.playOnLoadstart_=null,s}return R(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),cn[this.id()]=null,e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,n=void 0,r=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=t.parentNode:i||(n=this.el_=e.prototype.createEl.call(this,"div"));var s=ue(t);if(i){for(n=this.el_=t,t=this.tag=o.createElement("video");n.children.length;)t.appendChild(n.firstChild);ae(n,"video-js")||oe(n,"video-js"),n.appendChild(t),r=this.playerElIngest_=n,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(e){void 0!==n[e]&&(t[e]=n[e])}))}if(t.setAttribute("tabindex","-1"),s.tabindex="-1",x&&(t.setAttribute("role","application"),s.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){"class"===e?(n.className+=" "+s[e],i&&(t.className+=" "+s[e])):(n.setAttribute(e,s[e]),i&&t.setAttribute(e,s[e]))})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=n.player=this,this.addClass("vjs-paused"),!0!==a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Xe("vjs-styles-dimensions");var l=Ce(".vjs-styles-defaults"),c=Ce("head");c.insertBefore(this.styleEl_,l?l.nextSibling:c.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var u=t.getElementsByTagName("a"),d=0;d<u.length;d++){var h=u.item(d);oe(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!r&&t.parentNode.insertBefore(n,t),ie(t,n),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_=n,n},t.prototype.width=function(e){return this.dimension("width",e)},t.prototype.height=function(e){return this.dimension("height",e)},t.prototype.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?q.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},t.prototype.fluid=function(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,e?(this.addClass("vjs-fluid"),this.fill(!1)):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.prototype.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},t.prototype.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},t.prototype.updateStyleEl_=function(){if(!0!==a.VIDEOJS_NO_DYNAMIC_STYLE){var e=void 0,t=void 0,n=void 0,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Qe(this.styleEl_,"\n      ."+n+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+n+".vjs-fluid {\n        padding-top: "+100*i+"%;\n      }\n    ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(o>=0&&(l.width=o),s>=0&&(l.height=s))}},t.prototype.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=dt(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(sn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};on.names.forEach((function(e){var t=on[e];a[t.getterName]=n[t.privateName]})),z(a,this.options_[r]),z(a,this.options_[i]),z(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var o=sn.getTech(e);if(!o)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new o(a),this.tech_.ready($e(this,this.handleTechReady_),!0),It(this.textTracksJson_||[],this.tech_),ti.forEach((function(e){n.on(n.tech_,e,n["handleTech"+dt(e)+"_"])})),Object.keys(ni).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+ni[e]+"_"].bind(n),event:t}):n["handleTech"+ni[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||ie(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;on.names.forEach((function(t){var n=on[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=Ot(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.prototype.tech=function(e){return void 0===e&&q.warn(s(ei)),this.tech_},t.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},t.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},t.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(e){q("deleting tag.poster throws in some browsers",e)}},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},t.prototype.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n=function(){var e=t.muted();t.muted(!0);var n=t.play();if(n&&n.then&&n.catch)return n.catch((function(n){t.muted(e)}))},r=void 0;if("any"===e?(r=this.play())&&r.then&&r.catch&&r.catch((function(){return n()})):r="muted"===e?n():this.play(),r&&r.then&&r.catch)return r.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},t.prototype.updateSourceCaches_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=_n(this,t)),this.cache_.source=ht({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],a=this.$$("source"),o=[],s=0;s<a.length;s++){var l=ue(a[s]);i.push(l),l.src&&l.src===t&&o.push(l.src)}o.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},t.prototype.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;if(r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),!e.src){this.tech_.one(["sourceset","loadstart"],(function e(n){if("sourceset"!==n.type){var r=t.techGet("currentSrc");t.lastSource_.tech=r,t.updateSourceCaches_(r)}t.tech_.off(["sourceset","loadstart"],e)}))}}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},t.prototype.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return e.removeClass("vjs-waiting")}))},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(q.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){Se(e)&&this.controls_&&(this.paused()?kt(this.play()):this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready((function(){if(e in pn)return function(e,t,n,r){return t[n](e.reduce(gn(n),r))}(this.middleware_,this.tech_,e,t);if(e in mn)return hn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw q(e),e}}),!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in fn)return function(e,t,n){return e.reduceRight(gn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in mn)return hn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw q("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw q("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw q(t),t}}},t.prototype.play=function(){var e=this,t=this.options_.Promise||a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},t.prototype.play_=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kt;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void t(this.techGet_("play"));this.playOnLoadstart_=function(){e.playOnLoadstart_=null,t(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){e.playWaitingForReady_=!1,t(e.play())}))}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||gt(0,0)},t.prototype.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){return void 0!==e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.prototype.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=gt(0,0)),e},t.prototype.bufferedPercent=function(){return vt(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},t.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.prototype.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){if(void 0===e)return!!this.isFullscreen_;this.isFullscreen_=!!e},t.prototype.requestFullscreen=function(){var e=bt;this.isFullscreen(!0),e.requestFullscreen?(Ue(o,e.fullscreenchange,$e(this,(function t(n){this.isFullscreen(o[e.fullscreenElement]),!1===this.isFullscreen()&&He(o,e.fullscreenchange,t),this.trigger("fullscreenchange")}))),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=bt;this.isFullscreen(!1),e.requestFullscreen?o[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=o.documentElement.style.overflow,Ue(o,"keydown",$e(this,this.fullWindowOnEscKey)),o.documentElement.style.overflow="hidden",oe(o.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,He(o,"keydown",this.fullWindowOnEscKey),o.documentElement.style.overflow=this.docOrigOverflow,se(o.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],a=sn.getTech(i);if(a||(a=ft.getComponent(i)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else q.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.prototype.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,sn.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(q.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(e,t,n){var r=void 0;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},a=function(e,t){var r=e[0];if(e[1].canPlaySource(t,n.options_[r.toLowerCase()]))return{source:t,tech:r}};return(this.options_.sourceOrder?i(e,r,(t=a,function(e,n){return t(n,e)})):i(r,e,a))||!1},t.prototype.src=function(e){var t=this;if(void 0===e)return this.cache_.src||"";var n=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):V(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[wn({src:t})]:V(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[wn(t)]:[];return t}(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),dn(this,n[0],(function(e,r){var i,a;if(t.middleware_=r,t.cache_.sources=n,t.updateSourceCaches_(e),t.src_(e))return n.length>1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());i=r,a=t.tech_,i.forEach((function(e){return e.setTech&&e.setTech(a)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},t.prototype.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,dt(t)!==dt(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t=void 0;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=t||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",t)},t.prototype.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.prototype.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new St(e),this.addClass("vjs-error"),q.error("(CODE:"+this.error_.code+" "+St.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,n=void 0,r=$e(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",(function(t){r(),this.clearInterval(e)})),this.on("keydown",r),this.on("keyup",r);var i=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(i);var e=this.options_.inactivityTimeout;e<=0||(i=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},t.prototype.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.prototype.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.prototype.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.track,n=void 0===t?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return ht(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=ht(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=ht(r)).player=void 0,e.tracks[n]=r}return e},t.prototype.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new Mt(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},t.prototype.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<ri.length;n++){var r=ri[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(ii[e]),this.addClass(ii[r]),this.breakpoint_=r;break}}},t.prototype.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},t.prototype.breakpoints=function(e){return void 0===e?z(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=z({},ai,e),this.updateCurrentBreakpoint_(),z(this.breakpoints_))},t.prototype.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},t.prototype.currentBreakpoint=function(){return this.breakpoint_},t.prototype.currentBreakpointClass=function(){return ii[this.breakpoint_]||""},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=ue(e),r=n["data-setup"];if(ae(e,"vjs-fill")&&(n.fill=!0),ae(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=l(r||"{}"),a=i[0],o=i[1];a&&q.error(a),z(n,o)}if(z(t,n),e.hasChildNodes())for(var s=e.childNodes,c=0,u=s.length;c<u;c++){var d=s[c],h=d.nodeName.toLowerCase();"source"===h?t.sources.push(ue(d)):"track"===h&&t.tracks.push(ue(d))}return t},t.prototype.flexNotSupported_=function(){var e=o.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(ft);on.names.forEach((function(e){var t=on[e];oi.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),oi.players={};var si=a.navigator;oi.prototype.options_={techOrder:sn.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:si&&(si.languages&&si.languages[0]||si.userLanguage||si.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:!1},k||oi.prototype.options_.children.push("resizeManager"),["ended","seeking","seekable","networkState","readyState"].forEach((function(e){oi.prototype[e]=function(){return this.techGet_(e)}})),ti.forEach((function(e){oi.prototype["handleTech"+dt(e)+"_"]=function(){return this.trigger(e)}})),ft.registerComponent("Player",oi);var li={},ci=function(e){return li.hasOwnProperty(e)},ui=function(e){return ci(e)?li[e]:void 0},di=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},hi=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},fi=function(e,t){return t.prototype.name=e,function(){hi(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=new(Function.prototype.bind.apply(t,[null].concat([this].concat(r))));return this[e]=function(){return a},hi(this,a.getEventHash()),a}},pi=function(){function e(t){if(L(this,e),this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,lt(this),delete this.trigger,ut(this,this.constructor.defaultState),di(t,this.name),this.dispose=$e(this,this.dispose),t.on("dispose",this.dispose)}return e.prototype.version=function(){return this.constructor.VERSION},e.prototype.getEventHash=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ze(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=fi(e,li[e])},e.isBasic=function(t){var n="string"==typeof t?ui(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+(void 0===t?"undefined":N(t))+".");if(ci(t))q.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(oi.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+(void 0===n?"undefined":N(n))+".");return li[t]=n,"plugin"!==t&&(e.isBasic(n)?oi.prototype[t]=function(e,t){var n=function(){hi(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return di(this,e),hi(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):oi.prototype[t]=fi(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");ci(e)&&(delete li[e],delete oi.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(li),t=void 0;return e.forEach((function(e){var n=ui(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=ui(e);return t&&t.VERSION||""},e}();pi.getPlugin=ui,pi.BASE_PLUGIN_NAME="plugin",pi.registerPlugin("plugin",pi),oi.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},oi.prototype.hasPlugin=function(e){return!!ci(e)};var mi=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":N(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)};"undefined"==typeof HTMLVideoElement&&J()&&(o.createElement("video"),o.createElement("audio"),o.createElement("track"),o.createElement("video-js"));var gi=function(e){return 0===e.indexOf("#")?e.slice(1):e};function vi(e,t,n){var r=vi.getPlayer(e);if(r)return t&&q.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?Ce("#"+gi(e)):e;if(!Z(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");o.body.contains(i)||q.warn("The element supplied is not included in the DOM"),t=t||{},vi.hooks("beforesetup").forEach((function(e){var n=e(i,ht(t));V(n)&&!Array.isArray(n)?t=ht(t,n):q.error("please return an object in beforesetup hooks")}));var a=ft.getComponent("Player");return r=new a(i,t,n),vi.hooks("setup").forEach((function(e){return e(r)})),r}if(vi.hooks_={},vi.hooks=function(e,t){return vi.hooks_[e]=vi.hooks_[e]||[],t&&(vi.hooks_[e]=vi.hooks_[e].concat(t)),vi.hooks_[e]},vi.hook=function(e,t){vi.hooks(e,t)},vi.hookOnce=function(e,t){vi.hooks(e,[].concat(t).map((function(t){return function n(){return vi.removeHook(e,n),t.apply(void 0,arguments)}})))},vi.removeHook=function(e,t){var n=vi.hooks(e).indexOf(t);return!(n<=-1)&&(vi.hooks_[e]=vi.hooks_[e].slice(),vi.hooks_[e].splice(n,1),!0)},!0!==a.VIDEOJS_NO_DYNAMIC_STYLE&&J()){var bi=Ce(".vjs-styles-defaults");if(!bi){bi=Xe("vjs-styles-defaults");var yi=Ce("head");yi&&yi.insertBefore(bi,yi.firstChild),Qe(bi,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}Ke(1,vi),vi.VERSION="6.13.0",vi.options=oi.prototype.options_,vi.getPlayers=function(){return oi.players},vi.getPlayer=function(e){var t=oi.players,n=void 0;if("string"==typeof e){var r=gi(e),i=t[r];if(i)return i;n=Ce("#"+r)}else n=e;if(Z(n)){var a=n,o=a.player,s=a.playerId;if(o||t[s])return o||t[s]}},vi.getAllPlayers=function(){return Object.keys(oi.players).map((function(e){return oi.players[e]})).filter(Boolean)},vi.players=oi.players,vi.getComponent=ft.getComponent,vi.registerComponent=function(e,t){sn.isTech(t)&&q.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),ft.registerComponent.call(ft,e,t)},vi.getTech=sn.getTech,vi.registerTech=sn.registerTech,vi.use=function(e,t){ln[e]=ln[e]||[],ln[e].push(t)},!k&&Object.defineProperty?(Object.defineProperty(vi,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(vi.middleware,"TERMINATOR",{value:un,writeable:!1,enumerable:!0})):vi.middleware={TERMINATOR:un},vi.browser=D,vi.TOUCH_ENABLED=M,vi.extend=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){e.apply(this,arguments)},r={};for(var i in"object"===(void 0===t?"undefined":N(t))?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),mi(n,e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},vi.mergeOptions=ht,vi.bind=$e,vi.registerPlugin=pi.registerPlugin,vi.deregisterPlugin=pi.deregisterPlugin,vi.plugin=function(e,t){return q.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),pi.registerPlugin(e,t)},vi.getPlugins=pi.getPlugins,vi.getPlugin=pi.getPlugin,vi.getPluginVersion=pi.getPluginVersion,vi.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),vi.options.languages=ht(vi.options.languages,((n={})[e]=t,n)),vi.options.languages[e]},vi.log=q,vi.createLogger=Y,vi.createTimeRange=vi.createTimeRanges=gt,vi.formatTime=Bn,vi.setFormatTime=function(e){Rn=e},vi.resetFormatTime=function(){Rn=Ln},vi.parseUrl=qt,vi.isCrossOrigin=Xt,vi.EventTarget=Ze,vi.on=Ue,vi.one=Ve,vi.off=He,vi.trigger=ze,vi.xhr=c,vi.TextTrack=Zt,vi.AudioTrack=en,vi.VideoTrack=tn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){vi[e]=function(){return q.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),ke[e].apply(null,arguments)}})),vi.computedStyle=K,vi.dom=ke,vi.url=Qt,e.exports=vi},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),i=(n(55),n(325),n(85)),a=(n(245),n(87),n(1010),n(557)),o=n(249);Object.keys,r.Component;var s,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}),(function(e){return e}))},c={fromESObservable:null,toESObservable:null},u={fromESObservable:function(e){return"function"==typeof c.fromESObservable?c.fromESObservable(e):e},toESObservable:function(e){return"function"==typeof c.toESObservable?c.toESObservable(e):e}};s=u},function(e,t){e.exports=function(e){if(null==e)throw new TypeError("Cannot destructure undefined")}},function(e,t,n){"use strict";function r(e){return e.split("-")[0]}n.d(t,"a",(function(){return r}))},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(68))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",notiWrapper:"notiWrapper--1r8Bb",notiPanel:"notiPanel--3yD0n",notiPanelHeader:"notiPanelHeader--1pD_Y",notiItemList:"notiItemList--2ddcE",notiItem:"notiItem--q0LAw",read:"read--2DNnt",unread:"unread--3jslR",deleteBtn:"deleteBtn--bbhLQ",notiAvatar:"notiAvatar--3DZCe",toggleStatusBtn:"toggleStatusBtn--2Mdns",markAllAsReadBtn:"markAllAsReadBtn--11siK",notiBadge:"notiBadge--3iihI"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",subscriptionModalForm:"subscriptionModalForm--2V0cZ",modalBody:"modalBody--1YIFt",btnClose:"btnClose--FTGjS",plans:"plans--3gMI7",plan:"plan--n7YNk",subscribeBtnWrapper:"subscribeBtnWrapper--31I1W",subscribeBtn:"subscribeBtn--2NFp0",mySubscribedCoursesForm:"mySubscribedCoursesForm--2Rppw",modalBodyCourses:"modalBodyCourses--hg8EE",headingRow:"headingRow--2CxuR",headingCol:"headingCol--3-JK6"}},function(e,t,n){"use strict";var r,i,a=n(1367),o=a.Reader,s=a.Writer,l=a.util,c=a.roots.default||(a.roots.default={});c.SdkSignalFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var t,n;return e.prototype.timestampMs=l.Long?l.Long.fromBits(0,0,!0):0,e.prototype.type=1,e.prototype.error=null,e.prototype.join=null,e.prototype.joinack=null,e.prototype.sub=null,e.prototype.suback=null,e.prototype.index=null,e.prototype.pause=null,e.prototype.leave=null,e.prototype.leaveAck=null,e.prototype.bitrates=null,e.prototype.audioControl=null,e.prototype.audioMetadata=null,e.prototype.audioStreamIdInfo=null,e.prototype.pingPong=null,e.prototype.audioStatus=null,e.prototype.clientMetric=null,e.prototype.dataMessage=null,e.prototype.remoteVideoUpdate=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),t.uint32(8).uint64(e.timestampMs),t.uint32(16).int32(e.type),null!=e.error&&e.hasOwnProperty("error")&&c.SdkErrorFrame.encode(e.error,t.uint32(26).fork()).ldelim(),null!=e.join&&e.hasOwnProperty("join")&&c.SdkJoinFrame.encode(e.join,t.uint32(34).fork()).ldelim(),null!=e.joinack&&e.hasOwnProperty("joinack")&&c.SdkJoinAckFrame.encode(e.joinack,t.uint32(42).fork()).ldelim(),null!=e.sub&&e.hasOwnProperty("sub")&&c.SdkSubscribeFrame.encode(e.sub,t.uint32(50).fork()).ldelim(),null!=e.suback&&e.hasOwnProperty("suback")&&c.SdkSubscribeAckFrame.encode(e.suback,t.uint32(58).fork()).ldelim(),null!=e.index&&e.hasOwnProperty("index")&&c.SdkIndexFrame.encode(e.index,t.uint32(66).fork()).ldelim(),null!=e.pause&&e.hasOwnProperty("pause")&&c.SdkPauseResumeFrame.encode(e.pause,t.uint32(82).fork()).ldelim(),null!=e.leave&&e.hasOwnProperty("leave")&&c.SdkLeaveFrame.encode(e.leave,t.uint32(90).fork()).ldelim(),null!=e.leaveAck&&e.hasOwnProperty("leaveAck")&&c.SdkLeaveAckFrame.encode(e.leaveAck,t.uint32(98).fork()).ldelim(),null!=e.bitrates&&e.hasOwnProperty("bitrates")&&c.SdkBitrateFrame.encode(e.bitrates,t.uint32(114).fork()).ldelim(),null!=e.audioControl&&e.hasOwnProperty("audioControl")&&c.SdkAudioControlFrame.encode(e.audioControl,t.uint32(138).fork()).ldelim(),null!=e.audioMetadata&&e.hasOwnProperty("audioMetadata")&&c.SdkAudioMetadataFrame.encode(e.audioMetadata,t.uint32(146).fork()).ldelim(),null!=e.audioStreamIdInfo&&e.hasOwnProperty("audioStreamIdInfo")&&c.SdkAudioStreamIdInfoFrame.encode(e.audioStreamIdInfo,t.uint32(154).fork()).ldelim(),null!=e.pingPong&&e.hasOwnProperty("pingPong")&&c.SdkPingPongFrame.encode(e.pingPong,t.uint32(162).fork()).ldelim(),null!=e.audioStatus&&e.hasOwnProperty("audioStatus")&&c.SdkAudioStatusFrame.encode(e.audioStatus,t.uint32(170).fork()).ldelim(),null!=e.clientMetric&&e.hasOwnProperty("clientMetric")&&c.SdkClientMetricFrame.encode(e.clientMetric,t.uint32(178).fork()).ldelim(),null!=e.dataMessage&&e.hasOwnProperty("dataMessage")&&c.SdkDataMessageFrame.encode(e.dataMessage,t.uint32(186).fork()).ldelim(),null!=e.remoteVideoUpdate&&e.hasOwnProperty("remoteVideoUpdate")&&c.SdkRemoteVideoUpdateFrame.encode(e.remoteVideoUpdate,t.uint32(202).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkSignalFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.timestampMs=e.uint64();break;case 2:r.type=e.int32();break;case 3:r.error=c.SdkErrorFrame.decode(e,e.uint32());break;case 4:r.join=c.SdkJoinFrame.decode(e,e.uint32());break;case 5:r.joinack=c.SdkJoinAckFrame.decode(e,e.uint32());break;case 6:r.sub=c.SdkSubscribeFrame.decode(e,e.uint32());break;case 7:r.suback=c.SdkSubscribeAckFrame.decode(e,e.uint32());break;case 8:r.index=c.SdkIndexFrame.decode(e,e.uint32());break;case 10:r.pause=c.SdkPauseResumeFrame.decode(e,e.uint32());break;case 11:r.leave=c.SdkLeaveFrame.decode(e,e.uint32());break;case 12:r.leaveAck=c.SdkLeaveAckFrame.decode(e,e.uint32());break;case 14:r.bitrates=c.SdkBitrateFrame.decode(e,e.uint32());break;case 17:r.audioControl=c.SdkAudioControlFrame.decode(e,e.uint32());break;case 18:r.audioMetadata=c.SdkAudioMetadataFrame.decode(e,e.uint32());break;case 19:r.audioStreamIdInfo=c.SdkAudioStreamIdInfoFrame.decode(e,e.uint32());break;case 20:r.pingPong=c.SdkPingPongFrame.decode(e,e.uint32());break;case 21:r.audioStatus=c.SdkAudioStatusFrame.decode(e,e.uint32());break;case 22:r.clientMetric=c.SdkClientMetricFrame.decode(e,e.uint32());break;case 23:r.dataMessage=c.SdkDataMessageFrame.decode(e,e.uint32());break;case 25:r.remoteVideoUpdate=c.SdkRemoteVideoUpdateFrame.decode(e,e.uint32());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("timestampMs"))throw l.ProtocolError("missing required 'timestampMs'",{instance:r});if(!r.hasOwnProperty("type"))throw l.ProtocolError("missing required 'type'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(!(l.isInteger(e.timestampMs)||e.timestampMs&&l.isInteger(e.timestampMs.low)&&l.isInteger(e.timestampMs.high)))return"timestampMs: integer|Long expected";switch(e.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 7:case 8:case 9:case 10:case 13:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 24:}var t;if(null!=e.error&&e.hasOwnProperty("error")&&(t=c.SdkErrorFrame.verify(e.error)))return"error."+t;if(null!=e.join&&e.hasOwnProperty("join")&&(t=c.SdkJoinFrame.verify(e.join)))return"join."+t;if(null!=e.joinack&&e.hasOwnProperty("joinack")&&(t=c.SdkJoinAckFrame.verify(e.joinack)))return"joinack."+t;if(null!=e.sub&&e.hasOwnProperty("sub")&&(t=c.SdkSubscribeFrame.verify(e.sub)))return"sub."+t;if(null!=e.suback&&e.hasOwnProperty("suback")&&(t=c.SdkSubscribeAckFrame.verify(e.suback)))return"suback."+t;if(null!=e.index&&e.hasOwnProperty("index")&&(t=c.SdkIndexFrame.verify(e.index)))return"index."+t;if(null!=e.pause&&e.hasOwnProperty("pause")&&(t=c.SdkPauseResumeFrame.verify(e.pause)))return"pause."+t;if(null!=e.leave&&e.hasOwnProperty("leave")&&(t=c.SdkLeaveFrame.verify(e.leave)))return"leave."+t;if(null!=e.leaveAck&&e.hasOwnProperty("leaveAck")&&(t=c.SdkLeaveAckFrame.verify(e.leaveAck)))return"leaveAck."+t;if(null!=e.bitrates&&e.hasOwnProperty("bitrates")&&(t=c.SdkBitrateFrame.verify(e.bitrates)))return"bitrates."+t;if(null!=e.audioControl&&e.hasOwnProperty("audioControl")&&(t=c.SdkAudioControlFrame.verify(e.audioControl)))return"audioControl."+t;if(null!=e.audioMetadata&&e.hasOwnProperty("audioMetadata")&&(t=c.SdkAudioMetadataFrame.verify(e.audioMetadata)))return"audioMetadata."+t;if(null!=e.audioStreamIdInfo&&e.hasOwnProperty("audioStreamIdInfo")&&(t=c.SdkAudioStreamIdInfoFrame.verify(e.audioStreamIdInfo)))return"audioStreamIdInfo."+t;if(null!=e.pingPong&&e.hasOwnProperty("pingPong")&&(t=c.SdkPingPongFrame.verify(e.pingPong)))return"pingPong."+t;if(null!=e.audioStatus&&e.hasOwnProperty("audioStatus")&&(t=c.SdkAudioStatusFrame.verify(e.audioStatus)))return"audioStatus."+t;if(null!=e.clientMetric&&e.hasOwnProperty("clientMetric")&&(t=c.SdkClientMetricFrame.verify(e.clientMetric)))return"clientMetric."+t;if(null!=e.dataMessage&&e.hasOwnProperty("dataMessage")&&(t=c.SdkDataMessageFrame.verify(e.dataMessage)))return"dataMessage."+t;if(null!=e.remoteVideoUpdate&&e.hasOwnProperty("remoteVideoUpdate")&&(t=c.SdkRemoteVideoUpdateFrame.verify(e.remoteVideoUpdate)))return"remoteVideoUpdate."+t;return null},e.fromObject=function(e){if(e instanceof c.SdkSignalFrame)return e;var t=new c.SdkSignalFrame;switch(null!=e.timestampMs&&(l.Long?(t.timestampMs=l.Long.fromValue(e.timestampMs)).unsigned=!0:"string"==typeof e.timestampMs?t.timestampMs=parseInt(e.timestampMs,10):"number"==typeof e.timestampMs?t.timestampMs=e.timestampMs:"object"==typeof e.timestampMs&&(t.timestampMs=new l.LongBits(e.timestampMs.low>>>0,e.timestampMs.high>>>0).toNumber(!0))),e.type){case"JOIN":case 1:t.type=1;break;case"JOIN_ACK":case 2:t.type=2;break;case"SUBSCRIBE":case 3:t.type=3;break;case"SUBSCRIBE_ACK":case 4:t.type=4;break;case"INDEX":case 5:t.type=5;break;case"PAUSE":case 7:t.type=7;break;case"RESUME":case 8:t.type=8;break;case"LEAVE":case 9:t.type=9;break;case"LEAVE_ACK":case 10:t.type=10;break;case"BITRATES":case 13:t.type=13;break;case"AUDIO_CONTROL":case 16:t.type=16;break;case"AUDIO_METADATA":case 17:t.type=17;break;case"AUDIO_STREAM_ID_INFO":case 18:t.type=18;break;case"PING_PONG":case 19:t.type=19;break;case"AUDIO_STATUS":case 20:t.type=20;break;case"CLIENT_METRIC":case 21:t.type=21;break;case"DATA_MESSAGE":case 22:t.type=22;break;case"REMOTE_VIDEO_UPDATE":case 24:t.type=24}if(null!=e.error){if("object"!=typeof e.error)throw TypeError(".SdkSignalFrame.error: object expected");t.error=c.SdkErrorFrame.fromObject(e.error)}if(null!=e.join){if("object"!=typeof e.join)throw TypeError(".SdkSignalFrame.join: object expected");t.join=c.SdkJoinFrame.fromObject(e.join)}if(null!=e.joinack){if("object"!=typeof e.joinack)throw TypeError(".SdkSignalFrame.joinack: object expected");t.joinack=c.SdkJoinAckFrame.fromObject(e.joinack)}if(null!=e.sub){if("object"!=typeof e.sub)throw TypeError(".SdkSignalFrame.sub: object expected");t.sub=c.SdkSubscribeFrame.fromObject(e.sub)}if(null!=e.suback){if("object"!=typeof e.suback)throw TypeError(".SdkSignalFrame.suback: object expected");t.suback=c.SdkSubscribeAckFrame.fromObject(e.suback)}if(null!=e.index){if("object"!=typeof e.index)throw TypeError(".SdkSignalFrame.index: object expected");t.index=c.SdkIndexFrame.fromObject(e.index)}if(null!=e.pause){if("object"!=typeof e.pause)throw TypeError(".SdkSignalFrame.pause: object expected");t.pause=c.SdkPauseResumeFrame.fromObject(e.pause)}if(null!=e.leave){if("object"!=typeof e.leave)throw TypeError(".SdkSignalFrame.leave: object expected");t.leave=c.SdkLeaveFrame.fromObject(e.leave)}if(null!=e.leaveAck){if("object"!=typeof e.leaveAck)throw TypeError(".SdkSignalFrame.leaveAck: object expected");t.leaveAck=c.SdkLeaveAckFrame.fromObject(e.leaveAck)}if(null!=e.bitrates){if("object"!=typeof e.bitrates)throw TypeError(".SdkSignalFrame.bitrates: object expected");t.bitrates=c.SdkBitrateFrame.fromObject(e.bitrates)}if(null!=e.audioControl){if("object"!=typeof e.audioControl)throw TypeError(".SdkSignalFrame.audioControl: object expected");t.audioControl=c.SdkAudioControlFrame.fromObject(e.audioControl)}if(null!=e.audioMetadata){if("object"!=typeof e.audioMetadata)throw TypeError(".SdkSignalFrame.audioMetadata: object expected");t.audioMetadata=c.SdkAudioMetadataFrame.fromObject(e.audioMetadata)}if(null!=e.audioStreamIdInfo){if("object"!=typeof e.audioStreamIdInfo)throw TypeError(".SdkSignalFrame.audioStreamIdInfo: object expected");t.audioStreamIdInfo=c.SdkAudioStreamIdInfoFrame.fromObject(e.audioStreamIdInfo)}if(null!=e.pingPong){if("object"!=typeof e.pingPong)throw TypeError(".SdkSignalFrame.pingPong: object expected");t.pingPong=c.SdkPingPongFrame.fromObject(e.pingPong)}if(null!=e.audioStatus){if("object"!=typeof e.audioStatus)throw TypeError(".SdkSignalFrame.audioStatus: object expected");t.audioStatus=c.SdkAudioStatusFrame.fromObject(e.audioStatus)}if(null!=e.clientMetric){if("object"!=typeof e.clientMetric)throw TypeError(".SdkSignalFrame.clientMetric: object expected");t.clientMetric=c.SdkClientMetricFrame.fromObject(e.clientMetric)}if(null!=e.dataMessage){if("object"!=typeof e.dataMessage)throw TypeError(".SdkSignalFrame.dataMessage: object expected");t.dataMessage=c.SdkDataMessageFrame.fromObject(e.dataMessage)}if(null!=e.remoteVideoUpdate){if("object"!=typeof e.remoteVideoUpdate)throw TypeError(".SdkSignalFrame.remoteVideoUpdate: object expected");t.remoteVideoUpdate=c.SdkRemoteVideoUpdateFrame.fromObject(e.remoteVideoUpdate)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(l.Long){var r=new l.Long(0,0,!0);n.timestampMs=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.timestampMs=t.longs===String?"0":0;n.type=t.enums===String?"JOIN":1,n.error=null,n.join=null,n.joinack=null,n.sub=null,n.suback=null,n.index=null,n.pause=null,n.leave=null,n.leaveAck=null,n.bitrates=null,n.audioControl=null,n.audioMetadata=null,n.audioStreamIdInfo=null,n.pingPong=null,n.audioStatus=null,n.clientMetric=null,n.dataMessage=null,n.remoteVideoUpdate=null}return null!=e.timestampMs&&e.hasOwnProperty("timestampMs")&&("number"==typeof e.timestampMs?n.timestampMs=t.longs===String?String(e.timestampMs):e.timestampMs:n.timestampMs=t.longs===String?l.Long.prototype.toString.call(e.timestampMs):t.longs===Number?new l.LongBits(e.timestampMs.low>>>0,e.timestampMs.high>>>0).toNumber(!0):e.timestampMs),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?c.SdkSignalFrame.Type[e.type]:e.type),null!=e.error&&e.hasOwnProperty("error")&&(n.error=c.SdkErrorFrame.toObject(e.error,t)),null!=e.join&&e.hasOwnProperty("join")&&(n.join=c.SdkJoinFrame.toObject(e.join,t)),null!=e.joinack&&e.hasOwnProperty("joinack")&&(n.joinack=c.SdkJoinAckFrame.toObject(e.joinack,t)),null!=e.sub&&e.hasOwnProperty("sub")&&(n.sub=c.SdkSubscribeFrame.toObject(e.sub,t)),null!=e.suback&&e.hasOwnProperty("suback")&&(n.suback=c.SdkSubscribeAckFrame.toObject(e.suback,t)),null!=e.index&&e.hasOwnProperty("index")&&(n.index=c.SdkIndexFrame.toObject(e.index,t)),null!=e.pause&&e.hasOwnProperty("pause")&&(n.pause=c.SdkPauseResumeFrame.toObject(e.pause,t)),null!=e.leave&&e.hasOwnProperty("leave")&&(n.leave=c.SdkLeaveFrame.toObject(e.leave,t)),null!=e.leaveAck&&e.hasOwnProperty("leaveAck")&&(n.leaveAck=c.SdkLeaveAckFrame.toObject(e.leaveAck,t)),null!=e.bitrates&&e.hasOwnProperty("bitrates")&&(n.bitrates=c.SdkBitrateFrame.toObject(e.bitrates,t)),null!=e.audioControl&&e.hasOwnProperty("audioControl")&&(n.audioControl=c.SdkAudioControlFrame.toObject(e.audioControl,t)),null!=e.audioMetadata&&e.hasOwnProperty("audioMetadata")&&(n.audioMetadata=c.SdkAudioMetadataFrame.toObject(e.audioMetadata,t)),null!=e.audioStreamIdInfo&&e.hasOwnProperty("audioStreamIdInfo")&&(n.audioStreamIdInfo=c.SdkAudioStreamIdInfoFrame.toObject(e.audioStreamIdInfo,t)),null!=e.pingPong&&e.hasOwnProperty("pingPong")&&(n.pingPong=c.SdkPingPongFrame.toObject(e.pingPong,t)),null!=e.audioStatus&&e.hasOwnProperty("audioStatus")&&(n.audioStatus=c.SdkAudioStatusFrame.toObject(e.audioStatus,t)),null!=e.clientMetric&&e.hasOwnProperty("clientMetric")&&(n.clientMetric=c.SdkClientMetricFrame.toObject(e.clientMetric,t)),null!=e.dataMessage&&e.hasOwnProperty("dataMessage")&&(n.dataMessage=c.SdkDataMessageFrame.toObject(e.dataMessage,t)),null!=e.remoteVideoUpdate&&e.hasOwnProperty("remoteVideoUpdate")&&(n.remoteVideoUpdate=c.SdkRemoteVideoUpdateFrame.toObject(e.remoteVideoUpdate,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e.Type=(t={},(n=Object.create(t))[t[1]="JOIN"]=1,n[t[2]="JOIN_ACK"]=2,n[t[3]="SUBSCRIBE"]=3,n[t[4]="SUBSCRIBE_ACK"]=4,n[t[5]="INDEX"]=5,n[t[7]="PAUSE"]=7,n[t[8]="RESUME"]=8,n[t[9]="LEAVE"]=9,n[t[10]="LEAVE_ACK"]=10,n[t[13]="BITRATES"]=13,n[t[16]="AUDIO_CONTROL"]=16,n[t[17]="AUDIO_METADATA"]=17,n[t[18]="AUDIO_STREAM_ID_INFO"]=18,n[t[19]="PING_PONG"]=19,n[t[20]="AUDIO_STATUS"]=20,n[t[21]="CLIENT_METRIC"]=21,n[t[22]="DATA_MESSAGE"]=22,n[t[24]="REMOTE_VIDEO_UPDATE"]=24,n),e}(),c.SdkErrorFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.status=0,e.prototype.description="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.status&&e.hasOwnProperty("status")&&t.uint32(8).uint32(e.status),null!=e.description&&e.hasOwnProperty("description")&&t.uint32(18).string(e.description),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkErrorFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.status=e.uint32();break;case 2:r.description=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.status&&e.hasOwnProperty("status")&&!l.isInteger(e.status)?"status: integer expected":null!=e.description&&e.hasOwnProperty("description")&&!l.isString(e.description)?"description: string expected":null},e.fromObject=function(e){if(e instanceof c.SdkErrorFrame)return e;var t=new c.SdkErrorFrame;return null!=e.status&&(t.status=e.status>>>0),null!=e.description&&(t.description=String(e.description)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.status=0,n.description=""),null!=e.status&&e.hasOwnProperty("status")&&(n.status=e.status),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkJoinFlags=(r={},(i=Object.create(r))[r[1]="SEND_BITRATES"]=1,i[r[2]="HAS_STREAM_UPDATE"]=2,i[r[8]="USE_SEND_SIDE_BWE"]=8,i[r[16]="COMPLETE_VIDEO_SOURCES_LIST"]=16,i[r[32]="EXCLUDE_SELF_CONTENT_IN_INDEX"]=32,i),c.SdkClientDetails=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.appVersionName="",e.prototype.appVersionCode="",e.prototype.deviceModel="",e.prototype.deviceMake="",e.prototype.platformName="",e.prototype.platformVersion="",e.prototype.clientSource="",e.prototype.chimeSdkVersion="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.appVersionName&&e.hasOwnProperty("appVersionName")&&t.uint32(10).string(e.appVersionName),null!=e.appVersionCode&&e.hasOwnProperty("appVersionCode")&&t.uint32(18).string(e.appVersionCode),null!=e.deviceModel&&e.hasOwnProperty("deviceModel")&&t.uint32(26).string(e.deviceModel),null!=e.deviceMake&&e.hasOwnProperty("deviceMake")&&t.uint32(34).string(e.deviceMake),null!=e.platformName&&e.hasOwnProperty("platformName")&&t.uint32(42).string(e.platformName),null!=e.platformVersion&&e.hasOwnProperty("platformVersion")&&t.uint32(50).string(e.platformVersion),null!=e.clientSource&&e.hasOwnProperty("clientSource")&&t.uint32(58).string(e.clientSource),null!=e.chimeSdkVersion&&e.hasOwnProperty("chimeSdkVersion")&&t.uint32(66).string(e.chimeSdkVersion),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkClientDetails;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.appVersionName=e.string();break;case 2:r.appVersionCode=e.string();break;case 3:r.deviceModel=e.string();break;case 4:r.deviceMake=e.string();break;case 5:r.platformName=e.string();break;case 6:r.platformVersion=e.string();break;case 7:r.clientSource=e.string();break;case 8:r.chimeSdkVersion=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.appVersionName&&e.hasOwnProperty("appVersionName")&&!l.isString(e.appVersionName)?"appVersionName: string expected":null!=e.appVersionCode&&e.hasOwnProperty("appVersionCode")&&!l.isString(e.appVersionCode)?"appVersionCode: string expected":null!=e.deviceModel&&e.hasOwnProperty("deviceModel")&&!l.isString(e.deviceModel)?"deviceModel: string expected":null!=e.deviceMake&&e.hasOwnProperty("deviceMake")&&!l.isString(e.deviceMake)?"deviceMake: string expected":null!=e.platformName&&e.hasOwnProperty("platformName")&&!l.isString(e.platformName)?"platformName: string expected":null!=e.platformVersion&&e.hasOwnProperty("platformVersion")&&!l.isString(e.platformVersion)?"platformVersion: string expected":null!=e.clientSource&&e.hasOwnProperty("clientSource")&&!l.isString(e.clientSource)?"clientSource: string expected":null!=e.chimeSdkVersion&&e.hasOwnProperty("chimeSdkVersion")&&!l.isString(e.chimeSdkVersion)?"chimeSdkVersion: string expected":null},e.fromObject=function(e){if(e instanceof c.SdkClientDetails)return e;var t=new c.SdkClientDetails;return null!=e.appVersionName&&(t.appVersionName=String(e.appVersionName)),null!=e.appVersionCode&&(t.appVersionCode=String(e.appVersionCode)),null!=e.deviceModel&&(t.deviceModel=String(e.deviceModel)),null!=e.deviceMake&&(t.deviceMake=String(e.deviceMake)),null!=e.platformName&&(t.platformName=String(e.platformName)),null!=e.platformVersion&&(t.platformVersion=String(e.platformVersion)),null!=e.clientSource&&(t.clientSource=String(e.clientSource)),null!=e.chimeSdkVersion&&(t.chimeSdkVersion=String(e.chimeSdkVersion)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.appVersionName="",n.appVersionCode="",n.deviceModel="",n.deviceMake="",n.platformName="",n.platformVersion="",n.clientSource="",n.chimeSdkVersion=""),null!=e.appVersionName&&e.hasOwnProperty("appVersionName")&&(n.appVersionName=e.appVersionName),null!=e.appVersionCode&&e.hasOwnProperty("appVersionCode")&&(n.appVersionCode=e.appVersionCode),null!=e.deviceModel&&e.hasOwnProperty("deviceModel")&&(n.deviceModel=e.deviceModel),null!=e.deviceMake&&e.hasOwnProperty("deviceMake")&&(n.deviceMake=e.deviceMake),null!=e.platformName&&e.hasOwnProperty("platformName")&&(n.platformName=e.platformName),null!=e.platformVersion&&e.hasOwnProperty("platformVersion")&&(n.platformVersion=e.platformVersion),null!=e.clientSource&&e.hasOwnProperty("clientSource")&&(n.clientSource=e.clientSource),null!=e.chimeSdkVersion&&e.hasOwnProperty("chimeSdkVersion")&&(n.chimeSdkVersion=e.chimeSdkVersion),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkJoinFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.protocolVersion=2,e.prototype.maxNumOfVideos=8,e.prototype.flags=0,e.prototype.clientDetails=null,e.prototype.audioSessionId=l.Long?l.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.protocolVersion&&e.hasOwnProperty("protocolVersion")&&t.uint32(8).uint32(e.protocolVersion),null!=e.maxNumOfVideos&&e.hasOwnProperty("maxNumOfVideos")&&t.uint32(16).uint32(e.maxNumOfVideos),null!=e.flags&&e.hasOwnProperty("flags")&&t.uint32(24).uint32(e.flags),null!=e.clientDetails&&e.hasOwnProperty("clientDetails")&&c.SdkClientDetails.encode(e.clientDetails,t.uint32(34).fork()).ldelim(),null!=e.audioSessionId&&e.hasOwnProperty("audioSessionId")&&t.uint32(48).uint64(e.audioSessionId),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkJoinFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.protocolVersion=e.uint32();break;case 2:r.maxNumOfVideos=e.uint32();break;case 3:r.flags=e.uint32();break;case 4:r.clientDetails=c.SdkClientDetails.decode(e,e.uint32());break;case 6:r.audioSessionId=e.uint64();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.protocolVersion&&e.hasOwnProperty("protocolVersion")&&!l.isInteger(e.protocolVersion))return"protocolVersion: integer expected";if(null!=e.maxNumOfVideos&&e.hasOwnProperty("maxNumOfVideos")&&!l.isInteger(e.maxNumOfVideos))return"maxNumOfVideos: integer expected";if(null!=e.flags&&e.hasOwnProperty("flags")&&!l.isInteger(e.flags))return"flags: integer expected";if(null!=e.clientDetails&&e.hasOwnProperty("clientDetails")){var t=c.SdkClientDetails.verify(e.clientDetails);if(t)return"clientDetails."+t}return null!=e.audioSessionId&&e.hasOwnProperty("audioSessionId")&&!(l.isInteger(e.audioSessionId)||e.audioSessionId&&l.isInteger(e.audioSessionId.low)&&l.isInteger(e.audioSessionId.high))?"audioSessionId: integer|Long expected":null},e.fromObject=function(e){if(e instanceof c.SdkJoinFrame)return e;var t=new c.SdkJoinFrame;if(null!=e.protocolVersion&&(t.protocolVersion=e.protocolVersion>>>0),null!=e.maxNumOfVideos&&(t.maxNumOfVideos=e.maxNumOfVideos>>>0),null!=e.flags&&(t.flags=e.flags>>>0),null!=e.clientDetails){if("object"!=typeof e.clientDetails)throw TypeError(".SdkJoinFrame.clientDetails: object expected");t.clientDetails=c.SdkClientDetails.fromObject(e.clientDetails)}return null!=e.audioSessionId&&(l.Long?(t.audioSessionId=l.Long.fromValue(e.audioSessionId)).unsigned=!0:"string"==typeof e.audioSessionId?t.audioSessionId=parseInt(e.audioSessionId,10):"number"==typeof e.audioSessionId?t.audioSessionId=e.audioSessionId:"object"==typeof e.audioSessionId&&(t.audioSessionId=new l.LongBits(e.audioSessionId.low>>>0,e.audioSessionId.high>>>0).toNumber(!0))),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.protocolVersion=2,n.maxNumOfVideos=8,n.flags=0,n.clientDetails=null,l.Long){var r=new l.Long(0,0,!0);n.audioSessionId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.audioSessionId=t.longs===String?"0":0;return null!=e.protocolVersion&&e.hasOwnProperty("protocolVersion")&&(n.protocolVersion=e.protocolVersion),null!=e.maxNumOfVideos&&e.hasOwnProperty("maxNumOfVideos")&&(n.maxNumOfVideos=e.maxNumOfVideos),null!=e.flags&&e.hasOwnProperty("flags")&&(n.flags=e.flags),null!=e.clientDetails&&e.hasOwnProperty("clientDetails")&&(n.clientDetails=c.SdkClientDetails.toObject(e.clientDetails,t)),null!=e.audioSessionId&&e.hasOwnProperty("audioSessionId")&&("number"==typeof e.audioSessionId?n.audioSessionId=t.longs===String?String(e.audioSessionId):e.audioSessionId:n.audioSessionId=t.longs===String?l.Long.prototype.toString.call(e.audioSessionId):t.longs===Number?new l.LongBits(e.audioSessionId.low>>>0,e.audioSessionId.high>>>0).toNumber(!0):e.audioSessionId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkJoinAckFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.turnCredentials=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.turnCredentials&&e.hasOwnProperty("turnCredentials")&&c.SdkTurnCredentials.encode(e.turnCredentials,t.uint32(10).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkJoinAckFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.turnCredentials=c.SdkTurnCredentials.decode(e,e.uint32());break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.turnCredentials&&e.hasOwnProperty("turnCredentials")){var t=c.SdkTurnCredentials.verify(e.turnCredentials);if(t)return"turnCredentials."+t}return null},e.fromObject=function(e){if(e instanceof c.SdkJoinAckFrame)return e;var t=new c.SdkJoinAckFrame;if(null!=e.turnCredentials){if("object"!=typeof e.turnCredentials)throw TypeError(".SdkJoinAckFrame.turnCredentials: object expected");t.turnCredentials=c.SdkTurnCredentials.fromObject(e.turnCredentials)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.turnCredentials=null),null!=e.turnCredentials&&e.hasOwnProperty("turnCredentials")&&(n.turnCredentials=c.SdkTurnCredentials.toObject(e.turnCredentials,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkLeaveFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkLeaveFrame;e.pos<n;){var i=e.uint32();e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},e.fromObject=function(e){return e instanceof c.SdkLeaveFrame?e:new c.SdkLeaveFrame},e.toObject=function(){return{}},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkLeaveAckFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkLeaveAckFrame;e.pos<n;){var i=e.uint32();e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},e.fromObject=function(e){return e instanceof c.SdkLeaveAckFrame?e:new c.SdkLeaveAckFrame},e.toObject=function(){return{}},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkStreamServiceType=function(){var e={},t=Object.create(e);return t[e[1]="RX"]=1,t[e[2]="TX"]=2,t[e[3]="DUPLEX"]=3,t}(),c.SdkStreamMediaType=function(){var e={},t=Object.create(e);return t[e[1]="AUDIO"]=1,t[e[2]="VIDEO"]=2,t}(),c.SdkSubscribeFrame=function(){function e(e){if(this.sendStreams=[],this.receiveStreamIds=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.duplex=1,e.prototype.sendStreams=l.emptyArray,e.prototype.receiveStreamIds=l.emptyArray,e.prototype.sdpOffer="",e.prototype.audioHost="",e.prototype.audioCheckin=!1,e.prototype.audioMuted=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.duplex&&e.hasOwnProperty("duplex")&&t.uint32(8).int32(e.duplex),null!=e.sendStreams&&e.sendStreams.length)for(var n=0;n<e.sendStreams.length;++n)c.SdkStreamDescriptor.encode(e.sendStreams[n],t.uint32(18).fork()).ldelim();if(null!=e.receiveStreamIds&&e.receiveStreamIds.length)for(n=0;n<e.receiveStreamIds.length;++n)t.uint32(24).uint32(e.receiveStreamIds[n]);return null!=e.sdpOffer&&e.hasOwnProperty("sdpOffer")&&t.uint32(34).string(e.sdpOffer),null!=e.audioHost&&e.hasOwnProperty("audioHost")&&t.uint32(42).string(e.audioHost),null!=e.audioCheckin&&e.hasOwnProperty("audioCheckin")&&t.uint32(48).bool(e.audioCheckin),null!=e.audioMuted&&e.hasOwnProperty("audioMuted")&&t.uint32(56).bool(e.audioMuted),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkSubscribeFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.duplex=e.int32();break;case 2:r.sendStreams&&r.sendStreams.length||(r.sendStreams=[]),r.sendStreams.push(c.SdkStreamDescriptor.decode(e,e.uint32()));break;case 3:if(r.receiveStreamIds&&r.receiveStreamIds.length||(r.receiveStreamIds=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)r.receiveStreamIds.push(e.uint32());else r.receiveStreamIds.push(e.uint32());break;case 4:r.sdpOffer=e.string();break;case 5:r.audioHost=e.string();break;case 6:r.audioCheckin=e.bool();break;case 7:r.audioMuted=e.bool();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.duplex&&e.hasOwnProperty("duplex"))switch(e.duplex){default:return"duplex: enum value expected";case 1:case 2:case 3:}if(null!=e.sendStreams&&e.hasOwnProperty("sendStreams")){if(!Array.isArray(e.sendStreams))return"sendStreams: array expected";for(var t=0;t<e.sendStreams.length;++t){var n=c.SdkStreamDescriptor.verify(e.sendStreams[t]);if(n)return"sendStreams."+n}}if(null!=e.receiveStreamIds&&e.hasOwnProperty("receiveStreamIds")){if(!Array.isArray(e.receiveStreamIds))return"receiveStreamIds: array expected";for(t=0;t<e.receiveStreamIds.length;++t)if(!l.isInteger(e.receiveStreamIds[t]))return"receiveStreamIds: integer[] expected"}return null!=e.sdpOffer&&e.hasOwnProperty("sdpOffer")&&!l.isString(e.sdpOffer)?"sdpOffer: string expected":null!=e.audioHost&&e.hasOwnProperty("audioHost")&&!l.isString(e.audioHost)?"audioHost: string expected":null!=e.audioCheckin&&e.hasOwnProperty("audioCheckin")&&"boolean"!=typeof e.audioCheckin?"audioCheckin: boolean expected":null!=e.audioMuted&&e.hasOwnProperty("audioMuted")&&"boolean"!=typeof e.audioMuted?"audioMuted: boolean expected":null},e.fromObject=function(e){if(e instanceof c.SdkSubscribeFrame)return e;var t=new c.SdkSubscribeFrame;switch(e.duplex){case"RX":case 1:t.duplex=1;break;case"TX":case 2:t.duplex=2;break;case"DUPLEX":case 3:t.duplex=3}if(e.sendStreams){if(!Array.isArray(e.sendStreams))throw TypeError(".SdkSubscribeFrame.sendStreams: array expected");t.sendStreams=[];for(var n=0;n<e.sendStreams.length;++n){if("object"!=typeof e.sendStreams[n])throw TypeError(".SdkSubscribeFrame.sendStreams: object expected");t.sendStreams[n]=c.SdkStreamDescriptor.fromObject(e.sendStreams[n])}}if(e.receiveStreamIds){if(!Array.isArray(e.receiveStreamIds))throw TypeError(".SdkSubscribeFrame.receiveStreamIds: array expected");t.receiveStreamIds=[];for(n=0;n<e.receiveStreamIds.length;++n)t.receiveStreamIds[n]=e.receiveStreamIds[n]>>>0}return null!=e.sdpOffer&&(t.sdpOffer=String(e.sdpOffer)),null!=e.audioHost&&(t.audioHost=String(e.audioHost)),null!=e.audioCheckin&&(t.audioCheckin=Boolean(e.audioCheckin)),null!=e.audioMuted&&(t.audioMuted=Boolean(e.audioMuted)),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.sendStreams=[],n.receiveStreamIds=[]),t.defaults&&(n.duplex=t.enums===String?"RX":1,n.sdpOffer="",n.audioHost="",n.audioCheckin=!1,n.audioMuted=!1),null!=e.duplex&&e.hasOwnProperty("duplex")&&(n.duplex=t.enums===String?c.SdkStreamServiceType[e.duplex]:e.duplex),e.sendStreams&&e.sendStreams.length){n.sendStreams=[];for(var r=0;r<e.sendStreams.length;++r)n.sendStreams[r]=c.SdkStreamDescriptor.toObject(e.sendStreams[r],t)}if(e.receiveStreamIds&&e.receiveStreamIds.length){n.receiveStreamIds=[];for(r=0;r<e.receiveStreamIds.length;++r)n.receiveStreamIds[r]=e.receiveStreamIds[r]}return null!=e.sdpOffer&&e.hasOwnProperty("sdpOffer")&&(n.sdpOffer=e.sdpOffer),null!=e.audioHost&&e.hasOwnProperty("audioHost")&&(n.audioHost=e.audioHost),null!=e.audioCheckin&&e.hasOwnProperty("audioCheckin")&&(n.audioCheckin=e.audioCheckin),null!=e.audioMuted&&e.hasOwnProperty("audioMuted")&&(n.audioMuted=e.audioMuted),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkSubscribeAckFrame=function(){function e(e){if(this.allocations=[],this.tracks=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.duplex=1,e.prototype.allocations=l.emptyArray,e.prototype.sdpAnswer="",e.prototype.tracks=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.duplex&&e.hasOwnProperty("duplex")&&t.uint32(8).int32(e.duplex),null!=e.allocations&&e.allocations.length)for(var n=0;n<e.allocations.length;++n)c.SdkStreamAllocation.encode(e.allocations[n],t.uint32(18).fork()).ldelim();if(null!=e.sdpAnswer&&e.hasOwnProperty("sdpAnswer")&&t.uint32(26).string(e.sdpAnswer),null!=e.tracks&&e.tracks.length)for(n=0;n<e.tracks.length;++n)c.SdkTrackMapping.encode(e.tracks[n],t.uint32(34).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkSubscribeAckFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.duplex=e.int32();break;case 2:r.allocations&&r.allocations.length||(r.allocations=[]),r.allocations.push(c.SdkStreamAllocation.decode(e,e.uint32()));break;case 3:r.sdpAnswer=e.string();break;case 4:r.tracks&&r.tracks.length||(r.tracks=[]),r.tracks.push(c.SdkTrackMapping.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.duplex&&e.hasOwnProperty("duplex"))switch(e.duplex){default:return"duplex: enum value expected";case 1:case 2:case 3:}if(null!=e.allocations&&e.hasOwnProperty("allocations")){if(!Array.isArray(e.allocations))return"allocations: array expected";for(var t=0;t<e.allocations.length;++t){if(n=c.SdkStreamAllocation.verify(e.allocations[t]))return"allocations."+n}}if(null!=e.sdpAnswer&&e.hasOwnProperty("sdpAnswer")&&!l.isString(e.sdpAnswer))return"sdpAnswer: string expected";if(null!=e.tracks&&e.hasOwnProperty("tracks")){if(!Array.isArray(e.tracks))return"tracks: array expected";for(t=0;t<e.tracks.length;++t){var n;if(n=c.SdkTrackMapping.verify(e.tracks[t]))return"tracks."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkSubscribeAckFrame)return e;var t=new c.SdkSubscribeAckFrame;switch(e.duplex){case"RX":case 1:t.duplex=1;break;case"TX":case 2:t.duplex=2;break;case"DUPLEX":case 3:t.duplex=3}if(e.allocations){if(!Array.isArray(e.allocations))throw TypeError(".SdkSubscribeAckFrame.allocations: array expected");t.allocations=[];for(var n=0;n<e.allocations.length;++n){if("object"!=typeof e.allocations[n])throw TypeError(".SdkSubscribeAckFrame.allocations: object expected");t.allocations[n]=c.SdkStreamAllocation.fromObject(e.allocations[n])}}if(null!=e.sdpAnswer&&(t.sdpAnswer=String(e.sdpAnswer)),e.tracks){if(!Array.isArray(e.tracks))throw TypeError(".SdkSubscribeAckFrame.tracks: array expected");t.tracks=[];for(n=0;n<e.tracks.length;++n){if("object"!=typeof e.tracks[n])throw TypeError(".SdkSubscribeAckFrame.tracks: object expected");t.tracks[n]=c.SdkTrackMapping.fromObject(e.tracks[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.allocations=[],n.tracks=[]),t.defaults&&(n.duplex=t.enums===String?"RX":1,n.sdpAnswer=""),null!=e.duplex&&e.hasOwnProperty("duplex")&&(n.duplex=t.enums===String?c.SdkStreamServiceType[e.duplex]:e.duplex),e.allocations&&e.allocations.length){n.allocations=[];for(var r=0;r<e.allocations.length;++r)n.allocations[r]=c.SdkStreamAllocation.toObject(e.allocations[r],t)}if(null!=e.sdpAnswer&&e.hasOwnProperty("sdpAnswer")&&(n.sdpAnswer=e.sdpAnswer),e.tracks&&e.tracks.length){n.tracks=[];for(r=0;r<e.tracks.length;++r)n.tracks[r]=c.SdkTrackMapping.toObject(e.tracks[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkIndexFrame=function(){function e(e){if(this.sources=[],this.pausedAtSourceIds=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.atCapacity=!1,e.prototype.sources=l.emptyArray,e.prototype.pausedAtSourceIds=l.emptyArray,e.prototype.numParticipants=0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.atCapacity&&e.hasOwnProperty("atCapacity")&&t.uint32(8).bool(e.atCapacity),null!=e.sources&&e.sources.length)for(var n=0;n<e.sources.length;++n)c.SdkStreamDescriptor.encode(e.sources[n],t.uint32(18).fork()).ldelim();if(null!=e.pausedAtSourceIds&&e.pausedAtSourceIds.length)for(n=0;n<e.pausedAtSourceIds.length;++n)t.uint32(24).uint32(e.pausedAtSourceIds[n]);return null!=e.numParticipants&&e.hasOwnProperty("numParticipants")&&t.uint32(32).uint32(e.numParticipants),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkIndexFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.atCapacity=e.bool();break;case 2:r.sources&&r.sources.length||(r.sources=[]),r.sources.push(c.SdkStreamDescriptor.decode(e,e.uint32()));break;case 3:if(r.pausedAtSourceIds&&r.pausedAtSourceIds.length||(r.pausedAtSourceIds=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)r.pausedAtSourceIds.push(e.uint32());else r.pausedAtSourceIds.push(e.uint32());break;case 4:r.numParticipants=e.uint32();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.atCapacity&&e.hasOwnProperty("atCapacity")&&"boolean"!=typeof e.atCapacity)return"atCapacity: boolean expected";if(null!=e.sources&&e.hasOwnProperty("sources")){if(!Array.isArray(e.sources))return"sources: array expected";for(var t=0;t<e.sources.length;++t){var n=c.SdkStreamDescriptor.verify(e.sources[t]);if(n)return"sources."+n}}if(null!=e.pausedAtSourceIds&&e.hasOwnProperty("pausedAtSourceIds")){if(!Array.isArray(e.pausedAtSourceIds))return"pausedAtSourceIds: array expected";for(t=0;t<e.pausedAtSourceIds.length;++t)if(!l.isInteger(e.pausedAtSourceIds[t]))return"pausedAtSourceIds: integer[] expected"}return null!=e.numParticipants&&e.hasOwnProperty("numParticipants")&&!l.isInteger(e.numParticipants)?"numParticipants: integer expected":null},e.fromObject=function(e){if(e instanceof c.SdkIndexFrame)return e;var t=new c.SdkIndexFrame;if(null!=e.atCapacity&&(t.atCapacity=Boolean(e.atCapacity)),e.sources){if(!Array.isArray(e.sources))throw TypeError(".SdkIndexFrame.sources: array expected");t.sources=[];for(var n=0;n<e.sources.length;++n){if("object"!=typeof e.sources[n])throw TypeError(".SdkIndexFrame.sources: object expected");t.sources[n]=c.SdkStreamDescriptor.fromObject(e.sources[n])}}if(e.pausedAtSourceIds){if(!Array.isArray(e.pausedAtSourceIds))throw TypeError(".SdkIndexFrame.pausedAtSourceIds: array expected");t.pausedAtSourceIds=[];for(n=0;n<e.pausedAtSourceIds.length;++n)t.pausedAtSourceIds[n]=e.pausedAtSourceIds[n]>>>0}return null!=e.numParticipants&&(t.numParticipants=e.numParticipants>>>0),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.sources=[],n.pausedAtSourceIds=[]),t.defaults&&(n.atCapacity=!1,n.numParticipants=0),null!=e.atCapacity&&e.hasOwnProperty("atCapacity")&&(n.atCapacity=e.atCapacity),e.sources&&e.sources.length){n.sources=[];for(var r=0;r<e.sources.length;++r)n.sources[r]=c.SdkStreamDescriptor.toObject(e.sources[r],t)}if(e.pausedAtSourceIds&&e.pausedAtSourceIds.length){n.pausedAtSourceIds=[];for(r=0;r<e.pausedAtSourceIds.length;++r)n.pausedAtSourceIds[r]=e.pausedAtSourceIds[r]}return null!=e.numParticipants&&e.hasOwnProperty("numParticipants")&&(n.numParticipants=e.numParticipants),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkPauseResumeFrame=function(){function e(e){if(this.streamIds=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.streamIds=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.streamIds&&e.streamIds.length)for(var n=0;n<e.streamIds.length;++n)t.uint32(8).uint32(e.streamIds[n]);return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkPauseResumeFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:if(r.streamIds&&r.streamIds.length||(r.streamIds=[]),2==(7&i))for(var a=e.uint32()+e.pos;e.pos<a;)r.streamIds.push(e.uint32());else r.streamIds.push(e.uint32());break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.streamIds&&e.hasOwnProperty("streamIds")){if(!Array.isArray(e.streamIds))return"streamIds: array expected";for(var t=0;t<e.streamIds.length;++t)if(!l.isInteger(e.streamIds[t]))return"streamIds: integer[] expected"}return null},e.fromObject=function(e){if(e instanceof c.SdkPauseResumeFrame)return e;var t=new c.SdkPauseResumeFrame;if(e.streamIds){if(!Array.isArray(e.streamIds))throw TypeError(".SdkPauseResumeFrame.streamIds: array expected");t.streamIds=[];for(var n=0;n<e.streamIds.length;++n)t.streamIds[n]=e.streamIds[n]>>>0}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.streamIds=[]),e.streamIds&&e.streamIds.length){n.streamIds=[];for(var r=0;r<e.streamIds.length;++r)n.streamIds[r]=e.streamIds[r]}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkBitrateFrame=function(){function e(e){if(this.bitrates=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.bitrates=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.bitrates&&e.bitrates.length)for(var n=0;n<e.bitrates.length;++n)c.SdkBitrate.encode(e.bitrates[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkBitrateFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.bitrates&&r.bitrates.length||(r.bitrates=[]),r.bitrates.push(c.SdkBitrate.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.bitrates&&e.hasOwnProperty("bitrates")){if(!Array.isArray(e.bitrates))return"bitrates: array expected";for(var t=0;t<e.bitrates.length;++t){var n=c.SdkBitrate.verify(e.bitrates[t]);if(n)return"bitrates."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkBitrateFrame)return e;var t=new c.SdkBitrateFrame;if(e.bitrates){if(!Array.isArray(e.bitrates))throw TypeError(".SdkBitrateFrame.bitrates: array expected");t.bitrates=[];for(var n=0;n<e.bitrates.length;++n){if("object"!=typeof e.bitrates[n])throw TypeError(".SdkBitrateFrame.bitrates: object expected");t.bitrates[n]=c.SdkBitrate.fromObject(e.bitrates[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.bitrates=[]),e.bitrates&&e.bitrates.length){n.bitrates=[];for(var r=0;r<e.bitrates.length;++r)n.bitrates[r]=c.SdkBitrate.toObject(e.bitrates[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkStreamDescriptor=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.streamId=0,e.prototype.framerate=0,e.prototype.maxBitrateKbps=0,e.prototype.trackLabel="",e.prototype.groupId=0,e.prototype.avgBitrateBps=0,e.prototype.attendeeId="",e.prototype.mediaType=1,e.prototype.externalUserId="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.streamId&&e.hasOwnProperty("streamId")&&t.uint32(8).uint32(e.streamId),null!=e.framerate&&e.hasOwnProperty("framerate")&&t.uint32(16).uint32(e.framerate),null!=e.maxBitrateKbps&&e.hasOwnProperty("maxBitrateKbps")&&t.uint32(24).uint32(e.maxBitrateKbps),null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&t.uint32(34).string(e.trackLabel),null!=e.groupId&&e.hasOwnProperty("groupId")&&t.uint32(48).uint32(e.groupId),null!=e.avgBitrateBps&&e.hasOwnProperty("avgBitrateBps")&&t.uint32(56).uint32(e.avgBitrateBps),null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&t.uint32(66).string(e.attendeeId),null!=e.mediaType&&e.hasOwnProperty("mediaType")&&t.uint32(72).int32(e.mediaType),null!=e.externalUserId&&e.hasOwnProperty("externalUserId")&&t.uint32(82).string(e.externalUserId),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkStreamDescriptor;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.streamId=e.uint32();break;case 2:r.framerate=e.uint32();break;case 3:r.maxBitrateKbps=e.uint32();break;case 4:r.trackLabel=e.string();break;case 6:r.groupId=e.uint32();break;case 7:r.avgBitrateBps=e.uint32();break;case 8:r.attendeeId=e.string();break;case 9:r.mediaType=e.int32();break;case 10:r.externalUserId=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.streamId&&e.hasOwnProperty("streamId")&&!l.isInteger(e.streamId))return"streamId: integer expected";if(null!=e.framerate&&e.hasOwnProperty("framerate")&&!l.isInteger(e.framerate))return"framerate: integer expected";if(null!=e.maxBitrateKbps&&e.hasOwnProperty("maxBitrateKbps")&&!l.isInteger(e.maxBitrateKbps))return"maxBitrateKbps: integer expected";if(null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&!l.isString(e.trackLabel))return"trackLabel: string expected";if(null!=e.groupId&&e.hasOwnProperty("groupId")&&!l.isInteger(e.groupId))return"groupId: integer expected";if(null!=e.avgBitrateBps&&e.hasOwnProperty("avgBitrateBps")&&!l.isInteger(e.avgBitrateBps))return"avgBitrateBps: integer expected";if(null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&!l.isString(e.attendeeId))return"attendeeId: string expected";if(null!=e.mediaType&&e.hasOwnProperty("mediaType"))switch(e.mediaType){default:return"mediaType: enum value expected";case 1:case 2:}return null!=e.externalUserId&&e.hasOwnProperty("externalUserId")&&!l.isString(e.externalUserId)?"externalUserId: string expected":null},e.fromObject=function(e){if(e instanceof c.SdkStreamDescriptor)return e;var t=new c.SdkStreamDescriptor;switch(null!=e.streamId&&(t.streamId=e.streamId>>>0),null!=e.framerate&&(t.framerate=e.framerate>>>0),null!=e.maxBitrateKbps&&(t.maxBitrateKbps=e.maxBitrateKbps>>>0),null!=e.trackLabel&&(t.trackLabel=String(e.trackLabel)),null!=e.groupId&&(t.groupId=e.groupId>>>0),null!=e.avgBitrateBps&&(t.avgBitrateBps=e.avgBitrateBps>>>0),null!=e.attendeeId&&(t.attendeeId=String(e.attendeeId)),e.mediaType){case"AUDIO":case 1:t.mediaType=1;break;case"VIDEO":case 2:t.mediaType=2}return null!=e.externalUserId&&(t.externalUserId=String(e.externalUserId)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.streamId=0,n.framerate=0,n.maxBitrateKbps=0,n.trackLabel="",n.groupId=0,n.avgBitrateBps=0,n.attendeeId="",n.mediaType=t.enums===String?"AUDIO":1,n.externalUserId=""),null!=e.streamId&&e.hasOwnProperty("streamId")&&(n.streamId=e.streamId),null!=e.framerate&&e.hasOwnProperty("framerate")&&(n.framerate=e.framerate),null!=e.maxBitrateKbps&&e.hasOwnProperty("maxBitrateKbps")&&(n.maxBitrateKbps=e.maxBitrateKbps),null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&(n.trackLabel=e.trackLabel),null!=e.groupId&&e.hasOwnProperty("groupId")&&(n.groupId=e.groupId),null!=e.avgBitrateBps&&e.hasOwnProperty("avgBitrateBps")&&(n.avgBitrateBps=e.avgBitrateBps),null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&(n.attendeeId=e.attendeeId),null!=e.mediaType&&e.hasOwnProperty("mediaType")&&(n.mediaType=t.enums===String?c.SdkStreamMediaType[e.mediaType]:e.mediaType),null!=e.externalUserId&&e.hasOwnProperty("externalUserId")&&(n.externalUserId=e.externalUserId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkStreamAllocation=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.trackLabel="",e.prototype.streamId=0,e.prototype.groupId=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&t.uint32(10).string(e.trackLabel),null!=e.streamId&&e.hasOwnProperty("streamId")&&t.uint32(16).uint32(e.streamId),null!=e.groupId&&e.hasOwnProperty("groupId")&&t.uint32(24).uint32(e.groupId),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkStreamAllocation;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.trackLabel=e.string();break;case 2:r.streamId=e.uint32();break;case 3:r.groupId=e.uint32();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&!l.isString(e.trackLabel)?"trackLabel: string expected":null!=e.streamId&&e.hasOwnProperty("streamId")&&!l.isInteger(e.streamId)?"streamId: integer expected":null!=e.groupId&&e.hasOwnProperty("groupId")&&!l.isInteger(e.groupId)?"groupId: integer expected":null},e.fromObject=function(e){if(e instanceof c.SdkStreamAllocation)return e;var t=new c.SdkStreamAllocation;return null!=e.trackLabel&&(t.trackLabel=String(e.trackLabel)),null!=e.streamId&&(t.streamId=e.streamId>>>0),null!=e.groupId&&(t.groupId=e.groupId>>>0),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.trackLabel="",n.streamId=0,n.groupId=0),null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&(n.trackLabel=e.trackLabel),null!=e.streamId&&e.hasOwnProperty("streamId")&&(n.streamId=e.streamId),null!=e.groupId&&e.hasOwnProperty("groupId")&&(n.groupId=e.groupId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkTrackMapping=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.streamId=0,e.prototype.ssrc=0,e.prototype.trackLabel="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.streamId&&e.hasOwnProperty("streamId")&&t.uint32(8).uint32(e.streamId),null!=e.ssrc&&e.hasOwnProperty("ssrc")&&t.uint32(16).uint32(e.ssrc),null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&t.uint32(26).string(e.trackLabel),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTrackMapping;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.streamId=e.uint32();break;case 2:r.ssrc=e.uint32();break;case 3:r.trackLabel=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.streamId&&e.hasOwnProperty("streamId")&&!l.isInteger(e.streamId)?"streamId: integer expected":null!=e.ssrc&&e.hasOwnProperty("ssrc")&&!l.isInteger(e.ssrc)?"ssrc: integer expected":null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&!l.isString(e.trackLabel)?"trackLabel: string expected":null},e.fromObject=function(e){if(e instanceof c.SdkTrackMapping)return e;var t=new c.SdkTrackMapping;return null!=e.streamId&&(t.streamId=e.streamId>>>0),null!=e.ssrc&&(t.ssrc=e.ssrc>>>0),null!=e.trackLabel&&(t.trackLabel=String(e.trackLabel)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.streamId=0,n.ssrc=0,n.trackLabel=""),null!=e.streamId&&e.hasOwnProperty("streamId")&&(n.streamId=e.streamId),null!=e.ssrc&&e.hasOwnProperty("ssrc")&&(n.ssrc=e.ssrc),null!=e.trackLabel&&e.hasOwnProperty("trackLabel")&&(n.trackLabel=e.trackLabel),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkBitrate=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.sourceStreamId=0,e.prototype.avgBitrateBps=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.sourceStreamId&&e.hasOwnProperty("sourceStreamId")&&t.uint32(8).uint32(e.sourceStreamId),null!=e.avgBitrateBps&&e.hasOwnProperty("avgBitrateBps")&&t.uint32(16).uint32(e.avgBitrateBps),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkBitrate;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.sourceStreamId=e.uint32();break;case 2:r.avgBitrateBps=e.uint32();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.sourceStreamId&&e.hasOwnProperty("sourceStreamId")&&!l.isInteger(e.sourceStreamId)?"sourceStreamId: integer expected":null!=e.avgBitrateBps&&e.hasOwnProperty("avgBitrateBps")&&!l.isInteger(e.avgBitrateBps)?"avgBitrateBps: integer expected":null},e.fromObject=function(e){if(e instanceof c.SdkBitrate)return e;var t=new c.SdkBitrate;return null!=e.sourceStreamId&&(t.sourceStreamId=e.sourceStreamId>>>0),null!=e.avgBitrateBps&&(t.avgBitrateBps=e.avgBitrateBps>>>0),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.sourceStreamId=0,n.avgBitrateBps=0),null!=e.sourceStreamId&&e.hasOwnProperty("sourceStreamId")&&(n.sourceStreamId=e.sourceStreamId),null!=e.avgBitrateBps&&e.hasOwnProperty("avgBitrateBps")&&(n.avgBitrateBps=e.avgBitrateBps),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkAudioControlFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.muted=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.muted&&e.hasOwnProperty("muted")&&t.uint32(8).bool(e.muted),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkAudioControlFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.muted=e.bool();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.muted&&e.hasOwnProperty("muted")&&"boolean"!=typeof e.muted?"muted: boolean expected":null},e.fromObject=function(e){if(e instanceof c.SdkAudioControlFrame)return e;var t=new c.SdkAudioControlFrame;return null!=e.muted&&(t.muted=Boolean(e.muted)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.muted=!1),null!=e.muted&&e.hasOwnProperty("muted")&&(n.muted=e.muted),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkAudioMetadataFrame=function(){function e(e){if(this.attendeeStates=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.attendeeStates=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.attendeeStates&&e.attendeeStates.length)for(var n=0;n<e.attendeeStates.length;++n)c.SdkAudioAttendeeState.encode(e.attendeeStates[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkAudioMetadataFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.attendeeStates&&r.attendeeStates.length||(r.attendeeStates=[]),r.attendeeStates.push(c.SdkAudioAttendeeState.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attendeeStates&&e.hasOwnProperty("attendeeStates")){if(!Array.isArray(e.attendeeStates))return"attendeeStates: array expected";for(var t=0;t<e.attendeeStates.length;++t){var n=c.SdkAudioAttendeeState.verify(e.attendeeStates[t]);if(n)return"attendeeStates."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkAudioMetadataFrame)return e;var t=new c.SdkAudioMetadataFrame;if(e.attendeeStates){if(!Array.isArray(e.attendeeStates))throw TypeError(".SdkAudioMetadataFrame.attendeeStates: array expected");t.attendeeStates=[];for(var n=0;n<e.attendeeStates.length;++n){if("object"!=typeof e.attendeeStates[n])throw TypeError(".SdkAudioMetadataFrame.attendeeStates: object expected");t.attendeeStates[n]=c.SdkAudioAttendeeState.fromObject(e.attendeeStates[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attendeeStates=[]),e.attendeeStates&&e.attendeeStates.length){n.attendeeStates=[];for(var r=0;r<e.attendeeStates.length;++r)n.attendeeStates[r]=c.SdkAudioAttendeeState.toObject(e.attendeeStates[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkAudioAttendeeState=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.audioStreamId=0,e.prototype.volume=0,e.prototype.muted=!1,e.prototype.signalStrength=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.audioStreamId&&e.hasOwnProperty("audioStreamId")&&t.uint32(8).uint32(e.audioStreamId),null!=e.volume&&e.hasOwnProperty("volume")&&t.uint32(16).uint32(e.volume),null!=e.muted&&e.hasOwnProperty("muted")&&t.uint32(24).bool(e.muted),null!=e.signalStrength&&e.hasOwnProperty("signalStrength")&&t.uint32(32).uint32(e.signalStrength),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkAudioAttendeeState;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.audioStreamId=e.uint32();break;case 2:r.volume=e.uint32();break;case 3:r.muted=e.bool();break;case 4:r.signalStrength=e.uint32();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.audioStreamId&&e.hasOwnProperty("audioStreamId")&&!l.isInteger(e.audioStreamId)?"audioStreamId: integer expected":null!=e.volume&&e.hasOwnProperty("volume")&&!l.isInteger(e.volume)?"volume: integer expected":null!=e.muted&&e.hasOwnProperty("muted")&&"boolean"!=typeof e.muted?"muted: boolean expected":null!=e.signalStrength&&e.hasOwnProperty("signalStrength")&&!l.isInteger(e.signalStrength)?"signalStrength: integer expected":null},e.fromObject=function(e){if(e instanceof c.SdkAudioAttendeeState)return e;var t=new c.SdkAudioAttendeeState;return null!=e.audioStreamId&&(t.audioStreamId=e.audioStreamId>>>0),null!=e.volume&&(t.volume=e.volume>>>0),null!=e.muted&&(t.muted=Boolean(e.muted)),null!=e.signalStrength&&(t.signalStrength=e.signalStrength>>>0),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.audioStreamId=0,n.volume=0,n.muted=!1,n.signalStrength=0),null!=e.audioStreamId&&e.hasOwnProperty("audioStreamId")&&(n.audioStreamId=e.audioStreamId),null!=e.volume&&e.hasOwnProperty("volume")&&(n.volume=e.volume),null!=e.muted&&e.hasOwnProperty("muted")&&(n.muted=e.muted),null!=e.signalStrength&&e.hasOwnProperty("signalStrength")&&(n.signalStrength=e.signalStrength),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkAudioStreamIdInfoFrame=function(){function e(e){if(this.streams=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.streams=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.streams&&e.streams.length)for(var n=0;n<e.streams.length;++n)c.SdkAudioStreamIdInfo.encode(e.streams[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkAudioStreamIdInfoFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.streams&&r.streams.length||(r.streams=[]),r.streams.push(c.SdkAudioStreamIdInfo.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.streams&&e.hasOwnProperty("streams")){if(!Array.isArray(e.streams))return"streams: array expected";for(var t=0;t<e.streams.length;++t){var n=c.SdkAudioStreamIdInfo.verify(e.streams[t]);if(n)return"streams."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkAudioStreamIdInfoFrame)return e;var t=new c.SdkAudioStreamIdInfoFrame;if(e.streams){if(!Array.isArray(e.streams))throw TypeError(".SdkAudioStreamIdInfoFrame.streams: array expected");t.streams=[];for(var n=0;n<e.streams.length;++n){if("object"!=typeof e.streams[n])throw TypeError(".SdkAudioStreamIdInfoFrame.streams: object expected");t.streams[n]=c.SdkAudioStreamIdInfo.fromObject(e.streams[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.streams=[]),e.streams&&e.streams.length){n.streams=[];for(var r=0;r<e.streams.length;++r)n.streams[r]=c.SdkAudioStreamIdInfo.toObject(e.streams[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkAudioStreamIdInfo=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.audioStreamId=0,e.prototype.attendeeId="",e.prototype.muted=!1,e.prototype.externalUserId="",e.prototype.dropped=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.audioStreamId&&e.hasOwnProperty("audioStreamId")&&t.uint32(8).uint32(e.audioStreamId),null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&t.uint32(18).string(e.attendeeId),null!=e.muted&&e.hasOwnProperty("muted")&&t.uint32(24).bool(e.muted),null!=e.externalUserId&&e.hasOwnProperty("externalUserId")&&t.uint32(34).string(e.externalUserId),null!=e.dropped&&e.hasOwnProperty("dropped")&&t.uint32(40).bool(e.dropped),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkAudioStreamIdInfo;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.audioStreamId=e.uint32();break;case 2:r.attendeeId=e.string();break;case 3:r.muted=e.bool();break;case 4:r.externalUserId=e.string();break;case 5:r.dropped=e.bool();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.audioStreamId&&e.hasOwnProperty("audioStreamId")&&!l.isInteger(e.audioStreamId)?"audioStreamId: integer expected":null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&!l.isString(e.attendeeId)?"attendeeId: string expected":null!=e.muted&&e.hasOwnProperty("muted")&&"boolean"!=typeof e.muted?"muted: boolean expected":null!=e.externalUserId&&e.hasOwnProperty("externalUserId")&&!l.isString(e.externalUserId)?"externalUserId: string expected":null!=e.dropped&&e.hasOwnProperty("dropped")&&"boolean"!=typeof e.dropped?"dropped: boolean expected":null},e.fromObject=function(e){if(e instanceof c.SdkAudioStreamIdInfo)return e;var t=new c.SdkAudioStreamIdInfo;return null!=e.audioStreamId&&(t.audioStreamId=e.audioStreamId>>>0),null!=e.attendeeId&&(t.attendeeId=String(e.attendeeId)),null!=e.muted&&(t.muted=Boolean(e.muted)),null!=e.externalUserId&&(t.externalUserId=String(e.externalUserId)),null!=e.dropped&&(t.dropped=Boolean(e.dropped)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.audioStreamId=0,n.attendeeId="",n.muted=!1,n.externalUserId="",n.dropped=!1),null!=e.audioStreamId&&e.hasOwnProperty("audioStreamId")&&(n.audioStreamId=e.audioStreamId),null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&(n.attendeeId=e.attendeeId),null!=e.muted&&e.hasOwnProperty("muted")&&(n.muted=e.muted),null!=e.externalUserId&&e.hasOwnProperty("externalUserId")&&(n.externalUserId=e.externalUserId),null!=e.dropped&&e.hasOwnProperty("dropped")&&(n.dropped=e.dropped),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkPingPongType=function(){var e={},t=Object.create(e);return t[e[1]="PING"]=1,t[e[2]="PONG"]=2,t}(),c.SdkPingPongFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.type=1,e.prototype.pingId=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),t.uint32(8).int32(e.type),t.uint32(16).uint32(e.pingId),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkPingPongFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.type=e.int32();break;case 2:r.pingId=e.uint32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw l.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("pingId"))throw l.ProtocolError("missing required 'pingId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";switch(e.type){default:return"type: enum value expected";case 1:case 2:}return l.isInteger(e.pingId)?null:"pingId: integer expected"},e.fromObject=function(e){if(e instanceof c.SdkPingPongFrame)return e;var t=new c.SdkPingPongFrame;switch(e.type){case"PING":case 1:t.type=1;break;case"PONG":case 2:t.type=2}return null!=e.pingId&&(t.pingId=e.pingId>>>0),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=t.enums===String?"PING":1,n.pingId=0),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?c.SdkPingPongType[e.type]:e.type),null!=e.pingId&&e.hasOwnProperty("pingId")&&(n.pingId=e.pingId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkAudioStatusFrame=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.audioStatus=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.audioStatus&&e.hasOwnProperty("audioStatus")&&t.uint32(8).uint32(e.audioStatus),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkAudioStatusFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.audioStatus=e.uint32();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.audioStatus&&e.hasOwnProperty("audioStatus")&&!l.isInteger(e.audioStatus)?"audioStatus: integer expected":null},e.fromObject=function(e){if(e instanceof c.SdkAudioStatusFrame)return e;var t=new c.SdkAudioStatusFrame;return null!=e.audioStatus&&(t.audioStatus=e.audioStatus>>>0),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.audioStatus=0),null!=e.audioStatus&&e.hasOwnProperty("audioStatus")&&(n.audioStatus=e.audioStatus),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkMetric=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.type=1,e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.type&&e.hasOwnProperty("type")&&t.uint32(8).int32(e.type),null!=e.value&&e.hasOwnProperty("value")&&t.uint32(17).double(e.value),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkMetric;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.type=e.int32();break;case 2:r.value=e.double();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 64:case 66:case 69:case 72:case 86:case 87:}return null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},e.fromObject=function(e){if(e instanceof c.SdkMetric)return e;var t=new c.SdkMetric;switch(e.type){case"VIDEO_ACTUAL_ENCODER_BITRATE":case 1:t.type=1;break;case"VIDEO_AVAILABLE_SEND_BANDWIDTH":case 2:t.type=2;break;case"VIDEO_RETRANSMIT_BITRATE":case 3:t.type=3;break;case"VIDEO_AVAILABLE_RECEIVE_BANDWIDTH":case 4:t.type=4;break;case"VIDEO_TARGET_ENCODER_BITRATE":case 5:t.type=5;break;case"VIDEO_BUCKET_DELAY_MS":case 6:t.type=6;break;case"STUN_RTT_MS":case 7:t.type=7;break;case"SOCKET_DISCARDED_PPS":case 8:t.type=8;break;case"RTC_MIC_JITTER_MS":case 9:t.type=9;break;case"RTC_MIC_PPS":case 10:t.type=10;break;case"RTC_MIC_FRACTION_PACKET_LOST_PERCENT":case 11:t.type=11;break;case"RTC_MIC_BITRATE":case 12:t.type=12;break;case"RTC_MIC_RTT_MS":case 13:t.type=13;break;case"RTC_SPK_PPS":case 14:t.type=14;break;case"RTC_SPK_FRACTION_PACKET_LOST_PERCENT":case 15:t.type=15;break;case"RTC_SPK_JITTER_MS":case 16:t.type=16;break;case"RTC_SPK_FRACTION_DECODER_LOSS_PERCENT":case 17:t.type=17;break;case"RTC_SPK_BITRATE":case 18:t.type=18;break;case"RTC_SPK_CURRENT_DELAY_MS":case 19:t.type=19;break;case"RTC_SPK_JITTER_BUFFER_MS":case 20:t.type=20;break;case"VIDEO_SENT_RTT_MS":case 21:t.type=21;break;case"VIDEO_ENCODE_USAGE_PERCENT":case 22:t.type=22;break;case"VIDEO_NACKS_RECEIVED":case 23:t.type=23;break;case"VIDEO_PLIS_RECEIVED":case 24:t.type=24;break;case"VIDEO_AVERAGE_ENCODE_MS":case 25:t.type=25;break;case"VIDEO_INPUT_FPS":case 26:t.type=26;break;case"VIDEO_ENCODE_FPS":case 27:t.type=27;break;case"VIDEO_SENT_FPS":case 28:t.type=28;break;case"VIDEO_FIRS_RECEIVED":case 29:t.type=29;break;case"VIDEO_SENT_PPS":case 30:t.type=30;break;case"VIDEO_SENT_FRACTION_PACKET_LOST_PERCENT":case 31:t.type=31;break;case"VIDEO_SENT_BITRATE":case 32:t.type=32;break;case"VIDEO_DROPPED_FPS":case 33:t.type=33;break;case"VIDEO_TARGET_DELAY_MS":case 34:t.type=34;break;case"VIDEO_DECODE_MS":case 35:t.type=35;break;case"VIDEO_OUTPUT_FPS":case 36:t.type=36;break;case"VIDEO_RECEIVED_PPS":case 37:t.type=37;break;case"VIDEO_RECEIVED_FRACTION_PACKET_LOST_PERCENT":case 38:t.type=38;break;case"VIDEO_RENDER_DELAY_MS":case 39:t.type=39;break;case"VIDEO_RECEIVED_FPS":case 40:t.type=40;break;case"VIDEO_DECODE_FPS":case 41:t.type=41;break;case"VIDEO_NACKS_SENT":case 42:t.type=42;break;case"VIDEO_FIRS_SENT":case 43:t.type=43;break;case"VIDEO_RECEIVED_BITRATE":case 44:t.type=44;break;case"VIDEO_CURRENT_DELAY_MS":case 45:t.type=45;break;case"VIDEO_JITTER_BUFFER_MS":case 46:t.type=46;break;case"VIDEO_DISCARDED_PPS":case 47:t.type=47;break;case"VIDEO_PLIS_SENT":case 48:t.type=48;break;case"VIDEO_RECEIVED_JITTER_MS":case 49:t.type=49;break;case"VIDEO_ENCODE_HEIGHT":case 64:t.type=64;break;case"VIDEO_SENT_QP_SUM":case 66:t.type=66;break;case"VIDEO_DECODE_HEIGHT":case 69:t.type=69;break;case"VIDEO_RECEIVED_QP_SUM":case 72:t.type=72;break;case"VIDEO_ENCODE_WIDTH":case 86:t.type=86;break;case"VIDEO_DECODE_WIDTH":case 87:t.type=87}return null!=e.value&&(t.value=Number(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=t.enums===String?"VIDEO_ACTUAL_ENCODER_BITRATE":1,n.value=0),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?c.SdkMetric.Type[e.type]:e.type),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e.Type=function(){var e={},t=Object.create(e);return t[e[1]="VIDEO_ACTUAL_ENCODER_BITRATE"]=1,t[e[2]="VIDEO_AVAILABLE_SEND_BANDWIDTH"]=2,t[e[3]="VIDEO_RETRANSMIT_BITRATE"]=3,t[e[4]="VIDEO_AVAILABLE_RECEIVE_BANDWIDTH"]=4,t[e[5]="VIDEO_TARGET_ENCODER_BITRATE"]=5,t[e[6]="VIDEO_BUCKET_DELAY_MS"]=6,t[e[7]="STUN_RTT_MS"]=7,t[e[8]="SOCKET_DISCARDED_PPS"]=8,t[e[9]="RTC_MIC_JITTER_MS"]=9,t[e[10]="RTC_MIC_PPS"]=10,t[e[11]="RTC_MIC_FRACTION_PACKET_LOST_PERCENT"]=11,t[e[12]="RTC_MIC_BITRATE"]=12,t[e[13]="RTC_MIC_RTT_MS"]=13,t[e[14]="RTC_SPK_PPS"]=14,t[e[15]="RTC_SPK_FRACTION_PACKET_LOST_PERCENT"]=15,t[e[16]="RTC_SPK_JITTER_MS"]=16,t[e[17]="RTC_SPK_FRACTION_DECODER_LOSS_PERCENT"]=17,t[e[18]="RTC_SPK_BITRATE"]=18,t[e[19]="RTC_SPK_CURRENT_DELAY_MS"]=19,t[e[20]="RTC_SPK_JITTER_BUFFER_MS"]=20,t[e[21]="VIDEO_SENT_RTT_MS"]=21,t[e[22]="VIDEO_ENCODE_USAGE_PERCENT"]=22,t[e[23]="VIDEO_NACKS_RECEIVED"]=23,t[e[24]="VIDEO_PLIS_RECEIVED"]=24,t[e[25]="VIDEO_AVERAGE_ENCODE_MS"]=25,t[e[26]="VIDEO_INPUT_FPS"]=26,t[e[27]="VIDEO_ENCODE_FPS"]=27,t[e[28]="VIDEO_SENT_FPS"]=28,t[e[29]="VIDEO_FIRS_RECEIVED"]=29,t[e[30]="VIDEO_SENT_PPS"]=30,t[e[31]="VIDEO_SENT_FRACTION_PACKET_LOST_PERCENT"]=31,t[e[32]="VIDEO_SENT_BITRATE"]=32,t[e[33]="VIDEO_DROPPED_FPS"]=33,t[e[34]="VIDEO_TARGET_DELAY_MS"]=34,t[e[35]="VIDEO_DECODE_MS"]=35,t[e[36]="VIDEO_OUTPUT_FPS"]=36,t[e[37]="VIDEO_RECEIVED_PPS"]=37,t[e[38]="VIDEO_RECEIVED_FRACTION_PACKET_LOST_PERCENT"]=38,t[e[39]="VIDEO_RENDER_DELAY_MS"]=39,t[e[40]="VIDEO_RECEIVED_FPS"]=40,t[e[41]="VIDEO_DECODE_FPS"]=41,t[e[42]="VIDEO_NACKS_SENT"]=42,t[e[43]="VIDEO_FIRS_SENT"]=43,t[e[44]="VIDEO_RECEIVED_BITRATE"]=44,t[e[45]="VIDEO_CURRENT_DELAY_MS"]=45,t[e[46]="VIDEO_JITTER_BUFFER_MS"]=46,t[e[47]="VIDEO_DISCARDED_PPS"]=47,t[e[48]="VIDEO_PLIS_SENT"]=48,t[e[49]="VIDEO_RECEIVED_JITTER_MS"]=49,t[e[64]="VIDEO_ENCODE_HEIGHT"]=64,t[e[66]="VIDEO_SENT_QP_SUM"]=66,t[e[69]="VIDEO_DECODE_HEIGHT"]=69,t[e[72]="VIDEO_RECEIVED_QP_SUM"]=72,t[e[86]="VIDEO_ENCODE_WIDTH"]=86,t[e[87]="VIDEO_DECODE_WIDTH"]=87,t}(),e}(),c.SdkStreamMetricFrame=function(){function e(e){if(this.metrics=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.streamId=0,e.prototype.groupId=0,e.prototype.metrics=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.streamId&&e.hasOwnProperty("streamId")&&t.uint32(24).uint32(e.streamId),null!=e.groupId&&e.hasOwnProperty("groupId")&&t.uint32(32).uint32(e.groupId),null!=e.metrics&&e.metrics.length)for(var n=0;n<e.metrics.length;++n)c.SdkMetric.encode(e.metrics[n],t.uint32(42).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkStreamMetricFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 3:r.streamId=e.uint32();break;case 4:r.groupId=e.uint32();break;case 5:r.metrics&&r.metrics.length||(r.metrics=[]),r.metrics.push(c.SdkMetric.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.streamId&&e.hasOwnProperty("streamId")&&!l.isInteger(e.streamId))return"streamId: integer expected";if(null!=e.groupId&&e.hasOwnProperty("groupId")&&!l.isInteger(e.groupId))return"groupId: integer expected";if(null!=e.metrics&&e.hasOwnProperty("metrics")){if(!Array.isArray(e.metrics))return"metrics: array expected";for(var t=0;t<e.metrics.length;++t){var n=c.SdkMetric.verify(e.metrics[t]);if(n)return"metrics."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkStreamMetricFrame)return e;var t=new c.SdkStreamMetricFrame;if(null!=e.streamId&&(t.streamId=e.streamId>>>0),null!=e.groupId&&(t.groupId=e.groupId>>>0),e.metrics){if(!Array.isArray(e.metrics))throw TypeError(".SdkStreamMetricFrame.metrics: array expected");t.metrics=[];for(var n=0;n<e.metrics.length;++n){if("object"!=typeof e.metrics[n])throw TypeError(".SdkStreamMetricFrame.metrics: object expected");t.metrics[n]=c.SdkMetric.fromObject(e.metrics[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.metrics=[]),t.defaults&&(n.streamId=0,n.groupId=0),null!=e.streamId&&e.hasOwnProperty("streamId")&&(n.streamId=e.streamId),null!=e.groupId&&e.hasOwnProperty("groupId")&&(n.groupId=e.groupId),e.metrics&&e.metrics.length){n.metrics=[];for(var r=0;r<e.metrics.length;++r)n.metrics[r]=c.SdkMetric.toObject(e.metrics[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkClientMetricFrame=function(){function e(e){if(this.globalMetrics=[],this.streamMetricFrames=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.globalMetrics=l.emptyArray,e.prototype.streamMetricFrames=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.globalMetrics&&e.globalMetrics.length)for(var n=0;n<e.globalMetrics.length;++n)c.SdkMetric.encode(e.globalMetrics[n],t.uint32(10).fork()).ldelim();if(null!=e.streamMetricFrames&&e.streamMetricFrames.length)for(n=0;n<e.streamMetricFrames.length;++n)c.SdkStreamMetricFrame.encode(e.streamMetricFrames[n],t.uint32(18).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkClientMetricFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.globalMetrics&&r.globalMetrics.length||(r.globalMetrics=[]),r.globalMetrics.push(c.SdkMetric.decode(e,e.uint32()));break;case 2:r.streamMetricFrames&&r.streamMetricFrames.length||(r.streamMetricFrames=[]),r.streamMetricFrames.push(c.SdkStreamMetricFrame.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.globalMetrics&&e.hasOwnProperty("globalMetrics")){if(!Array.isArray(e.globalMetrics))return"globalMetrics: array expected";for(var t=0;t<e.globalMetrics.length;++t){if(n=c.SdkMetric.verify(e.globalMetrics[t]))return"globalMetrics."+n}}if(null!=e.streamMetricFrames&&e.hasOwnProperty("streamMetricFrames")){if(!Array.isArray(e.streamMetricFrames))return"streamMetricFrames: array expected";for(t=0;t<e.streamMetricFrames.length;++t){var n;if(n=c.SdkStreamMetricFrame.verify(e.streamMetricFrames[t]))return"streamMetricFrames."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkClientMetricFrame)return e;var t=new c.SdkClientMetricFrame;if(e.globalMetrics){if(!Array.isArray(e.globalMetrics))throw TypeError(".SdkClientMetricFrame.globalMetrics: array expected");t.globalMetrics=[];for(var n=0;n<e.globalMetrics.length;++n){if("object"!=typeof e.globalMetrics[n])throw TypeError(".SdkClientMetricFrame.globalMetrics: object expected");t.globalMetrics[n]=c.SdkMetric.fromObject(e.globalMetrics[n])}}if(e.streamMetricFrames){if(!Array.isArray(e.streamMetricFrames))throw TypeError(".SdkClientMetricFrame.streamMetricFrames: array expected");t.streamMetricFrames=[];for(n=0;n<e.streamMetricFrames.length;++n){if("object"!=typeof e.streamMetricFrames[n])throw TypeError(".SdkClientMetricFrame.streamMetricFrames: object expected");t.streamMetricFrames[n]=c.SdkStreamMetricFrame.fromObject(e.streamMetricFrames[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.globalMetrics=[],n.streamMetricFrames=[]),e.globalMetrics&&e.globalMetrics.length){n.globalMetrics=[];for(var r=0;r<e.globalMetrics.length;++r)n.globalMetrics[r]=c.SdkMetric.toObject(e.globalMetrics[r],t)}if(e.streamMetricFrames&&e.streamMetricFrames.length){n.streamMetricFrames=[];for(r=0;r<e.streamMetricFrames.length;++r)n.streamMetricFrames[r]=c.SdkStreamMetricFrame.toObject(e.streamMetricFrames[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkDataMessageFrame=function(){function e(e){if(this.messages=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.messages=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.messages&&e.messages.length)for(var n=0;n<e.messages.length;++n)c.SdkDataMessagePayload.encode(e.messages[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkDataMessageFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.messages&&r.messages.length||(r.messages=[]),r.messages.push(c.SdkDataMessagePayload.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.messages&&e.hasOwnProperty("messages")){if(!Array.isArray(e.messages))return"messages: array expected";for(var t=0;t<e.messages.length;++t){var n=c.SdkDataMessagePayload.verify(e.messages[t]);if(n)return"messages."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkDataMessageFrame)return e;var t=new c.SdkDataMessageFrame;if(e.messages){if(!Array.isArray(e.messages))throw TypeError(".SdkDataMessageFrame.messages: array expected");t.messages=[];for(var n=0;n<e.messages.length;++n){if("object"!=typeof e.messages[n])throw TypeError(".SdkDataMessageFrame.messages: object expected");t.messages[n]=c.SdkDataMessagePayload.fromObject(e.messages[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.messages=[]),e.messages&&e.messages.length){n.messages=[];for(var r=0;r<e.messages.length;++r)n.messages[r]=c.SdkDataMessagePayload.toObject(e.messages[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkDataMessagePayload=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.topic="",e.prototype.data=l.newBuffer([]),e.prototype.lifetimeMs=0,e.prototype.senderAttendeeId="",e.prototype.ingestTimeNs=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.senderExternalUserId="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.topic&&e.hasOwnProperty("topic")&&t.uint32(10).string(e.topic),null!=e.data&&e.hasOwnProperty("data")&&t.uint32(18).bytes(e.data),null!=e.lifetimeMs&&e.hasOwnProperty("lifetimeMs")&&t.uint32(24).uint32(e.lifetimeMs),null!=e.senderAttendeeId&&e.hasOwnProperty("senderAttendeeId")&&t.uint32(34).string(e.senderAttendeeId),null!=e.ingestTimeNs&&e.hasOwnProperty("ingestTimeNs")&&t.uint32(40).int64(e.ingestTimeNs),null!=e.senderExternalUserId&&e.hasOwnProperty("senderExternalUserId")&&t.uint32(50).string(e.senderExternalUserId),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkDataMessagePayload;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.topic=e.string();break;case 2:r.data=e.bytes();break;case 3:r.lifetimeMs=e.uint32();break;case 4:r.senderAttendeeId=e.string();break;case 5:r.ingestTimeNs=e.int64();break;case 6:r.senderExternalUserId=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.topic&&e.hasOwnProperty("topic")&&!l.isString(e.topic)?"topic: string expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||l.isString(e.data))?"data: buffer expected":null!=e.lifetimeMs&&e.hasOwnProperty("lifetimeMs")&&!l.isInteger(e.lifetimeMs)?"lifetimeMs: integer expected":null!=e.senderAttendeeId&&e.hasOwnProperty("senderAttendeeId")&&!l.isString(e.senderAttendeeId)?"senderAttendeeId: string expected":null!=e.ingestTimeNs&&e.hasOwnProperty("ingestTimeNs")&&!(l.isInteger(e.ingestTimeNs)||e.ingestTimeNs&&l.isInteger(e.ingestTimeNs.low)&&l.isInteger(e.ingestTimeNs.high))?"ingestTimeNs: integer|Long expected":null!=e.senderExternalUserId&&e.hasOwnProperty("senderExternalUserId")&&!l.isString(e.senderExternalUserId)?"senderExternalUserId: string expected":null},e.fromObject=function(e){if(e instanceof c.SdkDataMessagePayload)return e;var t=new c.SdkDataMessagePayload;return null!=e.topic&&(t.topic=String(e.topic)),null!=e.data&&("string"==typeof e.data?l.base64.decode(e.data,t.data=l.newBuffer(l.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.lifetimeMs&&(t.lifetimeMs=e.lifetimeMs>>>0),null!=e.senderAttendeeId&&(t.senderAttendeeId=String(e.senderAttendeeId)),null!=e.ingestTimeNs&&(l.Long?(t.ingestTimeNs=l.Long.fromValue(e.ingestTimeNs)).unsigned=!1:"string"==typeof e.ingestTimeNs?t.ingestTimeNs=parseInt(e.ingestTimeNs,10):"number"==typeof e.ingestTimeNs?t.ingestTimeNs=e.ingestTimeNs:"object"==typeof e.ingestTimeNs&&(t.ingestTimeNs=new l.LongBits(e.ingestTimeNs.low>>>0,e.ingestTimeNs.high>>>0).toNumber())),null!=e.senderExternalUserId&&(t.senderExternalUserId=String(e.senderExternalUserId)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.topic="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=l.newBuffer(n.data))),n.lifetimeMs=0,n.senderAttendeeId="",l.Long){var r=new l.Long(0,0,!1);n.ingestTimeNs=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.ingestTimeNs=t.longs===String?"0":0;n.senderExternalUserId=""}return null!=e.topic&&e.hasOwnProperty("topic")&&(n.topic=e.topic),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?l.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),null!=e.lifetimeMs&&e.hasOwnProperty("lifetimeMs")&&(n.lifetimeMs=e.lifetimeMs),null!=e.senderAttendeeId&&e.hasOwnProperty("senderAttendeeId")&&(n.senderAttendeeId=e.senderAttendeeId),null!=e.ingestTimeNs&&e.hasOwnProperty("ingestTimeNs")&&("number"==typeof e.ingestTimeNs?n.ingestTimeNs=t.longs===String?String(e.ingestTimeNs):e.ingestTimeNs:n.ingestTimeNs=t.longs===String?l.Long.prototype.toString.call(e.ingestTimeNs):t.longs===Number?new l.LongBits(e.ingestTimeNs.low>>>0,e.ingestTimeNs.high>>>0).toNumber():e.ingestTimeNs),null!=e.senderExternalUserId&&e.hasOwnProperty("senderExternalUserId")&&(n.senderExternalUserId=e.senderExternalUserId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkTurnCredentials=function(){function e(e){if(this.uris=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.username="",e.prototype.password="",e.prototype.ttl=0,e.prototype.uris=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.username&&e.hasOwnProperty("username")&&t.uint32(10).string(e.username),null!=e.password&&e.hasOwnProperty("password")&&t.uint32(18).string(e.password),null!=e.ttl&&e.hasOwnProperty("ttl")&&t.uint32(24).uint32(e.ttl),null!=e.uris&&e.uris.length)for(var n=0;n<e.uris.length;++n)t.uint32(34).string(e.uris[n]);return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTurnCredentials;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.username=e.string();break;case 2:r.password=e.string();break;case 3:r.ttl=e.uint32();break;case 4:r.uris&&r.uris.length||(r.uris=[]),r.uris.push(e.string());break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.username&&e.hasOwnProperty("username")&&!l.isString(e.username))return"username: string expected";if(null!=e.password&&e.hasOwnProperty("password")&&!l.isString(e.password))return"password: string expected";if(null!=e.ttl&&e.hasOwnProperty("ttl")&&!l.isInteger(e.ttl))return"ttl: integer expected";if(null!=e.uris&&e.hasOwnProperty("uris")){if(!Array.isArray(e.uris))return"uris: array expected";for(var t=0;t<e.uris.length;++t)if(!l.isString(e.uris[t]))return"uris: string[] expected"}return null},e.fromObject=function(e){if(e instanceof c.SdkTurnCredentials)return e;var t=new c.SdkTurnCredentials;if(null!=e.username&&(t.username=String(e.username)),null!=e.password&&(t.password=String(e.password)),null!=e.ttl&&(t.ttl=e.ttl>>>0),e.uris){if(!Array.isArray(e.uris))throw TypeError(".SdkTurnCredentials.uris: array expected");t.uris=[];for(var n=0;n<e.uris.length;++n)t.uris[n]=String(e.uris[n])}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.uris=[]),t.defaults&&(n.username="",n.password="",n.ttl=0),null!=e.username&&e.hasOwnProperty("username")&&(n.username=e.username),null!=e.password&&e.hasOwnProperty("password")&&(n.password=e.password),null!=e.ttl&&e.hasOwnProperty("ttl")&&(n.ttl=e.ttl),e.uris&&e.uris.length){n.uris=[];for(var r=0;r<e.uris.length;++r)n.uris[r]=e.uris[r]}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkTranscriptItem=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.content="",e.prototype.endTime=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.speakerAttendeeId="",e.prototype.speakerExternalUserId="",e.prototype.startTime=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.type=1,e.prototype.vocabularyFilterMatch=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.content&&e.hasOwnProperty("content")&&t.uint32(10).string(e.content),null!=e.endTime&&e.hasOwnProperty("endTime")&&t.uint32(16).int64(e.endTime),null!=e.speakerAttendeeId&&e.hasOwnProperty("speakerAttendeeId")&&t.uint32(26).string(e.speakerAttendeeId),null!=e.speakerExternalUserId&&e.hasOwnProperty("speakerExternalUserId")&&t.uint32(34).string(e.speakerExternalUserId),null!=e.startTime&&e.hasOwnProperty("startTime")&&t.uint32(40).int64(e.startTime),null!=e.type&&e.hasOwnProperty("type")&&t.uint32(48).int32(e.type),null!=e.vocabularyFilterMatch&&e.hasOwnProperty("vocabularyFilterMatch")&&t.uint32(56).bool(e.vocabularyFilterMatch),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTranscriptItem;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.content=e.string();break;case 2:r.endTime=e.int64();break;case 3:r.speakerAttendeeId=e.string();break;case 4:r.speakerExternalUserId=e.string();break;case 5:r.startTime=e.int64();break;case 6:r.type=e.int32();break;case 7:r.vocabularyFilterMatch=e.bool();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.content&&e.hasOwnProperty("content")&&!l.isString(e.content))return"content: string expected";if(null!=e.endTime&&e.hasOwnProperty("endTime")&&!(l.isInteger(e.endTime)||e.endTime&&l.isInteger(e.endTime.low)&&l.isInteger(e.endTime.high)))return"endTime: integer|Long expected";if(null!=e.speakerAttendeeId&&e.hasOwnProperty("speakerAttendeeId")&&!l.isString(e.speakerAttendeeId))return"speakerAttendeeId: string expected";if(null!=e.speakerExternalUserId&&e.hasOwnProperty("speakerExternalUserId")&&!l.isString(e.speakerExternalUserId))return"speakerExternalUserId: string expected";if(null!=e.startTime&&e.hasOwnProperty("startTime")&&!(l.isInteger(e.startTime)||e.startTime&&l.isInteger(e.startTime.low)&&l.isInteger(e.startTime.high)))return"startTime: integer|Long expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 1:case 2:}return null!=e.vocabularyFilterMatch&&e.hasOwnProperty("vocabularyFilterMatch")&&"boolean"!=typeof e.vocabularyFilterMatch?"vocabularyFilterMatch: boolean expected":null},e.fromObject=function(e){if(e instanceof c.SdkTranscriptItem)return e;var t=new c.SdkTranscriptItem;switch(null!=e.content&&(t.content=String(e.content)),null!=e.endTime&&(l.Long?(t.endTime=l.Long.fromValue(e.endTime)).unsigned=!1:"string"==typeof e.endTime?t.endTime=parseInt(e.endTime,10):"number"==typeof e.endTime?t.endTime=e.endTime:"object"==typeof e.endTime&&(t.endTime=new l.LongBits(e.endTime.low>>>0,e.endTime.high>>>0).toNumber())),null!=e.speakerAttendeeId&&(t.speakerAttendeeId=String(e.speakerAttendeeId)),null!=e.speakerExternalUserId&&(t.speakerExternalUserId=String(e.speakerExternalUserId)),null!=e.startTime&&(l.Long?(t.startTime=l.Long.fromValue(e.startTime)).unsigned=!1:"string"==typeof e.startTime?t.startTime=parseInt(e.startTime,10):"number"==typeof e.startTime?t.startTime=e.startTime:"object"==typeof e.startTime&&(t.startTime=new l.LongBits(e.startTime.low>>>0,e.startTime.high>>>0).toNumber())),e.type){case"PRONUNCIATION":case 1:t.type=1;break;case"PUNCTUATION":case 2:t.type=2}return null!=e.vocabularyFilterMatch&&(t.vocabularyFilterMatch=Boolean(e.vocabularyFilterMatch)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.content="",l.Long){var r=new l.Long(0,0,!1);n.endTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.endTime=t.longs===String?"0":0;if(n.speakerAttendeeId="",n.speakerExternalUserId="",l.Long){r=new l.Long(0,0,!1);n.startTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.startTime=t.longs===String?"0":0;n.type=t.enums===String?"PRONUNCIATION":1,n.vocabularyFilterMatch=!1}return null!=e.content&&e.hasOwnProperty("content")&&(n.content=e.content),null!=e.endTime&&e.hasOwnProperty("endTime")&&("number"==typeof e.endTime?n.endTime=t.longs===String?String(e.endTime):e.endTime:n.endTime=t.longs===String?l.Long.prototype.toString.call(e.endTime):t.longs===Number?new l.LongBits(e.endTime.low>>>0,e.endTime.high>>>0).toNumber():e.endTime),null!=e.speakerAttendeeId&&e.hasOwnProperty("speakerAttendeeId")&&(n.speakerAttendeeId=e.speakerAttendeeId),null!=e.speakerExternalUserId&&e.hasOwnProperty("speakerExternalUserId")&&(n.speakerExternalUserId=e.speakerExternalUserId),null!=e.startTime&&e.hasOwnProperty("startTime")&&("number"==typeof e.startTime?n.startTime=t.longs===String?String(e.startTime):e.startTime:n.startTime=t.longs===String?l.Long.prototype.toString.call(e.startTime):t.longs===Number?new l.LongBits(e.startTime.low>>>0,e.startTime.high>>>0).toNumber():e.startTime),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?c.SdkTranscriptItem.Type[e.type]:e.type),null!=e.vocabularyFilterMatch&&e.hasOwnProperty("vocabularyFilterMatch")&&(n.vocabularyFilterMatch=e.vocabularyFilterMatch),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e.Type=function(){var e={},t=Object.create(e);return t[e[1]="PRONUNCIATION"]=1,t[e[2]="PUNCTUATION"]=2,t}(),e}(),c.SdkTranscriptAlternative=function(){function e(e){if(this.items=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.items=l.emptyArray,e.prototype.transcript="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.items&&e.items.length)for(var n=0;n<e.items.length;++n)c.SdkTranscriptItem.encode(e.items[n],t.uint32(10).fork()).ldelim();return null!=e.transcript&&e.hasOwnProperty("transcript")&&t.uint32(18).string(e.transcript),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTranscriptAlternative;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.items&&r.items.length||(r.items=[]),r.items.push(c.SdkTranscriptItem.decode(e,e.uint32()));break;case 2:r.transcript=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.items&&e.hasOwnProperty("items")){if(!Array.isArray(e.items))return"items: array expected";for(var t=0;t<e.items.length;++t){var n=c.SdkTranscriptItem.verify(e.items[t]);if(n)return"items."+n}}return null!=e.transcript&&e.hasOwnProperty("transcript")&&!l.isString(e.transcript)?"transcript: string expected":null},e.fromObject=function(e){if(e instanceof c.SdkTranscriptAlternative)return e;var t=new c.SdkTranscriptAlternative;if(e.items){if(!Array.isArray(e.items))throw TypeError(".SdkTranscriptAlternative.items: array expected");t.items=[];for(var n=0;n<e.items.length;++n){if("object"!=typeof e.items[n])throw TypeError(".SdkTranscriptAlternative.items: object expected");t.items[n]=c.SdkTranscriptItem.fromObject(e.items[n])}}return null!=e.transcript&&(t.transcript=String(e.transcript)),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.items=[]),t.defaults&&(n.transcript=""),e.items&&e.items.length){n.items=[];for(var r=0;r<e.items.length;++r)n.items[r]=c.SdkTranscriptItem.toObject(e.items[r],t)}return null!=e.transcript&&e.hasOwnProperty("transcript")&&(n.transcript=e.transcript),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkTranscriptResult=function(){function e(e){if(this.alternatives=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.alternatives=l.emptyArray,e.prototype.channelId="",e.prototype.endTime=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.isPartial=!1,e.prototype.resultId="",e.prototype.startTime=l.Long?l.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.alternatives&&e.alternatives.length)for(var n=0;n<e.alternatives.length;++n)c.SdkTranscriptAlternative.encode(e.alternatives[n],t.uint32(10).fork()).ldelim();return null!=e.channelId&&e.hasOwnProperty("channelId")&&t.uint32(18).string(e.channelId),null!=e.endTime&&e.hasOwnProperty("endTime")&&t.uint32(24).int64(e.endTime),null!=e.isPartial&&e.hasOwnProperty("isPartial")&&t.uint32(32).bool(e.isPartial),null!=e.resultId&&e.hasOwnProperty("resultId")&&t.uint32(42).string(e.resultId),null!=e.startTime&&e.hasOwnProperty("startTime")&&t.uint32(48).int64(e.startTime),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTranscriptResult;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.alternatives&&r.alternatives.length||(r.alternatives=[]),r.alternatives.push(c.SdkTranscriptAlternative.decode(e,e.uint32()));break;case 2:r.channelId=e.string();break;case 3:r.endTime=e.int64();break;case 4:r.isPartial=e.bool();break;case 5:r.resultId=e.string();break;case 6:r.startTime=e.int64();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.alternatives&&e.hasOwnProperty("alternatives")){if(!Array.isArray(e.alternatives))return"alternatives: array expected";for(var t=0;t<e.alternatives.length;++t){var n=c.SdkTranscriptAlternative.verify(e.alternatives[t]);if(n)return"alternatives."+n}}return null!=e.channelId&&e.hasOwnProperty("channelId")&&!l.isString(e.channelId)?"channelId: string expected":null!=e.endTime&&e.hasOwnProperty("endTime")&&!(l.isInteger(e.endTime)||e.endTime&&l.isInteger(e.endTime.low)&&l.isInteger(e.endTime.high))?"endTime: integer|Long expected":null!=e.isPartial&&e.hasOwnProperty("isPartial")&&"boolean"!=typeof e.isPartial?"isPartial: boolean expected":null!=e.resultId&&e.hasOwnProperty("resultId")&&!l.isString(e.resultId)?"resultId: string expected":null!=e.startTime&&e.hasOwnProperty("startTime")&&!(l.isInteger(e.startTime)||e.startTime&&l.isInteger(e.startTime.low)&&l.isInteger(e.startTime.high))?"startTime: integer|Long expected":null},e.fromObject=function(e){if(e instanceof c.SdkTranscriptResult)return e;var t=new c.SdkTranscriptResult;if(e.alternatives){if(!Array.isArray(e.alternatives))throw TypeError(".SdkTranscriptResult.alternatives: array expected");t.alternatives=[];for(var n=0;n<e.alternatives.length;++n){if("object"!=typeof e.alternatives[n])throw TypeError(".SdkTranscriptResult.alternatives: object expected");t.alternatives[n]=c.SdkTranscriptAlternative.fromObject(e.alternatives[n])}}return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.endTime&&(l.Long?(t.endTime=l.Long.fromValue(e.endTime)).unsigned=!1:"string"==typeof e.endTime?t.endTime=parseInt(e.endTime,10):"number"==typeof e.endTime?t.endTime=e.endTime:"object"==typeof e.endTime&&(t.endTime=new l.LongBits(e.endTime.low>>>0,e.endTime.high>>>0).toNumber())),null!=e.isPartial&&(t.isPartial=Boolean(e.isPartial)),null!=e.resultId&&(t.resultId=String(e.resultId)),null!=e.startTime&&(l.Long?(t.startTime=l.Long.fromValue(e.startTime)).unsigned=!1:"string"==typeof e.startTime?t.startTime=parseInt(e.startTime,10):"number"==typeof e.startTime?t.startTime=e.startTime:"object"==typeof e.startTime&&(t.startTime=new l.LongBits(e.startTime.low>>>0,e.startTime.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.alternatives=[]),t.defaults){if(n.channelId="",l.Long){var r=new l.Long(0,0,!1);n.endTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.endTime=t.longs===String?"0":0;if(n.isPartial=!1,n.resultId="",l.Long){r=new l.Long(0,0,!1);n.startTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.startTime=t.longs===String?"0":0}if(e.alternatives&&e.alternatives.length){n.alternatives=[];for(var i=0;i<e.alternatives.length;++i)n.alternatives[i]=c.SdkTranscriptAlternative.toObject(e.alternatives[i],t)}return null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.endTime&&e.hasOwnProperty("endTime")&&("number"==typeof e.endTime?n.endTime=t.longs===String?String(e.endTime):e.endTime:n.endTime=t.longs===String?l.Long.prototype.toString.call(e.endTime):t.longs===Number?new l.LongBits(e.endTime.low>>>0,e.endTime.high>>>0).toNumber():e.endTime),null!=e.isPartial&&e.hasOwnProperty("isPartial")&&(n.isPartial=e.isPartial),null!=e.resultId&&e.hasOwnProperty("resultId")&&(n.resultId=e.resultId),null!=e.startTime&&e.hasOwnProperty("startTime")&&("number"==typeof e.startTime?n.startTime=t.longs===String?String(e.startTime):e.startTime:n.startTime=t.longs===String?l.Long.prototype.toString.call(e.startTime):t.longs===Number?new l.LongBits(e.startTime.low>>>0,e.startTime.high>>>0).toNumber():e.startTime),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkTranscript=function(){function e(e){if(this.results=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.results=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.results&&e.results.length)for(var n=0;n<e.results.length;++n)c.SdkTranscriptResult.encode(e.results[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTranscript;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.results&&r.results.length||(r.results=[]),r.results.push(c.SdkTranscriptResult.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.results&&e.hasOwnProperty("results")){if(!Array.isArray(e.results))return"results: array expected";for(var t=0;t<e.results.length;++t){var n=c.SdkTranscriptResult.verify(e.results[t]);if(n)return"results."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkTranscript)return e;var t=new c.SdkTranscript;if(e.results){if(!Array.isArray(e.results))throw TypeError(".SdkTranscript.results: array expected");t.results=[];for(var n=0;n<e.results.length;++n){if("object"!=typeof e.results[n])throw TypeError(".SdkTranscript.results: object expected");t.results[n]=c.SdkTranscriptResult.fromObject(e.results[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.results=[]),e.results&&e.results.length){n.results=[];for(var r=0;r<e.results.length;++r)n.results[r]=c.SdkTranscriptResult.toObject(e.results[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkTranscriptionStatus=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.type=1,e.prototype.eventTime=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.transcriptionRegion="",e.prototype.transcriptionConfiguration="",e.prototype.message="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.type&&e.hasOwnProperty("type")&&t.uint32(8).int32(e.type),null!=e.eventTime&&e.hasOwnProperty("eventTime")&&t.uint32(16).int64(e.eventTime),null!=e.transcriptionRegion&&e.hasOwnProperty("transcriptionRegion")&&t.uint32(26).string(e.transcriptionRegion),null!=e.transcriptionConfiguration&&e.hasOwnProperty("transcriptionConfiguration")&&t.uint32(34).string(e.transcriptionConfiguration),null!=e.message&&e.hasOwnProperty("message")&&t.uint32(42).string(e.message),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTranscriptionStatus;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.type=e.int32();break;case 2:r.eventTime=e.int64();break;case 3:r.transcriptionRegion=e.string();break;case 4:r.transcriptionConfiguration=e.string();break;case 5:r.message=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:}return null!=e.eventTime&&e.hasOwnProperty("eventTime")&&!(l.isInteger(e.eventTime)||e.eventTime&&l.isInteger(e.eventTime.low)&&l.isInteger(e.eventTime.high))?"eventTime: integer|Long expected":null!=e.transcriptionRegion&&e.hasOwnProperty("transcriptionRegion")&&!l.isString(e.transcriptionRegion)?"transcriptionRegion: string expected":null!=e.transcriptionConfiguration&&e.hasOwnProperty("transcriptionConfiguration")&&!l.isString(e.transcriptionConfiguration)?"transcriptionConfiguration: string expected":null!=e.message&&e.hasOwnProperty("message")&&!l.isString(e.message)?"message: string expected":null},e.fromObject=function(e){if(e instanceof c.SdkTranscriptionStatus)return e;var t=new c.SdkTranscriptionStatus;switch(e.type){case"STARTED":case 1:t.type=1;break;case"INTERRUPTED":case 2:t.type=2;break;case"RESUMED":case 3:t.type=3;break;case"STOPPED":case 4:t.type=4;break;case"FAILED":case 5:t.type=5}return null!=e.eventTime&&(l.Long?(t.eventTime=l.Long.fromValue(e.eventTime)).unsigned=!1:"string"==typeof e.eventTime?t.eventTime=parseInt(e.eventTime,10):"number"==typeof e.eventTime?t.eventTime=e.eventTime:"object"==typeof e.eventTime&&(t.eventTime=new l.LongBits(e.eventTime.low>>>0,e.eventTime.high>>>0).toNumber())),null!=e.transcriptionRegion&&(t.transcriptionRegion=String(e.transcriptionRegion)),null!=e.transcriptionConfiguration&&(t.transcriptionConfiguration=String(e.transcriptionConfiguration)),null!=e.message&&(t.message=String(e.message)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.type=t.enums===String?"STARTED":1,l.Long){var r=new l.Long(0,0,!1);n.eventTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.eventTime=t.longs===String?"0":0;n.transcriptionRegion="",n.transcriptionConfiguration="",n.message=""}return null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?c.SdkTranscriptionStatus.Type[e.type]:e.type),null!=e.eventTime&&e.hasOwnProperty("eventTime")&&("number"==typeof e.eventTime?n.eventTime=t.longs===String?String(e.eventTime):e.eventTime:n.eventTime=t.longs===String?l.Long.prototype.toString.call(e.eventTime):t.longs===Number?new l.LongBits(e.eventTime.low>>>0,e.eventTime.high>>>0).toNumber():e.eventTime),null!=e.transcriptionRegion&&e.hasOwnProperty("transcriptionRegion")&&(n.transcriptionRegion=e.transcriptionRegion),null!=e.transcriptionConfiguration&&e.hasOwnProperty("transcriptionConfiguration")&&(n.transcriptionConfiguration=e.transcriptionConfiguration),null!=e.message&&e.hasOwnProperty("message")&&(n.message=e.message),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e.Type=function(){var e={},t=Object.create(e);return t[e[1]="STARTED"]=1,t[e[2]="INTERRUPTED"]=2,t[e[3]="RESUMED"]=3,t[e[4]="STOPPED"]=4,t[e[5]="FAILED"]=5,t}(),e}(),c.SdkTranscriptEvent=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var t;return e.prototype.status=null,e.prototype.transcript=null,Object.defineProperty(e.prototype,"Event",{get:l.oneOfGetter(t=["status","transcript"]),set:l.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),null!=e.status&&e.hasOwnProperty("status")&&c.SdkTranscriptionStatus.encode(e.status,t.uint32(10).fork()).ldelim(),null!=e.transcript&&e.hasOwnProperty("transcript")&&c.SdkTranscript.encode(e.transcript,t.uint32(18).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTranscriptEvent;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.status=c.SdkTranscriptionStatus.decode(e,e.uint32());break;case 2:r.transcript=c.SdkTranscript.decode(e,e.uint32());break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.status&&e.hasOwnProperty("status")&&(t.Event=1,n=c.SdkTranscriptionStatus.verify(e.status)))return"status."+n;if(null!=e.transcript&&e.hasOwnProperty("transcript")){if(1===t.Event)return"Event: multiple values";var n;if(t.Event=1,n=c.SdkTranscript.verify(e.transcript))return"transcript."+n}return null},e.fromObject=function(e){if(e instanceof c.SdkTranscriptEvent)return e;var t=new c.SdkTranscriptEvent;if(null!=e.status){if("object"!=typeof e.status)throw TypeError(".SdkTranscriptEvent.status: object expected");t.status=c.SdkTranscriptionStatus.fromObject(e.status)}if(null!=e.transcript){if("object"!=typeof e.transcript)throw TypeError(".SdkTranscriptEvent.transcript: object expected");t.transcript=c.SdkTranscript.fromObject(e.transcript)}return t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.status&&e.hasOwnProperty("status")&&(n.status=c.SdkTranscriptionStatus.toObject(e.status,t),t.oneofs&&(n.Event="status")),null!=e.transcript&&e.hasOwnProperty("transcript")&&(n.transcript=c.SdkTranscript.toObject(e.transcript,t),t.oneofs&&(n.Event="transcript")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkTranscriptFrame=function(){function e(e){if(this.events=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.events=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.events&&e.events.length)for(var n=0;n<e.events.length;++n)c.SdkTranscriptEvent.encode(e.events[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkTranscriptFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.events&&r.events.length||(r.events=[]),r.events.push(c.SdkTranscriptEvent.decode(e,e.uint32()));break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.events&&e.hasOwnProperty("events")){if(!Array.isArray(e.events))return"events: array expected";for(var t=0;t<e.events.length;++t){var n=c.SdkTranscriptEvent.verify(e.events[t]);if(n)return"events."+n}}return null},e.fromObject=function(e){if(e instanceof c.SdkTranscriptFrame)return e;var t=new c.SdkTranscriptFrame;if(e.events){if(!Array.isArray(e.events))throw TypeError(".SdkTranscriptFrame.events: array expected");t.events=[];for(var n=0;n<e.events.length;++n){if("object"!=typeof e.events[n])throw TypeError(".SdkTranscriptFrame.events: object expected");t.events[n]=c.SdkTranscriptEvent.fromObject(e.events[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.events=[]),e.events&&e.events.length){n.events=[];for(var r=0;r<e.events.length;++r)n.events[r]=c.SdkTranscriptEvent.toObject(e.events[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkRemoteVideoUpdateFrame=function(){function e(e){if(this.addedOrUpdatedVideoSubscriptions=[],this.removedVideoSubscriptionMids=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.addedOrUpdatedVideoSubscriptions=l.emptyArray,e.prototype.removedVideoSubscriptionMids=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=s.create()),null!=e.addedOrUpdatedVideoSubscriptions&&e.addedOrUpdatedVideoSubscriptions.length)for(var n=0;n<e.addedOrUpdatedVideoSubscriptions.length;++n)c.SdkVideoSubscriptionConfiguration.encode(e.addedOrUpdatedVideoSubscriptions[n],t.uint32(10).fork()).ldelim();if(null!=e.removedVideoSubscriptionMids&&e.removedVideoSubscriptionMids.length)for(n=0;n<e.removedVideoSubscriptionMids.length;++n)t.uint32(18).string(e.removedVideoSubscriptionMids[n]);return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkRemoteVideoUpdateFrame;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.addedOrUpdatedVideoSubscriptions&&r.addedOrUpdatedVideoSubscriptions.length||(r.addedOrUpdatedVideoSubscriptions=[]),r.addedOrUpdatedVideoSubscriptions.push(c.SdkVideoSubscriptionConfiguration.decode(e,e.uint32()));break;case 2:r.removedVideoSubscriptionMids&&r.removedVideoSubscriptionMids.length||(r.removedVideoSubscriptionMids=[]),r.removedVideoSubscriptionMids.push(e.string());break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.addedOrUpdatedVideoSubscriptions&&e.hasOwnProperty("addedOrUpdatedVideoSubscriptions")){if(!Array.isArray(e.addedOrUpdatedVideoSubscriptions))return"addedOrUpdatedVideoSubscriptions: array expected";for(var t=0;t<e.addedOrUpdatedVideoSubscriptions.length;++t){var n=c.SdkVideoSubscriptionConfiguration.verify(e.addedOrUpdatedVideoSubscriptions[t]);if(n)return"addedOrUpdatedVideoSubscriptions."+n}}if(null!=e.removedVideoSubscriptionMids&&e.hasOwnProperty("removedVideoSubscriptionMids")){if(!Array.isArray(e.removedVideoSubscriptionMids))return"removedVideoSubscriptionMids: array expected";for(t=0;t<e.removedVideoSubscriptionMids.length;++t)if(!l.isString(e.removedVideoSubscriptionMids[t]))return"removedVideoSubscriptionMids: string[] expected"}return null},e.fromObject=function(e){if(e instanceof c.SdkRemoteVideoUpdateFrame)return e;var t=new c.SdkRemoteVideoUpdateFrame;if(e.addedOrUpdatedVideoSubscriptions){if(!Array.isArray(e.addedOrUpdatedVideoSubscriptions))throw TypeError(".SdkRemoteVideoUpdateFrame.addedOrUpdatedVideoSubscriptions: array expected");t.addedOrUpdatedVideoSubscriptions=[];for(var n=0;n<e.addedOrUpdatedVideoSubscriptions.length;++n){if("object"!=typeof e.addedOrUpdatedVideoSubscriptions[n])throw TypeError(".SdkRemoteVideoUpdateFrame.addedOrUpdatedVideoSubscriptions: object expected");t.addedOrUpdatedVideoSubscriptions[n]=c.SdkVideoSubscriptionConfiguration.fromObject(e.addedOrUpdatedVideoSubscriptions[n])}}if(e.removedVideoSubscriptionMids){if(!Array.isArray(e.removedVideoSubscriptionMids))throw TypeError(".SdkRemoteVideoUpdateFrame.removedVideoSubscriptionMids: array expected");t.removedVideoSubscriptionMids=[];for(n=0;n<e.removedVideoSubscriptionMids.length;++n)t.removedVideoSubscriptionMids[n]=String(e.removedVideoSubscriptionMids[n])}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.addedOrUpdatedVideoSubscriptions=[],n.removedVideoSubscriptionMids=[]),e.addedOrUpdatedVideoSubscriptions&&e.addedOrUpdatedVideoSubscriptions.length){n.addedOrUpdatedVideoSubscriptions=[];for(var r=0;r<e.addedOrUpdatedVideoSubscriptions.length;++r)n.addedOrUpdatedVideoSubscriptions[r]=c.SdkVideoSubscriptionConfiguration.toObject(e.addedOrUpdatedVideoSubscriptions[r],t)}if(e.removedVideoSubscriptionMids&&e.removedVideoSubscriptionMids.length){n.removedVideoSubscriptionMids=[];for(r=0;r<e.removedVideoSubscriptionMids.length;++r)n.removedVideoSubscriptionMids[r]=e.removedVideoSubscriptionMids[r]}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),c.SdkVideoSubscriptionConfiguration=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.mid="",e.prototype.attendeeId="",e.prototype.streamId=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=s.create()),t.uint32(10).string(e.mid),null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&t.uint32(18).string(e.attendeeId),null!=e.streamId&&e.hasOwnProperty("streamId")&&t.uint32(24).uint32(e.streamId),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof o||(e=o.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.SdkVideoSubscriptionConfiguration;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.mid=e.string();break;case 2:r.attendeeId=e.string();break;case 3:r.streamId=e.uint32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("mid"))throw l.ProtocolError("missing required 'mid'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof o||(e=new o(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":l.isString(e.mid)?null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&!l.isString(e.attendeeId)?"attendeeId: string expected":null!=e.streamId&&e.hasOwnProperty("streamId")&&!l.isInteger(e.streamId)?"streamId: integer expected":null:"mid: string expected"},e.fromObject=function(e){if(e instanceof c.SdkVideoSubscriptionConfiguration)return e;var t=new c.SdkVideoSubscriptionConfiguration;return null!=e.mid&&(t.mid=String(e.mid)),null!=e.attendeeId&&(t.attendeeId=String(e.attendeeId)),null!=e.streamId&&(t.streamId=e.streamId>>>0),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.mid="",n.attendeeId="",n.streamId=0),null!=e.mid&&e.hasOwnProperty("mid")&&(n.mid=e.mid),null!=e.attendeeId&&e.hasOwnProperty("attendeeId")&&(n.attendeeId=e.attendeeId),null!=e.streamId&&e.hasOwnProperty("streamId")&&(n.streamId=e.streamId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,a.util.toJSONOptions)},e}(),e.exports=c},function(e,t,n){"use strict";var r=n(200);e.exports=function(e,t,n,i){var a=i?i-1:1/0,o=0;return function(i){if(r(i))return e.enter(n),s(i);return t(i)};function s(i){return r(i)&&o++<a?(e.consume(i),s):(e.exit(n),t(i))}}},function(e,t,n){var r;e.exports=(r=n(84),n(237),void(r.lib.Cipher||function(e){var t=r,n=t.lib,i=n.Base,a=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc,l=(s.Utf8,s.Base64),c=t.algo.EvpKDF,u=n.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?y:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),d=(n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),h=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=d.CBC=function(){var e=h.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var a=0;a<n;a++)e[t+a]^=r[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i),r.encryptBlock(e,n),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,a=e.slice(n,n+i);r.decryptBlock(e,n),t.call(this,e,n,i),this._prevBlock=a}}),e}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,o=[],s=0;s<r;s+=4)o.push(i);var l=a.create(o,r);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},m=(n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?a.create([1398893684,1701076831]).concat(n).concat(t):t).toString(l)},parse:function(e){var t,n=l.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=a.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=a.random(8));var i=c.create({keySize:t+n}).compute(e,r),o=a.create(i.words.slice(t),4*n);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:r})}},y=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:b}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var a=v.encrypt.call(this,e,t,i.key,r);return a.mixIn(i),a},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))},function(e,t,n){"use strict";function r(e){return e?(e.nodeName||"").toLowerCase():null}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",formTitle:"formTitle--uenOL",rightColumn:"rightColumn--1jKtI",modalBody:"modalBody--15q3X",bodyRow:"bodyRow--31MqO",transcribeLabel:"transcribeLabel--1E5PB",rowBg:"rowBg--3UUjb",footerBtn:"footerBtn--2hSBC",infoIcon:"infoIcon--2RsPy",reviewInfoWrapper:"reviewInfoWrapper--12xua",selectHeader:"selectHeader--1ZY3Z",chaptersWrap:"chaptersWrap--2k2bl",chapterItem:"chapterItem--3oEwa",emptyImageContainer:"emptyImageContainer--28Z3y",circleBg:"circleBg--15oyo",folderIcon:"folderIcon--3Oxv-",dndTextWrapper:"dndTextWrapper--1nNR0",dndSecondLine:"dndSecondLine--3lstJ",description:"description--q0lq9",extractTarget:"extractTarget--2elIT",extractLabel:"extractLabel--2MqaC"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(90);function i(e){return((Object(r.a)(e)?e.ownerDocument:e.document)||window.document).documentElement}},function(e,t,n){"use strict";n.d(t,"a",(function(){return z})),n.d(t,"b",(function(){return W})),n.d(t,"c",(function(){return re}));var r=n(0),i=n.n(r),a=n(79),o=n.n(a),s=n(87),l=n(85),c=(n(6),!1),u=i.a.createContext(null),d=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}Object(l.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[o.a.findDOMNode(this),r],a=i[0],s=i[1],l=this.getTimeouts(),u=r?l.appear:l.enter;!e&&!n||c?this.safeSetState({status:"entered"},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,s),this.safeSetState({status:"entering"},(function(){t.props.onEntering(a,s),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(a,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.a.findDOMNode(this);t&&!c?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],s=i[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(s.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return(i.a.createElement(u.Provider,{value:null},"function"==typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r)))},t}(i.a.Component);function h(){}d.contextType=u,d.propTypes={},d.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:h,onEntering:h,onEntered:h,onExit:h,onExiting:h,onExited:h},d.UNMOUNTED="unmounted",d.EXITED="exited",d.ENTERING="entering",d.ENTERED="entered",d.EXITING="exiting";var f=d,p=n(55),m=n(250);function g(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(r.isValidElement)(e)?t(e):e}(e)})),n}function v(e,t,n){return null!=n[t]?n[t]:e.props[t]}function b(e,t,n){var i=g(e.children),a=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),a=[];for(var o in e)o in t?a.length&&(i[o]=a,a=[]):a.push(o);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<a.length;r++)s[a[r]]=n(a[r]);return s}(t,i);return Object.keys(a).forEach((function(o){var s=a[o];if(Object(r.isValidElement)(s)){var l=o in t,c=o in i,u=t[o],d=Object(r.isValidElement)(u)&&!u.props.in;!c||l&&!d?c||!l||d?c&&l&&Object(r.isValidElement)(u)&&(a[o]=Object(r.cloneElement)(s,{onExited:n.bind(null,s),in:u.props.in,exit:v(s,"exit",e),enter:v(s,"enter",e)})):a[o]=Object(r.cloneElement)(s,{in:!1}):a[o]=Object(r.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:v(s,"exit",e),enter:v(s,"enter",e)})}})),a}var y=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},A=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Object(m.a)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Object(l.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,i,a=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,i=o,g(n.children,(function(e){return Object(r.cloneElement)(e,{onExited:i.bind(null,e),in:!0,appear:v(e,"appear",n),enter:v(e,"enter",n),exit:v(e,"exit",n)})}))):b(e,a,o),firstRender:!1}},n.handleExited=function(e,t){var n=g(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(p.a)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Object(s.a)(e,["component","childFactory"]),a=this.state.contextValue,o=y(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i.a.createElement(u.Provider,{value:a},o):i.a.createElement(u.Provider,{value:a},i.a.createElement(t,r,o))},t}(i.a.Component);A.propTypes={},A.defaultProps={component:"div",childFactory:function(e){return e}};var _=A,w=n(4),E=n.n(w);function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function C(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var T={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach((function(e){return clearTimeout(e)})),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function k(e){return"number"==typeof e&&!isNaN(e)}function x(e){return"boolean"==typeof e}function O(e){return"string"==typeof e}function I(e){return"function"==typeof e}function M(e){return"string"==typeof e?e:null}function P(e){return 0===e||e}var D=!("undefined"==typeof window||!window.document||!window.document.createElement);function N(e){return Object(r.isValidElement)(e)||O(e)||I(e)||k(e)}var L={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},R={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function B(e){var t,n,i=e.enter,a=e.exit,o=e.duration,s=void 0===o?750:o,l=e.appendPosition,c=void 0!==l&&l,u=e.collapse,d=void 0===u||u,h=e.collapseDuration,p=void 0===h?300:h;return Array.isArray(s)&&2===s.length?(t=s[0],n=s[1]):t=n=s,function(e){var o=e.children,s=e.position,l=e.preventExitTransition,u=e.done,h=C(e,["children","position","preventExitTransition","done"]),m=c?i+"--"+s:i,g=c?a+"--"+s:a,v=function e(){var t=h.nodeRef.current;t&&(!function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;function a(){e.removeEventListener("transitionend",a),t()}requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0"})),e.addEventListener("transitionend",a)}))}(t,u,p),t.removeEventListener("animationend",e))};return Object(r.createElement)(f,Object.assign({},h,{timeout:l?0:{enter:t,exit:d?n+p:n},onEnter:function(){var e=h.nodeRef.current;e&&(e.classList.add(m),e.style.animationFillMode="forwards",e.style.animationDuration=t+"ms")},onEntered:function(){var e=h.nodeRef.current;e&&(e.classList.remove(m),e.style.cssText="")},onExit:l?u:function(){var e=h.nodeRef.current;e&&(e.classList.add(g),e.style.animationFillMode="forwards",e.style.animationDuration=n+"ms",d?e.addEventListener("animationend",v):u())},unmountOnExit:!0}),o)}}function j(e){var t=e.closeToast,n=e.type,i=e.ariaLabel,a=void 0===i?"close":i;return Object(r.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":a},Object(r.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Object(r.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function F(e){var t,n,i=e.delay,a=e.isRunning,o=e.closeToast,s=e.type,l=e.hide,c=e.className,u=e.style,d=e.controlledProgress,h=e.progress,f=e.rtl,p=e.isIn,m=S(S({},u),{},{animationDuration:i+"ms",animationPlayState:a?"running":"paused",opacity:l?0:1});d&&(m.transform="scaleX("+h+")");var g=E()("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+s,((t={})["Toastify__progress-bar--rtl"]=f,t),c),v=((n={})[d&&h>=1?"onTransitionEnd":"onAnimationEnd"]=d&&h<1?null:function(){p&&o()},n);return Object(r.createElement)("div",Object.assign({className:g,style:m},v))}F.defaultProps={type:R.DEFAULT,hide:!1};var U=function(e){var t,n=function(e){var t=Object(r.useState)(!0),n=t[0],i=t[1],a=Object(r.useState)(!1),o=a[0],s=a[1],l=Object(r.useRef)(null),c=ie({start:0,x:0,y:0,deltaX:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),u=ie(e,!0),d=e.autoClose,h=e.pauseOnHover,f=e.closeToast,p=e.onClick,m=e.closeOnClick;function g(t){var n=l.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.start=c.x=oe(t.nativeEvent),c.removalDistance=n.offsetWidth*(e.draggablePercent/100)}function v(){if(c.boundingRect){var t=c.boundingRect,n=t.top,r=t.bottom,i=t.left,a=t.right;e.pauseOnHover&&c.x>=i&&c.x<=a&&c.y>=n&&c.y<=r?y():b()}}function b(){i(!0)}function y(){i(!1)}function A(e){var t=l.current;c.canDrag&&(n&&y(),c.x=oe(e),c.deltaX=c.x-c.start,c.y=function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}(e),c.start!==c.x&&(c.canCloseOnClick=!1),t.style.transform="translateX("+c.deltaX+"px)",t.style.opacity=""+(1-Math.abs(c.deltaX/c.removalDistance)))}function _(){var t=l.current;if(c.canDrag){if(c.canDrag=!1,Math.abs(c.deltaX)>c.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translateX(0)",t.style.opacity="1"}}Object(r.useEffect)((function(){return I(e.onOpen)&&e.onOpen(Object(r.isValidElement)(e.children)&&e.children.props),function(){I(u.onClose)&&u.onClose(Object(r.isValidElement)(u.children)&&u.children.props)}}),[]),Object(r.useEffect)((function(){return e.draggable&&(document.addEventListener("mousemove",A),document.addEventListener("mouseup",_),document.addEventListener("touchmove",A),document.addEventListener("touchend",_)),function(){e.draggable&&(document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",_))}}),[e.draggable]),Object(r.useEffect)((function(){return e.pauseOnFocusLoss&&(window.addEventListener("focus",b),window.addEventListener("blur",y)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",y))}}),[e.pauseOnFocusLoss]);var w={onMouseDown:g,onTouchStart:g,onMouseUp:v,onTouchEnd:v};d&&h&&(w.onMouseEnter=y,w.onMouseLeave=b);m&&(w.onClick=function(e){p&&p(e),c.canCloseOnClick&&f()});return{playToast:b,pauseToast:y,isRunning:n,preventExitTransition:o,toastRef:l,eventHandlers:w}}(e),i=n.isRunning,a=n.preventExitTransition,o=n.toastRef,s=n.eventHandlers,l=e.closeButton,c=e.children,u=e.autoClose,d=e.onClick,h=e.type,f=e.hideProgressBar,p=e.closeToast,m=e.transition,g=e.position,v=e.className,b=e.style,y=e.bodyClassName,A=e.bodyStyle,_=e.progressClassName,w=e.progressStyle,S=e.updateId,C=e.role,T=e.progress,k=e.rtl,x=e.toastId,O=e.deleteToast,M=E()("Toastify__toast","Toastify__toast--"+h,((t={})["Toastify__toast--rtl"]=k,t),v),P=!!T;return Object(r.createElement)(m,{in:e.in,appear:!0,done:O,position:g,preventExitTransition:a,nodeRef:o},Object(r.createElement)("div",Object.assign({id:x,onClick:d,className:M},s,{style:b,ref:o}),Object(r.createElement)("div",Object.assign({},e.in&&{role:C},{className:E()("Toastify__toast-body",y),style:A}),c),function(e){if(!e)return null;var t={closeToast:p,type:h};return I(e)?e(t):Object(r.isValidElement)(e)?Object(r.cloneElement)(e,t):void 0}(l),(u||P)&&Object(r.createElement)(F,Object.assign({},S&&!P?{key:"pb-"+S}:{},{rtl:k,delay:u,isRunning:i,isIn:e.in,closeToast:p,hide:f,type:h,style:w,className:_,controlledProgress:P,progress:T}))))},H=B({enter:"Toastify__bounce-enter",exit:"Toastify__bounce-exit",appendPosition:!0}),z=B({enter:"Toastify__slide-enter",exit:"Toastify__slide-exit",duration:[450,750],appendPosition:!0}),V=function(e){var t=e.children,n=e.className,i=e.style,a=C(e,["children","className","style"]);return delete a.in,Object(r.createElement)("div",{className:n,style:i},r.Children.map(t,(function(e){return Object(r.cloneElement)(e,a)})))},W=function(e){var t=function(e){var t=Object(r.useReducer)(ae,[]),n=t[0],i=t[1],a=Object(r.useRef)(null),o=ie(0),s=ie([]),l=ie({}),c=ie({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:u,getToast:function(e){return l[e]||null}});function u(e){return-1!==n.indexOf(e)}function d(e){var t=e.containerId,n=c.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||c.containerId===t&&i)&&(o-=s.length,s=[])}function h(e){var t=s.length;if((o=P(e)?o-1:o-c.displayedToast)<0&&(o=0),t>0){var n=P(e)?1:c.props.limit;if(1===t||1===n)c.displayedToast++,f();else{var r=n>t?t:n;c.displayedToast=r;for(var a=0;a<r;a++)f()}}i({type:"REMOVE",toastId:e})}function f(){var e=s.shift(),t=e.toastContent,n=e.toastProps,r=e.staleId;setTimeout((function(){m(t,n,r)}),500)}function p(e,t){var n=t.delay,i=t.staleId,u=C(t,["delay","staleId"]);if(N(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||c.props.enableMultiContainer&&t!==c.props.containerId||c.isToastActive(n)&&null==r)}(u)){var d=u.toastId,f=u.updateId,p=c.props,g=function(){return h(d)},v=!(0,c.isToastActive)(d);v&&o++;var b,y,A={toastId:d,updateId:f,key:u.key||c.toastKey++,type:u.type,closeToast:g,closeButton:u.closeButton,rtl:p.rtl,position:u.position||p.position,transition:u.transition||p.transition,className:M(u.className||p.toastClassName),bodyClassName:M(u.bodyClassName||p.bodyClassName),style:u.style||p.toastStyle,bodyStyle:u.bodyStyle||p.bodyStyle,onClick:u.onClick||p.onClick,pauseOnHover:x(u.pauseOnHover)?u.pauseOnHover:p.pauseOnHover,pauseOnFocusLoss:x(u.pauseOnFocusLoss)?u.pauseOnFocusLoss:p.pauseOnFocusLoss,draggable:x(u.draggable)?u.draggable:p.draggable,draggablePercent:k(u.draggablePercent)?u.draggablePercent:p.draggablePercent,closeOnClick:x(u.closeOnClick)?u.closeOnClick:p.closeOnClick,progressClassName:M(u.progressClassName||p.progressClassName),progressStyle:u.progressStyle||p.progressStyle,autoClose:(b=u.autoClose,y=p.autoClose,!1===b||k(b)&&b>0?b:y),hideProgressBar:x(u.hideProgressBar)?u.hideProgressBar:p.hideProgressBar,progress:u.progress,role:O(u.role)?u.role:p.role,deleteToast:function(){!function(e){delete l[e]}(d)}};I(u.onOpen)&&(A.onOpen=u.onOpen),I(u.onClose)&&(A.onClose=u.onClose);var _=p.closeButton;!1===u.closeButton||N(u.closeButton)?_=u.closeButton:!0===u.closeButton&&(_=!N(p.closeButton)||p.closeButton),A.closeButton=_;var w=e;Object(r.isValidElement)(e)&&!O(e.type)?w=Object(r.cloneElement)(e,{closeToast:g}):I(e)&&(w=e({closeToast:g})),p.limit&&p.limit>0&&o>p.limit&&v?s.push({toastContent:w,toastProps:A,staleId:i}):k(n)&&n>0?setTimeout((function(){m(w,A,i)}),n):m(w,A,i)}}function m(e,t,n){var r=t.toastId;l[r]={content:e,props:t},i({type:"ADD",toastId:r,staleId:n})}function g(t){for(var n={},r=e.newestOnTop?Object.keys(l).reverse():Object.keys(l),i=0;i<r.length;i++){var a=l[r[i]],o=a.props.position;n[o]||(n[o]=[]),n[o].push(a)}return Object.keys(n).map((function(e){return t(e,n[e])}))}return Object(r.useEffect)((function(){return c.containerId=e.containerId,T.cancelEmit(3).on(0,p).on(1,(function(e){return a.current&&h(e)})).on(5,d).emit(2,c),function(){return T.emit(3,c)}}),[]),Object(r.useEffect)((function(){c.isToastActive=u,c.displayedToast=n.length,T.emit(4,n.length,e.containerId)}),[n]),Object(r.useEffect)((function(){c.props=e})),{getToastToRender:g,collection:l,containerRef:a,isToastActive:u}}(e),n=t.getToastToRender,i=t.containerRef,a=t.isToastActive,o=e.className,s=e.style,l=e.rtl,c=e.containerId;return Object(r.createElement)("div",{ref:i,className:"Toastify",id:c},Object(r.createElement)(_,{component:null},n((function(e,t){var n,i={className:E()("Toastify__toast-container","Toastify__toast-container--"+e,(n={},n["Toastify__toast-container--rtl"]=l,n),M(o)),style:0===t.length?S(S({},s),{},{pointerEvents:"none"}):S({},s)};return Object(r.createElement)(V,Object.assign({},i,{key:"container-"+e}),t.map((function(e){var t=e.content,n=e.props;return Object(r.createElement)(U,Object.assign({},n,{in:a(n.toastId),key:"toast-"+n.key,closeButton:!0===n.closeButton?j:n.closeButton}),t)})))}))))};W.defaultProps={position:L.TOP_RIGHT,transition:H,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:j,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,role:"alert"};var G,q,Y,K=new Map,X=[],Q=!1;function $(){return K.size>0}function J(e,t){var n=function(e){return $()?K.get(e||G):null}(t.containerId);return n?n.getToast(e):null}function Z(){return(Math.random().toString(36)+Date.now().toString(36)).substr(2,10)}function ee(e){return e&&(O(e.toastId)||k(e.toastId))?e.toastId:Z()}function te(e,t){return $()?T.emit(0,e,t):(X.push({content:e,options:t}),Q&&D&&(Q=!1,q=document.createElement("div"),document.body.appendChild(q),Object(a.render)(Object(r.createElement)(W,Object.assign({},Y)),q))),t.toastId}function ne(e,t){return S(S({},t),{},{type:t&&t.type||e,toastId:ee(t)})}var re=function(e,t){return te(e,ne(R.DEFAULT,t))};function ie(e,t){void 0===t&&(t=!1);var n=Object(r.useRef)(e);return Object(r.useEffect)((function(){t&&(n.current=e)})),n.current}function ae(e,t){switch(t.type){case"ADD":return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case"REMOVE":return P(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function oe(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}re.success=function(e,t){return te(e,ne(R.SUCCESS,t))},re.info=function(e,t){return te(e,ne(R.INFO,t))},re.error=function(e,t){return te(e,ne(R.ERROR,t))},re.warning=function(e,t){return te(e,ne(R.WARNING,t))},re.dark=function(e,t){return te(e,ne(R.DARK,t))},re.warn=re.warning,re.dismiss=function(e){return $()&&T.emit(1,e)},re.clearWaitingQueue=function(e){return void 0===e&&(e={}),$()&&T.emit(5,e)},re.isActive=function(e){var t=!1;return K.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},re.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=J(e,t);if(n){var r=n.props,i=n.content,a=S(S(S({},r),t),{},{toastId:t.toastId||e,updateId:Z()});a.toastId!==e&&(a.staleId=e);var o=void 0!==a.render?a.render:i;delete a.render,te(o,a)}}),0)},re.done=function(e){re.update(e,{progress:1})},re.onChange=function(e){return I(e)&&T.on(4,e),function(){I(e)&&T.off(4,e)}},re.configure=function(e){void 0===e&&(e={}),Q=!0,Y=e},re.POSITION=L,re.TYPE=R,T.on(2,(function(e){G=e.containerId||e,K.set(G,e),X.forEach((function(e){T.emit(0,e.content,e.options)})),X=[]})).on(3,(function(e){K.delete(e.containerId||e),0===K.size&&T.off(0).off(1).off(5),D&&q&&document.body.removeChild(q)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return _})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return A})),n.d(t,"f",(function(){return O})),n.d(t,"g",(function(){return j})),n.d(t,"h",(function(){return F}));var r=n(85),i=n(0),a=n.n(i),o=n(6),s=n.n(o),l=n(153),c=n(188),u=n.n(c),d=n(543),h=n.n(d);function f(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var p=a.a.createContext||function(e,t){var n,r,a="__create-react-context-"+h()()+"__",o=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=f(t.props.value),t}u()(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,i=e.value;((a=r)===(o=i)?0!==a||1/a==1/o:a!=a&&o!=o)?n=0:(n="function"==typeof t?t(r,i):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var a,o},r.render=function(){return this.props.children},n}(i.Component);o.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var l=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}u()(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(i.Component);return l.contextTypes=((r={})[a]=s.a.object,r),{Provider:o,Consumer:l}},m=n(161),g=n(55),v=n(556),b=n.n(v),y=(n(217),n(87)),A=(n(159),function(e){var t=p();return t.displayName=e,t}("Router")),_=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return a.a.createElement(A.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(a.a.Component);a.a.Component;var w=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(a.a.Component);var E={},S=0;function C(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(E[e])return E[e];var t=b.a.compile(e);return S<1e4&&(E[e]=t,S++),t}(e)(t,{pretty:!0})}function T(e){var t=e.computedMatch,n=e.to,r=e.push,i=void 0!==r&&r;return a.a.createElement(A.Consumer,null,(function(e){e||Object(m.a)(!1);var r=e.history,o=e.staticContext,s=i?r.push:r.replace,c=Object(l.c)(t?"string"==typeof n?C(n,t.params):Object(g.a)({},n,{pathname:C(n.pathname,t.params)}):n);return o?(s(c),null):a.a.createElement(w,{onMount:function(){s(c)},onUpdate:function(e,t){var n=Object(l.c)(t.to);Object(l.f)(n,Object(g.a)({},c,{key:n.key}))||s(c)},to:n})}))}var k={},x=0;function O(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,a=void 0!==i&&i,o=n.strict,s=void 0!==o&&o,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=k[n]||(k[n]={});if(r[e])return r[e];var i=[],a={regexp:b()(e,i,t),keys:i};return x<1e4&&(r[e]=a,x++),a}(n,{end:a,strict:s,sensitive:c}),i=r.regexp,o=r.keys,l=i.exec(e);if(!l)return null;var u=l[0],d=l.slice(1),h=e===u;return a&&!h?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:h,params:o.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var I=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(A.Consumer,null,(function(t){t||Object(m.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?O(n.pathname,e.props):t.match,i=Object(g.a)({},t,{location:n,match:r}),o=e.props,s=o.children,l=o.component,c=o.render;return Array.isArray(s)&&0===s.length&&(s=null),a.a.createElement(A.Provider,{value:i},i.match?s?"function"==typeof s?s(i):s:l?a.a.createElement(l,i):c?c(i):null:"function"==typeof s?s(i):null)}))},t}(a.a.Component);function M(e){return"/"===e.charAt(0)?e:"/"+e}function P(e,t){if(!e)return t;var n=M(e);return 0!==t.pathname.indexOf(n)?t:Object(g.a)({},t,{pathname:t.pathname.substr(n.length)})}function D(e){return"string"==typeof e?e:Object(l.e)(e)}function N(e){return function(){Object(m.a)(!1)}}function L(){}a.a.Component;var R=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return a.a.createElement(A.Consumer,null,(function(t){t||Object(m.a)(!1);var n,r,i=e.props.location||t.location;return a.a.Children.forEach(e.props.children,(function(e){if(null==r&&a.a.isValidElement(e)){n=e;var o=e.props.path||e.props.from;r=o?O(i.pathname,Object(g.a)({},e.props,{path:o})):t.match}})),r?a.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(a.a.Component);var B=a.a.useContext;function j(){return B(A).history}function F(){return B(A).location}},function(e,t,n){"use strict";var r=n(458),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,l=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),c=function(e,t,n,r){var i;t in e&&("function"!=typeof(i=r)||"[object Function]"!==a.call(i)||!r())||(l?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},a=r(t);i&&(a=o.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s<a.length;s+=1)c(e,a[s],t[a[s]],n[a[s]])};u.supportsDescriptors=!!l,e.exports=u},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(119);function i(e){return Object(r.a)(e).getComputedStyle(e)}},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=o(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var d=0;d<s.length;d++)a.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(68))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SignalingClientEventType=void 0,function(e){e[e.WebSocketConnecting=0]="WebSocketConnecting",e[e.WebSocketOpen=1]="WebSocketOpen",e[e.WebSocketError=2]="WebSocketError",e[e.WebSocketClosing=3]="WebSocketClosing",e[e.WebSocketClosed=4]="WebSocketClosed",e[e.WebSocketFailed=5]="WebSocketFailed",e[e.WebSocketMessage=6]="WebSocketMessage",e[e.WebSocketSendMessageFailure=7]="WebSocketSendMessageFailure",e[e.WebSocketSentMessage=8]="WebSocketSentMessage",e[e.ProtocolDecodeFailure=9]="ProtocolDecodeFailure",e[e.ReceivedSignalFrame=10]="ReceivedSignalFrame",e[e.WebSocketSkippedMessage=11]="WebSocketSkippedMessage"}(r=t.SignalingClientEventType||(t.SignalingClientEventType={})),t.default=r},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(320),o=n(983);i(n(983),t);var s=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,n){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,r=new o.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===a.ElementType.Text)t?n.data=(n.data+e).replace(s," "):n.data+=e,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{t&&(e=e.replace(s," "));var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.NodeWithChildren(a.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new o.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(55),i=n(87),a=n(0);n(165);function o(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function l(e,t,n){var r=Object(a.useRef)(void 0!==e),i=Object(a.useState)(t),o=i[0],s=i[1],l=void 0!==e,c=r.current;return r.current=l,!l&&c&&o!==t&&s(t),[l?e:o,Object(a.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n&&n.apply(void 0,[e].concat(r)),s(e)}),[n])]}function c(e,t){return Object.keys(t).reduce((function(n,a){var c,u=n,d=u[o(a)],h=u[a],f=Object(i.a)(u,[o(a),a].map(s)),p=t[a],m=l(h,d,e[p]),g=m[0],v=m[1];return Object(r.a)({},f,((c={})[a]=g,c[p]=v,c))}),e)}n(85),n(245)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0);var i=function(e){var t=Object(r.useRef)(e);return Object(r.useEffect)((function(){t.current=e}),[e]),t};function a(e){var t=i(e);return Object(r.useCallback)((function(){return t.current&&t.current.apply(t,arguments)}),[t])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0);var i=function(e){var t=Object(r.useRef)(e);return Object(r.useEffect)((function(){t.current=e}),[e]),t};function a(e){var t=i(e);return Object(r.useCallback)((function(){return t.current&&t.current.apply(t,arguments)}),[t])}},function(e,n,r){"use strict";r.d(n,"d",(function(){return rn})),r.d(n,"g",(function(){return En})),r.d(n,"a",(function(){return Cn})),r.d(n,"e",(function(){return xn})),r.d(n,"c",(function(){return i.b})),r.d(n,"f",(function(){return Q})),r.d(n,"b",(function(){return In})),r.d(n,"h",(function(){return Ut}));var i=r(384),a=r(9),o=r.n(a),s=r(60),l=r.n(s),c=r(12),u=r.n(c),d=r(15),h=r.n(d),f=r(3),p=r.n(f),m=r(13),g=r.n(m),v=r(14),b=r.n(v),y=r(10),A=r.n(y),_=r(2),w=r.n(_),E=r(0),S=r.n(E),C=r(7),T=r(17),k=r(37),x=r(8),O=r(1),I=r(31),M=r.n(I),P=r(4),D=r.n(P),N=r(36),L=r(22),R=r(334),B=r.n(R);function j(){var e=S.a.createElement("div",{className:D()(B.a.instructionText)},S.a.createElement("div",{className:"u-fs-1x1o8"},t("noSearchResultInstruction1")),S.a.createElement("div",{className:"u-text-logo-grey"},t("noSearchResultInstruction2")));return S.a.createElement("div",{className:"w-100 h-100 d-flex justify-content-center align-items-center flex-column u-overflow-hidden"},S.a.createElement("img",{height:"150",width:"150",src:L.a.peopleImage,alt:"people image"}),e)}var F=r(168);var U=function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){return u()(this,n),t.apply(this,arguments)}return h()(n,[{key:"render",value:function(){var e,t=this.state,n=t.activeTab,r=t.peopleList,i=t.activeItem,a=t.showNoSearchResult,o=t.isItemListLoading,s=t.noFriends,l=t.noIncomingRequests,c=t.noGroups,u=t.isShowPeoplePreview,d=t.peoplePreviewData,h=t.name,f=t.description,p=this.props,m=p.isShowEditGroupFormModal,g=p.openCreateGroupForm,v=!Object(C.isEmpty)(d)&&u?d:Object(C.isEmpty)(i)?d:i;a?S.a.createElement(j,null):S.a.createElement(N.zb,M()({},v,{isShowPeoplePreview:u,onHeaderActionClick:this.handleHeaderActionClick}));return e=a?S.a.createElement(j,null):n==F.PEOPLE.TAB.GROUPS?S.a.createElement(N.ab,{name:v.name,groupData:v,onHeaderActionClick:this.handleHeaderActionClick,onEditActionClick:this.handleEditGroup,groupMemberList:v.members?v.members:[],onUpdateGroupAvatar:this.handleUpdateGroupAvatar,groupList:r}):S.a.createElement(N.zb,M()({},v,{isShowPeoplePreview:u,onHeaderActionClick:this.handleHeaderActionClick})),S.a.createElement(N.Z,{header:S.a.createElement(N.xb,{activeTab:n,noFriends:s,noIncomingRequests:l,noGroups:c,onPeopleSearch:this.handlePeopleSearch}),leftContent:S.a.createElement("div",{className:"flex-fill position-relative"},S.a.createElement("div",{id:"people-leftbar-content",className:B.a.leftBarContent},o&&S.a.createElement(N.tb,{className:"u-text-gray-400"}),n==F.PEOPLE.TAB.GROUPS?S.a.createElement(N.yb,{scrollRef:this.itemListRef,items:r,activeItem:i,onClick:this.activateHoveredItem,scrollToItem:this.scrollToItem,activateItem:this.activateItem,onMouseLeave:this.handleItemListMouseLeave,onMouseEnter:this.handleItemListMouseEnter,onListItemActionClick:this.handlePeopleActionClick,updatePeoplePreviewData:this.updateGroupPreviewData,peoplePreviewData:d,activeTab:n}):S.a.createElement(N.yb,{scrollRef:this.itemListRef,items:r,activeItem:i,onClick:this.activateHoveredItem,scrollToItem:this.scrollToItem,activateItem:this.activateItem,onMouseLeave:this.handleItemListMouseLeave,onMouseEnter:this.handleItemListMouseEnter,onListItemActionClick:this.handlePeopleActionClick,updatePeoplePreviewData:this.updatePeoplePreviewData,peoplePreviewData:d,activeTab:n}))),rightContent:S.a.createElement("div",null),firstArea:e,firstAreaClassName:B.a.firstAreaUpperWrapper},m&&S.a.createElement(N.U,{activeItems:i,handleChange:this.handleGroupEditChange,name:h,description:f,onGroupSaveClick:this.handleGroupSaveClick,onGroupCancelClick:this.handleGroupCancelClick,groupMemberList:i.members?i.members:[],handleUpdateMemberListChange:this.handleUpdateMemberListChange,onUpdateGroupAvatar:this.handleUpdateGroupAvatar}),g&&S.a.createElement(N.N,{onSubmit:this.handleCreateGroupFormSubmit,onClose:this.handleCreateGroupFormClose}))}}]),n}(E.Component),H=r(54);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var W=O.g.PEOPLE,G=W.TAB,q=W.STATUS,Y=W.ACTION_TYPE,K=O.g.SEARCH_PARAM,X=function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){var e;u()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),w()(p()(e),"itemListRef",Object(E.createRef)()),w()(p()(e),"isScrollingToItem",!1),w()(p()(e),"isMouseOverList",!1),w()(p()(e),"state",{activeTab:"",peopleList:[],isItemListLoading:!1,isActiveItemFocusing:!1,scrollingItem:null,showItemPreview:!0,activeItem:{},noFriends:0,noIncomingRequests:0,noGroups:0,showNoSearchResult:!1,peoplePreviewData:{},isShowPeoplePreview:!1,name:"",description:""}),w()(p()(e),"handleURLChange",(function(t){var n=new URLSearchParams(window.location.search),r=n.get(K.KEY.TAB),i=n.get(K.KEY.UID),a=Object(C.get)(t,"state.refresh",!1);[G.FRIENDS,G.REQUEST].includes(r)?e.handleDataChange(r,{userId:i},a):[G.GROUPS].includes(r)?e.handleGroupDataChange(r,{uid:i},a):(O.c.removeURLSearchParams([K.KEY.TAB],null,!0),e.handleDataChange(G.PEOPLE,{userId:i},a))})),w()(p()(e),"handleEditGroup",(function(){(0,e.props.updateCreateGroupModal)({show:!0})})),w()(p()(e),"handleLocalStorageChange",l()(o.a.mark((function t(){var n,r,i,a;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props,r=n.userInfo,i=n.initializeApp,a=n.logout,t.next=3,O.c.getToken();case 3:!t.sent&&r.userId&&a(),token&&!r.userId&&i();case 6:case"end":return t.stop()}}),t)})))),w()(p()(e),"componentDidMount",(function(){e.unlistenHistory=e.props.history.listen(e.handleURLChange),e.handleURLChange(),e.fetchFriendshipStatus(),e.fetchGroupCount(),window.addEventListener("storage",e.handleLocalStorageChange)})),w()(p()(e),"scrollItemListToTop",(function(){e.itemListRef&&e.itemListRef.current&&e.itemListRef.current.scrollRef.setPosition(0,0)})),w()(p()(e),"fetchFriendshipStatus",(function(){(0,e.props.getFriendshipStatus)((function(t){t.noFriends,t.noIncomingRequests;var n=t.friendCounts,r=t.incomingRequestCounts;e.setState((function(e){return{noFriends:Object(C.isNumber)(n)?n:e.noFriends,noIncomingRequests:Object(C.isNumber)(r)?r:e.noIncomingRequests}}))}))})),w()(p()(e),"fetchGroupCount",(function(){(0,e.props.getGroupCount)((function(t){e.setState({noGroups:t})}))})),w()(p()(e),"fetchPeopleList",(function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.props,i=r.getPeopleList,a=r.getFriendList,o=r.getRequestList,s=r.getGroupList,l=e.state.activeTab;switch(e.setState({isItemListLoading:!0}),l){case G.PEOPLE:t=i;break;case G.FRIENDS:t=a;break;case G.GROUPS:t=s;break;case G.REQUEST:t=o;break;default:t=i}t(null,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.items,i=void 0===r?[]:r,a=t.noFriends,o=t.noIncomingRequests,s=t.friendCounts,c=void 0===s?0:s,u=t.incomingRequestCounts,d=void 0===u?0:u;t.outgoingRequestCounts,t.total;e.setState((function(e){var t=Object(C.isNumber)(a)?a:e.noFriends,n=Object(C.isNumber)(o)?o:e.noIncomingRequests;return l!==G.REQUEST&&l!==G.FRIENDS||(t=Object(C.isNumber)(c)?c:e.noFriends,n=Object(C.isNumber)(d)?d:e.noIncomingRequests),{isItemListLoading:!1,peopleList:i||[],noFriends:t,noIncomingRequests:n,showNoSearchResult:!1}}),(function(){switch(l){case G.GROUPS:if(n.uid){var t=Object(C.find)(i,{uid:n.uid});if(t)return e.scrollToItem(t),e.activateGroupItem(t),void e.updateGroupPreviewData(t)}e.scrollItemListToTop(),i[0]?(e.activateGroupItem(i[0]),e.updateGroupPreviewData(i[0]),O.c.addURLSearchParams([[K.KEY.UID,i[0].uid]],!0)):e.setState({activeItem:{},peoplePreviewData:{},name:"",description:""});break;default:if(n.userId){var r=Object(C.find)(i,{userId:n.userId});if(r)return e.scrollToItem(r),e.activateItem(r),void e.updatePeoplePreviewData(r)}e.scrollItemListToTop(),i[0]?(e.activateItem(i[0]),e.updatePeoplePreviewData(i[0]),O.c.addURLSearchParams([[K.KEY.UID,i[0].userId]],!0)):e.setState({activeItem:{},peoplePreviewData:{},name:"",description:""})}}))}),(function(){return e.setState({isItemListLoading:!1})}))})),w()(p()(e),"handleDataChange",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=e.state,a=i.peopleList,o=i.activeTab,s=i.peoplePreviewData,l=void 0===s?{}:s;if(o!==t||r)e.setState({activeTab:t},(function(){return e.fetchPeopleList(n)}));else{var c=Object(C.find)(a,{userId:n.userId});c&&(e.activateItem(n),e.scrollToItem(n,l.userId===n.userId))}})),w()(p()(e),"handleGroupDataChange",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=e.state,a=i.peopleList,o=i.activeTab,s=i.peoplePreviewData,l=void 0===s?{}:s;if(o!==t||r)e.setState({activeTab:t},(function(){return e.fetchPeopleList(n)}));else{var c=Object(C.find)(a,{uid:n.uid});c&&(e.activateGroupItem({uid:n.uid}),e.scrollToItem(n,l.uid===n.uid))}})),w()(p()(e),"handlePeopleSearch",(function(t){var n=e.props.searchPeople;e.setState({isItemListLoading:!0}),t?n({searchTerm:t},(function(t){var n=t.items,r=void 0===n?[]:n;e.setState({isItemListLoading:!1,peopleList:r||[],activeItem:r[0],peoplePreviewData:r[0],showNoSearchResult:0===r.length},(function(){if(e.scrollItemListToTop(),r.length){var t=O.c.addURLSearchParams([[K.KEY.UID,r[0].userId]],null,!0);k.a.push(t)}}))}),(function(){return e.setState({isItemListLoading:!1})})):(e.setState({showNoSearchResult:!1}),e.fetchPeopleList())})),w()(p()(e),"updateListItem",(function(t){var n=e.state,r=n.activeTab,i=n.activeItem,a=n.peopleList,o=Object(C.cloneDeep)(a),s=i.userId===t.userId;s&&e.setState({activeItem:Object.assign({},Object(C.cloneDeep)(i),t)});var l=Object(C.find)(o,{userId:t.userId});l&&(l&&Object.assign(l,t),r===G.FRIENDS&&Object(C.remove)(o,(function(e){return e.friendshipStatus!==q.FRIEND})),r===G.REQUEST&&Object(C.remove)(o,(function(e){return e.friendshipStatus!==q.REQUESTER_PENDING})),e.setState({peopleList:o},(function(){var t=e.getCurrentIndicatorItem();e.updatePeoplePreviewData(t||{}),[G.FRIENDS,G.REQUEST].includes(r)&&s&&(t?O.c.addURLSearchParams([[O.g.SEARCH_PARAM.KEY.UID,t.userId]],!0):e.setState({activeItem:{}}))})))})),w()(p()(e),"handlePeopleActionClick",(function(t,n,r){var i,a=e.props,o=a.unfriend,s=a.sendFriendRequest,l=a.cancelFriendRequest,c=a.confirmFriendRequest,u=a.declineFriendRequest,d=e.state.activeTab;switch(n){case Y.UNFRIEND:i=o;break;case Y.SEND_FRIEND_REQUEST:i=s;break;case Y.CANCEL_FRIEND_REQUEST:i=l;break;case Y.CONFIRM_FRIEND_REQUEST:i=c;break;case Y.DECLINE_FRIEND_REQUEST:i=u;break;case Y.DELETE_ITEM:d===G.GROUPS&&e.handleGroupDelete(t,r)}i&&i(t,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.friends,i=void 0===n?[]:n,a=t.friendCounts,o=t.incomingRequestCounts;e.updateListItem(i[0]),r&&r(t),e.setState({noFriends:a,noIncomingRequests:o})}),(function(e){return r&&r(e)}))})),w()(p()(e),"handleHeaderActionClick",(function(t,n){var r=e.state.activeItem;r&&e.handlePeopleActionClick(r,t,n)})),w()(p()(e),"scrollToItem",(function(t,n,r){e.itemListRef.current.scrollRef.setMomentum(0,0);var i,a=V({},t||e.state.peoplePreviewData),o=e.state,s=o.peopleList;if(-1!==(i=o.activeTab===G.GROUPS?s.findIndex((function(e){return e.uid===a.uid})):s.findIndex((function(e){return e.userId===a.userId})))){var l=O.c.convertRemToPx(H.heightPeopleItem)*i;e.isScrollingToItem=!0,n?e.itemListRef.current.setScrollPosition(l,(function(){e.isScrollingToItem=!1})):(e.itemListRef.current.scrollRef.scrollTop=l,e.isScrollingToItem=!1)}})),w()(p()(e),"activateItem",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.state.activeItem,r=void 0===n?{}:n;if(t.userId&&r.userId!==t.userId){var i=e.state.peopleList,a=e.props.getPeopleDetails;a({userId:t.userId},(function(n){var r=Object(C.find)(i,{userId:t.userId});e.setState({activeItem:V(V({},r),n)})}))}})),w()(p()(e),"activateGroupItem",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.state.activeItem,r=void 0===n?{}:n;if(t.uid&&r.uid!==t.uid){var i=e.state.peopleList,a=e.props.getGroupDetails;a({uid:t.uid},(function(n){var r=Object(C.find)(i,{uid:t.uid});e.setState({activeItem:V({},r),name:r.name,description:r.description})}))}})),w()(p()(e),"updatePeoplePreviewData",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.isScrollingToItem||e.setState({peoplePreviewData:t})})),w()(p()(e),"activateHoveredItem",(function(){})),w()(p()(e),"updateGroupPreviewData",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.isScrollingToItem||e.setState({peoplePreviewData:t})})),w()(p()(e),"activateScrollingItem",(function(){})),w()(p()(e),"handleItemListMouseLeave",(function(){e.setState({isShowPeoplePreview:!1})})),w()(p()(e),"handleItemListMouseEnter",(function(){e.setState({isShowPeoplePreview:!0})})),w()(p()(e),"handleGroupEditChange",(function(t){var n=t.name,r=t.value;e.setState(w()({},n,r))})),w()(p()(e),"handleUpdateMemberListChange",(function(t){var n=e.state,r=n.activeItem,i=void 0===r?{}:r,a=n.peopleList,o=void 0===a?[]:a,s=n.peoplePreviewData,l=void 0===s?{}:s,c=Object(C.cloneDeep)(o),u=Object(C.find)(c,{uid:i.uid});u&&(u&&Object.assign(u,V(V({},u),{},{members:t})),e.setState({activeItem:V(V({},i),{},{members:t}),peopleList:c}),i.uid===l.uid&&e.setState({peoplePreviewData:V(V({},l),{},{members:t})}))})),w()(p()(e),"handleGroupSaveClick",(function(t){var n=e.state,r=n.activeItem,i=void 0===r?{}:r,a=n.name,o=n.description,s=n.peopleList,l=void 0===s?[]:s,c=n.peoplePreviewData,u=Object(C.cloneDeep)(l);i.uid&&(0,e.props.updateGroupInfo)({uid:i.uid,name:a,description:o},(function(n){var r=Object(C.find)(u,{uid:i.uid});r&&(r&&Object.assign(r,V(V({},r),{},{name:a,description:o})),t(),e.setState({activeItem:V(V({},i),{},{name:a,description:o}),name:a,description:o,peopleList:u}),i.uid===c.uid&&e.setState({peoplePreviewData:V(V({},c),{},{name:a,description:o})}))}))})),w()(p()(e),"handleGroupCancelClick",(function(){var t=e.state.activeItem,n=void 0===t?{}:t;e.setState({name:n.name,description:n.description})})),w()(p()(e),"handleUpdateGroupAvatar",(function(t){var n=e.state,r=n.activeItem,i=void 0===r?{}:r,a=n.peopleList,o=void 0===a?[]:a,s=n.peoplePreviewData,l=void 0===s?{}:s,c=Object(C.cloneDeep)(o),u={image:t.photo,contentType:t.contentType},d=Object(C.find)(c,{uid:i.uid});d&&(d&&Object.assign(d,V(V({},d),{},{avatar:u})),e.setState({activeItem:V(V({},i),{},{avatar:u}),peopleList:c}),i.uid===l.uid&&e.setState({peoplePreviewData:V(V({},l),{},{avatar:u})}))})),w()(p()(e),"handleCreateGroupFormSubmit",(function(t,n){(0,e.props.createGroup)(t,(function(t){var n=t.uid;e.fetchGroupCount(),e.handleCreateGroupFormClose(),O.c.addURLSearchParams([[K.KEY.TAB,G.GROUPS],[K.KEY.UID,n]],!1,!1,{refresh:!0});var r=e.state.activeItem;e.setState({activeItem:V(V({},r),{},{members:[]})}),e.handleEditGroup()}),n)})),w()(p()(e),"handleCreateGroupFormClose",(function(){(0,e.props.toggleCreateGroupForm)(!1)})),w()(p()(e),"getCurrentIndicatorItem",(function(){var t=e.state.peopleList;if(Object(C.isEmpty)(t))return null;var n=O.c.convertRemToPx(H.heightPeopleItem),r=e.itemListRef.current.scrollRef.scrollTop,i=parseInt((r+n/2)/n,0);return-1!==i&&t[i]?t[i]:null})),w()(p()(e),"handleGroupDelete",(function(t,n){var r=e.props.deleteGroup,i=t.uid,a=t.name;r({uid:i,name:a},(function(){var t=e.state,r=t.activeItem,a=t.peopleList,o=Object(C.cloneDeep)(a);Object(C.remove)(o,(function(e){return e.uid===i})),e.setState({peopleList:o,activeItem:r.uid===i?{}:r},(function(){e.fetchGroupCount();var t=e.getCurrentIndicatorItem();e.updateGroupPreviewData(t||{}),t&&r.uid===i&&O.c.addURLSearchParams([[O.g.SEARCH_PARAM.KEY.UID,t.uid]],!0)})),n&&n(response)}),(function(e){return n&&n(e)}))})),e}return h()(n,[{key:"componentWillUnmount",value:function(){window.removeEventListener("storage",this.handleLocalStorageChange),this.unlistenHistory()}}]),n}(U),Q=Object(T.b)((function(e){var t=e.people,n=e.auth;return{isShowEditGroupFormModal:t.createGroupModal.show,openCreateGroupForm:t.openCreateGroupForm,userInfo:n.userInfo}}),(function(e){return{getFriendshipStatus:function(t,n){return e(x.i.getFriendshipStatus(t,n))},getPeopleList:function(t,n,r){return e(x.i.getPeopleList(t,n,r))},getPeopleDetails:function(t,n,r){return e(x.i.getPeopleDetails(t,n,r))},getFriendList:function(t,n,r){return e(x.i.getFriendList(t,n,r))},getGroupList:function(t,n,r){return e(x.i.getGroupList(t,n,r))},getGroupDetails:function(t,n,r){return e(x.i.getGroupDetails(t,n,r))},updateGroupInfo:function(t,n,r){return e(x.i.updateGroupInfo(t,n,r))},getGroupMember:function(t,n,r){return e(x.i.getGroupMember(t,n,r))},getRequestList:function(t,n,r){return e(x.i.getRequestList(t,n,r))},searchPeople:function(t,n,r){return e(x.i.searchPeople(t,n,r))},unfriend:function(t,n,r){return e(x.i.unfriend(t,n,r))},sendFriendRequest:function(t,n,r){return e(x.i.sendFriendRequest(t,n,r))},cancelFriendRequest:function(t,n,r){return e(x.i.cancelFriendRequest(t,n,r))},confirmFriendRequest:function(t,n,r){return e(x.i.confirmFriendRequest(t,n,r))},declineFriendRequest:function(t,n,r){return e(x.i.declineFriendRequest(t,n,r))},updateCreateGroupModal:function(t,n,r){return e(x.i.updateCreateGroupModal(t,n,r))},toggleCreateGroupForm:function(t){return e(x.i.toggleCreateGroupForm(t))},createGroup:function(t,n,r){return e(x.i.createGroup(t,n,r))},deleteGroup:function(t,n,r){return e(x.i.deleteGroup(t,n,r))},getGroupCount:function(t,n){return e(x.i.getGroupCount(t,n))},initializeApp:function(){return e(x.f.initializeApp())},logout:function(){return e(x.a.authLogOut())}}}))(X),$=r(29),J=r.n($),Z=r(48),ee=r(18),te=r(16),ne=r(93),re=r.n(ne),ie=r(32);function ae(){var e=re()(["\n  position: absolute;\n  color: red;\n  display: flex;\n  justify-content: center;\n  text-align: center;\n  width: 100%;\n\n  p {\n    padding: 0.2rem 1rem 0.25rem 1.5rem;\n    font-size: 0.825rem;\n    margin-bottom: 0;\n    color: #000;\n    font-style: italic;\n    position: relative;\n    background-color: #ffebab;\n    border-radius: 0 0 7px 7px;\n    &:before {\n      content: '';\n      display: block;\n      border-radius: 50%;\n      background-color: red;\n      width: 0.75rem;\n      height: 0.75rem;\n      position: absolute;\n      left: 9px;\n      top: 6px;\n      animation: blinker 1s cubic-bezier(0.5, 0, 1, 1) infinite alternate;\n    }\n  }\n\n  @keyframes blinker {\n    from {\n      opacity: 1;\n    }\n    to {\n      opacity: 0;\n    }\n  }\n"]);return ae=function(){return e},e}function oe(){var e=re()(["\n  position: absolute;\n  color: red;\n  display: flex;\n  justify-content: center;\n  text-align: center;\n  width: 100%;\n\n  p {\n    padding: 0.25rem 1rem;\n    font-size: 0.825rem;\n    margin-bottom: 0;\n    color: red;\n    font-style: italic;\n    position: relative;\n    &:before {\n      content: '';\n      display: block;\n      border-radius: 50%;\n      background-color: red;\n      width: 0.75rem;\n      height: 0.75rem;\n      position: absolute;\n      left: 0;\n      top: 7px;\n      animation: blinker 1s cubic-bezier(0.5, 0, 1, 1) infinite alternate;\n    }\n  }\n\n  @keyframes blinker {\n    from {\n      opacity: 1;\n    }\n    to {\n      opacity: 0;\n    }\n  }\n"]);return oe=function(){return e},e}function se(){var e=re()(["\n  position: relative;\n  grid-area: content;\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n\n  .videos {\n    flex: 1;\n  }\n\n  .controls {\n    position: absolute;\n    bottom: 1rem;\n    left: 50%;\n    transform: translateX(-50%);\n  }\n\n  @media screen and (max-width: 768px) {\n    .controls {\n      position: static;\n      transform: unset;\n    }\n  }\n"]);return se=function(){return e},e}function le(){var e=re()(["\n  height: 100vh;\n  width: 100%;\n\n  display: grid;\n\n  .video-content {\n    grid-area: content;\n  }\n\n  ","\n\n  .nav {\n    grid-area: nav;\n  }\n\n  .roster {\n    grid-area: roster;\n    z-index: 2;\n  }\n\n  @media screen and (min-width: 769px) {\n    .mobile-toggle {\n      display: none;\n    }\n  }\n\n  @media screen and (max-width: 768px) {\n    grid-template-columns: 1fr;\n    grid-template-areas: 'content';\n\n    .nav {\n      grid-area: unset;\n      position: fixed;\n    }\n\n    .roster {\n      grid-area: unset;\n      position: fixed;\n      top: 0;\n      left: 0;\n      right: 0;\n      bottom: 0;\n      max-width: 320px;\n    }\n  }\n\n  @media screen and (max-width: 460px) {\n    .roster {\n      max-width: 100%;\n    }\n  }\n"]);return le=function(){return e},e}var ce=ie.c.main(le(),(function(e){var t=e.showNav,n=e.showRoster;return t&&n?"\n        grid-template-columns: auto auto 1fr;\n        grid-template-areas: 'nav roster content';\n      ":t?"\n        grid-template-columns: auto 1fr;\n        grid-template-areas: 'nav content';\n      ":n?"\n        grid-template-columns: auto 1fr;\n        grid-template-areas: 'roster content';\n      ":"\n      grid-template-columns: 1fr;\n      grid-template-areas: 'content';\n    "})),ue=ie.c.div(se()),de=ie.c.div(oe());ie.c.div(ae());function he(){var e=re()(["\n  font-size: 1rem;\n\n  dt {\n    display: inline-block;\n    margin-bottom: 0.75rem;\n    margin-right: 0.5rem;\n\n    &::after {\n      content: ':';\n    }\n  }\n\n  dd {\n    display: inline-block;\n    font-weight: 600;\n  }\n"]);return he=function(){return e},e}var fe=ie.c.dl(he()),pe=function(){Object(Z.M)(),Object(T.c)();var e,t=Object(T.d)((function(e){return e.videolive.meetingSession})),n=Object(T.d)((function(e){return e.videolive.participants})),r=(Object(T.d)((function(e){return e.videolive.meetingDetail})),localStorage.getItem(O.g.MEETING_INFO_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_INFO_KEY))),i=t&&(null===(e=t.meeting)||void 0===e?void 0:e.meetingHostId),a=i&&n&&n.find((function(e){return e.userId===i}));return Object(E.useEffect)((function(){}),[]),S.a.createElement(Z.k,{container:!0,layout:"fill-space-centered"},S.a.createElement(Z.k,{mb:"2rem",mr:{md:"2rem"},px:"1rem"},S.a.createElement(Z.l,{level:4,tag:"h1",mb:2},r&&r.meetingTitle),S.a.createElement(fe,null,S.a.createElement("div",null,S.a.createElement("dt",null,"Organizer"),S.a.createElement("dd",null,a&&a.fullName||"")))))},me=r(140),ge=r(1834),ve=r(1011),be=r(1815);function ye(){var e=re()(["\n  font-size: 1.4375rem;\n  letter-spacing: 0.1px;\n"]);return ye=function(){return e},e}function Ae(){var e=re()(["\n  padding: 1rem 1rem 1rem 0;\n"]);return Ae=function(){return e},e}var _e=ie.c.p(Ae()),we=ie.c.div(ye()),Ee=function(){var e=Object(T.c)(),t=Object(Z.M)(),n=Object(E.useState)(!1),r=J()(n,2),i=r[0],a=r[1],s=Object(E.useState)(!1),c=J()(s,2),u=c[0],d=c[1],h=function(){return a(!i)},f=(Object(me.g)(),localStorage.getItem(O.g.MEETING_INFO_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_INFO_KEY))),p=localStorage.getItem(O.g.MEETING_SESSION_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_SESSION_KEY)),m=f&&f.isVideoOwner,g=function(){var e=l()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.leave();case 2:window.close();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=function(){var n=l()(o.a.mark((function n(){var r;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:d(!0),e(x.n.endMeeting({meetUid:null===(r=p.meeting)||void 0===r?void 0:r.uid},l()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.leave();case 2:window.close();case 3:case"end":return e.stop()}}),e)})))));case 2:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();return S.a.createElement(S.a.Fragment,null,S.a.createElement(Z.g,{icon:S.a.createElement(Z.s,null),onClick:h,label:Object(te.t)("meeting.leave")}),i&&S.a.createElement(ge.a,{show:!0,centered:!0,size:"md",onClose:h},S.a.createElement(ge.a.Header,null,S.a.createElement(we,null,Object(te.t)("modal.confirmation")),S.a.createElement("div",{className:"close-modal-btn",onClick:h,role:"button"},S.a.createElement("i",{className:"fv fuvi-delete "}))),S.a.createElement(ge.a.Body,null,S.a.createElement(_e,{className:"text-center"},Object(te.t)("meeting.leaveMeetingConfirmText"))),S.a.createElement(ge.a.Footer,null,S.a.createElement("div",{className:"d-flex w-100"}),S.a.createElement(ve.a,{variant:"outline-primary",className:"modal-button",onClick:h},Object(te.t)("btn.cancel")),S.a.createElement(ve.a,{variant:"primary",className:"text-white modal-button",onClick:g,disabled:u},Object(te.t)("meeting.leaveMeeting")),m&&p&&S.a.createElement(ve.a,{variant:"primary",className:"text-white modal-button",onClick:v,disabled:u},u&&S.a.createElement(be.a,{animation:"border",size:"sm"})," ",Object(te.t)("meeting.endForAll")))))};function Se(){var e=re()(["\n  opacity: ",";\n  transition: opacity 250ms ease;\n\n  @media screen and (max-width: 768px) {\n    opacity: 1;\n  }\n\n  .controls-menu {\n    width: 100%;\n    position: static;\n  }\n"]);return Se=function(){return e},e}var Ce=ie.c.div(Se(),(function(e){return e.active?"1":"0"})),Te="RECORDING",ke=function(){var e=Object(T.c)(),t=(Object(Z.M)(),Object(E.useState)(!1)),n=J()(t,2),r=(n[0],n[1],Object(E.useState)(!1)),i=J()(r,2),a=i[0],s=i[1],c=Object(E.useState)(""),u=J()(c,2),d=u[0],h=u[1],f=(Object(me.g)(),localStorage.getItem(O.g.MEETING_INFO_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_INFO_KEY)),localStorage.getItem(O.g.MEETING_SESSION_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_SESSION_KEY))),p=function(){var t=l()(o.a.mark((function t(n){var r,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:switch(n.action){case Te:e(a?x.n.stopRecordMeeting({meetUid:null===(r=f.meeting)||void 0===r?void 0:r.uid,mediaPipelineId:d},(function(){h(""),s(!1),localStorage.removeItem(O.g.MEETING_RECORD_ID)})):x.n.startRecordMeeting({meetUid:null===(i=f.meeting)||void 0===i?void 0:i.uid},(function(e){h(e),s(!0),localStorage.setItem(O.g.MEETING_RECORD_ID,e)})))}case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),m=[];a?m.push({label:Object(te.t)("btn.stopRecordMeeting"),action:Te,id:1}):m.push({label:Object(te.t)("btn.recordMeeting"),action:Te,id:2});var g=m.map((function(e){return{children:S.a.createElement("span",null,e.label),checked:!1,onClick:function(){return p(e)}}}));return Object(E.useEffect)((function(){var t=localStorage.getItem(O.g.MEETING_RECORD_ID);t&&(h(t),s(!0),e(x.n.setMediaPipelineId(t)))}),[]),S.a.createElement(S.a.Fragment,null,S.a.createElement(Z.g,{icon:"...",onClick:function(){},label:Object(te.t)("btn.more"),popOver:g.length?g:null}))},xe=function(){var e=Object(Z.R)().isUserActive,t=Object(E.useState)(!1),n=(t.recording,t.setRecording,localStorage.getItem(O.g.MEETING_INFO_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_INFO_KEY))),r=n&&n.isVideoOwner;return S.a.createElement(Ce,{className:"controls",active:!!e},S.a.createElement(Z.f,{className:"controls-menu",layout:"undocked-horizontal",showLabels:!0},S.a.createElement(Z.g,{className:"mobile-toggle",icon:S.a.createElement(Z.i,null),onClick:function(){},label:"Menu"}),S.a.createElement(Z.a,null),S.a.createElement(Z.D,null),S.a.createElement(Z.e,null),S.a.createElement(Z.b,null),r&&S.a.createElement(ke,null),S.a.createElement(Ee,null)))},Oe=r(40),Ie=r.n(Oe),Me=function(e){var t=e.noRemoteVideoView,n=e.layout,r=void 0===n?"featured":n,i=Ie()(e,["noRemoteVideoView","layout"]),a=Object(Z.J)().tileId,o=Object(Z.O)().tiles,s=Object(Z.I)().tileId,l=Object(Z.L)().isVideoEnabled,c="featured"===r&&!!a||!!s,u=o.length+(s?1:0),d=u>1&&l?u+1:u;return s&&(d=1),S.a.createElement(Z.C,M()({},i,{size:d,layout:c?"featured":null}),S.a.createElement(Z.d,{css:"grid-area: ft;"}),!s&&S.a.createElement(S.a.Fragment,null,"featured"===r?S.a.createElement(Z.j,null):S.a.createElement(Z.v,null),S.a.createElement(Z.n,{nameplate:"Me",css:d>1?"\n  height: 100%;\n  width: 100%;\n":"\n  display: flex;\n  position: absolute;\n  bottom: 1rem;\n  right: 1rem;\n  width: 20vw;\n  max-height: 30vh;\n  height: auto;\n\n  video {\n    position: static;\n  }\n"})),0===u&&t)},Pe=3,De=function(e){var t,n=Object(T.c)(),r=localStorage.getItem(O.g.MEETING_SESSION_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_SESSION_KEY)),i=localStorage.getItem(O.g.MEETING_INFO_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_INFO_KEY)),a=Object(T.d)((function(e){return e.videolive.mediaPipelineId})),s=Object(T.d)((function(e){var t,n;return null===(t=e.videolive)||void 0===t?void 0:null===(n=t.deviceSetup)||void 0===n?void 0:n.show})),c=Object(Z.P)().roster,u=Object.values(c).find((function(e){return-1!==(null==e?void 0:e.externalUserId.toLowerCase().indexOf("mediapipeline"))})),d=(null==r?void 0:null===(t=r.meeting)||void 0===t?void 0:t.meetingHostId)===(null==r?void 0:r.externalUserId),h=Object(E.useState)(!1),f=J()(h,2),p=f[0],m=f[1];!u||d||p||(O.e.info(Object(te.t)("meeting.recordingNotice")),m(!0));var g=Object(E.useState)(!0),v=J()(g,2),b=(v[0],v[1]),y=Object(E.useState)(!0),A=J()(y,2),_=(A[0],A[1],localStorage.getItem(O.g.MEETING_MIC_KEY),localStorage.getItem(O.g.MEETING_AUD_KEY),localStorage.getItem(O.g.MEETING_VID_KEY),Object(Z.N)()),w=Object(Z.M)(),C=function(){var e=l()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return localStorage.removeItem(O.g.MEETING_SESSION_KEY),localStorage.removeItem(O.g.MEETING_INFO_KEY),e.next=4,w.leave();case 4:window.close();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(E.useEffect)((function(){_}),[_]),Object(E.useEffect)((function(){var e=function(){var e=l()(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,t={meeting:{MeetingId:r.meeting.meetingId,ExternalMeetingId:r.meeting.externalMeetingId,MediaPlacement:r.meeting.mediaPlacement,MediaRegion:r.meeting.mediaRegion},attendee:{ExternalUserId:r.externalUserId,AttendeeId:r.attendeeId,JoinToken:r.joinToken}},e.next=6,w.join({meetingInfo:t.meeting,attendeeInfo:t.attendee,deviceLabels:Z.h.AudioAndVideo});case 6:b(!1),n(x.n.updateDeviceSetupModal({show:!0})),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(2);case 12:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(){return e.apply(this,arguments)}}();(function(){var e=l()(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i||meeting.schedule){e.next=2;break}return e.abrupt("return");case 2:n(x.n.getParticipants({schedUid:null===(t=i.schedule)||void 0===t?void 0:t.uid}),(function(e){e&&setAttendeeList(e)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()(),w.getAttendee=function(){var e=l()(o.a.mark((function e(t){var n,a,s,l,c,u,d,h,f=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=f.length>1&&void 0!==f[1]?f[1]:"",i&&(null===(n=r.meeting)||void 0===n?void 0:n.uid)){e.next=3;break}return e.abrupt("return",{name:""});case 3:return e.next=5,ee.e.get("videos/".concat(i.videoId,"/participants?userScaffId=").concat(i.userScaffId));case 5:if(s=e.sent,l=null,!a){e.next=11;break}l=s&&s.find((function(e){return e.userId===a})),e.next=17;break;case 11:return e.next=13,ee.p.get("meeting/".concat(null===(c=r.meeting)||void 0===c?void 0:c.uid));case 13:u=e.sent,d=u.attendees||[],h=d.find((function(e){return e.attendeeId===t})),l=h&&s&&s.find((function(e){return e.userId===h.externalUserId}));case 17:return e.abrupt("return",{name:l&&l.fullName});case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),window.addEventListener("load",(function(){e()}))}),[]),S.a.createElement(Z.B,{style:{height:"100%"}},S.a.createElement(ce,{className:"position-relative",style:{height:"100%"}},S.a.createElement(ue,null,!s&&S.a.createElement("div",{className:"w-100 h-100"},S.a.createElement(Me,{className:"videos",noRemoteVideoView:S.a.createElement(pe,null)}),S.a.createElement(xe,null)),s&&S.a.createElement(S.a.Fragment,null,"Loading...")),a&&S.a.createElement(de,null,S.a.createElement("p",null,Object(te.t)("meeting.recording")))),_===Pe&&S.a.createElement(N.hb,{show:!0,showHeader:!1,message:Object(te.t)("meeting.meetingEndedNoti"),onClose:function(){return C()}}))},Ne=function(e){var t=e.attendeeId;Object(Z.E)(t).videoEnabled;return S.a.createElement(Z.x,{attendeeId:t})},Le=function(){var e=Object(Z.P)().roster,t=Object(E.useState)(""),n=J()(t,2),r=n[0],i=(n[1],Object.values(e));r&&(i=i.filter((function(e){return null==e?void 0:e.name.toLowerCase().includes(r.trim().toLowerCase())})));var a=(i=i.filter((function(e){return-1===(null==e?void 0:e.externalUserId.toLowerCase().indexOf("mediapipeline"))}))).map((function(e){var t=(e||{}).chimeAttendeeId;return S.a.createElement(Ne,{key:t,attendeeId:t})}));return S.a.createElement(Z.w,{className:"roster w-100",style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"}},S.a.createElement(Z.y,null,a))},Re=r(24),Be=r.n(Re),je=r(1835);function Fe(){var e=re()(["\n  width: 100%;\n  font-size: 0.825rem;\n"]);return Fe=function(){return e},e}function Ue(){var e=re()(["\n  width: 100%;\n  display: flex;\n  font-size: 0.825rem;\n  .sender-name {\n    font-weight: 700;\n  }\n  .timestamp {\n    color: #ccc;\n    margin-left: 1rem;\n  }\n"]);return Ue=function(){return e},e}function He(){var e=re()(["\n  width: 100%;\n  margin-bottom: 0.25rem;\n"]);return He=function(){return e},e}var ze=ie.c.div(He()),Ve=ie.c.div(Ue()),We=ie.c.div(Fe()),Ge=function(e){var t=e.senderName,n=e.text,r=e.timestamp;return S.a.createElement(ze,{className:"chat-msg"},S.a.createElement(Ve,null,S.a.createElement("div",{className:"sender-name"},t),S.a.createElement("div",{className:"timestamp"},r)),S.a.createElement(We,null,n))},qe=r(203),Ye=r(98),Ke=S.a.createContext(null),Xe=function(e){var t=e.children;return S.a.createElement(Ke.Provider,{value:{}},S.a.createElement($e,null,t))},Qe=S.a.createContext(null),$e=function(e){var t=e.children,n=Object(Z.H)(),r=Object(E.useState)([]),i=J()(r,2),a=i[0],o=i[1],s=Object(T.d)((function(e){return e.auth.userInfo})),l=localStorage.getItem(O.g.MEETING_SESSION_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_SESSION_KEY)),c=function(e){var t=JSON.parse(e.text());o([].concat(Be()(a),[t]))};Object(E.useEffect)((function(){return null==n||n.realtimeSubscribeToReceiveDataMessage("CHAT",c),function(){null==n||n.realtimeUnsubscribeFromReceiveDataMessage("CHAT")}}));var u={chatData:a,sendChatData:function(e){var t={uuid:Object(qe.v4)(),action:"sendmessage",cmd:"TEXT",data:e,createdDate:(new Date).getTime(),senderName:s?"".concat(s.firstName," ").concat(s.lastName):"",attendeeId:null==l?void 0:l.attendeeId};null==n||n.realtimeSendDataMessage("CHAT",JSON.stringify(t)),o([].concat(Be()(a),[t]))}};return S.a.createElement(Qe.Provider,{value:u},t)},Je=function(){var e=function(){var e=Object(E.useContext)(Qe);if(!e)throw new Error("Error using RealitimeSubscribe in context!");return e}(),t=e.chatData,n=e.sendChatData,r=Object(E.useState)(""),i=J()(r,2),a=i[0],o=i[1],s=Object(E.useState)("auto"),l=J()(s,2),c=(l[0],l[1]),u=Object(E.useState)("auto"),d=J()(u,2),h=(d[0],d[1]),f=t.length||0,p=Object(E.useRef)(null),m=Object(E.useRef)(null),g=[],v=!0,b=!1,y=void 0;try{for(var A,_=t[Symbol.iterator]();!(v=(A=_.next()).done);v=!0){var w=A.value,C=w.senderName,T=w.data,k=new Date(w.createdDate).toLocaleTimeString("en-US");g.push(S.a.createElement(Ge,{senderName:C,text:T,timestamp:k,key:Object(qe.v4)()}))}}catch(e){b=!0,y=e}finally{try{v||null==_.return||_.return()}finally{if(b)throw y}}var x=function(){var e,t,n=Be()(document.querySelectorAll(".messages-smooth-scroll .chat-msg")).pop();n&&(null==m||null===(e=m.current)||void 0===e||null===(t=e.scrollbar)||void 0===t||t.scrollIntoView(n))};Object(E.useEffect)((function(){var e,t;h("".concat(null===(e=p.current)||void 0===e?void 0:e.scrollHeight,"px")),c("".concat(null===(t=p.current)||void 0===t?void 0:t.scrollHeight,"px"))}),[a]);return Object(E.useEffect)((function(){x()}),[f]),S.a.createElement("div",{className:"chat-wrap h-100",style:{display:"flex",flexDirection:"column",flex:1}},S.a.createElement("div",{className:"messages flex-fill position-relative",style:{backgroundColor:"#fff"}},S.a.createElement("div",{className:"msg-scroll position-absolute w-100 h-100",style:{padding:"10px"}},S.a.createElement(N.Wb,{onScroll:function(){},ref:m,className:D()("h-100 messages-smooth-scroll")},g))),S.a.createElement("div",{className:"d-flex align-items-center mt-auto",style:{padding:"10px",backgroundColor:"#fff"}},S.a.createElement(je.a.Control,{as:"textarea",onChange:function(e){return function(e){o(e.target.value)}(e)},value:a,placeholder:"input your message",rows:1,ref:p,onKeyPress:function(e){var t,r;if("Enter"===e.key)return""===e.target.value.trim()?(e.preventDefault(),!1):(n(e.target.value),o(""),e.preventDefault(),null==m||null===(t=m.current)||void 0===t||null===(r=t.scrollbar)||void 0===r||r.update(),x(),!1)},style:{resize:"none",overflow:"hidden",fontSize:"0.925rem",lineHeight:"1.2"}}),S.a.createElement(ve.a,{onClick:function(e){var t,r;n(a),o(""),null==m||null===(t=m.current)||void 0===t||null===(r=t.scrollbar)||void 0===r||r.update(),x()},style:{borderRadius:"50%",fontSize:"0.825rem",height:"31px",width:"31px",marginLeft:"5px",padding:"0.375rem 0.5rem"}},S.a.createElement("i",{className:"fv fuvi-send"}))))},Ze="meeting.meetingRosterTitle",et="meeting.meetingChatTitle",tt=function(){var e=Object(E.useRef)(null),n=Object(Z.P)().roster,r=Object.values(n);return r=r.filter((function(e){return-1===(null==e?void 0:e.externalUserId.toLowerCase().indexOf("mediapipeline"))})),S.a.createElement("div",{className:"h-100 meeting-right d-flex flex-column"},S.a.createElement(N.cc,{ref:e,contents:[{key:Ze,title:"".concat(t(Ze)," (").concat(r.length,")"),content:S.a.createElement(Le,null)},{key:et,title:t(et),content:S.a.createElement(Je,null)}]}))};function nt(){var e=re()(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  min-height: 100%;\n  max-width: 85rem;\n  padding: 1rem;\n  margin: auto;\n  min-width: 50rem;\n  @media (max-width: 760px) {\n    border-right: unset;\n    align-items: unset;\n    justify-content: unset;\n  }\n"]);return nt=function(){return e},e}var rt=ie.c.main(nt());function it(){var e=re()(["\n  margin-bottom: 1.5rem;\n"]);return it=function(){return e},e}function at(){var e=re()(["\n  padding: 0 0 0 3rem;\n\n  @media (max-width: 900px) {\n    padding: 0;\n  }\n"]);return at=function(){return e},e}function ot(){var e=re()(["\n  padding: 0 3rem 0 0;\n  border-right: 0.125rem solid #e6e6e6;\n\n  @media (max-width: 900px) {\n    padding: 2rem 0 2rem 0;\n    border-right: unset;\n  }\n"]);return ot=function(){return e},e}function st(){var e=re()(["\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  max-width: 65rem;\n  height: auto;\n  padding: 1rem 0 1rem 0;\n\n  > * {\n    flex-basis: auto;\n  }\n\n  @media (min-width: 900px) {\n    flex-direction: row;\n    padding: 1.5rem 0 2.5rem 0;\n\n    > * {\n      flex-basis: 50%;\n    }\n\n    @media (max-height: 800px) {\n      padding: 1rem 0 1.5rem;\n    }\n  }\n"]);return st=function(){return e},e}function lt(){var e=re()(["\n  margin-bottom: 2.5rem;\n"]);return lt=function(){return e},e}var ct="\n  text-transform: uppercase;\n  font-size: 1rem !important;\n  margin-bottom: 1.75rem;\n",ut=ie.c.div(lt()),dt=ie.c.div(st()),ht=ie.c.div(ot()),ft=ie.c.div(at()),pt=ie.c.div(it());function mt(){var e=re()(["\n  height: 0.625rem;\n  background-color: #18bc9c;\n  border-radius: 0.25rem;\n  transform: scaleX(0);\n  transform-origin: left;\n  transition: transform 33ms ease-in-out;\n  will-change: transform;\n"]);return mt=function(){return e},e}function gt(){var e=re()(["\n  width: 100%;\n  height: 0.625rem;\n  background-color: #ecf0f1;\n  border-radius: 0.25rem;\n"]);return gt=function(){return e},e}var vt=ie.c.div(gt()),bt=ie.c.div(mt()),yt=S.a.forwardRef((function(e,t){return S.a.createElement(vt,null,S.a.createElement(bt,{ref:t}))})),At=function(){var e=Object(E.useRef)();return Object(Z.K)(e),S.a.createElement(yt,{ref:e})},_t=function(){return S.a.createElement(ut,null,S.a.createElement(Z.m,{style:{display:"block",marginBottom:".5rem"}},"Microphone activity"),S.a.createElement(At,null))},wt=function(){var e=Object(Z.Q)(),t=Object(Z.F)();t.devices,t.selectedDevice;return S.a.createElement("div",null,S.a.createElement(Z.l,{tag:"h2",level:6,css:ct},"Audio"),S.a.createElement(Z.o,{onChange:function(t){e(t),localStorage.setItem(O.g.MEETING_MIC_KEY,t)}}),S.a.createElement(_t,null))},Et=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:440,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.1;u()(this,e);var s=new(window.AudioContext||window.webkitAudioContext),c=s.createGain();c.gain.value=0;var d=s.createOscillator();d.frequency.value=n,d.connect(c);var h=s.createMediaStreamDestination();c.connect(h);var f=s.currentTime,p=f+.1;c.gain.linearRampToValueAtTime(0,p),c.gain.linearRampToValueAtTime(a,p+i),c.gain.linearRampToValueAtTime(a,p+i+r),c.gain.linearRampToValueAtTime(0,p+2*i+r),d.start();var m=new Ye.DefaultAudioMixController,g=function(){var e=l()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("setSinkId"in HTMLAudioElement.prototype)){e.next=9;break}return e.prev=1,e.next=4,m.bindAudioDevice({deviceId:t});case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("Failed to bind audio device",e.t0);case 9:return e.prev=9,e.next=12,m.bindAudioElement(new Audio);case 12:e.next=17;break;case 14:e.prev=14,e.t1=e.catch(9),console.error("Failed to bind audio element",e.t1);case 17:case"end":return e.stop()}}),e,null,[[1,6],[9,14]])})));return function(){return e.apply(this,arguments)}}();g(),m.bindAudioStream(h.stream),new Ye.TimeoutScheduler(1e3*(2*i+r+1)).start((function(){s.close()}))},St=function(){var e=Object(Z.G)().selectedDevice,t=Object(E.useState)(e),n=J()(t,2),r=n[0],i=n[1];return S.a.createElement("div",null,S.a.createElement(Z.A,{onChange:function(e){i(e),localStorage.setItem(O.g.MEETING_AUD_KEY,e)}}),S.a.createElement(Z.z,{label:"Test speakers",onClick:function(){new Et(r)}}))},Ct=function(){return S.a.createElement("div",null,S.a.createElement(Z.l,{tag:"h2",level:6,css:ct},"Video"),S.a.createElement(pt,null,S.a.createElement(Z.c,null)),S.a.createElement(pt,null,S.a.createElement(Z.u,null)),S.a.createElement(Z.m,{style:{display:"block",marginBottom:".5rem"}},"Video preview"),S.a.createElement(Z.t,null))},Tt=function(){return S.a.createElement(dt,null,S.a.createElement(ht,null,S.a.createElement(wt,null),S.a.createElement(St,null)),S.a.createElement(ft,null,S.a.createElement(Ct,null)))};function kt(){var e=re()(["\n  .ch-body {\n    margin-bottom: 1rem;\n  }\n\n  .ch-header {\n    font-size: 1.5rem;\n  }\n\n  .ch-title {\n    font-size: 1.25rem;\n    margin-top: 1rem;\n  }\n\n  .ch-description {\n    margin: 1rem 0 1rem 0;\n  }\n"]);return kt=function(){return e},e}function xt(){var e=re()(["\n  color: rgba(0, 0, 0, 0.5);\n"]);return xt=function(){return e},e}var Ot=ie.c.small(xt()),It=ie.c.div(kt()),Mt=function(e){var t=e.header,n=e.title,r=e.description,i=e.smallText;return S.a.createElement(It,null,t&&S.a.createElement("div",{className:"ch-header"},t),S.a.createElement("div",{className:"ch-body"},S.a.createElement("div",{className:"ch-title"},n),S.a.createElement("div",{className:"ch-description"},r),i&&S.a.createElement(Ot,null,i)))},Pt=function(){var e=Object(T.c)(),t=Object(Z.M)(),n=(Object(me.g)(),Object(E.useState)(!1)),r=J()(n,2),i=r[0],a=r[1],s=Object(E.useState)(""),c=J()(s,2),u=c[0],d=c[1],h=(localStorage.getItem(O.g.MEETING_INFO_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_INFO_KEY)),localStorage.getItem(O.g.MEETING_SESSION_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_SESSION_KEY))),f=Object(Z.F)().selectedDevice,p=Object(Z.G)().selectedDevice,m=Object(Z.S)().selectedDevice,g=function(){var e=l()(o.a.mark((function e(){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return localStorage.setItem(O.g.MEETING_MIC_KEY,f),localStorage.setItem(O.g.MEETING_AUD_KEY,p),localStorage.setItem(O.g.MEETING_VID_KEY,m),a(!0),e.next=6,t.start();case 6:if(h&&(null===(n=h.meeting)||void 0===n?void 0:n.uid)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v();case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=function(){var t=l()(o.a.mark((function t(){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e(x.n.fetchMeeting({meetUid:null===(n=h.meeting)||void 0===n?void 0:n.uid},(function(){e(x.n.updateDeviceSetupModal({show:!1}))})))}catch(e){a(!1)}case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Object(E.useEffect)((function(){})),S.a.createElement(S.a.Fragment,null,S.a.createElement(Z.k,{container:!0,alignItems:"center",flexDirection:"column"},S.a.createElement(ve.a,{variant:"primary",className:D()("text-white","modal-button"),onClick:g},i&&S.a.createElement(be.a,{animation:"border",size:"sm"})," ",Object(te.t)("btn.join"))),u&&S.a.createElement(Z.p,{size:"md",onClose:function(){return d("")}},S.a.createElement(Z.r,{title:"Meeting ID: ".concat("")}),S.a.createElement(Z.q,null,S.a.createElement(Mt,{title:"Unable to join meeting",description:"There was an issue in joining this meeting. Check your connectivity and try again.",smallText:u}))))},Dt=function(){return S.a.createElement(rt,null,S.a.createElement(Tt,null),S.a.createElement(Pt,null))},Nt=r(575),Lt=r.n(Nt),Rt=function(){var e=Object(T.c)();return S.a.createElement(ge.a,{show:!0,className:"deviceSetupModal",centered:!0,backdropClassName:"device-setup-backdrop",dialogClassName:Lt.a.deviceSetupDialog},S.a.createElement(ge.a.Header,null,S.a.createElement("div",{className:D()("ml-3",Lt.a.modalTitle)},t("meeting.deviceSettings")),S.a.createElement("div",{className:"close-modal-btn",onClick:function(){e(x.n.updateDeviceSetupModal({show:!1}))},role:"button"},S.a.createElement("i",{className:"fv fuvi-delete"}))),S.a.createElement(ge.a.Body,null,S.a.createElement(Dt,null)))},Bt=r(1045),jt=r.n(Bt);var Ft=function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){var e;u()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),w()(p()(e),"itemListRef",Object(E.createRef)()),w()(p()(e),"isScrollingToItem",!1),w()(p()(e),"isMouseOverList",!1),w()(p()(e),"state",{isShowDeviceSetup:!1,name:"",description:""}),w()(p()(e),"componentDidMount",(function(){var t,n=localStorage.getItem(O.g.MEETING_SESSION_KEY)&&JSON.parse(localStorage.getItem(O.g.MEETING_SESSION_KEY)),r=e.props.setMeetingSession;n&&r(n),null==n||null===(t=n.Meeting)||void 0===t||t.status,O.g.MEETING_STATUS.STARTED})),w()(p()(e),"scrollItemListToTop",(function(){e.itemListRef&&e.itemListRef.current&&e.itemListRef.current.scrollRef.setPosition(0,0)})),e}return h()(n,[{key:"componentWillUnmount",value:function(){}}]),n}(function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){return u()(this,n),t.apply(this,arguments)}return h()(n,[{key:"render",value:function(){var e=this.props.isShowDeviceSetupModal,t=S.a.createElement(De,null);return S.a.createElement(Xe,null,S.a.createElement(N.lb,{header:S.a.createElement("div",null),rightContent:S.a.createElement(tt,null),firstArea:t,firstAreaClassName:jt.a.firstAreaUpperWrapper},e&&S.a.createElement(Rt,null)))}}]),n}(E.Component)),Ut=Object(T.b)((function(e){var t;return{isShowDeviceSetupModal:null===(t=e.videolive.deviceSetup)||void 0===t?void 0:t.show}}),(function(e){return{setMeetingSession:function(t,n,r){return e(x.n.updateMeetingSession(t,n,r))}}}))(Ft),Ht=r(75),zt=r.n(Ht),Vt=r(108),Wt=r(576),Gt=r.n(Wt);var qt=O.g.FACEBOOK_APP_LOGIN_STATE,Yt=O.g.FACEBOOK_APP_PERMISSION,Kt=O.g.SOCIAL_ISSUER,Xt=(S.a.PureComponent,r(385)),Qt=O.g.SOCIAL_ISSUER,$t=function(e){var t=e.onSocialLogin,n=Object(Xt.b)({onSuccess:function(e){var n=e.access_token,r=e.code,i=n||r;if(i){var a={issuer:Qt.GOOGLE,token:i};t(a)}}});return S.a.createElement("button",{className:"gsi-material-button",onClick:n},S.a.createElement("div",{className:"gsi-material-button-state"}),S.a.createElement("div",{className:"gsi-material-button-content-wrapper"},S.a.createElement("div",{className:"gsi-material-button-icon"},S.a.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",xmlnsXlink:"http://www.w3.org/1999/xlink",className:"d-block"},S.a.createElement("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),S.a.createElement("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),S.a.createElement("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),S.a.createElement("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"}),S.a.createElement("path",{fill:"none",d:"M0 0h48v48H0z"}))),S.a.createElement("span",{className:"gsi-material-button-contents"},"Sign in with Google"),S.a.createElement("span",{className:"d-none"},"Sign in with Google")))},Jt=function(e){var n=e.className,r=e.onSocialLogin;return S.a.createElement("div",{className:n},S.a.createElement("div",{className:"text-center my-3 u-fs-15o16"},S.a.createElement("span",null,t("orLoginWith"))),S.a.createElement("div",{className:"d-flex justify-content-center"},S.a.createElement($t,{onSocialLogin:r})))},Zt=r(1831),en=r(577),tn=r.n(en);var nn=function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){var e;u()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),w()(p()(e),"state",{email:"",password:"",error:"",errorCode:"",submittedEmail:"",showActivationForm:!1}),w()(p()(e),"validator",new zt.a(O.c.validatorConfig)),w()(p()(e),"handleChange",(function(t){var n=t.target,r=n.name,i=n.value;e.setState(w()({},r,i))})),w()(p()(e),"submitLogin",(function(t){t.preventDefault();var n=e.props,r=n.loginAction,i=n.willRedirect,a=n.loginSuccessCallback,o=n.redirectTo,s=e.state,l=s.email,c=s.password;e.validator.allValid()?r({username:l,password:c,willRedirect:i,redirectTo:o},(function(){O.b.reportLoginFormDesktopSubmitted(),a&&a(!0)}),(function(t){if("string"==typeof t)e.setState({error:t,errorCode:"",submittedEmail:l});else{var n=t.errorMessage,r=t.errorCode;e.setState({error:n,errorCode:r,submittedEmail:l})}})):(e.validator.showMessages(),e.forceUpdate())})),w()(p()(e),"handleSocialLogin",(function(t){var n=e.props,r=n.socialLogin,i=n.willRedirect,a=n.loginSuccessCallback;r({credentials:t,willRedirect:i,redirectTo:n.redirectTo},(function(){O.b.reportSignUpWithGoogleDesktop(),a&&a(!0)}),(function(t){e.setState({error:t})}))})),w()(p()(e),"handleRegisterClick",(function(t){t.preventDefault(),t.stopPropagation();var n=e.props,r=n.isModal,i=n.displayRegisterModal,a=n.displayLoginModal;r?(a({show:!1}),i(!0)):k.a.push(O.g.REGISTER_PAGE_PATH)})),w()(p()(e),"handleActivateClick",(function(t){t.preventDefault(),e.setState({showActivationForm:!0}),e.props.onActivateClick&&e.props.onActivateClick()})),w()(p()(e),"handleActivationFormClose",(function(t){e.setState({showActivationForm:!1}),t&&e.props.displayLoginModal({show:!1})})),w()(p()(e),"handleBackToLogin",(function(t){t.preventDefault(),e.setState({showActivationForm:!1})})),w()(p()(e),"handleForgotPasswordClick",(function(t){e.props.displayLoginModal({show:!1})})),e}return n}(function(e){g()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(r);function r(){return u()(this,r),n.apply(this,arguments)}return h()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.email,i=n.password,a=n.error,o=n.errorCode,s=n.submittedEmail,l=n.showActivationForm,c=this.props,u=c.isFetching,d=c.isModal,h=c.containerClassName,f=c.hasBackToHome,p=void 0===f||f,m=d?"div":N.g;return S.a.createElement(S.a.Fragment,null,u&&S.a.createElement(N.tb,null),S.a.createElement(m,{className:h},l?S.a.createElement(S.a.Fragment,null,!d&&S.a.createElement("div",{className:"d-flex text-primary align-items-center mb-3 u-fs-1 u-cursor-pointer",onClick:this.handleBackToLogin},S.a.createElement("i",{className:D()("fv fuvi-down-arrow-s mr-2",tn.a.homeBtn)}),t("btn.backToLogin")),S.a.createElement(N.b,{email:s,onClose:this.handleActivationFormClose})):S.a.createElement(S.a.Fragment,null,S.a.createElement("div",{className:"mt-2 mb-3"},S.a.createElement("div",{className:"u-fs-1x1o4 u-text-black"},t("dontHaveAnAccount"),"?"),S.a.createElement("a",{className:"u-fs-1x1o3 u-text-cyan",href:"#",onClick:this.handleRegisterClick},"Register for ",S.a.createElement("span",{className:"u-text-orange"},"FREE")," ","access")),S.a.createElement(je.a,{noValidate:!0,onSubmit:this.submitLogin},a&&S.a.createElement("div",null,S.a.createElement(Zt.a,{className:"w-100 mb-1",variant:"danger",id:"error-alert"},a),o===O.g.ERROR_NOT_ACTIVATED&&S.a.createElement("div",{className:"mb-3 text-right"},S.a.createElement("a",{href:"#",className:"text-primary u-fs-7o8 u-fw-500",onClick:this.handleActivateClick},t("btn.activateNow")))),p&&S.a.createElement("div",{className:"d-flex text-primary align-items-center mb-1 u-fs-1 u-cursor-pointer",onClick:function(){return k.a.push(O.g.HOME_PAGE_PATH)}},S.a.createElement("i",{className:D()("fv fuvi-down-arrow-s mr-2",tn.a.homeBtn)}),t("btn.backToHome")),S.a.createElement(N.ib,{type:"text",name:"email",placeholder:t("placeholder.email"),labelName:"Email ID",classNameLabel:"u-fs-1 font-weight-normal",value:r,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("email address")},validatorElement:this.validator.message("email address",r,"required|email")}),S.a.createElement(N.ib,{type:"password",name:"password",placeholder:"Password",labelName:"Password",classNameLabel:"u-fs-1 font-weight-normal",value:i,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("password")},validatorElement:this.validator.message("password",i,"required")}),S.a.createElement("div",{className:"d-flex justify-content-between"},S.a.createElement("div",null,S.a.createElement(N.x,{id:"keep-loggined-checkbox",label:"Keep me logged in"})),S.a.createElement(Vt.a,{to:"/forgot-password",className:"u-text-cyan u-fs-15o16",onClick:this.handleForgotPasswordClick},t("forgotPassword"),"?")),S.a.createElement(ve.a,{type:"submit",variant:"primary",block:!0,className:"u-h-3x btn-border text-white my-4"},t("btn.login"))),S.a.createElement(Jt,{className:"mb-3",onSocialLogin:this.handleSocialLogin}))))}}]),r}(E.Component)),rn=Object(T.b)((function(e){return e.auth}),(function(e){return{loginAction:function(t,n,r){return e(x.a.authLogin(t,n,r))},socialLogin:function(t,n,r){return e(x.a.socialLogin(t,n,r))},displayLoginModal:function(t){return e(x.a.displayLoginModal(t))},displayRegisterModal:function(t){return e(x.a.displayRegisterModal(t))}}}))(nn),an=r(1007),on=r(6),sn=r.n(on);function ln(){return(ln=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function cn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var un=function(e){var t,n;function r(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(cn(t)),t.handleErrored=t.handleErrored.bind(cn(t)),t.handleChange=t.handleChange.bind(cn(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(cn(t)),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getValue=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this.props.grecaptcha.getResponse(this._widgetId):null},i.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},i.execute=function(){var e=this.props.grecaptcha;if(e&&void 0!==this._widgetId)return e.execute(this._widgetId);this._executeRequested=!0},i.reset=function(){this.props.grecaptcha&&void 0!==this._widgetId&&this.props.grecaptcha.reset(this._widgetId)},i.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},i.handleErrored=function(){this.props.onErrored&&this.props.onErrored()},i.handleChange=function(e){this.props.onChange&&this.props.onChange(e)},i.explicitRender=function(){if(this.props.grecaptcha&&this.props.grecaptcha.render&&void 0===this._widgetId){var e=document.createElement("div");this._widgetId=this.props.grecaptcha.render(e,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge}),this.captcha.appendChild(e)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},i.componentDidMount=function(){this.explicitRender()},i.componentDidUpdate=function(){this.explicitRender()},i.componentWillUnmount=function(){void 0!==this._widgetId&&(this.delayOfCaptchaIframeRemoving(),this.reset())},i.delayOfCaptchaIframeRemoving=function(){var e=document.createElement("div");for(document.body.appendChild(e),e.style.display="none";this.captcha.firstChild;)e.appendChild(this.captcha.firstChild);setTimeout((function(){document.body.removeChild(e)}),5e3)},i.handleRecaptchaRef=function(e){this.captcha=e},i.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"]));return S.a.createElement("div",ln({},t,{ref:this.handleRecaptchaRef}))},r}(S.a.Component);un.displayName="ReCAPTCHA",un.propTypes={sitekey:sn.a.string.isRequired,onChange:sn.a.func,grecaptcha:sn.a.object,theme:sn.a.oneOf(["dark","light"]),type:sn.a.oneOf(["image","audio"]),tabindex:sn.a.number,onExpired:sn.a.func,onErrored:sn.a.func,size:sn.a.oneOf(["compact","normal","invisible"]),stoken:sn.a.string,hl:sn.a.string,badge:sn.a.oneOf(["bottomright","bottomleft","inline"])},un.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var dn=r(159),hn=r.n(dn);function fn(){return(fn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var pn={},mn=0;var gn,vn,bn=(gn=function(){return"https://"+(("undefined"!=typeof window&&window.recaptchaOptions||{}).useRecaptchaNet?"recaptcha.net":"www.google.com")+"/recaptcha/api.js?onload=onloadcallback&render=explicit"},vn=(vn={callbackName:"onloadcallback",globalName:"grecaptcha"})||{},function(e){var t=e.displayName||e.name||"Component",n=function(t){var n,r;function i(e,n){var r;return(r=t.call(this,e,n)||this).state={},r.__scriptURL="",r}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a=i.prototype;return a.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+mn++),this.__scriptLoaderID},a.setupScriptURL=function(){return this.__scriptURL="function"==typeof gn?gn():gn,this.__scriptURL},a.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},a.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=pn[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var t in e.observers)e.observers[t](e);delete window[vn.callbackName]},a.componentDidMount=function(){var e=this,t=this.setupScriptURL(),n=this.asyncScriptLoaderGetScriptLoaderID(),r=vn,i=r.globalName,a=r.callbackName,o=r.scriptId;if(i&&void 0!==window[i]&&(pn[t]={loaded:!0,observers:{}}),pn[t]){var s=pn[t];return s&&(s.loaded||s.errored)?void this.asyncScriptLoaderHandleLoad(s):void(s.observers[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var l={};l[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)},pn[t]={loaded:!1,observers:l};var c=document.createElement("script");c.src=t,c.async=!0,o&&(c.id=o);var u=function(e){if(pn[t]){var n=pn[t].observers;for(var r in n)e(n[r])&&delete n[r]}};a&&"undefined"!=typeof window&&(window[a]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),c.onload=function(){var e=pn[t];e&&(e.loaded=!0,u((function(t){return!a&&(t(e),!0)})))},c.onerror=function(){var e=pn[t];e&&(e.errored=!0,u((function(t){return t(e),!0})))},document.body.appendChild(c)},a.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===vn.removeOnUnmount)for(var t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1)t[n].src.indexOf(e)>-1&&t[n].parentNode&&t[n].parentNode.removeChild(t[n]);var r=pn[e];r&&(delete r.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===vn.removeOnUnmount&&delete pn[e])},a.render=function(){var t=vn.globalName,n=this.props,r=(n.asyncScriptOnLoad,n.forwardedRef),i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["asyncScriptOnLoad","forwardedRef"]);return t&&"undefined"!=typeof window&&(i[t]=void 0!==window[t]?window[t]:void 0),i.ref=r,Object(E.createElement)(e,i)},i}(E.Component),r=Object(E.forwardRef)((function(e,t){return Object(E.createElement)(n,fn({},e,{forwardedRef:t}))}));return r.displayName="AsyncScriptLoader("+t+")",r.propTypes={asyncScriptOnLoad:sn.a.func},hn()(r,e)})(un),yn=r(244);r(1664);var An=O.g.termsAndConditionsUrl,_n=O.g.privacyPoliciesUrl;var wn=function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){var e;u()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),w()(p()(e),"state",{alerts:[],firstName:"",lastName:"",email:"",password:"",confirmPassword:"",captchaSuccessful:!1,showModal:!1,error:"",errorCode:"",showNoSpaceError:!1,gender:O.g.GENDER_TYPES[0],participantType:"",agreedWithTerms:!1,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}),w()(p()(e),"validator",new zt.a(O.c.validatorConfig)),w()(p()(e),"registerSuccessfulCallback",(function(t){t&&t.preventDefault(),e.props.onRegisterSuccess(),e.setState({showActivationForm:!0})})),w()(p()(e),"handleRegisterSubmit",(function(t){t.preventDefault();var n=e.props.registerAction,r=e.state,i=r.firstName,a=r.lastName,o=r.email,s=r.password,l=r.gender,c=r.participantType,u=r.timezone;e.validator.allValid()?n({firstName:i,lastName:a,email:o,password:s,gender:l,audience:c,timezone:u},e.registerSuccessfulCallback,(function(t){if("string"==typeof t)e.setState({error:t,errorCode:""});else{var n=t.errorMessage,r=t.errorCode;e.setState({error:n,errorCode:r})}})):(e.validator.showMessages(),e.forceUpdate())})),w()(p()(e),"handleChange",(function(t){var n=t.target,r=n.name,i=n.value;e.setState(w()({},r,i))})),w()(p()(e),"handleCloseModal",(function(){e.setState({showModal:!1})})),w()(p()(e),"handlePasswordTyping",(function(t){var n=!1;" "===t.key?(t.preventDefault(),n=!0):n=!1,e.setState({showNoSpaceError:n})})),w()(p()(e),"handleTimeZoneChange",(function(t){e.setState({timezone:t.value})})),w()(p()(e),"handleLoginClick",(function(t){t.preventDefault(),t.stopPropagation();var n=e.props,r=n.isModal,i=n.displayRegisterModal,a=n.displayLoginModal;r?(a({show:!0}),i(!1)):k.a.push(O.g.LOGIN_PAGE_PATH)})),w()(p()(e),"handleActivationFormClose",(function(t){e.setState({showActivationForm:!1}),t&&e.props.displayRegisterModal(!1)})),w()(p()(e),"handleActivateClick",(function(t){t.preventDefault(),e.setState({showActivationForm:!0}),e.props.onActivateClick&&e.props.onActivateClick()})),e}return n}(function(e){g()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(r);function r(){return u()(this,r),n.apply(this,arguments)}return h()(r,[{key:"render",value:function(){var e=this,n=this.state,r=n.firstName,i=n.lastName,a=n.email,o=n.confirmPassword,s=n.password,l=n.captchaSuccessful,c=n.showModal,u=n.error,d=n.errorCode,h=n.showNoSpaceError,f=n.agreedWithTerms,p=n.participantType,m=(n.timezone,n.showActivationForm),g=this.props,v=g.isFetching,b=g.isModal,y=g.containerClassName,A=b?"div":N.g;return S.a.createElement(S.a.Fragment,null,v&&S.a.createElement(N.tb,null),S.a.createElement(ge.a,{show:c,backdrop:!0,onHide:this.handleCloseModal},S.a.createElement(ge.a.Header,{closeButton:!0},S.a.createElement(ge.a.Title,null,t("activationFinishTitle"))),S.a.createElement(ge.a.Body,null,S.a.createElement("p",null,t("activationFinishDesc"))),S.a.createElement(ge.a.Footer,{style:{justifyContent:"space-between"}},S.a.createElement("div",null),S.a.createElement(Vt.a,{to:O.g.LOGIN_PAGE_PATH},t("btn.login")))),S.a.createElement(A,{className:y},m?S.a.createElement(N.b,{email:a,onClose:this.handleActivationFormClose}):S.a.createElement(S.a.Fragment,null,S.a.createElement("div",{className:"u-fs-1x1o3 mt-2 mb-4"},S.a.createElement("div",{className:"u-text-dark-blue-bold u-fs-1x1o2 u-fw-500"},"Register for ",S.a.createElement("span",{className:"u-text-orange"},"FREE")," ","access")),S.a.createElement(je.a,{noValidate:!0,onSubmit:this.handleRegisterSubmit},d===O.g.ERROR_NOT_ACTIVATED&&S.a.createElement("div",null,S.a.createElement(Zt.a,{variant:"danger",id:"warn-alert",className:"mb-1"},"An account with the same email address exists, but not activated."),S.a.createElement("div",{className:"mb-3 text-right"},S.a.createElement("a",{href:"#",className:"u-text-cyan u-fs-7o8 u-fw-500",onClick:this.handleActivateClick},t("btn.activateNow")))),u&&d!==O.g.ERROR_NOT_ACTIVATED&&S.a.createElement(Zt.a,{variant:"danger",id:"warn-alert",className:"mb-1"},u),S.a.createElement(je.a.Row,null,S.a.createElement(an.a,null,S.a.createElement(N.ib,{type:"text",placeholder:t("form.firstName"),name:"firstName",value:r,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("first name")},validatorElement:this.validator.message("first name",r,"required|max:".concat(O.g.TEXT_INPUT_MAX_LENGTH))})),S.a.createElement(an.a,null,S.a.createElement(N.ib,{type:"text",placeholder:t("form.lastName"),name:"lastName",value:i,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("last name")},validatorElement:this.validator.message("last name",i,"required|max:".concat(O.g.TEXT_INPUT_MAX_LENGTH))}))),S.a.createElement(N.ib,{type:"text",placeholder:t("form.enterEmail"),name:"email",value:a,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("email address")},validatorElement:this.validator.message("email address",a,"required|email|max:".concat(O.g.TEXT_INPUT_MAX_LENGTH))}),S.a.createElement(N.ib,{type:"password",placeholder:t("form.password"),required:!0,name:"password",value:s,onChange:this.handleChange,onKeyPress:this.handlePasswordTyping,onBlur:function(){return e.validator.showMessageFor("password")},validatorElement:this.validator.message("password",s,"required|min:".concat(O.g.MIN_PASSWORD_LENGTH,"|max:").concat(O.g.TEXT_INPUT_MAX_LENGTH))},h&&S.a.createElement("div",{className:"text-warning ml-2"},t("message.ignoreWhiteSpaceMessage"))),S.a.createElement(N.ib,{type:"password",name:"confirmPassword",placeholder:t("form.confirmPassword"),value:o,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("confirm password")},validatorElement:this.validator.message("confirm password",o,["required",{confirmPasswordRule:s}])}),S.a.createElement(N.S,{name:"participantType",value:p,options:O.g.PARTICIPANT_TYPES,onChange:function(t){return e.setState({participantType:t})},validatorElement:this.validator.message("participant type",p,"required"),placeholder:t("placeholder.joinAs")}),S.a.createElement(je.a.Group,{controlId:"formCaptcha"},S.a.createElement(bn,{sitekey:O.g.GOOGLE_CAPTCHA_API_KEY,onChange:function(){return e.setState({captchaSuccessful:!0})},onExpired:function(){return e.setState({captchaSuccessful:!1})}}),this.validator.message("recaptcha",l,"recaptcha")),S.a.createElement("div",{className:"d-flex u-fs-7o8"},S.a.createElement(N.x,{id:"termsAndConditions",labelName:"",checked:f,onChange:function(t){return e.setState({agreedWithTerms:!f})}}),S.a.createElement("span",null,t("signupInstruction")," ",yn.isMobile?S.a.createElement("a",{href:An,target:"_blank"},t("termsAndConditions")):S.a.createElement("a",{href:"#",className:"u-text-cyan u-cursor-pointer",onClick:function(t){t.preventDefault(),location.hash===O.g.TERM_OF_USE_HASH?e.setState({showTermsAndConditions:!0,showPrivacyAndPolicies:!1}):location=O.g.TERM_OF_USE_HASH}},t("termsAndConditions"))),S.a.createElement("span",null," ",t("and")," "),yn.isMobile?S.a.createElement("a",{href:_n,target:"_blank"},t("privacyPolicies")):S.a.createElement("a",{href:"#",className:"u-text-cyan u-cursor-pointer",onClick:function(t){t.preventDefault(),location.hash===O.g.PRIVACY_HASH?e.setState({showTermsAndConditions:!1,showPrivacyAndPolicies:!0}):location=O.g.PRIVACY_HASH}},t("privacyPolicies"))),S.a.createElement(ve.a,{variant:"primary",type:"submit",block:!0,className:"u-h-3x btn-border text-white my-3",disabled:!f},t("btn.submit"))),S.a.createElement("div",{className:"u-text-black text-center"},t("alreadyHaveAnAccount"),S.a.createElement("a",{className:"u-text-cyan ml-1",href:"#",onClick:this.handleLoginClick},t("btn.login"))))))}}]),r}(E.Component)),En=Object(T.b)((function(e){return e.auth}),(function(e){return{registerAction:function(t,n,r){return e(x.a.authRegister(t,n,r))},getTermsOfUse:function(t,n,r){return e(x.a.getTermsOfUse(t,n,r))},getPrivacyPolicy:function(t,n,r){return e(x.a.getPrivacyPolicy(t,n,r))},displayLoginModal:function(t){return e(x.a.displayLoginModal(t))},displayRegisterModal:function(t){return e(x.a.displayRegisterModal(t))}}}))(wn);var Sn=function(e){g()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(r);function r(){var e;u()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w()(p()(e),"state",{email:"",error:"",isSubmitting:!1,currentStep:1,newPassword:"",confirmNewPassword:"",verificationCode:"",captchaSuccessful:!1}),w()(p()(e),"validator",new zt.a(O.c.validatorConfig)),w()(p()(e),"handleChange",(function(t){var n=t.target,r=n.name,i=n.value;e.setState(w()({},r,i))})),w()(p()(e),"getResetPasswordCode",(function(t){t.preventDefault();var n=e.state.email;e.validator.allValid()?e.setState({isSubmitting:!0},(function(){e.props.getResetPasswordCode({email:n},(function(){e.validator.hideMessages(),e.setState({isSubmitting:!1,currentStep:2})}),(function(){e.setState({isSubmitting:!1})}))})):(e.validator.showMessages(),e.forceUpdate())})),w()(p()(e),"resetPassword",(function(n){n.preventDefault();var r=e.state,i=r.email,a=r.newPassword,o=r.verificationCode;e.validator.allValid()?e.setState({isSubmitting:!0},(function(){e.props.resetPassword({email:i,password:a,resetCode:o},(function(){e.validator.hideMessages(),setTimeout((function(){O.e.success(t("message.resetPasswordSuccessfully"))}),1500),k.a.push(O.g.LOGIN_PAGE_PATH)}),(function(){e.setState({isSubmitting:!1})}))})):(e.validator.showMessages(),e.forceUpdate())})),e}return r}(function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){return u()(this,n),t.apply(this,arguments)}return h()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.email,r=t.captchaSuccessful,i=t.isSubmitting,a=t.currentStep,o=t.newPassword,s=t.confirmNewPassword,l=t.verificationCode;return S.a.createElement(S.a.Fragment,null,i&&S.a.createElement(N.tb,null),S.a.createElement(N.g,{title:"Forgot Password"},S.a.createElement("div",{className:"d-flex u-text-cyan align-items-center mb-1 u-fs-1x1o8 u-cursor-pointer",onClick:function(){return k.a.push(O.g.LOGIN_PAGE_PATH)}},S.a.createElement("i",{className:D()("fv fuvi-down-arrow-s mr-2"),style:{transform:"rotate(90deg)"}}),Object(te.t)("backToLogin")),1===a&&S.a.createElement(je.a,null,S.a.createElement(N.ib,{type:"text",name:"email",placeholder:Object(te.t)("placeholder.email"),labelName:"Email ID",classNameLabel:"u-fs-1 font-weight-normal",value:n,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("email address")},validatorElement:this.validator.message("email address",n,"required|email")}),S.a.createElement(je.a.Group,{controlId:"formCaptcha",className:"mt-4 mb-4"},S.a.createElement("div",{className:"u-fs-1 font-weight-normal mb-1"},Object(te.t)("captchaLabel")),S.a.createElement(bn,{sitekey:O.g.GOOGLE_CAPTCHA_API_KEY,onChange:function(){return e.setState({captchaSuccessful:!0})},onExpired:function(){return e.setState({captchaSuccessful:!1})}}),this.validator.message("recaptcha",r,"recaptcha")),S.a.createElement(ve.a,{variant:"primary",block:!0,className:"u-h-3x btn-border text-white",onClick:this.getResetPasswordCode},Object(te.t)("btn.getTheCode")),S.a.createElement("div",{className:"u-fs-7o8 text-center mt-3"},Object(te.t)("forgotPasswordInstruction"))),2===a&&S.a.createElement(je.a,null,S.a.createElement(N.ib,{type:"text",name:"verificationCode",placeholder:Object(te.t)("placeholder.inputVerificationCode"),labelName:Object(te.t)("form.verificationCode"),classNameLabel:"u-fs-1 font-weight-normal mb-1",value:l,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("verification code")},validatorElement:this.validator.message("verification code",l,"required")}),S.a.createElement(N.ib,{type:"password",name:"newPassword",placeholder:Object(te.t)("placeholder.newPassword"),labelName:Object(te.t)("form.newPassword"),classNameLabel:"u-fs-1 font-weight-normal mb-1",value:o,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("new password")},validatorElement:this.validator.message("new password",o,["required","min:".concat(O.g.MIN_PASSWORD_LENGTH),"max:".concat(O.g.TEXT_INPUT_MAX_LENGTH),"hasMixedCharacters","hasSpecial"])}),S.a.createElement(N.ib,{type:"password",name:"confirmNewPassword",placeholder:Object(te.t)("placeholder.confirmNewPassword"),labelName:Object(te.t)("form.confirmNewPassword"),classNameLabel:"u-fs-1 font-weight-normal mb-1",value:s,onChange:this.handleChange,onBlur:function(){return e.validator.showMessageFor("confirm new password")},validatorElement:this.validator.message("confirm new password",s,["required",{confirmPasswordRule:o}])}),S.a.createElement("div",{className:"d-flex justify-content-end"},S.a.createElement(Vt.a,{to:O.g.LOGIN_PAGE_PATH},Object(te.t)("btn.signIn"))),S.a.createElement(ve.a,{variant:"primary",block:!0,className:"u-h-3x btn-border text-white u-mt-1x1o2",onClick:this.resetPassword},Object(te.t)("btn.save")))))}}]),n}(E.Component)),Cn=Object(T.b)(null,(function(e){return{resetPassword:function(t,n,r){return e(x.a.resetPassword(t,n,r))},getResetPasswordCode:function(t,n,r){return e(x.a.getResetPasswordCode(t,n,r))}}}))(Sn),Tn=r(299),kn=r.n(Tn);var xn=function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){return u()(this,n),t.apply(this,arguments)}return n}(function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){return u()(this,n),t.apply(this,arguments)}return h()(n,[{key:"render",value:function(){return S.a.createElement("div",{className:kn.a.wrapper},S.a.createElement("img",{className:kn.a.logo,src:L.a.logoWhite,alt:"fuvi.us"}),S.a.createElement("div",{className:kn.a.title},"Mobile App Access coming SOON!"),S.a.createElement("div",{className:kn.a.body},S.a.createElement("div",{className:kn.a.welcome},"WELCOME TO FUVi!"),S.a.createElement("div",{className:"mt-3"},"Thank you for joining the early release of our platform!"),S.a.createElement("div",{className:"mt-2"},"You are reading this because you are using a mobile device. Please visit us (",S.a.createElement("span",{className:"text-secondary"},"https://www.ifuvi.com/login"),") on your desktop (or laptop)."),S.a.createElement("div",{className:"mt-2"},"You have free access to the full PC-BASED PLATFORM! Mobile app acessing coming in Q3!")))}}]),n}(E.Component));r(1666);var On={__html:r(1665)},In=function(e){g()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=A()(e);if(t()){var i=A()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b()(this,n)}}(n);function n(){return u()(this,n),t.apply(this,arguments)}return h()(n,[{key:"render",value:function(){return S.a.createElement("div",{className:"vw-100 vh-100 overflow-auto"},S.a.createElement("div",{id:"fvicon",dangerouslySetInnerHTML:On}))}}]),n}(E.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return T})),n.d(t,"d",(function(){return x})),n.d(t,"c",(function(){return m})),n.d(t,"f",(function(){return g})),n.d(t,"e",(function(){return p}));var r=n(55);function i(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}var o=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],s=e&&i(e),l=t&&i(t),c=s||l;if(e&&i(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var u=o[o.length-1];n="."===u||".."===u||""===u}else n=!1;for(var d=0,h=o.length;h>=0;h--){var f=o[h];"."===f?a(o,h):".."===f?(a(o,h),d++):d&&(a(o,h),d--)}if(!c)for(;d--;d)o.unshift("..");!c||""===o[0]||o[0]&&i(o[0])||o.unshift("");var p=o.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(161);function u(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function h(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function f(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function m(e,t,n,i){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(a=Object(r.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=o(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var b=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}function A(){try{return window.history.state||{}}catch(e){return{}}}function _(e){void 0===e&&(e={}),b||Object(c.a)(!1);var t,n=window.history,i=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),o=e,s=o.forceRefresh,l=void 0!==s&&s,d=o.getUserConfirmation,g=void 0===d?y:d,_=o.keyLength,w=void 0===_?6:_,E=e.basename?f(u(e.basename)):"";function S(e){var t=e||{},n=t.key,r=t.state,i=window.location,a=i.pathname+i.search+i.hash;return E&&(a=h(a,E)),m(a,r,n)}function C(){return Math.random().toString(36).substr(2,w)}var T=v();function k(e){Object(r.a)(F,e),F.length=n.length,T.notifyListeners(F.location,F.action)}function x(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||M(S(e.state))}function O(){M(S(A()))}var I=!1;function M(e){if(I)I=!1,k();else{T.confirmTransitionTo(e,"POP",g,(function(t){t?k({action:"POP",location:e}):function(e){var t=F.location,n=D.indexOf(t.key);-1===n&&(n=0);var r=D.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(I=!0,L(i))}(e)}))}}var P=S(A()),D=[P.key];function N(e){return E+p(e)}function L(e){n.go(e)}var R=0;function B(e){1===(R+=e)&&1===e?(window.addEventListener("popstate",x),a&&window.addEventListener("hashchange",O)):0===R&&(window.removeEventListener("popstate",x),a&&window.removeEventListener("hashchange",O))}var j=!1;var F={length:n.length,action:"POP",location:P,createHref:N,push:function(e,t){var r=m(e,t,C(),F.location);T.confirmTransitionTo(r,"PUSH",g,(function(e){if(e){var t=N(r),a=r.key,o=r.state;if(i)if(n.pushState({key:a,state:o},null,t),l)window.location.href=t;else{var s=D.indexOf(F.location.key),c=D.slice(0,s+1);c.push(r.key),D=c,k({action:"PUSH",location:r})}else window.location.href=t}}))},replace:function(e,t){var r=m(e,t,C(),F.location);T.confirmTransitionTo(r,"REPLACE",g,(function(e){if(e){var t=N(r),a=r.key,o=r.state;if(i)if(n.replaceState({key:a,state:o},null,t),l)window.location.replace(t);else{var s=D.indexOf(F.location.key);-1!==s&&(D[s]=r.key),k({action:"REPLACE",location:r})}else window.location.replace(t)}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&(e=!1);var t=T.setPrompt(e);return j||(B(1),j=!0),function(){return j&&(j=!1,B(-1)),t()}},listen:function(e){var t=T.appendListener(e);return B(1),function(){B(-1),t()}}};return F}var w={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+d(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:d,decodePath:u},slash:{encodePath:u,decodePath:u}};function E(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function S(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function C(e){window.location.replace(E(window.location.href)+"#"+e)}function T(e){void 0===e&&(e={}),b||Object(c.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),i=n.getUserConfirmation,a=void 0===i?y:i,o=n.hashType,s=void 0===o?"slash":o,l=e.basename?f(u(e.basename)):"",d=w[s],g=d.encodePath,A=d.decodePath;function _(){var e=A(S());return l&&(e=h(e,l)),m(e)}var T=v();function k(e){Object(r.a)(F,e),F.length=t.length,T.notifyListeners(F.location,F.action)}var x=!1,O=null;function I(){var e,t,n=S(),r=g(n);if(n!==r)C(r);else{var i=_(),o=F.location;if(!x&&(t=i,(e=o).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(O===p(i))return;O=null,function(e){if(x)x=!1,k();else{T.confirmTransitionTo(e,"POP",a,(function(t){t?k({action:"POP",location:e}):function(e){var t=F.location,n=N.lastIndexOf(p(t));-1===n&&(n=0);var r=N.lastIndexOf(p(e));-1===r&&(r=0);var i=n-r;i&&(x=!0,L(i))}(e)}))}}(i)}}var M=S(),P=g(M);M!==P&&C(P);var D=_(),N=[p(D)];function L(e){t.go(e)}var R=0;function B(e){1===(R+=e)&&1===e?window.addEventListener("hashchange",I):0===R&&window.removeEventListener("hashchange",I)}var j=!1;var F={length:t.length,action:"POP",location:D,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=E(window.location.href)),n+"#"+g(l+p(e))},push:function(e,t){var n=m(e,void 0,void 0,F.location);T.confirmTransitionTo(n,"PUSH",a,(function(e){if(e){var t=p(n),r=g(l+t);if(S()!==r){O=t,function(e){window.location.hash=e}(r);var i=N.lastIndexOf(p(F.location)),a=N.slice(0,i+1);a.push(t),N=a,k({action:"PUSH",location:n})}else k()}}))},replace:function(e,t){var n=m(e,void 0,void 0,F.location);T.confirmTransitionTo(n,"REPLACE",a,(function(e){if(e){var t=p(n),r=g(l+t);S()!==r&&(O=t,C(r));var i=N.indexOf(p(F.location));-1!==i&&(N[i]=t),k({action:"REPLACE",location:n})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&(e=!1);var t=T.setPrompt(e);return j||(B(1),j=!0),function(){return j&&(j=!1,B(-1)),t()}},listen:function(e){var t=T.appendListener(e);return B(1),function(){B(-1),t()}}};return F}function k(e,t,n){return Math.min(Math.max(e,t),n)}function x(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,i=t.initialEntries,a=void 0===i?["/"]:i,o=t.initialIndex,s=void 0===o?0:o,l=t.keyLength,c=void 0===l?6:l,u=v();function d(e){Object(r.a)(A,e),A.length=A.entries.length,u.notifyListeners(A.location,A.action)}function h(){return Math.random().toString(36).substr(2,c)}var f=k(s,0,a.length-1),g=a.map((function(e){return m(e,void 0,"string"==typeof e?h():e.key||h())})),b=p;function y(e){var t=k(A.index+e,0,A.entries.length-1),r=A.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var A={length:g.length,action:"POP",location:g[f],index:f,entries:g,createHref:b,push:function(e,t){var r=m(e,t,h(),A.location);u.confirmTransitionTo(r,"PUSH",n,(function(e){if(e){var t=A.index+1,n=A.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),d({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=m(e,t,h(),A.location);u.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(A.entries[A.index]=r,d({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=A.index+e;return t>=0&&t<A.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return A}},function(e,t,n){"use strict";var r=n(583),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:l,isUndefined:o,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):a(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";var r=n(302);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(1363);t.default=class{constructor({enableUnifiedPlanForChromiumBasedBrowsers:e=!1,recreateAudioContextIfNeeded:t=!1}={}){this.browser=i.detect(),this.browserSupport={chrome:78,"edge-chromium":79,electron:7,firefox:60,ios:12,safari:12,opera:66,samsung:12,crios:86,fxios:23,"ios-webview":605,"chromium-webview":92},this.browserName={chrome:"Google Chrome","edge-chromium":"Microsoft Edge",electron:"Electron",firefox:"Mozilla Firefox",ios:"Safari iOS",safari:"Safari",opera:"Opera",samsung:"Samsung Internet",crios:"Chrome iOS",fxios:"Firefox iOS","ios-webview":"WKWebView iOS","chromium-webview":"Chrome WebView"},this.chromeLike=["chrome","edge-chromium","chromium-webview","opera","samsung"],this.webkitBrowsers=["crios","fxios","safari","ios","ios-webview"],this.enableUnifiedPlanForChromiumBasedBrowsers=e,this.recreateAudioContextIfNeeded=t}version(){return this.browser.version}majorVersion(){return parseInt(this.version().split(".")[0])}name(){return this.browser.name}hasChromiumWebRTC(){for(const e of this.chromeLike)if(e===this.browser.name)return!0;return!1}hasWebKitWebRTC(){for(const e of this.webkitBrowsers)if(e===this.browser.name)return!0;return!1}hasFirefoxWebRTC(){return this.isFirefox()}supportsCanvasCapturedStreamPlayback(){return!this.isIOSSafari()&&!this.isIOSChrome()&&!this.isIOSFirefox()}requiresUnifiedPlan(){let e=this.isFirefox()||this.hasWebKitWebRTC()&&this.isUnifiedPlanSupported();return this.enableUnifiedPlanForChromiumBasedBrowsers&&(e=e||this.hasChromiumWebRTC()),e}requiresResolutionAlignment(e,t){return this.isAndroid()&&this.isPixel3()?[64*Math.ceil(e/64),64*Math.ceil(t/64)]:[e,t]}requiresCheckForSdpConnectionAttributes(){return!this.isIOSSafari()&&!this.isIOSChrome()&&!this.isIOSFirefox()}requiresIceCandidateGatheringTimeoutWorkaround(){return this.hasChromiumWebRTC()}requiresUnifiedPlanMunging(){let e=this.hasWebKitWebRTC()&&this.isUnifiedPlanSupported();return this.enableUnifiedPlanForChromiumBasedBrowsers&&(e=e||this.hasChromiumWebRTC()),e}requiresSortCodecPreferencesForSdpAnswer(){return this.isFirefox()&&this.majorVersion()<=68}requiresSimulcastMunging(){return this.isSafari()}requiresBundlePolicy(){return"max-bundle"}requiresPromiseBasedWebRTCGetStats(){return!this.hasChromiumWebRTC()}requiresVideoElementWorkaround(){return this.isSafari()&&12===this.majorVersion()}requiresNoExactMediaStreamConstraints(){return this.isSamsungInternet()||this.isIOSSafari()&&("12.0.0"===this.version()||"12.1.0"===this.version())}requiresGroupIdMediaStreamConstraints(){return this.isSamsungInternet()}requiresContextRecreationForAudioWorklet(){return!!this.recreateAudioContextIfNeeded&&("chrome"in e&&("Mac OS"===this.browser.os&&!(!this.isChrome()&&!this.isEdge())))}getDisplayMediaAudioCaptureSupport(){return this.isChrome()||this.isEdge()}supportsSenderSideBandwidthEstimation(){return this.hasChromiumWebRTC()||this.isSafari()}doesNotSupportMediaDeviceLabels(){return"chromium-webview"===this.browser.name}screenShareUnsupported(){return console.warn("This function is no longer supported."),!!this.isSafari()}isSupported(){return!(!this.browserSupport[this.browser.name]||this.majorVersion()<this.browserSupport[this.browser.name])&&("firefox"!==this.browser.name||!this.isAndroid())}supportString(){if(this.isAndroid())return`${this.browserName.chrome} ${this.browserSupport.chrome}+, ${this.browserName.samsung} ${this.browserSupport.samsung}+`;const e=[];for(const t in this.browserSupport)e.push(`${this.browserName[t]} ${this.browserSupport[t]}+`);return e.join(", ")}supportedVideoCodecs(){return r(this,void 0,void 0,(function*(){const e=new RTCPeerConnection;return e.addTransceiver("video",{direction:"inactive",streams:[]}),(yield e.createOffer({offerToReceiveVideo:!0})).sdp.split("\r\n").filter(e=>e.includes("a=rtpmap:")).map(e=>e.replace(/.* /,"").replace(/\/.*/,"")).filter((e,t,n)=>n.indexOf(e)===t).filter(e=>"rtx"!==e&&"red"!==e&&"ulpfec"!==e)}))}supportsSetSinkId(){return"setSinkId"in HTMLAudioElement.prototype}isIOSSafari(){return"ios"===this.browser.name||"ios-webview"===this.browser.name}isSafari(){return"safari"===this.browser.name||"ios"===this.browser.name}isFirefox(){return"firefox"===this.browser.name}isIOSFirefox(){return"fxios"===this.browser.name}isIOSChrome(){return"crios"===this.browser.name}isChrome(){return"chrome"===this.browser.name}isEdge(){return"edge-chromium"===this.browser.name}isSamsungInternet(){return"samsung"===this.browser.name}isAndroid(){return/(android)/i.test(navigator.userAgent)}isPixel3(){return/( pixel 3)/i.test(navigator.userAgent)}isUnifiedPlanSupported(){return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")}}}).call(this,n(68))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(818),i=n(819);t.default=class{static of(e){return null==e?r.default.of():i.default.of(e)}}},function(e,t,n){"use strict";var r=n(217),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var o=u(n);d&&(o=o.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<o.length;++g){var v=o[g];if(!(a[v]||r&&r[v]||m&&m[v]||s&&s[v])){var b=h(n,v);try{c(t,v,b)}catch(e){}}}}return t}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",chapterFileManagerModal:"chapterFileManagerModal--2ewcP",modalBody:"modalBody--2pXl6",file:"file--3cCq-",isPreview:"isPreview--3dF-Q",chapterFileUploadModal:"chapterFileUploadModal--IwyNk",chapterFileDeleteModal:"chapterFileDeleteModal--3WjAj"}},function(e,t,n){"use strict";t.a=function(e,t){if(!e)throw new Error("Invariant failed")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(153),i=Object(r.a)()},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",link:"link--3fPii",menuItem:"menuItem--OHbaC",menuInternal:"menuInternal--2cC4U",notiBadge:"notiBadge--GMVea",collapseIcon:"collapseIcon--2Ss4P",expandIcon:"expandIcon--3Gqgq",menuDropdown:"menuDropdown--1z54d",arrow:"arrow--Ky3L-",dropdownWrapper:"dropdownWrapper--iQw9h",dropdown:"dropdown--1POzf"}},function(e,t,n){var r=n(464)("wks"),i=n(356),a=n(181).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,a,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,o,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return s}));var r=n(249),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function o(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var l=e,c=t,u=[],d=u,h=!1;function f(){d===u&&(d=u.slice())}function p(){if(h)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(h)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return f(),d.push(e),function(){if(t){if(h)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,f();var n=d.indexOf(e);d.splice(n,1),u=null}}}function g(e){if(!o(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(h)throw new Error("Reducers may not dispatch actions.");try{h=!0,c=l(c,e)}finally{h=!1}for(var t=u=d,n=0;n<t.length;n++){(0,t[n])()}return e}function v(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");l=e,g({type:a.REPLACE})}function b(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(p())}return n(),{unsubscribe:t(n)}}})[r.a]=function(){return this},e}return g({type:a.INIT}),(i={dispatch:g,subscribe:m,getState:p,replaceReducer:v})[r.a]=b,i}function l(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function c(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"==typeof e[i]&&(n[i]=e[i])}var o,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},a=0;a<s.length;a++){var c=s[a],u=n[c],d=e[c],h=u(d,t);if(void 0===h){var f=l(c,t);throw new Error(f)}i[c]=h,r=r||h!==d}return(r=r||s.length!==Object.keys(e).length)?i:e}}function u(e,t){return function(){return t(e.apply(this,arguments))}}function d(e,t){if("function"==typeof e)return u(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=u(i,t))}return n}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return p({},n,{dispatch:r=m.apply(void 0,a)(n.dispatch)})}}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"SECRET_KEY",(function(){return m})),n.d(t,"WITH_CREDENTIALS",(function(){return g})),n.d(t,"GOOGLE_CAPTCHA_API_KEY",(function(){return v})),n.d(t,"LOCAL_ENV",(function(){return b})),n.d(t,"AUTH_SERVICES_ENDPOINT",(function(){return y})),n.d(t,"CONTENT_SERVICES_ENDPOINT",(function(){return A})),n.d(t,"COGVID_SERVICES_ENDPOINT",(function(){return _})),n.d(t,"COMPOSING_SERVICES_V1",(function(){return w})),n.d(t,"COMPREHENSION_SERVICES_ENDPOINT",(function(){return E})),n.d(t,"VIDEO_SERVICES_ENDPOINT",(function(){return S})),n.d(t,"PRICING_SERVICES_ENDPOINT",(function(){return C})),n.d(t,"CART_SERVICES_ENDPOINT",(function(){return T})),n.d(t,"FRIENDSHIP_SERVICES_ENDPOINT",(function(){return k})),n.d(t,"NOTIFICATION_SERVICES_ENDPOINT",(function(){return x})),n.d(t,"ANALYTICS_SERVICES_ENDPOINT",(function(){return O})),n.d(t,"CG_SERVICES_ENDPOINT",(function(){return I})),n.d(t,"STORAGE_SERVICES_ENDPOINT",(function(){return M})),n.d(t,"MEETING_SERVICES_ENDPOINT",(function(){return P})),n.d(t,"UNSHORTEN_SERVICES_ENDPOINT",(function(){return D})),n.d(t,"IOS_APP_INSTALLATION_DIR",(function(){return N})),n.d(t,"ANDROID_APP_INSTALLATION_DIR",(function(){return L})),n.d(t,"STRIPE_API_KEY",(function(){return R})),n.d(t,"MQTT_SERVICES_ENDPOINT",(function(){return B})),n.d(t,"MQTT_TOPIC_DOMAIN_BASE_URL",(function(){return j})),n.d(t,"MQTT_USERNAME",(function(){return F})),n.d(t,"MQTT_PASSWORD",(function(){return U})),n.d(t,"MQTT_KEEPALIVE",(function(){return H})),n.d(t,"MQTT_RECONNECT_PERIOD",(function(){return z})),n.d(t,"FACEBOOK_APP_ID",(function(){return V})),n.d(t,"FACEBOOK_APP_JSSDK_URL",(function(){return W})),n.d(t,"FACEBOOK_APP_VERSION",(function(){return G})),n.d(t,"FACEBOOK_APP_PERMISSION",(function(){return q})),n.d(t,"FACEBOOK_APP_LOGIN_STATE",(function(){return Y})),n.d(t,"SOCIAL_ISSUER",(function(){return K})),n.d(t,"GOOGLE_APP_ID",(function(){return X})),n.d(t,"MY_MEDIA_PAGE_SIZE",(function(){return Q})),n.d(t,"MY_COGVID_PAGE_SIZE",(function(){return $})),n.d(t,"COGVID_SEARCH_PAGE_SIZE",(function(){return J})),n.d(t,"USER_SHARED_VIDEO_PAGE_SIZE",(function(){return Z})),n.d(t,"MY_MEDIA_PAGE_SORT",(function(){return ee})),n.d(t,"COGNITIVE_LIST_SORT",(function(){return te})),n.d(t,"MY_COGNITIVE_LIST_SORT",(function(){return ne})),n.d(t,"BIRTHDAY_FORMAT",(function(){return re})),n.d(t,"DATE_FORMAT",(function(){return ie})),n.d(t,"TIME_FORMAT",(function(){return ae})),n.d(t,"DATE_TIME_FORMAT",(function(){return oe})),n.d(t,"TIME_DATE_FORMAT_SB",(function(){return se})),n.d(t,"DATE_TIME_FORMAT_PROGRESS",(function(){return le})),n.d(t,"DATE_FORMAT_ORDER",(function(){return ce})),n.d(t,"TOAST_POSITION",(function(){return ue})),n.d(t,"SB_LENGTH",(function(){return de})),n.d(t,"MINIMUM_CHAPTER_LENGTH",(function(){return he})),n.d(t,"COGVID_STATUS",(function(){return fe})),n.d(t,"DEFAULT_LIST",(function(){return pe})),n.d(t,"COGVID_ACTIONS",(function(){return me})),n.d(t,"SCOPE_COGVID_STATUS",(function(){return ge})),n.d(t,"SCOPE_CHAPTER_STATUS",(function(){return ve})),n.d(t,"CHAPTER_PROCESSING_STATUS",(function(){return be})),n.d(t,"VIDEO_PROCESSING_ACTION_STATES",(function(){return ye})),n.d(t,"CHAPTER_TYPES",(function(){return Ae})),n.d(t,"COGVID_STATUS_COLOR",(function(){return _e})),n.d(t,"CREATE_COGVID_CONSTRAINTS",(function(){return we})),n.d(t,"BASE_PIXEL_SIZE",(function(){return Ee})),n.d(t,"CHAPTER_TEXT_DEFAULT_PIXEL_SIZE",(function(){return Se})),n.d(t,"BASE_PIXEL_BORDER_SIZE",(function(){return Ce})),n.d(t,"BASE_PIXEL_FONT_SIZE",(function(){return Te})),n.d(t,"BASE_PIXEL_SIZE_SM",(function(){return ke})),n.d(t,"BASE_FONT",(function(){return xe})),n.d(t,"BASE_LINE_STYLE",(function(){return Oe})),n.d(t,"BASE_CANVAS_BACKGROUND_COLOR",(function(){return Ie})),n.d(t,"BASE_CANVAS_BORDER_COLOR",(function(){return Me})),n.d(t,"TEXT_INPUT_MAX_LENGTH",(function(){return Pe})),n.d(t,"COMMENT_MAX_LENGTH",(function(){return De})),n.d(t,"NOTE_MAX_LENGTH",(function(){return Ne})),n.d(t,"MIN_PASSWORD_LENGTH",(function(){return Le})),n.d(t,"DESCRIPTION_INPUT_MAX_LENGTH",(function(){return Re})),n.d(t,"VIDEO_OVERLAY_MODE",(function(){return Be})),n.d(t,"COGVID_ITEM_TRUNCATE_TEXT_LENGTH",(function(){return je})),n.d(t,"SB_MAX_TEXT_LENGTH_PER_ROW",(function(){return Fe})),n.d(t,"NO_PRELOAD_IMAGES",(function(){return Ue})),n.d(t,"NO_SB_EACH_FETCH",(function(){return He})),n.d(t,"MAX_PRELOAD_SBS",(function(){return ze})),n.d(t,"NO_COGVID_ITEMS_EACH_FETCH",(function(){return Ve})),n.d(t,"HIGHLIGHTS",(function(){return We})),n.d(t,"PLAYING_CHAPTER_ORDER",(function(){return Ge})),n.d(t,"SRC_SET_TIME",(function(){return qe})),n.d(t,"LOOP_MODE",(function(){return Ye})),n.d(t,"SEARCH_NAV_LABEL",(function(){return Ke})),n.d(t,"SEARCH_RESULT_DOC_CLASS",(function(){return Xe})),n.d(t,"CHAPTER_EDITTING_TOLERANCE",(function(){return Qe})),n.d(t,"TYPE_EDITING",(function(){return $e})),n.d(t,"CANVAS_DRAWING_TYPE",(function(){return Je})),n.d(t,"BORDER_STYLE_TYPE",(function(){return Ze})),n.d(t,"CANVAS_COLORS",(function(){return et})),n.d(t,"USER_ROLE",(function(){return tt})),n.d(t,"COMMENT_LIKE_SCOPE",(function(){return nt})),n.d(t,"VIDEO_CATEGORY_TYPE_TO_MENU",(function(){return rt})),n.d(t,"VIDEO_CATEGORY_TYPE_TO_DISPLAY_MENU",(function(){return it})),n.d(t,"VIDEO_CATEGORY",(function(){return at})),n.d(t,"VIDEO_MENU_BASE_URL",(function(){return ot})),n.d(t,"VIDEO_SEARCH_SCOPE",(function(){return st})),n.d(t,"COGVID_LIST_API_DIR",(function(){return lt})),n.d(t,"HOME_PAGE_PATH",(function(){return ct})),n.d(t,"BRAINHIVE_PAGE_PATH",(function(){return ut})),n.d(t,"LOGIN_PAGE_PATH",(function(){return dt})),n.d(t,"REGISTER_PAGE_PATH",(function(){return ht})),n.d(t,"PEOPLE_PAGE_PATH",(function(){return ft})),n.d(t,"MOBILE_COMING_SOON_PAGE_PATH",(function(){return pt})),n.d(t,"TEMP_PATH",(function(){return mt})),n.d(t,"MENU_ITEMS",(function(){return gt})),n.d(t,"GALLERY_MAX_FILES_UPLOAD",(function(){return vt})),n.d(t,"SCROLL_ANIMATION_TIME",(function(){return bt})),n.d(t,"DELAY_SEARCH_VIDEO_TIME",(function(){return yt})),n.d(t,"PUBLISHING_STATUS",(function(){return At})),n.d(t,"PROGRESS_STATUS",(function(){return _t})),n.d(t,"CCV_UPLOAD_TYPE",(function(){return wt})),n.d(t,"VIDEO_TYPE",(function(){return Et})),n.d(t,"DND_TYPE",(function(){return St})),n.d(t,"PROCESSING_STATUS",(function(){return Ct})),n.d(t,"ATTACHED_SUCCESSFULLY",(function(){return Tt})),n.d(t,"MAX_UPLOADING_PROCESS",(function(){return kt})),n.d(t,"PAGE_AUTH_TYPE",(function(){return xt})),n.d(t,"GENDER_TYPES",(function(){return Ot})),n.d(t,"PARTICIPANT",(function(){return It})),n.d(t,"PARTICIPANT_TYPES",(function(){return Mt})),n.d(t,"DEFAULT_LEARNING_LEVEL",(function(){return Pt})),n.d(t,"LEARNING_LEVEL",(function(){return Dt})),n.d(t,"LEARNING_LEVELS",(function(){return Nt})),n.d(t,"DEFAULT_LEARNING_SUBJECT",(function(){return Lt})),n.d(t,"DEFAULT_LEARNING_SUBJECT_EDIT",(function(){return Rt})),n.d(t,"LEARNING_SUBJECTS",(function(){return Bt})),n.d(t,"KEYWORD_CATEGORIES",(function(){return jt})),n.d(t,"MAX_LINES_SB_TEXT",(function(){return Ft})),n.d(t,"COVER_IMAGE_TYPE",(function(){return Ut})),n.d(t,"SET_COVER_IMG_SOURCE",(function(){return Ht})),n.d(t,"PLAY_BUTTON_NAME",(function(){return zt})),n.d(t,"CHAPTER_PLAY_BUTTON_NAME",(function(){return Vt})),n.d(t,"SB_WRAPPER_NAME",(function(){return Wt})),n.d(t,"ADD_NEW_CHAPTER",(function(){return Gt})),n.d(t,"POSITION",(function(){return qt})),n.d(t,"CURRENCIES",(function(){return Yt})),n.d(t,"ACCESS_GRANT_TYPE",(function(){return Kt})),n.d(t,"ACCESS_GRANT_TYPE_DISPLAY",(function(){return Xt})),n.d(t,"PRICE_MODE",(function(){return Qt})),n.d(t,"FIRST_AREA_PLACE_HOLDER_TYPE",(function(){return $t})),n.d(t,"CHAPTER_LIST_FONT",(function(){return Jt})),n.d(t,"TOOLBAR_LIST_BORDER_SIZE",(function(){return Zt})),n.d(t,"TOOLBAR_LIST_FONT_SIZE",(function(){return en})),n.d(t,"TOOLBAR_LIST_LINE_STYLE",(function(){return tn})),n.d(t,"TOOLBAR_LIST_FONT",(function(){return nn})),n.d(t,"CREATE_COGVID_TYPE",(function(){return rn})),n.d(t,"CB_CANVAS",(function(){return an})),n.d(t,"EXPORT_PDF",(function(){return on})),n.d(t,"MAX_UNDO_STEPS",(function(){return sn})),n.d(t,"PAYMENT",(function(){return ln})),n.d(t,"SEARCH_PARAM",(function(){return cn})),n.d(t,"PRIORITY_COUNTRIES_SELECT",(function(){return un})),n.d(t,"PEOPLE",(function(){return dn})),n.d(t,"PEOPLE_TABS",(function(){return hn})),n.d(t,"PEOPLE_ACTIONS",(function(){return fn})),n.d(t,"DEFAULT_VIDEO_ROLE_NAME",(function(){return pn})),n.d(t,"DEFAULT_CHAPTER_ROLE_NAME",(function(){return mn})),n.d(t,"SHARE_VIDEO_SEARCH_PEOPLE_LIMIT",(function(){return gn})),n.d(t,"SHARE_TYPES",(function(){return vn})),n.d(t,"VIDEO_SETTINGS",(function(){return bn})),n.d(t,"NOTIFICATION",(function(){return yn})),n.d(t,"NOTIFICATION_ACTIONS",(function(){return An})),n.d(t,"VIDEO_SORT",(function(){return _n})),n.d(t,"VIDEO_SORT_DEFAULT",(function(){return wn})),n.d(t,"VIDEO_SORT_VALUE",(function(){return En})),n.d(t,"VIDEO_SEARCH_SORT_VALUE",(function(){return Sn})),n.d(t,"VIDEO_MENU_CATEGORY",(function(){return Cn})),n.d(t,"CREATE_COVER_MODE",(function(){return Tn})),n.d(t,"EXTRACT_TYPE",(function(){return kn})),n.d(t,"TYPES_OF_LEARNING",(function(){return xn})),n.d(t,"TEMP_GALLERY_UID",(function(){return On})),n.d(t,"MAX_COURSE_SEQUENCE",(function(){return In})),n.d(t,"COURSE_SEQUENCE_MAX_LENGTH",(function(){return Mn})),n.d(t,"COURSE_CODE_MAX_LENGTH",(function(){return Pn})),n.d(t,"ORDER_STATUS",(function(){return Dn})),n.d(t,"SUPPORTED_VIDEO_TYPES",(function(){return Nn})),n.d(t,"SUPPORTED_IMG_TYPES",(function(){return Ln})),n.d(t,"termsAndConditionsUrl",(function(){return Rn})),n.d(t,"privacyPoliciesUrl",(function(){return Bn})),n.d(t,"STEP_NUMBER_COLOR",(function(){return jn})),n.d(t,"TOUR_CONFIG",(function(){return Fn})),n.d(t,"VIDEO_LIST_FILTER",(function(){return Un})),n.d(t,"VIDEO_BRAINHIVE_FILTER_DEFAULT",(function(){return Hn})),n.d(t,"VIDEO_COMPOSING_FILTER_DEFAULT",(function(){return zn})),n.d(t,"VIDEO_LIST_FILTER_VALUE",(function(){return Vn})),n.d(t,"MARKET",(function(){return Wn})),n.d(t,"EXTRACT_CHAPTER_TYPE",(function(){return Gn})),n.d(t,"CHAPTER_TYPE_TO_MENU",(function(){return qn})),n.d(t,"COOKIE",(function(){return Yn})),n.d(t,"ANIMATION_DURATION",(function(){return Kn})),n.d(t,"TIME_PERIOD",(function(){return Xn})),n.d(t,"GROUP_BY",(function(){return Qn})),n.d(t,"VIDEO_VOLUME_DEFAULT",(function(){return $n})),n.d(t,"VIDEO_PLAYBACK_RATE",(function(){return Jn})),n.d(t,"VIDEO_PLAYBACK_RATE_DEFAULT",(function(){return Zn})),n.d(t,"DUMMY_DAILY_VIDEO_ID_PREFIX",(function(){return er})),n.d(t,"DAILY_VIDEO_DATE_FORMAT",(function(){return tr})),n.d(t,"MINIUM_IRL_DATE",(function(){return nr})),n.d(t,"DEFAULT_DAILY_VIDEO_DATE_RANGE",(function(){return rr})),n.d(t,"INITIAL_DAILY_VIDEO_CHAPTERS",(function(){return ir})),n.d(t,"HOURS_BETWEEN_SAME_ANOYNYMOUS_LIKE",(function(){return ar})),n.d(t,"REMINDER_OPTIONS",(function(){return or})),n.d(t,"DEFAULT_MEETING_DURATION",(function(){return sr})),n.d(t,"MEETING_STATUS",(function(){return lr})),n.d(t,"MEETING_PAGE_PATH",(function(){return cr})),n.d(t,"MEETING_SESSION_KEY",(function(){return ur})),n.d(t,"MEETING_MIC_KEY",(function(){return dr})),n.d(t,"MEETING_AUD_KEY",(function(){return hr})),n.d(t,"MEETING_VID_KEY",(function(){return fr})),n.d(t,"MEETING_INFO_KEY",(function(){return pr})),n.d(t,"MEETING_RECORD_ID",(function(){return mr})),n.d(t,"DEFAULT_COLLECTION_TEXT",(function(){return gr})),n.d(t,"TRACKING_USER",(function(){return vr})),n.d(t,"TERM_OF_USE_HASH",(function(){return br})),n.d(t,"PRIVACY_HASH",(function(){return yr})),n.d(t,"TRANSCRIPT_STATUS",(function(){return Ar})),n.d(t,"SB_CONTENT_MODE",(function(){return _r})),n.d(t,"SB_MODES",(function(){return wr})),n.d(t,"CLONE_VIDEO_TO_OPTIONS",(function(){return Er})),n.d(t,"AGENT_TYPE",(function(){return Sr})),n.d(t,"AGENT_LIST",(function(){return Cr})),n.d(t,"BASE64_IMAGE_PREFIX",(function(){return Tr})),n.d(t,"RESOURCE",(function(){return kr})),n.d(t,"PRODUCT_TYPE",(function(){return xr})),n.d(t,"VIDEO_AREA_WRAPPER_ID",(function(){return Or})),n.d(t,"VIDEO_AREA_ID",(function(){return Ir})),n.d(t,"VIDEO_PLAYER_ID",(function(){return Mr})),n.d(t,"SLIDING_TIME",(function(){return Pr})),n.d(t,"CHAPTER_SLIDER_THUMB",(function(){return Dr})),n.d(t,"CHAPTER_VIEW_COUNT_TIME",(function(){return Nr})),n.d(t,"VIDEO_SLIDER_THUMB",(function(){return Lr})),n.d(t,"WORKER_FETCH_MORE",(function(){return Rr})),n.d(t,"DEFAULT_PAGE_SIZE",(function(){return Br})),n.d(t,"DEFAULT_MAX_SC_LOADED",(function(){return jr})),n.d(t,"ERROR_NOT_ACTIVATED",(function(){return Fr})),n.d(t,"ID_SC_USAGE_TIP",(function(){return Ur})),n.d(t,"ID_PRODUCTS_LAYER",(function(){return Hr})),n.d(t,"ID_VIDEO_PLAY_BUTTON_AREA",(function(){return zr})),n.d(t,"ID_VIDEO_BACK_BUTTON",(function(){return Vr})),n.d(t,"ID_CHAPTER_CI_WRAPPER",(function(){return Wr})),n.d(t,"ID_FULLSCREEN_BUTTON",(function(){return Gr})),n.d(t,"WEEK_DAYS",(function(){return qr})),n.d(t,"RESOURCE_TYPE",(function(){return Yr})),n.d(t,"RESOURCE_SUBTYPE",(function(){return Kr})),n.d(t,"MEMBERSHIP_STATUS",(function(){return Xr})),n.d(t,"MEMBERSHIP_STATUS_DISPLAY",(function(){return Qr})),n.d(t,"SLIDE_TYPE",(function(){return $r})),n.d(t,"SUBSCRIPTION",(function(){return Jr})),n.d(t,"SUB_OFFER",(function(){return Zr})),n.d(t,"SUB_OPTIONS",(function(){return ei}));var r,i,a,o,s,l,c=n(2),u=n.n(c),d=n(139),h=n(54),f=n(20),p="https://services.ifuvi.com/",m="gVkYp3s6v9y$B&E)",g=!!parseInt("1"),v="6LcUGyAbAAAAAM4IwCPeGoRyiP0i34n7rgVt0boa",b=!1,y=b?"http://localhost:8888/api/v0/":"".concat(p,"membership/api/v0/"),A=b?"http://localhost:8889/api/v0/":"".concat(p,"usercontent/api/v0/"),_=b?"http://localhost:9001/api/v0/":"".concat(p,"composing/api/v0/"),w=b?"http://localhost:9001/api/v1/":"".concat(p,"composing/api/v1/"),E="".concat(p,"comprehension/api/v0/"),S="".concat(p,"videoservice/api/v0/"),C="".concat(p,"pricing/api/v0/"),T=b?"http://localhost:9007/api/v0/":"".concat(p,"purchase/api/v0/"),k="".concat(p,"friendship/api/v0/"),x="".concat(p,"notification/api/v0/"),O="".concat(p,"analytics/api/v0"),I="".concat(p,"compr-guides/api/v0/"),M="".concat(p,"storage-insight/api/v0/"),P="".concat(p,"meeting/api/v0/"),D="".concat(p,"videoservice/redirects/"),N="https://itunes.apple.com/fuviMindMasteryApp",L="https://play.google.com/store/apps/details?id=us.fuvi.mindmastery",R="pk_live_51JCPHeClEqEPLP1rlBooJKlOnLTuIuvnzx3BjQJT6ogV7N7BuBYZy1VpC6tXCLpRqptFbqVbBPvfIHJTEW8rdLHO00h54HYEYp",B="wss://artemis.ifuvi.com:8883",j="mindmastery/prd",F="mmPrd",U="mmPrdMQtt@123455",H=e.env.MQTT_KEEPALIVE||900,z=e.env.MQTT_RECONNECT_PERIOD||1e4,V="819523106601244",W="https://connect.facebook.net/en_US/all.js",G="v11.0",q="public_profile,email",Y={CONNECTED:"connected",NOT_AUTHORIZED:"not_authorized"},K={FACEBOOK:"facebook",GOOGLE:"google"},X="569685192390-kcmbofm821457oin8kc9r0rtt6f49o4f.apps.googleusercontent.com",Q=30,$=20,J=100,Z=8,ee="createdDate,DESC",te="publishedDate,DESC",ne="createdDate,DESC",re="MM/DD/YYYY",ie="MMMM-DD-YYYY",ae="h:mm:ss",oe="MM-DD-YYYY HH:mm:ss",se="HH:mm:ss MMM-DD-YYYY",le="MMM-DD HH:mm",ce="MMMM DD, YYYY",ue=d.c.POSITION.TOP_RIGHT,de=2e3,he=2e3,fe={PUBLISHED:"CVS_PUBLISHED",PUBLISHING:"CVS_PUBLISHING",FAILED:"CVS_FAILED",COMPOSING:"CVS_COMPOSING",INITIALLIZING:"CVS_INITIALLIZING",UPDATING:"CVS_UPDATING"},pe="lv0",me={PUBLISH:"PUBLISH",CLONE:"CLONE",DELETE:"DELETE",DELETE_VIDEO_SHARED_TO_ME:"DELETE_VIDEO_SHARED_TO_ME",JOIN:"JOIN",CLONE_FULLY:"CLONE_FULLY",EXPORT_VIDEO_LINK:"EXPORT_VIDEO_LINK"},ge={PUBLIC:"PUBLIC",PRIVATE:"PRIVATE"},ve={PUBLIC:"PUBLIC",PRIVATE:"PRIVATE",PROTECTED:"PROTECTED",INTERNAL:"INTERNAL"},be={UPLOADING:"UPLOADING",TRANSCODING:"TRANSCODING",DELETING:"DELETING",NONE:"NONE"},ye={UPDATING:"UPDATING",CREATING:"CREATING"},Ae={ATTACHMENT_ONLY:{key:"ATTACHMENT_ONLY",title:Object(f.b)("newChapterHeadingText")},EPISODIC:{key:"EPISODIC",title:Object(f.b)("newChapterTitle")},LIVE_SESSION:{key:"LIVE_SESSION",title:""}},_e={CVS_PUBLISHED:h.primary_color,CVS_FAILED:h.danger_color,CVS_COMPOSING:h.warning_color,CVS_INITIALLIZING:h.info_color},we={KEYWORD_LENGTH_LIMIT:100,MAX_COGVID_SOURCE_VIDEOS:5},Ee=16,Se=16,Ce=1,Te=42,ke=16,xe="Arial",Oe="fuvi-stroke-styleG",Ie="transparent",Me="#7f7f7f",Pe=255,De=500,Ne=500,Le=8,Re=102400,Be={ERROR:"ERROR",CONTEXTUAL_IMG:"CONTEXTUAL_IMG"},je=17,Fe=19,Ue=200,He=200,ze=20,Ve=50,We={BLUE:"BLUE",ORANGE:"ORANGE"},Ge="PLAYING_CHAPTER_ORDER",qe={HIGHLIGHT:"HIGHLIGHT",NEXT_SEGMENT:"NEXT_SEGMENT",PREV_SEGMENT:"PREV_SEGMENT",PLAYER:"PLAYER",PLAY_BAR:"PLAY_BAR",SB_SCROLL:"SB_SCROLL",SB_CLICK:"SB_CLICK",FLIP_INDICATOR:"FLIP_INDICATOR",CG:"CG",INSIDE_VIDEO_SEARCH:"INSIDE_VIDEO_SEARCH",FIRST_PLAY:"FIRST_PLAY"},Ye={LOOP_CHAPTER:"LOOP_CHAPTER",LOOP_BOOKMARK:"LOOP_BOOKMARK"},Ke={NEXT:"NEXT",PREV:"PREV",RESET:"RESET"},Xe={SEMANTIC:"SEMANTIC",CHAPTER:"CHAPTER"},Qe=30,$e={CHAPTER_EDITING_START:"CHAPTER_EDITING_START",CHAPTER_EDITING_END:"CHAPTER_EDITING_END",HIGHLIGHT_ADD_START:"HIGHLIGHT_ADD_START",HIGHLIGHT_ADD_END:"HIGHLIGHT_ADD_END",HIGHLIGHT_EDITING_START:"HIGHLIGHT_EDITING_START",HIGHLIGHT_EDITING_END:"HIGHLIGHT_EDITING_END"},Je=u()({LINE:"LINE",RECT:"RECT",TRIANGLE:"TRIANGLE",SQUARE:"SQUARE",CIRCLE:"CIRCLE",SQRT:"SQRT",ZIGZAG:"ZIGZAG",CHECK:"CHECK",FREE_STYLE:"FREE_STYLE",HEXAGON:"HEXAGON",PENTAGON:"PENTAGON",POLYGON:"POLYGON",MOVE_AND_RESIZE:"MOVE_AND_RESIZE",CURVE:"CURVE",TEXT:"TEXT",NONE:"NONE",RESET_CANVAS:"RESET_CANVAS",DELETE_SELECTED_OBJECTS:"DELETE_SELECTED_OBJECTS",EXPORT:"EXPORT",UNDO:"UNDO",REDO:"REDO"},"NONE","NONE"),Ze={LINE:"fuvi-stroke-styleG",DOT_LINE:"fuvi-stroke-styleB",DASH_LINE:"fuvi-stroke-styleC",DOT_DASH_LINE:"fuvi-stroke-styleD"},et=["#808080","#FF00FF","#00FF00","#FFFFFF","#FF8000","#0000FF","#C852C8","#E6E600","#FF0000","#000000"],tt={REVIEWERS:"REVIEWERS",USERS:"USERS"},nt={exploring:"PUBLIC",brainhive:"BRAINHIVE"},rt={HOME_VIDEO:"HOME",CREATE_VIDEO:"COMPOSING",BRAINHIVE_VIDEO:"BRAINHIVE",PUBLISHED_VIDEO:"EXPLORING",ARCHIVED_VIDEO:"EXPERIENCING",MESSAGE_VIDEO:"MESSAGES"},it={BRAINHIVE_VIDEO:"Sharing",MESSAGE_VIDEO:"Messages",CREATE_VIDEO:"Your videos"},at={HOME:"home",EXPLORING:"exploring",EXPERIENCING:"experiencing",LEARNING:"learning",COMPOSING:"composing",BRAINHIVE:"brainhive",REVIEW:"review",MESSAGES:"messages"},ot={HOME:"/home",EXPLORING:"/exploring",EXPERIENCING:"/experiencing",LEARNING:"/learning",COMPOSING:"/composing",BRAINHIVE:"/brainhive",REVIEW:"/review",MESSAGES:"/messages"},st={HOME:"SS_HOME",EXPLORING:"SS_EXPLORING",EXPERIENCING:"SS_EXPERIENCING",LEARNING:"SS_LEARNING",COMPOSING:"SS_COMPOSING",BRAINHIVE:"SS_SHARED",REVIEW:"SS_REVIEWING",MESSAGES:"SS_MESSAGE"},lt={exploring:"/exploring",experiencing:"/experiencing",learning:"/learning",BRAINHIVE:"/shared",composing:"",home:"/home",review:"/reviewing",messages:"/messages"},ct=ot.EXPLORING,ut=ot.BRAINHIVE,dt="/login",ht="/register",ft="/people",pt="/mobile-coming-soon",mt="/temp",gt={EXPLORING:{name:Object(f.b)("menu.explore"),icon:"mn-exploring",path:ot.EXPLORING},PEOPLE:{name:Object(f.b)("menu.people"),icon:"People",path:"/people"},BRAINHIVE:{name:Object(f.b)("menu.brainhive"),icon:"utilizing",path:ot.BRAINHIVE},COMPOSING:{name:Object(f.b)("menu.composing"),icon:"new-composing",isInternal:!0,path:ot.COMPOSING},REVIEW:{name:Object(f.b)("menu.review"),icon:"in-review",isInternal:!0,path:ot.REVIEW,requiredRole:tt.REVIEWERS}},vt=100,bt=1500,yt=500,At={PENDING:"PENDING",PROCESSING:"PROCESSING",REJECTED:"REJECTED",APPROVED:"APPROVED",CANCELED:"CANCELED",PUBLISHING:"PUBLISHING"},_t={UPLOADING:"Uploading",PROCESSING:"Processing",FAILED:"Failed",DONE:"Done"},wt={FILES:"FILES",FOLDER:"FOLDER"},Et={COGNITIVE:"COGNITIVE",UPDATING_COGNITIVE:"UPDATING_COGNITIVE",GALLERY:"GALLERY",LECTURE:"LECTURE",TYPE_A:"TYPE_A",TYPE_B:"TYPE_B"},St={CHAPTER_ITEM:"CHAPTER_ITEM",CCV_ITEM:"CCV_ITEM",ATTACHMENT_ITEM:"ATTACHMENT_ITEM",PRODUCT_ITEM:"PRODUCT_ITEM",FILE_ITEM:"FILE_ITEM"},Ct={CANCELED:"CANCELED",FAILED:"FAILED",RUNNING:"RUNNING",COMPLETED:"COMPLETED"},Tt="ATTACHED_SUCCESSFULLY",kt=5,xt={UNAUTHENTICATED:"UNAUTHENTICATED",AUTHENTICATED:"AUTHENTICATED"},Ot=["Male","Female","Other"],It={TEACHER:"TEACHER",LEARNER:"LEARNER",PARENT:"PARENT"},Mt=[{value:It.LEARNER,name:"Learner"},{value:It.TEACHER,name:"Teacher"},{value:It.PARENT,name:"Parent"}],Pt="UNDEFINED",Dt={UNDEFINED:"UNDEFINED",BASIC:"BASIC",ADVANCED:"ADVANCED",MASTER:"MASTER"},Nt=[{value:"UNDEFINED",name:" "},{value:"BASIC",name:"Basic"},{value:"ADVANCED",name:"Advanced"},{value:"MASTER",name:"Master"}],Lt="MATH",Rt="UNDEFINED",Bt=[{value:"UNDEFINED",name:" "},{value:"MATH",name:"Mathematics"},{value:"SCIENCE",name:"Science"},{value:"ENGLISH",name:"English"},{value:"COMPUTER",name:"Computer"},{value:"HISTORY",name:"History"},{value:"SPORT",name:"Sport"},{value:"MUSIC",name:"Music"}],jt={VIDEO_KEYWORD:"VIDEO_KEYWORD"},Ft=2,Ut={CHAPTER:"CHAPTER",VIDEO:"VIDEO",ATTACHMENT:"ATTACHMENT",SB:"SB"},Ht={CONTEXTUAL:"CIS_CONTEXTUAL",ATTACHMENT:"CIS_ATTACHMENT"},zt="play-button",Vt="chapter-play-button",Wt="sb-wrapper",Gt="add-new-chapter",qt={BEFORE:"BEFORE",AFTER:"AFTER",LEFT:"LEFT",RIGHT:"RIGHT",REPLACE:"REPLACE"},Yt={USD:{value:"USD",symbol:"$",symbolPosition:qt.LEFT,step:1,decimalSeparator:".",groupSeparator:",",localeCode:"en-US",minimumFractionDigits:2,maximumFractionDigits:2}},Kt={FREE:"AGT_FREE",PAID:"AGT_PAID",UNDEFINED:"AGT_UNDEFINED"},Xt=(r={},u()(r,Kt.FREE,Object(f.b)("accessType.free")),u()(r,Kt.PAID,Object(f.b)("accessType.subscribe")),u()(r,Kt.UNDEFINED,Object(f.b)("btn.setPrice")),r),Qt=(i={},u()(i,Kt.FREE,"FREE"),u()(i,Kt.PAID,"WITH_PRICE"),u()(i,Kt.UNDEFINED,"NONE"),i),$t={EMPTY_VIDEO:"EMPTY_VIDEO",EMPTY_GALLERY:"EMPTY_GALLERY",EMPTY_LEARNING_LIST:"EMPTY_LEARNING_LIST",EMPTY_COMPOSING_LIST:"EMPTY_COMPOSING_LIST",PROCESSING_GALLERY:"PROCESSING_GALLERY",PROCESSING_COGVID:"PROCESSING_COGVID",LOADING_VIDEO:"LOADING_VIDEO",EMPTY_BRAIN_HIVE:"EMPTY_BRAIN_HIVE",EMPTY_SEARCH_LIST:"EMPTY_SEARCH_LIST",LOADING_VIDEOS:"LOADING_VIDEOS",LOCK_CONTENT:"LOCK_CONTENT"},Jt=[10,11,12,13,14,15,16,17,18,19,20,21,22,24,32,48],Zt=[1,2,3,4,5,6,7,8],en=[40,41,42,43,44,45,46,47,48,49],tn=["fuvi-stroke-styleG","fuvi-stroke-styleB","fuvi-stroke-styleC","fuvi-stroke-styleD"],nn=["Roboto","Arial","Droid Sans","Droid Serif"],rn={TEMPLATE:"template",VIDEO:"video",MEETING:"meeting"},an={WIDTH:"1920",HEIGHT:"1080"},on={WIDTH:"1920",HEIGHT:"1080"},sn=10,ln={COUNTRY:{US:"US",VN:"VN",OTHERS:"OTHERS"},OPTION:{STRIPE:"STRIPE",PAYPAL:"PAYPAL",MOMO:"MOMO",ZALO_PAY:"ZALO_PAY"}},cn={KEY:{POPUP:"popup",ORDER_ID:"orderId",ORDER_TOTAL:"total",ORDER_TYPE:"orderType",USER_ID:"userId",TAB:"tab",SORT:"sort",VIDEO_ID:"v",CHAPTER_ID:"c",ATTACHMENT_ID:"a",CHAPTER_ATTACHMENT_ID:"ca",ATTACHMENT_PAGE_INDEX:"p",TIMESTAMP:"t",BLOCK_OFFSET:"o",SEARCH_TERM:"search_term",STOP_AUTOPLAY:"sa",COURSE_ID:"courseId",UID:"uid",FILTER:"filter",WITH_COURSE:"wc",EXPANDED:"expanded",OPEN_RESOURCE:"or",SUBSCRIBER_ID:"kbSubscriberId",PLAN_NAME:"kbPlanName",SESSION_ID:"sessionId",ACTION:"act",DEFAULT_PAYMENT_METHOD:"defaultPaymentMethod",EMAIL:"em",ACTIVATION_CODE:"activationCode",RESOURCE_ID:"res",RESOURCE_SUBTYPE:"resST"},VALUE:{PAYMENT_SUCCESS:"payment_success",PAYMENT_CANCEL:"payment_cancel",SUBSCRIBE_SUCCESS:"subscribe_success",SUBSCRIBE_CANCEL:"subscribe_cancel",ADD_PAYMENT_METHOD_SUCCESS:"add_payment_method_success",ADD_PAYMENT_METHOD_CANCEL:"add_payment_method_cancel",ACTION:{OPEN_RESOURCE:"or",OPEN_FINANCE_ACCOUNTS:"ofa",OPEN_LOGIN_FORM:"olf",OPEN_REGISTER_FORM:"reg",OPEN_ACTIVATION_FORM:"oaf"}}},un=["US","VN"],dn={TAB:{PEOPLE:"people",FRIENDS:"friends",GROUPS:"groups",REQUEST:"request"},STATUS:{UNKNOWN:"UNKNOWN",FRIEND:"FRIEND",REQUESTER_PENDING:"REQUESTER_PENDING",RECEIVER_PENDING:"RECEIVER_PENDING"},ACTION_TYPE:{SEND_FRIEND_REQUEST:"SEND_FRIEND_REQUEST",UNFRIEND:"UNFRIEND",CONFIRM_FRIEND_REQUEST:"CONFIRM_FRIEND_REQUEST",DECLINE_FRIEND_REQUEST:"DECLINE_FRIEND_REQUEST",CANCEL_FRIEND_REQUEST:"CANCEL_FRIEND_REQUEST",DELETE_ITEM:"DELETE_ITEM"}},hn=[{label:Object(f.b)("btn.allUsers"),tab:dn.TAB.PEOPLE,path:ft,icon:"fv fuvi-public-global"},{label:Object(f.b)("btn.friends"),tab:dn.TAB.FRIENDS,path:"".concat(ft,"?tab=").concat(dn.TAB.FRIENDS),icon:"fv fuvi-friend-group u-fs-1x1o4"},{label:Object(f.b)("btn.groups"),tab:dn.TAB.GROUPS,path:"".concat(ft,"?tab=").concat(dn.TAB.GROUPS),icon:"fv fuvi-group-icon u-fs-1x1o4"},{label:Object(f.b)("btn.request"),tab:dn.TAB.REQUEST,path:"".concat(ft,"?tab=").concat(dn.TAB.REQUEST),icon:"fv fuvi-request-user u-fs-1x1o4"}],fn=(a={},u()(a,dn.STATUS.UNKNOWN,[{label:Object(f.b)("btn.addFriend"),type:dn.ACTION_TYPE.SEND_FRIEND_REQUEST}]),u()(a,dn.STATUS.FRIEND,[{label:Object(f.b)("btn.unfriend"),type:dn.ACTION_TYPE.UNFRIEND}]),u()(a,dn.STATUS.RECEIVER_PENDING,[{label:Object(f.b)("btn.cancelFriendRequest"),type:dn.ACTION_TYPE.CANCEL_FRIEND_REQUEST}]),u()(a,dn.STATUS.REQUESTER_PENDING,[{label:Object(f.b)("btn.confirm"),type:dn.ACTION_TYPE.CONFIRM_FRIEND_REQUEST},{label:Object(f.b)("btn.decline"),type:dn.ACTION_TYPE.DECLINE_FRIEND_REQUEST}]),a),pn="View",mn="View Only",gn=5,vn={friends:"friends",group:"groups",changeOwnerShip:"changeOwnerShip"},bn={maxNumberOfSharesPerVideo:10},yn={TYPE:{FRIENDSHIP__FRIEND_REQUEST__SENT:"FRIENDSHIP__FRIEND_REQUEST__SENT",FRIENDSHIP__FRIEND_REQUEST__ACCEPTED:"FRIENDSHIP__FRIEND_REQUEST__ACCEPTED",COMPOSING__COGNITIVE_VIDEO__SHARED:"COMPOSING__COGNITIVE_VIDEO__SHARED",COMPOSING__PUBLISHING_VIDEO__SUCCEEDED:"COMPOSING__PUBLISHING_VIDEO__SUCCEEDED",COMPOSING__PUBLISHING_VIDEO__FAILED:"COMPOSING__PUBLISHING_VIDEO__FAILED",PUBLISHING__REVIEW__APPROVED:"PUBLISHING__REVIEW__APPROVED",PUBLISHING__REVIEW__REJECTED:"PUBLISHING__REVIEW__REJECTED",PUBLISHING__REVIEW__CANCELED:"PUBLISHING__REVIEW__CANCELED",COMPOSING__CHAPTER__SHARED:"COMPOSING__CHAPTER__SHARED",COMPOSING__CHAPTER_ATTACHMENT__ADDED:"COMPOSING__CHAPTER_ATTACHMENT__ADDED",COMPREHENSION_GUIDES__COMMENT__POSTED:"COMPREHENSION_GUIDES__COMMENT__POSTED",COMPOSING__VIDEO_TRANSCODING__COMPLETED:"COMPOSING__VIDEO_TRANSCODING__COMPLETED",COMPOSING__VIDEO_TRANSCODING__FAILED:"COMPOSING__VIDEO_TRANSCODING__FAILED",COMPOSING__SHARE_VIDEO_TRANSCODING__COMPLETED:"COMPOSING__SHARE_VIDEO_TRANSCODING__COMPLETED",COMPOSING__VIDEO_TRANSCRIPTION__COMPLETED:"COMPOSING__VIDEO_TRANSCRIPTION__COMPLETED",COMPOSING__VIDEO_TRANSCRIPTION__FAILED:"COMPOSING__VIDEO_TRANSCRIPTION__FAILED",COMPOSING__VIDEO_OWNERSHIP__CHANGED:"COMPOSING__VIDEO_OWNERSHIP__CHANGED",COMPOSING__VIDEO_OWNERSHIP__FAILED:"COMPOSING__VIDEO_OWNERSHIP__FAILED",COMPOSING__LIVE_CHAPTER__REMINDING:"COMPOSING__LIVE_CHAPTER__REMINDING",COMPOSING__LIVE_CHAPTER__CREATED:"COMPOSING__LIVE_CHAPTER__CREATED",COMPOSING__VIDEO_OWNERSHIP__RECEIVED:"COMPOSING__VIDEO_OWNERSHIP__RECEIVED",COMPOSING__LIVE_CHAPTER__STATUS_CHANGED:"COMPOSING__LIVE_CHAPTER__STATUS_CHANGED",COMPOSING__INTERNAL_VIDEO__CLONED_FULLY:"COMPOSING__INTERNAL_VIDEO__CLONED_FULLY",COMPOSING__LINKING_PRODUCT_WITH_VIDEO__SENT:"COMPOSING__LINKING_PRODUCT_WITH_VIDEO__SENT",COMPOSING__LINKING_PRODUCT_WITH_VIDEO__APPROVED:"COMPOSING__LINKING_PRODUCT_WITH_VIDEO__APPROVED",COMPOSING__LINKING_PRODUCT_WITH_VIDEO__REJECTED:"COMPOSING__LINKING_PRODUCT_WITH_VIDEO__REJECTED",FRIENDSHIP__FRIEND_REQUEST__CONFIRMED:"FRIENDSHIP__FRIEND_REQUEST__CONFIRMED"},STATUS:{NEW:"NEW",READ:"READ",UNREAD:"UNREAD"},ACTION_TYPE:{ITEM_CLICK:"ITEM_CLICK",DELETE:"DELETE",TOGGLE_STATUS:"TOGGLE_STATUS",CONFIRM_FRIEND_REQUEST:"CONFIRM_FRIEND_REQUEST",DECLINE_FRIEND_REQUEST:"DECLINE_FRIEND_REQUEST"}},An=u()({},yn.TYPE.FRIENDSHIP__FRIEND_REQUEST__SENT,[{label:Object(f.b)("btn.confirm"),type:yn.ACTION_TYPE.CONFIRM_FRIEND_REQUEST,variant:"primary"},{label:Object(f.b)("btn.decline"),type:yn.ACTION_TYPE.DECLINE_FRIEND_REQUEST}]),_n={MOST_RECENT:"most_recent",MOST_VIEW:"most_view",MOST_RELEVANT:"most_relevant"},wn=_n.MOST_RELEVANT,En=(o={},u()(o,_n.MOST_RECENT,"publishedDate,DESC"),u()(o,_n.MOST_VIEW,"views,DESC"),u()(o,_n.MOST_RELEVANT,""),o),Sn=(s={},u()(s,_n.MOST_RECENT,{field:"recent",order:"DESC"}),u()(s,_n.MOST_VIEW,{field:"view",order:"DESC"}),u()(s,_n.MOST_RELEVANT,{field:"relevant",order:"DESC"}),s),Cn={HOME:"HOME_VIDEO",CREATE_VIDEO:"CREATE_VIDEO",COMPOSING:"CREATE_VIDEO",BRAINHIVE:"BRAINHIVE_VIDEO",MESSAGES:"MESSAGE_VIDEO"},Tn={CAPTURED_IMAGE:"CAPTURED_IMAGE",UPLOAD_IMAGE:"UPLOAD_IMAGE",CURRENT_COVER:"CURRENT_COVER"},kn={CHAPTER:"CHAPTER",HIGHLIGHT:"HIGHLIGHT"},xn={l1:{label:Object(f.b)("testPreparation"),color:"#A9A9A9"},l2:{label:Object(f.b)("realWorldContext"),color:"#8CC641"},l3:{label:Object(f.b)("realLifeApplication"),color:"#009148"}},On="1",In=99,Mn=2,Pn=20,Dn={PENDING:"PENDING",CANCELED:"CANCELED",PAID:"PAID",COMPLETED:"COMPLETED"},Nn="video/mp4,video/x-m4v,video/*,.webm,application/pdf",Ln="image/jpeg,image/jpg,image/jpeg,image/png,image/tif,image/bmp,image/heic",Rn="https://www.fuvi.us/wp-content/uploads/2018/02/Fuvi-Terms-of-Use.pdf",Bn="https://www.fuvi.us/wp-content/uploads/2018/02/Fuvi-Privacy-Policy.pdf",jn="#86c9cf",Fn=[{selector:'[data-tut="fuvi-welcome"]',content:Object(f.b)("tourMsg.welcomeMsg")},{selector:'[data-tut="fuvi-filter"]',content:Object(f.b)("tourMsg.filterMsg")},{selector:'[data-tut="fuvi-search"]',content:Object(f.b)("tourMsg.searchMsg")},{selector:'[data-tut="fuvi-sc"]',content:Object(f.b)("tourMsg.scMsg")},{selector:'[data-tut="fuvi-center"]',content:Object(f.b)("tourMsg.centerMsg")}],Un={ALL:"all",SENT:"sent",RECEIVED:"received",CREATED:"created",PURCHASED:"purchased"},Hn=Un.ALL,zn=Un.CREATED,Vn=(l={},u()(l,Un.ALL,"SSF_NONE"),u()(l,Un.SENT,"SSF_SHARING_SENT"),u()(l,Un.RECEIVED,"SSF_SHARING_RECEIVED"),u()(l,Un.CREATED,"SSF_CREATED"),u()(l,Un.PURCHASED,"SSF_PURCHASED"),l),Wn={GLOBAL:"GLOBAL",VN:"VIETNAM",US:"US"},Gn={MESSAGE_VIDEO:"MESSAGE_VIDEO",BRAINHIVE_VIDEO:"BRAINHIVE_VIDEO"},qn={MESSAGE_VIDEO:"MESSAGE_VIDEO",BRAINHIVE_VIDEO:"BRAINHIVE_VIDEO"},Yn={KEY:{NEW_SESSION:"new_session"}},Kn={ALL:4160,WAIT_AFTER_LOAD_SUCCESS:1e3,SCROLL_TO_TOP:1200,WAIT_AFTER_SCROLL:160,MENU_TOGGLE:800,PLAY_BUTTON_PULSE:1e3},Xn={LAST_7_DAYS:"LAST_7_DAYS",LAST_30_DAYS:"LAST_30_DAYS",PAST_3_MONTHS:"PAST_3_MONTHS",DAYS:"DAYS",MONTHS:"MONTHS",YEARS:"YEARS"},Qn={DAILY:"DAILY",WEEKLY:"WEEKLY",MONTHLY:"MONTHLY",YEARLY:"YEARLY"},$n=.8,Jn=[2,1.5,1,.5],Zn=1,er="daily--",tr="YYYY-MM-DD",nr="2021-01-01",rr=30,ir=[{content:"MORNING",description:"",textAttributes:{background:"#FFF2CC"}},{content:"AFTERNOON",description:"",textAttributes:{background:"#F8E0D4"}},{content:"EVENING",description:"",textAttributes:{background:"#B4C6E7"}},{content:"NIGHT",description:"",textAttributes:{background:"#86C9CF"}}],ar=24,or=[{value:"15",name:"15 ".concat(Object(f.b)("minutes"))},{value:"30",name:"30 ".concat(Object(f.b)("minutes"))}],sr=60,lr={SCHEDULED:"SCHEDULED",STARTED:"STARTED",STOPPED:"STOPPED",CLOSED:"CLOSED"},cr="/meeting",ur="FUVI_MEETING_SESSION",dr="FUVI_MEETING_MIC",hr="FUVI_MEETING_AUD",fr="FUVI_MEETING_VID",pr="FUVI_MEETING_INFO",mr="FUVI_MEETING_RECORD_ID",gr="Default course",vr={TYPES:{VIDEO:"video",EPISODIC:"video",ATTACHMENT_ONLY:"heading",LIVE_SESSION:"live"},ACTIONS:{PLAY:"PLAY",PAUSE:"PAUSE",SELECT:"SELECT",CLICK:"CLICK",SLIDE_CHANGE:"SLIDE_CHANGE"}},br="#terms-of-use",yr="#privacy-policy",Ar={NONE:"NONE",TRANSCRIBED:"TRANSCRIBED",TRANSCRIBING:"TRANSCRIBING",FAILED:"FAILED"},_r={SEMANTIC_TEXT:"SEMANTIC_TEXT",SEMANTIC_NOTE:"SEMANTIC_NOTE"},wr=[{label:Object(f.b)("transcript"),value:_r.SEMANTIC_TEXT},{label:Object(f.b)("notes"),value:_r.SEMANTIC_NOTE}],Er=[{name:Object(f.b)("menuCategory.createVideo"),value:Cn.CREATE_VIDEO},{name:Object(f.b)("menuCategory.brainHive"),value:Cn.BRAINHIVE}],Sr={AMAZON:"amz",TEACHER_PAY_TEACHER:"tpt"},Cr=[{name:"Teacher pay teacher",value:Sr.TEACHER_PAY_TEACHER},{name:"Amazon",value:Sr.AMAZON}],Tr="data:image;base64",kr={APPROVED_STATUS:{APPROVED:"APPROVED",PENDING:"PENDING",REJECTED:"REJECTED"}},xr={VIDEO:"VIDEO",RESOURCE:"RESOURCE",LIVECLASS:"LIVECLASS",SUBSCRIPTION:"SUBSCRIPTION"},Or="video-player-area-wrap",Ir="video-player-area",Mr="fv-video-player",Pr=300,Dr="chapter-slider-thumb",Nr=2e3,Lr="video-slider-thumb",Rr=!0,Br=20,jr=200,Fr="40103",Ur="sc-usage-tip",Hr="products-layer",zr="video-play-btn-area",Vr="video-back-btn",Wr="chapter-ci-wrapper",Gr="fullscreen-btn",qr=[{CODE:"MONDAY",SHORT:"Mon",LONG:"Monday"},{CODE:"TUESDAY",SHORT:"Tue",LONG:"Tuesday"},{CODE:"WEDNESDAY",SHORT:"Wed",LONG:"Wednesday"},{CODE:"THURSDAY",SHORT:"Thu",LONG:"Thursday"},{CODE:"FRIDAY",SHORT:"Fri",LONG:"Friday"},{CODE:"SATURDAY",SHORT:"Sat",LONG:"Saturday"},{CODE:"SUNDAY",SHORT:"Sun",LONG:"Sunday"}],Yr={PDF_PPT:{name:"PDF - PPT",value:"PDF_PPT"},LIVE_CLASS:{name:"Live Class",value:"LIVE_CLASS"},COMMUNITY:{name:"Community",value:"COMMUNITY"}},Kr={TEXTBOOK:"TEXTBOOK",SLIDE:"SLIDE",EXERCISE:"EXERCISE",NONE:"NONE"},Xr={PENDING:"Pending",NEED_ATTENTION:"Needs_Attention",APPROVED:"Approved",MESSAGING:"Messaging"},Qr={MESSAGE_SENT:"Message Sent",MESSAGE_RECEIVED:"New Message Received",FILTER:{Pending:"New Application",Needs_Attention:"Needs Attention",Approved:"Approved",Messaging:"Messaging"},MEMBER:{Pending:"Message sent",Needs_Attention:"New message received",Approved:"Approved"},OWNER:{Pending:"New Application",Needs_Attention:"Message sent",Approved:"Approved"}},$r={SUMMARY:"Summary",FOUNDATION:"Foundation",UNDERSTANDING:"Understanding",THUMBNAIL:"Thumbnail"},Jr={NONE:"NONE",VALID:"VALID",EXPIRED:"EXPIRED"},Zr={VIEW_VIDEOS:"V_VIDEOS",VIEW_SLIDES:"V_SLIDES",DOWNLOAD_SLIDES:"D_P_SLIDES",DOWNLOAD_WORKSHEETS:"D_P_WORKSHEETS",DOWNLOAD_GUIDES:"D_P_GUIDES",DOWNLOAD_SOLUTIONS:"D_P_SOLUTIONS",SLIDES:"D_P_SLIDES",WORKSHEETS:"D_P_WORKSHEETS",HWGUIDES:"D_P_GUIDES",SOLUTIONS:"D_P_SOLUTIONS"},ei=[{view:"V Only",download:"N/A",plan:0,offers:[Zr.VIEW_VIDEOS],benefits:["A Great Start"]},{view:"F, U, V, & I",download:"N/A",plan:1,offers:[Zr.VIEW_VIDEOS,Zr.VIEW_SLIDES],benefits:["Comprehension"]},{view:"F, U, V, & I",download:"Slides",plan:2,benefits:["Comprehension","Retention","5% discount for all items in the store"],offers:[Zr.VIEW_VIDEOS,Zr.VIEW_SLIDES,Zr.DOWNLOAD_SLIDES]},{view:"F, U, V, & I",download:"Slides\nWorksheets\nHW Guides\nHW Solutions",plan:3,benefits:["Comprehension","Retention","Mastery","10% discount for all items in the store"],offers:[Zr.VIEW_VIDEOS,Zr.VIEW_SLIDES,Zr.DOWNLOAD_SLIDES,Zr.DOWNLOAD_WORKSHEETS,Zr.DOWNLOAD_GUIDES,Zr.DOWNLOAD_SOLUTIONS]}]}.call(this,n(96))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(45),i=n(119),a=n(138),o=n(281);var s=n(143),l=n(280),c=n(116);var u=n(293),d=n(189),h=n(90),f=n(171),p=n(218),m=n(395),g=n(136);function v(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function b(e,t){return t===r.o?v(function(e){var t=Object(i.a)(e),n=Object(a.a)(e),r=t.visualViewport,s=n.clientWidth,l=n.clientHeight,c=0,u=0;return r&&(s=r.width,l=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(c=r.offsetLeft,u=r.offsetTop)),{width:s,height:l,x:c+Object(o.a)(e),y:u}}(e)):Object(h.b)(t)?function(e){var t=Object(f.a)(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}(t):v(function(e){var t,n=Object(a.a)(e),r=Object(l.a)(e),i=null==(t=e.ownerDocument)?void 0:t.body,u=Object(c.a)(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),d=Object(c.a)(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),h=-r.scrollLeft+Object(o.a)(e),f=-r.scrollTop;return"rtl"===Object(s.a)(i||n).direction&&(h+=Object(c.a)(n.clientWidth,i?i.clientWidth:0)-u),{width:u,height:d,x:h,y:f}}(Object(a.a)(e)))}function y(e,t,n){var r="clippingParents"===t?function(e){var t=Object(u.a)(Object(p.a)(e)),n=["absolute","fixed"].indexOf(Object(s.a)(e).position)>=0&&Object(h.b)(e)?Object(d.a)(e):e;return Object(h.a)(n)?t.filter((function(e){return Object(h.a)(e)&&Object(m.a)(e,n)&&"body"!==Object(g.a)(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],o=i.reduce((function(t,n){var r=b(e,n);return t.top=Object(c.a)(r.top,t.top),t.right=Object(c.b)(r.right,t.right),t.bottom=Object(c.b)(r.bottom,t.bottom),t.left=Object(c.a)(r.left,t.left),t}),b(e,a));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var A=n(396),_=n(392),w=n(394);function E(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,s=n.boundary,l=void 0===s?r.d:s,c=n.rootBoundary,u=void 0===c?r.o:c,d=n.elementContext,p=void 0===d?r.i:d,m=n.altBoundary,g=void 0!==m&&m,b=n.padding,E=void 0===b?0:b,S=Object(_.a)("number"!=typeof E?E:Object(w.a)(E,r.b)),C=p===r.i?r.j:r.i,T=e.rects.popper,k=e.elements[g?C:p],x=y(Object(h.a)(k)?k:k.contextElement||Object(a.a)(e.elements.popper),l,u),O=Object(f.a)(e.elements.reference),I=Object(A.a)({reference:O,element:T,strategy:"absolute",placement:o}),M=v(Object.assign({},T,I)),P=p===r.i?M:O,D={top:x.top-P.top+S.top,bottom:P.bottom-x.bottom+S.bottom,left:x.left-P.left+S.left,right:P.right-x.right+S.right},N=e.modifiersData.offset;if(p===r.i&&N){var L=N[o];Object.keys(D).forEach((function(e){var t=[r.k,r.c].indexOf(e)>=0?1:-1,n=[r.m,r.c].indexOf(e)>=0?"y":"x";D[e]+=L[n]*t}))}return D}},function(e,t,n){"use strict";function r(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect();return{width:n.width/1,height:n.height/1,top:n.top/1,right:n.right/1,bottom:n.bottom/1,left:n.left/1,x:n.left/1,y:n.top/1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return e.split("-")[1]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5),i={displayComments:function(e){return{type:r.d.DISPLAY_COMMENTS,data:e}},displayNotes:function(e){return{type:r.d.DISPLAY_NOTES,data:e}},displayPreviewComments:function(e){return{type:r.d.DISPLAY_PREVIEW_COMMENTS,data:e}},displayPreviewNotes:function(e){return{type:r.d.DISPLAY_PREVIEW_NOTES,data:e}},getChapterComments:function(e,t,n){return{type:r.d.GET_CHAPTER_COMMENTS,data:e,resolve:t,reject:n}},addChapterComment:function(e,t,n){return{type:r.d.ADD_CHAPTER_COMMENT,data:e,resolve:t,reject:n}},updateChapterComment:function(e,t,n){return{type:r.d.UPDATE_CHAPTER_COMMENT,data:e,resolve:t,reject:n}},deleteChapterComment:function(e,t,n){return{type:r.d.DELETE_CHAPTER_COMMENT,data:e,resolve:t,reject:n}},getChapterNotes:function(e,t,n){return{type:r.d.GET_CHAPTER_NOTES,data:e,resolve:t,reject:n}},addChapterNote:function(e,t,n){return{type:r.d.ADD_CHAPTER_NOTE,data:e,resolve:t,reject:n}},updateChapterNote:function(e,t,n){return{type:r.d.UPDATE_CHAPTER_NOTE,data:e,resolve:t,reject:n}},deleteChapterNote:function(e,t,n){return{type:r.d.DELETE_CHAPTER_NOTE,data:e,resolve:t,reject:n}},getChapterLike:function(e,t,n){return{type:r.d.GET_CHAPTER_LIKES,data:e,resolve:t,reject:n}},ratingProduct:function(e,t,n){return{type:r.d.RATING_PRODUCT,data:e,resolve:t,reject:n}},getProductRatings:function(e,t,n){return{type:r.d.GET_PRODUCT_RATINGS,data:e,resolve:t,reject:n}},getProductMyRating:function(e,t,n){return{type:r.d.GET_PRODUCT_MY_RATING,data:e,resolve:t,reject:n}},getProductSummaryRating:function(e,t,n){return{type:r.d.GET_PRODUCT_SUMMARY_RATING,data:e,resolve:t,reject:n}},updateRating:function(e,t,n){return{type:r.d.UPDATE_RATING,data:e,resolve:t,reject:n}},deleteRating:function(e,t,n){return{type:r.d.DELETE_RATING,data:e,resolve:t,reject:n}},likeProduct:function(e,t,n){return{type:r.d.LIKE_PRODUCT,data:e,resolve:t,reject:n}},displayChapterCoverImage:function(e){return{type:r.d.DISPLAY_CHAPTER_COVER_IMAGE,data:e}},displaySlide:function(e){return{type:r.d.DISPLAY_SLIDE,data:e}},displayChapterImageSlider:function(e){return{type:r.d.DISPLAY_CHAPTER_IMAGE_SLIDER,data:e}},updateChapterImageSlider:function(e){return{type:r.d.UPDATE_CHAPTER_IMAGE_SLIDER,data:e}},displaySlideType:function(e){return{type:r.d.DISPLAY_SLIDE_TYPE,data:e}},updateSlidesExistance:function(e){return{type:r.d.FU_SLIDES_EXISTANCE,data:e}},displayToc:function(e){return{type:r.d.DISPLAY_TOC,data:e}},displayLock:function(e){return{type:r.d.DISPLAY_LOCK,data:e}},displayChapterFileUploadModal:function(e){return{type:r.d.DISPLAY_CHAPTER_FILE_UPLOAD_MODAL,data:e}},displayChapterFileDeleteModal:function(e){return{type:r.d.DISPLAY_CHAPTER_FILE_DELETE_MODAL,data:e}},displayChapterFileManagerModal:function(e){return{type:r.d.DISPLAY_CHAPTER_FILE_MANAGER_MODAL,data:e}},updateFreeFUIFlag:function(e){return{type:r.d.FREE_FUI_FLAG_UPDATE,data:e}}}},function(e,t,n){"use strict";var r,i=n(33),a=n(41),o=n(42),s=n.n(o),l=n(0),c=n.n(l),u=n(196),d=n(404),h=n(403),f=["className","children"],p=((r={})[u.b]="show",r[u.a]="show",r),m=c.a.forwardRef((function(e,t){var n=e.className,r=e.children,o=Object(a.a)(e,f),m=Object(l.useCallback)((function(e){Object(h.a)(e),o.onEnter&&o.onEnter(e)}),[o]);return c.a.createElement(u.e,Object(i.a)({ref:t,addEndListener:d.a},o,{onEnter:m}),(function(e,t){return c.a.cloneElement(r,Object(i.a)({},t,{className:s()("fade",n,r.props.className,p[e])}))}))}));m.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},m.displayName="Fade",t.a=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50),i=n(38),a=n(30);function o(e,t){Object(a.a)(1,arguments);var n=t||{},o=n.locale,s=o&&o.options&&o.options.weekStartsOn,l=null==s?0:Object(r.a)(s),c=null==n.weekStartsOn?l:Object(r.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(i.default)(e),d=u.getUTCDay(),h=(d<c?7:0)+d-c;return u.setUTCDate(u.getUTCDate()-h),u.setUTCHours(0,0,0,0),u}},function(e,t,n){"use strict";var r=n(405);function i(e,t){return function(e){var t=Object(r.a)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var a=/([A-Z])/g;var o=/^ms-/;function s(e){return function(e){return e.replace(a,"-$1").toLowerCase()}(e).replace(o,"-ms-")}var l=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;t.a=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(s(t))||i(e).getPropertyValue(s(t));Object.keys(t).forEach((function(i){var a=t[i];a||0===a?!function(e){return!(!e||!l.test(e))}(i)?n+=s(i)+": "+a+";":r+=i+"("+a+") ":e.style.removeProperty(s(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}},function(e,t,n){(function(e){
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C=C||{version:"4.2.0"};if(t.fabric=C,"undefined"!=typeof document&&"undefined"!=typeof window)document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?C.document=document:C.document=document.implementation.createHTMLDocument(""),C.window=window;else{var T=new(n(1218).JSDOM)(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;C.document=T.document,C.jsdomImplForWrapper=n(1219).implForWrapper,C.nodeCanvas=n(1220).Canvas,C.window=T,DOMParser=C.window.DOMParser}function k(e,t){var n=e.canvas,r=t.targetCanvas,i=r.getContext("2d");i.translate(0,r.height),i.scale(1,-1);var a=n.height-r.height;i.drawImage(n,0,a,r.width,r.height,0,0,r.width,r.height)}function x(e,t){var n=t.targetCanvas.getContext("2d"),r=t.destinationWidth,i=t.destinationHeight,a=r*i*4,o=new Uint8Array(this.imageBuffer,0,a),s=new Uint8ClampedArray(this.imageBuffer,0,a);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,o);var l=new ImageData(s,r,i);n.putImageData(l,0,0)}C.isTouchSupported="ontouchstart"in C.window||"ontouchstart"in C.document||C.window&&C.window.navigator&&C.window.navigator.maxTouchPoints>0,C.isLikelyNode=void 0!==e&&"undefined"==typeof window,C.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"],C.DPI=96,C.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",C.commaWsp="(?:\\s+,?\\s*|,\\s*)",C.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,C.reNonWord=/[ \n\.,;!\?\-]/,C.fontPaths={},C.iMatrix=[1,0,0,1,0,0],C.svgNS="http://www.w3.org/2000/svg",C.perfLimitSizeTotal=2097152,C.maxCacheSideLimit=4096,C.minCacheSideLimit=256,C.charWidthsCache={},C.textureSize=2048,C.disableStyleCopyPaste=!1,C.enableGLFiltering=!0,C.devicePixelRatio=C.window.devicePixelRatio||C.window.webkitDevicePixelRatio||C.window.mozDevicePixelRatio||1,C.browserShadowBlurConstant=1,C.arcToSegmentsCache={},C.boundsOfCurveCache={},C.cachesBoundsOfCurve=!0,C.forceGLPutImageData=!1,C.initFilterBackend=function(){return C.enableGLFiltering&&C.isWebglSupported&&C.isWebglSupported(C.textureSize)?(console.log("max texture size: "+C.maxTextureSize),new C.WebglFilterBackend({tileSize:C.textureSize})):C.Canvas2dFilterBackend?new C.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=C),function(){function e(e,t){if(this.__eventListeners[e]){var n=this.__eventListeners[e];t?n[n.indexOf(t)]=!1:C.util.array.fill(n,!1)}}C.Observable={fire:function(e,t){if(!this.__eventListeners)return this;var n=this.__eventListeners[e];if(!n)return this;for(var r=0,i=n.length;r<i;r++)n[r]&&n[r].call(this,t||{});return this.__eventListeners[e]=n.filter((function(e){return!1!==e})),this},on:function(e,t){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var n in e)this.on(n,e[n]);else this.__eventListeners[e]||(this.__eventListeners[e]=[]),this.__eventListeners[e].push(t);return this},off:function(t,n){if(!this.__eventListeners)return this;if(0===arguments.length)for(t in this.__eventListeners)e.call(this,t);else if(1===arguments.length&&"object"==typeof arguments[0])for(var r in t)e.call(this,r,t[r]);else e.call(this,t,n);return this}}}(),C.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var e=0,t=arguments.length;e<t;e++)this._onObjectAdded(arguments[e]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(e,t,n){var r=this._objects;return n?r[t]=e:r.splice(t,0,e),this._onObjectAdded&&this._onObjectAdded(e),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var e,t=this._objects,n=!1,r=0,i=arguments.length;r<i;r++)-1!==(e=t.indexOf(arguments[r]))&&(n=!0,t.splice(e,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[r]));return this.renderOnAddRemove&&n&&this.requestRenderAll(),this},forEachObject:function(e,t){for(var n=this.getObjects(),r=0,i=n.length;r<i;r++)e.call(t,n[r],r,n);return this},getObjects:function(e){return void 0===e?this._objects.concat():this._objects.filter((function(t){return t.type===e}))},item:function(e){return this._objects[e]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(e){return this._objects.indexOf(e)>-1},complexity:function(){return this._objects.reduce((function(e,t){return e+=t.complexity?t.complexity():0}),0)}},C.CommonMethods={_setOptions:function(e){for(var t in e)this.set(t,e[t])},_initGradient:function(e,t){!e||!e.colorStops||e instanceof C.Gradient||this.set(t,new C.Gradient(e))},_initPattern:function(e,t,n){!e||!e.source||e instanceof C.Pattern?n&&n():this.set(t,new C.Pattern(e,n))},_setObject:function(e){for(var t in e)this._set(t,e[t])},set:function(e,t){return"object"==typeof e?this._setObject(e):this._set(e,t),this},_set:function(e,t){this[e]=t},toggle:function(e){var t=this.get(e);return"boolean"==typeof t&&this.set(e,!t),this},get:function(e){return this[e]}},r=t,i=Math.sqrt,a=Math.atan2,o=Math.pow,s=Math.PI/180,l=Math.PI/2,C.util={cos:function(e){if(0===e)return 1;switch(e<0&&(e=-e),e/l){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(0===e)return 0;var t=1;switch(e<0&&(t=-1),e/l){case 1:return t;case 2:return 0;case 3:return-t}return Math.sin(e)},removeFromArray:function(e,t){var n=e.indexOf(t);return-1!==n&&e.splice(n,1),e},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},degreesToRadians:function(e){return e*s},radiansToDegrees:function(e){return e/s},rotatePoint:function(e,t,n){e.subtractEquals(t);var r=C.util.rotateVector(e,n);return new C.Point(r.x,r.y).addEquals(t)},rotateVector:function(e,t){var n=C.util.sin(t),r=C.util.cos(t);return{x:e.x*r-e.y*n,y:e.x*n+e.y*r}},transformPoint:function(e,t,n){return n?new C.Point(t[0]*e.x+t[2]*e.y,t[1]*e.x+t[3]*e.y):new C.Point(t[0]*e.x+t[2]*e.y+t[4],t[1]*e.x+t[3]*e.y+t[5])},makeBoundingBoxFromPoints:function(e,t){if(t)for(var n=0;n<e.length;n++)e[n]=C.util.transformPoint(e[n],t);var r=[e[0].x,e[1].x,e[2].x,e[3].x],i=C.util.array.min(r),a=C.util.array.max(r)-i,o=[e[0].y,e[1].y,e[2].y,e[3].y],s=C.util.array.min(o);return{left:i,top:s,width:a,height:C.util.array.max(o)-s}},invertTransform:function(e){var t=1/(e[0]*e[3]-e[1]*e[2]),n=[t*e[3],-t*e[1],-t*e[2],t*e[0]],r=C.util.transformPoint({x:e[4],y:e[5]},n,!0);return n[4]=-r.x,n[5]=-r.y,n},toFixed:function(e,t){return parseFloat(Number(e).toFixed(t))},parseUnit:function(e,t){var n=/\D{0,2}$/.exec(e),r=parseFloat(e);switch(t||(t=C.Text.DEFAULT_SVG_FONT_SIZE),n[0]){case"mm":return r*C.DPI/25.4;case"cm":return r*C.DPI/2.54;case"in":return r*C.DPI;case"pt":return r*C.DPI/72;case"pc":return r*C.DPI/72*12;case"em":return r*t;default:return r}},falseFunction:function(){return!1},getKlass:function(e,t){return e=C.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),C.util.resolveNamespace(t)[e]},getSvgAttributes:function(e){var t=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":t=t.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":t=t.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":t=t.concat(["offset","stop-color","stop-opacity"])}return t},resolveNamespace:function(e){if(!e)return C;var t,n=e.split("."),i=n.length,a=r||C.window;for(t=0;t<i;++t)a=a[n[t]];return a},loadImage:function(e,t,n,r){if(e){var i=C.util.createImage(),a=function(){t&&t.call(n,i,!1),i=i.onload=i.onerror=null};i.onload=a,i.onerror=function(){C.log("Error loading "+i.src),t&&t.call(n,null,!0),i=i.onload=i.onerror=null},0!==e.indexOf("data")&&null!=r&&(i.crossOrigin=r),"data:image/svg"===e.substring(0,14)&&(i.onload=null,C.util.loadImageInDom(i,a)),i.src=e}else t&&t.call(n,e)},loadImageInDom:function(e,t){var n=C.document.createElement("div");n.style.width=n.style.height="1px",n.style.left=n.style.top="-100%",n.style.position="absolute",n.appendChild(e),C.document.querySelector("body").appendChild(n),e.onload=function(){t(),n.parentNode.removeChild(n),n=null}},enlivenObjects:function(e,t,n,r){var i=[],a=0,o=(e=e||[]).length;function s(){++a===o&&t&&t(i.filter((function(e){return e})))}o?e.forEach((function(e,t){e&&e.type?C.util.getKlass(e.type,n).fromObject(e,(function(n,a){a||(i[t]=n),r&&r(e,n,a),s()})):s()})):t&&t(i)},enlivenPatterns:function(e,t){function n(){++i===a&&t&&t(r)}var r=[],i=0,a=(e=e||[]).length;a?e.forEach((function(e,t){e&&e.source?new C.Pattern(e,(function(e){r[t]=e,n()})):(r[t]=e,n())})):t&&t(r)},groupSVGElements:function(e,t,n){var r;return e&&1===e.length?e[0]:(t&&(t.width&&t.height?t.centerPoint={x:t.width/2,y:t.height/2}:(delete t.width,delete t.height)),r=new C.Group(e,t),void 0!==n&&(r.sourcePath=n),r)},populateWithProperties:function(e,t,n){if(n&&"[object Array]"===Object.prototype.toString.call(n))for(var r=0,i=n.length;r<i;r++)n[r]in e&&(t[n[r]]=e[n[r]])},drawDashedLine:function(e,t,n,r,o,s){var l=r-t,c=o-n,u=i(l*l+c*c),d=a(c,l),h=s.length,f=0,p=!0;for(e.save(),e.translate(t,n),e.moveTo(0,0),e.rotate(d),t=0;u>t;)(t+=s[f++%h])>u&&(t=u),e[p?"lineTo":"moveTo"](t,0),p=!p;e.restore()},createCanvasElement:function(){return C.document.createElement("canvas")},copyCanvasElement:function(e){var t=C.util.createCanvasElement();return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},toDataURL:function(e,t,n){return e.toDataURL("image/"+t,n)},createImage:function(){return C.document.createElement("img")},multiplyTransformMatrices:function(e,t,n){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],n?0:e[0]*t[4]+e[2]*t[5]+e[4],n?0:e[1]*t[4]+e[3]*t[5]+e[5]]},qrDecompose:function(e){var t=a(e[1],e[0]),n=o(e[0],2)+o(e[1],2),r=i(n),l=(e[0]*e[3]-e[2]*e[1])/r,c=a(e[0]*e[2]+e[1]*e[3],n);return{angle:t/s,scaleX:r,scaleY:l,skewX:c/s,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return C.iMatrix.concat();var t=C.util.degreesToRadians(e.angle),n=C.util.cos(t),r=C.util.sin(t);return[n,r,-r,n,0,0]},calcDimensionsMatrix:function(e){var t=void 0===e.scaleX?1:e.scaleX,n=void 0===e.scaleY?1:e.scaleY,r=[e.flipX?-t:t,0,0,e.flipY?-n:n,0,0],i=C.util.multiplyTransformMatrices,a=C.util.degreesToRadians;return e.skewX&&(r=i(r,[1,0,Math.tan(a(e.skewX)),1],!0)),e.skewY&&(r=i(r,[1,Math.tan(a(e.skewY)),0,1],!0)),r},composeMatrix:function(e){var t=[1,0,0,1,e.translateX||0,e.translateY||0],n=C.util.multiplyTransformMatrices;return e.angle&&(t=n(t,C.util.calcRotateMatrix(e))),(1!==e.scaleX||1!==e.scaleY||e.skewX||e.skewY||e.flipX||e.flipY)&&(t=n(t,C.util.calcDimensionsMatrix(e))),t},resetObjectTransform:function(e){e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},saveObjectTransform:function(e){return{scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}},isTransparent:function(e,t,n,r){r>0&&(t>r?t-=r:t=0,n>r?n-=r:n=0);var i,a=!0,o=e.getImageData(t,n,2*r||1,2*r||1),s=o.data.length;for(i=3;i<s&&!1!=(a=o.data[i]<=0);i+=4);return o=null,a},parsePreserveAspectRatioAttribute:function(e){var t,n="meet",r=e.split(" ");return r&&r.length&&("meet"!==(n=r.pop())&&"slice"!==n?(t=n,n="meet"):r.length&&(t=r.pop())),{meetOrSlice:n,alignX:"none"!==t?t.slice(1,4):"none",alignY:"none"!==t?t.slice(5,8):"none"}},clearFabricFontCache:function(e){(e=(e||"").toLowerCase())?C.charWidthsCache[e]&&delete C.charWidthsCache[e]:C.charWidthsCache={}},limitDimsByArea:function(e,t){var n=Math.sqrt(t*e),r=Math.floor(t/n);return{x:Math.floor(n),y:r}},capValue:function(e,t,n){return Math.max(e,Math.min(t,n))},findScaleToFit:function(e,t){return Math.min(t.width/e.width,t.height/e.height)},findScaleToCover:function(e,t){return Math.max(t.width/e.width,t.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map((function(e){return C.util.toFixed(e,C.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"},sizeAfterTransform:function(e,t,n){var r=e/2,i=t/2,a=[{x:-r,y:-i},{x:r,y:-i},{x:-r,y:i},{x:r,y:i}],o=C.util.calcDimensionsMatrix(n),s=C.util.makeBoundingBoxFromPoints(a,o);return{x:s.width,y:s.height}}},function(){var e=Array.prototype.join,t={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},n={m:"l",M:"L"};function r(e,t,n,r,i,a,o,s,l,c,u){var d=C.util.cos(e),h=C.util.sin(e),f=C.util.cos(t),p=C.util.sin(t),m=n*i*f-r*a*p+o,g=r*i*f+n*a*p+s;return["C",c+l*(-n*i*h-r*a*d),u+l*(-r*i*h+n*a*d),m+l*(n*i*p+r*a*f),g+l*(r*i*p-n*a*f),m,g]}function i(e,t,n,i,o,s,l){var c=Math.PI,u=l*c/180,d=C.util.sin(u),h=C.util.cos(u),f=0,p=0,m=-h*e*.5-d*t*.5,g=-h*t*.5+d*e*.5,v=(n=Math.abs(n))*n,b=(i=Math.abs(i))*i,y=g*g,A=m*m,_=v*b-v*y-b*A,w=0;if(_<0){var E=Math.sqrt(1-_/(v*b));n*=E,i*=E}else w=(o===s?-1:1)*Math.sqrt(_/(v*y+b*A));var S=w*n*g/i,T=-w*i*m/n,k=h*S-d*T+.5*e,x=d*S+h*T+.5*t,O=a(1,0,(m-S)/n,(g-T)/i),I=a((m-S)/n,(g-T)/i,(-m-S)/n,(-g-T)/i);0===s&&I>0?I-=2*c:1===s&&I<0&&(I+=2*c);for(var M=Math.ceil(Math.abs(I/c*2)),P=[],D=I/M,N=8/3*Math.sin(D/4)*Math.sin(D/4)/Math.sin(D/2),L=O+D,R=0;R<M;R++)P[R]=r(O,L,h,d,n,i,k,x,N,f,p),f=P[R][5],p=P[R][6],O=L,L+=D;return P}function a(e,t,n,r){var i=Math.atan2(t,e),a=Math.atan2(r,n);return a>=i?a-i:2*Math.PI-(i-a)}function o(t,n,r,i,a,o,s,l){var c;if(C.cachesBoundsOfCurve&&(c=e.call(arguments),C.boundsOfCurveCache[c]))return C.boundsOfCurveCache[c];var u,d,h,f,p,m,g,v,b=Math.sqrt,y=Math.min,A=Math.max,_=Math.abs,w=[],E=[[],[]];d=6*t-12*r+6*a,u=-3*t+9*r-9*a+3*s,h=3*r-3*t;for(var S=0;S<2;++S)if(S>0&&(d=6*n-12*i+6*o,u=-3*n+9*i-9*o+3*l,h=3*i-3*n),_(u)<1e-12){if(_(d)<1e-12)continue;0<(f=-h/d)&&f<1&&w.push(f)}else(g=d*d-4*h*u)<0||(0<(p=(-d+(v=b(g)))/(2*u))&&p<1&&w.push(p),0<(m=(-d-v)/(2*u))&&m<1&&w.push(m));for(var T,k,x,O=w.length,I=O;O--;)T=(x=1-(f=w[O]))*x*x*t+3*x*x*f*r+3*x*f*f*a+f*f*f*s,E[0][O]=T,k=x*x*x*n+3*x*x*f*i+3*x*f*f*o+f*f*f*l,E[1][O]=k;E[0][I]=t,E[1][I]=n,E[0][I+1]=s,E[1][I+1]=l;var M=[{x:y.apply(null,E[0]),y:y.apply(null,E[1])},{x:A.apply(null,E[0]),y:A.apply(null,E[1])}];return C.cachesBoundsOfCurve&&(C.boundsOfCurveCache[c]=M),M}function s(e,t,n){for(var r=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=i(n[6]-e,n[7]-t,r,a,s,l,o),u=0,d=c.length;u<d;u++)c[u][1]+=e,c[u][2]+=t,c[u][3]+=e,c[u][4]+=t,c[u][5]+=e,c[u][6]+=t;return c}function l(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}function c(e,t,n,r,i,a,o,s){return function(l){var c=function(e){return e*e*e}(l),u=function(e){return 3*e*e*(1-e)}(l),d=function(e){return 3*e*(1-e)*(1-e)}(l),h=function(e){return(1-e)*(1-e)*(1-e)}(l);return{x:o*c+i*u+n*d+e*h,y:s*c+a*u+r*d+t*h}}}function u(e,t,n,r,i,a){return function(o){var s=function(e){return e*e}(o),l=function(e){return 2*e*(1-e)}(o),c=function(e){return(1-e)*(1-e)}(o);return{x:i*s+n*l+e*c,y:a*s+r*l+t*c}}}function d(e,t,n){var r,i,a={x:t,y:n},o=0;for(i=.01;i<=1;i+=.01)r=e(i),o+=l(a.x,a.y,r.x,r.y),a=r;return o}function h(e){for(var t,n,r,i=0,a=e.length,o=0,s=0,h=0,f=0,p=[],m=0;m<a;m++){switch(r={x:o,y:s,command:(t=e[m])[0]},t[0]){case"M":r.length=0,h=o=t[1],f=s=t[2];break;case"L":r.length=l(o,s,t[1],t[2]),o=t[1],s=t[2];break;case"C":n=c(o,s,t[1],t[2],t[3],t[4],t[5],t[6]),r.length=d(n,o,s),o=t[5],s=t[6];break;case"Q":n=u(o,s,t[1],t[2],t[3],t[4]),r.length=d(n,o,s),o=t[3],s=t[4];break;case"Z":case"z":r.destX=h,r.destY=f,r.length=l(o,s,h,f),o=h,s=f}i+=r.length,p.push(r)}return p.push({length:i,x:o,y:s}),p}C.util.parsePath=function(e){var r,i,a,o,s,l=[],c=[],u=C.rePathCommand,d="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",h="("+d+")"+C.commaWsp,f="([01])"+C.commaWsp+"?",p=new RegExp(h+"?"+h+"?"+h+f+f+h+"?("+d+")","g");if(!e||!e.match)return l;for(var m,g=0,v=(s=e.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi)).length;g<v;g++){o=(r=s[g]).slice(1).trim(),c.length=0;var b=r.charAt(0);if(m=[b],"a"===b.toLowerCase())for(var y;y=p.exec(o);)for(var A=1;A<y.length;A++)c.push(y[A]);else for(;a=u.exec(o);)c.push(a[0]);A=0;for(var _=c.length;A<_;A++)i=parseFloat(c[A]),isNaN(i)||m.push(i);var w=t[b.toLowerCase()],E=n[b]||b;if(m.length-1>w)for(var S=1,T=m.length;S<T;S+=w)l.push([b].concat(m.slice(S,S+w))),b=E;else l.push(m)}return l},C.util.makePathSimpler=function(e){var t,n,r,i,a,o,l=0,c=0,u=e.length,d=0,h=0,f=[];for(n=0;n<u;++n){switch(r=!1,(t=e[n].slice(0))[0]){case"l":t[0]="L",t[1]+=l,t[2]+=c;case"L":l=t[1],c=t[2];break;case"h":t[1]+=l;case"H":t[0]="L",t[2]=c,l=t[1];break;case"v":t[1]+=c;case"V":t[0]="L",c=t[1],t[1]=l,t[2]=c;break;case"m":t[0]="M",t[1]+=l,t[2]+=c;case"M":l=t[1],c=t[2],d=t[1],h=t[2];break;case"c":t[0]="C",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c,t[5]+=l,t[6]+=c;case"C":a=t[3],o=t[4],l=t[5],c=t[6];break;case"s":t[0]="S",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c;case"S":"C"===i?(a=2*l-a,o=2*c-o):(a=l,o=c),l=t[3],c=t[4],t[0]="C",t[5]=t[3],t[6]=t[4],t[3]=t[1],t[4]=t[2],t[1]=a,t[2]=o,a=t[3],o=t[4];break;case"q":t[0]="Q",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c;case"Q":a=t[1],o=t[2],l=t[3],c=t[4];break;case"t":t[0]="T",t[1]+=l,t[2]+=c;case"T":"Q"===i?(a=2*l-a,o=2*c-o):(a=l,o=c),t[0]="Q",l=t[1],c=t[2],t[1]=a,t[2]=o,t[3]=l,t[4]=c;break;case"a":t[0]="A",t[6]+=l,t[7]+=c;case"A":r=!0,f=f.concat(s(l,c,t)),l=t[6],c=t[7];break;case"z":case"Z":l=d,c=h}r||f.push(t),i=t[0]}return f},C.util.getPathSegmentsInfo=h,C.util.fromArcToBeizers=s,C.util.getBoundsOfCurve=o,C.util.getPointOnPath=function(e,t,n){n||(n=h(e));for(var r=n[n.length-1]*t,i=0;r-n[i]>0&&i<n.length;)r-=n[i],i++;var a=n[i],o=r/a.length,s=a.length,l=e[i];switch(s){case"Z":case"z":return new C.Point(a.x,a.y).lerp(new C.Point(a.destX,a.destY),o);case"L":return new C.Point(a.x,a.y).lerp(new C.Point(l[1],l[2]),o);case"C":return c(a.x,a.y,l[1],l[2],l[3],l[4],l[5],l[6])(o);case"Q":return u(a.x,a.y,l[1],l[2],l[3],l[4])(o)}},C.util.getBoundsOfArc=function(e,t,n,r,a,s,l,c,u){for(var d,h=0,f=0,p=[],m=i(c-e,u-t,n,r,s,l,a),g=0,v=m.length;g<v;g++)d=o(h,f,m[g][1],m[g][2],m[g][3],m[g][4],m[g][5],m[g][6]),p.push({x:d[0].x+e,y:d[0].y+t}),p.push({x:d[1].x+e,y:d[1].y+t}),h=m[g][5],f=m[g][6];return p},C.util.drawArc=function(e,t,n,r){s(t,n,r=r.slice(0).unshift("X")).forEach((function(t){e.bezierCurveTo.apply(e,t.slice(1))}))}}(),function(){var e=Array.prototype.slice;function t(e,t,n){if(e&&0!==e.length){var r=e.length-1,i=t?e[r][t]:e[r];if(t)for(;r--;)n(e[r][t],i)&&(i=e[r][t]);else for(;r--;)n(e[r],i)&&(i=e[r]);return i}}C.util.array={fill:function(e,t){for(var n=e.length;n--;)e[n]=t;return e},invoke:function(t,n){for(var r=e.call(arguments,2),i=[],a=0,o=t.length;a<o;a++)i[a]=r.length?t[a][n].apply(t[a],r):t[a][n].call(t[a]);return i},min:function(e,n){return t(e,n,(function(e,t){return e<t}))},max:function(e,n){return t(e,n,(function(e,t){return e>=t}))}}}(),function(){function e(t,n,r){if(r)if(!C.isLikelyNode&&n instanceof Element)t=n;else if(n instanceof Array){t=[];for(var i=0,a=n.length;i<a;i++)t[i]=e({},n[i],r)}else if(n&&"object"==typeof n)for(var o in n)"canvas"===o||"group"===o?t[o]=null:n.hasOwnProperty(o)&&(t[o]=e({},n[o],r));else t=n;else for(var o in n)t[o]=n[o];return t}C.util.object={extend:e,clone:function(t,n){return e({},t,n)}},C.util.object.extend(C.util,C.Observable)}(),function(){function e(e,t){var n=e.charCodeAt(t);if(isNaN(n))return"";if(n<55296||n>57343)return e.charAt(t);if(55296<=n&&n<=56319){if(e.length<=t+1)throw"High surrogate without following low surrogate";var r=e.charCodeAt(t+1);if(56320>r||r>57343)throw"High surrogate without following low surrogate";return e.charAt(t)+e.charAt(t+1)}if(0===t)throw"Low surrogate without preceding high surrogate";var i=e.charCodeAt(t-1);if(55296>i||i>56319)throw"Low surrogate without preceding high surrogate";return!1}C.util.string={camelize:function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},capitalize:function(e,t){return e.charAt(0).toUpperCase()+(t?e.slice(1):e.slice(1).toLowerCase())},escapeXml:function(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},graphemeSplit:function(t){var n,r=0,i=[];for(r=0;r<t.length;r++)!1!==(n=e(t,r))&&i.push(n);return i}}}(),function(){var e=Array.prototype.slice,t=function(){},n=function(){for(var e in{toString:1})if("toString"===e)return!1;return!0}(),r=function(e,t,r){for(var i in t)i in e.prototype&&"function"==typeof e.prototype[i]&&(t[i]+"").indexOf("callSuper")>-1?e.prototype[i]=function(e){return function(){var n=this.constructor.superclass;this.constructor.superclass=r;var i=t[e].apply(this,arguments);if(this.constructor.superclass=n,"initialize"!==e)return i}}(i):e.prototype[i]=t[i],n&&(t.toString!==Object.prototype.toString&&(e.prototype.toString=t.toString),t.valueOf!==Object.prototype.valueOf&&(e.prototype.valueOf=t.valueOf))};function i(){}function a(t){for(var n=null,r=this;r.constructor.superclass;){var i=r.constructor.superclass.prototype[t];if(r[t]!==i){n=i;break}r=r.constructor.superclass.prototype}return n?arguments.length>1?n.apply(this,e.call(arguments,1)):n.call(this):console.log("tried to callSuper "+t+", method not found in prototype chain",this)}C.util.createClass=function(){var n=null,o=e.call(arguments,0);function s(){this.initialize.apply(this,arguments)}"function"==typeof o[0]&&(n=o.shift()),s.superclass=n,s.subclasses=[],n&&(i.prototype=n.prototype,s.prototype=new i,n.subclasses.push(s));for(var l=0,c=o.length;l<c;l++)r(s,o[l],n);return s.prototype.initialize||(s.prototype.initialize=t),s.prototype.constructor=s,s.prototype.callSuper=a,s}}(),c=!!C.document.createElement("div").attachEvent,u=["touchstart","touchmove","touchend"],C.util.addListener=function(e,t,n,r){e&&e.addEventListener(t,n,!c&&r)},C.util.removeListener=function(e,t,n,r){e&&e.removeEventListener(t,n,!c&&r)},C.util.getPointer=function(e){var t=e.target,n=C.util.getScrollLeftTop(t),r=function(e){var t=e.changedTouches;return t&&t[0]?t[0]:e}(e);return{x:r.clientX+n.left,y:r.clientY+n.top}},C.util.isTouchEvent=function(e){return u.indexOf(e.type)>-1||"touch"===e.pointerType},d=C.document.createElement("div"),h="string"==typeof d.style.opacity,f="string"==typeof d.style.filter,p=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,m=function(e){return e},h?m=function(e,t){return e.style.opacity=t,e}:f&&(m=function(e,t){var n=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(n.zoom=1),p.test(n.filter)?(t=t>=.9999?"":"alpha(opacity="+100*t+")",n.filter=n.filter.replace(p,t)):n.filter+=" alpha(opacity="+100*t+")",e}),C.util.setStyle=function(e,t){var n=e.style;if(!n)return e;if("string"==typeof t)return e.style.cssText+=";"+t,t.indexOf("opacity")>-1?m(e,t.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var r in t)"opacity"===r?m(e,t[r]):n["float"===r||"cssFloat"===r?void 0===n.styleFloat?"cssFloat":"styleFloat":r]=t[r];return e},function(){var e=Array.prototype.slice;var t,n,r,i,a=function(t){return e.call(t,0)};try{t=a(C.document.childNodes)instanceof Array}catch(e){}function o(e,t){var n=C.document.createElement(e);for(var r in t)"class"===r?n.className=t[r]:"for"===r?n.htmlFor=t[r]:n.setAttribute(r,t[r]);return n}function s(e){for(var t=0,n=0,r=C.document.documentElement,i=C.document.body||{scrollLeft:0,scrollTop:0};e&&(e.parentNode||e.host)&&((e=e.parentNode||e.host)===C.document?(t=i.scrollLeft||r.scrollLeft||0,n=i.scrollTop||r.scrollTop||0):(t+=e.scrollLeft||0,n+=e.scrollTop||0),1!==e.nodeType||"fixed"!==e.style.position););return{left:t,top:n}}t||(a=function(e){for(var t=new Array(e.length),n=e.length;n--;)t[n]=e[n];return t}),n=C.document.defaultView&&C.document.defaultView.getComputedStyle?function(e,t){var n=C.document.defaultView.getComputedStyle(e,null);return n?n[t]:void 0}:function(e,t){var n=e.style[t];return!n&&e.currentStyle&&(n=e.currentStyle[t]),n},r=C.document.documentElement.style,i="userSelect"in r?"userSelect":"MozUserSelect"in r?"MozUserSelect":"WebkitUserSelect"in r?"WebkitUserSelect":"KhtmlUserSelect"in r?"KhtmlUserSelect":"",C.util.makeElementUnselectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=C.util.falseFunction),i?e.style[i]="none":"string"==typeof e.unselectable&&(e.unselectable="on"),e},C.util.makeElementSelectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=null),i?e.style[i]="":"string"==typeof e.unselectable&&(e.unselectable=""),e},C.util.setImageSmoothing=function(e,t){e.imageSmoothingEnabled=e.imageSmoothingEnabled||e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled||e.oImageSmoothingEnabled,e.imageSmoothingEnabled=t},C.util.getById=function(e){return"string"==typeof e?C.document.getElementById(e):e},C.util.toArray=a,C.util.addClass=function(e,t){e&&-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=(e.className?" ":"")+t)},C.util.makeElement=o,C.util.wrapElement=function(e,t,n){return"string"==typeof t&&(t=o(t,n)),e.parentNode&&e.parentNode.replaceChild(t,e),t.appendChild(e),t},C.util.getScrollLeftTop=s,C.util.getElementOffset=function(e){var t,r,i=e&&e.ownerDocument,a={left:0,top:0},o={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!i)return o;for(var c in l)o[l[c]]+=parseInt(n(e,c),10)||0;return t=i.documentElement,void 0!==e.getBoundingClientRect&&(a=e.getBoundingClientRect()),r=s(e),{left:a.left+r.left-(t.clientLeft||0)+o.left,top:a.top+r.top-(t.clientTop||0)+o.top}},C.util.getNodeCanvas=function(e){var t=C.jsdomImplForWrapper(e);return t._canvas||t._image},C.util.cleanUpJsdomNode=function(e){if(C.isLikelyNode){var t=C.jsdomImplForWrapper(e);t&&(t._image=null,t._canvas=null,t._currentSrc=null,t._attributes=null,t._classList=null)}}}(),function(){function e(){}C.util.request=function(t,n){n||(n={});var r=n.method?n.method.toUpperCase():"GET",i=n.onComplete||function(){},a=new C.window.XMLHttpRequest,o=n.body||n.parameters;return a.onreadystatechange=function(){4===a.readyState&&(i(a),a.onreadystatechange=e)},"GET"===r&&(o=null,"string"==typeof n.parameters&&(t=function(e,t){return e+(/\?/.test(e)?"&":"?")+t}(t,n.parameters))),a.open(r,t,!0),"POST"!==r&&"PUT"!==r||a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.send(o),a}}(),C.log=console.log,C.warn=console.warn,function(){function e(){return!1}function t(e,t,n,r){return-n*Math.cos(e/r*(Math.PI/2))+n+t}var n=C.window.requestAnimationFrame||C.window.webkitRequestAnimationFrame||C.window.mozRequestAnimationFrame||C.window.oRequestAnimationFrame||C.window.msRequestAnimationFrame||function(e){return C.window.setTimeout(e,1e3/60)},r=C.window.cancelAnimationFrame||C.window.clearTimeout;function i(){return n.apply(C.window,arguments)}C.util.animate=function(n){i((function(r){n||(n={});var a,o=r||+new Date,s=n.duration||500,l=o+s,c=n.onChange||e,u=n.abort||e,d=n.onComplete||e,h=n.easing||t,f="startValue"in n?n.startValue:0,p="endValue"in n?n.endValue:100,m=n.byValue||p-f;n.onStart&&n.onStart(),function e(t){var n=(a=t||+new Date)>l?s:a-o,r=n/s,g=h(n,f,m,s),v=Math.abs((g-f)/m);if(!u())return a>l?(c(p,1,1),void d(p,1,1)):(c(g,v,r),void i(e));d(p,1,1)}(o)}))},C.util.requestAnimFrame=i,C.util.cancelAnimFrame=function(){return r.apply(C.window,arguments)}}(),function(){function e(e,t,n){var r="rgba("+parseInt(e[0]+n*(t[0]-e[0]),10)+","+parseInt(e[1]+n*(t[1]-e[1]),10)+","+parseInt(e[2]+n*(t[2]-e[2]),10);return r+=","+(e&&t?parseFloat(e[3]+n*(t[3]-e[3])):1),r+=")"}C.util.animateColor=function(t,n,r,i){var a=new C.Color(t).getSource(),o=new C.Color(n).getSource(),s=i.onComplete,l=i.onChange;i=i||{},C.util.animate(C.util.object.extend(i,{duration:r||500,startValue:a,endValue:o,byValue:o,easing:function(t,n,r,a){return e(n,r,i.colorEasing?i.colorEasing(t,a):1-Math.cos(t/a*(Math.PI/2)))},onComplete:function(t,n,r){if(s)return s(e(o,o,0),n,r)},onChange:function(t,n,r){if(l){if(Array.isArray(t))return l(e(t,t,0),n,r);l(t,n,r)}}}))}}(),function(){function e(e,t,n,r){return e<Math.abs(t)?(e=t,r=n/4):r=0===t&&0===e?n/(2*Math.PI)*Math.asin(1):n/(2*Math.PI)*Math.asin(t/e),{a:e,c:t,p:n,s:r}}function t(e,t,n){return e.a*Math.pow(2,10*(t-=1))*Math.sin((t*n-e.s)*(2*Math.PI)/e.p)}function n(e,t,n,i){return n-r(i-e,0,n,i)+t}function r(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t}C.util.ease={easeInQuad:function(e,t,n,r){return n*(e/=r)*e+t},easeOutQuad:function(e,t,n,r){return-n*(e/=r)*(e-2)+t},easeInOutQuad:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,n,r){return n*(e/=r)*e*e+t},easeOutCubic:function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t},easeInOutCubic:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,n,r){return n*(e/=r)*e*e*e+t},easeOutQuart:function(e,t,n,r){return-n*((e=e/r-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e+t:-n/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,n,r){return n*(e/=r)*e*e*e*e+t},easeOutQuint:function(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,n,r){return-n*Math.cos(e/r*(Math.PI/2))+n+t},easeOutSine:function(e,t,n,r){return n*Math.sin(e/r*(Math.PI/2))+t},easeInOutSine:function(e,t,n,r){return-n/2*(Math.cos(Math.PI*e/r)-1)+t},easeInExpo:function(e,t,n,r){return 0===e?t:n*Math.pow(2,10*(e/r-1))+t},easeOutExpo:function(e,t,n,r){return e===r?t+n:n*(1-Math.pow(2,-10*e/r))+t},easeInOutExpo:function(e,t,n,r){return 0===e?t:e===r?t+n:(e/=r/2)<1?n/2*Math.pow(2,10*(e-1))+t:n/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,n,r){return-n*(Math.sqrt(1-(e/=r)*e)-1)+t},easeOutCirc:function(e,t,n,r){return n*Math.sqrt(1-(e=e/r-1)*e)+t},easeInOutCirc:function(e,t,n,r){return(e/=r/2)<1?-n/2*(Math.sqrt(1-e*e)-1)+t:n/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(n,r,i,a){var o=0;return 0===n?r:1===(n/=a)?r+i:(o||(o=.3*a),-t(e(i,i,o,1.70158),n,a)+r)},easeOutElastic:function(t,n,r,i){var a=0;if(0===t)return n;if(1===(t/=i))return n+r;a||(a=.3*i);var o=e(r,r,a,1.70158);return o.a*Math.pow(2,-10*t)*Math.sin((t*i-o.s)*(2*Math.PI)/o.p)+o.c+n},easeInOutElastic:function(n,r,i,a){var o=0;if(0===n)return r;if(2===(n/=a/2))return r+i;o||(o=a*(.3*1.5));var s=e(i,i,o,1.70158);return n<1?-.5*t(s,n,a)+r:s.a*Math.pow(2,-10*(n-=1))*Math.sin((n*a-s.s)*(2*Math.PI)/s.p)*.5+s.c+r},easeInBack:function(e,t,n,r,i){return void 0===i&&(i=1.70158),n*(e/=r)*e*((i+1)*e-i)+t},easeOutBack:function(e,t,n,r,i){return void 0===i&&(i=1.70158),n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},easeInOutBack:function(e,t,n,r,i){return void 0===i&&(i=1.70158),(e/=r/2)<1?n/2*(e*e*((1+(i*=1.525))*e-i))+t:n/2*((e-=2)*e*((1+(i*=1.525))*e+i)+2)+t},easeInBounce:n,easeOutBounce:r,easeInOutBounce:function(e,t,i,a){return e<a/2?.5*n(2*e,0,i,a)+t:.5*r(2*e-a,0,i,a)+.5*i+t}}}(),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.util.object.clone,i=t.util.toFixed,a=t.util.parseUnit,o=t.util.multiplyTransformMatrices,s={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},l={stroke:"strokeOpacity",fill:"fillOpacity"};function c(e){return e in s?s[e]:e}function u(e,n,r,i){var s,l="[object Array]"===Object.prototype.toString.call(n);if("fill"!==e&&"stroke"!==e||"none"!==n){if("strokeUniform"===e)return"non-scaling-stroke"===n;if("strokeDashArray"===e)n="none"===n?null:n.replace(/,/g," ").split(/\s+/).map(parseFloat);else if("transformMatrix"===e)n=r&&r.transformMatrix?o(r.transformMatrix,t.parseTransformAttribute(n)):t.parseTransformAttribute(n);else if("visible"===e)n="none"!==n&&"hidden"!==n,r&&!1===r.visible&&(n=!1);else if("opacity"===e)n=parseFloat(n),r&&void 0!==r.opacity&&(n*=r.opacity);else if("textAnchor"===e)n="start"===n?"left":"end"===n?"right":"center";else if("charSpacing"===e)s=a(n,i)/i*1e3;else if("paintFirst"===e){var c=n.indexOf("fill"),u=n.indexOf("stroke");n="fill";c>-1&&u>-1&&u<c?n="stroke":-1===c&&u>-1&&(n="stroke")}else{if("href"===e||"xlink:href"===e||"font"===e)return n;if("imageSmoothing"===e)return"optimizeQuality"===n;s=l?n.map(a):a(n,i)}}else n="";return!l&&isNaN(s)?n:s}function d(e){return new RegExp("^("+e.join("|")+")\\b","i")}function h(e,t){var n,r,i,a,o=[];for(i=0,a=t.length;i<a;i++)n=t[i],r=e.getElementsByTagName(n),o=o.concat(Array.prototype.slice.call(r));return o}function f(e,t){var n,r=!0;return(n=p(e,t.pop()))&&t.length&&(r=function(e,t){var n,r=!0;for(;e.parentNode&&1===e.parentNode.nodeType&&t.length;)r&&(n=t.pop()),e=e.parentNode,r=p(e,n);return 0===t.length}(e,t)),n&&r&&0===t.length}function p(e,t){var n,r,i=e.nodeName,a=e.getAttribute("class"),o=e.getAttribute("id");if(n=new RegExp("^"+i,"i"),t=t.replace(n,""),o&&t.length&&(n=new RegExp("#"+o+"(?![a-zA-Z\\-]+)","i"),t=t.replace(n,"")),a&&t.length)for(r=(a=a.split(" ")).length;r--;)n=new RegExp("\\."+a[r]+"(?![a-zA-Z\\-]+)","i"),t=t.replace(n,"");return 0===t.length}function m(e,t){var n;if(e.getElementById&&(n=e.getElementById(t)),n)return n;var r,i,a,o=e.getElementsByTagName("*");for(i=0,a=o.length;i<a;i++)if(t===(r=o[i]).getAttribute("id"))return r}t.svgValidTagNamesRegEx=d(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]),t.svgViewBoxElementsRegEx=d(["symbol","image","marker","pattern","view","svg"]),t.svgInvalidAncestorsRegEx=d(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),t.svgValidParentsRegEx=d(["symbol","g","a","svg","clipPath","defs"]),t.cssRules={},t.gradientDefs={},t.clipPaths={},t.parseTransformAttribute=function(){function e(e,n,r){e[r]=Math.tan(t.util.degreesToRadians(n[0]))}var n=t.iMatrix,r=t.reNum,i=t.commaWsp,a="(?:"+("(?:(matrix)\\s*\\(\\s*("+r+")"+i+"("+r+")"+i+"("+r+")"+i+"("+r+")"+i+"("+r+")"+i+"("+r+")\\s*\\))")+"|"+("(?:(translate)\\s*\\(\\s*("+r+")(?:"+i+"("+r+"))?\\s*\\))")+"|"+("(?:(scale)\\s*\\(\\s*("+r+")(?:"+i+"("+r+"))?\\s*\\))")+"|"+("(?:(rotate)\\s*\\(\\s*("+r+")(?:"+i+"("+r+")"+i+"("+r+"))?\\s*\\))")+"|"+("(?:(skewX)\\s*\\(\\s*("+r+")\\s*\\))")+"|"+("(?:(skewY)\\s*\\(\\s*("+r+")\\s*\\))")+")",o=new RegExp("^\\s*(?:"+("(?:"+a+"(?:"+i+"*"+a+")*)")+"?)\\s*$"),s=new RegExp(a,"g");return function(r){var i=n.concat(),l=[];if(!r||r&&!o.test(r))return i;r.replace(s,(function(r){var o=new RegExp(a).exec(r).filter((function(e){return!!e})),s=o[1],c=o.slice(2).map(parseFloat);switch(s){case"translate":!function(e,t){e[4]=t[0],2===t.length&&(e[5]=t[1])}(i,c);break;case"rotate":c[0]=t.util.degreesToRadians(c[0]),function(e,n){var r=t.util.cos(n[0]),i=t.util.sin(n[0]),a=0,o=0;3===n.length&&(a=n[1],o=n[2]),e[0]=r,e[1]=i,e[2]=-i,e[3]=r,e[4]=a-(r*a-i*o),e[5]=o-(i*a+r*o)}(i,c);break;case"scale":!function(e,t){var n=t[0],r=2===t.length?t[1]:t[0];e[0]=n,e[3]=r}(i,c);break;case"skewX":e(i,c,2);break;case"skewY":e(i,c,1);break;case"matrix":i=c}l.push(i.concat()),i=n.concat()}));for(var c=l[0];l.length>1;)l.shift(),c=t.util.multiplyTransformMatrices(c,l[0]);return c}}();var g=new RegExp("^\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*$");function v(e){if(t.svgViewBoxElementsRegEx.test(e.nodeName)){var n,r,i,o,s,l,c=e.getAttribute("viewBox"),u=1,d=1,h=e.getAttribute("width"),f=e.getAttribute("height"),p=e.getAttribute("x")||0,m=e.getAttribute("y")||0,v=e.getAttribute("preserveAspectRatio")||"",b=!c||!(c=c.match(g)),y=!h||!f||"100%"===h||"100%"===f,A=b&&y,_={},w="",E=0,S=0;if(_.width=0,_.height=0,_.toBeParsed=A,b&&(p||m)&&"#document"!==e.parentNode.nodeName&&(w=" translate("+a(p)+" "+a(m)+") ",s=(e.getAttribute("transform")||"")+w,e.setAttribute("transform",s),e.removeAttribute("x"),e.removeAttribute("y")),A)return _;if(b)return _.width=a(h),_.height=a(f),_;if(n=-parseFloat(c[1]),r=-parseFloat(c[2]),i=parseFloat(c[3]),o=parseFloat(c[4]),_.minX=n,_.minY=r,_.viewBoxWidth=i,_.viewBoxHeight=o,y?(_.width=i,_.height=o):(_.width=a(h),_.height=a(f),u=_.width/i,d=_.height/o),"none"!==(v=t.util.parsePreserveAspectRatioAttribute(v)).alignX&&("meet"===v.meetOrSlice&&(d=u=u>d?d:u),"slice"===v.meetOrSlice&&(d=u=u>d?u:d),E=_.width-i*u,S=_.height-o*u,"Mid"===v.alignX&&(E/=2),"Mid"===v.alignY&&(S/=2),"Min"===v.alignX&&(E=0),"Min"===v.alignY&&(S=0)),1===u&&1===d&&0===n&&0===r&&0===p&&0===m)return _;if((p||m)&&"#document"!==e.parentNode.nodeName&&(w=" translate("+a(p)+" "+a(m)+") "),s=w+" matrix("+u+" 0 0 "+d+" "+(n*u+E)+" "+(r*d+S)+") ","svg"===e.nodeName){for(l=e.ownerDocument.createElementNS(t.svgNS,"g");e.firstChild;)l.appendChild(e.firstChild);e.appendChild(l)}else(l=e).removeAttribute("x"),l.removeAttribute("y"),s=l.getAttribute("transform")+s;return l.setAttribute("transform",s),_}}function b(e,t){var n=m(e,t.getAttribute("xlink:href").substr(1));if(n&&n.getAttribute("xlink:href")&&b(e,n),["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"].forEach((function(e){n&&!t.hasAttribute(e)&&n.hasAttribute(e)&&t.setAttribute(e,n.getAttribute(e))})),!t.children.length)for(var r=n.cloneNode(!0);r.firstChild;)t.appendChild(r.firstChild);t.removeAttribute("xlink:href")}t.parseSVGDocument=function(e,n,i,a){if(e){!function(e){for(var n=h(e,["use","svg:use"]),r=0;n.length&&r<n.length;){var i,a,o,s,l=n[r],c=(l.getAttribute("xlink:href")||l.getAttribute("href")).substr(1),u=l.getAttribute("x")||0,d=l.getAttribute("y")||0,f=m(e,c).cloneNode(!0),p=(f.getAttribute("transform")||"")+" translate("+u+", "+d+")",g=n.length,b=t.svgNS;if(v(f),/^svg$/i.test(f.nodeName)){var y=f.ownerDocument.createElementNS(b,"g");for(a=0,s=(o=f.attributes).length;a<s;a++)i=o.item(a),y.setAttributeNS(b,i.nodeName,i.nodeValue);for(;f.firstChild;)y.appendChild(f.firstChild);f=y}for(a=0,s=(o=l.attributes).length;a<s;a++)"x"!==(i=o.item(a)).nodeName&&"y"!==i.nodeName&&"xlink:href"!==i.nodeName&&"href"!==i.nodeName&&("transform"===i.nodeName?p=i.nodeValue+" "+p:f.setAttribute(i.nodeName,i.nodeValue));f.setAttribute("transform",p),f.setAttribute("instantiated_by_use","1"),f.removeAttribute("id"),l.parentNode.replaceChild(f,l),n.length===g&&r++}}(e);var o,s,l=t.Object.__uid++,c=v(e),u=t.util.toArray(e.getElementsByTagName("*"));if(c.crossOrigin=a&&a.crossOrigin,c.svgUid=l,0===u.length&&t.isLikelyNode){var d=[];for(o=0,s=(u=e.selectNodes('//*[name(.)!="svg"]')).length;o<s;o++)d[o]=u[o];u=d}var f=u.filter((function(e){return v(e),t.svgValidTagNamesRegEx.test(e.nodeName.replace("svg:",""))&&!function(e,t){for(;e&&(e=e.parentNode);)if(e.nodeName&&t.test(e.nodeName.replace("svg:",""))&&!e.getAttribute("instantiated_by_use"))return!0;return!1}(e,t.svgInvalidAncestorsRegEx)}));if(!f||f&&!f.length)n&&n([],{});else{var p={};u.filter((function(e){return"clipPath"===e.nodeName.replace("svg:","")})).forEach((function(e){var n=e.getAttribute("id");p[n]=t.util.toArray(e.getElementsByTagName("*")).filter((function(e){return t.svgValidTagNamesRegEx.test(e.nodeName.replace("svg:",""))}))})),t.gradientDefs[l]=t.getGradientDefs(e),t.cssRules[l]=t.getCSSRules(e),t.clipPaths[l]=p,t.parseElements(f,(function(e,r){n&&(n(e,c,r,u),delete t.gradientDefs[l],delete t.cssRules[l],delete t.clipPaths[l])}),r(c),i,a)}}};var y=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+t.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+t.reNum+"))?\\s+(.*)");n(t,{parseFontDeclaration:function(e,t){var n=e.match(y);if(n){var r=n[1],i=n[3],o=n[4],s=n[5],l=n[6];r&&(t.fontStyle=r),i&&(t.fontWeight=isNaN(parseFloat(i))?i:parseFloat(i)),o&&(t.fontSize=a(o)),l&&(t.fontFamily=l),s&&(t.lineHeight="normal"===s?1:s)}},getGradientDefs:function(e){var t,n=h(e,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),r=0,i={};for(r=n.length;r--;)(t=n[r]).getAttribute("xlink:href")&&b(e,t),i[t.getAttribute("id")]=t;return i},parseAttributes:function(e,r,o){if(e){var s,d,h,p={};void 0===o&&(o=e.getAttribute("svgUid")),e.parentNode&&t.svgValidParentsRegEx.test(e.parentNode.nodeName)&&(p=t.parseAttributes(e.parentNode,r,o));var m=r.reduce((function(t,n){return(s=e.getAttribute(n))&&(t[n]=s),t}),{}),g=n(function(e,n){var r={};for(var i in t.cssRules[n])if(f(e,i.split(" ")))for(var a in t.cssRules[n][i])r[a]=t.cssRules[n][i][a];return r}(e,o),t.parseStyleAttribute(e));m=n(m,g),g["clip-path"]&&e.setAttribute("clip-path",g["clip-path"]),d=h=p.fontSize||t.Text.DEFAULT_SVG_FONT_SIZE,m["font-size"]&&(m["font-size"]=d=a(m["font-size"],h));var v,b,y={};for(var A in m)b=u(v=c(A),m[A],p,d),y[v]=b;y&&y.font&&t.parseFontDeclaration(y.font,y);var _=n(p,y);return t.svgValidParentsRegEx.test(e.nodeName)?_:function(e){for(var n in l)if(void 0!==e[l[n]]&&""!==e[n]){if(void 0===e[n]){if(!t.Object.prototype[n])continue;e[n]=t.Object.prototype[n]}if(0!==e[n].indexOf("url(")){var r=new t.Color(e[n]);e[n]=r.setAlpha(i(r.getAlpha()*e[l[n]],2)).toRgba()}}return e}(_)}},parseElements:function(e,n,r,i,a){new t.ElementsParser(e,n,r,i,a).parse()},parseStyleAttribute:function(e){var t={},n=e.getAttribute("style");return n?("string"==typeof n?function(e,t){var n,r;e.replace(/;\s*$/,"").split(";").forEach((function(e){var i=e.split(":");n=i[0].trim().toLowerCase(),r=i[1].trim(),t[n]=r}))}(n,t):function(e,t){var n,r;for(var i in e)void 0!==e[i]&&(n=i.toLowerCase(),r=e[i],t[n]=r)}(n,t),t):t},parsePointsAttribute:function(e){if(!e)return null;var t,n,r=[];for(t=0,n=(e=(e=e.replace(/,/g," ").trim()).split(/\s+/)).length;t<n;t+=2)r.push({x:parseFloat(e[t]),y:parseFloat(e[t+1])});return r},getCSSRules:function(e){var n,r,i=e.getElementsByTagName("style"),a={};for(n=0,r=i.length;n<r;n++){var o=i[n].textContent||"";""!==(o=o.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&o.match(/[^{]*\{[\s\S]*?\}/g).map((function(e){return e.trim()})).forEach((function(e){var i=e.match(/([\s\S]*?)\s*\{([^}]*)\}/),o={},s=i[2].trim().replace(/;$/,"").split(/\s*;\s*/);for(n=0,r=s.length;n<r;n++){var l=s[n].split(/\s*:\s*/),c=l[0],u=l[1];o[c]=u}(e=i[1]).split(",").forEach((function(e){""!==(e=e.replace(/^svg/i,"").trim())&&(a[e]?t.util.object.extend(a[e],o):a[e]=t.util.object.clone(o))}))}))}return a},loadSVGFromURL:function(e,n,r,i){e=e.replace(/^\n\s*/,"").trim(),new t.util.request(e,{method:"get",onComplete:function(e){var a=e.responseXML;if(!a||!a.documentElement)return n&&n(null),!1;t.parseSVGDocument(a.documentElement,(function(e,t,r,i){n&&n(e,t,r,i)}),r,i)}})},loadSVGFromString:function(e,n,r,i){var a=(new t.window.DOMParser).parseFromString(e.trim(),"text/xml");t.parseSVGDocument(a.documentElement,(function(e,t,r,i){n(e,t,r,i)}),r,i)}})}(t),C.ElementsParser=function(e,t,n,r,i,a){this.elements=e,this.callback=t,this.options=n,this.reviver=r,this.svgUid=n&&n.svgUid||0,this.parsingOptions=i,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=a},(g=C.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},g.createObjects=function(){var e=this;this.elements.forEach((function(t,n){t.setAttribute("svgUid",e.svgUid),e.createObject(t,n)}))},g.findTag=function(e){return C[C.util.string.capitalize(e.tagName.replace("svg:",""))]},g.createObject=function(e,t){var n=this.findTag(e);if(n&&n.fromElement)try{n.fromElement(e,this.createCallback(t,e),this.options)}catch(e){C.log(e)}else this.checkIfDone()},g.createCallback=function(e,t){var n=this;return function(r){var i;n.resolveGradient(r,t,"fill"),n.resolveGradient(r,t,"stroke"),r instanceof C.Image&&r._originalElement&&(i=r.parsePreserveAspectRatioAttribute(t)),r._removeTransformMatrix(i),n.resolveClipPath(r,t),n.reviver&&n.reviver(t,r),n.instances[e]=r,n.checkIfDone()}},g.extractPropertyDefinition=function(e,t,n){var r=e[t],i=this.regexUrl;if(i.test(r)){i.lastIndex=0;var a=i.exec(r)[1];return i.lastIndex=0,C[n][this.svgUid][a]}},g.resolveGradient=function(e,t,n){var r=this.extractPropertyDefinition(e,n,"gradientDefs");if(r){var i=t.getAttribute(n+"-opacity"),a=C.Gradient.fromElement(r,e,i,this.options);e.set(n,a)}},g.createClipPathCallback=function(e,t){return function(e){e._removeTransformMatrix(),e.fillRule=e.clipRule,t.push(e)}},g.resolveClipPath=function(e,t){var n,r,i,a,o=this.extractPropertyDefinition(e,"clipPath","clipPaths");if(o){i=[],r=C.util.invertTransform(e.calcTransformMatrix());for(var s=o[0].parentNode,l=t;l.parentNode&&l.getAttribute("clip-path")!==e.clipPath;)l=l.parentNode;l.parentNode.appendChild(s);for(var c=0;c<o.length;c++)n=o[c],this.findTag(n).fromElement(n,this.createClipPathCallback(e,i),this.options);o=1===i.length?i[0]:new C.Group(i),a=C.util.multiplyTransformMatrices(r,o.calcTransformMatrix()),o.clipPath&&this.resolveClipPath(o,l);var u=C.util.qrDecompose(a);o.flipX=!1,o.flipY=!1,o.set("scaleX",u.scaleX),o.set("scaleY",u.scaleY),o.angle=u.angle,o.skewX=u.skewX,o.skewY=0,o.setPositionByOrigin({x:u.translateX,y:u.translateY},"center","center"),e.clipPath=o}else delete e.clipPath},g.checkIfDone=function(){0==--this.numElements&&(this.instances=this.instances.filter((function(e){return null!=e})),this.callback(this.instances,this.elements))},function(e){"use strict";var t=e.fabric||(e.fabric={});function n(e,t){this.x=e,this.y=t}t.Point?t.warn("fabric.Point is already defined"):(t.Point=n,n.prototype={type:"point",constructor:n,add:function(e){return new n(this.x+e.x,this.y+e.y)},addEquals:function(e){return this.x+=e.x,this.y+=e.y,this},scalarAdd:function(e){return new n(this.x+e,this.y+e)},scalarAddEquals:function(e){return this.x+=e,this.y+=e,this},subtract:function(e){return new n(this.x-e.x,this.y-e.y)},subtractEquals:function(e){return this.x-=e.x,this.y-=e.y,this},scalarSubtract:function(e){return new n(this.x-e,this.y-e)},scalarSubtractEquals:function(e){return this.x-=e,this.y-=e,this},multiply:function(e){return new n(this.x*e,this.y*e)},multiplyEquals:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return new n(this.x/e,this.y/e)},divideEquals:function(e){return this.x/=e,this.y/=e,this},eq:function(e){return this.x===e.x&&this.y===e.y},lt:function(e){return this.x<e.x&&this.y<e.y},lte:function(e){return this.x<=e.x&&this.y<=e.y},gt:function(e){return this.x>e.x&&this.y>e.y},gte:function(e){return this.x>=e.x&&this.y>=e.y},lerp:function(e,t){return void 0===t&&(t=.5),t=Math.max(Math.min(1,t),0),new n(this.x+(e.x-this.x)*t,this.y+(e.y-this.y)*t)},distanceFrom:function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},midPointFrom:function(e){return this.lerp(e)},min:function(e){return new n(Math.min(this.x,e.x),Math.min(this.y,e.y))},max:function(e){return new n(Math.max(this.x,e.x),Math.max(this.y,e.y))},toString:function(){return this.x+","+this.y},setXY:function(e,t){return this.x=e,this.y=t,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setFromPoint:function(e){return this.x=e.x,this.y=e.y,this},swap:function(e){var t=this.x,n=this.y;this.x=e.x,this.y=e.y,e.x=t,e.y=n},clone:function(){return new n(this.x,this.y)}})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});function n(e){this.status=e,this.points=[]}t.Intersection?t.warn("fabric.Intersection is already defined"):(t.Intersection=n,t.Intersection.prototype={constructor:n,appendPoint:function(e){return this.points.push(e),this},appendPoints:function(e){return this.points=this.points.concat(e),this}},t.Intersection.intersectLineLine=function(e,r,i,a){var o,s=(a.x-i.x)*(e.y-i.y)-(a.y-i.y)*(e.x-i.x),l=(r.x-e.x)*(e.y-i.y)-(r.y-e.y)*(e.x-i.x),c=(a.y-i.y)*(r.x-e.x)-(a.x-i.x)*(r.y-e.y);if(0!==c){var u=s/c,d=l/c;0<=u&&u<=1&&0<=d&&d<=1?(o=new n("Intersection")).appendPoint(new t.Point(e.x+u*(r.x-e.x),e.y+u*(r.y-e.y))):o=new n}else o=new n(0===s||0===l?"Coincident":"Parallel");return o},t.Intersection.intersectLinePolygon=function(e,t,r){var i,a,o,s,l=new n,c=r.length;for(s=0;s<c;s++)i=r[s],a=r[(s+1)%c],o=n.intersectLineLine(e,t,i,a),l.appendPoints(o.points);return l.points.length>0&&(l.status="Intersection"),l},t.Intersection.intersectPolygonPolygon=function(e,t){var r,i=new n,a=e.length;for(r=0;r<a;r++){var o=e[r],s=e[(r+1)%a],l=n.intersectLinePolygon(o,s,t);i.appendPoints(l.points)}return i.points.length>0&&(i.status="Intersection"),i},t.Intersection.intersectPolygonRectangle=function(e,r,i){var a=r.min(i),o=r.max(i),s=new t.Point(o.x,a.y),l=new t.Point(a.x,o.y),c=n.intersectLinePolygon(a,s,e),u=n.intersectLinePolygon(s,o,e),d=n.intersectLinePolygon(o,l,e),h=n.intersectLinePolygon(l,a,e),f=new n;return f.appendPoints(c.points),f.appendPoints(u.points),f.appendPoints(d.points),f.appendPoints(h.points),f.points.length>0&&(f.status="Intersection"),f})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});function n(e){e?this._tryParsingColor(e):this.setSource([0,0,0,1])}function r(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}t.Color?t.warn("fabric.Color is already defined."):(t.Color=n,t.Color.prototype={_tryParsingColor:function(e){var t;e in n.colorNameMap&&(e=n.colorNameMap[e]),"transparent"===e&&(t=[255,255,255,0]),t||(t=n.sourceFromHex(e)),t||(t=n.sourceFromRgb(e)),t||(t=n.sourceFromHsl(e)),t||(t=[0,0,0,1]),t&&this.setSource(t)},_rgbToHsl:function(e,n,r){e/=255,n/=255,r/=255;var i,a,o,s=t.util.array.max([e,n,r]),l=t.util.array.min([e,n,r]);if(o=(s+l)/2,s===l)i=a=0;else{var c=s-l;switch(a=o>.5?c/(2-s-l):c/(s+l),s){case e:i=(n-r)/c+(n<r?6:0);break;case n:i=(r-e)/c+2;break;case r:i=(e-n)/c+4}i/=6}return[Math.round(360*i),Math.round(100*a),Math.round(100*o)]},getSource:function(){return this._source},setSource:function(e){this._source=e},toRgb:function(){var e=this.getSource();return"rgb("+e[0]+","+e[1]+","+e[2]+")"},toRgba:function(){var e=this.getSource();return"rgba("+e[0]+","+e[1]+","+e[2]+","+e[3]+")"},toHsl:function(){var e=this.getSource(),t=this._rgbToHsl(e[0],e[1],e[2]);return"hsl("+t[0]+","+t[1]+"%,"+t[2]+"%)"},toHsla:function(){var e=this.getSource(),t=this._rgbToHsl(e[0],e[1],e[2]);return"hsla("+t[0]+","+t[1]+"%,"+t[2]+"%,"+e[3]+")"},toHex:function(){var e,t,n,r=this.getSource();return e=1===(e=r[0].toString(16)).length?"0"+e:e,t=1===(t=r[1].toString(16)).length?"0"+t:t,n=1===(n=r[2].toString(16)).length?"0"+n:n,e.toUpperCase()+t.toUpperCase()+n.toUpperCase()},toHexa:function(){var e,t=this.getSource();return e=1===(e=(e=Math.round(255*t[3])).toString(16)).length?"0"+e:e,this.toHex()+e.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(e){var t=this.getSource();return t[3]=e,this.setSource(t),this},toGrayscale:function(){var e=this.getSource(),t=parseInt((.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),10),n=e[3];return this.setSource([t,t,t,n]),this},toBlackWhite:function(e){var t=this.getSource(),n=(.3*t[0]+.59*t[1]+.11*t[2]).toFixed(0),r=t[3];return e=e||127,n=Number(n)<Number(e)?0:255,this.setSource([n,n,n,r]),this},overlayWith:function(e){e instanceof n||(e=new n(e));var t,r=[],i=this.getAlpha(),a=this.getSource(),o=e.getSource();for(t=0;t<3;t++)r.push(Math.round(.5*a[t]+.5*o[t]));return r[3]=i,this.setSource(r),this}},t.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,t.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,t.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,t.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},t.Color.fromRgb=function(e){return n.fromSource(n.sourceFromRgb(e))},t.Color.sourceFromRgb=function(e){var t=e.match(n.reRGBa);if(t){var r=parseInt(t[1],10)/(/%$/.test(t[1])?100:1)*(/%$/.test(t[1])?255:1),i=parseInt(t[2],10)/(/%$/.test(t[2])?100:1)*(/%$/.test(t[2])?255:1),a=parseInt(t[3],10)/(/%$/.test(t[3])?100:1)*(/%$/.test(t[3])?255:1);return[parseInt(r,10),parseInt(i,10),parseInt(a,10),t[4]?parseFloat(t[4]):1]}},t.Color.fromRgba=n.fromRgb,t.Color.fromHsl=function(e){return n.fromSource(n.sourceFromHsl(e))},t.Color.sourceFromHsl=function(e){var t=e.match(n.reHSLa);if(t){var i,a,o,s=(parseFloat(t[1])%360+360)%360/360,l=parseFloat(t[2])/(/%$/.test(t[2])?100:1),c=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(0===l)i=a=o=c;else{var u=c<=.5?c*(l+1):c+l-c*l,d=2*c-u;i=r(d,u,s+1/3),a=r(d,u,s),o=r(d,u,s-1/3)}return[Math.round(255*i),Math.round(255*a),Math.round(255*o),t[4]?parseFloat(t[4]):1]}},t.Color.fromHsla=n.fromHsl,t.Color.fromHex=function(e){return n.fromSource(n.sourceFromHex(e))},t.Color.sourceFromHex=function(e){if(e.match(n.reHex)){var t=e.slice(e.indexOf("#")+1),r=3===t.length||4===t.length,i=8===t.length||4===t.length,a=r?t.charAt(0)+t.charAt(0):t.substring(0,2),o=r?t.charAt(1)+t.charAt(1):t.substring(2,4),s=r?t.charAt(2)+t.charAt(2):t.substring(4,6),l=i?r?t.charAt(3)+t.charAt(3):t.substring(6,8):"FF";return[parseInt(a,16),parseInt(o,16),parseInt(s,16),parseFloat((parseInt(l,16)/255).toFixed(2))]}},t.Color.fromSource=function(e){var t=new n;return t.setSource(e),t})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=["e","se","s","sw","w","nw","n","ne","e"],r=["ns","nesw","ew","nwse"],i={},a="left",o="top",s={top:"bottom",bottom:o,left:"right",right:a,center:"center"},l=t.util.radiansToDegrees,c=Math.sign||function(e){return(e>0)-(e<0)||+e};function u(e,t){var n=e.angle+l(Math.atan2(t.y,t.x))+360;return Math.round(n%360/45)}function d(e,n){var r=n.transform.target,i=r.canvas,a=t.util.object.clone(n);a.target=r,i&&i.fire("object:"+e,a),r.fire(e,n)}function h(e,t){var n=t.canvas,r=e[n.uniScaleKey];return n.uniformScaling&&!r||!n.uniformScaling&&r}function f(e){return"center"===e.originX&&"center"===e.originY}function p(e,t,n){var r=e.lockScalingX,i=e.lockScalingY;return!(!r||!i)||(!(t||!r&&!i||!n)||(!(!r||"x"!==t)||!(!i||"y"!==t)))}function m(e,t,n,r){return{e:e,transform:t,pointer:{x:n,y:r}}}function g(e){return function(t,n,r,i){var a=n.target,o=a.getCenterPoint(),s=a.translateToOriginPoint(o,n.originX,n.originY),l=e(t,n,r,i);return a.setPositionByOrigin(s,n.originX,n.originY),l}}function v(e,n,r,i,a){var o=e.target,s=o.controls[e.corner],l=o.canvas.getZoom(),c=o.padding/l,u=o.toLocalPoint(new t.Point(i,a),n,r);return u.x>=c&&(u.x-=c),u.x<=-c&&(u.x+=c),u.y>=c&&(u.y-=c),u.y<=c&&(u.y+=c),u.x-=s.offsetX,u.y-=s.offsetY,u}function b(e){return e.flipX&&!e.flipY||!e.flipX&&e.flipY}function y(e,t,n,r,i){if(0!==e[t]){var a=i/e._getTransformedDimensions()[r]*e[n];e.set(n,a)}}function A(e,t,n,r){var i,s=t.target,c=s._getTransformedDimensions(0,s.skewY),u=v(t,t.originX,t.originY,n,r),h=Math.abs(2*u.x)-c.x,f=s.skewX;h<2?i=0:(i=l(Math.atan2(h/s.scaleX,c.y/s.scaleY)),t.originX===a&&"bottom"===t.originY&&(i=-i),"right"===t.originX&&t.originY===o&&(i=-i),b(s)&&(i=-i));var p=f!==i;if(p){var g=s._getTransformedDimensions().y;s.set("skewX",i),y(s,"skewY","scaleY","y",g),d("skewing",m(e,t,n,r))}return p}function _(e,t,n,r){var i,s=t.target,c=s._getTransformedDimensions(s.skewX,0),u=v(t,t.originX,t.originY,n,r),h=Math.abs(2*u.y)-c.y,f=s.skewY;h<2?i=0:(i=l(Math.atan2(h/s.scaleY,c.x/s.scaleX)),t.originX===a&&"bottom"===t.originY&&(i=-i),"right"===t.originX&&t.originY===o&&(i=-i),b(s)&&(i=-i));var p=f!==i;if(p){var g=s._getTransformedDimensions().x;s.set("skewY",i),y(s,"skewX","scaleX","x",g),d("skewing",m(e,t,n,r))}return p}function w(e,t,n,r,i){i=i||{};var a,o,l,u,g,b,y=t.target,A=y.lockScalingX,_=y.lockScalingY,w=i.by,E=h(e,y),S=p(y,w,E),C=t.gestureScale;if(S)return!1;if(C)o=t.scaleX*C,l=t.scaleY*C;else{if(a=v(t,t.originX,t.originY,n,r),g="y"!==w?c(a.x):1,b="x"!==w?c(a.y):1,t.signX||(t.signX=g),t.signY||(t.signY=b),y.lockScalingFlip&&(t.signX!==g||t.signY!==b))return!1;if(u=y._getTransformedDimensions(),E&&!w){var T,k=Math.abs(a.x)+Math.abs(a.y),x=t.original,O=k/(Math.abs(u.x*x.scaleX/y.scaleX)+Math.abs(u.y*x.scaleY/y.scaleY));o=x.scaleX*O,l=x.scaleY*O}else o=Math.abs(a.x*y.scaleX/u.x),l=Math.abs(a.y*y.scaleY/u.y);f(t)&&(o*=2,l*=2),t.signX!==g&&"y"!==w&&(t.originX=s[t.originX],o*=-1,t.signX=g),t.signY!==b&&"x"!==w&&(t.originY=s[t.originY],l*=-1,t.signY=b)}var I=y.scaleX,M=y.scaleY;return w?("x"===w&&y.set("scaleX",o),"y"===w&&y.set("scaleY",l)):(!A&&y.set("scaleX",o),!_&&y.set("scaleY",l)),(T=I!==y.scaleX||M!==y.scaleY)&&d("scaling",m(e,t,n,r)),T}i.scaleCursorStyleHandler=function(e,t,r){var i=h(e,r),a="";if(0!==t.x&&0===t.y?a="x":0===t.x&&0!==t.y&&(a="y"),p(r,a,i))return"not-allowed";var o=u(r,t);return n[o]+"-resize"},i.skewCursorStyleHandler=function(e,t,n){if(0!==t.x&&n.lockSkewingY)return"not-allowed";if(0!==t.y&&n.lockSkewingX)return"not-allowed";var i=u(n,t)%4;return r[i]+"-resize"},i.scaleSkewCursorStyleHandler=function(e,t,n){return e[n.canvas.altActionKey]?i.skewCursorStyleHandler(e,t,n):i.scaleCursorStyleHandler(e,t,n)},i.rotationWithSnapping=g((function(e,t,n,r){var i=t,a=i.target,o=a.translateToOriginPoint(a.getCenterPoint(),i.originX,i.originY);if(a.lockRotation)return!1;var s,c=Math.atan2(i.ey-o.y,i.ex-o.x),u=Math.atan2(r-o.y,n-o.x),h=l(u-c+i.theta);if(a.snapAngle>0){var f=a.snapAngle,p=a.snapThreshold||f,g=Math.ceil(h/f)*f,v=Math.floor(h/f)*f;Math.abs(h-v)<p?h=v:Math.abs(h-g)<p&&(h=g)}return h<0&&(h=360+h),h%=360,s=a.angle!==h,a.angle=h,s&&d("rotating",m(e,t,n,r)),s})),i.scalingEqually=g((function(e,t,n,r){return w(e,t,n,r)})),i.scalingX=g((function(e,t,n,r){return w(e,t,n,r,{by:"x"})})),i.scalingY=g((function(e,t,n,r){return w(e,t,n,r,{by:"y"})})),i.scalingYOrSkewingX=function(e,t,n,r){return e[t.target.canvas.altActionKey]?i.skewHandlerX(e,t,n,r):i.scalingY(e,t,n,r)},i.scalingXOrSkewingY=function(e,t,n,r){return e[t.target.canvas.altActionKey]?i.skewHandlerY(e,t,n,r):i.scalingX(e,t,n,r)},i.changeWidth=g((function(e,t,n,r){var i,a=t.target,o=v(t,t.originX,t.originY,n,r),s=a.strokeWidth/(a.strokeUniform?a.scaleX:1),l=f(t)?2:1,c=a.width,u=Math.abs(o.x*l/a.scaleX)-s;return a.set("width",Math.max(u,0)),(i=c!==u)&&d("resizing",m(e,t,n,r)),i})),i.skewHandlerX=function(e,t,n,r){var i,s=t.target,l=s.skewX,c=t.originY;return!s.lockSkewingX&&(0===l?i=v(t,"center","center",n,r).x>0?a:"right":(l>0&&(i=c===o?a:"right"),l<0&&(i=c===o?"right":a),b(s)&&(i=i===a?"right":a)),t.originX=i,g(A)(e,t,n,r))},i.skewHandlerY=function(e,t,n,r){var i,s=t.target,l=s.skewY,c=t.originX;return!s.lockSkewingY&&(0===l?i=v(t,"center","center",n,r).y>0?o:"bottom":(l>0&&(i=c===a?o:"bottom"),l<0&&(i=c===a?"bottom":o),b(s)&&(i=i===o?"bottom":o)),t.originY=i,g(_)(e,t,n,r))},i.dragHandler=function(e,t,n,r){var i=t.target,a=n-t.offsetX,o=r-t.offsetY,s=!i.get("lockMovementX")&&i.left!==a,l=!i.get("lockMovementY")&&i.top!==o;return s&&i.set("left",a),l&&i.set("top",o),(s||l)&&d("moving",m(e,t,n,r)),s||l},i.scaleOrSkewActionName=function(e,t,n){var r=e[n.canvas.altActionKey];return 0===t.x?r?"skewX":"scaleY":0===t.y?r?"skewY":"scaleX":void 0},i.rotationStyleHandler=function(e,t,n){return n.lockRotation?"not-allowed":t.cursorStyle},i.fireEvent=d,i.wrapWithFixedAnchor=g,i.getLocalPoint=v,t.controlsUtils=i}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.degreesToRadians,r=t.controlsUtils;r.renderCircleControl=function(e,t,n,r,i){var a=(r=r||{}).cornerSize||i.cornerSize,o=void 0!==r.transparentCorners?r.transparentCorners:this.transparentCorners,s=o?"stroke":"fill",l=!o&&(r.cornerStrokeColor||i.cornerStrokeColor);e.save(),e.fillStyle=r.cornerColor||i.cornerColor,e.strokeStyle=r.cornerStrokeColor||i.cornerStrokeColor,e.lineWidth=1,e.beginPath(),e.arc(t,n,a/2,0,2*Math.PI,!1),e[s](),l&&e.stroke(),e.restore()},r.renderSquareControl=function(e,t,r,i,a){var o=(i=i||{}).cornerSize||a.cornerSize,s=void 0!==i.transparentCorners?i.transparentCorners:a.transparentCorners,l=s?"stroke":"fill",c=!s&&(i.cornerStrokeColor||a.cornerStrokeColor),u=o/2;e.save(),e.fillStyle=i.cornerColor||a.cornerColor,e.strokeStyle=i.strokeCornerColor||a.strokeCornerColor,e.lineWidth=1,e.translate(t,r),e.rotate(n(a.angle)),e[l+"Rect"](-u,-u,o,o),c&&e.strokeRect(-u,-u,o,o),e.restore()}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Control=function(e){for(var t in e)this[t]=e[t]},t.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(e,t){return t.cursorStyle},getActionName:function(e,t){return t.actionName},getVisibility:function(e,t){var n=e._controlsVisibility;return n&&void 0!==n[t]?n[t]:this.visible},setVisibility:function(e){this.visible=e},positionHandler:function(e,n){return t.util.transformPoint({x:this.x*e.x+this.offsetX,y:this.y*e.y+this.offsetY},n)},render:function(e,n,r,i,a){switch((i=i||{}).cornerStyle||a.cornerStyle){case"circle":t.controlsUtils.renderCircleControl.call(this,e,n,r,i,a);break;default:t.controlsUtils.renderSquareControl.call(this,e,n,r,i,a)}}}}(t),function(){function e(e,t){var n,r,i,a,o=e.getAttribute("style"),s=e.getAttribute("offset")||0;if(s=(s=parseFloat(s)/(/%$/.test(s)?100:1))<0?0:s>1?1:s,o){var l=o.split(/\s*;\s*/);for(""===l[l.length-1]&&l.pop(),a=l.length;a--;){var c=l[a].split(/\s*:\s*/),u=c[0].trim(),d=c[1].trim();"stop-color"===u?n=d:"stop-opacity"===u&&(i=d)}}return n||(n=e.getAttribute("stop-color")||"rgb(0,0,0)"),i||(i=e.getAttribute("stop-opacity")),r=(n=new C.Color(n)).getAlpha(),i=isNaN(parseFloat(i))?1:parseFloat(i),i*=r*t,{offset:s,color:n.toRgb(),opacity:i}}var t=C.util.object.clone;C.Gradient=C.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(e){e||(e={}),e.coords||(e.coords={});var t,n=this;Object.keys(e).forEach((function(t){n[t]=e[t]})),this.id?this.id+="_"+C.Object.__uid++:this.id=C.Object.__uid++,t={x1:e.coords.x1||0,y1:e.coords.y1||0,x2:e.coords.x2||0,y2:e.coords.y2||0},"radial"===this.type&&(t.r1=e.coords.r1||0,t.r2=e.coords.r2||0),this.coords=t,this.colorStops=e.colorStops.slice()},addColorStop:function(e){for(var t in e){var n=new C.Color(e[t]);this.colorStops.push({offset:parseFloat(t),color:n.toRgb(),opacity:n.getAlpha()})}return this},toObject:function(e){var t={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return C.util.populateWithProperties(this,t,e),t},toSVG:function(e,n){var r,i,a,o,s=t(this.coords,!0),l=(n=n||{},t(this.colorStops,!0)),c=s.r1>s.r2,u=this.gradientTransform?this.gradientTransform.concat():C.iMatrix.concat(),d=-this.offsetX,h=-this.offsetY,f=!!n.additionalTransform,p="pixels"===this.gradientUnits?"userSpaceOnUse":"objectBoundingBox";if(l.sort((function(e,t){return e.offset-t.offset})),"objectBoundingBox"===p?(d/=e.width,h/=e.height):(d+=e.width/2,h+=e.height/2),"path"===e.type&&(d-=e.pathOffset.x,h-=e.pathOffset.y),u[4]-=d,u[5]-=h,o='id="SVGID_'+this.id+'" gradientUnits="'+p+'"',o+=' gradientTransform="'+(f?n.additionalTransform+" ":"")+C.util.matrixToSVG(u)+'" ',"linear"===this.type?a=["<linearGradient ",o,' x1="',s.x1,'" y1="',s.y1,'" x2="',s.x2,'" y2="',s.y2,'">\n']:"radial"===this.type&&(a=["<radialGradient ",o,' cx="',c?s.x1:s.x2,'" cy="',c?s.y1:s.y2,'" r="',c?s.r1:s.r2,'" fx="',c?s.x2:s.x1,'" fy="',c?s.y2:s.y1,'">\n']),"radial"===this.type){if(c)for((l=l.concat()).reverse(),r=0,i=l.length;r<i;r++)l[r].offset=1-l[r].offset;var m=Math.min(s.r1,s.r2);if(m>0){var g=m/Math.max(s.r1,s.r2);for(r=0,i=l.length;r<i;r++)l[r].offset+=g*(1-l[r].offset)}}for(r=0,i=l.length;r<i;r++){var v=l[r];a.push("<stop ",'offset="',100*v.offset+"%",'" style="stop-color:',v.color,void 0!==v.opacity?";stop-opacity: "+v.opacity:";",'"/>\n')}return a.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),a.join("")},toLive:function(e){var t,n,r,i=C.util.object.clone(this.coords);if(this.type){for("linear"===this.type?t=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2):"radial"===this.type&&(t=e.createRadialGradient(i.x1,i.y1,i.r1,i.x2,i.y2,i.r2)),n=0,r=this.colorStops.length;n<r;n++){var a=this.colorStops[n].color,o=this.colorStops[n].opacity,s=this.colorStops[n].offset;void 0!==o&&(a=new C.Color(a).setAlpha(o).toRgba()),t.addColorStop(s,a)}return t}}}),C.util.object.extend(C.Gradient,{fromElement:function(t,n,r,i){var a=parseFloat(r)/(/%$/.test(r)?100:1);a=a<0?0:a>1?1:a,isNaN(a)&&(a=1);var o,s,l,c,u=t.getElementsByTagName("stop"),d="userSpaceOnUse"===t.getAttribute("gradientUnits")?"pixels":"percentage",h=t.getAttribute("gradientTransform")||"",f=[],p=0,m=0;for("linearGradient"===t.nodeName||"LINEARGRADIENT"===t.nodeName?(o="linear",s=function(e){return{x1:e.getAttribute("x1")||0,y1:e.getAttribute("y1")||0,x2:e.getAttribute("x2")||"100%",y2:e.getAttribute("y2")||0}}(t)):(o="radial",s=function(e){return{x1:e.getAttribute("fx")||e.getAttribute("cx")||"50%",y1:e.getAttribute("fy")||e.getAttribute("cy")||"50%",r1:0,x2:e.getAttribute("cx")||"50%",y2:e.getAttribute("cy")||"50%",r2:e.getAttribute("r")||"50%"}}(t)),l=u.length;l--;)f.push(e(u[l],a));return c=C.parseTransformAttribute(h),function(e,t,n,r){var i,a;Object.keys(t).forEach((function(e){"Infinity"===(i=t[e])?a=1:"-Infinity"===i?a=0:(a=parseFloat(t[e],10),"string"==typeof i&&/^(\d+\.\d+)%|(\d+)%$/.test(i)&&(a*=.01,"pixels"===r&&("x1"!==e&&"x2"!==e&&"r2"!==e||(a*=n.viewBoxWidth||n.width),"y1"!==e&&"y2"!==e||(a*=n.viewBoxHeight||n.height)))),t[e]=a}))}(0,s,i,d),"pixels"===d&&(p=-n.left,m=-n.top),new C.Gradient({id:t.getAttribute("id"),type:o,coords:s,colorStops:f,gradientUnits:d,gradientTransform:c,offsetX:p,offsetY:m})}})}(),function(){"use strict";var e=C.util.toFixed;C.Pattern=C.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(e,t){if(e||(e={}),this.id=C.Object.__uid++,this.setOptions(e),!e.source||e.source&&"string"!=typeof e.source)t&&t(this);else{var n=this;this.source=C.util.createImage(),C.util.loadImage(e.source,(function(e,r){n.source=e,t&&t(n,r)}),null,this.crossOrigin)}},toObject:function(t){var n,r,i=C.Object.NUM_FRACTION_DIGITS;return"string"==typeof this.source.src?n=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(n=this.source.toDataURL()),r={type:"pattern",source:n,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:e(this.offsetX,i),offsetY:e(this.offsetY,i),patternTransform:this.patternTransform?this.patternTransform.concat():null},C.util.populateWithProperties(this,r,t),r},toSVG:function(e){var t="function"==typeof this.source?this.source():this.source,n=t.width/e.width,r=t.height/e.height,i=this.offsetX/e.width,a=this.offsetY/e.height,o="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(r=1,a&&(r+=Math.abs(a))),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(n=1,i&&(n+=Math.abs(i))),t.src?o=t.src:t.toDataURL&&(o=t.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+i+'" y="'+a+'" width="'+n+'" height="'+r+'">\n<image x="0" y="0" width="'+t.width+'" height="'+t.height+'" xlink:href="'+o+'"></image>\n</pattern>\n'},setOptions:function(e){for(var t in e)this[t]=e[t]},toLive:function(e){var t=this.source;if(!t)return"";if(void 0!==t.src){if(!t.complete)return"";if(0===t.naturalWidth||0===t.naturalHeight)return""}return e.createPattern(t,this.repeat)}})}(),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.toFixed;t.Shadow?t.warn("fabric.Shadow is already defined."):(t.Shadow=t.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1,initialize:function(e){for(var n in"string"==typeof e&&(e=this._parseShadow(e)),e)this[n]=e[n];this.id=t.Object.__uid++},_parseShadow:function(e){var n=e.trim(),r=t.Shadow.reOffsetsAndBlur.exec(n)||[];return{color:(n.replace(t.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseInt(r[1],10)||0,offsetY:parseInt(r[2],10)||0,blur:parseInt(r[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(e){var r=40,i=40,a=t.Object.NUM_FRACTION_DIGITS,o=t.util.rotateVector({x:this.offsetX,y:this.offsetY},t.util.degreesToRadians(-e.angle)),s=new t.Color(this.color);return e.width&&e.height&&(r=100*n((Math.abs(o.x)+this.blur)/e.width,a)+20,i=100*n((Math.abs(o.y)+this.blur)/e.height,a)+20),e.flipX&&(o.x*=-1),e.flipY&&(o.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+i+'%" height="'+(100+2*i)+'%" x="-'+r+'%" width="'+(100+2*r)+'%" >\n\t<feGaussianBlur in="SourceAlpha" stdDeviation="'+n(this.blur?this.blur/2:0,a)+'"></feGaussianBlur>\n\t<feOffset dx="'+n(o.x,a)+'" dy="'+n(o.y,a)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+s.toRgb()+'" flood-opacity="'+s.getAlpha()+'"/>\n\t<feComposite in2="oBlur" operator="in" />\n\t<feMerge>\n\t\t<feMergeNode></feMergeNode>\n\t\t<feMergeNode in="SourceGraphic"></feMergeNode>\n\t</feMerge>\n</filter>\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var e={},n=t.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach((function(t){this[t]!==n[t]&&(e[t]=this[t])}),this),e}}),t.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:px)?(?:\s?|$))?(-?\d+(?:px)?(?:\s?|$))?(\d+(?:px)?)?(?:\s?|$)(?:$|\s)/)}(t),function(){"use strict";if(C.StaticCanvas)C.warn("fabric.StaticCanvas is already defined.");else{var e=C.util.object.extend,t=C.util.getElementOffset,n=C.util.removeFromArray,r=C.util.toFixed,i=C.util.transformPoint,a=C.util.invertTransform,o=C.util.getNodeCanvas,s=C.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");C.StaticCanvas=C.util.createClass(C.CommonMethods,{initialize:function(e,t){t||(t={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(e,t)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:C.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(e,t){var n=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(e),this._initOptions(t),this.interactive||this._initRetinaScaling(),t.overlayImage&&this.setOverlayImage(t.overlayImage,n),t.backgroundImage&&this.setBackgroundImage(t.backgroundImage,n),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor,n),t.overlayColor&&this.setOverlayColor(t.overlayColor,n),this.calcOffset()},_isRetinaScaling:function(){return 1!==C.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?C.devicePixelRatio:1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var e=C.devicePixelRatio;this.__initRetinaScaling(e,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(e,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(e,t,n){t.setAttribute("width",this.width*e),t.setAttribute("height",this.height*e),n.scale(e,e)},calcOffset:function(){return this._offset=t(this.lowerCanvasEl),this},setOverlayImage:function(e,t,n){return this.__setBgOverlayImage("overlayImage",e,t,n)},setBackgroundImage:function(e,t,n){return this.__setBgOverlayImage("backgroundImage",e,t,n)},setOverlayColor:function(e,t){return this.__setBgOverlayColor("overlayColor",e,t)},setBackgroundColor:function(e,t){return this.__setBgOverlayColor("backgroundColor",e,t)},__setBgOverlayImage:function(e,t,n,r){return"string"==typeof t?C.util.loadImage(t,(function(t,i){if(t){var a=new C.Image(t,r);this[e]=a,a.canvas=this}n&&n(t,i)}),this,r&&r.crossOrigin):(r&&t.setOptions(r),this[e]=t,t&&(t.canvas=this),n&&n(t,!1)),this},__setBgOverlayColor:function(e,t,n){return this[e]=t,this._initGradient(t,e),this._initPattern(t,e,n),this},_createCanvasElement:function(){var e=s();if(!e)throw l;if(e.style||(e.style={}),void 0===e.getContext)throw l;return e},_initOptions:function(e){var t=this.lowerCanvasEl;this._setOptions(e),this.width=this.width||parseInt(t.width,10)||0,this.height=this.height||parseInt(t.height,10)||0,this.lowerCanvasEl.style&&(t.width=this.width,t.height=this.height,t.style.width=this.width+"px",t.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(e){e&&e.getContext?this.lowerCanvasEl=e:this.lowerCanvasEl=C.util.getById(e)||this._createCanvasElement(),C.util.addClass(this.lowerCanvasEl,"lower-canvas"),this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(e,t){return this.setDimensions({width:e},t)},setHeight:function(e,t){return this.setDimensions({height:e},t)},setDimensions:function(e,t){var n;for(var r in t=t||{},e)n=e[r],t.cssOnly||(this._setBackstoreDimension(r,e[r]),n+="px",this.hasLostContext=!0),t.backstoreOnly||this._setCssDimension(r,n);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(),this._initRetinaScaling(),this.calcOffset(),t.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(e,t){return this.lowerCanvasEl[e]=t,this.upperCanvasEl&&(this.upperCanvasEl[e]=t),this.cacheCanvasEl&&(this.cacheCanvasEl[e]=t),this[e]=t,this},_setCssDimension:function(e,t){return this.lowerCanvasEl.style[e]=t,this.upperCanvasEl&&(this.upperCanvasEl.style[e]=t),this.wrapperEl&&(this.wrapperEl.style[e]=t),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(e){var t,n,r,i=this._activeObject;for(this.viewportTransform=e,n=0,r=this._objects.length;n<r;n++)(t=this._objects[n]).group||t.setCoords(!0);return i&&i.setCoords(),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},zoomToPoint:function(e,t){var n=e,r=this.viewportTransform.slice(0);e=i(e,a(this.viewportTransform)),r[0]=t,r[3]=t;var o=i(e,r);return r[4]+=n.x-o.x,r[5]+=n.y-o.y,this.setViewportTransform(r)},setZoom:function(e){return this.zoomToPoint(new C.Point(0,0),e),this},absolutePan:function(e){var t=this.viewportTransform.slice(0);return t[4]=-e.x,t[5]=-e.y,this.setViewportTransform(t)},relativePan:function(e){return this.absolutePan(new C.Point(-e.x-this.viewportTransform[4],-e.y-this.viewportTransform[5]))},getElement:function(){return this.lowerCanvasEl},_onObjectAdded:function(e){this.stateful&&e.setupState(),e._set("canvas",this),e.setCoords(),this.fire("object:added",{target:e}),e.fire("added")},_onObjectRemoved:function(e){this.fire("object:removed",{target:e}),e.fire("removed"),delete e.canvas},clearContext:function(e){return e.clearRect(0,0,this.width,this.height),this},getContext:function(){return this.contextContainer},clear:function(){return this._objects.length=0,this.backgroundImage=null,this.overlayImage=null,this.backgroundColor="",this.overlayColor="",this._hasITextHandlers&&(this.off("mouse:up",this._mouseUpITextHandler),this._iTextInstances=null,this._hasITextHandlers=!1),this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll(),this},renderAll:function(){var e=this.contextContainer;return this.renderCanvas(e,this._objects),this},renderAndReset:function(){this.isRendering=0,this.renderAll()},requestRenderAll:function(){return this.isRendering||(this.isRendering=C.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var e={},t=this.width,n=this.height,r=a(this.viewportTransform);return e.tl=i({x:0,y:0},r),e.br=i({x:t,y:n},r),e.tr=new C.Point(e.br.x,e.tl.y),e.bl=new C.Point(e.tl.x,e.br.y),this.vptCoords=e,e},cancelRequestedRender:function(){this.isRendering&&(C.util.cancelAnimFrame(this.isRendering),this.isRendering=0)},renderCanvas:function(e,t){var n=this.viewportTransform,r=this.clipPath;this.cancelRequestedRender(),this.calcViewportBoundaries(),this.clearContext(e),C.util.setImageSmoothing(e,this.imageSmoothingEnabled),this.fire("before:render",{ctx:e}),this._renderBackground(e),e.save(),e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this._renderObjects(e,t),e.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(e),r&&(r.canvas=this,r.shouldCache(),r._transformDone=!0,r.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(e)),this._renderOverlay(e),this.controlsAboveOverlay&&this.interactive&&this.drawControls(e),this.fire("after:render",{ctx:e})},drawClipPathOnCanvas:function(e){var t=this.viewportTransform,n=this.clipPath;e.save(),e.transform(t[0],t[1],t[2],t[3],t[4],t[5]),e.globalCompositeOperation="destination-in",n.transform(e),e.scale(1/n.zoomX,1/n.zoomY),e.drawImage(n._cacheCanvas,-n.cacheTranslationX,-n.cacheTranslationY),e.restore()},_renderObjects:function(e,t){var n,r;for(n=0,r=t.length;n<r;++n)t[n]&&t[n].render(e)},_renderBackgroundOrOverlay:function(e,t){var n=this[t+"Color"],r=this[t+"Image"],i=this.viewportTransform,a=this[t+"Vpt"];if(n||r){if(n){e.save(),e.beginPath(),e.moveTo(0,0),e.lineTo(this.width,0),e.lineTo(this.width,this.height),e.lineTo(0,this.height),e.closePath(),e.fillStyle=n.toLive?n.toLive(e,this):n,a&&e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.transform(1,0,0,1,n.offsetX||0,n.offsetY||0);var o=n.gradientTransform||n.patternTransform;o&&e.transform(o[0],o[1],o[2],o[3],o[4],o[5]),e.fill(),e.restore()}r&&(e.save(),a&&e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),r.render(e),e.restore())}},_renderBackground:function(e){this._renderBackgroundOrOverlay(e,"background")},_renderOverlay:function(e){this._renderBackgroundOrOverlay(e,"overlay")},getCenter:function(){return{top:this.height/2,left:this.width/2}},centerObjectH:function(e){return this._centerObject(e,new C.Point(this.getCenter().left,e.getCenterPoint().y))},centerObjectV:function(e){return this._centerObject(e,new C.Point(e.getCenterPoint().x,this.getCenter().top))},centerObject:function(e){var t=this.getCenter();return this._centerObject(e,new C.Point(t.left,t.top))},viewportCenterObject:function(e){var t=this.getVpCenter();return this._centerObject(e,t)},viewportCenterObjectH:function(e){var t=this.getVpCenter();return this._centerObject(e,new C.Point(t.x,e.getCenterPoint().y)),this},viewportCenterObjectV:function(e){var t=this.getVpCenter();return this._centerObject(e,new C.Point(e.getCenterPoint().x,t.y))},getVpCenter:function(){var e=this.getCenter(),t=a(this.viewportTransform);return i({x:e.left,y:e.top},t)},_centerObject:function(e,t){return e.setPositionByOrigin(t,"center","center"),e.setCoords(),this.renderOnAddRemove&&this.requestRenderAll(),this},toDatalessJSON:function(e){return this.toDatalessObject(e)},toObject:function(e){return this._toObjectMethod("toObject",e)},toDatalessObject:function(e){return this._toObjectMethod("toDatalessObject",e)},_toObjectMethod:function(t,n){var r=this.clipPath,i={version:C.version,objects:this._toObjects(t,n)};return r&&(i.clipPath=this._toObject(this.clipPath,t,n)),e(i,this.__serializeBgOverlay(t,n)),C.util.populateWithProperties(this,i,n),i},_toObjects:function(e,t){return this._objects.filter((function(e){return!e.excludeFromExport})).map((function(n){return this._toObject(n,e,t)}),this)},_toObject:function(e,t,n){var r;this.includeDefaultValues||(r=e.includeDefaultValues,e.includeDefaultValues=!1);var i=e[t](n);return this.includeDefaultValues||(e.includeDefaultValues=r),i},__serializeBgOverlay:function(e,t){var n={},r=this.backgroundImage,i=this.overlayImage;return this.backgroundColor&&(n.background=this.backgroundColor.toObject?this.backgroundColor.toObject(t):this.backgroundColor),this.overlayColor&&(n.overlay=this.overlayColor.toObject?this.overlayColor.toObject(t):this.overlayColor),r&&!r.excludeFromExport&&(n.backgroundImage=this._toObject(r,e,t)),i&&!i.excludeFromExport&&(n.overlayImage=this._toObject(i,e,t)),n},svgViewportTransformation:!0,toSVG:function(e,t){e||(e={}),e.reviver=t;var n=[];return this._setSVGPreamble(n,e),this._setSVGHeader(n,e),this.clipPath&&n.push('<g clip-path="url(#'+this.clipPath.clipPathId+')" >\n'),this._setSVGBgOverlayColor(n,"background"),this._setSVGBgOverlayImage(n,"backgroundImage",t),this._setSVGObjects(n,t),this.clipPath&&n.push("</g>\n"),this._setSVGBgOverlayColor(n,"overlay"),this._setSVGBgOverlayImage(n,"overlayImage",t),n.push("</svg>"),n.join("")},_setSVGPreamble:function(e,t){t.suppressPreamble||e.push('<?xml version="1.0" encoding="',t.encoding||"UTF-8",'" standalone="no" ?>\n','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ','"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')},_setSVGHeader:function(e,t){var n,i=t.width||this.width,a=t.height||this.height,o='viewBox="0 0 '+this.width+" "+this.height+'" ',s=C.Object.NUM_FRACTION_DIGITS;t.viewBox?o='viewBox="'+t.viewBox.x+" "+t.viewBox.y+" "+t.viewBox.width+" "+t.viewBox.height+'" ':this.svgViewportTransformation&&(n=this.viewportTransform,o='viewBox="'+r(-n[4]/n[0],s)+" "+r(-n[5]/n[3],s)+" "+r(this.width/n[0],s)+" "+r(this.height/n[3],s)+'" '),e.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',i,'" ','height="',a,'" ',o,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",C.version,"</desc>\n","<defs>\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(t),"</defs>\n")},createSVGClipPathMarkup:function(e){var t=this.clipPath;return t?(t.clipPathId="CLIPPATH_"+C.Object.__uid++,'<clipPath id="'+t.clipPathId+'" >\n'+this.clipPath.toClipPathSVG(e.reviver)+"</clipPath>\n"):""},createSVGRefElementsMarkup:function(){var e=this;return["background","overlay"].map((function(t){var n=e[t+"Color"];if(n&&n.toLive){var r=e[t+"Vpt"],i=e.viewportTransform,a={width:e.width/(r?i[0]:1),height:e.height/(r?i[3]:1)};return n.toSVG(a,{additionalTransform:r?C.util.matrixToSVG(i):""})}})).join("")},createSVGFontFacesMarkup:function(){var e,t,n,r,i,a,o,s,l="",c={},u=C.fontPaths,d=[];for(this._objects.forEach((function e(t){d.push(t),t._objects&&t._objects.forEach(e)})),o=0,s=d.length;o<s;o++)if(t=(e=d[o]).fontFamily,-1!==e.type.indexOf("text")&&!c[t]&&u[t]&&(c[t]=!0,e.styles))for(i in n=e.styles)for(a in r=n[i])!c[t=r[a].fontFamily]&&u[t]&&(c[t]=!0);for(var h in c)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",h,"';\n","\t\t\tsrc: url('",u[h],"');\n","\t\t}\n"].join("");return l&&(l=['\t<style type="text/css">',"<![CDATA[\n",l,"]]>","</style>\n"].join("")),l},_setSVGObjects:function(e,t){var n,r,i,a=this._objects;for(r=0,i=a.length;r<i;r++)(n=a[r]).excludeFromExport||this._setSVGObject(e,n,t)},_setSVGObject:function(e,t,n){e.push(t.toSVG(n))},_setSVGBgOverlayImage:function(e,t,n){this[t]&&!this[t].excludeFromExport&&this[t].toSVG&&e.push(this[t].toSVG(n))},_setSVGBgOverlayColor:function(e,t){var n=this[t+"Color"],r=this.viewportTransform,i=this.width,a=this.height;if(n)if(n.toLive){var o=n.repeat,s=C.util.invertTransform(r),l=this[t+"Vpt"]?C.util.matrixToSVG(s):"";e.push('<rect transform="'+l+" translate(",i/2,",",a/2,')"',' x="',n.offsetX-i/2,'" y="',n.offsetY-a/2,'" ','width="',"repeat-y"===o||"no-repeat"===o?n.source.width:i,'" height="',"repeat-x"===o||"no-repeat"===o?n.source.height:a,'" fill="url(#SVGID_'+n.id+')"',"></rect>\n")}else e.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',n,'"',"></rect>\n")},sendToBack:function(e){if(!e)return this;var t,r,i,a=this._activeObject;if(e===a&&"activeSelection"===e.type)for(t=(i=a._objects).length;t--;)r=i[t],n(this._objects,r),this._objects.unshift(r);else n(this._objects,e),this._objects.unshift(e);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(e){if(!e)return this;var t,r,i,a=this._activeObject;if(e===a&&"activeSelection"===e.type)for(i=a._objects,t=0;t<i.length;t++)r=i[t],n(this._objects,r),this._objects.push(r);else n(this._objects,e),this._objects.push(e);return this.renderOnAddRemove&&this.requestRenderAll(),this},sendBackwards:function(e,t){if(!e)return this;var r,i,a,o,s,l=this._activeObject,c=0;if(e===l&&"activeSelection"===e.type)for(s=l._objects,r=0;r<s.length;r++)i=s[r],(a=this._objects.indexOf(i))>0+c&&(o=a-1,n(this._objects,i),this._objects.splice(o,0,i)),c++;else 0!==(a=this._objects.indexOf(e))&&(o=this._findNewLowerIndex(e,a,t),n(this._objects,e),this._objects.splice(o,0,e));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(e,t,n){var r,i;if(n)for(r=t,i=t-1;i>=0;--i){if(e.intersectsWithObject(this._objects[i])||e.isContainedWithinObject(this._objects[i])||this._objects[i].isContainedWithinObject(e)){r=i;break}}else r=t-1;return r},bringForward:function(e,t){if(!e)return this;var r,i,a,o,s,l=this._activeObject,c=0;if(e===l&&"activeSelection"===e.type)for(r=(s=l._objects).length;r--;)i=s[r],(a=this._objects.indexOf(i))<this._objects.length-1-c&&(o=a+1,n(this._objects,i),this._objects.splice(o,0,i)),c++;else(a=this._objects.indexOf(e))!==this._objects.length-1&&(o=this._findNewUpperIndex(e,a,t),n(this._objects,e),this._objects.splice(o,0,e));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewUpperIndex:function(e,t,n){var r,i,a;if(n)for(r=t,i=t+1,a=this._objects.length;i<a;++i){if(e.intersectsWithObject(this._objects[i])||e.isContainedWithinObject(this._objects[i])||this._objects[i].isContainedWithinObject(e)){r=i;break}}else r=t+1;return r},moveTo:function(e,t){return n(this._objects,e),this._objects.splice(t,0,e),this.renderOnAddRemove&&this.requestRenderAll()},dispose:function(){return this.isRendering&&(C.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.forEachObject((function(e){e.dispose&&e.dispose()})),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose&&this.backgroundImage.dispose(),this.backgroundImage=null,this.overlayImage&&this.overlayImage.dispose&&this.overlayImage.dispose(),this.overlayImage=null,this._iTextInstances=null,this.contextContainer=null,C.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),e(C.StaticCanvas.prototype,C.Observable),e(C.StaticCanvas.prototype,C.Collection),e(C.StaticCanvas.prototype,C.DataURLExporter),e(C.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(e){var t=s();if(!t||!t.getContext)return null;var n=t.getContext("2d");if(!n)return null;switch(e){case"setLineDash":return void 0!==n.setLineDash;default:return null}}}),C.StaticCanvas.prototype.toJSON=C.StaticCanvas.prototype.toObject,C.isLikelyNode&&(C.StaticCanvas.prototype.createPNGStream=function(){var e=o(this.lowerCanvasEl);return e&&e.createPNGStream()},C.StaticCanvas.prototype.createJPEGStream=function(e){var t=o(this.lowerCanvasEl);return t&&t.createJPEGStream(e)})}}(),C.BaseBrush=C.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,_setBrushStyles:function(){var e=this.canvas.contextTop;e.strokeStyle=this.color,e.lineWidth=this.width,e.lineCap=this.strokeLineCap,e.miterLimit=this.strokeMiterLimit,e.lineJoin=this.strokeLineJoin,C.StaticCanvas.supports("setLineDash")&&e.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(e){var t=this.canvas.viewportTransform;e.save(),e.transform(t[0],t[1],t[2],t[3],t[4],t[5])},_setShadow:function(){if(this.shadow){var e=this.canvas,t=this.shadow,n=e.contextTop,r=e.getZoom();e&&e._isRetinaScaling()&&(r*=C.devicePixelRatio),n.shadowColor=t.color,n.shadowBlur=t.blur*r,n.shadowOffsetX=t.offsetX*r,n.shadowOffsetY=t.offsetY*r}},needsFullRender:function(){return new C.Color(this.color).getAlpha()<1||!!this.shadow},_resetShadow:function(){var e=this.canvas.contextTop;e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0}}),C.PencilBrush=C.util.createClass(C.BaseBrush,{decimate:.4,initialize:function(e){this.canvas=e,this._points=[]},_drawSegment:function(e,t,n){var r=t.midPointFrom(n);return e.quadraticCurveTo(t.x,t.y,r.x,r.y),r},onMouseDown:function(e,t){this.canvas._isMainEvent(t.e)&&(this._prepareForDrawing(e),this._captureDrawingPath(e),this._render())},onMouseMove:function(e,t){if(this.canvas._isMainEvent(t.e)&&this._captureDrawingPath(e)&&this._points.length>1)if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var n=this._points,r=n.length,i=this.canvas.contextTop;this._saveAndTransform(i),this.oldEnd&&(i.beginPath(),i.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(i,n[r-2],n[r-1],!0),i.stroke(),i.restore()}},onMouseUp:function(e){return!this.canvas._isMainEvent(e.e)||(this.oldEnd=void 0,this._finalizeAndAddPath(),!1)},_prepareForDrawing:function(e){var t=new C.Point(e.x,e.y);this._reset(),this._addPoint(t),this.canvas.contextTop.moveTo(t.x,t.y)},_addPoint:function(e){return!(this._points.length>1&&e.eq(this._points[this._points.length-1])||(this._points.push(e),0))},_reset:function(){this._points=[],this._setBrushStyles(),this._setShadow()},_captureDrawingPath:function(e){var t=new C.Point(e.x,e.y);return this._addPoint(t)},_render:function(){var e,t,n=this.canvas.contextTop,r=this._points[0],i=this._points[1];if(this._saveAndTransform(n),n.beginPath(),2===this._points.length&&r.x===i.x&&r.y===i.y){var a=this.width/1e3;r=new C.Point(r.x,r.y),i=new C.Point(i.x,i.y),r.x-=a,i.x+=a}for(n.moveTo(r.x,r.y),e=1,t=this._points.length;e<t;e++)this._drawSegment(n,r,i),r=this._points[e],i=this._points[e+1];n.lineTo(r.x,r.y),n.stroke(),n.restore()},convertPointsToSVGPath:function(e){var t,n=[],r=this.width/1e3,i=new C.Point(e[0].x,e[0].y),a=new C.Point(e[1].x,e[1].y),o=e.length,s=1,l=0,c=o>2;for(c&&(s=e[2].x<a.x?-1:e[2].x===a.x?0:1,l=e[2].y<a.y?-1:e[2].y===a.y?0:1),n.push("M ",i.x-s*r," ",i.y-l*r," "),t=1;t<o;t++){if(!i.eq(a)){var u=i.midPointFrom(a);n.push("Q ",i.x," ",i.y," ",u.x," ",u.y," ")}i=e[t],t+1<e.length&&(a=e[t+1])}return c&&(s=i.x>e[t-2].x?1:i.x===e[t-2].x?0:-1,l=i.y>e[t-2].y?1:i.y===e[t-2].y?0:-1),n.push("L ",i.x+s*r," ",i.y+l*r),n},createPath:function(e){var t=new C.Path(e,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray});return this.shadow&&(this.shadow.affectStroke=!0,t.shadow=new C.Shadow(this.shadow)),t},decimatePoints:function(e,t){if(e.length<=2)return e;var n,r=this.canvas.getZoom(),i=Math.pow(t/r,2),a=e.length-1,o=e[0],s=[o];for(n=1;n<a;n++)Math.pow(o.x-e[n].x,2)+Math.pow(o.y-e[n].y,2)>=i&&(o=e[n],s.push(o));return 1===s.length&&s.push(new C.Point(s[0].x,s[0].y)),s},_finalizeAndAddPath:function(){this.canvas.contextTop.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var e=this.convertPointsToSVGPath(this._points).join("");if("M 0 0 Q 0 0 0 0 L 0 0"!==e){var t=this.createPath(e);this.canvas.clearContext(this.canvas.contextTop),this.canvas.fire("before:path:created",{path:t}),this.canvas.add(t),this.canvas.requestRenderAll(),t.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:t})}else this.canvas.requestRenderAll()}}),C.CircleBrush=C.util.createClass(C.BaseBrush,{width:10,initialize:function(e){this.canvas=e,this.points=[]},drawDot:function(e){var t=this.addPoint(e),n=this.canvas.contextTop;this._saveAndTransform(n),this.dot(n,t),n.restore()},dot:function(e,t){e.fillStyle=t.fill,e.beginPath(),e.arc(t.x,t.y,t.radius,0,2*Math.PI,!1),e.closePath(),e.fill()},onMouseDown:function(e){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(e)},_render:function(){var e,t,n=this.canvas.contextTop,r=this.points;for(this._saveAndTransform(n),e=0,t=r.length;e<t;e++)this.dot(n,r[e]);n.restore()},onMouseMove:function(e){this.needsFullRender()?(this.canvas.clearContext(this.canvas.contextTop),this.addPoint(e),this._render()):this.drawDot(e)},onMouseUp:function(){var e,t,n=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;var r=[];for(e=0,t=this.points.length;e<t;e++){var i=this.points[e],a=new C.Circle({radius:i.radius,left:i.x,top:i.y,originX:"center",originY:"center",fill:i.fill});this.shadow&&(a.shadow=new C.Shadow(this.shadow)),r.push(a)}var o=new C.Group(r);o.canvas=this.canvas,this.canvas.fire("before:path:created",{path:o}),this.canvas.add(o),this.canvas.fire("path:created",{path:o}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=n,this.canvas.requestRenderAll()},addPoint:function(e){var t=new C.Point(e.x,e.y),n=C.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,r=new C.Color(this.color).setAlpha(C.util.getRandomInt(0,100)/100).toRgba();return t.radius=n,t.fill=r,this.points.push(t),t}}),C.SprayBrush=C.util.createClass(C.BaseBrush,{width:10,density:20,dotWidth:1,dotWidthVariance:1,randomOpacity:!1,optimizeOverlapping:!0,initialize:function(e){this.canvas=e,this.sprayChunks=[]},onMouseDown:function(e){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(e),this.render(this.sprayChunkPoints)},onMouseMove:function(e){this.addSprayChunk(e),this.render(this.sprayChunkPoints)},onMouseUp:function(){var e=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var t=[],n=0,r=this.sprayChunks.length;n<r;n++)for(var i=this.sprayChunks[n],a=0,o=i.length;a<o;a++){var s=new C.Rect({width:i[a].width,height:i[a].width,left:i[a].x+1,top:i[a].y+1,originX:"center",originY:"center",fill:this.color});t.push(s)}this.optimizeOverlapping&&(t=this._getOptimizedRects(t));var l=new C.Group(t);this.shadow&&l.set("shadow",new C.Shadow(this.shadow)),this.canvas.fire("before:path:created",{path:l}),this.canvas.add(l),this.canvas.fire("path:created",{path:l}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=e,this.canvas.requestRenderAll()},_getOptimizedRects:function(e){var t,n,r,i={};for(n=0,r=e.length;n<r;n++)i[t=e[n].left+""+e[n].top]||(i[t]=e[n]);var a=[];for(t in i)a.push(i[t]);return a},render:function(e){var t,n,r=this.canvas.contextTop;for(r.fillStyle=this.color,this._saveAndTransform(r),t=0,n=e.length;t<n;t++){var i=e[t];void 0!==i.opacity&&(r.globalAlpha=i.opacity),r.fillRect(i.x,i.y,i.width,i.width)}r.restore()},_render:function(){var e,t,n=this.canvas.contextTop;for(n.fillStyle=this.color,this._saveAndTransform(n),e=0,t=this.sprayChunks.length;e<t;e++)this.render(this.sprayChunks[e]);n.restore()},addSprayChunk:function(e){this.sprayChunkPoints=[];var t,n,r,i,a=this.width/2;for(i=0;i<this.density;i++){t=C.util.getRandomInt(e.x-a,e.x+a),n=C.util.getRandomInt(e.y-a,e.y+a),r=this.dotWidthVariance?C.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var o=new C.Point(t,n);o.width=r,this.randomOpacity&&(o.opacity=C.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(o)}this.sprayChunks.push(this.sprayChunkPoints)}}),C.PatternBrush=C.util.createClass(C.PencilBrush,{getPatternSrc:function(){var e=C.util.createCanvasElement(),t=e.getContext("2d");return e.width=e.height=25,t.fillStyle=this.color,t.beginPath(),t.arc(10,10,10,0,2*Math.PI,!1),t.closePath(),t.fill(),e},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},getPattern:function(){return this.canvas.contextTop.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(){this.callSuper("_setBrushStyles"),this.canvas.contextTop.strokeStyle=this.getPattern()},createPath:function(e){var t=this.callSuper("createPath",e),n=t._getLeftTopCoords().scalarAdd(t.strokeWidth/2);return t.stroke=new C.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-n.x,offsetY:-n.y}),t}}),function(){var e=C.util.getPointer,t=C.util.degreesToRadians,n=Math.abs,r=C.StaticCanvas.supports("setLineDash"),i=C.util.isTouchEvent;for(var a in C.Canvas=C.util.createClass(C.StaticCanvas,{initialize:function(e,t){t||(t={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(e,t),this._initInteractive(),this._createCacheCanvas()},uniformScaling:!0,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",interactive:!0,selection:!0,selectionKey:"shiftKey",altSelectionKey:null,selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",rotationCursor:"crosshair",notAllowedCursor:"not-allowed",containerClass:"canvas-container",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,isDrawingMode:!1,preserveObjectStacking:!1,snapAngle:0,snapThreshold:null,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,targets:[],_hoveredTarget:null,_hoveredTargets:[],_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=C.PencilBrush&&new C.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var e,t,n,r=this.getActiveObjects();if(r.length>0&&!this.preserveObjectStacking){t=[],n=[];for(var i=0,a=this._objects.length;i<a;i++)e=this._objects[i],-1===r.indexOf(e)?t.push(e):n.push(e);r.length>1&&(this._activeObject._objects=n),t.push.apply(t,n)}else t=this._objects;return t},renderAll:function(){!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&this.renderTopLayer(this.contextTop);var e=this.contextContainer;return this.renderCanvas(e,this._chooseObjectsToRender()),this},renderTopLayer:function(e){e.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(e),this.contextTopDirty=!0),e.restore()},renderTop:function(){var e=this.contextTop;return this.clearContext(e),this.renderTopLayer(e),this.fire("after:render"),this},_normalizePointer:function(e,t){var n=e.calcTransformMatrix(),r=C.util.invertTransform(n),i=this.restorePointerVpt(t);return C.util.transformPoint(i,r)},isTargetTransparent:function(e,t,n){if(e.shouldCache()&&e._cacheCanvas&&e!==this._activeObject){var r=this._normalizePointer(e,{x:t,y:n}),i=Math.max(e.cacheTranslationX+r.x*e.zoomX,0),a=Math.max(e.cacheTranslationY+r.y*e.zoomY,0);return C.util.isTransparent(e._cacheContext,Math.round(i),Math.round(a),this.targetFindTolerance)}var o=this.contextCache,s=e.selectionBackgroundColor,l=this.viewportTransform;return e.selectionBackgroundColor="",this.clearContext(o),o.save(),o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),e.render(o),o.restore(),e===this._activeObject&&e._renderControls(o,{hasBorders:!1,transparentCorners:!1},{hasBorders:!1}),e.selectionBackgroundColor=s,C.util.isTransparent(o,t,n,this.targetFindTolerance)},_isSelectionKeyPressed:function(e){return"[object Array]"===Object.prototype.toString.call(this.selectionKey)?!!this.selectionKey.find((function(t){return!0===e[t]})):e[this.selectionKey]},_shouldClearSelection:function(e,t){var n=this.getActiveObjects(),r=this._activeObject;return!t||t&&r&&n.length>1&&-1===n.indexOf(t)&&r!==t&&!this._isSelectionKeyPressed(e)||t&&!t.evented||t&&!t.selectable&&r&&r!==t},_shouldCenterTransform:function(e,t,n){var r;if(e)return"scale"===t||"scaleX"===t||"scaleY"===t||"resizing"===t?r=this.centeredScaling||e.centeredScaling:"rotate"===t&&(r=this.centeredRotation||e.centeredRotation),r?!n:n},_getOriginFromCorner:function(e,t){var n={x:e.originX,y:e.originY};return"ml"===t||"tl"===t||"bl"===t?n.x="right":"mr"!==t&&"tr"!==t&&"br"!==t||(n.x="left"),"tl"===t||"mt"===t||"tr"===t?n.y="bottom":"bl"===t||"mb"===t||"br"===t?n.y="top":"mtr"===t&&(n.x="center",n.y="center"),n},_getActionFromCorner:function(e,t,n,r){if(!t||!e)return"drag";var i=r.controls[t];return i.getActionName(n,i,r)},_setupCurrentTransform:function(e,n,r){if(n){var i=this.getPointer(e),a=n.__corner,o=r&&a?n.controls[a].getActionHandler():C.controlsUtils.dragHandler,s=this._getActionFromCorner(r,a,e,n),l=this._getOriginFromCorner(n,a),c=e[this.centeredKey],u={target:n,action:s,actionHandler:o,corner:a,scaleX:n.scaleX,scaleY:n.scaleY,skewX:n.skewX,skewY:n.skewY,offsetX:i.x-n.left,offsetY:i.y-n.top,originX:l.x,originY:l.y,ex:i.x,ey:i.y,lastX:i.x,lastY:i.y,theta:t(n.angle),width:n.width*n.scaleX,shiftKey:e.shiftKey,altKey:c,original:C.util.saveObjectTransform(n)};this._shouldCenterTransform(n,s,c)&&(u.originX="center",u.originY="center"),u.original.originX=l.x,u.original.originY=l.y,this._currentTransform=u,this._beforeTransform(e)}},setCursor:function(e){this.upperCanvasEl.style.cursor=e},_drawSelection:function(e){var t=this._groupSelector,i=t.left,a=t.top,o=n(i),s=n(a);if(this.selectionColor&&(e.fillStyle=this.selectionColor,e.fillRect(t.ex-(i>0?0:-i),t.ey-(a>0?0:-a),o,s)),this.selectionLineWidth&&this.selectionBorderColor)if(e.lineWidth=this.selectionLineWidth,e.strokeStyle=this.selectionBorderColor,this.selectionDashArray.length>1&&!r){var l=t.ex+.5-(i>0?0:o),c=t.ey+.5-(a>0?0:s);e.beginPath(),C.util.drawDashedLine(e,l,c,l+o,c,this.selectionDashArray),C.util.drawDashedLine(e,l,c+s-1,l+o,c+s-1,this.selectionDashArray),C.util.drawDashedLine(e,l,c,l,c+s,this.selectionDashArray),C.util.drawDashedLine(e,l+o-1,c,l+o-1,c+s,this.selectionDashArray),e.closePath(),e.stroke()}else C.Object.prototype._setLineDash.call(this,e,this.selectionDashArray),e.strokeRect(t.ex+.5-(i>0?0:o),t.ey+.5-(a>0?0:s),o,s)},findTarget:function(e,t){if(!this.skipTargetFind){var n,r,a=this.getPointer(e,!0),o=this._activeObject,s=this.getActiveObjects(),l=i(e);if(this.targets=[],s.length>1&&!t&&o===this._searchPossibleTargets([o],a))return o;if(1===s.length&&o._findTargetCorner(a,l))return o;if(1===s.length&&o===this._searchPossibleTargets([o],a)){if(!this.preserveObjectStacking)return o;n=o,r=this.targets,this.targets=[]}var c=this._searchPossibleTargets(this._objects,a);return e[this.altSelectionKey]&&c&&n&&c!==n&&(c=n,this.targets=r),c}},_checkTarget:function(e,t,n){if(t&&t.visible&&t.evented&&(t.containsPoint(e)||t._findTargetCorner(e))){if(!this.perPixelTargetFind&&!t.perPixelTargetFind||t.isEditing)return!0;if(!this.isTargetTransparent(t,n.x,n.y))return!0}},_searchPossibleTargets:function(e,t){for(var n,r,i=e.length;i--;){var a=e[i],o=a.group?this._normalizePointer(a.group,t):t;if(this._checkTarget(o,a,t)){(n=e[i]).subTargetCheck&&n instanceof C.Group&&(r=this._searchPossibleTargets(n._objects,t))&&this.targets.push(r);break}}return n},restorePointerVpt:function(e){return C.util.transformPoint(e,C.util.invertTransform(this.viewportTransform))},getPointer:function(t,n){if(this._absolutePointer&&!n)return this._absolutePointer;if(this._pointer&&n)return this._pointer;var r,i=e(t),a=this.upperCanvasEl,o=a.getBoundingClientRect(),s=o.width||0,l=o.height||0;s&&l||("top"in o&&"bottom"in o&&(l=Math.abs(o.top-o.bottom)),"right"in o&&"left"in o&&(s=Math.abs(o.right-o.left))),this.calcOffset(),i.x=i.x-this._offset.left,i.y=i.y-this._offset.top,n||(i=this.restorePointerVpt(i));var c=this.getRetinaScaling();return 1!==c&&(i.x/=c,i.y/=c),r=0===s||0===l?{width:1,height:1}:{width:a.width/s,height:a.height/l},{x:i.x*r.width,y:i.y*r.height}},_createUpperCanvas:function(){var e=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),t=this.lowerCanvasEl,n=this.upperCanvasEl;n?n.className="":(n=this._createCanvasElement(),this.upperCanvasEl=n),C.util.addClass(n,"upper-canvas "+e),this.wrapperEl.appendChild(n),this._copyCanvasStyle(t,n),this._applyCanvasStyle(n),this.contextTop=n.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=C.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),C.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),C.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(e){var t=this.width||e.width,n=this.height||e.height;C.util.setStyle(e,{position:"absolute",width:t+"px",height:n+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),e.width=t,e.height=n,C.util.makeElementUnselectable(e)},_copyCanvasStyle:function(e,t){t.style.cssText=e.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var e=this._activeObject;return e?"activeSelection"===e.type&&e._objects?e._objects.slice(0):[e]:[]},_onObjectRemoved:function(e){e===this._activeObject&&(this.fire("before:selection:cleared",{target:e}),this._discardActiveObject(),this.fire("selection:cleared",{target:e}),e.fire("deselected")),e===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",e)},_fireSelectionEvents:function(e,t){var n=!1,r=this.getActiveObjects(),i=[],a=[],o={e:t};e.forEach((function(e){-1===r.indexOf(e)&&(n=!0,e.fire("deselected",o),a.push(e))})),r.forEach((function(t){-1===e.indexOf(t)&&(n=!0,t.fire("selected",o),i.push(t))})),e.length>0&&r.length>0?(o.selected=i,o.deselected=a,o.updated=i[0]||a[0],o.target=this._activeObject,n&&this.fire("selection:updated",o)):r.length>0?(o.selected=i,o.target=this._activeObject,this.fire("selection:created",o)):e.length>0&&(o.deselected=a,this.fire("selection:cleared",o))},setActiveObject:function(e,t){var n=this.getActiveObjects();return this._setActiveObject(e,t),this._fireSelectionEvents(n,t),this},_setActiveObject:function(e,t){return this._activeObject!==e&&(!!this._discardActiveObject(t,e)&&(!e.onSelect({e:t})&&(this._activeObject=e,!0)))},_discardActiveObject:function(e,t){var n=this._activeObject;if(n){if(n.onDeselect({e:e,object:t}))return!1;this._activeObject=null}return!0},discardActiveObject:function(e){var t=this.getActiveObjects(),n=this.getActiveObject();return t.length&&this.fire("before:selection:cleared",{target:n,e:e}),this._discardActiveObject(e),this._fireSelectionEvents(t,e),this},dispose:function(){var e=this.wrapperEl;return this.removeListeners(),e.removeChild(this.upperCanvasEl),e.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach(function(e){C.util.cleanUpJsdomNode(this[e]),this[e]=void 0}.bind(this)),e.parentNode&&e.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,C.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(e){var t=this._activeObject;t&&t._renderControls(e)},_toObject:function(e,t,n){var r=this._realizeGroupTransformOnObject(e),i=this.callSuper("_toObject",e,t,n);return this._unwindGroupTransformOnObject(e,r),i},_realizeGroupTransformOnObject:function(e){if(e.group&&"activeSelection"===e.group.type&&this._activeObject===e.group){var t={};return["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"].forEach((function(n){t[n]=e[n]})),this._activeObject.realizeTransform(e),t}return null},_unwindGroupTransformOnObject:function(e,t){t&&e.set(t)},_setSVGObject:function(e,t,n){var r=this._realizeGroupTransformOnObject(t);this.callSuper("_setSVGObject",e,t,n),this._unwindGroupTransformOnObject(t,r)},setViewportTransform:function(e){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),C.StaticCanvas.prototype.setViewportTransform.call(this,e)}}),C.StaticCanvas)"prototype"!==a&&(C.Canvas[a]=C.StaticCanvas[a])}(),function(){var e=C.util.addListener,t=C.util.removeListener,n={passive:!1};function r(e,t){return e.button&&e.button===t-1}C.util.object.extend(C.Canvas.prototype,{mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(e,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(e,t){var r=this.upperCanvasEl,i=this._getEventPrefix();e(C.window,"resize",this._onResize),e(r,i+"down",this._onMouseDown),e(r,i+"move",this._onMouseMove,n),e(r,i+"out",this._onMouseOut),e(r,i+"enter",this._onMouseEnter),e(r,"wheel",this._onMouseWheel),e(r,"contextmenu",this._onContextMenu),e(r,"dblclick",this._onDoubleClick),e(r,"dragover",this._onDragOver),e(r,"dragenter",this._onDragEnter),e(r,"dragleave",this._onDragLeave),e(r,"drop",this._onDrop),this.enablePointerEvents||e(r,"touchstart",this._onTouchStart,n),"undefined"!=typeof eventjs&&t in eventjs&&(eventjs[t](r,"gesture",this._onGesture),eventjs[t](r,"drag",this._onDrag),eventjs[t](r,"orientation",this._onOrientationChange),eventjs[t](r,"shake",this._onShake),eventjs[t](r,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(t,"remove");var e=this._getEventPrefix();t(C.document,e+"up",this._onMouseUp),t(C.document,"touchend",this._onTouchEnd,n),t(C.document,e+"move",this._onMouseMove,n),t(C.document,"touchmove",this._onMouseMove,n)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._simpleEventHandler.bind(this,"drop"),this.eventsBound=!0)},_onGesture:function(e,t){this.__onTransformGesture&&this.__onTransformGesture(e,t)},_onDrag:function(e,t){this.__onDrag&&this.__onDrag(e,t)},_onMouseWheel:function(e){this.__onMouseWheel(e)},_onMouseOut:function(e){var t=this._hoveredTarget;this.fire("mouse:out",{target:t,e:e}),this._hoveredTarget=null,t&&t.fire("mouseout",{e:e});var n=this;this._hoveredTargets.forEach((function(r){n.fire("mouse:out",{target:t,e:e}),r&&t.fire("mouseout",{e:e})})),this._hoveredTargets=[],this._iTextInstances&&this._iTextInstances.forEach((function(e){e.isEditing&&e.hiddenTextarea.focus()}))},_onMouseEnter:function(e){this._currentTransform||this.findTarget(e)||(this.fire("mouse:over",{target:null,e:e}),this._hoveredTarget=null,this._hoveredTargets=[])},_onOrientationChange:function(e,t){this.__onOrientationChange&&this.__onOrientationChange(e,t)},_onShake:function(e,t){this.__onShake&&this.__onShake(e,t)},_onLongPress:function(e,t){this.__onLongPress&&this.__onLongPress(e,t)},_onDragOver:function(e){e.preventDefault();var t=this._simpleEventHandler("dragover",e);this._fireEnterLeaveEvents(t,e)},_onContextMenu:function(e){return this.stopContextMenu&&(e.stopPropagation(),e.preventDefault()),!1},_onDoubleClick:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"dblclick"),this._resetTransformEventData(e)},getPointerId:function(e){var t=e.changedTouches;return t?t[0]&&t[0].identifier:this.enablePointerEvents?e.pointerId:-1},_isMainEvent:function(e){return!0===e.isPrimary||!1!==e.isPrimary&&("touchend"===e.type&&0===e.touches.length||(!e.changedTouches||e.changedTouches[0].identifier===this.mainTouchId))},_onTouchStart:function(r){r.preventDefault(),null===this.mainTouchId&&(this.mainTouchId=this.getPointerId(r)),this.__onMouseDown(r),this._resetTransformEventData();var i=this.upperCanvasEl,a=this._getEventPrefix();e(C.document,"touchend",this._onTouchEnd,n),e(C.document,"touchmove",this._onMouseMove,n),t(i,a+"down",this._onMouseDown)},_onMouseDown:function(r){this.__onMouseDown(r),this._resetTransformEventData();var i=this.upperCanvasEl,a=this._getEventPrefix();t(i,a+"move",this._onMouseMove,n),e(C.document,a+"up",this._onMouseUp),e(C.document,a+"move",this._onMouseMove,n)},_onTouchEnd:function(r){if(!(r.touches.length>0)){this.__onMouseUp(r),this._resetTransformEventData(),this.mainTouchId=null;var i=this._getEventPrefix();t(C.document,"touchend",this._onTouchEnd,n),t(C.document,"touchmove",this._onMouseMove,n);var a=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout((function(){e(a.upperCanvasEl,i+"down",a._onMouseDown),a._willAddMouseDown=0}),400)}},_onMouseUp:function(r){this.__onMouseUp(r),this._resetTransformEventData();var i=this.upperCanvasEl,a=this._getEventPrefix();this._isMainEvent(r)&&(t(C.document,a+"up",this._onMouseUp),t(C.document,a+"move",this._onMouseMove,n),e(i,a+"move",this._onMouseMove,n))},_onMouseMove:function(e){!this.allowTouchScrolling&&e.preventDefault&&e.preventDefault(),this.__onMouseMove(e)},_onResize:function(){this.calcOffset()},_shouldRender:function(e){var t=this._activeObject;return!!(!!t!=!!e||t&&e&&t!==e)||(t&&t.isEditing,!1)},__onMouseUp:function(e){var t,n=this._currentTransform,i=this._groupSelector,a=!1,o=!i||0===i.left&&0===i.top;if(this._cacheTransformEventData(e),t=this._target,this._handleEvent(e,"up:before"),r(e,3))this.fireRightClick&&this._handleEvent(e,"up",3,o);else{if(r(e,2))return this.fireMiddleClick&&this._handleEvent(e,"up",2,o),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)this._onMouseUpInDrawingMode(e);else if(this._isMainEvent(e)){if(n&&(this._finalizeCurrentTransform(e),a=n.actionPerformed),!o){var s=t===this._activeObject;this._maybeGroupObjects(e),a||(a=this._shouldRender(t)||!s&&t===this._activeObject)}if(t){var l=t._findTargetCorner(this.getPointer(e,!0),C.util.isTouchEvent(e)),c=t.controls[l],u=c&&c.getMouseUpHandler(e,t,c);u&&u(e,t,c),t.isMoving=!1}this._setCursorFromEvent(e,t),this._handleEvent(e,"up",1,o),this._groupSelector=null,this._currentTransform=null,t&&(t.__corner=0),a?this.requestRenderAll():o||this.renderTop()}}},_simpleEventHandler:function(e,t){var n=this.findTarget(t),r=this.targets,i={e:t,target:n,subTargets:r};if(this.fire(e,i),n&&n.fire(e,i),!r)return n;for(var a=0;a<r.length;a++)r[a].fire(e,i);return n},_handleEvent:function(e,t,n,r){var i=this._target,a=this.targets||[],o={e:e,target:i,subTargets:a,button:n||1,isClick:r||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};"up"===t&&(o.currentTarget=this.findTarget(e),o.currentSubTargets=this.targets),this.fire("mouse:"+t,o),i&&i.fire("mouse"+t,o);for(var s=0;s<a.length;s++)a[s].fire("mouse"+t,o)},_finalizeCurrentTransform:function(e){var t,n=this._currentTransform,r=n.target,i={e:e,target:r,transform:n,action:n.action};r._scaling&&(r._scaling=!1),r.setCoords(),(n.actionPerformed||this.stateful&&r.hasStateChanged())&&(n.actionPerformed&&(t=this._addEventOptions(i,n),this._fire(t,i)),this._fire("modified",i))},_addEventOptions:function(e,t){var n,r;switch(t.action){case"scaleX":n="scaled",r="x";break;case"scaleY":n="scaled",r="y";break;case"skewX":n="skewed",r="x";break;case"skewY":n="skewed",r="y";break;case"scale":n="scaled",r="equally";break;case"rotate":n="rotated";break;case"drag":n="moved"}return e.by=r,n},_onMouseDownInDrawingMode:function(e){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(e).requestRenderAll();var t=this.getPointer(e);this.freeDrawingBrush.onMouseDown(t,{e:e,pointer:t}),this._handleEvent(e,"down")},_onMouseMoveInDrawingMode:function(e){if(this._isCurrentlyDrawing){var t=this.getPointer(e);this.freeDrawingBrush.onMouseMove(t,{e:e,pointer:t})}this.setCursor(this.freeDrawingCursor),this._handleEvent(e,"move")},_onMouseUpInDrawingMode:function(e){var t=this.getPointer(e);this._isCurrentlyDrawing=this.freeDrawingBrush.onMouseUp({e:e,pointer:t}),this._handleEvent(e,"up")},__onMouseDown:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"down:before");var t=this._target;if(r(e,3))this.fireRightClick&&this._handleEvent(e,"down",3);else if(r(e,2))this.fireMiddleClick&&this._handleEvent(e,"down",2);else if(this.isDrawingMode)this._onMouseDownInDrawingMode(e);else if(this._isMainEvent(e)&&!this._currentTransform){var n=this._pointer;this._previousPointer=n;var i=this._shouldRender(t),a=this._shouldGroup(e,t);if(this._shouldClearSelection(e,t)?this.discardActiveObject(e):a&&(this._handleGrouping(e,t),t=this._activeObject),!this.selection||t&&(t.selectable||t.isEditing||t===this._activeObject)||(this._groupSelector={ex:n.x,ey:n.y,top:0,left:0}),t){var o=t===this._activeObject;t.selectable&&this.setActiveObject(t,e);var s=t._findTargetCorner(this.getPointer(e,!0),C.util.isTouchEvent(e));if(t.__corner=s,t===this._activeObject&&(s||!a)){var l=t.controls[s],c=l&&l.getMouseDownHandler(e,t,l);c&&c(e,t,l),this._setupCurrentTransform(e,t,o)}}this._handleEvent(e,"down"),(i||a)&&this.requestRenderAll()}},_resetTransformEventData:function(){this._target=null,this._pointer=null,this._absolutePointer=null},_cacheTransformEventData:function(e){this._resetTransformEventData(),this._pointer=this.getPointer(e,!0),this._absolutePointer=this.restorePointerVpt(this._pointer),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(e)||null},_beforeTransform:function(e){var t=this._currentTransform;this.stateful&&t.target.saveState(),this.fire("before:transform",{e:e,transform:t})},__onMouseMove:function(e){var t,n;if(this._handleEvent(e,"move:before"),this._cacheTransformEventData(e),this.isDrawingMode)this._onMouseMoveInDrawingMode(e);else if(this._isMainEvent(e)){var r=this._groupSelector;r?(n=this._pointer,r.left=n.x-r.ex,r.top=n.y-r.ey,this.renderTop()):this._currentTransform?this._transformObject(e):(t=this.findTarget(e)||null,this._setCursorFromEvent(e,t),this._fireOverOutEvents(t,e)),this._handleEvent(e,"move"),this._resetTransformEventData()}},_fireOverOutEvents:function(e,t){var n=this._hoveredTarget,r=this._hoveredTargets,i=this.targets,a=Math.max(r.length,i.length);this.fireSyntheticInOutEvents(e,t,{oldTarget:n,evtOut:"mouseout",canvasEvtOut:"mouse:out",evtIn:"mouseover",canvasEvtIn:"mouse:over"});for(var o=0;o<a;o++)this.fireSyntheticInOutEvents(i[o],t,{oldTarget:r[o],evtOut:"mouseout",evtIn:"mouseover"});this._hoveredTarget=e,this._hoveredTargets=this.targets.concat()},_fireEnterLeaveEvents:function(e,t){var n=this._draggedoverTarget,r=this._hoveredTargets,i=this.targets,a=Math.max(r.length,i.length);this.fireSyntheticInOutEvents(e,t,{oldTarget:n,evtOut:"dragleave",evtIn:"dragenter"});for(var o=0;o<a;o++)this.fireSyntheticInOutEvents(i[o],t,{oldTarget:r[o],evtOut:"dragleave",evtIn:"dragenter"});this._draggedoverTarget=e},fireSyntheticInOutEvents:function(e,t,n){var r,i,a,o=n.oldTarget,s=o!==e,l=n.canvasEvtIn,c=n.canvasEvtOut;s&&(r={e:t,target:e,previousTarget:o},i={e:t,target:o,nextTarget:e}),a=e&&s,o&&s&&(c&&this.fire(c,i),o.fire(n.evtOut,i)),a&&(l&&this.fire(l,r),e.fire(n.evtIn,r))},__onMouseWheel:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"wheel"),this._resetTransformEventData()},_transformObject:function(e){var t=this.getPointer(e),n=this._currentTransform;n.reset=!1,n.target.isMoving=!0,n.shiftKey=e.shiftKey,n.altKey=e[this.centeredKey],this._performTransformAction(e,n,t),n.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(e,t,n){var r=n.x,i=n.y,a=t.action,o=!1,s=t.actionHandler;s&&(o=s(e,t,r,i)),"drag"===a&&o&&this.setCursor(t.target.moveCursor||this.moveCursor),t.actionPerformed=t.actionPerformed||o},_fire:C.controlsUtils.fireEvent,_setCursorFromEvent:function(e,t){if(!t)return this.setCursor(this.defaultCursor),!1;var n=t.hoverCursor||this.hoverCursor,r=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,i=(!r||!r.contains(t))&&t._findTargetCorner(this.getPointer(e,!0));i?this.setCursor(this.getCornerCursor(i,t,e)):(t.subTargetCheck&&this.targets.concat().reverse().map((function(e){n=e.hoverCursor||n})),this.setCursor(n))},getCornerCursor:function(e,t,n){var r=t.controls[e];return r.cursorStyleHandler(n,r,t)}})}(),v=Math.min,b=Math.max,C.util.object.extend(C.Canvas.prototype,{_shouldGroup:function(e,t){var n=this._activeObject;return n&&this._isSelectionKeyPressed(e)&&t&&t.selectable&&this.selection&&(n!==t||"activeSelection"===n.type)&&!t.onSelect({e:e})},_handleGrouping:function(e,t){var n=this._activeObject;n.__corner||(t!==n||(t=this.findTarget(e,!0))&&t.selectable)&&(n&&"activeSelection"===n.type?this._updateActiveSelection(t,e):this._createActiveSelection(t,e))},_updateActiveSelection:function(e,t){var n=this._activeObject,r=n._objects.slice(0);n.contains(e)?(n.removeWithUpdate(e),this._hoveredTarget=e,this._hoveredTargets=this.targets.concat(),1===n.size()&&this._setActiveObject(n.item(0),t)):(n.addWithUpdate(e),this._hoveredTarget=n,this._hoveredTargets=this.targets.concat()),this._fireSelectionEvents(r,t)},_createActiveSelection:function(e,t){var n=this.getActiveObjects(),r=this._createGroup(e);this._hoveredTarget=r,this._setActiveObject(r,t),this._fireSelectionEvents(n,t)},_createGroup:function(e){var t=this._objects,n=t.indexOf(this._activeObject)<t.indexOf(e)?[this._activeObject,e]:[e,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new C.ActiveSelection(n,{canvas:this})},_groupSelectedObjects:function(e){var t,n=this._collectObjects(e);1===n.length?this.setActiveObject(n[0],e):n.length>1&&(t=new C.ActiveSelection(n.reverse(),{canvas:this}),this.setActiveObject(t,e))},_collectObjects:function(e){for(var t,n=[],r=this._groupSelector.ex,i=this._groupSelector.ey,a=r+this._groupSelector.left,o=i+this._groupSelector.top,s=new C.Point(v(r,a),v(i,o)),l=new C.Point(b(r,a),b(i,o)),c=!this.selectionFullyContained,u=r===a&&i===o,d=this._objects.length;d--&&!((t=this._objects[d])&&t.selectable&&t.visible&&(c&&t.intersectsWithRect(s,l)||t.isContainedWithinRect(s,l)||c&&t.containsPoint(s)||c&&t.containsPoint(l))&&(n.push(t),u)););return n.length>1&&(n=n.filter((function(t){return!t.onSelect({e:e})}))),n},_maybeGroupObjects:function(e){this.selection&&this._groupSelector&&this._groupSelectedObjects(e),this.setCursor(this.defaultCursor),this._groupSelector=null}}),C.util.object.extend(C.StaticCanvas.prototype,{toDataURL:function(e){e||(e={});var t=e.format||"png",n=e.quality||1,r=(e.multiplier||1)*(e.enableRetinaScaling?this.getRetinaScaling():1),i=this.toCanvasElement(r,e);return C.util.toDataURL(i,t,n)},toCanvasElement:function(e,t){e=e||1;var n=((t=t||{}).width||this.width)*e,r=(t.height||this.height)*e,i=this.getZoom(),a=this.width,o=this.height,s=i*e,l=this.viewportTransform,c=(l[4]-(t.left||0))*e,u=(l[5]-(t.top||0))*e,d=this.interactive,h=[s,0,0,s,c,u],f=this.enableRetinaScaling,p=C.util.createCanvasElement(),m=this.contextTop;return p.width=n,p.height=r,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=h,this.width=n,this.height=r,this.calcViewportBoundaries(),this.renderCanvas(p.getContext("2d"),this._objects),this.viewportTransform=l,this.width=a,this.height=o,this.calcViewportBoundaries(),this.interactive=d,this.enableRetinaScaling=f,this.contextTop=m,p}}),C.util.object.extend(C.StaticCanvas.prototype,{loadFromJSON:function(e,t,n){if(e){var r="string"==typeof e?JSON.parse(e):C.util.object.clone(e),i=this,a=r.clipPath,o=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete r.clipPath,this._enlivenObjects(r.objects,(function(e){i.clear(),i._setBgOverlay(r,(function(){a?i._enlivenObjects([a],(function(n){i.clipPath=n[0],i.__setupCanvas.call(i,r,e,o,t)})):i.__setupCanvas.call(i,r,e,o,t)}))}),n),this}},__setupCanvas:function(e,t,n,r){var i=this;t.forEach((function(e,t){i.insertAt(e,t)})),this.renderOnAddRemove=n,delete e.objects,delete e.backgroundImage,delete e.overlayImage,delete e.background,delete e.overlay,this._setOptions(e),this.renderAll(),r&&r()},_setBgOverlay:function(e,t){var n={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(e.backgroundImage||e.overlayImage||e.background||e.overlay){var r=function(){n.backgroundImage&&n.overlayImage&&n.backgroundColor&&n.overlayColor&&t&&t()};this.__setBgOverlay("backgroundImage",e.backgroundImage,n,r),this.__setBgOverlay("overlayImage",e.overlayImage,n,r),this.__setBgOverlay("backgroundColor",e.background,n,r),this.__setBgOverlay("overlayColor",e.overlay,n,r)}else t&&t()},__setBgOverlay:function(e,t,n,r){var i=this;if(!t)return n[e]=!0,void(r&&r());"backgroundImage"===e||"overlayImage"===e?C.util.enlivenObjects([t],(function(t){i[e]=t[0],n[e]=!0,r&&r()})):this["set"+C.util.string.capitalize(e,!0)](t,(function(){n[e]=!0,r&&r()}))},_enlivenObjects:function(e,t,n){e&&0!==e.length?C.util.enlivenObjects(e,(function(e){t&&t(e)}),null,n):t&&t([])},_toDataURL:function(e,t){this.clone((function(n){t(n.toDataURL(e))}))},_toDataURLWithMultiplier:function(e,t,n){this.clone((function(r){n(r.toDataURLWithMultiplier(e,t))}))},clone:function(e,t){var n=JSON.stringify(this.toJSON(t));this.cloneWithoutData((function(t){t.loadFromJSON(n,(function(){e&&e(t)}))}))},cloneWithoutData:function(e){var t=C.util.createCanvasElement();t.width=this.width,t.height=this.height;var n=new C.Canvas(t);this.backgroundImage?(n.setBackgroundImage(this.backgroundImage.src,(function(){n.renderAll(),e&&e(n)})),n.backgroundImageOpacity=this.backgroundImageOpacity,n.backgroundImageStretch=this.backgroundImageStretch):e&&e(n)}}),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.util.object.clone,i=t.util.toFixed,a=t.util.string.capitalize,o=t.util.degreesToRadians,s=t.StaticCanvas.supports("setLineDash"),l=!t.isLikelyNode;t.Object||(t.Object=t.util.createClass(t.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,touchCornerSize:24,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgb(178,204,255)",borderDashArray:null,cornerColor:"rgb(178,204,255)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,perPixelTargetFind:!1,includeDefaultValues:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:l,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),colorProperties:"fill stroke backgroundColor".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(e){e&&this.setOptions(e)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=t.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(e){var n=t.perfLimitSizeTotal,r=e.width,i=e.height,a=t.maxCacheSideLimit,o=t.minCacheSideLimit;if(r<=a&&i<=a&&r*i<=n)return r<o&&(e.width=o),i<o&&(e.height=o),e;var s=r/i,l=t.util.limitDimsByArea(s,n),c=t.util.capValue,u=c(o,l.x,a),d=c(o,l.y,a);return r>u&&(e.zoomX/=r/u,e.width=u,e.capped=!0),i>d&&(e.zoomY/=i/d,e.height=d,e.capped=!0),e},_getCacheCanvasDimensions:function(){var e=this.getTotalObjectScaling(),t=this._getTransformedDimensions(0,0),n=t.x*e.scaleX/this.scaleX,r=t.y*e.scaleY/this.scaleY;return{width:n+2,height:r+2,zoomX:e.scaleX,zoomY:e.scaleY,x:n,y:r}},_updateCacheCanvas:function(){var e=this.canvas;if(this.noScaleCache&&e&&e._currentTransform){var n=e._currentTransform.target,r=e._currentTransform.action;if(this===n&&r.slice&&"scale"===r.slice(0,5))return!1}var i,a,o=this._cacheCanvas,s=this._limitCacheSize(this._getCacheCanvasDimensions()),l=t.minCacheSideLimit,c=s.width,u=s.height,d=s.zoomX,h=s.zoomY,f=c!==this.cacheWidth||u!==this.cacheHeight,p=this.zoomX!==d||this.zoomY!==h,m=f||p,g=0,v=0,b=!1;if(f){var y=this._cacheCanvas.width,A=this._cacheCanvas.height,_=c>y||u>A;b=_||(c<.9*y||u<.9*A)&&y>l&&A>l,_&&!s.capped&&(c>l||u>l)&&(g=.1*c,v=.1*u)}return!!m&&(b?(o.width=Math.ceil(c+g),o.height=Math.ceil(u+v)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,o.width,o.height)),i=s.x/2,a=s.y/2,this.cacheTranslationX=Math.round(o.width/2-i)+i,this.cacheTranslationY=Math.round(o.height/2-a)+a,this.cacheWidth=c,this.cacheHeight=u,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(d,h),this.zoomX=d,this.zoomY=h,!0)},setOptions:function(e){this._setOptions(e),this._initGradient(e.fill,"fill"),this._initGradient(e.stroke,"stroke"),this._initPattern(e.fill,"fill"),this._initPattern(e.stroke,"stroke")},transform:function(e){var t=this.group&&!this.group._transformDone||this.group&&this.canvas&&e===this.canvas.contextTop,n=this.calcTransformMatrix(!t);e.transform(n[0],n[1],n[2],n[3],n[4],n[5])},toObject:function(e){var n=t.Object.NUM_FRACTION_DIGITS,r={type:this.type,version:t.version,originX:this.originX,originY:this.originY,left:i(this.left,n),top:i(this.top,n),width:i(this.width,n),height:i(this.height,n),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:i(this.strokeWidth,n),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:i(this.strokeMiterLimit,n),scaleX:i(this.scaleX,n),scaleY:i(this.scaleY,n),angle:i(this.angle,n),flipX:this.flipX,flipY:this.flipY,opacity:i(this.opacity,n),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,skewX:i(this.skewX,n),skewY:i(this.skewY,n)};return this.clipPath&&(r.clipPath=this.clipPath.toObject(e),r.clipPath.inverted=this.clipPath.inverted,r.clipPath.absolutePositioned=this.clipPath.absolutePositioned),t.util.populateWithProperties(this,r,e),this.includeDefaultValues||(r=this._removeDefaultValues(r)),r},toDatalessObject:function(e){return this.toObject(e)},_removeDefaultValues:function(e){var n=t.util.getKlass(e.type).prototype;return n.stateProperties.forEach((function(t){"left"!==t&&"top"!==t&&(e[t]===n[t]&&delete e[t],"[object Array]"===Object.prototype.toString.call(e[t])&&"[object Array]"===Object.prototype.toString.call(n[t])&&0===e[t].length&&0===n[t].length&&delete e[t])})),e},toString:function(){return"#<fabric."+a(this.type)+">"},getObjectScaling:function(){var e=t.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(e.scaleX),scaleY:Math.abs(e.scaleY)}},getTotalObjectScaling:function(){var e=this.getObjectScaling(),t=e.scaleX,n=e.scaleY;if(this.canvas){var r=this.canvas.getZoom(),i=this.canvas.getRetinaScaling();t*=r*i,n*=r*i}return{scaleX:t,scaleY:n}},getObjectOpacity:function(){var e=this.opacity;return this.group&&(e*=this.group.getObjectOpacity()),e},_set:function(e,n){var r="scaleX"===e||"scaleY"===e,i=this[e]!==n,a=!1;return r&&(n=this._constrainScale(n)),"scaleX"===e&&n<0?(this.flipX=!this.flipX,n*=-1):"scaleY"===e&&n<0?(this.flipY=!this.flipY,n*=-1):"shadow"!==e||!n||n instanceof t.Shadow?"dirty"===e&&this.group&&this.group.set("dirty",n):n=new t.Shadow(n),this[e]=n,i&&(a=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(e)>-1?(this.dirty=!0,a&&this.group.set("dirty",!0)):a&&this.stateProperties.indexOf(e)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:t.iMatrix.concat()},isNotVisible:function(){return 0===this.opacity||!this.width&&!this.height&&0===this.strokeWidth||!this.visible},render:function(e){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(e.save(),this._setupCompositeOperation(e),this.drawSelectionBackground(e),this.transform(e),this._setOpacity(e),this._setShadow(e,this),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(e)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(e),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),e.restore())},renderCache:function(e){e=e||{},this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,e.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},hasStroke:function(){return this.stroke&&"transparent"!==this.stroke&&0!==this.strokeWidth},hasFill:function(){return this.fill&&"transparent"!==this.fill},needsItsOwnCache:function(){return!("stroke"!==this.paintFirst||!this.hasFill()||!this.hasStroke()||"object"!=typeof this.shadow)||!!this.clipPath},shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(0!==this.shadow.offsetX||0!==this.shadow.offsetY)},drawClipPathOnCache:function(e){var n=this.clipPath;if(e.save(),n.inverted?e.globalCompositeOperation="destination-out":e.globalCompositeOperation="destination-in",n.absolutePositioned){var r=t.util.invertTransform(this.calcTransformMatrix());e.transform(r[0],r[1],r[2],r[3],r[4],r[5])}n.transform(e),e.scale(1/n.zoomX,1/n.zoomY),e.drawImage(n._cacheCanvas,-n.cacheTranslationX,-n.cacheTranslationY),e.restore()},drawObject:function(e,t){var n=this.fill,r=this.stroke;t?(this.fill="black",this.stroke="",this._setClippingProperties(e)):(this._renderBackground(e),this._setStrokeStyles(e,this),this._setFillStyles(e,this)),this._render(e),this._drawClipPath(e),this.fill=n,this.stroke=r},_drawClipPath:function(e){var t=this.clipPath;t&&(t.canvas=this.canvas,t.shouldCache(),t._transformDone=!0,t.renderCache({forClipping:!0}),this.drawClipPathOnCache(e))},drawCacheOnCanvas:function(e){e.scale(1/this.zoomX,1/this.zoomY),e.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(e){if(this.isNotVisible())return!1;if(this._cacheCanvas&&!e&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!e){var t=this.cacheWidth/this.zoomX,n=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-t/2,-n/2,t,n)}return!0}return!1},_renderBackground:function(e){if(this.backgroundColor){var t=this._getNonTransformedDimensions();e.fillStyle=this.backgroundColor,e.fillRect(-t.x/2,-t.y/2,t.x,t.y),this._removeShadow(e)}},_setOpacity:function(e){this.group&&!this.group._transformDone?e.globalAlpha=this.getObjectOpacity():e.globalAlpha*=this.opacity},_setStrokeStyles:function(e,t){t.stroke&&(e.lineWidth=t.strokeWidth,e.lineCap=t.strokeLineCap,e.lineDashOffset=t.strokeDashOffset,e.lineJoin=t.strokeLineJoin,e.miterLimit=t.strokeMiterLimit,e.strokeStyle=t.stroke.toLive?t.stroke.toLive(e,this):t.stroke)},_setFillStyles:function(e,t){t.fill&&(e.fillStyle=t.fill.toLive?t.fill.toLive(e,this):t.fill)},_setClippingProperties:function(e){e.globalAlpha=1,e.strokeStyle="transparent",e.fillStyle="#000000"},_setLineDash:function(e,t,n){t&&0!==t.length&&(1&t.length&&t.push.apply(t,t),s?e.setLineDash(t):n&&n(e))},_renderControls:function(e,n){var r,i,a,s=this.getViewportTransform(),l=this.calcTransformMatrix();i=void 0!==(n=n||{}).hasBorders?n.hasBorders:this.hasBorders,a=void 0!==n.hasControls?n.hasControls:this.hasControls,l=t.util.multiplyTransformMatrices(s,l),r=t.util.qrDecompose(l),e.save(),e.translate(r.translateX,r.translateY),e.lineWidth=1*this.borderScaleFactor,this.group||(e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),n.forActiveSelection?(e.rotate(o(r.angle)),i&&this.drawBordersInGroup(e,r,n)):(e.rotate(o(this.angle)),i&&this.drawBorders(e,n)),a&&this.drawControls(e,n),e.restore()},_setShadow:function(e){if(this.shadow){var n,r=this.shadow,i=this.canvas,a=i&&i.viewportTransform[0]||1,o=i&&i.viewportTransform[3]||1;n=r.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),i&&i._isRetinaScaling()&&(a*=t.devicePixelRatio,o*=t.devicePixelRatio),e.shadowColor=r.color,e.shadowBlur=r.blur*t.browserShadowBlurConstant*(a+o)*(n.scaleX+n.scaleY)/4,e.shadowOffsetX=r.offsetX*a*n.scaleX,e.shadowOffsetY=r.offsetY*o*n.scaleY}},_removeShadow:function(e){this.shadow&&(e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0)},_applyPatternGradientTransform:function(e,t){if(!t||!t.toLive)return{offsetX:0,offsetY:0};var n=t.gradientTransform||t.patternTransform,r=-this.width/2+t.offsetX||0,i=-this.height/2+t.offsetY||0;return"percentage"===t.gradientUnits?e.transform(this.width,0,0,this.height,r,i):e.transform(1,0,0,1,r,i),n&&e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),{offsetX:r,offsetY:i}},_renderPaintInOrder:function(e){"stroke"===this.paintFirst?(this._renderStroke(e),this._renderFill(e)):(this._renderFill(e),this._renderStroke(e))},_render:function(){},_renderFill:function(e){this.fill&&(e.save(),this._applyPatternGradientTransform(e,this.fill),"evenodd"===this.fillRule?e.fill("evenodd"):e.fill(),e.restore())},_renderStroke:function(e){if(this.stroke&&0!==this.strokeWidth){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this.strokeUniform&&this.group){var t=this.getObjectScaling();e.scale(1/t.scaleX,1/t.scaleY)}else this.strokeUniform&&e.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(e,this.strokeDashArray,this._renderDashedStroke),this.stroke.toLive&&"percentage"===this.stroke.gradientUnits?this._applyPatternForTransformedGradient(e,this.stroke):this._applyPatternGradientTransform(e,this.stroke),e.stroke(),e.restore()}},_applyPatternForTransformedGradient:function(e,n){var r,i=this._limitCacheSize(this._getCacheCanvasDimensions()),a=t.util.createCanvasElement(),o=this.canvas.getRetinaScaling(),s=i.x/this.scaleX/o,l=i.y/this.scaleY/o;a.width=s,a.height=l,(r=a.getContext("2d")).beginPath(),r.moveTo(0,0),r.lineTo(s,0),r.lineTo(s,l),r.lineTo(0,l),r.closePath(),r.translate(s/2,l/2),r.scale(i.zoomX/this.scaleX/o,i.zoomY/this.scaleY/o),this._applyPatternGradientTransform(r,n),r.fillStyle=n.toLive(e),r.fill(),e.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),e.scale(o*this.scaleX/i.zoomX,o*this.scaleY/i.zoomY),e.strokeStyle=r.createPattern(a,"no-repeat")},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var e=t.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",e.scaleX),this.set("scaleY",e.scaleY),this.angle=e.angle,this.skewX=e.skewX,this.skewY=0}},_removeTransformMatrix:function(e){var n=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),n=t.util.transformPoint(n,this.transformMatrix)),this.transformMatrix=null,e&&(this.scaleX*=e.scaleX,this.scaleY*=e.scaleY,this.cropX=e.cropX,this.cropY=e.cropY,n.x+=e.offsetLeft,n.y+=e.offsetTop,this.width=e.width,this.height=e.height),this.setPositionByOrigin(n,"center","center")},clone:function(e,n){var r=this.toObject(n);this.constructor.fromObject?this.constructor.fromObject(r,e):t.Object._fromObject("Object",r,e)},cloneAsImage:function(e,n){var r=this.toCanvasElement(n);return e&&e(new t.Image(r)),this},toCanvasElement:function(e){e||(e={});var n=t.util,r=n.saveObjectTransform(this),i=this.group,a=this.shadow,o=Math.abs,s=(e.multiplier||1)*(e.enableRetinaScaling?t.devicePixelRatio:1);delete this.group,e.withoutTransform&&n.resetObjectTransform(this),e.withoutShadow&&(this.shadow=null);var l,c,u,d,h=t.util.createCanvasElement(),f=this.getBoundingRect(!0,!0),p=this.shadow,m={x:0,y:0};p&&(c=p.blur,l=p.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),m.x=2*Math.round(o(p.offsetX)+c)*o(l.scaleX),m.y=2*Math.round(o(p.offsetY)+c)*o(l.scaleY)),u=f.width+m.x,d=f.height+m.y,h.width=Math.ceil(u),h.height=Math.ceil(d);var g=new t.StaticCanvas(h,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});"jpeg"===e.format&&(g.backgroundColor="#fff"),this.setPositionByOrigin(new t.Point(g.width/2,g.height/2),"center","center");var v=this.canvas;g.add(this);var b=g.toCanvasElement(s||1,e);return this.shadow=a,this.set("canvas",v),i&&(this.group=i),this.set(r).setCoords(),g._objects=[],g.dispose(),g=null,b},toDataURL:function(e){return e||(e={}),t.util.toDataURL(this.toCanvasElement(e),e.format||"png",e.quality||1)},isType:function(e){return this.type===e},complexity:function(){return 1},toJSON:function(e){return this.toObject(e)},rotate:function(e){var t=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return t&&this._setOriginToCenter(),this.set("angle",e),t&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(e,n){n=n||this.canvas.getPointer(e);var r=new t.Point(n.x,n.y),i=this._getLeftTopCoords();return this.angle&&(r=t.util.rotatePoint(r,i,o(-this.angle))),{x:r.x-i.x,y:r.y-i.y}},_setupCompositeOperation:function(e){this.globalCompositeOperation&&(e.globalCompositeOperation=this.globalCompositeOperation)}}),t.util.createAccessors&&t.util.createAccessors(t.Object),n(t.Object.prototype,t.Observable),t.Object.NUM_FRACTION_DIGITS=2,t.Object._fromObject=function(e,n,i,a){var o=t[e];n=r(n,!0),t.util.enlivenPatterns([n.fill,n.stroke],(function(e){void 0!==e[0]&&(n.fill=e[0]),void 0!==e[1]&&(n.stroke=e[1]),t.util.enlivenObjects([n.clipPath],(function(e){n.clipPath=e[0];var t=a?new o(n[a],n):new o(n);i&&i(t)}))}))},t.Object.__uid=0)}(t),y=C.util.degreesToRadians,A={left:-.5,center:0,right:.5},_={top:-.5,center:0,bottom:.5},C.util.object.extend(C.Object.prototype,{translateToGivenOrigin:function(e,t,n,r,i){var a,o,s,l=e.x,c=e.y;return"string"==typeof t?t=A[t]:t-=.5,"string"==typeof r?r=A[r]:r-=.5,"string"==typeof n?n=_[n]:n-=.5,"string"==typeof i?i=_[i]:i-=.5,o=i-n,((a=r-t)||o)&&(s=this._getTransformedDimensions(),l=e.x+a*s.x,c=e.y+o*s.y),new C.Point(l,c)},translateToCenterPoint:function(e,t,n){var r=this.translateToGivenOrigin(e,t,n,"center","center");return this.angle?C.util.rotatePoint(r,e,y(this.angle)):r},translateToOriginPoint:function(e,t,n){var r=this.translateToGivenOrigin(e,"center","center",t,n);return this.angle?C.util.rotatePoint(r,e,y(this.angle)):r},getCenterPoint:function(){var e=new C.Point(this.left,this.top);return this.translateToCenterPoint(e,this.originX,this.originY)},getPointByOrigin:function(e,t){var n=this.getCenterPoint();return this.translateToOriginPoint(n,e,t)},toLocalPoint:function(e,t,n){var r,i,a=this.getCenterPoint();return r=void 0!==t&&void 0!==n?this.translateToGivenOrigin(a,"center","center",t,n):new C.Point(this.left,this.top),i=new C.Point(e.x,e.y),this.angle&&(i=C.util.rotatePoint(i,a,-y(this.angle))),i.subtractEquals(r)},setPositionByOrigin:function(e,t,n){var r=this.translateToCenterPoint(e,t,n),i=this.translateToOriginPoint(r,this.originX,this.originY);this.set("left",i.x),this.set("top",i.y)},adjustPosition:function(e){var t,n,r=y(this.angle),i=this.getScaledWidth(),a=C.util.cos(r)*i,o=C.util.sin(r)*i;t="string"==typeof this.originX?A[this.originX]:this.originX-.5,n="string"==typeof e?A[e]:e-.5,this.left+=a*(n-t),this.top+=o*(n-t),this.setCoords(),this.originX=e},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var e=this.getCenterPoint();this.originX="center",this.originY="center",this.left=e.x,this.top=e.y},_resetOrigin:function(){var e=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=e.x,this.top=e.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}}),function(){var e=C.util,t=e.degreesToRadians,n=e.multiplyTransformMatrices,r=e.transformPoint;e.object.extend(C.Object.prototype,{oCoords:null,aCoords:null,lineCoords:null,ownMatrixCache:null,matrixCache:null,controls:{},_getCoords:function(e,t){return t?e?this.calcACoords():this.calcLineCoords():(this.aCoords&&this.lineCoords||this.setCoords(!0),e?this.aCoords:this.lineCoords)},getCoords:function(e,t){return n=this._getCoords(e,t),[new C.Point(n.tl.x,n.tl.y),new C.Point(n.tr.x,n.tr.y),new C.Point(n.br.x,n.br.y),new C.Point(n.bl.x,n.bl.y)];var n},intersectsWithRect:function(e,t,n,r){var i=this.getCoords(n,r);return"Intersection"===C.Intersection.intersectPolygonRectangle(i,e,t).status},intersectsWithObject:function(e,t,n){return"Intersection"===C.Intersection.intersectPolygonPolygon(this.getCoords(t,n),e.getCoords(t,n)).status||e.isContainedWithinObject(this,t,n)||this.isContainedWithinObject(e,t,n)},isContainedWithinObject:function(e,t,n){for(var r=this.getCoords(t,n),i=t?e.aCoords:e.lineCoords,a=0,o=e._getImageLines(i);a<4;a++)if(!e.containsPoint(r[a],o))return!1;return!0},isContainedWithinRect:function(e,t,n,r){var i=this.getBoundingRect(n,r);return i.left>=e.x&&i.left+i.width<=t.x&&i.top>=e.y&&i.top+i.height<=t.y},containsPoint:function(e,t,n,r){var i=this._getCoords(n,r),a=(t=t||this._getImageLines(i),this._findCrossPoints(e,t));return 0!==a&&a%2==1},isOnScreen:function(e){if(!this.canvas)return!1;var t=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br;return!!this.getCoords(!0,e).some((function(e){return e.x<=n.x&&e.x>=t.x&&e.y<=n.y&&e.y>=t.y}))||(!!this.intersectsWithRect(t,n,!0,e)||this._containsCenterOfCanvas(t,n,e))},_containsCenterOfCanvas:function(e,t,n){var r={x:(e.x+t.x)/2,y:(e.y+t.y)/2};return!!this.containsPoint(r,null,!0,n)},isPartiallyOnScreen:function(e){if(!this.canvas)return!1;var t=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br;return!!this.intersectsWithRect(t,n,!0,e)||this.getCoords(!0,e).every((function(e){return(e.x>=n.x||e.x<=t.x)&&(e.y>=n.y||e.y<=t.y)}))&&this._containsCenterOfCanvas(t,n,e)},_getImageLines:function(e){return{topline:{o:e.tl,d:e.tr},rightline:{o:e.tr,d:e.br},bottomline:{o:e.br,d:e.bl},leftline:{o:e.bl,d:e.tl}}},_findCrossPoints:function(e,t){var n,r,i,a=0;for(var o in t)if(!((i=t[o]).o.y<e.y&&i.d.y<e.y||i.o.y>=e.y&&i.d.y>=e.y||(i.o.x===i.d.x&&i.o.x>=e.x?r=i.o.x:(0,n=(i.d.y-i.o.y)/(i.d.x-i.o.x),r=-(e.y-0*e.x-(i.o.y-n*i.o.x))/(0-n)),r>=e.x&&(a+=1),2!==a)))break;return a},getBoundingRect:function(t,n){var r=this.getCoords(t,n);return e.makeBoundingBoxFromPoints(r)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(e){return Math.abs(e)<this.minScaleLimit?e<0?-this.minScaleLimit:this.minScaleLimit:0===e?1e-4:e},scale:function(e){return this._set("scaleX",e),this._set("scaleY",e),this.setCoords()},scaleToWidth:function(e,t){var n=this.getBoundingRect(t).width/this.getScaledWidth();return this.scale(e/this.width/n)},scaleToHeight:function(e,t){var n=this.getBoundingRect(t).height/this.getScaledHeight();return this.scale(e/this.height/n)},calcCoords:function(e){return e?this.calcACoords():this.calcOCoords()},calcLineCoords:function(){var n=this.getViewportTransform(),i=this.padding,a=t(this.angle),o=e.cos(a)*i,s=e.sin(a)*i,l=o+s,c=o-s,u=this.calcACoords(),d={tl:r(u.tl,n),tr:r(u.tr,n),bl:r(u.bl,n),br:r(u.br,n)};return i&&(d.tl.x-=c,d.tl.y-=l,d.tr.x+=l,d.tr.y-=c,d.bl.x-=l,d.bl.y+=c,d.br.x+=c,d.br.y+=l),d},calcOCoords:function(){var e=this._calcRotateMatrix(),t=this._calcTranslateMatrix(),r=this.getViewportTransform(),i=n(r,t),a=n(i,e),o=(a=n(a,[1/r[0],0,0,1/r[3],0,0]),this._calculateCurrentDimensions()),s={};return this.forEachControl((function(e,t,n){s[t]=e.positionHandler(o,a,n)})),s},calcACoords:function(){var e=this._calcRotateMatrix(),t=this._calcTranslateMatrix(),i=n(t,e),a=this._getTransformedDimensions(),o=a.x/2,s=a.y/2;return{tl:r({x:-o,y:-s},i),tr:r({x:o,y:-s},i),bl:r({x:-o,y:s},i),br:r({x:o,y:s},i)}},setCoords:function(e){return this.aCoords=this.calcACoords(),this.lineCoords=this.group?this.aCoords:this.calcLineCoords(),e?this:(this.oCoords=this.calcOCoords(),this._setCornerCoords&&this._setCornerCoords(),this)},_calcRotateMatrix:function(){return e.calcRotateMatrix(this)},_calcTranslateMatrix:function(){var e=this.getCenterPoint();return[1,0,0,1,e.x,e.y]},transformMatrixKey:function(e){var t="";return!e&&this.group&&(t=this.group.transformMatrixKey(e)+"_"),t+this.top+"_"+this.left+"_"+this.scaleX+"_"+this.scaleY+"_"+this.skewX+"_"+this.skewY+"_"+this.angle+"_"+this.originX+"_"+this.originY+"_"+this.width+"_"+this.height+"_"+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(e){var t=this.calcOwnMatrix();if(e||!this.group)return t;var r=this.transformMatrixKey(e),i=this.matrixCache||(this.matrixCache={});return i.key===r?i.value:(this.group&&(t=n(this.group.calcTransformMatrix(!1),t)),i.key=r,i.value=t,t)},calcOwnMatrix:function(){var t=this.transformMatrixKey(!0),n=this.ownMatrixCache||(this.ownMatrixCache={});if(n.key===t)return n.value;var r=this._calcTranslateMatrix(),i={angle:this.angle,translateX:r[4],translateY:r[5],scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY};return n.key=t,n.value=e.composeMatrix(i),n.value},_calcDimensionsTransformMatrix:function(t,n,r){return e.calcDimensionsMatrix({skewX:t,skewY:n,scaleX:this.scaleX*(r&&this.flipX?-1:1),scaleY:this.scaleY*(r&&this.flipY?-1:1)})},_getNonTransformedDimensions:function(){var e=this.strokeWidth;return{x:this.width+e,y:this.height+e}},_getTransformedDimensions:function(t,n){void 0===t&&(t=this.skewX),void 0===n&&(n=this.skewY);var r,i,a=this._getNonTransformedDimensions(),o=0===t&&0===n;if(this.strokeUniform?(r=this.width,i=this.height):(r=a.x,i=a.y),o)return this._finalizeDimensions(r*this.scaleX,i*this.scaleY);var s=e.sizeAfterTransform(r,i,{scaleX:this.scaleX,scaleY:this.scaleY,skewX:t,skewY:n});return this._finalizeDimensions(s.x,s.y)},_finalizeDimensions:function(e,t){return this.strokeUniform?{x:e+this.strokeWidth,y:t+this.strokeWidth}:{x:e,y:t}},_calculateCurrentDimensions:function(){var e=this.getViewportTransform(),t=this._getTransformedDimensions();return r(t,e,!0).scalarAdd(2*this.padding)}})}(),C.util.object.extend(C.Object.prototype,{sendToBack:function(){return this.group?C.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?C.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(e){return this.group?C.StaticCanvas.prototype.sendBackwards.call(this.group,this,e):this.canvas&&this.canvas.sendBackwards(this,e),this},bringForward:function(e){return this.group?C.StaticCanvas.prototype.bringForward.call(this.group,this,e):this.canvas&&this.canvas.bringForward(this,e),this},moveTo:function(e){return this.group&&"activeSelection"!==this.group.type?C.StaticCanvas.prototype.moveTo.call(this.group,this,e):this.canvas&&this.canvas.moveTo(this,e),this}}),function(){function e(e,t){if(t){if(t.toLive)return e+": url(#SVGID_"+t.id+"); ";var n=new C.Color(t),r=e+": "+n.toRgb()+"; ",i=n.getAlpha();return 1!==i&&(r+=e+"-opacity: "+i.toString()+"; "),r}return e+": none; "}var t=C.util.toFixed;C.util.object.extend(C.Object.prototype,{getSvgStyles:function(t){var n=this.fillRule?this.fillRule:"nonzero",r=this.strokeWidth?this.strokeWidth:"0",i=this.strokeDashArray?this.strokeDashArray.join(" "):"none",a=this.strokeDashOffset?this.strokeDashOffset:"0",o=this.strokeLineCap?this.strokeLineCap:"butt",s=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",c=void 0!==this.opacity?this.opacity:"1",u=this.visible?"":" visibility: hidden;",d=t?"":this.getSvgFilter(),h=e("fill",this.fill);return[e("stroke",this.stroke),"stroke-width: ",r,"; ","stroke-dasharray: ",i,"; ","stroke-linecap: ",o,"; ","stroke-dashoffset: ",a,"; ","stroke-linejoin: ",s,"; ","stroke-miterlimit: ",l,"; ",h,"fill-rule: ",n,"; ","opacity: ",c,";",d,u].join("")},getSvgSpanStyles:function(t,n){var r=t.fontFamily?"font-family: "+(-1===t.fontFamily.indexOf("'")&&-1===t.fontFamily.indexOf('"')?"'"+t.fontFamily+"'":t.fontFamily)+"; ":"",i=t.strokeWidth?"stroke-width: "+t.strokeWidth+"; ":"",a=(r=r,t.fontSize?"font-size: "+t.fontSize+"px; ":""),o=t.fontStyle?"font-style: "+t.fontStyle+"; ":"",s=t.fontWeight?"font-weight: "+t.fontWeight+"; ":"",l=t.fill?e("fill",t.fill):"",c=t.stroke?e("stroke",t.stroke):"",u=this.getSvgTextDecoration(t);return u&&(u="text-decoration: "+u+"; "),[c,i,r,a,o,s,u,l,t.deltaY?"baseline-shift: "+-t.deltaY+"; ":"",n?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(e){return["overline","underline","line-through"].filter((function(t){return e[t.replace("-","")]})).join(" ")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(e,t){var n=e?this.calcTransformMatrix():this.calcOwnMatrix();return'transform="'+C.util.matrixToSVG(n)+(t||"")+'" '},_setSVGBg:function(e){if(this.backgroundColor){var n=C.Object.NUM_FRACTION_DIGITS;e.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',t(-this.width/2,n),'" y="',t(-this.height/2,n),'" width="',t(this.width,n),'" height="',t(this.height,n),'"></rect>\n')}},toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(e),{reviver:e})},toClipPathSVG:function(e){return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(e),{reviver:e})},_createBaseClipPathSVGMarkup:function(e,t){var n=(t=t||{}).reviver,r=t.additionalTransform||"",i=[this.getSvgTransform(!0,r),this.getSvgCommons()].join(""),a=e.indexOf("COMMON_PARTS");return e[a]=i,n?n(e.join("")):e.join("")},_createBaseSVGMarkup:function(e,t){var n,r,i=(t=t||{}).noStyle,a=t.reviver,o=i?"":'style="'+this.getSvgStyles()+'" ',s=t.withShadow?'style="'+this.getSvgFilter()+'" ':"",l=this.clipPath,c=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",u=l&&l.absolutePositioned,d=this.stroke,h=this.fill,f=this.shadow,p=[],m=e.indexOf("COMMON_PARTS"),g=t.additionalTransform;return l&&(l.clipPathId="CLIPPATH_"+C.Object.__uid++,r='<clipPath id="'+l.clipPathId+'" >\n'+l.toClipPathSVG(a)+"</clipPath>\n"),u&&p.push("<g ",s,this.getSvgCommons()," >\n"),p.push("<g ",this.getSvgTransform(!1),u?"":s+this.getSvgCommons()," >\n"),n=[o,c,i?"":this.addPaintOrder()," ",g?'transform="'+g+'" ':""].join(""),e[m]=n,h&&h.toLive&&p.push(h.toSVG(this)),d&&d.toLive&&p.push(d.toSVG(this)),f&&p.push(f.toSVG(this)),l&&p.push(r),p.push(e.join("")),p.push("</g>\n"),u&&p.push("</g>\n"),a?a(p.join("")):p.join("")},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var e=C.util.object.extend;function t(t,n,r){var i={};r.forEach((function(e){i[e]=t[e]})),e(t[n],i,!0)}C.util.object.extend(C.Object.prototype,{hasStateChanged:function(e){var t="_"+(e=e||"stateProperties");return Object.keys(this[t]).length<this[e].length||!function e(t,n,r){if(t===n)return!0;if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var i=0,a=t.length;i<a;i++)if(!e(t[i],n[i]))return!1;return!0}if(t&&"object"==typeof t){var o,s=Object.keys(t);if(!n||"object"!=typeof n||!r&&s.length!==Object.keys(n).length)return!1;for(i=0,a=s.length;i<a;i++)if("canvas"!==(o=s[i])&&"group"!==o&&!e(t[o],n[o]))return!1;return!0}}(this[t],this,!0)},saveState:function(e){var n=e&&e.propertySet||"stateProperties",r="_"+n;return this[r]?(t(this,r,this[n]),e&&e.stateProperties&&t(this,r,e.stateProperties),this):this.setupState(e)},setupState:function(e){var t=(e=e||{}).propertySet||"stateProperties";return e.propertySet=t,this["_"+t]={},this.saveState(e),this}})}(),function(){var e=C.util.degreesToRadians;C.util.object.extend(C.Object.prototype,{_findTargetCorner:function(e,t){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var n,r,i,a=e.x,o=e.y,s=Object.keys(this.oCoords),l=s.length-1;for(this.__corner=0;l>=0;l--)if(i=s[l],this.isControlVisible(i)&&(r=this._getImageLines(t?this.oCoords[i].touchCorner:this.oCoords[i].corner),0!==(n=this._findCrossPoints({x:a,y:o},r))&&n%2==1))return this.__corner=i,i;return!1},forEachControl:function(e){for(var t in this.controls)e(this.controls[t],t,this)},_setCornerCoords:function(){var t,n,r=this.oCoords,i=e(45-this.angle),a=C.util.cos(i),o=C.util.sin(i),s=.707106*this.cornerSize,l=.707106*this.touchCornerSize,c=s*a,u=s*o,d=l*a,h=l*o;for(var f in r)t=r[f].x,n=r[f].y,r[f].corner={tl:{x:t-u,y:n-c},tr:{x:t+c,y:n-u},bl:{x:t-c,y:n+u},br:{x:t+u,y:n+c}},r[f].touchCorner={tl:{x:t-h,y:n-d},tr:{x:t+d,y:n-h},bl:{x:t-d,y:n+h},br:{x:t+h,y:n+d}}},drawSelectionBackground:function(t){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;t.save();var n=this.getCenterPoint(),r=this._calculateCurrentDimensions(),i=this.canvas.viewportTransform;return t.translate(n.x,n.y),t.scale(1/i[0],1/i[3]),t.rotate(e(this.angle)),t.fillStyle=this.selectionBackgroundColor,t.fillRect(-r.x/2,-r.y/2,r.x,r.y),t.restore(),this},drawBorders:function(e,t){t=t||{};var n=this._calculateCurrentDimensions(),r=this.borderScaleFactor,i=n.x+r,a=n.y+r,o=void 0!==t.hasControls?t.hasControls:this.hasControls,s=!1;return e.save(),e.strokeStyle=t.borderColor||this.borderColor,this._setLineDash(e,t.borderDashArray||this.borderDashArray,null),e.strokeRect(-i/2,-a/2,i,a),o&&(e.beginPath(),this.forEachControl((function(t,n,r){t.withConnection&&t.getVisibility(r,n)&&(s=!0,e.moveTo(t.x*i,t.y*a),e.lineTo(t.x*i+t.offsetX,t.y*a+t.offsetY))})),s&&e.stroke()),e.restore(),this},drawBordersInGroup:function(e,t,n){n=n||{};var r=C.util.sizeAfterTransform(this.width,this.height,t),i=this.strokeWidth,a=this.strokeUniform,o=this.borderScaleFactor,s=r.x+i*(a?this.canvas.getZoom():t.scaleX)+o,l=r.y+i*(a?this.canvas.getZoom():t.scaleY)+o;return e.save(),this._setLineDash(e,n.borderDashArray||this.borderDashArray,null),e.strokeStyle=n.borderColor||this.borderColor,e.strokeRect(-s/2,-l/2,s,l),e.restore(),this},drawControls:function(e,t){return t=t||{},e.save(),e.setTransform(this.canvas.getRetinaScaling(),0,0,this.canvas.getRetinaScaling(),0,0),e.strokeStyle=e.fillStyle=t.cornerColor||this.cornerColor,this.transparentCorners||(e.strokeStyle=t.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(e,t.cornerDashArray||this.cornerDashArray,null),this.setCoords(),this.forEachControl((function(n,r,i){n.getVisibility(i,r)&&n.render(e,i.oCoords[r].x,i.oCoords[r].y,t,i)})),e.restore(),this},isControlVisible:function(e){return this.controls[e]&&this.controls[e].getVisibility(this,e)},setControlVisible:function(e,t){return this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[e]=t,this},setControlsVisibility:function(e){for(var t in e||(e={}),e)this.setControlVisible(t,e[t]);return this},onDeselect:function(){},onSelect:function(){}})}(),C.util.object.extend(C.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(e,t){var n=function(){},r=(t=t||{}).onComplete||n,i=t.onChange||n,a=this;return C.util.animate({startValue:e.left,endValue:this.getCenter().left,duration:this.FX_DURATION,onChange:function(t){e.set("left",t),a.requestRenderAll(),i()},onComplete:function(){e.setCoords(),r()}}),this},fxCenterObjectV:function(e,t){var n=function(){},r=(t=t||{}).onComplete||n,i=t.onChange||n,a=this;return C.util.animate({startValue:e.top,endValue:this.getCenter().top,duration:this.FX_DURATION,onChange:function(t){e.set("top",t),a.requestRenderAll(),i()},onComplete:function(){e.setCoords(),r()}}),this},fxRemove:function(e,t){var n=function(){},r=(t=t||{}).onComplete||n,i=t.onChange||n,a=this;return C.util.animate({startValue:e.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(t){e.set("opacity",t),a.requestRenderAll(),i()},onComplete:function(){a.remove(e),r()}}),this}}),C.util.object.extend(C.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var e,t,n=[];for(e in arguments[0])n.push(e);for(var r=0,i=n.length;r<i;r++)e=n[r],t=r!==i-1,this._animate(e,arguments[0][e],arguments[1],t)}else this._animate.apply(this,arguments);return this},_animate:function(e,t,n,r){var i,a=this;t=t.toString(),n=n?C.util.object.clone(n):{},~e.indexOf(".")&&(i=e.split("."));var o=a.colorProperties.indexOf(e)>-1||i&&a.colorProperties.indexOf(i[1])>-1,s=i?this.get(i[0])[i[1]]:this.get(e);"from"in n||(n.from=s),o||(t=~t.indexOf("=")?s+parseFloat(t.replace("=","")):parseFloat(t));var l={startValue:n.from,endValue:t,byValue:n.by,easing:n.easing,duration:n.duration,abort:n.abort&&function(){return n.abort.call(a)},onChange:function(t,o,s){i?a[i[0]][i[1]]=t:a.set(e,t),r||n.onChange&&n.onChange(t,o,s)},onComplete:function(e,t,i){r||(a.setCoords(),n.onComplete&&n.onComplete(e,t,i))}};o?C.util.animateColor(l.startValue,l.endValue,l.duration,l):C.util.animate(l)}}),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.util.object.clone,i={x1:1,x2:1,y1:1,y2:1},a=t.StaticCanvas.supports("setLineDash");function o(e,t){var n=e.origin,r=e.axis1,i=e.axis2,a=e.dimension,o=t.nearest,s=t.center,l=t.farthest;return function(){switch(this.get(n)){case o:return Math.min(this.get(r),this.get(i));case s:return Math.min(this.get(r),this.get(i))+.5*this.get(a);case l:return Math.max(this.get(r),this.get(i))}}}t.Line?t.warn("fabric.Line is already defined"):(t.Line=t.util.createClass(t.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:t.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(e,t){e||(e=[0,0,0,0]),this.callSuper("initialize",t),this.set("x1",e[0]),this.set("y1",e[1]),this.set("x2",e[2]),this.set("y2",e[3]),this._setWidthHeight(t)},_setWidthHeight:function(e){e||(e={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in e?e.left:this._getLeftToOriginX(),this.top="top"in e?e.top:this._getTopToOriginY()},_set:function(e,t){return this.callSuper("_set",e,t),void 0!==i[e]&&this._setWidthHeight(),this},_getLeftToOriginX:o({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:o({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(e){if(e.beginPath(),!this.strokeDashArray||this.strokeDashArray&&a){var t=this.calcLinePoints();e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2)}e.lineWidth=this.strokeWidth;var n=e.strokeStyle;e.strokeStyle=this.stroke||e.fillStyle,this.stroke&&this._renderStroke(e),e.strokeStyle=n},_renderDashedStroke:function(e){var n=this.calcLinePoints();e.beginPath(),t.util.drawDashedLine(e,n.x1,n.y1,n.x2,n.y2,this.strokeDashArray),e.closePath()},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(e){return n(this.callSuper("toObject",e),this.calcLinePoints())},_getNonTransformedDimensions:function(){var e=this.callSuper("_getNonTransformedDimensions");return"butt"===this.strokeLineCap&&(0===this.width&&(e.y-=this.strokeWidth),0===this.height&&(e.x-=this.strokeWidth)),e},calcLinePoints:function(){var e=this.x1<=this.x2?-1:1,t=this.y1<=this.y2?-1:1,n=e*this.width*.5,r=t*this.height*.5;return{x1:n,x2:e*this.width*-.5,y1:r,y2:t*this.height*-.5}},_toSVG:function(){var e=this.calcLinePoints();return["<line ","COMMON_PARTS",'x1="',e.x1,'" y1="',e.y1,'" x2="',e.x2,'" y2="',e.y2,'" />\n']}}),t.Line.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),t.Line.fromElement=function(e,r,i){i=i||{};var a=t.parseAttributes(e,t.Line.ATTRIBUTE_NAMES),o=[a.x1||0,a.y1||0,a.x2||0,a.y2||0];r(new t.Line(o,n(a,i)))},t.Line.fromObject=function(e,n){var i=r(e,!0);i.points=[e.x1,e.y1,e.x2,e.y2],t.Object._fromObject("Line",i,(function(e){delete e.points,n&&n(e)}),"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=Math.PI;t.Circle?t.warn("fabric.Circle is already defined."):(t.Circle=t.util.createClass(t.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*n,cacheProperties:t.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(e,t){return this.callSuper("_set",e,t),"radius"===e&&this.setRadius(t),this},toObject:function(e){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(e))},_toSVG:function(){var e,r=(this.endAngle-this.startAngle)%(2*n);if(0===r)e=["<circle ","COMMON_PARTS",'cx="0" cy="0" ','r="',this.radius,'" />\n'];else{var i=t.util.cos(this.startAngle)*this.radius,a=t.util.sin(this.startAngle)*this.radius,o=t.util.cos(this.endAngle)*this.radius,s=t.util.sin(this.endAngle)*this.radius,l=r>n?"1":"0";e=['<path d="M '+i+" "+a," A "+this.radius+" "+this.radius," 0 ",+l+" 1"," "+o+" "+s,'" ',"COMMON_PARTS"," />\n"]}return e},_render:function(e){e.beginPath(),e.arc(0,0,this.radius,this.startAngle,this.endAngle,!1),this._renderPaintInOrder(e)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(e){return this.radius=e,this.set("width",2*e).set("height",2*e)}}),t.Circle.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),t.Circle.fromElement=function(e,n){var r,i=t.parseAttributes(e,t.Circle.ATTRIBUTE_NAMES);if(!("radius"in(r=i)&&r.radius>=0))throw new Error("value of `r` attribute is required and can not be negative");i.left=(i.left||0)-i.radius,i.top=(i.top||0)-i.radius,n(new t.Circle(i))},t.Circle.fromObject=function(e,n){return t.Object._fromObject("Circle",e,n)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Triangle?t.warn("fabric.Triangle is already defined"):(t.Triangle=t.util.createClass(t.Object,{type:"triangle",width:100,height:100,_render:function(e){var t=this.width/2,n=this.height/2;e.beginPath(),e.moveTo(-t,n),e.lineTo(0,-n),e.lineTo(t,n),e.closePath(),this._renderPaintInOrder(e)},_renderDashedStroke:function(e){var n=this.width/2,r=this.height/2;e.beginPath(),t.util.drawDashedLine(e,-n,r,0,-r,this.strokeDashArray),t.util.drawDashedLine(e,0,-r,n,r,this.strokeDashArray),t.util.drawDashedLine(e,n,r,-n,r,this.strokeDashArray),e.closePath()},_toSVG:function(){var e=this.width/2,t=this.height/2;return["<polygon ","COMMON_PARTS",'points="',[-e+" "+t,"0 "+-t,e+" "+t].join(","),'" />']}}),t.Triangle.fromObject=function(e,n){return t.Object._fromObject("Triangle",e,n)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=2*Math.PI;t.Ellipse?t.warn("fabric.Ellipse is already defined."):(t.Ellipse=t.util.createClass(t.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:t.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(e){this.callSuper("initialize",e),this.set("rx",e&&e.rx||0),this.set("ry",e&&e.ry||0)},_set:function(e,t){switch(this.callSuper("_set",e,t),e){case"rx":this.rx=t,this.set("width",2*t);break;case"ry":this.ry=t,this.set("height",2*t)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(e){return this.callSuper("toObject",["rx","ry"].concat(e))},_toSVG:function(){return["<ellipse ","COMMON_PARTS",'cx="0" cy="0" ','rx="',this.rx,'" ry="',this.ry,'" />\n']},_render:function(e){e.beginPath(),e.save(),e.transform(1,0,0,this.ry/this.rx,0,0),e.arc(0,0,this.rx,0,n,!1),e.restore(),this._renderPaintInOrder(e)}}),t.Ellipse.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),t.Ellipse.fromElement=function(e,n){var r=t.parseAttributes(e,t.Ellipse.ATTRIBUTE_NAMES);r.left=(r.left||0)-r.rx,r.top=(r.top||0)-r.ry,n(new t.Ellipse(r))},t.Ellipse.fromObject=function(e,n){return t.Object._fromObject("Ellipse",e,n)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend;t.Rect?t.warn("fabric.Rect is already defined"):(t.Rect=t.util.createClass(t.Object,{stateProperties:t.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:t.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(e){this.callSuper("initialize",e),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(e){var t=this.rx?Math.min(this.rx,this.width/2):0,n=this.ry?Math.min(this.ry,this.height/2):0,r=this.width,i=this.height,a=-this.width/2,o=-this.height/2,s=0!==t||0!==n,l=.4477152502;e.beginPath(),e.moveTo(a+t,o),e.lineTo(a+r-t,o),s&&e.bezierCurveTo(a+r-l*t,o,a+r,o+l*n,a+r,o+n),e.lineTo(a+r,o+i-n),s&&e.bezierCurveTo(a+r,o+i-l*n,a+r-l*t,o+i,a+r-t,o+i),e.lineTo(a+t,o+i),s&&e.bezierCurveTo(a+l*t,o+i,a,o+i-l*n,a,o+i-n),e.lineTo(a,o+n),s&&e.bezierCurveTo(a,o+l*n,a+l*t,o,a+t,o),e.closePath(),this._renderPaintInOrder(e)},_renderDashedStroke:function(e){var n=-this.width/2,r=-this.height/2,i=this.width,a=this.height;e.beginPath(),t.util.drawDashedLine(e,n,r,n+i,r,this.strokeDashArray),t.util.drawDashedLine(e,n+i,r,n+i,r+a,this.strokeDashArray),t.util.drawDashedLine(e,n+i,r+a,n,r+a,this.strokeDashArray),t.util.drawDashedLine(e,n,r+a,n,r,this.strokeDashArray),e.closePath()},toObject:function(e){return this.callSuper("toObject",["rx","ry"].concat(e))},_toSVG:function(){return["<rect ","COMMON_PARTS",'x="',-this.width/2,'" y="',-this.height/2,'" rx="',this.rx,'" ry="',this.ry,'" width="',this.width,'" height="',this.height,'" />\n']}}),t.Rect.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),t.Rect.fromElement=function(e,r,i){if(!e)return r(null);i=i||{};var a=t.parseAttributes(e,t.Rect.ATTRIBUTE_NAMES);a.left=a.left||0,a.top=a.top||0,a.height=a.height||0,a.width=a.width||0;var o=new t.Rect(n(i?t.util.object.clone(i):{},a));o.visible=o.visible&&o.width>0&&o.height>0,r(o)},t.Rect.fromObject=function(e,n){return t.Object._fromObject("Rect",e,n)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.util.array.min,i=t.util.array.max,a=t.util.toFixed;t.Polyline?t.warn("fabric.Polyline is already defined"):(t.Polyline=t.util.createClass(t.Object,{type:"polyline",points:null,cacheProperties:t.Object.prototype.cacheProperties.concat("points"),initialize:function(e,t){t=t||{},this.points=e||[],this.callSuper("initialize",t),this._setPositionDimensions(t)},_setPositionDimensions:function(e){var t,n=this._calcDimensions(e);this.width=n.width,this.height=n.height,e.fromSVG||(t=this.translateToGivenOrigin({x:n.left-this.strokeWidth/2,y:n.top-this.strokeWidth/2},"left","top",this.originX,this.originY)),void 0===e.left&&(this.left=e.fromSVG?n.left:t.x),void 0===e.top&&(this.top=e.fromSVG?n.top:t.y),this.pathOffset={x:n.left+this.width/2,y:n.top+this.height/2}},_calcDimensions:function(){var e=this.points,t=r(e,"x")||0,n=r(e,"y")||0;return{left:t,top:n,width:(i(e,"x")||0)-t,height:(i(e,"y")||0)-n}},toObject:function(e){return n(this.callSuper("toObject",e),{points:this.points.concat()})},_toSVG:function(){for(var e=[],n=this.pathOffset.x,r=this.pathOffset.y,i=t.Object.NUM_FRACTION_DIGITS,o=0,s=this.points.length;o<s;o++)e.push(a(this.points[o].x-n,i),",",a(this.points[o].y-r,i)," ");return["<"+this.type+" ","COMMON_PARTS",'points="',e.join(""),'" />\n']},commonRender:function(e){var t,n=this.points.length,r=this.pathOffset.x,i=this.pathOffset.y;if(!n||isNaN(this.points[n-1].y))return!1;e.beginPath(),e.moveTo(this.points[0].x-r,this.points[0].y-i);for(var a=0;a<n;a++)t=this.points[a],e.lineTo(t.x-r,t.y-i);return!0},_render:function(e){this.commonRender(e)&&this._renderPaintInOrder(e)},_renderDashedStroke:function(e){var n,r;e.beginPath();for(var i=0,a=this.points.length;i<a;i++)n=this.points[i],r=this.points[i+1]||n,t.util.drawDashedLine(e,n.x,n.y,r.x,r.y,this.strokeDashArray)},complexity:function(){return this.get("points").length}}),t.Polyline.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(),t.Polyline.fromElementGenerator=function(e){return function(r,i,a){if(!r)return i(null);a||(a={});var o=t.parsePointsAttribute(r.getAttribute("points")),s=t.parseAttributes(r,t[e].ATTRIBUTE_NAMES);s.fromSVG=!0,i(new t[e](o,n(s,a)))}},t.Polyline.fromElement=t.Polyline.fromElementGenerator("Polyline"),t.Polyline.fromObject=function(e,n){return t.Object._fromObject("Polyline",e,n,"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Polygon?t.warn("fabric.Polygon is already defined"):(t.Polygon=t.util.createClass(t.Polyline,{type:"polygon",_render:function(e){this.commonRender(e)&&(e.closePath(),this._renderPaintInOrder(e))},_renderDashedStroke:function(e){this.callSuper("_renderDashedStroke",e),e.closePath()}}),t.Polygon.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(),t.Polygon.fromElement=t.Polyline.fromElementGenerator("Polygon"),t.Polygon.fromObject=function(e,n){return t.Object._fromObject("Polygon",e,n,"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.array.min,r=t.util.array.max,i=t.util.object.extend,a=Object.prototype.toString,o=t.util.toFixed;t.Path?t.warn("fabric.Path is already defined"):(t.Path=t.util.createClass(t.Object,{type:"path",path:null,cacheProperties:t.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:t.Object.prototype.stateProperties.concat("path"),initialize:function(e,n){n=n||{},this.callSuper("initialize",n),e||(e=[]);var r="[object Array]"===a.call(e);this.path=r?t.util.makePathSimpler(e):t.util.makePathSimpler(t.util.parsePath(e)),this.path&&t.Polyline.prototype._setPositionDimensions.call(this,n)},_renderPathCommands:function(e){var t,n=0,r=0,i=0,a=0,o=0,s=0,l=-this.pathOffset.x,c=-this.pathOffset.y;e.beginPath();for(var u=0,d=this.path.length;u<d;++u)switch((t=this.path[u])[0]){case"L":i=t[1],a=t[2],e.lineTo(i+l,a+c);break;case"M":n=i=t[1],r=a=t[2],e.moveTo(i+l,a+c);break;case"C":i=t[5],a=t[6],o=t[3],s=t[4],e.bezierCurveTo(t[1]+l,t[2]+c,o+l,s+c,i+l,a+c);break;case"Q":e.quadraticCurveTo(t[1]+l,t[2]+c,t[3]+l,t[4]+c),i=t[3],a=t[4],o=t[1],s=t[2];break;case"z":case"Z":i=n,a=r,e.closePath()}},_render:function(e){this._renderPathCommands(e),this._renderPaintInOrder(e)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},toObject:function(e){return i(this.callSuper("toObject",e),{path:this.path.map((function(e){return e.slice()}))})},toDatalessObject:function(e){var t=this.toObject(["sourcePath"].concat(e));return t.sourcePath&&delete t.path,t},_toSVG:function(){return["<path ","COMMON_PARTS",'d="',this.path.map((function(e){return e.join(" ")})).join(" "),'" stroke-linecap="round" ',"/>\n"]},_getOffsetTransform:function(){var e=t.Object.NUM_FRACTION_DIGITS;return" translate("+o(-this.pathOffset.x,e)+", "+o(-this.pathOffset.y,e)+")"},toClipPathSVG:function(e){var t=this._getOffsetTransform();return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})},toSVG:function(e){var t=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})},complexity:function(){return this.path.length},_calcDimensions:function(){for(var e,i,a=[],o=[],s=0,l=0,c=0,u=0,d=0,h=this.path.length;d<h;++d){switch((e=this.path[d])[0]){case"L":c=e[1],u=e[2],i=[];break;case"M":s=c=e[1],l=u=e[2],i=[];break;case"C":i=t.util.getBoundsOfCurve(c,u,e[1],e[2],e[3],e[4],e[5],e[6]),c=e[5],u=e[6];break;case"Q":i=t.util.getBoundsOfCurve(c,u,e[1],e[2],e[1],e[2],e[3],e[4]),c=e[3],u=e[4];break;case"z":case"Z":c=s,u=l}i.forEach((function(e){a.push(e.x),o.push(e.y)})),a.push(c),o.push(u)}var f=n(a)||0,p=n(o)||0;return{left:f,top:p,width:(r(a)||0)-f,height:(r(o)||0)-p}}}),t.Path.fromObject=function(e,n){if("string"==typeof e.sourcePath){var r=e.sourcePath;t.loadSVGFromURL(r,(function(t){var r=t[0];r.setOptions(e),n&&n(r)}))}else t.Object._fromObject("Path",e,n,"path")},t.Path.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(["d"]),t.Path.fromElement=function(e,n,r){var a=t.parseAttributes(e,t.Path.ATTRIBUTE_NAMES);a.fromSVG=!0,n(new t.Path(a.d,i(a,r)))})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.array.min,r=t.util.array.max;t.Group||(t.Group=t.util.createClass(t.Object,t.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,cacheProperties:[],useSetOnGroup:!1,initialize:function(e,t,n){t=t||{},this._objects=[],n&&this.callSuper("initialize",t),this._objects=e||[];for(var r=this._objects.length;r--;)this._objects[r].group=this;if(n)this._updateObjectsACoords();else{var i=t&&t.centerPoint;void 0!==t.originX&&(this.originX=t.originX),void 0!==t.originY&&(this.originY=t.originY),i||this._calcBounds(),this._updateObjectsCoords(i),delete t.centerPoint,this.callSuper("initialize",t)}this.setCoords()},_updateObjectsACoords:function(){for(var e=this._objects.length;e--;)this._objects[e].setCoords(!0)},_updateObjectsCoords:function(e){e=e||this.getCenterPoint();for(var t=this._objects.length;t--;)this._updateObjectCoords(this._objects[t],e)},_updateObjectCoords:function(e,t){var n=e.left,r=e.top;e.set({left:n-t.x,top:r-t.y}),e.group=this,e.setCoords(!0)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(e){return this._restoreObjectsState(),t.util.resetObjectTransform(this),e&&(this._objects.push(e),e.group=this,e._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},removeWithUpdate:function(e){return this._restoreObjectsState(),t.util.resetObjectTransform(this),this.remove(e),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(e){this.dirty=!0,e.group=this,e._set("canvas",this.canvas)},_onObjectRemoved:function(e){this.dirty=!0,delete e.group},_set:function(e,n){var r=this._objects.length;if(this.useSetOnGroup)for(;r--;)this._objects[r].setOnGroup(e,n);if("canvas"===e)for(;r--;)this._objects[r]._set(e,n);t.Object.prototype._set.call(this,e,n)},toObject:function(e){var n=this.includeDefaultValues,r=this._objects.map((function(t){var r=t.includeDefaultValues;t.includeDefaultValues=n;var i=t.toObject(e);return t.includeDefaultValues=r,i})),i=t.Object.prototype.toObject.call(this,e);return i.objects=r,i},toDatalessObject:function(e){var n,r=this.sourcePath;if(r)n=r;else{var i=this.includeDefaultValues;n=this._objects.map((function(t){var n=t.includeDefaultValues;t.includeDefaultValues=i;var r=t.toDatalessObject(e);return t.includeDefaultValues=n,r}))}var a=t.Object.prototype.toDatalessObject.call(this,e);return a.objects=n,a},render:function(e){this._transformDone=!0,this.callSuper("render",e),this._transformDone=!1},shouldCache:function(){var e=t.Object.prototype.shouldCache.call(this);if(e)for(var n=0,r=this._objects.length;n<r;n++)if(this._objects[n].willDrawShadow())return this.ownCaching=!1,!1;return e},willDrawShadow:function(){if(t.Object.prototype.willDrawShadow.call(this))return!0;for(var e=0,n=this._objects.length;e<n;e++)if(this._objects[e].willDrawShadow())return!0;return!1},isOnACache:function(){return this.ownCaching||this.group&&this.group.isOnACache()},drawObject:function(e){for(var t=0,n=this._objects.length;t<n;t++)this._objects[t].render(e);this._drawClipPath(e)},isCacheDirty:function(e){if(this.callSuper("isCacheDirty",e))return!0;if(!this.statefullCache)return!1;for(var t=0,n=this._objects.length;t<n;t++)if(this._objects[t].isCacheDirty(!0)){if(this._cacheCanvas){var r=this.cacheWidth/this.zoomX,i=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-r/2,-i/2,r,i)}return!0}return!1},_restoreObjectsState:function(){return this._objects.forEach(this._restoreObjectState,this),this},realizeTransform:function(e){var n=e.calcTransformMatrix(),r=t.util.qrDecompose(n),i=new t.Point(r.translateX,r.translateY);return e.flipX=!1,e.flipY=!1,e.set("scaleX",r.scaleX),e.set("scaleY",r.scaleY),e.skewX=r.skewX,e.skewY=r.skewY,e.angle=r.angle,e.setPositionByOrigin(i,"center","center"),e},_restoreObjectState:function(e){return this.realizeTransform(e),delete e.group,e.setCoords(),this},destroy:function(){return this._objects.forEach((function(e){e.set("dirty",!0)})),this._restoreObjectsState()},toActiveSelection:function(){if(this.canvas){var e=this._objects,n=this.canvas;this._objects=[];var r=this.toObject();delete r.objects;var i=new t.ActiveSelection([]);return i.set(r),i.type="activeSelection",n.remove(this),e.forEach((function(e){e.group=i,e.dirty=!0,n.add(e)})),i.canvas=n,i._objects=e,n._activeObject=i,i.setCoords(),i}},ungroupOnCanvas:function(){return this._restoreObjectsState()},setObjectsCoords:function(){return this.forEachObject((function(e){e.setCoords(!0)})),this},_calcBounds:function(e){for(var t,n,r,i=[],a=[],o=["tr","br","bl","tl"],s=0,l=this._objects.length,c=o.length;s<l;++s)for((t=this._objects[s]).aCoords=t.calcACoords(),r=0;r<c;r++)n=o[r],i.push(t.aCoords[n].x),a.push(t.aCoords[n].y);this._getBounds(i,a,e)},_getBounds:function(e,i,a){var o=new t.Point(n(e),n(i)),s=new t.Point(r(e),r(i)),l=o.y||0,c=o.x||0,u=s.x-o.x||0,d=s.y-o.y||0;this.width=u,this.height=d,a||this.setPositionByOrigin({x:c,y:l},"left","top")},_toSVG:function(e){for(var t=["<g ","COMMON_PARTS"," >\n"],n=0,r=this._objects.length;n<r;n++)t.push("\t\t",this._objects[n].toSVG(e));return t.push("</g>\n"),t},getSvgStyles:function(){var e=void 0!==this.opacity&&1!==this.opacity?"opacity: "+this.opacity+";":"",t=this.visible?"":" visibility: hidden;";return[e,this.getSvgFilter(),t].join("")},toClipPathSVG:function(e){for(var t=[],n=0,r=this._objects.length;n<r;n++)t.push("\t",this._objects[n].toClipPathSVG(e));return this._createBaseClipPathSVGMarkup(t,{reviver:e})}}),t.Group.fromObject=function(e,n){var r=e.objects,i=t.util.object.clone(e,!0);delete i.objects,"string"!=typeof r?t.util.enlivenObjects(r,(function(r){t.util.enlivenObjects([e.clipPath],(function(i){var a=t.util.object.clone(e,!0);a.clipPath=i[0],delete a.objects,n&&n(new t.Group(r,a,!0))}))})):t.loadSVGFromURL(r,(function(a){var o=t.util.groupSVGElements(a,e,r);o.set(i),n&&n(o)}))})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.ActiveSelection||(t.ActiveSelection=t.util.createClass(t.Group,{type:"activeSelection",initialize:function(e,n){n=n||{},this._objects=e||[];for(var r=this._objects.length;r--;)this._objects[r].group=this;n.originX&&(this.originX=n.originX),n.originY&&(this.originY=n.originY),this._calcBounds(),this._updateObjectsCoords(),t.Object.prototype.initialize.call(this,n),this.setCoords()},toGroup:function(){var e=this._objects.concat();this._objects=[];var n=t.Object.prototype.toObject.call(this),r=new t.Group([]);if(delete n.type,r.set(n),e.forEach((function(e){e.canvas.remove(e),e.group=r})),r._objects=e,!this.canvas)return r;var i=this.canvas;return i.add(r),i._activeObject=r,r.setCoords(),r},onDeselect:function(){return this.destroy(),!1},toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(e,t,n){e.save(),e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",e,t),void 0===(n=n||{}).hasControls&&(n.hasControls=!1),n.forActiveSelection=!0;for(var r=0,i=this._objects.length;r<i;r++)this._objects[r]._renderControls(e,n);e.restore()}}),t.ActiveSelection.fromObject=function(e,n){t.util.enlivenObjects(e.objects,(function(r){delete e.objects,n&&n(new t.ActiveSelection(r,e,!0))}))})}(t),function(e){"use strict";var t=C.util.object.extend;e.fabric||(e.fabric={}),e.fabric.Image?C.warn("fabric.Image is already defined."):(C.Image=C.util.createClass(C.Object,{type:"image",strokeWidth:0,srcFromAttribute:!1,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:C.Object.prototype.stateProperties.concat("cropX","cropY"),cacheKey:"",cropX:0,cropY:0,imageSmoothing:!0,initialize:function(e,t){t||(t={}),this.filters=[],this.cacheKey="texture"+C.Object.__uid++,this.callSuper("initialize",t),this._initElement(e,t)},getElement:function(){return this._element||{}},setElement:function(e,t){return this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._element=e,this._originalElement=e,this._initConfig(t),0!==this.filters.length&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters(),this},removeTexture:function(e){var t=C.filterBackend;t&&t.evictCachesForKey&&t.evictCachesForKey(e)},dispose:function(){this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(function(e){C.util.cleanUpJsdomNode(this[e]),this[e]=void 0}.bind(this))},getCrossOrigin:function(){return this._originalElement&&(this._originalElement.crossOrigin||null)},getOriginalSize:function(){var e=this.getElement();return{width:e.naturalWidth||e.width,height:e.naturalHeight||e.height}},_stroke:function(e){if(this.stroke&&0!==this.strokeWidth){var t=this.width/2,n=this.height/2;e.beginPath(),e.moveTo(-t,-n),e.lineTo(t,-n),e.lineTo(t,n),e.lineTo(-t,n),e.lineTo(-t,-n),e.closePath()}},_renderDashedStroke:function(e){var t=-this.width/2,n=-this.height/2,r=this.width,i=this.height;e.save(),this._setStrokeStyles(e,this),e.beginPath(),C.util.drawDashedLine(e,t,n,t+r,n,this.strokeDashArray),C.util.drawDashedLine(e,t+r,n,t+r,n+i,this.strokeDashArray),C.util.drawDashedLine(e,t+r,n+i,t,n+i,this.strokeDashArray),C.util.drawDashedLine(e,t,n+i,t,n,this.strokeDashArray),e.closePath(),e.restore()},toObject:function(e){var n=[];this.filters.forEach((function(e){e&&n.push(e.toObject())}));var r=t(this.callSuper("toObject",["cropX","cropY"].concat(e)),{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),filters:n});return this.resizeFilter&&(r.resizeFilter=this.resizeFilter.toObject()),r},hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},_toSVG:function(){var e,t=[],n=[],r=this._element,i=-this.width/2,a=-this.height/2,o="",s="";if(!r)return[];if(this.hasCrop()){var l=C.Object.__uid++;t.push('<clipPath id="imageCrop_'+l+'">\n','\t<rect x="'+i+'" y="'+a+'" width="'+this.width+'" height="'+this.height+'" />\n',"</clipPath>\n"),o=' clip-path="url(#imageCrop_'+l+')" '}if(this.imageSmoothing||(s='" image-rendering="optimizeSpeed'),n.push("\t<image ","COMMON_PARTS",'xlink:href="',this.getSvgSrc(!0),'" x="',i-this.cropX,'" y="',a-this.cropY,'" width="',r.width||r.naturalWidth,'" height="',r.height||r.height,s,'"',o,"></image>\n"),this.stroke||this.strokeDashArray){var c=this.fill;this.fill=null,e=["\t<rect ",'x="',i,'" y="',a,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'],this.fill=c}return t="fill"!==this.paintFirst?t.concat(e,n):t.concat(n,e)},getSrc:function(e){var t=e?this._element:this._originalElement;return t?t.toDataURL?t.toDataURL():this.srcFromAttribute?t.getAttribute("src"):t.src:this.src||""},setSrc:function(e,t,n){return C.util.loadImage(e,(function(e,r){this.setElement(e,n),this._setWidthHeight(),t&&t(this,r)}),this,n&&n.crossOrigin),this},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var e=this.resizeFilter,t=this.minimumScaleTrigger,n=this.getTotalObjectScaling(),r=n.scaleX,i=n.scaleY,a=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!e||r>t&&i>t)return this._element=a,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=r,void(this._lastScaleY=i);C.filterBackend||(C.filterBackend=C.initFilterBackend());var o=C.util.createCanvasElement(),s=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=a.width,c=a.height;o.width=l,o.height=c,this._element=o,this._lastScaleX=e.scaleX=r,this._lastScaleY=e.scaleY=i,C.filterBackend.applyFilters([e],a,l,c,this._element,s),this._filterScalingX=o.width/this._originalElement.width,this._filterScalingY=o.height/this._originalElement.height},applyFilters:function(e){if(e=(e=e||this.filters||[]).filter((function(e){return e&&!e.isNeutralState()})),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),0===e.length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var t=this._originalElement,n=t.naturalWidth||t.width,r=t.naturalHeight||t.height;if(this._element===this._originalElement){var i=C.util.createCanvasElement();i.width=n,i.height=r,this._element=i,this._filteredEl=i}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,n,r),this._lastScaleX=1,this._lastScaleY=1;return C.filterBackend||(C.filterBackend=C.initFilterBackend()),C.filterBackend.applyFilters(e,this._originalElement,n,r,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(e){C.util.setImageSmoothing(e,this.imageSmoothing),!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(e),this._renderPaintInOrder(e)},drawCacheOnCanvas:function(e){C.util.setImageSmoothing(e,this.imageSmoothing),C.Object.prototype.drawCacheOnCanvas.call(this,e)},shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(e){var t=this._element;if(t){var n=this._filterScalingX,r=this._filterScalingY,i=this.width,a=this.height,o=Math.min,s=Math.max,l=s(this.cropX,0),c=s(this.cropY,0),u=t.naturalWidth||t.width,d=t.naturalHeight||t.height,h=l*n,f=c*r,p=o(i*n,u-h),m=o(a*r,d-f),g=-i/2,v=-a/2,b=o(i,u/n-l),y=o(a,d/n-c);t&&e.drawImage(t,h,f,p,m,g,v,b,y)}},_needsResize:function(){var e=this.getTotalObjectScaling();return e.scaleX!==this._lastScaleX||e.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(e,t){this.setElement(C.util.getById(e),t),C.util.addClass(this.getElement(),C.Image.CSS_CANVAS)},_initConfig:function(e){e||(e={}),this.setOptions(e),this._setWidthHeight(e)},_initFilters:function(e,t){e&&e.length?C.util.enlivenObjects(e,(function(e){t&&t(e)}),"fabric.Image.filters"):t&&t()},_setWidthHeight:function(e){e||(e={});var t=this.getElement();this.width=e.width||t.naturalWidth||t.width||0,this.height=e.height||t.naturalHeight||t.height||0},parsePreserveAspectRatioAttribute:function(){var e,t=C.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),n=this._element.width,r=this._element.height,i=1,a=1,o=0,s=0,l=0,c=0,u=this.width,d=this.height,h={width:u,height:d};return!t||"none"===t.alignX&&"none"===t.alignY?(i=u/n,a=d/r):("meet"===t.meetOrSlice&&(e=(u-n*(i=a=C.util.findScaleToFit(this._element,h)))/2,"Min"===t.alignX&&(o=-e),"Max"===t.alignX&&(o=e),e=(d-r*a)/2,"Min"===t.alignY&&(s=-e),"Max"===t.alignY&&(s=e)),"slice"===t.meetOrSlice&&(e=n-u/(i=a=C.util.findScaleToCover(this._element,h)),"Mid"===t.alignX&&(l=e/2),"Max"===t.alignX&&(l=e),e=r-d/a,"Mid"===t.alignY&&(c=e/2),"Max"===t.alignY&&(c=e),n=u/i,r=d/a)),{width:n,height:r,scaleX:i,scaleY:a,offsetLeft:o,offsetTop:s,cropX:l,cropY:c}}}),C.Image.CSS_CANVAS="canvas-img",C.Image.prototype.getSvgSrc=C.Image.prototype.getSrc,C.Image.fromObject=function(e,t){var n=C.util.object.clone(e);C.util.loadImage(n.src,(function(e,r){r?t&&t(null,!0):C.Image.prototype._initFilters.call(n,n.filters,(function(r){n.filters=r||[],C.Image.prototype._initFilters.call(n,[n.resizeFilter],(function(r){n.resizeFilter=r[0],C.util.enlivenObjects([n.clipPath],(function(r){n.clipPath=r[0];var i=new C.Image(e,n);t(i,!1)}))}))}))}),null,n.crossOrigin)},C.Image.fromURL=function(e,t,n){C.util.loadImage(e,(function(e,r){t&&t(new C.Image(e,n),r)}),null,n&&n.crossOrigin)},C.Image.ATTRIBUTE_NAMES=C.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin image-rendering".split(" ")),C.Image.fromElement=function(e,n,r){var i=C.parseAttributes(e,C.Image.ATTRIBUTE_NAMES);C.Image.fromURL(i["xlink:href"],n,t(r?C.util.object.clone(r):{},i))})}(t),C.util.object.extend(C.Object.prototype,{_getAngleValueForStraighten:function(){var e=this.angle%360;return e>0?90*Math.round((e-1)/90):90*Math.round(e/90)},straighten:function(){return this.rotate(this._getAngleValueForStraighten()),this},fxStraighten:function(e){var t=function(){},n=(e=e||{}).onComplete||t,r=e.onChange||t,i=this;return C.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(e){i.rotate(e),r()},onComplete:function(){i.setCoords(),n()}}),this}}),C.util.object.extend(C.StaticCanvas.prototype,{straightenObject:function(e){return e.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(e){return e.fxStraighten({onChange:this.requestRenderAllBound}),this}}),function(){"use strict";function e(e,t){var n="precision "+t+" float;\nvoid main(){}",r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(r,n),e.compileShader(r),!!e.getShaderParameter(r,e.COMPILE_STATUS)}function t(e){e&&e.tileSize&&(this.tileSize=e.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}C.isWebglSupported=function(t){if(C.isLikelyNode)return!1;t=t||C.WebglFilterBackend.prototype.tileSize;var n=document.createElement("canvas"),r=n.getContext("webgl")||n.getContext("experimental-webgl"),i=!1;if(r){C.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),i=C.maxTextureSize>=t;for(var a=["highp","mediump","lowp"],o=0;o<3;o++)if(e(r,a[o])){C.webGlPrecision=a[o];break}}return this.isSupported=i,i},C.WebglFilterBackend=t,t.prototype={tileSize:2048,resources:{},setupGLContext:function(e,t){this.dispose(),this.createWebGLCanvas(e,t),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(e,t)},chooseFastestCopyGLTo2DMethod:function(e,t){var n,r=void 0!==window.performance;try{new ImageData(1,1),n=!0}catch(e){n=!1}var i="undefined"!=typeof ArrayBuffer,a="undefined"!=typeof Uint8ClampedArray;if(r&&n&&i&&a){var o=C.util.createCanvasElement(),s=new ArrayBuffer(e*t*4);if(C.forceGLPutImageData)return this.imageBuffer=s,void(this.copyGLTo2D=x);var l,c,u={imageBuffer:s,destinationWidth:e,destinationHeight:t,targetCanvas:o};o.width=e,o.height=t,l=window.performance.now(),k.call(u,this.gl,u),c=window.performance.now()-l,l=window.performance.now(),x.call(u,this.gl,u),c>window.performance.now()-l?(this.imageBuffer=s,this.copyGLTo2D=x):this.copyGLTo2D=k}},createWebGLCanvas:function(e,t){var n=C.util.createCanvasElement();n.width=e,n.height=t;var r={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},i=n.getContext("webgl",r);i||(i=n.getContext("experimental-webgl",r)),i&&(i.clearColor(0,0,0,0),this.canvas=n,this.gl=i)},applyFilters:function(e,t,n,r,i,a){var o,s=this.gl;a&&(o=this.getCachedTexture(a,t));var l={originalWidth:t.width||t.originalWidth,originalHeight:t.height||t.originalHeight,sourceWidth:n,sourceHeight:r,destinationWidth:n,destinationHeight:r,context:s,sourceTexture:this.createTexture(s,n,r,!o&&t),targetTexture:this.createTexture(s,n,r),originalTexture:o||this.createTexture(s,n,r,!o&&t),passes:e.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:i},c=s.createFramebuffer();return s.bindFramebuffer(s.FRAMEBUFFER,c),e.forEach((function(e){e&&e.applyTo(l)})),function(e){var t=e.targetCanvas,n=t.width,r=t.height,i=e.destinationWidth,a=e.destinationHeight;n===i&&r===a||(t.width=i,t.height=a)}(l),this.copyGLTo2D(s,l),s.bindTexture(s.TEXTURE_2D,null),s.deleteTexture(l.sourceTexture),s.deleteTexture(l.targetTexture),s.deleteFramebuffer(c),i.getContext("2d").setTransform(1,0,0,1,0,0),l},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(e,t,n,r){var i=e.createTexture();return e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),r?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,r):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,n,0,e.RGBA,e.UNSIGNED_BYTE,null),i},getCachedTexture:function(e,t){if(this.textureCache[e])return this.textureCache[e];var n=this.createTexture(this.gl,t.width,t.height,t);return this.textureCache[e]=n,n},evictCachesForKey:function(e){this.textureCache[e]&&(this.gl.deleteTexture(this.textureCache[e]),delete this.textureCache[e])},copyGLTo2D:k,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var e=this.gl,t={renderer:"",vendor:""};if(!e)return t;var n=e.getExtension("WEBGL_debug_renderer_info");if(n){var r=e.getParameter(n.UNMASKED_RENDERER_WEBGL),i=e.getParameter(n.UNMASKED_VENDOR_WEBGL);r&&(t.renderer=r.toLowerCase()),i&&(t.vendor=i.toLowerCase())}return this.gpuInfo=t,t}}}(),function(){"use strict";var e=function(){};function t(){}C.Canvas2dFilterBackend=t,t.prototype={evictCachesForKey:e,dispose:e,clearWebGLCaches:e,resources:{},applyFilters:function(e,t,n,r,i){var a=i.getContext("2d");a.drawImage(t,0,0,n,r);var o={sourceWidth:n,sourceHeight:r,imageData:a.getImageData(0,0,n,r),originalEl:t,originalImageData:a.getImageData(0,0,n,r),canvasEl:i,ctx:a,filterBackend:this};return e.forEach((function(e){e.applyTo(o)})),o.imageData.width===n&&o.imageData.height===r||(i.width=o.imageData.width,i.height=o.imageData.height),a.putImageData(o.imageData,0,0),o}}}(),C.Image=C.Image||{},C.Image.filters=C.Image.filters||{},C.Image.filters.BaseFilter=C.util.createClass({type:"BaseFilter",vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aPosition;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",initialize:function(e){e&&this.setOptions(e)},setOptions:function(e){for(var t in e)this[t]=e[t]},createProgram:function(e,t,n){t=t||this.fragmentSource,n=n||this.vertexSource,"highp"!==C.webGlPrecision&&(t=t.replace(/precision highp float/g,"precision "+C.webGlPrecision+" float"));var r=e.createShader(e.VERTEX_SHADER);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+e.getShaderInfoLog(r));var i=e.createShader(e.FRAGMENT_SHADER);if(e.shaderSource(i,t),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+e.getShaderInfoLog(i));var a=e.createProgram();if(e.attachShader(a,r),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+e.getProgramInfoLog(a));var o=this.getAttributeLocations(e,a),s=this.getUniformLocations(e,a)||{};return s.uStepW=e.getUniformLocation(a,"uStepW"),s.uStepH=e.getUniformLocation(a,"uStepH"),{program:a,attributeLocations:o,uniformLocations:s}},getAttributeLocations:function(e,t){return{aPosition:e.getAttribLocation(t,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(e,t,n){var r=t.aPosition,i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0),e.bufferData(e.ARRAY_BUFFER,n,e.STATIC_DRAW)},_setupFrameBuffer:function(e){var t,n,r=e.context;e.passes>1?(t=e.destinationWidth,n=e.destinationHeight,e.sourceWidth===t&&e.sourceHeight===n||(r.deleteTexture(e.targetTexture),e.targetTexture=e.filterBackend.createTexture(r,t,n)),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.targetTexture,0)):(r.bindFramebuffer(r.FRAMEBUFFER,null),r.finish())},_swapTextures:function(e){e.passes--,e.pass++;var t=e.targetTexture;e.targetTexture=e.sourceTexture,e.sourceTexture=t},isNeutralState:function(){var e=this.mainParameter,t=C.Image.filters[this.type].prototype;if(e){if(Array.isArray(t[e])){for(var n=t[e].length;n--;)if(this[e][n]!==t[e][n])return!1;return!0}return t[e]===this[e]}return!1},applyTo:function(e){e.webgl?(this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)},retrieveShader:function(e){return e.programCache.hasOwnProperty(this.type)||(e.programCache[this.type]=this.createProgram(e.context)),e.programCache[this.type]},applyToWebGL:function(e){var t=e.context,n=this.retrieveShader(e);0===e.pass&&e.originalTexture?t.bindTexture(t.TEXTURE_2D,e.originalTexture):t.bindTexture(t.TEXTURE_2D,e.sourceTexture),t.useProgram(n.program),this.sendAttributeData(t,n.attributeLocations,e.aPosition),t.uniform1f(n.uniformLocations.uStepW,1/e.sourceWidth),t.uniform1f(n.uniformLocations.uStepH,1/e.sourceHeight),this.sendUniformData(t,n.uniformLocations),t.viewport(0,0,e.destinationWidth,e.destinationHeight),t.drawArrays(t.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(e,t,n){e.activeTexture(n),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE0)},unbindAdditionalTexture:function(e,t){e.activeTexture(t),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(e){this[this.mainParameter]=e},sendUniformData:function(){},createHelpLayer:function(e){if(!e.helpLayer){var t=document.createElement("canvas");t.width=e.sourceWidth,t.height=e.sourceHeight,e.helpLayer=t}},toObject:function(){var e={type:this.type},t=this.mainParameter;return t&&(e[t]=this[t]),e},toJSON:function(){return this.toObject()}}),C.Image.filters.BaseFilter.fromObject=function(e,t){var n=new C.Image.filters[e.type](e);return t&&t(n),n},function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.ColorMatrix=r(n.BaseFilter,{type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(e){this.callSuper("initialize",e),this.matrix=this.matrix.slice(0)},applyTo2d:function(e){var t,n,r,i,a,o=e.imageData.data,s=o.length,l=this.matrix,c=this.colorsOnly;for(a=0;a<s;a+=4)t=o[a],n=o[a+1],r=o[a+2],c?(o[a]=t*l[0]+n*l[1]+r*l[2]+255*l[4],o[a+1]=t*l[5]+n*l[6]+r*l[7]+255*l[9],o[a+2]=t*l[10]+n*l[11]+r*l[12]+255*l[14]):(i=o[a+3],o[a]=t*l[0]+n*l[1]+r*l[2]+i*l[3]+255*l[4],o[a+1]=t*l[5]+n*l[6]+r*l[7]+i*l[8]+255*l[9],o[a+2]=t*l[10]+n*l[11]+r*l[12]+i*l[13]+255*l[14],o[a+3]=t*l[15]+n*l[16]+r*l[17]+i*l[18]+255*l[19])},getUniformLocations:function(e,t){return{uColorMatrix:e.getUniformLocation(t,"uColorMatrix"),uConstants:e.getUniformLocation(t,"uConstants")}},sendUniformData:function(e,t){var n=this.matrix,r=[n[0],n[1],n[2],n[3],n[5],n[6],n[7],n[8],n[10],n[11],n[12],n[13],n[15],n[16],n[17],n[18]],i=[n[4],n[9],n[14],n[19]];e.uniformMatrix4fv(t.uColorMatrix,!1,r),e.uniform4fv(t.uConstants,i)}}),t.Image.filters.ColorMatrix.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Brightness=r(n.BaseFilter,{type:"Brightness",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBrightness;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += uBrightness;\ngl_FragColor = color;\n}",brightness:0,mainParameter:"brightness",applyTo2d:function(e){if(0!==this.brightness){var t,n=e.imageData.data,r=n.length,i=Math.round(255*this.brightness);for(t=0;t<r;t+=4)n[t]=n[t]+i,n[t+1]=n[t+1]+i,n[t+2]=n[t+2]+i}},getUniformLocations:function(e,t){return{uBrightness:e.getUniformLocation(t,"uBrightness")}},sendUniformData:function(e,t){e.uniform1f(t.uBrightness,this.brightness)}}),t.Image.filters.Brightness.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.Image.filters,i=t.util.createClass;r.Convolute=i(r.BaseFilter,{type:"Convolute",opaque:!1,matrix:[0,0,0,0,1,0,0,0,0],fragmentSource:{Convolute_3_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_3_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_5_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_5_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_7_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_7_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_9_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_9_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}"},retrieveShader:function(e){var t=Math.sqrt(this.matrix.length),n=this.type+"_"+t+"_"+(this.opaque?1:0),r=this.fragmentSource[n];return e.programCache.hasOwnProperty(n)||(e.programCache[n]=this.createProgram(e.context,r)),e.programCache[n]},applyTo2d:function(e){var t,n,r,i,a,o,s,l,c,u,d,h,f,p=e.imageData,m=p.data,g=this.matrix,v=Math.round(Math.sqrt(g.length)),b=Math.floor(v/2),y=p.width,A=p.height,_=e.ctx.createImageData(y,A),w=_.data,E=this.opaque?1:0;for(d=0;d<A;d++)for(u=0;u<y;u++){for(a=4*(d*y+u),t=0,n=0,r=0,i=0,f=0;f<v;f++)for(h=0;h<v;h++)o=u+h-b,(s=d+f-b)<0||s>=A||o<0||o>=y||(l=4*(s*y+o),c=g[f*v+h],t+=m[l]*c,n+=m[l+1]*c,r+=m[l+2]*c,E||(i+=m[l+3]*c));w[a]=t,w[a+1]=n,w[a+2]=r,w[a+3]=E?m[a+3]:i}e.imageData=_},getUniformLocations:function(e,t){return{uMatrix:e.getUniformLocation(t,"uMatrix"),uOpaque:e.getUniformLocation(t,"uOpaque"),uHalfSize:e.getUniformLocation(t,"uHalfSize"),uSize:e.getUniformLocation(t,"uSize")}},sendUniformData:function(e,t){e.uniform1fv(t.uMatrix,this.matrix)},toObject:function(){return n(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),t.Image.filters.Convolute.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Grayscale=r(n.BaseFilter,{type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},mode:"average",mainParameter:"mode",applyTo2d:function(e){var t,n,r=e.imageData.data,i=r.length,a=this.mode;for(t=0;t<i;t+=4)"average"===a?n=(r[t]+r[t+1]+r[t+2])/3:"lightness"===a?n=(Math.min(r[t],r[t+1],r[t+2])+Math.max(r[t],r[t+1],r[t+2]))/2:"luminosity"===a&&(n=.21*r[t]+.72*r[t+1]+.07*r[t+2]),r[t]=n,r[t+1]=n,r[t+2]=n},retrieveShader:function(e){var t=this.type+"_"+this.mode;if(!e.programCache.hasOwnProperty(t)){var n=this.fragmentSource[this.mode];e.programCache[t]=this.createProgram(e.context,n)}return e.programCache[t]},getUniformLocations:function(e,t){return{uMode:e.getUniformLocation(t,"uMode")}},sendUniformData:function(e,t){e.uniform1i(t.uMode,1)},isNeutralState:function(){return!1}}),t.Image.filters.Grayscale.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Invert=r(n.BaseFilter,{type:"Invert",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uInvert;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nif (uInvert == 1) {\ngl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a);\n} else {\ngl_FragColor = color;\n}\n}",invert:!0,mainParameter:"invert",applyTo2d:function(e){var t,n=e.imageData.data,r=n.length;for(t=0;t<r;t+=4)n[t]=255-n[t],n[t+1]=255-n[t+1],n[t+2]=255-n[t+2]},isNeutralState:function(){return!this.invert},getUniformLocations:function(e,t){return{uInvert:e.getUniformLocation(t,"uInvert")}},sendUniformData:function(e,t){e.uniform1i(t.uInvert,this.invert)}}),t.Image.filters.Invert.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.Image.filters,i=t.util.createClass;r.Noise=i(r.BaseFilter,{type:"Noise",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uStepH;\nuniform float uNoise;\nuniform float uSeed;\nvarying vec2 vTexCoord;\nfloat rand(vec2 co, float seed, float vScale) {\nreturn fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0);\n}\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;\ngl_FragColor = color;\n}",mainParameter:"noise",noise:0,applyTo2d:function(e){if(0!==this.noise){var t,n,r=e.imageData.data,i=r.length,a=this.noise;for(t=0,i=r.length;t<i;t+=4)n=(.5-Math.random())*a,r[t]+=n,r[t+1]+=n,r[t+2]+=n}},getUniformLocations:function(e,t){return{uNoise:e.getUniformLocation(t,"uNoise"),uSeed:e.getUniformLocation(t,"uSeed")}},sendUniformData:function(e,t){e.uniform1f(t.uNoise,this.noise/255),e.uniform1f(t.uSeed,Math.random())},toObject:function(){return n(this.callSuper("toObject"),{noise:this.noise})}}),t.Image.filters.Noise.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Pixelate=r(n.BaseFilter,{type:"Pixelate",blocksize:4,mainParameter:"blocksize",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBlocksize;\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nfloat blockW = uBlocksize * uStepW;\nfloat blockH = uBlocksize * uStepW;\nint posX = int(vTexCoord.x / blockW);\nint posY = int(vTexCoord.y / blockH);\nfloat fposX = float(posX);\nfloat fposY = float(posY);\nvec2 squareCoords = vec2(fposX * blockW, fposY * blockH);\nvec4 color = texture2D(uTexture, squareCoords);\ngl_FragColor = color;\n}",applyTo2d:function(e){var t,n,r,i,a,o,s,l,c,u,d,h=e.imageData,f=h.data,p=h.height,m=h.width;for(n=0;n<p;n+=this.blocksize)for(r=0;r<m;r+=this.blocksize)for(i=f[t=4*n*m+4*r],a=f[t+1],o=f[t+2],s=f[t+3],u=Math.min(n+this.blocksize,p),d=Math.min(r+this.blocksize,m),l=n;l<u;l++)for(c=r;c<d;c++)f[t=4*l*m+4*c]=i,f[t+1]=a,f[t+2]=o,f[t+3]=s},isNeutralState:function(){return 1===this.blocksize},getUniformLocations:function(e,t){return{uBlocksize:e.getUniformLocation(t,"uBlocksize"),uStepW:e.getUniformLocation(t,"uStepW"),uStepH:e.getUniformLocation(t,"uStepH")}},sendUniformData:function(e,t){e.uniform1f(t.uBlocksize,this.blocksize)}}),t.Image.filters.Pixelate.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.Image.filters,i=t.util.createClass;r.RemoveColor=i(r.BaseFilter,{type:"RemoveColor",color:"#FFFFFF",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uLow;\nuniform vec4 uHigh;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\nif(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) {\ngl_FragColor.a = 0.0;\n}\n}",distance:.02,useAlpha:!1,applyTo2d:function(e){var n,r,i,a,o=e.imageData.data,s=255*this.distance,l=new t.Color(this.color).getSource(),c=[l[0]-s,l[1]-s,l[2]-s],u=[l[0]+s,l[1]+s,l[2]+s];for(n=0;n<o.length;n+=4)r=o[n],i=o[n+1],a=o[n+2],r>c[0]&&i>c[1]&&a>c[2]&&r<u[0]&&i<u[1]&&a<u[2]&&(o[n+3]=0)},getUniformLocations:function(e,t){return{uLow:e.getUniformLocation(t,"uLow"),uHigh:e.getUniformLocation(t,"uHigh")}},sendUniformData:function(e,n){var r=new t.Color(this.color).getSource(),i=parseFloat(this.distance),a=[0+r[0]/255-i,0+r[1]/255-i,0+r[2]/255-i,1],o=[r[0]/255+i,r[1]/255+i,r[2]/255+i,1];e.uniform4fv(n.uLow,a),e.uniform4fv(n.uHigh,o)},toObject:function(){return n(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),t.Image.filters.RemoveColor.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass,i={Brownie:[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0],Vintage:[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0],Kodachrome:[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0],Technicolor:[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0],Polaroid:[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],Sepia:[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0],BlackWhite:[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]};for(var a in i)n[a]=r(n.ColorMatrix,{type:a,matrix:i[a],mainParameter:!1,colorsOnly:!0}),t.Image.filters[a].fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric,n=t.Image.filters,r=t.util.createClass;n.BlendColor=r(n.BaseFilter,{type:"BlendColor",color:"#F95C63",mode:"multiply",alpha:1,fragmentSource:{multiply:"gl_FragColor.rgb *= uColor.rgb;\n",screen:"gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);\n",add:"gl_FragColor.rgb += uColor.rgb;\n",diff:"gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);\n",subtract:"gl_FragColor.rgb -= uColor.rgb;\n",lighten:"gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);\n",darken:"gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);\n",exclusion:"gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);\n",overlay:"if (uColor.r < 0.5) {\ngl_FragColor.r *= 2.0 * uColor.r;\n} else {\ngl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r);\n}\nif (uColor.g < 0.5) {\ngl_FragColor.g *= 2.0 * uColor.g;\n} else {\ngl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g);\n}\nif (uColor.b < 0.5) {\ngl_FragColor.b *= 2.0 * uColor.b;\n} else {\ngl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b);\n}\n",tint:"gl_FragColor.rgb *= (1.0 - uColor.a);\ngl_FragColor.rgb += uColor.rgb;\n"},buildSource:function(e){return"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ngl_FragColor = color;\nif (color.a > 0.0) {\n"+this.fragmentSource[e]+"}\n}"},retrieveShader:function(e){var t,n=this.type+"_"+this.mode;return e.programCache.hasOwnProperty(n)||(t=this.buildSource(this.mode),e.programCache[n]=this.createProgram(e.context,t)),e.programCache[n]},applyTo2d:function(e){var n,r,i,a,o,s,l,c=e.imageData.data,u=c.length,d=1-this.alpha;n=(l=new t.Color(this.color).getSource())[0]*this.alpha,r=l[1]*this.alpha,i=l[2]*this.alpha;for(var h=0;h<u;h+=4)switch(a=c[h],o=c[h+1],s=c[h+2],this.mode){case"multiply":c[h]=a*n/255,c[h+1]=o*r/255,c[h+2]=s*i/255;break;case"screen":c[h]=255-(255-a)*(255-n)/255,c[h+1]=255-(255-o)*(255-r)/255,c[h+2]=255-(255-s)*(255-i)/255;break;case"add":c[h]=a+n,c[h+1]=o+r,c[h+2]=s+i;break;case"diff":case"difference":c[h]=Math.abs(a-n),c[h+1]=Math.abs(o-r),c[h+2]=Math.abs(s-i);break;case"subtract":c[h]=a-n,c[h+1]=o-r,c[h+2]=s-i;break;case"darken":c[h]=Math.min(a,n),c[h+1]=Math.min(o,r),c[h+2]=Math.min(s,i);break;case"lighten":c[h]=Math.max(a,n),c[h+1]=Math.max(o,r),c[h+2]=Math.max(s,i);break;case"overlay":c[h]=n<128?2*a*n/255:255-2*(255-a)*(255-n)/255,c[h+1]=r<128?2*o*r/255:255-2*(255-o)*(255-r)/255,c[h+2]=i<128?2*s*i/255:255-2*(255-s)*(255-i)/255;break;case"exclusion":c[h]=n+a-2*n*a/255,c[h+1]=r+o-2*r*o/255,c[h+2]=i+s-2*i*s/255;break;case"tint":c[h]=n+a*d,c[h+1]=r+o*d,c[h+2]=i+s*d}},getUniformLocations:function(e,t){return{uColor:e.getUniformLocation(t,"uColor")}},sendUniformData:function(e,n){var r=new t.Color(this.color).getSource();r[0]=this.alpha*r[0]/255,r[1]=this.alpha*r[1]/255,r[2]=this.alpha*r[2]/255,r[3]=this.alpha,e.uniform4fv(n.uColor,r)},toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),t.Image.filters.BlendColor.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric,n=t.Image.filters,r=t.util.createClass;n.BlendImage=r(n.BaseFilter,{type:"BlendImage",image:null,mode:"multiply",alpha:1,vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nuniform mat3 uTransformMatrix;\nvoid main() {\nvTexCoord = aPosition;\nvTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:{multiply:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.rgba *= color2.rgba;\ngl_FragColor = color;\n}",mask:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.a = color2.a;\ngl_FragColor = color;\n}"},retrieveShader:function(e){var t=this.type+"_"+this.mode,n=this.fragmentSource[this.mode];return e.programCache.hasOwnProperty(t)||(e.programCache[t]=this.createProgram(e.context,n)),e.programCache[t]},applyToWebGL:function(e){var t=e.context,n=this.createTexture(e.filterBackend,this.image);this.bindAdditionalTexture(t,n,t.TEXTURE1),this.callSuper("applyToWebGL",e),this.unbindAdditionalTexture(t,t.TEXTURE1)},createTexture:function(e,t){return e.getCachedTexture(t.cacheKey,t._element)},calculateMatrix:function(){var e=this.image,t=e._element.width,n=e._element.height;return[1/e.scaleX,0,0,0,1/e.scaleY,0,-e.left/t,-e.top/n,1]},applyTo2d:function(e){var n,r,i,a,o,s,l,c,u,d,h,f=e.imageData,p=e.filterBackend.resources,m=f.data,g=m.length,v=f.width,b=f.height,y=this.image;p.blendImage||(p.blendImage=t.util.createCanvasElement()),d=(u=p.blendImage).getContext("2d"),u.width!==v||u.height!==b?(u.width=v,u.height=b):d.clearRect(0,0,v,b),d.setTransform(y.scaleX,0,0,y.scaleY,y.left,y.top),d.drawImage(y._element,0,0,v,b),h=d.getImageData(0,0,v,b).data;for(var A=0;A<g;A+=4)switch(o=m[A],s=m[A+1],l=m[A+2],c=m[A+3],n=h[A],r=h[A+1],i=h[A+2],a=h[A+3],this.mode){case"multiply":m[A]=o*n/255,m[A+1]=s*r/255,m[A+2]=l*i/255,m[A+3]=c*a/255;break;case"mask":m[A+3]=a}},getUniformLocations:function(e,t){return{uTransformMatrix:e.getUniformLocation(t,"uTransformMatrix"),uImage:e.getUniformLocation(t,"uImage")}},sendUniformData:function(e,t){var n=this.calculateMatrix();e.uniform1i(t.uImage,1),e.uniformMatrix3fv(t.uTransformMatrix,!1,n)},toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),t.Image.filters.BlendImage.fromObject=function(e,n){t.Image.fromObject(e.image,(function(r){var i=t.util.object.clone(e);i.image=r,n(new t.Image.filters.BlendImage(i))}))}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=Math.pow,r=Math.floor,i=Math.sqrt,a=Math.abs,o=Math.round,s=Math.sin,l=Math.ceil,c=t.Image.filters,u=t.util.createClass;c.Resize=u(c.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3,getUniformLocations:function(e,t){return{uDelta:e.getUniformLocation(t,"uDelta"),uTaps:e.getUniformLocation(t,"uTaps")}},sendUniformData:function(e,t){e.uniform2fv(t.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),e.uniform1fv(t.uTaps,this.taps)},retrieveShader:function(e){var t=this.getFilterWindow(),n=this.type+"_"+t;if(!e.programCache.hasOwnProperty(n)){var r=this.generateShader(t);e.programCache[n]=this.createProgram(e.context,r)}return e.programCache[n]},getFilterWindow:function(){var e=this.tempScale;return Math.ceil(this.lanczosLobes/e)},getTaps:function(){for(var e=this.lanczosCreate(this.lanczosLobes),t=this.tempScale,n=this.getFilterWindow(),r=new Array(n),i=1;i<=n;i++)r[i-1]=e(i*t);return r},generateShader:function(e){for(var t=new Array(e),n=this.fragmentSourceTOP,r=1;r<=e;r++)t[r-1]=r+".0 * uDelta";return n+="uniform float uTaps["+e+"];\n",n+="void main() {\n",n+="  vec4 color = texture2D(uTexture, vTexCoord);\n",n+="  float sum = 1.0;\n",t.forEach((function(e,t){n+="  color += texture2D(uTexture, vTexCoord + "+e+") * uTaps["+t+"];\n",n+="  color += texture2D(uTexture, vTexCoord - "+e+") * uTaps["+t+"];\n",n+="  sum += 2.0 * uTaps["+t+"];\n"})),n+="  gl_FragColor = color / sum;\n",n+="}"},fragmentSourceTOP:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\n",applyTo:function(e){e.webgl?(e.passes++,this.width=e.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=e.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),e.destinationWidth=this.dW,this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e),e.sourceWidth=e.destinationWidth,this.height=e.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),e.destinationHeight=this.dH,this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e),e.sourceHeight=e.destinationHeight):this.applyTo2d(e)},isNeutralState:function(){return 1===this.scaleX&&1===this.scaleY},lanczosCreate:function(e){return function(t){if(t>=e||t<=-e)return 0;if(t<1.1920929e-7&&t>-1.1920929e-7)return 1;var n=(t*=Math.PI)/e;return s(t)/t*s(n)/n}},applyTo2d:function(e){var t=e.imageData,n=this.scaleX,r=this.scaleY;this.rcpScaleX=1/n,this.rcpScaleY=1/r;var i,a=t.width,s=t.height,l=o(a*n),c=o(s*r);"sliceHack"===this.resizeType?i=this.sliceByTwo(e,a,s,l,c):"hermite"===this.resizeType?i=this.hermiteFastResize(e,a,s,l,c):"bilinear"===this.resizeType?i=this.bilinearFiltering(e,a,s,l,c):"lanczos"===this.resizeType&&(i=this.lanczosResize(e,a,s,l,c)),e.imageData=i},sliceByTwo:function(e,n,i,a,o){var s,l,c=e.imageData,u=!1,d=!1,h=.5*n,f=.5*i,p=t.filterBackend.resources,m=0,g=0,v=n,b=0;for(p.sliceByTwo||(p.sliceByTwo=document.createElement("canvas")),((s=p.sliceByTwo).width<1.5*n||s.height<i)&&(s.width=1.5*n,s.height=i),(l=s.getContext("2d")).clearRect(0,0,1.5*n,i),l.putImageData(c,0,0),a=r(a),o=r(o);!u||!d;)n=h,i=f,a<r(.5*h)?h=r(.5*h):(h=a,u=!0),o<r(.5*f)?f=r(.5*f):(f=o,d=!0),l.drawImage(s,m,g,n,i,v,b,h,f),m=v,g=b,b+=f;return l.getImageData(m,g,a,o)},lanczosResize:function(e,t,o,s,c){var u=e.imageData.data,d=e.ctx.createImageData(s,c),h=d.data,f=this.lanczosCreate(this.lanczosLobes),p=this.rcpScaleX,m=this.rcpScaleY,g=2/this.rcpScaleX,v=2/this.rcpScaleY,b=l(p*this.lanczosLobes/2),y=l(m*this.lanczosLobes/2),A={},_={},w={};return function e(l){var E,S,C,T,k,x,O,I,M,P,D;for(_.x=(l+.5)*p,w.x=r(_.x),E=0;E<c;E++){for(_.y=(E+.5)*m,w.y=r(_.y),k=0,x=0,O=0,I=0,M=0,S=w.x-b;S<=w.x+b;S++)if(!(S<0||S>=t)){P=r(1e3*a(S-_.x)),A[P]||(A[P]={});for(var N=w.y-y;N<=w.y+y;N++)N<0||N>=o||(D=r(1e3*a(N-_.y)),A[P][D]||(A[P][D]=f(i(n(P*g,2)+n(D*v,2))/1e3)),(C=A[P][D])>0&&(k+=C,x+=C*u[T=4*(N*t+S)],O+=C*u[T+1],I+=C*u[T+2],M+=C*u[T+3]))}h[T=4*(E*s+l)]=x/k,h[T+1]=O/k,h[T+2]=I/k,h[T+3]=M/k}return++l<s?e(l):d}(0)},bilinearFiltering:function(e,t,n,i,a){var o,s,l,c,u,d,h,f,p,m=0,g=this.rcpScaleX,v=this.rcpScaleY,b=4*(t-1),y=e.imageData.data,A=e.ctx.createImageData(i,a),_=A.data;for(l=0;l<a;l++)for(c=0;c<i;c++)for(u=g*c-(o=r(g*c)),d=v*l-(s=r(v*l)),p=4*(s*t+o),h=0;h<4;h++)f=y[p+h]*(1-u)*(1-d)+y[p+4+h]*u*(1-d)+y[p+b+h]*d*(1-u)+y[p+b+4+h]*u*d,_[m++]=f;return A},hermiteFastResize:function(e,t,n,o,s){for(var c=this.rcpScaleX,u=this.rcpScaleY,d=l(c/2),h=l(u/2),f=e.imageData.data,p=e.ctx.createImageData(o,s),m=p.data,g=0;g<s;g++)for(var v=0;v<o;v++){for(var b=4*(v+g*o),y=0,A=0,_=0,w=0,E=0,S=0,C=0,T=(g+.5)*u,k=r(g*u);k<(g+1)*u;k++)for(var x=a(T-(k+.5))/h,O=(v+.5)*c,I=x*x,M=r(v*c);M<(v+1)*c;M++){var P=a(O-(M+.5))/d,D=i(I+P*P);D>1&&D<-1||(y=2*D*D*D-3*D*D+1)>0&&(C+=y*f[(P=4*(M+k*t))+3],_+=y,f[P+3]<255&&(y=y*f[P+3]/250),w+=y*f[P],E+=y*f[P+1],S+=y*f[P+2],A+=y)}m[b]=w/A,m[b+1]=E/A,m[b+2]=S/A,m[b+3]=C/_}return p},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),t.Image.filters.Resize.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Contrast=r(n.BaseFilter,{type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",contrast:0,mainParameter:"contrast",applyTo2d:function(e){if(0!==this.contrast){var t,n=e.imageData.data,r=n.length,i=Math.floor(255*this.contrast),a=259*(i+255)/(255*(259-i));for(t=0;t<r;t+=4)n[t]=a*(n[t]-128)+128,n[t+1]=a*(n[t+1]-128)+128,n[t+2]=a*(n[t+2]-128)+128}},getUniformLocations:function(e,t){return{uContrast:e.getUniformLocation(t,"uContrast")}},sendUniformData:function(e,t){e.uniform1f(t.uContrast,this.contrast)}}),t.Image.filters.Contrast.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Saturation=r(n.BaseFilter,{type:"Saturation",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uSaturation;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat rgMax = max(color.r, color.g);\nfloat rgbMax = max(rgMax, color.b);\ncolor.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00;\ncolor.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00;\ncolor.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00;\ngl_FragColor = color;\n}",saturation:0,mainParameter:"saturation",applyTo2d:function(e){if(0!==this.saturation){var t,n,r=e.imageData.data,i=r.length,a=-this.saturation;for(t=0;t<i;t+=4)n=Math.max(r[t],r[t+1],r[t+2]),r[t]+=n!==r[t]?(n-r[t])*a:0,r[t+1]+=n!==r[t+1]?(n-r[t+1])*a:0,r[t+2]+=n!==r[t+2]?(n-r[t+2])*a:0}},getUniformLocations:function(e,t){return{uSaturation:e.getUniformLocation(t,"uSaturation")}},sendUniformData:function(e,t){e.uniform1f(t.uSaturation,-this.saturation)}}),t.Image.filters.Saturation.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Blur=r(n.BaseFilter,{type:"Blur",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\nconst float nSamples = 15.0;\nvec3 v3offset = vec3(12.9898, 78.233, 151.7182);\nfloat random(vec3 scale) {\nreturn fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453);\n}\nvoid main() {\nvec4 color = vec4(0.0);\nfloat total = 0.0;\nfloat offset = random(v3offset);\nfor (float t = -nSamples; t <= nSamples; t++) {\nfloat percent = (t + offset - 0.5) / nSamples;\nfloat weight = 1.0 - abs(percent);\ncolor += texture2D(uTexture, vTexCoord + uDelta * percent) * weight;\ntotal += weight;\n}\ngl_FragColor = color / total;\n}",blur:0,mainParameter:"blur",applyTo:function(e){e.webgl?(this.aspectRatio=e.sourceWidth/e.sourceHeight,e.passes++,this._setupFrameBuffer(e),this.horizontal=!0,this.applyToWebGL(e),this._swapTextures(e),this._setupFrameBuffer(e),this.horizontal=!1,this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)},applyTo2d:function(e){e.imageData=this.simpleBlur(e)},simpleBlur:function(e){var n,r,i=e.filterBackend.resources,a=e.imageData.width,o=e.imageData.height;i.blurLayer1||(i.blurLayer1=t.util.createCanvasElement(),i.blurLayer2=t.util.createCanvasElement()),n=i.blurLayer1,r=i.blurLayer2,n.width===a&&n.height===o||(r.width=n.width=a,r.height=n.height=o);var s,l,c,u,d=n.getContext("2d"),h=r.getContext("2d"),f=.06*this.blur*.5;for(d.putImageData(e.imageData,0,0),h.clearRect(0,0,a,o),u=-15;u<=15;u++)c=f*(l=u/15)*a+(s=(Math.random()-.5)/4),h.globalAlpha=1-Math.abs(l),h.drawImage(n,c,s),d.drawImage(r,0,0),h.globalAlpha=1,h.clearRect(0,0,r.width,r.height);for(u=-15;u<=15;u++)c=f*(l=u/15)*o+(s=(Math.random()-.5)/4),h.globalAlpha=1-Math.abs(l),h.drawImage(n,s,c),d.drawImage(r,0,0),h.globalAlpha=1,h.clearRect(0,0,r.width,r.height);e.ctx.drawImage(n,0,0);var p=e.ctx.getImageData(0,0,n.width,n.height);return d.globalAlpha=1,d.clearRect(0,0,n.width,n.height),p},getUniformLocations:function(e,t){return{delta:e.getUniformLocation(t,"uDelta")}},sendUniformData:function(e,t){var n=this.chooseRightDelta();e.uniform2fv(t.delta,n)},chooseRightDelta:function(){var e,t=1,n=[0,0];return this.horizontal?this.aspectRatio>1&&(t=1/this.aspectRatio):this.aspectRatio<1&&(t=this.aspectRatio),e=t*this.blur*.12,this.horizontal?n[0]=e:n[1]=e,n}}),n.Blur.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Gamma=r(n.BaseFilter,{type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",gamma:[1,1,1],mainParameter:"gamma",initialize:function(e){this.gamma=[1,1,1],n.BaseFilter.prototype.initialize.call(this,e)},applyTo2d:function(e){var t,n=e.imageData.data,r=this.gamma,i=n.length,a=1/r[0],o=1/r[1],s=1/r[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),t=0,i=256;t<i;t++)this.rVals[t]=255*Math.pow(t/255,a),this.gVals[t]=255*Math.pow(t/255,o),this.bVals[t]=255*Math.pow(t/255,s);for(t=0,i=n.length;t<i;t+=4)n[t]=this.rVals[n[t]],n[t+1]=this.gVals[n[t+1]],n[t+2]=this.bVals[n[t+2]]},getUniformLocations:function(e,t){return{uGamma:e.getUniformLocation(t,"uGamma")}},sendUniformData:function(e,t){e.uniform3fv(t.uGamma,this.gamma)}}),t.Image.filters.Gamma.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Composed=r(n.BaseFilter,{type:"Composed",subFilters:[],initialize:function(e){this.callSuper("initialize",e),this.subFilters=this.subFilters.slice(0)},applyTo:function(e){e.passes+=this.subFilters.length-1,this.subFilters.forEach((function(t){t.applyTo(e)}))},toObject:function(){return t.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map((function(e){return e.toObject()}))})},isNeutralState:function(){return!this.subFilters.some((function(e){return!e.isNeutralState()}))}}),t.Image.filters.Composed.fromObject=function(e,n){var r=(e.subFilters||[]).map((function(e){return new t.Image.filters[e.type](e)})),i=new t.Image.filters.Composed({subFilters:r});return n&&n(i),i}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.HueRotation=r(n.ColorMatrix,{type:"HueRotation",rotation:0,mainParameter:"rotation",calculateMatrix:function(){var e=this.rotation*Math.PI,n=t.util.cos(e),r=t.util.sin(e),i=Math.sqrt(1/3)*r,a=1-n;this.matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.matrix[0]=n+a/3,this.matrix[1]=1/3*a-i,this.matrix[2]=1/3*a+i,this.matrix[5]=1/3*a+i,this.matrix[6]=n+1/3*a,this.matrix[7]=1/3*a-i,this.matrix[10]=1/3*a-i,this.matrix[11]=1/3*a+i,this.matrix[12]=n+1/3*a},isNeutralState:function(e){return this.calculateMatrix(),n.BaseFilter.prototype.isNeutralState.call(this,e)},applyTo:function(e){this.calculateMatrix(),n.BaseFilter.prototype.applyTo.call(this,e)}}),t.Image.filters.HueRotation.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.clone;t.Text?t.warn("fabric.Text is already defined"):(t.Text=t.util.createClass(t.Object,{_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles"],_reNewline:/\r?\n/,_reSpacesAndTabs:/[ \t\r]/g,_reSpaceAndTab:/[ \t\r]/,_reWords:/\S+/g,type:"text",fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",underline:!1,overline:!1,linethrough:!1,textAlign:"left",fontStyle:"normal",lineHeight:1.16,superscript:{size:.6,baseline:-.35},subscript:{size:.6,baseline:.11},textBackgroundColor:"",stateProperties:t.Object.prototype.stateProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),cacheProperties:t.Object.prototype.cacheProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),stroke:null,shadow:null,_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.315,overline:-.88},_fontSizeMult:1.13,charSpacing:0,styles:null,_measuringContext:null,deltaY:0,_styleProperties:["stroke","strokeWidth","fill","fontFamily","fontSize","fontWeight","fontStyle","underline","overline","linethrough","deltaY","textBackgroundColor"],__charBounds:[],CACHE_FONT_SIZE:400,MIN_TEXT_WIDTH:2,initialize:function(e,t){this.styles=t&&t.styles||{},this.text=e,this.__skipDimension=!0,this.callSuper("initialize",t),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},getMeasuringContext:function(){return t._measuringContext||(t._measuringContext=this.canvas&&this.canvas.contextCache||t.util.createCanvasElement().getContext("2d")),t._measuringContext},_splitText:function(){var e=this._splitTextIntoLines(this.text);return this.textLines=e.lines,this._textLines=e.graphemeLines,this._unwrappedTextLines=e._unwrappedLines,this._text=e.graphemeText,e},initDimensions:function(){this.__skipDimension||(this._splitText(),this._clearCache(),this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},enlargeSpaces:function(){for(var e,t,n,r,i,a,o,s=0,l=this._textLines.length;s<l;s++)if(("justify"===this.textAlign||s!==l-1&&!this.isEndOfWrapping(s))&&(r=0,i=this._textLines[s],(t=this.getLineWidth(s))<this.width&&(o=this.textLines[s].match(this._reSpacesAndTabs)))){n=o.length,e=(this.width-t)/n;for(var c=0,u=i.length;c<=u;c++)a=this.__charBounds[s][c],this._reSpaceAndTab.test(i[c])?(a.width+=e,a.kernedWidth+=e,a.left+=r,r+=e):a.left+=r}},isEndOfWrapping:function(e){return e===this._textLines.length-1},missingNewlineOffset:function(){return 1},toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},_getCacheCanvasDimensions:function(){var e=this.callSuper("_getCacheCanvasDimensions"),t=this.fontSize;return e.width+=t*e.zoomX,e.height+=t*e.zoomY,e},_render:function(e){this._setTextStyles(e),this._renderTextLinesBackground(e),this._renderTextDecoration(e,"underline"),this._renderText(e),this._renderTextDecoration(e,"overline"),this._renderTextDecoration(e,"linethrough")},_renderText:function(e){"stroke"===this.paintFirst?(this._renderTextStroke(e),this._renderTextFill(e)):(this._renderTextFill(e),this._renderTextStroke(e))},_setTextStyles:function(e,t,n){e.textBaseline="alphabetic",e.font=this._getFontDeclaration(t,n)},calcTextWidth:function(){for(var e=this.getLineWidth(0),t=1,n=this._textLines.length;t<n;t++){var r=this.getLineWidth(t);r>e&&(e=r)}return e},_renderTextLine:function(e,t,n,r,i,a){this._renderChars(e,t,n,r,i,a)},_renderTextLinesBackground:function(e){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var t,n,r,i,a,o,s=0,l=e.fillStyle,c=this._getLeftOffset(),u=this._getTopOffset(),d=0,h=0,f=0,p=this._textLines.length;f<p;f++)if(t=this.getHeightOfLine(f),this.textBackgroundColor||this.styleHas("textBackgroundColor",f)){r=this._textLines[f],n=this._getLineLeftOffset(f),h=0,d=0,i=this.getValueOfPropertyAt(f,0,"textBackgroundColor");for(var m=0,g=r.length;m<g;m++)a=this.__charBounds[f][m],(o=this.getValueOfPropertyAt(f,m,"textBackgroundColor"))!==i?(e.fillStyle=i,i&&e.fillRect(c+n+d,u+s,h,t/this.lineHeight),d=a.left,h=a.width,i=o):h+=a.kernedWidth;o&&(e.fillStyle=o,e.fillRect(c+n+d,u+s,h,t/this.lineHeight)),s+=t}else s+=t;e.fillStyle=l,this._removeShadow(e)}},getFontCache:function(e){var n=e.fontFamily.toLowerCase();t.charWidthsCache[n]||(t.charWidthsCache[n]={});var r=t.charWidthsCache[n],i=e.fontStyle.toLowerCase()+"_"+(e.fontWeight+"").toLowerCase();return r[i]||(r[i]={}),r[i]},_applyCharStyles:function(e,t,n,r,i){this._setFillStyles(t,i),this._setStrokeStyles(t,i),t.font=this._getFontDeclaration(i)},_measureChar:function(e,t,n,r){var i,a,o,s,l=this.getFontCache(t),c=n+e,u=this._getFontDeclaration(t)===this._getFontDeclaration(r),d=t.fontSize/this.CACHE_FONT_SIZE;if(n&&void 0!==l[n]&&(o=l[n]),void 0!==l[e]&&(s=i=l[e]),u&&void 0!==l[c]&&(s=(a=l[c])-o),void 0===i||void 0===o||void 0===a){var h=this.getMeasuringContext();this._setTextStyles(h,t,!0)}return void 0===i&&(s=i=h.measureText(e).width,l[e]=i),void 0===o&&u&&n&&(o=h.measureText(n).width,l[n]=o),u&&void 0===a&&(a=h.measureText(c).width,l[c]=a,s=a-o),{width:i*d,kernedWidth:s*d}},getHeightOfChar:function(e,t){return this.getValueOfPropertyAt(e,t,"fontSize")},measureLine:function(e){var t=this._measureLine(e);return 0!==this.charSpacing&&(t.width-=this._getWidthOfCharSpacing()),t.width<0&&(t.width=0),t},_measureLine:function(e){var t,n,r,i,a=0,o=this._textLines[e],s=new Array(o.length);for(this.__charBounds[e]=s,t=0;t<o.length;t++)n=o[t],i=this._getGraphemeBox(n,e,t,r),s[t]=i,a+=i.kernedWidth,r=n;return s[t]={left:i?i.left+i.width:0,width:0,kernedWidth:0,height:this.fontSize},{width:a,numOfSpaces:0}},_getGraphemeBox:function(e,t,n,r,i){var a,o=this.getCompleteStyleDeclaration(t,n),s=r?this.getCompleteStyleDeclaration(t,n-1):{},l=this._measureChar(e,o,r,s),c=l.kernedWidth,u=l.width;0!==this.charSpacing&&(u+=a=this._getWidthOfCharSpacing(),c+=a);var d={width:u,left:0,height:o.fontSize,kernedWidth:c,deltaY:o.deltaY};if(n>0&&!i){var h=this.__charBounds[t][n-1];d.left=h.left+h.width+l.kernedWidth-l.width}return d},getHeightOfLine:function(e){if(this.__lineHeights[e])return this.__lineHeights[e];for(var t=this._textLines[e],n=this.getHeightOfChar(e,0),r=1,i=t.length;r<i;r++)n=Math.max(this.getHeightOfChar(e,r),n);return this.__lineHeights[e]=n*this.lineHeight*this._fontSizeMult},calcTextHeight:function(){for(var e,t=0,n=0,r=this._textLines.length;n<r;n++)e=this.getHeightOfLine(n),t+=n===r-1?e/this.lineHeight:e;return t},_getLeftOffset:function(){return-this.width/2},_getTopOffset:function(){return-this.height/2},_renderTextCommon:function(e,t){e.save();for(var n=0,r=this._getLeftOffset(),i=this._getTopOffset(),a=this._applyPatternGradientTransform(e,"fillText"===t?this.fill:this.stroke),o=0,s=this._textLines.length;o<s;o++){var l=this.getHeightOfLine(o),c=l/this.lineHeight,u=this._getLineLeftOffset(o);this._renderTextLine(t,e,this._textLines[o],r+u-a.offsetX,i+n+c-a.offsetY,o),n+=l}e.restore()},_renderTextFill:function(e){(this.fill||this.styleHas("fill"))&&this._renderTextCommon(e,"fillText")},_renderTextStroke:function(e){(this.stroke&&0!==this.strokeWidth||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this._setLineDash(e,this.strokeDashArray),e.beginPath(),this._renderTextCommon(e,"strokeText"),e.closePath(),e.restore())},_renderChars:function(e,t,n,r,i,a){var o,s,l,c,u=this.getHeightOfLine(a),d=-1!==this.textAlign.indexOf("justify"),h="",f=0,p=!d&&0===this.charSpacing&&this.isEmptyStyles(a);if(t.save(),i-=u*this._fontSizeFraction/this.lineHeight,p)return this._renderChar(e,t,a,0,n.join(""),r,i,u),void t.restore();for(var m=0,g=n.length-1;m<=g;m++)c=m===g||this.charSpacing,h+=n[m],l=this.__charBounds[a][m],0===f?(r+=l.kernedWidth-l.width,f+=l.width):f+=l.kernedWidth,d&&!c&&this._reSpaceAndTab.test(n[m])&&(c=!0),c||(o=o||this.getCompleteStyleDeclaration(a,m),s=this.getCompleteStyleDeclaration(a,m+1),c=this._hasStyleChanged(o,s)),c&&(this._renderChar(e,t,a,m,h,r,i,u),h="",o=s,r+=f,f=0);t.restore()},_renderChar:function(e,t,n,r,i,a,o){var s=this._getStyleDeclaration(n,r),l=this.getCompleteStyleDeclaration(n,r),c="fillText"===e&&l.fill,u="strokeText"===e&&l.stroke&&l.strokeWidth;(u||c)&&(s&&t.save(),this._applyCharStyles(e,t,n,r,l),s&&s.textBackgroundColor&&this._removeShadow(t),s&&s.deltaY&&(o+=s.deltaY),c&&t.fillText(i,a,o),u&&t.strokeText(i,a,o),s&&t.restore())},setSuperscript:function(e,t){return this._setScript(e,t,this.superscript)},setSubscript:function(e,t){return this._setScript(e,t,this.subscript)},_setScript:function(e,t,n){var r=this.get2DCursorLocation(e,!0),i=this.getValueOfPropertyAt(r.lineIndex,r.charIndex,"fontSize"),a=this.getValueOfPropertyAt(r.lineIndex,r.charIndex,"deltaY"),o={fontSize:i*n.size,deltaY:a+i*n.baseline};return this.setSelectionStyles(o,e,t),this},_hasStyleChanged:function(e,t){return e.fill!==t.fill||e.stroke!==t.stroke||e.strokeWidth!==t.strokeWidth||e.fontSize!==t.fontSize||e.fontFamily!==t.fontFamily||e.fontWeight!==t.fontWeight||e.fontStyle!==t.fontStyle||e.deltaY!==t.deltaY},_hasStyleChangedForSvg:function(e,t){return this._hasStyleChanged(e,t)||e.overline!==t.overline||e.underline!==t.underline||e.linethrough!==t.linethrough},_getLineLeftOffset:function(e){var t=this.getLineWidth(e);return"center"===this.textAlign?(this.width-t)/2:"right"===this.textAlign?this.width-t:"justify-center"===this.textAlign&&this.isEndOfWrapping(e)?(this.width-t)/2:"justify-right"===this.textAlign&&this.isEndOfWrapping(e)?this.width-t:0},_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]},_shouldClearDimensionCache:function(){var e=this._forceClearCache;return e||(e=this.hasStateChanged("_dimensionAffectingProps")),e&&(this.dirty=!0,this._forceClearCache=!1),e},getLineWidth:function(e){return this.__lineWidths[e]?this.__lineWidths[e]:(t=""===this._textLines[e]?0:this.measureLine(e).width,this.__lineWidths[e]=t,t);var t},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},getValueOfPropertyAt:function(e,t,n){var r=this._getStyleDeclaration(e,t);return r&&void 0!==r[n]?r[n]:this[n]},_renderTextDecoration:function(e,t){if(this[t]||this.styleHas(t)){for(var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b=this._getLeftOffset(),y=this._getTopOffset(),A=this._getWidthOfCharSpacing(),_=0,w=this._textLines.length;_<w;_++)if(n=this.getHeightOfLine(_),this[t]||this.styleHas(t,_)){l=this._textLines[_],m=n/this.lineHeight,a=this._getLineLeftOffset(_),d=0,h=0,c=this.getValueOfPropertyAt(_,0,t),v=this.getValueOfPropertyAt(_,0,"fill"),u=y+m*(1-this._fontSizeFraction),r=this.getHeightOfChar(_,0),o=this.getValueOfPropertyAt(_,0,"deltaY");for(var E=0,S=l.length;E<S;E++)f=this.__charBounds[_][E],p=this.getValueOfPropertyAt(_,E,t),g=this.getValueOfPropertyAt(_,E,"fill"),i=this.getHeightOfChar(_,E),s=this.getValueOfPropertyAt(_,E,"deltaY"),(p!==c||g!==v||i!==r||s!==o)&&h>0?(e.fillStyle=v,c&&v&&e.fillRect(b+a+d,u+this.offsets[t]*r+o,h,this.fontSize/15),d=f.left,h=f.width,c=p,v=g,r=i,o=s):h+=f.kernedWidth;e.fillStyle=g,p&&g&&e.fillRect(b+a+d,u+this.offsets[t]*r+o,h-A,this.fontSize/15),y+=n}else y+=n;this._removeShadow(e)}},_getFontDeclaration:function(e,n){var r=e||this,i=this.fontFamily,a=t.Text.genericFonts.indexOf(i.toLowerCase())>-1,o=void 0===i||i.indexOf("'")>-1||i.indexOf(",")>-1||i.indexOf('"')>-1||a?r.fontFamily:'"'+r.fontFamily+'"';return[t.isLikelyNode?r.fontWeight:r.fontStyle,t.isLikelyNode?r.fontStyle:r.fontWeight,n?this.CACHE_FONT_SIZE+"px":r.fontSize+"px",o].join(" ")},render:function(e){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",e)))},_splitTextIntoLines:function(e){for(var n=e.split(this._reNewline),r=new Array(n.length),i=["\n"],a=[],o=0;o<n.length;o++)r[o]=t.util.string.graphemeSplit(n[o]),a=a.concat(r[o],i);return a.pop(),{_unwrappedLines:r,lines:n,graphemeText:a,graphemeLines:r}},toObject:function(e){var t=["text","fontSize","fontWeight","fontFamily","fontStyle","lineHeight","underline","overline","linethrough","textAlign","textBackgroundColor","charSpacing"].concat(e),r=this.callSuper("toObject",t);return r.styles=n(this.styles,!0),r},set:function(e,t){this.callSuper("set",e,t);var n=!1;if("object"==typeof e)for(var r in e)n=n||-1!==this._dimensionAffectingProps.indexOf(r);else n=-1!==this._dimensionAffectingProps.indexOf(e);return n&&(this.initDimensions(),this.setCoords()),this},complexity:function(){return 1}}),t.Text.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size letter-spacing text-decoration text-anchor".split(" ")),t.Text.DEFAULT_SVG_FONT_SIZE=16,t.Text.fromElement=function(e,r,i){if(!e)return r(null);var a=t.parseAttributes(e,t.Text.ATTRIBUTE_NAMES),o=a.textAnchor||"left";if((i=t.util.object.extend(i?n(i):{},a)).top=i.top||0,i.left=i.left||0,a.textDecoration){var s=a.textDecoration;-1!==s.indexOf("underline")&&(i.underline=!0),-1!==s.indexOf("overline")&&(i.overline=!0),-1!==s.indexOf("line-through")&&(i.linethrough=!0),delete i.textDecoration}"dx"in a&&(i.left+=a.dx),"dy"in a&&(i.top+=a.dy),"fontSize"in i||(i.fontSize=t.Text.DEFAULT_SVG_FONT_SIZE);var l="";"textContent"in e?l=e.textContent:"firstChild"in e&&null!==e.firstChild&&"data"in e.firstChild&&null!==e.firstChild.data&&(l=e.firstChild.data),l=l.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var c=i.strokeWidth;i.strokeWidth=0;var u=new t.Text(l,i),d=u.getScaledHeight()/u.height,h=((u.height+u.strokeWidth)*u.lineHeight-u.height)*d,f=u.getScaledHeight()+h,p=0;"center"===o&&(p=u.getScaledWidth()/2),"right"===o&&(p=u.getScaledWidth()),u.set({left:u.left-p,top:u.top-(f-u.fontSize*(.07+u._fontSizeFraction))/u.lineHeight,strokeWidth:void 0!==c?c:1}),r(u)},t.Text.fromObject=function(e,n){return t.Object._fromObject("Text",e,n,"text")},t.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],t.util.createAccessors&&t.util.createAccessors(t.Text))}(t),C.util.object.extend(C.Text.prototype,{isEmptyStyles:function(e){if(!this.styles)return!0;if(void 0!==e&&!this.styles[e])return!0;var t=void 0===e?this.styles:{line:this.styles[e]};for(var n in t)for(var r in t[n])for(var i in t[n][r])return!1;return!0},styleHas:function(e,t){if(!this.styles||!e||""===e)return!1;if(void 0!==t&&!this.styles[t])return!1;var n=void 0===t?this.styles:{0:this.styles[t]};for(var r in n)for(var i in n[r])if(void 0!==n[r][i][e])return!0;return!1},cleanStyle:function(e){if(!this.styles||!e||""===e)return!1;var t,n,r=this.styles,i=0,a=!0,o=0;for(var s in r){for(var l in t=0,r[s]){var c;i++,(c=r[s][l]).hasOwnProperty(e)?(n?c[e]!==n&&(a=!1):n=c[e],c[e]===this[e]&&delete c[e]):a=!1,0!==Object.keys(c).length?t++:delete r[s][l]}0===t&&delete r[s]}for(var u=0;u<this._textLines.length;u++)o+=this._textLines[u].length;a&&i===o&&(this[e]=n,this.removeStyle(e))},removeStyle:function(e){if(this.styles&&e&&""!==e){var t,n,r,i=this.styles;for(n in i){for(r in t=i[n])delete t[r][e],0===Object.keys(t[r]).length&&delete t[r];0===Object.keys(t).length&&delete i[n]}}},_extendStyles:function(e,t){var n=this.get2DCursorLocation(e);this._getLineStyle(n.lineIndex)||this._setLineStyle(n.lineIndex),this._getStyleDeclaration(n.lineIndex,n.charIndex)||this._setStyleDeclaration(n.lineIndex,n.charIndex,{}),C.util.object.extend(this._getStyleDeclaration(n.lineIndex,n.charIndex),t)},get2DCursorLocation:function(e,t){void 0===e&&(e=this.selectionStart);for(var n=t?this._unwrappedTextLines:this._textLines,r=n.length,i=0;i<r;i++){if(e<=n[i].length)return{lineIndex:i,charIndex:e};e-=n[i].length+this.missingNewlineOffset(i)}return{lineIndex:i-1,charIndex:n[i-1].length<e?n[i-1].length:e}},getSelectionStyles:function(e,t,n){void 0===e&&(e=this.selectionStart||0),void 0===t&&(t=this.selectionEnd||e);for(var r=[],i=e;i<t;i++)r.push(this.getStyleAtPosition(i,n));return r},getStyleAtPosition:function(e,t){var n=this.get2DCursorLocation(e);return(t?this.getCompleteStyleDeclaration(n.lineIndex,n.charIndex):this._getStyleDeclaration(n.lineIndex,n.charIndex))||{}},setSelectionStyles:function(e,t,n){void 0===t&&(t=this.selectionStart||0),void 0===n&&(n=this.selectionEnd||t);for(var r=t;r<n;r++)this._extendStyles(r,e);return this._forceClearCache=!0,this},_getStyleDeclaration:function(e,t){var n=this.styles&&this.styles[e];return n?n[t]:null},getCompleteStyleDeclaration:function(e,t){for(var n,r=this._getStyleDeclaration(e,t)||{},i={},a=0;a<this._styleProperties.length;a++)i[n=this._styleProperties[a]]=void 0===r[n]?this[n]:r[n];return i},_setStyleDeclaration:function(e,t,n){this.styles[e][t]=n},_deleteStyleDeclaration:function(e,t){delete this.styles[e][t]},_getLineStyle:function(e){return!!this.styles[e]},_setLineStyle:function(e){this.styles[e]={}},_deleteLineStyle:function(e){delete this.styles[e]}}),function(){function e(e){e.textDecoration&&(e.textDecoration.indexOf("underline")>-1&&(e.underline=!0),e.textDecoration.indexOf("line-through")>-1&&(e.linethrough=!0),e.textDecoration.indexOf("overline")>-1&&(e.overline=!0),delete e.textDecoration)}C.IText=C.util.createClass(C.Text,C.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"",cursorDelay:1e3,cursorDuration:600,caching:!0,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(e,t){this.callSuper("initialize",e,t),this.initBehavior()},setSelectionStart:function(e){e=Math.max(e,0),this._updateAndFire("selectionStart",e)},setSelectionEnd:function(e){e=Math.min(e,this.text.length),this._updateAndFire("selectionEnd",e)},_updateAndFire:function(e,t){this[e]!==t&&(this._fireSelectionChanged(),this[e]=t),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(e){this.clearContextTop(),this.callSuper("render",e),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(e){this.callSuper("_render",e)},clearContextTop:function(e){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var t=this.canvas.contextTop,n=this.canvas.viewportTransform;t.save(),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this.transform(t),this._clearTextArea(t),e||t.restore()}},renderCursorOrSelection:function(){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var e=this._getCursorBoundaries(),t=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(e,t):this.renderSelection(e,t),t.restore()}},_clearTextArea:function(e){var t=this.width+4,n=this.height+4;e.clearRect(-t/2,-n/2,t,n)},_getCursorBoundaries:function(e){void 0===e&&(e=this.selectionStart);var t=this._getLeftOffset(),n=this._getTopOffset(),r=this._getCursorBoundariesOffsets(e);return{left:t,top:n,leftOffset:r.left,topOffset:r.top}},_getCursorBoundariesOffsets:function(e){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var t,n,r,i,a=0,o=0,s=this.get2DCursorLocation(e);r=s.charIndex,n=s.lineIndex;for(var l=0;l<n;l++)a+=this.getHeightOfLine(l);t=this._getLineLeftOffset(n);var c=this.__charBounds[n][r];return c&&(o=c.left),0!==this.charSpacing&&r===this._textLines[n].length&&(o-=this._getWidthOfCharSpacing()),i={top:a,left:t+(o>0?o:0)},this.cursorOffsetCache=i,this.cursorOffsetCache},renderCursor:function(e,t){var n=this.get2DCursorLocation(),r=n.lineIndex,i=n.charIndex>0?n.charIndex-1:0,a=this.getValueOfPropertyAt(r,i,"fontSize"),o=this.scaleX*this.canvas.getZoom(),s=this.cursorWidth/o,l=e.topOffset,c=this.getValueOfPropertyAt(r,i,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(r)/this.lineHeight-a*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(e,t),t.fillStyle=this.cursorColor||this.getValueOfPropertyAt(r,i,"fill"),t.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,t.fillRect(e.left+e.leftOffset-s/2,l+e.top+c,s,a)},renderSelection:function(e,t){for(var n=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,r=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,i=-1!==this.textAlign.indexOf("justify"),a=this.get2DCursorLocation(n),o=this.get2DCursorLocation(r),s=a.lineIndex,l=o.lineIndex,c=a.charIndex<0?0:a.charIndex,u=o.charIndex<0?0:o.charIndex,d=s;d<=l;d++){var h,f=this._getLineLeftOffset(d)||0,p=this.getHeightOfLine(d),m=0,g=0;if(d===s&&(m=this.__charBounds[s][c].left),d>=s&&d<l)g=i&&!this.isEndOfWrapping(d)?this.width:this.getLineWidth(d)||5;else if(d===l)if(0===u)g=this.__charBounds[l][u].left;else{var v=this._getWidthOfCharSpacing();g=this.__charBounds[l][u-1].left+this.__charBounds[l][u-1].width-v}h=p,(this.lineHeight<1||d===l&&this.lineHeight>1)&&(p/=this.lineHeight),this.inCompositionMode?(t.fillStyle=this.compositionColor||"black",t.fillRect(e.left+f+m,e.top+e.topOffset+p,g-m,1)):(t.fillStyle=this.selectionColor,t.fillRect(e.left+f+m,e.top+e.topOffset,g-m,p)),e.topOffset+=h}},getCurrentCharFontSize:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fontSize")},getCurrentCharColor:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fill")},_getCurrentCharIndex:function(){var e=this.get2DCursorLocation(this.selectionStart,!0),t=e.charIndex>0?e.charIndex-1:0;return{l:e.lineIndex,c:t}}}),C.IText.fromObject=function(t,n){if(e(t),t.styles)for(var r in t.styles)for(var i in t.styles[r])e(t.styles[r][i]);C.Object._fromObject("IText",t,n,"text")}}(),w=C.util.object.clone,C.util.object.extend(C.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var e=this;this.on("added",(function(){var t=e.canvas;t&&(t._hasITextHandlers||(t._hasITextHandlers=!0,e._initCanvasHandlers(t)),t._iTextInstances=t._iTextInstances||[],t._iTextInstances.push(e))}))},initRemovedHandler:function(){var e=this;this.on("removed",(function(){var t=e.canvas;t&&(t._iTextInstances=t._iTextInstances||[],C.util.removeFromArray(t._iTextInstances,e),0===t._iTextInstances.length&&(t._hasITextHandlers=!1,e._removeCanvasHandlers(t)))}))},_initCanvasHandlers:function(e){e._mouseUpITextHandler=function(){e._iTextInstances&&e._iTextInstances.forEach((function(e){e.__isMousedown=!1}))},e.on("mouse:up",e._mouseUpITextHandler)},_removeCanvasHandlers:function(e){e.off("mouse:up",e._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(e,t,n,r){var i;return i={isAborted:!1,abort:function(){this.isAborted=!0}},e.animate("_currentCursorOpacity",t,{duration:n,onComplete:function(){i.isAborted||e[r]()},onChange:function(){e.canvas&&e.selectionStart===e.selectionEnd&&e.renderCursorOrSelection()},abort:function(){return i.isAborted}}),i},_onTickComplete:function(){var e=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout((function(){e._currentTickCompleteState=e._animateCursor(e,0,this.cursorDuration/2,"_tick")}),100)},initDelayedCursor:function(e){var t=this,n=e?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout((function(){t._tick()}),n)},abortCursorAnimation:function(){var e=this._currentTickState||this._currentTickCompleteState,t=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,e&&t&&t.clearContext(t.contextTop||t.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(e){var t=0,n=e-1;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)t++,n--;for(;/\S/.test(this._text[n])&&n>-1;)t++,n--;return e-t},findWordBoundaryRight:function(e){var t=0,n=e;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)t++,n++;for(;/\S/.test(this._text[n])&&n<this._text.length;)t++,n++;return e+t},findLineBoundaryLeft:function(e){for(var t=0,n=e-1;!/\n/.test(this._text[n])&&n>-1;)t++,n--;return e-t},findLineBoundaryRight:function(e){for(var t=0,n=e;!/\n/.test(this._text[n])&&n<this._text.length;)t++,n++;return e+t},searchWordBoundary:function(e,t){for(var n=this._text,r=this._reSpace.test(n[e])?e-1:e,i=n[r],a=C.reNonWord;!a.test(i)&&r>0&&r<n.length;)i=n[r+=t];return a.test(i)&&(r+=1===t?0:1),r},selectWord:function(e){e=e||this.selectionStart;var t=this.searchWordBoundary(e,-1),n=this.searchWordBoundary(e,1);this.selectionStart=t,this.selectionEnd=n,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(e){e=e||this.selectionStart;var t=this.findLineBoundaryLeft(e),n=this.findLineBoundaryRight(e);return this.selectionStart=t,this.selectionEnd=n,this._fireSelectionChanged(),this._updateTextarea(),this},enterEditing:function(e){if(!this.isEditing&&this.editable)return this.canvas&&(this.canvas.calcOffset(),this.exitEditingOnOthers(this.canvas)),this.isEditing=!0,this.initHiddenTextarea(e),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this._fireSelectionChanged(),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.initMouseMoveHandler(),this.canvas.requestRenderAll(),this):this},exitEditingOnOthers:function(e){e._iTextInstances&&e._iTextInstances.forEach((function(e){e.selected=!1,e.isEditing&&e.exitEditing()}))},initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler)},mouseMoveHandler:function(e){if(this.__isMousedown&&this.isEditing){var t=this.getSelectionStartFromPointer(e.e),n=this.selectionStart,r=this.selectionEnd;(t===this.__selectionStartOnMouseDown&&n!==r||n!==t&&r!==t)&&(t>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=t):(this.selectionStart=t,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===n&&this.selectionEnd===r||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(e,t,n){var r=n.slice(0,e),i=C.util.string.graphemeSplit(r).length;if(e===t)return{selectionStart:i,selectionEnd:i};var a=n.slice(e,t);return{selectionStart:i,selectionEnd:i+C.util.string.graphemeSplit(a).length}},fromGraphemeToStringSelection:function(e,t,n){var r=n.slice(0,e).join("").length;return e===t?{selectionStart:r,selectionEnd:r}:{selectionStart:r,selectionEnd:r+n.slice(e,t).join("").length}},_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var e=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=e.selectionStart,this.hiddenTextarea.selectionEnd=e.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var e=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=e.selectionEnd,this.inCompositionMode||(this.selectionStart=e.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var e=this._calcTextareaPosition();this.hiddenTextarea.style.left=e.left,this.hiddenTextarea.style.top=e.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var e=this.inCompositionMode?this.compositionStart:this.selectionStart,t=this._getCursorBoundaries(e),n=this.get2DCursorLocation(e),r=n.lineIndex,i=n.charIndex,a=this.getValueOfPropertyAt(r,i,"fontSize")*this.lineHeight,o=t.leftOffset,s=this.calcTransformMatrix(),l={x:t.left+o,y:t.top+t.topOffset+a},c=this.canvas.getRetinaScaling(),u=this.canvas.upperCanvasEl,d=u.width/c,h=u.height/c,f=d-a,p=h-a,m=u.clientWidth/d,g=u.clientHeight/h;return l=C.util.transformPoint(l,s),(l=C.util.transformPoint(l,this.canvas.viewportTransform)).x*=m,l.y*=g,l.x<0&&(l.x=0),l.x>f&&(l.x=f),l.y<0&&(l.y=0),l.y>p&&(l.y=p),l.x+=this.canvas._offset.left,l.y+=this.canvas._offset.top,{left:l.x+"px",top:l.y+"px",fontSize:a+"px",charHeight:a}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var e=this._textBeforeEdit!==this.text,t=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,t&&(t.blur&&t.blur(),t.parentNode&&t.parentNode.removeChild(t)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),e&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),e&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var e in this.styles)this._textLines[e]||delete this.styles[e]},removeStyleFromTo:function(e,t){var n,r,i=this.get2DCursorLocation(e,!0),a=this.get2DCursorLocation(t,!0),o=i.lineIndex,s=i.charIndex,l=a.lineIndex,c=a.charIndex;if(o!==l){if(this.styles[o])for(n=s;n<this._unwrappedTextLines[o].length;n++)delete this.styles[o][n];if(this.styles[l])for(n=c;n<this._unwrappedTextLines[l].length;n++)(r=this.styles[l][n])&&(this.styles[o]||(this.styles[o]={}),this.styles[o][s+n-c]=r);for(n=o+1;n<=l;n++)delete this.styles[n];this.shiftLineStyles(l,o-l)}else if(this.styles[o]){r=this.styles[o];var u,d,h=c-s;for(n=s;n<c;n++)delete r[n];for(d in this.styles[o])(u=parseInt(d,10))>=c&&(r[u-h]=r[d],delete r[d])}},shiftLineStyles:function(e,t){var n=w(this.styles);for(var r in this.styles){var i=parseInt(r,10);i>e&&(this.styles[i+t]=n[i],n[i-t]||delete this.styles[i])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(e,t,n,r){var i,a={},o=!1,s=this._unwrappedTextLines[e].length===t;for(var l in n||(n=1),this.shiftLineStyles(e,n),this.styles[e]&&(i=this.styles[e][0===t?t:t-1]),this.styles[e]){var c=parseInt(l,10);c>=t&&(o=!0,a[c-t]=this.styles[e][l],s&&0===t||delete this.styles[e][l])}var u=!1;for(o&&!s&&(this.styles[e+n]=a,u=!0),u&&n--;n>0;)r&&r[n-1]?this.styles[e+n]={0:w(r[n-1])}:i?this.styles[e+n]={0:w(i)}:delete this.styles[e+n],n--;this._forceClearCache=!0},insertCharStyleObject:function(e,t,n,r){this.styles||(this.styles={});var i=this.styles[e],a=i?w(i):{};for(var o in n||(n=1),a){var s=parseInt(o,10);s>=t&&(i[s+n]=a[s],a[s-n]||delete i[s])}if(this._forceClearCache=!0,r)for(;n--;)Object.keys(r[n]).length&&(this.styles[e]||(this.styles[e]={}),this.styles[e][t+n]=w(r[n]));else if(i)for(var l=i[t?t-1:1];l&&n--;)this.styles[e][t+n]=w(l)},insertNewStyleBlock:function(e,t,n){for(var r=this.get2DCursorLocation(t,!0),i=[0],a=0,o=0;o<e.length;o++)"\n"===e[o]?i[++a]=0:i[a]++;for(i[0]>0&&(this.insertCharStyleObject(r.lineIndex,r.charIndex,i[0],n),n=n&&n.slice(i[0]+1)),a&&this.insertNewlineStyleObject(r.lineIndex,r.charIndex+i[0],a),o=1;o<a;o++)i[o]>0?this.insertCharStyleObject(r.lineIndex+o,0,i[o],n):n&&(this.styles[r.lineIndex+o][0]=n[0]),n=n&&n.slice(i[o]+1);i[o]>0&&this.insertCharStyleObject(r.lineIndex+o,0,i[o],n)},setSelectionStartEndWithShift:function(e,t,n){n<=e?(t===e?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=e),this.selectionStart=n):n>e&&n<t?"right"===this._selectionDirection?this.selectionEnd=n:this.selectionStart=n:(t===e?this._selectionDirection="right":"left"===this._selectionDirection&&(this._selectionDirection="right",this.selectionStart=t),this.selectionEnd=n)},setSelectionInBoundaries:function(){var e=this.text.length;this.selectionStart>e?this.selectionStart=e:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>e?this.selectionEnd=e:this.selectionEnd<0&&(this.selectionEnd=0)}}),C.util.object.extend(C.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(e){if(this.canvas){this.__newClickTime=+new Date;var t=e.pointer;this.isTripleClick(t)&&(this.fire("tripleclick",e),this._stopEvent(e.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=t,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(e){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===e.x&&this.__lastPointer.y===e.y},_stopEvent:function(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(e){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(e.e))},tripleClickHandler:function(e){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(e.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(e){!this.canvas||!this.editable||e.e.button&&1!==e.e.button||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(e.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(e){!this.canvas||!this.editable||e.e.button&&1!==e.e.button||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(e){if(this.__isMousedown=!1,!(!this.editable||this.group||e.transform&&e.transform.actionPerformed||e.e.button&&1!==e.e.button)){if(this.canvas){var t=this.canvas._activeObject;if(t&&t!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(e.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(e){var t=this.getSelectionStartFromPointer(e),n=this.selectionStart,r=this.selectionEnd;e.shiftKey?this.setSelectionStartEndWithShift(n,r,t):(this.selectionStart=t,this.selectionEnd=t),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(e){for(var t=this.getLocalPointer(e),n=0,r=0,i=0,a=0,o=0,s=0,l=this._textLines.length;s<l&&i<=t.y;s++)i+=this.getHeightOfLine(s)*this.scaleY,o=s,s>0&&(a+=this._textLines[s-1].length+this.missingNewlineOffset(s-1));r=this._getLineLeftOffset(o)*this.scaleX;for(var c=0,u=this._textLines[o].length;c<u&&(n=r,(r+=this.__charBounds[o][c].kernedWidth*this.scaleX)<=t.x);c++)a++;return this._getNewSelectionStartFromOffset(t,n,r,a,u)},_getNewSelectionStartFromOffset:function(e,t,n,r,i){var a=e.x-t,o=n-e.x,s=r+(o>a||o<0?0:1);return this.flipX&&(s=i-s),s>this._text.length&&(s=this._text.length),s}}),C.util.object.extend(C.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=C.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var e=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+e.top+"; left: "+e.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; paddingｰtop: "+e.fontSize+";",C.document.body.appendChild(this.hiddenTextarea),C.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),C.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),C.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),C.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),C.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),C.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(C.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(e){if(this.isEditing){if(e.keyCode in this.keysMap)this[this.keysMap[e.keyCode]](e);else{if(!(e.keyCode in this.ctrlKeysMapDown&&(e.ctrlKey||e.metaKey)))return;this[this.ctrlKeysMapDown[e.keyCode]](e)}e.stopImmediatePropagation(),e.preventDefault(),e.keyCode>=33&&e.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(e){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:e.keyCode in this.ctrlKeysMapUp&&(e.ctrlKey||e.metaKey)&&(this[this.ctrlKeysMapUp[e.keyCode]](e),e.stopImmediatePropagation(),e.preventDefault(),this.canvas&&this.canvas.requestRenderAll())},onInput:function(e){var t=this.fromPaste;if(this.fromPaste=!1,e&&e.stopPropagation(),this.isEditing){var n,r,i,a,o,s=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,l=this._text.length,c=s.length,u=c-l,d=this.selectionStart,h=this.selectionEnd,f=d!==h;if(""===this.hiddenTextarea.value)return this.styles={},this.updateFromTextArea(),this.fire("changed"),void(this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll()));var p=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),m=d>p.selectionStart;f?(n=this._text.slice(d,h),u+=h-d):c<l&&(n=m?this._text.slice(h+u,h):this._text.slice(d,d-u)),r=s.slice(p.selectionEnd-u,p.selectionEnd),n&&n.length&&(r.length&&(i=this.getSelectionStyles(d,d+1,!1),i=r.map((function(){return i[0]}))),f?(a=d,o=h):m?(a=h-n.length,o=h):(a=h,o=h+n.length),this.removeStyleFromTo(a,o)),r.length&&(t&&r.join("")===C.copiedText&&!C.disableStyleCopyPaste&&(i=C.copiedTextStyle),this.insertNewStyleBlock(r,d,i)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(e){this.compositionStart=e.target.selectionStart,this.compositionEnd=e.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(C.copiedText=this.getSelectedText(),C.disableStyleCopyPaste?C.copiedTextStyle=null:C.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(e){return e&&e.clipboardData||C.window.clipboardData},_getWidthBeforeCursor:function(e,t){var n,r=this._getLineLeftOffset(e);return t>0&&(r+=(n=this.__charBounds[e][t-1]).left+n.width),r},getDownCursorOffset:function(e,t){var n=this._getSelectionForOffset(e,t),r=this.get2DCursorLocation(n),i=r.lineIndex;if(i===this._textLines.length-1||e.metaKey||34===e.keyCode)return this._text.length-n;var a=r.charIndex,o=this._getWidthBeforeCursor(i,a),s=this._getIndexOnLine(i+1,o);return this._textLines[i].slice(a).length+s+1+this.missingNewlineOffset(i)},_getSelectionForOffset:function(e,t){return e.shiftKey&&this.selectionStart!==this.selectionEnd&&t?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(e,t){var n=this._getSelectionForOffset(e,t),r=this.get2DCursorLocation(n),i=r.lineIndex;if(0===i||e.metaKey||33===e.keyCode)return-n;var a=r.charIndex,o=this._getWidthBeforeCursor(i,a),s=this._getIndexOnLine(i-1,o),l=this._textLines[i].slice(0,a),c=this.missingNewlineOffset(i-1);return-this._textLines[i-1].length+s-l.length+(1-c)},_getIndexOnLine:function(e,t){for(var n,r,i=this._textLines[e],a=this._getLineLeftOffset(e),o=0,s=0,l=i.length;s<l;s++)if((a+=n=this.__charBounds[e][s].width)>t){r=!0;var c=a-n,u=a,d=Math.abs(c-t);o=Math.abs(u-t)<d?s:s-1;break}return r||(o=i.length-1),o},moveCursorDown:function(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",e)},moveCursorUp:function(e){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",e)},_moveCursorUpOrDown:function(e,t){var n=this["get"+e+"CursorOffset"](t,"right"===this._selectionDirection);t.shiftKey?this.moveCursorWithShift(n):this.moveCursorWithoutShift(n),0!==n&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(e){var t="left"===this._selectionDirection?this.selectionStart+e:this.selectionEnd+e;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,t),0!==e},moveCursorWithoutShift:function(e){return e<0?(this.selectionStart+=e,this.selectionEnd=this.selectionStart):(this.selectionEnd+=e,this.selectionStart=this.selectionEnd),0!==e},moveCursorLeft:function(e){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",e)},_move:function(e,t,n){var r;if(e.altKey)r=this["findWordBoundary"+n](this[t]);else{if(!e.metaKey&&35!==e.keyCode&&36!==e.keyCode)return this[t]+="Left"===n?-1:1,!0;r=this["findLineBoundary"+n](this[t])}if(void 0!==typeof r&&this[t]!==r)return this[t]=r,!0},_moveLeft:function(e,t){return this._move(e,t,"Left")},_moveRight:function(e,t){return this._move(e,t,"Right")},moveCursorLeftWithoutShift:function(e){var t=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(t=this._moveLeft(e,"selectionStart")),this.selectionEnd=this.selectionStart,t},moveCursorLeftWithShift:function(e){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(e,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(e,"selectionStart")):void 0},moveCursorRight:function(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",e)},_moveCursorLeftOrRight:function(e,t){var n="moveCursor"+e+"With";this._currentCursorOpacity=1,t.shiftKey?n+="Shift":n+="outShift",this[n](t)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(e){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(e,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(e,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(e){var t=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(t=this._moveRight(e,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,t},removeChars:function(e,t){void 0===t&&(t=e+1),this.removeStyleFromTo(e,t),this._text.splice(e,t-e),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(e,t,n,r){void 0===r&&(r=n),r>n&&this.removeStyleFromTo(n,r);var i=C.util.string.graphemeSplit(e);this.insertNewStyleBlock(i,n,t),this._text=[].concat(this._text.slice(0,n),i,this._text.slice(r)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),E=C.util.toFixed,S=/  +/g,C.util.object.extend(C.Text.prototype,{_toSVG:function(){var e=this._getSVGLeftTopOffsets(),t=this._getSVGTextAndBg(e.textTop,e.textLeft);return this._wrapSVGTextAndBg(t)},toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(e){var t=this.getSvgTextDecoration(this);return[e.textBgRects.join(""),'\t\t<text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",t?'text-decoration="'+t+'" ':"",'style="',this.getSvgStyles(!0),'"',this.addPaintOrder()," >",e.textSpans.join(""),"</text>\n"]},_getSVGTextAndBg:function(e,t){var n,r=[],i=[],a=e;this._setSVGBg(i);for(var o=0,s=this._textLines.length;o<s;o++)n=this._getLineLeftOffset(o),(this.textBackgroundColor||this.styleHas("textBackgroundColor",o))&&this._setSVGTextLineBg(i,o,t+n,a),this._setSVGTextLineText(r,o,t+n,a),a+=this.getHeightOfLine(o);return{textSpans:r,textBgRects:i}},_createTextCharSpan:function(e,t,n,r){var i=e!==e.trim()||e.match(S),a=this.getSvgSpanStyles(t,i),o=a?'style="'+a+'"':"",s=t.deltaY,l="",c=C.Object.NUM_FRACTION_DIGITS;return s&&(l=' dy="'+E(s,c)+'" '),['<tspan x="',E(n,c),'" y="',E(r,c),'" ',l,o,">",C.util.string.escapeXml(e),"</tspan>"].join("")},_setSVGTextLineText:function(e,t,n,r){var i,a,o,s,l,c=this.getHeightOfLine(t),u=-1!==this.textAlign.indexOf("justify"),d="",h=0,f=this._textLines[t];r+=c*(1-this._fontSizeFraction)/this.lineHeight;for(var p=0,m=f.length-1;p<=m;p++)l=p===m||this.charSpacing,d+=f[p],o=this.__charBounds[t][p],0===h?(n+=o.kernedWidth-o.width,h+=o.width):h+=o.kernedWidth,u&&!l&&this._reSpaceAndTab.test(f[p])&&(l=!0),l||(i=i||this.getCompleteStyleDeclaration(t,p),a=this.getCompleteStyleDeclaration(t,p+1),l=this._hasStyleChangedForSvg(i,a)),l&&(s=this._getStyleDeclaration(t,p)||{},e.push(this._createTextCharSpan(d,s,n,r)),d="",i=a,n+=h,h=0)},_pushTextBgRect:function(e,t,n,r,i,a){var o=C.Object.NUM_FRACTION_DIGITS;e.push("\t\t<rect ",this._getFillAttributes(t),' x="',E(n,o),'" y="',E(r,o),'" width="',E(i,o),'" height="',E(a,o),'"></rect>\n')},_setSVGTextLineBg:function(e,t,n,r){for(var i,a,o=this._textLines[t],s=this.getHeightOfLine(t)/this.lineHeight,l=0,c=0,u=this.getValueOfPropertyAt(t,0,"textBackgroundColor"),d=0,h=o.length;d<h;d++)i=this.__charBounds[t][d],(a=this.getValueOfPropertyAt(t,d,"textBackgroundColor"))!==u?(u&&this._pushTextBgRect(e,u,n+c,r,l,s),c=i.left,l=i.width,u=a):l+=i.kernedWidth;a&&this._pushTextBgRect(e,a,n+c,r,l,s)},_getFillAttributes:function(e){var t=e&&"string"==typeof e?new C.Color(e):"";return t&&t.getSource()&&1!==t.getAlpha()?'opacity="'+t.getAlpha()+'" fill="'+t.setAlpha(1).toRgb()+'"':'fill="'+e+'"'},_getSVGLineTopOffset:function(e){for(var t,n=0,r=0;r<e;r++)n+=this.getHeightOfLine(r);return t=this.getHeightOfLine(r),{lineTop:n,offset:(this._fontSizeMult-this._fontSizeFraction)*t/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(e){return C.Object.prototype.getSvgStyles.call(this,e)+" white-space: pre;"}}),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Textbox=t.util.createClass(t.IText,t.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:t.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(e){for(var t=0,n=0,r=0,i={},a=0;a<e.graphemeLines.length;a++)"\n"===e.graphemeText[r]&&a>0?(n=0,r++,t++):!this.splitByGrapheme&&this._reSpaceAndTab.test(e.graphemeText[r])&&a>0&&(n++,r++),i[a]={line:t,offset:n},r+=e.graphemeLines[a].length,n+=e.graphemeLines[a].length;return i},styleHas:function(e,n){if(this._styleMap&&!this.isWrapping){var r=this._styleMap[n];r&&(n=r.line)}return t.Text.prototype.styleHas.call(this,e,n)},isEmptyStyles:function(e){if(!this.styles)return!0;var t,n,r=0,i=!1,a=this._styleMap[e],o=this._styleMap[e+1];for(var s in a&&(e=a.line,r=a.offset),o&&(i=o.line===e,t=o.offset),n=void 0===e?this.styles:{line:this.styles[e]})for(var l in n[s])if(l>=r&&(!i||l<t))for(var c in n[s][l])return!1;return!0},_getStyleDeclaration:function(e,t){if(this._styleMap&&!this.isWrapping){var n=this._styleMap[e];if(!n)return null;e=n.line,t=n.offset+t}return this.callSuper("_getStyleDeclaration",e,t)},_setStyleDeclaration:function(e,t,n){var r=this._styleMap[e];e=r.line,t=r.offset+t,this.styles[e][t]=n},_deleteStyleDeclaration:function(e,t){var n=this._styleMap[e];e=n.line,t=n.offset+t,delete this.styles[e][t]},_getLineStyle:function(e){var t=this._styleMap[e];return!!this.styles[t.line]},_setLineStyle:function(e){var t=this._styleMap[e];this.styles[t.line]={}},_wrapText:function(e,t){var n,r=[];for(this.isWrapping=!0,n=0;n<e.length;n++)r=r.concat(this._wrapLine(e[n],n,t));return this.isWrapping=!1,r},_measureWord:function(e,t,n){var r,i=0;n=n||0;for(var a=0,o=e.length;a<o;a++){i+=this._getGraphemeBox(e[a],t,a+n,r,!0).kernedWidth,r=e[a]}return i},_wrapLine:function(e,n,r,i){var a=0,o=this.splitByGrapheme,s=[],l=[],c=o?t.util.string.graphemeSplit(e):e.split(this._wordJoiners),u="",d=0,h=o?"":" ",f=0,p=0,m=0,g=!0,v=this._getWidthOfCharSpacing();i=i||0;0===c.length&&c.push([]),r-=i;for(var b=0;b<c.length;b++)u=o?c[b]:t.util.string.graphemeSplit(c[b]),f=this._measureWord(u,n,d),d+=u.length,(a+=p+f-v)>=r&&!g?(s.push(l),l=[],a=f,g=!0):a+=v,g||o||l.push(h),l=l.concat(u),p=o?0:this._measureWord([h],n,d),d++,g=!1,f>m&&(m=f);return b&&s.push(l),m+i>this.dynamicMinWidth&&(this.dynamicMinWidth=m-v+i),s},isEndOfWrapping:function(e){return!this._styleMap[e+1]||this._styleMap[e+1].line!==this._styleMap[e].line},missingNewlineOffset:function(e){return this.splitByGrapheme?this.isEndOfWrapping(e)?1:0:1},_splitTextIntoLines:function(e){for(var n=t.Text.prototype._splitTextIntoLines.call(this,e),r=this._wrapText(n.lines,this.width),i=new Array(r.length),a=0;a<r.length;a++)i[a]=r[a].join("");return n.lines=i,n.graphemeLines=r,n},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var e={};for(var t in this._styleMap)this._textLines[t]&&(e[this._styleMap[t].line]=1);for(var t in this.styles)e[t]||delete this.styles[t]},toObject:function(e){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(e))}}),t.Textbox.fromObject=function(e,n){return t.Object._fromObject("Textbox",e,n,"text")}}(t),function(){var e=C.controlsUtils,t=e.scaleSkewCursorStyleHandler,n=e.scaleCursorStyleHandler,r=e.scalingEqually,i=e.scalingYOrSkewingX,a=e.scalingXOrSkewingY,o=e.scaleOrSkewActionName,s=C.Object.prototype.controls;if(s.ml=new C.Control({x:-.5,y:0,cursorStyleHandler:t,actionHandler:a,getActionName:o}),s.mr=new C.Control({x:.5,y:0,cursorStyleHandler:t,actionHandler:a,getActionName:o}),s.mb=new C.Control({x:0,y:.5,cursorStyleHandler:t,actionHandler:i,getActionName:o}),s.mt=new C.Control({x:0,y:-.5,cursorStyleHandler:t,actionHandler:i,getActionName:o}),s.tl=new C.Control({x:-.5,y:-.5,cursorStyleHandler:n,actionHandler:r}),s.tr=new C.Control({x:.5,y:-.5,cursorStyleHandler:n,actionHandler:r}),s.bl=new C.Control({x:-.5,y:.5,cursorStyleHandler:n,actionHandler:r}),s.br=new C.Control({x:.5,y:.5,cursorStyleHandler:n,actionHandler:r}),s.mtr=new C.Control({x:0,y:-.5,actionHandler:e.rotationWithSnapping,cursorStyleHandler:e.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),C.Textbox){var l=C.Textbox.prototype.controls={};l.mtr=s.mtr,l.tr=s.tr,l.br=s.br,l.tl=s.tl,l.bl=s.bl,l.mt=s.mt,l.mb=s.mb,l.mr=new C.Control({x:.5,y:0,actionHandler:e.changeWidth,cursorStyleHandler:t,actionName:"resizing"}),l.ml=new C.Control({x:-.5,y:0,actionHandler:e.changeWidth,cursorStyleHandler:t,actionName:"resizing"})}}()}).call(this,n(113).Buffer)},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",fuviLogo:"fuviLogo--1nQ0O",fullscreenButton:"fullscreenButton--3Odrv",topBar:"topBar--1xSv2",fuviAppContainer:"fuviAppContainer--1glQ9",fuviAppWrap:"fuviAppWrap--AETTy",topbarScrollWrap:"topbarScrollWrap--2r-Yq",mainLogoWrap:"mainLogoWrap--1a0I_",headerToolNav:"headerToolNav--3eKQf",headerToolNavLeft:"headerToolNavLeft--ZZN4W",headerToolNavRight:"headerToolNavRight--FozVZ",rightBar:"rightBar--3hGtn",rightBarContent:"rightBarContent--2zWkG",leftBar:"leftBar--2xWjZ",centerApp:"centerApp--3Qaw9",leftBarContent:"leftBarContent--NDMB7",videoContent:"videoContent--21vK4",caWrapper:"caWrapper--1SJuf",caWrapperActive:"caWrapperActive--2XmzA",quickMenuWrapper:"quickMenuWrapper--wEulp",contentWrapper:"contentWrapper--1R7X6",fakeComprehensionGuides:"fakeComprehensionGuides--3qYTp",addDropDownWrap:"addDropDownWrap--2kX3a",addBtn:"addBtn--3uM6F",dropDownMenu:"dropDownMenu--2hO7j",dropDownItem:"dropDownItem--vWxh0",ccvButton:"ccvButton--35KZm",cgvButton:"cgvButton--fe_LZ",topHeader:"topHeader--38cOP",fullscreenMode:"fullscreenMode--3WM_t",circleWrapper:"circleWrapper--1V3tt",emptyGalleryTitle:"emptyGalleryTitle--3ErA2",instructionText:"instructionText--xp5oa",clickHereBtn:"clickHereBtn--3VGOl",coverImage:"coverImage--1Th2K",miniCoverImage:"miniCoverImage--1uYDT",tbToggle:"tbToggle--ZnvFD",tbClose:"tbClose--2-u-L"}},function(e,t,n){"use strict";var r=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,a;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,a)}},this.dispose=function(){e={}}}};r.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),e},r.prototype.push=function(e){this.trigger("data",e)},r.prototype.flush=function(e){this.trigger("done",e)},e.exports=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(362);class i extends r.default{constructor(){super(0)}static nextTick(e){setTimeout(e,0)}}t.default=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MeetingSessionStatusCode=void 0,function(e){e[e.OK=0]="OK",e[e.Left=1]="Left",e[e.AudioJoinedFromAnotherDevice=2]="AudioJoinedFromAnotherDevice",e[e.AudioDisconnectAudio=3]="AudioDisconnectAudio",e[e.AudioAuthenticationRejected=4]="AudioAuthenticationRejected",e[e.AudioCallAtCapacity=5]="AudioCallAtCapacity",e[e.AudioCallEnded=6]="AudioCallEnded",e[e.TURNMeetingEnded=6]="TURNMeetingEnded",e[e.MeetingEnded=6]="MeetingEnded",e[e.AudioInternalServerError=7]="AudioInternalServerError",e[e.AudioServiceUnavailable=8]="AudioServiceUnavailable",e[e.AudioDisconnected=9]="AudioDisconnected",e[e.VideoCallSwitchToViewOnly=10]="VideoCallSwitchToViewOnly",e[e.VideoCallAtSourceCapacity=11]="VideoCallAtSourceCapacity",e[e.SignalingBadRequest=12]="SignalingBadRequest",e[e.SignalingInternalServerError=13]="SignalingInternalServerError",e[e.SignalingRequestFailed=14]="SignalingRequestFailed",e[e.StateMachineTransitionFailed=15]="StateMachineTransitionFailed",e[e.ICEGatheringTimeoutWorkaround=16]="ICEGatheringTimeoutWorkaround",e[e.ConnectionHealthReconnect=17]="ConnectionHealthReconnect",e[e.RealtimeApiFailed=18]="RealtimeApiFailed",e[e.TaskFailed=19]="TaskFailed",e[e.AudioDeviceSwitched=20]="AudioDeviceSwitched",e[e.IncompatibleSDP=21]="IncompatibleSDP",e[e.TURNCredentialsForbidden=22]="TURNCredentialsForbidden",e[e.NoAttendeePresent=23]="NoAttendeePresent",e[e.AudioAttendeeRemoved=24]="AudioAttendeeRemoved"}(r=t.MeetingSessionStatusCode||(t.MeetingSessionStatusCode={})),t.default=r},function(e,t,n){var r=n(186);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";var r=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.loadFromFile=t.isCancelException=t.makePageCallback=t.cancelRunningTask=t.displayCORSWarning=t.errorOnDev=t.warnOnDev=t.getPixelRatio=t.dataURItoByteString=t.isDataURI=t.isFile=t.isBlob=t.isArrayBuffer=t.isString=t.isProvided=t.isDefined=t.isProduction=t.isLocalFileSystem=t.isBrowser=void 0;var i=r(n(29)),a="undefined"!=typeof window;t.isBrowser=a;var o=a&&"file:"===window.location.protocol;t.isLocalFileSystem=o;t.isProduction=!0;var s=function(e){return void 0!==e};t.isDefined=s;t.isProvided=function(e){return s(e)&&null!==e};var l=function(e){return"string"==typeof e};t.isString=l;t.isArrayBuffer=function(e){return e instanceof ArrayBuffer};t.isBlob=function(e){if(!a)throw new Error("Attempted to check if a variable is a Blob on a non-browser environment.");return e instanceof Blob};t.isFile=function(e){if(!a)throw new Error("Attempted to check if a variable is a File on a non-browser environment.");return e instanceof File};var c=function(e){return l(e)&&/^data:/.test(e)};t.isDataURI=c;t.dataURItoByteString=function(e){if(!c(e))throw new Error("Invalid data URI.");var t=e.split(";"),n=(0,i.default)(t,2)[1];return 0===n.indexOf("base64")?atob(n.slice(7)):unescape(n)};t.getPixelRatio=function(){return a&&window.devicePixelRatio||1};var u=function(e){},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,["warn"].concat(t))};t.warnOnDev=d;t.errorOnDev=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,["error"].concat(t))};t.displayCORSWarning=function(){o&&d("Loading PDF as base64 strings/URLs might not work on protocols other than HTTP/HTTPS. On Google Chrome, you can use --allow-file-access-from-files flag for debugging purposes.")};t.cancelRunningTask=function(e){e&&e.cancel&&e.cancel()};t.makePageCallback=function(e,t){return Object.defineProperty(e,"width",{get:function(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get:function(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get:function(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get:function(){return this.view[3]},configurable:!0}),e};t.isCancelException=function(e){return"RenderingCancelledException"===e.name};t.loadFromFile=function(e){return new Promise((function(t,n){var r=new FileReader;return r.onload=function(){return t(new Uint8Array(r.result))},r.onerror=function(e){switch(e.target.error.code){case e.target.error.NOT_FOUND_ERR:return n(new Error("Error while reading a file: File not found."));case e.target.error.NOT_READABLE_ERR:return n(new Error("Error while reading a file: File not readable."));case e.target.error.SECURITY_ERR:return n(new Error("Error while reading a file: Security error."));case e.target.error.ABORT_ERR:return n(new Error("Error while reading a file: Aborted."));default:return n(new Error("Error while reading a file."))}},r.readAsArrayBuffer(e),null}))}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";(function(n){function r(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var i="object"==typeof n&&!0;function a(e,t){if(!e){if(i)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=a;var o=Object.prototype.hasOwnProperty,s=Array.prototype.splice,l=Object.prototype.toString;function c(e){return l.call(e).slice(8,-1)}var u=Object.assign||function(e,t){return d(t).forEach((function(n){o.call(t,n)&&(e[n]=t[n])})),e},d="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function h(e){return Array.isArray(e)?u(e.constructor(e.length),e):"Map"===c(e)?new Map(e):"Set"===c(e)?new Set(e):e&&"object"==typeof e?u(Object.create(Object.getPrototypeOf(e)),e):e}var f=function(){function e(){this.commands=u({},p),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var n=this,r="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(r)||a(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),a("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var i=e;return d(r).forEach((function(t){if(o.call(n.commands,t)){var a=e===i;i=n.commands[t](r[t],i,r,e),a&&n.isEquals(i,e)&&(i=e)}else{var s="Map"===c(e)?n.update(e.get(t),r[t]):n.update(e[t],r[t]),l="Map"===c(i)?i.get(t):i[t];n.isEquals(s,l)&&(void 0!==s||o.call(e,t))||(i===e&&(i=h(e)),"Map"===c(i)?i.set(t,s):i[t]=s)}})),i},e}();t.Context=f;var p={$push:function(e,t,n){return g(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return g(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,n,i){return function(e,t){a(Array.isArray(e),(function(){return"Expected $splice target to be an array; got "+r(e)})),b(t.$splice)}(t,n),e.forEach((function(e){b(e),t===i&&e.length&&(t=h(i)),s.apply(t,e)})),t},$set:function(e,t,n){return function(e){a(1===Object.keys(e).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),e},$toggle:function(e,t){v(e,"$toggle");var n=e.length?h(t):t;return e.forEach((function(e){n[e]=!t[e]})),n},$unset:function(e,t,n,r){return v(e,"$unset"),e.forEach((function(e){Object.hasOwnProperty.call(t,e)&&(t===r&&(t=h(r)),delete t[e])})),t},$add:function(e,t,n,r){return y(t,"$add"),v(e,"$add"),"Map"===c(t)?e.forEach((function(e){var n=e[0],i=e[1];t===r&&t.get(n)!==i&&(t=h(r)),t.set(n,i)})):e.forEach((function(e){t!==r||t.has(e)||(t=h(r)),t.add(e)})),t},$remove:function(e,t,n,r){return y(t,"$remove"),v(e,"$remove"),e.forEach((function(e){t===r&&t.has(e)&&(t=h(r)),t.delete(e)})),t},$merge:function(e,t,n,i){var o,s;return o=t,a((s=e)&&"object"==typeof s,(function(){return"update(): $merge expects a spec of type 'object'; got "+r(s)})),a(o&&"object"==typeof o,(function(){return"update(): $merge expects a target of type 'object'; got "+r(o)})),d(e).forEach((function(n){e[n]!==t[n]&&(t===i&&(t=h(i)),t[n]=e[n])})),t},$apply:function(e,t){var n;return a("function"==typeof(n=e),(function(){return"update(): expected spec of $apply to be a function; got "+r(n)+"."})),e(t)}},m=new f;function g(e,t,n){a(Array.isArray(e),(function(){return"update(): expected target of "+r(n)+" to be an array; got "+r(e)+"."})),v(t[n],n)}function v(e,t){a(Array.isArray(e),(function(){return"update(): expected spec of "+r(t)+" to be an array; got "+r(e)+". Did you forget to wrap your parameter in an array?"}))}function b(e){a(Array.isArray(e),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+r(e)+". Did you forget to wrap your parameters in an array?"}))}function y(e,t){var n=c(e);a("Map"===n||"Set"===n,(function(){return"update(): "+r(t)+" expects a target of type Set or Map; got "+r(n)}))}t.isEquals=m.update.isEquals,t.extend=m.extend,t.default=m.update,t.default.default=e.exports=u(t.default,t)}).call(this,n(96))},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(119),i=n(136),a=n(143),o=n(90);function s(e){return["table","td","th"].indexOf(Object(i.a)(e))>=0}var l=n(218);function c(e){return Object(o.b)(e)&&"fixed"!==Object(a.a)(e).position?e.offsetParent:null}function u(e){for(var t=Object(r.a)(e),n=c(e);n&&s(n)&&"static"===Object(a.a)(n).position;)n=c(n);return n&&("html"===Object(i.a)(n)||"body"===Object(i.a)(n)&&"static"===Object(a.a)(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Object(o.b)(e)&&"fixed"===Object(a.a)(e).position)return null;for(var n=Object(l.a)(e);Object(o.b)(n)&&["html","body"].indexOf(Object(i.a)(n))<0;){var r=Object(a.a)(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}},function(e,t,n){"use strict";function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=1,n=Object(r.default)(e),a=n.getUTCDay(),o=(a<t?7:0)+a-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}},function(e,t,n){var r;!function(i,a,o){"use strict";function s(e){var t=null;if("VIDEO"===e.tagName)t=e;else{var n=e.getElementsByTagName("video");n[0]&&(t=n[0])}return t}function l(e){var t=s(e);if(t&&t.webkitEnterFullscreen){try{t.readyState<t.HAVE_METADATA?(t.addEventListener("loadedmetadata",(function e(){t.removeEventListener("loadedmetadata",e,!1),t.webkitEnterFullscreen(),p=!!t.getAttribute("controls")}),!1),t.load()):(t.webkitEnterFullscreen(),p=!!t.getAttribute("controls")),f=t}catch(t){return A("not_supported",e)}return!0}return A(void 0===h.request?"not_supported":"not_enabled",e)}function c(){_.element||(y(),u())}function u(){o&&"webkitfullscreenchange"===h.change&&window.removeEventListener("resize",c,!1)}var d=/i(Pad|Phone|Pod)/.test(navigator.userAgent)&&parseInt(navigator.userAgent.replace(/^.*OS (\d+)_(\d+).*$/,"$1.$2"),10)>=7,h=function(){var e=a.createElement("video"),t={request:["requestFullscreen","webkitRequestFullscreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"],exit:["exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],enabled:["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],element:["fullscreenElement","webkitFullscreenElement","webkitCurrentFullScreenElement","mozFullScreenElement","msFullscreenElement"],change:["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],error:["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"]},n={};for(var r in t)for(var i=0,o=t[r].length;o>i;i++)if(t[r][i]in e||t[r][i]in a||"on"+t[r][i].toLowerCase()in a){n[r]=t[r][i];break}return n}(),f=null,p=null,m=function(){},g=[],v=!1;navigator.userAgent.indexOf("Android")>-1&&navigator.userAgent.indexOf("Chrome")>-1&&(v=parseInt(navigator.userAgent.replace(/^.*Chrome\/(\d+).*$/,"$1"),10)||!0);var b=function(e){var t=g[g.length-1];t&&(e!==t.element&&e!==f||!t.hasEntered)&&("VIDEO"===e.tagName&&(f=e),1===g.length&&_.onenter(_.element),t.enter.call(t.element,e||t.element),t.hasEntered=!0)},y=function(){!f||p||d||(f.setAttribute("controls","controls"),f.removeAttribute("controls")),f=null,p=null;var e=g.pop();e&&(e.exit.call(e.element),_.element||(g.forEach((function(e){e.exit.call(e.element)})),g=[],_.onexit()))},A=function(e,t){if(g.length>0){var n=g.pop();t=t||n.element,n.error.call(t,e),_.onerror(t,e)}},_={request:function(e,t,n,r){if(e=e||a.body,g.push({element:e,enter:t||m,exit:n||m,error:r||m}),void 0!==h.request)if(o&&!1===a[h.enabled])l(e);else if(!1!==v&&32>v)l(e);else{if(o&&void 0===h.enabled)return h.enabled="webkitFullscreenEnabled",e[h.request](),void setTimeout((function(){a[h.element]?a[h.enabled]=!0:(a[h.enabled]=!1,l(e))}),250);try{e[h.request](),setTimeout((function(){a[h.element]||A(o?"not_enabled":"not_allowed",e)}),100)}catch(t){A("not_enabled",e)}}else l(e)},exit:function(){u(),a[h.exit]()},toggle:function(e,t,n,r){_.element?_.exit():_.request(e,t,n,r)},videoEnabled:function(e){if(_.enabled)return!0;var t=s(e=e||a.body);return!(!t||void 0===t.webkitSupportsFullscreen)&&(t.readyState<t.HAVE_METADATA?"maybe":t.webkitSupportsFullscreen)},onenter:m,onexit:m,onchange:m,onerror:m};try{Object.defineProperties(_,{element:{enumerable:!0,get:function(){return f&&f.webkitDisplayingFullscreen?f:a[h.element]||null}},enabled:{enumerable:!0,get:function(){return"webkitCancelFullScreen"===h.exit&&!o||!(!1!==v&&32>v)&&(a[h.enabled]||!1)}}}),h.change&&a.addEventListener(h.change,(function(e){if(_.onchange(_.element),_.element){var t=g[g.length-2];t&&t.element===_.element?y():(b(_.element),o&&"webkitfullscreenchange"===h.change&&window.addEventListener("resize",c,!1))}else y()}),!1),a.addEventListener("webkitbeginfullscreen",(function(e){var t=!0;if(g.length>0)for(var n=0,r=g.length;r>n;n++){if(s(g[n].element)===e.srcElement){t=!1;break}}t&&g.push({element:e.srcElement,enter:m,exit:m,error:m}),_.onchange(e.srcElement),b(e.srcElement)}),!0),a.addEventListener("webkitendfullscreen",(function(e){_.onchange(e.srcElement),y(e.srcElement)}),!0),h.error&&a.addEventListener(h.error,(function(e){A("not_allowed")}),!1)}catch(e){_.element=null,_.enabled=!1}void 0===(r=function(){return _}.call(t,n,t,e))||(e.exports=r)}(0,document,self!==top)},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",confirmationDialog:"confirmationDialog--2_zr2",modalBody:"modalBody--1RWiD",priceLabel:"priceLabel--3dvAt"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",avatarWrapper:"avatarWrapper--1Ng4b",uploadAvatar:"uploadAvatar--2TKKJ",userAvatarImage:"userAvatarImage--3oAwQ",userDropdownMenu:"userDropdownMenu--1ugfs",menuWrapper:"menuWrapper--2hi06",userInfoRow:"userInfoRow--1Ycc_",storageRow:"storageRow--PUsRS",uploadAvatarInput:"uploadAvatarInput--1rX-R",userNotLoggedYet:"userNotLoggedYet--2iN_-",userName:"userName--22vD_",userBtn:"userBtn--vHWWQ",bottomButton:"bottomButton--2R69h",loginBtn:"loginBtn--D58rH",notif:"notif--hPwK-",notif2:"notif2--2EZtD"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s}));var r=["D","DD"],i=["YY","YYYY"];function a(e){return-1!==r.indexOf(e)}function o(e){return-1!==i.indexOf(e)}function s(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return f})),n.d(t,"d",(function(){return p}));var r=n(87),i=n(85),a=(n(6),n(0)),o=n.n(a),s=n(79),l=n.n(s),c=!1,u=o.a.createContext(null),d="exited",h="entering",f="entered",p="exiting",m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(i=d,r.appearStatus=h):i=f:i=t.unmountOnExit||t.mountOnEnter?"unmounted":d,r.state={status:i},r.nextCallback=null,r}Object(i.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:d}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==f&&(t=h):n!==h&&n!==f||(t=p)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===h?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===d&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[l.a.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||c?this.safeSetState({status:f},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,o),this.safeSetState({status:h},(function(){t.props.onEntering(a,o),t.onTransitionEnd(u,(function(){t.safeSetState({status:f},(function(){t.props.onEntered(a,o)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:l.a.findDOMNode(this);t&&!c?(this.props.onExit(r),this.safeSetState({status:p},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:d},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:d},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:l.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return(o.a.createElement(u.Provider,{value:null},"function"==typeof n?n(e,i):o.a.cloneElement(o.a.Children.only(n),i)))},t}(o.a.Component);function g(){}m.contextType=u,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},m.UNMOUNTED="unmounted",m.EXITED=d,m.ENTERING=h,m.ENTERED=f,m.EXITING=p;t.e=m},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",sharedPeopleWrap:"sharedPeopleWrap--3HJFa",header:"header--3JhBb",headerClose:"headerClose--15wS4",itemWrap:"itemWrap--NiKfa",avatar:"avatar--2uya7",groupIconWrap:"groupIconWrap--1Z117",seperator:"seperator--O9MXZ",sharedPeopleActive:"sharedPeopleActive--2KuxQ",spinnerWrapper:"spinnerWrapper--1Z_-a"}},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.isRotate=t.isRenderMode=t.isRef=t.isPdf=t.isPageNumber=t.isPageIndex=t.isPage=t.isLinkTarget=t.isLinkService=t.isFile=t.isClassName=t.eventProps=void 0;var i,a=r(n(186)),o=r(n(24)),s=r(n(6)),l=n(372),c=n(185),u=r(n(913)),d=(i={},[].concat((0,o.default)(l.mouseEvents),(0,o.default)(l.touchEvents),(0,o.default)(l.keyboardEvents)).forEach((function(e){i[e]=s.default.func})),i);t.eventProps=d;var h=[s.default.string,s.default.instanceOf(ArrayBuffer),s.default.shape({data:s.default.object,httpHeaders:s.default.object,range:s.default.object,url:s.default.string,withCredentials:s.default.bool})];"undefined"!=typeof File&&h.push(s.default.instanceOf(File)),"undefined"!=typeof Blob&&h.push(s.default.instanceOf(Blob));var f=s.default.oneOfType([s.default.string,s.default.arrayOf(s.default.string)]);t.isClassName=f;var p=s.default.oneOfType(h);t.isFile=p;var m=s.default.instanceOf(u.default);t.isLinkService=m;var g=s.default.oneOf(["_self","_blank","_parent","_top"]);t.isLinkTarget=g;var v=s.default.shape({_transport:s.default.shape({fontLoader:s.default.object.isRequired}).isRequired,commonObjs:s.default.shape({_objs:s.default.object.isRequired}).isRequired,getAnnotations:s.default.func.isRequired,getTextContent:s.default.func.isRequired,getViewport:s.default.func.isRequired,render:s.default.func.isRequired});t.isPage=v;t.isPageIndex=function(e,t,n){var r=e[t],i=e.pageNumber,o=e.pdf;if(!(0,c.isDefined)(o))return null;if((0,c.isDefined)(r)){if("number"!=typeof r)return new Error("`".concat(t,"` of type `").concat((0,a.default)(r),"` supplied to `").concat(n,"`, expected `number`."));if(r<0)return new Error("Expected `".concat(t,"` to be greater or equal to 0."));var s=o.numPages;if(r+1>s)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(s-1,"."))}else if(!(0,c.isDefined)(i))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(n,"`."));return null};t.isPageNumber=function(e,t,n){var r=e[t],i=e.pageIndex,o=e.pdf;if(!(0,c.isDefined)(o))return null;if((0,c.isDefined)(r)){if("number"!=typeof r)return new Error("`".concat(t,"` of type `").concat((0,a.default)(r),"` supplied to `").concat(n,"`, expected `number`."));if(r<1)return new Error("Expected `".concat(t,"` to be greater or equal to 1."));var s=o.numPages;if(r>s)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(s,"."))}else if(!(0,c.isDefined)(i))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(n,"`."));return null};var b=s.default.oneOfType([s.default.shape({getDestination:s.default.func.isRequired,getOutline:s.default.func.isRequired,getPage:s.default.func.isRequired,numPages:s.default.number.isRequired}),s.default.bool]);t.isPdf=b;var y=s.default.oneOfType([s.default.func,s.default.shape({current:s.default.any})]);t.isRef=y;var A=s.default.oneOf(["canvas","none","svg"]);t.isRenderMode=A;var _=s.default.oneOf([0,90,180,270]);t.isRotate=_},function(e,t,n){"use strict";e.exports=function(e){return-2===e||-1===e||32===e}},function(e,t,n){"use strict";var r=n(1703);e.exports=function(e){return"symbol"==typeof e?"Symbol":r(e)}},function(e,t,n){"use strict";class r{constructor(e){const t={},n=this._getOverriddenMethods(this,t);for(const r of Object.keys(n))"function"==typeof n[r]&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}}r.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let n=0;n<e.__mixins.length;n++)if(e.__mixins[n].constructor===t)return e.__mixins[n];const r=new t(e,n);return e.__mixins.push(r),r},e.exports=r},function(e,t,n){var r=n(1232),i=n(1233),a=i;a.v1=r,a.v4=i,e.exports=a},function(e,t,n){"use strict";(function(e){var r=n(114),i=n(1037),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.a.Buffer:void 0,l=(s?s.isBuffer:void 0)||i.a;t.a=l}).call(this,n(345)(e))},function(e,t,n){"use strict";(function(e){var r=n(416),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.a.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();t.a=s}).call(this,n(345)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=Function.prototype.bind.call(Function.prototype.call,[].slice);function i(e,t){return r(e.querySelectorAll(t))}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",modalWrapper:"modalWrapper--xTEGy",formTitle:"formTitle--3AB3Q",modalBody:"modalBody--2osZP",label:"label--R-2vS",footer:"footer--1ZXYE",footerBtn:"footerBtn--8LfL6"}},function(e,t,n){e.exports=!n(303)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(181),i=n(198),a=n(266),o=n(228),s=n(232),l=function(e,t,n){var c,u,d,h,f=e&l.F,p=e&l.G,m=e&l.S,g=e&l.P,v=e&l.B,b=p?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,y=p?i:i[t]||(i[t]={}),A=y.prototype||(y.prototype={});for(c in p&&(n=t),n)d=((u=!f&&b&&void 0!==b[c])?b:n)[c],h=v&&u?s(d,r):g&&"function"==typeof d?s(Function.call,d):d,b&&o(b,c,d,e&l.U),y[c]!=d&&a(y,c,h),g&&A[c]!=d&&(A[c]=d)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e[e.OFF=4]="OFF"}(r=t.LogLevel||(t.LogLevel={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e){this.intervalMs=e}start(e){this.stop(),this.timer=setInterval(e,this.intervalMs)}stop(){void 0!==this.timer&&(clearInterval(this.timer),this.timer=void 0)}running(){return void 0!==this.timer}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(157),i=n(1365);class a{static get sdkName(){return"amazon-chime-sdk-js"}static get sdkVersion(){return i.default.semverString}static get buildSHA(){return i.default.hash.substr(1)}static get sdkUserAgentLowResolution(){const e=new r.default;return`${e.name()}-${e.majorVersion()}`}static urlWithVersion(e){const t=new URL(e);return t.searchParams.append(a.X_AMZN_VERSION,a.sdkVersion),t.searchParams.append(a.X_AMZN_USER_AGENT,a.sdkUserAgentLowResolution),t.toString()}}t.default=a,a.X_AMZN_VERSION="X-Amzn-Version",a.X_AMZN_USER_AGENT="X-Amzn-User-Agent"},function(e,t,n){"use strict";var r=n(1462);e.exports=function(e,t,n,i){var a,o=e.length,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,i.length<1e4)(a=Array.from(i)).unshift(t,n),r.apply(e,a);else for(n&&r.apply(e,[t,n]);s<i.length;)(a=i.slice(s,s+1e4)).unshift(t,0),r.apply(e,a),s+=1e4,t+=1e4}},function(e,t,n){"use strict";e.exports=function(e){return e<0||32===e}},function(e,t,n){"use strict";var r=n(373);e.exports=function(e){return function(t){return e.test(r(t))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return a})),n.d(t,"__rest",(function(){return o})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return l})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return u})),n.d(t,"__generator",(function(){return d})),n.d(t,"__createBinding",(function(){return h})),n.d(t,"__exportStar",(function(){return f})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return m})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return v})),n.d(t,"__spreadArray",(function(){return b})),n.d(t,"__await",(function(){return y})),n.d(t,"__asyncGenerator",(function(){return A})),n.d(t,"__asyncDelegator",(function(){return _})),n.d(t,"__asyncValues",(function(){return w})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return C})),n.d(t,"__importDefault",(function(){return T})),n.d(t,"__classPrivateFieldGet",(function(){return k})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var h=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function f(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||h(t,e,n)}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function b(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function A(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof y?Promise.resolve(n.value.v).then(l,c):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&h(t,e,n);return S(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function k(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function x(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}},function(e,t,n){"use strict";e.exports=n(1064)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(136),i=n(138),a=n(90);function o(e){return"html"===Object(r.a)(e)?e:e.assignedSlot||e.parentNode||(Object(a.c)(e)?e.host:null)||Object(i.a)(e)}},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(0),o=n.n(a),s=n(221),l=["as","disabled","onKeyDown"];function c(e){return!e||"#"===e.trim()}var u=o.a.forwardRef((function(e,t){var n=e.as,a=void 0===n?"a":n,u=e.disabled,d=e.onKeyDown,h=Object(i.a)(e,l),f=function(e){var t=h.href,n=h.onClick;(u||c(t))&&e.preventDefault(),u?e.stopPropagation():n&&n(e)};return c(h.href)&&(h.role=h.role||"button",h.href=h.href||"#"),u&&(h.tabIndex=-1,h["aria-disabled"]=!0),o.a.createElement(a,Object(r.a)({ref:t},h,{onClick:f,onKeyDown:Object(s.a)((function(e){" "===e.key&&(e.preventDefault(),f(e))}),d)}))}));u.displayName="SafeAnchor",t.a=u},function(e,n,r){"use strict";r.d(n,"c",(function(){return er})),r.d(n,"b",(function(){return lr})),r.d(n,"a",(function(){return Sa}));var i=r(40),a=r.n(i),o=r(24),s=r.n(o),l=r(2),c=r.n(l),u=r(9),d=r.n(u),h=r(11),f=r(1),p=r(7),m=r(21),g=r.n(m),v=(r(553),r(5)),b=r(26),y=r(18),A=r(8);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=d.a.mark(Nn),S=d.a.mark(Ln),C=d.a.mark(Rn),T=d.a.mark(Bn),k=d.a.mark(jn),x=d.a.mark(Fn),O=d.a.mark(Un),I=d.a.mark(Hn),M=d.a.mark(zn),P=d.a.mark(Vn),D=d.a.mark(Wn),N=d.a.mark(Gn),L=d.a.mark(qn),R=d.a.mark(Yn),B=d.a.mark(Kn),j=d.a.mark(Xn),F=d.a.mark(Qn),U=d.a.mark($n),H=d.a.mark(Jn),z=d.a.mark(Zn),V=d.a.mark(er),W=d.a.mark(tr),G=d.a.mark(nr),q=d.a.mark(rr),Y=d.a.mark(ir),K=d.a.mark(ar),X=d.a.mark(or),Q=d.a.mark(sr),$=d.a.mark(lr),J=d.a.mark(cr),Z=d.a.mark(ur),ee=d.a.mark(dr),te=d.a.mark(hr),ne=d.a.mark(fr),re=d.a.mark(pr),ie=d.a.mark(mr),ae=d.a.mark(gr),oe=d.a.mark(vr),se=d.a.mark(br),le=d.a.mark(yr),ce=d.a.mark(Ar),ue=d.a.mark(_r),de=d.a.mark(wr),he=d.a.mark(Er),fe=d.a.mark(Sr),pe=d.a.mark(Cr),me=d.a.mark(Tr),ge=d.a.mark(kr),ve=d.a.mark(xr),be=d.a.mark(Or),ye=d.a.mark(Ir),Ae=d.a.mark(Mr),_e=d.a.mark(Pr),we=d.a.mark(Dr),Ee=d.a.mark(Nr),Se=d.a.mark(Lr),Ce=d.a.mark(Rr),Te=d.a.mark(Br),ke=d.a.mark(jr),xe=d.a.mark(Fr),Oe=d.a.mark(Ur),Ie=d.a.mark(Hr),Me=d.a.mark(zr),Pe=d.a.mark(Vr),De=d.a.mark(Wr),Ne=d.a.mark(Gr),Le=d.a.mark(qr),Re=d.a.mark(Yr),Be=d.a.mark(Kr),je=d.a.mark(Xr),Fe=d.a.mark(Qr),Ue=d.a.mark($r),He=d.a.mark(Jr),ze=d.a.mark(Zr),Ve=d.a.mark(ei),We=d.a.mark(ti),Ge=d.a.mark(ni),qe=d.a.mark(ri),Ye=d.a.mark(ii),Ke=d.a.mark(ai),Xe=d.a.mark(oi),Qe=d.a.mark(si),$e=d.a.mark(li),Je=d.a.mark(ci),Ze=d.a.mark(ui),et=d.a.mark(di),tt=d.a.mark(hi),nt=d.a.mark(fi),rt=d.a.mark(pi),it=d.a.mark(mi),at=d.a.mark(gi),ot=d.a.mark(vi),st=d.a.mark(bi),lt=d.a.mark(yi),ct=d.a.mark(Ai),ut=d.a.mark(_i),dt=d.a.mark(wi),ht=d.a.mark(Ei),ft=d.a.mark(Si),pt=d.a.mark(Ci),mt=d.a.mark(Ti),gt=d.a.mark(ki),vt=d.a.mark(xi),bt=d.a.mark(Oi),yt=d.a.mark(Ii),At=d.a.mark(Mi),_t=d.a.mark(Pi),wt=d.a.mark(Di),Et=d.a.mark(Ni),St=d.a.mark(Li),Ct=d.a.mark(Ri),Tt=d.a.mark(Bi),kt=d.a.mark(ji),xt=d.a.mark(Fi),Ot=d.a.mark(Ui),It=d.a.mark(Hi),Mt=d.a.mark(zi),Pt=d.a.mark(Vi),Dt=d.a.mark(Wi),Nt=d.a.mark(Gi),Lt=d.a.mark(qi),Rt=d.a.mark(Yi),Bt=d.a.mark(Ki),jt=d.a.mark(Xi),Ft=d.a.mark(Qi),Ut=d.a.mark($i),Ht=d.a.mark(Ji),zt=d.a.mark(Zi),Vt=d.a.mark(ea),Wt=d.a.mark(ta),Gt=d.a.mark(na),qt=d.a.mark(ra),Yt=d.a.mark(ia),Kt=d.a.mark(aa),Xt=d.a.mark(oa),Qt=d.a.mark(sa),$t=d.a.mark(la),Jt=d.a.mark(ca),Zt=d.a.mark(ua),en=d.a.mark(da),tn=d.a.mark(ha),nn=d.a.mark(fa),rn=d.a.mark(pa),an=d.a.mark(ma),on=d.a.mark(ga),sn=d.a.mark(va),ln=d.a.mark(ba),cn=d.a.mark(ya),un=d.a.mark(Aa),dn=d.a.mark(_a),hn=d.a.mark(wa),fn=d.a.mark(Ea),pn=d.a.mark(Sa),mn=f.g.VIDEO_TYPE,gn=f.g.POSITION,vn=f.g.VIDEO_CATEGORY,bn=f.g.VIDEO_SORT_DEFAULT,yn=f.g.VIDEO_SEARCH_SCOPE,An=f.g.VIDEO_SEARCH_SORT_VALUE,_n=f.g.VIDEO_LIST_FILTER_VALUE,wn=f.g.VIDEO_BRAINHIVE_FILTER_DEFAULT,En=f.g.EXTRACT_CHAPTER_TYPE,Sn=f.g.VIDEO_CATEGORY_TYPE_TO_DISPLAY_MENU,Cn=f.g.SCOPE_CHAPTER_STATUS,Tn=f.g.WITH_CREDENTIALS,kn=f.g.SEARCH_PARAM,xn=f.g.DUMMY_DAILY_VIDEO_ID_PREFIX,On=f.g.DEFAULT_DAILY_VIDEO_DATE_RANGE,In=f.g.CHAPTER_TYPES,Mn=f.g.KEYWORD_CATEGORIES,Pn=f.g.SB_CONTENT_MODE,Dn=f.g.DEFAULT_LIST;function Nn(e){var t;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,y.e.get("videos/myvideos",{params:{size:f.g.MY_COGVID_PAGE_SIZE,page:e.data.page||0,sort:f.g.MY_COGNITIVE_LIST_SORT}});case 3:return t=n.sent,n.next=6,Object(h.h)({type:v.e.GET_MY_COGVID_LIST_SUCCESS,data:t,isRefresh:e.data.isRefresh});case 6:e.resolve&&e.resolve(),n.next=13;break;case 9:return n.prev=9,n.t0=n.catch(0),n.next=13,f.e.error(n.t0);case 13:case"end":return n.stop()}}),E,null,[[0,9]])}function Ln(e){var t,n,r,i,a,o,s,l,c,u,m,A,_,w,E,C,T,k,x,O,I,M,P,D,N,L,R,B,j,F,U,H,z,V,W,G,q,Y,K,X,Q;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=e.data,n=e.resolve,r=f.c.getCurrentVideoCategory(!0),i=f.c.getDataFromUrl(),a=i.withOwnerContext,o=i.pkg,s=i.agt,(o||s)&&(f.c.removeURLSearchParams(["pkg","agt"],!0,!1,{noAction:!0}),f.c.setPkgAgtParams({pckg:o,agent:s})),l=f.c.getPkgAgtParams(),c=l.pkg,u=l.agt,m=t.videoCategory,A=void 0===m?r:m,_=t.videoId,w=t.searchTerm,E=t.sort,C=void 0===E?bn:E,T=t.withCourse,k=t.filter,x=void 0===k?wn:k,O=t.pageSize,I=void 0===O?f.g.WORKER_FETCH_MORE?f.g.DEFAULT_PAGE_SIZE:f.g.DEFAULT_MAX_SC_LOADED:O,M=t.searchDate,P=t.dummyVideoId,D=t.level,N=t.expanded,L=t.learningSubject,r===vn.REVIEW?An.REVIEW_MOST_RECENT:An[C],R=_n[x],!(B=r===vn.HOME)){d.next=24;break}if(j=Object(p.get)(b.a.getState(),"cogvid.dailyVideoTemplate",{}),!Object(p.isEmpty)(j)){d.next=24;break}return d.prev=12,d.next=15,y.e.get("videos/template/dailyIRLVideo");case 15:return F=d.sent,d.next=18,Object(h.h)({type:v.e.UPDATE_STATE,data:{dailyVideoTemplate:F}});case 18:d.next=24;break;case 20:return d.prev=20,d.t0=d.catch(12),d.next=24,f.e.error(d.t0);case 24:return d.prev=24,P&&((M=new Date(P.substring(xn.length))).setDate(M.getDate()+Math.ceil(f.g.DEFAULT_DAILY_VIDEO_DATE_RANGE)/2),M=g()(M).format(f.g.DAILY_VIDEO_DATE_FORMAT)),d.next=28,y.e.post("videos/".concat(B?"irlvideos":"recommendation"),{videoId:_,searchTerm:w,pageNumber:0,pageSize:I,searchScope:yn[A.toUpperCase()],withCourse:T,subScope:R,searchDate:_?void 0:M,level:D,withOwnerContext:!!a||void 0,pkg:c,agt:u,expanded:N,referer:document.referrer,learningSubject:"UNDEFINED"===L?void 0:L},{withCredentials:Tn});case 28:if(U=d.sent,A===f.c.getCurrentVideoCategory(!0)){d.next=31;break}return d.abrupt("return");case 31:return H=U.size,z=U.totalElements,V=U.level,W=U.content||[],G=!(B&&!w)&&U.last,q=f.c.buildVideoList(W),B&&!w&&(_&&!P&&(K=q.find((function(e){return e.uid===_})))&&(Y=null===(X=K.cognitiveVideo)||void 0===X?void 0:X.createdDate),q=f.c.insertDummyDailyVideos(q,Y||M,!!Y)),Q={videoList:q,sort:C,filter:x,last:G,currentPage:0,totalElements:z,pageSize:H,level:V,videoId:_},d.next=39,Object(h.h)({type:v.e.UPDATE_COGVID_LIST,data:Q,isLoading:!1,currentActiveLv:V});case 39:n&&n({videoList:q,last:G,currentPage:0,totalElements:z,pageSize:H,level:V}),d.next=46;break;case 42:return d.prev=42,d.t1=d.catch(24),d.next=46,f.e.error(d.t1);case 46:case"end":return d.stop()}}),S,null,[[12,20],[24,42]])}function Rn(e){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.data;case 2:case"end":return t.stop()}}),C)}function Bn(e){var t,n,r,i,a,o,s,l,c,u,m,_,w,E,S,C,k,x,O,I,M,P,D,N,L,R,B,j,F,U,H,z,V,W,G,q,Y,K,X,Q,$;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=f.c.getCurrentVideoCategory(!0),a=f.c.getPkgAgtParams(),o=a.pkg,s=a.agt,d.prev=3,l=t.videoCategory,c=void 0===l?i:l,u=t.videoId,m=t.searchTerm,_=t.sort,w=void 0===_?bn:_,E=t.filter,S=void 0===E?wn:E,C=t.noUpdateData,k=t.featureVideos,x=t.isLoadingVideosOnTop,O=t.learningSubject,I=i===vn.REVIEW?An.REVIEW_MOST_RECENT:An[w],M=Object(p.isNumber)(t.currentPage)?t.currentPage:Object(p.get)(b.a.getState(),"cogvid.cogvidListLv[".concat(Dn,"].currentPage")),P=_n[S],D=Object(p.isNumber)(t.pageSize)?t.pageSize:Object(p.get)(b.a.getState(),"cogvid.cogvidListLv[".concat(Dn,"].pageSize"))||On,d.next=11,Object(h.h)({type:v.e.MERGE_COGVID_LIST,data:{isLoadingMore:!0,loadingCogvidItems:f.c.generateLoadingCogvidItems(D),insertTop:x}});case 11:if((N=i===vn.HOME)&&!m&&(R=Object(p.get)(b.a.getState(),"cogvid.cogvidListLv[".concat(Dn,"].videoList"),[]),x?((L=new Date(null===(B=R[0])||void 0===B?void 0:null===(j=B.cognitiveVideo)||void 0===j?void 0:j.createdDate)).setDate(L.getDate()+Math.ceil(f.g.DEFAULT_DAILY_VIDEO_DATE_RANGE)),L=g()(L).format(f.g.DAILY_VIDEO_DATE_FORMAT)):L=g()(R[R.length-1].cognitiveVideo.createdDate).add(-1,"days").format(f.g.DAILY_VIDEO_DATE_FORMAT)),!f.g.WORKER_FETCH_MORE||!window.videoListWorker){d.next=21;break}F=f.g.COGVID_SERVICES_ENDPOINT,U="".concat(F,"videos/").concat(N?"irlvideos":"recommendation"),H={videoId:N?void 0:u,searchTerm:m,pageNumber:M+1,pageSize:D,searchScope:yn[c.toUpperCase()],sort:I,subScope:P,featureVideos:k,searchDate:L,pkg:o,agt:s,learningSubject:"UNDEFINED"===O?void 0:O},window.videoListWorker.onmessage=function(e){var t={response:e.data,isFetchingDailyVideos:N,searchTerm:m,isLoadingVideosOnTop:x,noUpdateData:C,searchDate:L};b.a.dispatch(A.e.mergeFetchedVideos(t,n,r))};try{z=f.c.getToken()||{},V=z.accessToken,window.videoListWorker.postMessage({accessToken:V,endPoint:U,category:c,body:H})}catch(e){console.log(e)}d.next=37;break;case 21:return d.next=23,y.e.post("videos/".concat(N?"irlvideos":"recommendation"),{videoId:N?void 0:u,searchTerm:m,pageNumber:M+1,pageSize:D,searchScope:yn[c.toUpperCase()],sort:I,subScope:P,featureVideos:k,searchDate:L,pkg:o,agt:s,learningSubject:"UNDEFINED"===O?void 0:O},{withCredentials:Tn});case 23:if(W=d.sent,c===f.c.getCurrentVideoCategory(!0)){d.next=26;break}return d.abrupt("return");case 26:if(G=W.last,q=W.number,Y=W.totalElements,K=W.size,X=W.content,Q=W.level,$=f.c.buildVideoList(X),N&&!m&&($=f.c.insertDummyDailyVideos($,L),G=!1),!C){d.next=34;break}return d.next=32,Object(h.h)({type:v.e.MERGE_COGVID_LIST,data:{isLoadingMore:!1,loadingCogvidItems:[]}});case 32:d.next=36;break;case 34:return d.next=36,Object(h.h)({type:v.e.MERGE_COGVID_LIST,data:{isLoadingMore:!1,newCogvidItems:$,loadingCogvidItems:[],currentPage:q,last:G,totalElements:Y,insertTop:x}});case 36:n&&n({videoList:$,last:G,currentPage:q,totalElements:Y,pageSize:K,level:Q});case 37:d.next=46;break;case 39:return d.prev=39,d.t0=d.catch(3),d.next=43,Object(h.h)({type:v.e.MERGE_COGVID_LIST,data:{isLoadingMore:!1,loadingCogvidItems:[]}});case 43:return d.next=45,f.e.error(d.t0);case 45:r&&r(d.t0);case 46:case"end":return d.stop()}}),T,null,[[3,39]])}function jn(e){var t,n,r,i,a,o,s,l,c,u,p,m,g,b,y,A;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=e.data,n=e.resolve,e.reject,r=t.response,i=t.isFetchingDailyVideos,a=t.searchTerm,o=t.isLoadingVideosOnTop,s=t.noUpdateData,l=r.category,c=r.data,u=c.last,p=c.number,m=c.totalElements,g=c.size,b=c.content,y=c.level,l===f.c.getCurrentVideoCategory(!0)){d.next=6;break}return d.abrupt("return");case 6:if(A=f.c.buildVideoList(b),i&&!a&&(A=f.c.insertDummyDailyVideos(A,searchDate),u=!1),!s){d.next=13;break}return d.next=11,Object(h.h)({type:v.e.MERGE_COGVID_LIST,data:{isLoadingMore:!1,loadingCogvidItems:[]}});case 11:d.next=15;break;case 13:return d.next=15,Object(h.h)({type:v.e.MERGE_COGVID_LIST,data:{isLoadingMore:!1,newCogvidItems:A,loadingCogvidItems:[],currentPage:p,last:u,totalElements:m,insertTop:o}});case 15:n&&n({videoList:A,last:u,currentPage:p,totalElements:m,pageSize:g,level:y});case 16:case"end":return d.stop()}}),k)}function Fn(e){var t,n;return d.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data.videoId,r.prev=1,r.next=4,y.e.get("videos/".concat(t,"/author"));case 4:return n=r.sent,r.next=7,Object(h.h)({type:v.e.GET_AUTHOR_PROFILE_SUCCESS,data:n});case 7:e.resolve&&e.resolve(),r.next=14;break;case 10:return r.prev=10,r.t0=r.catch(1),r.next=14,f.e.error(r.t0);case 14:case"end":return r.stop()}}),x,null,[[1,10]])}function Un(e){var t,n;return d.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data.videoId,r.prev=1,r.next=4,y.e.get("videos/".concat(t,"/highlights"));case 4:return n=r.sent,r.next=7,Object(h.h)({type:v.e.HIGHLIGHTS_GET_SUCCESS,data:n,videoId:t});case 7:e.resolve&&e.resolve(),r.next=14;break;case 10:return r.prev=10,r.t0=r.catch(1),r.next=14,f.e.error(r.t0);case 14:case"end":return r.stop()}}),O,null,[[1,10]])}function Hn(e){var t;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.data.videoId,n.prev=1,n.next=4,y.e.post("videos/".concat(t,"/highlights"),e.data);case 4:return n.next=6,Object(h.a)([Un({data:{videoId:t}})]);case 6:e.resolve&&e.resolve(),n.next=13;break;case 9:return n.prev=9,n.t0=n.catch(1),n.next=13,f.e.error(n.t0);case 13:case"end":return n.stop()}}),I,null,[[1,9]])}function zn(e){var t;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.data.videoId,n.prev=1,n.next=4,y.e.delete("videos/".concat(t,"/highlights"),{params:w({},e.data)});case 4:return n.next=6,Object(h.a)([Un({data:{videoId:t}})]);case 6:e.resolve&&e.resolve(),n.next=13;break;case 9:return n.prev=9,n.t0=n.catch(1),n.next=13,f.e.error(n.t0);case 13:case"end":return n.stop()}}),M,null,[[1,9]])}function Vn(e){var t,n,r;return d.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=t.videoId,r=t.isDeleteOldActiveHighlight,i.prev=1,i.next=4,r&&y.e.delete("videos/".concat(n,"/highlights"),{params:w({},e.data)});case 4:return i.next=6,Object(h.a)([Hn({data:e.data})]);case 6:e.resolve&&e.resolve(),i.next=13;break;case 9:return i.prev=9,i.t0=i.catch(1),i.next=13,f.e.error(i.t0);case 13:case"end":return i.stop()}}),P,null,[[1,9]])}function Wn(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=e.data,n=t.videoData,r=n.uid,n.chapters,i=n.cognitiveVideo,a=(i=void 0===i?{}:i).avatar,void 0===a?"":a,i.owner,o=i.version,void 0===o?1:o,s=t.canFetchRawVideos,t.ownerScaffId,t.scope,r){l.next=5;break}return l.abrupt("return");case 5:return l.next=7,Object(h.a)([s&&jr({data:{videoId:r,isActiveVideo:!0}})]);case 7:e.resolve&&e.resolve();case 8:case"end":return l.stop()}}),D)}function Gn(e){var t,n;return d.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.data.videoId,r.prev=1,r.next=4,y.e.get("videos/".concat(t,"/state"));case 4:n=r.sent,e.resolve&&e.resolve(n),r.next=11;break;case 8:r.prev=8,r.t0=r.catch(1),e.reject&&e.reject(r.t0);case 11:case"end":return r.stop()}}),N,null,[[1,8]])}function qn(e){var t,n,r,i;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.data,n=t.videoUid,r=t.timestamp,i=t.content,a.prev=1,a.next=4,y.e.put("videos/".concat(n,"/semantics/").concat(r),{content:i});case 4:return a.next=6,Object(h.h)({type:v.e.UPDATE_SB_CONTENT_SUCCESS,data:{videoId:n,content:i,timestamp:r}});case 6:e.resolve&&e.resolve(),a.next=16;break;case 9:return a.prev=9,a.t0=a.catch(1),a.next=13,Object(h.h)({type:v.e.UPDATE_SB_CONTENT_FAILURE});case 13:return a.next=15,f.e.error(a.t0);case 15:e.reject&&e.reject();case 16:case"end":return a.stop()}}),L,null,[[1,9]])}function Yn(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=e.data,n=e.data.uid,r=t.videoId||t.videoUid,i=r.includes(xn),l.prev=3,!i){l.next=9;break}return l.next=7,lr();case 7:a=l.sent,r=a.videoId;case 9:return l.next=11,y.e.put("videos/".concat(r,"/chapters/").concat(n),t);case 11:return o=l.sent,l.next=15,Object(h.a)([jr({data:{videoId:r,isActiveVideo:!0}})]);case 15:return l.next=17,f.c.convertChapterPermission(o);case 17:return s=l.sent,l.next=20,Object(h.h)({type:v.e.GET_CG_SUCCESS,data:s,videoId:r});case 20:e.resolve&&e.resolve(),l.next=28;break;case 23:return l.prev=23,l.t0=l.catch(3),l.next=27,f.e.error(l.t0);case 27:e.reject&&e.reject();case 28:case"end":return l.stop()}}),R,null,[[3,23]])}function Kn(e){var t,n,r,i;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.data,n=t.videoId,r=t.chapterId,i=t.accessible,a.prev=1,a.next=4,y.e.patch("videos/".concat(n,"/chapters/").concat(r),{accessible:i});case 4:return a.next=6,Object(h.a)([er({data:{videoId:n}})]);case 6:e.resolve&&e.resolve(),a.next=14;break;case 9:return a.prev=9,a.t0=a.catch(1),a.next=13,f.e.error(a.t0);case 13:e.reject&&e.reject();case 14:case"end":return a.stop()}}),B,null,[[1,9]])}function Xn(e){var t,n,r,i;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.data,n=t.videoId,r=t.chapterId,i=t.freeFUI,a.prev=1,a.next=4,y.e.put("videos/".concat(n,"/chapters/").concat(r,"/FUI"),{freeFUI:i});case 4:return a.next=6,Object(h.a)([er({data:{videoId:n}})]);case 6:e.resolve&&e.resolve(),a.next=14;break;case 9:return a.prev=9,a.t0=a.catch(1),a.next=13,f.e.error(a.t0);case 13:e.reject&&e.reject();case 14:case"end":return a.stop()}}),j,null,[[1,9]])}function Qn(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=(t=void 0===t?{}:t).videoId,t.chapterId,r=t.dropIndex,i=t.dragIndex,a=n.includes(xn),s.prev=4,s.next=7,Object(h.h)({type:v.e.COMPREHENSION_GUIDE_UPDATING,data:!0});case 7:if(!a){s.next=12;break}return s.next=10,lr({data:{reloadCg:!1}});case 10:o=s.sent,n=o.videoId;case 12:return s.next=14,y.e.put("videos/".concat(n,"/chapters/").concat(i,"/reorder"),{seqNumber:r});case 14:if(!a){s.next=21;break}return s.next=17,er({data:{videoId:n,dummyDailyVideoId:e.data.videoId}});case 17:return s.next=19,Object(h.h)({type:v.e.COMPREHENSION_GUIDE_UPDATING,data:!1});case 19:s.next=25;break;case 21:return s.next=23,Object(h.h)({type:v.e.REORDER_CHAPTER_SUCCESS,data:{videoId:n}});case 23:return s.next=25,Object(h.h)({type:v.e.COMPREHENSION_GUIDE_UPDATING,data:!1});case 25:e.resolve&&e.resolve(),s.next=35;break;case 28:return s.prev=28,s.t0=s.catch(4),s.next=32,Object(h.h)({type:v.e.COMPREHENSION_GUIDE_UPDATING,data:!1});case 32:return s.next=34,f.e.error(s.t0);case 34:e.reject&&e.reject();case 35:case"end":return s.stop()}}),F,null,[[4,28]])}function $n(e){var t,n,r,i,a,o,s,l,c;return d.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(t=e.data,n=t.uid,r=t.seqNumber,i=t.videoUid,a=i.includes(xn),u.prev=2,!a){u.next=8;break}return u.next=6,lr();case 6:o=u.sent,i=o.videoId;case 8:return s=n||r,u.next=11,y.e.delete("videos/".concat(i,"/chapters/").concat(s));case 11:return l=u.sent,u.next=14,Object(h.a)([jr({data:{videoId:i,isActiveVideo:!0}})]);case 14:return u.next=16,f.c.convertChapterPermission(l);case 16:return c=u.sent,u.next=19,Object(h.h)({type:v.e.GET_CG_SUCCESS,data:c,videoId:i});case 19:e.resolve&&e.resolve(),u.next=27;break;case 22:return u.prev=22,u.t0=u.catch(2),u.next=26,f.e.error(u.t0);case 26:e.reject&&e.reject();case 27:case"end":return u.stop()}}),U,null,[[2,22]])}function Jn(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=e.data,n=t.videoUid,r=t.userScaffId,i=n.includes(xn),l.prev=2,!i){l.next=8;break}return l.next=6,lr();case 6:a=l.sent,n=a.videoId;case 8:return l.next=10,y.e.post("videos/".concat(n,"/chapters?userScaffId=").concat(r),e.data);case 10:return o=l.sent,l.next=13,Object(h.a)([jr({data:{videoId:n,isActiveVideo:!0}})]);case 13:return l.next=15,f.c.convertChapterPermission(o);case 15:return s=l.sent,l.next=18,Object(h.h)({type:v.e.GET_CG_SUCCESS,data:s,videoId:n});case 18:e.resolve&&e.resolve(),l.next=26;break;case 21:return l.prev=21,l.t0=l.catch(2),l.next=25,f.e.error(l.t0);case 25:e.reject&&e.reject();case 26:case"end":return l.stop()}}),H,null,[[2,21]])}function Zn(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=t.videoId,r=t.chapterData,i=t.visibilityScope,a=t.selectedUserIds,s.prev=1,s.next=4,y.e.patch("videos/".concat(n,"/chapters/").concat(r.uid,"/changeVisibilityScope"),{visibilityScope:i});case 4:return o=s.sent,s.next=7,Object(h.h)({type:v.e.SET_PRIVACY_CHAPTER_SUCCESS,data:w(w({},r),{},{visibilityScope:o.visibilityScope}),videoId:n});case 7:if(i!==Cn.PROTECTED){s.next=10;break}return s.next=10,y.e.put("videos/shares/chapters/".concat(r.uid),{selectedUserIds:a});case 10:e.resolve&&e.resolve(),s.next=18;break;case 13:return s.prev=13,s.t0=s.catch(1),s.next=17,f.e.error(s.t0);case 17:e.reject&&e.reject();case 18:case"end":return s.stop()}}),z,null,[[1,13]])}function er(e){var t,n,r,i,a,o,s,l,c,u,p,m;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=t.videoId,r=t.ownerScaffId,i=t.dummyDailyVideoId,a=f.c.getScaffIdBaseOnMenu({ownerScaffId:r}),o=f.c.getCurrentVideoCategory(),s=yn[o.toUpperCase()],l=f.c.getPkgAgtParams(),c=l.pkg,u=l.agt,d.prev=5,d.next=8,y.e.get("videos/".concat(n,"/chapters"),{params:{userScaffId:a,scope:s,pkg:c,agt:u}});case 8:return p=d.sent,d.next=11,f.c.convertChapterPermission(p||[]);case 11:return m=d.sent,d.next=14,Object(h.h)({type:v.e.GET_CG_SUCCESS,data:m,videoId:n,dummyDailyVideoId:i});case 14:e.resolve&&e.resolve(m),d.next=22;break;case 17:return d.prev=17,d.t0=d.catch(5),d.next=21,f.e.error(d.t0);case 21:e.reject&&e.reject();case 22:case"end":return d.stop()}}),V,null,[[5,17]])}function tr(e){var t,n,r,i,a,o,l,c,u,m,g,A,_,E,S,C,T,k,x,O,I,M;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=e.data,n=t.videoId,r=t.timePoint,i=void 0===r?0:r,a=t.turnOffOverlay,o=t.version,l=t.ownerScaffId,c=e.data,u=c.isLoadingRemaining,m=void 0!==u&&u,g=c.radius,A=void 0===g?1e5:g,_=c.initialSemantics,E=void 0===_?[]:_,S=c.videoLength,C=c.rootContext,T=0,k=f.c.getScaffIdBaseOnMenu({ownerScaffId:l}),S||(S=Object(p.get)(b.a.getState(),"cogvid.cogvidDetails.videoLength",0)),C||(C=Object(p.get)(b.a.getState(),"cogvid.cogvidDetails.rootContext","")),d.prev=6,Object(p.isEmpty)(E)){d.next=12;break}(T=Math.ceil(S/2e3)||0)>E.length&&(m=!0,A=E.length),d.next=17;break;case 12:return d.next=14,y.e.get("videos/".concat(n,"/episodes"),{params:{v:(new Date).getTime(),timePoint:i,radius:A,userScaffId:k}});case 14:x=d.sent,T=x.count||0,E=x.resultList||[];case 17:if(O=f.c.generateLoadingSemanticBlocks(Math.ceil(S/2e3),0,o),Object(p.merge)(O,E.map((function(e){return w(w({},e),{},{isLoading:!1})}))),I=Object(p.get)(b.a.getState(),"cogvid.cogvidDetails.videoId"),n!==I){d.next=39;break}return d.next=23,Object(h.h)({type:v.e.UPDATE_SB,data:{data:O,isLoading:!0}});case 23:if(!a){d.next=26;break}return d.next=26,a();case 26:if(!m){d.next=38;break}return M=Math.ceil(T/f.g.NO_SB_EACH_FETCH),d.prev=28,d.next=31,Object(h.a)(s()(new Array(M)).map((function(e,t){var r=t*f.g.NO_SB_EACH_FETCH;return Object(h.b)(nr,r,n,k)})));case 31:return d.next=33,Object(h.h)({type:v.e.UPDATE_SB,data:{isLoading:!1}});case 33:d.next=38;break;case 35:d.prev=35,d.t0=d.catch(28),console.log(d.t0);case 38:e.resolve&&e.resolve();case 39:d.next=46;break;case 41:return d.prev=41,d.t1=d.catch(6),d.next=45,f.e.error(d.t1);case 45:e.reject&&e.reject();case 46:case"end":return d.stop()}}),W,null,[[6,41],[28,35]])}function nr(e,t,n){var r,i,a,o,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return r=f.g.NO_SB_EACH_FETCH,c.next=3,y.e.get("videos/".concat(t,"/episodes"),{params:{v:(new Date).getTime(),timePoint:2e3*e+1,radius:r,userScaffId:n}});case 3:if(i=c.sent,a=i.resultList,o=Object(p.get)(b.a.getState(),"cogvid.cogvidDetails.videoId"),t!==o){c.next=11;break}return l=Object(p.cloneDeep)(Object(p.get)(b.a.getState(),"cogvid.sbList.data",[])),Object(p.merge)(l,[].concat(s()(new Array(e)),s()(a.map((function(e){return w(w({},e),{},{isLoading:!1})}))))),c.next=11,Object(h.h)({type:v.e.UPDATE_SB,data:{data:l}});case 11:case"end":return c.stop()}}),G)}function rr(e){var t,n,r,i,a,o,s,l,c,u,m;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=t.videoId,r=t.keyword,i=f.c.getScaffIdBaseOnMenu(),d.prev=2,d.next=5,y.e.post("videos/".concat(n,"/search"),{terms:r,userScaffId:i});case 5:return a=d.sent,o=a.blocks,s=void 0===o?[]:o,l=b.a.getState(),c=Object(p.get)(l,"cogvid.cogvidDetails.chapters"),u=s.filter((function(e){return e.docClass===f.g.SEARCH_RESULT_DOC_CLASS.SEMANTIC})),m=u.map((function(e){var t=e.docClass,n=void 0===t?"":t,r=e.blockSeq,i=void 0===r?0:r,a=e.id,o=void 0===a?"":a;if(n===f.g.SEARCH_RESULT_DOC_CLASS.SEMANTIC)return{timestamp:2e3*i,docClass:n};var s=Object(p.find)(c,(function(e){var t=e.uid;return(void 0===t?"":t)===o}));return{timestamp:Object(p.get)(s,"startTime",0),docClass:n,id:o}})),d.next=13,Object(h.h)({type:v.e.SEARCH_WITHIN_VIDEO_SUCCESS,data:{searchResults:m,keyword:r}});case 13:e.resolve&&e.resolve(m[0]),d.next=21;break;case 16:return d.prev=16,d.t0=d.catch(2),d.next=20,f.e.error(d.t0);case 20:e.reject&&e.reject();case 21:case"end":return d.stop()}}),q,null,[[2,16]])}function ir(e){var t,n,r,i,a,o,s,l,c;return d.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.searchTerm,a=t.pageNumber,o=t.videoCategory,s=t.sort,l=o===vn.LEARNING?y.f:y.e,u.prev=3,u.next=6,l.post("videos/search",{searchTerm:i,pageNumber:a,pageSize:f.g.COGVID_SEARCH_PAGE_SIZE,searchScope:f.g.VIDEO_SEARCH_SCOPE[o.toUpperCase()],sort:s});case 6:c=u.sent,n&&n(c),u.next=15;break;case 10:return u.prev=10,u.t0=u.catch(3),u.next=14,f.e.error(u.t0);case 14:r&&r();case 15:case"end":return u.stop()}}),Y,null,[[3,10]])}function ar(e){var t,n,r;return d.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,y.e.get("videos/status");case 4:r=i.sent,t&&t(r),i.next=11;break;case 8:i.prev=8,i.t0=i.catch(1),n&&n(i.t0);case 11:case"end":return i.stop()}}),K,null,[[1,8]])}function or(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.cogvidId,a=t.sessionId,o.prev=2,o.next=5,y.e.delete("videos/".concat(i,"/processing/").concat(a));case 5:return o.next=7,Object(h.h)({type:v.e.CHANGE_PUBLIC_COGVID_VIDEO_STATUS,data:{videoId:i,status:f.g.COGVID_STATUS.PUBLISHED}});case 7:n&&n(),o.next=15;break;case 10:return o.prev=10,o.t0=o.catch(2),o.next=14,f.e.error(o.t0);case 14:r&&r(o.t0);case 15:case"end":return o.stop()}}),X,null,[[2,10]])}function sr(e){var t,n,r,i;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.cogvidId,a.prev=2,a.next=5,y.e.put("videos/".concat(i,"/transcode"));case 5:n&&n(),a.next=13;break;case 8:return a.prev=8,a.t0=a.catch(2),a.next=12,f.e.error(a.t0);case 12:r&&r(a.t0);case 13:case"end":return a.stop()}}),Q,null,[[2,8]])}function lr(){var e,t,n,r,i,a,o,s,l,c,u,m,A,_,w,E,S,C,T,k,x,O,I,M,P,D,N=arguments;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return e=N.length>0&&void 0!==N[0]?N[0]:{},t=e.data,n=void 0===t?{}:t,r=e.resolve,i=e.reject,a=Object(p.get)(b.a.getState(),"cogvid.cogvidDetails.cognitiveVideo"),o=Object(p.get)(b.a.getState(),"cogvid.cogvidDetails.course",{}),s=n.title,l=void 0===s?a.title:s,c=n.subject,u=void 0===c?a.subject:c,m=n.topic,A=void 0===m?a.topic:m,_=n.courseCode,w=void 0===_?o.code:_,E=n.courseSerial,S=void 0===E?o.serial:E,C=n.description,T=void 0===C?a.description:C,k=n.createdDate,x=void 0===k?a.createdDate:k,O=n.videoId,I=void 0===O?a.uid:O,M=n.reloadCg,P=void 0===M||M,d.prev=4,d.next=7,y.e.post("videos",{category:"HOME_VIDEO",chapters:f.g.INITIAL_DAILY_VIDEO_CHAPTERS,courseCode:w,courseSerial:S,description:T,subject:u,title:l,topic:A,isDailyTask:!0,createdDate:g()(x).format(f.g.DAILY_VIDEO_DATE_FORMAT)});case 7:if(D=d.sent,Object(p.get)(b.a.getState(),"cogvid.cogvidDetails.videoId")!==I){d.next=17;break}return d.next=12,Object(h.h)({type:v.e.UPDATE_COGVID_DETAILS,data:{cognitiveVideo:{uid:D.videoId,description:T,subject:u,title:l,topic:A,isDailyTask:!0,createdDate:x},videoId:D.videoId,isDummyDailyVideo:!1}});case 12:return d.next=14,f.c.changeURLWithoutSideEffect([[kn.KEY.VIDEO_ID,D.videoId]]);case 14:if(!P){d.next=17;break}return d.next=17,er({data:{videoId:D.videoId,dummyDailyVideoId:I}});case 17:return d.next=19,Object(h.h)({type:v.e.EDIT_COGVID_INFO_SUCCESS,data:{videoId:I,changeVideoIdTo:D.videoId,description:T,subject:u,title:l,topic:A,isDailyTask:!0,createdDate:x,isDummyDailyVideo:!1,outerProps:{isDummyDailyVideo:!1,uid:D.videoId}}});case 19:return r&&r(D),d.abrupt("return",D);case 23:return d.prev=23,d.t0=d.catch(4),d.next=27,f.e.error(d.t0);case 27:i&&i(d.t0);case 28:case"end":return d.stop()}}),$,null,[[4,23]])}function cr(e){var t,n,r,i,a,o,s,l,u,p,m,g,b,A,_,w,E,S,C,T,k,x,O,I;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=e.data,n=e.resolve,r=e.reject,i=t.title,a=t.subject,o=t.topic,s=t.videoId,l=t.courseCode,u=t.courseSerial,p=t.primCourseCode,m=t.primCourseSerial,g=t.description,b=t.isDummyDailyVideo,A=t.createdDate,_=t.keywords,w=t.learningLevel,E=t.learningSubject,S=t.deletedSubtitles,C=void 0===S?[]:S,T=t.userScaffId,d.prev=2,k=s,!b){d.next=9;break}return d.next=7,lr({createdDate:A,title:i,subject:a,topic:o,courseCode:l,courseSerial:u,description:g,keywords:_,learningLevel:w,learningSubject:E});case 7:x=d.sent,k=x.videoId;case 9:return d.next=11,y.e.put("videos/".concat(k),{title:i,subject:a,topic:o,courseCode:l,courseSerial:u,description:g,primCourseCode:p,primCourseSerial:m,keywords:_,learningLevel:w,learningSubject:E});case 11:O=d.sent,I=0;case 13:if(!(I<C.length)){d.next=19;break}return d.next=16,y.e.delete("videos/".concat(k,"/subtitles/").concat(C[I]),{params:{userScaffId:T}});case 16:I++,d.next=13;break;case 19:return d.next=21,Object(h.h)({type:v.e.EDIT_COGVID_INFO_SUCCESS,data:c()({title:i,subject:a,topic:o,videoId:k,description:g},"videoId",k)});case 21:n&&n(O),d.next=29;break;case 24:return d.prev=24,d.t0=d.catch(2),d.next=28,f.e.error(d.t0);case 28:r&&r();case 29:case"end":return d.stop()}}),J,null,[[2,24]])}function ur(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.attachmentIds,a=t.videoId,s.prev=2,s.next=5,y.e.put("videos/".concat(a,"/attachments"),{attachments:i});case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,f.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),Z,null,[[2,9]])}function dr(e){var t,n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.contentId,a=t.fileId,o=t.videoId,s=t.data,l=t.userScaffId,c.prev=2,c.next=5,y.e.put("videos/".concat(o,"/attachments/").concat(i||a),w({},s),{params:{userScaffId:l}});case 5:return c.next=7,Object(h.h)({type:v.e.UPDATE_VIDEO_ATTACHMENT_IN_CACHE,data:{contentId:i,fileId:a,videoId:o,data:s}});case 7:n&&n(),c.next=15;break;case 10:return c.prev=10,c.t0=c.catch(2),c.next=14,f.e.error(c.t0);case 14:r&&r();case 15:case"end":return c.stop()}}),ee,null,[[2,10]])}function hr(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.contentId,a=t.fileId,o=t.videoId,s=t.seqNumber,l.prev=2,l.next=5,y.e.patch("videos/".concat(o,"/attachments/").concat(i||a,"/").concat(s));case 5:n&&n(),l.next=13;break;case 8:return l.prev=8,l.t0=l.catch(2),l.next=12,f.e.error(l.t0);case 12:r&&r();case 13:case"end":return l.stop()}}),te,null,[[2,8]])}function fr(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.fileId,a=t.videoId,o=t.userScaffId,s.prev=2,s.next=5,y.e.delete("videos/".concat(a,"/attachments/").concat(i),{params:{userScaffId:o}});case 5:return s.next=7,Object(h.h)({type:v.e.DELETE_VIDEO_ATTACHMENT_IN_CACHE,data:{deleteFileId:i,videoId:a}});case 7:n&&n(),s.next=15;break;case 10:return s.prev=10,s.t0=s.catch(2),s.next=14,f.e.error(s.t0);case 14:r&&r();case 15:case"end":return s.stop()}}),ne,null,[[2,10]])}function pr(e){var t,n,r,i,a,o,s,l,c,u;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=e.data,n=e.resolve,r=e.reject,i=t.attachmentIds,a=t.videoId,o=t.chapterId,s=t.chapterSeqNumber,l=a.includes(xn),d.prev=3,!l){d.next=10;break}return d.next=7,lr();case 7:c=d.sent,a=c.videoId,void 0!==s&&(o=Object(p.get)(c.chapters[s],"uid",o));case 10:return d.next=12,y.e.put("videos/".concat(a,"/chapters/").concat(o,"/attachments"),{attachments:i});case 12:u=d.sent,n&&n(u),d.next=21;break;case 16:return d.prev=16,d.t0=d.catch(3),d.next=20,f.e.error(d.t0);case 20:r&&r();case 21:case"end":return d.stop()}}),re,null,[[3,16]])}function mr(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.fileId,a=t.videoId,o=t.chapterId,s=t.userScaffId,l.prev=2,l.next=5,y.e.delete("videos/".concat(a,"/chapters/").concat(o,"/attachments/").concat(i),{params:{userScaffId:s}});case 5:return l.next=7,Object(h.h)({type:v.e.DELETE_CHAPTER_ATTACHMENT_IN_CACHE,data:{deleteFileId:i,videoId:a,chapterId:o}});case 7:n&&n(),l.next=15;break;case 10:return l.prev=10,l.t0=l.catch(2),l.next=14,f.e.error(l.t0);case 14:r&&r();case 15:case"end":return l.stop()}}),ie,null,[[2,10]])}function gr(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=f.c.getScaffIdBaseOnMenu(),s.prev=3,s.next=6,y.e.get("videos/".concat(i,"/attachments"),{params:{userScaffId:a}});case 6:return o=s.sent,s.next=9,Object(h.h)({type:v.e.GET_VIDEO_ATTACHMENTS_SUCCESS,data:{videoId:i,files:o}});case 9:n&&n(),s.next=17;break;case 12:return s.prev=12,s.t0=s.catch(3),s.next=16,f.e.error(s.t0);case 16:r&&r();case 17:case"end":return s.stop()}}),ae,null,[[3,12]])}function vr(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.url,o.prev=2,o.next=5,y.k.get(i,{responseType:"blob"});case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),oe,null,[[2,9]])}function br(e){var n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,n=e.data,r=n.file,i=n.videoId,a=new FormData,o.next=5,a.append("file",r);case 5:return o.next=7,y.e.post("videos/".concat(i,"/subtitle"),a);case 7:return o.next=9,f.e.success(t("message.importedSuccessfully"));case 9:e.resolve&&e.resolve(e.data),o.next=17;break;case 12:return o.prev=12,o.t0=o.catch(0),o.next=16,f.e.error(o.t0);case 16:e.reject&&e.reject();case 17:case"end":return o.stop()}}),se,null,[[0,12]])}function yr(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,n=e.data,r=n.videoId,i=n.publishingMarkets,a=n.commentsLikesEnabledOnPublic,o=n.entireCoursePublished,n.publishingScope,l.next=4,y.e.post("videos/experiencing/publishment/".concat(r),{publishingMarkets:i,commentsLikesEnabledOnPublic:a,entireCoursePublished:o});case 4:if((s=l.sent)!==f.g.PUBLISHING_STATUS.APPROVED){l.next=12;break}return l.next=8,Object(h.h)({type:v.e.CHANGE_PUBLIC_COGVID_VIDEO_STATUS,data:{videoId:r,lastReviewStatus:s,status:f.g.COGVID_STATUS.PUBLISHING}});case 8:return l.next=10,f.e.success(t("message.publishedSuccessfullyForTrustUser"));case 10:l.next=16;break;case 12:return l.next=14,Object(h.h)({type:v.e.CHANGE_PUBLIC_COGVID_VIDEO_STATUS,data:{videoId:r,lastReviewStatus:s}});case 14:return l.next=16,f.e.success(t("message.publishedToReview"));case 16:e.resolve&&e.resolve(s),l.next=24;break;case 19:return l.prev=19,l.t0=l.catch(0),l.next=23,f.e.error(l.t0);case 23:e.reject&&e.reject();case 24:case"end":return l.stop()}}),le,null,[[0,19]])}function Ar(e){var n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,n=e.data,r=n.videoId,i=n.entireCoursePublished,a=n.publishingScope,s.next=4,y.e.put("videos/".concat(r,"/visibility"),{entireCourse:i,scope:a});case 4:return o=s.sent,s.next=7,Object(h.h)({type:v.e.CHANGE_PUBLIC_COGVID_VIDEO_VISBILITY_SCOPE,data:{videoId:r,visibilityScope:a}});case 7:return s.next=9,f.e.success(t("message.publishedSuccessfullyForTrustUser"));case 9:e.resolve&&e.resolve(o),s.next=17;break;case 12:return s.prev=12,s.t0=s.catch(0),s.next=16,f.e.error(s.t0);case 16:e.reject&&e.reject();case 17:case"end":return s.stop()}}),ce,null,[[0,12]])}function _r(e){var n;return d.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,y.e.get("videos/experiencing/publishingCancelation/".concat(e.data));case 3:return n=r.sent,r.next=6,Object(h.h)({type:v.e.CHANGE_PUBLIC_COGVID_VIDEO_STATUS,data:{videoId:e.data,lastReviewStatus:n,status:f.g.COGVID_STATUS.PUBLISHED}});case 6:return r.next=8,f.e.success(t("message.cancelPublicSuccessfully"));case 8:e.resolve&&e.resolve(n),r.next=16;break;case 11:return r.prev=11,r.t0=r.catch(0),r.next=15,f.e.error(r.t0);case 15:e.reject&&e.reject();case 16:case"end":return r.stop()}}),ue,null,[[0,11]])}function wr(e){var t;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,y.e.get("videos/experiencing/publishingFeedback/".concat(e.data));case 3:if(!(t=n.sent)){n.next=7;break}return n.next=7,Object(h.h)({type:v.e.GET_PUBLIC_COGVID_VIDEO_LAST_STATUS,data:e.data});case 7:e.resolve&&e.resolve(t),n.next=15;break;case 10:return n.prev=10,n.t0=n.catch(0),n.next=14,f.e.error(n.t0);case 14:e.reject&&e.reject();case 15:case"end":return n.stop()}}),de,null,[[0,10]])}function Er(e){var t;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,y.o.get("videos/".concat(e.data,"/state"));case 3:return t=n.sent,n.next=6,Object(h.h)({type:v.e.CHANGE_PUBLIC_COGVID_VIDEO_STATUS,data:{videoId:e.data,lastReviewStatus:null==t?void 0:t.lastPublishingStatus,status:null==t?void 0:t.status}});case 6:e.resolve&&e.resolve({lastReviewStatus:null==t?void 0:t.lastPublishingStatus,status:null==t?void 0:t.status}),n.next=14;break;case 9:return n.prev=9,n.t0=n.catch(0),n.next=13,f.e.error(n.t0);case 13:e.reject&&e.reject();case 14:case"end":return n.stop()}}),he,null,[[0,9]])}function Sr(e){var t;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(h.h)({type:v.e.REMOVE_VIDEO_FROM_COGVID_LIST,data:{videoId:e}});case 2:if(t=Object(p.get)(b.a.getState(),"cogvid.cogvidDetails.videoId"),e!==t){n.next=12;break}return n.next=6,Object(h.h)({type:v.e.UPDATE_SB,data:{}});case 6:return n.next=8,Object(h.h)({type:v.e.GET_CG_SUCCESS,data:[]});case 8:return n.next=10,Object(h.h)({type:v.e.RESET_COGVID_DETAILS});case 10:return n.next=12,f.c.clearDataWhenExitingVideo({clearVideoTime:!0,clearWithinVideoSearch:!0,closeCaModal:!1,closeAttachmentReview:!1});case 12:case"end":return n.stop()}}),fe)}function Cr(e){var n;return d.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.data,r.prev=1,r.next=4,y.e.delete("videos/experiencing/publishment/".concat(n));case 4:return r.next=6,Sr(n);case 6:return r.next=8,f.e.success(t("message.unpublishedSuccessfully"));case 8:e.resolve&&e.resolve({videoId:n}),r.next=16;break;case 11:return r.prev=11,r.t0=r.catch(1),r.next=15,f.e.error(r.t0);case 15:e.reject&&e.reject();case 16:case"end":return r.stop()}}),pe,null,[[1,11]])}function Tr(e){var n,r,i;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,n=e.data,r=n.videoId,i=n.entireCourse,a.next=4,y.e.post("videos/learning/save",{videoId:r,entireCourse:i});case 4:return a.next=6,Object(h.h)({type:v.e.CLONE_COGNITIVE_VIDEO_SUCCESS,data:e.data});case 6:return a.next=8,f.e.success(t("message.clonedSuccessfully"));case 8:e.resolve&&e.resolve(e.data),a.next=16;break;case 11:return a.prev=11,a.t0=a.catch(0),a.next=15,f.e.error(a.t0);case 15:e.reject&&e.reject();case 16:case"end":return a.stop()}}),me,null,[[0,11]])}function kr(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,n=e.data,r=n.videoId,i=n.entireCourse,a=n.agent,o=n.packageId,l.next=4,y.o.get("videos/".concat(r,"/exportUrls?entireCourse=").concat(!!i,"&agt=").concat(a,"&pkg=").concat(o),{responseType:"blob"});case 4:return s=l.sent,l.next=7,f.e.success(t("message.exportLinkSuccessfully"));case 7:e.resolve&&e.resolve(s),l.next=15;break;case 10:return l.prev=10,l.t0=l.catch(0),l.next=14,f.e.error(l.t0);case 14:e.reject&&e.reject();case 15:case"end":return l.stop()}}),ge,null,[[0,10]])}function xr(e){var t,n,r;return d.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,Object(h.h)({type:v.e.UPDATE_STATE,data:{isFetchingGalleryVideo:!0}});case 4:return i.next=6,y.e.get("videos/gallery");case 6:if(r=i.sent,f.c.getCurrentVideoCategory()!==vn.EXPERIENCING){i.next=12;break}return i.next=11,Object(h.h)({type:v.e.GET_GALLERY_VIDEO_SUCCESS,data:r});case 11:t&&t(r);case 12:i.next=21;break;case 14:return i.prev=14,i.t0=i.catch(1),i.next=18,Object(h.h)({type:v.e.UPDATE_STATE,data:{isFetchingGalleryVideo:!1}});case 18:return i.next=20,f.e.error(i.t0);case 20:n&&n();case 21:case"end":return i.stop()}}),ve,null,[[1,14]])}function Or(e){var t,n,r,i,a,o,s,l,c;return d.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.userScaffId,o=t.scope,s=t.update,u.prev=2,u.next=5,y.e.get("videos/".concat(i),{params:{userScaffId:a,scope:o}});case 5:if(l=u.sent,c=f.c.buildVideoList([l]),n&&n(c[0]),!s){u.next=11;break}return u.next=11,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{data:w({},c[0]),videoId:i}});case 11:u.next=18;break;case 13:return u.prev=13,u.t0=u.catch(2),u.next=17,f.e.error(u.t0);case 17:r&&r();case 18:case"end":return u.stop()}}),be,null,[[2,13]])}function Ir(e){var n,r,i,a,o,s,l,c,u,p;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(n=e.data,r=e.resolve,i=e.reject,a=n.file,o=n.isDummyDailyVideo,s=n.videoId,(l=new FormData).append("file",a,a.name),d.prev=5,!o){d.next=11;break}return d.next=9,lr();case 9:c=d.sent,s=c.videoId;case 11:return d.next=13,y.e.post("videos/".concat(s,"/coverImage"),l,{headers:{"Content-Type":"multipart/form-data; boundary=".concat(l._boundary)}});case 13:return u=d.sent,p=u.url,d.next=17,Object(h.h)({type:v.e.SET_VIDEO_COVER_IMG_SUCCESS,data:{coverImgUrl:p,videoId:s}});case 17:return d.next=19,Object(h.h)({type:v.e.UPDATE_COGVID_DETAILS,data:{thumbnailUrl:p}});case 19:return d.next=21,f.e.success(t("message.updateVideoCoverImgSuccessfully"));case 21:r&&r(u),d.next=29;break;case 24:return d.prev=24,d.t0=d.catch(5),d.next=28,f.e.error(d.t0);case 28:i&&i();case 29:case"end":return d.stop()}}),ye,null,[[5,24]])}function Mr(e){var n,r,i,a,o,s,l,c,u;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(n=e.data,r=e.resolve,i=e.reject,a=n.isDummyDailyVideo,o=n.html,s=n.videoId,d.prev=3,!a){d.next=9;break}return d.next=7,lr();case 7:l=d.sent,s=l.videoId;case 9:return d.next=11,y.e.post("videos/".concat(s,"/coverImage/html"),o,{headers:{"Content-Type":"text/plain"}});case 11:return c=d.sent,u=c.url,d.next=15,Object(h.h)({type:v.e.SET_VIDEO_COVER_IMG_SUCCESS,data:{coverImgUrl:u,videoId:s}});case 15:return d.next=17,Object(h.h)({type:v.e.UPDATE_COGVID_DETAILS,data:{thumbnailUrl:u}});case 17:return d.next=19,f.e.success(t("message.updateVideoCoverImgSuccessfully"));case 19:r&&r(c),d.next=27;break;case 22:return d.prev=22,d.t0=d.catch(3),d.next=26,f.e.error(d.t0);case 26:i&&i();case 27:case"end":return d.stop()}}),Ae,null,[[3,22]])}function Pr(e){var t,n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=f.c.getScaffIdBaseOnMenu(),o=f.c.getCurrentVideoCategory(),s=yn[o.toUpperCase()],c.prev=5,c.next=8,y.e.get("videos/".concat(i,"/chapters/attachments"),{params:{userScaffId:a,scope:s}});case 8:return l=c.sent,c.next=11,Object(h.h)({type:v.e.GET_VIDEO_CHAPTERS_ATTACHMENTS_SUCCESS,data:{videoId:i,files:l}});case 11:n&&n(),c.next=19;break;case 14:return c.prev=14,c.t0=c.catch(5),c.next=18,f.e.error(c.t0);case 18:r&&r();case 19:case"end":return c.stop()}}),_e,null,[[5,14]])}function Dr(e){var t,n,r,i,a,o,s,l,c;return d.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.contentId,a=t.fileId,o=t.videoId,s=t.chapterId,l=t.data,c=t.userScaffId,u.prev=2,u.next=5,y.e.put("videos/".concat(o,"/chapters/").concat(s,"/attachments/").concat(i||a),w({},l),{params:{userScaffId:c}});case 5:return u.next=7,Object(h.h)({type:v.e.UPDATE_CHAPTER_ATTACHMENT_IN_CACHE,data:{contentId:i,fileId:a,videoId:o,chapterId:s,data:l}});case 7:n&&n(),u.next=15;break;case 10:return u.prev=10,u.t0=u.catch(2),u.next=14,f.e.error(u.t0);case 14:r&&r();case 15:case"end":return u.stop()}}),we,null,[[2,10]])}function Nr(e){var t,n,r,i,a,o,s,l,c;return d.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.contentId,a=t.fileId,o=t.videoId,s=t.chapterId,l=t.data,c=t.userScaffId,u.prev=2,u.next=5,y.e.patch("videos/".concat(o,"/chapters/").concat(s,"/attachments/").concat(i||a),{value:l},{params:{userScaffId:c}});case 5:return u.next=7,Object(h.h)({type:v.e.UPDATE_CHAPTER_ATTACHMENT_IN_CACHE,data:{contentId:i,fileId:a,videoId:o,chapterId:s,data:{freeDownload:l}}});case 7:n&&n(),u.next=15;break;case 10:return u.prev=10,u.t0=u.catch(2),u.next=14,f.e.error(u.t0);case 14:r&&r();case 15:case"end":return u.stop()}}),Ee,null,[[2,10]])}function Lr(e){var t,n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.contentId,a=t.fileId,o=t.videoId,s=t.chapterId,l=t.seqNumber,c.prev=2,c.next=5,y.e.patch("videos/".concat(o,"/chapters/").concat(s,"/attachments/").concat(i||a,"/").concat(l));case 5:n&&n(),c.next=13;break;case 8:return c.prev=8,c.t0=c.catch(2),c.next=12,f.e.error(c.t0);case 12:r&&r();case 13:case"end":return c.stop()}}),Se,null,[[2,8]])}function Rr(e){var t,n,r;return d.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i.prev=1,i.next=4,y.e.delete("videos/".concat(t));case 4:return i.next=6,Sr(t);case 6:n&&n(),i.next=14;break;case 9:return i.prev=9,i.t0=i.catch(1),i.next=13,f.e.error(i.t0);case 13:r&&r();case 14:case"end":return i.stop()}}),Ce,null,[[1,9]])}function Br(e){var t,n,r;return d.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i.prev=1,i.next=4,y.e.delete("videos/".concat(t,"/shares"));case 4:return i.next=6,Sr(t);case 6:n&&n(),i.next=14;break;case 9:return i.prev=9,i.t0=i.catch(1),i.next=13,f.e.error(i.t0);case 13:r&&r();case 14:case"end":return i.stop()}}),Te,null,[[1,9]])}function jr(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.isActiveVideo,o=t.hideError,l.prev=2,l.next=5,y.o.get("videos/".concat(i,"/rawvideos"));case 5:if((s=l.sent).map((function(e){return e.chapters.sort((function(e,t){return e.startTime-t.startTime}))})),!a){l.next=10;break}return l.next=10,Object(h.h)({type:v.e.UPDATE_COGVID_DETAILS,data:{rawVideos:s}});case 10:n&&n(s),l.next=19;break;case 13:if(l.prev=13,l.t0=l.catch(2),o){l.next=18;break}return l.next=18,f.e.error(l.t0);case 18:r&&r();case 19:case"end":return l.stop()}}),ke,null,[[2,13]])}function Fr(e){var n,r,i,a,o,s,l,c,u,p,m;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.contentId,o=n.fileId,s=n.videoId,l=n.file,c=n.userScaffId,(u=new FormData).append("file",l,l.name),d.prev=4,d.next=7,y.e.post("videos/".concat(s,"/attachments/").concat(a||o,"/thumbnail"),u,{headers:{"Content-Type":"multipart/form-data; boundary=".concat(u._boundary)},params:{userScaffId:c}});case 7:return p=d.sent,m=p.url,d.next=11,Object(h.h)({type:v.e.UPDATE_VIDEO_ATTACHMENT_IN_CACHE,data:{contentId:a,fileId:o,videoId:s,data:{thumbnail:m}}});case 11:return d.next=13,f.e.success(t("message.updateAttachmentThumbnailSuccessfully"));case 13:r&&r(p),d.next=21;break;case 16:return d.prev=16,d.t0=d.catch(4),d.next=20,f.e.error(d.t0);case 20:i&&i();case 21:case"end":return d.stop()}}),xe,null,[[4,16]])}function Ur(e){var n,r,i,a,o,s,l,c,u,p,m,g;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.contentId,o=n.fileId,s=n.videoId,l=n.chapterId,c=n.file,u=n.userScaffId,(p=new FormData).append("file",c,c.name),d.prev=4,d.next=7,y.e.post("videos/".concat(s,"/chapters/").concat(l,"/attachments/").concat(a||o,"/thumbnail"),p,{headers:{"Content-Type":"multipart/form-data; boundary=".concat(p._boundary)},params:{userScaffId:u}});case 7:return m=d.sent,g=m.url,d.next=11,Object(h.h)({type:v.e.UPDATE_CHAPTER_ATTACHMENT_IN_CACHE,data:{contentId:a,fileId:o,videoId:s,chapterId:l,data:{thumbnail:g}}});case 11:return d.next=13,f.e.success(t("message.updateAttachmentThumbnailSuccessfully"));case 13:r&&r(m),d.next=21;break;case 16:return d.prev=16,d.t0=d.catch(4),d.next=20,f.e.error(d.t0);case 20:i&&i();case 21:case"end":return d.stop()}}),Oe,null,[[4,16]])}function Hr(e){var n,r,i,a,o,s,l,c,u,p,m,g,b;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(n=e.data,r=e.resolve,i=e.reject,a=n.videoId,o=n.chapterId,s=n.additionalChapters,l=n.file,c=n.previewFile,u=n.attribute,n.rootContext,p=new FormData,l&&p.append("file",l,l.name),c&&p.append("previewFile",c,c.name),s&&(null==s?void 0:s.length)&&s.map((function(e){p.append("additionalChapters",e)})),m=a.includes(xn),d.prev=7,!m){d.next=13;break}return d.next=11,lr();case 11:g=d.sent,a=g.videoId;case 13:return d.next=15,y.e.post("videos/".concat(a,"/chapters/").concat(o,"/slide?attribute=").concat(u),p,{headers:{"Content-Type":"multipart/form-data; boundary=".concat(p._boundary)}});case 15:return b=d.sent,d.next=18,Object(h.f)(1e3);case 18:return d.next=20,Object(h.h)({type:v.e.GET_LECTURE_VIDEO,data:{videoId:a,scope:yn.COMPOSING,update:!0}});case 20:return d.next=22,f.e.success(t("message.updateAttachmentThumbnailSuccessfully"));case 22:r&&r(b),d.next=30;break;case 25:return d.prev=25,d.t0=d.catch(7),d.next=29,f.e.error(d.t0);case 29:i&&i();case 30:case"end":return d.stop()}}),Ie,null,[[7,25]])}function zr(e){var n,r,i,a,o,s,l,c,u,p;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.videoId,o=n.chapterId,s=n.chapters,l=n.attribute,c=n.filename,u=n.targetFiles,d.prev=2,d.next=5,y.e.put("videos/".concat(a,"/chapters/").concat(o,"/slide"),{attribute:l,filename:c,chapters:s,targetFiles:u});case 5:return p=d.sent,d.next=8,Object(h.f)(1e3);case 8:return d.next=10,Object(h.h)({type:v.e.GET_LECTURE_VIDEO,data:{videoId:a,scope:yn.COMPOSING,update:!0}});case 10:return d.next=12,f.e.success(t("message.updateAttachmentThumbnailSuccessfully"));case 12:r&&r(p),d.next=20;break;case 15:return d.prev=15,d.t0=d.catch(2),d.next=19,f.e.error(d.t0);case 19:i&&i();case 20:case"end":return d.stop()}}),Me,null,[[2,15]])}function Vr(e){var t,n,r,i,a,o,s,l,c,u,p,m,g;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.chapterId,o=t.attribute,s=t.targetFiles,l=void 0===s?[]:s,d.prev=2,c="attribute=".concat(o),l.length>0&&(c+="&"+l.map((function(e){return"targetFiles=".concat(e)})).join("&")),d.next=7,y.e.delete("videos/".concat(i,"/chapters/").concat(a,"/slide?").concat(c));case 7:return u=d.sent,p={},m=l.includes("MAIN"),g=l.includes("PREVIEW"),"FOUNDATION"===o?p.foundation=null:"UNDERSTANDING"===o?p.understanding=null:"THUMBNAIL"===o?p.thumbnail=null:"SLIDES"===o?p.slides=null:"WORKSHEETS"===o?(m&&(p.worksheets=null),g&&(p.worksheetsPrev=null)):"HWGUIDES"===o?(m&&(p.hwGuides=null),g&&(p.hwGuidesPrev=null)):"SOLUTIONS"===o?(m&&(p.solutions=null),g&&(p.solutionsPrev=null)):p.image=null,d.next=14,Object(h.h)({type:v.e.UPDATE_CHAPTER_ITEM_IN_CACHE,data:{videoId:i,chapterId:a,data:p}});case 14:return d.next=16,f.e.success("Deleted successfully");case 16:n&&n(u),d.next=24;break;case 19:return d.prev=19,d.t0=d.catch(2),d.next=23,f.e.error(d.t0);case 23:r&&r();case 24:case"end":return d.stop()}}),Pe,null,[[2,19]])}function Wr(e){var n,r,i,a,o,s,l,c,u,m,g,b,A,_,w,E,S;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(n=e.data,r=e.resolve,i=e.reject,a=n.chapterId,o=n.position,s=void 0===o?gn.BEFORE:o,l=n.total,c=void 0===l?1:l,u=n.file,m=n.title,g=n.seqNumber,b=n.videoId,A=b.includes(xn),d.prev=3,!A){d.next=10;break}return d.next=7,lr();case 7:_=d.sent,b=_.videoId,void 0!==g&&(a=Object(p.get)(_.chapters[g],"uid",a));case 10:return d.next=12,Object(h.b)(y.e.patch,"videos/".concat(b),{chapterId:a,position:s,total:c});case 12:return w=d.sent,E=w.sessionId,S=w.seqNumber,u.metadata={seqNumber:S,filename:u.path},d.next=17,Object(h.h)({type:v.g.ADD_CREATING_COGVID_ITEM,data:{type:mn.UPDATING_COGNITIVE,sessionId:E,name:m,files:[u],totalSubtitles:0,totalVideos:c}});case 17:return d.next=19,f.e.success(t("message.processingVideo"));case 19:r&&r(),d.next=29;break;case 22:return d.prev=22,d.t0=d.catch(3),d.next=26,f.e.error(d.t0);case 26:return d.next=28,Object(h.h)({type:v.g.CREATE_COGNITIVE_VIDEO_FAILURE,error:d.t0});case 28:i&&i(d.t0,"error");case 29:case"end":return d.stop()}}),De,null,[[3,22]])}function Gr(e){var t,n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.chapterId,o=t.attributes,s=i.includes(xn),c.prev=3,c.next=6,Object(h.h)({type:v.e.COMPREHENSION_GUIDE_UPDATING,data:!0});case 6:if(!s){c.next=11;break}return c.next=9,lr();case 9:l=c.sent,i=l.videoId;case 11:return c.next=13,y.e.put("videos/".concat(i,"/chapters/").concat(a,"/attributes"),o);case 13:return c.next=15,Object(h.h)({type:v.e.SET_STYLE_FOR_CHAPTER_SUCCESS,data:t.attributes,videoId:i,chapterSeqNumber:a});case 15:return c.next=17,Object(h.h)({type:v.e.COMPREHENSION_GUIDE_UPDATING,data:!1});case 17:n&&n(),c.next=25;break;case 20:return c.prev=20,c.t0=c.catch(3),c.next=24,f.e.error(c.t0);case 24:r&&r();case 25:case"end":return c.stop()}}),Ne,null,[[3,20]])}function qr(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,o.prev=2,o.next=5,y.e.get("videos/".concat(i,"/shares"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),Le,null,[[2,9]])}function Yr(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.scaffoldingId,o.prev=2,o.next=5,y.e.get("videos/shares/".concat(i,"/participants"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),Re,null,[[2,9]])}function Kr(e){var t,n,r,i;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e.data,t=e.resolve,n=e.reject,a.prev=1,a.next=4,y.e.get("videos/roles");case 4:return r=a.sent,i=r.flatMap((function(e){var t=e.name,n=e.enabled;return void 0===n||n?[w(w({},e),{},{value:t})]:[]})),a.next=8,Object(h.h)({type:v.e.GET_VIDEO_ROLES_SUCCESS,data:i});case 8:t&&t(i),a.next=16;break;case 11:return a.prev=11,a.t0=a.catch(1),a.next=15,f.e.error(a.t0);case 15:n&&n();case 16:case"end":return a.stop()}}),Be,null,[[1,11]])}function Xr(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.settingKey,a=t.defaultValue,s.prev=2,s.next=5,y.o.get("settings/".concat(i,"/").concat(a));case 5:return o=s.sent,s.next=8,Object(h.h)({type:v.e.GET_VIDEO_SETTING_SUCCESS,data:o});case 8:n&&n(o),s.next=16;break;case 11:return s.prev=11,s.t0=s.catch(2),s.next=15,f.e.error(s.t0);case 15:r&&r();case 16:case"end":return s.stop()}}),je,null,[[2,11]])}function Qr(e){var n,r,i,a,o,s,l,c,u,h,m,g,v,b;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(n=e.data,r=e.resolve,i=e.reject,d.prev=1,a=n.videoId,o=n.title,s=n.subject,l=n.topic,c=n.description,u=n.chapters,h=n.chapterSeqNumbers,m=n.category,g=void 0===m?En.BRAINHIVE_VIDEO:m,!a.includes(xn)){d.next=10;break}return d.next=7,lr({data:{title:o,subject:s,topic:l}});case 7:v=d.sent,a=v.videoId,u=h.map((function(e){return Object(p.get)(v.chapters[e],"uid")}));case 10:return d.next=12,y.e.post("videos/".concat(a,"/shares"),{title:o,subject:s,topic:l,description:c,chapters:u,category:g});case 12:return b=d.sent,d.next=15,f.e.success(t("message.extractSuccessfully",{menu:Sn[g]}));case 15:r&&r(b),d.next=23;break;case 18:return d.prev=18,d.t0=d.catch(1),d.next=22,f.e.error(d.t0);case 22:i&&i();case 23:case"end":return d.stop()}}),Fe,null,[[1,18]])}function $r(e){var n,r,i,a,o,s,l,c,u,h;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.videoId,o=n.title,s=n.subject,l=n.topic,c=n.description,u=n.highlights,d.prev=2,d.next=5,y.e.post("videos/".concat(a,"/shares/highlights"),{title:o,subject:s,topic:l,description:c,highlights:u});case 5:return h=d.sent,d.next=8,f.e.success(t("message.extractSuccessfully",{menu:Sn.BRAINHIVE_VIDEO}));case 8:r&&r(h),d.next=16;break;case 11:return d.prev=11,d.t0=d.catch(2),d.next=15,f.e.error(d.t0);case 15:i&&i();case 16:case"end":return d.stop()}}),Ue,null,[[2,11]])}function Jr(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.shareVideoData,s.prev=2,s.next=5,y.e.put("videos/".concat(i,"/shares"),a);case 5:return o=s.sent,s.next=8,Object(h.h)({type:v.e.CHANGE_PUBLIC_COGVID_VIDEO_PUBLIC_VIEW,data:{videoId:i,publicView:a.publicView}});case 8:n&&n(o),s.next=16;break;case 11:return s.prev=11,s.t0=s.catch(2),s.next=15,f.e.error(s.t0);case 15:r&&r();case 16:case"end":return s.stop()}}),He,null,[[2,11]])}function Zr(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.chapterId,o=t.fileId,l.prev=2,l.next=5,y.e.get("videos/".concat(i,"/chapters/").concat(a,"/attachments/").concat(o,"/sketch"));case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,f.e.error(l.t0);case 13:r&&r();case 14:case"end":return l.stop()}}),ze,null,[[2,9]])}function ei(e){var t,n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.chapterId,o=t.fileId,s=t.sketchPages,c.prev=2,c.next=5,y.e.put("videos/".concat(i,"/chapters/").concat(a,"/attachments/").concat(o,"/sketch"),{sketchPages:s});case 5:l=c.sent,n&&n(l),c.next=14;break;case 9:return c.prev=9,c.t0=c.catch(2),c.next=13,f.e.error(c.t0);case 13:r&&r();case 14:case"end":return c.stop()}}),Ve,null,[[2,9]])}function ti(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.chapterId,o=t.fileId,l.prev=2,l.next=5,y.e.delete("videos/".concat(i,"/chapters/").concat(a,"/attachments/").concat(o,"/sketch"));case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,f.e.error(l.t0);case 13:r&&r();case 14:case"end":return l.stop()}}),We,null,[[2,9]])}function ni(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.fileId,s.prev=2,s.next=5,y.e.get("videos/".concat(i,"/attachments/").concat(a,"/sketch"));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,f.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),Ge,null,[[2,9]])}function ri(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.fileId,o=t.sketchPages,l.prev=2,l.next=5,y.e.put("videos/".concat(i,"/attachments/").concat(a,"/sketch"),{sketchPages:o});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,f.e.error(l.t0);case 13:r&&r();case 14:case"end":return l.stop()}}),qe,null,[[2,9]])}function ii(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.fileId,s.prev=2,s.next=5,y.e.delete("videos/".concat(i,"/attachments/").concat(a,"/sketch"));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,f.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),Ye,null,[[2,9]])}function ai(e){var n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return n=e.data,r=n.videoId,i=n.sbList,a=n.mode,s.prev=1,o=a===Pn.SEMANTIC_TEXT,s.next=5,y.e.put("videos/".concat(r,"/semantics"),{blocks:i.map((function(e){var t=e.startTime,n=e.semanticText,r=e.semanticNote;return{startTime:t,semanticText:o?n:r}})),blockType:a});case 5:return s.next=7,Object(h.h)({type:v.e.UPDATE_MULTIPLE_SB_CONTENT_SUCCESS,data:e.data});case 7:if(!o){s.next=10;break}return s.next=10,f.e.success(t("message.updateSbContentSuccessfully"));case 10:e.resolve&&e.resolve(),s.next=18;break;case 13:return s.prev=13,s.t0=s.catch(1),s.next=17,f.e.error(s.t0);case 17:e.reject&&e.reject();case 18:case"end":return s.stop()}}),Ke,null,[[1,13]])}function oi(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.shareVideoData,a=t.chapterId,s.prev=2,s.next=5,y.e.put("videos/shares/chapters/".concat(a),i);case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,f.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),Xe,null,[[2,9]])}function si(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.chapterId,o.prev=2,o.next=5,y.e.get("videos/shares/chapters/".concat(i));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),Qe,null,[[2,9]])}function li(e){var t,n,r,i;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e.data,t=e.resolve,n=e.reject,a.prev=1,a.next=4,y.e.get("videos/shares/chapters/roles");case 4:return r=a.sent,i=r.flatMap((function(e){var t=e.name,n=e.enabled;return void 0===n||n?[w(w({},e),{},{value:t})]:[]})),a.next=8,Object(h.h)({type:v.e.GET_CHAPTER_SHARING_ROLES_SUCCESS,data:i});case 8:t&&t(i),a.next=16;break;case 11:return a.prev=11,a.t0=a.catch(1),a.next=15,f.e.error(a.t0);case 15:n&&n();case 16:case"end":return a.stop()}}),$e,null,[[1,11]])}function ci(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.data,a=t.videoId,s.prev=2,s.next=5,y.e.put("videos/".concat(a,"/template"),i);case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,f.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),Je,null,[[2,9]])}function ui(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,o.prev=2,o.next=5,y.e.get("videos/".concat(i,"/template"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),Ze,null,[[2,9]])}function di(e){var t,n,r,i,a,o,s,l,c;return d.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return t=e.data,n=e.resolve,r=e.reject,u.prev=1,i=t.videoId,a=t.chapterId,o=t.userScaffId,s=t.liked,l=t.category,u.next=5,f.c.checkCanAnoynymousLike(a);case 5:if(u.sent){u.next=9;break}return r&&r(),u.abrupt("return");case 9:return u.next=11,s?y.d.delete("chapters/".concat(a,"/like"),{category:l}):y.d.post("chapters/".concat(a,"/like"),{category:l,scaffoldingId:o});case 11:return c=u.sent,u.next=14,Object(h.h)({type:v.e.CHAPTER_LIKE_COMPLETE,data:{videoId:i,chapterId:a,likeCount:c,liked:!s,category:l}});case 14:n&&n(c),u.next=22;break;case 17:return u.prev=17,u.t0=u.catch(1),u.next=21,f.e.error(u.t0);case 21:r&&r(u.t0);case 22:case"end":return u.stop()}}),et,null,[[1,17]])}function hi(e){var t,n,r;return d.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return e.data,t=e.resolve,n=e.reject,i.prev=1,i.next=4,y.e.get("videos/courses");case 4:r=i.sent,t&&t(r),i.next=13;break;case 8:return i.prev=8,i.t0=i.catch(1),i.next=12,f.e.error(i.t0);case 12:n&&n();case 13:case"end":return i.stop()}}),tt,null,[[1,8]])}function fi(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.courseId,o.prev=2,o.next=5,y.e.get("videos/courses/".concat(i,"/serial"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),nt,null,[[2,9]])}function pi(e){var t,n,r,i;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=e.data,n=e.resolve,r=e.reject,a.prev=1,a.next=4,y.e.post("videos/courses",t);case 4:i=a.sent,n&&n(i),a.next=13;break;case 8:return a.prev=8,a.t0=a.catch(1),a.next=12,f.e.error(a.t0);case 12:r&&r();case 13:case"end":return a.stop()}}),rt,null,[[1,8]])}function mi(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,s.prev=2,s.next=5,y.e.get("videos/".concat(i,"/roles"));case 5:a=s.sent,o=a.map((function(e){var t=e.name;return w(w({},e),{},{value:t})})),n&&n(o),s.next=15;break;case 10:return s.prev=10,s.t0=s.catch(2),s.next=14,f.e.error(s.t0);case 14:r&&r();case 15:case"end":return s.stop()}}),it,null,[[2,10]])}function gi(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.newOwner,o=t.videoOwnerId,s.prev=2,s.next=5,y.f.patch("videos/".concat(i,"/owner"),{newOwner:a.uid});case 5:return s.sent,s.next=8,Object(h.h)({type:v.e.CHANGE_OWNERSHIP_SUCCESS,data:w(w({},a),{},{videoId:i,oldOwnerId:o})});case 8:return s.next=10,Object(h.a)([er({data:{videoId:i}})]);case 10:n&&n({videoId:i,newOwner:a,videoOwnerId:o}),s.next=18;break;case 13:return s.prev=13,s.t0=s.catch(2),s.next=17,f.e.error(s.t0);case 17:r&&r();case 18:case"end":return s.stop()}}),at,null,[[2,13]])}function vi(e){var t,n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.chapterId,o=t.attachmentId,s=t.userScaffId,c.prev=2,c.next=5,y.e.patch("videos/".concat(i,"/chapters/").concat(a,"/attachments/").concat(o,"/downloadcount"),{},{params:{userScaffId:s}});case 5:return l=c.sent,c.next=8,Object(h.h)({type:v.e.UPDATE_CHAPTER_ATTACHMENT_IN_CACHE,data:{videoId:i,chapterId:a,contentId:o,data:{downloadCount:l}}});case 8:n&&n(l),c.next=16;break;case 11:return c.prev=11,c.t0=c.catch(2),c.next=15,f.e.error(c.t0);case 15:r&&r();case 16:case"end":return c.stop()}}),ot,null,[[2,11]])}function bi(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,o.prev=2,o.next=5,y.e.get("videos/".concat(i,"/ownerProfile"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),st,null,[[2,9]])}function yi(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.videoId,o=n.enabled,l.prev=2,l.next=5,y.e.put("videos/experiencing/".concat(a,"/enableCommentLikeOnPublic/").concat(o));case 5:return s=l.sent,l.next=8,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{data:{commentsLikesEnabledOnPublic:o},videoId:a}});case 8:f.e.success(o?t("message.videoCommentEnabled"):t("message.videoCommentDisabled")),r&&r(s),l.next=17;break;case 12:return l.prev=12,l.t0=l.catch(2),l.next=16,f.e.error(l.t0);case 16:i&&i();case 17:case"end":return l.stop()}}),lt,null,[[2,12]])}function Ai(e){var t,n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.scaffoldingId,c.prev=2,c.next=5,y.d.post("videos/".concat(a,"/like"),{videoId:i,origin:"PUBLIC"});case 5:if(o=c.sent,s=o.likeCount,l=o.likeId,Object(p.get)(b.a.getState(),"auth.userInfo.userId","")){c.next=11;break}return c.next=11,f.c.trackAnonymousLikeInfo(i,l);case 11:return c.next=13,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{videoId:i,data:{likeCount:s,liked:!0}}});case 13:n&&n(o),c.next=21;break;case 16:return c.prev=16,c.t0=c.catch(2),c.next=20,f.e.error(c.t0);case 20:r&&r();case 21:case"end":return c.stop()}}),ct,null,[[2,16]])}function _i(e){var t,n,r,i,a,o,s,l,c,u,m;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,a=t.scaffoldingId,d.prev=2,(s=Object(p.get)(b.a.getState(),"auth.userInfo.userId",""))||(l=JSON.parse(localStorage.getItem("LIKE_TRACKING"))||{},o=l[i]),c=o?"videos/".concat(a,"/likes/").concat(o):"videos/".concat(a,"/like?origin=PUBLIC"),d.next=8,y.d.delete(c);case 8:return u=d.sent,d.next=11,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{videoId:i,data:{likeCount:u,liked:!1}}});case 11:s||(delete(m=JSON.parse(localStorage.getItem("LIKE_TRACKING"))||{})[i],localStorage.setItem("LIKE_TRACKING",JSON.stringify(m))),n&&n({likeCount:u}),d.next=20;break;case 15:return d.prev=15,d.t0=d.catch(2),d.next=19,f.e.error(d.t0);case 19:r&&r();case 20:case"end":return d.stop()}}),ut,null,[[2,15]])}function wi(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.scaffoldingId,o.prev=2,o.next=5,y.d.get("videos/".concat(i,"/likes?origin=PUBLIC"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),dt,null,[[2,9]])}function Ei(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.userScaffId,a=t.videoId,s.prev=2,s.next=5,y.e.get("videos/".concat(a,"/participants?userScaffId=").concat(i));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(2),s.next=13,f.e.error(s.t0);case 13:r&&r();case 14:case"end":return s.stop()}}),ht,null,[[2,9]])}function Si(e){var t,n,r,i,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoId,o=a()(t,["videoId"]),c.prev=2,c.next=5,y.e.post("videos/".concat(i,"/chapters"),w(w({},o),{},{type:In.LIVE_SESSION.key}));case 5:return s=c.sent,c.next=8,f.c.convertChapterPermission(s);case 8:return l=c.sent,c.next=11,Object(h.h)({type:v.e.GET_CG_SUCCESS,data:l,videoId:i});case 11:n&&n(s),c.next=19;break;case 14:return c.prev=14,c.t0=c.catch(2),c.next=18,f.e.error(c.t0);case 18:r&&r();case 19:case"end":return c.stop()}}),ft,null,[[2,14]])}function Ci(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoUrl,o.prev=2,o.next=5,y.o.post("videos/shortening",{originUrl:i});case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(2),o.next=13,f.e.error(o.t0);case 13:r&&r();case 14:case"end":return o.stop()}}),pt,null,[[2,9]])}function Ti(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.videoUrl,o.prev=2,o.next=5,y.o.post("videos/expanding",{shortenedUrl:i});case 5:a=o.sent,n&&n(a),o.next=12;break;case 9:o.prev=9,o.t0=o.catch(2),r&&r();case 12:case"end":return o.stop()}}),mt,null,[[2,9]])}function ki(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.terms,a=t.category,o=void 0===a?Mn.VIDEO_KEYWORD:a,l.prev=2,l.next=5,y.o.post("videos/keywords/search",{category:o,terms:i});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,f.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),gt,null,[[2,9]])}function xi(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.category,a=void 0===i?Mn.VIDEO_KEYWORD:i,o=t.names,l.prev=2,l.next=5,y.o.post("videos/keywords",{category:a,names:o});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(2),l.next=13,f.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),vt,null,[[2,9]])}function Oi(e){var t,n,r,i,a,o,s,l,c,u,h,p;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=e.resolve,r=e.reject,i=t.pageNumber,a=void 0===i?0:i,o=t.pageSize,s=void 0===o?10:o,l=t.searchTerm,c=void 0===l?"":l,u=t.userId,h=t.sort,d.prev=2,d.next=5,y.f.post("videos/userVideos",{pageNumber:a,pageSize:s,searchTerm:c,userId:u,sort:h});case 5:p=d.sent,n&&n(p),d.next=14;break;case 9:return d.prev=9,d.t0=d.catch(2),d.next=13,f.e.error(d.t0);case 13:r&&r(d.t0);case 14:case"end":return d.stop()}}),bt,null,[[2,9]])}function Ii(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.data,n=e.resolve,r=e.reject,i=t.videoId,o.prev=2,!i.includes(xn)){o.next=8;break}o.t0=[],o.next=11;break;case 8:return o.next=10,y.e.get("videos/".concat(i,"/semantics/notes"));case 10:o.t0=o.sent;case 11:a=o.t0,n&&n(a),o.next=18;break;case 15:o.prev=15,o.t1=o.catch(2),r&&r(o.t1);case 18:case"end":return o.stop()}}),yt,null,[[2,15]])}function Mi(e){var n,r,i,a,o,s,l,c,u;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,a=n.videoId,o=n.title,s=n.category,l=n.courseCode,c=n.entireCourse,d.prev=2,d.next=5,y.e.post("videos/".concat(a,"/clones"),{title:o,category:s,courseCode:l,entireCourse:c});case 5:return u=d.sent,d.next=8,f.e.success(t("message.cloneVideoSuccessfully",{menu:Sn[s]}));case 8:r&&r(u),d.next=16;break;case 11:return d.prev=11,d.t0=d.catch(2),d.next=15,f.e.error(d.t0);case 15:i&&i(d.t0);case 16:case"end":return d.stop()}}),At,null,[[2,11]])}function Pi(e){var t,n,r;return d.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.resolve,n=e.reject,i.prev=1,i.next=4,y.o.get("videos/levelBackgrounds");case 4:return r=i.sent,i.next=7,Object(h.h)({type:v.e.GET_LEVEL_BACKGROUNDS_SUCCESS,data:r});case 7:t&&t(r),i.next=15;break;case 10:return i.prev=10,i.t0=i.catch(1),i.next=14,f.e.error(i.t0);case 14:n&&n(i.t0);case 15:case"end":return i.stop()}}),_t,null,[[1,10]])}function Di(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.courseId,a=t.isPrimaryCourse,s.next=5,y.e.get("videos/courses/".concat(i,"/findMasters"),{params:{isPrimaryCourse:a}});case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),wt,null,[[1,9]])}function Ni(e){var t,n,r,i,a,o,s,l,c,u,h;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=e.data,n=e.resolve,r=e.reject,d.prev=1,i=t.courseId,a=t.inclMaster,o=t.primary,s=t.filter,"people"!==(l=f.c.getCurrentVideoCategory(!0))){d.next=6;break}return d.abrupt("return");case 6:return c=yn[l.toUpperCase()],u=l===vn.COMPOSING?_n[s]:void 0,d.next=10,y.e.get("videos/".concat(i,"/").concat(c),{params:{inclMaster:a,primary:o,subScope:u}});case 10:h=d.sent,n&&n({courseId:i,response:h}),d.next=19;break;case 14:return d.prev=14,d.t0=d.catch(1),d.next=18,f.e.error(d.t0);case 18:r&&r(d.t0);case 19:case"end":return d.stop()}}),Et,null,[[1,14]])}function Li(e){var n;return d.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.data,r.prev=1,r.next=4,y.f.put("videos/".concat(n,"/retranscribe"));case 4:return r.next=6,f.e.success(t("message.retranscribeVideo"));case 6:r.next=12;break;case 8:return r.prev=8,r.t0=r.catch(1),r.next=12,f.e.error(r.t0);case 12:case"end":return r.stop()}}),St,null,[[1,8]])}function Ri(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,l.prev=1,i=t.videoId,a=t.scaffId,o=f.c.getCurrentVideoCategory(),l.next=6,y.e.get("videos/".concat(i,"/description"),{params:{userScaffId:a,scope:yn[o.toUpperCase()]}});case 6:s=l.sent,n&&n((null==s?void 0:s.value)||""),l.next=15;break;case 10:return l.prev=10,l.t0=l.catch(1),l.next=14,f.e.error(l.t0);case 14:r&&r(l.t0);case 15:case"end":return l.stop()}}),Ct,null,[[1,10]])}function Bi(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.videoId,a=t.description,s.next=5,y.e.put("videos/".concat(i,"/description"),{key:"description",value:a});case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),Tt,null,[[1,9]])}function ji(e){var n,r,i,a,o,s,l,c,u,h,p,m;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,d.prev=1,a=n.srcVideoId,o=n.targetVideoId,s=n.srcChapterIds,l=n.dstPart,c=n.dstVideoId,u=n.position,h=n.inclSemanticTexts,p=n.inclHighlights,d.next=5,y.e.put("videos/".concat(o,"/chapters"),{srcVideoId:a,srcChapterIds:s,dstPart:l,dstVideoId:c,position:u,inclSemanticTexts:h,inclHighlights:p});case 5:return m=d.sent,d.next=8,f.e.success(t("message.copyChaptersSuccess"));case 8:r&&r(m),d.next=16;break;case 11:return d.prev=11,d.t0=d.catch(1),d.next=15,f.e.error(d.t0);case 15:i&&i(d.t0);case 16:case"end":return d.stop()}}),kt,null,[[1,11]])}function Fi(e){var n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=e.data,r=e.resolve,i=e.reject,c.prev=1,a=n.videoId,o=n.chapterId1,s=n.chapterId2,c.next=5,y.e.post("videos/".concat(a,"/chapters/swapping"),{first:o,second:s});case 5:return l=c.sent,c.next=8,f.e.success(t("message.swapChaptersSuccess"));case 8:r&&r(l),c.next=16;break;case 11:return c.prev=11,c.t0=c.catch(1),c.next=15,f.e.error(c.t0);case 15:i&&i(c.t0);case 16:case"end":return c.stop()}}),xt,null,[[1,11]])}function Ui(e){var n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n=e.data,r=e.resolve,i=e.reject,o.prev=1,o.next=4,y.e.post("products",w({},n));case 4:return a=o.sent,o.next=7,f.e.success(t("message.createdResourceSuccessfully",{name:n.title}));case 7:r&&r(a),o.next=15;break;case 10:return o.prev=10,o.t0=o.catch(1),o.next=14,f.e.error(o.t0);case 14:i&&i(o.t0);case 15:case"end":return o.stop()}}),Ot,null,[[1,10]])}function Hi(e){var t,n,r,i,a,o,s,l,c,u;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.data,n=e.resolve,r=e.reject,d.prev=1,t.videoId,i=t.approvalStatuses,a=t.keywords,o=t.types,s=void 0===o?[]:o,l=t.subtypes,c=void 0===l?[]:l,d.next=5,y.e.post("products/search",{approvalStatuses:i,keywords:a,types:s,subtypes:c});case 5:u=d.sent,n&&n(u),d.next=14;break;case 9:return d.prev=9,d.t0=d.catch(1),d.next=13,f.e.error(d.t0);case 13:r&&r(d.t0);case 14:case"end":return d.stop()}}),It,null,[[1,9]])}function zi(e){var n,r,i,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=e.data,r=e.resolve,i=e.reject,c.prev=1,o=n.id,s=a()(n,["id"]),c.next=5,y.e.put("products/".concat(o),w({},s));case 5:return l=c.sent,c.next=8,f.e.success(t("message.updateResourceSuccessfully",{name:n.title}));case 8:r&&r(l),c.next=16;break;case 11:return c.prev=11,c.t0=c.catch(1),c.next=15,f.e.error(c.t0);case 15:i&&i(c.t0);case 16:case"end":return c.stop()}}),Mt,null,[[1,11]])}function Vi(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,l.prev=1,a=n.productId,o=n.title,l.next=5,y.e.delete("products/".concat(a));case 5:return s=l.sent,l.next=8,f.e.success(t("message.deleteResourceSuccessfully",{name:o}));case 8:r&&r(s),l.next=16;break;case 11:return l.prev=11,l.t0=l.catch(1),l.next=15,f.e.error(l.t0);case 15:i&&i(l.t0);case 16:case"end":return l.stop()}}),Pt,null,[[1,11]])}function Wi(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,l.prev=1,a=n.productId,o=n.title,l.next=5,y.e.put("products/".concat(a,"/registration"));case 5:return s=l.sent,l.next=8,f.e.success(t("message.registerForCourseSuccessfully",{name:o}));case 8:r&&r(s),l.next=16;break;case 11:return l.prev=11,l.t0=l.catch(1),l.next=15,f.e.error(l.t0);case 15:i&&i(l.t0);case 16:case"end":return l.stop()}}),Dt,null,[[1,11]])}function Gi(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.videoId,a=[],!i){o.next=10;break}return o.next=7,y.e.get("products/myProducts",{params:{videoId:i}});case 7:a=o.sent,o.next=13;break;case 10:return o.next=12,y.e.get("products/myProductFulls");case 12:a=o.sent;case 13:n&&n(a),o.next=21;break;case 16:return o.prev=16,o.t0=o.catch(1),o.next=20,f.e.error(o.t0);case 20:r&&r(o.t0);case 21:case"end":return o.stop()}}),Nt,null,[[1,16]])}function qi(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,l.prev=1,a=n.productId,o=n.isStoreOwner,l.next=5,y.e.post("products/".concat(a,"/link"));case 5:if(s=l.sent,!o){l.next=11;break}return l.next=9,f.e.success(t("message.linkProductSuccess"));case 9:l.next=13;break;case 11:return l.next=13,f.e.success(t("message.linkProductToReview"));case 13:r&&r(s),l.next=21;break;case 16:return l.prev=16,l.t0=l.catch(1),l.next=20,f.e.error(l.t0);case 20:i&&i(l.t0);case 21:case"end":return l.stop()}}),Lt,null,[[1,16]])}function Yi(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,l.prev=1,a=n.productId,o=n.title,l.next=5,y.e.delete("products/".concat(a,"/link"));case 5:return s=l.sent,l.next=8,f.e.success(t("message.unlinkResourceSuccessfully",{name:o}));case 8:r&&r(s),l.next=16;break;case 11:return l.prev=11,l.t0=l.catch(1),l.next=15,f.e.error(l.t0);case 15:i&&i(l.t0);case 16:case"end":return l.stop()}}),Rt,null,[[1,11]])}function Ki(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,l.prev=1,a=n.productId,o=n.title,l.next=5,y.e.put("products/".concat(a,"/approval"));case 5:return s=l.sent,l.next=8,f.e.success(t("message.approveResourceSuccessfully",{name:o}));case 8:r&&r(s),l.next=16;break;case 11:return l.prev=11,l.t0=l.catch(1),l.next=15,f.e.error(l.t0);case 15:i&&i(l.t0);case 16:case"end":return l.stop()}}),Bt,null,[[1,11]])}function Xi(e){var n,r,i,a,o,s,l;return d.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=e.data,r=e.resolve,i=e.reject,c.prev=1,n.videoId,a=n.productId,o=n.remark,s=n.title,c.next=5,y.e.put("products/".concat(a,"/reject"),o,{headers:{"Content-Type":"text/plain"}});case 5:return l=c.sent,c.next=8,f.e.success(t("message.rejectResourceSuccessfully",{name:s}));case 8:r&&r(l),c.next=16;break;case 11:return c.prev=11,c.t0=c.catch(1),c.next=15,f.e.error(c.t0);case 15:i&&i(c.t0);case 16:case"end":return c.stop()}}),jt,null,[[1,11]])}function Qi(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.videoId,a=t.productId,s.next=5,y.e.get(i?"products/video/".concat(i,"/").concat(a,"/content"):"products/video/".concat(a,"/content"));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),Ft,null,[[1,9]])}function $i(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.orderId,o.next=5,y.e.get("products/order/".concat(i,"/downloadResources"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Ut,null,[[1,9]])}function Ji(e){var n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return n=e.data,r=e.resolve,i=e.reject,s.prev=1,n.videoId,a=n.productIds,s.next=5,y.e.post("products/arrangment",a);case 5:return o=s.sent,s.next=8,f.e.success(t("message.arrangeProductsSuccess"));case 8:r&&r(o),s.next=16;break;case 11:return s.prev=11,s.t0=s.catch(1),s.next=15,f.e.error(s.t0);case 15:i&&i(s.t0);case 16:case"end":return s.stop()}}),Ht,null,[[1,11]])}function Zi(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.videoId,a=t.formData,s.next=5,y.e.post("products/video/".concat(i,"/store"),a);case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),zt,null,[[1,9]])}function ea(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.videoId,a=t.formData,s.next=5,y.e.put("products/video/".concat(i,"/store"),a);case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),Vt,null,[[1,9]])}function ta(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.videoId,o.next=5,y.e.delete("products/video/".concat(i,"/store"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Wt,null,[[1,9]])}function na(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.videoId,o.next=5,y.e.get("products/video/".concat(i,"/store"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Gt,null,[[1,9]])}function ra(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.videoId,o.next=5,y.e.put("products/video/".concat(i,"/storeConnection"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),qt,null,[[1,9]])}function ia(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.videoId,o.next=5,y.e.delete("products/video/".concat(i,"/storeConnection"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Yt,null,[[1,9]])}function aa(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.storeId,o.next=5,y.e.put("products/stores/".concat(i,"/views"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Kt,null,[[1,9]])}function oa(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.productId,a=t.flags,s.next=5,y.e.put("products/".concat(i,"/counts?flags=").concat(a));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),Xt,null,[[1,9]])}function sa(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.videoId,a=t.chapterId,s.next=5,y.e.get("videos/".concat(i,"/").concat(a,"/episodes"));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),Qt,null,[[1,9]])}function la(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.chapterId,o.next=5,y.e.put("videos/chapters/".concat(i,"/views"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),$t,null,[[1,9]])}function ca(e){var n,r,i,a,o,s,l,c;return d.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return n=e.data,r=e.resolve,i=e.reject,u.prev=1,a=n.videoId,o=n.attribute,s=n.file,l=new FormData,u.next=6,l.append("file",s);case 6:return u.next=8,y.e.put("videos/".concat(a,"/file?attribute=").concat(o),l);case 8:return c=u.sent,r&&r(c),u.next=12,f.e.success(t("message.updateSuccessfully"));case 12:u.next=19;break;case 14:return u.prev=14,u.t0=u.catch(1),u.next=18,f.e.error(u.t0);case 18:i&&i(u.t0);case 19:case"end":return u.stop()}}),Jt,null,[[1,14]])}function ua(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.storeId,o.next=5,y.e.get("products/stores/".concat(i,"/members"));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),Zt,null,[[1,9]])}function da(e){var t,n,r,i,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,l.prev=1,i=t.storeId,o=a()(t,["storeId"]),l.next=5,y.e.post("products/stores/".concat(i,"/members"),o);case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(1),l.next=13,f.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),en,null,[[1,9]])}function ha(e){var t,n,r,i,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,l.prev=1,i=t.storeId,o=a()(t,["storeId"]),l.next=5,y.e.put("products/stores/".concat(i,"/members"),o);case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(1),l.next=13,f.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),tn,null,[[1,9]])}function fa(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.storeId,a=t.memberId,s.next=5,y.e.delete("products/stores/".concat(i,"/members/").concat(a));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),nn,null,[[1,9]])}function pa(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,l.prev=1,i=t.storeId,a=t.memberId,o=t.message,l.next=5,y.e.post("products/stores/".concat(i,"/members/").concat(a),{content:o});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(1),l.next=13,f.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),rn,null,[[1,9]])}function ma(e){var t,n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.data,n=e.resolve,r=e.reject,l.prev=1,i=t.storeId,a=t.memberId,o=t.message,l.next=5,y.e.put("products/stores/".concat(i,"/members/").concat(a),{content:o});case 5:s=l.sent,n&&n(s),l.next=14;break;case 9:return l.prev=9,l.t0=l.catch(1),l.next=13,f.e.error(l.t0);case 13:r&&r(l.t0);case 14:case"end":return l.stop()}}),an,null,[[1,9]])}function ga(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.storeId,a=t.memberId,s.next=5,y.e.put("products/stores/".concat(i,"/members/").concat(a,"/messages"));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),on,null,[[1,9]])}function va(e){var t,n,r,i,a,o;return d.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.data,n=e.resolve,r=e.reject,s.prev=1,i=t.storeId,a=t.params,s.next=5,y.e.post("products/stores/".concat(i,"/members/search"),w({terms:"",pageNumber:1,pageSize:5,statuses:["Needs_Attention","Pending","Approved","Messaging"]},a));case 5:o=s.sent,n&&n(o),s.next=14;break;case 9:return s.prev=9,s.t0=s.catch(1),s.next=13,f.e.error(s.t0);case 13:r&&r(s.t0);case 14:case"end":return s.stop()}}),sn,null,[[1,9]])}function ba(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.keyword,o.next=5,y.e.get("videos/publicCourses?q=".concat(i));case 5:a=o.sent,n&&n(a),o.next=14;break;case 9:return o.prev=9,o.t0=o.catch(1),o.next=13,f.e.error(o.t0);case 13:r&&r(o.t0);case 14:case"end":return o.stop()}}),ln,null,[[1,9]])}function ya(e){var t,n,r,i,a;return d.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.data,n=e.resolve,r=e.reject,o.prev=1,i=t.videoId,o.next=5,y.e.get("videos/".concat(i,"/files"));case 5:return a=o.sent,o.next=8,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{data:{files:a},videoId:i}});case 8:n&&n(a),o.next=16;break;case 11:return o.prev=11,o.t0=o.catch(1),o.next=15,f.e.error(o.t0);case 15:r&&r(o.t0);case 16:case"end":return o.stop()}}),cn,null,[[1,11]])}function Aa(e){var n,r,i,a,o,s,l,c,u,p;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,d.prev=1,a=n.videoId,o=n.type,s=n.file,l=n.displayName,c=n.minPlan,u=new FormData,s&&u.append("file",s,s.name),l&&u.append("displayName",l),c&&u.append("minPlan",c),d.next=9,y.e.post("videos/".concat(a,"/files?type=").concat(o),u,{headers:{"Content-Type":"multipart/form-data; boundary=".concat(u._boundary)}});case 9:return p=d.sent,d.next=12,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{data:{files:p},videoId:a}});case 12:return d.next=14,f.e.success(t("message.uploadCourseFileSuccessfully"));case 14:r&&r(p),d.next=22;break;case 17:return d.prev=17,d.t0=d.catch(1),d.next=21,f.e.error(d.t0);case 21:i&&i(d.t0);case 22:case"end":return d.stop()}}),un,null,[[1,17]])}function _a(e){var n,r,i,a,o,s,l,c,u,p,m;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return n=e.data,r=e.resolve,i=e.reject,d.prev=1,a=n.videoId,o=n.fileId,s=n.type,l=n.file,c=n.displayName,u=n.minPlan,p=new FormData,l&&p.append("file",l,l.name),c&&p.append("displayName",c),u&&p.append("minPlan",u),d.next=9,y.e.put("videos/".concat(a,"/files/").concat(o,"?type=").concat(s),p,{headers:{"Content-Type":"multipart/form-data; boundary=".concat(p._boundary)}});case 9:return m=d.sent,d.next=12,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{data:{files:m},videoId:a}});case 12:return d.next=14,f.e.success(t("message.updateCourseFileSuccessfully"));case 14:r&&r(m),d.next=22;break;case 17:return d.prev=17,d.t0=d.catch(1),d.next=21,f.e.error(d.t0);case 21:i&&i(d.t0);case 22:case"end":return d.stop()}}),dn,null,[[1,17]])}function wa(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,l.prev=1,a=n.videoId,o=n.fileId,l.next=5,y.e.delete("videos/".concat(a,"/files/").concat(o));case 5:return s=l.sent,l.next=8,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{data:{files:s},videoId:a}});case 8:return l.next=10,f.e.success(t("message.deleteCourseFileSuccessfully"));case 10:r&&r(s),l.next=18;break;case 13:return l.prev=13,l.t0=l.catch(1),l.next=17,f.e.error(l.t0);case 17:i&&i(l.t0);case 18:case"end":return l.stop()}}),hn,null,[[1,13]])}function Ea(e){var n,r,i,a,o,s;return d.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.data,r=e.resolve,i=e.reject,l.prev=1,a=n.videoId,o=n.idList,l.next=5,y.e.put("videos/".concat(a,"/files"),o);case 5:return s=l.sent,l.next=8,Object(h.h)({type:v.e.UPDATE_COGVID_LIST_ITEM,data:{data:{files:s},videoId:a}});case 8:return l.next=10,f.e.success(t("message.arrangeCourseFilesSuccessfully"));case 10:r&&r(s),l.next=18;break;case 13:return l.prev=13,l.t0=l.catch(1),l.next=17,f.e.error(l.t0);case 17:i&&i(l.t0);case 18:case"end":return l.stop()}}),fn,null,[[1,13]])}function Sa(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(h.j)(v.e.GET_MY_COGVID_LIST,Nn);case 2:return e.next=4,Object(h.j)(v.e.MERGE_FETCHED_VIDEOS,jn);case 4:return e.next=6,Object(h.j)(v.e.GET_COGVID_DETAILS,Wn);case 6:return e.next=8,Object(h.j)(v.e.GET_VIDEO_STATE,Gn);case 8:return e.next=10,Object(h.j)(v.e.HIGHLIGHTS_APPLY,Hn);case 10:return e.next=12,Object(h.j)(v.e.HIGHLIGHTS_DELETE,zn);case 12:return e.next=14,Object(h.j)(v.e.HIGHLIGHTS_UPDATE,Vn);case 14:return e.next=16,Object(h.j)(v.e.UPDATE_SB_CONTENT,qn);case 16:return e.next=18,Object(h.j)(v.e.UPDATE_CHAPTER_ITEM,Yn);case 18:return e.next=20,Object(h.j)(v.e.UPDATE_CHAPTER_LOCK,Kn);case 20:return e.next=22,Object(h.j)(v.e.UPDATE_CHAPTER_FREE_FUI,Xn);case 22:return e.next=24,Object(h.j)(v.e.REMOVE_A_CHAPTER,$n);case 24:return e.next=26,Object(h.j)(v.e.ADD_A_NEW_CHAPTER,Jn);case 26:return e.next=28,Object(h.j)(v.e.SET_PRIVACY_CHAPTER,Zn);case 28:return e.next=30,Object(h.j)(v.e.GET_COGVID_LIST,Ln);case 30:return e.next=32,Object(h.j)(v.e.LOAD_MORE_COGVID_LIST,Bn);case 32:return e.next=34,Object(h.j)(v.e.REORDER_CHAPTER_API,Qn);case 34:return e.next=36,Object(h.j)(v.e.GET_CG,er);case 36:return e.next=38,Object(h.j)(v.e.GET_SB,tr);case 38:return e.next=40,Object(h.j)(v.e.SEARCH_WITHIN_VIDEO,rr);case 40:return e.next=42,Object(h.j)(v.e.GET_AUTHOR_PROFILE,Fn);case 42:return e.next=44,Object(h.j)(v.e.SEARCH_COGVID_LIST,ir);case 44:return e.next=46,Object(h.j)(v.e.GET_PROCESSING_COGVID_STATUS_LIST,ar);case 46:return e.next=48,Object(h.j)(v.e.CANCEL_VIDEO_PROCESSING,or);case 48:return e.next=50,Object(h.j)(v.e.RETRY_VIDEO_PROCESSING,sr);case 50:return e.next=52,Object(h.j)(v.e.EDIT_COGVID_INFO,cr);case 52:return e.next=54,Object(h.i)(v.e.ATTACH_FILES_TO_VIDEO,ur);case 54:return e.next=56,Object(h.i)(v.e.UPDATE_VIDEO_ATTACHMENT,dr);case 56:return e.next=58,Object(h.i)(v.e.UPDATE_VIDEO_ATTACHMENT_ORDER,hr);case 58:return e.next=60,Object(h.i)(v.e.DELETE_VIDEO_ATTACHMENT,fr);case 60:return e.next=62,Object(h.i)(v.e.ATTACH_FILES_TO_CHAPTER,pr);case 62:return e.next=64,Object(h.i)(v.e.DELETE_CHAPTER_ATTACHMENT,mr);case 64:return e.next=66,Object(h.e)(100,v.e.GET_VIDEO_ATTACHMENTS,gr);case 66:return e.next=68,Object(h.i)(v.e.DOWNLOAD_ATTACHMENT,vr);case 68:return e.next=70,Object(h.j)(v.e.GET_GALLERY_VIDEO,xr);case 70:return e.next=72,Object(h.j)(v.e.GET_LECTURE_VIDEO,Or);case 72:return e.next=74,Object(h.j)(v.e.IMPORT_SUBTITLE,br);case 74:return e.next=76,Object(h.j)(v.e.PUBLIC_COGVID_VIDEO,yr);case 76:return e.next=78,Object(h.j)(v.e.CHANGE_PUBLIC_COGVID_VIDEO_SCOPE,Ar);case 78:return e.next=80,Object(h.j)(v.e.CANCEL_PUBLIC_COGVID_VIDEO,_r);case 80:return e.next=82,Object(h.j)(v.e.GET_PUBLIC_COGVID_VIDEO_FEEDBACK,wr);case 82:return e.next=84,Object(h.j)(v.e.GET_PUBLIC_COGVID_VIDEO_LAST_STATUS,Er);case 84:return e.next=86,Object(h.j)(v.e.UNPUBLISH_VIDEO,Cr);case 86:return e.next=88,Object(h.j)(v.e.CLONE_COGNITIVE_VIDEO,Tr);case 88:return e.next=90,Object(h.j)(v.e.EXPORT_COGNITIVE_VIDEO_LINK,kr);case 90:return e.next=92,Object(h.j)(v.e.SET_VIDEO_COVER_IMG,Ir);case 92:return e.next=94,Object(h.j)(v.e.SET_VIDEO_COVER_IMG_HTML,Mr);case 94:return e.next=96,Object(h.e)(100,v.e.GET_VIDEO_CHAPTERS_ATTACHMENTS,Pr);case 96:return e.next=98,Object(h.i)(v.e.UPDATE_CHAPTER_ATTACHMENT,Dr);case 98:return e.next=100,Object(h.i)(v.e.UPDATE_CHAPTER_ATTACHMENT_LOCK,Nr);case 100:return e.next=102,Object(h.i)(v.e.UPDATE_CHAPTER_ATTACHMENT_ORDER,Lr);case 102:return e.next=104,Object(h.i)(v.e.DELETE_VIDEO,Rr);case 104:return e.next=106,Object(h.i)(v.e.DELETE_VIDEO_SHARED_TO_ME,Br);case 106:return e.next=108,Object(h.j)(v.e.GET_RAW_VIDEOS,jr);case 108:return e.next=110,Object(h.j)(v.e.UPDATE_VIDEO_ATTACHMENT_THUMBNAIL,Fr);case 110:return e.next=112,Object(h.j)(v.e.UPDATE_CHAPTER_ATTACHMENT_THUMBNAIL,Ur);case 112:return e.next=114,Object(h.j)(v.e.UPDATE_CHAPTER_SLIDE,Hr);case 114:return e.next=116,Object(h.j)(v.e.UPDATE_CHAPTERS_FILES,zr);case 116:return e.next=118,Object(h.j)(v.e.DELETE_CHAPTER_SLIDE,Vr);case 118:return e.next=120,Object(h.j)(v.e.INSERT_VIDEO,Wr);case 120:return e.next=122,Object(h.j)(v.e.SET_STYLE_FOR_CHAPTER,Gr);case 122:return e.next=124,Object(h.j)(v.e.GET_VIDEO_SHARING_INFO,qr);case 124:return e.next=126,Object(h.j)(v.e.GET_VIDEO_SHARED_USERS,Yr);case 126:return e.next=128,Object(h.j)(v.e.GET_VIDEO_ROLES,Kr);case 128:return e.next=130,Object(h.j)(v.e.GET_VIDEO_SETTING,Xr);case 130:return e.next=132,Object(h.j)(v.e.SHARE_VIDEO,Jr);case 132:return e.next=134,Object(h.j)(v.e.EXTRACT_CHAPTERS,Qr);case 134:return e.next=136,Object(h.j)(v.e.EXTRACT_HIGHLIGHTS,$r);case 136:return e.next=138,Object(h.j)(v.e.GET_CHAPTER_ATTACHMENT_SKETCH,Zr);case 138:return e.next=140,Object(h.i)(v.e.EDIT_CHAPTER_ATTACHMENT_SKETCH,ei);case 140:return e.next=142,Object(h.i)(v.e.DELETE_CHAPTER_ATTACHMENT_SKETCH,ti);case 142:return e.next=144,Object(h.j)(v.e.GET_VIDEO_ATTACHMENT_SKETCH,ni);case 144:return e.next=146,Object(h.i)(v.e.EDIT_VIDEO_ATTACHMENT_SKETCH,ri);case 146:return e.next=148,Object(h.i)(v.e.DELETE_VIDEO_ATTACHMENT_SKETCH,ii);case 148:return e.next=150,Object(h.i)(v.e.UPDATE_MULTIPLE_SB_CONTENT,ai);case 150:return e.next=152,Object(h.i)(v.e.SHARE_CHAPTER,oi);case 152:return e.next=154,Object(h.i)(v.e.GET_CHAPTER_SHARING_INFO,si);case 154:return e.next=156,Object(h.i)(v.e.GET_CHAPTER_SHARING_ROLES,li);case 156:return e.next=158,Object(h.i)(v.e.GET_COGVID_THUMBNAIL,Rn);case 158:return e.next=160,Object(h.i)(v.e.UPDATE_COVER_IMAGE_TEMPLATE,ci);case 160:return e.next=162,Object(h.i)(v.e.GET_COVER_IMAGE_TEMPLATE,ui);case 162:return e.next=164,Object(h.i)(v.e.CHAPTER_LIKE,di);case 164:return e.next=166,Object(h.i)(v.e.GET_COURSES,hi);case 166:return e.next=168,Object(h.i)(v.e.GET_COURSE_SERIAL,fi);case 168:return e.next=170,Object(h.i)(v.e.CREATE_COURSE,pi);case 170:return e.next=172,Object(h.i)(v.e.GET_SHAREABLE_VIDEO_ROLES,mi);case 172:return e.next=174,Object(h.i)(v.e.CHANGE_OWNERSHIP,gi);case 174:return e.next=176,Object(h.i)(v.e.TRACKING_DOWNLOAD_ATTACHMENT,vi);case 176:return e.next=178,Object(h.i)(v.e.GET_VIDEO_OWNER_PROFILE,bi);case 178:return e.next=180,Object(h.i)(v.e.CREATE_DAILY_VIDEO,lr);case 180:return e.next=182,Object(h.i)(v.e.TOGGLE_ENABLE_COMMENTS_LIKES,yi);case 182:return e.next=184,Object(h.i)(v.e.LIKE_VIDEO,Ai);case 184:return e.next=186,Object(h.i)(v.e.UNLIKE_VIDEO,_i);case 186:return e.next=188,Object(h.i)(v.e.GET_LIKED_VIDEO_PEOPLE_LIST,wi);case 188:return e.next=190,Object(h.i)(v.e.GET_PARTICIPANTS,Ei);case 190:return e.next=192,Object(h.i)(v.e.CREATE_MEETING,Si);case 192:return e.next=194,Object(h.i)(v.e.GET_SHORTEN_VIDEO_URL,Ci);case 194:return e.next=196,Object(h.i)(v.e.DE_SHORTEN_VIDEO_URL,Ti);case 196:return e.next=198,Object(h.i)(v.e.SEARCH_KEYWORD,ki);case 198:return e.next=200,Object(h.i)(v.e.CREATE_VIDEO_KEYWORD,xi);case 200:return e.next=202,Object(h.i)(v.e.FETCH_USER_VIDEOS,Oi);case 202:return e.next=204,Object(h.i)(v.e.FETCH_SB_NOTES,Ii);case 204:return e.next=206,Object(h.i)(v.e.CLONE_VIDEO,Mi);case 206:return e.next=208,Object(h.i)(v.e.GET_LEVEL_BACKGROUNDS,Pi);case 208:return e.next=210,Object(h.i)(v.e.FIND_MASTERS,Di);case 210:return e.next=212,Object(h.i)(v.e.GET_COURSE_VIDEOS,Ni);case 212:return e.next=214,Object(h.i)(v.e.RETRANSCRIBE_VIDEO,Li);case 214:return e.next=216,Object(h.i)(v.e.GET_VIDEO_DESCRIPTION,Ri);case 216:return e.next=218,Object(h.i)(v.e.UPDATE_VIDEO_DESCRIPTION,Bi);case 218:return e.next=220,Object(h.i)(v.e.COPY_CHAPTERS,ji);case 220:return e.next=222,Object(h.i)(v.e.SWAP_CHAPTERS,Fi);case 222:return e.next=224,Object(h.i)(v.e.CREATE_PRODUCT,Ui);case 224:return e.next=226,Object(h.i)(v.e.GET_VIDEO_PRODUCTS,Hi);case 226:return e.next=228,Object(h.i)(v.e.UPDATE_PRODUCT,zi);case 228:return e.next=230,Object(h.i)(v.e.DELETE_PRODUCT,Vi);case 230:return e.next=232,Object(h.i)(v.e.REGISTER_FOR_FREE_COURSE,Wi);case 232:return e.next=234,Object(h.i)(v.e.GET_MY_PRODUCTS,Gi);case 234:return e.next=236,Object(h.i)(v.e.LINK_PRODUCT,qi);case 236:return e.next=238,Object(h.i)(v.e.APPROVE_PRODUCT,Ki);case 238:return e.next=240,Object(h.i)(v.e.REJECT_PRODUCT,Xi);case 240:return e.next=242,Object(h.i)(v.e.DELETE_LINKED_PRODUCT,Yi);case 242:return e.next=244,Object(h.i)(v.e.DOWNLOAD_PRODUCT,Qi);case 244:return e.next=246,Object(h.i)(v.e.GET_DOWNLOAD_RESOURCES,$i);case 246:return e.next=248,Object(h.i)(v.e.ARRANGE_PRODUCTS,Ji);case 248:return e.next=250,Object(h.i)(v.e.CREATE_RESOURCE_STORE,Zi);case 250:return e.next=252,Object(h.i)(v.e.UPDATE_RESOURCE_STORE,ea);case 252:return e.next=254,Object(h.i)(v.e.DELETE_RESOURCE_STORE,ta);case 254:return e.next=256,Object(h.i)(v.e.GET_RESOURCE_STORE,na);case 256:return e.next=258,Object(h.i)(v.e.CONNECT_VIDEO_WITH_STORE,ra);case 258:return e.next=260,Object(h.i)(v.e.DISCONNECT_VIDEO_WITH_STORE,ia);case 260:return e.next=262,Object(h.i)(v.e.INCREASE_STORE_VIEW_COUNT,aa);case 262:return e.next=264,Object(h.i)(v.e.INCREASE_PROD_COUNTS,oa);case 264:return e.next=266,Object(h.i)(v.e.GET_CHAPTER_SEMANTIC_BLOCKS,sa);case 266:return e.next=268,Object(h.i)(v.e.INCREASE_CHAPTER_VIEW_COUNT,la);case 268:return e.next=270,Object(h.i)(v.e.UPDATE_TABLE_OF_CONTENT,ca);case 270:return e.next=272,Object(h.i)(v.e.GET_STORE_MEMBERS,ua);case 272:return e.next=274,Object(h.i)(v.e.ADD_STORE_MEMBER,da);case 274:return e.next=276,Object(h.i)(v.e.UPDATE_STORE_MEMBER,ha);case 276:return e.next=278,Object(h.i)(v.e.REMOVE_STORE_MEMBER,fa);case 278:return e.next=280,Object(h.i)(v.e.REVIEW_STORE_MEMBER,pa);case 280:return e.next=282,Object(h.i)(v.e.APPROVE_STORE_MEMBER,ma);case 282:return e.next=284,Object(h.i)(v.e.READ_STORE_MEMBER_MESSAGES,ga);case 284:return e.next=286,Object(h.i)(v.e.SEARCH_STORE_MEMBERS,va);case 286:return e.next=288,Object(h.i)(v.e.SEARCH_PUBLIC_COURSES,ba);case 288:return e.next=290,Object(h.j)(v.e.GET_COURSE_FILES,ya);case 290:return e.next=292,Object(h.j)(v.e.UPLOAD_COURSE_FILE,Aa);case 292:return e.next=294,Object(h.j)(v.e.UPDATE_COURSE_FILE,_a);case 294:return e.next=296,Object(h.j)(v.e.DELETE_COURSE_FILE,wa);case 296:return e.next=298,Object(h.j)(v.e.ARRANGE_COURSE_FILES,Ea);case 298:case"end":return e.stop()}}),pn)}},function(e,t,n){"use strict";t.a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return null!=e})).reduce((function(e,t){if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),null)}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",stepper:"stepper--34GpQ",stepperIcon:"stepperIcon--3TsLk",stepperIconDisabled:"stepperIconDisabled--18MeM",inputValue:"inputValue--1Vt5y"}},function(e,t,n){"use strict";var r=n(388);var i=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)};t.a=function(e,t,n,a){return Object(r.a)(e,t,n,a),function(){i(e,t,n,a)}}},function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return ae})),n.d(t,"d",(function(){return oe}));var r=n(291),i=n(145),a=n.n(i),o=n(409),s=n(1014),l=function(e){return!!e&&"object"==typeof e},c=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return"object"!=typeof n?t:(Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):l(t[r])&&l(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t)}),{})},u=function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},h=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},f=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},p="INVALID_NUMBER_OF_PERIOD",m="DASH_EMPTY_MANIFEST",g="DASH_INVALID_XML",v="NO_BASE_URL",b="SEGMENT_TIME_UNSPECIFIED",y="UNSUPPORTED_UTC_TIMING_SCHEME",A=function(e){var t=e.baseUrl,n=void 0===t?"":t,i=e.source,o=void 0===i?"":i,s=e.range,l=void 0===s?"":s,c=e.indexRange,u=void 0===c?"":c,d={uri:o,resolvedUri:Object(r.a)(n||"",o)};if(l||u){var h,f=(l||u).split("-"),p=a.a.BigInt?a.a.BigInt(f[0]):parseInt(f[0],10),m=a.a.BigInt?a.a.BigInt(f[1]):parseInt(f[1],10);p<Number.MAX_SAFE_INTEGER&&"bigint"==typeof p&&(p=Number(p)),m<Number.MAX_SAFE_INTEGER&&"bigint"==typeof m&&(m=Number(m)),"bigint"==typeof(h="bigint"==typeof m||"bigint"==typeof p?a.a.BigInt(m)-a.a.BigInt(p)+a.a.BigInt(1):m-p+1)&&h<Number.MAX_SAFE_INTEGER&&(h=Number(h)),d.byterange={length:h,offset:p}}return d},_=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},w={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration,a=e.periodDuration,o=_(e.endNumber),s=t/r;return"number"==typeof o?{start:0,end:o}:"number"==typeof a?{start:0,end:a/s}:{start:0,end:i/s}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,a=void 0===i?1:i,o=e.duration,s=e.periodStart,l=void 0===s?0:s,c=e.minimumUpdatePeriod,u=void 0===c?0:c,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,f=_(e.endNumber),p=(t+n)/1e3,m=r+l,g=p+u-m,v=Math.ceil(g*a/o),b=Math.floor((p-m-h)*a/o),y=Math.floor((p-m)*a/o);return{start:Math.max(0,b),end:"number"==typeof f?f:Math.min(v,y)}}},E=function(e){var t=e.type,n=e.duration,r=e.timescale,i=void 0===r?1:r,a=e.periodDuration,o=e.sourceDuration,s=w[t](e),l=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(s.start,s.end).map(function(e){return function(t){var n=e.duration,r=e.timescale,i=void 0===r?1:r,a=e.periodStart,o=e.startNumber;return{number:(void 0===o?1:o)+t,duration:n/i,timeline:a,time:t*n}}}(e));if("static"===t){var c=l.length-1,u="number"==typeof a?a:o;l[c].duration=u-n/i*c}return l},S=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,a=e.indexRange,o=void 0===a?"":a,s=e.periodStart,l=e.presentationTime,c=e.number,u=void 0===c?0:c,d=e.duration;if(!t)throw new Error(v);var h=A({baseUrl:t,source:r.sourceURL,range:r.range}),f=A({baseUrl:t,source:t,indexRange:o});if(f.map=h,d){var p=E(e);p.length&&(f.duration=p[0].duration,f.timeline=p[0].timeline)}else i&&(f.duration=i,f.timeline=s);return f.presentationTime=l||s,f.number=u,[f]},C=function(e,t,n){var r,i=e.sidx.map?e.sidx.map:null,o=e.sidx.duration,s=e.timeline||0,l=e.sidx.byterange,c=l.offset+l.length,u=t.timescale,d=t.references.filter((function(e){return 1!==e.referenceType})),h=[],f=e.endList?"static":"dynamic",p=e.sidx.timeline,m=p,g=e.mediaSequence||0;r="bigint"==typeof t.firstOffset?a.a.BigInt(c)+t.firstOffset:c+t.firstOffset;for(var v=0;v<d.length;v++){var b=t.references[v],y=b.referencedSize,A=b.subsegmentDuration,_=void 0;_="bigint"==typeof r?r+a.a.BigInt(y)-a.a.BigInt(1):r+y-1;var w=S({baseUrl:n,timescale:u,timeline:s,periodStart:p,presentationTime:m,number:g,duration:A,sourceDuration:o,indexRange:r+"-"+_,type:f})[0];i&&(w.map=i),h.push(w),r+="bigint"==typeof r?a.a.BigInt(y):y,m+=A/u,g++}return e.segments=h,e},T=["AUDIO","SUBTITLES"],k=function(e){return(t=e,n=function(e){return e.timeline},u(t.reduce((function(e,t){return t.forEach((function(t){e[n(t)]=t})),e}),{}))).sort((function(e,t){return e.timeline>t.timeline?1:-1}));var t,n},x=function(e){var t=[];return function(e,t,n){t.forEach((function(t){for(var r in e.mediaGroups[t])for(var i in e.mediaGroups[t][r]){var a=e.mediaGroups[t][r][i];n(a,t,r,i)}}))}(e,T,(function(e,n,r,i){t=t.concat(e.playlists||[])})),t},O=function(e){var t=e.playlist,n=e.mediaSequence;t.mediaSequence=n,t.segments.forEach((function(e,n){e.number=t.mediaSequence+n}))},I=function(e){var t=e.oldManifest,n=e.newManifest,r=t.playlists.concat(x(t)),i=n.playlists.concat(x(n));return n.timelineStarts=k([t.timelineStarts,n.timelineStarts]),function(e){var t=e.oldPlaylists,n=e.newPlaylists,r=e.timelineStarts;n.forEach((function(e){e.discontinuitySequence=f(r,(function(t){return t.timeline===e.timeline}));var n=function(e,t){for(var n=0;n<e.length;n++)if(e[n].attributes.NAME===t)return e[n];return null}(t,e.attributes.NAME);if(n&&!e.sidx){var i=e.segments[0],a=f(n.segments,(function(e){return Math.abs(e.presentationTime-i.presentationTime)<1/60}));if(-1===a)return O({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[a].discontinuity&&!i.discontinuity&&(i.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),O({playlist:e,mediaSequence:n.segments[a].number})}}))}({oldPlaylists:r,newPlaylists:i,timelineStarts:n.timelineStarts}),n},M=function(e){return e&&e.uri+"-"+(t=e.byterange,n="bigint"==typeof t.offset||"bigint"==typeof t.length?a.a.BigInt(t.offset)+a.a.BigInt(t.length)-a.a.BigInt(1):t.offset+t.length-1,t.offset+"-"+n);var t,n},P=function(e){return u(e.reduce((function(e,t){var n=t.attributes.id+(t.attributes.lang||"");if(e[n]){var r;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(r=e[n].segments).push.apply(r,t.segments);t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)}else e[n]=t,e[n].attributes.timelineStarts=[];return e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{})).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments||[],n="discontinuity",t.reduce((function(e,t,r){return t[n]&&e.push(r),e}),[])),e}))},D=function(e,t){var n=M(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&C(e,r,e.sidx.resolvedUri),e},N=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=D(e[n],t);return e},L=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,a=e.discontinuityStarts,o={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:a,timelineStarts:n.timelineStarts,segments:r};return n.frameRate&&(o.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},R=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},B=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},j=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},F=function(e){return e?Object.keys(e).reduce((function(t,n){var r=e[n];return t.concat(r.playlists)}),[]):[]},U=function(e){var t,n=e.dashPlaylists,r=e.locations,i=e.sidxMapping,a=void 0===i?{}:i,o=e.previousManifest;if(!n.length)return{};var s=n[0].attributes,l=s.sourceDuration,c=s.type,u=s.suggestedPresentationDelay,d=s.minimumUpdatePeriod,h=P(n.filter(R)).map(L),p=P(n.filter(B)),m=P(n.filter(j)),g=n.map((function(e){return e.attributes.captionServices})).filter(Boolean),v={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:l,playlists:N(h,a)};d>=0&&(v.minimumUpdatePeriod=1e3*d),r&&(v.locations=r),"dynamic"===c&&(v.suggestedPresentationDelay=u);var b,y,A=0===v.playlists.length,_=p.length?function(e,t,n){var r;void 0===t&&(t={}),void 0===n&&(n=!1);var i=e.reduce((function(e,i){var a=i.attributes.role&&i.attributes.role.value||"",o=i.attributes.lang||"",s=i.attributes.label||"main";if(o&&!i.attributes.label){var l=a?" ("+a+")":"";s=""+i.attributes.lang+l}e[s]||(e[s]={language:o,autoselect:!0,default:"main"===a,playlists:[],uri:""});var c=D(function(e,t){var n,r=e.attributes,i=e.segments,a=e.sidx,o=e.mediaSequence,s=e.discontinuitySequence,l=e.discontinuityStarts,c={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:"",targetDuration:r.duration,discontinuitySequence:s,discontinuityStarts:l,timelineStarts:r.timelineStarts,mediaSequence:o,segments:i};return r.contentProtection&&(c.contentProtection=r.contentProtection),a&&(c.sidx=a),t&&(c.attributes.AUDIO="audio",c.attributes.SUBTITLES="subs"),c}(i,n),t);return e[s].playlists.push(c),void 0===r&&"main"===a&&((r=i).default=!0),e}),{});r||(i[Object.keys(i)[0]].default=!0);return i}(p,a,A):null,w=m.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(D(function(e){var t,n=e.attributes,r=e.segments,i=e.mediaSequence,a=e.discontinuityStarts,o=e.discontinuitySequence;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var s=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(s.CODECS=n.codecs),{attributes:s,uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:i,segments:r}}(n),t)),e}),{})}(m,a):null,E=h.concat(F(_),F(w)),S=E.map((function(e){return e.timelineStarts}));return v.timelineStarts=k(S),b=E,y=v.timelineStarts,b.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=f(y,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),_&&(v.mediaGroups.AUDIO.audio=_),w&&(v.mediaGroups.SUBTITLES.subs=w),g.length&&(v.mediaGroups["CLOSED-CAPTIONS"].cc=g.reduce((function(e,t){return t?(t.forEach((function(t){var n=t.channel,r=t.language;e[r]={autoselect:!1,default:!1,instreamId:n,language:r},t.hasOwnProperty("aspectRatio")&&(e[r].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[r].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[r]["3D"]=t["3D"])})),e):e}),{})),o?I({oldManifest:o,newManifest:v}):v},H=function(e,t,n){var r=e.NOW,i=e.clientOffset,a=e.availabilityStartTime,o=e.timescale,s=void 0===o?1:o,l=e.periodStart,c=void 0===l?0:l,u=e.minimumUpdatePeriod,d=(r+i)/1e3+(void 0===u?0:u)-(a+c);return Math.ceil((d*s-t)/n)},z=function(e,t){for(var n=e.type,r=e.minimumUpdatePeriod,i=void 0===r?0:r,a=e.media,o=void 0===a?"":a,s=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,u=e.startNumber,d=void 0===u?1:u,h=e.periodStart,f=[],p=-1,m=0;m<t.length;m++){var g=t[m],v=g.d,b=g.r||0,y=g.t||0;p<0&&(p=y),y&&y>p&&(p=y);var A=void 0;if(b<0){var _=m+1;A=_===t.length?"dynamic"===n&&i>0&&o.indexOf("$Number$")>0?H(e,p,v):(s*c-p)/v:(t[_].t-p)/v}else A=b+1;for(var w=d+f.length+A,E=d+f.length;E<w;)f.push({number:E,duration:v/c,time:p,timeline:h}),p+=v,E++}return f},V=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,W=function(e,t){return e.replace(V,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(i=r?parseInt(i,10):1,a.length>=i?a:""+new Array(i-a.length+1).join("0")+a)}}(t))},G=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,a=void 0===i?{sourceURL:"",range:""}:i,o=A({baseUrl:e.baseUrl,source:W(a.sourceURL,n),range:a.range});return function(e,t){return e.duration||t?e.duration?E(e):z(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var i=W(e.media||"",n),a=e.timescale||1,s=e.presentationTimeOffset||0,l=e.periodStart+(t.time-s)/a;return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:Object(r.a)(e.baseUrl||"",i),map:o,number:t.number,presentationTime:l}}))},q=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r,a=e.periodStart;if(!n&&!t||n&&t)throw new Error(b);var o,s=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,a=A({baseUrl:n,source:i.sourceURL,range:i.range}),o=A({baseUrl:n,source:t.media,range:t.mediaRange});return o.map=a,o}(e,t)}));return n&&(o=E(e)),t&&(o=z(e,t)),o.map((function(t,n){if(s[n]){var r=s[n],i=e.timescale||1,o=e.presentationTimeOffset||0;return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r.presentationTime=a+(t.time-o)/i,r}})).filter((function(e){return e}))},Y=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=G,t=c(r,i.template)):i.base?(n=S,t=c(r,i.base)):i.list&&(n=q,t=c(r,i.list));var a={attributes:r};if(!n)return a;var o=n(t,i.segmentTimeline);if(t.duration){var s=t,l=s.duration,u=s.timescale,d=void 0===u?1:u;t.duration=l/d}else o.length?t.duration=o.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return a.attributes=t,a.segments=o,i.base&&t.indexRange&&(a.sidx=o[0],a.segments=[]),a},K=function(e,t){return h(e.childNodes).filter((function(e){return e.tagName===t}))},X=function(e){return e.textContent.trim()},Q=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(o||0)+60*parseFloat(s||0)+parseFloat(l||0)},$={mediaPresentationDuration:function(e){return Q(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return Q(e)},suggestedPresentationDelay:function(e){return Q(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Q(e)},start:function(e){return Q(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},frameRate:function(e){return function(e){return parseFloat(e.split("/").reduce((function(e,t){return e/t})))}(e)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Q(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},J=function(e){return e&&e.attributes?h(e.attributes).reduce((function(e,t){var n=$[t.name]||$.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},Z={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},ee=function(e,t){return t.length?d(e.map((function(e){return t.map((function(t){return Object(r.a)(e,X(t))}))}))):e},te=function(e){var t=K(e,"SegmentTemplate")[0],n=K(e,"SegmentList")[0],r=n&&K(n,"SegmentURL").map((function(e){return c({tag:"SegmentURL"},J(e))})),i=K(e,"SegmentBase")[0],a=n||t,o=a&&K(a,"SegmentTimeline")[0],s=n||i||t,l=s&&K(s,"Initialization")[0],u=t&&J(t);u&&l?u.initialization=l&&J(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});var d={template:u,segmentTimeline:o&&K(o,"S").map((function(e){return J(e)})),list:n&&c(J(n),{segmentUrls:r,initialization:J(l)}),base:i&&c(J(i),{initialization:J(l)})};return Object.keys(d).forEach((function(e){d[e]||delete d[e]})),d},ne=function(e,t,n){return function(r){var i,a=J(r),s=ee(t,K(r,"BaseURL")),l=K(r,"Role")[0],u={role:J(l)},h=c(e,a,u),f=K(r,"Accessibility")[0],p="urn:scte:dash:cc:cea-608:2015"===(i=J(f)).schemeIdUri?("string"!=typeof i.value?[]:i.value.split(";")).map((function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var r=e.split("=");t=r[0],n=r[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}})):"urn:scte:dash:cc:cea-708:2015"===i.schemeIdUri?("string"!=typeof i.value?[]:i.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var n=e.split("="),r=n[0],i=n[1],a=void 0===i?"":i;t.channel=r,t.language=e,a.split(",").forEach((function(e){var n=e.split(":"),r=n[0],i=n[1];"lang"===r?t.language=i:"er"===r?t.easyReader=Number(i):"war"===r?t.aspectRatio=Number(i):"3D"===r&&(t["3D"]=Number(i))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;p&&(h=c(h,{captionServices:p}));var m=K(r,"Label")[0];if(m&&m.childNodes.length){var g=m.childNodes[0].nodeValue.trim();h=c(h,{label:g})}var v=K(r,"ContentProtection").reduce((function(e,t){var n=J(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());var r=Z[n.schemeIdUri];if(r){e[r]={attributes:n};var i=K(t,"cenc:pssh")[0];if(i){var a=X(i);e[r].pssh=a&&Object(o.a)(a)}}return e}),{});Object.keys(v).length&&(h=c(h,{contentProtection:v}));var b=te(r),y=K(r,"Representation"),A=c(n,b);return d(y.map(function(e,t,n){return function(r){var i=K(r,"BaseURL"),a=ee(t,i),o=c(e,J(r)),s=te(r);return a.map((function(e){return{segmentInfo:c(n,s),attributes:c(o,{baseUrl:e})}}))}}(h,s,A)))}},re=function(e,t){return function(n,r){var i=ee(t,K(n.node,"BaseURL")),a=c(e,{periodStart:n.attributes.start});"number"==typeof n.attributes.duration&&(a.periodDuration=n.attributes.duration);var o=K(n.node,"AdaptationSet"),s=te(n.node);return d(o.map(ne(a,i,s)))}},ie=function(e){if(""===e)throw new Error(m);var t,n,r=new s.DOMParser;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(g);return n},ae=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,a=n.NOW,o=void 0===a?Date.now():a,s=n.clientOffset,l=void 0===s?0:s,c=K(e,"Period");if(!c.length)throw new Error(p);var u=K(e,"Location"),h=J(e),f=ee([i],K(e,"BaseURL"));h.type=h.type||"static",h.sourceDuration=h.mediaPresentationDuration||0,h.NOW=o,h.clientOffset=l,u.length&&(h.locations=u.map(X));var m=[];return c.forEach((function(e,t){var n=J(e),r=m[t-1];n.start=function(e){var t=e.attributes,n=e.priorPeriodAttributes,r=e.mpdType;return"number"==typeof t.start?t.start:n&&"number"==typeof n.start&&"number"==typeof n.duration?n.start+n.duration:n||"static"!==r?null:0}({attributes:n,priorPeriodAttributes:r?r.attributes:null,mpdType:h.type}),m.push({node:e,attributes:n})})),{locations:h.locations,representationInfo:d(m.map(re(h,f)))}}(ie(e),t),r=n.representationInfo.map(Y);return U({dashPlaylists:r,locations:n.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},oe=function(e){return function(e){var t=K(e,"UTCTiming")[0];if(!t)return null;var n=J(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(y)}return n}(ie(e))}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,o,s;if(c(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):g(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)a(l,this,t);else{var c=l.length,u=g(l,c);for(n=0;n<c;++n)a(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){var r=n(181),i=n(266),a=n(231),o=n(356)("src"),s=n(1320),l=(""+s).split("toString");n(198).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(a(n,o)||i(n,o,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t,n){var r=n(230),i=n(781),a=n(783),o=Object.defineProperty;t.f=n(208)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(169);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(784);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e,t){super(t||"Error fetching device."),this.cause=e}}t.default=r},function(e,t,n){"use strict";(function(e){var r=t;function i(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;++i)void 0!==e[r[i]]&&n||(e[r[i]]=t[r[i]]);return e}function a(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&i(this,n)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}r.asPromise=n(1369),r.base64=n(1370),r.EventEmitter=n(1371),r.float=n(1372),r.inquire=n(1373),r.utf8=n(1374),r.pool=n(1375),r.LongBits=n(1376),r.global="undefined"!=typeof window&&window||void 0!==e&&e||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isNode=Boolean(r.global.process&&r.global.process.versions&&r.global.process.versions.node),r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=i,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=a,r.ProtocolError=a("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}}).call(this,n(68))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n){this.fixedWaitMs=e,this.shortBackoffMs=t,this.longBackoffMs=n,this.currentRetry=0,this.fixedWaitMs<0&&(this.fixedWaitMs=0),this.shortBackoffMs<0&&(this.shortBackoffMs=0),this.longBackoffMs<0&&(this.longBackoffMs=0),this.reset()}reset(){this.currentRetry=0}nextBackoffAmountMs(){const e=Math.random()*Math.min(this.longBackoffMs,this.shortBackoffMs*Math.pow(2,this.currentRetry))+this.fixedWaitMs;return this.currentRetry+=1,e}}},function(e,t,n){"use strict";(function(e){var t=n(19);
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */const r="object"==typeof window?window:e;if(r.CKEDITOR_VERSION)throw new t.a("ckeditor-duplicated-modules",null);r.CKEDITOR_VERSION="34.1.0"}).call(this,n(68))},function(e,t,n){var r,i,a,o,s,l,c,u;e.exports=(u=n(84),n(520),n(521),i=(r=u).lib,a=i.Base,o=i.WordArray,s=r.algo,l=s.MD5,c=s.EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),a=o.create(),s=a.words,l=r.keySize,c=r.iterations;s.length<l;){n&&i.update(n),n=i.update(e).finalize(t),i.reset();for(var u=1;u<c;u++)n=i.finalize(n),i.reset();a.concat(n)}return a.sigBytes=4*l,a}}),r.EvpKDF=function(e,t,n){return c.create(n).compute(e,t)},u.EvpKDF)},function(e,t,n){"use strict";var r=n(107),i=n(265),a=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&a(e,".prototype.")?i(n):n}},function(e,t){e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(e,t,n){"use strict";const r=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const i=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[r.HTML]:{[i.ADDRESS]:!0,[i.APPLET]:!0,[i.AREA]:!0,[i.ARTICLE]:!0,[i.ASIDE]:!0,[i.BASE]:!0,[i.BASEFONT]:!0,[i.BGSOUND]:!0,[i.BLOCKQUOTE]:!0,[i.BODY]:!0,[i.BR]:!0,[i.BUTTON]:!0,[i.CAPTION]:!0,[i.CENTER]:!0,[i.COL]:!0,[i.COLGROUP]:!0,[i.DD]:!0,[i.DETAILS]:!0,[i.DIR]:!0,[i.DIV]:!0,[i.DL]:!0,[i.DT]:!0,[i.EMBED]:!0,[i.FIELDSET]:!0,[i.FIGCAPTION]:!0,[i.FIGURE]:!0,[i.FOOTER]:!0,[i.FORM]:!0,[i.FRAME]:!0,[i.FRAMESET]:!0,[i.H1]:!0,[i.H2]:!0,[i.H3]:!0,[i.H4]:!0,[i.H5]:!0,[i.H6]:!0,[i.HEAD]:!0,[i.HEADER]:!0,[i.HGROUP]:!0,[i.HR]:!0,[i.HTML]:!0,[i.IFRAME]:!0,[i.IMG]:!0,[i.INPUT]:!0,[i.LI]:!0,[i.LINK]:!0,[i.LISTING]:!0,[i.MAIN]:!0,[i.MARQUEE]:!0,[i.MENU]:!0,[i.META]:!0,[i.NAV]:!0,[i.NOEMBED]:!0,[i.NOFRAMES]:!0,[i.NOSCRIPT]:!0,[i.OBJECT]:!0,[i.OL]:!0,[i.P]:!0,[i.PARAM]:!0,[i.PLAINTEXT]:!0,[i.PRE]:!0,[i.SCRIPT]:!0,[i.SECTION]:!0,[i.SELECT]:!0,[i.SOURCE]:!0,[i.STYLE]:!0,[i.SUMMARY]:!0,[i.TABLE]:!0,[i.TBODY]:!0,[i.TD]:!0,[i.TEMPLATE]:!0,[i.TEXTAREA]:!0,[i.TFOOT]:!0,[i.TH]:!0,[i.THEAD]:!0,[i.TITLE]:!0,[i.TR]:!0,[i.TRACK]:!0,[i.UL]:!0,[i.WBR]:!0,[i.XMP]:!0},[r.MATHML]:{[i.MI]:!0,[i.MO]:!0,[i.MN]:!0,[i.MS]:!0,[i.MTEXT]:!0,[i.ANNOTATION_XML]:!0},[r.SVG]:{[i.TITLE]:!0,[i.FOREIGN_OBJECT]:!0,[i.DESC]:!0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHtml=t.cloneDom=t.domEach=t.cssCase=t.camelCase=t.isCheerio=t.isTag=void 0;var r=n(275),i=n(148);t.isTag=r.DomUtils.isTag,t.isCheerio=function(e){return null!=e.cheerio},t.camelCase=function(e){return e.replace(/[_.-](\w|$)/g,(function(e,t){return t.toUpperCase()}))},t.cssCase=function(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()},t.domEach=function(e,t){for(var n=e.length,r=0;r<n;r++)t(e[r],r);return e},t.cloneDom=function(e){var t="length"in e?Array.prototype.map.call(e,(function(e){return i.cloneNode(e,!0)})):[i.cloneNode(e,!0)],n=new i.Document(t);return t.forEach((function(e){e.parent=n})),t};var a=/<[a-zA-Z][^]*>/;t.isHtml=function(e){return a.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.adapter)return(0,a.default)(e.adapter),e.adapter;var t=(0,o.get)(),n=t.adapter;return(0,a.default)(n),n};var r,i=n(541),a=(r=i)&&r.__esModule?r:{default:r},o=n(540)},function(e,t,n){
/*!
 * html2canvas 1.0.0-rc.7 <https://html2canvas.hertzen.com>
 * Copyright (c) 2020 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */
e.exports=function(){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}for(var a=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t){return new e(t.left,t.top,t.width,t.height)},e}(),o=function(e){return a.fromClientRect(e.getBoundingClientRect())},s=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t},l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,a="";++i<n;){var o=e[i];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u="undefined"==typeof Uint8Array?[]:new Uint8Array(256),d=0;d<c.length;d++)u[c.charCodeAt(d)]=d;var h,f=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},p=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),m=10,g=13,v=15,b=17,y=18,A=19,_=20,w=21,E=22,S=24,C=25,T=26,k=27,x=28,O=30,I=32,M=33,P=34,D=35,N=37,L=38,R=39,B=40,j=42,F=function(e){var t,n,r,i=function(e){var t,n,r,i,a,o=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),d=Array.isArray(c)?c:new Uint8Array(c);for(t=0;t<s;t+=4)n=u[e.charCodeAt(t)],r=u[e.charCodeAt(t+1)],i=u[e.charCodeAt(t+2)],a=u[e.charCodeAt(t+3)],d[l++]=n<<2|r>>4,d[l++]=(15&r)<<4|i>>2,d[l++]=(3&i)<<6|63&a;return c}(e),a=Array.isArray(i)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n}(i):new Uint32Array(i),o=Array.isArray(i)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n}(i):new Uint16Array(i),s=f(o,12,a[4]/2),l=2===a[5]?f(o,(24+a[4])/2):(t=a,n=Math.ceil((24+a[4])/4),t.slice?t.slice(n,r):new Uint32Array(Array.prototype.slice.call(t,n,r)));return new p(a[0],a[1],a[2],a[3],s,l)}("KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA"),U=[O,36],H=[1,2,3,5],z=[m,8],V=[k,T],W=H.concat(z),G=[L,R,B,P,D],q=[v,g],Y=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?-1!==e.indexOf(i):e===i)for(var a=n;a<=r.length;){if((l=r[++a])===t)return!0;if(l!==m)break}if(i===m)for(a=n;a>0;){var o=r[--a];if(Array.isArray(e)?-1!==e.indexOf(o):e===o)for(var s=n;s<=r.length;){var l;if((l=r[++s])===t)return!0;if(l!==m)break}if(o!==m)break}return!1},K=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r!==m)return r;n--}return 0},X=function(e,t,n,r,i){if(0===n[r])return"×";var a=r-1;if(Array.isArray(i)&&!0===i[a])return"×";var o=a-1,s=a+1,l=t[a],c=o>=0?t[o]:0,u=t[s];if(2===l&&3===u)return"×";if(-1!==H.indexOf(l))return"!";if(-1!==H.indexOf(u))return"×";if(-1!==z.indexOf(u))return"×";if(8===K(a,t))return"÷";if(11===F.get(e[a])&&(u===N||u===I||u===M))return"×";if(7===l||7===u)return"×";if(9===l)return"×";if(-1===[m,g,v].indexOf(l)&&9===u)return"×";if(-1!==[b,y,A,S,x].indexOf(u))return"×";if(K(a,t)===E)return"×";if(Y(23,E,a,t))return"×";if(Y([b,y],w,a,t))return"×";if(Y(12,12,a,t))return"×";if(l===m)return"÷";if(23===l||23===u)return"×";if(16===u||16===l)return"÷";if(-1!==[g,v,w].indexOf(u)||14===l)return"×";if(36===c&&-1!==q.indexOf(l))return"×";if(l===x&&36===u)return"×";if(u===_&&-1!==U.concat(_,A,C,N,I,M).indexOf(l))return"×";if(-1!==U.indexOf(u)&&l===C||-1!==U.indexOf(l)&&u===C)return"×";if(l===k&&-1!==[N,I,M].indexOf(u)||-1!==[N,I,M].indexOf(l)&&u===T)return"×";if(-1!==U.indexOf(l)&&-1!==V.indexOf(u)||-1!==V.indexOf(l)&&-1!==U.indexOf(u))return"×";if(-1!==[k,T].indexOf(l)&&(u===C||-1!==[E,v].indexOf(u)&&t[s+1]===C)||-1!==[E,v].indexOf(l)&&u===C||l===C&&-1!==[C,x,S].indexOf(u))return"×";if(-1!==[C,x,S,b,y].indexOf(u))for(var d=a;d>=0;){if((h=t[d])===C)return"×";if(-1===[x,S].indexOf(h))break;d--}if(-1!==[k,T].indexOf(u))for(d=-1!==[b,y].indexOf(l)?o:a;d>=0;){var h;if((h=t[d])===C)return"×";if(-1===[x,S].indexOf(h))break;d--}if(L===l&&-1!==[L,R,P,D].indexOf(u)||-1!==[R,P].indexOf(l)&&-1!==[R,B].indexOf(u)||-1!==[B,D].indexOf(l)&&u===B)return"×";if(-1!==G.indexOf(l)&&-1!==[_,T].indexOf(u)||-1!==G.indexOf(u)&&l===k)return"×";if(-1!==U.indexOf(l)&&-1!==U.indexOf(u))return"×";if(l===S&&-1!==U.indexOf(u))return"×";if(-1!==U.concat(C).indexOf(l)&&u===E||-1!==U.concat(C).indexOf(u)&&l===y)return"×";if(41===l&&41===u){for(var f=n[a],p=1;f>0&&41===t[--f];)p++;if(p%2!=0)return"×"}return l===I&&u===M?"×":"÷"},Q=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=function(e,t){void 0===t&&(t="strict");var n=[],r=[],i=[];return e.forEach((function(e,a){var o=F.get(e);if(o>50?(i.push(!0),o-=50):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(a),n.push(16);if(4===o||11===o){if(0===a)return r.push(a),n.push(O);var s=n[a-1];return-1===W.indexOf(s)?(r.push(r[a-1]),n.push(s)):(r.push(a),n.push(O))}return r.push(a),31===o?n.push("strict"===t?w:N):o===j?n.push(O):29===o?n.push(O):43===o?e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(N):n.push(O):void n.push(o)})),[r,n,i]}(e,t.lineBreak),r=n[0],i=n[1],a=n[2];return"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(i=i.map((function(e){return-1!==[C,O,j].indexOf(e)?N:e}))),[r,i,"keep-all"===t.wordBreak?a.map((function(t,n){return t&&e[n]>=19968&&e[n]<=40959})):void 0]},$=function(){function e(e,t,n,r){this.codePoints=e,this.required="!"===t,this.start=n,this.end=r}return e.prototype.slice=function(){return l.apply(void 0,this.codePoints.slice(this.start,this.end))},e}();!function(e){e[e.STRING_TOKEN=0]="STRING_TOKEN",e[e.BAD_STRING_TOKEN=1]="BAD_STRING_TOKEN",e[e.LEFT_PARENTHESIS_TOKEN=2]="LEFT_PARENTHESIS_TOKEN",e[e.RIGHT_PARENTHESIS_TOKEN=3]="RIGHT_PARENTHESIS_TOKEN",e[e.COMMA_TOKEN=4]="COMMA_TOKEN",e[e.HASH_TOKEN=5]="HASH_TOKEN",e[e.DELIM_TOKEN=6]="DELIM_TOKEN",e[e.AT_KEYWORD_TOKEN=7]="AT_KEYWORD_TOKEN",e[e.PREFIX_MATCH_TOKEN=8]="PREFIX_MATCH_TOKEN",e[e.DASH_MATCH_TOKEN=9]="DASH_MATCH_TOKEN",e[e.INCLUDE_MATCH_TOKEN=10]="INCLUDE_MATCH_TOKEN",e[e.LEFT_CURLY_BRACKET_TOKEN=11]="LEFT_CURLY_BRACKET_TOKEN",e[e.RIGHT_CURLY_BRACKET_TOKEN=12]="RIGHT_CURLY_BRACKET_TOKEN",e[e.SUFFIX_MATCH_TOKEN=13]="SUFFIX_MATCH_TOKEN",e[e.SUBSTRING_MATCH_TOKEN=14]="SUBSTRING_MATCH_TOKEN",e[e.DIMENSION_TOKEN=15]="DIMENSION_TOKEN",e[e.PERCENTAGE_TOKEN=16]="PERCENTAGE_TOKEN",e[e.NUMBER_TOKEN=17]="NUMBER_TOKEN",e[e.FUNCTION=18]="FUNCTION",e[e.FUNCTION_TOKEN=19]="FUNCTION_TOKEN",e[e.IDENT_TOKEN=20]="IDENT_TOKEN",e[e.COLUMN_TOKEN=21]="COLUMN_TOKEN",e[e.URL_TOKEN=22]="URL_TOKEN",e[e.BAD_URL_TOKEN=23]="BAD_URL_TOKEN",e[e.CDC_TOKEN=24]="CDC_TOKEN",e[e.CDO_TOKEN=25]="CDO_TOKEN",e[e.COLON_TOKEN=26]="COLON_TOKEN",e[e.SEMICOLON_TOKEN=27]="SEMICOLON_TOKEN",e[e.LEFT_SQUARE_BRACKET_TOKEN=28]="LEFT_SQUARE_BRACKET_TOKEN",e[e.RIGHT_SQUARE_BRACKET_TOKEN=29]="RIGHT_SQUARE_BRACKET_TOKEN",e[e.UNICODE_RANGE_TOKEN=30]="UNICODE_RANGE_TOKEN",e[e.WHITESPACE_TOKEN=31]="WHITESPACE_TOKEN",e[e.EOF_TOKEN=32]="EOF_TOKEN"}(h||(h={}));var J=function(e){return e>=48&&e<=57},Z=function(e){return J(e)||e>=65&&e<=70||e>=97&&e<=102},ee=function(e){return 10===e||9===e||32===e},te=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},ne=function(e){return te(e)||J(e)||45===e},re=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},ie=function(e,t){return 92===e&&10!==t},ae=function(e,t,n){return 45===e?te(t)||ie(t,n):!!te(e)||!(92!==e||!ie(e,t))},oe=function(e,t,n){return 43===e||45===e?!!J(t)||46===t&&J(n):J(46===e?t:e)},se=function(e){var t=0,n=1;43!==e[t]&&45!==e[t]||(45===e[t]&&(n=-1),t++);for(var r=[];J(e[t]);)r.push(e[t++]);var i=r.length?parseInt(l.apply(void 0,r),10):0;46===e[t]&&t++;for(var a=[];J(e[t]);)a.push(e[t++]);var o=a.length,s=o?parseInt(l.apply(void 0,a),10):0;69!==e[t]&&101!==e[t]||t++;var c=1;43!==e[t]&&45!==e[t]||(45===e[t]&&(c=-1),t++);for(var u=[];J(e[t]);)u.push(e[t++]);var d=u.length?parseInt(l.apply(void 0,u),10):0;return n*(i+s*Math.pow(10,-o))*Math.pow(10,c*d)},le={type:h.LEFT_PARENTHESIS_TOKEN},ce={type:h.RIGHT_PARENTHESIS_TOKEN},ue={type:h.COMMA_TOKEN},de={type:h.SUFFIX_MATCH_TOKEN},he={type:h.PREFIX_MATCH_TOKEN},fe={type:h.COLUMN_TOKEN},pe={type:h.DASH_MATCH_TOKEN},me={type:h.INCLUDE_MATCH_TOKEN},ge={type:h.LEFT_CURLY_BRACKET_TOKEN},ve={type:h.RIGHT_CURLY_BRACKET_TOKEN},be={type:h.SUBSTRING_MATCH_TOKEN},ye={type:h.BAD_URL_TOKEN},Ae={type:h.BAD_STRING_TOKEN},_e={type:h.CDO_TOKEN},we={type:h.CDC_TOKEN},Ee={type:h.COLON_TOKEN},Se={type:h.SEMICOLON_TOKEN},Ce={type:h.LEFT_SQUARE_BRACKET_TOKEN},Te={type:h.RIGHT_SQUARE_BRACKET_TOKEN},ke={type:h.WHITESPACE_TOKEN},xe={type:h.EOF_TOKEN},Oe=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(s(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==xe;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(ne(t)||ie(n,r)){var i=ae(t,n,r)?2:1,a=this.consumeName();return{type:h.HASH_TOKEN,value:a,flags:i}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),de;break;case 39:return this.consumeStringToken(39);case 40:return le;case 41:return ce;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),be;break;case 43:if(oe(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return ue;case 45:var o=e,s=this.peekCodePoint(0),c=this.peekCodePoint(1);if(oe(o,s,c))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(ae(o,s,c))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(45===s&&62===c)return this.consumeCodePoint(),this.consumeCodePoint(),we;break;case 46:if(oe(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(42===u&&47===(u=this.consumeCodePoint()))return this.consumeToken();if(-1===u)return this.consumeToken()}break;case 58:return Ee;case 59:return Se;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),_e;break;case 64:var d=this.peekCodePoint(0),f=this.peekCodePoint(1),p=this.peekCodePoint(2);if(ae(d,f,p))return a=this.consumeName(),{type:h.AT_KEYWORD_TOKEN,value:a};break;case 91:return Ce;case 92:if(ie(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return Te;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),he;break;case 123:return ge;case 125:return ve;case 117:case 85:var m=this.peekCodePoint(0),g=this.peekCodePoint(1);return 43!==m||!Z(g)&&63!==g||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),pe;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),fe;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),me;break;case-1:return xe}return ee(e)?(this.consumeWhiteSpace(),ke):J(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):te(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:h.DELIM_TOKEN,value:l(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Z(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var r=parseInt(l.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),i=parseInt(l.apply(void 0,e.map((function(e){return 63===e?70:e}))),16);return{type:h.UNICODE_RANGE_TOKEN,start:r,end:i}}var a=parseInt(l.apply(void 0,e),16);if(45===this.peekCodePoint(0)&&Z(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var o=[];Z(t)&&o.length<6;)o.push(t),t=this.consumeCodePoint();return i=parseInt(l.apply(void 0,o),16),{type:h.UNICODE_RANGE_TOKEN,start:a,end:i}}return{type:h.UNICODE_RANGE_TOKEN,start:a,end:a}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:h.FUNCTION_TOKEN,value:e}):{type:h.IDENT_TOKEN,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:h.URL_TOKEN,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===h.STRING_TOKEN&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:h.URL_TOKEN,value:n.value}):(this.consumeBadUrlRemnants(),ye)}for(;;){var r=this.consumeCodePoint();if(-1===r||41===r)return{type:h.URL_TOKEN,value:l.apply(void 0,e)};if(ee(r))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:h.URL_TOKEN,value:l.apply(void 0,e)}):(this.consumeBadUrlRemnants(),ye);if(34===r||39===r||40===r||re(r))return this.consumeBadUrlRemnants(),ye;if(92===r){if(!ie(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),ye;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;ee(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||-1===e)return;ie(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var n=Math.min(6e4,e);t+=l.apply(void 0,this._value.splice(0,n)),e-=n}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",n=0;;){var r=this._value[n];if(-1===r||void 0===r||r===e)return t+=this.consumeStringSlice(n),{type:h.STRING_TOKEN,value:t};if(10===r)return this._value.splice(0,n),Ae;if(92===r){var i=this._value[n+1];-1!==i&&void 0!==i&&(10===i?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):ie(r,i)&&(t+=this.consumeStringSlice(n),t+=l(this.consumeEscapedCodePoint()),n=-1))}n++}},e.prototype.consumeNumber=function(){var e=[],t=4,n=this.peekCodePoint(0);for(43!==n&&45!==n||e.push(this.consumeCodePoint());J(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===n&&J(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;J(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((69===n||101===n)&&((43===r||45===r)&&J(i)||J(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;J(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[se(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),a=this.peekCodePoint(2);if(ae(r,i,a)){var o=this.consumeName();return{type:h.DIMENSION_TOKEN,number:t,flags:n,unit:o}}return 37===r?(this.consumeCodePoint(),{type:h.PERCENTAGE_TOKEN,number:t,flags:n}):{type:h.NUMBER_TOKEN,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Z(e)){for(var t=l(e);Z(this.peekCodePoint(0))&&t.length<6;)t+=l(this.consumeCodePoint());ee(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return 0===n||function(e){return e>=55296&&e<=57343}(n)||n>1114111?65533:n}return-1===e?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(ne(t))e+=l(t);else{if(!ie(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=l(this.consumeEscapedCodePoint())}}},e}(),Ie=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Oe;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===h.WHITESPACE_TOKEN;)e=this.consumeToken();if(e.type===h.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(e.type===h.WHITESPACE_TOKEN);if(e.type===h.EOF_TOKEN)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===h.EOF_TOKEN)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case h.LEFT_CURLY_BRACKET_TOKEN:case h.LEFT_SQUARE_BRACKET_TOKEN:case h.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(e.type);case h.FUNCTION_TOKEN:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(n.type===h.EOF_TOKEN||Fe(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:h.FUNCTION};;){var n=this.consumeToken();if(n.type===h.EOF_TOKEN||n.type===h.RIGHT_PARENTHESIS_TOKEN)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?xe:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Me=function(e){return e.type===h.DIMENSION_TOKEN},Pe=function(e){return e.type===h.NUMBER_TOKEN},De=function(e){return e.type===h.IDENT_TOKEN},Ne=function(e){return e.type===h.STRING_TOKEN},Le=function(e,t){return De(e)&&e.value===t},Re=function(e){return e.type!==h.WHITESPACE_TOKEN},Be=function(e){return e.type!==h.WHITESPACE_TOKEN&&e.type!==h.COMMA_TOKEN},je=function(e){var t=[],n=[];return e.forEach((function(e){if(e.type===h.COMMA_TOKEN){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(n),void(n=[])}e.type!==h.WHITESPACE_TOKEN&&n.push(e)})),n.length&&t.push(n),t},Fe=function(e,t){return t===h.LEFT_CURLY_BRACKET_TOKEN&&e.type===h.RIGHT_CURLY_BRACKET_TOKEN||t===h.LEFT_SQUARE_BRACKET_TOKEN&&e.type===h.RIGHT_SQUARE_BRACKET_TOKEN||t===h.LEFT_PARENTHESIS_TOKEN&&e.type===h.RIGHT_PARENTHESIS_TOKEN},Ue=function(e){return e.type===h.NUMBER_TOKEN||e.type===h.DIMENSION_TOKEN},He=function(e){return e.type===h.PERCENTAGE_TOKEN||Ue(e)},ze=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},Ve={type:h.NUMBER_TOKEN,number:0,flags:4},We={type:h.PERCENTAGE_TOKEN,number:50,flags:4},Ge={type:h.PERCENTAGE_TOKEN,number:100,flags:4},qe=function(e,t,n){var r=e[0],i=e[1];return[Ye(r,t),Ye(void 0!==i?i:r,n)]},Ye=function(e,t){if(e.type===h.PERCENTAGE_TOKEN)return e.number/100*t;if(Me(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},Ke=function(e){if(e.type===h.DIMENSION_TOKEN)switch(e.unit){case"deg":return Math.PI*e.number/180;case"grad":return Math.PI/200*e.number;case"rad":return e.number;case"turn":return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},Xe=function(e){return e.type===h.DIMENSION_TOKEN&&("deg"===e.unit||"grad"===e.unit||"rad"===e.unit||"turn"===e.unit)},Qe=function(e){switch(e.filter(De).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ve,Ve];case"to top":case"bottom":return $e(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ve,Ge];case"to right":case"left":return $e(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ge,Ge];case"to bottom":case"top":return $e(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ge,Ve];case"to left":case"right":return $e(270)}return 0},$e=function(e){return Math.PI*e/180},Je=function(e){if(e.type===h.FUNCTION){var t=lt[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(e.values)}if(e.type===h.HASH_TOKEN){if(3===e.value.length){var n=e.value.substring(0,1),r=e.value.substring(1,2),i=e.value.substring(2,3);return tt(parseInt(n+n,16),parseInt(r+r,16),parseInt(i+i,16),1)}if(4===e.value.length){n=e.value.substring(0,1),r=e.value.substring(1,2),i=e.value.substring(2,3);var a=e.value.substring(3,4);return tt(parseInt(n+n,16),parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16)/255)}if(6===e.value.length)return n=e.value.substring(0,2),r=e.value.substring(2,4),i=e.value.substring(4,6),tt(parseInt(n,16),parseInt(r,16),parseInt(i,16),1);if(8===e.value.length)return n=e.value.substring(0,2),r=e.value.substring(2,4),i=e.value.substring(4,6),a=e.value.substring(6,8),tt(parseInt(n,16),parseInt(r,16),parseInt(i,16),parseInt(a,16)/255)}if(e.type===h.IDENT_TOKEN){var o=ct[e.value.toUpperCase()];if(void 0!==o)return o}return ct.TRANSPARENT},Ze=function(e){return 0==(255&e)},et=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+r+","+n+","+t/255+")":"rgb("+i+","+r+","+n+")"},tt=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(255*r)<<0)>>>0},nt=function(e,t){if(e.type===h.NUMBER_TOKEN)return e.number;if(e.type===h.PERCENTAGE_TOKEN){var n=3===t?1:255;return 3===t?e.number/100*n:Math.round(e.number/100*n)}return 0},rt=function(e){var t=e.filter(Be);if(3===t.length){var n=t.map(nt),r=n[0],i=n[1],a=n[2];return tt(r,i,a,1)}if(4===t.length){var o=t.map(nt),s=(r=o[0],i=o[1],a=o[2],o[3]);return tt(r,i,a,s)}return 0};function it(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<.5?t:n<2/3?6*(t-e)*(2/3-n)+e:e}var at,ot,st=function(e){var t=e.filter(Be),n=t[0],r=t[1],i=t[2],a=t[3],o=(n.type===h.NUMBER_TOKEN?$e(n.number):Ke(n))/(2*Math.PI),s=He(r)?r.number/100:0,l=He(i)?i.number/100:0,c=void 0!==a&&He(a)?Ye(a,1):1;if(0===s)return tt(255*l,255*l,255*l,1);var u=l<=.5?l*(s+1):l+s-l*s,d=2*l-u,f=it(d,u,o+1/3),p=it(d,u,o),m=it(d,u,o-1/3);return tt(255*f,255*p,255*m,c)},lt={hsl:st,hsla:st,rgb:rt,rgba:rt},ct={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};(function(e){e[e.VALUE=0]="VALUE",e[e.LIST=1]="LIST",e[e.IDENT_VALUE=2]="IDENT_VALUE",e[e.TYPE_VALUE=3]="TYPE_VALUE",e[e.TOKEN_VALUE=4]="TOKEN_VALUE"})(at||(at={})),function(e){e[e.BORDER_BOX=0]="BORDER_BOX",e[e.PADDING_BOX=1]="PADDING_BOX",e[e.CONTENT_BOX=2]="CONTENT_BOX"}(ot||(ot={}));var ut,dt,ht,ft={name:"background-clip",initialValue:"border-box",prefix:!1,type:at.LIST,parse:function(e){return e.map((function(e){if(De(e))switch(e.value){case"padding-box":return ot.PADDING_BOX;case"content-box":return ot.CONTENT_BOX}return ot.BORDER_BOX}))}},pt={name:"background-color",initialValue:"transparent",prefix:!1,type:at.TYPE_VALUE,format:"color"},mt=function(e){var t=Je(e[0]),n=e[1];return n&&He(n)?{color:t,stop:n}:{color:t,stop:null}},gt=function(e,t){var n=e[0],r=e[e.length-1];null===n.stop&&(n.stop=Ve),null===r.stop&&(r.stop=Ge);for(var i=[],a=0,o=0;o<e.length;o++){var s=e[o].stop;if(null!==s){var l=Ye(s,t);l>a?i.push(l):i.push(a),a=l}else i.push(null)}var c=null;for(o=0;o<i.length;o++){var u=i[o];if(null===u)null===c&&(c=o);else if(null!==c){for(var d=o-c,h=(u-i[c-1])/(d+1),f=1;f<=d;f++)i[c+f-1]=h*f;c=null}}return e.map((function(e,n){return{color:e.color,stop:Math.max(Math.min(1,i[n]/t),0)}}))},vt=function(e,t,n){var r="number"==typeof e?e:function(e,t,n){var r=t/2,i=n/2,a=Ye(e[0],t)-r,o=i-Ye(e[1],n);return(Math.atan2(o,a)+2*Math.PI)%(2*Math.PI)}(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),a=t/2,o=n/2,s=i/2,l=Math.sin(r-Math.PI/2)*s,c=Math.cos(r-Math.PI/2)*s;return[i,a-c,a+c,o-l,o+l]},bt=function(e,t){return Math.sqrt(e*e+t*t)},yt=function(e,t,n,r,i){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var a=t[0],o=t[1],s=bt(n-a,r-o);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e}),{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},At=function(e){var t=$e(180),n=[];return je(e).forEach((function(e,r){if(0===r){var i=e[0];if(i.type===h.IDENT_TOKEN&&-1!==["top","left","right","bottom"].indexOf(i.value))return void(t=Qe(e));if(Xe(i))return void(t=(Ke(i)+$e(270))%$e(360))}var a=mt(e);n.push(a)})),{angle:t,stops:n,type:ut.LINEAR_GRADIENT}},_t=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},wt=function(e,t,n,r,i){var a="http://www.w3.org/2000/svg",o=document.createElementNS(a,"svg"),s=document.createElementNS(a,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",n.toString()),s.setAttributeNS(null,"y",r.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(i),o},Et=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},St={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var n=e.createElement("boundtest");n.style.height="123px",n.style.display="block",e.body.appendChild(n),t.selectNode(n);var r=t.getBoundingClientRect(),i=Math.round(r.height);if(e.body.removeChild(n),123===i)return!0}}return!1}(document);return Object.defineProperty(St,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,n=e.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),n.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(St,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas");t.width=100,t.height=100;var n=t.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,100,100);var r=new Image,i=t.toDataURL();r.src=i;var a=wt(100,100,0,0,r);return n.fillStyle="red",n.fillRect(0,0,100,100),Et(a).then((function(t){n.drawImage(t,0,0);var r=n.getImageData(0,0,100,100).data;n.fillStyle="red",n.fillRect(0,0,100,100);var a=e.createElement("div");return a.style.backgroundImage="url("+i+")",a.style.height="100px",_t(r)?Et(wt(100,100,0,0,a)):Promise.reject(!1)})).then((function(e){return n.drawImage(e,0,0),_t(n.getImageData(0,0,100,100).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(St,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(St,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(St,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(St,"SUPPORT_CORS_XHR",{value:e}),e}},Ct=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,[this.id,this.getTime()+"ms"].concat(e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.create=function(t){e.instances[t.id]=new e(t)},e.destroy=function(t){delete e.instances[t]},e.getInstance=function(t){var n=e.instances[t];if(void 0===n)throw new Error("No logger instance found with id "+t);return n},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,[this.id,this.getTime()+"ms"].concat(e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,[this.id,this.getTime()+"ms"].concat(e)):this.info.apply(this,e))},e.instances={},e}(),Tt=function(){function e(){}return e.create=function(t,n){return e._caches[t]=new kt(t,n)},e.destroy=function(t){delete e._caches[t]},e.open=function(t){var n=e._caches[t];if(void 0!==n)return n;throw new Error('Cache with key "'+t+'" not found')},e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e.getInstance=function(){var t=e._current;if(null===t)throw new Error("No cache instance attached");return t},e.attachInstance=function(t){e._current=t},e.detachInstance=function(){e._current=null},e._caches={},e._origin="about:blank",e._current=null,e}(),kt=function(){function e(e,t){this.id=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:Nt(e)||Mt(e)?(this._cache[e]=this.loadImage(e),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return t=Tt.isSameOrigin(e),n=!Pt(e)&&!0===this._options.useCORS&&St.SUPPORT_CORS_IMAGES&&!t,r=!Pt(e)&&!t&&"string"==typeof this._options.proxy&&St.SUPPORT_CORS_XHR&&!n,t||!1!==this._options.allowTaint||Pt(e)||r||n?(a=e,r?[4,this.proxy(a)]:[3,2]):[2];case 1:a=i.sent(),i.label=2;case 2:return Ct.getInstance(this.id).debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(Dt(a)||n)&&(r.crossOrigin="anonymous"),r.src=a,!0===r.complete&&setTimeout((function(){return e(r)}),500),o._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+o._options.imageTimeout+"ms) loading image")}),o._options.imageTimeout)}))];case 3:return[2,i.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise((function(i,a){var o=St.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;if(s.onload=function(){if(200===s.status)if("text"===o)i(s.response);else{var e=new FileReader;e.addEventListener("load",(function(){return i(e.result)}),!1),e.addEventListener("error",(function(e){return a(e)}),!1),e.readAsDataURL(s.response)}else a("Failed to proxy resource "+r+" with status code "+s.status)},s.onerror=a,s.open("GET",n+"?url="+encodeURIComponent(e)+"&responseType="+o),"text"!==o&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a("Timed out ("+l+"ms) proxying "+r)}}s.send()}))},e}(),xt=/^data:image\/svg\+xml/i,Ot=/^data:image\/.*;base64,/i,It=/^data:image\/.*/i,Mt=function(e){return St.SUPPORT_SVG_DRAWING||!Lt(e)},Pt=function(e){return It.test(e)},Dt=function(e){return Ot.test(e)},Nt=function(e){return"blob"===e.substr(0,4)},Lt=function(e){return"svg"===e.substr(-3).toLowerCase()||xt.test(e)},Rt=function(e){var t=dt.CIRCLE,n=ht.FARTHEST_CORNER,r=[],i=[];return je(e).forEach((function(e,a){var o=!0;if(0===a?o=e.reduce((function(e,t){if(De(t))switch(t.value){case"center":return i.push(We),!1;case"top":case"left":return i.push(Ve),!1;case"right":case"bottom":return i.push(Ge),!1}else if(He(t)||Ue(t))return i.push(t),!1;return e}),o):1===a&&(o=e.reduce((function(e,r){if(De(r))switch(r.value){case"circle":return t=dt.CIRCLE,!1;case"ellipse":return t=dt.ELLIPSE,!1;case"contain":case"closest-side":return n=ht.CLOSEST_SIDE,!1;case"farthest-side":return n=ht.FARTHEST_SIDE,!1;case"closest-corner":return n=ht.CLOSEST_CORNER,!1;case"cover":case"farthest-corner":return n=ht.FARTHEST_CORNER,!1}else if(Ue(r)||He(r))return Array.isArray(n)||(n=[]),n.push(r),!1;return e}),o)),o){var s=mt(e);r.push(s)}})),{size:n,shape:t,stops:r,position:i,type:ut.RADIAL_GRADIENT}};!function(e){e[e.URL=0]="URL",e[e.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",e[e.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(ut||(ut={})),function(e){e[e.CIRCLE=0]="CIRCLE",e[e.ELLIPSE=1]="ELLIPSE"}(dt||(dt={})),function(e){e[e.CLOSEST_SIDE=0]="CLOSEST_SIDE",e[e.FARTHEST_SIDE=1]="FARTHEST_SIDE",e[e.CLOSEST_CORNER=2]="CLOSEST_CORNER",e[e.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(ht||(ht={}));var Bt,jt=function(e){if(e.type===h.URL_TOKEN){var t={url:e.value,type:ut.URL};return Tt.getInstance().addImage(e.value),t}if(e.type===h.FUNCTION){var n=Ft[e.name];if(void 0===n)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(e.values)}throw new Error("Unsupported image type")},Ft={"linear-gradient":function(e){var t=$e(180),n=[];return je(e).forEach((function(e,r){if(0===r){var i=e[0];if(i.type===h.IDENT_TOKEN&&"to"===i.value)return void(t=Qe(e));if(Xe(i))return void(t=Ke(i))}var a=mt(e);n.push(a)})),{angle:t,stops:n,type:ut.LINEAR_GRADIENT}},"-moz-linear-gradient":At,"-ms-linear-gradient":At,"-o-linear-gradient":At,"-webkit-linear-gradient":At,"radial-gradient":function(e){var t=dt.CIRCLE,n=ht.FARTHEST_CORNER,r=[],i=[];return je(e).forEach((function(e,a){var o=!0;if(0===a){var s=!1;o=e.reduce((function(e,r){if(s)if(De(r))switch(r.value){case"center":return i.push(We),e;case"top":case"left":return i.push(Ve),e;case"right":case"bottom":return i.push(Ge),e}else(He(r)||Ue(r))&&i.push(r);else if(De(r))switch(r.value){case"circle":return t=dt.CIRCLE,!1;case"ellipse":return t=dt.ELLIPSE,!1;case"at":return s=!0,!1;case"closest-side":return n=ht.CLOSEST_SIDE,!1;case"cover":case"farthest-side":return n=ht.FARTHEST_SIDE,!1;case"contain":case"closest-corner":return n=ht.CLOSEST_CORNER,!1;case"farthest-corner":return n=ht.FARTHEST_CORNER,!1}else if(Ue(r)||He(r))return Array.isArray(n)||(n=[]),n.push(r),!1;return e}),o)}if(o){var l=mt(e);r.push(l)}})),{size:n,shape:t,stops:r,position:i,type:ut.RADIAL_GRADIENT}},"-moz-radial-gradient":Rt,"-ms-radial-gradient":Rt,"-o-radial-gradient":Rt,"-webkit-radial-gradient":Rt,"-webkit-gradient":function(e){var t=$e(180),n=[],r=ut.LINEAR_GRADIENT,i=dt.CIRCLE,a=ht.FARTHEST_CORNER;return je(e).forEach((function(e,t){var i=e[0];if(0===t){if(De(i)&&"linear"===i.value)return void(r=ut.LINEAR_GRADIENT);if(De(i)&&"radial"===i.value)return void(r=ut.RADIAL_GRADIENT)}if(i.type===h.FUNCTION)if("from"===i.name){var a=Je(i.values[0]);n.push({stop:Ve,color:a})}else if("to"===i.name)a=Je(i.values[0]),n.push({stop:Ge,color:a});else if("color-stop"===i.name){var o=i.values.filter(Be);if(2===o.length){a=Je(o[1]);var s=o[0];Pe(s)&&n.push({stop:{type:h.PERCENTAGE_TOKEN,number:100*s.number,flags:s.flags},color:a})}}})),r===ut.LINEAR_GRADIENT?{angle:(t+$e(180))%$e(360),stops:n,type:r}:{size:a,shape:i,stops:n,position:[],type:r}}},Ut={name:"background-image",initialValue:"none",type:at.LIST,prefix:!1,parse:function(e){if(0===e.length)return[];var t=e[0];return t.type===h.IDENT_TOKEN&&"none"===t.value?[]:e.filter((function(e){return Be(e)&&function(e){return e.type!==h.FUNCTION||Ft[e.name]}(e)})).map(jt)}},Ht={name:"background-origin",initialValue:"border-box",prefix:!1,type:at.LIST,parse:function(e){return e.map((function(e){if(De(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},zt={name:"background-position",initialValue:"0% 0%",type:at.LIST,prefix:!1,parse:function(e){return je(e).map((function(e){return e.filter(He)})).map(ze)}};!function(e){e[e.REPEAT=0]="REPEAT",e[e.NO_REPEAT=1]="NO_REPEAT",e[e.REPEAT_X=2]="REPEAT_X",e[e.REPEAT_Y=3]="REPEAT_Y"}(Bt||(Bt={}));var Vt,Wt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:at.LIST,parse:function(e){return je(e).map((function(e){return e.filter(De).map((function(e){return e.value})).join(" ")})).map(Gt)}},Gt=function(e){switch(e){case"no-repeat":return Bt.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return Bt.REPEAT_X;case"repeat-y":case"no-repeat repeat":return Bt.REPEAT_Y;case"repeat":default:return Bt.REPEAT}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(Vt||(Vt={}));var qt,Yt={name:"background-size",initialValue:"0",prefix:!1,type:at.LIST,parse:function(e){return je(e).map((function(e){return e.filter(Kt)}))}},Kt=function(e){return De(e)||He(e)},Xt=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:at.TYPE_VALUE,format:"color"}},Qt=Xt("top"),$t=Xt("right"),Jt=Xt("bottom"),Zt=Xt("left"),en=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:at.LIST,parse:function(e){return ze(e.filter(He))}}},tn=en("top-left"),nn=en("top-right"),rn=en("bottom-right"),an=en("bottom-left");!function(e){e[e.NONE=0]="NONE",e[e.SOLID=1]="SOLID"}(qt||(qt={}));var on,sn=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"none":return qt.NONE}return qt.SOLID}}},ln=sn("top"),cn=sn("right"),un=sn("bottom"),dn=sn("left"),hn=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:at.VALUE,prefix:!1,parse:function(e){return Me(e)?e.number:0}}},fn=hn("top"),pn=hn("right"),mn=hn("bottom"),gn=hn("left"),vn={name:"color",initialValue:"transparent",prefix:!1,type:at.TYPE_VALUE,format:"color"},bn={name:"display",initialValue:"inline-block",prefix:!1,type:at.LIST,parse:function(e){return e.filter(De).reduce((function(e,t){return e|yn(t.value)}),0)}},yn=function(e){switch(e){case"block":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};!function(e){e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.INLINE_START=3]="INLINE_START",e[e.INLINE_END=4]="INLINE_END"}(on||(on={}));var An,_n={name:"float",initialValue:"none",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"left":return on.LEFT;case"right":return on.RIGHT;case"inline-start":return on.INLINE_START;case"inline-end":return on.INLINE_END}return on.NONE}},wn={name:"letter-spacing",initialValue:"0",prefix:!1,type:at.VALUE,parse:function(e){return e.type===h.IDENT_TOKEN&&"normal"===e.value?0:e.type===h.NUMBER_TOKEN?e.number:e.type===h.DIMENSION_TOKEN?e.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(An||(An={}));var En,Sn={name:"line-break",initialValue:"normal",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"strict":return An.STRICT;case"normal":default:return An.NORMAL}}},Cn={name:"line-height",initialValue:"normal",prefix:!1,type:at.TOKEN_VALUE},Tn={name:"list-style-image",initialValue:"none",type:at.VALUE,prefix:!1,parse:function(e){return e.type===h.IDENT_TOKEN&&"none"===e.value?null:jt(e)}};!function(e){e[e.INSIDE=0]="INSIDE",e[e.OUTSIDE=1]="OUTSIDE"}(En||(En={}));var kn,xn={name:"list-style-position",initialValue:"outside",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"inside":return En.INSIDE;case"outside":default:return En.OUTSIDE}}};!function(e){e[e.NONE=-1]="NONE",e[e.DISC=0]="DISC",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e[e.DECIMAL=3]="DECIMAL",e[e.CJK_DECIMAL=4]="CJK_DECIMAL",e[e.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",e[e.LOWER_ROMAN=6]="LOWER_ROMAN",e[e.UPPER_ROMAN=7]="UPPER_ROMAN",e[e.LOWER_GREEK=8]="LOWER_GREEK",e[e.LOWER_ALPHA=9]="LOWER_ALPHA",e[e.UPPER_ALPHA=10]="UPPER_ALPHA",e[e.ARABIC_INDIC=11]="ARABIC_INDIC",e[e.ARMENIAN=12]="ARMENIAN",e[e.BENGALI=13]="BENGALI",e[e.CAMBODIAN=14]="CAMBODIAN",e[e.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",e[e.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",e[e.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",e[e.DEVANAGARI=18]="DEVANAGARI",e[e.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",e[e.GEORGIAN=20]="GEORGIAN",e[e.GUJARATI=21]="GUJARATI",e[e.GURMUKHI=22]="GURMUKHI",e[e.HEBREW=22]="HEBREW",e[e.HIRAGANA=23]="HIRAGANA",e[e.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",e[e.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",e[e.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",e[e.KANNADA=27]="KANNADA",e[e.KATAKANA=28]="KATAKANA",e[e.KATAKANA_IROHA=29]="KATAKANA_IROHA",e[e.KHMER=30]="KHMER",e[e.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",e[e.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",e[e.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",e[e.LAO=34]="LAO",e[e.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",e[e.MALAYALAM=36]="MALAYALAM",e[e.MONGOLIAN=37]="MONGOLIAN",e[e.MYANMAR=38]="MYANMAR",e[e.ORIYA=39]="ORIYA",e[e.PERSIAN=40]="PERSIAN",e[e.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",e[e.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",e[e.TAMIL=43]="TAMIL",e[e.TELUGU=44]="TELUGU",e[e.THAI=45]="THAI",e[e.TIBETAN=46]="TIBETAN",e[e.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",e[e.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",e[e.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",e[e.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",e[e.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}(kn||(kn={}));var On,In={name:"list-style-type",initialValue:"none",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"disc":return kn.DISC;case"circle":return kn.CIRCLE;case"square":return kn.SQUARE;case"decimal":return kn.DECIMAL;case"cjk-decimal":return kn.CJK_DECIMAL;case"decimal-leading-zero":return kn.DECIMAL_LEADING_ZERO;case"lower-roman":return kn.LOWER_ROMAN;case"upper-roman":return kn.UPPER_ROMAN;case"lower-greek":return kn.LOWER_GREEK;case"lower-alpha":return kn.LOWER_ALPHA;case"upper-alpha":return kn.UPPER_ALPHA;case"arabic-indic":return kn.ARABIC_INDIC;case"armenian":return kn.ARMENIAN;case"bengali":return kn.BENGALI;case"cambodian":return kn.CAMBODIAN;case"cjk-earthly-branch":return kn.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return kn.CJK_HEAVENLY_STEM;case"cjk-ideographic":return kn.CJK_IDEOGRAPHIC;case"devanagari":return kn.DEVANAGARI;case"ethiopic-numeric":return kn.ETHIOPIC_NUMERIC;case"georgian":return kn.GEORGIAN;case"gujarati":return kn.GUJARATI;case"gurmukhi":return kn.GURMUKHI;case"hebrew":return kn.HEBREW;case"hiragana":return kn.HIRAGANA;case"hiragana-iroha":return kn.HIRAGANA_IROHA;case"japanese-formal":return kn.JAPANESE_FORMAL;case"japanese-informal":return kn.JAPANESE_INFORMAL;case"kannada":return kn.KANNADA;case"katakana":return kn.KATAKANA;case"katakana-iroha":return kn.KATAKANA_IROHA;case"khmer":return kn.KHMER;case"korean-hangul-formal":return kn.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return kn.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return kn.KOREAN_HANJA_INFORMAL;case"lao":return kn.LAO;case"lower-armenian":return kn.LOWER_ARMENIAN;case"malayalam":return kn.MALAYALAM;case"mongolian":return kn.MONGOLIAN;case"myanmar":return kn.MYANMAR;case"oriya":return kn.ORIYA;case"persian":return kn.PERSIAN;case"simp-chinese-formal":return kn.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return kn.SIMP_CHINESE_INFORMAL;case"tamil":return kn.TAMIL;case"telugu":return kn.TELUGU;case"thai":return kn.THAI;case"tibetan":return kn.TIBETAN;case"trad-chinese-formal":return kn.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return kn.TRAD_CHINESE_INFORMAL;case"upper-armenian":return kn.UPPER_ARMENIAN;case"disclosure-open":return kn.DISCLOSURE_OPEN;case"disclosure-closed":return kn.DISCLOSURE_CLOSED;case"none":default:return kn.NONE}}},Mn=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:at.TOKEN_VALUE}},Pn=Mn("top"),Dn=Mn("right"),Nn=Mn("bottom"),Ln=Mn("left");!function(e){e[e.VISIBLE=0]="VISIBLE",e[e.HIDDEN=1]="HIDDEN",e[e.SCROLL=2]="SCROLL",e[e.AUTO=3]="AUTO"}(On||(On={}));var Rn,Bn={name:"overflow",initialValue:"visible",prefix:!1,type:at.LIST,parse:function(e){return e.filter(De).map((function(e){switch(e.value){case"hidden":return On.HIDDEN;case"scroll":return On.SCROLL;case"auto":return On.AUTO;case"visible":default:return On.VISIBLE}}))}};!function(e){e.NORMAL="normal",e.BREAK_WORD="break-word"}(Rn||(Rn={}));var jn,Fn={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"break-word":return Rn.BREAK_WORD;case"normal":default:return Rn.NORMAL}}},Un=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:at.TYPE_VALUE,format:"length-percentage"}},Hn=Un("top"),zn=Un("right"),Vn=Un("bottom"),Wn=Un("left");!function(e){e[e.LEFT=0]="LEFT",e[e.CENTER=1]="CENTER",e[e.RIGHT=2]="RIGHT"}(jn||(jn={}));var Gn,qn={name:"text-align",initialValue:"left",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"right":return jn.RIGHT;case"center":case"justify":return jn.CENTER;case"left":default:return jn.LEFT}}};!function(e){e[e.STATIC=0]="STATIC",e[e.RELATIVE=1]="RELATIVE",e[e.ABSOLUTE=2]="ABSOLUTE",e[e.FIXED=3]="FIXED",e[e.STICKY=4]="STICKY"}(Gn||(Gn={}));var Yn,Kn={name:"position",initialValue:"static",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"relative":return Gn.RELATIVE;case"absolute":return Gn.ABSOLUTE;case"fixed":return Gn.FIXED;case"sticky":return Gn.STICKY}return Gn.STATIC}},Xn={name:"text-shadow",initialValue:"none",type:at.LIST,prefix:!1,parse:function(e){return 1===e.length&&Le(e[0],"none")?[]:je(e).map((function(e){for(var t={color:ct.TRANSPARENT,offsetX:Ve,offsetY:Ve,blur:Ve},n=0,r=0;r<e.length;r++){var i=e[r];Ue(i)?(0===n?t.offsetX=i:1===n?t.offsetY=i:t.blur=i,n++):t.color=Je(i)}return t}))}};!function(e){e[e.NONE=0]="NONE",e[e.LOWERCASE=1]="LOWERCASE",e[e.UPPERCASE=2]="UPPERCASE",e[e.CAPITALIZE=3]="CAPITALIZE"}(Yn||(Yn={}));var Qn,$n={name:"text-transform",initialValue:"none",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"uppercase":return Yn.UPPERCASE;case"lowercase":return Yn.LOWERCASE;case"capitalize":return Yn.CAPITALIZE}return Yn.NONE}},Jn={name:"transform",initialValue:"none",prefix:!0,type:at.VALUE,parse:function(e){if(e.type===h.IDENT_TOKEN&&"none"===e.value)return null;if(e.type===h.FUNCTION){var t=Zn[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},Zn={matrix:function(e){var t=e.filter((function(e){return e.type===h.NUMBER_TOKEN})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d:function(e){var t=e.filter((function(e){return e.type===h.NUMBER_TOKEN})).map((function(e){return e.number})),n=t[0],r=t[1],i=(t[2],t[3],t[4]),a=t[5],o=(t[6],t[7],t[8],t[9],t[10],t[11],t[12]),s=t[13];return t[14],t[15],16===t.length?[n,r,i,a,o,s]:null}},er={type:h.PERCENTAGE_TOKEN,number:50,flags:4},tr=[er,er],nr={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:at.LIST,parse:function(e){var t=e.filter(He);return 2!==t.length?tr:[t[0],t[1]]}};!function(e){e[e.VISIBLE=0]="VISIBLE",e[e.HIDDEN=1]="HIDDEN",e[e.COLLAPSE=2]="COLLAPSE"}(Qn||(Qn={}));var rr,ir={name:"visible",initialValue:"none",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"hidden":return Qn.HIDDEN;case"collapse":return Qn.COLLAPSE;case"visible":default:return Qn.VISIBLE}}};!function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"}(rr||(rr={}));var ar,or={name:"word-break",initialValue:"normal",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"break-all":return rr.BREAK_ALL;case"keep-all":return rr.KEEP_ALL;case"normal":default:return rr.NORMAL}}},sr={name:"z-index",initialValue:"auto",prefix:!1,type:at.VALUE,parse:function(e){if(e.type===h.IDENT_TOKEN)return{auto:!0,order:0};if(Pe(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},lr={name:"opacity",initialValue:"1",type:at.VALUE,prefix:!1,parse:function(e){return Pe(e)?e.number:1}},cr={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:at.TYPE_VALUE,format:"color"},ur={name:"text-decoration-line",initialValue:"none",prefix:!1,type:at.LIST,parse:function(e){return e.filter(De).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},dr={name:"font-family",initialValue:"",prefix:!1,type:at.LIST,parse:function(e){var t=[],n=[];return e.forEach((function(e){switch(e.type){case h.IDENT_TOKEN:case h.STRING_TOKEN:t.push(e.value);break;case h.NUMBER_TOKEN:t.push(e.number.toString());break;case h.COMMA_TOKEN:n.push(t.join(" ")),t.length=0}})),t.length&&n.push(t.join(" ")),n.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},hr={name:"font-size",initialValue:"0",prefix:!1,type:at.TYPE_VALUE,format:"length"},fr={name:"font-weight",initialValue:"normal",type:at.VALUE,prefix:!1,parse:function(e){if(Pe(e))return e.number;if(De(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},pr={name:"font-variant",initialValue:"none",type:at.LIST,prefix:!1,parse:function(e){return e.filter(De).map((function(e){return e.value}))}};!function(e){e.NORMAL="normal",e.ITALIC="italic",e.OBLIQUE="oblique"}(ar||(ar={}));var mr,gr={name:"font-style",initialValue:"normal",prefix:!1,type:at.IDENT_VALUE,parse:function(e){switch(e){case"oblique":return ar.OBLIQUE;case"italic":return ar.ITALIC;case"normal":default:return ar.NORMAL}}},vr=function(e,t){return 0!=(e&t)},br={name:"content",initialValue:"none",type:at.LIST,prefix:!1,parse:function(e){if(0===e.length)return[];var t=e[0];return t.type===h.IDENT_TOKEN&&"none"===t.value?[]:e}},yr={name:"counter-increment",initialValue:"none",prefix:!0,type:at.LIST,parse:function(e){if(0===e.length)return null;var t=e[0];if(t.type===h.IDENT_TOKEN&&"none"===t.value)return null;for(var n=[],r=e.filter(Re),i=0;i<r.length;i++){var a=r[i],o=r[i+1];if(a.type===h.IDENT_TOKEN){var s=o&&Pe(o)?o.number:1;n.push({counter:a.value,increment:s})}}return n}},Ar={name:"counter-reset",initialValue:"none",prefix:!0,type:at.LIST,parse:function(e){if(0===e.length)return[];for(var t=[],n=e.filter(Re),r=0;r<n.length;r++){var i=n[r],a=n[r+1];if(De(i)&&"none"!==i.value){var o=a&&Pe(a)?a.number:0;t.push({counter:i.value,reset:o})}}return t}},_r={name:"quotes",initialValue:"none",prefix:!0,type:at.LIST,parse:function(e){if(0===e.length)return null;var t=e[0];if(t.type===h.IDENT_TOKEN&&"none"===t.value)return null;var n=[],r=e.filter(Ne);if(r.length%2!=0)return null;for(var i=0;i<r.length;i+=2){var a=r[i].value,o=r[i+1].value;n.push({open:a,close:o})}return n}},wr=function(e,t,n){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:""},Er={name:"box-shadow",initialValue:"none",type:at.LIST,prefix:!1,parse:function(e){return 1===e.length&&Le(e[0],"none")?[]:je(e).map((function(e){for(var t={color:255,offsetX:Ve,offsetY:Ve,blur:Ve,spread:Ve,inset:!1},n=0,r=0;r<e.length;r++){var i=e[r];Le(i,"inset")?t.inset=!0:Ue(i)?(0===n?t.offsetX=i:1===n?t.offsetY=i:2===n?t.blur=i:t.spread=i,n++):t.color=Je(i)}return t}))}},Sr=function(){function e(e){this.backgroundClip=kr(ft,e.backgroundClip),this.backgroundColor=kr(pt,e.backgroundColor),this.backgroundImage=kr(Ut,e.backgroundImage),this.backgroundOrigin=kr(Ht,e.backgroundOrigin),this.backgroundPosition=kr(zt,e.backgroundPosition),this.backgroundRepeat=kr(Wt,e.backgroundRepeat),this.backgroundSize=kr(Yt,e.backgroundSize),this.borderTopColor=kr(Qt,e.borderTopColor),this.borderRightColor=kr($t,e.borderRightColor),this.borderBottomColor=kr(Jt,e.borderBottomColor),this.borderLeftColor=kr(Zt,e.borderLeftColor),this.borderTopLeftRadius=kr(tn,e.borderTopLeftRadius),this.borderTopRightRadius=kr(nn,e.borderTopRightRadius),this.borderBottomRightRadius=kr(rn,e.borderBottomRightRadius),this.borderBottomLeftRadius=kr(an,e.borderBottomLeftRadius),this.borderTopStyle=kr(ln,e.borderTopStyle),this.borderRightStyle=kr(cn,e.borderRightStyle),this.borderBottomStyle=kr(un,e.borderBottomStyle),this.borderLeftStyle=kr(dn,e.borderLeftStyle),this.borderTopWidth=kr(fn,e.borderTopWidth),this.borderRightWidth=kr(pn,e.borderRightWidth),this.borderBottomWidth=kr(mn,e.borderBottomWidth),this.borderLeftWidth=kr(gn,e.borderLeftWidth),this.boxShadow=kr(Er,e.boxShadow),this.color=kr(vn,e.color),this.display=kr(bn,e.display),this.float=kr(_n,e.cssFloat),this.fontFamily=kr(dr,e.fontFamily),this.fontSize=kr(hr,e.fontSize),this.fontStyle=kr(gr,e.fontStyle),this.fontVariant=kr(pr,e.fontVariant),this.fontWeight=kr(fr,e.fontWeight),this.letterSpacing=kr(wn,e.letterSpacing),this.lineBreak=kr(Sn,e.lineBreak),this.lineHeight=kr(Cn,e.lineHeight),this.listStyleImage=kr(Tn,e.listStyleImage),this.listStylePosition=kr(xn,e.listStylePosition),this.listStyleType=kr(In,e.listStyleType),this.marginTop=kr(Pn,e.marginTop),this.marginRight=kr(Dn,e.marginRight),this.marginBottom=kr(Nn,e.marginBottom),this.marginLeft=kr(Ln,e.marginLeft),this.opacity=kr(lr,e.opacity);var t=kr(Bn,e.overflow);this.overflowX=t[0],this.overflowY=t[t.length>1?1:0],this.overflowWrap=kr(Fn,e.overflowWrap),this.paddingTop=kr(Hn,e.paddingTop),this.paddingRight=kr(zn,e.paddingRight),this.paddingBottom=kr(Vn,e.paddingBottom),this.paddingLeft=kr(Wn,e.paddingLeft),this.position=kr(Kn,e.position),this.textAlign=kr(qn,e.textAlign),this.textDecorationColor=kr(cr,e.textDecorationColor||e.color),this.textDecorationLine=kr(ur,e.textDecorationLine),this.textShadow=kr(Xn,e.textShadow),this.textTransform=kr($n,e.textTransform),this.transform=kr(Jn,e.transform),this.transformOrigin=kr(nr,e.transformOrigin),this.visibility=kr(ir,e.visibility),this.wordBreak=kr(or,e.wordBreak),this.zIndex=kr(sr,e.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===Qn.VISIBLE},e.prototype.isTransparent=function(){return Ze(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return this.position!==Gn.STATIC},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==on.NONE},e.prototype.isInlineLevel=function(){return vr(this.display,4)||vr(this.display,33554432)||vr(this.display,268435456)||vr(this.display,536870912)||vr(this.display,67108864)||vr(this.display,134217728)},e}(),Cr=function(e){this.content=kr(br,e.content),this.quotes=kr(_r,e.quotes)},Tr=function(e){this.counterIncrement=kr(yr,e.counterIncrement),this.counterReset=kr(Ar,e.counterReset)},kr=function(e,t){var n=new Oe,r=null!=t?t.toString():e.initialValue;n.write(r);var i=new Ie(n.read());switch(e.type){case at.IDENT_VALUE:var a=i.parseComponentValue();return e.parse(De(a)?a.value:e.initialValue);case at.VALUE:return e.parse(i.parseComponentValue());case at.LIST:return e.parse(i.parseComponentValues());case at.TOKEN_VALUE:return i.parseComponentValue();case at.TYPE_VALUE:switch(e.format){case"angle":return Ke(i.parseComponentValue());case"color":return Je(i.parseComponentValue());case"image":return jt(i.parseComponentValue());case"length":var o=i.parseComponentValue();return Ue(o)?o:Ve;case"length-percentage":var s=i.parseComponentValue();return He(s)?s:Ve}}throw new Error("Attempting to parse unsupported css format type "+e.format)},xr=function(e){this.styles=new Sr(window.getComputedStyle(e,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&ai(e)&&(e.style.transform="none"),this.bounds=o(e),this.flags=0},Or=function(e,t){this.text=e,this.bounds=t},Ir=function(e){var t=e.ownerDocument;if(t){var n=t.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var r=e.parentNode;if(r){r.replaceChild(n,e);var i=o(n);return n.firstChild&&r.replaceChild(n.firstChild,n),i}}return new a(0,0,0,0)},Mr=function(e,t,n){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),a.fromClientRect(i.getBoundingClientRect())},Pr=function(e,t){return 0!==t.letterSpacing?s(e).map((function(e){return l(e)})):Dr(e,t)},Dr=function(e,t){for(var n,r=function(e,t){var n=s(e),r=Q(n,t),i=r[0],a=r[1],o=r[2],l=n.length,c=0,u=0;return{next:function(){if(u>=l)return{done:!0,value:null};for(var e="×";u<l&&"×"===(e=X(n,a,i,++u,o)););if("×"!==e||u===l){var t=new $(n,e,c,u);return c=u,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap===Rn.BREAK_WORD?"break-word":t.wordBreak}),i=[];!(n=r.next()).done;)n.value&&i.push(n.value.slice());return i},Nr=function(e,t){this.text=Lr(e.data,t.textTransform),this.textBounds=function(e,t,n){var r=Pr(e,t),i=[],a=0;return r.forEach((function(e){if(t.textDecorationLine.length||e.trim().length>0)if(St.SUPPORT_RANGE_BOUNDS)i.push(new Or(e,Mr(n,a,e.length)));else{var r=n.splitText(e.length);i.push(new Or(e,Ir(n))),n=r}else St.SUPPORT_RANGE_BOUNDS||(n=n.splitText(e.length));a+=e.length})),i}(this.text,t,e)},Lr=function(e,t){switch(t){case Yn.LOWERCASE:return e.toLowerCase();case Yn.CAPITALIZE:return e.replace(Rr,Br);case Yn.UPPERCASE:return e.toUpperCase();default:return e}},Rr=/(^|\s|:|-|\(|\))([a-z])/g,Br=function(e,t,n){return e.length>0?t+n.toUpperCase():e},jr=function(e){function n(t){var n=e.call(this,t)||this;return n.src=t.currentSrc||t.src,n.intrinsicWidth=t.naturalWidth,n.intrinsicHeight=t.naturalHeight,Tt.getInstance().addImage(n.src),n}return t(n,e),n}(xr),Fr=function(e){function n(t){var n=e.call(this,t)||this;return n.canvas=t,n.intrinsicWidth=t.width,n.intrinsicHeight=t.height,n}return t(n,e),n}(xr),Ur=function(e){function n(t){var n=e.call(this,t)||this,r=new XMLSerializer;return n.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(t)),n.intrinsicWidth=t.width.baseVal.value,n.intrinsicHeight=t.height.baseVal.value,Tt.getInstance().addImage(n.svg),n}return t(n,e),n}(xr),Hr=function(e){function n(t){var n=e.call(this,t)||this;return n.value=t.value,n}return t(n,e),n}(xr),zr=function(e){function n(t){var n=e.call(this,t)||this;return n.start=t.start,n.reversed="boolean"==typeof t.reversed&&!0===t.reversed,n}return t(n,e),n}(xr),Vr=[{type:h.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],Wr=[{type:h.PERCENTAGE_TOKEN,flags:0,number:50}],Gr="password",qr=function(e){function n(t){var n,r,i,o=e.call(this,t)||this;switch(o.type=t.type.toLowerCase(),o.checked=t.checked,o.value=0===(r=(n=t).type===Gr?new Array(n.value.length+1).join("•"):n.value).length?n.placeholder||"":r,"checkbox"!==o.type&&"radio"!==o.type||(o.styles.backgroundColor=3739148031,o.styles.borderTopColor=o.styles.borderRightColor=o.styles.borderBottomColor=o.styles.borderLeftColor=2779096575,o.styles.borderTopWidth=o.styles.borderRightWidth=o.styles.borderBottomWidth=o.styles.borderLeftWidth=1,o.styles.borderTopStyle=o.styles.borderRightStyle=o.styles.borderBottomStyle=o.styles.borderLeftStyle=qt.SOLID,o.styles.backgroundClip=[ot.BORDER_BOX],o.styles.backgroundOrigin=[0],o.bounds=(i=o.bounds).width>i.height?new a(i.left+(i.width-i.height)/2,i.top,i.height,i.height):i.width<i.height?new a(i.left,i.top+(i.height-i.width)/2,i.width,i.width):i),o.type){case"checkbox":o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=Vr;break;case"radio":o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=Wr}return o}return t(n,e),n}(xr),Yr=function(e){function n(t){var n=e.call(this,t)||this,r=t.options[t.selectedIndex||0];return n.value=r&&r.text||"",n}return t(n,e),n}(xr),Kr=function(e){function n(t){var n=e.call(this,t)||this;return n.value=t.value,n}return t(n,e),n}(xr),Xr=function(e){return Je(Ie.create(e).parseComponentValue())},Qr=function(e){function n(t){var n=e.call(this,t)||this;n.src=t.src,n.width=parseInt(t.width,10)||0,n.height=parseInt(t.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement){n.tree=ei(t.contentWindow.document.documentElement);var r=t.contentWindow.document.documentElement?Xr(getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):ct.TRANSPARENT,i=t.contentWindow.document.body?Xr(getComputedStyle(t.contentWindow.document.body).backgroundColor):ct.TRANSPARENT;n.backgroundColor=Ze(r)?Ze(i)?n.styles.backgroundColor:i:r}}catch(e){}return n}return t(n,e),n}(xr),$r=["OL","UL","MENU"],Jr=function(e,t,n){for(var r=e.firstChild,i=void 0;r;r=i)if(i=r.nextSibling,ri(r)&&r.data.trim().length>0)t.textNodes.push(new Nr(r,t.styles));else if(ii(r)){var a=Zr(r);a.styles.isVisible()&&(ti(r,a,n)?a.flags|=4:ni(a.styles)&&(a.flags|=2),-1!==$r.indexOf(r.tagName)&&(a.flags|=8),t.elements.push(a),vi(r)||ui(r)||bi(r)||Jr(r,a,n))}},Zr=function(e){return fi(e)?new jr(e):hi(e)?new Fr(e):ui(e)?new Ur(e):si(e)?new Hr(e):li(e)?new zr(e):ci(e)?new qr(e):bi(e)?new Yr(e):vi(e)?new Kr(e):pi(e)?new Qr(e):new xr(e)},ei=function(e){var t=Zr(e);return t.flags|=4,Jr(e,t,t),t},ti=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||di(e)&&n.styles.isTransparent()},ni=function(e){return e.isPositioned()||e.isFloating()},ri=function(e){return e.nodeType===Node.TEXT_NODE},ii=function(e){return e.nodeType===Node.ELEMENT_NODE},ai=function(e){return ii(e)&&void 0!==e.style&&!oi(e)},oi=function(e){return"object"==typeof e.className},si=function(e){return"LI"===e.tagName},li=function(e){return"OL"===e.tagName},ci=function(e){return"INPUT"===e.tagName},ui=function(e){return"svg"===e.tagName},di=function(e){return"BODY"===e.tagName},hi=function(e){return"CANVAS"===e.tagName},fi=function(e){return"IMG"===e.tagName},pi=function(e){return"IFRAME"===e.tagName},mi=function(e){return"STYLE"===e.tagName},gi=function(e){return"SCRIPT"===e.tagName},vi=function(e){return"TEXTAREA"===e.tagName},bi=function(e){return"SELECT"===e.tagName},yi=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,i=!0;null!==n&&n.forEach((function(e){var n=t.counters[e.counter];n&&0!==e.increment&&(i=!1,n[Math.max(0,n.length-1)]+=e.increment)}));var a=[];return i&&r.forEach((function(e){var n=t.counters[e.counter];a.push(e.counter),n||(n=t.counters[e.counter]=[]),n.push(e.reset)})),a},e}(),Ai={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},_i={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},wi={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Ei={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Si=function(e,t,n,r,i,a){return e<t||e>n?Oi(e,i,a.length>0):r.integers.reduce((function(t,n,i){for(;e>=n;)e-=n,t+=r.values[i];return t}),"")+a},Ci=function(e,t,n,r){var i="";do{n||e--,i=r(e)+i,e/=t}while(e*t>=t);return i},Ti=function(e,t,n,r,i){var a=n-t+1;return(e<0?"-":"")+(Ci(Math.abs(e),a,r,(function(e){return l(Math.floor(e%a)+t)}))+i)},ki=function(e,t,n){void 0===n&&(n=". ");var r=t.length;return Ci(Math.abs(e),r,!1,(function(e){return t[Math.floor(e%r)]}))+n},xi=function(e,t,n,r,i,a){if(e<-9999||e>9999)return Oi(e,kn.CJK_DECIMAL,i.length>0);var o=Math.abs(e),s=i;if(0===o)return t[0]+s;for(var l=0;o>0&&l<=4;l++){var c=o%10;0===c&&vr(a,1)&&""!==s?s=t[c]+s:c>1||1===c&&0===l||1===c&&1===l&&vr(a,2)||1===c&&1===l&&vr(a,4)&&e>100||1===c&&l>1&&vr(a,8)?s=t[c]+(l>0?n[l-1]:"")+s:1===c&&l>0&&(s=n[l-1]+s),o=Math.floor(o/10)}return(e<0?r:"")+s},Oi=function(e,t,n){var r=n?". ":"",i=n?"、":"",a=n?", ":"",o=n?" ":"";switch(t){case kn.DISC:return"•"+o;case kn.CIRCLE:return"◦"+o;case kn.SQUARE:return"◾"+o;case kn.DECIMAL_LEADING_ZERO:var s=Ti(e,48,57,!0,r);return s.length<4?"0"+s:s;case kn.CJK_DECIMAL:return ki(e,"〇一二三四五六七八九",i);case kn.LOWER_ROMAN:return Si(e,1,3999,Ai,kn.DECIMAL,r).toLowerCase();case kn.UPPER_ROMAN:return Si(e,1,3999,Ai,kn.DECIMAL,r);case kn.LOWER_GREEK:return Ti(e,945,969,!1,r);case kn.LOWER_ALPHA:return Ti(e,97,122,!1,r);case kn.UPPER_ALPHA:return Ti(e,65,90,!1,r);case kn.ARABIC_INDIC:return Ti(e,1632,1641,!0,r);case kn.ARMENIAN:case kn.UPPER_ARMENIAN:return Si(e,1,9999,_i,kn.DECIMAL,r);case kn.LOWER_ARMENIAN:return Si(e,1,9999,_i,kn.DECIMAL,r).toLowerCase();case kn.BENGALI:return Ti(e,2534,2543,!0,r);case kn.CAMBODIAN:case kn.KHMER:return Ti(e,6112,6121,!0,r);case kn.CJK_EARTHLY_BRANCH:return ki(e,"子丑寅卯辰巳午未申酉戌亥",i);case kn.CJK_HEAVENLY_STEM:return ki(e,"甲乙丙丁戊己庚辛壬癸",i);case kn.CJK_IDEOGRAPHIC:case kn.TRAD_CHINESE_INFORMAL:return xi(e,"零一二三四五六七八九","十百千萬","負",i,14);case kn.TRAD_CHINESE_FORMAL:return xi(e,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",i,15);case kn.SIMP_CHINESE_INFORMAL:return xi(e,"零一二三四五六七八九","十百千萬","负",i,14);case kn.SIMP_CHINESE_FORMAL:return xi(e,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",i,15);case kn.JAPANESE_INFORMAL:return xi(e,"〇一二三四五六七八九","十百千万","マイナス",i,0);case kn.JAPANESE_FORMAL:return xi(e,"零壱弐参四伍六七八九","拾百千万","マイナス",i,7);case kn.KOREAN_HANGUL_FORMAL:return xi(e,"영일이삼사오육칠팔구","십백천만","마이너스",a,7);case kn.KOREAN_HANJA_INFORMAL:return xi(e,"零一二三四五六七八九","十百千萬","마이너스",a,0);case kn.KOREAN_HANJA_FORMAL:return xi(e,"零壹貳參四五六七八九","拾百千","마이너스",a,7);case kn.DEVANAGARI:return Ti(e,2406,2415,!0,r);case kn.GEORGIAN:return Si(e,1,19999,Ei,kn.DECIMAL,r);case kn.GUJARATI:return Ti(e,2790,2799,!0,r);case kn.GURMUKHI:return Ti(e,2662,2671,!0,r);case kn.HEBREW:return Si(e,1,10999,wi,kn.DECIMAL,r);case kn.HIRAGANA:return ki(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case kn.HIRAGANA_IROHA:return ki(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case kn.KANNADA:return Ti(e,3302,3311,!0,r);case kn.KATAKANA:return ki(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case kn.KATAKANA_IROHA:return ki(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case kn.LAO:return Ti(e,3792,3801,!0,r);case kn.MONGOLIAN:return Ti(e,6160,6169,!0,r);case kn.MYANMAR:return Ti(e,4160,4169,!0,r);case kn.ORIYA:return Ti(e,2918,2927,!0,r);case kn.PERSIAN:return Ti(e,1776,1785,!0,r);case kn.TAMIL:return Ti(e,3046,3055,!0,r);case kn.TELUGU:return Ti(e,3174,3183,!0,r);case kn.THAI:return Ti(e,3664,3673,!0,r);case kn.TIBETAN:return Ti(e,3872,3881,!0,r);case kn.DECIMAL:default:return Ti(e,48,57,!0,r)}},Ii=function(){function e(e,t){if(this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new yi,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement)}return e.prototype.toIFrame=function(e,t){var n=this,a=Pi(e,t);if(!a.contentWindow)return Promise.reject("Unable to find iframe window");var o=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,l=a.contentWindow,c=l.document,u=Di(a).then((function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.scrolledElements.forEach(Bi),l&&(l.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||l.scrollY===t.top&&l.scrollX===t.left||(c.documentElement.style.top=-t.top+"px",c.documentElement.style.left=-t.left+"px",c.documentElement.style.position="absolute")),e=this.options.onclone,void 0===this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:n.sent(),n.label=2;case 2:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(c)})).then((function(){return a}))]:[2,a]}}))}))}));return c.open(),c.write(Li(document.doctype)+"<html></html>"),Ri(this.referenceElement.ownerDocument,o,s),c.replaceChild(c.adoptNode(this.documentElement),c.documentElement),c.close(),u},e.prototype.createElementClone=function(e){if(hi(e))return this.createCanvasClone(e);if(mi(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return fi(t)&&"lazy"===t.loading&&(t.loading="eager"),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),r=e.cloneNode(!1);return r.textContent=n,r}}catch(e){if(Ct.getInstance(this.options.id).error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){if(this.options.inlineImages&&e.ownerDocument){var t=e.ownerDocument.createElement("img");try{return t.src=e.toDataURL(),t}catch(e){Ct.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var r=e.getContext("2d"),i=n.getContext("2d");return i&&(r?i.putImageData(r.getImageData(0,0,e.width,e.height),0,0):i.drawImage(e,0,0)),n}catch(e){}return n},e.prototype.cloneNode=function(e){if(ri(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var t=e.ownerDocument.defaultView;if(t&&ii(e)&&(ai(e)||oi(e))){var n=this.createElementClone(e),r=t.getComputedStyle(e),i=t.getComputedStyle(e,":before"),a=t.getComputedStyle(e,":after");this.referenceElement===e&&ai(n)&&(this.clonedReferenceElement=n),di(n)&&Ui(n);for(var o=this.counters.parse(new Tr(r)),s=this.resolvePseudoContent(e,n,i,mr.BEFORE),l=e.firstChild;l;l=l.nextSibling)ii(l)&&(gi(l)||l.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(l))||this.options.copyStyles&&ii(l)&&mi(l)||n.appendChild(this.cloneNode(l));s&&n.insertBefore(s,n.firstChild);var c=this.resolvePseudoContent(e,n,a,mr.AFTER);return c&&n.appendChild(c),this.counters.pop(o),r&&(this.options.copyStyles||oi(e))&&!pi(e)&&Ni(r,n),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(vi(e)||bi(e))&&(vi(n)||bi(n))&&(n.value=e.value),n}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var a=n.content,o=t.ownerDocument;if(o&&a&&"none"!==a&&"-moz-alt-content"!==a&&"none"!==n.display){this.counters.parse(new Tr(n));var s=new Cr(n),l=o.createElement("html2canvaspseudoelement");Ni(n,l),s.content.forEach((function(t){if(t.type===h.STRING_TOKEN)l.appendChild(o.createTextNode(t.value));else if(t.type===h.URL_TOKEN){var n=o.createElement("img");n.src=t.value,n.style.opacity="1",l.appendChild(n)}else if(t.type===h.FUNCTION){if("attr"===t.name){var r=t.values.filter(De);r.length&&l.appendChild(o.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===t.name){var a=t.values.filter(Be),c=a[0],u=a[1];if(c&&De(c)){var d=i.counters.getCounterValue(c.value),f=u&&De(u)?In.parse(u.value):kn.DECIMAL;l.appendChild(o.createTextNode(Oi(d,f,!1)))}}else if("counters"===t.name){var p=t.values.filter(Be),m=(c=p[0],p[1]);if(u=p[2],c&&De(c)){var g=i.counters.getCounterValues(c.value),v=u&&De(u)?In.parse(u.value):kn.DECIMAL,b=m&&m.type===h.STRING_TOKEN?m.value:"",y=g.map((function(e){return Oi(e,v,!1)})).join(b);l.appendChild(o.createTextNode(y))}}}else if(t.type===h.IDENT_TOKEN)switch(t.value){case"open-quote":l.appendChild(o.createTextNode(wr(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":l.appendChild(o.createTextNode(wr(s.quotes,--i.quoteDepth,!1)));break;default:l.appendChild(o.createTextNode(t.value))}})),l.className=ji+" "+Fi;var c=r===mr.BEFORE?" "+ji:" "+Fi;return oi(t)?t.className.baseValue+=c:t.className+=c,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(mr||(mr={}));var Mi,Pi=function(e,t){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling="no",n.setAttribute("data-html2canvas-ignore","true"),e.body.appendChild(n),n},Di=function(e){return new Promise((function(t,n){var r=e.contentWindow;if(!r)return n("No window assigned for iframe");var i=r.document;r.onload=e.onload=i.onreadystatechange=function(){r.onload=e.onload=i.onreadystatechange=null;var n=setInterval((function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(n),t(e))}),50)}}))},Ni=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);"content"!==r&&t.style.setProperty(r,e.getPropertyValue(r))}return t},Li=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},Ri=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},Bi=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},ji="___html2canvas___pseudoelement_before",Fi="___html2canvas___pseudoelement_after",Ui=function(e){Hi(e,"."+ji+':before{\n    content: "" !important;\n    display: none !important;\n}\n         .'+Fi+':after{\n    content: "" !important;\n    display: none !important;\n}')},Hi=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}};!function(e){e[e.VECTOR=0]="VECTOR",e[e.BEZIER_CURVE=1]="BEZIER_CURVE"}(Mi||(Mi={}));var zi,Vi=function(e,t){return e.length===t.length&&e.some((function(e,n){return e===t[n]}))},Wi=function(){function e(e,t){this.type=Mi.VECTOR,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),Gi=function(e,t,n){return new Wi(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},qi=function(){function e(e,t,n,r){this.type=Mi.BEZIER_CURVE,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=Gi(this.start,this.startControl,t),i=Gi(this.startControl,this.endControl,t),a=Gi(this.endControl,this.end,t),o=Gi(r,i,t),s=Gi(i,a,t),l=Gi(o,s,t);return n?new e(this.start,r,o,l):new e(l,s,a,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Yi=function(e){return e.type===Mi.BEZIER_CURVE},Ki=function(e){var t=e.styles,n=e.bounds,r=qe(t.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],o=qe(t.borderTopRightRadius,n.width,n.height),s=o[0],l=o[1],c=qe(t.borderBottomRightRadius,n.width,n.height),u=c[0],d=c[1],h=qe(t.borderBottomLeftRadius,n.width,n.height),f=h[0],p=h[1],m=[];m.push((i+s)/n.width),m.push((f+u)/n.width),m.push((a+p)/n.height),m.push((l+d)/n.height);var g=Math.max.apply(Math,m);g>1&&(i/=g,a/=g,s/=g,l/=g,u/=g,d/=g,f/=g,p/=g);var v=n.width-s,b=n.height-d,y=n.width-u,A=n.height-p,_=t.borderTopWidth,w=t.borderRightWidth,E=t.borderBottomWidth,S=t.borderLeftWidth,C=Ye(t.paddingTop,e.bounds.width),T=Ye(t.paddingRight,e.bounds.width),k=Ye(t.paddingBottom,e.bounds.width),x=Ye(t.paddingLeft,e.bounds.width);this.topLeftBorderBox=i>0||a>0?Xi(n.left,n.top,i,a,zi.TOP_LEFT):new Wi(n.left,n.top),this.topRightBorderBox=s>0||l>0?Xi(n.left+v,n.top,s,l,zi.TOP_RIGHT):new Wi(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||d>0?Xi(n.left+y,n.top+b,u,d,zi.BOTTOM_RIGHT):new Wi(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=f>0||p>0?Xi(n.left,n.top+A,f,p,zi.BOTTOM_LEFT):new Wi(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?Xi(n.left+S,n.top+_,Math.max(0,i-S),Math.max(0,a-_),zi.TOP_LEFT):new Wi(n.left+S,n.top+_),this.topRightPaddingBox=s>0||l>0?Xi(n.left+Math.min(v,n.width+S),n.top+_,v>n.width+S?0:s-S,l-_,zi.TOP_RIGHT):new Wi(n.left+n.width-w,n.top+_),this.bottomRightPaddingBox=u>0||d>0?Xi(n.left+Math.min(y,n.width-S),n.top+Math.min(b,n.height+_),Math.max(0,u-w),d-E,zi.BOTTOM_RIGHT):new Wi(n.left+n.width-w,n.top+n.height-E),this.bottomLeftPaddingBox=f>0||p>0?Xi(n.left+S,n.top+A,Math.max(0,f-S),p-E,zi.BOTTOM_LEFT):new Wi(n.left+S,n.top+n.height-E),this.topLeftContentBox=i>0||a>0?Xi(n.left+S+x,n.top+_+C,Math.max(0,i-(S+x)),Math.max(0,a-(_+C)),zi.TOP_LEFT):new Wi(n.left+S+x,n.top+_+C),this.topRightContentBox=s>0||l>0?Xi(n.left+Math.min(v,n.width+S+x),n.top+_+C,v>n.width+S+x?0:s-S+x,l-(_+C),zi.TOP_RIGHT):new Wi(n.left+n.width-(w+T),n.top+_+C),this.bottomRightContentBox=u>0||d>0?Xi(n.left+Math.min(y,n.width-(S+x)),n.top+Math.min(b,n.height+_+C),Math.max(0,u-(w+T)),d-(E+k),zi.BOTTOM_RIGHT):new Wi(n.left+n.width-(w+T),n.top+n.height-(E+k)),this.bottomLeftContentBox=f>0||p>0?Xi(n.left+S+x,n.top+A,Math.max(0,f-(S+x)),p-(E+k),zi.BOTTOM_LEFT):new Wi(n.left+S+x,n.top+n.height-(E+k))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(zi||(zi={}));var Xi=function(e,t,n,r,i){var a=(Math.sqrt(2)-1)/3*4,o=n*a,s=r*a,l=e+n,c=t+r;switch(i){case zi.TOP_LEFT:return new qi(new Wi(e,c),new Wi(e,c-s),new Wi(l-o,t),new Wi(l,t));case zi.TOP_RIGHT:return new qi(new Wi(e,t),new Wi(e+o,t),new Wi(l,c-s),new Wi(l,c));case zi.BOTTOM_RIGHT:return new qi(new Wi(l,t),new Wi(l,t+s),new Wi(e+o,c),new Wi(e,c));case zi.BOTTOM_LEFT:default:return new qi(new Wi(l,c),new Wi(l-o,c),new Wi(e,t+s),new Wi(e,t))}},Qi=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},$i=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Ji=function(e,t,n){this.type=0,this.offsetX=e,this.offsetY=t,this.matrix=n,this.target=6},Zi=function(e,t){this.type=1,this.target=t,this.path=e},ea=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},ta=function(){function e(e,t){if(this.container=e,this.effects=t.slice(0),this.curves=new Ki(e),null!==e.styles.transform){var n=e.bounds.left+e.styles.transformOrigin[0].number,r=e.bounds.top+e.styles.transformOrigin[1].number,i=e.styles.transform;this.effects.push(new Ji(n,r,i))}if(e.styles.overflowX!==On.VISIBLE){var a=Qi(this.curves),o=$i(this.curves);Vi(a,o)?this.effects.push(new Zi(a,6)):(this.effects.push(new Zi(a,2)),this.effects.push(new Zi(o,4)))}}return e.prototype.getParentEffects=function(){var e=this.effects.slice(0);if(this.container.styles.overflowX!==On.VISIBLE){var t=Qi(this.curves),n=$i(this.curves);Vi(t,n)||e.push(new Zi(n,6))}return e},e}(),na=function(e,t,n,r){e.container.elements.forEach((function(i){var a=vr(i.flags,4),o=vr(i.flags,2),s=new ta(i,e.getParentEffects());vr(i.styles.display,2048)&&r.push(s);var l=vr(i.flags,8)?[]:r;if(a||o){var c=a||i.styles.isPositioned()?n:t,u=new ea(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var d=i.styles.zIndex.order;if(d<0){var h=0;c.negativeZIndex.some((function(e,t){return d>e.element.container.styles.zIndex.order?(h=t,!1):h>0})),c.negativeZIndex.splice(h,0,u)}else if(d>0){var f=0;c.positiveZIndex.some((function(e,t){return d>=e.element.container.styles.zIndex.order?(f=t+1,!1):f>0})),c.positiveZIndex.splice(f,0,u)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?c.nonPositionedFloats.push(u):c.nonPositionedInlineLevel.push(u);na(s,u,a?u:n,l)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),na(s,t,n,l);vr(i.flags,8)&&ra(i,l)}))},ra=function(e,t){for(var n=e instanceof zr?e.start:1,r=e instanceof zr&&e.reversed,i=0;i<t.length;i++){var a=t[i];a.container instanceof Hr&&"number"==typeof a.container.value&&0!==a.container.value&&(n=a.container.value),a.listValue=Oi(n,a.container.styles.listStyleType,!0),n+=r?-1:1}},ia=function(e,t,n,r){var i=[];return Yi(e)?i.push(e.subdivide(.5,!1)):i.push(e),Yi(n)?i.push(n.subdivide(.5,!0)):i.push(n),Yi(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),Yi(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},aa=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},oa=function(e){var t=e.styles,n=e.bounds,r=Ye(t.paddingLeft,n.width),i=Ye(t.paddingRight,n.width),a=Ye(t.paddingTop,n.width),o=Ye(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},sa=function(e,t,n){var r=function(e,t){return 0===e?t.bounds:2===e?oa(t):aa(t)}(da(e.styles.backgroundOrigin,t),e),i=function(e,t){return e===ot.BORDER_BOX?t.bounds:e===ot.CONTENT_BOX?oa(t):aa(t)}(da(e.styles.backgroundClip,t),e),a=ua(da(e.styles.backgroundSize,t),n,r),o=a[0],s=a[1],l=qe(da(e.styles.backgroundPosition,t),r.width-o,r.height-s);return[ha(da(e.styles.backgroundRepeat,t),l,a,r,i),Math.round(r.left+l[0]),Math.round(r.top+l[1]),o,s]},la=function(e){return De(e)&&e.value===Vt.AUTO},ca=function(e){return"number"==typeof e},ua=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1];if(He(o)&&s&&He(s))return[Ye(o,n.width),Ye(s,n.height)];var l=ca(a);if(De(o)&&(o.value===Vt.CONTAIN||o.value===Vt.COVER))return ca(a)?n.width/n.height<a!=(o.value===Vt.COVER)?[n.width,n.width/a]:[n.height*a,n.height]:[n.width,n.height];var c=ca(r),u=ca(i),d=c||u;if(la(o)&&(!s||la(s)))return c&&u?[r,i]:l||d?d&&l?[c?r:i*a,u?i:r/a]:[c?r:n.width,u?i:n.height]:[n.width,n.height];if(l){var h=0,f=0;return He(o)?h=Ye(o,n.width):He(s)&&(f=Ye(s,n.height)),la(o)?h=f*a:s&&!la(s)||(f=h/a),[h,f]}var p=null,m=null;if(He(o)?p=Ye(o,n.width):s&&He(s)&&(m=Ye(s,n.height)),null===p||s&&!la(s)||(m=c&&u?p/r*i:n.height),null!==m&&la(o)&&(p=c&&u?m/i*r:n.width),null!==p&&null!==m)return[p,m];throw new Error("Unable to calculate background-size for element")},da=function(e,t){var n=e[t];return void 0===n?e[0]:n},ha=function(e,t,n,r,i){var a=t[0],o=t[1],s=n[0],l=n[1];switch(e){case Bt.REPEAT_X:return[new Wi(Math.round(r.left),Math.round(r.top+o)),new Wi(Math.round(r.left+r.width),Math.round(r.top+o)),new Wi(Math.round(r.left+r.width),Math.round(l+r.top+o)),new Wi(Math.round(r.left),Math.round(l+r.top+o))];case Bt.REPEAT_Y:return[new Wi(Math.round(r.left+a),Math.round(r.top)),new Wi(Math.round(r.left+a+s),Math.round(r.top)),new Wi(Math.round(r.left+a+s),Math.round(r.height+r.top)),new Wi(Math.round(r.left+a),Math.round(r.height+r.top))];case Bt.NO_REPEAT:return[new Wi(Math.round(r.left+a),Math.round(r.top+o)),new Wi(Math.round(r.left+a+s),Math.round(r.top+o)),new Wi(Math.round(r.left+a+s),Math.round(r.top+o+l)),new Wi(Math.round(r.left+a),Math.round(r.top+o+l))];default:return[new Wi(Math.round(i.left),Math.round(i.top)),new Wi(Math.round(i.left+i.width),Math.round(i.top)),new Wi(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Wi(Math.round(i.left),Math.round(i.height+i.top))]}},fa=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),a=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",a.appendChild(n),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode("Hidden Text")),n.appendChild(i),n.appendChild(r);var o=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode("Hidden Text")),n.style.lineHeight="normal",r.style.verticalAlign="super";var s=r.offsetTop-n.offsetTop+2;return a.removeChild(n),{baseline:o,middle:s}},e.prototype.getMetrics=function(e,t){var n=e+" "+t;return void 0===this._data[n]&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),pa=function(){function e(e){this._activeEffects=[],this.canvas=e.canvas?e.canvas:document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options=e,e.canvas||(this.canvas.width=Math.floor(e.width*e.scale),this.canvas.height=Math.floor(e.height*e.scale),this.canvas.style.width=e.width+"px",this.canvas.style.height=e.height+"px"),this.fontMetrics=new fa(document),this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-e.x+e.scrollX,-e.y+e.scrollY),this.ctx.textBaseline="bottom",this._activeEffects=[],Ct.getInstance(e.id).debug("Canvas renderer initialized ("+e.width+"x"+e.height+" at "+e.x+","+e.y+") with scale "+e.scale)}return e.prototype.applyEffects=function(e,t){for(var n=this;this._activeEffects.length;)this.popEffect();e.filter((function(e){return vr(e.target,t)})).forEach((function(e){return n.applyEffect(e)}))},e.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),function(e){return 1===e.type}(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return(t=e.element.container.styles).isVisible()?(this.ctx.globalAlpha=t.opacity,[4,this.renderStackContent(e)]):[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},e.prototype.renderNode=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},e.prototype.renderTextWithLetterSpacing=function(e,t){var n=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+e.bounds.height):s(e.text).map((function(e){return l(e)})).reduce((function(t,r){return n.ctx.fillText(r,t,e.bounds.top+e.bounds.height),t+n.ctx.measureText(r).width}),e.bounds.left)},e.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),n=e.fontFamily.join(", "),r=Me(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,n].join(" "),n,r]},e.prototype.renderTextNode=function(e,t){return r(this,void 0,void 0,(function(){var n,r,a,o,s=this;return i(this,(function(i){return n=this.createFontStyle(t),r=n[0],a=n[1],o=n[2],this.ctx.font=r,e.textBounds.forEach((function(e){s.ctx.fillStyle=et(t.color),s.renderTextWithLetterSpacing(e,t.letterSpacing);var n=t.textShadow;n.length&&e.text.trim().length&&(n.slice(0).reverse().forEach((function(t){s.ctx.shadowColor=et(t.color),s.ctx.shadowOffsetX=t.offsetX.number*s.options.scale,s.ctx.shadowOffsetY=t.offsetY.number*s.options.scale,s.ctx.shadowBlur=t.blur.number,s.ctx.fillText(e.text,e.bounds.left,e.bounds.top+e.bounds.height)})),s.ctx.shadowColor="",s.ctx.shadowOffsetX=0,s.ctx.shadowOffsetY=0,s.ctx.shadowBlur=0),t.textDecorationLine.length&&(s.ctx.fillStyle=et(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:var n=s.fontMetrics.getMetrics(a,o).baseline;s.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+n),e.bounds.width,1);break;case 2:s.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:var r=s.fontMetrics.getMetrics(a,o).middle;s.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+r),e.bounds.width,1)}})))})),[2]}))}))},e.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=oa(e),i=$i(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return r(this,void 0,void 0,(function(){var n,r,o,s,l,c,u,d,f,p,m,g,v,b;return i(this,(function(i){switch(i.label){case 0:this.applyEffects(t.effects,4),n=t.container,r=t.curves,o=n.styles,s=0,l=n.textNodes,i.label=1;case 1:return s<l.length?(c=l[s],[4,this.renderTextNode(c,o)]):[3,4];case 2:i.sent(),i.label=3;case 3:return s++,[3,1];case 4:if(!(n instanceof jr))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.options.cache.match(n.src)];case 6:return g=i.sent(),this.renderReplacedElement(n,r,g),[3,8];case 7:return i.sent(),Ct.getInstance(this.options.id).error("Error loading image "+n.src),[3,8];case 8:if(n instanceof Fr&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof Ur))return[3,12];i.label=9;case 9:return i.trys.push([9,11,,12]),[4,this.options.cache.match(n.svg)];case 10:return g=i.sent(),this.renderReplacedElement(n,r,g),[3,12];case 11:return i.sent(),Ct.getInstance(this.options.id).error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof Qr&&n.tree?[4,new e({id:this.options.id,scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,scrollX:0,scrollY:0,width:n.width,height:n.height,cache:this.options.cache,windowWidth:n.width,windowHeight:n.height}).render(n.tree)]:[3,14];case 13:u=i.sent(),n.width&&n.height&&this.ctx.drawImage(u,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),i.label=14;case 14:if(n instanceof qr&&(d=Math.min(n.bounds.width,n.bounds.height),"checkbox"===n.type?n.checked&&(this.ctx.save(),this.path([new Wi(n.bounds.left+.39363*d,n.bounds.top+.79*d),new Wi(n.bounds.left+.16*d,n.bounds.top+.5549*d),new Wi(n.bounds.left+.27347*d,n.bounds.top+.44071*d),new Wi(n.bounds.left+.39694*d,n.bounds.top+.5649*d),new Wi(n.bounds.left+.72983*d,n.bounds.top+.23*d),new Wi(n.bounds.left+.84*d,n.bounds.top+.34085*d),new Wi(n.bounds.left+.39363*d,n.bounds.top+.79*d)]),this.ctx.fillStyle=et(707406591),this.ctx.fill(),this.ctx.restore()):"radio"===n.type&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+d/2,n.bounds.top+d/2,d/4,0,2*Math.PI,!0),this.ctx.fillStyle=et(707406591),this.ctx.fill(),this.ctx.restore())),ma(n)&&n.value.length){switch(this.ctx.font=this.createFontStyle(o)[0],this.ctx.fillStyle=et(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign=va(n.styles.textAlign),b=oa(n),f=0,n.styles.textAlign){case jn.CENTER:f+=b.width/2;break;case jn.RIGHT:f+=b.width}p=b.add(f,0,0,-b.height/2+1),this.ctx.save(),this.path([new Wi(b.left,b.top),new Wi(b.left+b.width,b.top),new Wi(b.left+b.width,b.top+b.height),new Wi(b.left,b.top+b.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Or(n.value,p),o.letterSpacing),this.ctx.restore(),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"}if(!vr(n.styles.display,2048))return[3,20];if(null===n.styles.listStyleImage)return[3,19];if((m=n.styles.listStyleImage).type!==ut.URL)return[3,18];g=void 0,v=m.url,i.label=15;case 15:return i.trys.push([15,17,,18]),[4,this.options.cache.match(v)];case 16:return g=i.sent(),this.ctx.drawImage(g,n.bounds.left-(g.width+10),n.bounds.top),[3,18];case 17:return i.sent(),Ct.getInstance(this.options.id).error("Error loading list-style-image "+v),[3,18];case 18:return[3,20];case 19:t.listValue&&n.styles.listStyleType!==kn.NONE&&(this.ctx.font=this.createFontStyle(o)[0],this.ctx.fillStyle=et(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",b=new a(n.bounds.left,n.bounds.top+Ye(n.styles.paddingTop,n.bounds.width),n.bounds.width,function(e,t){return De(e)&&"normal"===e.value?1.2*t:e.type===h.NUMBER_TOKEN?t*e.number:He(e)?Ye(e,t):t}(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Or(t.listValue,b),o.letterSpacing),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),i.label=20;case 20:return[2]}}))}))},e.prototype.renderStackContent=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,o,s,l,c,u,d,h,f,p,m,g;return i(this,(function(i){switch(i.label){case 0:return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:i.sent(),t=0,n=e.negativeZIndex,i.label=2;case 2:return t<n.length?(g=n[t],[4,this.renderStack(g)]):[3,5];case 3:i.sent(),i.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:i.sent(),r=0,a=e.nonInlineLevel,i.label=7;case 7:return r<a.length?(g=a[r],[4,this.renderNode(g)]):[3,10];case 8:i.sent(),i.label=9;case 9:return r++,[3,7];case 10:o=0,s=e.nonPositionedFloats,i.label=11;case 11:return o<s.length?(g=s[o],[4,this.renderStack(g)]):[3,14];case 12:i.sent(),i.label=13;case 13:return o++,[3,11];case 14:l=0,c=e.nonPositionedInlineLevel,i.label=15;case 15:return l<c.length?(g=c[l],[4,this.renderStack(g)]):[3,18];case 16:i.sent(),i.label=17;case 17:return l++,[3,15];case 18:u=0,d=e.inlineLevel,i.label=19;case 19:return u<d.length?(g=d[u],[4,this.renderNode(g)]):[3,22];case 20:i.sent(),i.label=21;case 21:return u++,[3,19];case 22:h=0,f=e.zeroOrAutoZIndexOrTransformedOrOpacity,i.label=23;case 23:return h<f.length?(g=f[h],[4,this.renderStack(g)]):[3,26];case 24:i.sent(),i.label=25;case 25:return h++,[3,23];case 26:p=0,m=e.positiveZIndex,i.label=27;case 27:return p<m.length?(g=m[p],[4,this.renderStack(g)]):[3,30];case 28:i.sent(),i.label=29;case 29:return p++,[3,27];case 30:return[2]}}))}))},e.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},e.prototype.formatPath=function(e){var t=this;e.forEach((function(e,n){var r=Yi(e)?e.start:e;0===n?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),Yi(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},e.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},e.prototype.resizeImage=function(e,t,n){if(e.width===t&&e.height===n)return e;var r=this.canvas.ownerDocument.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,n),r},e.prototype.renderBackgroundImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,o,s;return i(this,(function(l){switch(l.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x,O,I,M,P,D,N,L;return i(this,(function(i){switch(i.label){case 0:if(n.type!==ut.URL)return[3,5];a=void 0,o=n.url,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.options.cache.match(o)];case 2:return a=i.sent(),[3,4];case 3:return i.sent(),Ct.getInstance(r.options.id).error("Error loading background-image "+o),[3,4];case 4:return a&&(s=sa(e,t,[a.width,a.height,a.width/a.height]),A=s[0],T=s[1],k=s[2],E=s[3],S=s[4],b=r.ctx.createPattern(r.resizeImage(a,E,S),"repeat"),r.renderRepeat(A,b,T,k)),[3,6];case 5:n.type===ut.LINEAR_GRADIENT?(l=sa(e,t,[null,null,null]),A=l[0],T=l[1],k=l[2],E=l[3],S=l[4],c=vt(n.angle,E,S),u=c[0],d=c[1],h=c[2],f=c[3],p=c[4],(m=document.createElement("canvas")).width=E,m.height=S,g=m.getContext("2d"),v=g.createLinearGradient(d,f,h,p),gt(n.stops,u).forEach((function(e){return v.addColorStop(e.stop,et(e.color))})),g.fillStyle=v,g.fillRect(0,0,E,S),E>0&&S>0&&(b=r.ctx.createPattern(m,"repeat"),r.renderRepeat(A,b,T,k))):function(e){return e.type===ut.RADIAL_GRADIENT}(n)&&(y=sa(e,t,[null,null,null]),A=y[0],_=y[1],w=y[2],E=y[3],S=y[4],C=0===n.position.length?[We]:n.position,T=Ye(C[0],E),k=Ye(C[C.length-1],S),x=function(e,t,n,r,i){var a=0,o=0;switch(e.size){case ht.CLOSEST_SIDE:e.shape===dt.CIRCLE?a=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===dt.ELLIPSE&&(a=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(n),Math.abs(n-i)));break;case ht.CLOSEST_CORNER:if(e.shape===dt.CIRCLE)a=o=Math.min(bt(t,n),bt(t,n-i),bt(t-r,n),bt(t-r,n-i));else if(e.shape===dt.ELLIPSE){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),l=yt(r,i,t,n,!0),c=l[0],u=l[1];o=s*(a=bt(c-t,(u-n)/s))}break;case ht.FARTHEST_SIDE:e.shape===dt.CIRCLE?a=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===dt.ELLIPSE&&(a=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(n),Math.abs(n-i)));break;case ht.FARTHEST_CORNER:if(e.shape===dt.CIRCLE)a=o=Math.max(bt(t,n),bt(t,n-i),bt(t-r,n),bt(t-r,n-i));else if(e.shape===dt.ELLIPSE){s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r));var d=yt(r,i,t,n,!1);c=d[0],u=d[1],o=s*(a=bt(c-t,(u-n)/s))}}return Array.isArray(e.size)&&(a=Ye(e.size[0],r),o=2===e.size.length?Ye(e.size[1],i):a),[a,o]}(n,T,k,E,S),O=x[0],I=x[1],O>0&&O>0&&(M=r.ctx.createRadialGradient(_+T,w+k,0,_+T,w+k,O),gt(n.stops,2*O).forEach((function(e){return M.addColorStop(e.stop,et(e.color))})),r.path(A),r.ctx.fillStyle=M,O!==I?(P=e.bounds.left+.5*e.bounds.width,D=e.bounds.top+.5*e.bounds.height,L=1/(N=I/O),r.ctx.save(),r.ctx.translate(P,D),r.ctx.transform(1,0,0,N,0,0),r.ctx.translate(-P,-D),r.ctx.fillRect(_,L*(w-D)+D,E,S*L),r.ctx.restore()):r.ctx.fill())),i.label=6;case 6:return t--,[2]}}))},r=this,a=0,o=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return a<o.length?(s=o[a],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return a++,[3,1];case 4:return[2]}}))}))},e.prototype.renderBorder=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){return this.path(function(e,t){switch(t){case 0:return ia(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return ia(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return ia(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return ia(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}}(n,t)),this.ctx.fillStyle=et(e),this.ctx.fill(),[2]}))}))},e.prototype.renderNodeBackgroundAndBorders=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,o,s,l,c,u=this;return i(this,(function(i){switch(i.label){case 0:return this.applyEffects(e.effects,2),t=e.container.styles,n=!Ze(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor},{style:t.borderRightStyle,color:t.borderRightColor},{style:t.borderBottomStyle,color:t.borderBottomColor},{style:t.borderLeftStyle,color:t.borderLeftColor}],a=ga(da(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),Ze(t.backgroundColor)||(this.ctx.fillStyle=et(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:i.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){u.ctx.save();var n,r,i,a,o,s=Qi(e.curves),l=t.inset?0:1e4,c=(n=s,r=-l+(t.inset?1:-1)*t.spread.number,i=(t.inset?1:-1)*t.spread.number,a=t.spread.number*(t.inset?-2:2),o=t.spread.number*(t.inset?-2:2),n.map((function(e,t){switch(t){case 0:return e.add(r,i);case 1:return e.add(r+a,i);case 2:return e.add(r+a,i+o);case 3:return e.add(r,i+o)}return e})));t.inset?(u.path(s),u.ctx.clip(),u.mask(c)):(u.mask(s),u.ctx.clip(),u.path(c)),u.ctx.shadowOffsetX=t.offsetX.number+l,u.ctx.shadowOffsetY=t.offsetY.number,u.ctx.shadowColor=et(t.color),u.ctx.shadowBlur=t.blur.number,u.ctx.fillStyle=t.inset?et(t.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()})),i.label=2;case 2:o=0,s=0,l=r,i.label=3;case 3:return s<l.length?(c=l[s]).style===qt.NONE||Ze(c.color)?[3,5]:[4,this.renderBorder(c.color,o,e.curves)]:[3,7];case 4:i.sent(),i.label=5;case 5:o++,i.label=6;case 6:return s++,[3,3];case 7:return[2]}}))}))},e.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=et(this.options.backgroundColor),this.ctx.fillRect(this.options.x-this.options.scrollX,this.options.y-this.options.scrollY,this.options.width,this.options.height)),r=new ta(e,[]),i=new ea(r),na(r,i,i,a=[]),ra(r.container,a),t=i,[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([],2),[2,this.canvas]}var r,i,a}))}))},e}(),ma=function(e){return e instanceof Kr||e instanceof Yr||e instanceof qr&&"radio"!==e.type&&"checkbox"!==e.type},ga=function(e,t){switch(e){case ot.BORDER_BOX:return Qi(t);case ot.CONTENT_BOX:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);case ot.PADDING_BOX:default:return $i(t)}},va=function(e){switch(e){case jn.CENTER:return"center";case jn.RIGHT:return"right";case jn.LEFT:default:return"left"}},ba=function(){function e(e){this.canvas=e.canvas?e.canvas:document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options=e,this.canvas.width=Math.floor(e.width*e.scale),this.canvas.height=Math.floor(e.height*e.scale),this.canvas.style.width=e.width+"px",this.canvas.style.height=e.height+"px",this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-e.x+e.scrollX,-e.y+e.scrollY),Ct.getInstance(e.id).debug("EXPERIMENTAL ForeignObject renderer initialized ("+e.width+"x"+e.height+" at "+e.x+","+e.y+") with scale "+e.scale)}return e.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=wt(Math.max(this.options.windowWidth,this.options.width)*this.options.scale,Math.max(this.options.windowHeight,this.options.height)*this.options.scale,this.options.scrollX*this.options.scale,this.options.scrollY*this.options.scale,e),[4,ya(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=et(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},e}(),ya=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Aa=function(e){return Je(Ie.create(e).parseComponentValue())};"undefined"!=typeof window&&Tt.setContext(window);var _a=function(e,t){return r(void 0,void 0,void 0,(function(){var r,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x;return i(this,(function(i){switch(i.label){case 0:if(!(r=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(s=r.defaultView))throw new Error("Document is not attached to a Window");return l=(Math.round(1e3*Math.random())+Date.now()).toString(16),c=di(e)||"HTML"===e.tagName?function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),i=Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight));return new a(0,0,r,i)}(r):o(e),u=c.width,d=c.height,h=c.left,f=c.top,p=n({},{allowTaint:!1,imageTimeout:15e3,proxy:void 0,useCORS:!1},t),m={backgroundColor:"#ffffff",cache:t.cache?t.cache:Tt.create(l,p),logging:!0,removeContainer:!0,foreignObjectRendering:!1,scale:s.devicePixelRatio||1,windowWidth:s.innerWidth,windowHeight:s.innerHeight,scrollX:s.pageXOffset,scrollY:s.pageYOffset,x:h,y:f,width:Math.ceil(u),height:Math.ceil(d),id:l},g=n({},m,p,t),v=new a(g.scrollX,g.scrollY,g.windowWidth,g.windowHeight),Ct.create({id:l,enabled:g.logging}),Ct.getInstance(l).debug("Starting document clone"),b=new Ii(e,{id:l,onclone:g.onclone,ignoreElements:g.ignoreElements,inlineImages:g.foreignObjectRendering,copyStyles:g.foreignObjectRendering}),(y=b.clonedReferenceElement)?[4,b.toIFrame(r,v)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return A=i.sent(),_=r.documentElement?Aa(getComputedStyle(r.documentElement).backgroundColor):ct.TRANSPARENT,w=r.body?Aa(getComputedStyle(r.body).backgroundColor):ct.TRANSPARENT,E=t.backgroundColor,S="string"==typeof E?Aa(E):null===E?ct.TRANSPARENT:4294967295,C=e===r.documentElement?Ze(_)?Ze(w)?S:w:_:S,T={id:l,cache:g.cache,canvas:g.canvas,backgroundColor:C,scale:g.scale,x:g.x,y:g.y,scrollX:g.scrollX,scrollY:g.scrollY,width:g.width,height:g.height,windowWidth:g.windowWidth,windowHeight:g.windowHeight},g.foreignObjectRendering?(Ct.getInstance(l).debug("Document cloned, using foreign object rendering"),[4,new ba(T).render(y)]):[3,3];case 2:return k=i.sent(),[3,5];case 3:return Ct.getInstance(l).debug("Document cloned, using computed rendering"),Tt.attachInstance(g.cache),Ct.getInstance(l).debug("Starting DOM parsing"),x=ei(y),Tt.detachInstance(),C===x.styles.backgroundColor&&(x.styles.backgroundColor=ct.TRANSPARENT),Ct.getInstance(l).debug("Starting renderer"),[4,new pa(T).render(x)];case 4:k=i.sent(),i.label=5;case 5:return!0===g.removeContainer&&(Ii.destroy(A)||Ct.getInstance(l).error("Cannot detach cloned iframe as it is not in the DOM anymore")),Ct.getInstance(l).debug("Finished rendering"),Ct.destroy(l),Tt.destroy(l),[2,k]}}))}))};return function(e,t){return void 0===t&&(t={}),_a(e,t)}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=(r=i)&&"object"==typeof r&&"default"in r?r.default:r,o=new(n(1147)),s=o.getBrowser(),l=(o.getCPU(),o.getDevice()),c=o.getEngine(),u=o.getOS(),d=o.getUA(),h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},f=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},p=function(e){var t=f();return t&&(t.platform.includes(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)};function m(e){return(m="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)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var E="mobile",S="tablet",C="smarttv",T="console",k="wearable",x=void 0,O="Chrome",I="Firefox",M="Opera",P="Yandex",D="Safari",N="Internet Explorer",L="Edge",R="Chromium",B="IE",j="Mobile Safari",F="iOS",U="Android",H="Windows Phone",z={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},V=function(e,t,n,r){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(n,!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{vendor:h(t.vendor),model:h(t.model),os:h(n.name),osVersion:h(n.version),ua:h(r)})},W=function(e){switch(e){case E:return{isMobile:!0};case S:return{isTablet:!0};case C:return{isSmartTV:!0};case T:return{isConsole:!0};case k:return{isWearable:!0};case x:return{isBrowser:!0};default:return z}}(l.type);var G,q=l.type===C,Y=l.type===T,K=l.type===k,X=s.name===j,Q=s.name===R,$=function(){switch(l.type){case E:case S:return!0;default:return!1}}(),J=l.type===E,Z=l.type===S,ee=l.type===x,te=u.name===U,ne=u.name===H,re=u.name===F,ie=s.name===O,ae=s.name===I,oe=s.name===D||s.name===j,se=s.name===M,le=s.name===N||s.name===B,ce=h(u.version),ue=h(u.name),de=h(s.version),he=h(s.major),fe=h(s.name),pe=h(l.vendor),me=h(l.model),ge=h(c.name),ve=h(c.version),be=h(d),ye=s.name===L,Ae=s.name===P,_e=h(l.type,"browser"),we=(G=f())&&(/iPad|iPhone|iPod/.test(G.platform)||"MacIntel"===G.platform&&G.maxTouchPoints>1)&&!window.MSStream,Ee=p("iPad"),Se=p("iPhone"),Ce=p("iPod"),Te=function(){var e=f(),t=e&&e.userAgent.toLowerCase();return"string"==typeof t&&t.includes("electron")}();t.AndroidView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return te?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.BrowserView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return ee?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.ConsoleView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return Y?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.CustomView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return e.condition?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.IEView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return le?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.IOSView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return re?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.MobileOnlyView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return J?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.MobileView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return $?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.SmartTVView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return q?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.TabletView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return Z?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.WearableView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return K?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.WinPhoneView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,o=e.style;return ne?t?a.createElement(i.Fragment,null,n):a.createElement("div",{className:r,style:o},n):null},t.browserName=fe,t.browserVersion=he,t.deviceDetect=function(){var e=W.isBrowser,t=W.isMobile,n=W.isTablet,r=W.isSmartTV,i=W.isConsole,a=W.isWearable;return e?function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:h(t.major),browserFullVersion:h(t.version),browserName:h(t.name),engineName:h(n.name),engineVersion:h(n.version),osName:h(r.name),osVersion:h(r.version),userAgent:h(i)}}(e,s,c,u,d):r?function(e,t,n,r){return{isSmartTV:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(r,c,u,d):i?function(e,t,n,r){return{isConsole:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(i,c,u,d):t?V(W,l,u,d):n?V(W,l,u,d):a?function(e,t,n,r){return{isWearable:e,engineName:h(t.name),engineVersion:h(t.version),osName:h(n.name),osVersion:h(n.version),userAgent:h(r)}}(a,c,u,d):void 0},t.deviceType=_e,t.engineName=ge,t.engineVersion=ve,t.fullBrowserVersion=de,t.getUA=be,t.isAndroid=te,t.isBrowser=ee,t.isChrome=ie,t.isChromium=Q,t.isConsole=Y,t.isEdge=ye,t.isElectron=Te,t.isFirefox=ae,t.isIE=le,t.isIOS=re,t.isIOS13=we,t.isIPad13=Ee,t.isIPhone13=Se,t.isIPod13=Ce,t.isMobile=$,t.isMobileOnly=J,t.isMobileSafari=X,t.isOpera=se,t.isSafari=oe,t.isSmartTV=q,t.isTablet=Z,t.isWearable=K,t.isWinPhone=ne,t.isYandex=Ae,t.mobileModel=me,t.mobileVendor=pe,t.osName=ue,t.osVersion=ce,t.withOrientationChange=function(e){return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?w(e):t}(this,A(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(w(t)),t.onOrientationChange=t.onOrientationChange.bind(w(t)),t.onPageLoad=t.onPageLoad.bind(w(t)),t.state={isLandscape:!1,isPortrait:!1},t}var r,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(n,t),r=n,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"==typeof window?"undefined":m(window))&&$&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return a.createElement(e,b({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&g(r.prototype,i),o&&g(r,o),n}(a.Component)}},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==o?"\n  "+o:"")+(null!==s?"\n  "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.d(t,"a",(function(){return o})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),i=n.n(r);function a(e){return e&&"setState"in e?i.a.findDOMNode(e):null!=e?e:null}},function(e,t,n){"use strict";var r=n(33),i=n(0),a=n.n(i),o=n(42),s=n.n(o);t.a=function(e){return a.a.forwardRef((function(t,n){return a.a.createElement("div",Object(r.a)({},t,{ref:n,className:s()(t.className,e)}))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e);return t.setHours(0,0,0,0),t}},function(e,t,n){"use strict";(function(e,r){var i,a=n(1004);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var o=Object(a.a)(i);t.a=o}).call(this,n(68),n(345)(e))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(34),i=Object(r.k)([73,68,51]),a=function e(t,n){return void 0===n&&(n=0),(t=Object(r.k)(t)).length-n<10||!Object(r.a)(t,i,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Object(r.k)(e))[t+5],i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?i+20:i+10}(t,n),e(t,n))}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeRegExp=void 0,t.escapeRegExp=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatValue=void 0;var r=n(11);t.formatValue=function(e){var t=e.value,n=e.groupSeparator,i=void 0===n?",":n,a=e.decimalSeparator,o=void 0===a?".":a,s=e.turnOffSeparators,l=void 0!==s&&s,c=e.prefix;if(""===t||void 0===t)return"";var u=String(t);if("-"===u)return"-";var d=RegExp("^-\\d+").test(u),h=o&&u.includes(o),f=d?u.replace("-",""):u,p=h?f.split(o):[f],m=p[0],g=p[1];return(d?"-":"")+(c||"")+(l?m:r.addSeparators(m,i))+(h&&g?""+o+g:h?""+o:"")}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(3));t.default=i.default;var a=n(1);Object.defineProperty(t,"formatValue",{enumerable:!0,get:function(){return a.formatValue}})},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.CurrencyInput=void 0;var l=o(n(4)),c=n(5);t.CurrencyInput=function(e){var t=e.allowDecimals,n=void 0===t||t,i=e.allowNegativeValue,a=void 0===i||i,o=e.id,u=e.name,d=e.className,h=e.decimalsLimit,f=e.defaultValue,p=e.disabled,m=void 0!==p&&p,g=e.maxLength,v=e.value,b=e.onChange,y=e.onBlurValue,A=e.fixedDecimalLength,_=e.placeholder,w=e.precision,E=e.prefix,S=e.step,C=e.decimalSeparator,T=void 0===C?".":C,k=e.groupSeparator,x=void 0===k?",":k,O=e.turnOffSeparators,I=void 0!==O&&O,M=e.turnOffAbbreviations,P=void 0!==M&&M,D=s(e,["allowDecimals","allowNegativeValue","id","name","className","decimalsLimit","defaultValue","disabled","maxLength","value","onChange","onBlurValue","fixedDecimalLength","placeholder","precision","prefix","step","decimalSeparator","groupSeparator","turnOffSeparators","turnOffAbbreviations"]);if(T===x)throw new Error("decimalSeparator cannot be the same as groupSeparator");if(c.isNumber(T))throw new Error("decimalSeparator cannot be a number");if(c.isNumber(x))throw new Error("groupSeparator cannot be a number");var N={decimalSeparator:T,groupSeparator:x,turnOffSeparators:I,prefix:E},L={decimalSeparator:T,groupSeparator:x,allowDecimals:n,decimalsLimit:h||A||2,allowNegativeValue:a,turnOffAbbreviations:P,prefix:E},R=void 0!==f?c.formatValue(r({value:String(f)},N)):"",B=l.useState(R),j=B[0],F=B[1],U=l.useState(0),H=U[0],z=U[1],V=l.useRef(null),W=function(e,t){var n=c.cleanValue(r({value:e},L));if(!n)return b&&b(void 0,u),void F("");if(!(g&&n.replace(/-/g,"").length>g)){if("-"===n)return b&&b(void 0,u),void F(e);var i=c.formatValue(r({value:n},N));if(null!=t){var a=t+(i.length-e.length)||1;z(a)}F(i),b&&b(n,u)}};l.useEffect((function(){V&&V.current&&V.current.setSelectionRange(H,H)}),[H,V]);var G=void 0!==v?c.formatValue(r({value:String(v)},N)):void 0;return l.default.createElement("input",r({type:"text",inputMode:"decimal",id:o,name:u,className:d,onChange:function(e){var t=e.target,n=t.value,r=t.selectionStart;W(n,r)},onBlur:function(e){var t=e.target.value,n=c.cleanValue(r({value:t},L));if("-"===n||!n)return y&&y(void 0,u),void F("");var i=c.fixedDecimalValue(n,T,A),a=c.padTrimValue(i,T,w||A);b&&b(a,u),y&&y(a,u);var o=c.formatValue(r({value:a},N));F(o)},onFocus:function(){return j?j.length:0},onKeyDown:function(e){var t=e.key;if(S&&("ArrowUp"===t||"ArrowDown"===t)){var n=Number(void 0!==v?v:c.cleanValue(r({value:j},L)))||0,i=String("ArrowUp"===t?n+Number(S):n-Number(S));W(i)}},placeholder:_,disabled:m,value:void 0!==G&&"-"!==j?G:j,ref:V},D))},t.default=t.CurrencyInput},function(e,t){e.exports=n(0)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(6),t),i(n(10),t),i(n(1),t),i(n(12),t),i(n(13),t)},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.cleanValue=void 0;var i=n(7),a=n(8),o=n(9),s=n(0);t.cleanValue=function(e){var t=e.value,n=e.groupSeparator,l=void 0===n?",":n,c=e.decimalSeparator,u=void 0===c?".":c,d=e.allowDecimals,h=void 0===d||d,f=e.decimalsLimit,p=void 0===f?2:f,m=e.allowNegativeValue,g=void 0===m||m,v=e.turnOffAbbreviations,b=void 0!==v&&v,y=e.prefix,A=void 0===y?"":y,_=b?[]:["k","m","b"],w=t.includes("-"),E=RegExp("(\\d+)-?"+s.escapeRegExp(A)).exec(t)||[],S=E[0],C=E[1],T=A?t.replace(S,"").concat(C):t,k=a.removeSeparators(T,l),x=o.removeInvalidChars(k,r([l,u],_)),O=x;if(!b){if(_.some((function(e){return e===x.toLowerCase()})))return"";var I=i.parseAbbrValue(x,u);I&&(O=String(I))}var M=w&&g?"-":"";if(String(O).includes(u)){var P=x.split(u),D=P[0],N=P[1],L=p?N.slice(0,p):N;return""+M+D+(h?""+u+L:"")}return""+M+O}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbbrValue=t.abbrValue=void 0;var r=n(0);t.abbrValue=function(e,t,n){if(void 0===t&&(t="."),void 0===n&&(n=10),e>999){var r=(""+e).length,i=Math.pow,a=i(10,n);return r-=r%3,(Math.round(e*a/i(10,r))/a+" kMGTPE"[r/3]).replace(".",t)}return String(e)};var i={k:1e3,m:1e6,b:1e9};t.parseAbbrValue=function(e,t){void 0===t&&(t=".");var n=new RegExp("(\\d+("+r.escapeRegExp(t)+"\\d+)?)([kmb])$","i"),a=e.match(n);if(a){var o=a[1],s=a[3],l=i[s.toLowerCase()];if(o&&l)return Number(o.replace(t,"."))*l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeSeparators=void 0;var r=n(0);t.removeSeparators=function(e,t){void 0===t&&(t=",");var n=new RegExp(r.escapeRegExp(t),"g");return e.replace(n,"")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeInvalidChars=void 0;var r=n(0);t.removeInvalidChars=function(e,t){var n=r.escapeRegExp(t.join("")),i=new RegExp("[^\\d"+n+"]","gi");return e.replace(i,"")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fixedDecimalValue=void 0,t.fixedDecimalValue=function(e,t,n){if(n&&e.length>1){if(e.includes(t)){var r=e.split(t),i=r[0];if((a=r[1]).length>n)return""+i+t+a.slice(0,n)}var a,o=e.length>n?new RegExp("(\\d+)(\\d{"+n+"})"):new RegExp("(\\d)(\\d+)"),s=e.match(o);if(s)return""+(i=s[1])+t+s[2]}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSeparators=void 0,t.addSeparators=function(e,t){return void 0===t&&(t=","),e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNumber=void 0,t.isNumber=function(e){return RegExp(/\d/,"gi").test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padTrimValue=void 0,t.padTrimValue=function(e,t,n){if(void 0===t&&(t="."),!n||""===e||void 0===e)return e;if(!e.match(/\d/g))return"";var r=e.split(t),i=r[0],a=r[1]||"";if(a.length<n)for(;a.length<n;)a+="0";else a=a.slice(0,n);return""+i+t+a}}])},function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!=i--;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",authBackground:"authBackground--2-W1n",authBox:"authBox--1ge-G",container:"container--2z5sx",containerBackground:"containerBackground--3IfSW",copyrights:"copyrights--2Pdcv",hideScrollX:"hideScrollX--3JcXr"}},function(e,t,n){"use strict";var r=n(147),i=n(184);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Document",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Outline",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return l.default}}),t.pdfjs=void 0;var a=i(n(371));t.pdfjs=a;var o=r(n(1423)),s=r(n(1427)),l=r(n(1430)),c=r(n(1436)),u=n(185);u.isLocalFileSystem&&(0,u.warnOnDev)("You are running React-PDF from your local file system. PDF.js Worker may fail to load due to browser's security policies. If you're on Google Chrome, you can use --allow-file-access-from-files flag for debugging purposes."),"undefined"!=typeof window&&"Worker"in window&&(a.GlobalWorkerOptions.workerPort=new c.default)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(t=e.exports=n(721)).Stream=t,t.Readable=t,t.Writable=n(725),t.Duplex=n(259),t.Transform=n(727),t.PassThrough=n(1102),t.finished=n(444),t.pipeline=n(1103)},function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(721),a=n(725);n(155)(c,i);for(var o=r(a.prototype),s=0;s<o.length;s++){var l=o[s];c.prototype[l]||(c.prototype[l]=a.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||t.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,n(96))},function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(729),a=n(733);n(155)(c,i);for(var o=r(a.prototype),s=0;s<o.length;s++){var l=o[s];c.prototype[l]||(c.prototype[l]=a.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||t.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,n(96))},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},a=n(1150);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r}).call(this,n(68))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(126),a=n(117),o=(r=a)&&r.__esModule?r:{default:r},s=function(e,t,n){var r,i;return void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence?0:(r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t)).precise?r.result:(i=function(e,t){for(var n=0,r=void 0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(r=e.segments[i]).start)return{result:r.start-n,precise:!0};if(n+=r.duration,void 0!==r.end)return{result:r.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t)).precise?i.result:r.result+n},l=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return o.default.Infinity}return s(e,t,n)};t.duration=l;var c=function(e,t,n){var r=0;if(t>n){var i=[n,t];t=i[0],n=i[1]}if(t<0){for(var a=t;a<Math.min(0,n);a++)r+=e.targetDuration;t=0}for(a=t;a<n;a++)r+=e.segments[a].duration;return r};t.sumDurations=c;var u=function(e){if(!e.segments.length)return 0;for(var t=e.segments.length-1,n=e.segments[t].duration||e.targetDuration,r=n+2*e.targetDuration;t--&&!((n+=e.segments[t].duration)>=r););return Math.max(0,t)};t.safeLiveIndex=u;var d=function(e,t,n){if(!e||!e.segments)return null;if(e.endList)return l(e);if(null===t)return null;t=t||0;var r=n?u(e):e.segments.length;return s(e,e.mediaSequence+r,t)};t.playlistEnd=d;var h=function(e,t){var n=t||0,r=d(e,t,!0);return null===r?(0,i.createTimeRange)():(0,i.createTimeRange)(n,r)};t.seekable=h;var f=function(e){return e-Math.floor(e)==0},p=function(e,t){if(f(t))return t+.1*e;for(var n=t.toString().split(".")[1].length,r=1;r<=n;r++){var i=Math.pow(10,r),a=t*i;if(f(a)||r===n)return(a+e)/i}},m=p.bind(null,1),g=p.bind(null,-1),v=function(e,t,n,r){var i=void 0,a=void 0,o=e.segments.length,s=t-r;if(s<0){if(n>0)for(i=n-1;i>=0;i--)if(a=e.segments[i],(s+=g(a.duration))>0)return{mediaIndex:i,startTime:r-c(e,n,i)};return{mediaIndex:0,startTime:t}}if(n<0){for(i=n;i<0;i++)if((s-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};n=0}for(i=n;i<o;i++)if(a=e.segments[i],(s-=m(a.duration))<0)return{mediaIndex:i,startTime:r+c(e,n,i)};return{mediaIndex:o-1,startTime:t}};t.getMediaInfoForTime=v;var b=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()};t.isBlacklisted=b;var y=function(e){return e.excludeUntil&&e.excludeUntil===1/0};t.isIncompatible=y;var A=function(e){var t=b(e);return!e.disabled&&!t};t.isEnabled=A;var _=function(e){return e.disabled};t.isDisabled=_;var w=function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1};t.isAes=w;var E=function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].map)return!0;return!1};t.isFmp4=E;var S=function(e,t){return t.attributes&&t.attributes[e]};t.hasAttribute=S;var C=function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?0:arguments[3];if(!S("BANDWIDTH",n))return NaN;var i=e*n.attributes.BANDWIDTH;return(i-8*r)/t};t.estimateSegmentRequestTime=C;var T=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!A(e)&&(e.attributes.BANDWIDTH||0)<n})).length};t.isLowestEnabledRendition=T,t.default={duration:l,seekable:h,safeLiveIndex:u,getMediaInfoForTime:v,isEnabled:A,isDisabled:_,isBlacklisted:b,isIncompatible:y,playlistEnd:d,isAes:w,isFmp4:E,hasAttribute:S,estimateSegmentRequestTime:C,isLowestEnabledRendition:T}},function(e,t,n){
/**
 * @license
 * Video.js 6.13.0 <http://videojs.com/>
 * Copyright Brightcove, Inc. <https://www.brightcove.com/>
 * Available under Apache License Version 2.0
 * <https://github.com/videojs/video.js/blob/master/LICENSE>
 *
 * Includes vtt.js <https://github.com/mozilla/vtt.js>
 * Available under Apache License Version 2.0
 * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
 */
function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i,a=r(n(117)),o=r(n(262)),s=r(n(743)),l=r(n(383)),c=r(n(1168)),u=r(n(1170)),d=a.navigator&&a.navigator.userAgent||"",h=/AppleWebKit\/([\d.]+)/i.exec(d),f=h?parseFloat(h.pop()):null,p=/iPad/i.test(d),m=/iPhone/i.test(d)&&!p,g=/iPod/i.test(d),v=m||p||g,b=(i=d.match(/OS (\d+)_/i))&&i[1]?i[1]:null,y=/Android/i.test(d),A=function(){var e=d.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),_=y&&/webkit/i.test(d)&&A<2.3,w=y&&A<5&&f<537,E=/Firefox/i.test(d),S=/Edge/i.test(d),C=!S&&(/Chrome/i.test(d)||/CriOS/i.test(d)),T=function(){var e=d.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),k=/MSIE\s8\.0/.test(d),x=function(){var e=/MSIE\s(\d+)\.\d/.exec(d),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(d)&&/rv:11.0/.test(d)&&(t=11),t}(),O=/Safari/i.test(d)&&!C&&!y&&!S,I=(O||v)&&!C,M=J()&&("ontouchstart"in a||a.navigator.maxTouchPoints||a.DocumentTouch&&a.document instanceof a.DocumentTouch),P=J()&&"backgroundSize"in a.document.createElement("video").style,D=(Object.freeze||Object)({IS_IPAD:p,IS_IPHONE:m,IS_IPOD:g,IS_IOS:v,IOS_VERSION:b,IS_ANDROID:y,ANDROID_VERSION:A,IS_OLD_ANDROID:_,IS_NATIVE_ANDROID:w,IS_FIREFOX:E,IS_EDGE:S,IS_CHROME:C,CHROME_VERSION:T,IS_IE8:k,IE_VERSION:x,IS_SAFARI:O,IS_ANY_SAFARI:I,TOUCH_ENABLED:M,BACKGROUND_SIZE_SUPPORTED:P}),N="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},L=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},R=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},B=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},j=function(e,t){return e.raw=t,e},F=Object.prototype.toString,U=function(e){return V(e)?Object.keys(e):[]};function H(e,t){U(e).forEach((function(n){return t(e[n],n)}))}function z(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[e].concat(n)):(n.forEach((function(t){t&&H(t,(function(t,n){e[n]=t}))})),e)}function V(e){return!!e&&"object"===(void 0===e?"undefined":N(e))}function W(e){return V(e)&&"[object Object]"===F.call(e)&&e.constructor===Object}var G=[];var q=function e(t){var n="info",r=void 0,i=function e(){for(var t=e.stringify||x&&x<11,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];r("log",n,a,t)};return r=function(e,t){return function(n,r,i,o){var s=t.levels[r],l=new RegExp("^("+s+")$");if("log"!==n&&i.unshift(n.toUpperCase()+":"),i.unshift(e+":"),G&&G.push([].concat(i)),a.console){var c=a.console[n];c||"debug"!==n||(c=a.console.info||a.console.log),c&&s&&l.test(n)&&(o&&(i=i.map((function(e){if(V(e)||Array.isArray(e))try{return JSON.stringify(e)}catch(t){return String(e)}return String(e)})).join(" ")),c.apply?c[Array.isArray(i)?"apply":"call"](a.console,i):c(i))}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},(i.history=function(){return G?[].concat(G):[]}).filter=function(e){return(G||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){G&&(G.length=0)},i.history.disable=function(){null!==G&&(G.length=0,G=null)},i.history.enable=function(){null===G&&(G=[])},i.error=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("error",n,t)},i.warn=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("warn",n,t)},i.debug=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("debug",n,t)},i}("VIDEOJS"),Y=q.createLogger;function K(e,t){if(!e||!t)return"";if("function"==typeof a.getComputedStyle){var n=a.getComputedStyle(e);return n?n[t]:""}return e.currentStyle[t]||""}var X=j(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]);function Q(e){return"string"==typeof e&&/\S/.test(e)}function $(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function J(){return o===a.document&&void 0!==o.createElement}function Z(e){return V(e)&&1===e.nodeType}function ee(){try{return a.parent!==a.self}catch(e){return!0}}function te(e){return function(t,n){if(!Q(t))return o[e](null);Q(n)&&(n=o.querySelector(n));var r=Z(n)?n:o;return r[e]&&r[e](t)}}function ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=o.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(q.warn(s(X,e,n)),i.setAttribute(e,n)):"textContent"===e?re(i,n):i[e]=n})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&we(i,r),i}function re(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function ie(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ae(e,t){return $(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function oe(e,t){return e.classList?e.classList.add(t):ae(e,t)||(e.className=(e.className+" "+t).trim()),e}function se(e,t){return e.classList?e.classList.remove(t):($(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function le(e,t,n){var r=ae(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?oe(e,t):se(e,t),e}function ce(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function ue(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var a=r[i].name,o=r[i].value;"boolean"!=typeof e[a]&&-1===n.indexOf(","+a+",")||(o=null!==o),t[a]=o}return t}function de(e,t){return e.getAttribute(t)}function he(e,t,n){e.setAttribute(t,n)}function fe(e,t){e.removeAttribute(t)}function pe(){o.body.focus(),o.onselectstart=function(){return!1}}function me(){o.onselectstart=function(){return!0}}function ge(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(K(e,"height"))),n.width||(n.width=parseFloat(K(e,"width"))),n}}function ve(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var n=o.documentElement,r=o.body,i=n.clientLeft||r.clientLeft||0,s=a.pageXOffset||r.scrollLeft,l=t.left+s-i,c=n.clientTop||r.clientTop||0,u=a.pageYOffset||r.scrollTop,d=t.top+u-c;return{left:Math.round(l),top:Math.round(d)}}function be(e,t){var n={},r=ve(e),i=e.offsetWidth,a=e.offsetHeight,o=r.top,s=r.left,l=t.pageY,c=t.pageX;return t.changedTouches&&(c=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(o-l+a)/a)),n.x=Math.max(0,Math.min(1,(c-s)/i)),n}function ye(e){return V(e)&&3===e.nodeType}function Ae(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function _e(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Z(e)||ye(e)?e:"string"==typeof e&&/\S/.test(e)?o.createTextNode(e):void 0})).filter((function(e){return e}))}function we(e,t){return _e(t).forEach((function(t){return e.appendChild(t)})),e}function Ee(e,t){return we(Ae(e),t)}function Se(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(9===x||0===e.button&&1===e.buttons))}var Ce=te("querySelector"),Te=te("querySelectorAll"),ke=(Object.freeze||Object)({isReal:J,isEl:Z,isInFrame:ee,createEl:ne,textContent:re,prependTo:ie,hasClass:ae,addClass:oe,removeClass:se,toggleClass:le,setAttributes:ce,getAttributes:ue,getAttribute:de,setAttribute:he,removeAttribute:fe,blockTextSelection:pe,unblockTextSelection:me,getBoundingClientRect:ge,findPosition:ve,getPointerPosition:be,isTextNode:ye,emptyEl:Ae,normalizeContent:_e,appendContent:we,insertContent:Ee,isSingleLeftClick:Se,$:Ce,$$:Te}),xe=1;function Oe(){return xe++}var Ie={},Me="vdata"+(new Date).getTime();function Pe(e){var t=e[Me];return t||(t=e[Me]=Oe()),Ie[t]||(Ie[t]={}),Ie[t]}function De(e){var t=e[Me];return!!t&&!!Object.getOwnPropertyNames(Ie[t]).length}function Ne(e){var t=e[Me];if(t){delete Ie[t];try{delete e[Me]}catch(t){e.removeAttribute?e.removeAttribute(Me):e[Me]=null}}}function Le(e,t){var n=Pe(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Ne(e)}function Re(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Be(e){function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||a.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||o),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var s=o.documentElement,l=o.body;e.pageX=e.clientX+(s&&s.scrollLeft||l&&l.scrollLeft||0)-(s&&s.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(s&&s.scrollTop||l&&l.scrollTop||0)-(s&&s.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var je=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){je=!0}});a.addEventListener("test",null,e),a.removeEventListener("test",null,e)}catch(e){}}();var Fe=["touchstart","touchmove"];function Ue(e,t,n){if(Array.isArray(t))return Re(Ue,e,t,n);var r=Pe(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=Oe()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=Be(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),o=0,s=a.length;o<s&&!t.isImmediatePropagationStopped();o++)try{a[o].call(e,t,n)}catch(e){q.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;je&&Fe.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function He(e,t,n){if(De(e)){var r=Pe(e);if(r.handlers){if(Array.isArray(t))return Re(He,e,t,n);var i=function(e,t){r.handlers[t]=[],Le(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var o=0;o<a.length;o++)a[o].guid===n.guid&&a.splice(o--,1);Le(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function ze(e,t,n){var r=De(e)?Pe(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Be(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)ze.call(null,i,t,n);else if(!i&&!t.defaultPrevented){var a=Pe(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function Ve(e,t,n){if(Array.isArray(t))return Re(Ve,e,t,n);var r=function r(){He(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Oe(),Ue(e,t,r)}var We=(Object.freeze||Object)({fixEvent:Be,on:Ue,off:He,trigger:ze,one:Ve}),Ge=!1,qe=void 0,Ye=function(){if(J()&&!1!==qe.options.autoSetup){var e=o.getElementsByTagName("video"),t=o.getElementsByTagName("audio"),n=o.getElementsByTagName("video-js"),r=[];if(e&&e.length>0)for(var i=0,a=e.length;i<a;i++)r.push(e[i]);if(t&&t.length>0)for(var s=0,l=t.length;s<l;s++)r.push(t[s]);if(n&&n.length>0)for(var c=0,u=n.length;c<u;c++)r.push(n[c]);if(r&&r.length>0)for(var d=0,h=r.length;d<h;d++){var f=r[d];if(!f||!f.getAttribute){Ke(1);break}void 0===f.player&&null!==f.getAttribute("data-setup")&&qe(f)}else Ge||Ke(1)}};function Ke(e,t){t&&(qe=t),a.setTimeout(Ye,e)}J()&&"complete"===o.readyState?Ge=!0:Ve(a,"load",(function(){Ge=!0}));var Xe=function(e){var t=o.createElement("style");return t.className=e,t},Qe=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},$e=function(e,t,n){t.guid||(t.guid=Oe());var r=function(){return t.apply(e,arguments)};return r.guid=n?n+"_"+t.guid:t.guid,r},Je=function(e,t){var n=Date.now();return function(){var r=Date.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},Ze=function(){};Ze.prototype.allowedEvents_={},Ze.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Ue(this,e,t),this.addEventListener=n},Ze.prototype.addEventListener=Ze.prototype.on,Ze.prototype.off=function(e,t){He(this,e,t)},Ze.prototype.removeEventListener=Ze.prototype.off,Ze.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Ve(this,e,t),this.addEventListener=n},Ze.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Be(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ze(this,e)},Ze.prototype.dispatchEvent=Ze.prototype.trigger;var et=function(e){return e instanceof Ze||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},tt=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},nt=function(e){if(!e.nodeName&&!et(e))throw new Error("Invalid target; must be a DOM node or evented object.")},rt=function(e){if(!tt(e))throw new Error("Invalid event type; must be a non-empty string or array.")},it=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},at=function(e,t){var n=t.length<3||t[0]===e||t[0]===e.eventBusEl_,r=void 0,i=void 0,a=void 0;return n?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),nt(r),rt(i),it(a),{isTargetingSelf:n,target:r,type:i,listener:a=$e(e,a)}},ot=function(e,t,n,r){nt(e),e.nodeName?We[t](e,n,r):e[t](n,r)},st={on:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=at(this,n),a=i.isTargetingSelf,o=i.target,s=i.type,l=i.listener;if(ot(o,"on",s,l),!a){var c=function(){return e.off(o,s,l)};c.guid=l.guid;var u=function(){return e.off("dispose",c)};u.guid=l.guid,ot(this,"on","dispose",c),ot(o,"on","dispose",u)}},one:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=at(this,n),a=i.isTargetingSelf,o=i.target,s=i.type,l=i.listener;if(a)ot(o,"one",s,l);else{var c=function t(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.off(o,s,t),l.apply(null,r)};c.guid=l.guid,ot(o,"one",s,c)}},off:function(e,t,n){if(!e||tt(e))He(this.eventBusEl_,e,t);else{var r=e,i=t;nt(r),rt(i),it(n),n=$e(this,n),this.off("dispose",n),r.nodeName?(He(r,i,n),He(r,"dispose",n)):et(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){return ze(this.eventBusEl_,e,t)}};function lt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=ne("span",{className:"vjs-event-bus"});return z(e,st),e.on("dispose",(function(){e.off(),a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var ct={state:{},setState:function(e){var t=this;"function"==typeof e&&(e=e());var n=void 0;return H(e,(function(e,r){t.state[r]!==e&&((n=n||{})[r]={from:t.state[r],to:e}),t.state[r]=e})),n&&et(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function ut(e,t){return z(e,ct),e.state=z({},e.state,t),"function"==typeof e.handleStateChanged&&et(e)&&e.on("statechanged",e.handleStateChanged),e}function dt(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function ht(){for(var e={},t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&H(t,(function(t,n){W(t)?(W(e[n])||(e[n]={}),e[n]=ht(e[n],t)):e[n]=t}))})),e}var ft=function(){function e(t,n,r){if(L(this,e),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=ht({},this.options_),n=this.options_=ht(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var i=t&&t.id&&t.id()||"no_player";this.id_=i+"_component_"+Oe()}this.name_=n.name||null,n.el?this.el_=n.el:!1!==n.createEl&&(this.el_=this.createEl()),!1!==n.evented&&lt(this,{eventBusKey:this.el_?"el_":null}),ut(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==n.initChildren&&this.initChildren(),this.ready(r),!1!==n.reportTouchActivity&&this.enableTouchActivity()}return e.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Ne(this.el_),this.el_=null),this.player_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return q.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=ht(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,n){return ne(e,t,n)},e.prototype.localize=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),a=i&&i[r],o=r&&r.split("-")[0],s=i&&i[o],l=n;return a&&a[e]?l=a[e]:s&&s[e]&&(l=s[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),l},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=dt(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=void 0,a=void 0;if("string"==typeof t){a=dt(t);var o=n.componentClass||a;n.name=a;var s=e.getComponent(o);if(!s)throw new Error("Component "+o+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(this.children_.splice(r,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(a=a||i.name&&dt(i.name()))&&(this.childNameIndex_[a]=i),"function"==typeof i.el&&i.el()){var l=this.contentEl().children,c=l[r]||null;this.contentEl().insertBefore(i.el(),c)}return i},e.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,n=this.options_.children;if(n){var r=this.options_,i=void 0,a=e.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!i.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r=void 0,i=void 0;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||dt(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,i=e.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var a=t.addChild(n,i);a&&(t[n]=a)}}))}},e.prototype.buildCSSClass=function(){return""},e.prototype.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},e.prototype.$=function(e,t){return Ce(e,t||this.contentEl())},e.prototype.$$=function(e,t){return Te(e,t||this.contentEl())},e.prototype.hasClass=function(e){return ae(this.el_,e)},e.prototype.addClass=function(e){oe(this.el_,e)},e.prototype.removeClass=function(e){se(this.el_,e)},e.prototype.toggleClass=function(e,t){le(this.el_,e,t)},e.prototype.show=function(){this.removeClass("vjs-hidden")},e.prototype.hide=function(){this.addClass("vjs-hidden")},e.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},e.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.prototype.getAttribute=function(e){return de(this.el_,e)},e.prototype.setAttribute=function(e,t){he(this.el_,e,t)},e.prototype.removeAttribute=function(e){fe(this.el_,e)},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.prototype.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+dt(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"==typeof a.getComputedStyle){var n=a.getComputedStyle(this.el_);t=n.getPropertyValue(e)||n[e]}if(0===(t=parseFloat(t))){var r="offset"+dt(e);t=this.el_[r]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,n=void 0;this.on("touchstart",(function(r){1===r.touches.length&&(t={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},e=(new Date).getTime(),n=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)n=!1;else if(t){var r=e.touches[0].pageX-t.pageX,i=e.touches[0].pageY-t.pageY;Math.sqrt(r*r+i*i)>10&&(n=!1)}}));var r=function(){n=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(t=null,!0===n)&&((new Date).getTime()-e<200&&(r.preventDefault(),this.trigger("tap")))}))},e.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=$e(this.player(),this.player().reportUserActivity),t=void 0;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));var n=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}},e.prototype.setTimeout=function(e,t){var n,r,i=this;return e=$e(this,e),n=a.setTimeout((function(){i.off("dispose",r),e()}),t),(r=function(){return i.clearTimeout(n)}).guid="vjs-timeout-"+n,this.on("dispose",r),n},e.prototype.clearTimeout=function(e){a.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},e.prototype.setInterval=function(e,t){var n=this;e=$e(this,e);var r=a.setInterval(e,t),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},e.prototype.clearInterval=function(e){a.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},e.prototype.requestAnimationFrame=function(e){var t,n,r=this;return this.supportsRaf_?(e=$e(this,e),t=a.requestAnimationFrame((function(){r.off("dispose",n),e()})),(n=function(){return r.cancelAnimationFrame(t)}).guid="vjs-raf-"+t,this.on("dispose",n),t):this.setTimeout(e,1e3/60)},e.prototype.cancelAnimationFrame=function(e){if(this.supportsRaf_){a.cancelAnimationFrame(e);var t=function(){};return t.guid="vjs-raf-"+e,this.off("dispose",t),e}return this.clearTimeout(e)},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r=e.getComponent("Tech"),i=r&&r.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(i||!a){var o=void 0;throw o=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+o+".")}t=dt(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var l=s.players,c=Object.keys(l);if(l&&c.length>0&&c.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,n},e.getComponent=function(t){if(t)return t=dt(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();function pt(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function mt(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:pt.bind(null,"start",0,e),end:pt.bind(null,"end",1,e)}}function gt(e,t){return Array.isArray(e)?mt(e):void 0===e||void 0===t?mt():mt([[e,t]])}function vt(e,t){var n=0,r=void 0,i=void 0;if(!t)return 0;e&&e.length||(e=gt(0,0));for(var a=0;a<e.length;a++)r=e.start(a),(i=e.end(a))>t&&(i=t),n+=i-r;return n/t}ft.prototype.supportsRaf_="function"==typeof a.requestAnimationFrame&&"function"==typeof a.cancelAnimationFrame,ft.registerComponent("Component",ft);for(var bt={},yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],At=yt[0],_t=void 0,wt=0;wt<yt.length;wt++)if(yt[wt][1]in o){_t=yt[wt];break}if(_t)for(var Et=0;Et<_t.length;Et++)bt[At[Et]]=_t[Et];function St(e){if(e instanceof St)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:V(e)&&("number"==typeof e.code&&(this.code=e.code),z(this,e)),this.message||(this.message=St.defaultMessages[this.code]||"")}St.prototype.code=0,St.prototype.message="",St.prototype.status=null,St.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],St.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Ct=0;Ct<St.errorTypes.length;Ct++)St[St.errorTypes[Ct]]=Ct,St.prototype[St.errorTypes[Ct]]=Ct;function Tt(e){return null!=e&&"function"==typeof e.then}function kt(e){Tt(e)&&e.then(null,(function(e){}))}var xt=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},Ot=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=xt(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(xt))},It=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},Mt=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=ne("div",{className:"vjs-modal-dialog-content"},{role:"document"}),i.descEl_=ne("p",{className:"vjs-modal-dialog-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),re(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},t.prototype.handleKeyPress=function(e){27===e.which&&this.closeable()&&this.close()},t.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},t.prototype.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.prototype.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",$e(this,this.handleKeyPress)),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},t.prototype.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},t.prototype.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",$e(this,this.handleKeyPress)),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},t.prototype.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},t.prototype.fill=function(){this.fillWith(this.content())},t.prototype.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),Ee(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},t.prototype.empty=function(){this.trigger("beforemodalempty"),Ae(this.contentEl()),this.trigger("modalempty")},t.prototype.content=function(e){return void 0!==e&&(this.content_=e),this.content_},t.prototype.conditionalFocus_=function(){var e=o.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus(),this.on(o,"keydown",this.handleKeyDown))},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(o,"keydown",this.handleKeyDown)},t.prototype.handleKeyDown=function(e){if(9===e.which){for(var t=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<t.length;i++)if(n===t[i]){r=i;break}o.activeElement===this.el_&&(r=0),e.shiftKey&&0===r?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||r!==t.length-1||(t[0].focus(),e.preventDefault())}},t.prototype.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof a.HTMLAnchorElement||e instanceof a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof a.HTMLInputElement||e instanceof a.HTMLSelectElement||e instanceof a.HTMLTextAreaElement||e instanceof a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof a.HTMLIFrameElement||e instanceof a.HTMLObjectElement||e instanceof a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(ft);Mt.prototype.options_={pauseOnOpen:!0,temporary:!0},ft.registerComponent("ModalDialog",Mt);var Pt=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;L(this,t);var i=B(this,e.call(this));if(!r&&(r=i,k))for(var a in r=o.createElement("custom"),t.prototype)"constructor"!==a&&(r[a]=t.prototype[a]);r.tracks_=[],Object.defineProperty(r,"length",{get:function(){return this.tracks_.length}});for(var s=0;s<n.length;s++)r.addTrack(n[s]);return B(i,r)}return R(t,e),t.prototype.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack"}))},t.prototype.removeTrack=function(e){for(var t=void 0,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack"})},t.prototype.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(Ze);for(var Dt in Pt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Pt.prototype.allowedEvents_)Pt.prototype["on"+Dt]=null;var Nt=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},Lt=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];L(this,t);for(var i=void 0,a=r.length-1;a>=0;a--)if(r[a].enabled){Nt(r,r[a]);break}if(k){for(var s in i=o.createElement("custom"),Pt.prototype)"constructor"!==s&&(i[s]=Pt.prototype[s]);for(var l in t.prototype)"constructor"!==l&&(i[l]=t.prototype[l])}return(i=n=B(this,e.call(this,r,i))).changing_=!1,B(n,i)}return R(t,e),t.prototype.addTrack=function(t){var n=this;t.enabled&&Nt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",(function(){n.changing_||(n.changing_=!0,Nt(n,t),n.changing_=!1,n.trigger("change"))}))},t}(Pt),Rt=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},Bt=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];L(this,t);for(var i=void 0,a=r.length-1;a>=0;a--)if(r[a].selected){Rt(r,r[a]);break}if(k){for(var s in i=o.createElement("custom"),Pt.prototype)"constructor"!==s&&(i[s]=Pt.prototype[s]);for(var l in t.prototype)"constructor"!==l&&(i[l]=t.prototype[l])}return(i=n=B(this,e.call(this,r,i))).changing_=!1,Object.defineProperty(i,"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),B(n,i)}return R(t,e),t.prototype.addTrack=function(t){var n=this;t.selected&&Rt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",(function(){n.changing_||(n.changing_=!0,Rt(n,t),n.changing_=!1,n.trigger("change"))}))},t}(Pt),jt=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];L(this,t);var i=void 0;if(k){for(var a in i=o.createElement("custom"),Pt.prototype)"constructor"!==a&&(i[a]=Pt.prototype[a]);for(var s in t.prototype)"constructor"!==s&&(i[s]=t.prototype[s])}return n=B(this,e.call(this,r,i)),B(n,i=n)}return R(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",$e(this,(function(){this.trigger("change")})));-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",$e(this,(function(){this.trigger("selectedlanguagechange")})))},t}(Pt),Ft=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];L(this,e);var n=this;if(k)for(var r in n=o.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,a=t.length;i<a;i++)n.addTrackElement_(t[i]);if(k)return n}return e.prototype.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},e.prototype.getTrackElementByTrack_=function(e){for(var t=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},e.prototype.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},e}(),Ut=function(){function e(t){L(this,e);var n=this;if(k)for(var r in n=o.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);if(e.prototype.setCues_.call(n,t),Object.defineProperty(n,"length",{get:function(){return this.length_}}),k)return n}return e.prototype.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},e.prototype.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),Ht={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},zt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Vt={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Wt={disabled:"disabled",hidden:"hidden",showing:"showing"},Gt=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var r=B(this,e.call(this)),i=r;if(k)for(var a in i=o.createElement("custom"),t.prototype)"constructor"!==a&&(i[a]=t.prototype[a]);var s={id:n.id||"vjs_track_"+Oe(),kind:n.kind||"",label:n.label||"",language:n.language||""},l=function(e){Object.defineProperty(i,e,{get:function(){return s[e]},set:function(){}})};for(var c in s)l(c);return B(r,i)}return R(t,e),t}(Ze),qt=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=o.createElement("a");n.href=e;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&((i=o.createElement("div")).innerHTML='<a href="'+e+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),o.body.appendChild(i));for(var s={},l=0;l<t.length;l++)s[t[l]]=n[t[l]];return"http:"===s.protocol&&(s.host=s.host.replace(/:80$/,"")),"https:"===s.protocol&&(s.host=s.host.replace(/:443$/,"")),s.protocol||(s.protocol=a.location.protocol),r&&o.body.removeChild(i),s},Yt=function(e){if(!e.match(/^https?:\/\//)){var t=o.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},Kt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},Xt=function(e){var t=a.location,n=qt(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Qt=(Object.freeze||Object)({parseUrl:qt,getAbsoluteURL:Yt,getFileExtension:Kt,isCrossOrigin:Xt}),$t=function(e,t){var n=new a.WebVTT.Parser(a,a.vttjs,a.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(a.console&&a.console.groupCollapsed&&a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return q.error(e)})),a.console&&a.console.groupEnd&&a.console.groupEnd()),n.flush()},Jt=function(e,t){var n={uri:e},r=Xt(e);r&&(n.cors=r),c(n,$e(this,(function(e,n,r){if(e)return q.error(e,n);if(t.loaded_=!0,"function"!=typeof a.WebVTT){if(t.tech_){var i=function(){return $t(r,t)};t.tech_.on("vttjsloaded",i),t.tech_.on("vttjserror",(function(){q.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",i)}))}}else $t(r,t)})))},Zt=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(L(this,t),!r.tech)throw new Error("A tech was not provided.");var i=ht(r,{kind:Vt[r.kind]||"subtitles",language:r.language||r.srclang||""}),a=Wt[i.mode]||"disabled",o=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(a="hidden");var s=n=B(this,e.call(this,i));if(s.tech_=i.tech,k)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);s.cues_=[],s.activeCues_=[];var c=new Ut(s.cues_),u=new Ut(s.activeCues_),d=!1,h=$e(s,(function(){this.activeCues=this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==a&&s.tech_.ready((function(){s.tech_.on("timeupdate",h)}),!0),Object.defineProperty(s,"default",{get:function(){return o},set:function(){}}),Object.defineProperty(s,"mode",{get:function(){return a},set:function(e){var t=this;Wt[e]&&("disabled"!==(a=e)?this.tech_.ready((function(){t.tech_.on("timeupdate",h)}),!0):this.tech_.off("timeupdate",h),this.trigger("modechange"))}}),Object.defineProperty(s,"cues",{get:function(){return this.loaded_?c:null},set:function(){}}),Object.defineProperty(s,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return u;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=e&&i.endTime>=e?t.push(i):i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e&&t.push(i)}if(d=!1,t.length!==this.activeCues_.length)d=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(d=!0);return this.activeCues_=t,u.setCues_(this.activeCues_),u},set:function(){}}),i.src?(s.src=i.src,Jt(i.src,s)):s.loaded_=!0,B(n,s)}return R(t,e),t.prototype.addCue=function(e){var t=e;if(a.vttjs&&!(e instanceof a.vttjs.VTTCue)){for(var n in t=new a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.prototype.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(Gt);Zt.prototype.allowedEvents_={cuechange:"cuechange"};var en=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var i=ht(r,{kind:zt[r.kind]||""}),a=n=B(this,e.call(this,i)),o=!1;if(k)for(var s in t.prototype)"constructor"!==s&&(a[s]=t.prototype[s]);return Object.defineProperty(a,"enabled",{get:function(){return o},set:function(e){"boolean"==typeof e&&e!==o&&(o=e,this.trigger("enabledchange"))}}),i.enabled&&(a.enabled=i.enabled),a.loaded_=!0,B(n,a)}return R(t,e),t}(Gt),tn=function(e){function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var i=ht(r,{kind:Ht[r.kind]||""}),a=n=B(this,e.call(this,i)),o=!1;if(k)for(var s in t.prototype)"constructor"!==s&&(a[s]=t.prototype[s]);return Object.defineProperty(a,"selected",{get:function(){return o},set:function(e){"boolean"==typeof e&&e!==o&&(o=e,this.trigger("selectedchange"))}}),i.selected&&(a.selected=i.selected),B(n,a)}return R(t,e),t}(Gt),nn=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};L(this,t);var r=B(this,e.call(this)),i=void 0,a=r;if(k)for(var s in a=o.createElement("custom"),t.prototype)"constructor"!==s&&(a[s]=t.prototype[s]);var l=new Zt(n);return a.kind=l.kind,a.src=l.src,a.srclang=l.language,a.label=l.label,a.default=l.default,Object.defineProperty(a,"readyState",{get:function(){return i}}),Object.defineProperty(a,"track",{get:function(){return l}}),i=0,l.addEventListener("loadeddata",(function(){i=2,a.trigger({type:"load",target:a})})),k?B(r,a):r}return R(t,e),t}(Ze);nn.prototype.allowedEvents_={load:"load"},nn.NONE=0,nn.LOADING=1,nn.LOADED=2,nn.ERROR=3;var rn={audio:{ListClass:Lt,TrackClass:en,capitalName:"Audio"},video:{ListClass:Bt,TrackClass:tn,capitalName:"Video"},text:{ListClass:jt,TrackClass:Zt,capitalName:"Text"}};Object.keys(rn).forEach((function(e){rn[e].getterName=e+"Tracks",rn[e].privateName=e+"Tracks_"}));var an={remoteText:{ListClass:jt,TrackClass:Zt,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ft,TrackClass:nn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},on=ht(rn,an);an.names=Object.keys(an),rn.names=Object.keys(rn),on.names=[].concat(an.names).concat(rn.names);var sn=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};L(this,t),n.reportTouchActivity=!1;var i=B(this,e.call(this,null,n,r));return i.hasStarted_=!1,i.on("playing",(function(){this.hasStarted_=!0})),i.on("loadstart",(function(){this.hasStarted_=!1})),on.names.forEach((function(e){var t=on[e];n&&n[t.getterName]&&(i[t.privateName]=n[t.getterName])})),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===n["native"+e+"Tracks"]&&(i["featuresNative"+e+"Tracks"]=!1)})),!1===n.nativeCaptions||!1===n.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new on.text.ListClass,i.initTrackListeners(),n.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}return R(t,e),t.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval($e(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return gt(0,0)},t.prototype.bufferedPercent=function(){return vt(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(rn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},t.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new St(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?gt(0,0):gt()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;rn.names.forEach((function(t){var n=rn[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!a.WebVTT)if(o.body.contains(this.el())){if(!this.options_["vtt.js"]&&W(u)&&Object.keys(u).length>0)return void this.trigger("vttjsloaded");var t=o.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},o=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};o(),t.addEventListener("change",o),t.addEventListener("addtrack",o),t.addEventListener("removetrack",o),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",o),t.removeEventListener("addtrack",o),t.removeEventListener("removetrack",o);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}}))},t.prototype.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var o=new on.text.TrackClass(i);return a.addTrack(o),o}(this,e,t,n)},t.prototype.createRemoteTextTrack=function(e){var t=ht(e,{tech:this});return new an.remoteTextEl.TrackClass(t)},t.prototype.addRemoteTextTrack=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(t);return!0!==n&&!1!==n&&(q.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready((function(){return e.autoRemoteTextTracks_.addTrack(r.track)})),r},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=dt(e),t.techs_[e]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return e=dt(e),t.techs_&&t.techs_[e]?t.techs_[e]:a&&a.videojs&&a.videojs[e]?(q.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),a.videojs[e]):void 0},t}(ft);on.names.forEach((function(e){var t=on[e];sn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),sn.prototype.featuresVolumeControl=!0,sn.prototype.featuresMuteControl=!0,sn.prototype.featuresFullscreenResize=!1,sn.prototype.featuresPlaybackRate=!1,sn.prototype.featuresProgressEvents=!1,sn.prototype.featuresSourceset=!1,sn.prototype.featuresTimeupdateEvents=!1,sn.prototype.featuresNativeTextTracks=!1,sn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n=e.sourceHandlers||[],r=void 0,i=0;i<n.length;i++)if(r=n[i].canPlayType(t))return r;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:q.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},ft.registerComponent("Tech",sn),sn.registerTech("Tech",sn),sn.defaultTechOrder_=[];var ln={},cn={},un={};function dn(e,t,n){e.setTimeout((function(){return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],i=arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=n[0],l=n.slice(1);if("string"==typeof s)e(t,ln[s],r,i,a,o);else if(s){var c=bn(i,s);if(!c.setSource)return a.push(c),e(t,l,r,i,a,o);c.setSource(z({},t),(function(n,s){if(n)return e(t,l,r,i,a,o);a.push(c),e(s,t.type===s.type?l:ln[s.type],r,i,a,o)}))}else l.length?e(t,l,r,i,a,o):o?r(t,a):e(t,ln["*"],r,i,a,!0)}(t,ln[t.type],n,e)}),1)}function hn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i="call"+dt(n),a=e.reduce(gn(i),r),o=a===un,s=o?null:t[n](a);return vn(e,n,s,o),s}var fn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},pn={setCurrentTime:1},mn={play:1,pause:1};function gn(e){return function(t,n){return t===un?un:n[e]?n[e](t):t}}function vn(e,t,n,r){for(var i=e.length-1;i>=0;i--){var a=e[i];a[t]&&a[t](r,n)}}function bn(e,t){var n=cn[e.id()],r=null;if(null==n)return r=t(e),cn[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var a=n[i],o=a[0],s=a[1];o===t&&(r=s)}return null===r&&(r=t(e),n.push([t,r])),r}var yn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},An=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=Kt(e),n=yn[t.toLowerCase()];return n||""},_n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var a=r[i];if(a.type&&a.src&&a.src===t)return a.type}return An(t)};function wn(e){var t=An(e.src);return!e.type&&t&&(e.type=t),e}var En=function(e){function t(n,r,i){L(this,t);var a=ht({createEl:!1},r),o=B(this,e.call(this,n,a,i));if(r.playerOptions.sources&&0!==r.playerOptions.sources.length)n.src(r.playerOptions.sources);else for(var s=0,l=r.playerOptions.techOrder;s<l.length;s++){var c=dt(l[s]),u=sn.getTech(c);if(c||(u=ft.getComponent(c)),u&&u.isSupported()){n.loadTech_(c);break}}return o}return R(t,e),t}(ft);ft.registerComponent("MediaLoader",En);var Sn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.emitTapEvents(),i.enable(),i}return R(t,e),t.prototype.createEl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=z({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&q.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=z({role:"button"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=ne("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,re(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){Ue(o,"keydown",$e(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){He(o,"keydown",$e(this,this.handleKeyPress))},t}(ft);ft.registerComponent("ClickableComponent",Sn);var Cn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.update(),n.on("posterchange",$e(i,i.update)),i}return R(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=ne("div",{className:"vjs-poster",tabIndex:-1});return P||(this.fallbackImg_=ne("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?kt(this.player_.play()):this.player_.pause())},t}(Sn);ft.registerComponent("PosterImage",Cn);var Tn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function kn(e,t){var n=void 0;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function xn(e,t,n){try{e.style[t]=n}catch(e){return}}var On=function(e){function t(n,r,i){L(this,t);var o=B(this,e.call(this,n,r,i)),s=$e(o,o.updateDisplay);return n.on("loadstart",$e(o,o.toggleDisplay)),n.on("texttrackchange",s),n.on("loadstart",$e(o,o.preselectTrack)),n.ready($e(o,(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",s),n.on("playerresize",s),a.addEventListener&&a.addEventListener("orientationchange",s),n.on("dispose",(function(){return a.removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}}))),o}return R(t,e),t.prototype.preselectTrack=function(){for(var e={captions:1,subtitles:1},t=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r=void 0,i=void 0,a=void 0,o=0;o<t.length;o++){var s=t[o];n&&n.enabled&&n.language===s.language?s.kind===n.kind?a=s:a||(a=s):n&&!n.enabled?(a=null,r=null,i=null):s.default&&("descriptions"!==s.kind||r?s.kind in e&&!i&&(i=s):r=s)}a?a.mode="showing":i?i.mode="showing":r&&(r.mode="showing")},t.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.prototype.clearDisplay=function(){"function"==typeof a.WebVTT&&a.WebVTT.processCues(a,[],this.el_)},t.prototype.updateDisplay=function(){var e=this.player_.textTracks();this.clearDisplay();for(var t=null,n=null,r=e.length;r--;){var i=e[r];"showing"===i.mode&&("descriptions"===i.kind?t=i:n=i)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))},t.prototype.updateForTrack=function(e){if("function"==typeof a.WebVTT&&e.activeCues){for(var t=[],n=0;n<e.activeCues.length;n++)t.push(e.activeCues[n]);if(a.WebVTT.processCues(a,t,this.el_),this.player_.textTrackSettings)for(var r=this.player_.textTrackSettings.getValues(),i=t.length;i--;){var o=t[i];if(o){var s=o.displayState;if(r.color&&(s.firstChild.style.color=r.color),r.textOpacity&&xn(s.firstChild,"color",kn(r.color||"#fff",r.textOpacity)),r.backgroundColor&&(s.firstChild.style.backgroundColor=r.backgroundColor),r.backgroundOpacity&&xn(s.firstChild,"backgroundColor",kn(r.backgroundColor||"#000",r.backgroundOpacity)),r.windowColor&&(r.windowOpacity?xn(s,"backgroundColor",kn(r.windowColor,r.windowOpacity)):s.style.backgroundColor=r.windowColor),r.edgeStyle&&("dropshadow"===r.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===r.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),r.fontPercent&&1!==r.fontPercent){var l=a.parseFloat(s.style.fontSize);s.style.fontSize=l*r.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}r.fontFamily&&"default"!==r.fontFamily&&("small-caps"===r.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Tn[r.fontFamily])}}}},t}(ft);ft.registerComponent("TextTrackDisplay",On);var In=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=ne("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(ft);ft.registerComponent("LoadingSpinner",In);var Mn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=z({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=z({type:"button"},n);var r=ft.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(r),r},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return q.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),ft.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(Sn);ft.registerComponent("Button",Mn);var Pn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)kt(t);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};Tt(t)?t.then(i,(function(){})):this.setTimeout(i,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(Mn);Pn.prototype.controlText_="Play Video",ft.registerComponent("BigPlayButton",Pn);var Dn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(Mn);ft.registerComponent("CloseButton",Dn);var Nn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"play",i.handlePlay),i.on(n,"pause",i.handlePause),i.on(n,"ended",i.handleEnded),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(Mn);Nn.prototype.controlText_="Play",ft.registerComponent("PlayToggle",Nn);var Ln=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||o>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},Rn=Ln;var Bn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return Rn(e,t)},jn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.throttledUpdateContent=Je($e(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return R(t,e),t.prototype.createEl=function(t){var n=this.buildCSSClass(),r=e.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=ne("span",{className:n+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=o.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return Bn(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(ft);jn.prototype.labelText_="Time",jn.prototype.controlText_="Time",ft.registerComponent("TimeDisplay",jn);var Fn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(jn);Fn.prototype.labelText_="Current Time",Fn.prototype.controlText_="Current Time",ft.registerComponent("CurrentTimeDisplay",Fn);var Un=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(jn);Un.prototype.labelText_="Duration",Un.prototype.controlText_="Duration",ft.registerComponent("DurationDisplay",Un);var Hn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},t}(ft);ft.registerComponent("TimeDivider",Hn);var zn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(jn);zn.prototype.labelText_="Remaining Time",zn.prototype.controlText_="Remaining Time",ft.registerComponent("RemainingTimeDisplay",zn);var Vn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}return R(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=ne("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(ft);ft.registerComponent("LiveDisplay",Vn);var Wn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return R(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=z({tabIndex:0},n),r=z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||C||e.preventDefault(),pe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;me(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=n:r.width=n,e}}},t.prototype.calculateDistance=function(e){var t=be(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(ft);ft.registerComponent("Slider",Wn);var Gn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,a=function(e,t){var n=e/t||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=a(r,n);for(var o=0;o<t.length;o++){var s=t.start(o),l=t.end(o),c=i[o];c||(c=this.el_.appendChild(ne()),i[o]=c),c.style.left=a(s,r),c.style.width=a(l-s,r)}for(var u=i.length;u>t.length;u--)this.el_.removeChild(i[u-1]);i.length=t.length},t}(ft);ft.registerComponent("LoadProgressBar",Gn);var qn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,n){var r=ge(this.el_),i=ge(this.player_.el()),a=e.width*t;if(i&&r){var o=e.left-i.left+a,s=e.width-a+(i.right-e.right),l=r.width/2;o<l?l+=l-o:s<l&&(l=s),l<0?l=0:l>r.width&&(l=r.width),this.el_.style.right="-"+l+"px",re(this.el_,n)}},t}(ft);ft.registerComponent("TimeTooltip",qn);var Yn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),i=Bn(r,n.player_.duration()),a=n.getChild("timeTooltip");a&&a.update(e,t,i)}))},t}(ft);Yn.prototype.options_={children:[]},x&&!(x>8)||v||y||Yn.prototype.options_.children.push("timeTooltip"),ft.registerComponent("PlayProgressBar",Yn);var Kn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.update=Je($e(i,i.update),25),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.duration(),i=Bn(t*r,r);n.el_.style.left=e.width*t+"px",n.getChild("timeTooltip").update(e,t,i)}))},t}(ft);Kn.prototype.options_={children:["timeTooltip"]},ft.registerComponent("MouseTimeDisplay",Kn);var Xn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.setEventHandlers_(),i}return R(t,e),t.prototype.setEventHandlers_=function(){var e=this;this.update=Je($e(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval((function(){e.requestAnimationFrame((function(){e.update()}))}),30)})),this.on(this.player_,["ended","pause","waiting"],(function(){e.clearInterval(e.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Bn(e,n),Bn(n,n)],"{1} of {2}")),this.bar.update(ge(this.el_),t)},t.prototype.update=function(t){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){Se(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(Se(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&kt(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(Wn);Xn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},x&&!(x>8)||v||y||Xn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Xn.prototype.playerEvent="timeupdate",ft.registerComponent("SeekBar",Xn);var Qn=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.handleMouseMove=Je($e(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=Je($e(i,i.handleMouseSeek),25),i.enable(),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),r=t.el(),i=ge(r),a=be(r,e).x;a>1?a=1:a<0&&(a=0),n&&n.update(i,a)}},t.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(ft);Qn.prototype.options_={children:["seekBar"]},ft.registerComponent("ProgressControl",Qn);var $n=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),!1===o[bt.fullscreenEnabled]&&i.disable(),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Mn);$n.prototype.controlText_="Fullscreen",ft.registerComponent("FullscreenToggle",$n);var Jn=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},Zn=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(ft);ft.registerComponent("VolumeLevel",Zn);var er=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on("slideractive",i.updateLastVolume_),i.on(n,"volumechange",i.updateARIAAttributes),n.ready((function(){return i.updateARIAAttributes()})),i}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){Se(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){Se(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(Wn);er.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},er.prototype.playerEvent="volumechange",ft.registerComponent("VolumeBar",er);var tr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t),r.vertical=r.vertical||!1,(void 0===r.volumeBar||W(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=B(this,e.call(this,n,r));return Jn(i,n),i.throttledHandleMouseMove=Je($e(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],(function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")})),i.on(i.volumeBar,["blur","sliderinactive"],(function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")})),i}return R(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(ft);tr.prototype.options_={children:["volumeBar"]},ft.registerComponent("VolumeControl",tr);var nr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;v&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)se(this.el_,"vjs-vol-"+n);oe(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Mn);nr.prototype.controlText_="Mute",ft.registerComponent("MuteToggle",nr);var rr=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t),void 0!==r.inline?r.inline=r.inline:r.inline=!0,(void 0===r.volumeControl||W(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=B(this,e.call(this,n,r));return i.on(n,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}return R(t,e),t.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(ft);rr.prototype.options_={children:["muteToggle","volumeControl"]},ft.registerComponent("VolumePanel",rr);var ir=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return R(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",$e(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=ne(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ue(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice(),n=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);n&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(ft);ft.registerComponent("Menu",ir);var ar=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t);var i=B(this,e.call(this,n,r));i.menuButton_=new Mn(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var a=Mn.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+a,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return R(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new ir(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=ne("li",{className:"vjs-menu-title",innerHTML:dt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),ie(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},t.prototype.createItems=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.prototype.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Mn.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",$e(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){Ue(o,"keydown",$e(this,this.handleKeyPress))},t.prototype.handleBlur=function(){He(o,"keydown",$e(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),v&&ee())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(ft);ft.registerComponent("MenuButton",ar);var or=function(e){function t(n,r){L(this,t);var i=r.tracks,a=B(this,e.call(this,n,r));if(a.items.length<=1&&a.hide(),!i)return B(a);var o=$e(a,a.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),a.player_.on("ready",o),a.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o)})),a}return R(t,e),t}(ar);ft.registerComponent("TrackButton",or);var sr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.selectable=r.selectable,i.isSelected_=r.selected||!1,i.multiSelectable=r.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}return R(t,e),t.prototype.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",z({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Sn);ft.registerComponent("MenuItem",sr);var lr=function(e){function t(n,r){L(this,t);var i=r.track,s=n.textTracks();r.label=i.label||i.language||"Unknown",r.selected="showing"===i.mode;var l=B(this,e.call(this,n,r));l.track=i;var c=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];l.handleTracksChange.apply(l,t)},u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];l.handleSelectedLanguageChange.apply(l,t)};if(n.on(["loadstart","texttrackchange"],c),s.addEventListener("change",c),s.addEventListener("selectedlanguagechange",u),l.on("dispose",(function(){n.off(["loadstart","texttrackchange"],c),s.removeEventListener("change",c),s.removeEventListener("selectedlanguagechange",u)})),void 0===s.onchange){var d=void 0;l.on(["tap","click"],(function(){if("object"!==N(a.Event))try{d=new a.Event("change")}catch(e){}d||(d=o.createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(d)}))}return l.handleTracksChange(),l}return R(t,e),t.prototype.handleClick=function(t){var n=this.track.kind,r=this.track.kinds,i=this.player_.textTracks();if(r||(r=[n]),e.prototype.handleClick.call(this,t),i)for(var a=0;a<i.length;a++){var o=i[a];o===this.track&&r.indexOf(o.kind)>-1?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled")}},t.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(sr);ft.registerComponent("TextTrackMenuItem",lr);var cr=function(e){function t(n,r){return L(this,t),r.track={player:n,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,r.multiSelectable=!1,B(this,e.call(this,n,r))}return R(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(lr);ft.registerComponent("OffTextTrackMenuItem",cr);var ur=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L(this,t),r.tracks=n.textTracks(),B(this,e.call(this,n,r))}return R(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lr,n=void 0;this.label_&&(n=this.label_+" off"),e.push(new cr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var a=r[i];if(this.kinds_.indexOf(a.kind)>-1){var o=new t(this.player_,{track:a,selectable:!0,multiSelectable:!1});o.addClass("vjs-"+a.kind+"-menu-item"),e.push(o)}}return e},t}(or);ft.registerComponent("TextTrackButton",ur);var dr=function(e){function t(n,r){L(this,t);var i=r.track,a=r.cue,o=n.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=a.text,r.selected=a.startTime<=o&&o<a.endTime;var s=B(this,e.call(this,n,r));return s.track=i,s.cue=a,i.addEventListener("cuechange",$e(s,s.update)),s}return R(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.prototype.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(sr);ft.registerComponent("ChaptersTrackMenuItem",dr);var hr=function(e){function t(n,r,i){return L(this,t),B(this,e.call(this,n,r,i))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},t.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(dt(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],a=new dr(this.player_,{track:this.track_,cue:i});e.push(a)}return e},t}(ur);hr.prototype.kind_="chapters",hr.prototype.controlText_="Chapters",ft.registerComponent("ChaptersButton",hr);var fr=function(e){function t(n,r,i){L(this,t);var a=B(this,e.call(this,n,r,i)),o=n.textTracks(),s=$e(a,a.handleTracksChange);return o.addEventListener("change",s),a.on("dispose",(function(){o.removeEventListener("change",s)})),a}return R(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},t.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(ur);fr.prototype.kind_="descriptions",fr.prototype.controlText_="Descriptions",ft.registerComponent("DescriptionsButton",fr);var pr=function(e){function t(n,r,i){return L(this,t),B(this,e.call(this,n,r,i))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(ur);pr.prototype.kind_="subtitles",pr.prototype.controlText_="Subtitles",ft.registerComponent("SubtitlesButton",pr);var mr=function(e){function t(n,r){L(this,t),r.track={player:n,kind:r.kind,label:r.kind+" settings",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="CaptionSettingsMenuItem";var i=B(this,e.call(this,n,r));return i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+r.kind+" settings dialog"),i}return R(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(lr);ft.registerComponent("CaptionSettingsMenuItem",mr);var gr=function(e){function t(n,r,i){return L(this,t),B(this,e.call(this,n,r,i))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new mr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(ur);gr.prototype.kind_="captions",gr.prototype.controlText_="Captions",ft.registerComponent("CaptionsButton",gr);var vr=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n      "),i+="</span>",e.prototype.createEl.call(this,t,z({innerHTML:i},n),r)},t}(lr);ft.registerComponent("SubsCapsMenuItem",vr);var br=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,t);var i=B(this,e.call(this,n,r));return i.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(dt(i.label_)),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new mr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,vr)},t}(ur);br.prototype.kinds_=["captions","subtitles"],br.prototype.controlText_="Subtitles",ft.registerComponent("SubsCapsButton",br);var yr=function(e){function t(n,r){L(this,t);var i=r.track,a=n.audioTracks();r.label=i.label||i.language||"Unknown",r.selected=i.enabled;var o=B(this,e.call(this,n,r));o.track=i,o.addClass("vjs-"+i.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.handleTracksChange.apply(o,t)};return a.addEventListener("change",s),o.on("dispose",(function(){a.removeEventListener("change",s)})),o}return R(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n      "),i+="</span>",e.prototype.createEl.call(this,t,z({innerHTML:i},n),r)},t.prototype.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},t.prototype.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(sr);ft.registerComponent("AudioTrackMenuItem",yr);var Ar=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L(this,t),r.tracks=n.audioTracks(),B(this,e.call(this,n,r))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new yr(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(or);Ar.prototype.controlText_="Audio Track",ft.registerComponent("AudioTrackButton",Ar);var _r=function(e){function t(n,r){L(this,t);var i=r.rate,a=parseFloat(i,10);r.label=i,r.selected=1===a,r.selectable=!0,r.multiSelectable=!1;var o=B(this,e.call(this,n,r));return o.label=i,o.rate=a,o.on(n,"ratechange",o.update),o}return R(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(sr);_r.prototype.contentElType="button",ft.registerComponent("PlaybackRateMenuItem",_r);var wr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.updateVisibility(),i.updateLabel(),i.on(n,"loadstart",i.updateVisibility),i.on(n,"ratechange",i.updateLabel),i}return R(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=ne("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},t.prototype.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createMenu=function(){var e=new ir(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new _r(this.player(),{rate:t[n]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(ar);wr.prototype.controlText_="Playback Rate",ft.registerComponent("PlaybackRateMenuButton",wr);var Er=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(ft);ft.registerComponent("Spacer",Er);var Sr=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Er);ft.registerComponent("CustomControlSpacer",Sr);var Cr=function(e){function t(){return L(this,t),B(this,e.apply(this,arguments))}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(ft);Cr.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},ft.registerComponent("ControlBar",Cr);var Tr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r));return i.on(n,"error",i.open),i}return R(t,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Mt);Tr.prototype.options_=ht(Mt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ft.registerComponent("ErrorDisplay",Tr);var kr=["#000","Black"],xr=["#00F","Blue"],Or=["#0FF","Cyan"],Ir=["#0F0","Green"],Mr=["#F0F","Magenta"],Pr=["#F00","Red"],Dr=["#FFF","White"],Nr=["#FF0","Yellow"],Lr=["1","Opaque"],Rr=["0.5","Semi-Transparent"],Br=["0","Transparent"],jr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[kr,Dr,Pr,Ir,xr,Nr,Mr,Or]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Lr,Rr,Br]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Dr,kr,Pr,Ir,xr,Nr,Mr,Or]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Lr,Rr]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Br,Rr,Lr]}};function Fr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}jr.windowColor.options=jr.backgroundColor.options;var Ur=function(e){function t(n,r){L(this,t),r.temporary=!1;var i=B(this,e.call(this,n,r));return i.updateDisplay=$e(i,i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=ne("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===r.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",(function(){i.saveSettings(),i.close()})),i.on(i.$(".vjs-default-button"),"click",(function(){i.setDefaults(),i.updateDisplay()})),H(jr,(function(e){i.on(i.$(e.selector),"change",i.updateDisplay)})),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}return R(t,e),t.prototype.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},t.prototype.createElSelect_=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",i=jr[e],a=i.id.replace("%s",this.id_),o=[n,a].join(" ").trim();return["<"+r+' id="'+a+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),"</"+r+">",'<select aria-labelledby="'+o+'">'].concat(i.options.map((function(e){var n=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+n+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+n+'">',t.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},t.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElColors_=function(){return ne("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.prototype.createElFont_=function(){return ne("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return ne("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.prototype.label=function(){return this.localize("Caption Settings Dialog")},t.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.prototype.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.prototype.getValues=function(){var e=this;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return U(e).reduce((function(n,r){return t(n,e[r],r)}),n)}(jr,(function(t,n,r){var i,a,o=(i=e.$(n.selector),a=n.parser,Fr(i.options[i.options.selectedIndex].value,a));return void 0!==o&&(t[r]=o),t}),{})},t.prototype.setValues=function(e){var t=this;H(jr,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(Fr(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},t.prototype.setDefaults=function(){var e=this;H(jr,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},t.prototype.restoreSettings=function(){var e=void 0;try{e=JSON.parse(a.localStorage.getItem("vjs-text-track-settings"))}catch(e){q.warn(e)}e&&this.setValues(e)},t.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):a.localStorage.removeItem("vjs-text-track-settings")}catch(e){q.warn(e)}}},t.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(o,"keydown",this.handleKeyDown);var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(Mt);ft.registerComponent("TextTrackSettings",Ur);var Hr=function(e){function t(n,r){L(this,t);var i=r.ResizeObserver||a.ResizeObserver;null===r.ResizeObserver&&(i=!1);var o=ht({createEl:!i},r),s=B(this,e.call(this,n,o));return s.ResizeObserver=r.ResizeObserver||a.ResizeObserver,s.loadListener_=null,s.resizeObserver_=null,s.debouncedHandler_=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a,i=void 0,o=function(){r.clearTimeout(i),i=null},s=function(){var a=this,o=arguments,s=function(){i=null,s=null,n||e.apply(a,o)};!i&&n&&e.apply(a,o),r.clearTimeout(i),i=r.setTimeout(s,t)};return s.cancel=o,s}((function(){s.resizeHandler()}),100,!1,s),i?(s.resizeObserver_=new s.ResizeObserver(s.debouncedHandler_),s.resizeObserver_.observe(n.el())):(s.loadListener_=function(){s.el_&&s.el_.contentWindow&&Ue(s.el_.contentWindow,"resize",s.debouncedHandler_)},s.one("load",s.loadListener_)),s}return R(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},t.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},t.prototype.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&He(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},t}(ft);ft.registerComponent("ResizeManager",Hr);var zr=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var o=n[a].src;o&&-1===r.indexOf(o)&&r.push(o)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},Vr={};k||(Vr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=o.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=o.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",a.Element.prototype.appendChild.call(this,n),this.innerHTML}}));var Wr=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},Gr=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return Wr([e.el(),a.HTMLMediaElement.prototype,a.Element.prototype,Vr],"innerHTML")}(e),i=function(n){return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=n.apply(t,i);return zr(e),o}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",ht(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},qr={};k||(qr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Yt(a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return a.Element.prototype.setAttribute.call(this,"src",e),e}}));var Yr=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return Wr([e.el(),a.HTMLMediaElement.prototype,qr],"src")}(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",ht(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var a=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=i.call(t);return zr(e)||(e.triggerSourceset(""),Gr(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):zr(e)||Gr(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},Kr=j(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]),Xr=function(e){function t(n,r){L(this,t);var i=B(this,e.call(this,n,r)),a=n.source,o=!1;if(a&&(i.el_.currentSrc!==a.src||n.tag&&3===n.tag.initNetworkState_)?i.setSource(a):i.handleLateInit_(i.el_),n.enableSourceset&&i.setupSourcesetHandling_(),i.el_.hasChildNodes()){for(var l=i.el_.childNodes,c=l.length,u=[];c--;){var d=l[c];"track"===d.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(d),i.remoteTextTracks().addTrack(d.track),i.textTracks().addTrack(d.track),o||i.el_.hasAttribute("crossorigin")||!Xt(d.src)||(o=!0)):u.push(d))}for(var h=0;h<u.length;h++)i.el_.removeChild(u[h])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&o&&q.warn(s(Kr)),i.restoreMetadataTracksInIOSNativePlayer_(),(M||m||w)&&!0===n.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}return R(t,e),t.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},t.prototype.setupSourcesetHandling_=function(){Yr(this)},t.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),t=void 0,n=function(){t=[];for(var n=0;n<e.length;n++){var r=e[n];"metadata"===r.kind&&t.push({track:r,storedMode:r.mode})}};n(),e.addEventListener("change",n),this.on("dispose",(function(){return e.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<t.length;r++){var i=t[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){e.removeEventListener("change",n),e.removeEventListener("change",r),e.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",r)}))},t.prototype.proxyNativeTracks_=function(){var e=this;rn.names.forEach((function(t){var n=rn[t],r=e.el()[n.getterName],i=e[n.getterName]();if(e["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var a={change:function(e){i.trigger({type:"change",target:i,currentTarget:i,srcElement:i})},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},o=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,a=0;a<r.length;a++)if(r[a]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};Object.keys(a).forEach((function(t){var n=a[t];r.addEventListener(t,n),e.on("dispose",(function(e){return r.removeEventListener(t,n)}))})),e.on("loadstart",o),e.on("dispose",(function(t){return e.off("loadstart",o)}))}}))},t.prototype.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=o.createElement("video");var r=ht({},this.options_.tag&&ue(this.options_.tag));M&&!0===this.options_.nativeControlsForTouch||delete r.controls,ce(e,z(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&he(e,"preload",this.options_.preload);for(var i=["loop","muted","playsinline","autoplay"],a=0;a<i.length;a++){var s=i[a],l=this.options_[s];void 0!==l&&(l?he(e,s,s):fe(e,s),e[s]=l)}return e},t.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){q(e,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;if(this.el_.duration===1/0&&y&&C&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=a.navigator&&a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){e.pause(),e.webkitEnterFullScreen()}),0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=o.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},t.prototype.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},t.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),a.performance&&"function"==typeof a.performance.now?e.creationTime=a.performance.now():a.performance&&a.performance.timing&&"number"==typeof a.performance.timing.navigationStart&&(e.creationTime=a.Date.now()-a.performance.timing.navigationStart),e},t}(sn);if(J()){Xr.TEST_VID=o.createElement("video");var Qr=o.createElement("track");Qr.kind="captions",Qr.srclang="en",Qr.label="English",Xr.TEST_VID.appendChild(Qr)}Xr.isSupported=function(){try{Xr.TEST_VID.volume=.5}catch(e){return!1}return!(!Xr.TEST_VID||!Xr.TEST_VID.canPlayType)},Xr.canPlayType=function(e){return Xr.TEST_VID.canPlayType(e)},Xr.canPlaySource=function(e,t){return Xr.canPlayType(e.type)},Xr.canControlVolume=function(){try{var e=Xr.TEST_VID.volume;return Xr.TEST_VID.volume=e/2+.1,e!==Xr.TEST_VID.volume}catch(e){return!1}},Xr.canMuteVolume=function(){try{var e=Xr.TEST_VID.muted;return Xr.TEST_VID.muted=!e,Xr.TEST_VID.muted?he(Xr.TEST_VID,"muted","muted"):fe(Xr.TEST_VID,"muted"),e!==Xr.TEST_VID.muted}catch(e){return!1}},Xr.canControlPlaybackRate=function(){if(y&&C&&T<58)return!1;try{var e=Xr.TEST_VID.playbackRate;return Xr.TEST_VID.playbackRate=e/2+.1,e!==Xr.TEST_VID.playbackRate}catch(e){return!1}},Xr.canOverrideAttributes=function(){if(k)return!1;try{var e=function(){};Object.defineProperty(o.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(o.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(o.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(o.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Xr.supportsNativeTextTracks=function(){return I||v&&C},Xr.supportsNativeVideoTracks=function(){return!(!Xr.TEST_VID||!Xr.TEST_VID.videoTracks)},Xr.supportsNativeAudioTracks=function(){return!(!Xr.TEST_VID||!Xr.TEST_VID.audioTracks)},Xr.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Xr.prototype.featuresVolumeControl=Xr.canControlVolume(),Xr.prototype.featuresMuteControl=Xr.canMuteVolume(),Xr.prototype.featuresPlaybackRate=Xr.canControlPlaybackRate(),Xr.prototype.featuresSourceset=Xr.canOverrideAttributes(),Xr.prototype.movingMediaElementInDOM=!v,Xr.prototype.featuresFullscreenResize=!0,Xr.prototype.featuresProgressEvents=!0,Xr.prototype.featuresTimeupdateEvents=!0,Xr.prototype.featuresNativeTextTracks=Xr.supportsNativeTextTracks(),Xr.prototype.featuresNativeVideoTracks=Xr.supportsNativeVideoTracks(),Xr.prototype.featuresNativeAudioTracks=Xr.supportsNativeAudioTracks();var $r=Xr.TEST_VID&&Xr.TEST_VID.constructor.prototype.canPlayType,Jr=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Zr=/^video\/mp4/i;Xr.patchCanPlayType=function(){A>=4&&!E&&!C?Xr.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Jr.test(e)?"maybe":$r.call(this,e)}:_&&(Xr.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&Zr.test(e)?"maybe":$r.call(this,e)})},Xr.unpatchCanPlayType=function(){var e=Xr.TEST_VID.constructor.prototype.canPlayType;return Xr.TEST_VID.constructor.prototype.canPlayType=$r,e},Xr.patchCanPlayType(),Xr.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Xr.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Xr.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Xr.prototype["set"+dt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(e){Xr.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(e){Xr.prototype["set"+dt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Xr.prototype[e]=function(){return this.el_[e]()}})),sn.withSourceHandlers(Xr),Xr.nativeSourceHandler={},Xr.nativeSourceHandler.canPlayType=function(e){try{return Xr.TEST_VID.canPlayType(e)}catch(e){return""}},Xr.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Xr.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Kt(e.src);return Xr.nativeSourceHandler.canPlayType("video/"+n)}return""},Xr.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Xr.nativeSourceHandler.dispose=function(){},Xr.registerSourceHandler(Xr.nativeSourceHandler),sn.registerTech("Html5",Xr);var ei=j(["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "],["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "]),ti=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ni={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ri=["tiny","xsmall","small","medium","large","xlarge","huge"],ii={};ri.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;ii[e]="vjs-layout-"+t}));var ai={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},oi=function(e){function t(n,r,i){if(L(this,t),n.id=n.id||r.id||"vjs_video_"+Oe(),(r=z(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var a=n.closest("[lang]");a&&a.getAttribute&&(r.language=a.getAttribute("lang"))}else for(var o=n;o&&1===o.nodeType;){if(ue(o).hasOwnProperty("lang")){r.language=o.getAttribute("lang");break}o=o.parentNode}var s=B(this,e.call(this,null,r,i));if(s.log=Y(s.id_),s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&ue(n),s.language(s.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(e){l[e.toLowerCase()]=r.languages[e]})),s.languages_=l}else s.languages_=t.prototype.options_.languages;s.cache_={},s.poster_=r.poster||"",s.controls_=!!r.controls,s.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?s.options_.autoplay=!0:s.autoplay(s.options_.autoplay),s.scrubbing_=!1,s.el_=s.createEl(),s.cache_.lastPlaybackRate=s.defaultPlaybackRate(),lt(s,{eventBusKey:"el_"});var c=ht(s.options_);if(r.plugins){var u=r.plugins;Object.keys(u).forEach((function(e){if("function"!=typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](u[e])}),s)}s.options_.playerOptions=c,s.middleware_=[],s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),v||s.addClass("vjs-workinghover"),t.players[s.id_]=s;var d="6.13.0".split(".")[0];return s.addClass("vjs-v"+d),s.userActive(!0),s.reportUserActivity(),s.one("play",s.listenForUserActivity_),s.on("fullscreenchange",s.handleFullscreenChange_),s.on("stageclick",s.handleStageClick_),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s.changingSrc_=!1,s.playWaitingForReady_=!1,s.playOnLoadstart_=null,s}return R(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),cn[this.id()]=null,e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,n=void 0,r=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=t.parentNode:i||(n=this.el_=e.prototype.createEl.call(this,"div"));var s=ue(t);if(i){for(n=this.el_=t,t=this.tag=o.createElement("video");n.children.length;)t.appendChild(n.firstChild);ae(n,"video-js")||oe(n,"video-js"),n.appendChild(t),r=this.playerElIngest_=n,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(e){void 0!==n[e]&&(t[e]=n[e])}))}if(t.setAttribute("tabindex","-1"),s.tabindex="-1",x&&(t.setAttribute("role","application"),s.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){"class"===e?(n.className+=" "+s[e],i&&(t.className+=" "+s[e])):(n.setAttribute(e,s[e]),i&&t.setAttribute(e,s[e]))})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=n.player=this,this.addClass("vjs-paused"),!0!==a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Xe("vjs-styles-dimensions");var l=Ce(".vjs-styles-defaults"),c=Ce("head");c.insertBefore(this.styleEl_,l?l.nextSibling:c.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var u=t.getElementsByTagName("a"),d=0;d<u.length;d++){var h=u.item(d);oe(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!r&&t.parentNode.insertBefore(n,t),ie(t,n),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_=n,n},t.prototype.width=function(e){return this.dimension("width",e)},t.prototype.height=function(e){return this.dimension("height",e)},t.prototype.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?q.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},t.prototype.fluid=function(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,e?(this.addClass("vjs-fluid"),this.fill(!1)):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.prototype.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},t.prototype.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},t.prototype.updateStyleEl_=function(){if(!0!==a.VIDEOJS_NO_DYNAMIC_STYLE){var e=void 0,t=void 0,n=void 0,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Qe(this.styleEl_,"\n      ."+n+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+n+".vjs-fluid {\n        padding-top: "+100*i+"%;\n      }\n    ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(o>=0&&(l.width=o),s>=0&&(l.height=s))}},t.prototype.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=dt(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(sn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};on.names.forEach((function(e){var t=on[e];a[t.getterName]=n[t.privateName]})),z(a,this.options_[r]),z(a,this.options_[i]),z(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var o=sn.getTech(e);if(!o)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new o(a),this.tech_.ready($e(this,this.handleTechReady_),!0),It(this.textTracksJson_||[],this.tech_),ti.forEach((function(e){n.on(n.tech_,e,n["handleTech"+dt(e)+"_"])})),Object.keys(ni).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+ni[e]+"_"].bind(n),event:t}):n["handleTech"+ni[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||ie(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;on.names.forEach((function(t){var n=on[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=Ot(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.prototype.tech=function(e){return void 0===e&&q.warn(s(ei)),this.tech_},t.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},t.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},t.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(e){q("deleting tag.poster throws in some browsers",e)}},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},t.prototype.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n=function(){var e=t.muted();t.muted(!0);var n=t.play();if(n&&n.then&&n.catch)return n.catch((function(n){t.muted(e)}))},r=void 0;if("any"===e?(r=this.play())&&r.then&&r.catch&&r.catch((function(){return n()})):r="muted"===e?n():this.play(),r&&r.then&&r.catch)return r.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},t.prototype.updateSourceCaches_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=_n(this,t)),this.cache_.source=ht({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],a=this.$$("source"),o=[],s=0;s<a.length;s++){var l=ue(a[s]);i.push(l),l.src&&l.src===t&&o.push(l.src)}o.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},t.prototype.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;if(r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),!e.src){this.tech_.one(["sourceset","loadstart"],(function e(n){if("sourceset"!==n.type){var r=t.techGet("currentSrc");t.lastSource_.tech=r,t.updateSourceCaches_(r)}t.tech_.off(["sourceset","loadstart"],e)}))}}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},t.prototype.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return e.removeClass("vjs-waiting")}))},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(q.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){Se(e)&&this.controls_&&(this.paused()?kt(this.play()):this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready((function(){if(e in pn)return function(e,t,n,r){return t[n](e.reduce(gn(n),r))}(this.middleware_,this.tech_,e,t);if(e in mn)return hn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw q(e),e}}),!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in fn)return function(e,t,n){return e.reduceRight(gn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in mn)return hn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw q("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw q("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw q(t),t}}},t.prototype.play=function(){var e=this,t=this.options_.Promise||a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},t.prototype.play_=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kt;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void t(this.techGet_("play"));this.playOnLoadstart_=function(){e.playOnLoadstart_=null,t(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){e.playWaitingForReady_=!1,t(e.play())}))}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||gt(0,0)},t.prototype.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){return void 0!==e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.prototype.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=gt(0,0)),e},t.prototype.bufferedPercent=function(){return vt(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},t.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.prototype.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){if(void 0===e)return!!this.isFullscreen_;this.isFullscreen_=!!e},t.prototype.requestFullscreen=function(){var e=bt;this.isFullscreen(!0),e.requestFullscreen?(Ue(o,e.fullscreenchange,$e(this,(function t(n){this.isFullscreen(o[e.fullscreenElement]),!1===this.isFullscreen()&&He(o,e.fullscreenchange,t),this.trigger("fullscreenchange")}))),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=bt;this.isFullscreen(!1),e.requestFullscreen?o[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=o.documentElement.style.overflow,Ue(o,"keydown",$e(this,this.fullWindowOnEscKey)),o.documentElement.style.overflow="hidden",oe(o.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,He(o,"keydown",this.fullWindowOnEscKey),o.documentElement.style.overflow=this.docOrigOverflow,se(o.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],a=sn.getTech(i);if(a||(a=ft.getComponent(i)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else q.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.prototype.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,sn.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(q.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(e,t,n){var r=void 0;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},a=function(e,t){var r=e[0];if(e[1].canPlaySource(t,n.options_[r.toLowerCase()]))return{source:t,tech:r}};return(this.options_.sourceOrder?i(e,r,(t=a,function(e,n){return t(n,e)})):i(r,e,a))||!1},t.prototype.src=function(e){var t=this;if(void 0===e)return this.cache_.src||"";var n=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):V(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[wn({src:t})]:V(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[wn(t)]:[];return t}(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),dn(this,n[0],(function(e,r){var i,a;if(t.middleware_=r,t.cache_.sources=n,t.updateSourceCaches_(e),t.src_(e))return n.length>1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());i=r,a=t.tech_,i.forEach((function(e){return e.setTech&&e.setTech(a)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},t.prototype.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,dt(t)!==dt(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t=void 0;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=t||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",t)},t.prototype.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.prototype.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new St(e),this.addClass("vjs-error"),q.error("(CODE:"+this.error_.code+" "+St.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,n=void 0,r=$e(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",(function(t){r(),this.clearInterval(e)})),this.on("keydown",r),this.on("keyup",r);var i=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(i);var e=this.options_.inactivityTimeout;e<=0||(i=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},t.prototype.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.prototype.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.prototype.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.track,n=void 0===t?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return ht(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=ht(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=ht(r)).player=void 0,e.tracks[n]=r}return e},t.prototype.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new Mt(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},t.prototype.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<ri.length;n++){var r=ri[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(ii[e]),this.addClass(ii[r]),this.breakpoint_=r;break}}},t.prototype.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},t.prototype.breakpoints=function(e){return void 0===e?z(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=z({},ai,e),this.updateCurrentBreakpoint_(),z(this.breakpoints_))},t.prototype.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},t.prototype.currentBreakpoint=function(){return this.breakpoint_},t.prototype.currentBreakpointClass=function(){return ii[this.breakpoint_]||""},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=ue(e),r=n["data-setup"];if(ae(e,"vjs-fill")&&(n.fill=!0),ae(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=l(r||"{}"),a=i[0],o=i[1];a&&q.error(a),z(n,o)}if(z(t,n),e.hasChildNodes())for(var s=e.childNodes,c=0,u=s.length;c<u;c++){var d=s[c],h=d.nodeName.toLowerCase();"source"===h?t.sources.push(ue(d)):"track"===h&&t.tracks.push(ue(d))}return t},t.prototype.flexNotSupported_=function(){var e=o.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(ft);on.names.forEach((function(e){var t=on[e];oi.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),oi.players={};var si=a.navigator;oi.prototype.options_={techOrder:sn.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:si&&(si.languages&&si.languages[0]||si.userLanguage||si.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:!1},k||oi.prototype.options_.children.push("resizeManager"),["ended","seeking","seekable","networkState","readyState"].forEach((function(e){oi.prototype[e]=function(){return this.techGet_(e)}})),ti.forEach((function(e){oi.prototype["handleTech"+dt(e)+"_"]=function(){return this.trigger(e)}})),ft.registerComponent("Player",oi);var li={},ci=function(e){return li.hasOwnProperty(e)},ui=function(e){return ci(e)?li[e]:void 0},di=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},hi=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},fi=function(e,t){return t.prototype.name=e,function(){hi(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=new(Function.prototype.bind.apply(t,[null].concat([this].concat(r))));return this[e]=function(){return a},hi(this,a.getEventHash()),a}},pi=function(){function e(t){if(L(this,e),this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,lt(this),delete this.trigger,ut(this,this.constructor.defaultState),di(t,this.name),this.dispose=$e(this,this.dispose),t.on("dispose",this.dispose)}return e.prototype.version=function(){return this.constructor.VERSION},e.prototype.getEventHash=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ze(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=fi(e,li[e])},e.isBasic=function(t){var n="string"==typeof t?ui(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+(void 0===t?"undefined":N(t))+".");if(ci(t))q.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(oi.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+(void 0===n?"undefined":N(n))+".");return li[t]=n,"plugin"!==t&&(e.isBasic(n)?oi.prototype[t]=function(e,t){var n=function(){hi(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return di(this,e),hi(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):oi.prototype[t]=fi(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");ci(e)&&(delete li[e],delete oi.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(li),t=void 0;return e.forEach((function(e){var n=ui(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=ui(e);return t&&t.VERSION||""},e}();pi.getPlugin=ui,pi.BASE_PLUGIN_NAME="plugin",pi.registerPlugin("plugin",pi),oi.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},oi.prototype.hasPlugin=function(e){return!!ci(e)};var mi=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":N(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)};"undefined"==typeof HTMLVideoElement&&J()&&(o.createElement("video"),o.createElement("audio"),o.createElement("track"),o.createElement("video-js"));var gi=function(e){return 0===e.indexOf("#")?e.slice(1):e};function vi(e,t,n){var r=vi.getPlayer(e);if(r)return t&&q.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?Ce("#"+gi(e)):e;if(!Z(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");o.body.contains(i)||q.warn("The element supplied is not included in the DOM"),t=t||{},vi.hooks("beforesetup").forEach((function(e){var n=e(i,ht(t));V(n)&&!Array.isArray(n)?t=ht(t,n):q.error("please return an object in beforesetup hooks")}));var a=ft.getComponent("Player");return r=new a(i,t,n),vi.hooks("setup").forEach((function(e){return e(r)})),r}if(vi.hooks_={},vi.hooks=function(e,t){return vi.hooks_[e]=vi.hooks_[e]||[],t&&(vi.hooks_[e]=vi.hooks_[e].concat(t)),vi.hooks_[e]},vi.hook=function(e,t){vi.hooks(e,t)},vi.hookOnce=function(e,t){vi.hooks(e,[].concat(t).map((function(t){return function n(){return vi.removeHook(e,n),t.apply(void 0,arguments)}})))},vi.removeHook=function(e,t){var n=vi.hooks(e).indexOf(t);return!(n<=-1)&&(vi.hooks_[e]=vi.hooks_[e].slice(),vi.hooks_[e].splice(n,1),!0)},!0!==a.VIDEOJS_NO_DYNAMIC_STYLE&&J()){var bi=Ce(".vjs-styles-defaults");if(!bi){bi=Xe("vjs-styles-defaults");var yi=Ce("head");yi&&yi.insertBefore(bi,yi.firstChild),Qe(bi,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}Ke(1,vi),vi.VERSION="6.13.0",vi.options=oi.prototype.options_,vi.getPlayers=function(){return oi.players},vi.getPlayer=function(e){var t=oi.players,n=void 0;if("string"==typeof e){var r=gi(e),i=t[r];if(i)return i;n=Ce("#"+r)}else n=e;if(Z(n)){var a=n,o=a.player,s=a.playerId;if(o||t[s])return o||t[s]}},vi.getAllPlayers=function(){return Object.keys(oi.players).map((function(e){return oi.players[e]})).filter(Boolean)},vi.players=oi.players,vi.getComponent=ft.getComponent,vi.registerComponent=function(e,t){sn.isTech(t)&&q.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),ft.registerComponent.call(ft,e,t)},vi.getTech=sn.getTech,vi.registerTech=sn.registerTech,vi.use=function(e,t){ln[e]=ln[e]||[],ln[e].push(t)},!k&&Object.defineProperty?(Object.defineProperty(vi,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(vi.middleware,"TERMINATOR",{value:un,writeable:!1,enumerable:!0})):vi.middleware={TERMINATOR:un},vi.browser=D,vi.TOUCH_ENABLED=M,vi.extend=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){e.apply(this,arguments)},r={};for(var i in"object"===(void 0===t?"undefined":N(t))?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),mi(n,e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},vi.mergeOptions=ht,vi.bind=$e,vi.registerPlugin=pi.registerPlugin,vi.deregisterPlugin=pi.deregisterPlugin,vi.plugin=function(e,t){return q.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),pi.registerPlugin(e,t)},vi.getPlugins=pi.getPlugins,vi.getPlugin=pi.getPlugin,vi.getPluginVersion=pi.getPluginVersion,vi.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),vi.options.languages=ht(vi.options.languages,((n={})[e]=t,n)),vi.options.languages[e]},vi.log=q,vi.createLogger=Y,vi.createTimeRange=vi.createTimeRanges=gt,vi.formatTime=Bn,vi.setFormatTime=function(e){Rn=e},vi.resetFormatTime=function(){Rn=Ln},vi.parseUrl=qt,vi.isCrossOrigin=Xt,vi.EventTarget=Ze,vi.on=Ue,vi.one=Ve,vi.off=He,vi.trigger=ze,vi.xhr=c,vi.TextTrack=Zt,vi.AudioTrack=en,vi.VideoTrack=tn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){vi[e]=function(){return q.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),ke[e].apply(null,arguments)}})),vi.computedStyle=K,vi.dom=ke,vi.url=Qt,e.exports=vi},function(e,t,n){"use strict";var r=n(302),i=n(107)("%Function%"),a=i.apply,o=i.call;e.exports=function(){return r.apply(o,arguments)},e.exports.apply=function(){return r.apply(a,arguments)}},function(e,t,n){var r=n(229),i=n(357);e.exports=n(208)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(169);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this.ids=new Set(e)}add(e){this.ids.add(e)}array(){return Array.from(this.ids.values()).sort((e,t)=>e-t)}contain(e){return this.ids.has(e)}forEach(e){this.ids.forEach(e)}empty(){return 0===this.ids.size}size(){return this.ids.size}equal(e){if(!e)return 0===this.ids.size;const t=this.array(),n=e.array();if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}clone(){return new r(this.array())}remove(e){this.ids.delete(e)}toJSON(){return this.array()}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(0).createContext)(null);t.default=r},function(e,t,n){"use strict";var r=n(315);e.exports=function(e){return r({},e)}},function(e,t,n){var r,i,a;e.exports=(a=n(84),i=(r=a).lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],a=0;a<n;a+=3)for(var o=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s<n;s++)i.push(r.charAt(o>>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var a=0;a<n.length;a++)r[n.charCodeAt(a)]=a}var o=n.charAt(64);if(o){var s=e.indexOf(o);-1!==s&&(t=s)}return function(e,t,n){for(var r=[],a=0,o=0;o<t;o++)if(o%4){var s=n[e.charCodeAt(o-1)]<<o%4*2,l=n[e.charCodeAt(o)]>>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return i.create(r,a)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},a.enc.Base64)},function(e,t,n){var r;e.exports=(r=n(84),function(e){var t=r,n=t.lib,i=n.WordArray,a=n.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],l=e[t+1],f=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],b=e[t+7],y=e[t+8],A=e[t+9],_=e[t+10],w=e[t+11],E=e[t+12],S=e[t+13],C=e[t+14],T=e[t+15],k=a[0],x=a[1],O=a[2],I=a[3];k=c(k,x,O,I,o,7,s[0]),I=c(I,k,x,O,l,12,s[1]),O=c(O,I,k,x,f,17,s[2]),x=c(x,O,I,k,p,22,s[3]),k=c(k,x,O,I,m,7,s[4]),I=c(I,k,x,O,g,12,s[5]),O=c(O,I,k,x,v,17,s[6]),x=c(x,O,I,k,b,22,s[7]),k=c(k,x,O,I,y,7,s[8]),I=c(I,k,x,O,A,12,s[9]),O=c(O,I,k,x,_,17,s[10]),x=c(x,O,I,k,w,22,s[11]),k=c(k,x,O,I,E,7,s[12]),I=c(I,k,x,O,S,12,s[13]),O=c(O,I,k,x,C,17,s[14]),k=u(k,x=c(x,O,I,k,T,22,s[15]),O,I,l,5,s[16]),I=u(I,k,x,O,v,9,s[17]),O=u(O,I,k,x,w,14,s[18]),x=u(x,O,I,k,o,20,s[19]),k=u(k,x,O,I,g,5,s[20]),I=u(I,k,x,O,_,9,s[21]),O=u(O,I,k,x,T,14,s[22]),x=u(x,O,I,k,m,20,s[23]),k=u(k,x,O,I,A,5,s[24]),I=u(I,k,x,O,C,9,s[25]),O=u(O,I,k,x,p,14,s[26]),x=u(x,O,I,k,y,20,s[27]),k=u(k,x,O,I,S,5,s[28]),I=u(I,k,x,O,f,9,s[29]),O=u(O,I,k,x,b,14,s[30]),k=d(k,x=u(x,O,I,k,E,20,s[31]),O,I,g,4,s[32]),I=d(I,k,x,O,y,11,s[33]),O=d(O,I,k,x,w,16,s[34]),x=d(x,O,I,k,C,23,s[35]),k=d(k,x,O,I,l,4,s[36]),I=d(I,k,x,O,m,11,s[37]),O=d(O,I,k,x,b,16,s[38]),x=d(x,O,I,k,_,23,s[39]),k=d(k,x,O,I,S,4,s[40]),I=d(I,k,x,O,o,11,s[41]),O=d(O,I,k,x,p,16,s[42]),x=d(x,O,I,k,v,23,s[43]),k=d(k,x,O,I,A,4,s[44]),I=d(I,k,x,O,E,11,s[45]),O=d(O,I,k,x,T,16,s[46]),k=h(k,x=d(x,O,I,k,f,23,s[47]),O,I,o,6,s[48]),I=h(I,k,x,O,b,10,s[49]),O=h(O,I,k,x,C,15,s[50]),x=h(x,O,I,k,g,21,s[51]),k=h(k,x,O,I,E,6,s[52]),I=h(I,k,x,O,p,10,s[53]),O=h(O,I,k,x,_,15,s[54]),x=h(x,O,I,k,l,21,s[55]),k=h(k,x,O,I,y,6,s[56]),I=h(I,k,x,O,T,10,s[57]),O=h(O,I,k,x,v,15,s[58]),x=h(x,O,I,k,S,21,s[59]),k=h(k,x,O,I,m,6,s[60]),I=h(I,k,x,O,w,10,s[61]),O=h(O,I,k,x,f,15,s[62]),x=h(x,O,I,k,A,21,s[63]),a[0]=a[0]+k|0,a[1]=a[1]+x|0,a[2]=a[2]+O|0,a[3]=a[3]+I|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var a=e.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function h(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}t.MD5=a._createHelper(l),t.HmacMD5=a._createHmacHelper(l)}(Math),r.MD5)},function(e,t,n){"use strict";var r=n(141),i=n(943),a=n(944),o=n(1700),s=a();r(s,{getPolyfill:a,implementation:i,shim:o}),e.exports=s},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(380),o=n(971);i(n(971),t);var s=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,n){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,r=new o.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===a.ElementType.Text)t?n.data=(n.data+e).replace(s," "):n.data+=e,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{t&&(e=e.replace(s," "));var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.NodeWithChildren(a.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new o.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var l=n(981);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=n(148);function u(e,t){var n=new c.DomHandler(void 0,t);return new l.Parser(n,t).end(e),n.root}Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return c.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return c.DomHandler}}),t.parseDocument=u,t.parseDOM=function(e,t){return u(e,t).children},t.createDomStream=function(e,t,n){var r=new c.DomHandler(e,t,n);return new l.Parser(r,t)};var d=n(982);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return s(d).default}});var h=a(n(320));t.ElementType=h,o(n(984),t),t.DomUtils=a(n(985));var f=n(984);Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return f.FeedHandler}})},function(e,n,r){"use strict";var i=r(40),a=r.n(i),o=r(12),s=r.n(o),l=r(3),c=r.n(l),u=r(13),d=r.n(u),h=r(14),f=r.n(h),p=r(10),m=r.n(p),g=r(2),v=r.n(g),b=r(31),y=r.n(b),A=r(0),_=r.n(A),w=(r(21),r(4)),E=r.n(w),S=r(17),C=r(8),T=r(288),k=r.n(T),x=(r(7),r(1)),O=r(52),I=r.n(O);r(22),r(36);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){v()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}x.g.SLIDING_TIME,x.g.COGVID_STATUS,x.g.PUBLISHING_STATUS,x.g.VIDEO_CATEGORY;var D=x.g.VIDEO_SLIDER_THUMB,N=function(e,t){return _.a.createElement("div",e)},L=function(e,t){return _.a.createElement("div",y()({},e,{index:t.index}))},R=function(e){return _.a.createElement("div",e,_.a.createElement("div",{className:I.a.mark}))},B=function(e){var n=e.index,r=e.isFullscreenMode,i=e.totalVideos,a=e.thumbnailUrl,o=e.style;return _.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:I.a.arrow,style:{top:o.top}}),_.a.createElement("div",{className:E()(I.a.sliderTooltipWrapper,r&&I.a.isFullscreenMode),style:{top:o.topTooltip}},_.a.createElement("div",{className:I.a.sliderTooltip,style:{height:o.height,width:16*o.height/9}},_.a.createElement("div",{className:I.a.content},_.a.createElement("img",{alt:"video-image",src:a})),_.a.createElement("div",{className:I.a.videoIndex},n+1," / ",x.c.nFormatter(i)," ",t("courses",{count:i})))))},j=function(e){d()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=m()(e);if(t()){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){var e;s()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),v()(c()(e),"state",{tooltip:{},marks:[]}),v()(c()(e),"refWrapper",_.a.createRef()),v()(c()(e),"handleChange",(function(t){var n=function(){e.props.onChange(t),e.handleMarkMouseLeave()};x.r.paused()?n():(x.r.pause(),setTimeout(n))})),v()(c()(e),"handleSliderClick",(function(){document.activeElement.blur()})),v()(c()(e),"handleMarkMouseEnter",(function(t){e.timeout=setTimeout((function(){e.setState({tooltip:P({},t)})}),100),e.handleMouseEnter()})),v()(c()(e),"handleMarkMouseLeave",(function(){clearTimeout(e.timeout),e.setState({tooltip:{}}),e.handleMouseLeave()})),v()(c()(e),"handleMarkRender",(function(t){var n=t.key,r=a()(t,["key"]),i=e.props,o=i.min,s=void 0===o?0:o,l=i.max,c=void 0===l?0:l,u=i.items,d=void 0===u?[]:u,h=i.isFullscreenMode,f=(d[n]||{}).thumbnailUrl,p=.4*document.body.clientHeight,m=h?40:0,g=1==d.length?"200%":(100/(c-s)+.15).toFixed(2)+"%";return _.a.createElement(R,y()({},r,{key:n,style:P(P({},r.style),{},{height:g}),onMouseEnter:function(t){var i=x.c.getElementCoords(t.target.children[0]);i&&(x.c.blurFirstArea(!0),e.handleMarkMouseEnter({index:n,totalVideos:c+1,thumbnailUrl:f,style:P(P({},r.style),{},{height:p,topTooltip:Math.min(Math.max(0,i.top-p/2)+36+110+m,document.documentElement.clientHeight-p-m)})}))},onMouseLeave:e.handleMarkMouseLeave}))})),v()(c()(e),"handleMouseEnter",(function(e){var t=document.getElementById(x.g.ID_SC_USAGE_TIP);t&&t.classList.add("animation-blink"),x.c.blurFirstArea(!0)})),v()(c()(e),"handleMouseLeave",(function(e){var t=document.getElementById(x.g.ID_SC_USAGE_TIP);t&&t.classList.remove("animation-blink"),x.c.blurFirstArea(!1)})),v()(c()(e),"render",(function(){var t=e.props,n=t.min,r=void 0===n?0:n,i=t.max,a=void 0===i?0:i,o=t.slideIndex,s=t.className,l=t.isFullscreenMode,c=e.state.tooltip,u=Array.from({length:a-r+1},(function(e,t){return t+r}));return _.a.createElement("div",{ref:e.refWrapper,className:E()(I.a.videoSliderWrapper,"u-flex-center",l&&I.a.isFullscreenMode,s),onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave},l&&_.a.createElement("div",{className:E()(I.a.sliderLabel,"u-font-din-condensed")},"Hover to Preview Courses"),_.a.createElement(k.a,{orientation:"vertical",marks:u,min:r,max:a,value:o,onChange:e.handleChange,onSliderClick:e.handleSliderClick,className:I.a.videoSlider,markClassName:E()("video-slider-mark",I.a.sliderMark,0===a&&"h-100"),thumbClassName:E()(D,I.a.sliderThumb),trackClassName:I.a.sliderTrack,renderTrack:L,renderThumb:N,renderMark:e.handleMarkRender}),c.index>=r&&_.a.createElement(B,y()({isFullscreenMode:l},c)))})),e}return n}(_.a.Component);n.a=Object(S.b)((function(e){var t=e.cogvid;return{levelBackgrounds:t.levelBackgrounds,selectedVideoIdx:t.selectedVideo.idx}}),(function(e){return{displaySlide:function(t){return e(C.d.displaySlide(t))}}}),null,{forwardRef:!0})(j)},function(e,t,n){e.exports=n(1068)},function(e,t,n){"use strict";t.a=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(143);function i(e){var t=Object(r.a)(e),n=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(119);function i(e){var t=Object(r.a)(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(171),i=n(138),a=n(280);function o(e){return Object(r.a)(Object(i.a)(e)).left+Object(a.a)(e).scrollLeft}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(171);function i(e){var t=Object(r.a)(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(e,t,n){"use strict";function r(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50),i=n(38),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e).getTime(),o=Object(r.a)(t);return new Date(n+o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(50),i=n(38),a=n(176),o=n(30);function s(e,t){Object(o.a)(1,arguments);var n=Object(i.default)(e,t),s=n.getUTCFullYear(),l=t||{},c=l.locale,u=c&&c.options&&c.options.firstWeekContainsDate,d=null==u?1:Object(r.a)(u),h=null==l.firstWeekContainsDate?d:Object(r.a)(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(s+1,0,h),f.setUTCHours(0,0,0,0);var p=Object(a.a)(f,t),m=new Date(0);m.setUTCFullYear(s,0,h),m.setUTCHours(0,0,0,0);var g=Object(a.a)(m,t);return n.getTime()>=p.getTime()?s+1:n.getTime()>=g.getTime()?s:s-1}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(38),i=n(50),a=n(30);function o(e,t){Object(a.a)(1,arguments);var n=t||{},o=n.locale,s=o&&o.options&&o.options.weekStartsOn,l=null==s?0:Object(i.a)(s),c=null==n.weekStartsOn?l:Object(i.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(r.default)(e),d=u.getDay(),h=(d<c?7:0)+d-c;return u.setDate(u.getDate()-h),u.setHours(0,0,0,0),u}},function(e,t,n){e.exports=n(1359)},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(116);function i(e,t,n){return Object(r.a)(e,Object(r.b)(t,n))}},function(e,t,n){"use strict";var r=n(561),i=n.n(r),a=n(130),o=n.n(a);t.a=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=o.a.location&&o.a.location.href||"");var n="function"==typeof o.a.URL,r=/^\/\//.test(e),a=!o.a.location&&!/\/\//i.test(e);if(n?e=new o.a.URL(e,o.a.location||"http://example.com"):/\/\//i.test(e)||(e=i.a.buildAbsoluteURL(o.a.location&&o.a.location.href||"",e)),n){var s=new URL(t,e);return a?s.href.slice("http://example.com".length):r?s.href.slice(s.protocol.length):s.href}return i.a.buildAbsoluteURL(e,t)}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(218),i=n(279),a=n(136),o=n(90);var s=n(119);function l(e,t){var n;void 0===t&&(t=[]);var c=function e(t){return["html","body","#document"].indexOf(Object(a.a)(t))>=0?t.ownerDocument.body:Object(o.b)(t)&&Object(i.a)(t)?t:e(Object(r.a)(t))}(e),u=c===(null==(n=e.ownerDocument)?void 0:n.body),d=Object(s.a)(c),h=u?[d].concat(d.visualViewport||[],Object(i.a)(c)?c:[]):c,f=t.concat(h);return u?f:f.concat(l(Object(r.a)(h)))}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",multiSelect:"multiSelect--rrByD",controlItem:"controlItem--3Dv4x",label:"label--ftsYc",arrowIcon:"arrowIcon--2r4nO",errorMessage:"errorMessage--fLd93"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",authorInfo:"authorInfo--2OdmO",authorAvatar:"authorAvatar--Rm0IB",infoAuth:"infoAuth--1zwP5",truncate:"truncate--LMDN1",imgAuth:"imgAuth--1Pr8z"}},function(e){e.exports=JSON.parse('[{"label":"Alabama","abbrev":"Ala.","code":"AL"},{"label":"Alaska","abbrev":"Alaska","code":"AK"},{"label":"Arizona","abbrev":"Ariz.","code":"AZ"},{"label":"Arkansas","abbrev":"Ark.","code":"AR"},{"label":"California","abbrev":"Calif.","code":"CA"},{"label":"Colorado","abbrev":"Colo.","code":"CO"},{"label":"Connecticut","abbrev":"Conn.","code":"CT"},{"label":"Delaware","abbrev":"Del.","code":"DE"},{"label":"District of Columbia","abbrev":"D.C.","code":"DC"},{"label":"Florida","abbrev":"Fla.","code":"FL"},{"label":"Georgia","abbrev":"Ga.","code":"GA"},{"label":"Hawaii","abbrev":"Hawaii","code":"HI"},{"label":"Idaho","abbrev":"Idaho","code":"ID"},{"label":"Illinois","abbrev":"Ill.","code":"IL"},{"label":"Indiana","abbrev":"Ind.","code":"IN"},{"label":"Iowa","abbrev":"Iowa","code":"IA"},{"label":"Kansas","abbrev":"Kans.","code":"KS"},{"label":"Kentucky","abbrev":"Ky.","code":"KY"},{"label":"Louisiana","abbrev":"La.","code":"LA"},{"label":"Maine","abbrev":"Maine","code":"ME"},{"label":"Maryland","abbrev":"Md.","code":"MD"},{"label":"Massachusetts","abbrev":"Mass.","code":"MA"},{"label":"Michigan","abbrev":"Mich.","code":"MI"},{"label":"Minnesota","abbrev":"Minn.","code":"MN"},{"label":"Mississippi","abbrev":"Miss.","code":"MS"},{"label":"Missouri","abbrev":"Mo.","code":"MO"},{"label":"Montana","abbrev":"Mont.","code":"MT"},{"label":"Nebraska","abbrev":"Nebr.","code":"NE"},{"label":"Nevada","abbrev":"Nev.","code":"NV"},{"label":"New Hampshire","abbrev":"N.H.","code":"NH"},{"label":"New Jersey","abbrev":"N.J.","code":"NJ"},{"label":"New Mexico","abbrev":"N.M.","code":"NM"},{"label":"New York","abbrev":"N.Y.","code":"NY"},{"label":"North Carolina","abbrev":"N.C.","code":"NC"},{"label":"North Dakota","abbrev":"N.D.","code":"ND"},{"label":"Ohio","abbrev":"Ohio","code":"OH"},{"label":"Oklahoma","abbrev":"Okla.","code":"OK"},{"label":"Oregon","abbrev":"Ore.","code":"OR"},{"label":"Pennsylvania","abbrev":"Pa.","code":"PA"},{"label":"Rhode Island","abbrev":"R.I.","code":"RI"},{"label":"South Carolina","abbrev":"S.C.","code":"SC"},{"label":"South Dakota","abbrev":"S.D.","code":"SD"},{"label":"Tennessee","abbrev":"Tenn.","code":"TN"},{"label":"Texas","abbrev":"Tex.","code":"TX"},{"label":"Utah","abbrev":"Utah","code":"UT"},{"label":"Vermont","abbrev":"Vt.","code":"VT"},{"label":"Virginia","abbrev":"Va.","code":"VA"},{"label":"Washington","abbrev":"Wash.","code":"WA"},{"label":"West Virginia","abbrev":"W.Va.","code":"WV"},{"label":"Wisconsin","abbrev":"Wis.","code":"WI"},{"label":"Wyoming","abbrev":"Wyo.","code":"WY"}]')},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",setPriceModalWrapper:"setPriceModalWrapper--2jA7J",modalBody:"modalBody--3i0u_",title:"title--2vaLs",radioBtn:"radioBtn--12e6o",setPriceArea:"setPriceArea--1YUoa",dot:"dot--2LJ2n",active:"active--2sM7M"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",modalBody:"modalBody--3FgDH",footerBtn:"footerBtn--S8VSx",dropdownWrapper:"dropdownWrapper--mob34",dropdownPopup:"dropdownPopup--2X-CJ"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",wrapper:"wrapper--2L1Bu",logo:"logo--1faAZ",title:"title--2Jdxz",body:"body--3nH8c",welcome:"welcome--2JgZ8"}},function(e,t,n){(function(r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(1134)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(96))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return e.start(t)+"-"+e.end(t)},i=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},a=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},o={hexDump:function(e){for(var t=Array.prototype.slice.call(e),n="",r=0;r<t.length/16;r++)n+=t.slice(16*r,16*r+16).map(i).join("")+" "+t.slice(16*r,16*r+16).map(a).join("")+"\n";return n},tagDump:function(e){return o.hexDump(e.bytes)},textRanges:function(e){var t="",n=void 0;for(n=0;n<e.length;n++)t+=r(e,n)+" ";return t},createTransferableMessage:function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},initSegmentId:function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")}};t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(1278);e.exports=Function.prototype.bind||r},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(e,t,n){var r=n(232),i=n(789),a=n(790),o=n(230),s=n(359),l=n(791),c={},u={};(t=e.exports=function(e,t,n,d,h){var f,p,m,g,v=h?function(){return e}:l(e),b=r(n,d,t?2:1),y=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(a(v)){for(f=s(e.length);f>y;y++)if((g=t?b(o(p=e[y])[0],p[1]):b(e[y]))===c||g===u)return g}else for(m=v.call(e);!(p=m.next()).done;)if((g=i(m,b,p.value,t))===c||g===u)return g}).BREAK=c,t.RETURN=u},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ClientMetricReportDirection=void 0,function(e){e[e.UPSTREAM=0]="UPSTREAM",e[e.DOWNSTREAM=1]="DOWNSTREAM"}(r=t.ClientMetricReportDirection||(t.ClientMetricReportDirection={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Modality="#content"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(307);class i{constructor(e){this._id=e}id(){return this._id}base(){return this._id?this._id.split(i.MODALITY_SEPARATOR)[0]:""}modality(){if(!this._id)return"";const e=this._id.split(i.MODALITY_SEPARATOR);return 2===e.length?e[1]:""}hasModality(e){return""!==e&&this.modality()===e}withModality(e){const t=new i(this.base()+i.MODALITY_SEPARATOR+e);return""===e||""===this.base()||new i(t._id).modality()!==e?new i(this.base()):t}}t.default=i,i.MODALITY_SEPARATOR=r.default.Modality[0],i.MODALITY_CONTENT=r.default.Modality.substr(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(832);class i{constructor(e){this.sdp=e}clone(){return new i(this.sdp)}static isRTPCandidate(e){const t=/candidate[:](\S+) (\d+)/g.exec(e);return null!==t&&"1"===t[2]}static linesToSDP(e){return new i(e.join(i.CRLF))}static candidateTypeFromString(e){switch(e){case r.default.Host:return r.default.Host;case r.default.ServerReflexive:return r.default.ServerReflexive;case r.default.PeerReflexive:return r.default.PeerReflexive;case r.default.Relay:return r.default.Relay}return null}static candidateType(e){const t=/a[=]candidate[:].* typ ([a-z]+) /g.exec(e);return null===t?null:i.candidateTypeFromString(t[1])}static splitLines(e){return e.trim().split("\n").map(e=>e.trim())}static splitSections(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+i.CRLF)}static findActiveCameraSection(e){let t=0,n=!1;for(const r of e){if(/^m=video/.test(r)&&r.indexOf("sendrecv")>-1){n=!0;break}t++}return!1===n&&(t=-1),t}static parseSSRCMedia(e){const t=e.indexOf(" ");let n=0,r="",a="";n=i.extractSSRCFromAttributeLine(e);const o=e.indexOf(":",t);return o>-1?(r=e.substr(t+1,o-t-1),a=e.substr(o+1)):r=e.substr(t+1),[n,r,a]}static extractSSRCsFromFIDGroupLine(e){return/^a=ssrc-group:FID\s(.+)/.exec(e)[1]}static extractSSRCFromAttributeLine(e){const t=/^a=ssrc:([0-9]+)\s/.exec(e);return null===t?0:parseInt(t[1],10)}static matchPrefix(e,t){return i.splitLines(e).filter(e=>0===e.indexOf(t))}lines(){return this.sdp.split(i.CRLF)}hasVideo(){return null!==/^m=video/gm.exec(this.sdp)}hasCandidates(){return null!==/a[=]candidate[:]/g.exec(this.sdp)}hasCandidatesForAllMLines(){return!(this.sdp.indexOf("c=IN IP4 0.0.0.0")>-1)}withBundleAudioVideo(){const e=this.lines(),t=[];for(const n of e){const e=n.replace(/^a=group:BUNDLE audio$/,"a=group:BUNDLE audio video");e===n?t.push(n):t.push(e)}return i.linesToSDP(t)}copyVideo(e){const t=e.split(i.CRLF),n=i.splitLines(this.sdp);let r=!1;for(const e of t)/^m=video/.test(e)?r=!0:/^m=/.test(e)&&(r=!1),r&&n.push(e);return i.linesToSDP(n)}withoutCandidateType(e){return i.linesToSDP(this.lines().filter(t=>i.candidateType(t)!==e))}withoutServerReflexiveCandidates(){return this.withoutCandidateType(r.default.ServerReflexive)}withBandwidthRestriction(e,t){const n=this.lines(),r=[];for(const i of n)r.push(i),/^m=video/.test(i)&&(t?r.push(`b=TIAS:${1e3*e}`):r.push(`b=AS:${e}`));return i.linesToSDP(r)}withAudioMaxAverageBitrate(e){if(!e)return this.clone();e=Math.trunc(Math.min(Math.max(e,i.rfc7587LowestBitrate),i.rfc7587HighestBitrate));const t=this.lines(),n=[],r=/^a=rtpmap:\s*(\d+)\s+opus\/48000/;let a=!1,o=null;for(const i of t){if(i.startsWith("m=audio")&&(a=!0,o=null),i.startsWith("m=video")&&(a=!1,o=null),a){const e=r.exec(i);null!==e&&(o=`a=fmtp:${e[1]} `,a=!1)}if(o&&i.startsWith(o)){const t=i.slice(o.length).split(";"),r=[];for(const e of t)e.startsWith("maxaveragebitrate=")||r.push(e);r.push(`maxaveragebitrate=${e}`),n.push(o+r.join(";"))}else n.push(i)}return i.linesToSDP(n)}withUnifiedPlanFormat(){let e=this.sdp;return e.includes("mozilla")?this.clone():(e=e.replace("o=-","o=mozilla-chrome"),new i(e))}preferH264IfExists(){const e=this.sdp,t=i.splitSections(e);if(t.length<2)return new i(this.sdp);const n=[];for(let e=0;e<t.length;e++){if(/^m=video/.test(t[e])){const n=i.splitLines(t[e]);let r=0,a=0;if(n.forEach(e=>{if(/^a=rtpmap:/.test(e)){const t=/^a=rtpmap:([0-9]+)\s/.exec(e);e.toLowerCase().includes("vp8")?r=parseInt(t[1],10):e.toLowerCase().includes("h264")&&(a=parseInt(t[1],10))}}),0!==r&&0!==a){const e=n[0].split(" ");let t=-1,i=-1;for(let n=3;n<e.length;n++){const o=parseInt(e[n],10);o===r?t=n:o===a&&(i=n)}t<i&&(e[t]=a.toString(),e[i]=r.toString()),n[0]=e.join(" ")}t[e]=n.join(i.CRLF)+i.CRLF}n.push(t[e])}const r=n.join("");return new i(r)}withOldFashionedMungingSimulcast(e){if(e<2)return this.clone();const t=this.sdp,n=i.splitSections(t);if(n.length<2)return new i(this.sdp);const r=i.findActiveCameraSection(n);if(-1===r)return new i(this.sdp);let a="",o="";i.matchPrefix(n[r],"a=ssrc:").forEach(e=>{const t=i.parseSSRCMedia(e);"cname"===t[1]?a=t[2]:"msid"===t[1]&&(o=t[2])});const s=i.matchPrefix(n[r],"a=ssrc-group:FID ");if(""===a||""===o||s.length<1)return new i(this.sdp);const l=i.extractSSRCsFromFIDGroupLine(s[0]),c=n[r].trim().split(i.CRLF).filter(e=>0!==e.indexOf("a=ssrc:")&&0!==e.indexOf("a=ssrc-group:")),u=[],[d,h]=l.split(" ").map(e=>parseInt(e,10));let f=d,p=h;for(let t=0;t<e;t++)c.push("a=ssrc:"+f+" cname:"+a),c.push("a=ssrc:"+f+" msid:"+o),c.push("a=ssrc:"+p+" cname:"+a),c.push("a=ssrc:"+p+" msid:"+o),c.push("a=ssrc-group:FID "+f+" "+p),u.push(f),f+=1,p=f+1;c.push("a=ssrc-group:SIM "+u.join(" ")),n[r]=c.join(i.CRLF)+i.CRLF;const m=n.join("");return new i(m)}ssrcForVideoSendingSection(){const e=this.sdp,t=i.splitSections(e);if(t.length<2)return"";const n=i.findActiveCameraSection(t);if(-1===n)return"";const r=i.matchPrefix(t[n],"a=ssrc-group:FID ");if(r.length<1)return"";const a=i.extractSSRCsFromFIDGroupLine(r[0]),[o]=a.split(" ").map(e=>parseInt(e,10));return o.toString()}videoSendSectionHasDifferentSSRC(e){const t=this.ssrcForVideoSendingSection(),n=e.ssrcForVideoSendingSection();return""!==t&&""!==n&&parseInt(t,10)!==parseInt(n,10)}}t.default=i,i.CRLF="\r\n",i.rfc7587LowestBitrate=6e3,i.rfc7587HighestBitrate=51e4},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(133),i=n(183);class a{constructor(e){this._statusCode=e}statusCode(){return this._statusCode}isFailure(){switch(this._statusCode){case i.default.AudioAuthenticationRejected:case i.default.AudioCallAtCapacity:case i.default.AudioInternalServerError:case i.default.AudioServiceUnavailable:case i.default.AudioDisconnected:case i.default.VideoCallAtSourceCapacity:case i.default.SignalingBadRequest:case i.default.SignalingInternalServerError:case i.default.SignalingRequestFailed:case i.default.StateMachineTransitionFailed:case i.default.ICEGatheringTimeoutWorkaround:case i.default.ConnectionHealthReconnect:case i.default.RealtimeApiFailed:case i.default.TaskFailed:case i.default.NoAttendeePresent:return!0;default:return!1}}isTerminal(){switch(this._statusCode){case i.default.Left:case i.default.AudioJoinedFromAnotherDevice:case i.default.AudioAuthenticationRejected:case i.default.AudioCallAtCapacity:case i.default.MeetingEnded:case i.default.AudioDisconnected:case i.default.TURNCredentialsForbidden:case i.default.SignalingBadRequest:case i.default.SignalingRequestFailed:case i.default.VideoCallAtSourceCapacity:case i.default.RealtimeApiFailed:case i.default.AudioAttendeeRemoved:return!0;default:return!1}}isAudioConnectionFailure(){switch(this._statusCode){case i.default.AudioAuthenticationRejected:case i.default.AudioInternalServerError:case i.default.AudioServiceUnavailable:case i.default.StateMachineTransitionFailed:case i.default.ICEGatheringTimeoutWorkaround:case i.default.SignalingBadRequest:case i.default.SignalingInternalServerError:case i.default.SignalingRequestFailed:case i.default.RealtimeApiFailed:case i.default.NoAttendeePresent:return!0;default:return!1}}toString(){switch(this._statusCode){case i.default.OK:return"Everything is OK so far.";case i.default.Left:return"The attendee left the meeting.";case i.default.AudioJoinedFromAnotherDevice:return"The attendee joined from another device.";case i.default.AudioDisconnectAudio:return"The audio connection failed.";case i.default.AudioAuthenticationRejected:return"The meeting rejected the attendee.";case i.default.AudioCallAtCapacity:return"The attendee couldn't join because the meeting was at capacity.";case i.default.AudioCallEnded:case i.default.TURNMeetingEnded:case i.default.MeetingEnded:return"The meeting ended.";case i.default.AudioInternalServerError:case i.default.AudioServiceUnavailable:case i.default.AudioDisconnected:return"The audio connection failed.";case i.default.VideoCallSwitchToViewOnly:return"The attendee couldn't start the local video because the maximum video capacity was reached.";case i.default.VideoCallAtSourceCapacity:return"The connection failed due to an internal server error.";case i.default.SignalingBadRequest:case i.default.SignalingInternalServerError:case i.default.SignalingRequestFailed:return"The signaling connection failed.";case i.default.StateMachineTransitionFailed:return"The state transition failed.";case i.default.ICEGatheringTimeoutWorkaround:return"Gathering ICE candidates timed out. In Chrome, this might indicate that the browser is in a bad state after reconnecting to VPN.";case i.default.ConnectionHealthReconnect:return"The meeting was reconnected.";case i.default.RealtimeApiFailed:return"The real-time API failed. This status code might indicate that the callback you passed to the real-time API threw an exception.";case i.default.TaskFailed:return"The connection failed. See the error message for more details.";case i.default.AudioDeviceSwitched:return"The attendee chose another audio device.";case i.default.IncompatibleSDP:return"The connection failed due to incompatible SDP.";case i.default.TURNCredentialsForbidden:return"The meeting ended, or the attendee was removed.";case i.default.NoAttendeePresent:return"The attendee was not present.";case i.default.AudioAttendeeRemoved:return"The meeting ended because attendee removed.";default:{const e=this._statusCode;throw new Error(`Unhandled case: ${e}`)}}}static fromSignalFrame(e){return e.error&&e.error.status?this.fromSignalingStatus(e.error.status):e.type===r.SdkSignalFrame.Type.AUDIO_STATUS?e.audioStatus?this.fromAudioStatus(e.audioStatus.audioStatus):new a(i.default.SignalingRequestFailed):new a(i.default.OK)}static fromAudioStatus(e){switch(e){case 200:return new a(i.default.OK);case 301:return new a(i.default.AudioJoinedFromAnotherDevice);case 302:return new a(i.default.AudioDisconnectAudio);case 403:return new a(i.default.AudioAuthenticationRejected);case 409:return new a(i.default.AudioCallAtCapacity);case 410:return new a(i.default.MeetingEnded);case 411:return new a(i.default.AudioAttendeeRemoved);case 500:return new a(i.default.AudioInternalServerError);case 503:return new a(i.default.AudioServiceUnavailable);default:switch(Math.floor(e/100)){case 2:return new a(i.default.OK);default:return new a(i.default.AudioDisconnected)}}}static fromSignalingStatus(e){switch(e){case 206:return new a(i.default.VideoCallSwitchToViewOnly);case 509:return new a(i.default.VideoCallAtSourceCapacity);default:switch(Math.floor(e/100)){case 2:return new a(i.default.OK);case 4:return new a(i.default.SignalingBadRequest);case 5:return new a(i.default.SignalingInternalServerError);default:return new a(i.default.SignalingRequestFailed)}}}}t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,n,r,i,a=1){this.cameraWidth=e,this.cameraHeight=t,this.cameraFrameRate=n,this.maxEncodeBitrateKbps=r,this.isSimulcast=i,this.scaleResolutionDownBy=a}equal(e){let t=e.captureWidth()===this.cameraWidth&&e.captureHeight()===this.cameraHeight&&e.captureFrameRate()===this.cameraFrameRate&&e.encodeBitrates().length===this.encodeBitrates().length&&e.encodeScaleResolutionDownBy().length===this.encodeScaleResolutionDownBy().length&&e.encodeWidths().length===this.encodeWidths().length&&e.encodeHeights().length===this.encodeHeights().length;if(t)for(let n=0;n<e.encodeWidths().length;n++)if(e.encodeWidths()[n]!==this.encodeWidths()[n]||e.encodeHeights()[n]!==this.encodeHeights()[n]||e.encodeBitrates()[n]!==this.encodeBitrates()[n]||e.encodeScaleResolutionDownBy()[n]!==this.encodeScaleResolutionDownBy()[n])return t=!1,t;return t}clone(){return new r(this.cameraWidth,this.cameraHeight,this.cameraFrameRate,this.maxEncodeBitrateKbps,this.isSimulcast,this.scaleResolutionDownBy)}captureWidth(){return this.cameraWidth}captureHeight(){return this.cameraHeight}captureFrameRate(){return this.cameraFrameRate}encodeBitrates(){return[this.maxEncodeBitrateKbps]}encodeScaleResolutionDownBy(){return[this.scaleResolutionDownBy]}encodeWidths(){return[this.cameraWidth]}encodeHeights(){return[this.cameraHeight]}}t.default=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.isOldChrome=t.supportsWASMStreaming=t.supportsSharedArrayBuffer=t.supportsWASM=t.supportsAudioWorklet=t.supportsWorker=t.supportsVoiceFocusWorker=t.supportsWASMPostMessage=t.isSafari=void 0;const i=n(507);t.isSafari=(e=globalThis)=>{const t=e.navigator.userAgent,n=t.match(/Safari\//),r=t.match(/Chrom(?:e|ium)\//);return!(!n||r)};t.supportsWASMPostMessage=(e=globalThis)=>!t.isSafari(e);t.supportsVoiceFocusWorker=(e=globalThis,n,a)=>r(void 0,void 0,void 0,(function*(){if(!t.supportsWorker(e,a))return!1;const r=`${n.paths.workers}worker-v1.js`;try{const e=yield i.loadWorker(r,"VoiceFocusTestWorker",n,a);try{e.terminate()}catch(e){null==a||a.debug("Failed to terminate worker.",e)}return!0}catch(e){return null==a||a.info("Failed to fetch and instantiate test worker",e),!1}}));t.supportsWorker=(e=globalThis,t)=>{try{return!!e.Worker}catch(e){return null==t||t.info("Does not support Worker",e),!1}};t.supportsAudioWorklet=(e=globalThis,t)=>{try{return!!e.AudioWorklet&&!!e.AudioWorkletNode}catch(e){return null==t||t.info("Does not support Audio Worklet",e),!1}};t.supportsWASM=(e=globalThis,t)=>{try{return!(!e.WebAssembly||!e.WebAssembly.compile&&!e.WebAssembly.compileStreaming)}catch(e){return null==t||t.info("Does not support WASM",e),!1}};t.supportsSharedArrayBuffer=(e=globalThis,t=globalThis,n)=>{try{return!(!e.SharedArrayBuffer||!t.chrome&&!e.crossOriginIsolated)}catch(e){return null==n||n.info("Does not support SharedArrayBuffer."),!1}};t.supportsWASMStreaming=(e=globalThis,t)=>{var n;try{return!!(null===(n=e.WebAssembly)||void 0===n?void 0:n.compileStreaming)}catch(e){return null==t||t.info("Does not support WASM streaming compilation",e),!1}};t.isOldChrome=(e=globalThis,t)=>{try{if(!e.chrome)return!1}catch(e){}const n=e.navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9]+)/);return n?parseInt(n[1],10)<90&&(null==t||t.debug(`Chrome ${n[1]} has incomplete SIMD support.`),!0):(null==t||t.debug("Unknown Chrome version."),!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(){return!t&&n.apply(void 0,arguments)})).catch((function(e){return!t&&r(e)}))})),cancel:function(){t=!0}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(0).createContext)(null);t.default=r},function(e,t,n){"use strict";var r=Object.assign;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkSpecKeys=t.checkNavigable=t.changeSlide=t.canUseDOM=t.canGoNext=void 0,t.clamp=l,t.swipeStart=t.swipeMove=t.swipeEnd=t.slidesOnRight=t.slidesOnLeft=t.slideHandler=t.siblingDirection=t.safePreventDefault=t.lazyStartIndex=t.lazySlidesOnRight=t.lazySlidesOnLeft=t.lazyEndIndex=t.keyHandler=t.initializedState=t.getWidth=t.getTrackLeft=t.getTrackCSS=t.getTrackAnimateCSS=t.getTotalSlides=t.getSwipeDirection=t.getSlideCount=t.getRequiredLazySlides=t.getPreClones=t.getPostClones=t.getOnDemandLazySlides=t.getNavigableIndexes=t.getHeight=t.extractObject=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r};function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t,n){return Math.max(t,Math.min(e,n))}var c=function(e){["onTouchStart","onTouchMove","onWheel"].includes(e._reactName)||e.preventDefault()};t.safePreventDefault=c;var u=function(e){for(var t=[],n=d(e),r=h(e),i=n;i<r;i++)e.lazyLoadedList.indexOf(i)<0&&t.push(i);return t};t.getOnDemandLazySlides=u;t.getRequiredLazySlides=function(e){for(var t=[],n=d(e),r=h(e),i=n;i<r;i++)t.push(i);return t};var d=function(e){return e.currentSlide-f(e)};t.lazyStartIndex=d;var h=function(e){return e.currentSlide+p(e)};t.lazyEndIndex=h;var f=function(e){return e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0};t.lazySlidesOnLeft=f;var p=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow};t.lazySlidesOnRight=p;var m=function(e){return e&&e.offsetWidth||0};t.getWidth=m;var g=function(e){return e&&e.offsetHeight||0};t.getHeight=g;var v=function(e){var t,n,r,i,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e.startX-e.curX,n=e.startY-e.curY,r=Math.atan2(n,t),(i=Math.round(180*r/Math.PI))<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":!0===a?i>=35&&i<=135?"up":"down":"vertical"};t.getSwipeDirection=v;var b=function(e){var t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1?t=!1:(e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1)),t};t.canGoNext=b;t.extractObject=function(e,t){var n={};return t.forEach((function(t){return n[t]=e[t]})),n};t.initializedState=function(e){var t,n=i.default.Children.count(e.children),r=e.listRef,a=Math.ceil(m(r)),s=e.trackRef&&e.trackRef.node,l=Math.ceil(m(s));if(e.vertical)t=a;else{var c=e.centerMode&&2*parseInt(e.centerPadding);"string"==typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(c*=a/100),t=Math.ceil((a-c)/e.slidesToShow)}var d=r&&g(r.querySelector('[data-index="0"]')),h=d*e.slidesToShow,f=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(f=n-1-e.initialSlide);var p=e.lazyLoadedList||[],v=u(o(o({},e),{},{currentSlide:f,lazyLoadedList:p})),b={slideCount:n,slideWidth:t,listWidth:a,trackWidth:l,currentSlide:f,slideHeight:d,listHeight:h,lazyLoadedList:p=p.concat(v)};return null===e.autoplaying&&e.autoplay&&(b.autoplaying="playing"),b};t.slideHandler=function(e){var t=e.waitForAnimate,n=e.animating,r=e.fade,i=e.infinite,a=e.index,s=e.slideCount,c=e.lazyLoad,d=e.currentSlide,h=e.centerMode,f=e.slidesToScroll,p=e.slidesToShow,m=e.useCSS,g=e.lazyLoadedList;if(t&&n)return{};var v,y,A,_=a,w={},T={},k=i?a:l(a,0,s-1);if(r){if(!i&&(a<0||a>=s))return{};a<0?_=a+s:a>=s&&(_=a-s),c&&g.indexOf(_)<0&&(g=g.concat(_)),w={animating:!0,currentSlide:_,lazyLoadedList:g,targetSlide:_},T={animating:!1,targetSlide:_}}else v=_,_<0?(v=_+s,i?s%f!=0&&(v=s-s%f):v=0):!b(e)&&_>d?_=v=d:h&&_>=s?(_=i?s:s-1,v=i?0:s-1):_>=s&&(v=_-s,i?s%f!=0&&(v=0):v=s-p),!i&&_+p>=s&&(v=s-p),y=C(o(o({},e),{},{slideIndex:_})),A=C(o(o({},e),{},{slideIndex:v})),i||(y===A&&(_=v),y=A),c&&(g=g.concat(u(o(o({},e),{},{currentSlide:_})))),m?(w={animating:!0,currentSlide:v,trackStyle:S(o(o({},e),{},{left:y})),lazyLoadedList:g,targetSlide:k},T={animating:!1,currentSlide:v,trackStyle:E(o(o({},e),{},{left:A})),swipeLeft:null,targetSlide:k}):w={currentSlide:v,trackStyle:E(o(o({},e),{},{left:A})),lazyLoadedList:g,targetSlide:k};return{state:w,nextState:T}};t.changeSlide=function(e,t){var n,r,i,a,s=e.slidesToScroll,l=e.slidesToShow,c=e.slideCount,u=e.currentSlide,d=e.targetSlide,h=e.lazyLoad,f=e.infinite;if(n=c%s!=0?0:(c-u)%s,"previous"===t.message)a=u-(i=0===n?s:l-n),h&&!f&&(a=-1===(r=u-i)?c-1:r),f||(a=d-s);else if("next"===t.message)a=u+(i=0===n?s:n),h&&!f&&(a=(u+s)%c+n),f||(a=d+s);else if("dots"===t.message)a=t.index*t.slidesToScroll;else if("children"===t.message){if(a=t.index,f){var p=O(o(o({},e),{},{targetSlide:a}));a>t.currentSlide&&"left"===p?a-=c:a<t.currentSlide&&"right"===p&&(a+=c)}}else"index"===t.message&&(a=Number(t.index));return a};t.keyHandler=function(e,t,n){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":37===e.keyCode?n?"next":"previous":39===e.keyCode?n?"previous":"next":""};t.swipeStart=function(e,t,n){return"IMG"===e.target.tagName&&c(e),!t||!n&&-1!==e.type.indexOf("mouse")?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}};t.swipeMove=function(e,t){var n=t.scrolling,r=t.animating,i=t.vertical,a=t.swipeToSlide,s=t.verticalSwiping,l=t.rtl,u=t.currentSlide,d=t.edgeFriction,h=t.edgeDragged,f=t.onEdge,p=t.swiped,m=t.swiping,g=t.slideCount,y=t.slidesToScroll,A=t.infinite,_=t.touchObject,w=t.swipeEvent,S=t.listHeight,T=t.listWidth;if(!n){if(r)return c(e);i&&a&&s&&c(e);var k,x={},O=C(t);_.curX=e.touches?e.touches[0].pageX:e.clientX,_.curY=e.touches?e.touches[0].pageY:e.clientY,_.swipeLength=Math.round(Math.sqrt(Math.pow(_.curX-_.startX,2)));var I=Math.round(Math.sqrt(Math.pow(_.curY-_.startY,2)));if(!s&&!m&&I>10)return{scrolling:!0};s&&(_.swipeLength=I);var M=(l?-1:1)*(_.curX>_.startX?1:-1);s&&(M=_.curY>_.startY?1:-1);var P=Math.ceil(g/y),D=v(t.touchObject,s),N=_.swipeLength;return A||(0===u&&("right"===D||"down"===D)||u+1>=P&&("left"===D||"up"===D)||!b(t)&&("left"===D||"up"===D))&&(N=_.swipeLength*d,!1===h&&f&&(f(D),x.edgeDragged=!0)),!p&&w&&(w(D),x.swiped=!0),k=i?O+N*(S/T)*M:l?O-N*M:O+N*M,s&&(k=O+N*M),x=o(o({},x),{},{touchObject:_,swipeLeft:k,trackStyle:E(o(o({},t),{},{left:k}))}),Math.abs(_.curX-_.startX)<.8*Math.abs(_.curY-_.startY)?x:(_.swipeLength>10&&(x.swiping=!0,c(e)),x)}};t.swipeEnd=function(e,t){var n=t.dragging,r=t.swipe,i=t.touchObject,a=t.listWidth,s=t.touchThreshold,l=t.verticalSwiping,u=t.listHeight,d=t.swipeToSlide,h=t.scrolling,f=t.onSwipe,p=t.targetSlide,m=t.currentSlide,g=t.infinite;if(!n)return r&&c(e),{};var b=l?u/s:a/s,y=v(i,l),w={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(h)return w;if(!i.swipeLength)return w;if(i.swipeLength>b){var E,T;c(e),f&&f(y);var k=g?m:p;switch(y){case"left":case"up":T=k+_(t),E=d?A(t,T):T,w.currentDirection=0;break;case"right":case"down":T=k-_(t),E=d?A(t,T):T,w.currentDirection=1;break;default:E=k}w.triggerSlideHandler=E}else{var x=C(t);w.trackStyle=S(o(o({},t),{},{left:x}))}return w};var y=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,n=e.infinite?-1*e.slidesToShow:0,r=e.infinite?-1*e.slidesToShow:0,i=[];n<t;)i.push(n),n=r+e.slidesToScroll,r+=Math.min(e.slidesToScroll,e.slidesToShow);return i};t.getNavigableIndexes=y;var A=function(e,t){var n=y(e),r=0;if(t>n[n.length-1])t=n[n.length-1];else for(var i in n){if(t<n[i]){t=r;break}r=n[i]}return t};t.checkNavigable=A;var _=function(e){var t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){var n,r=e.listRef,i=r.querySelectorAll&&r.querySelectorAll(".slick-slide")||[];if(Array.from(i).every((function(r){if(e.vertical){if(r.offsetTop+g(r)/2>-1*e.swipeLeft)return n=r,!1}else if(r.offsetLeft-t+m(r)/2>-1*e.swipeLeft)return n=r,!1;return!0})),!n)return 0;var a=!0===e.rtl?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-a)||1}return e.slidesToScroll};t.getSlideCount=_;var w=function(e,t){return t.reduce((function(t,n){return t&&e.hasOwnProperty(n)}),!0)?null:console.error("Keys Missing:",e)};t.checkSpecKeys=w;var E=function(e){var t,n;w(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var r=e.slideCount+2*e.slidesToShow;e.vertical?n=r*e.slideHeight:t=x(e)*e.slideWidth;var i={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",s=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";i=o(o({},i),{},{WebkitTransform:a,transform:s,msTransform:l})}else e.vertical?i.top=e.left:i.left=e.left;return e.fade&&(i={opacity:1}),t&&(i.width=t),n&&(i.height=n),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?i.marginTop=e.left+"px":i.marginLeft=e.left+"px"),i};t.getTrackCSS=E;var S=function(e){w(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=E(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t};t.getTrackAnimateCSS=S;var C=function(e){if(e.unslick)return 0;w(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t,n,r=e.slideIndex,i=e.trackRef,a=e.infinite,o=e.centerMode,s=e.slideCount,l=e.slidesToShow,c=e.slidesToScroll,u=e.slideWidth,d=e.listWidth,h=e.variableWidth,f=e.slideHeight,p=e.fade,m=e.vertical;if(p||1===e.slideCount)return 0;var g=0;if(a?(g=-T(e),s%c!=0&&r+c>s&&(g=-(r>s?l-(r-s):s%c)),o&&(g+=parseInt(l/2))):(s%c!=0&&r+c>s&&(g=l-s%c),o&&(g=parseInt(l/2))),t=m?r*f*-1+g*f:r*u*-1+g*u,!0===h){var v,b=i&&i.node;if(v=r+T(e),t=(n=b&&b.childNodes[v])?-1*n.offsetLeft:0,!0===o){v=a?r+T(e):r,n=b&&b.children[v],t=0;for(var y=0;y<v;y++)t-=b&&b.children[y]&&b.children[y].offsetWidth;t-=parseInt(e.centerPadding),t+=n&&(d-n.offsetWidth)/2}}return t};t.getTrackLeft=C;var T=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0)};t.getPreClones=T;var k=function(e){return e.unslick||!e.infinite?0:e.slideCount};t.getPostClones=k;var x=function(e){return 1===e.slideCount?1:T(e)+e.slideCount+k(e)};t.getTotalSlides=x;var O=function(e){return e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+I(e)?"left":"right":e.targetSlide<e.currentSlide-M(e)?"right":"left"};t.siblingDirection=O;var I=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var a=(t-1)/2+1;return parseInt(i)>0&&(a+=1),r&&t%2==0&&(a+=1),a}return r?0:t-1};t.slidesOnRight=I;var M=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var a=(t-1)/2+1;return parseInt(i)>0&&(a+=1),r||t%2!=0||(a+=1),a}return r?t-1:0};t.slidesOnLeft=M;t.canUseDOM=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},function(e,t,n){"use strict";var r=n(141),i=n(265),a=n(945),o=n(955),s=o(),l=n(1730),c=i(s);r(c,{getPolyfill:o,implementation:a,shim:l}),e.exports=c},function(e,t,n){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=t.contains=t.root=t.parseHTML=t.text=t.xml=t.html=void 0;var r=n(216),i=r.__importStar(n(530)),a=n(966),o=n(275),s=n(990),l=n(997);function c(e,t,n){var r,i=t?"string"==typeof t?a.select(t,null!==(r=null==e?void 0:e._root)&&void 0!==r?r:[],n):t:null==e?void 0:e._root.children;return i?n.xmlMode||n._useHtmlParser2?l.render(i,n):s.render(i):""}function u(e){if(Array.isArray(e))return!0;if("object"!=typeof e||!Object.prototype.hasOwnProperty.call(e,"length")||"number"!=typeof e.length||e.length<0)return!1;for(var t=0;t<e.length;t++)if(!(t in e))return!1;return!0}t.html=function(e,t){return!t&&function(e){return!("object"!=typeof e||null==e||"length"in e||"type"in e)}(e)&&(t=e,e=void 0),c(this||void 0,e,r.__assign(r.__assign(r.__assign({},i.default),this?this._options:{}),i.flatten(null!=t?t:{})))},t.xml=function(e){return c(this,e,r.__assign(r.__assign({},this._options),{xmlMode:!0}))},t.text=function e(t){for(var n=t||(this?this.root():[]),r="",i=0;i<n.length;i++){var a=n[i];o.DomUtils.isText(a)?r+=a.data:o.DomUtils.hasChildren(a)&&a.type!==o.ElementType.Comment&&a.type!==o.ElementType.Script&&a.type!==o.ElementType.Style&&(r+=e(a.children))}return r},t.parseHTML=function(e,t,n){if(void 0===n&&(n="boolean"==typeof t&&t),!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t);var r=this.load(e,i.default,!1);return n||r("script").remove(),r.root()[0].children.slice()},t.root=function(){return this(this._root)},t.contains=function(e,t){if(t===e)return!1;for(var n=t;n&&n!==n.parent;)if((n=n.parent)===e)return!0;return!1},t.merge=function(e,t){if(u(e)&&u(t)){for(var n=e.length,r=+t.length,i=0;i<r;i++)e[n++]=t[i];return e.length=n,e}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.propsOfNode=f,t.childrenOfNode=p,t.hasClassName=function(e,t){var n=f(e).className||"";return n=String(n).replace(/\s/g," "),(0,c.default)(t)?t.test(n):(" "+String(n)+" ").indexOf(" "+String(t)+" ")>-1},t.treeForEach=m,t.treeFilter=g,t.findParentNode=function(e,t){return g(e,(function(e){return!!e.rendered&&-1!==p(e).indexOf(t)}))[0]||null},t.pathToNode=b,t.parentsOfNode=function(e,t){return(b(e,t)||[]).reverse()},t.nodeHasId=function(e,t){return f(e).id===t},t.nodeMatchesObjectProps=function(e,t){return(0,s.default)(f(e),(n=t,(0,o.default)(n).reduce((function(e,t){var n=r(t,2),a=n[0],o=n[1];return(0,i.default)({},e,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},a,function(e){return void 0!==e?e:y}(o)))}),{})));var n},t.getTextFromNode=function e(t){return _(t,{recurse:e,getCustom:function(e){var t=e.type;return"<"+String(t.displayName||(0,l.default)(t))+" />"}})},t.getTextFromHostNodes=function e(t,n){return _(t,{recurse:function(){function t(t){return e(t,n)}return t}(),handleHostNodes:function(e){return[].concat(n.nodeToHostNode(e,!0)).map(A).join("")}})},t.getHTMLFromHostNodes=function e(t,n){return _(t,{recurse:function(){function t(t){return e(t,n)}return t}(),handleHostNodes:function(e){return[].concat(n.nodeToHostNode(e,!0)).map(w).join("")},nullRenderReturnsNull:!0})};var i=d(n(273)),a=d(n(317)),o=d(n(957)),s=d(n(1783)),l=d(n(529)),c=d(n(459)),u=d(n(242));function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function f(e){return e&&e.props||{}}function p(e){if(!e)return[];var t=(0,u.default)(),n=t.isFragment&&"function"==typeof t.isFragment,r=Array.isArray(e.rendered)?(0,a.default)(e.rendered,1):[e.rendered];return n?(0,a.default)(r.map((function(e){return t.isFragment(e)?p(e):e})),1):r}function m(e,t){e&&t(e),p(e).forEach((function(e){return m(e,t)}))}function g(e,t){var n=[];return m(e,(function(e){t(e)&&n.push(e)})),n}function v(e,t){return e.filter((function(e){return 0!==g(e,t).length}))}function b(e,t){for(var n=[t],r=[],i=function(t){return e===t};n.length;){var a=n.pop(),o=p(a);if(a===e)return v(r,i);r.push(a),0===o.length&&r.pop(),n.push.apply(n,h(o))}return null}var y={};function A(e){return"string"==typeof e?String(e||""):e&&e.textContent||""}function _(e,t){var n=t.getCustom,r=t.handleHostNodes,i=t.recurse,a=t.nullRenderReturnsNull,o=void 0!==a&&a;return null==e?"":"string"==typeof e||"number"==typeof e?String(e):n&&e.type&&"function"==typeof e.type?n(e):r&&"host"===e.nodeType?r(e):null==e.rendered&&o?null:p(e).map(i).join("")}function w(e){return null==e?null:e.outerHTML.replace(/\sdata-(reactid|reactroot)+="([^"]*)+"/g,"")}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(38),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e),o=Object(r.a)(t);return isNaN(o)?new Date(NaN):o?(n.setDate(n.getDate()+o),n):n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(38),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e),o=Object(r.a)(t);if(isNaN(o))return new Date(NaN);if(!o)return n;var s=n.getDate(),l=new Date(n.getTime());l.setMonth(n.getMonth()+o+1,0);var c=l.getDate();return s>=c?l:(n.setFullYear(l.getFullYear(),l.getMonth(),s),n)}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,c=s||l||Function("return this")(),u=Object.prototype.toString,d=Math.max,h=Math.min,f=function(){return c.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||a.test(e)?o(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,a,o,s,l,c=0,u=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,a=i;return r=i=void 0,c=t,o=e.apply(a,n)}function y(e){return c=e,s=setTimeout(_,t),u?b(e):o}function A(e){var n=e-l;return void 0===l||n>=t||n<0||g&&e-c>=a}function _(){var e=f();if(A(e))return w(e);s=setTimeout(_,function(e){var n=t-(e-l);return g?h(n,a-(e-c)):n}(e))}function w(e){return s=void 0,v&&r?b(e):(r=i=void 0,o)}function E(){var e=f(),n=A(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return y(l);if(g)return s=setTimeout(_,t),b(l)}return void 0===s&&(s=setTimeout(_,t)),o}return t=m(t)||0,p(n)&&(u=!!n.leading,a=(g="maxWait"in n)?d(m(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},E.flush=function(){return void 0===s?o:w(f())},E}}).call(this,n(68))},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(i(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var o=0;o<n.length;o++)if(!r.call(t,n[o])||!i(e[n[o]],t[n[o]]))return!1;return!0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(){return Object(r.useState)(null)}},function(e,t,n){"use strict";function r(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(173),i=n(0),a=function(e){var t;return"undefined"==typeof document?null:null==e?Object(r.a)().body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),null!=(t=e)&&t.nodeType&&e||null)};function o(e,t){var n=Object(i.useState)((function(){return a(e)})),r=n[0],o=n[1];if(!r){var s=a(e);s&&o(s)}return Object(i.useEffect)((function(){t&&r&&t(r)}),[t,r]),Object(i.useEffect)((function(){var t=a(e);t!==r&&o(t)}),[e,r]),r}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",maskSpinner:"maskSpinner--2xeIK",spinContent:"spinContent--2khKM",loadingAnimationIcon:"loadingAnimationIcon--2smuF","anim-rotate":"anim-rotate--2Amt4",txtcolor:"txtcolor--7EvwC"}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(1415));t.Range=i.default;var a=n(911);t.getTrackBackground=a.getTrackBackground,t.useThumbOverlap=a.useThumbOverlap,t.relativeValue=a.relativeValue;var o=n(509);t.Direction=o.Direction},function(e,t,n){var r=n(1656),i=n(1657),a=n(1658),o=n(1660);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=n(0),a=c(i),o=c(n(6)),s=c(n(1661)),l=c(n(1662));function c(e){return e&&e.__esModule?e:{default:e}}var u={overflow:"hidden",position:"relative"};function d(e,t){return"\n    .react-stars-"+t+":before {\n      position: absolute;\n      overflow: hidden;\n      display: block;\n      z-index: 1;\n      top: 0; left: 0;\n      width: 50%;\n      content: attr(data-forhalf);\n      color: "+e+";\n  }"}function h(e){var t,n=(0,i.useState)(""),o=r(n,2),c=o[0],h=o[1],f=(0,i.useState)(0),p=r(f,2),m=p[0],g=p[1],v=(0,i.useState)([]),b=r(v,2),y=b[0],A=b[1],_=(0,i.useState)(!1),w=r(_,2),E=w[0],S=w[1],C=(0,s.default)(e),T=r(C,2),k=T[0],x=T[1],O=(0,i.useState)(0),I=r(O,2),M=I[0],P=I[1],D=(0,i.useState)(!1),N=r(D,2),L=N[0],R=N[1],B=(0,i.useState)(""),j=r(B,2),F=j[0],U=j[1];function H(e){void 0===e&&(e=k.isHalf?Math.floor(m):Math.round(m));for(var t=[],n=0;n<k.count;n++)t.push({active:n<=e-1});return t}function z(e){if(k.edit){var t=Number(e.currentTarget.getAttribute("data-index"));if(k.isHalf){var n=V(e);R(n),n&&(t+=1),P(t)}else t+=1;!function(e){var t=y.filter((function(e){return e.active}));e!==t.length&&A(H(e))}(t)}}function V(e){var t=e.target.getBoundingClientRect(),n=e.clientX-t.left;return(n=Math.round(Math.abs(n)))>t.width/2}function W(){k.edit&&(G(m),A(H()))}function G(e){k.isHalf&&(R(function(e){return e%1==0}(e)),P(Math.floor(e)))}function q(e){if(k.edit){var t=Number(e.currentTarget.getAttribute("data-index")),n=void 0;if(k.isHalf){var r=V(e);R(r),r&&(t+=1),n=r?t:t+.5,P(t)}else n=t+=1;Y(n)}}function Y(t){t!==m&&(A(H(t)),g(t),e.onChange(t))}return(0,i.useEffect)((function(){var t,n;U(e.classNames+" react-stars"),t=e.value,n=e.count,g(t<0||t>n?0:t),A(H(e.value)),x(e),h((Math.random()+"").replace(".","")),S(function(e){return!e.isHalf&&e.emptyIcon&&e.filledIcon||e.isHalf&&e.emptyIcon&&e.halfIcon&&e.filledIcon}(e)),P(Math.floor(e.value)),R(e.isHalf&&e.value%1<.5)}),[]),a.default.createElement("div",{className:"react-stars-wrapper-"+c,style:{display:"flex"}},a.default.createElement("div",{tabIndex:k.a11y&&k.edit?0:null,"aria-label":"add rating by typing an integer from 0 to 5 or pressing arrow keys",onKeyDown:function(e){if(k.a11y||k.edit){var t=e.key,n=m,r=Number(t);r?Number.isInteger(r)&&r>0&&r<=k.count&&(n=r):("ArrowUp"===t||"ArrowRight"===t)&&n<k.count?(e.preventDefault(),n+=k.isHalf?.5:1):("ArrowDown"===t||"ArrowLeft"===t)&&n>.5&&(e.preventDefault(),n-=k.isHalf?.5:1),G(n),Y(n)}},className:F,style:u},k.isHalf&&a.default.createElement("style",{dangerouslySetInnerHTML:{__html:E?(t=k.activeColor,"\n          span.react-stars-half > * {\n          color: "+t+";\n      }"):d(k.activeColor,c)}}),y.map((function(e,t){return a.default.createElement(l.default,{key:t,index:t,active:e.active,config:k,onMouseOver:z,onMouseLeave:W,onClick:q,halfStarHidden:L,halfStarAt:M,isUsingIcons:E,uniqueness:c})})),a.default.createElement("p",{style:{position:"absolute",left:"-200rem"},role:"status"},m)))}h.propTypes={classNames:o.default.string,edit:o.default.bool,half:o.default.bool,value:o.default.number,count:o.default.number,char:o.default.string,size:o.default.number,color:o.default.string,activeColor:o.default.string,emptyIcon:o.default.element,halfIcon:o.default.element,filledIcon:o.default.element,a11y:o.default.bool},h.defaultProps={edit:!0,half:!1,value:0,count:5,char:"★",size:15,color:"gray",activeColor:"#ffd700",a11y:!0,onChange:function(){}},t.default=h},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",leftBarContent:"leftBarContent--TGxU_",firstAreaUpperWrapper:"firstAreaUpperWrapper--euNqy",instructionText:"instructionText--1kYuO"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Be})),n.d(t,"b",(function(){return je}));var r=n(0),i=n(167),a="dnd-core/INIT_COORDS",o="dnd-core/BEGIN_DRAG",s="dnd-core/PUBLISH_DRAG_SOURCE",l="dnd-core/HOVER",c="dnd-core/DROP",u="dnd-core/END_DRAG",d=function(e,t){return e===t};function h(e,t){return!e&&!t||!(!e||!t)&&(e.x===t.x&&e.y===t.y)}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case a:case o:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case l:return h(e.clientOffset,n.clientOffset)?e:m(m({},e),{},{clientOffset:n.clientOffset});case u:case c:return v;default:return e}}var y="dnd-core/ADD_SOURCE",A="dnd-core/ADD_TARGET",_="dnd-core/REMOVE_SOURCE",w="dnd-core/REMOVE_TARGET";function E(e){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)}function S(e,t,n){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:n||null}),e)}function C(e,t){return e.filter((function(e){return e!==t}))}function T(e){return"object"===E(e)}function k(e,t){var n=new Map,r=function(e){n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var i=[];return n.forEach((function(e,t){1===e&&i.push(t)})),i}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case o:return O(O({},e),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case s:return O(O({},e),{},{isSourcePublic:!0});case l:return O(O({},e),{},{targetIds:n.targetIds});case w:return-1===e.targetIds.indexOf(n.targetId)?e:O(O({},e),{},{targetIds:C(e.targetIds,n.targetId)});case c:return O(O({},e),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case u:return O(O({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case y:case A:return e+1;case _:case w:return e-1;default:return e}}var N=[],L=[];function R(e,t){return e!==N&&(e===L||void 0===t||(n=e,t.filter((function(e){return n.indexOf(e)>-1}))).length>0);var n}function B(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case l:break;case y:case A:case w:case _:return N;case o:case s:case u:case c:default:return L}var t=e.payload,n=t.targetIds,r=void 0===n?[]:n,i=t.prevTargetIds,a=void 0===i?[]:i,d=k(r,a),h=d.length>0||!f(r,a);if(!h)return N;var p=a[a.length-1],m=r[r.length-1];return p!==m&&(p&&d.push(p),m&&d.push(m)),d}function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:B(e.dirtyHandlerIds,{type:t.type,payload:U(U({},t.payload),{},{prevTargetIds:S(e,"dragOperation.targetIds",[])})}),dragOffset:b(e.dragOffset,t),refCount:D(e.refCount,t),dragOperation:P(e.dragOperation,t),stateId:j(e.stateId)}}N.__IS_NONE__=!0,L.__IS_ALL__=!0;var V=n(62);function W(e,t){return{type:a,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var G={type:a,payload:{clientOffset:null,sourceClientOffset:null}};function q(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},r=n.publishSource,i=void 0===r||r,a=n.clientOffset,s=n.getSourceClientOffset,l=e.getMonitor(),c=e.getRegistry();e.dispatch(W(a)),Y(t,l,c);var u=Q(t,l);if(null!==u){var d=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");K(s),d=s(u)}e.dispatch(W(a,d));var h=c.getSource(u),f=h.beginDrag(l,u);X(f),c.pinSource(u);var p=c.getSourceType(u);return{type:o,payload:{itemType:p,item:f,sourceId:u,clientOffset:a||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}e.dispatch(G)}}function Y(e,t,n){Object(V.a)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Object(V.a)(n.getSource(e),"Expected sourceIds to be registered.")}))}function K(e){Object(V.a)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function X(e){Object(V.a)(T(e),"Item must be an object.")}function Q(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function $(e){return function(){if(e.getMonitor().isDragging())return{type:s}}}function J(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function Z(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.clientOffset;ee(t);var i=t.slice(0),a=e.getMonitor(),o=e.getRegistry();te(i,a,o);var s=a.getItemType();return ne(i,o,s),re(i,a,o),{type:l,payload:{targetIds:i,clientOffset:r||null}}}}function ee(e){Object(V.a)(Array.isArray(e),"Expected targetIds to be an array.")}function te(e,t,n){Object(V.a)(t.isDragging(),"Cannot call hover while not dragging."),Object(V.a)(!t.didDrop(),"Cannot call hover after drop.");for(var r=0;r<e.length;r++){var i=e[r];Object(V.a)(e.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var a=n.getTarget(i);Object(V.a)(a,"Expected targetIds to be registered.")}}function ne(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r];J(t.getTargetType(i),n)||e.splice(r,1)}}function re(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();le(n);var i=ue(n);i.forEach((function(i,a){var o=ce(i,a,r,n),s={type:c,payload:{dropResult:ae(ae({},t),o)}};e.dispatch(s)}))}}function le(e){Object(V.a)(e.isDragging(),"Cannot call drop while not dragging."),Object(V.a)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function ce(e,t,n,r){var i=n.getTarget(e),a=i?i.drop(r,e):void 0;return function(e){Object(V.a)(void 0===e||T(e),"Drop result must either be an object or undefined.")}(a),void 0===a&&(a=0===t?{}:r.getDropResult()),a}function ue(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function de(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){Object(V.a)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var r=t.getSourceId();null!=r&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource());return{type:u}}}function he(e,t){return{x:e.x-t.x,y:e.y-t.y}}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pe,me=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t,this.registry=n}var t,n,r;return t=e,(n=[{key:"subscribeToStateChange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},r=n.handlerIds;Object(V.a)("function"==typeof e,"listener must be a function."),Object(V.a)(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,a=function(){var n=t.store.getState(),a=n.stateId;try{a===i||a===i+1&&!R(n.dirtyHandlerIds,r)||e()}finally{i=a}};return this.store.subscribe(a)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;Object(V.a)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return Object(V.a)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return Object(V.a)(t,"Expected to find a valid target."),!(!this.isDragging()||this.didDrop())&&J(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return Object(V.a)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!J(r,i))return!1;var a=this.getTargetIds();if(!a.length)return!1;var o=a.indexOf(e);return n?o===a.length-1:o>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,r=e.clientOffset,i=e.initialClientOffset,a=e.initialSourceClientOffset,r&&i&&a?he((n=a,{x:(t=r).x+n.x,y:t.y+n.y}),i):null;var e,t,n,r,i,a}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,n=e.initialClientOffset,t&&n?he(t,n):null;var e,t,n}}])&&fe(t.prototype,n),r&&fe(t,r),e}(),ge=0;function ve(e){return(ve="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)}function be(e,t){t&&Array.isArray(e)?e.forEach((function(e){return be(e,!1)})):Object(V.a)("string"==typeof e||"symbol"===ve(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(pe||(pe={}));var ye=n(570),Ae=[],_e=[],we=ye.a.makeRequestCallFromTimer((function(){if(_e.length)throw _e.shift()}));function Ee(e){var t;(t=Ae.length?Ae.pop():new Se).task=e,Object(ye.a)(t)}var Se=function(){function e(){}return e.prototype.call=function(){try{this.task.call()}catch(e){Ee.onerror?Ee.onerror(e):(_e.push(e),we())}finally{this.task=null,Ae[Ae.length]=this}},e}();function Ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ke(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e){var t=(ge++).toString();switch(e){case pe.SOURCE:return"S".concat(t);case pe.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function Oe(e){switch(e[0]){case"S":return pe.SOURCE;case"T":return pe.TARGET;default:Object(V.a)(!1,"Cannot parse handler ID: ".concat(e))}}function Ie(e,t){var n=e.entries(),r=!1;do{var i=n.next(),a=i.done;if(Te(i.value,2)[1]===t)return!0;r=!!a}while(!r);return!1}var Me=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}var t,n,r;return t=e,(n=[{key:"addSource",value:function(e,t){be(e),function(e){Object(V.a)("function"==typeof e.canDrag,"Expected canDrag to be a function."),Object(V.a)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Object(V.a)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);var n=this.addHandler(pe.SOURCE,e,t);return this.store.dispatch(function(e){return{type:y,payload:{sourceId:e}}}(n)),n}},{key:"addTarget",value:function(e,t){be(e,!0),function(e){Object(V.a)("function"==typeof e.canDrop,"Expected canDrop to be a function."),Object(V.a)("function"==typeof e.hover,"Expected hover to be a function."),Object(V.a)("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);var n=this.addHandler(pe.TARGET,e,t);return this.store.dispatch(function(e){return{type:A,payload:{targetId:e}}}(n)),n}},{key:"containsHandler",value:function(e){return Ie(this.dragSources,e)||Ie(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Object(V.a)(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,r=n?this.pinnedSource:this.dragSources.get(e);return r}},{key:"getTarget",value:function(e){return Object(V.a)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return Object(V.a)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return Object(V.a)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Oe(e)===pe.SOURCE}},{key:"isTargetId",value:function(e){return Oe(e)===pe.TARGET}},{key:"removeSource",value:function(e){var t=this;Object(V.a)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:_,payload:{sourceId:e}}}(e)),Ee((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){Object(V.a)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:w,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);Object(V.a)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){Object(V.a)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,n){var r=xe(e);return this.types.set(r,t),e===pe.SOURCE?this.dragSources.set(r,n):e===pe.TARGET&&this.dropTargets.set(r,n),r}}])&&Ce(t.prototype,n),r&&Ce(t,r),e}();function Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ne(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Object(i.e)(z,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var Le=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Pe(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var e=t.store.getState().refCount>0;t.backend&&(e&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!e&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var r=Ne(n);this.store=r,this.monitor=new me(r,new Me(r)),r.subscribe(this.handleRefCountChange)}var t,n,r;return t=e,(n=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,n=function(e){return{beginDrag:q(e),publishDragSource:$(e),hover:Z(e),drop:se(e),endDrag:de(e)}}(this);return Object.keys(n).reduce((function(r,i){var a,o=n[i];return r[i]=(a=o,function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=a.apply(e,r);void 0!==o&&t(o)}),r}),{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}])&&De(t.prototype,n),r&&De(t,r),e}();function Re(e,t,n,r){var i=new Le(r),a=e(i,t,n);return i.receiveBackend(a),i}var Be=r.createContext({dragDropManager:void 0});function je(e,t,n,r){return{dragDropManager:Re(e,t,n,r)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return D})),n.d(t,"a",(function(){return _}));var r=n(144),i=n.n(r),a=function(e,t){var n=i()({},e,t);for(var r in e){var a;e[r]&&"object"==typeof t[r]&&i()(n,((a={})[r]=i()(e[r],t[r]),a))}return n},o={breakpoints:[40,52,64].map((function(e){return e+"em"}))},s=function(e){return"@media screen and (min-width: "+e+")"},l=function(e,t){return c(t,e,e)},c=function(e,t,n,r,i){for(t=t&&t.split?t.split("."):[t],r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e},u=function e(t){var n={},r=function(e){var r,l,u={},f=!1,p=e.theme&&e.theme.disableStyledSystemCache;for(var m in e)if(t[m]){var g=t[m],v=e[m],b=c(e.theme,g.scale,g.defaults);if("object"!=typeof v)i()(u,g(v,b,e));else{if(n.breakpoints=!p&&n.breakpoints||c(e.theme,"breakpoints",o.breakpoints),Array.isArray(v)){n.media=!p&&n.media||[null].concat(n.breakpoints.map(s)),u=a(u,d(n.media,g,b,v,e));continue}null!==v&&(u=a(u,h(n.breakpoints,g,b,v,e)),f=!0)}}return f&&(r=u,l={},Object.keys(r).sort((function(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})})).forEach((function(e){l[e]=r[e]})),u=l),u};r.config=t,r.propNames=Object.keys(t),r.cache=n;var l=Object.keys(t).filter((function(e){return"config"!==e}));return l.length>1&&l.forEach((function(n){var i;r[n]=e(((i={})[n]=t[n],i))})),r},d=function(e,t,n,r,a){var o={};return r.slice(0,e.length).forEach((function(r,s){var l,c=e[s],u=t(r,n,a);c?i()(o,((l={})[c]=i()({},o[c],u),l)):i()(o,u)})),o},h=function(e,t,n,r,a){var o={};for(var l in r){var c=e[l],u=t(r[l],n,a);if(c){var d,h=s(c);i()(o,((d={})[h]=i()({},o[h],u),d))}else i()(o,u)}return o},f=function(e){var t=e.properties,n=e.property,r=e.scale,i=e.transform,a=void 0===i?l:i,o=e.defaultScale;t=t||[n];var s=function(e,n,r){var i={},o=a(e,n,r);if(null!==o)return t.forEach((function(e){i[e]=o})),i};return s.scale=r,s.defaults=o,s},p=function(e){void 0===e&&(e={});var t={};return Object.keys(e).forEach((function(n){var r=e[n];t[n]=!0!==r?"function"!=typeof r?f(r):r:f({property:n,scale:n})})),u(t)},m=p({width:{property:"width",scale:"sizes",transform:function(e,t){return c(t,e,!function(e){return"number"==typeof e&&!isNaN(e)}(e)||e>1?e:100*e+"%")}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0}),g={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},opacity:!0};g.bg=g.backgroundColor;var v=p(g),b=p({fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes",defaultScale:[12,14,16,20,24,32,48,64,72]},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0}),y=p({alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0,flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0}),A={space:[0,4,8,16,32,64,128,256,512]},_=p({gridGap:{property:"gridGap",scale:"space",defaultScale:A.space},gridColumnGap:{property:"gridColumnGap",scale:"space",defaultScale:A.space},gridRowGap:{property:"gridRowGap",scale:"space",defaultScale:A.space},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0}),w=_,E={border:{property:"border",scale:"borders"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders"},borderBottom:{property:"borderBottom",scale:"borders"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders"},borderX:{properties:["borderLeft","borderRight"],scale:"borders"},borderY:{properties:["borderTop","borderBottom"],scale:"borders"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"}};E.borderTopLeftRadius={property:"borderTopLeftRadius",scale:"radii"},E.borderTopRightRadius={property:"borderTopRightRadius",scale:"radii"},E.borderBottomWidth={property:"borderBottomWidth",scale:"borderWidths"},E.borderBottomColor={property:"borderBottomColor",scale:"colors"},E.borderBottomStyle={property:"borderBottomStyle",scale:"borderStyles"},E.borderBottomLeftRadius={property:"borderBottomLeftRadius",scale:"radii"},E.borderBottomRightRadius={property:"borderBottomRightRadius",scale:"radii"},E.borderLeftWidth={property:"borderLeftWidth",scale:"borderWidths"},E.borderLeftColor={property:"borderLeftColor",scale:"colors"},E.borderLeftStyle={property:"borderLeftStyle",scale:"borderStyles"},E.borderRightWidth={property:"borderRightWidth",scale:"borderWidths"},E.borderRightColor={property:"borderRightColor",scale:"colors"},E.borderRightStyle={property:"borderRightStyle",scale:"borderStyles"};var S=p(E),C={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};C.bgImage=C.backgroundImage,C.bgSize=C.backgroundSize,C.bgPosition=C.backgroundPosition,C.bgRepeat=C.backgroundRepeat;var T=p(C),k={space:[0,4,8,16,32,64,128,256,512]},x=p({position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",defaultScale:k.space},right:{property:"right",scale:"space",defaultScale:k.space},bottom:{property:"bottom",scale:"space",defaultScale:k.space},left:{property:"left",scale:"space",defaultScale:k.space}}),O={space:[0,4,8,16,32,64,128,256,512]},I=function(e){return"number"==typeof e&&!isNaN(e)},M=function(e,t){if(!I(e))return c(t,e,e);var n=e<0,r=Math.abs(e),i=c(t,r,r);return I(i)?i*(n?-1:1):n?"-"+i:i},P={};P.margin={margin:{property:"margin",scale:"space",transform:M,defaultScale:O.space},marginTop:{property:"marginTop",scale:"space",transform:M,defaultScale:O.space},marginRight:{property:"marginRight",scale:"space",transform:M,defaultScale:O.space},marginBottom:{property:"marginBottom",scale:"space",transform:M,defaultScale:O.space},marginLeft:{property:"marginLeft",scale:"space",transform:M,defaultScale:O.space},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:M,defaultScale:O.space},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:M,defaultScale:O.space}},P.margin.m=P.margin.margin,P.margin.mt=P.margin.marginTop,P.margin.mr=P.margin.marginRight,P.margin.mb=P.margin.marginBottom,P.margin.ml=P.margin.marginLeft,P.margin.mx=P.margin.marginX,P.margin.my=P.margin.marginY,P.padding={padding:{property:"padding",scale:"space",defaultScale:O.space},paddingTop:{property:"paddingTop",scale:"space",defaultScale:O.space},paddingRight:{property:"paddingRight",scale:"space",defaultScale:O.space},paddingBottom:{property:"paddingBottom",scale:"space",defaultScale:O.space},paddingLeft:{property:"paddingLeft",scale:"space",defaultScale:O.space},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",defaultScale:O.space},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",defaultScale:O.space}},P.padding.p=P.padding.padding,P.padding.pt=P.padding.paddingTop,P.padding.pr=P.padding.paddingRight,P.padding.pb=P.padding.paddingBottom,P.padding.pl=P.padding.paddingLeft,P.padding.px=P.padding.paddingX,P.padding.py=P.padding.paddingY;var D=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){t&&t.config&&i()(e,t.config)}));var a=u(e);return a}(p(P.margin),p(P.padding));p({boxShadow:{property:"boxShadow",scale:"shadows"},textShadow:{property:"textShadow",scale:"shadows"}});function N(){return(N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var L=function(e,t,n,r,i){for(t=t&&t.split?t.split("."):[t],r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e},R=[40,52,64].map((function(e){return e+"em"})),B={space:[0,4,8,16,32,64,128,256,512],fontSizes:[12,14,16,20,24,32,48,64,72]},j={bg:"backgroundColor",m:"margin",mt:"marginTop",mr:"marginRight",mb:"marginBottom",ml:"marginLeft",mx:"marginX",my:"marginY",p:"padding",pt:"paddingTop",pr:"paddingRight",pb:"paddingBottom",pl:"paddingLeft",px:"paddingX",py:"paddingY"},F={marginX:["marginLeft","marginRight"],marginY:["marginTop","marginBottom"],paddingX:["paddingLeft","paddingRight"],paddingY:["paddingTop","paddingBottom"],size:["width","height"]},U={color:"colors",backgroundColor:"colors",borderColor:"colors",margin:"space",marginTop:"space",marginRight:"space",marginBottom:"space",marginLeft:"space",marginX:"space",marginY:"space",padding:"space",paddingTop:"space",paddingRight:"space",paddingBottom:"space",paddingLeft:"space",paddingX:"space",paddingY:"space",top:"space",right:"space",bottom:"space",left:"space",gridGap:"space",gridColumnGap:"space",gridRowGap:"space",gap:"space",columnGap:"space",rowGap:"space",fontFamily:"fonts",fontSize:"fontSizes",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",border:"borders",borderTop:"borders",borderRight:"borders",borderBottom:"borders",borderLeft:"borders",borderWidth:"borderWidths",borderStyle:"borderStyles",borderRadius:"radii",borderTopRightRadius:"radii",borderTopLeftRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",borderTopWidth:"borderWidths",borderTopColor:"colors",borderTopStyle:"borderStyles",borderBottomWidth:"borderWidths",borderBottomColor:"colors",borderBottomStyle:"borderStyles",borderLeftWidth:"borderWidths",borderLeftColor:"colors",borderLeftStyle:"borderStyles",borderRightWidth:"borderWidths",borderRightColor:"colors",borderRightStyle:"borderStyles",outlineColor:"colors",boxShadow:"shadows",textShadow:"shadows",zIndex:"zIndices",width:"sizes",minWidth:"sizes",maxWidth:"sizes",height:"sizes",minHeight:"sizes",maxHeight:"sizes",flexBasis:"sizes",size:"sizes",fill:"colors",stroke:"colors"},H=function(e,t){if("number"!=typeof t||t>=0)return L(e,t,t);var n=Math.abs(t),r=L(e,n,n);return"string"==typeof r?"-"+r:-1*r},z=["margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","top","bottom","left","right"].reduce((function(e,t){var n;return N({},e,((n={})[t]=H,n))}),{}),V=function e(t){return function(n){void 0===n&&(n={});var r=N({},B,{},n.theme||n),i={},a=function(e){return function(t){var n={},r=L(t,"breakpoints",R),i=[null].concat(r.map((function(e){return"@media screen and (min-width: "+e+")"})));for(var a in e){var o="function"==typeof e[a]?e[a](t):e[a];if(null!=o)if(Array.isArray(o))for(var s=0;s<o.slice(0,i.length).length;s++){var l=i[s];l?(n[l]=n[l]||{},null!=o[s]&&(n[l][a]=o[s])):n[a]=o[s]}else n[a]=o}return n}}("function"==typeof t?t(r):t)(r);for(var o in a){var s=a[o],l="function"==typeof s?s(r):s;if("variant"!==o)if(l&&"object"==typeof l)i[o]=e(l)(r);else{var c=L(j,o,o),u=L(U,c),d=L(r,u,L(r,c,{})),h=L(z,c,L)(d,l,l);if(F[c])for(var f=F[c],p=0;p<f.length;p++)i[f[p]]=h;else i[c]=h}else i=N({},i,{},e(L(r,l))(r))}return i}},W=function(e){var t,n,r=e.scale,i=e.prop,a=void 0===i?"variant":i,o=e.variants,s=void 0===o?{}:o,l=e.key;(n=Object.keys(s).length?function(e,t,n){return V(c(t,e,null))(n.theme)}:function(e,t){return c(t,e,null)}).scale=r||l,n.defaults=s;var d=((t={})[a]=n,t);return u(d)};W({key:"buttons"}),W({key:"textStyles",prop:"textStyle"}),W({key:"colorStyles",prop:"colors"}),m.width,m.height,m.minWidth,m.minHeight,m.maxWidth,m.maxHeight,m.size,m.verticalAlign,m.display,m.overflow,m.overflowX,m.overflowY,v.opacity,b.fontSize,b.fontFamily,b.fontWeight,b.lineHeight,b.textAlign,b.fontStyle,b.letterSpacing,y.alignItems,y.alignContent,y.justifyItems,y.justifyContent,y.flexWrap,y.flexDirection,y.flex,y.flexGrow,y.flexShrink,y.flexBasis,y.justifySelf,y.alignSelf,y.order,w.gridGap,w.gridColumnGap,w.gridRowGap,w.gridColumn,w.gridRow,w.gridAutoFlow,w.gridAutoColumns,w.gridAutoRows,w.gridTemplateColumns,w.gridTemplateRows,w.gridTemplateAreas,w.gridArea,S.borderWidth,S.borderStyle,S.borderColor,S.borderTop,S.borderRight,S.borderBottom,S.borderLeft,S.borderRadius,T.backgroundImage,T.backgroundSize,T.backgroundPosition,T.backgroundRepeat,x.zIndex,x.top,x.right,x.bottom,x.left},function(e,t){var n,r,i,a,o,s,l;n=function(e){return 9e4*e},r=function(e,t){return e*t},i=function(e){return e/9e4},a=function(e,t){return e/t},o=function(e,t){return n(a(e,t))},s=function(e,t){return r(i(e),t)},l=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:a,audioTsToVideoTs:o,videoTsToAudioTs:s,metadataTsToSeconds:l}},function(e,t,n){"use strict";n.d(t,"b",(function(){return K})),n.d(t,"a",(function(){return X}));var r=Uint8Array,i=Uint16Array,a=Uint32Array,o=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),s=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(e,t){for(var n=new i(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new a(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)o[s]=s-n[r]<<5|r;return[n,o]},u=c(o,2),d=u[0],h=u[1];d[28]=258,h[258]=28;for(var f=c(s,0),p=f[0],m=f[1],g=new i(32768),v=0;v<32768;++v){var b=(43690&v)>>>1|(21845&v)<<1;b=(61680&(b=(52428&b)>>>2|(13107&b)<<2))>>>4|(3855&b)<<4,g[v]=((65280&b)>>>8|(255&b)<<8)>>>1}var y=function(e,t,n){for(var r=e.length,a=0,o=new i(t);a<r;++a)++o[e[a]-1];var s,l=new i(t);for(a=0;a<t;++a)l[a]=l[a-1]+o[a-1]<<1;if(n){s=new i(1<<t);var c=15-t;for(a=0;a<r;++a)if(e[a])for(var u=a<<4|e[a],d=t-e[a],h=l[e[a]-1]++<<d,f=h|(1<<d)-1;h<=f;++h)s[g[h]>>>c]=u}else for(s=new i(r),a=0;a<r;++a)s[a]=g[l[e[a]-1]++]>>>15-e[a];return s},A=new r(288);for(v=0;v<144;++v)A[v]=8;for(v=144;v<256;++v)A[v]=9;for(v=256;v<280;++v)A[v]=7;for(v=280;v<288;++v)A[v]=8;var _=new r(32);for(v=0;v<32;++v)_[v]=5;var w=y(A,9,0),E=y(A,9,1),S=y(_,5,0),C=y(_,5,1),T=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},k=function(e,t,n){var r=t/8>>0;return(e[r]|e[r+1]<<8)>>>(7&t)&n},x=function(e,t){var n=t/8>>0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(7&t)},O=function(e){return(e/8>>0)+(7&e&&1)},I=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var o=new(e instanceof i?i:e instanceof a?a:r)(n-t);return o.set(e.subarray(t,n)),o},M=function(e,t,n){var i=e.length,a=!t||n,c=!n||n.i;n||(n={}),t||(t=new r(3*i));var u=function(e){var n=t.length;if(e>n){var i=new r(Math.max(2*n,e));i.set(t),t=i}},h=n.f||0,f=n.p||0,m=n.b||0,g=n.l,v=n.d,b=n.m,A=n.n,_=8*i;do{if(!g){n.f=h=k(e,f,1);var w=k(e,f+1,3);if(f+=3,!w){var S=e[(H=O(f)+4)-4]|e[H-3]<<8,M=H+S;if(M>i){if(c)throw"unexpected EOF";break}a&&u(m+S),t.set(e.subarray(H,M),m),n.b=m+=S,n.p=f=8*M;continue}if(1==w)g=E,v=C,b=9,A=5;else{if(2!=w)throw"invalid block type";var P=k(e,f,31)+257,D=k(e,f+10,15)+4,N=P+k(e,f+5,31)+1;f+=14;for(var L=new r(N),R=new r(19),B=0;B<D;++B)R[l[B]]=k(e,f+3*B,7);f+=3*D;var j=T(R),F=(1<<j)-1;if(!c&&f+N*(j+7)>_)break;var U=y(R,j,1);for(B=0;B<N;){var H,z=U[k(e,f,F)];if(f+=15&z,(H=z>>>4)<16)L[B++]=H;else{var V=0,W=0;for(16==H?(W=3+k(e,f,3),f+=2,V=L[B-1]):17==H?(W=3+k(e,f,7),f+=3):18==H&&(W=11+k(e,f,127),f+=7);W--;)L[B++]=V}}var G=L.subarray(0,P),q=L.subarray(P);b=T(G),A=T(q),g=y(G,b,1),v=y(q,A,1)}if(f>_)throw"unexpected EOF"}a&&u(m+131072);for(var Y=(1<<b)-1,K=(1<<A)-1,X=b+A+18;c||f+X<_;){var Q=(V=g[x(e,f)&Y])>>>4;if((f+=15&V)>_)throw"unexpected EOF";if(!V)throw"invalid length/literal";if(Q<256)t[m++]=Q;else{if(256==Q){g=null;break}var $=Q-254;if(Q>264){var J=o[B=Q-257];$=k(e,f,(1<<J)-1)+d[B],f+=J}var Z=v[x(e,f)&K],ee=Z>>>4;if(!Z)throw"invalid distance";f+=15&Z;q=p[ee];if(ee>3){J=s[ee];q+=x(e,f)&(1<<J)-1,f+=J}if(f>_)throw"unexpected EOF";a&&u(m+131072);for(var te=m+$;m<te;m+=4)t[m]=t[m-q],t[m+1]=t[m+1-q],t[m+2]=t[m+2-q],t[m+3]=t[m+3-q];m=te}}n.l=g,n.p=f,n.b=m,g&&(h=1,n.m=b,n.d=v,n.n=A)}while(!h);return m==t.length?t:I(t,0,m)},P=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},D=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},N=function(e,t){for(var n=[],a=0;a<e.length;++a)e[a]&&n.push({s:a,f:e[a]});var o=n.length,s=n.slice();if(!o)return[new r(0),0];if(1==o){var l=new r(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var c=n[0],u=n[1],d=0,h=1,f=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};h!=o-1;)c=n[n[d].f<n[f].f?d++:f++],u=n[d!=h&&n[d].f<n[f].f?d++:f++],n[h++]={s:-1,f:c.f+u.f,l:c,r:u};var p=s[0].s;for(a=1;a<o;++a)s[a].s>p&&(p=s[a].s);var m=new i(p+1),g=L(n[h-1],m,0);if(g>t){a=0;var v=0,b=g-t,y=1<<b;for(s.sort((function(e,t){return m[t.s]-m[e.s]||e.f-t.f}));a<o;++a){var A=s[a].s;if(!(m[A]>t))break;v+=y-(1<<g-m[A]),m[A]=t}for(v>>>=b;v>0;){var _=s[a].s;m[_]<t?v-=1<<t-m[_]++-1:++a}for(;a>=0&&v;--a){var w=s[a].s;m[w]==t&&(--m[w],++v)}g=t}return[new r(m),g]},L=function(e,t,n){return-1==e.s?Math.max(L(e.l,t,n+1),L(e.r,t,n+1)):t[e.s]=n},R=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new i(++t),r=0,a=e[0],o=1,s=function(e){n[r++]=e},l=1;l<=t;++l)if(e[l]==a&&l!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=e[l]}return[n.subarray(0,r),t]},B=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},j=function(e,t,n){var r=n.length,i=O(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var a=0;a<r;++a)e[i+a+4]=n[a];return 8*(i+4+r)},F=function(e,t,n,r,a,c,u,d,h,f,p){P(t,p++,n),++a[256];for(var m=N(a,15),g=m[0],v=m[1],b=N(c,15),E=b[0],C=b[1],T=R(g),k=T[0],x=T[1],O=R(E),I=O[0],M=O[1],L=new i(19),F=0;F<k.length;++F)L[31&k[F]]++;for(F=0;F<I.length;++F)L[31&I[F]]++;for(var U=N(L,7),H=U[0],z=U[1],V=19;V>4&&!H[l[V-1]];--V);var W,G,q,Y,K=f+5<<3,X=B(a,A)+B(c,_)+u,Q=B(a,g)+B(c,E)+u+14+3*V+B(L,H)+(2*L[16]+3*L[17]+7*L[18]);if(K<=X&&K<=Q)return j(t,p,e.subarray(h,h+f));if(P(t,p,1+(Q<X)),p+=2,Q<X){W=y(g,v,0),G=g,q=y(E,C,0),Y=E;var $=y(H,z,0);P(t,p,x-257),P(t,p+5,M-1),P(t,p+10,V-4),p+=14;for(F=0;F<V;++F)P(t,p+3*F,H[l[F]]);p+=3*V;for(var J=[k,I],Z=0;Z<2;++Z){var ee=J[Z];for(F=0;F<ee.length;++F){var te=31&ee[F];P(t,p,$[te]),p+=H[te],te>15&&(P(t,p,ee[F]>>>5&127),p+=ee[F]>>>12)}}}else W=w,G=A,q=S,Y=_;for(F=0;F<d;++F)if(r[F]>255){te=r[F]>>>18&31;D(t,p,W[te+257]),p+=G[te+257],te>7&&(P(t,p,r[F]>>>23&31),p+=o[te]);var ne=31&r[F];D(t,p,q[ne]),p+=Y[ne],ne>3&&(D(t,p,r[F]>>>5&8191),p+=s[ne])}else D(t,p,W[r[F]]),p+=G[r[F]];return D(t,p,W[256]),p+G[256]},U=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),H=new r(0),z=function(e,t,n,l,c,u){var d=e.length,f=new r(l+d+5*(1+Math.floor(d/7e3))+c),p=f.subarray(l,f.length-c),g=0;if(!t||d<8)for(var v=0;v<=d;v+=65535){var b=v+65535;b<d?g=j(p,g,e.subarray(v,b)):(p[v]=u,g=j(p,g,e.subarray(v,d)))}else{for(var y=U[t-1],A=y>>>13,_=8191&y,w=(1<<n)-1,E=new i(32768),S=new i(w+1),C=Math.ceil(n/3),T=2*C,k=function(t){return(e[t]^e[t+1]<<C^e[t+2]<<T)&w},x=new a(25e3),M=new i(288),P=new i(32),D=0,N=0,L=(v=0,0),R=0,B=0;v<d;++v){var z=k(v),V=32767&v,W=S[z];if(E[V]=W,S[z]=V,R<=v){var G=d-v;if((D>7e3||L>24576)&&G>423){g=F(e,p,0,x,M,P,N,L,B,v-B,g),L=D=N=0,B=v;for(var q=0;q<286;++q)M[q]=0;for(q=0;q<30;++q)P[q]=0}var Y=2,K=0,X=_,Q=V-W&32767;if(G>2&&z==k(v-Q))for(var $=Math.min(A,G)-1,J=Math.min(32767,v),Z=Math.min(258,G);Q<=J&&--X&&V!=W;){if(e[v+Y]==e[v+Y-Q]){for(var ee=0;ee<Z&&e[v+ee]==e[v+ee-Q];++ee);if(ee>Y){if(Y=ee,K=Q,ee>$)break;var te=Math.min(Q,ee-2),ne=0;for(q=0;q<te;++q){var re=v-Q+q+32768&32767,ie=re-E[re]+32768&32767;ie>ne&&(ne=ie,W=re)}}}Q+=(V=W)-(W=E[V])+32768&32767}if(K){x[L++]=268435456|h[Y]<<18|m[K];var ae=31&h[Y],oe=31&m[K];N+=o[ae]+s[oe],++M[257+ae],++P[oe],R=v+Y,++D}else x[L++]=e[v],++M[e[v]]}}g=F(e,p,u,x,M,P,N,L,B,v-B,g),u||(g=j(p,g,H))}return I(f,0,l+O(g)+c)},V=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length,o=0;o!=a;){for(var s=Math.min(o+5552,a);o<s;++o)i+=r+=n[o];r%=65521,i%=65521}e=r,t=i},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}},W=function(e,t,n,r,i){return z(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},G=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},q=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)},Y=function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};function K(e,t){void 0===t&&(t={});var n=V();n.p(e);var r=W(e,t,2,4);return q(r,t),G(r,r.length-4,n.d()),r}function X(e,t){return M((Y(e),e.subarray(2,-4)),t)}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",quickNavX:"quickNavX--MimXd",quickNavLeft:"quickNavLeft--1IQVq",quickNavRight:"quickNavRight--3tG57",quickNavY:"quickNavY--3ec6f",quickNavTop:"quickNavTop--GVkcw",quickNavBottom:"quickNavBottom--238vy",quickNavTopHome:"quickNavTopHome--2LPxp"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",contentLineHeight:"1.5rem",toggleContent:"toggleContent--3Z0KI",content:"content--2LYvS",toggleBtn:"toggleBtn--VJ7Af"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",card:"card--16jAx",cardHeader:"cardHeader--2lf2W",cardBody:"cardBody--UPMTg"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",videoFilter:"videoFilter--Z36--",arrow:"arrow--FGtdz",dropdownWrapper:"dropdownWrapper--oBn2a",dropdown:"dropdown--Ijad5"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",pageLoader:"pageLoader--1GxQx",loaderOverlay:"loaderOverlay--2Yp0s",loaderContent:"loaderContent--11I8v",loading:"loading--1qzlz"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return C}));var r,i=n(34),a=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?Object(i.h)(e):e}),o=function(e){e=Object(i.k)(e);for(var t=[],n=0;e.length>n;){var a=e[n],o=0,s=0,l=e[++s];for(s++;128&l;)o=(127&l)<<7,l=e[s],s++;o+=127&l;for(var c=0;c<r.length;c++){var u=r[c],d=u.id,h=u.parser;if(a===d){t.push(h(e.subarray(s,s+o)));break}}n+=o+s}return t};r=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=Object(i.c)(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=o(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:o(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var s=function e(t,n,r){void 0===r&&(r=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return a(e)})):[a(e)]}(n),t=Object(i.k)(t);var o=[];if(!n.length)return o;for(var s=0;s<t.length;){var l=(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3])>>>0,c=t.subarray(s+4,s+8);if(0===l)break;var u=s+l;if(u>t.length){if(r)break;u=t.length}var d=t.subarray(s+8,u);Object(i.a)(c,n[0])&&(1===n.length?o.push(d):o.push.apply(o,e(d,n.slice(1),r))),s=u}return o},l={EBML:Object(i.k)([26,69,223,163]),DocType:Object(i.k)([66,130]),Segment:Object(i.k)([24,83,128,103]),SegmentInfo:Object(i.k)([21,73,169,102]),Tracks:Object(i.k)([22,84,174,107]),Track:Object(i.k)([174]),TrackNumber:Object(i.k)([215]),DefaultDuration:Object(i.k)([35,227,131]),TrackEntry:Object(i.k)([174]),TrackType:Object(i.k)([131]),FlagDefault:Object(i.k)([136]),CodecID:Object(i.k)([134]),CodecPrivate:Object(i.k)([99,162]),VideoTrack:Object(i.k)([224]),AudioTrack:Object(i.k)([225]),Cluster:Object(i.k)([31,67,182,117]),Timestamp:Object(i.k)([231]),TimestampScale:Object(i.k)([42,215,177]),BlockGroup:Object(i.k)([160]),BlockDuration:Object(i.k)([155]),Block:Object(i.k)([161]),SimpleBlock:Object(i.k)([163])},c=[128,64,32,16,8,4,2,1],u=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var a=function(e){for(var t=1,n=0;n<c.length&&!(e&c[n]);n++)t++;return t}(e[t]),o=e.subarray(t,t+a);return n&&((o=Array.prototype.slice.call(e,t,t+a))[0]^=c[a-1]),{length:a,value:Object(i.b)(o,{signed:r}),bytes:o}},d=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?Object(i.f)(t):t},h=function e(t,n,r){if(r>=n.length)return n.length;var a=u(n,r,!1);if(Object(i.a)(t.bytes,a.bytes))return r;var o=u(n,r+a.length);return e(t,n,r+o.length+o.value+a.length)},f=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return d(e)})):[d(e)]}(n),t=Object(i.k)(t);var r=[];if(!n.length)return r;for(var a=0;a<t.length;){var o=u(t,a,!1),s=u(t,a+o.length),l=a+o.length+s.length;127===s.value&&(s.value=h(o,t,l),s.value!==t.length&&(s.value-=l));var c=l+s.value>t.length?t.length:l+s.value,f=t.subarray(l,c);Object(i.a)(n[0],o.bytes)&&(1===n.length?r.push(f):r=r.concat(e(f,n.slice(1)))),a+=o.length+s.length+f.length}return r},p=n(251),m=Object(i.k)([0,0,0,1]),g=Object(i.k)([0,0,1]),v=Object(i.k)([0,0,3]),b=function(e){for(var t=[],n=1;n<e.length-2;)Object(i.a)(e.subarray(n,n+3),v)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var r=e.length-t.length,a=new Uint8Array(r),o=0;for(n=0;n<r;o++,n++)o===t[0]&&(o++,t.shift()),a[n]=e[o];return a},y=function(e,t,n,r){void 0===r&&(r=1/0),e=Object(i.k)(e),n=[].concat(n);for(var a,o=0,s=0;o<e.length&&(s<r||a);){var l=void 0;if(Object(i.a)(e.subarray(o),m)?l=4:Object(i.a)(e.subarray(o),g)&&(l=3),l){if(s++,a)return b(e.subarray(a,o));var c=void 0;"h264"===t?c=31&e[o+l]:"h265"===t&&(c=e[o+l]>>1&63),-1!==n.indexOf(c)&&(a=o+l),o+=l+("h264"===t?1:2)}else o++}return e.subarray(0,0)},A={webm:Object(i.k)([119,101,98,109]),matroska:Object(i.k)([109,97,116,114,111,115,107,97]),flac:Object(i.k)([102,76,97,67]),ogg:Object(i.k)([79,103,103,83]),ac3:Object(i.k)([11,119]),riff:Object(i.k)([82,73,70,70]),avi:Object(i.k)([65,86,73]),wav:Object(i.k)([87,65,86,69]),"3gp":Object(i.k)([102,116,121,112,51,103]),mp4:Object(i.k)([102,116,121,112]),fmp4:Object(i.k)([115,116,121,112]),mov:Object(i.k)([102,116,121,112,113,116]),moov:Object(i.k)([109,111,111,118]),moof:Object(i.k)([109,111,111,102])},_={aac:function(e){var t=Object(p.a)(e);return Object(i.a)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(p.a)(e);return Object(i.a)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=f(e,[l.EBML,l.DocType])[0];return Object(i.a)(t,A.webm)},mkv:function(e){var t=f(e,[l.EBML,l.DocType])[0];return Object(i.a)(t,A.matroska)},mp4:function(e){return!_["3gp"](e)&&!_.mov(e)&&(!(!Object(i.a)(e,A.mp4,{offset:4})&&!Object(i.a)(e,A.fmp4,{offset:4}))||(!(!Object(i.a)(e,A.moof,{offset:4})&&!Object(i.a)(e,A.moov,{offset:4}))||void 0))},mov:function(e){return Object(i.a)(e,A.mov,{offset:4})},"3gp":function(e){return Object(i.a)(e,A["3gp"],{offset:4})},ac3:function(e){var t=Object(p.a)(e);return Object(i.a)(e,A.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Object(p.a)(e);return Object(i.a)(e,A.flac,{offset:t})},ogg:function(e){return Object(i.a)(e,A.ogg)},avi:function(e){return Object(i.a)(e,A.riff)&&Object(i.a)(e,A.avi,{offset:8})},wav:function(e){return Object(i.a)(e,A.riff)&&Object(i.a)(e,A.wav,{offset:8})},h264:function(e){return function(e,t,n){return y(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return y(e,"h265",t,n)}(e,[32,33],3).length}},w=Object.keys(_).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);w.forEach((function(e){var t=_[e];_[e]=function(e){return t(Object(i.k)(e))}}));var E=_,S=function(e){e=Object(i.k)(e);for(var t=0;t<w.length;t++){var n=w[t];if(E[n](e))return n}return""},C=function(e){return s(e,["moof"]).length>0}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(1099).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=o(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=o(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n,r,i,a){var o=r||"<<anonymous>>",s=a||n;if(null==t[n])return new Error("The "+i+" `"+s+"` is required to make `"+o+"` accessible for users of assistive technologies such as screen readers.");for(var l=arguments.length,c=Array(l>5?l-5:0),u=5;u<l;u++)c[u-5]=arguments[u];return e.apply(void 0,[t,n,r,i,a].concat(c))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n){var r=void 0,i=void 0;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime<=t&&i.endTime>=e&&n.removeCue(i)},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={isAudioCodec:function(e){return/mp4a\.\d+.\d+/i.test(e)},parseContentType:function(e){var t={type:"",parameters:{}},n=e.trim().split(";");return t.type=n.shift().trim(),n.forEach((function(e){var n=e.trim().split("=");if(n.length>1){var r=n[0].replace(/"/g,"").trim(),i=n[1].replace(/"/g,"").trim();t.parameters[r]=i}})),t},isVideoCodec:function(e){return/avc1\.[\da-f]+/i.test(e)},translateLegacyCodecs:function(e){return e.map((function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)}))}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},e.exports=t.default},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var i=r({HTML:"text/html",isHTML:function(e){return e===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var r=0;r<e.length;r++)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];if(t.call(void 0,i,r,e))return i}},t.freeze=r,t.MIME_TYPE=i,t.NAMESPACE=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];function r(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=null;return t.forEach((function(e){if(null==i){var t=e.apply(void 0,n);null!=t&&(i=t)}})),i}return(0,a.default)(r)};var r,i=n(1226),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=function(e){return e!=e};e.exports=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!r(e)||!r(t))}},function(e,t){function n(t){return e.exports=n="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.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(470),i=n(467);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(466),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(467);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(356)("meta"),i=n(169),a=n(231),o=n(229).f,s=0,l=Object.isExtensible||function(){return!0},c=!n(303)((function(){return l(Object.preventExtensions({}))})),u=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!a(e,r)&&u(e),e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e){this.timeoutMs=e,this.timer=null}start(e){this.stop(),this.timer=setTimeout(()=>{clearTimeout(this.timer),e()},this.timeoutMs)}stop(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.VideoLogEvent=void 0,function(e){e[e.InputAttached=0]="InputAttached",e[e.SendingFailed=1]="SendingFailed",e[e.SendingSuccess=2]="SendingSuccess"}(r=t.VideoLogEvent||(t.VideoLogEvent={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ClientMetricReportMediaType=void 0,function(e){e[e.AUDIO=0]="AUDIO",e[e.VIDEO=1]="VIDEO"}(r=t.ClientMetricReportMediaType||(t.ClientMetricReportMediaType={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketReadyState=void 0,function(e){e[e.None=0]="None",e[e.Connecting=1]="Connecting",e[e.Open=2]="Open",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(r=t.WebSocketReadyState||(t.WebSocketReadyState={})),t.default=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e,t){this.logger=e,this.browserBehavior=t,this._localCameraTransceiver=null,this._localAudioTransceiver=null,this.videoSubscriptions=[],this.defaultMediaStream=null,this.peer=null,this.streamIdToTransceiver=new Map}setEncodingParameters(e){return r(this,void 0,void 0,(function*(){if(!this._localCameraTransceiver||"sendrecv"!==this._localCameraTransceiver.direction)return;const t=this._localCameraTransceiver.sender;if(!e||0===e.size)return;const n=Array.from(e.values()),r=t.getParameters();if(r.encodings&&0!==r.encodings.length)for(const e of r.encodings)for(const t of n){if((e.rid||t.rid)&&e.rid!==t.rid)continue;let n;for(n in t)"rid"!==n&&"codecPayloadType"!==n&&t.hasOwnProperty(n)&&(e[n]=t[n])}else r.encodings=n;yield t.setParameters(r)}))}static setVideoSendingBitrateKbpsForSender(e,t,n){return r(this,void 0,void 0,(function*(){if(!e||t<=0)return;const n=e.getParameters();n.encodings||(n.encodings=[{}]);for(const e of n.encodings)e.maxBitrate=1e3*t;yield e.setParameters(n)}))}static replaceAudioTrackForSender(e,t){return r(this,void 0,void 0,(function*(){return!!e&&(yield e.replaceTrack(t),!0)}))}localAudioTransceiver(){return this._localAudioTransceiver}localVideoTransceiver(){return this._localCameraTransceiver}setVideoSendingBitrateKbps(e){return r(this,void 0,void 0,(function*(){if(!this._localCameraTransceiver||"sendrecv"!==this._localCameraTransceiver.direction)return;const t=this._localCameraTransceiver.sender;yield i.setVideoSendingBitrateKbpsForSender(t,e,this.logger)}))}setPeer(e){this.peer=e}reset(){this._localCameraTransceiver=null,this._localAudioTransceiver=null,this.videoSubscriptions=[],this.defaultMediaStream=null,this.peer=null}useTransceivers(){return!(!this.peer||!this.browserBehavior.requiresUnifiedPlan())&&void 0!==this.peer.getTransceivers}hasVideoInput(){return!(!this._localCameraTransceiver||"sendrecv"!==this._localCameraTransceiver.direction)}trackIsVideoInput(e){return!!this._localCameraTransceiver&&(e===this._localCameraTransceiver.sender.track||e===this._localCameraTransceiver.receiver.track)}setupLocalTransceivers(){this.useTransceivers()&&(this.defaultMediaStream||"undefined"==typeof MediaStream||(this.defaultMediaStream=new MediaStream),this._localAudioTransceiver||(this._localAudioTransceiver=this.peer.addTransceiver("audio",{direction:"inactive",streams:[this.defaultMediaStream]})),this._localCameraTransceiver||(this._localCameraTransceiver=this.peer.addTransceiver("video",{direction:"inactive",streams:[this.defaultMediaStream]})))}replaceAudioTrack(e){return r(this,void 0,void 0,(function*(){return this._localAudioTransceiver&&"sendrecv"===this._localAudioTransceiver.direction?(yield this._localAudioTransceiver.sender.replaceTrack(e),!0):(this.logger.info("audio transceiver direction is not set up or not activated"),!1)}))}setAudioInput(e){return r(this,void 0,void 0,(function*(){yield this.setTransceiverInput(this._localAudioTransceiver,e)}))}setVideoInput(e){return r(this,void 0,void 0,(function*(){yield this.setTransceiverInput(this._localCameraTransceiver,e)}))}updateVideoTransceivers(e,t){if(!this.useTransceivers())return t.array();const n=this.peer.getTransceivers();return this.videoSubscriptions=[0],t=t.clone(),this.updateTransceivers(n,e,t),this.logger.debug(()=>this.debugDumpTransceivers()),this.videoSubscriptions}updateTransceivers(e,t,n){const r=n.array();let i=1;for(const n of e)if(n!==this._localCameraTransceiver&&this.transceiverIsVideo(n)){if(this.videoSubscriptions[i]=0,"inactive"!==n.direction){const e=t.streamIdForTrack("v_"+n.mid);if(void 0!==e)for(const[a,o]of r.entries())if(t.StreamIdsInSameGroup(e,o)){n.direction="recvonly",this.videoSubscriptions[i]=o,this.streamIdToTransceiver.delete(e),this.streamIdToTransceiver.set(o,n),r.splice(a,1);break}}i+=1}i=1;for(const t of e)if(t!==this._localCameraTransceiver&&this.transceiverIsVideo(t)){if("inactive"===t.direction&&r.length>0){t.direction="recvonly";const e=r.shift();this.videoSubscriptions[i]=e,this.streamIdToTransceiver.set(e,t)}else if(0===this.videoSubscriptions[i]){t.direction="inactive";for(const[e,n]of this.streamIdToTransceiver.entries())t===n&&this.streamIdToTransceiver.delete(e)}i+=1}for(const e of r){const t=this.peer.addTransceiver("video",{direction:"recvonly",streams:[this.defaultMediaStream]});this.streamIdToTransceiver.set(e,t),this.videoSubscriptions.push(e),this.logger.info(`adding transceiver mid: ${t.mid} subscription: ${e} direction: recvonly`)}}getMidForStreamId(e){var t;return null===(t=this.streamIdToTransceiver.get(e))||void 0===t?void 0:t.mid}setStreamIdForMid(e,t){for(const[n,r]of this.streamIdToTransceiver.entries())if(r.mid===e)return this.streamIdToTransceiver.delete(n),void this.streamIdToTransceiver.set(t,r)}transceiverIsVideo(e){return e.receiver&&e.receiver.track&&"video"===e.receiver.track.kind||e.sender&&e.sender.track&&"video"===e.sender.track.kind}debugDumpTransceivers(){let e="",t=0;for(const n of this.peer.getTransceivers())this.transceiverIsVideo(n)&&(e+=`transceiver index=${t} mid=${n.mid} subscription=${this.videoSubscriptions[t]} direction=${n.direction}\n`,t+=1);return e}setTransceiverInput(e,t){return r(this,void 0,void 0,(function*(){e&&(e.direction=t?"sendrecv":"inactive",yield e.sender.replaceTrack(t))}))}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoPreferences=t.MutableVideoPreferences=void 0;class r{constructor(e=[]){this.items=e}static default(){return new r([])}[Symbol.iterator](){let e=0;const t=this.items;return{next:()=>e<t.length?{done:!1,value:t[e++]}:{done:!0,value:null}}}first(){return this.items[0]}add(e){this.items.push(e)}replaceFirst(e,t){const n=this.items.findIndex(t);-1===n?this.items.push(e):this.has(e)?this.items.splice(n,1):this.items[n]=e}remove(e){this.items=this.items.filter(t=>!t.equals(e))}clear(){this.items=[]}isEmpty(){return 0===this.items.length}equals(e){if(e===this)return!0;if(e.items.length!==this.items.length)return!1;for(const t of this.items)if(!e.items.some(e=>e.equals(t)))return!1;return!0}has(e){return this.items.some(t=>t.equals(e))}some(e){return this.items.some(e)}clone(){return new r([...this.items])}sort(){this.items.sort((e,t)=>e.partialCompare(t))}modify(){return new i(this)}}class i{constructor(e=new r){this.items=e,this.copied=!1}cow(){this.copied||(this.items=this.items.clone(),this.copied=!0)}add(e){this.items.has(e)||(this.cow(),this.items.add(e))}replaceFirst(e,t){this.items.has(e)&&!this.items.some(t)||(this.cow(),this.items.replaceFirst(e,t))}remove(e){this.items.has(e)&&(this.cow(),this.items.remove(e))}some(e){return this.items.some(e)}clear(){this.items.isEmpty()||(this.cow(),this.items.clear())}build(){return this.copied&&this.items.sort(),this.copied=!1,this.items}}class a{constructor(e){this.builder=e}add(e){this.builder.add(e)}replaceFirst(e,t){this.builder.replaceFirst(e,t)}remove(e){this.builder.remove(e)}some(e){return this.builder.some(e)}clear(){this.builder.clear()}build(){return new o(this.builder.build())}}t.MutableVideoPreferences=a;class o{constructor(e){this.items=e}static prepare(){return new a(new i)}static default(){return new o(r.default())}[Symbol.iterator](){return this.items[Symbol.iterator]()}highestPriority(){var e;return null===(e=this.items.first())||void 0===e?void 0:e.priority}sorted(){return this.items[Symbol.iterator]()}equals(e){return e===this||this.items.equals(e.items)}modify(){return new a(this.items.modify())}some(e){return this.items.some(e)}isEmpty(){return this.items.isEmpty()}}t.VideoPreferences=o,t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.attendeeId=null,this.externalUserId=null,this.joinToken=null}toJSON(){return{attendeeId:this.attendeeId,joinToken:null===this.joinToken?null:"<redacted>"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(362);class i{constructor(e,t){this.reconnectTimeoutMs=e,this.backoffPolicy=t,this.shouldReconnect=!0,this.onlyRestartPeerConnection=!1,this.firstConnectionAttempted=!1,this.firstConnectionAttemptTimestampMs=0,this.lastActiveTimestampMs=1/0,this._isFirstConnection=!0,this.backoffTimer=null,this.backoffCancel=null,this.reset()}timeSpentReconnectingMs(){return this.firstConnectionAttempted?Date.now()-this.firstConnectionAttemptTimestampMs:0}hasPastReconnectDeadline(){return Date.now()-this.lastActiveTimestampMs>=this.reconnectTimeoutMs||this.timeSpentReconnectingMs()>=this.reconnectTimeoutMs}reset(){this.cancel(),this.shouldReconnect=!0,this.onlyRestartPeerConnection=!1,this.firstConnectionAttempted=!1,this.firstConnectionAttemptTimestampMs=0,this.lastActiveTimestampMs=1/0,this.backoffPolicy.reset()}startedConnectionAttempt(e){this._isFirstConnection=e,this.firstConnectionAttempted||(this.firstConnectionAttempted=!0,this.firstConnectionAttemptTimestampMs=Date.now())}hasStartedConnectionAttempt(){return this.firstConnectionAttempted}isFirstConnection(){return this._isFirstConnection}disableReconnect(){this.shouldReconnect=!1}enableRestartPeerConnection(){this.onlyRestartPeerConnection=!0}cancel(){this.disableReconnect(),this.backoffTimer&&(this.backoffTimer.stop(),this.backoffCancel&&(this.backoffCancel(),this.backoffCancel=null))}retryWithBackoff(e,t){const n=this.shouldReconnect&&!this.hasPastReconnectDeadline();return n&&(this.backoffCancel=t,this.backoffTimer=new r.default(this.backoffPolicy.nextBackoffAmountMs()),this.backoffTimer.start(()=>{this.backoffCancel=null,e()})),n}shouldOnlyRestartPeerConnection(){return this.onlyRestartPeerConnection}clone(){return new i(this.reconnectTimeoutMs,this.backoffPolicy)}setLastActiveTimestampMs(e){this.lastActiveTimestampMs=e}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(212),i=n(365);t.default=class{constructor(e){this.logger=e}create(e,t,n){this.connection=new WebSocket(n?e:r.default.urlWithVersion(e),t),this.connection.binaryType="arraybuffer"}send(e){if(!this.connection)return this.logger.error("WebSocket not yet created or already destroyed."),!1;try{return e instanceof Uint8Array?this.connection.send(e.buffer):this.connection.send(e),!0}catch(e){return this.logger.debug(()=>`send error: ${e.message}, websocket state=${i.default[this.readyState()]}`),!1}}close(e,t){var n;null===(n=this.connection)||void 0===n||n.close(e,t)}destroy(){this.connection=void 0}addEventListener(e,t){this.connection?this.connection.addEventListener(e,t):this.logger.warn("Cannot add event listener with no WebSocket connection.")}readyState(){if(!this.connection)return i.default.None;switch(this.connection.readyState){case WebSocket.CONNECTING:return i.default.Connecting;case WebSocket.OPEN:return i.default.Open;case WebSocket.CLOSING:return i.default.Closing;case WebSocket.CLOSED:return i.default.Closed}}}},function(module,exports,__webpack_require__){(function(process,Buffer){var factory;factory=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLinkAttributes",{enumerable:!0,get:function(){return r.addLinkAttributes}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return r.getFilenameFromUrl}}),Object.defineProperty(t,"LinkTarget",{enumerable:!0,get:function(){return r.LinkTarget}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return r.PDFDateString}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return r.RenderingCancelledException}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return i.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return i.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return i.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return i.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return i.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return i.version}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return a.CMapCompressionType}}),Object.defineProperty(t,"createObjectURL",{enumerable:!0,get:function(){return a.createObjectURL}}),Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function(){return a.createPromiseCapability}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return a.createValidAbsoluteUrl}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return a.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return a.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return a.OPS}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return a.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return a.PermissionFlag}}),Object.defineProperty(t,"removeNullCharacters",{enumerable:!0,get:function(){return a.removeNullCharacters}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return a.shadow}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return a.UnexpectedResponseException}}),Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return a.UNSUPPORTED_FEATURES}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return a.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return a.VerbosityLevel}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(t,"apiCompatibilityParams",{enumerable:!0,get:function(){return s.apiCompatibilityParams}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return c.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return u.SVGGraphics}});var r=n(1),i=n(5),a=n(2),o=n(16),s=n(7),l=n(10),c=n(17),u=n(18);{const{isNodeJS:e}=n(4);if(e){const e=n(19).PDFNodeStream;(0,i.setPDFNetworkStreamFactory)(t=>new e(t))}else{const e=n(22).PDFNetworkStream;let t;(0,r.isFetchSupported)()&&(t=n(23).PDFFetchStream),(0,i.setPDFNetworkStreamFactory)(n=>t&&(0,r.isValidFetchUrl)(n.url)?new t(n):new e(n))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(e,{url:t,target:n,rel:i,enabled:a=!0}={}){(0,r.assert)(t&&"string"==typeof t,'addLinkAttributes: A valid "url" parameter must provided.');const o=(0,r.removeNullCharacters)(t);a?e.href=e.title=o:(e.href="",e.title=`Disabled: ${o}`,e.onclick=()=>!1);let l="";switch(n){case s.NONE:break;case s.SELF:l="_self";break;case s.BLANK:l="_blank";break;case s.PARENT:l="_parent";break;case s.TOP:l="_top"}e.target=l,e.rel="string"==typeof i?i:"noopener noreferrer nofollow"},t.getFilenameFromUrl=function(e){const t=e.indexOf("#"),n=e.indexOf("?"),r=Math.min(t>0?t:e.length,n>0?n:e.length);return e.substring(e.lastIndexOf("/",r)+1,r)},t.isFetchSupported=l,t.isValidFetchUrl=c,t.loadScript=function(e){return new Promise((t,n)=>{const r=document.createElement("script");r.src=e,r.onload=t,r.onerror=function(){n(new Error(`Cannot load script at: ${r.src}`))},(document.head||document.documentElement).appendChild(r)})},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var r=n(2);t.DEFAULT_LINK_REL="noopener noreferrer nofollow";const i="http://www.w3.org/2000/svg";t.DOMCanvasFactory=class{create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const n=document.createElement("canvas"),r=n.getContext("2d");return n.width=e,n.height=t,{canvas:n,context:r}}reset(e,t,n){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||n<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=n}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}},t.DOMCMapReaderFactory=class{constructor({baseUrl:e=null,isCompressed:t=!1}){this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":""),n=this.isCompressed?r.CMapCompressionType.BINARY:r.CMapCompressionType.NONE;return l()&&c(t,document.baseURI)?fetch(t).then(async e=>{if(!e.ok)throw new Error(e.statusText);let t;return t=this.isCompressed?new Uint8Array(await e.arrayBuffer()):(0,r.stringToBytes)(await e.text()),{cMapData:t,compressionType:n}}).catch(e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}`+`CMap at: ${t}`)}):new Promise((e,i)=>{const a=new XMLHttpRequest;a.open("GET",t,!0),this.isCompressed&&(a.responseType="arraybuffer"),a.onreadystatechange=()=>{if(a.readyState===XMLHttpRequest.DONE){if(200===a.status||0===a.status){let t;if(this.isCompressed&&a.response?t=new Uint8Array(a.response):!this.isCompressed&&a.responseText&&(t=(0,r.stringToBytes)(a.responseText)),t)return void e({cMapData:t,compressionType:n})}i(new Error(a.statusText))}},a.send(null)}).catch(e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}`+`CMap at: ${t}`)})}},t.DOMSVGFactory=class{create(e,t){(0,r.assert)(e>0&&t>0,"Invalid SVG dimensions");const n=document.createElementNS(i,"svg:svg");return n.setAttribute("version","1.1"),n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox","0 0 "+e+" "+t),n}createElement(e){return(0,r.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(i,e)}};class a{constructor({viewBox:e,scale:t,rotation:n,offsetX:r=0,offsetY:i=0,dontFlip:a=!1}){this.viewBox=e,this.scale=t,this.rotation=n,this.offsetX=r,this.offsetY=i;const o=(e[2]+e[0])/2,s=(e[3]+e[1])/2;let l,c,u,d,h,f,p,m;switch(n=(n%=360)<0?n+360:n){case 180:l=-1,c=0,u=0,d=1;break;case 90:l=0,c=1,u=1,d=0;break;case 270:l=0,c=-1,u=-1,d=0;break;case 0:l=1,c=0,u=0,d=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(u=-u,d=-d),0===l?(h=Math.abs(s-e[1])*t+r,f=Math.abs(o-e[0])*t+i,p=Math.abs(e[3]-e[1])*t,m=Math.abs(e[2]-e[0])*t):(h=Math.abs(o-e[0])*t+r,f=Math.abs(s-e[1])*t+i,p=Math.abs(e[2]-e[0])*t,m=Math.abs(e[3]-e[1])*t),this.transform=[l*t,c*t,u*t,d*t,h-l*t*o-u*t*s,f-c*t*o-d*t*s],this.width=p,this.height=m}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:n=this.offsetX,offsetY:r=this.offsetY,dontFlip:i=!1}={}){return new a({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:i})}convertToViewportPoint(e,t){return r.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=r.Util.applyTransform([e[0],e[1]],this.transform),n=r.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}convertToPdfPoint(e,t){return r.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=a;class o extends r.BaseException{constructor(e,t){super(e),this.type=t}}t.RenderingCancelledException=o;const s={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function l(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function c(e,t){try{const{protocol:n}=t?new URL(e,t):new URL(e);return"http:"===n||"https:"===n}catch(e){return!1}}let u;t.LinkTarget=s,t.StatTimer=class{constructor(){this.started=Object.create(null),this.times=[]}time(e){e in this.started&&(0,r.warn)(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,r.warn)(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const e of this.times){const n=e.name;n.length>t&&(t=n.length)}for(const n of this.times){const r=n.end-n.start;e.push(`${n.name.padEnd(t)} ${r}ms\n`)}return e.join("")}},t.PDFDateString=class{static toDateObject(e){if(!e||!(0,r.isString)(e))return null;u||(u=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=u.exec(e);if(!t)return null;const n=parseInt(t[1],10);let i=parseInt(t[2],10);i=i>=1&&i<=12?i-1:0;let a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;let o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;let s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;let l=parseInt(t[6],10);l=l>=0&&l<=59?l:0;const c=t[7]||"Z";let d=parseInt(t[8],10);d=d>=0&&d<=23?d:0;let h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===c?(o+=d,s+=h):"+"===c&&(o-=d,s-=h),new Date(Date.UTC(n,i,a,o,s,l))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=h,t.arraysToBytes=function(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let n=0;for(let r=0;r<t;r++)n+=h(e[r]);let r=0;const i=new Uint8Array(n);for(let n=0;n<t;n++){let t=e[n];t instanceof Uint8Array||(t="string"==typeof t?d(t):new Uint8Array(t));const a=t.byteLength;i.set(t,r),r+=a}return i},t.assert=s,t.bytesToString=function(e){s(null!==e&&"object"==typeof e&&void 0!==e.length,"Invalid argument for bytesToString");const t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);const n=[];for(let r=0;r<t;r+=8192){const i=Math.min(r+8192,t),a=e.subarray(r,i);n.push(String.fromCharCode.apply(null,a))}return n.join("")},t.createPromiseCapability=function(){const e=Object.create(null);let t=!1;return Object.defineProperty(e,"settled",{get:()=>t}),e.promise=new Promise((function(n,r){e.resolve=function(e){t=!0,n(e)},e.reject=function(e){t=!0,r(e)}})),e},t.getVerbosityLevel=function(){return i},t.info=function(e){i>=r.INFOS&&console.log(`Info: ${e}`)},t.isArrayBuffer=function(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(const t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSameOrigin=function(e,t){let n;try{if(n=new URL(e),!n.origin||"null"===n.origin)return!1}catch(e){return!1}const r=new URL(t,n);return n.origin===r.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{const n=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n))return n}catch(e){}return null},t.removeNullCharacters=function(e){return"string"!=typeof e?(a("The argument for removeNullCharacters must be a string."),e):e.replace(u,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(i=e)},t.shadow=l,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=d,t.stringToPDFString=function(e){const t=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(let r=2;r<t;r+=2)n.push(String.fromCharCode(e.charCodeAt(r)<<8|e.charCodeAt(r+1)));else if("ÿ"===e[0]&&"þ"===e[1])for(let r=2;r<t;r+=2)n.push(String.fromCharCode(e.charCodeAt(r+1)<<8|e.charCodeAt(r)));else for(let r=0;r<t;++r){const t=v[e.charCodeAt(r)];n.push(t?String.fromCharCode(t):e.charAt(r))}return n.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=a,t.unreachable=o,t.IsEvalSupportedCached=t.IsLittleEndianCached=t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=t.BaseException=void 0,n(3),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const r={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=r,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let i=r.WARNINGS;function a(e){i>=r.WARNINGS&&console.log(`Warning: ${e}`)}function o(e){throw new Error(e)}function s(e,t){e||o(t)}function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!1}),n}const c=function(){function e(t){this.constructor===e&&o("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=c,t.PasswordException=class extends c{constructor(e,t){super(e),this.code=t}},t.UnknownErrorException=class extends c{constructor(e,t){super(e),this.details=t}},t.InvalidPDFException=class extends c{},t.MissingPDFException=class extends c{},t.UnexpectedResponseException=class extends c{constructor(e,t){super(e),this.status=t}},t.FormatError=class extends c{},t.AbortException=class extends c{};const u=/\x00/g;function d(e){s("string"==typeof e,"Invalid argument for stringToBytes");const t=e.length,n=new Uint8Array(t);for(let r=0;r<t;++r)n[r]=255&e.charCodeAt(r);return n}function h(e){return void 0!==e.length?e.length:(s(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}const f={get value(){return l(this,"value",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}};t.IsLittleEndianCached=f;const p={get value(){return l(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=p;const m=["rgb(",0,",",0,",",0,")"];class g{static makeCssRgb(e,t,n){return m[1]=e,m[3]=t,m[5]=n,m.join("")}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const n=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n]}static getAxialAlignedBoundingBox(e,t){const n=g.applyTransform(e,t),r=g.applyTransform(e.slice(2,4),t),i=g.applyTransform([e[0],e[3]],t),a=g.applyTransform([e[2],e[1]],t);return[Math.min(n[0],r[0],i[0],a[0]),Math.min(n[1],r[1],i[1],a[1]),Math.max(n[0],r[0],i[0],a[0]),Math.max(n[1],r[1],i[1],a[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static apply3dTransform(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(n+a)/2,s=Math.sqrt((n+a)*(n+a)-4*(n*a-i*r))/2,l=o+s||1,c=o-s||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){function n(e,t){return e-t}const r=[e[0],e[2],t[0],t[2]].sort(n),i=[e[1],e[3],t[1],t[3]].sort(n),a=[];return e=g.normalizeRect(e),t=g.normalizeRect(t),r[0]===e[0]&&r[1]===t[0]||r[0]===t[0]&&r[1]===e[0]?(a[0]=r[1],a[2]=r[2],i[0]===e[1]&&i[1]===t[1]||i[0]===t[1]&&i[1]===e[1]?(a[1]=i[1],a[3]=i[2],a):null):null}}t.Util=g;const v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364],b=function(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,n,r=!1){if(!r&&URL.createObjectURL){const e=new Blob([t],{type:n});return URL.createObjectURL(e)}let i=`data:${n};base64,`;for(let n=0,r=t.length;n<r;n+=3){const a=255&t[n],o=255&t[n+1],s=255&t[n+2];i+=e[a>>2]+e[(3&a)<<4|o>>4]+e[n+1<r?(15&o)<<2|s>>6:64]+e[n+2<r?63&s:64]}return i}}();t.createObjectURL=b},function(e,t,n){"use strict";n(4)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;const r="object"==typeof process&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron;t.isNodeJS=r},function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.build=exports.version=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFWorker=exports.PDFDataRangeTransport=exports.LoopbackPort=void 0;var _util=__w_pdfjs_require__(2),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(6),_api_compatibility=__w_pdfjs_require__(7),_canvas=__w_pdfjs_require__(8),_worker_options=__w_pdfjs_require__(10),_is_node=__w_pdfjs_require__(4),_message_handler=__w_pdfjs_require__(11),_metadata=__w_pdfjs_require__(12),_transport_stream=__w_pdfjs_require__(14),_webgl=__w_pdfjs_require__(15);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let createPDFNetworkStream;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){const t=new PDFDocumentLoadingTask;let n;if("string"==typeof e)n={url:e};else if((0,_util.isArrayBuffer)(e))n={data:e};else if(e instanceof PDFDataRangeTransport)n={range:e};else{if("object"!=typeof e)throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");n=e}const r=Object.create(null);let i=null,a=null;for(const e in n)if("url"!==e||"undefined"==typeof window)if("range"!==e)if("worker"!==e)if("data"!==e||n[e]instanceof Uint8Array)r[e]=n[e];else{const t=n[e];if("string"==typeof t)r[e]=(0,_util.stringToBytes)(t);else if("object"!=typeof t||null===t||isNaN(t.length)){if(!(0,_util.isArrayBuffer)(t))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");r[e]=new Uint8Array(t)}else r[e]=new Uint8Array(t)}else a=n[e];else i=n[e];else r[e]=new URL(n[e],window.location).href;if(r.rangeChunkSize=r.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,r.CMapReaderFactory=r.CMapReaderFactory||_display_utils.DOMCMapReaderFactory,r.ignoreErrors=!0!==r.stopAtErrors,r.fontExtraProperties=!0===r.fontExtraProperties,r.pdfBug=!0===r.pdfBug,Number.isInteger(r.maxImageSize)||(r.maxImageSize=-1),"boolean"!=typeof r.isEvalSupported&&(r.isEvalSupported=!0),"boolean"!=typeof r.disableFontFace&&(r.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1),"boolean"!=typeof r.disableRange&&(r.disableRange=!1),"boolean"!=typeof r.disableStream&&(r.disableStream=!1),"boolean"!=typeof r.disableAutoFetch&&(r.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(r.verbosity),!a){const e={verbosity:r.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};a=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=a}const o=t.docId;return a.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");const e=_fetchDocument(a,r,i,o),n=new Promise((function(e){let t;i?t=new _transport_stream.PDFDataTransportStream({length:r.length,initialData:r.initialData,progressiveDone:r.progressiveDone,disableRange:r.disableRange,disableStream:r.disableStream},i):r.data||(t=createPDFNetworkStream({url:r.url,length:r.length,httpHeaders:r.httpHeaders,withCredentials:r.withCredentials,rangeChunkSize:r.rangeChunkSize,disableRange:r.disableRange,disableStream:r.disableStream})),e(t)}));return Promise.all([e,n]).then((function([e,n]){if(t.destroyed)throw new Error("Loading aborted");const i=new _message_handler.MessageHandler(o,e,a.port);i.postMessageTransfers=a.postMessageTransfers;const s=new WorkerTransport(i,t,n,r);t._transport=s,i.send("Ready",null)}))})).catch(t._capability.reject),t}function _fetchDocument(e,t,n,r){return e.destroyed?Promise.reject(new Error("Worker was destroyed")):(n&&(t.length=n.length,t.initialData=n.initialData,t.progressiveDone=n.progressiveDone),e.messageHandler.sendWithPromise("GetDocRequest",{docId:r,apiVersion:"2.5.207",source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,postMessageTransfers:e.postMessageTransfers,docBaseUrl:t.docBaseUrl,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties}).then((function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t})))}const PDFDocumentLoadingTask=function(){let e=0;return class{constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then(()=>{this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)})}}}();class PDFDataRangeTransport{constructor(e,t,n=!1){this.length=e,this.initialData=t,this.progressiveDone=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const n of this._rangeListeners)n(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(const n of this._progressListeners)n(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(const t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t}get numPages(){return this._pdfInfo.numPages}get fingerprint(){return this._pdfInfo.fingerprint}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getOpenActionDestination(){return(0,_display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."),this.getOpenAction().then((function(e){return e&&e.dest?e.dest:null}))}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getOutline(){return this._transport.getOutline()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getStats(){return this._transport.getStats()}cleanup(){return this._transport.startCleanup()}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(e,t,n,r=!1){this._pageIndex=e,this._pageInfo=t,this._transport=n,this._stats=r?new _display_utils.StatTimer:null,this._pdfBug=r,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:n=0,offsetY:r=0,dontFlip:i=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:i})}getAnnotations({intent:e=null}={}){return this.annotationsPromise&&this.annotationsIntent===e||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,e),this.annotationsIntent=e),this.annotationsPromise}render({canvasContext:e,viewport:t,intent:n="display",enableWebGL:r=!1,renderInteractiveForms:i=!1,transform:a=null,imageLayer:o=null,canvasFactory:s=null,background:l=null}){this._stats&&this._stats.time("Overall");const c="print"===n?"print":"display";this.pendingCleanup=!1,this.intentStates[c]||(this.intentStates[c]=Object.create(null));const u=this.intentStates[c];u.streamReaderCancelTimeout&&(clearTimeout(u.streamReaderCancelTimeout),u.streamReaderCancelTimeout=null);const d=s||new _display_utils.DOMCanvasFactory,h=new _webgl.WebGLContext({enable:r});u.displayReadyCapability||(u.displayReadyCapability=(0,_util.createPromiseCapability)(),u.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:c,renderInteractiveForms:!0===i}));const f=e=>{const t=u.renderTasks.indexOf(p);t>=0&&u.renderTasks.splice(t,1),(this.cleanupAfterRender||"print"===c)&&(this.pendingCleanup=!0),this._tryCleanup(),e?(p.capability.reject(e),this._abortOperatorList({intentState:u,reason:e})):p.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},p=new InternalRenderTask({callback:f,params:{canvasContext:e,viewport:t,transform:a,imageLayer:o,background:l},objs:this.objs,commonObjs:this.commonObjs,operatorList:u.operatorList,pageIndex:this._pageIndex,canvasFactory:d,webGLContext:h,useRequestAnimationFrame:"print"!==c,pdfBug:this._pdfBug});u.renderTasks||(u.renderTasks=[]),u.renderTasks.push(p);const m=p.task;return u.displayReadyCapability.promise.then(e=>{this.pendingCleanup?f():(this._stats&&this._stats.time("Rendering"),p.initializeGraphics(e),p.operatorListChanged())}).catch(f),m}getOperatorList(){this.intentStates.oplist||(this.intentStates.oplist=Object.create(null));const e=this.intentStates.oplist;let t;return e.opListReadCapability||(t={},t.operatorListChanged=function(){if(e.operatorList.lastChunk){e.opListReadCapability.resolve(e.operatorList);const n=e.renderTasks.indexOf(t);n>=0&&e.renderTasks.splice(n,1)}},e.opListReadCapability=(0,_util.createPromiseCapability)(),e.renderTasks=[],e.renderTasks.push(t),e.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:"oplist"})),e.opListReadCapability.promise}streamTextContent({normalizeWhitespace:e=!1,disableCombineTextItems:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===e,combineTextItems:!0!==t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(e={}){const t=this.streamTextContent(e);return new Promise((function(e,n){const r=t.getReader(),i={items:[],styles:Object.create(null)};!function t(){r.read().then((function({value:n,done:r}){r?e(i):(Object.assign(i.styles,n.styles),i.items.push(...n.items),t())}),n)}()}))}_destroy(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;const e=[];return Object.keys(this.intentStates).forEach(t=>{const n=this.intentStates[t];this._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==t&&n.renderTasks.forEach((function(t){const n=t.capability.promise.catch((function(){}));e.push(n),t.cancel()}))}),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(e)}cleanup(e=!1){return this.pendingCleanup=!0,this._tryCleanup(e)}_tryCleanup(e=!1){return!(!this.pendingCleanup||Object.keys(this.intentStates).some(e=>{const t=this.intentStates[e];return 0!==t.renderTasks.length||!t.operatorList.lastChunk})||(Object.keys(this.intentStates).forEach(e=>{delete this.intentStates[e]}),this.objs.clear(),this.annotationsPromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,0))}_startRenderPage(e,t){const n=this.intentStates[t];n&&(this._stats&&this._stats.timeEnd("Page Request"),n.displayReadyCapability&&n.displayReadyCapability.resolve(e))}_renderPageChunk(e,t){for(let n=0,r=e.length;n<r;n++)t.operatorList.fnArray.push(e.fnArray[n]),t.operatorList.argsArray.push(e.argsArray[n]);t.operatorList.lastChunk=e.lastChunk;for(let e=0;e<t.renderTasks.length;e++)t.renderTasks[e].operatorListChanged();e.lastChunk&&this._tryCleanup()}_pumpOperatorList(e){(0,_util.assert)(e.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');const t=this._transport.messageHandler.sendWithStream("GetOperatorList",e).getReader(),n=this.intentStates[e.intent];n.streamReader=t;const r=()=>{t.read().then(({value:e,done:t})=>{t?n.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,n),r())},e=>{if(n.streamReader=null,!this._transport.destroyed){if(n.operatorList){n.operatorList.lastChunk=!0;for(let e=0;e<n.renderTasks.length;e++)n.renderTasks[e].operatorListChanged();this._tryCleanup()}if(n.displayReadyCapability)n.displayReadyCapability.reject(e);else{if(!n.opListReadCapability)throw e;n.opListReadCapability.reject(e)}}})};r()}_abortOperatorList({intentState:e,reason:t,force:n=!1}){if((0,_util.assert)(t instanceof Error||"object"==typeof t&&null!==t,'PDFPageProxy._abortOperatorList: Expected "reason" argument.'),e.streamReader){if(!n){if(0!==e.renderTasks.length)return;if(t instanceof _display_utils.RenderingCancelledException)return void(e.streamReaderCancelTimeout=setTimeout(()=>{this._abortOperatorList({intentState:e,reason:t,force:!0}),e.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT))}e.streamReader.cancel(new _util.AbortException(t&&t.message)),e.streamReader=null,this._transport.destroyed||(Object.keys(this.intentStates).some(t=>this.intentStates[t]===e&&(delete this.intentStates[t],!0)),this.cleanup())}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(e=!0){this._listeners=[],this._defer=e,this._deferred=Promise.resolve(void 0)}postMessage(e,t){if(!this._defer)return void this._listeners.forEach(t=>{t.call(this,{data:e})});const n=new WeakMap,r={data:function e(r){if("object"!=typeof r||null===r)return r;if(n.has(r))return n.get(r);let i,a;if((i=r.buffer)&&(0,_util.isArrayBuffer)(i))return a=t&&t.includes(i)?new r.constructor(i,r.byteOffset,r.byteLength):new r.constructor(r),n.set(r,a),a;a=Array.isArray(r)?[]:{},n.set(r,a);for(const t in r){let n,i=r;for(;!(n=Object.getOwnPropertyDescriptor(i,t));)i=Object.getPrototypeOf(i);if(void 0!==n.value)if("function"!=typeof n.value)a[t]=e(n.value);else if(r.hasOwnProperty&&r.hasOwnProperty(t))throw new Error(`LoopbackPort.postMessage - cannot clone: ${r[t]}`)}return a}(e)};this._deferred.then(()=>{this._listeners.forEach(e=>{e.call(this,r)})})}addEventListener(e,t){this._listeners.push(t)}removeEventListener(e,t){const n=this._listeners.indexOf(t);this._listeners.splice(n,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorker=function PDFWorkerClosure(){const pdfWorkerPorts=new WeakMap;let isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document&&"currentScript"in document){const e=document.currentScript&&document.currentScript.src;e&&(fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(void 0!==fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){let e;try{e=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(e){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();const loader=async function(){const mainWorkerMessageHandler=getMainThreadWorkerMessageHandler();if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(getWorkerSrc());return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(getWorkerSrc()),window.pdfjsWorker.WorkerMessageHandler};return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){const t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}class PDFWorker{constructor({name:e=null,port:t=null,verbosity:n=(0,_util.getVerbosityLevel)()}={}){if(t&&pdfWorkerPorts.has(t))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=e,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=n,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t)return pdfWorkerPorts.set(t,this),void this._initializeFromPort(t);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}_initialize(){if("undefined"!=typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){let e=getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,e)||(e=createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e),n=new _message_handler.MessageHandler("main","worker",t),r=()=>{t.removeEventListener("error",i),n.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},i=()=>{this._webWorker||r()};t.addEventListener("error",i),n.on("test",e=>{t.removeEventListener("error",i),this.destroyed?r():e?(this._messageHandler=n,this._port=t,this._webWorker=t,e.supportTransfers||(this.postMessageTransfers=!1),this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),n.destroy(),t.terminate())}),n.on("ready",e=>{if(t.removeEventListener("error",i),this.destroyed)r();else try{a()}catch(e){this._setupFakeWorker()}});const a=()=>{const e=new Uint8Array([this.postMessageTransfers?255:0]);try{n.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers."),e[0]=0,n.send("test",e)}};return void a()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then(e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new LoopbackPort;this._port=t;const n="fake"+nextFakeWorkerId++,r=new _message_handler.MessageHandler(n+"_worker",n,t);e.setup(r,t);const i=new _message_handler.MessageHandler(n,n+"_worker",t);this._messageHandler=i,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})}).catch(e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(e.port)?pdfWorkerPorts.get(e.port):new PDFWorker(e)}static getWorkerSrc(){return getWorkerSrc()}}return PDFWorker}();exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(e,t,n,r){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this)}),this._params=r,this.CMapReaderFactory=new r.CMapReaderFactory({baseUrl:r.cMapUrl,isCompressed:r.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];this.pageCache.forEach((function(t){t&&e.push(t._destroy())})),this.pageCache.length=0,this.pagePromises.length=0;const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{this.fontLoader.clear(),this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function({value:e,done:n}){n?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(e),"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch(e=>{t.error(e)})},t.onCancel=e=>{this._fullReader.cancel(e)}}),e.on("ReaderHeadersReady",e=>{const n=(0,_util.createPromiseCapability)(),r=this._fullReader;return r.headersReady.then(()=>{r.isStreamingSupported&&r.isRangeSupported||(this._lastProgress&&t.onProgress&&t.onProgress(this._lastProgress),r.onProgress=e=>{t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:r.isStreamingSupported,isRangeSupported:r.isRangeSupported,contentLength:r.contentLength})},n.reject),n.promise}),e.on("GetRangeReader",(e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const n=this._networkStream.getRangeReader(e.begin,e.end);n?(t.onPull=()=>{n.read().then((function({value:e,done:n}){n?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(e),"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch(e=>{t.error(e)})},t.onCancel=e=>{n.cancel(e)}):t.close()}),e.on("GetDoc",({pdfInfo:e})=>{this._numPages=e.numPages,t._capability.resolve(new PDFDocumentProxy(e,this))}),e.on("DocException",(function(e){let n;switch(e.name){case"PasswordException":n=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":n=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":n=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":n=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":n=new _util.UnknownErrorException(e.message,e.details)}t._capability.reject(n)})),e.on("PasswordRequest",e=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),t.onPassword){const n=e=>{this._passwordCapability.resolve({password:e})};try{t.onPassword(n,e.code)}catch(e){this._passwordCapability.reject(e)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise}),e.on("DataLoaded",e=>{t.onProgress&&t.onProgress({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)}),e.on("StartRenderPage",e=>{this.destroyed||this.pageCache[e.pageIndex]._startRenderPage(e.transparency,e.intent)}),e.on("commonobj",t=>{if(this.destroyed)return;const[n,r,i]=t;if(!this.commonObjs.has(n))switch(r){case"Font":const t=this._params;if("error"in i){const e=i.error;(0,_util.warn)(`Error during font loading: ${e}`),this.commonObjs.resolve(n,e);break}let a=null;t.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(a={registerFont(e,t){globalThis.FontInspector.fontAdded(e,t)}});const o=new _font_loader.FontFaceObject(i,{isEvalSupported:t.isEvalSupported,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:a});this.fontLoader.bind(o).catch(t=>e.sendWithPromise("FontFallback",{id:n})).finally(()=>{!t.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(n,o)});break;case"FontPath":case"FontType3Res":case"Image":this.commonObjs.resolve(n,i);break;default:throw new Error(`Got unknown common object type ${r}`)}}),e.on("obj",e=>{if(this.destroyed)return;const[t,n,r,i]=e,a=this.pageCache[n];if(!a.objs.has(t))switch(r){case"Image":a.objs.resolve(t,i);const e=8e6;i&&"data"in i&&i.data.length>e&&(a.cleanupAfterRender=!0);break;default:throw new Error(`Got unknown object type ${r}`)}}),e.on("DocProgress",e=>{this.destroyed||t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),e.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),e.on("FetchBuiltInCMap",(e,t)=>{if(this.destroyed)return void t.error(new Error("Worker was destroyed"));let n=!1;t.onPull=()=>{n?t.close():(n=!0,this.CMapReaderFactory.fetch(e).then((function(e){t.enqueue(e,1,[e.cMapData.buffer])})).catch((function(e){t.error(e)})))}})}_onUnsupportedFeature({featureId:e}){this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(e)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));const t=e-1;if(t in this.pagePromises)return this.pagePromises[t];const n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(e=>{if(this.destroyed)throw new Error("Transport destroyed");const n=new PDFPageProxy(t,e,this,this._params.pdfBug);return this.pageCache[t]=n,n});return this.pagePromises[t]=n,n}getPageIndex(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch((function(e){return Promise.reject(new Error(e))}))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(e=>({info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:this._fullReader?this._fullReader.filename:null}))}getStats(){return this.messageHandler.sendWithPromise("GetStats",null)}startCleanup(){return this.messageHandler.sendWithPromise("Cleanup",null).then(()=>{for(let e=0,t=this.pageCache.length;e<t;e++){const t=this.pageCache[e];if(t&&!t.cleanup())throw new Error(`startCleanup: Page ${e+1} is currently rendering.`)}this.commonObjs.clear(),this.fontLoader.clear()})}get loadingParams(){const e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,disableFontFace:e.disableFontFace})}}class PDFObjects{constructor(){this._objs=Object.create(null)}_ensureObj(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}get(e,t=null){if(t)return this._ensureObj(e).capability.promise.then(t),null;const n=this._objs[e];if(!n||!n.resolved)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return n.data}has(e){const t=this._objs[e];return!!t&&t.resolved}resolve(e,t){const n=this._ensureObj(e);n.resolved=!0,n.data=t,n.capability.resolve(t)}clear(){this._objs=Object.create(null)}}class RenderTask{constructor(e){this._internalRenderTask=e,this.onContinue=null}get promise(){return this._internalRenderTask.capability.promise}cancel(){this._internalRenderTask.cancel()}}const InternalRenderTask=function(){const e=new WeakSet;return class{constructor({callback:e,params:t,objs:n,commonObjs:r,operatorList:i,pageIndex:a,canvasFactory:o,webGLContext:s,useRequestAnimationFrame:l=!1,pdfBug:c=!1}){this.callback=e,this.params=t,this.objs=n,this.commonObjs=r,this.operatorListIdx=null,this.operatorList=i,this._pageIndex=a,this.canvasFactory=o,this.webGLContext=s,this._pdfBug=c,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===l&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}initializeGraphics(t=!1){if(this.cancelled)return;if(this._canvas){if(e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager&&globalThis.StepperManager.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:n,viewport:r,transform:i,imageLayer:a,background:o}=this.params;this.gfx=new _canvas.CanvasGraphics(n,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,a),this.gfx.beginDrawing({transform:i,viewport:r,transparency:t,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(t=null){this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this.cancel.bind(this))}):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback())))}}}(),version="2.5.207";exports.version=version;const build="0974d605";exports.build=build},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var r=n(2);class i{constructor({docId:e,onUnsupportedFeature:t}){this.constructor===i&&(0,r.unreachable)("Cannot initialize BaseFontLoader."),this.docId=e,this._onUnsupportedFeature=t,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(e){this.nativeFontFaces.push(e),document.fonts.add(e)}insertRule(e){let t=this.styleElement;t||(t=this.styleElement=document.createElement("style"),t.id=`PDFJS_FONT_STYLE_TAG_${this.docId}`,document.documentElement.getElementsByTagName("head")[0].appendChild(t));const n=t.sheet;n.insertRule(e,n.cssRules.length)}clear(){this.nativeFontFaces.forEach((function(e){document.fonts.delete(e)})),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return;if(e.attached=!0,this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(n){throw this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,r.warn)(`Failed to load font '${t.family}': '${n}'.`),e.disableFontFace=!0,n}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(n=>{const r=this._queueLoadingCallback(n);this._prepareFontLoadEvent([t],[e],r)})}}_queueLoadingCallback(e){(0,r.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){const e="undefined"!=typeof document&&!!document.fonts;return(0,r.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){(0,r.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,r.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(e,t,n){(0,r.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let a;t.FontLoader=a,t.FontLoader=a=class extends i{constructor(e){super(e),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let e=!1;if("undefined"==typeof navigator)e=!0;else{const t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]>=14&&(e=!0)}return(0,r.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const t=this.loadingContext,n={id:`pdfjs-font-loading-${t.nextRequestId++}`,done:!1,complete:function(){for((0,r.assert)(!n.done,"completeRequest() cannot be called twice."),n.done=!0;t.requests.length>0&&t.requests[0].done;){const e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(n),n}get _loadTestFont(){return(0,r.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t,n){function i(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,n,r){return e.substring(0,t)+r+e.substring(t+n)}let o,s;const l=document.createElement("canvas");l.width=1,l.height=1;const c=l.getContext("2d");let u=0;const d=`lt${Date.now()}${this.loadTestFontId++}`;let h=this._loadTestFont;h=a(h,976,d.length,d);let f=i(h,16);for(o=0,s=d.length-3;o<s;o+=4)f=f-1482184792+i(d,o)|0;o<d.length&&(f=f-1482184792+i(d+"XXX",o)|0),h=a(h,16,4,(0,r.string32)(f));const p=`@font-face {font-family:"${d}";src:${`url(data:font/opentype;base64,${btoa(h)});`}}`;this.insertRule(p);const m=[];for(o=0,s=t.length;o<s;o++)m.push(t[o].loadedName);m.push(d);const g=document.createElement("div");for(g.style.visibility="hidden",g.style.width=g.style.height="10px",g.style.position="absolute",g.style.top=g.style.left="0px",o=0,s=m.length;o<s;++o){const e=document.createElement("span");e.textContent="Hi",e.style.fontFamily=m[o],g.appendChild(e)}document.body.appendChild(g),function e(t,n){if(u++,u>30)return(0,r.warn)("Load test font never loaded."),void n();c.font="30px "+t,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?n():setTimeout(e.bind(null,t,n))}(d,(function(){document.body.removeChild(g),n.complete()}))}},t.FontFaceObject=class{constructor(e,{isEvalSupported:t=!0,disableFontFace:n=!1,ignoreErrors:r=!1,onUnsupportedFeature:i=null,fontRegistry:a=null}){this.compiledGlyphs=Object.create(null);for(const t in e)this[t]=e[t];this.isEvalSupported=!1!==t,this.disableFontFace=!0===n,this.ignoreErrors=!0===r,this._onUnsupportedFeature=i,this.fontRegistry=a}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;const e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=(0,r.bytesToString)(new Uint8Array(this.data)),t=`url(data:${this.mimetype};base64,${btoa(e)});`,n=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,t),n}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let n,i;try{n=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,r.warn)(`getPathGenerator - ignoring character: "${e}".`),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&r.IsEvalSupportedCached.value){let e,r="";for(let t=0,a=n.length;t<a;t++)i=n[t],e=void 0!==i.args?i.args.join(","):"",r+="c."+i.cmd+"("+e+");\n";return this.compiledGlyphs[t]=new Function("c","size",r)}return this.compiledGlyphs[t]=function(e,t){for(let r=0,a=n.length;r<a;r++)i=n[r],"scale"===i.cmd&&(i.args=[t,-t]),e[i.cmd].apply(e,i.args)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.apiCompatibilityParams=void 0;var r=n(4);const i=Object.create(null);r.isNodeJS&&(i.disableFontFace=!0);const a=Object.freeze(i);t.apiCompatibilityParams=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var r=n(2),i=n(9);function a(e){e.mozCurrentTransform||(e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[],Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=this._transformMatrix,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=t*i-n*r,l=n*r-t*i;return[i/s,n/l,r/l,t/s,(i*a-r*o)/l,(n*a-t*o)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var n=this._transformMatrix;n[4]=n[0]*e+n[2]*t+n[4],n[5]=n[1]*e+n[3]*t+n[5],this._originalTranslate(e,t)},e.scale=function(e,t){var n=this._transformMatrix;n[0]=n[0]*e,n[1]=n[1]*e,n[2]=n[2]*t,n[3]=n[3]*t,this._originalScale(e,t)},e.transform=function(t,n,r,i,a,o){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*n,s[1]*t+s[3]*n,s[0]*r+s[2]*i,s[1]*r+s[3]*i,s[0]*a+s[2]*o+s[4],s[1]*a+s[3]*o+s[5]],e._originalTransform(t,n,r,i,a,o)},e.setTransform=function(t,n,r,i,a,o){this._transformMatrix=[t,n,r,i,a,o],e._originalSetTransform(t,n,r,i,a,o)},e.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this._transformMatrix;this._transformMatrix=[r[0]*t+r[2]*n,r[1]*t+r[3]*n,r[0]*-n+r[2]*t,r[1]*-n+r[3]*t,r[4],r[5]],this._originalRotate(e)})}var o=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,n,r){var i;return void 0!==this.cache[e]?(i=this.cache[e],this.canvasFactory.reset(i,t,n),i.context.setTransform(1,0,0,1,0,0)):(i=this.canvasFactory.create(t,n),this.cache[e]=i),r&&a(i.context),i},clear(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}(),s=function(){function e(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=r.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=r.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.resumeSMaskCtx=null}return e.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}},e}(),l=function(){function e(e,t,n,r,i,l){this.ctx=e,this.current=new s,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=n,this.canvasFactory=r,this.webGLContext=i,this.imageLayer=l,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new o(this.canvasFactory),e&&a(e),this._cachedGetSinglePixelWidth=null}function t(e,t){if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var n,i,a,o,s,l=t.height,c=t.width,u=l%16,d=(l-u)/16,h=0===u?d:d+1,f=e.createImageData(c,16),p=0,m=t.data,g=f.data;if(t.kind===r.ImageKind.GRAYSCALE_1BPP){var v=m.byteLength,b=new Uint32Array(g.buffer,0,g.byteLength>>2),y=b.length,A=c+7>>3,_=4294967295,w=r.IsLittleEndianCached.value?4278190080:255;for(i=0;i<h;i++){for(o=i<d?16:u,n=0,a=0;a<o;a++){for(var E=v-p,S=0,C=E>A?c:8*E-7,T=-8&C,k=0,x=0;S<T;S+=8)x=m[p++],b[n++]=128&x?_:w,b[n++]=64&x?_:w,b[n++]=32&x?_:w,b[n++]=16&x?_:w,b[n++]=8&x?_:w,b[n++]=4&x?_:w,b[n++]=2&x?_:w,b[n++]=1&x?_:w;for(;S<C;S++)0===k&&(x=m[p++],k=128),b[n++]=x&k?_:w,k>>=1}for(;n<y;)b[n++]=0;e.putImageData(f,0,16*i)}}else if(t.kind===r.ImageKind.RGBA_32BPP){for(a=0,s=16*c*4,i=0;i<d;i++)g.set(m.subarray(p,p+s)),p+=s,e.putImageData(f,0,a),a+=16;i<h&&(s=c*u*4,g.set(m.subarray(p,p+s)),e.putImageData(f,0,a))}else{if(t.kind!==r.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${t.kind}`);for(s=c*(o=16),i=0;i<h;i++){for(i>=d&&(s=c*(o=u)),n=0,a=s;a--;)g[n++]=m[p++],g[n++]=m[p++],g[n++]=m[p++],g[n++]=255;e.putImageData(f,0,16*i)}}}}function n(e,t){for(var n=t.height,r=t.width,i=n%16,a=(n-i)/16,o=0===i?a:a+1,s=e.createImageData(r,16),l=0,c=t.data,u=s.data,d=0;d<o;d++){for(var h=d<a?16:i,f=3,p=0;p<h;p++)for(var m=0,g=0;g<r;g++){if(!m){var v=c[l++];m=128}u[f]=v&m?0:255,f+=4,m>>=1}e.putImageData(s,0,16*d)}}function l(e,t){for(var n=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],r=0,i=n.length;r<i;r++){var a=n[r];void 0!==e[a]&&(t[a]=e[a])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function c(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function u(e,t,n,r){for(var i=e.length,a=3;a<i;a+=4){var o=e[a];if(0===o)e[a-3]=t,e[a-2]=n,e[a-1]=r;else if(o<255){var s=255-o;e[a-3]=e[a-3]*o+t*s>>8,e[a-2]=e[a-2]*o+n*s>>8,e[a-1]=e[a-1]*o+r*s>>8}}}function d(e,t,n){for(var r=e.length,i=3;i<r;i+=4){var a=n?n[e[i]]:e[i];t[i]=t[i]*a*(1/255)|0}}function h(e,t,n){for(var r=e.length,i=3;i<r;i+=4){var a=77*e[i-3]+152*e[i-2]+28*e[i-1];t[i]=n?t[i]*n[a>>8]>>8:t[i]*a>>16}}function f(e,t,n,r){var i=t.canvas,a=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var o=t.backdrop||null;if(!t.transferMap&&r.isEnabled){const a=r.composeSMask({layer:n.canvas,mask:i,properties:{subtype:t.subtype,backdrop:o}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(a,t.offsetX,t.offsetY)}!function(e,t,n,r,i,a,o){var s,l=!!a,c=l?a[0]:0,f=l?a[1]:0,p=l?a[2]:0;s="Luminosity"===i?h:d;for(var m=Math.min(r,Math.ceil(1048576/n)),g=0;g<r;g+=m){var v=Math.min(m,r-g),b=e.getImageData(0,g,n,v),y=t.getImageData(0,g,n,v);l&&u(b.data,c,f,p),s(b.data,y.data,o),e.putImageData(y,0,g)}}(a,n,i.width,i.height,t.subtype,o,t.transferMap),e.drawImage(i,0,0)}var p=["butt","round","square"],m=["miter","round","bevel"],g={},v={};for(var b in e.prototype={beginDrawing({transform:e,viewport:t,transparency:n=!1,background:r=null}){var i=this.ctx.canvas.width,a=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=r||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,i,a),this.ctx.restore(),n){var o=this.cachedCanvases.getCanvas("transparent",i,a,!0);this.compositeCtx=this.ctx,this.transparentCanvas=o.canvas,this.ctx=o.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),c(this.ctx),e&&this.ctx.transform.apply(this.ctx,e),this.ctx.transform.apply(this.ctx,t.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(e,t,n,i){var a=e.argsArray,o=e.fnArray,s=t||0,l=a.length;if(l===s)return s;for(var c,u=l-s>10&&"function"==typeof n,d=u?Date.now()+15:0,h=0,f=this.commonObjs,p=this.objs;;){if(void 0!==i&&s===i.nextBreakPoint)return i.breakIt(s,n),s;if((c=o[s])!==r.OPS.dependency)this[c].apply(this,a[s]);else for(const e of a[s]){const t=e.startsWith("g_")?f:p;if(!t.has(e))return t.get(e,n),s}if(++s===l)return s;if(u&&++h>10){if(Date.now()>d)return n(),s;h=0}}},endDrawing:function(){null!==this.current.activeSMask&&this.endSMaskGroup(),this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=p[e]},setLineJoin:function(e){this.ctx.lineJoin=m[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var n=this.ctx;void 0!==n.setLineDash&&(n.setLineDash(e),n.lineDashOffset=t)},setRenderingIntent(e){},setFlatness(e){},setGState:function(e){for(var t=0,n=e.length;t<n;t++){var r=e[t],i=r[0],a=r[1];switch(i){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=r[1];break;case"ca":this.current.fillAlpha=r[1],this.ctx.globalAlpha=r[1];break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=a?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,n=e.canvas.height,r="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(r,t,n,!0),a=this.ctx,o=a.mozCurrentTransform;this.ctx.save();var s=i.context;s.scale(1/e.scaleX,1/e.scaleY),s.translate(-e.offsetX,-e.offsetY),s.transform.apply(s,o),e.startTransformInverse=s.mozCurrentTransformInverse,l(a,s),this.ctx=s,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(a),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),f(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),l(e,this.ctx),this.current.resumeSMaskCtx=e;var t=r.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()},resumeSMaskGroup:function(){var e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),f(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),l(e,this.ctx);var t=r.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)},save:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)},transform:function(e,t,n,r,i,a){this.ctx.transform(e,t,n,r,i,a),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var n=this.ctx,i=this.current,a=i.x,o=i.y,s=0,l=0,c=e.length;s<c;s++)switch(0|e[s]){case r.OPS.rectangle:a=t[l++],o=t[l++];var u=t[l++],d=t[l++];0===u&&(u=this.getSinglePixelWidth()),0===d&&(d=this.getSinglePixelWidth());var h=a+u,f=o+d;this.ctx.moveTo(a,o),this.ctx.lineTo(h,o),this.ctx.lineTo(h,f),this.ctx.lineTo(a,f),this.ctx.lineTo(a,o),this.ctx.closePath();break;case r.OPS.moveTo:a=t[l++],o=t[l++],n.moveTo(a,o);break;case r.OPS.lineTo:a=t[l++],o=t[l++],n.lineTo(a,o);break;case r.OPS.curveTo:a=t[l+4],o=t[l+5],n.bezierCurveTo(t[l],t[l+1],t[l+2],t[l+3],a,o),l+=6;break;case r.OPS.curveTo2:n.bezierCurveTo(a,o,t[l],t[l+1],t[l+2],t[l+3]),a=t[l+2],o=t[l+3],l+=4;break;case r.OPS.curveTo3:a=t[l+2],o=t[l+3],n.bezierCurveTo(t[l],t[l+1],a,o,a,o),l+=4;break;case r.OPS.closePath:n.closePath()}i.setCurrentPoint(a,o)},closePath:function(){this.ctx.closePath()},stroke:function(e){e=void 0===e||e;var t=this.ctx,n=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,n&&n.hasOwnProperty("type")&&"Pattern"===n.type){t.save();const e=t.mozCurrentTransform,i=r.Util.singularValueDecompose2dScale(e)[0];t.strokeStyle=n.getPattern(t,this),t.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth*i),t.stroke(),t.restore()}else t.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth),t.stroke();e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e=void 0===e||e;var t=this.ctx,n=this.current.fillColor,r=!1;this.current.patternFill&&(t.save(),this.baseTransform&&t.setTransform.apply(t,this.baseTransform),t.fillStyle=n.getPattern(t,this),r=!0),this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill(),r&&t.restore(),e&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=g},eoClip:function(){this.pendingClip=v},beginText:function(){this.current.textMatrix=r.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var n=0;n<e.length;n++){var r=e[n];t.setTransform.apply(t,r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()},setCharSpacing:function(e){this.current.charSpacing=e},setWordSpacing:function(e){this.current.wordSpacing=e},setHScale:function(e){this.current.textHScale=e/100},setLeading:function(e){this.current.leading=-e},setFont:function(e,t){var n=this.commonObjs.get(e),i=this.current;if(!n)throw new Error(`Can't find font for ${e}`);if(i.fontMatrix=n.fontMatrix?n.fontMatrix:r.FONT_IDENTITY_MATRIX,0!==i.fontMatrix[0]&&0!==i.fontMatrix[3]||(0,r.warn)("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=n,this.current.fontSize=t,n.isType3Font)return;var a=n.loadedName||"sans-serif";let o="normal";n.black?o="900":n.bold&&(o="bold");var s=n.italic?"italic":"normal",l=`"${a}", ${n.fallbackName}`;let c=t;t<16?c=16:t>100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font=`${s} ${o} ${c}px ${l}`},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,n,r,i,a){this.current.textMatrix=[e,t,n,r,i,a],this.current.textMatrixScale=Math.sqrt(e*e+t*t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar(e,t,n,i){var a=this.ctx,o=this.current,s=o.font,l=o.textRenderingMode,c=o.fontSize/o.fontSizeScale,u=l&r.TextRenderingMode.FILL_STROKE_MASK,d=!!(l&r.TextRenderingMode.ADD_TO_PATH_FLAG);const h=o.patternFill&&!s.missingFile;var f;(s.disableFontFace||d||h)&&(f=s.getPathGenerator(this.commonObjs,e)),s.disableFontFace||h?(a.save(),a.translate(t,n),a.beginPath(),f(a,c),i&&a.setTransform.apply(a,i),u!==r.TextRenderingMode.FILL&&u!==r.TextRenderingMode.FILL_STROKE||a.fill(),u!==r.TextRenderingMode.STROKE&&u!==r.TextRenderingMode.FILL_STROKE||a.stroke(),a.restore()):(u!==r.TextRenderingMode.FILL&&u!==r.TextRenderingMode.FILL_STROKE||a.fillText(e,t,n),u!==r.TextRenderingMode.STROKE&&u!==r.TextRenderingMode.FILL_STROKE||a.strokeText(e,t,n)),d&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:a.mozCurrentTransform,x:t,y:n,fontSize:c,addToPath:f})},get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,n=!1,i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){n=!0;break}return(0,r.shadow)(this,"isFontSubpixelAAEnabled",n)},showText:function(e){var t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);var i=t.fontSize;if(0===i)return;var a=this.ctx,o=t.fontSizeScale,s=t.charSpacing,l=t.wordSpacing,c=t.fontDirection,u=t.textHScale*c,d=e.length,h=n.vertical,f=h?1:-1,p=n.defaultVMetrics,m=i*t.fontMatrix[0],g=t.textRenderingMode===r.TextRenderingMode.FILL&&!n.disableFontFace&&!t.patternFill;let v;if(a.save(),t.patternFill){a.save();const e=t.fillColor.getPattern(a,this);v=a.mozCurrentTransform,a.restore(),a.fillStyle=e}a.transform.apply(a,t.textMatrix),a.translate(t.x,t.y+t.textRise),c>0?a.scale(u,-1):a.scale(u,1);var b=t.lineWidth,y=t.textMatrixScale;if(0===y||0===b){var A=t.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;A!==r.TextRenderingMode.STROKE&&A!==r.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,b=.65*this.getSinglePixelWidth())}else b/=y;1!==o&&(a.scale(o,o),b/=o),a.lineWidth=b;var _,w=0;for(_=0;_<d;++_){var E=e[_];if((0,r.isNum)(E))w+=f*E*i/1e3;else{var S,C,T,k,x,O,I,M=!1,P=(E.isSpace?l:0)+s,D=E.fontChar,N=E.accent,L=E.width;if(h?(x=E.vmetric||p,O=-(O=E.vmetric?x[1]:.5*L)*m,I=x[2]*m,L=x?-x[0]:L,S=O/o,C=(w+I)/o):(S=w/o,C=0),n.remeasure&&L>0){var R=1e3*a.measureText(D).width/i*o;if(L<R&&this.isFontSubpixelAAEnabled){var B=L/R;M=!0,a.save(),a.scale(B,1),S/=B}else L!==R&&(S+=(L-R)/2e3*i/o)}(E.isInFont||n.missingFile)&&(g&&!N?a.fillText(D,S,C):(this.paintChar(D,S,C,v),N&&(T=S+N.offset.x/o,k=C-N.offset.y/o,this.paintChar(N.fontChar,T,k,v)))),w+=h?L*m-P*c:L*m+P*c,M&&a.restore()}}h?t.y-=w:t.x+=w*u,a.restore()},showType3Text:function(e){var t,n,i,a,o=this.ctx,s=this.current,l=s.font,c=s.fontSize,u=s.fontDirection,d=l.vertical?1:-1,h=s.charSpacing,f=s.wordSpacing,p=s.textHScale*u,m=s.fontMatrix||r.FONT_IDENTITY_MATRIX,g=e.length;if(s.textRenderingMode!==r.TextRenderingMode.INVISIBLE&&0!==c){for(this._cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,s.textMatrix),o.translate(s.x,s.y),o.scale(p,u),t=0;t<g;++t)if(n=e[t],(0,r.isNum)(n))a=d*n*c/1e3,this.ctx.translate(a,0),s.x+=a*p;else{var v=(n.isSpace?f:0)+h,b=l.charProcOperatorList[n.operatorListId];b?(this.processingType3=n,this.save(),o.scale(c,c),o.transform.apply(o,m),this.executeOperatorList(b),this.restore(),i=r.Util.applyTransform([n.width,0],m)[0]*c+v,o.translate(i,0),s.x+=i*p):(0,r.warn)(`Type3 character "${n.operatorListId}" is not available.`)}o.restore(),this.processingType3=null}},setCharWidth:function(e,t){},setCharWidthAndBounds:function(e,t,n,r,i,a){this.ctx.rect(n,r,i-n,a-r),this.clip(),this.endPath()},getColorN_Pattern:function(t){var n;if("TilingPattern"===t[0]){var r=t[1],a=this.baseTransform||this.ctx.mozCurrentTransform.slice(),o={createCanvasGraphics:t=>new e(t,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext)};n=new i.TilingPattern(t,r,this.ctx,o,a)}else n=(0,i.getShadingPatternFromIR)(t);return n},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(e,t,n){var i=r.Util.makeCssRgb(e,t,n);this.ctx.strokeStyle=i,this.current.strokeColor=i},setFillRGBColor:function(e,t,n){var i=r.Util.makeCssRgb(e,t,n);this.ctx.fillStyle=i,this.current.fillColor=i,this.current.patternFill=!1},shadingFill:function(e){var t=this.ctx;this.save();var n=(0,i.getShadingPatternFromIR)(e);t.fillStyle=n.getPattern(t,this,!0);var a=t.mozCurrentTransformInverse;if(a){var o=t.canvas,s=o.width,l=o.height,c=r.Util.applyTransform([0,0],a),u=r.Util.applyTransform([0,l],a),d=r.Util.applyTransform([s,0],a),h=r.Util.applyTransform([s,l],a),f=Math.min(c[0],u[0],d[0],h[0]),p=Math.min(c[1],u[1],d[1],h[1]),m=Math.max(c[0],u[0],d[0],h[0]),g=Math.max(c[1],u[1],d[1],h[1]);this.ctx.fillRect(f,p,m-f,g-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,r.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,r.unreachable)("Should not call beginImageData")},paintFormXObjectBegin:function(e,t){if(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t){var n=t[2]-t[0],r=t[3]-t[1];this.ctx.rect(t[0],t[1],n,r),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(e){this.save();var t=this.ctx;e.isolated||(0,r.info)("TODO: Support non-isolated groups."),e.knockout&&(0,r.warn)("Knockout groups not supported.");var n=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var i=r.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),a=[0,0,t.canvas.width,t.canvas.height];i=r.Util.intersect(i,a)||[0,0,0,0];var o=Math.floor(i[0]),s=Math.floor(i[1]),c=Math.max(Math.ceil(i[2])-o,1),u=Math.max(Math.ceil(i[3])-s,1),d=1,h=1;c>4096&&(d=c/4096,c=4096),u>4096&&(h=u/4096,u=4096);var f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(f,c,u,!0),m=p.context;m.scale(1/d,1/h),m.translate(-o,-s),m.transform.apply(m,n),e.smask?this.smaskStack.push({canvas:p.canvas,context:m,offsetX:o,offsetY:s,scaleX:d,scaleY:h,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(o,s),t.scale(d,h)),l(t,m),this.ctx=m,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null},endGroup:function(e){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,n){if(this.save(),c(this.ctx),this.current=new s,Array.isArray(e)&&4===e.length){var r=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],r,i),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,n)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){var t=this.ctx,r=e.width,i=e.height,a=this.current.fillColor,o=this.current.patternFill,s=this.processingType3;if(s&&void 0===s.compiled&&(s.compiled=r<=1e3&&i<=1e3?function(e){var t,n,r,i,a=e.width,o=e.height,s=a+1,l=new Uint8Array(s*(o+1)),c=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),u=a+7&-8,d=e.data,h=new Uint8Array(u*o),f=0;for(t=0,i=d.length;t<i;t++)for(var p=128,m=d[t];p>0;)h[f++]=m&p?0:255,p>>=1;var g=0;for(0!==h[f=0]&&(l[0]=1,++g),n=1;n<a;n++)h[f]!==h[f+1]&&(l[n]=h[f]?2:1,++g),f++;for(0!==h[f]&&(l[n]=2,++g),t=1;t<o;t++){r=t*s,h[(f=t*u)-u]!==h[f]&&(l[r]=h[f]?1:8,++g);var v=(h[f]?4:0)+(h[f-u]?8:0);for(n=1;n<a;n++)c[v=(v>>2)+(h[f+1]?4:0)+(h[f-u+1]?8:0)]&&(l[r+n]=c[v],++g),f++;if(h[f-u]!==h[f]&&(l[r+n]=h[f]?2:4,++g),g>1e3)return null}for(r=t*s,0!==h[f=u*(o-1)]&&(l[r]=8,++g),n=1;n<a;n++)h[f]!==h[f+1]&&(l[r+n]=h[f]?4:8,++g),f++;if(0!==h[f]&&(l[r+n]=4,++g),g>1e3)return null;var b=new Int32Array([0,s,-1,0,-s,0,0,0,1]),y=[];for(t=0;g&&t<=o;t++){for(var A=t*s,_=A+a;A<_&&!l[A];)A++;if(A!==_){var w,E=[A%s,t],S=l[A],C=A;do{var T=b[S];do{A+=T}while(!l[A]);5!==(w=l[A])&&10!==w?(S=w,l[A]=0):(S=w&51*S>>4,l[A]&=S>>2|S<<2),E.push(A%s),E.push(A/s|0),l[A]||--g}while(C!==A);y.push(E),--t}}return function(e){e.save(),e.scale(1/a,-1/o),e.translate(0,-o),e.beginPath();for(let n=0,r=y.length;n<r;n++){var t=y[n];e.moveTo(t[0],t[1]);for(let n=2,r=t.length;n<r;n+=2)e.lineTo(t[n],t[n+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:r,height:i}):null),s&&s.compiled)s.compiled(t);else{var l=this.cachedCanvases.getCanvas("maskCanvas",r,i),c=l.context;c.save(),n(c,e),c.globalCompositeOperation="source-in",c.fillStyle=o?a.getPattern(c,this):a,c.fillRect(0,0,r,i),c.restore(),this.paintInlineImageXObject(l.canvas)}},paintImageMaskXObjectRepeat:function(e,t,r,i){var a=e.width,o=e.height,s=this.current.fillColor,l=this.current.patternFill,c=this.cachedCanvases.getCanvas("maskCanvas",a,o),u=c.context;u.save(),n(u,e),u.globalCompositeOperation="source-in",u.fillStyle=l?s.getPattern(u,this):s,u.fillRect(0,0,a,o),u.restore();for(var d=this.ctx,h=0,f=i.length;h<f;h+=2)d.save(),d.transform(t,0,0,r,i[h],i[h+1]),d.scale(1,-1),d.drawImage(c.canvas,0,0,a,o,0,-1,1,1),d.restore()},paintImageMaskXObjectGroup:function(e){for(var t=this.ctx,r=this.current.fillColor,i=this.current.patternFill,a=0,o=e.length;a<o;a++){var s=e[a],l=s.width,c=s.height,u=this.cachedCanvases.getCanvas("maskCanvas",l,c),d=u.context;d.save(),n(d,s),d.globalCompositeOperation="source-in",d.fillStyle=i?r.getPattern(d,this):r,d.fillRect(0,0,l,c),d.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(u.canvas,0,0,l,c,0,-1,1,1),t.restore()}},paintImageXObject:function(e){const t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,r.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(e,t,n,i){const a=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(a){for(var o=a.width,s=a.height,l=[],c=0,u=i.length;c<u;c+=2)l.push({transform:[t,0,0,n,i[c],i[c+1]],x:0,y:0,w:o,h:s});this.paintInlineImageXObjectGroup(a,l)}else(0,r.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(e){var n=e.width,r=e.height,i=this.ctx;this.save(),i.scale(1/n,-1/r);var a,o,s=i.mozCurrentTransformInverse,l=s[0],c=s[1],u=Math.max(Math.sqrt(l*l+c*c),1),d=s[2],h=s[3],f=Math.max(Math.sqrt(d*d+h*h),1);if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)a=e;else{var p=(o=this.cachedCanvases.getCanvas("inlineImage",n,r)).context;t(p,e),a=o.canvas}for(var m=n,g=r,v="prescale1";u>2&&m>1||f>2&&g>1;){var b=m,y=g;u>2&&m>1&&(u/=m/(b=Math.ceil(m/2))),f>2&&g>1&&(f/=g/(y=Math.ceil(g/2))),(p=(o=this.cachedCanvases.getCanvas(v,b,y)).context).clearRect(0,0,b,y),p.drawImage(a,0,0,m,g,0,0,b,y),a=o.canvas,m=b,g=y,v="prescale1"===v?"prescale2":"prescale1"}if(i.drawImage(a,0,0,m,g,0,-r,n,r),this.imageLayer){var A=this.getCanvasPosition(0,-r);this.imageLayer.appendImage({imgData:e,left:A[0],top:A[1],width:n/s[0],height:r/s[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,n){var r=this.ctx,i=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",i,a);t(o.context,e);for(var s=0,l=n.length;s<l;s++){var c=n[s];if(r.save(),r.transform.apply(r,c.transform),r.scale(1,-1),r.drawImage(o.canvas,c.x,c.y,c.w,c.h,0,-1,1,1),this.imageLayer){var u=this.getCanvasPosition(c.x,c.y);this.imageLayer.appendImage({imgData:e,left:u[0],top:u[1],width:i,height:a})}r.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,r.warn)("Unsupported 'paintXObject' command.")},markPoint:function(e){},markPointProps:function(e,t){},beginMarkedContent:function(e){},beginMarkedContentProps:function(e,t){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var e=this.ctx;this.pendingClip&&(this.pendingClip===v?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()},getSinglePixelWidth(e){if(null===this._cachedGetSinglePixelWidth){const e=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1],e[2]*e[2]+e[3]*e[3]))}return this._cachedGetSinglePixelWidth},getCanvasPosition:function(e,t){var n=this.ctx.mozCurrentTransform;return[n[0]*e+n[2]*t+n[4],n[1]*e+n[3]*t+n[5]]}},r.OPS)e.prototype[r.OPS[b]]=e.prototype[b];return e}();t.CanvasGraphics=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=function(e){var t=i[e[0]];if(!t)throw new Error(`Unknown IR type: ${e[0]}`);return t.fromIR(e)},t.TilingPattern=void 0;var r=n(2),i={};function a(e,t){if(!t||"undefined"==typeof Path2D)return;const n=t[2]-t[0],r=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],n,r),e.clip(i)}i.RadialAxial={fromIR:function(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],s=e[6],l=e[7];return{type:"Pattern",getPattern:function(e){var c;a(e,n),"axial"===t?c=e.createLinearGradient(i[0],i[1],o[0],o[1]):"radial"===t&&(c=e.createRadialGradient(i[0],i[1],s,o[0],o[1],l));for(var u=0,d=r.length;u<d;++u){var h=r[u];c.addColorStop(h[0],h[1])}return c}}}};var o=function(){function e(e,t,n,r,i,a,o,s){var l,c=t.coords,u=t.colors,d=e.data,h=4*e.width;c[n+1]>c[r+1]&&(l=n,n=r,r=l,l=a,a=o,o=l),c[r+1]>c[i+1]&&(l=r,r=i,i=l,l=o,o=s,s=l),c[n+1]>c[r+1]&&(l=n,n=r,r=l,l=a,a=o,o=l);var f=(c[n]+t.offsetX)*t.scaleX,p=(c[n+1]+t.offsetY)*t.scaleY,m=(c[r]+t.offsetX)*t.scaleX,g=(c[r+1]+t.offsetY)*t.scaleY,v=(c[i]+t.offsetX)*t.scaleX,b=(c[i+1]+t.offsetY)*t.scaleY;if(!(p>=b))for(var y,A,_,w,E,S,C,T,k=u[a],x=u[a+1],O=u[a+2],I=u[o],M=u[o+1],P=u[o+2],D=u[s],N=u[s+1],L=u[s+2],R=Math.round(p),B=Math.round(b),j=R;j<=B;j++){if(j<g){let e;e=j<p?0:p===g?1:(p-j)/(p-g),y=f-(f-m)*e,A=k-(k-I)*e,_=x-(x-M)*e,w=O-(O-P)*e}else{let e;e=j>b?1:g===b?0:(g-j)/(g-b),y=m-(m-v)*e,A=I-(I-D)*e,_=M-(M-N)*e,w=P-(P-L)*e}let e;e=j<p?0:j>b?1:(p-j)/(p-b),E=f-(f-v)*e,S=k-(k-D)*e,C=x-(x-N)*e,T=O-(O-L)*e;for(var F=Math.round(Math.min(y,E)),U=Math.round(Math.max(y,E)),H=h*j+4*F,z=F;z<=U;z++)e=(y-z)/(y-E),e<0?e=0:e>1&&(e=1),d[H++]=A-(A-S)*e|0,d[H++]=_-(_-C)*e|0,d[H++]=w-(w-T)*e|0,d[H++]=255}}function t(t,n,r){var i,a,o=n.coords,s=n.colors;switch(n.type){case"lattice":var l=n.verticesPerRow,c=Math.floor(o.length/l)-1,u=l-1;for(i=0;i<c;i++)for(var d=i*l,h=0;h<u;h++,d++)e(t,r,o[d],o[d+1],o[d+l],s[d],s[d+1],s[d+l]),e(t,r,o[d+l+1],o[d+1],o[d+l],s[d+l+1],s[d+1],s[d+l]);break;case"triangles":for(i=0,a=o.length;i<a;i+=3)e(t,r,o[i],o[i+1],o[i+2],s[i],s[i+1],s[i+2]);break;default:throw new Error("illegal figure")}}return function(e,n,r,i,a,o,s,l){var c,u,d,h,f=Math.floor(e[0]),p=Math.floor(e[1]),m=Math.ceil(e[2])-f,g=Math.ceil(e[3])-p,v=Math.min(Math.ceil(Math.abs(m*n[0]*1.1)),3e3),b=Math.min(Math.ceil(Math.abs(g*n[1]*1.1)),3e3),y=m/v,A=g/b,_={coords:r,colors:i,offsetX:-f,offsetY:-p,scaleX:1/y,scaleY:1/A},w=v+4,E=b+4;if(l.isEnabled)c=l.drawFigures({width:v,height:b,backgroundColor:o,figures:a,context:_}),(u=s.getCanvas("mesh",w,E,!1)).context.drawImage(c,2,2),c=u.canvas;else{var S=(u=s.getCanvas("mesh",w,E,!1)).context,C=S.createImageData(v,b);if(o){var T=C.data;for(d=0,h=T.length;d<h;d+=4)T[d]=o[0],T[d+1]=o[1],T[d+2]=o[2],T[d+3]=255}for(d=0;d<a.length;d++)t(C,a[d],_);S.putImageData(C,2,2),c=u.canvas}return{canvas:c,offsetX:f-2*y,offsetY:p-2*A,scaleX:y,scaleY:A}}}();i.Mesh={fromIR:function(e){var t=e[2],n=e[3],i=e[4],s=e[5],l=e[6],c=e[7],u=e[8];return{type:"Pattern",getPattern:function(e,d,h){var f;if(a(e,c),h)f=r.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(f=r.Util.singularValueDecompose2dScale(d.baseTransform),l){var p=r.Util.singularValueDecompose2dScale(l);f=[f[0]*p[0],f[1]*p[1]]}var m=o(s,f,t,n,i,h?null:u,d.cachedCanvases,d.webGLContext);return h||(e.setTransform.apply(e,d.baseTransform),l&&e.transform.apply(e,l)),e.translate(m.offsetX,m.offsetY),e.scale(m.scaleX,m.scaleY),e.createPattern(m.canvas,"no-repeat")}}}},i.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var s=function(){var e=1,t=2;function n(e,t,n,r,i){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.canvasGraphicsFactory=r,this.baseTransform=i,this.type="Pattern",this.ctx=n}return n.prototype={createPatternCanvas:function(e){var t=this.operatorList,n=this.bbox,i=this.xstep,a=this.ystep,o=this.paintType,s=this.tilingType,l=this.color,c=this.canvasGraphicsFactory;(0,r.info)("TilingType: "+s);var u=n[0],d=n[1],h=n[2],f=n[3],p=r.Util.singularValueDecompose2dScale(this.matrix),m=r.Util.singularValueDecompose2dScale(this.baseTransform),g=[p[0]*m[0],p[1]*m[1]],v=this.getSizeAndScale(i,this.ctx.canvas.width,g[0]),b=this.getSizeAndScale(a,this.ctx.canvas.height,g[1]),y=e.cachedCanvases.getCanvas("pattern",v.size,b.size,!0),A=y.context,_=c.createCanvasGraphics(A);return _.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(_,o,l),_.transform(v.scale,0,0,b.scale,0,0),_.transform(1,0,0,1,-u,-d),this.clipBbox(_,n,u,d,h,f),_.executeOperatorList(t),this.ctx.transform(1,0,0,1,u,d),this.ctx.scale(1/v.scale,1/b.scale),y.canvas},getSizeAndScale:function(e,t,n){e=Math.abs(e);var r=Math.max(3e3,t),i=Math.ceil(e*n);return i>=r?i=r:n=i/e,{scale:n,size:i}},clipBbox:function(e,t,n,r,i,a){if(Array.isArray(t)&&4===t.length){var o=i-n,s=a-r;e.ctx.rect(n,r,o,s),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(n,i,a){const o=n.ctx,s=n.current;switch(i){case e:var l=this.ctx;o.fillStyle=l.fillStyle,o.strokeStyle=l.strokeStyle,s.fillColor=l.fillStyle,s.strokeColor=l.strokeStyle;break;case t:var c=r.Util.makeCssRgb(a[0],a[1],a[2]);o.fillStyle=c,o.strokeStyle=c,s.fillColor=c,s.strokeColor=c;break;default:throw new r.FormatError(`Unsupported paint type: ${i}`)}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var n=this.createPatternCanvas(t);return e.createPattern(n,"repeat")}},n}();t.TilingPattern=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=void 0===r.workerPort?null:r.workerPort,r.workerSrc=void 0===r.workerSrc?"":r.workerSrc},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var r=n(2);const i=1,a=2,o=1,s=2,l=3,c=4,u=5,d=6,h=7,f=8;function p(e){if("object"!=typeof e||null===e)return e;switch(e.name){case"AbortException":return new r.AbortException(e.message);case"MissingPDFException":return new r.MissingPDFException(e.message);case"UnexpectedResponseException":return new r.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new r.UnknownErrorException(e.message,e.details);default:return new r.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=class{constructor(e,t,n){this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this._processStreamMessage(t);if(t.callback){const e=t.callbackId,n=this.callbackCapabilities[e];if(!n)throw new Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],t.callback===i)n.resolve(t.data);else{if(t.callback!==a)throw new Error("Unexpected callback case");n.reject(p(t.reason))}return}const r=this.actionHandler[t.action];if(!r)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const e=this.sourceName,o=t.sourceName;new Promise((function(e){e(r(t.data))})).then((function(r){n.postMessage({sourceName:e,targetName:o,callback:i,callbackId:t.callbackId,data:r})}),(function(r){n.postMessage({sourceName:e,targetName:o,callback:a,callbackId:t.callbackId,reason:p(r)})}))}else t.streamId?this._createStreamSink(t):r(t.data)},n.addEventListener("message",this._onComObjOnMessage)}on(e,t){const n=this.actionHandler;if(n[e])throw new Error(`There is already an actionName called "${e}"`);n[e]=t}send(e,t,n){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){const i=this.callbackId++,a=(0,r.createPromiseCapability)();this.callbackCapabilities[i]=a;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},n)}catch(e){a.reject(e)}return a.promise}sendWithStream(e,t,n,i){const a=this.streamId++,s=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:n=>{const o=(0,r.createPromiseCapability)();return this.streamControllers[a]={controller:n,startCall:o,pullCall:null,cancelCall:null,isClosed:!1},this._postMessage({sourceName:s,targetName:l,action:e,streamId:a,data:t,desiredSize:n.desiredSize},i),o.promise},pull:e=>{const t=(0,r.createPromiseCapability)();return this.streamControllers[a].pullCall=t,c.postMessage({sourceName:s,targetName:l,stream:d,streamId:a,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,r.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,r.createPromiseCapability)();return this.streamControllers[a].cancelCall=t,this.streamControllers[a].isClosed=!0,c.postMessage({sourceName:s,targetName:l,stream:o,streamId:a,reason:p(e)}),t.promise}},n)}_createStreamSink(e){const t=this,n=this.actionHandler[e.action],i=e.streamId,a=this.sourceName,o=e.sourceName,s=this.comObj,d={enqueue(e,n=1,s){if(this.isCancelled)return;const l=this.desiredSize;this.desiredSize-=n,l>0&&this.desiredSize<=0&&(this.sinkCapability=(0,r.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:a,targetName:o,stream:c,streamId:i,chunk:e},s)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:l,streamId:i}),delete t.streamSinks[i])},error(e){(0,r.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:u,streamId:i,reason:p(e)}))},sinkCapability:(0,r.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};d.sinkCapability.resolve(),d.ready=d.sinkCapability.promise,this.streamSinks[i]=d,new Promise((function(t){t(n(e.data,d))})).then((function(){s.postMessage({sourceName:a,targetName:o,stream:f,streamId:i,success:!0})}),(function(e){s.postMessage({sourceName:a,targetName:o,stream:f,streamId:i,reason:p(e)})}))}_processStreamMessage(e){const t=e.streamId,n=this.sourceName,i=e.sourceName,a=this.comObj;switch(e.stream){case f:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(p(e.reason));break;case h:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(p(e.reason));break;case d:if(!this.streamSinks[t]){a.postMessage({sourceName:n,targetName:i,stream:h,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;const{onPull:m}=this.streamSinks[e.streamId];new Promise((function(e){e(m&&m())})).then((function(){a.postMessage({sourceName:n,targetName:i,stream:h,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:n,targetName:i,stream:h,streamId:t,reason:p(e)})}));break;case c:if((0,r.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case l:if((0,r.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case u:(0,r.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(p(e.reason)),this._deleteStreamController(t);break;case s:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(p(e.reason)),this._deleteStreamController(t);break;case o:if(!this.streamSinks[t])break;const{onCancel:g}=this.streamSinks[e.streamId];new Promise((function(t){t(g&&g(p(e.reason)))})).then((function(){a.postMessage({sourceName:n,targetName:i,stream:s,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:n,targetName:i,stream:s,streamId:t,reason:p(e)})})),this.streamSinks[t].sinkCapability.reject(p(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(e){await Promise.allSettled([this.streamControllers[e].startCall,this.streamControllers[e].pullCall,this.streamControllers[e].cancelCall].map((function(e){return e&&e.promise}))),delete this.streamControllers[e]}_postMessage(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var r=n(2),i=n(13);t.Metadata=class{constructor(e){(0,r.assert)("string"==typeof e,"Metadata: input is not a string"),e=this._repair(e);const t=(new i.SimpleXMLParser).parseFromString(e);this._metadataMap=new Map,t&&this._parse(t)}_repair(e){return e.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(e,t){const n=t.replace(/\\([0-3])([0-7])([0-7])/g,(function(e,t,n,r){return String.fromCharCode(64*t+8*n+1*r)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${t} isn't defined.`)}));let r="";for(let e=0,t=n.length;e<t;e+=2){const t=256*n.charCodeAt(e)+n.charCodeAt(e+1);r+=t>=32&&t<127&&60!==t&&62!==t&&38!==t?String.fromCharCode(t):"&#x"+(65536+t).toString(16).substring(1)+";"}return">"+r}))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase())for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName.toLowerCase();)t=t.nextSibling;const n=t?t.nodeName.toLowerCase():null;if(!t||"rdf:rdf"!==n||!t.hasChildNodes())return;const r=t.childNodes;for(let e=0,t=r.length;e<t;e++){const t=r[e];if("rdf:description"===t.nodeName.toLowerCase())for(let e=0,n=t.childNodes.length;e<n;e++)if("#text"!==t.childNodes[e].nodeName.toLowerCase()){const n=t.childNodes[e],r=n.nodeName.toLowerCase();this._metadataMap.set(r,n.textContent.trim())}}}get(e){return this._metadataMap.has(e)?this._metadataMap.get(e):null}getAll(){const e=Object.create(null);for(const[t,n]of this._metadataMap)e[t]=n;return e}has(e){return this._metadataMap.has(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleXMLParser=void 0;const r=0,i=-2,a=-3,o=-4,s=-5,l=-6,c=-9;function u(e,t){const n=e[t];return" "===n||"\n"===n||"\r"===n||"\t"===n}class d{constructor(e,t){this.nodeName=e,this.nodeValue=t,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes&&this.childNodes[0]}get nextSibling(){const e=this.parentNode.childNodes;if(!e)return;const t=e.indexOf(this);return-1!==t?e[t+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}hasChildNodes(){return this.childNodes&&this.childNodes.length>0}}t.SimpleXMLParser=class extends class{_resolveEntities(e){return e.replace(/&([^;]+);/g,(e,t)=>{if("#x"===t.substring(0,2))return String.fromCharCode(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCharCode(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return this.onResolveEntity(t)})}_parseContent(e,t){const n=[];let r=t;function i(){for(;r<e.length&&u(e,r);)++r}for(;r<e.length&&!u(e,r)&&">"!==e[r]&&"/"!==e[r];)++r;const a=e.substring(t,r);for(i();r<e.length&&">"!==e[r]&&"/"!==e[r]&&"?"!==e[r];){i();let t="",a="";for(;r<e.length&&!u(e,r)&&"="!==e[r];)t+=e[r],++r;if(i(),"="!==e[r])return null;++r,i();const o=e[r];if('"'!==o&&"'"!==o)return null;const s=e.indexOf(o,++r);if(s<0)return null;a=e.substring(r,s),n.push({name:t,value:this._resolveEntities(a)}),r=s+1,i()}return{name:a,attributes:n,parsed:r-t}}_parseProcessingInstruction(e,t){let n=t;for(;n<e.length&&!u(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;const r=e.substring(t,n);!function(){for(;n<e.length&&u(e,n);)++n}();const i=n;for(;n<e.length&&("?"!==e[n]||">"!==e[n+1]);)++n;return{name:r,value:e.substring(i,n),parsed:n-t}}parseXml(e){let t=0;for(;t<e.length;){let n=t;if("<"===e[t]){let t;switch(++n,e[n]){case"/":if(++n,t=e.indexOf(">",n),t<0)return void this.onError(c);this.onEndElement(e.substring(n,t)),n=t+1;break;case"?":++n;const r=this._parseProcessingInstruction(e,n);if("?>"!==e.substring(n+r.parsed,n+r.parsed+2))return void this.onError(a);this.onPi(r.name,r.value),n+=r.parsed+2;break;case"!":if("--"===e.substring(n+1,n+3)){if(t=e.indexOf("--\x3e",n+3),t<0)return void this.onError(s);this.onComment(e.substring(n+3,t)),n=t+3}else if("[CDATA["===e.substring(n+1,n+8)){if(t=e.indexOf("]]>",n+8),t<0)return void this.onError(i);this.onCdata(e.substring(n+8,t)),n=t+3}else{if("DOCTYPE"!==e.substring(n+1,n+8))return void this.onError(l);{const r=e.indexOf("[",n+8);let i=!1;if(t=e.indexOf(">",n+8),t<0)return void this.onError(o);if(r>0&&t>r){if(t=e.indexOf("]>",n+8),t<0)return void this.onError(o);i=!0}const a=e.substring(n+8,t+(i?1:0));this.onDoctype(a),n=t+(i?2:1)}}break;default:const u=this._parseContent(e,n);if(null===u)return void this.onError(l);let d=!1;if("/>"===e.substring(n+u.parsed,n+u.parsed+2))d=!0;else if(">"!==e.substring(n+u.parsed,n+u.parsed+1))return void this.onError(c);this.onBeginElement(u.name,u.attributes,d),n+=u.parsed+(d?2:1)}}else{for(;n<e.length&&"<"!==e[n];)n++;const r=e.substring(t,n);this.onText(this._resolveEntities(r))}t=n}}onResolveEntity(e){return`&${e};`}onPi(e,t){}onComment(e){}onCdata(e){}onDoctype(e){}onText(e){}onBeginElement(e,t,n){}onEndElement(e){}onError(e){}}{constructor(){super(),this._currentFragment=null,this._stack=null,this._errorCode=r}parseFromString(e){if(this._currentFragment=[],this._stack=[],this._errorCode=r,this.parseXml(e),this._errorCode!==r)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onResolveEntity(e){switch(e){case"apos":return"'"}return super.onResolveEntity(e)}onText(e){if(function(e){for(let t=0,n=e.length;t<n;t++)if(!u(e,t))return!1;return!0}(e))return;const t=new d("#text",e);this._currentFragment.push(t)}onCdata(e){const t=new d("#text",e);this._currentFragment.push(t)}onBeginElement(e,t,n){const r=new d(e);r.childNodes=[],this._currentFragment.push(r),n||(this._stack.push(this._currentFragment),this._currentFragment=r.childNodes)}onEndElement(e){this._currentFragment=this._stack.pop()||[];const t=this._currentFragment[this._currentFragment.length-1];if(t)for(let e=0,n=t.childNodes.length;e<n;e++)t.childNodes[e].parentNode=t}onError(e){this._errorCode=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var r=n(2);t.PDFDataTransportStream=class{constructor(e,t){(0,r.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=e.progressiveDone||!1;const n=e.initialData;if(n&&n.length>0){const e=new Uint8Array(n).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._contentLength=e.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((e,t)=>{this._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener((e,t)=>{this._onProgress({loaded:e,total:t})}),this._pdfDataRangeTransport.addProgressiveReadListener(e=>{this._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){const t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{const n=this._rangeReaders.some((function(n){return n._begin===e.begin&&(n._enqueue(t),!0)}));(0,r.assert)(n,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}_onProgress(e){if(void 0===e.total){const t=this._rangeReaders[0];t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{const t=this._fullRequestReader;t&&t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,r.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new i(this,e,this._progressiveDone)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new a(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeReaders.slice(0).forEach((function(t){t.cancel(e)})),this._pdfDataRangeTransport.abort()}};class i{constructor(e,t,n=!1){this._stream=e,this._done=n||!1,this._filename=null,this._queuedChunks=t||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]}progressiveDone(){this._done||(this._done=!0)}}class a{constructor(e,t,n){this._stream=e,this._begin=t,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){this._done||(0===this._requests.length?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._stream._removeRangeReader(this)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var r=n(2);t.WebGLContext=class{constructor({enable:e=!1}){this._enabled=!0===e}get isEnabled(){let e=this._enabled;return e&&(e=i.tryInitGL()),(0,r.shadow)(this,"isEnabled",e)}composeSMask({layer:e,mask:t,properties:n}){return i.composeSMask(e,t,n)}drawFigures({width:e,height:t,backgroundColor:n,figures:r,context:a}){return i.drawFigures(e,t,n,r,a)}clear(){i.cleanup()}};var i=function(){function e(e,t,n){var r=e.createShader(n);if(e.shaderSource(r,t),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS)){var i=e.getShaderInfoLog(r);throw new Error("Error during shader compilation: "+i)}return r}function t(t,n){return e(t,n,t.VERTEX_SHADER)}function n(t,n){return e(t,n,t.FRAGMENT_SHADER)}function r(e,t){for(var n=e.createProgram(),r=0,i=t.length;r<i;++r)e.attachShader(n,t[r]);if(e.linkProgram(n),!e.getProgramParameter(n,e.LINK_STATUS)){var a=e.getProgramInfoLog(n);throw new Error("Error during program linking: "+a)}return n}function i(e,t,n){e.activeTexture(n);var r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),r}var a,o;function s(){a||(o=document.createElement("canvas"),a=o.getContext("webgl",{premultipliedalpha:!1}))}var l=null,c=null;return{tryInitGL(){try{return s(),!!a}catch(e){}return!1},composeSMask:function(e,c,u){var d=e.width,h=e.height;l||function(){var e,i;s(),e=o,o=null,i=a,a=null;var c=r(i,[t(i,"  attribute vec2 a_position;                                      attribute vec2 a_texCoord;                                                                                                      uniform vec2 u_resolution;                                                                                                      varying vec2 v_texCoord;                                                                                                        void main() {                                                     vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0;       gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);                                                                              v_texCoord = a_texCoord;                                      }                                                             "),n(i,"  precision mediump float;                                                                                                        uniform vec4 u_backdrop;                                        uniform int u_subtype;                                          uniform sampler2D u_image;                                      uniform sampler2D u_mask;                                                                                                       varying vec2 v_texCoord;                                                                                                        void main() {                                                     vec4 imageColor = texture2D(u_image, v_texCoord);               vec4 maskColor = texture2D(u_mask, v_texCoord);                 if (u_backdrop.a > 0.0) {                                         maskColor.rgb = maskColor.rgb * maskColor.a +                                   u_backdrop.rgb * (1.0 - maskColor.a);         }                                                               float lum;                                                      if (u_subtype == 0) {                                             lum = maskColor.a;                                            } else {                                                          lum = maskColor.r * 0.3 + maskColor.g * 0.59 +                        maskColor.b * 0.11;                                     }                                                               imageColor.a *= lum;                                            imageColor.rgb *= imageColor.a;                                 gl_FragColor = imageColor;                                    }                                                             ")]);i.useProgram(c);var u={};u.gl=i,u.canvas=e,u.resolutionLocation=i.getUniformLocation(c,"u_resolution"),u.positionLocation=i.getAttribLocation(c,"a_position"),u.backdropLocation=i.getUniformLocation(c,"u_backdrop"),u.subtypeLocation=i.getUniformLocation(c,"u_subtype");var d=i.getAttribLocation(c,"a_texCoord"),h=i.getUniformLocation(c,"u_image"),f=i.getUniformLocation(c,"u_mask"),p=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,p),i.bufferData(i.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),i.STATIC_DRAW),i.enableVertexAttribArray(d),i.vertexAttribPointer(d,2,i.FLOAT,!1,0,0),i.uniform1i(h,0),i.uniform1i(f,1),l=u}();var f=l,p=f.canvas,m=f.gl;p.width=d,p.height=h,m.viewport(0,0,m.drawingBufferWidth,m.drawingBufferHeight),m.uniform2f(f.resolutionLocation,d,h),u.backdrop?m.uniform4f(f.resolutionLocation,u.backdrop[0],u.backdrop[1],u.backdrop[2],1):m.uniform4f(f.resolutionLocation,0,0,0,0),m.uniform1i(f.subtypeLocation,"Luminosity"===u.subtype?1:0);var g=i(m,e,m.TEXTURE0),v=i(m,c,m.TEXTURE1),b=m.createBuffer();return m.bindBuffer(m.ARRAY_BUFFER,b),m.bufferData(m.ARRAY_BUFFER,new Float32Array([0,0,d,0,0,h,0,h,d,0,d,h]),m.STATIC_DRAW),m.enableVertexAttribArray(f.positionLocation),m.vertexAttribPointer(f.positionLocation,2,m.FLOAT,!1,0,0),m.clearColor(0,0,0,0),m.enable(m.BLEND),m.blendFunc(m.ONE,m.ONE_MINUS_SRC_ALPHA),m.clear(m.COLOR_BUFFER_BIT),m.drawArrays(m.TRIANGLES,0,6),m.flush(),m.deleteTexture(g),m.deleteTexture(v),m.deleteBuffer(b),p},drawFigures:function(e,i,l,u,d){c||function(){var e,i;s(),e=o,o=null,i=a,a=null;var l=r(i,[t(i,"  attribute vec2 a_position;                                      attribute vec3 a_color;                                                                                                         uniform vec2 u_resolution;                                      uniform vec2 u_scale;                                           uniform vec2 u_offset;                                                                                                          varying vec4 v_color;                                                                                                           void main() {                                                     vec2 position = (a_position + u_offset) * u_scale;              vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0;         gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);                                                                              v_color = vec4(a_color / 255.0, 1.0);                         }                                                             "),n(i,"  precision mediump float;                                                                                                        varying vec4 v_color;                                                                                                           void main() {                                                     gl_FragColor = v_color;                                       }                                                             ")]);i.useProgram(l);var u={};u.gl=i,u.canvas=e,u.resolutionLocation=i.getUniformLocation(l,"u_resolution"),u.scaleLocation=i.getUniformLocation(l,"u_scale"),u.offsetLocation=i.getUniformLocation(l,"u_offset"),u.positionLocation=i.getAttribLocation(l,"a_position"),u.colorLocation=i.getAttribLocation(l,"a_color"),c=u}();var h=c,f=h.canvas,p=h.gl;f.width=e,f.height=i,p.viewport(0,0,p.drawingBufferWidth,p.drawingBufferHeight),p.uniform2f(h.resolutionLocation,e,i);var m,g,v,b=0;for(m=0,g=u.length;m<g;m++)switch(u[m].type){case"lattice":b+=((v=u[m].coords.length/u[m].verticesPerRow|0)-1)*(u[m].verticesPerRow-1)*6;break;case"triangles":b+=u[m].coords.length}var y=new Float32Array(2*b),A=new Uint8Array(3*b),_=d.coords,w=d.colors,E=0,S=0;for(m=0,g=u.length;m<g;m++){var C=u[m],T=C.coords,k=C.colors;switch(C.type){case"lattice":var x=C.verticesPerRow;v=T.length/x|0;for(var O=1;O<v;O++)for(var I=O*x+1,M=1;M<x;M++,I++)y[E]=_[T[I-x-1]],y[E+1]=_[T[I-x-1]+1],y[E+2]=_[T[I-x]],y[E+3]=_[T[I-x]+1],y[E+4]=_[T[I-1]],y[E+5]=_[T[I-1]+1],A[S]=w[k[I-x-1]],A[S+1]=w[k[I-x-1]+1],A[S+2]=w[k[I-x-1]+2],A[S+3]=w[k[I-x]],A[S+4]=w[k[I-x]+1],A[S+5]=w[k[I-x]+2],A[S+6]=w[k[I-1]],A[S+7]=w[k[I-1]+1],A[S+8]=w[k[I-1]+2],y[E+6]=y[E+2],y[E+7]=y[E+3],y[E+8]=y[E+4],y[E+9]=y[E+5],y[E+10]=_[T[I]],y[E+11]=_[T[I]+1],A[S+9]=A[S+3],A[S+10]=A[S+4],A[S+11]=A[S+5],A[S+12]=A[S+6],A[S+13]=A[S+7],A[S+14]=A[S+8],A[S+15]=w[k[I]],A[S+16]=w[k[I]+1],A[S+17]=w[k[I]+2],E+=12,S+=18;break;case"triangles":for(var P=0,D=T.length;P<D;P++)y[E]=_[T[P]],y[E+1]=_[T[P]+1],A[S]=w[k[P]],A[S+1]=w[k[P]+1],A[S+2]=w[k[P]+2],E+=2,S+=3}}l?p.clearColor(l[0]/255,l[1]/255,l[2]/255,1):p.clearColor(0,0,0,0),p.clear(p.COLOR_BUFFER_BIT);var N=p.createBuffer();p.bindBuffer(p.ARRAY_BUFFER,N),p.bufferData(p.ARRAY_BUFFER,y,p.STATIC_DRAW),p.enableVertexAttribArray(h.positionLocation),p.vertexAttribPointer(h.positionLocation,2,p.FLOAT,!1,0,0);var L=p.createBuffer();return p.bindBuffer(p.ARRAY_BUFFER,L),p.bufferData(p.ARRAY_BUFFER,A,p.STATIC_DRAW),p.enableVertexAttribArray(h.colorLocation),p.vertexAttribPointer(h.colorLocation,3,p.UNSIGNED_BYTE,!1,0,0),p.uniform2f(h.scaleLocation,d.scaleX,d.scaleY),p.uniform2f(h.offsetLocation,d.offsetX,d.offsetY),p.drawArrays(p.TRIANGLES,0,b),p.flush(),p.deleteBuffer(N),p.deleteBuffer(L),f},cleanup(){l&&l.canvas&&(l.canvas.width=0,l.canvas.height=0),c&&c.canvas&&(c.canvas.width=0,c.canvas.height=0),l=null,c=null}}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var r=n(1),i=n(2);class a{static create(e){switch(e.data.annotationType){case i.AnnotationType.LINK:return new s(e);case i.AnnotationType.TEXT:return new l(e);case i.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new u(e);case"Btn":return e.data.radioButton?new h(e):e.data.checkBox?new d(e):new f(e);case"Ch":return new p(e)}return new c(e);case i.AnnotationType.POPUP:return new m(e);case i.AnnotationType.FREETEXT:return new v(e);case i.AnnotationType.LINE:return new b(e);case i.AnnotationType.SQUARE:return new y(e);case i.AnnotationType.CIRCLE:return new A(e);case i.AnnotationType.POLYLINE:return new _(e);case i.AnnotationType.CARET:return new E(e);case i.AnnotationType.INK:return new S(e);case i.AnnotationType.POLYGON:return new w(e);case i.AnnotationType.HIGHLIGHT:return new C(e);case i.AnnotationType.UNDERLINE:return new T(e);case i.AnnotationType.SQUIGGLY:return new k(e);case i.AnnotationType.STRIKEOUT:return new x(e);case i.AnnotationType.STAMP:return new O(e);case i.AnnotationType.FILEATTACHMENT:return new I(e);default:return new o(e)}}}class o{constructor(e,t=!1,n=!1){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderInteractiveForms=e.renderInteractiveForms,this.svgFactory=e.svgFactory,t&&(this.container=this._createContainer(n))}_createContainer(e=!1){const t=this.data,n=this.page,r=this.viewport,a=document.createElement("section");let o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);const l=i.Util.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]);if(a.style.transform=`matrix(${r.transform.join(",")})`,a.style.transformOrigin=`-${l[0]}px -${l[1]}px`,!e&&t.borderStyle.width>0){a.style.borderWidth=`${t.borderStyle.width}px`,t.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);const e=t.borderStyle.horizontalCornerRadius,n=t.borderStyle.verticalCornerRadius;if(e>0||n>0){const t=`${e}px / ${n}px`;a.style.borderRadius=t}switch(t.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}t.color?a.style.borderColor=i.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}return a.style.left=`${l[0]}px`,a.style.top=`${l[1]}px`,a.style.width=`${o}px`,a.style.height=`${s}px`,a}_createPopup(e,t,n){t||((t=document.createElement("div")).style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));const r=new g({container:e,trigger:t,color:n.color,title:n.title,modificationDate:n.modificationDate,contents:n.contents,hideWrapper:!0}).render();r.style.left=e.style.width,e.appendChild(r)}render(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}}class s extends o{constructor(e){super(e,!!(e.data.url||e.data.dest||e.data.action))}render(){this.container.className="linkAnnotation";const{data:e,linkService:t}=this,n=document.createElement("a");return e.url?(0,r.addLinkAttributes)(n,{url:e.url,target:e.newWindow?r.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel,enabled:t.externalLinkEnabled}):e.action?this._bindNamedAction(n,e.action):this._bindLink(n,e.dest),this.container.appendChild(n),this.container}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.navigateTo(t),!1),t&&(e.className="internalLink")}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),e.className="internalLink"}}class l extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents))}render(){this.container.className="textAnnotation";const e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}}class c extends o{render(){return this.container}}class u extends c{constructor(e){super(e,e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue)}render(){const e=["left","center","right"];this.container.className="textWidgetAnnotation";let t=null;if(this.renderInteractiveForms){if(this.data.multiLine?(t=document.createElement("textarea"),t.textContent=this.data.fieldValue):(t=document.createElement("input"),t.type="text",t.setAttribute("value",this.data.fieldValue)),t.disabled=this.data.readOnly,t.name=this.data.fieldName,null!==this.data.maxLen&&(t.maxLength=this.data.maxLen),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;t.classList.add("comb"),t.style.letterSpacing=`calc(${e}px - 1ch)`}}else{t=document.createElement("div"),t.textContent=this.data.fieldValue,t.style.verticalAlign="middle",t.style.display="table-cell";let e=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(e=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(t,e)}return null!==this.data.textAlignment&&(t.style.textAlign=e[this.data.textAlignment]),this.container.appendChild(t),this.container}_setTextStyle(e,t){const n=e.style;if(n.fontSize=`${this.data.fontSize}px`,n.direction=this.data.fontDirection<0?"rtl":"ltr",!t)return;let r="normal";t.black?r="900":t.bold&&(r="bold"),n.fontWeight=r,n.fontStyle=t.italic?"italic":"normal";const i=t.loadedName?`"${t.loadedName}", `:"",a=t.fallbackName||"Helvetica, sans-serif";n.fontFamily=i+a}}class d extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation checkBox";const e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",e.name=this.data.fieldName,this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}class h extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation radioButton";const e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="radio",e.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}class f extends s{render(){const e=super.render();return e.className="buttonWidgetAnnotation pushButton",e}}class p extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="choiceWidgetAnnotation";const e=document.createElement("select");e.disabled=this.data.readOnly,e.name=this.data.fieldName,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));for(const t of this.data.options){const n=document.createElement("option");n.textContent=t.displayValue,n.value=t.exportValue,this.data.fieldValue.includes(t.displayValue)&&n.setAttribute("selected",!0),e.appendChild(n)}return this.container.appendChild(e),this.container}}class m extends o{constructor(e){super(e,!(!e.data.title&&!e.data.contents))}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const e=`[data-annotation-id="${this.data.parentId}"]`,t=this.layer.querySelector(e);if(!t)return this.container;const n=new g({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),r=parseFloat(t.style.left),i=parseFloat(t.style.width);return this.container.style.transformOrigin=`-${r+i}px -${t.style.top}`,this.container.style.left=`${r+i}px`,this.container.appendChild(n.render()),this.container}}class g{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.title=e.title,this.modificationDate=e.modificationDate,this.contents=e.contents,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){const e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);const t=document.createElement("div");t.className="popup";const n=this.color;if(n){const e=.7*(255-n[0])+n[0],r=.7*(255-n[1])+n[1],a=.7*(255-n[2])+n[2];t.style.backgroundColor=i.Util.makeCssRgb(0|e,0|r,0|a)}const a=document.createElement("h1");a.textContent=this.title,t.appendChild(a);const o=r.PDFDateString.toDateObject(this.modificationDate);if(o){const e=document.createElement("span");e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:o.toLocaleDateString(),time:o.toLocaleTimeString()}),t.appendChild(e)}const s=this._formatContents(this.contents);return t.appendChild(s),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),t.addEventListener("click",this._hide.bind(this,!0)),e.appendChild(t),e}_formatContents(e){const t=document.createElement("p"),n=e.split(/(?:\r\n?|\n)/);for(let e=0,r=n.length;e<r;++e){const i=n[e];t.appendChild(document.createTextNode(i)),e<r-1&&t.appendChild(document.createElement("br"))}return t}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(e=!1){e&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}_hide(e=!0){e&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}class v extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class b extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){this.container.className="lineAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],r=this.svgFactory.create(t,n),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),r.appendChild(i),this.container.append(r),this._createPopup(this.container,i,e),this.container}}class y extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){this.container.className="squareAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],r=this.svgFactory.create(t,n),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",i/2),a.setAttribute("y",i/2),a.setAttribute("width",t-i),a.setAttribute("height",n-i),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),r.appendChild(a),this.container.append(r),this._createPopup(this.container,a,e),this.container}}class A extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){this.container.className="circleAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],r=this.svgFactory.create(t,n),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:ellipse");return a.setAttribute("cx",t/2),a.setAttribute("cy",n/2),a.setAttribute("rx",t/2-i/2),a.setAttribute("ry",n/2-i/2),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),r.appendChild(a),this.container.append(r),this._createPopup(this.container,a,e),this.container}}class _ extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],r=this.svgFactory.create(t,n);let i=[];for(const t of e.vertices){const n=t.x-e.rect[0],r=e.rect[3]-t.y;i.push(n+","+r)}i=i.join(" ");const a=this.svgFactory.createElement(this.svgElementName);return a.setAttribute("points",i),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),r.appendChild(a),this.container.append(r),this._createPopup(this.container,a,e),this.container}}class w extends _{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class E extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class S extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],r=this.svgFactory.create(t,n);for(const t of e.inkLists){let n=[];for(const r of t){const t=r.x-e.rect[0],i=e.rect[3]-r.y;n.push(`${t},${i}`)}n=n.join(" ");const i=this.svgFactory.createElement(this.svgElementName);i.setAttribute("points",n),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),this._createPopup(this.container,i,e),r.appendChild(i)}return this.container.append(r),this.container}}class C extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class T extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class k extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class x extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class O extends o{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class I extends o{constructor(e){super(e,!0);const{filename:t,content:n}=this.data.file;this.filename=(0,r.getFilenameFromUrl)(t),this.content=n,this.linkService.eventBus&&this.linkService.eventBus.dispatch("fileattachmentannotation",{source:this,id:(0,i.stringToPDFString)(t),filename:t,content:n})}render(){this.container.className="fileAttachmentAnnotation";const e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}_download(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,i.warn)("Download cannot be started due to unavailable download manager")}}t.AnnotationLayer=class{static render(e){const t=[],n=[];for(const r of e.annotations)r&&(r.annotationType!==i.AnnotationType.POPUP?t.push(r):n.push(r));n.length&&t.push(...n);for(const n of t){const t=a.create({data:n,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderInteractiveForms:e.renderInteractiveForms||!1,svgFactory:new r.DOMSVGFactory});t.isRenderable&&e.div.appendChild(t.render())}}static update(e){for(const t of e.annotations){const n=e.div.querySelector(`[data-annotation-id="${t.id}"]`);n&&(n.style.transform=`matrix(${e.viewport.transform.join(",")})`)}e.div.removeAttribute("hidden")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=void 0;var r=n(2),i=function(){var e=/\S/;function t(t,n,i){var a,o=document.createElement("span"),s={angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(t._textDivs.push(o),a=n.str,!e.test(a))return s.isWhitespace=!0,void t._textDivProperties.set(o,s);var l=r.Util.transform(t._viewport.transform,n.transform),c=Math.atan2(l[1],l[0]),u=i[n.fontName];u.vertical&&(c+=Math.PI/2);var d=Math.sqrt(l[2]*l[2]+l[3]*l[3]),h=d;let f,p;u.ascent?h=u.ascent*h:u.descent&&(h=(1+u.descent)*h),0===c?(f=l[4],p=l[5]-h):(f=l[4]+h*Math.sin(c),p=l[5]-h*Math.cos(c)),o.style.left=`${f}px`,o.style.top=`${p}px`,o.style.fontSize=`${d}px`,o.style.fontFamily=u.fontFamily,o.textContent=n.str,t._fontInspectorEnabled&&(o.dataset.fontName=n.fontName),0!==c&&(s.angle=c*(180/Math.PI));let m=!1;if(n.str.length>1)m=!0;else if(n.transform[0]!==n.transform[3]){const e=Math.abs(n.transform[0]),t=Math.abs(n.transform[3]);e!==t&&Math.max(e,t)/Math.min(e,t)>1.5&&(m=!0)}if(m&&(u.vertical?s.canvasWidth=n.height*t._viewport.scale:s.canvasWidth=n.width*t._viewport.scale),t._textDivProperties.set(o,s),t._textContentStream&&t._layoutText(o),t._enhanceTextSelection){var g=1,v=0;0!==c&&(g=Math.cos(c),v=Math.sin(c));var b,y,A=(u.vertical?n.height:n.width)*t._viewport.scale,_=d;0!==c?(b=[g,v,-v,g,f,p],y=r.Util.getAxialAlignedBoundingBox([0,0,A,_],b)):y=[f,p,f+A,p+_],t._bounds.push({left:y[0],top:y[1],right:y[2],bottom:y[3],div:o,size:[A,_],m:b})}}function n(e){if(!e._canceled){var t=e._textDivs,n=e._capability,r=t.length;if(r>1e5)return e._renderingDone=!0,void n.resolve();if(!e._textContentStream)for(var i=0;i<r;i++)e._layoutText(t[i]);e._renderingDone=!0,n.resolve()}}function i(e,t,n){let r=0;for(let i=0;i<n;i++){const n=e[t++];n>0&&(r=r?Math.min(n,r):n)}return r}function a(e){for(var t=e._bounds,n=e._viewport,a=function(e,t,n){var r=n.map((function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}}));o(e,r);var i=new Array(n.length);return r.forEach((function(e){var t=e.index;i[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}})),n.map((function(t,n){var a=i[n],o=r[n];o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=n,o.x1New=void 0,o.x2New=void 0})),o(t,r),r.forEach((function(e){var t=e.index;i[t].top=e.x1New,i[t].bottom=e.x2New})),i}(n.width,n.height,t),s=0;s<a.length;s++){var l=t[s].div,c=e._textDivProperties.get(l);if(0!==c.angle){var u=a[s],d=t[s],h=d.m,f=h[0],p=h[1],m=[[0,0],[0,d.size[1]],[d.size[0],0],d.size],g=new Float64Array(64);m.forEach((function(e,t){var n=r.Util.applyTransform(e,h);g[t+0]=f&&(u.left-n[0])/f,g[t+4]=p&&(u.top-n[1])/p,g[t+8]=f&&(u.right-n[0])/f,g[t+12]=p&&(u.bottom-n[1])/p,g[t+16]=p&&(u.left-n[0])/-p,g[t+20]=f&&(u.top-n[1])/f,g[t+24]=p&&(u.right-n[0])/-p,g[t+28]=f&&(u.bottom-n[1])/f,g[t+32]=f&&(u.left-n[0])/-f,g[t+36]=p&&(u.top-n[1])/-p,g[t+40]=f&&(u.right-n[0])/-f,g[t+44]=p&&(u.bottom-n[1])/-p,g[t+48]=p&&(u.left-n[0])/p,g[t+52]=f&&(u.top-n[1])/-f,g[t+56]=p&&(u.right-n[0])/p,g[t+60]=f&&(u.bottom-n[1])/-f}));var v=1+Math.min(Math.abs(f),Math.abs(p));c.paddingLeft=i(g,32,16)/v,c.paddingTop=i(g,48,16)/v,c.paddingRight=i(g,0,16)/v,c.paddingBottom=i(g,16,16)/v,e._textDivProperties.set(l,c)}else c.paddingLeft=t[s].left-a[s].left,c.paddingTop=t[s].top-a[s].top,c.paddingRight=a[s].right-t[s].right,c.paddingBottom=a[s].bottom-t[s].bottom,e._textDivProperties.set(l,c)}}function o(e,t){t.sort((function(e,t){return e.x1-t.x1||e.index-t.index}));var n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];t.forEach((function(e){for(var t=0;t<n.length&&n[t].end<=e.y1;)t++;for(var r,i,a=n.length-1;a>=0&&n[a].start>=e.y2;)a--;var o,s,l=-1/0;for(o=t;o<=a;o++){var c;(c=(i=(r=n[o]).boundary).x2>e.x1?i.index>e.index?i.x1New:e.x1:void 0===i.x2New?(i.x2+e.x1)/2:i.x2New)>l&&(l=c)}for(e.x1New=l,o=t;o<=a;o++)void 0===(i=(r=n[o]).boundary).x2New?i.x2>e.x1?i.index>e.index&&(i.x2New=i.x2):i.x2New=l:i.x2New>l&&(i.x2New=Math.max(l,i.x2));var u=[],d=null;for(o=t;o<=a;o++){var h=(i=(r=n[o]).boundary).x2>e.x2?i:e;d===h?u[u.length-1].end=r.end:(u.push({start:r.start,end:r.end,boundary:h}),d=h)}for(n[t].start<e.y1&&(u[0].start=e.y1,u.unshift({start:n[t].start,end:e.y1,boundary:n[t].boundary})),e.y2<n[a].end&&(u[u.length-1].end=e.y2,u.push({start:e.y2,end:n[a].end,boundary:n[a].boundary})),o=t;o<=a;o++)if(void 0===(i=(r=n[o]).boundary).x2New){var f=!1;for(s=t-1;!f&&s>=0&&n[s].start>=i.y1;s--)f=n[s].boundary===i;for(s=a+1;!f&&s<n.length&&n[s].end<=i.y2;s++)f=n[s].boundary===i;for(s=0;!f&&s<u.length;s++)f=u[s].boundary===i;f||(i.x2New=l)}Array.prototype.splice.apply(n,[t,a-t+1].concat(u))})),n.forEach((function(t){var n=t.boundary;void 0===n.x2New&&(n.x2New=Math.max(e,n.x2))}))}function s({textContent:e,textContentStream:t,container:n,viewport:i,textDivs:a,textContentItemsStr:o,enhanceTextSelection:s}){this._textContent=e,this._textContentStream=t,this._container=n,this._viewport=i,this._textDivs=a||[],this._textContentItemsStr=o||[],this._enhanceTextSelection=!!s,this._fontInspectorEnabled=!(!globalThis.FontInspector||!globalThis.FontInspector.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,r.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally(()=>{this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)}).catch(()=>{})}return s.prototype={get promise(){return this._capability.promise},cancel:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new r.AbortException("TextLayer task cancelled.")),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))},_processItems(e,n){for(let r=0,i=e.length;r<i;r++)this._textContentItemsStr.push(e[r].str),t(this,e[r],n)},_layoutText(e){const t=this._textDivProperties.get(e);if(t.isWhitespace)return;let n="";if(0!==t.canvasWidth){const{fontSize:r,fontFamily:i}=e.style;r===this._layoutTextLastFontSize&&i===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=`${r} ${i}`,this._layoutTextLastFontSize=r,this._layoutTextLastFontFamily=i);const{width:a}=this._layoutTextCtx.measureText(e.textContent);a>0&&(t.scale=t.canvasWidth/a,n=`scaleX(${t.scale})`)}0!==t.angle&&(n=`rotate(${t.angle}deg) ${n}`),n.length>0&&(this._enhanceTextSelection&&(t.originalTransform=n),e.style.transform=n),this._textDivProperties.set(e,t),this._container.appendChild(e)},_render:function(e){const t=(0,r.createPromiseCapability)();let i=Object.create(null);const a=document.createElement("canvas");if(a.mozOpaque=!0,this._layoutTextCtx=a.getContext("2d",{alpha:!1}),this._textContent){const e=this._textContent.items,n=this._textContent.styles;this._processItems(e,n),t.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const e=()=>{this._reader.read().then(({value:n,done:r})=>{r?t.resolve():(Object.assign(i,n.styles),this._processItems(n.items,i),e())},t.reject)};this._reader=this._textContentStream.getReader(),e()}}t.promise.then(()=>{i=null,e?this._renderTimer=setTimeout(()=>{n(this),this._renderTimer=null},e):n(this)},this._capability.reject)},expandTextDivs:function(e){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(a(this),this._bounds=null);const t=[],n=[];for(var r=0,i=this._textDivs.length;r<i;r++){const i=this._textDivs[r],a=this._textDivProperties.get(i);a.isWhitespace||(e?(t.length=0,n.length=0,a.originalTransform&&t.push(a.originalTransform),a.paddingTop>0?(n.push(`${a.paddingTop}px`),t.push(`translateY(${-a.paddingTop}px)`)):n.push(0),a.paddingRight>0?n.push(`${a.paddingRight/a.scale}px`):n.push(0),a.paddingBottom>0?n.push(`${a.paddingBottom}px`):n.push(0),a.paddingLeft>0?(n.push(`${a.paddingLeft/a.scale}px`),t.push(`translateX(${-a.paddingLeft/a.scale}px)`)):n.push(0),i.style.padding=n.join(" "),t.length&&(i.style.transform=t.join(" "))):(i.style.padding=null,i.style.transform=a.originalTransform))}}},function(e){var t=new s({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}}();t.renderTextLayer=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var r=n(2),i=n(1),a=n(4);let o=function(){throw new Error("Not implemented: SVGGraphics")};t.SVGGraphics=o;{const e={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},n="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/1999/xlink",u=["butt","round","square"],d=["miter","round","bevel"],h=function(){const e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256);for(let e=0;e<256;e++){let n=e;for(let e=0;e<8;e++)n=1&n?3988292384^n>>1&2147483647:n>>1&2147483647;t[e]=n}function n(e,n,r,i){let a=i;const o=n.length;r[a]=o>>24&255,r[a+1]=o>>16&255,r[a+2]=o>>8&255,r[a+3]=255&o,a+=4,r[a]=255&e.charCodeAt(0),r[a+1]=255&e.charCodeAt(1),r[a+2]=255&e.charCodeAt(2),r[a+3]=255&e.charCodeAt(3),a+=4,r.set(n,a),a+=n.length;const s=function(e,n,r){let i=-1;for(let a=n;a<r;a++){const n=255&(i^e[a]);i=i>>>8^t[n]}return-1^i}(r,i+4,a);r[a]=s>>24&255,r[a+1]=s>>16&255,r[a+2]=s>>8&255,r[a+3]=255&s}function i(e){let t=e.length;const n=Math.ceil(t/65535),r=new Uint8Array(2+t+5*n+4);let i=0;r[i++]=120,r[i++]=156;let a=0;for(;t>65535;)r[i++]=0,r[i++]=255,r[i++]=255,r[i++]=0,r[i++]=0,r.set(e.subarray(a,a+65535),i),i+=65535,a+=65535,t-=65535;r[i++]=1,r[i++]=255&t,r[i++]=t>>8&255,r[i++]=255&~t,r[i++]=(65535&~t)>>8&255,r.set(e.subarray(a),i),i+=e.length-a;const o=function(e,t,n){let r=1,i=0;for(let a=t;a<n;++a)r=(r+(255&e[a]))%65521,i=(i+r)%65521;return i<<16|r}(e,0,e.length);return r[i++]=o>>24&255,r[i++]=o>>16&255,r[i++]=o>>8&255,r[i++]=255&o,r}function o(t,o,s,l){const c=t.width,u=t.height;let d,h,f;const p=t.data;switch(o){case r.ImageKind.GRAYSCALE_1BPP:h=0,d=1,f=c+7>>3;break;case r.ImageKind.RGB_24BPP:h=2,d=8,f=3*c;break;case r.ImageKind.RGBA_32BPP:h=6,d=8,f=4*c;break;default:throw new Error("invalid format")}const m=new Uint8Array((1+f)*u);let g=0,v=0;for(let e=0;e<u;++e)m[g++]=0,m.set(p.subarray(v,v+f),g),v+=f,g+=f;if(o===r.ImageKind.GRAYSCALE_1BPP&&l){g=0;for(let e=0;e<u;e++){g++;for(let e=0;e<f;e++)m[g++]^=255}}const b=new Uint8Array([c>>24&255,c>>16&255,c>>8&255,255&c,u>>24&255,u>>16&255,u>>8&255,255&u,d,h,0,0,0]),y=function(e){if(!a.isNodeJS)return i(e);try{let t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);const n=__webpack_require__(1418).deflateSync(t,{level:9});return n instanceof Uint8Array?n:new Uint8Array(n)}catch(e){(0,r.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return i(e)}(m),A=e.length+36+b.length+y.length,_=new Uint8Array(A);let w=0;return _.set(e,w),w+=e.length,n("IHDR",b,_,w),w+=12+b.length,n("IDATA",y,_,w),w+=12+y.length,n("IEND",new Uint8Array(0),_,w),(0,r.createObjectURL)(_,"image/png",s)}return function(e,t,n){return o(e,void 0===e.kind?r.ImageKind.GRAYSCALE_1BPP:e.kind,t,n)}}();class f{constructor(){this.fontSizeScale=1,this.fontWeight=e.fontWeight,this.fontSize=0,this.textMatrix=r.IDENTITY_MATRIX,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=r.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=e.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function s(e){if(Number.isInteger(e))return e.toString();const t=e.toFixed(10);let n=t.length-1;if("0"!==t[n])return t;do{n--}while("0"===t[n]);return t.substring(0,"."===t[n]?n:n+1)}function l(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${s(e[0])} ${s(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2])return`rotate(${s(180*Math.acos(e[0])/Math.PI)})`}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${s(e[4])} ${s(e[5])})`;return`matrix(${s(e[0])} ${s(e[1])} ${s(e[2])} ${s(e[3])} ${s(e[4])} `+`${s(e[5])})`}let p=0,m=0,g=0;t.SVGGraphics=o=class{constructor(e,t,n=!1){this.svgFactory=new i.DOMSVGFactory,this.current=new f,this.transformMatrix=r.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!n,this._operatorIdMapping=[];for(const e in r.OPS)this._operatorIdMapping[r.OPS[e]]=e}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,n=e.argsArray;for(let e=0,i=t.length;e<i;e++)if(t[e]===r.OPS.dependency)for(const t of n[e]){const e=t.startsWith("g_")?this.commonObjs:this.objs,n=new Promise(n=>{e.get(t,n)});this.current.dependencies.push(n)}return Promise.all(this.current.dependencies)}transform(e,t,n,i,a,o){const s=[e,t,n,i,a,o];this.transformMatrix=r.Util.transform(this.transformMatrix,s),this.tgrp=null}getSVG(e,t){this.viewport=t;const n=this._initialize(t);return this.loadDependencies(e).then(()=>(this.transformMatrix=r.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),n))}convertOpList(e){const t=this._operatorIdMapping,n=e.argsArray,r=e.fnArray,i=[];for(let e=0,a=r.length;e<a;e++){const a=r[e];i.push({fnId:a,fn:t[a],args:n[e]})}return function(e){let t=[];const n=[];for(const r of e)"save"!==r.fn?"restore"===r.fn?t=n.pop():t.push(r):(t.push({fnId:92,fn:"group",items:[]}),n.push(t),t=t[t.length-1].items);return t}(i)}executeOpTree(e){for(const t of e){const e=t.fn,n=t.fnId,i=t.args;switch(0|n){case r.OPS.beginText:this.beginText();break;case r.OPS.dependency:break;case r.OPS.setLeading:this.setLeading(i);break;case r.OPS.setLeadingMoveText:this.setLeadingMoveText(i[0],i[1]);break;case r.OPS.setFont:this.setFont(i);break;case r.OPS.showText:case r.OPS.showSpacedText:this.showText(i[0]);break;case r.OPS.endText:this.endText();break;case r.OPS.moveText:this.moveText(i[0],i[1]);break;case r.OPS.setCharSpacing:this.setCharSpacing(i[0]);break;case r.OPS.setWordSpacing:this.setWordSpacing(i[0]);break;case r.OPS.setHScale:this.setHScale(i[0]);break;case r.OPS.setTextMatrix:this.setTextMatrix(i[0],i[1],i[2],i[3],i[4],i[5]);break;case r.OPS.setTextRise:this.setTextRise(i[0]);break;case r.OPS.setTextRenderingMode:this.setTextRenderingMode(i[0]);break;case r.OPS.setLineWidth:this.setLineWidth(i[0]);break;case r.OPS.setLineJoin:this.setLineJoin(i[0]);break;case r.OPS.setLineCap:this.setLineCap(i[0]);break;case r.OPS.setMiterLimit:this.setMiterLimit(i[0]);break;case r.OPS.setFillRGBColor:this.setFillRGBColor(i[0],i[1],i[2]);break;case r.OPS.setStrokeRGBColor:this.setStrokeRGBColor(i[0],i[1],i[2]);break;case r.OPS.setStrokeColorN:this.setStrokeColorN(i);break;case r.OPS.setFillColorN:this.setFillColorN(i);break;case r.OPS.shadingFill:this.shadingFill(i[0]);break;case r.OPS.setDash:this.setDash(i[0],i[1]);break;case r.OPS.setRenderingIntent:this.setRenderingIntent(i[0]);break;case r.OPS.setFlatness:this.setFlatness(i[0]);break;case r.OPS.setGState:this.setGState(i[0]);break;case r.OPS.fill:this.fill();break;case r.OPS.eoFill:this.eoFill();break;case r.OPS.stroke:this.stroke();break;case r.OPS.fillStroke:this.fillStroke();break;case r.OPS.eoFillStroke:this.eoFillStroke();break;case r.OPS.clip:this.clip("nonzero");break;case r.OPS.eoClip:this.clip("evenodd");break;case r.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case r.OPS.paintImageXObject:this.paintImageXObject(i[0]);break;case r.OPS.paintInlineImageXObject:this.paintInlineImageXObject(i[0]);break;case r.OPS.paintImageMaskXObject:this.paintImageMaskXObject(i[0]);break;case r.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(i[0],i[1]);break;case r.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case r.OPS.closePath:this.closePath();break;case r.OPS.closeStroke:this.closeStroke();break;case r.OPS.closeFillStroke:this.closeFillStroke();break;case r.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case r.OPS.nextLine:this.nextLine();break;case r.OPS.transform:this.transform(i[0],i[1],i[2],i[3],i[4],i[5]);break;case r.OPS.constructPath:this.constructPath(i[0],i[1]);break;case r.OPS.endPath:this.endPath();break;case 92:this.group(t.items);break;default:(0,r.warn)(`Unimplemented operator ${e}`)}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,n,r,i,a){const o=this.current;o.textMatrix=o.lineMatrix=[e,t,n,r,i,a],o.textMatrixScale=Math.sqrt(e*e+t*t),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.ycoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size",`${s(o.fontSize)}px`),o.tspan.setAttributeNS(null,"y",s(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.appendChild(o.tspan)}beginText(){const e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=r.IDENTITY_MATRIX,e.lineMatrix=r.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}moveText(e,t){const n=this.current;n.x=n.lineX+=e,n.y=n.lineY+=t,n.xcoords=[],n.ycoords=[],n.tspan=this.svgFactory.createElement("svg:tspan"),n.tspan.setAttributeNS(null,"font-family",n.fontFamily),n.tspan.setAttributeNS(null,"font-size",`${s(n.fontSize)}px`),n.tspan.setAttributeNS(null,"y",s(-n.y))}showText(t){const i=this.current,a=i.font,o=i.fontSize;if(0===o)return;const c=i.fontSizeScale,u=i.charSpacing,d=i.wordSpacing,h=i.fontDirection,f=i.textHScale*h,p=a.vertical,m=p?1:-1,g=a.defaultVMetrics,v=o*i.fontMatrix[0];let b=0;for(const e of t){if(null===e){b+=h*d;continue}if((0,r.isNum)(e)){b+=m*e*o/1e3;continue}const t=(e.isSpace?d:0)+u,n=e.fontChar;let s,l,f,y=e.width;if(p){let t;const n=e.vmetric||g;t=e.vmetric?n[1]:.5*y,t=-t*v;const r=n[2]*v;y=n?-n[0]:y,s=t/c,l=(b+r)/c}else s=b/c,l=0;(e.isInFont||a.missingFile)&&(i.xcoords.push(i.x+s),p&&i.ycoords.push(-i.y+l),i.tspan.textContent+=n),f=p?y*v-t*h:y*v+t*h,b+=f}i.tspan.setAttributeNS(null,"x",i.xcoords.map(s).join(" ")),p?i.tspan.setAttributeNS(null,"y",i.ycoords.map(s).join(" ")):i.tspan.setAttributeNS(null,"y",s(-i.y)),p?i.y-=b:i.x+=b*f,i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",`${s(i.fontSize)}px`),i.fontStyle!==e.fontStyle&&i.tspan.setAttributeNS(null,"font-style",i.fontStyle),i.fontWeight!==e.fontWeight&&i.tspan.setAttributeNS(null,"font-weight",i.fontWeight);const y=i.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;if(y===r.TextRenderingMode.FILL||y===r.TextRenderingMode.FILL_STROKE?(i.fillColor!==e.fillColor&&i.tspan.setAttributeNS(null,"fill",i.fillColor),i.fillAlpha<1&&i.tspan.setAttributeNS(null,"fill-opacity",i.fillAlpha)):i.textRenderingMode===r.TextRenderingMode.ADD_TO_PATH?i.tspan.setAttributeNS(null,"fill","transparent"):i.tspan.setAttributeNS(null,"fill","none"),y===r.TextRenderingMode.STROKE||y===r.TextRenderingMode.FILL_STROKE){const e=1/(i.textMatrixScale||1);this._setStrokeAttributes(i.tspan,e)}let A=i.textMatrix;0!==i.textRise&&(A=A.slice(),A[5]+=i.textRise),i.txtElement.setAttributeNS(null,"transform",`${l(A)} scale(${s(f)}, -1)`),i.txtElement.setAttributeNS(n,"xml:space","preserve"),i.txtElement.appendChild(i.tspan),i.txtgrp.appendChild(i.txtElement),this._ensureTransformGroup().appendChild(i.txtElement)}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));const t=(0,r.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${e.loadedName}";`+` src: url(${t}); }\n`}setFont(e){const t=this.current,n=this.commonObjs.get(e[0]);let i=e[1];t.font=n,!this.embedFonts||n.missingFile||this.embeddedFonts[n.loadedName]||(this.addFontStyle(n),this.embeddedFonts[n.loadedName]=n),t.fontMatrix=n.fontMatrix?n.fontMatrix:r.FONT_IDENTITY_MATRIX;let a="normal";n.black?a="900":n.bold&&(a="bold");const o=n.italic?"italic":"normal";i<0?(i=-i,t.fontDirection=-1):t.fontDirection=1,t.fontSize=i,t.fontFamily=n.loadedName,t.fontWeight=a,t.fontStyle=o,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",s(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){const e=this.current;e.textRenderingMode&r.TextRenderingMode.ADD_TO_PATH_FLAG&&e.txtElement&&e.txtElement.hasChildNodes()&&(e.element=e.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){e>0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=u[e]}setLineJoin(e){this.current.lineJoin=d[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,n){this.current.strokeColor=r.Util.makeCssRgb(e,t,n)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,n){this.current.fillColor=r.Util.makeCssRgb(e,t,n),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,n=this.viewport.height,i=r.Util.inverseTransform(this.transformMatrix),a=r.Util.applyTransform([0,0],i),o=r.Util.applyTransform([0,n],i),s=r.Util.applyTransform([t,0],i),l=r.Util.applyTransform([t,n],i),c=Math.min(a[0],o[0],s[0],l[0]),u=Math.min(a[1],o[1],s[1],l[1]),d=Math.max(a[0],o[0],s[0],l[0]),h=Math.max(a[1],o[1],s[1],l[1]),f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x",c),f.setAttributeNS(null,"y",u),f.setAttributeNS(null,"width",d-c),f.setAttributeNS(null,"height",h-u),f.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&f.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(f)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],n=e[2],i=e[3]||r.IDENTITY_MATRIX,[a,o,s,l]=e[4],c=e[5],u=e[6],d=e[7],h=`shading${g++}`,[f,p]=r.Util.applyTransform([a,o],i),[m,v]=r.Util.applyTransform([s,l],i),[b,y]=r.Util.singularValueDecompose2dScale(i),A=c*b,_=u*y,w=this.svgFactory.createElement("svg:pattern");w.setAttributeNS(null,"id",h),w.setAttributeNS(null,"patternUnits","userSpaceOnUse"),w.setAttributeNS(null,"width",A),w.setAttributeNS(null,"height",_),w.setAttributeNS(null,"x",`${f}`),w.setAttributeNS(null,"y",`${p}`);const E=this.svg,S=this.transformMatrix,C=this.current.fillColor,T=this.current.strokeColor,k=this.svgFactory.create(m-f,v-p);if(this.svg=k,this.transformMatrix=i,2===d){const e=r.Util.makeCssRgb(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(n)),this.svg=E,this.transformMatrix=S,this.current.fillColor=C,this.current.strokeColor=T,w.appendChild(k.childNodes[0]),this.defs.appendChild(w),`url(#${h})`}_makeShadingPattern(e){switch(e[0]){case"RadialAxial":const t=`shading${g++}`,n=e[3];let i;switch(e[1]){case"axial":const n=e[4],r=e[5];i=this.svgFactory.createElement("svg:linearGradient"),i.setAttributeNS(null,"id",t),i.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i.setAttributeNS(null,"x1",n[0]),i.setAttributeNS(null,"y1",n[1]),i.setAttributeNS(null,"x2",r[0]),i.setAttributeNS(null,"y2",r[1]);break;case"radial":const a=e[4],o=e[5],s=e[6],l=e[7];i=this.svgFactory.createElement("svg:radialGradient"),i.setAttributeNS(null,"id",t),i.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i.setAttributeNS(null,"cx",o[0]),i.setAttributeNS(null,"cy",o[1]),i.setAttributeNS(null,"r",l),i.setAttributeNS(null,"fx",a[0]),i.setAttributeNS(null,"fy",a[1]),i.setAttributeNS(null,"fr",s);break;default:throw new Error(`Unknown RadialAxial type: ${e[1]}`)}for(const e of n){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),i.appendChild(t)}return this.defs.appendChild(i),`url(#${t})`;case"Mesh":return(0,r.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${e[0]}`)}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const n=this.current;let i=n.x,a=n.y,o=[],l=0;for(const n of e)switch(0|n){case r.OPS.rectangle:i=t[l++],a=t[l++];const e=i+t[l++],n=a+t[l++];o.push("M",s(i),s(a),"L",s(e),s(a),"L",s(e),s(n),"L",s(i),s(n),"Z");break;case r.OPS.moveTo:i=t[l++],a=t[l++],o.push("M",s(i),s(a));break;case r.OPS.lineTo:i=t[l++],a=t[l++],o.push("L",s(i),s(a));break;case r.OPS.curveTo:i=t[l+4],a=t[l+5],o.push("C",s(t[l]),s(t[l+1]),s(t[l+2]),s(t[l+3]),s(i),s(a)),l+=6;break;case r.OPS.curveTo2:o.push("C",s(i),s(a),s(t[l]),s(t[l+1]),s(t[l+2]),s(t[l+3])),i=t[l+2],a=t[l+3],l+=4;break;case r.OPS.curveTo3:i=t[l+2],a=t[l+3],o.push("C",s(t[l]),s(t[l+1]),s(i),s(a),s(i),s(a)),l+=4;break;case r.OPS.closePath:o.push("Z")}o=o.join(" "),n.path&&e.length>0&&e[0]!==r.OPS.rectangle&&e[0]!==r.OPS.moveTo?o=n.path.getAttributeNS(null,"d")+o:(n.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(n.path)),n.path.setAttributeNS(null,"d",o),n.path.setAttributeNS(null,"fill","none"),n.element=n.path,n.setCurrentPoint(i,a)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t=`clippath${p++}`,n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",l(this.transformMatrix));const r=e.element.cloneNode(!0);"evenodd"===this.pendingClip?r.setAttributeNS(null,"clip-rule","evenodd"):r.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,n.appendChild(r),this.defs.appendChild(n),e.activeClipUrl&&(e.clipGroup=null,this.extraStack.forEach((function(e){e.clipGroup=null})),n.setAttributeNS(null,"clip-path",e.activeClipUrl)),e.activeClipUrl=`url(#${t})`,this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t=`${e.path.getAttributeNS(null,"d")}Z`;e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n);break;case"CA":this.setStrokeAlpha(n);break;case"ca":this.setFillAlpha(n);break;default:(0,r.warn)(`Unimplemented graphic state operator ${t}`)}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e,t=1){const n=this.current;let r=n.dashArray;1!==t&&r.length>0&&(r=r.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",n.strokeColor),e.setAttributeNS(null,"stroke-opacity",n.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",s(n.miterLimit)),e.setAttributeNS(null,"stroke-linecap",n.lineCap),e.setAttributeNS(null,"stroke-linejoin",n.lineJoin),e.setAttributeNS(null,"stroke-width",s(t*n.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",r.map(s).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",s(t*n.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}paintImageXObject(e){const t=this.objs.get(e);t?this.paintInlineImageXObject(t):(0,r.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){const n=e.width,r=e.height,i=h(e,this.forceDataSchema,!!t),a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",s(n)),a.setAttributeNS(null,"height",s(r)),this.current.element=a,this.clip("nonzero");const o=this.svgFactory.createElement("svg:image");o.setAttributeNS(c,"xlink:href",i),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",s(-r)),o.setAttributeNS(null,"width",s(n)+"px"),o.setAttributeNS(null,"height",s(r)+"px"),o.setAttributeNS(null,"transform",`scale(${s(1/n)} ${s(-1/r)})`),t?t.appendChild(o):this._ensureTransformGroup().appendChild(o)}paintImageMaskXObject(e){const t=this.current,n=e.width,r=e.height,i=t.fillColor;t.maskId=`mask${m++}`;const a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);const o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",s(n)),o.setAttributeNS(null,"height",s(r)),o.setAttributeNS(null,"fill",i),o.setAttributeNS(null,"mask",`url(#${t.maskId})`),this.defs.appendChild(a),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,a)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],n=t[3]-t[1],r=this.svgFactory.createElement("svg:rect");r.setAttributeNS(null,"x",t[0]),r.setAttributeNS(null,"y",t[1]),r.setAttributeNS(null,"width",s(e)),r.setAttributeNS(null,"height",s(n)),this.current.element=r,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),n=this.svgFactory.createElement("svg:defs");t.appendChild(n),this.defs=n;const r=this.svgFactory.createElement("svg:g");return r.setAttributeNS(null,"transform",l(e.transform)),t.appendChild(r),this.svg=r,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",l(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var r=n(2),i=n(20);const a=__webpack_require__(1419),o=__webpack_require__(1420),s=__webpack_require__(1421),l=__webpack_require__(1422),c=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){const t=l.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse(`file:///${e}`):(t.host||(t.protocol="file:"),t)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new m(this):new f(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=this.isFsUrl?new g(this,e,t):new p(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}};class u{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=(0,r.createPromiseCapability)(),this._headersCapability=(0,r.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,r.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new r.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class d{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,r.createPromiseCapability)();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,r.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function h(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class f extends u{constructor(e){super(e);const t=t=>{if(404===t.statusCode){const e=new r.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const n=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:a,suggestedLength:o}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:n,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=a,this._contentLength=o||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(n)};this._request=null,"http:"===this._url.protocol?this._request=o.request(h(this._url,e.httpHeaders),t):this._request=s.request(h(this._url,e.httpHeaders),t),this._request.on("error",e=>{this._storedError=e,this._headersCapability.reject(e)}),this._request.end()}}class p extends d{constructor(e,t,n){super(e),this._httpHeaders={};for(const t in e.httpHeaders){const n=e.httpHeaders[t];void 0!==n&&(this._httpHeaders[t]=n)}this._httpHeaders.Range=`bytes=${t}-${n-1}`;const i=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e}};this._request=null,"http:"===this._url.protocol?this._request=o.request(h(this._url,this._httpHeaders),i):this._request=s.request(h(this._url,this._httpHeaders),i),this._request.on("error",e=>{this._storedError=e}),this._request.end()}}class m extends u{constructor(e){super(e);let t=decodeURIComponent(this._url.path);c.test(this._url.href)&&(t=t.replace(/^\//,"")),a.lstat(t,(e,n)=>{if(e)return"ENOENT"===e.code&&(e=new r.MissingPDFException(`Missing PDF "${t}".`)),this._storedError=e,void this._headersCapability.reject(e);this._contentLength=n.size,this._setReadableStream(a.createReadStream(t)),this._headersCapability.resolve()})}}class g extends d{constructor(e,t,n){super(e);let r=decodeURIComponent(this._url.path);c.test(this._url.href)&&(r=r.replace(/^\//,"")),this._setReadableStream(a.createReadStream(r,{start:t,end:n-1}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new r.MissingPDFException('Missing PDF "'+t+'".'):new r.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)},t.extractFilenameFromHeader=function(e){const t=e("Content-Disposition");if(t){let e=(0,i.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(e){}if(/\.pdf$/i.test(e))return e}return null},t.validateRangeRequestCapabilities=function({getResponseHeader:e,isHttp:t,rangeChunkSize:n,disableRange:i}){(0,r.assert)(n>0,"Range chunk size must be larger than zero");const a={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(e("Content-Length"),10);return Number.isInteger(o)?(a.suggestedLength=o,o<=2*n?a:i||!t?a:"bytes"!==e("Accept-Ranges")?a:"identity"!==(e("Content-Encoding")||"identity")?a:(a.allowRangeRequests=!0,a)):a},t.validateResponseStatus=function(e){return 200===e||206===e};var r=n(2),i=n(21)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let t=!0,n=r("filename\\*","i").exec(e);if(n){n=n[1];let e=o(n);return e=unescape(e),e=s(e),e=l(e),a(e)}if(n=function(e){const t=[];let n;const i=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(n=i.exec(e));){let[,e,r,i]=n;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[r,i]}const a=[];for(let e=0;e<t.length&&e in t;++e){let[n,r]=t[e];r=o(r),n&&(r=unescape(r),0===e&&(r=s(r))),a.push(r)}return a.join("")}(e),n)return a(l(n));if(n=r("filename","i").exec(e),n){n=n[1];let e=o(n);return e=l(e),a(e)}function r(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function i(e,n){if(e){if(!/^[\x00-\xFF]+$/.test(n))return n;try{const r=new TextDecoder(e,{fatal:!0}),i=Array.from(n,(function(e){return 255&e.charCodeAt(0)}));n=r.decode(new Uint8Array(i)),t=!1}catch(r){if(/^utf-?8$/i.test(e))try{n=decodeURIComponent(escape(n)),t=!1}catch(e){}}}return n}function a(e){return t&&/[\x80-\xff]/.test(e)&&(e=i("utf-8",e),t&&(e=i("iso-8859-1",e))),e}function o(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const n=t[e].indexOf('"');-1!==n&&(t[e]=t[e].slice(0,n),t.length=e+1),t[e]=t[e].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function s(e){const t=e.indexOf("'");return-1===t?e:i(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function l(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,n,r){if("q"===n||"Q"===n)return i(t,r=(r=r.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{r=atob(r)}catch(e){}return i(t,r)}))}return""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var r=n(2),i=n(20);class a{constructor(e,t){this.url=e,t=t||{},this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this.withCredentials=t.withCredentials||!1,this.getXhr=t.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,n){const r={begin:e,end:t};for(const e in n)r[e]=n[e];return this.request(r)}requestFull(e){return this.request(e)}request(e){const t=this.getXhr(),n=this.currXhrId++,r=this.pendingRequests[n]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const e in this.httpHeaders){const n=this.httpHeaders[e];void 0!==n&&t.setRequestHeader(e,n)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),r.expectedStatus=206):r.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(n){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,n),t.onprogress=this.onProgress.bind(this,n),r.onHeadersReceived=e.onHeadersReceived,r.onDone=e.onDone,r.onError=e.onError,r.onProgress=e.onProgress,t.send(null),n}onProgress(e,t){const n=this.pendingRequests[e];n&&n.onProgress&&n.onProgress(t)}onStateChange(e,t){const n=this.pendingRequests[e];if(!n)return;const i=n.xhr;if(i.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),4!==i.readyState)return;if(!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===i.status&&this.isHttp)return void(n.onError&&n.onError(i.status));const a=i.status||200;if((200!==a||206!==n.expectedStatus)&&a!==n.expectedStatus)return void(n.onError&&n.onError(i.status));const o=function(e){const t=e.response;return"string"!=typeof t?t:(0,r.stringToBytes)(t).buffer}(i);if(206===a){const e=i.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);n.onDone({begin:parseInt(t[1],10),chunk:o})}else o?n.onDone({begin:0,chunk:o}):n.onError&&n.onError(i.status)}hasPendingRequests(){for(const e in this.pendingRequests)return!0;return!1}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortAllRequests(){for(const e in this.pendingRequests)this.abortRequest(0|e)}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new a(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new o(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const n=new s(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}};class o{constructor(e,t){this._manager=e;const n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(n),this._headersReceivedCapability=(0,r.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=e=>t.getResponseHeader(e),{allowRangeRequests:r,suggestedLength:a}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[])}_onError(e){const t=this._url,n=(0,i.createResponseStatusError)(e,t);this._storedError=n,this._headersReceivedCapability.reject(n),this._requests.forEach((function(e){e.reject(n)})),this._requests=[],this._cachedChunks=[]}_onProgress(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class s{constructor(e,t,n){this._manager=e;const r={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=e.requestRange(t,n,r),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}_close(){this.onClosed&&this.onClosed(this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}_onProgress(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var r=n(2),i=n(20);function a(e,t,n){return{method:"GET",headers:e,signal:n&&n.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function o(e){const t=new Headers;for(const n in e){const r=e[n];void 0!==r&&t.append(n,r)}return t}t.PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new s(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new l(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}};class s{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=(0,r.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=o(this._stream.httpHeaders);const n=t.url;fetch(n,a(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,n);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:a,suggestedLength:o}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=a,this._contentLength=o||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new r.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}class l{constructor(e,t,n){this._stream=e,this._reader=null,this._loaded=0;const s=e.source;this._withCredentials=s.withCredentials||!1,this._readCapability=(0,r.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=o(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${n-1}`);const l=s.url;fetch(l,a(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,l);this._readCapability.resolve(),this._reader=e.body.getReader()}),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}}])},module.exports=factory()}).call(this,__webpack_require__(96),__webpack_require__(113).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.focusEvents=t.keyboardEvents=t.touchEvents=t.mouseEvents=void 0;var r=["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"];t.mouseEvents=r;var i=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"];t.touchEvents=i;var a=["onKeyDown","onKeyPress","onKeyUp"];t.keyboardEvents=a;var o=["onFocus","onBlur"];t.focusEvents=o;var s=function(e,t){var n={};return[].concat(r,i,a,o).forEach((function(r){e[r]&&(n[r]=function(n){return t?e[r](n,t(r)):e[r](n)})})),n};t.default=s},function(e,t,n){"use strict";var r=String.fromCharCode;e.exports=r},function(e,t,n){"use strict";var r=n(121),i=n(134),a={tokenize:function(e,t,n){return i(e,(function(e){return null===e||r(e)?t(e):n(e)}),"linePrefix")},partial:!0};e.exports=a},function(e,t,n){"use strict";var r=n(920);e.exports=function(e,t){var n=e[e.length-1];return n&&n[1].type===t?r(n[2].sliceStream(n[1])):0}},function(e,t,n){"use strict";var r=n(215)(/[\dA-Za-z]/);e.exports=r},function(e,t,n){"use strict";e.exports=s;var r=n(1501),i=r.CONTINUE,a=r.SKIP,o=r.EXIT;function s(e,t,n,i){"function"==typeof t&&"function"!=typeof n&&(i=n,n=t,t=null),r(e,t,(function(e,t){var r=t[t.length-1],i=r?r.children.indexOf(e):null;return n(e,i,r)}),i)}s.CONTINUE=i,s.SKIP=a,s.EXIT=o},function(e,t,n){var r,i,a,o,s,l;e.exports=(l=n(84),i=(r=l).lib,a=i.Base,o=i.WordArray,(s=r.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),s.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return o.create(n,this.sigBytes)},clone:function(){for(var e=a.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),l)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.shallowEqual=t.ITERATOR_SYMBOL=void 0;var r="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},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.getAdapter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn("getAdapter from Utils is deprecated; please use ./getAdapter instead"),(0,b.default)(e)},t.makeOptions=function(e){var t=(0,g.get)(),n=t.attachTo,r=t.hydrateIn,i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["attachTo","hydrateIn"]);w(n,r);var a=e.attachTo,s=e.hydrateIn;w(a,s);var l=s||r||n||a||void 0,c=s||r||void 0,u=(0,o.default)({},l&&{attachTo:l},c&&{hydrateIn:c});return(0,o.default)({},i,e,u)},t.isCustomComponent=function(e,t){if((0,y.default)(t),t.isCustomComponent)return!!t.isCustomComponent(e);return"function"==typeof e},t.isCustomComponentElement=function(e,t){if(t.isCustomComponentElement)return!!t.isCustomComponentElement(e);return!!e&&t.isValidElement(e)&&"function"==typeof e.type},t.propsOfNode=E,t.typeOfNode=function(e){return e?e.type:null},t.nodeHasType=function(e,t){if(!t||!e)return!1;var n=(0,b.default)();if(n.displayNameOfNode){return n.displayNameOfNode(e)===t}return!!e.type&&("string"==typeof e.type?e.type===t:("function"==typeof e.type?(0,u.default)(e.type)===t:e.type.name===t)||e.type.displayName===t)},t.nodeMatches=O,t.nodeEqual=I,t.containsChildrenSubArray=function(e,t,n){var r=(0,v.childrenOfNode)(t);return r.some((function(t,i){return function(e,t,n){return t.length===n.length&&t.every((function(t,r){return e(t,n[r])}))}(e,r.slice(i,i+n.length),n)}))},t.childrenToSimplifiedArray=P,t.isReactElementAlike=function(e,t){return t.isValidElement(e)||D(e)||Array.isArray(e)},t.withSetStateAllowed=function(t){var n=!1;void 0===e.document&&(n=!0,e.document={});t(),n&&(e.document=void 0,delete e.document)},t.AND=function(e){var t=e.slice().reverse();return function(e){return t.every((function(t){return t(e)}))}},t.displayNameOfNode=function(e){if(!e)return null;var t=e.type;return t?t.displayName||("function"==typeof t?(0,u.default)(t):t.name||t):null},t.sym=function(e){return"function"==typeof Symbol?Symbol.for("enzyme."+String(e)):e},t.privateSet=function(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0})},t.cloneElement=function(e,t,n){return e.createElement(t.type,(0,o.default)({},t.props,n))},t.spyMethod=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0,i=e[t],a=(0,d.default)(e,t),o=void 0;a&&(o=Object.getOwnPropertyDescriptor(e,t));return Object.defineProperty(e,t,{configurable:!0,enumerable:!o||!!o.enumerable,value:n(i)||function(){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=i.apply(this,t);return r=a,a}}()}),{restore:function(){return function(){a?o?Object.defineProperty(e,t,o):e[t]=i:delete e[t]}}(),getLastReturnValue:function(){return function(){return r}}()}};var a=n(956);Object.defineProperty(t,"shallowEqual",{enumerable:!0,get:function(){return A(a).default}}),t.isEmptyValue=N,t.renderedDive=function e(t){if(N(t))return!0;return[].concat(t).every((function(t){if(t){var n=t.rendered;return N(n)||e(n)}return N(t)}))},t.loadCheerioRoot=function(e){if(!e)return p.default.root();if(!(0,m.isHtml)(e))return p.default.load(e,null,!1).root();return p.default.load("")(e)};var o=A(n(273)),s=A(n(1731)),l=A(n(354)),c=A(n(957)),u=A(n(529)),d=A(n(156)),h=A(n(317)),f=A(n(1734)),p=A(n(1736)),m=n(241),g=n(540),v=n(321),b=A(n(242)),y=A(n(541));function A(e){return e&&e.__esModule?e:{default:e}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.ITERATOR_SYMBOL="function"==typeof Symbol&&Symbol.iterator;function w(e,t){if(e&&t&&e!==t)throw new TypeError("If both the `attachTo` and `hydrateIn` options are provided, they must be === (for backwards compatibility)")}function E(e){return(0,c.default)(e&&e.props||{}).filter((function(e){return void 0!==i(e,2)[1]})).reduce((function(e,t){var n=i(t,2),r=n[0],a=n[1];return(0,o.default)(e,_({},r,a))}),{})}function S(e,t,n,r){var i=r?O:I;if(e===t)return!0;if(!Array.isArray(e)&&!Array.isArray(t))return i(e,t,n);var a=(0,h.default)(e,1/0),o=(0,h.default)(t,1/0);if(a.length!==o.length)return!1;if(0===a.length&&0===o.length)return!0;for(var s=0;s<a.length;s+=1)if(!i(a[s],o[s],n))return!1;return!0}function C(e,t,n){return S(e,t,n,!0)}function T(e,t,n){return S(e,t,n,!1)}function k(e,t){var n=i(t,2),r=n[0],a=n[1],s=null==a?{}:_({},r,a);return(0,o.default)({},e,s)}function x(e,t,n,i){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;var a=E(e),o=E(t);i&&(a=(0,c.default)(a).reduce(k,{}),o=(0,c.default)(o).reduce(k,{}));for(var l=Object.keys(a),u=0;u<l.length;u+=1){var d=l[u];if("children"===d);else{if(!(d in o))return!1;if(o[d]===a[d]);else{if(r(o[d])!==r(a[d])||"object"!==r(a[d]))return!1;if(!(0,s.default)(a[d],o[d]))return!1}}}var h="children"in a,f="children"in o;if((h||f)&&!(i?C:T)(P(a.children,i),P(o.children,i),n))return!1;if(!D(e)){var p=Object.keys(o);return n(l.length-h,p.length-f)}return!1}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default;return x(e,t,n,!0)}function I(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default;return x(e,t,n,!1)}function M(e){var t=[],n=function(e){null!==e&&!1!==e&&void 0!==e&&t.push(e)};return Array.isArray(e)?e.forEach(n):n(e),t}function P(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=M(e),r=[],i=0;i<n.length;i+=1){var a=n[i],o=r.pop();void 0===o?r.push(a):D(a)&&D(o)?r.push(o+a):(r.push(o),r.push(a))}return t?r.map((function(e){return"string"==typeof e?(0,f.default)(e):e})):r}function D(e){return"string"==typeof e||"number"==typeof e}function N(e){return null===e||!1===e}}).call(this,n(68))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},function(e,t,n){"use strict";const r=n(1764),i=n(536),a=n(1765),o=n(537),s=i.CODE_POINTS,l=i.CODE_POINT_SEQUENCES,c={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},u="DATA_STATE";function d(e){return e===s.SPACE||e===s.LINE_FEED||e===s.TABULATION||e===s.FORM_FEED}function h(e){return e>=s.DIGIT_0&&e<=s.DIGIT_9}function f(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_Z}function p(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_Z}function m(e){return p(e)||f(e)}function g(e){return m(e)||h(e)}function v(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_F}function b(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_F}function y(e){return e+32}function A(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function _(e){return String.fromCharCode(y(e))}function w(e,t){const n=a[++e];let r=++e,i=r+n-1;for(;r<=i;){const e=r+i>>>1,o=a[e];if(o<t)r=e+1;else{if(!(o>t))return a[e+n];i=e-1}}return-1}class E{constructor(){this.preprocessor=new r,this.tokenQueue=[],this.allowCDATA=!1,this.state=u,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:E.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,i=!0;const a=e.length;let o=0,l=t,c=void 0;for(;o<a;o++){if(o>0&&(l=this._consume(),r++),l===s.EOF){i=!1;break}if(c=e[o],l!==c&&(n||l!==y(c))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==l.SCRIPT_STRING.length)return!1;for(let e=0;e<this.tempBuff.length;e++)if(this.tempBuff[e]!==l.SCRIPT_STRING[e])return!1;return!0}_createStartTagToken(){this.currentToken={type:E.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:E.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:E.COMMENT_TOKEN,data:""}}_createDoctypeToken(e){this.currentToken={type:E.DOCTYPE_TOKEN,name:e,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t}}_createEOFToken(){this.currentToken={type:E.EOF_TOKEN}}_createAttr(e){this.currentAttr={name:e,value:""}}_leaveAttrName(e){null===E.getTokenAttr(this.currentToken,this.currentAttr.name)?this.currentToken.attrs.push(this.currentAttr):this._err(o.duplicateAttribute),this.state=e}_leaveAttrValue(e){this.state=e}_emitCurrentToken(){this._emitCurrentCharacterToken();const e=this.currentToken;this.currentToken=null,e.type===E.START_TAG_TOKEN?this.lastStartTagName=e.tagName:e.type===E.END_TAG_TOKEN&&(e.attrs.length>0&&this._err(o.endTagWithAttributes),e.selfClosing&&this._err(o.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=E.CHARACTER_TOKEN;d(e)?t=E.WHITESPACE_CHARACTER_TOKEN:e===s.NULL&&(t=E.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,A(e))}_emitSeveralCodePoints(e){for(let t=0;t<e.length;t++)this._emitCodePoint(e[t])}_emitChars(e){this._appendCharToCurrentCharacterToken(E.CHARACTER_TOKEN,e)}_matchNamedCharacterReference(e){let t=null,n=1,r=w(0,e);for(this.tempBuff.push(e);r>-1;){const e=a[r],i=e<7;i&&1&e&&(t=2&e?[a[++r],a[++r]]:[a[++r]],n=0);const o=this._consume();if(this.tempBuff.push(o),n++,o===s.EOF)break;r=i?4&e?w(r,o):-1:o===e?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_UNQUOTED_STATE"===this.returnState}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===s.EQUALS_SIGN||g(e)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e<this.tempBuff.length;e++)this.currentAttr.value+=A(this.tempBuff[e]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[u](e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state="TAG_OPEN_STATE":e===s.AMPERSAND?(this.returnState=u,this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(o.unexpectedNullCharacter),this._emitCodePoint(e)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}RCDATA_STATE(e){this.preprocessor.dropParsedChunk(),e===s.AMPERSAND?(this.returnState="RCDATA_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.LESS_THAN_SIGN?this.state="RCDATA_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}RAWTEXT_STATE(e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state="RAWTEXT_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}SCRIPT_DATA_STATE(e){this.preprocessor.dropParsedChunk(),e===s.LESS_THAN_SIGN?this.state="SCRIPT_DATA_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}PLAINTEXT_STATE(e){this.preprocessor.dropParsedChunk(),e===s.NULL?(this._err(o.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?this._emitEOFToken():this._emitCodePoint(e)}TAG_OPEN_STATE(e){e===s.EXCLAMATION_MARK?this.state="MARKUP_DECLARATION_OPEN_STATE":e===s.SOLIDUS?this.state="END_TAG_OPEN_STATE":m(e)?(this._createStartTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===s.QUESTION_MARK?(this._err(o.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE")):e===s.EOF?(this._err(o.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(o.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(u))}END_TAG_OPEN_STATE(e){m(e)?(this._createEndTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===s.GREATER_THAN_SIGN?(this._err(o.missingEndTagName),this.state=u):e===s.EOF?(this._err(o.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(o.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}TAG_NAME_STATE(e){d(e)?this.state="BEFORE_ATTRIBUTE_NAME_STATE":e===s.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):f(e)?this.currentToken.tagName+=_(e):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.tagName+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(o.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=A(e)}RCDATA_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="RCDATA_END_TAG_OPEN_STATE"):(this._emitChars("<"),this._reconsumeInState("RCDATA_STATE"))}RCDATA_END_TAG_OPEN_STATE(e){m(e)?(this._createEndTagToken(),this._reconsumeInState("RCDATA_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("RCDATA_STATE"))}RCDATA_END_TAG_NAME_STATE(e){if(f(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else if(p(e))this.currentToken.tagName+=A(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===s.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===s.GREATER_THAN_SIGN)return this.state=u,void this._emitCurrentToken()}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RCDATA_STATE")}}RAWTEXT_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="RAWTEXT_END_TAG_OPEN_STATE"):(this._emitChars("<"),this._reconsumeInState("RAWTEXT_STATE"))}RAWTEXT_END_TAG_OPEN_STATE(e){m(e)?(this._createEndTagToken(),this._reconsumeInState("RAWTEXT_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("RAWTEXT_STATE"))}RAWTEXT_END_TAG_NAME_STATE(e){if(f(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else if(p(e))this.currentToken.tagName+=A(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===s.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RAWTEXT_STATE")}}SCRIPT_DATA_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_END_TAG_OPEN_STATE"):e===s.EXCLAMATION_MARK?(this.state="SCRIPT_DATA_ESCAPE_START_STATE",this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_STATE"))}SCRIPT_DATA_END_TAG_OPEN_STATE(e){m(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("SCRIPT_DATA_STATE"))}SCRIPT_DATA_END_TAG_NAME_STATE(e){if(f(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else if(p(e))this.currentToken.tagName+=A(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===s.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_STATE")}}SCRIPT_DATA_ESCAPE_START_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPE_START_DASH_STATE",this._emitChars("-")):this._reconsumeInState("SCRIPT_DATA_STATE")}SCRIPT_DATA_ESCAPE_START_DASH_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):this._reconsumeInState("SCRIPT_DATA_STATE")}SCRIPT_DATA_ESCAPED_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_STATE",this._emitChars("-")):e===s.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(o.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}SCRIPT_DATA_ESCAPED_DASH_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):e===s.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(o.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_ESCAPED_DASH_DASH_STATE(e){e===s.HYPHEN_MINUS?this._emitChars("-"):e===s.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===s.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChars(">")):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(o.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):m(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE(e){m(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE(e){if(f(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else if(p(e))this.currentToken.tagName+=A(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===s.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")}}SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_DOUBLE_ESCAPED_STATE":"SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e)):f(e)?(this.tempBuff.push(y(e)),this._emitCodePoint(e)):p(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")}SCRIPT_DATA_DOUBLE_ESCAPED_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",this._emitChars("-")):e===s.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===s.NULL?(this._err(o.unexpectedNullCharacter),this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(o.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE(e){e===s.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):e===s.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(o.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE(e){e===s.HYPHEN_MINUS?this._emitChars("-"):e===s.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===s.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChars(">")):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(o.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChars("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):f(e)?(this.tempBuff.push(y(e)),this._emitCodePoint(e)):p(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}BEFORE_ATTRIBUTE_NAME_STATE(e){d(e)||(e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===s.EQUALS_SIGN?(this._err(o.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}ATTRIBUTE_NAME_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===s.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):f(e)?this.currentAttr.name+=_(e):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN?(this._err(o.unexpectedCharacterInAttributeName),this.currentAttr.name+=A(e)):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentAttr.name+=i.REPLACEMENT_CHARACTER):this.currentAttr.name+=A(e)}AFTER_ATTRIBUTE_NAME_STATE(e){d(e)||(e===s.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===s.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}BEFORE_ATTRIBUTE_VALUE_STATE(e){d(e)||(e===s.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===s.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":e===s.GREATER_THAN_SIGN?(this._err(o.missingAttributeValue),this.state=u,this._emitCurrentToken()):this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))}ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(o.eofInTag),this._emitEOFToken()):this.currentAttr.value+=A(e)}ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(o.eofInTag),this._emitEOFToken()):this.currentAttr.value+=A(e)}ATTRIBUTE_VALUE_UNQUOTED_STATE(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_UNQUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN||e===s.EQUALS_SIGN||e===s.GRAVE_ACCENT?(this._err(o.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=A(e)):e===s.EOF?(this._err(o.eofInTag),this._emitEOFToken()):this.currentAttr.value+=A(e)}AFTER_ATTRIBUTE_VALUE_QUOTED_STATE(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===s.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInTag),this._emitEOFToken()):(this._err(o.missingWhitespaceBetweenAttributes),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}SELF_CLOSING_START_TAG_STATE(e){e===s.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInTag),this._emitEOFToken()):(this._err(o.unexpectedSolidusInTag),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}BOGUS_COMMENT_STATE(e){e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):this.currentToken.data+=A(e)}MARKUP_DECLARATION_OPEN_STATE(e){this._consumeSequenceIfMatch(l.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state="COMMENT_START_STATE"):this._consumeSequenceIfMatch(l.DOCTYPE_STRING,e,!1)?this.state="DOCTYPE_STATE":this._consumeSequenceIfMatch(l.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state="CDATA_SECTION_STATE":(this._err(o.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state="BOGUS_COMMENT_STATE"):this._ensureHibernation()||(this._err(o.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}COMMENT_START_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":e===s.GREATER_THAN_SIGN?(this._err(o.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):this._reconsumeInState("COMMENT_STATE")}COMMENT_START_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===s.GREATER_THAN_SIGN?(this._err(o.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}COMMENT_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":e===s.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state="COMMENT_LESS_THAN_SIGN_STATE"):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=A(e)}COMMENT_LESS_THAN_SIGN_STATE(e){e===s.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state="COMMENT_LESS_THAN_SIGN_BANG_STATE"):e===s.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState("COMMENT_STATE")}COMMENT_LESS_THAN_SIGN_BANG_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE":this._reconsumeInState("COMMENT_STATE")}COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE":this._reconsumeInState("COMMENT_END_DASH_STATE")}COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE(e){e!==s.GREATER_THAN_SIGN&&e!==s.EOF&&this._err(o.nestedComment),this._reconsumeInState("COMMENT_END_STATE")}COMMENT_END_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===s.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}COMMENT_END_STATE(e){e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":e===s.HYPHEN_MINUS?this.currentToken.data+="-":e===s.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState("COMMENT_STATE"))}COMMENT_END_BANG_STATE(e){e===s.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):e===s.GREATER_THAN_SIGN?(this._err(o.incorrectlyClosedComment),this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState("COMMENT_STATE"))}DOCTYPE_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_NAME_STATE":e===s.GREATER_THAN_SIGN?this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"):e===s.EOF?(this._err(o.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingWhitespaceBeforeDoctypeName),this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"))}BEFORE_DOCTYPE_NAME_STATE(e){d(e)||(f(e)?(this._createDoctypeToken(_(e)),this.state="DOCTYPE_NAME_STATE"):e===s.NULL?(this._err(o.unexpectedNullCharacter),this._createDoctypeToken(i.REPLACEMENT_CHARACTER),this.state="DOCTYPE_NAME_STATE"):e===s.GREATER_THAN_SIGN?(this._err(o.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(o.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(A(e)),this.state="DOCTYPE_NAME_STATE"))}DOCTYPE_NAME_STATE(e){d(e)?this.state="AFTER_DOCTYPE_NAME_STATE":e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):f(e)?this.currentToken.name+=_(e):e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.name+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=A(e)}AFTER_DOCTYPE_NAME_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(l.PUBLIC_STRING,e,!1)?this.state="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE":this._consumeSequenceIfMatch(l.SYSTEM_STRING,e,!1)?this.state="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE":this._ensureHibernation()||(this._err(o.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.QUOTATION_MARK?(this._err(o.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(o.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(o.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){d(e)||(e===s.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(o.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(o.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=A(e)}DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(o.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=A(e)}AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){d(e)?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":e===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):e===s.QUOTATION_MARK?(this._err(o.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(o.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.QUOTATION_MARK?(this._err(o.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(o.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(o.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){d(e)||(e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(o.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(o.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=A(e)}DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.NULL?(this._err(o.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(o.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=A(e)}AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.EOF?(this._err(o.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(o.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}BOGUS_DOCTYPE_STATE(e){e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):e===s.NULL?this._err(o.unexpectedNullCharacter):e===s.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}CDATA_SECTION_STATE(e){e===s.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_BRACKET_STATE":e===s.EOF?(this._err(o.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}CDATA_SECTION_BRACKET_STATE(e){e===s.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_END_STATE":(this._emitChars("]"),this._reconsumeInState("CDATA_SECTION_STATE"))}CDATA_SECTION_END_STATE(e){e===s.GREATER_THAN_SIGN?this.state=u:e===s.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState("CDATA_SECTION_STATE"))}CHARACTER_REFERENCE_STATE(e){this.tempBuff=[s.AMPERSAND],e===s.NUMBER_SIGN?(this.tempBuff.push(e),this.state="NUMERIC_CHARACTER_REFERENCE_STATE"):g(e)?this._reconsumeInState("NAMED_CHARACTER_REFERENCE_STATE"):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}NAMED_CHARACTER_REFERENCE_STATE(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[s.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===s.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(o.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state="AMBIGUOS_AMPERSAND_STATE"}AMBIGUOS_AMPERSAND_STATE(e){g(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=A(e):this._emitCodePoint(e):(e===s.SEMICOLON&&this._err(o.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}NUMERIC_CHARACTER_REFERENCE_STATE(e){this.charRefCode=0,e===s.LATIN_SMALL_X||e===s.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE"):this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_START_STATE")}HEXADEMICAL_CHARACTER_REFERENCE_START_STATE(e){!function(e){return h(e)||v(e)||b(e)}(e)?(this._err(o.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState("HEXADEMICAL_CHARACTER_REFERENCE_STATE")}DECIMAL_CHARACTER_REFERENCE_START_STATE(e){h(e)?this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_STATE"):(this._err(o.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}HEXADEMICAL_CHARACTER_REFERENCE_STATE(e){v(e)?this.charRefCode=16*this.charRefCode+e-55:b(e)?this.charRefCode=16*this.charRefCode+e-87:h(e)?this.charRefCode=16*this.charRefCode+e-48:e===s.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(o.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}DECIMAL_CHARACTER_REFERENCE_STATE(e){h(e)?this.charRefCode=10*this.charRefCode+e-48:e===s.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(o.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}NUMERIC_CHARACTER_REFERENCE_END_STATE(){if(this.charRefCode===s.NULL)this._err(o.nullCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(o.characterReferenceOutsideUnicodeRange),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(i.isSurrogate(this.charRefCode))this._err(o.surrogateCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(i.isUndefinedCodePoint(this.charRefCode))this._err(o.noncharacterCharacterReference);else if(i.isControlCodePoint(this.charRefCode)||this.charRefCode===s.CARRIAGE_RETURN){this._err(o.controlCharacterReference);const e=c[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}E.CHARACTER_TOKEN="CHARACTER_TOKEN",E.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",E.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",E.START_TAG_TOKEN="START_TAG_TOKEN",E.END_TAG_TOKEN="END_TAG_TOKEN",E.COMMENT_TOKEN="COMMENT_TOKEN",E.DOCTYPE_TOKEN="DOCTYPE_TOKEN",E.EOF_TOKEN="EOF_TOKEN",E.HIBERNATION_TOKEN="HIBERNATION_TOKEN",E.MODE={DATA:u,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},E.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=E},function(e,t,n){"use strict";var r=n(81);t.a=function(e,t){var n;void 0===t&&(t=!0);var i=new Promise((function(r){n=setTimeout(r,e,t)}));return i[r.a]=function(){clearTimeout(n)},i}},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,n,r){"use strict";r.d(n,"a",(function(){return Me}));var i=r(9),a=r.n(i),o=r(60),s=r.n(o),l=r(12),c=r.n(l),u=r(3),d=r.n(u),h=r(13),f=r.n(h),p=r(14),m=r.n(p),g=r(10),v=r.n(g),b=r(2),y=r.n(b),A=r(0),_=r.n(A),w=r(17),E=r(7),S=r(26),C=r(192),T=r.n(C),k=r(1),x=r(37),O=r(21),I=r.n(O),M=r(8),P=r(109),D=r(54),N=r(31),L=r.n(N),R=r(15),B=r.n(R),j=r(1836),F=r(1830),U=r(140),H=r(4),z=r.n(H),V=r(36),W=r(24),G=r.n(W),q=r(1815),Y=r(22),K=r(6),X=r.n(K),Q=r(51),$=r.n(Q),J=r(115),Z=r.n(J);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){y()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ne=k.g.PUBLISHING_STATUS,re=k.g.COGVID_STATUS,ie=k.g.SCOPE_COGVID_STATUS,ae=(k.g.VIDEO_OVERLAY_MODE,k.g.TEXT_INPUT_MAX_LENGTH),oe=(k.g.CURRENCIES,k.g.ACCESS_GRANT_TYPE),se=(k.g.SCOPE_CHAPTER_STATUS,k.g.SEARCH_PARAM.KEY),le=function(e){f()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=v()(e);if(t()){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}(r);function r(){var e;c()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),y()(d()(e),"state",{title:e.props.videoTitle,subject:e.props.subject,topic:e.props.topic,titleOrigin:e.props.videoTitle,subjectOrigin:e.props.subject,topicOrigin:e.props.topic,editingField:"",isDeleting:!1,isCloning:!1,isMovingVideoToGallery:!1,isItemPurchasing:!1,isPublishing:!1,isCloningFully:!1,isGetPublicFeedback:!1,isCheckingLatePublishStatus:!1}),y()(d()(e),"refItem",_.a.createRef()),y()(d()(e),"titleRef",_.a.createRef()),y()(d()(e),"subjectRef",_.a.createRef()),y()(d()(e),"topicRef",_.a.createRef()),y()(d()(e),"preventSaveOnBlur",!1),y()(d()(e),"showFeedbackFromLocation",(function(t){var n=Object(E.get)(t,"state",{}),r=n.showFeedbackModal,i=void 0!==r&&r,a=n.videoId,o=e.props,s=o.videoId,l=o.feedbackModal;s===a&&i&&!l.show&&(x.a.replace(te(te({},x.a.location),{},{state:{}})),setTimeout(e.handleGetlPublishVideoFeedback,500))})),y()(d()(e),"shouldComponentUpdate",(function(t,n){var r={},i={};return Object.keys(e.props).forEach((function(n){"function"!=typeof e.props[n]&&(r[n]=e.props[n],i[n]=t[n])})),!Object(E.isEqual)(r,i)||!Object(E.isEqual)(n,e.state)})),y()(d()(e),"handleTextAreaClick",(function(t){t.stopPropagation(),e.setState({editingField:t.target.name})})),y()(d()(e),"revertTextValue",(function(t){e.setState((function(e){return y()({},t,e["".concat(t,"Origin")])}),(function(){e.updateTextAreaHeight(e["".concat(t,"Ref")])}))})),y()(d()(e),"handleTextAreaBlur",(function(t){var n,r=t.target,i=r.name,a=r.value,o=e.state,s=o.title,l=o.subject,c=o.topic,u=e.props,d=u.editCogvidInfo,h=u.videoId,f=u.updateCogvidItem,p=u.course,m=u.primCourse,g=u.description,v=u.isDummyDailyVideo,b=u.createdDate,A=u.keywords,_=u.learningLevel,w=u.learningSubject;if(e.setState({editingField:""}),!e.preventSaveOnBlur&&a!==e.state["".concat(i,"Origin")])return 0===a.length&&"title"===i?(k.e.info("Video ".concat(i," may not be blank.")),void e.revertTextValue(i)):a.length>ae?(k.e.info("The ".concat(i," text must not exceed ").concat(ae," characters.")),void e.revertTextValue(i)):void d(te(te({},{title:s,subject:l,topic:c,description:g}),{},(n={},y()(n,i,a),y()(n,"videoId",h),y()(n,"isDummyDailyVideo",v),y()(n,"createdDate",b),y()(n,"courseCode",p?p.code:void 0),y()(n,"courseSerial",p?p.serial:void 0),y()(n,"primCourseCode",m?m.code:void 0),y()(n,"primCourseSerial",m?m.serial:void 0),y()(n,"keywords",A),y()(n,"learningLevel",_),y()(n,"learningSubject",w),n)),(function(){e.setState(y()({},"".concat(i,"Origin"),a)),f({videoId:h,data:{cognitiveVideo:y()({},i,a)}})}),(function(){e.revertTextValue(i)}));e.preventSaveOnBlur=!1})),y()(d()(e),"handleTextAreaKeyDown",(function(t,n){if(t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),13!==t.keyCode){if(27===t.keyCode){var r=t.target.name;e.preventSaveOnBlur=!0,e.setState((function(e){return y()({},r,e["".concat(r,"Origin")])})),n.blur()}k.c.preventKeyDownSideEffect(t)}else n.blur()})),y()(d()(e),"handleTextAreaChange",(function(t){var n=t.target,r=n.name,i=n.value;e.updateTextAreaHeight(e["".concat(r,"Ref")]),e.setState(y()({},r,i))})),y()(d()(e),"updateTextAreaHeight",(function(e){e&&e.style&&(e.style.height="5px",e.style.height="".concat(e.scrollHeight,"px"))})),y()(d()(e),"handleCogvidAction",(function(t,n,r){t.stopPropagation(),(0,e.props.onActionCogvidItem)(n,(function(){return e.setState(y()({},r,!1))}),(function(){return e.setState(y()({},r,!0))}))})),y()(d()(e),"handleToggleEditVideoForm",(function(n,r){n&&n.stopPropagation();var i=e.props,a=i.getPublicCogvidLastStatus,o=i.videoId,s=i.updateEditVideoModal;e.setState({isCheckingLatePublishStatus:!0},(function(){a(o,(function(n){e.setState({isCheckingLatePublishStatus:!1},(function(){k.c.checkIsPublicProcessing(null==n?void 0:n.lastReviewStatus,null==n?void 0:n.status)?k.e.info(t("yourCognitiveVideoIsPublishing")):s(r)}))}),(function(){e.setState({isCheckingLatePublishStatus:!1})}))}))})),y()(d()(e),"showShareVideoModal",(function(t){t&&t.stopPropagation();var n=e.props,r=n.updateShareVideoChapterModal,i=n.videoId,a=n.data,o=void 0===a?{}:a,s=n.videoOwnerId,l=o.uid;r({show:!0,title:e.state.title,videoId:i,chapterId:l,isEditSharing:!0,isOwner:k.c.isCurrentUserId(s),videoOwnerId:s})})),y()(d()(e),"handleShareButtonMouseOver",(function(){var n=e.props,r=n.updateSharedPeopleData,i=n.getVideoSharingInfo,a=n.videoId;n.sharedCount<=0||(r({show:!0,listTitle:t("sharedPeopleOrGroups"),iconName:"fuvi-user-premission",isLoading:!0}),i({videoId:a},(function(e){r({data:e,isLoading:!1})})))})),y()(d()(e),"handleShareButtonMouseLeave",(function(){(0,e.props.updateSharedPeopleData)(P.i)})),y()(d()(e),"handleOpenCourseClick",(function(t){t&&t.stopPropagation(),Object(E.invoke)(t,"target.blur");var n=e.props,r=n.videoId,i=n.course,a=n.onOpenCourseClick;a&&a(r,i)})),y()(d()(e),"togglePublishVideoModal",(function(t,n){t&&t.stopPropagation();var r=e.props,i=r.updatePublishVideoModal,a=r.onChangePrice;i(te(te({},n),{},{onSubmit:a}))})),y()(d()(e),"handlePublishVideoBtnClick",(function(n){n.stopPropagation();var r=e.props,i=r.unitPrice,a=((i=void 0===i?{}:i).amount,r.accessGrantType),o=r.videoId,s=r.course,l=r.trustedPublisher,c=e.state.titleOrigin,u=!!(null==s?void 0:s.code)&&0===(null==s?void 0:s.serial),d="";a===oe.PAID?d=t("accessType.subscribe"):a===oe.FREE&&(d=""),e.togglePublishVideoModal(n,{videoId:o,show:!0,videoTitle:c,onPublish:e.handlePublishVideo,price:d,hasPrice:a!==oe.UNDEFINED,isCourseMaster:u,trustedPublisher:l})})),y()(d()(e),"handlePublishVideo",(function(t){var n=t.publishingMarkets,r=t.commentsLikesEnabledOnPublic,i=t.entireCoursePublished,a=t.publishingScope,o=e.props,s=o.publishCogvid,l=o.videoId,c=o.updateCanvasProperties,u=o.course,d=o.publishMasterCourseCallback;e.setState({isPublishing:!0}),i&&d&&d(u.code,k.g.COGVID_STATUS.PUBLISHING),s({videoId:l,publishingMarkets:n,commentsLikesEnabledOnPublic:r,entireCoursePublished:i,publishingScope:a},(function(){return e.setState({isPublishing:!1},(function(){return c({isToolbarShown:!1})}))}),(function(){return e.setState({isPublishing:!0})}))})),y()(d()(e),"handleCancelPublishVideo",(function(){var t=e.props,n=t.cancelPublishCogvid,r=t.videoId;e.setState({isCancelPublishing:!0}),n(r,(function(){e.setState({isCancelPublishing:!1})}),(function(){return e.setState({isCancelPublishing:!0})}))})),y()(d()(e),"handleGetlPublishVideoFeedback",(function(t){t&&t.stopPropagation();var n=e.props,r=n.getPublicCogvidFeedback,i=n.videoId,a=n.updateFeedbackModal;e.setState({isGetPublicFeedback:!0}),r(i,(function(t){t&&(e.setState({isGetPublicFeedback:!1,publicFeedbackMessage:t}),a({show:!0,content:t}))}),(function(){return e.setState({isGetPublicFeedback:!0})}))})),y()(d()(e),"toggleSetPriceModal",(function(t,n){t&&t.stopPropagation();var r=e.props,i=r.updateSetPriceModal,a=r.onChangePrice;i(te(te({},n),{},{onSubmit:a}))})),y()(d()(e),"publicLabel",(function(){var n=e.state.isCancelPublishing,r=e.props,i=r.videoStatus,a=r.lastReviewStatus,o=r.isOwner;return _.a.createElement("span",{className:z()($.a.publicLabel,a===ne.PENDING&&$.a.pendingStyle,a===ne.PROCESSING&&$.a.processingStyle,"text-capitalize bg-white d-flex align-items-center text-primary")},a===ne.PENDING&&_.a.createElement("i",{className:"fv fuvi-most-recent fv-sm mr-1"}),a===ne.PROCESSING&&_.a.createElement("i",{className:"fv fuvi-in-review fv-sm mr-1"}),i===re.PUBLISHING&&_.a.createElement("i",{className:"fv fuvi-copping-file fv-sm mr-1"}),i===re.PUBLISHING||a?t("publishingStatus.".concat(i===re.PUBLISHING?i:a)):"",i!=re.PUBLISHING&&o&&_.a.createElement(V.eb,{className:"ml-3 bg-transparent",tooltipText:t("tooltip.cancelPublic"),round:!0,size:"sm",onClick:function(t){t.stopPropagation(),e.handleCancelPublishVideo()},disabled:n,isLoading:n},_.a.createElement("i",{className:"fv fuvi-delete-rounder u-fs-1 text-danger"},_.a.createElement("span",{className:"path1"}),_.a.createElement("span",{className:"path2"}))))})),y()(d()(e),"copyVideoLinkToClipBoard",(function(n){n.stopPropagation();var r=e.props,i=r.videoId,a=r.videoTitle,o=window.location.href.split("?")[0],s=new URL(o);s.searchParams.append(se.VIDEO_ID,i),s.searchParams.append("withOwnerContext",!0);var l=s.href;e.setState({isCopying:!0},(function(){try{!k.c.isSafari()&&Z()(""),Z()(l),k.e.info(t("copyVideoLinkToClipboard",{videoTitle:a}),!0,"",3e3)}finally{e.setState({isCopying:!1})}}))})),y()(d()(e),"handleMouseEnter",(function(t){var n=e.props,r=n.index,i=n.onMouseEnter;i&&i(r)})),y()(d()(e),"handleMouseLeave",(function(t){e.props.onMouseLeave&&e.props.onMouseLeave(t)})),e}return B()(r,[{key:"componentDidMount",value:function(){var e=this.props;e.isHover,e.videoId,e.isOpenCourseVideoList}},{key:"componentDidUpdate",value:function(e){e.isHover;var t=e.isActive,n=this.props,r=(n.isHover,n.videoOverlayMode,n.videoTitle),i=n.subject,a=n.topic,o=n.isActive,s=this.state,l=s.titleOrigin,c=s.subjectOrigin,u=s.topicOrigin;r===l&&i===c&&a===u||this.setState({titleOrigin:r,title:r,subjectOrigin:i,subject:i,topicOrigin:a,topic:a}),o!==t&&(o?(this.showFeedbackFromLocation(x.a.location),this.unlistenHistory=x.a.listen(this.showFeedbackFromLocation)):this.unlistenHistory&&this.unlistenHistory())}},{key:"componentWillUnmount",value:function(){this.unlistenHistory&&this.unlistenHistory()}},{key:"render",value:function(){var e,n,r,i,a=this,o=this.props,s=o.index,l=o.author,c=o.avatar,u=o.description,d=o.createdDate,h=o.isDisabled,f=o.editable,p=o.videoId,m=o.sharedCount,g=o.userScaffId,v=o.ownerScaffId,b=o.isOwner,y=o.videoStatus,A=o.isLoading,w=o.permissions,S=o.displayHour,C=o.course,T=o.primCourse,x=o.isOpenCourseVideoList,O=o.actualCourseCount,M=o.showCloseCourseButton,P=o.onCloseCourseClick,D=o.visibilityScope,N=o.lastReviewStatus,L=o.unitPrice,R=(L=void 0===L?{}:L).amount,B=o.accessGrantType,U=o.onVideoItemClick,H=o.videoData,W=o.isHover,G=o.keywords,K=o.learningLevel,X=o.learningSubject,Q=(o.trustedPublisher,o.publicView),J=o.canManipulateVideos,Z=this.state,ee=Z.title,te=Z.subject,ae=Z.topic,se=Z.titleOrigin,le=Z.subjectOrigin,ce=Z.topicOrigin,ue=Z.editingField,de=Z.isDeleting,he=Z.isCloning,fe=Z.isPublishing,pe=Z.isSharingVideo,me=Z.isCloningFully,ge=Z.isGetPublicFeedback,ve=Z.isCheckingLatePublishStatus,be=(k.c.getCurrentVideoCategory(),I.a.duration(-1*I()().diff(I()(d)))),ye=(k.g.VIDEO_CATEGORY,k.g.COGVID_ACTIONS),Ae=fe||de||pe||!!y&&y!==re.PUBLISHED,_e=k.c.checkPermission(null===(e=w.VIDEO)||void 0===e?void 0:e.DOANYACTION,!1),we=!k.c.checkIsPublicProcessing(N,y)&&f&&!Ae&&_e,Ee=!!k.c.getCurrentUserId()&&!!p,Se=k.c.checkPermission(null===(n=w.VIDEO)||void 0===n?void 0:n.DOANYACTION,null===(r=w.VIDEO)||void 0===r?void 0:r.SHARE),Ce=!!(null==C?void 0:C.uid)&&-1!==(null==C?void 0:C.uid)&&!x,Te="".concat("0"==(null==C?void 0:C.serial)?"M":(null==C?void 0:C.serial)||"","/").concat(O||""),ke=!!C&&x&&Te,xe=b,Oe=!(!!C&&0===C.serial&&J&&b)&&(D===ie.PUBLIC||Ae),Ie=Q&&b,Me=k.c.checkIsPublicProcessing(N,y),Pe=!h&&b;"number"==typeof R&&B!==oe.UNDEFINED&&(i=t("accessType.subscribe")),B===oe.FREE&&(i=t("accessType.free"));var De=y===re.UPDATING;return _.a.createElement("div",{ref:this.refItem,role:"button",id:"video-item-".concat(s),className:z()($.a.cogvidItemWrapper,W&&$.a.activeItem,h&&$.a.disabledWrapper,A&&$.a.loadingBg),onClick:h?null:function(){return U(H,s)},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},A&&_.a.createElement("div",{className:z()("d-flex justify-content-center w-100 h-100",$.a.spinnerWrapper)},_.a.createElement(q.a,{animation:"border",size:"sm",variant:"primary",className:z()($.a.spinner)})),_.a.createElement("div",{className:z()($.a.cogvidCellBorder,"w-100 flex-column",A?"d-none":"d-flex")},_.a.createElement("div",{className:z()("d-flex align-items-center pt-1 justify-content-end")},!h&&_.a.createElement("div",null,_.a.createElement("div",{style:{backgroundImage:"url(".concat(c||Y.a.noAvatar,")")},className:$.a.scAvatar})),Me?_.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:"flex-fill"}),this.publicLabel()):_.a.createElement("div",{className:"h-100 d-flex flex-column flex-fill justify-content-between"},_.a.createElement("div",{className:"d-flex justify-content-end"},Ce&&_.a.createElement(V.eb,{tooltipText:t("tooltip.viewCourse"),round:!0,onClick:this.handleOpenCourseClick,className:"bg-secondary"},_.a.createElement("i",{className:"fv fuvi-couse-list text-white fv-sm"})),M&&_.a.createElement(V.eb,{tooltipText:t("btn.back"),round:!0,onClick:P,className:"bg-secondary"},_.a.createElement("i",{className:"fv fuvi-short-pre text-white fv-sm"})),ke&&_.a.createElement("div",{className:z()($.a.courseIndexBadge)},Te)),_.a.createElement("div",{className:"d-flex justify-content-end"},y!==re.PUBLISHING&&b&&_.a.createElement(_.a.Fragment,null,ne.REJECTED===N&&_.a.createElement(V.eb,{round:!0,className:"bg-white mr-auto",onClick:this.handleGetlPublishVideoFeedback,isLoading:ge||he,tooltipText:t("tooltip.publishingRejectedInfo")},_.a.createElement("i",{className:"fv fuvi-exclamation text-secondary fv-sm"}))),p&&b&&_.a.createElement(V.eb,{tooltipText:t("tooltip.cloneFullyVideo"),round:!0,onClick:function(e){e.target.blur(),a.handleCogvidAction(e,ye.CLONE_FULLY,"isCloningFully")},isLoading:me,disabled:!J},_.a.createElement("i",{className:"fv text-white fv-sm fuvi-clone-file"})),p&&_.a.createElement(V.eb,{tooltipText:t("tooltip.shareVideo"),tooltipPlacement:"right",round:!0,badge:m>0&&Se?m:"",onClick:this.showShareVideoModal,onMouseEnter:this.handleShareButtonMouseOver,onMouseLeave:this.handleShareButtonMouseLeave,disabled:Ae||!Se,className:z()(Ie&&"bg-secondary")},_.a.createElement("i",{className:z()("fv text-white fv-sm",Ie?"fuvi-share-icon-full-fill":"fuvi-share")})),_e&&_.a.createElement(V.eb,{tooltipText:t("tooltip.editVideo"),round:!0,onClick:function(e){a.handleToggleEditVideoForm(e,{show:!0,title:se,subject:le,topic:ce,description:u,author:l,videoId:p,userScaffId:g,ownerScaffId:v,course:C,primCourse:T,hasCourse:b,isOwner:b,keywords:G,learningLevel:K,learningSubject:X})},disabled:Ae&&!De||!J,isLoading:y!==k.g.COGVID_STATUS.PUBLISHED&&!De||ve},_.a.createElement("i",{className:"fv fuvi-edit text-white fv-sm"})),xe&&_.a.createElement(V.eb,{tooltipText:t("tooltip.publish"),round:!0,onClick:this.handlePublishVideoBtnClick,disabled:Oe||!J,isLoading:fe},_.a.createElement("i",{className:"fv fuvi-publish text-white fv-sm"})),Ee&&_.a.createElement(V.eb,{tooltipText:t("tooltip.deleteVideo"),round:!0,onClick:function(e){a.handleCogvidAction(e,b?ye.DELETE:ye.DELETE_VIDEO_SHARED_TO_ME,"isDeleting")},disabled:Ae,isLoading:de},_.a.createElement("i",{className:"fv fuvi-trash-can text-white fv-sm"}))))),_.a.createElement("div",{className:$.a.content},!h&&_.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:z()("",$.a.vAuthor)},_.a.createElement("div",{className:"text-truncate"},l)),_.a.createElement("div",{className:"".concat($.a.vTitle," position-relative ")},_.a.createElement("div",{className:z()("text-truncate","title"===ue&&"d-none")},se),_.a.createElement("textarea",{className:z()($.a.vTitle,$.a.editTextarea,"title"===ue&&"u-opacity-100",!we&&"invisible"),ref:function(e){a.titleRef=e},name:"title",value:ee,onChange:this.handleTextAreaChange,onClick:we?this.handleTextAreaClick:null,onBlur:this.handleTextAreaBlur,onKeyDown:function(e){return a.handleTextAreaKeyDown(e,a.titleRef)},style:{height:Object(E.get)(this.titleRef,"scrollHeight",0)}})),_.a.createElement("div",{className:"".concat($.a.vSubject," position-relative ")},_.a.createElement("div",{className:z()("text-truncate","subject"===ue&&"d-none")},le),_.a.createElement("textarea",{className:z()($.a.vSubject,$.a.editTextarea,"subject"===ue&&"u-opacity-100",!we&&"invisible"),ref:function(e){a.subjectRef=e},name:"subject",value:te,onChange:this.handleTextAreaChange,onClick:we?this.handleTextAreaClick:null,onBlur:this.handleTextAreaBlur,onKeyDown:function(e){return a.handleTextAreaKeyDown(e,a.subjectRef)},style:{height:Object(E.get)(this.subjectRef,"scrollHeight",0)}})),_.a.createElement("div",{className:"".concat($.a.vTopic," position-relative ")},_.a.createElement("div",{className:z()("text-truncate","topic"===ue&&"d-none")},ce),_.a.createElement("textarea",{className:z()($.a.vTopic,$.a.editTextarea,"topic"===ue&&"u-opacity-100",!we&&"invisible"),ref:function(e){a.topicRef=e},name:"topic",value:ae,onChange:this.handleTextAreaChange,onClick:we?this.handleTextAreaClick:null,onBlur:this.handleTextAreaBlur,onKeyDown:function(e){return a.handleTextAreaKeyDown(e,a.topicRef)},style:{height:Object(E.get)(this.topicRef,"scrollHeight",0)}})))),_.a.createElement("div",{className:z()("d-flex align-items-center pb-1 pr-2",b?"justify-content-between":"justify-content-end")},_.a.createElement("div",{className:"text-white d-flex justify-content-start flex-fill"},_.a.createElement("div",{className:"d-flex align-items-center text-truncate u-fs-2o3"},S&&be.humanize(!0)),Ie&&_.a.createElement("div",{className:"d-flex align-items-center mx-3"},_.a.createElement("div",{className:z()("d-flex u-fs-13o16")},_.a.createElement(V.eb,{tooltipText:t("tooltip.copyToClipBoard"),classNameContainer:"mx-0",onClick:this.copyVideoLinkToClipBoard,className:z()("mx-0 p-0 position-relative",$.a.likeBtn)},_.a.createElement("i",{className:"fv fuvi-link-ic text-white u-fs-13o16"}))))),Pe&&_.a.createElement(j.a,{delay:{show:800},overlay:_.a.createElement(F.a,null,i?t("tooltip.updateVideoPrice"):t("tooltip.setVideoPrice")),trigger:["hover","focus"]},_.a.createElement("div",{className:z()("d-flex bg bg-secondary u-px-5o16 u-py-1o8 u-border-radius-1o2 u-fs-11o16 align-items-center text-white",Ae&&"u-opacity-50 u-pointer-event-none"),onClick:function(e){!Me&&a.toggleSetPriceModal(e,{show:!0,videoTitle:se,videoId:p,accessGrantType:B})}},_.a.createElement("i",{className:"fv fuvi-price-tag text-white fv-sm u-mr-1o4"}),_.a.createElement("div",{className:"text-lowercase"},i||t("btn.setPrice")))),_.a.createElement("div",{className:"flex-1"}))))}}]),r}(_.a.Component);le.propTypes={author:X.a.string,onClick:X.a.func,createdDate:X.a.oneOfType([X.a.string,X.a.object]),isDisabled:X.a.bool,isActive:X.a.bool,editable:X.a.bool,videoId:X.a.string,isOwner:X.a.bool,isLoading:X.a.bool,permissions:X.a.object},le.defaultProps={isDisabled:!1,isLoading:!1,isActive:!1,permissions:{}};var ce=Object(w.b)((function(e){var t,n=e.cogvid,r=e.cart,i=e.auth;return{videoOverlayMode:n.videoOverlayMode,isQuickPurchasing:r.isQuickPurchasing,editVideoModal:n.editVideoModal,feedbackModal:n.feedbackModal,trustedPublisher:null===(t=i.userInfo)||void 0===t?void 0:t.trustedPublisher}}),(function(e){return{editCogvidInfo:function(t,n,r){return e(M.e.editCogvidInfo(t,n,r))},toggleOpenPopup:function(t){return e(M.f.toggleOpenPopup(t))},updateShareVideoChapterModal:function(t,n,r){return e(M.e.updateShareVideoChapterModal(t,n,r))},updateEditVideoModal:function(t){return e(M.e.updateEditVideoModal(t))},updateSharedPeopleData:function(t,n,r){return e(M.e.updateSharedPeopleData(t,n,r))},getChapterSharingInfo:function(t,n,r){return e(M.e.getChapterSharingInfo(t,n,r))},getVideoSharingInfo:function(t,n,r){return e(M.e.getVideoSharingInfo(t,n,r))},updatePublishVideoModal:function(t){return e(M.e.updatePublishVideoModal(t))},publishCogvid:function(t,n,r){return e(M.e.publishCogvid(t,n,r))},cancelPublishCogvid:function(t,n,r){return e(M.e.cancelPublishCogvid(t,n,r))},getPublicCogvidFeedback:function(t,n,r){return e(M.e.getPublicCogvidFeedback(t,n,r))},updateFeedbackModal:function(t){return e(M.e.updateFeedbackModal(t))},updateCanvasProperties:function(t){return e(M.b.updateCanvasProperties(t))},updateSetPriceModal:function(t){return e(M.e.updateSetPriceModal(t))},getShortenVideoUrl:function(t,n,r){return e(M.e.getShortenVideoUrl(t,n,r))},getPublicCogvidLastStatus:function(t,n,r){return e(M.e.getPublicCogvidLastStatus(t,n,r))}}}))(le),ue=r(63),de=r(52),he=r.n(de),fe=r(20),pe=r(276);function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){y()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ve=k.g.VIDEO_CATEGORY,be=k.g.VIDEO_TYPE,ye=k.g.VIDEO_MENU_BASE_URL,Ae=k.g.VIDEO_SORT,_e=k.g.VIDEO_SORT_DEFAULT,we=k.g.SEARCH_PARAM,Ee=k.g.VIDEO_LIST_FILTER,Se=k.g.VIDEO_BRAINHIVE_FILTER_DEFAULT,Ce=k.g.COGVID_ACTIONS,Te=k.g.VIDEO_AREA_ID,ke=k.g.SCROLL_ANIMATION_TIME,xe=[{name:Object(fe.b)("filterAll"),value:Ee.ALL,prefix:_.a.createElement("i",{className:"fv fuvi-repeat-icon mr-2"})},{name:Object(fe.b)("filterSent"),value:Ee.SENT,prefix:_.a.createElement("i",{className:"fv fuvi-arrow-up u-fs-7o8 mr-2"})},{name:Object(fe.b)("filterReceived"),value:Ee.RECEIVED,prefix:_.a.createElement("i",{className:"fv fuvi-arrow-down u-fs-7o8 mr-2"})}],Oe=function(e){f()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=v()(e);if(t()){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}(n);function n(){var e;c()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),y()(d()(e),"state",{scrollBarHeight:0,heightCB:0,widthCB:0,showConfirmModal:!1,cogvidActionItem:{},isEditingVideoMode:!1,searchVideoList:null,isMouseEnter:!0,filter:Se,searchTerm:void 0,searchQueryData:null,searchLoadingVideoList:[],courseDetail:null,courseVideoList:null,courseVideoId:null,ownerShipModalData:{}}),y()(d()(e),"heightVideoItem",k.c.convertRemToPx(D.smallCogvidItemHeight)),y()(d()(e),"heightVideoFilterInPx",k.c.convertRemToPx(D.heightVideoFilter)),y()(d()(e),"heightToolbarInPx",k.c.convertRemToPx(D.heightToolbar)),y()(d()(e),"heightChapterSliderInPx",k.c.convertRemToPx(D.heightChapterSlider)),y()(d()(e),"prevLocation",void 0),y()(d()(e),"prevSearchScrollTop",0),y()(d()(e),"prevOpenCourseScrollTop",0),y()(d()(e),"wrapperRef",_.a.createRef()),y()(d()(e),"mousePos",{x:0,y:0,width:0,height:0}),y()(d()(e),"updateWindowDimensions",(function(){var t=e.props.scrollRef;if(e.props.isFullscreenMode||window.isFullscreenMode){if(window.leftBarScrollTop)return void Object(E.set)(t,"current.scrollRef.scrollTop",window.leftBarScrollTop)}else window.prevHoveredIndex=e.props.selectedVideoIdx;e.heightVideoItem=k.c.convertRemToPx(D.smallCogvidItemHeight),e.heightVideoFilterInPx=k.c.convertRemToPx(D.heightVideoFilter),e.heightToolbarInPx=k.c.convertRemToPx(D.heightToolbar),e.heightChapterSliderInPx=k.c.convertRemToPx(D.heightChapterSlider),Object(E.debounce)((function(){e.setState({scrollBarHeight:Object(E.get)(document.getElementById("left-scroll-bar"),"clientHeight",0),heightCBWrapper:Object(E.get)(document.getElementById(k.g.VIDEO_AREA_WRAPPER_ID),"offsetHeight",0)-e.heightChapterSliderInPx,widthCBWrapper:Object(E.get)(document.getElementById(k.g.VIDEO_AREA_WRAPPER_ID),"offsetWidth",0),heightCB:Object(E.get)(document.getElementById(Te),"offsetHeight",0),widthCB:Object(E.get)(document.getElementById(Te),"offsetWidth",0)}),setTimeout((function(){window.leftBarScrollTop&&(Object(E.set)(t,"current.scrollRef.scrollTop",window.leftBarScrollTop),Object(E.get)(t,"current.scrollRef.scrollTop",0)===window.leftBarScrollTop?window.leftBarScrollTop=0:e.updateWindowDimensions())}),100)}),300)()})),y()(d()(e),"detectMousePosition",(function(t){var n,r=e.props,i=r.isLoading,a=r.scrollRef;if((null===(n=e.wrapperRef)||void 0===n?void 0:n.current)&&!i){var o,s,l=(null==t?void 0:t.target)||Array.from(document.querySelectorAll(":hover")).pop(),c=null===(o=e.wrapperRef)||void 0===o?void 0:null===(s=o.current)||void 0===s?void 0:s.contains(l);e.setState({isMouseEnter:c}),document.removeEventListener("mousemove",e.detectMousePosition);var u=Object(E.get)(a,"current.scrollRef.scrollTop",0);e.handleItemHoverByScrolling(u)}})),y()(d()(e),"handleKeyDown",(function(t){var n=e.props,r=n.cogvidDetails,i=n.currentHoverdVideo,a=n.resetCogvidDetail,o=n.openCreateCogvidForm,s=n.oldOpenCreateCogvidForm,l=n.isPopupOpen,c=n.isToolbarShown,u=n.openAddFilesToGalleryForm,d=n.showProductsLayer;if(!(l||o||s||u||!!(null==d?void 0:d.videoId)||c)&&32===t.keyCode){var h=i(e.getRenderList())||{};if((null==h?void 0:h.uid)&&h.uid!==(null==r?void 0:r.videoId)){var f=h.uid,p=h.cognitiveVideo;p.course,p.primCourse;t.stopPropagation(),t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),k.r.pause(),a();k.c.getDataFromUrl(window.location).courseId;k.c.addURLSearchParams([[we.KEY.COURSE_ID]],!0),k.c.addURLSearchParams([[we.KEY.VIDEO_ID,f]],!0)}}})),y()(d()(e),"clearActiveVideo",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=e.props.updateVideoPreviewData;k.r.pause(),k.c.clearDataWhenExitingVideo({clearVideoTime:!0,clearWithinVideoSearch:!0,clearCogvidDetails:!0,clearChapterAttachmentData:!0}),t&&n()})),y()(d()(e),"handleURLChange",(function(t,n){var r=k.c.getDataFromUrl(),i=r.videoId,a=r.searchTerm,o=r.courseId,s=r.withCourse,l=k.c.getDataFromUrl(e.prevLocation),c=l.videoId,u=l.sort,d=void 0===u?_e:u,h=l.filter,f=void 0===h?Se:h,p=l.searchTerm,m=Object(E.get)(t,"state.refresh"),g=r.sort,v=void 0===g?_e:g,b=r.filter,y=void 0===b?Se:b;if(n||!o||i!==c)if(t&&e.prevLocation&&e.prevLocation.pathname!==t.pathname||d===v&&f===y&&p===a&&!n&&!m){var A,_=e.props,w=_.activeVideoFromUrl,S=_.activeAttachmentFromLocation,C=Object(E.get)(t,"state.attachment");i&&i!==c&&v===d&&y===f&&a===p&&(null===(A=e.prevLocation)||void 0===A?void 0:A.pathname)===t.pathname?w(t,e.getRenderList()):i===c&&C?S(t):c&&!i&&e.clearActiveVideo(),e.prevLocation=t}else if(n&&(a||o))k.c.removeURLSearchParams([we.KEY.SEARCH_TERM,we.KEY.COURSE_ID],!1,!1,{refresh:!0});else{var T=!!a&&(p!==a||v!==d||y!==f),x=!m&&!a&&p&&i===c,O=e.props.scrollRef;if(Object.values(Ae).includes(v)||(v=_e,k.c.removeURLSearchParams([we.KEY.SORT])),Object.values(Ee).includes(y)||(y=Se,k.c.removeURLSearchParams([we.KEY.FILTER])),(T||x)&&o&&k.c.changeURLWithoutSideEffect([[we.KEY.COURSE_ID]]),T&&!p&&(e.prevSearchScrollTop=Object(E.get)(O,"current.scrollRef.scrollTop",0)),(!T&&!x&&k.r.isPlayer()||c&&!i)&&e.clearActiveVideo(!1),e.prevLocation=t,e.setState({sort:v,filter:y,searchTerm:a,videoId:i}),x){var I=e.props,M=I.sort,P=I.updateVideoPreviewData;e.setState({searchVideoList:null,searchQueryData:null,courseVideoList:null,courseDetail:null,courseVideoId:null,sort:M,filter:Se},(function(){Object(E.set)(O,"current.scrollRef.scrollTop",e.prevSearchScrollTop),e.updateScrollbarDirection({updatePreviewData:!0})})),i||P()}s&&k.c.changeURLWithoutSideEffect([[we.KEY.WITH_COURSE]]),e.fetchVideoList({sort:v,filter:y,searchTerm:a,videoId:T?void 0:i,withCourse:!!s},T)}})),y()(d()(e),"fetchVideoList",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.sort,r=void 0===n?_e:n,i=t.filter,a=void 0===i?Se:i,o=t.searchTerm,s=t.videoId,l=t.withCourse,c=t.learningSubject,u=void 0===c?e.props.learningSubject:c,d=arguments.length>1?arguments[1]:void 0,h=e.props,f=h.videoId,p=h.videoList,m=h.activateScrollingCogvidItem,g=h.updateReviewAttachment,v=h.updateCogvidList,b=h.scrollRef;e.props.getCogvidList({sort:r,filter:a,searchTerm:o,videoId:s,withCourse:l,pageSize:l?1e3:void 0,learningSubject:u},(function(t){var n=t.videoList,i=void 0===n?[]:n,c=t.last,u=t.currentPage,h=t.totalElements,y=t.pageSize;if(g({attachmentId:""}),d)if(e.setState({searchVideoList:i,searchQueryData:{sort:r,filter:a,last:c,searchTerm:o,currentPage:u,totalElements:h,pageSize:y},courseVideoList:null,courseDetail:null,courseVideoId:null},(function(){Object(E.set)(b,"current.scrollRef.scrollTop",0),e.updateScrollbarDirection()})),Object(E.isEmpty)(i))if(f){var A=Object(E.find)(p,{uid:f});m(ge({},A||{}),!0)}else m({});else m(ge({},i[0]));else{Object(E.set)(b,"current.scrollRef.scrollTop",0);var _=k.c.getDataFromUrl(window.location),w=_.videoId,S=_.chapterId,C=_.action,T=i.find((function(e){return w===e.uid})),x=Object(E.findIndex)((null==T?void 0:T.chapters)||[],{uid:S});v({videoList:i,sort:r,last:c,currentPage:u,totalElements:h,filter:a,pageSize:y}),e.setState(ge(ge({searchVideoList:null,searchQueryData:null,courseVideoList:null},l?{}:{courseDetail:null}),{},{courseVideoId:null,withCourse:l}),(function(){s||(Object(E.set)(b,"current.scrollRef.scrollTop",0),e.updateScrollbarDirection())})),s?(e.scrollToLayerVideo(s),e.props.displaySlide(x),T&&C===we.VALUE.ACTION.OPEN_RESOURCE&&setTimeout((function(){e.props.currentUserId,e.props.displayProductsLayer({videoId:T.uid,title:T.cognitiveVideo.title,author:T.cognitiveVideo.author,subject:T.cognitiveVideo.subject,topic:T.cognitiveVideo.topic,videoOwnerId:T.cognitiveVideo.owner})}),500)):e.handleItemScrollTo(0)}!s&&e.handleItemScrollTo(0);var O=[];i.map((function(e){var t=e.thumbnailUrl;return t&&O.push(t)})),O.length>0&&e.props.getCogvidThumbnail(O)}))})),y()(d()(e),"handleLoadMore",Object(E.throttle)((function(){var t=e.props,n=t.isLoadingMore,r=t.last,i=t.sort,a=t.filter,o=t.loadMoreCogvidList,s=t.learningSubject,l=e.state,c=l.searchVideoList,u=l.courseVideoList,d=l.videoId;!n&&null!==c?e.handleLoadMoreSearchList():n||r||null!==u||o({sort:i,filter:a,videoId:d,learningSubject:s},(function(t){var n=t.videoList,r=[];n.map((function(e){var t=e.thumbnailUrl;return t&&r.push(t)})),r.length>0&&e.props.getCogvidThumbnail(r)}))}),100)),y()(d()(e),"handleLoadMoreSearchList",Object(E.throttle)((function(){var t=e.props,n=t.learningSubject,r=t.isLoadingMore,i=t.loadMoreCogvidList,a=e.state,o=a.videoId,s=a.searchVideoList,l=a.courseVideoList,c=a.searchQueryData||{},u=c.sort,d=c.filter,h=c.last,f=c.pageSize,p=c.currentPage,m=c.searchTerm,g=c.totalElements;r||h||null!==l||(e.setState({searchLoadingVideoList:k.c.generateLoadingCogvidItems(Math.min(f,g-s.length))}),i({searchTerm:m,sort:u,filter:d,videoId:o,pageSize:f,currentPage:p,noUpdateData:!0,learningSubject:n},(function(t){var n=t.videoList,r=void 0===n?[]:n,i=t.last,a=t.currentPage,o=t.totalElements,s=t.pageSize;e.setState((function(e){return{searchVideoList:[].concat(G()(e.searchVideoList),G()(r)),searchQueryData:{searchTerm:m,sort:u,filter:d,last:i,currentPage:a,totalElements:o,pageSize:s},searchLoadingVideoList:[]}}));var l=[];r.map((function(e){var t=e.thumbnailUrl;return t&&l.push(t)})),l.length>0&&e.props.getCogvidThumbnail(l)})))}),100,{trailing:!1})),y()(d()(e),"updateHoveredVideoIndex",(function(t){var n=e.props,r=n.scrollRef,i=(n.updateSelectedVideo,void 0===t?k.c.getIndicatorVideoIndex(r,e.heightVideoItem):t);return Number.isNaN(e.props.selectedVideoIdx)||i===e.props.selectedVideoIdx||k.r.paused()||k.r.pause(),i})),y()(d()(e),"handleScroll",Object(E.throttle)((function(t){var n=e.props,r=n.videoOverlayMode,i=n.showVideoOverlay;r===k.g.VIDEO_OVERLAY_MODE.ERROR&&i(""),!e.isScrollingBack&&e.handleItemHoverByScrolling(t),Number.parseInt(t/e.heightVideoItem)%5==0&&e.props.scrollRef.current.forceUpdate(),e.checkScrollButtons(t)}),100)),y()(d()(e),"checkScrollButtons",Object(E.debounce)((function(t){if(!(e.props.selectedVideoIdx<0)){var n=e.props.selectedVideoIdx*e.heightVideoItem,r=Math.abs(n-t)>5;e.setState({showBackBtn:r,showHomeBtn:t>5})}}),150)),y()(d()(e),"handleScrollAfter",Object(E.debounce)((function(){!e.state.isMouseEnter&&e.handleMouseLeave()}),3e3)),y()(d()(e),"componentWillUnmount",(function(){window.removeEventListener("resize",e.updateWindowDimensions),document.removeEventListener("keydown",e.handleKeyDown),document.removeEventListener("mousemove",e.detectMousePosition),e.unlistenHistory&&e.unlistenHistory()})),y()(d()(e),"handleActionCogvidItem",(function(){var t=e.state.cogvidActionItem,n=t.type,r=t.videoId,i=t.turnOffLoading,a=t.turnOnLoading,o=t.title,s=e.props.toggleOpenPopup,l=k.g.COGVID_ACTIONS;switch(s(!1),a(),n){case l.CLONE:e.handleCloneCogvid(r,i);break;case l.UNPUBLISH:e.handleUnpublishVideo(r,i);break;case l.DELETE:e.handleDeleteVideo(r,i,o);break;case l.DELETE_VIDEO_SHARED_TO_ME:e.handleDeleteVideo(r,i,o,!1)}})),y()(d()(e),"handleCloneCogvid",(function(t,n){e.setState({showConfirmModal:!1},(function(){return e.props.cloneCogvid(t,n,n)}))})),y()(d()(e),"calculateScrollTopAfterDeletingVideo",(function(t){var n=e.props.scrollRef,r=e.getRenderList(),i=Object(E.get)(n,"current.scrollRef.scrollTop",0),a=Object(E.findIndex)(r,(function(e){return e.uid===t})),o=a*e.heightVideoItem<i?i-e.heightVideoItem:i;return a===r.length-1&&r.length>1&&(o=i-e.heightVideoItem-1),o})),y()(d()(e),"getRenderList",(function(){var t=e.props,n=t.videoList,r=t.loadingCogvidItems,i=void 0===r?[]:r,a=e.state,o=a.searchVideoList,s=a.courseVideoList,l=a.searchLoadingVideoList;return null!==s?s:null!==o?[].concat(G()(o),G()(l)):[].concat(G()(n),G()(i))})),y()(d()(e),"removeVideoFromList",(function(t){var n=e.state,r=n.searchVideoList,i=n.courseVideoList;if(null!==r||null!==i){var a=Object(E.cloneDeep)(r),o=Object(E.cloneDeep)(i);null!==r&&Object(E.remove)(a,(function(e){return e.uid===t})),null!==i&&Object(E.remove)(o,(function(e){return e.uid===t})),e.setState({searchVideoList:a,courseVideoList:o},(function(){var t=e.getRenderList();Object(E.isEmpty)(t)&&e.props.activateScrollingCogvidItem({}),e.updateScrollbarDirection()}))}})),y()(d()(e),"handleDeleteVideo",(function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=e.props,o=a.scrollRef,s=a.attachmentReviewId,l=a.attachmentReviewVideoId,c=a.updateReviewAttachment,u=a.currentActiveVideoType,d=a.galleryVideoData,h=a.activeCogvidItem,f=a.deleteVideo,p=a.deleteVideoSharedToMe,m=k.c.getCurrentVideoCategory(),g=e.calculateScrollTopAfterDeletingVideo(t),v=i?f:p;e.setState({showConfirmModal:!1},(function(){return v(t,(function(){k.c.isVideoOwner({videoId:t})?k.e.success(Object(fe.b)("message.deleteVideoSuccessfully",{name:r})):k.e.success(Object(fe.b)("message.removeVideoSuccessfully",{name:r})),Object(E.set)(o,"current.scrollRef.scrollTop",g),e.props.updateVideoPreviewData({videoId:t}),s&&t===l&&c({attachmentId:""}),m===ve.EXPERIENCING&&u!==be.GALLERY&&h({videoData:d,url:ye.EXPERIENCING,videoType:be.GALLERY}),e.removeVideoFromList(t)}),n)}))})),y()(d()(e),"handleUnpublishVideo",(function(t,n){var r=e.props.scrollRef,i=e.calculateScrollTopAfterDeletingVideo(t);e.setState({showConfirmModal:!1},(function(){return e.props.unpublishVideo(t,(function(t){var n=t.videoId,a=e.props.videoId;Object(E.set)(r,"current.scrollRef.scrollTop",i),n===a&&e.props.updateVideoPreviewData({videoId:n}),e.removeVideoFromList(n)}),n)}))})),y()(d()(e),"handleCloseConfirmationModal",(function(){var t=e.state.cogvidActionItem.turnOffLoading;(0,e.props.toggleOpenPopup)(!1),e.setState({showConfirmModal:!1}),t&&t()})),y()(d()(e),"toggleEditVideoMode",(function(){return e.setState((function(e){return{isEditingVideoMode:!e.isEditingVideoMode}}))})),y()(d()(e),"updateLayerListItem",(function(t,n){var r=e.state,i=r.searchVideoList,a=r.courseVideoList,o=r.courseDetail;if(null!==i||null!==a){var s=Object(E.cloneDeep)(i),l=Object(E.cloneDeep)(a);if(null!==i){var c=Object(E.find)(s,{uid:t});c&&Object(E.merge)(c,n)}if(null!==a){var u=Object(E.find)(l,{uid:t}),d=Object(E.get)(n,"cognitiveVideo.course",{});u&&(!d.uid||-1!==d.uid&&d.code===(null==o?void 0:o.code)?Object(E.merge)(u,n):Object(E.remove)(l,(function(e){return e.uid===t})))}e.setState({searchVideoList:s,courseVideoList:l},(function(){var t=e.getRenderList();Object(E.isEmpty)(t)&&e.props.activateScrollingCogvidItem({}),e.updateScrollbarDirection()}))}})),y()(d()(e),"updateCogvidItem",(function(t){var n=t.videoId,r=t.data;(0,e.props.updateCogvidListItem)({videoId:n,data:r}),e.updateLayerListItem(n,r)})),y()(d()(e),"closeEditVideoForm",(function(){(0,e.props.updateEditVideoModal)(ge({},P.c))})),y()(d()(e),"doReloadVideoList",(function(){var t;(0,e.props.activateScrollingCogvidItem)({}),x.a.push(null===(t=x.a.location)||void 0===t?void 0:t.pathname,{refresh:!0})})),y()(d()(e),"publishMasterCourseCallback",(function(t,n){if((0,e.props.updateChildVideoStatus)({courseCode:t,status:n}),t&&n){var r={cognitiveVideo:{status:n}},i=e.state,a=i.searchVideoList,o=i.courseVideoList;if(null!==a||null!==o){var s=Object(E.cloneDeep)(a),l=Object(E.cloneDeep)(o);null!==a&&s.map((function(e){var n,i;return(null===(n=e.cognitiveVideo)||void 0===n?void 0:null===(i=n.course)||void 0===i?void 0:i.code)===t?Object(E.merge)(e,r):e})),null!==o&&l.map((function(e){var n,i;return(null===(n=e.cognitiveVideo)||void 0===n?void 0:null===(i=n.course)||void 0===i?void 0:i.code)===t?Object(E.merge)(e,r):e})),e.setState({searchVideoList:s,courseVideoList:l})}}})),y()(d()(e),"renderDummyCogvidItems",(function(e,t,n,r,i){var a;return!i||e<=0?null:_.a.createElement("div",{className:"d-flex flex-".concat(t," ").concat(he.a.dummyCogvidWrapper," position-relative"),style:{height:i}},r?_.a.createElement("div",{className:z()("d-flex justify-content-center p-2",he.a.spinnerWrapper)},_.a.createElement(q.a,{animation:"border",size:"sm",variant:"primary"})):G()(Array(e)).map((function(e,r){if("column-reverse"===t)a=I()().add(n.length?r+1:r,"d");else{var i=Object(E.get)(n,"[".concat(n.length-1,"].createdDate"),I()());a=I()(i).subtract(r+1,"d")}return _.a.createElement(ce,{key:r,createdDate:a,isDisabled:!0,displayHour:!1})})))})),y()(d()(e),"handleCogvidItemButtonClick",(function(t,n,r,i){var a=e.props.toggleOpenPopup,o=t.cognitiveVideo,s=(o=void 0===o?{}:o).title,l=void 0===s?"":s,c=o.course,u=t.uid,d=void 0===u?"-1":u;if(n===Ce.CLONE){var h=k.c.getCurrentVideoCategory(),f="/".concat(h,"?v=").concat(d);if(!k.c.checkLoggedIn(f))return}if(a(!0),n!==Ce.CLONE_FULLY)e.setState({cogvidActionItem:{type:n,videoId:d,title:l,turnOffLoading:r,turnOnLoading:i},showConfirmModal:!0});else{var p=!!c&&0==c.serial;e.setState({showCloneVideoForm:{videoId:d,title:l+" (copy)",isMasterVideo:p,courseCode:(null==c?void 0:c.code)||"",cloneTo:k.g.VIDEO_MENU_CATEGORY.BRAINHIVE}})}})),y()(d()(e),"renderCogvidItem",(function(t,n){var r=t.cognitiveVideo,i=(r=void 0===r?{}:r).title,a=void 0===i?"":i,o=r.subject,s=void 0===o?"":o,l=r.topic,c=void 0===l?"":l,u=r.author,d=void 0===u?"":u,h=r.description,f=r.visibilityScope,p=void 0===f?"":f,m=r.owner,g=r.avatar,v=r.status,b=r.course,y=r.primCourse,A=r.keywords,w=void 0===A?[]:A,E=r.learningLevel,S=r.learningSubject,C=t.uid,T=void 0===C?"-1":C,x=t.createdDate,O=void 0===x?"":x,I=t.chapters,M=t.attachmentCount,P=void 0===M?0:M,D=t.sharedCount,N=void 0===D?0:D,L=t.userScaffId,R=void 0===L?"":L,B=t.ownerScaffId,j=void 0===B?"":B,F=t.unitPrice,U=void 0===F?{}:F,H=t.accessGrantType,z=t.adminAccess,V=t.playlistUrl,W=t.videoLength,G=t.isLoading,q=t.views,Y=void 0===q?0:q,K=t.likes,X=void 0===K?0:K,Q=t.downloaded,$=void 0===Q?0:Q,J=t.permissions,Z=void 0===J?{}:J,ee=t.lastReviewStatus,te=void 0===ee?"":ee,ne=t.publicView,re=void 0!==ne&&ne,ie=t.thumbnailUrl,ae=e.props,oe=(ae.activateScrollingCogvidItem,ae.videoId),se=ae.isVideoInfoEditable,le=ae.isAttachmentEditable,ue=ae.subscriptionOptions,de=(ue=void 0===ue?{}:ue).videoManipulationPermission,he=ue.resourceManipulationPermission,fe=e.state,pe=fe.isEditingVideoMode,me=fe.searchVideoList,ge=fe.courseVideoList,ve=fe.courseVideoId,be=fe.withCourse,ye=e.props.selectedVideoIdx===parseInt(n,0),Ae=null!==me,_e=null!==ge,we=!Ae&&!_e&&T===oe,Ee=e.getRenderList(),Se=T===ve,Ce=be&&!_e&&!Ae;return ye&&(e.scrollingVideoId=T),_.a.createElement(ce,{key:T+n,index:n,author:d,avatar:g,videoTitle:a,subject:s,topic:c,description:h,createdDate:O,userScaffId:R,ownerScaffId:j,isHover:ye,isActive:we,videoData:t,editable:se&&pe,videoId:T,chapters:I,attachmentCount:P,sharedCount:N,visibilityScope:p,publicView:re,onActionCogvidItem:function(n,r,i){e.handleCogvidItemButtonClick(t,n,r,i)},lastReviewStatus:te,isAttachmentEditable:le,isOwner:k.c.isCurrentUserId(m),isAdmin:z,videoStatus:v,unitPrice:U,accessGrantType:H,isEmptyVideo:0===W||!V,isLoading:G,views:Y,likes:X,downloaded:$,permissions:Z,videoOwnerId:m,updateCogvidItem:e.updateCogvidItem,displayHour:!0,course:b,primCourse:y,keywords:w,learningLevel:E,learningSubject:S,onOpenCourseClick:e.handleOpenCourseClick,isOpenCourseVideoList:_e||Ce,actualCourseCount:Ee.length,showCloseCourseButton:Se&&!Ce,onCloseCourseClick:e.handleCloseCourseClick,onVideoItemClick:e.handleVideoItemClick,onOpenChangeOwnerShipModal:function(n){return e.setState({ownerShipModalData:t})},publishMasterCourseCallback:e.publishMasterCourseCallback,onChangePrice:function(t){return e.updateLayerListItem(T,{accessGrantType:t.accessGrantType})},canManipulateVideos:de,canManipulateResources:he,thumbnailUrl:ie,heightItem:e.heightVideoItem,onMouseEnter:e.handleItemMouseEnter,onMouseLeave:e.handleItemMouseLeave})})),y()(d()(e),"updateScrollbarDirection",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.updatePreviewData,r=e.props.updateVideoPreviewData,i=Object(E.get)(e.props,"scrollRef.current",{}),a=i.scrollRef,o=i.scrollbarRef;a&&o&&(null==o?void 0:o.handleScroll)&&setTimeout((function(){o.handleScroll(a),n&&r()}))})),y()(d()(e),"handleMouseEnter",(function(t){e.setState({isMouseEnter:!0},(function(){e.forceUpdate(),e.props.scrollRef.current.forceUpdate()}))})),y()(d()(e),"handleMouseLeave",(function(t){e.setState({isMouseEnter:!1},(function(){e.forceUpdate(),e.props.scrollRef.current.forceUpdate()})),e.handleItemMouseLeave(e.props.selectedVideoIdx),e.mousePos.y=10})),y()(d()(e),"handleFilterChange",(function(t){if(e.state.filter!==t){var n=Object(E.get)(x.a,"location.pathname"),r=new URLSearchParams,i=k.c.getDataFromUrl(),a=i.searchTerm,o=i.videoId;t!==Se&&r.set(we.KEY.FILTER,t),a&&r.set(we.KEY.SEARCH_TERM,a),a&&o&&r.set(we.KEY.VIDEO_ID,o);var s=r.toString(),l=n+(s?"?"+s:"");x.a.push(l)}})),y()(d()(e),"isOpenCourseList",(function(t){var n=e.props.currentHoverdVideo,r=e.state,i=r.courseVideoList,a=r.prCourseVideoList,o=k.c.getCurrentVideoCategory(),s=(t||n(e.getRenderList())||{}).cognitiveVideo,l=(s=void 0===s?{}:s).course,c=s.primCourse;return(Object(E.isEmpty)(i)&&Object(E.isEmpty)(a)&&!!c||!!l&&!!c&&Object(E.isEmpty)(i))&&[ve.EXPLORING,ve.COMPOSING].includes(o)})),y()(d()(e),"handleOpenCourseClick",(function(t,n){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var r=e.props,i=r.videoId,a=r.videoList,o=r.videoType,s=r.getCogvidList,l=r.activateScrollingCogvidItem,c=r.updateReviewAttachment,u=r.scrollRef,d=n||{},h=d.uid;e.prevOpenCourseScrollTop=Object(E.get)(u,"current.scrollRef.scrollTop",0),!k.r.paused()&&k.r.pause(),k.c.addURLSearchParams([[we.KEY.COURSE_ID,h]],!0),e.setState({courseDetail:n,courseVideoId:t}),s({videoId:t,withCourse:!0,pageSize:1e3},(function(n){var r=n.videoList,s=void 0===r?[]:r;Object(E.set)(u,"current.scrollRef.scrollTop",0),c({attachmentId:""}),e.setState({courseVideoList:s},(function(){if(e.updateScrollbarDirection(),Object(E.isEmpty)(s))if(i&&o!==k.g.VIDEO_TYPE.GALLERY){var n=Object(E.find)(a,{uid:i});l(ge({},n||{}),!0)}else l({});else e.scrollToLayerVideo(t);e.setState({isMouseEnter:!0})})),e.handleItemScrollTo(0);var d=[];s.map((function(e){var t=e.thumbnailUrl;return t&&d.push(t)})),d.length>0&&e.props.getCogvidThumbnail(d)}))})),y()(d()(e),"handleVideoItemClick",(function(t,n){var r=e.props.selectedVideo;(null==t?void 0:t.uid)!==(null==r?void 0:r.uid)&&e.handleItemScrollTo(n,{thenSelect:!0,thenActive:!0,noAnimation:!1})})),y()(d()(e),"handleCloseCourseClick",(function(t){t&&t.stopPropagation();var n=e.props,r=n.videoId,i=n.scrollRef,a=n.videoType,o=n.galleryVideoData,s=n.updateVideoPreviewData,l=n.activateScrollingCogvidItem,c=null!==e.state.searchVideoList;k.c.removeURLSearchParams([we.KEY.COURSE_ID],!0),Object(E.set)(i,"current.scrollRef.scrollTop",e.prevOpenCourseScrollTop),e.setState({courseVideoList:null,courseDetail:null,courseVideoId:null},(function(){Object(E.set)(i,"current.scrollRef.scrollTop",e.prevOpenCourseScrollTop),e.updateScrollbarDirection({updatePreviewData:!c})})),a===k.g.VIDEO_TYPE.GALLERY?setTimeout((function(){return l(ge({},o))})):r&&!c?l({}):s()})),y()(d()(e),"scrollToLayerVideo",(function(t){var n=e.props,r=n.scrollRef,i=n.activateScrollingCogvidItem,a=e.getRenderList(),o=Object(E.findIndex)(a,{uid:t});if(!(o<0)){var s=e.heightVideoItem*o;Object(E.set)(r,"current.scrollRef.scrollTop",s),i(ge({},a[o]))}})),y()(d()(e),"toggleDisplayCreateCogvidForm",(function(t){(0,e.props.toggleCreateCogvidForm)(t)})),y()(d()(e),"toggleDisplayAddFilesToGalleryForm",(function(t){(0,e.props.toggleAddFilesToGalleryForm)(t)})),y()(d()(e),"addNewCogvidItem",(function(){var t=e.props,n=t.scrollRef,r=t.cogvidListLv,i=t.videoId;if(0==r.currentActiveLv&&!i){var a=Object(E.get)(n,"current.scrollRef.scrollTop",0);Object(E.set)(n,"current.scrollRef.scrollTop",a+e.heightVideoItem)}})),y()(d()(e),"showCogvidUpdatedInfoModal",(function(t){var n=t.title,r=t.videoId,i=t.userScaffId;e.setState({showInfoModal:{title:n,videoId:r,userScaffId:i}})})),y()(d()(e),"handleInfoModalClose",(function(){var t=e.props,n=t.getLectureVideo,r=t.updateCogvidListItem,i=t.activeCogvidItem,a=e.state.showInfoModal||{},o=a.videoId,s=a.userScaffId,l=k.c.getCurrentVideoCategory(),c=k.g.VIDEO_SEARCH_SCOPE[l.toUpperCase()];e.setState({showInfoModal:null}),o&&n({videoId:o,userScaffId:s,scope:c},(function(e){r({videoId:o,data:ge({},e)}),i({videoData:e,closeAttachmentReview:!1})}))})),y()(d()(e),"handleLearningSubjectChange",(function(t){var n=e.state,r=n.sort,i=n.filter,a=n.searchTerm;e.fetchVideoList({sort:r,filter:i,searchTerm:a,learningSubject:t,refresh:!0},!0)})),y()(d()(e),"handleItemActivate",(function(t){var n,r=e.props.activateScrollingCogvidItem,i=(null===(n=k.c.getRenderList())||void 0===n?void 0:n.videoList)[t];i&&(e.updateHoveredVideoIndex(t),r(i),k.c.changeURLWithoutSideEffect([[we.KEY.VIDEO_ID,null==i?void 0:i.uid]]))})),y()(d()(e),"handleItemScrollTo",(function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.thenSelect,a=void 0===i||i,o=r.thenActive,s=r.noAnimation,l=void 0===s||s,c=e.props,u=c.scrollRef,d=c.selectedVideo,h=c.activateScrollingCogvidItem,f=null===(n=k.c.getRenderList())||void 0===n?void 0:n.videoList,p=f[t];if(p){var m,g=e.heightVideoItem*t;if(l)u.current&&(u.current.scrollRef.scrollTop=g);else(null===(m=u.current)||void 0===m?void 0:m.setScrollPosition)&&u.current.setScrollPosition(g);(null==p?void 0:p.uid)!==(null==d?void 0:d.uid)&&a&&(e.updateHoveredVideoIndex(t),h(p),k.c.changeURLWithoutSideEffect([[we.KEY.VIDEO_ID,null==p?void 0:p.uid]]),setTimeout((function(){o&&setTimeout((function(){var e=document.getElementById(k.g.ID_VIDEO_PLAY_BUTTON_AREA);e&&e.click()}),500),e.handleItemMouseLeave()}),l?50:ke))}})),y()(d()(e),"handleItemHoverByScrolling",Object(E.throttle)((function(t){var n=e.mousePos.y,r=e.heightVideoItem,i=t+n+(e.state.isMouseEnter?0:e.heightToolbarInPx)-(e.topDummyBlocksHeight||0);if(!(t%r<0||e.isScrollingToItem)){var a=Math.ceil(i/r)-1;if(a>=0&&a!==e.hoveredMouseIndex){e.hoveredMouseIndex;e.hoveredMouseIndex=a,a<e.itemCount?e.handleItemMouseEnter(a):e.handleItemMouseLeave(a),e.state.isMouseEnter||(clearTimeout(e.timeoutActivate),e.timeoutActivate=setTimeout((function(){e.handleItemActivate(a)}),500))}}}),50)),y()(d()(e),"handleItemMouseEnter",(function(t){var n;if(window.isScrollingVideo=!0,t!=e.props.selectedVideoIdx){var r=(null===(n=k.c.getRenderList())||void 0===n?void 0:n.videoList)[t];r&&!e.isScrollingToItem&&(e.setState({itemThumbnail:{index:t,videoId:r.uid,url:r.thumbnailUrl}}),k.c.blurFirstArea(!0))}else e.handleItemMouseLeave()})),y()(d()(e),"handleItemMouseLeave",(function(){window.isScrollingVideo=!1,e.setState({itemThumbnail:null}),k.c.blurFirstArea(!1,!e.state.isMouseEnter)})),y()(d()(e),"handleMouseMove",(function(t){if(t.currentTarget){!e.state.isMouseEnter&&e.setState({isMouseEnter:!0},(function(){e.forceUpdate(),e.props.scrollRef.current.forceUpdate()}));var n=t.currentTarget.getBoundingClientRect();e.mousePos.x=t.clientX-n.left,e.mousePos.y=t.clientY-n.top,e.mousePos.width=n.width,e.mousePos.height=n.height}else e.mousePos={x:0,y:0,width:0,height:0}})),y()(d()(e),"handleItemThumbnailClick",(function(){setTimeout((function(){var e=document.getElementById(k.g.ID_VIDEO_PLAY_BUTTON_AREA);e&&e.click()}),250)})),y()(d()(e),"handleBackClick",(function(){e.handleItemScrollTo(e.props.selectedVideoIdx,{thenSelect:!1,noAnimation:!1}),e.setState({showBackBtn:!1})})),y()(d()(e),"handleHomeClick",(function(){e.handleItemScrollTo(0,{thenSelect:!0,noAnimation:!1}),e.setState({showHomeBtn:!1})})),e}return B()(n,[{key:"componentDidUpdate",value:function(e){var t,n,r,i=e.videoList,a=void 0===i?[]:i,o=e.learningSubject,s=this.props,l=s.videoId,c=s.videoList,u=void 0===c?[]:c,d=s.scrollToVideo,h=s.activateScrollingCogvidItem,f=s.scrollRef,p=s.learningSubject,m=this.state,g=m.searchVideoList,v=m.courseVideoList,b=k.c.getCurrentVideoCategory();if(l&&!Object(E.isEqual)(a[0],u[0])&&(b===ve.EXPERIENCING&&d({uid:l}),[ve.COMPOSING,ve.HOME,ve.BRAINHIVE].includes(b)&&(null===(t=u[0])||void 0===t?void 0:t.uid)!==l&&Object(E.isEmpty)(g)&&Object(E.isEmpty)(v)&&(null===(n=a[0])||void 0===n?void 0:n.uid)!==(null===(r=u[0])||void 0===r?void 0:r.uid))){var y=Object(E.get)(f,"current.scrollRef.scrollTop",0);Object(E.set)(f,"current.scrollRef.scrollTop",y+this.heightVideoItem)}Object(E.isEmpty)(a)&&!Object(E.isEmpty)(u)&&h(u[0]),o!==p&&this.handleLearningSubjectChange(p)}},{key:"componentDidMount",value:function(){var e=this;this.updateWindowDimensions(),window.addEventListener("resize",this.updateWindowDimensions),this.unlistenHistory=x.a.listen((function(t){return e.handleURLChange(t)})),this.handleURLChange(x.a.location,!0),document.addEventListener("mousemove",this.detectMousePosition),document.addEventListener("keydown",this.handleKeyDown)}},{key:"render",value:function(){var e=this,t=this.props,n=t.editVideoModal,r=t.scrollRef,i=t.isLoading,a=t.totalElements,o=t.isVideoInfoEditable,s=t.openCreateCogvidForm,l=t.userInfo,c=t.currentUserId,u=t.updateVideoPreviewData,d=(t.cogvidListLv,t.videoId),h=t.isFullscreenMode,f=t.hasActiveChapter,p=t.selectedVideoIdx,m=k.g.COGVID_ACTIONS,g=l.firstName,v=void 0===g?"":g,b=l.lastName,y=void 0===b?"":b,A=this.state,w=A.scrollBarHeight,E=A.showConfirmModal,S=A.cogvidActionItem,C=A.isEditingVideoMode,T=A.searchVideoList,x=A.filter,O=A.searchQueryData,I=A.courseDetail,M=A.courseVideoList,P=A.ownerShipModalData,N=A.withCourse,R=A.showCloneVideoForm,B=A.showInfoModal,U=A.isMouseEnter,H=A.itemThumbnail,W=A.widthCB,G=A.heightCB,q=A.widthCBWrapper,K=A.heightCBWrapper,X=null!==M,Q=null!==T,$=this.getRenderList(),J=N&&!X&&!Q;this.itemCount=$.length;k.c.convertRemToPx(D.heightToolbar);var Z,ee,te,ne=Math.ceil(0/this.heightVideoItem),re=w-this.heightVideoItem,ie=Math.ceil(re/this.heightVideoItem);switch(S.type){case m.CLONE:Z=Object(fe.b)("modal.confirmation"),ee=Object(fe.b)("modal.cloneConfirmModalTitle",{name:S.title}),te="";break;case m.UNPUBLISH:Z=Object(fe.b)("modal.confirmation"),ee=Object(fe.b)("modal.unpublishConfirmModalTitle",{name:S.title}),te="";break;case m.DELETE:Z=Object(fe.b)("modal.confirmation"),ee=Object(fe.b)("modal.deleteConfirmModalTitle",{name:S.title}),te="";break;case m.DELETE_VIDEO_SHARED_TO_ME:Z=Object(fe.b)("modal.confirmation"),ee=Object(fe.b)("modal.deleteSharedVideoConfirmModalTitle",{name:S.title}),te=""}var ae=(null==I?void 0:I.code)||"",oe=Q?(null==O?void 0:O.totalElements)||$.length:a,se=U||h||f?this.wrapperRef.current:document.getElementById(k.g.VIDEO_AREA_WRAPPER_ID)||null;return _.a.createElement(_.a.Fragment,null,!!(null==H?void 0:H.url)&&H.videoId!==d&&(U?_.a.createElement("div",{className:z()(he.a.itemThumbnail,he.a.mini)},_.a.createElement("img",{alt:"course image",src:H.url}),_.a.createElement("div",{className:he.a.videoIndex},H.index+1," / ",k.c.nFormatter(oe)," ",Object(fe.b)("courses",{count:oe}))):_.a.createElement("div",{className:z()(he.a.itemThumbnail,he.a.full,"u-flex-center"),style:{width:q,height:K},onClick:this.handleItemThumbnailClick},_.a.createElement("div",{className:"bg-white",style:{width:W,height:G}},_.a.createElement("img",{alt:"course image",src:H.url})))),_.a.createElement("div",{ref:this.wrapperRef,className:z()(he.a.listWrapper,"h-100 position-relative",!this.itemCount&&"border-right"),onMouseLeave:this.handleMouseLeave,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove},i&&_.a.createElement(V.tb,{className:"u-text-gray-400"}),this.itemCount>0&&_.a.createElement(_.a.Fragment,null,this.state.showBackBtn&&_.a.createElement("div",{className:z()(he.a.backBtn,"u-flex-center u-shadow")},_.a.createElement(V.eb,{tooltipText:"Back to the current course",onClick:this.handleBackClick},_.a.createElement("i",{className:"fv fuvi-center-point u-text-red u-fs-1x1o4 u-fw-600"}))),this.state.showHomeBtn&&_.a.createElement("div",{className:z()(he.a.homeBtn,"u-flex-center u-shadow")},_.a.createElement(V.eb,{tooltipText:"Back to top",onClick:this.handleHomeClick},_.a.createElement("img",{width:24,src:Y.a.homeRed,alt:"home"})))),_.a.createElement("div",{className:he.a.toolbar,onClick:function(e){return e.stopPropagation()}},(X||J)&&_.a.createElement(_.a.Fragment,null,!J&&_.a.createElement(V.eb,{onClick:this.handleCloseCourseClick,tooltipText:Object(fe.b)("btn.back")},_.a.createElement("i",{className:"fv fuvi-short-pre"})),_.a.createElement(j.a,{placement:"bottom",delay:{show:800},overlay:_.a.createElement(F.a,null,ae),trigger:["hover","focus"]},_.a.createElement("div",{className:"text-truncate u-fw-bold u-fs-7o8 ml-1"},ae))),!!c&&_.a.createElement(V.eb,{disabled:!o,onClick:this.toggleEditVideoMode,active:C,tooltipText:Object(fe.b)(C?"tooltip.cognitiveToolDisableEditText":"tooltip.cognitiveToolEnableEditText"),tooltipPlacement:"bottom"},_.a.createElement("i",{className:"fv fuvi-text-icon"})),_.a.createElement(V.eb,{onClick:this.doReloadVideoList,tooltipText:Object(fe.b)("tooltip.reloadVideoList")},_.a.createElement("i",{className:"fv fuvi-refresh"})),!!c&&!X&&_.a.createElement(_.a.Fragment,null,_.a.createElement(V.eb,{badge:oe,className:"u-cursor-default u-opacity-100",classNameBadge:he.a.totalVideosBadge,tooltipText:Object(fe.b)("videoCount",{count:oe})},_.a.createElement("i",{className:"fv fuvi-video-icon u-fs-1x1o4"})),_.a.createElement("div",{className:"flex-grow-1"}),_.a.createElement(V.S,{className:"m-0",classNameInput:z()(he.a.filterDropdown,"u-fs-7o8"),value:x,options:xe,onChange:this.handleFilterChange,"data-tut":"fuvi-filter"}))),_.a.createElement(_.a.Fragment,null,_.a.createElement(V.Vb,{isDisplayYNav:!0,id:"left-scroll-bar",className:"hide-scrollbar",ref:r,numberOfHasDataItems:20,data:$,itemRenderer:this.renderCogvidItem,itemHeight:this.heightVideoItem,alwaysShowTracksBar:!0,topElement:this.renderDummyCogvidItems(ne,"column-reverse",$,!1,"".concat(0,"px")),bottomElement:this.renderDummyCogvidItems(ie,"column",$,!1,"".concat(re,"px")),containerClassName:z()("h-100",!this.itemCount&&"invisible"),onScroll:this.handleScroll,onYReachAlmostEnd:this.handleLoadMore,delegateTo:se}))),_.a.createElement(pe.a,{key:$.length,className:z()(!$.length&&"invisible",k.c.isExploring()&&!X&&he.a.noToolbar),min:0,max:$.length-1,items:$,slideIndex:p,onChange:this.handleItemScrollTo}),_.a.createElement(V.F,{show:E,header:Z,icon:_.a.createElement("i",{className:"fv fuvi-exam-ex u-fs-2 text-secondary"}),title:ee,message:te,onConfirm:this.handleActionCogvidItem,onClose:this.handleCloseConfirmationModal}),n.show&&_.a.createElement(V.L,L()({},n,{onClose:this.closeEditVideoForm,formTitle:Object(fe.b)("editCogvid"),submitBtnText:Object(fe.b)("btn.next"),isEditVideo:!0,updateCogvidItem:this.updateCogvidItem,updateVideoPreviewData:u,refreshCogvidItem:this.showCogvidUpdatedInfoModal})),_.a.createElement(V.o,{show:!!(null==P?void 0:P.uid),data:P,onClose:function(){e.setState({ownerShipModalData:{}})}}),s&&_.a.createElement(V.L,{onShow:function(){return e.toggleDisplayCreateCogvidForm(!0)},onClose:function(){return e.toggleDisplayCreateCogvidForm(!1)},author:"".concat(v," ").concat(y),addNewCogvidItem:this.addNewCogvidItem}),!!R&&_.a.createElement(V.y,L()({},R,{onClose:function(){e.props.toggleOpenPopup(!1),e.setState({showCloneVideoForm:null})}})),!!B&&_.a.createElement(V.hb,{show:!0,message:Object(fe.b)("modal.infoUpdatedVideoMessage",{name:null==B?void 0:B.title}),onClose:this.handleInfoModalClose}))}}]),n}(_.a.PureComponent);Oe.propTypes={activeCogvidItem:X.a.func.isRequired,scrollToVideo:X.a.func.isRequired};var Ie=Object(w.b)((function(e){var t,n,r,i=e.cogvid,a=e.auth,o=e.common,s=e.canvas;return{cogvidListLv:i.cogvidListLv,videoList:i.cogvidListLv.lv0.videoList,loadingCogvidItems:i.cogvidListLv.lv0.loadingCogvidItems,isLoading:i.cogvidListLv.isLoading,isLoadingMore:i.cogvidListLv.lv0.isLoadingMore,last:i.cogvidListLv.lv0.last,totalElements:i.cogvidListLv.lv0.totalElements,sort:i.cogvidListLv.lv0.sort,filter:i.cogvidListLv.lv0.filter,videoOverlayMode:i.videoOverlayMode,videoId:i.cogvidDetails.videoId,videoType:i.cogvidDetails.videoType,isFullscreenMode:o.isFullscreenMode,attachmentReviewId:i.attachmentReview.attachmentId,attachmentReviewVideoId:i.attachmentReview.videoId,currentUserId:a.userInfo.userId,currentActiveVideoType:i.cogvidDetails.videoType,galleryVideoData:i.galleryVideoData,editVideoModal:i.editVideoModal,shouldReInitScScrollBar:i.shouldReInitScScrollBar,cogvidDetails:i.cogvidDetails,willCollapseMenu:o.willCollapseMenu,openCreateCogvidForm:i.openCreateCogvidForm,userInfo:a.userInfo,subscriptionOptions:a.userInfo.subscriptionOptions,oldOpenCreateCogvidForm:i.oldOpenCreateCogvidForm,openAddFilesToGalleryForm:i.openAddFilesToGalleryForm,isPopupOpen:o.isPopupOpen,isToolbarShown:s.isToolbarShown,showProductsLayer:i.showProductsLayer,showVideoDescription:i.showVideoDescription,showVideoAttachments:i.showVideoAttachments,learningSubject:i.learningSubject,hasActiveChapter:!!(null===(t=i.chapterHighlighting)||void 0===t?void 0:t.uid),selectedVideoIdx:null===(n=i.selectedVideo)||void 0===n?void 0:n.idx,selectedVideo:null===(r=i.selectedVideo)||void 0===r?void 0:r.data}}),(function(e){return{resetCogvidDetail:function(){return e(M.e.resetCogvidDetail())},getCogvidList:function(t,n){return e(M.e.getCogvidList(t,n))},updateCogvidList:function(t){return e(M.e.updateCogvidList(t))},loadMoreCogvidList:function(t,n,r){return e(M.e.loadMoreCogvidList(t,n,r))},getCogvidThumbnail:function(t){return e(M.e.getCogvidThumbnail(t))},showVideoOverlay:function(t){return e(M.e.showVideoOverlay(t))},getGalleryVideo:function(t,n){return e(M.e.getGalleryVideo(t,n))},unpublishVideo:function(t,n,r){return e(M.e.unpublishVideo(t,n,r))},cloneCogvid:function(t,n,r){return e(M.e.cloneCogvid(t,n,r))},deleteVideo:function(t,n,r){return e(M.e.deleteVideo(t,n,r))},deleteVideoSharedToMe:function(t,n,r){return e(M.e.deleteVideoSharedToMe(t,n,r))},updateReviewAttachment:function(t,n,r){return e(M.e.updateReviewAttachment(t,n,r))},toggleOpenPopup:function(t){return e(M.f.toggleOpenPopup(t))},updateCogvidListItem:function(t){return e(M.e.updateCogvidListItem(t))},updateEditVideoModal:function(t,n){return e(M.e.updateEditVideoModal(t,n))},updateCogvidState:function(t,n,r){return e(M.e.updateCogvidState(t,n,r))},toggleCreateCogvidForm:function(t){return e(M.e.toggleCreateCogvidForm(t))},toggleAddFilesToGalleryForm:function(t){return e(M.e.toggleAddFilesToGalleryForm(t))},updateChildVideoStatus:function(t){return e(M.e.updateChildVideoStatus(t))},getLectureVideo:function(t,n,r){return e(M.e.getLectureVideo(t,n,r))},updateSelectedVideo:function(t){return e(M.e.updateSelectedVideo(t))},displayProductsLayer:function(t,n,r){return e(M.e.displayProductsLayer(t,n,r))},displaySlide:function(t){return e(M.d.displaySlide(t))}}}),null,{forwardRef:!0})(Object(ue.b)(Object(ue.c)(Oe))),Me=_.a.createContext(),Pe=r(91),De=r.n(Pe),Ne=r(174),Le=function(e){var t=e.videoId,n=e.displayLock,r=Object(w.d)((function(e){var t,n;return null===(t=e.cogvid)||void 0===t?void 0:null===(n=t.chapterHighlighting)||void 0===n?void 0:n.uid})),i=Object(w.d)((function(e){var t,n;return null===(t=e.cogvid)||void 0===t?void 0:null===(n=t.activeChapter)||void 0===n?void 0:n.seqNumber})),a=Object(w.d)((function(e){var t,n;return null===(t=e.cogvid)||void 0===t?void 0:null===(n=t.chapterHighlighting)||void 0===n?void 0:n.lockTime})),o=Object(w.d)((function(e){var t,n;return null===(t=e.cogvid)||void 0===t?void 0:null===(n=t.videoTime)||void 0===n?void 0:n.currentTime})),s=Object(ue.a)(r),l=k.c.checkSubscribedOffer(k.g.SUB_OFFER.VIEW_VIDEOS)||k.c.checkChapterAccessible(i);return Object(A.useEffect)((function(){return window.freeVideoChapter||(window.freeVideoChapter={}),function(){n(!1)}}),[]),Object(A.useEffect)((function(){r!==s&&(Object(E.get)(window.freeVideoChapter,[t,s])&&Object(E.set)(window.freeVideoChapter,[t,s],!1))}),[t,r,s]),Object(A.useEffect)((function(){if(r&&!l){var e=Object(E.get)(window.freeVideoChapter,t,{});if(e[r]){if(o>a)return void n(!0);k.r.paused()&&n(!1)}else Object.keys(e).length<0?(n(!1),Object(E.set)(window.freeVideoChapter,[t,r],!0)):n(!0)}else n(!1)}),[t,r,l,o,a]),null},Re=Object(w.b)((function(e){var t,n=e.cogvid,r=e.cg;return{showLock:r.showLock,chapterId:null===(t=n.chapterHighlighting)||void 0===t?void 0:t.uid,slideIndex:r.showChapterCoverImageSlide}}),(function(e){return{displaySubscribeModal:function(t,n,r){return e(M.e.displaySubscribeModal(t,n,r))},displayLock:function(t){return e(Ne.a.displayLock(t))},addItemToCart:function(t,n,r){return e(M.c.addItemToCart(t,n,r))}}}))((function(e){var t=e.showLock,n=e.videoId,r=e.videoTitle,i=e.videoOwner,a=e.videoPlan,o=e.chapterId,s=e.slideIndex,l=e.subscription,c=e.displayLock,u=e.displaySubscribeModal,d=k.c.isExploring(),h=!t||!o||!d,f=Object(A.useCallback)((function(e){e&&k.r.pause(),e!==t&&c(e),k.c.isExploring()&&e?u({videoId:n,videoTitle:r,videoOwner:i,videoPlan:a}):u(null)}),[t,n,r,i,a]);k.g.SUBSCRIPTION.EXPIRED;Object(A.useEffect)((function(){h||k.b.reportOpenSubscriptionFormDesktop()}),[h]);var p=k.c.checkSubscribedOffer(k.g.SUB_OFFER.VIEW_VIDEOS)||k.c.checkChapterAccessible(s),m=d&&!p;return _.a.createElement(_.a.Fragment,null,m&&_.a.createElement(Le,{videoId:n,displayLock:f}))}));var Be=function(e){f()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=v()(e);if(t()){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}(r);function r(){var e;c()(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),y()(d()(e),"handleBack",(function(e){var t=document.getElementById(k.g.ID_VIDEO_BACK_BUTTON);t&&t.click()})),y()(d()(e),"handleLoopToggle",(function(t){var n=e.props,r=n.isAudioLoop;(0,n.updateChapterImageSlider)({isAudioLoop:!r})})),y()(d()(e),"handleStart",(function(e){var t=document.getElementById(k.g.ID_CHAPTER_CI_WRAPPER);t&&t.click()})),y()(d()(e),"handleExitFullscreen",(function(){var e=document.getElementById(k.g.ID_FULLSCREEN_BUTTON);e&&e.click()})),y()(d()(e),"handleTocClick",(function(){var t=e.props,n=t.showToc;(0,t.displayToc)(!n)})),y()(d()(e),"render",(function(){var n=e.props,r=n.showToc,i=n.isAudioLoop,a=n.slideCount,o=n.isVideoActive;return _.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:z()(De.a.fullscreenRightBar,"w-100 h-100")},o&&_.a.createElement("div",{className:"w-100 h-100"},_.a.createElement("div",{className:"w-100 h-100 u-flex-center flex-column justify-content-between u-font-din-condensed"},_.a.createElement("div",{className:"mt-4 w-100 py-1 u-flex-center clickable",onClick:e.handleBack},_.a.createElement("img",{width:"38",src:Y.a.back,alt:"back"})),_.a.createElement("div",{className:"w-100 py-1 u-flex-center clickable",onClick:e.handleLoopToggle},i?_.a.createElement("img",{width:30,src:Y.a.loop,alt:"loop icon"}):_.a.createElement("img",{width:30,src:Y.a.loopNon,alt:"no loop icon"})),_.a.createElement("div",null,_.a.createElement(V.vc,{className:"w-100",vertical:!0,chapterCount:a})),_.a.createElement(V.eb,{classNameWrapper:"m-0 u-flex-center u-z-index-1",onClick:e.handleTocClick},_.a.createElement("img",{className:z()(r&&"blink"),width:44,src:Y.a.tocVertical})),_.a.createElement(V.eb,{className:"mb-5 u-h-2",onClick:e.handleExitFullscreen,tooltipText:t("tooltip.closeFullscreen")},_.a.createElement("i",{className:"fv u-fs-2 fuvi-exit-fullscreen-b text-white"})))),!o&&_.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:"w-100 h-100 u-flex-center flex-column justify-content-between"},_.a.createElement("div",{className:"w-100 u-h-2"}),_.a.createElement("div",{onClick:e.handleStart,className:z()(De.a.startBtn,"clickable u-font-din-condensed")},"START"),_.a.createElement(V.eb,{className:"mb-5 u-h-2",onClick:e.handleExitFullscreen,tooltipText:t("tooltip.closeFullscreen")},_.a.createElement("i",{className:"fv u-fs-2 fuvi-exit-fullscreen-b text-white"}))))))})),e}return r}(_.a.Component),je=Object(w.b)((function(e){var t=e.cg;return{isVideoActive:-1!==t.showChapterCoverImageSlide,isAudioLoop:t.showChapterImageSlider.isAudioLoop,showToc:t.showToc}}),(function(e){return{updateChapterImageSlider:function(t){return e(M.d.updateChapterImageSlider(t))},displayToc:function(t){return e(M.d.displayToc(t))}}}))(Be);var Fe=function(e){f()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=v()(e);if(t()){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}(n);function n(){var e;c()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),y()(d()(e),"handleBack",(function(e){var t=document.getElementById(k.g.ID_VIDEO_BACK_BUTTON);t&&t.click()})),y()(d()(e),"handleHomeClick",Object(E.debounce)((function(){if(e.props.isVideoActive)e.props.displaySlide(0);else{var t,n=null===(t=k.c.getRenderList())||void 0===t?void 0:t.videoList;n[0]&&e.props.activateScrollingCogvidItem(n[0])}}),100)),y()(d()(e),"handleVideoChange",Object(E.debounce)((function(t){var n,r=(null===(n=k.c.getRenderList())||void 0===n?void 0:n.videoList)[t];(null==r?void 0:r.uid)&&(e.props.isVideoActive&&e.handleBack(),e.props.activateScrollingCogvidItem(r))}),100)),y()(d()(e),"render",(function(){var t=e.props,n=t.slideIndex,r=t.selectedVideoIdx,i=t.isVideoActive,a=k.c.getRenderList().videoList||[],o=a.length;return _.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:z()(De.a.fullscreenLeftBar,"w-100 h-100 flex-column u-flex-center align-items-start")},i&&_.a.createElement(V.eb,{classNameWrapper:"w-100 u-h-5 m-0 u-flex-center u-z-index-1",disabled:i?0==n:0==r,onClick:e.handleHomeClick},_.a.createElement("img",{width:40,src:Y.a.home,alt:"home"})),_.a.createElement("div",{className:"w-100 h-100 pt-3 pb-5 position-relative"},_.a.createElement(V.sc,{key:o,isFullscreenMode:!0,className:z()(),min:0,max:o-1,items:a,slideIndex:r,onChange:e.handleVideoChange}))))})),e}return n}(_.a.Component),Ue=Object(w.b)((function(e){var t=e.cg,n=e.cogvid;return{isVideoActive:-1!==t.showChapterCoverImageSlide,slideIndex:t.showChapterCoverImageSlide,selectedVideoIdx:n.selectedVideo.idx}}),(function(e){return{displaySlide:function(t){return e(M.d.displaySlide(t))},updateSelectedVideo:function(t){return e(M.e.updateSelectedVideo(t))}}}))(Fe);var He=function(e){f()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=v()(e);if(t()){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}(n);function n(){var e;c()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),y()(d()(e),"handleBack",(function(e){var t=document.getElementById(k.g.ID_VIDEO_BACK_BUTTON);t&&t.click()})),y()(d()(e),"handleVideoChange",Object(E.debounce)((function(t){var n,r=(null===(n=k.c.getRenderList())||void 0===n?void 0:n.videoList)[t];(null==r?void 0:r.uid)&&e.props.activateScrollingCogvidItem(r)}),100)),y()(d()(e),"render",(function(){var t,n,r=e.props,i=r.chapterListRef,a=r.videoData;r.slideIndex,r.chapterCount,r.selectedVideoIdx,r.isVideoActive,(k.c.getRenderList().videoList||[]).length;return _.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:z()(De.a.fullscreenBottomBar,"u-flex-center")},_.a.createElement("div",{className:"w-100 h-100 u-flex-center flex-column justify-content-around"},_.a.createElement(V.v,{isFullscreenMode:!0,chapterListRef:i,min:0,max:(null==a?void 0:null===(t=a.chapters)||void 0===t?void 0:t.length)-1,chapters:null==a?void 0:a.chapters,videoId:null==a?void 0:a.uid,videoTitle:null==a?void 0:null===(n=a.cognitiveVideo)||void 0===n?void 0:n.title,rootContext:null==a?void 0:a.rootContext,tocUrl:null==a?void 0:a.tocUrl}))))})),e}return n}(_.a.Component),ze=Object(w.b)((function(e){var t,n,r=e.cg,i=e.cogvid;return{isVideoActive:-1!==r.showChapterCoverImageSlide,selectedVideoIdx:i.selectedVideo.idx,slideIndex:r.showChapterCoverImageSlide,chapterCount:null===(t=i.selectedVideo.data)||void 0===t?void 0:null===(n=t.chapters)||void 0===n?void 0:n.length}}),(function(e){return{updateChapterImageSlider:function(t){return e(M.d.updateChapterImageSlider(t))},updateSelectedVideo:function(t){return e(M.e.updateSelectedVideo(t))}}}))(He);var Ve=k.g.VIDEO_CATEGORY,We=(k.g.VIDEO_OVERLAY_MODE,k.g.VIDEO_TYPE),Ge=k.g.COGVID_STATUS,qe=(k.g.CHAPTER_TYPES,k.g.COVER_IMAGE_TYPE),Ye=k.g.VIDEO_AREA_WRAPPER_ID,Ke=k.g.VIDEO_AREA_ID,Xe=function(e){f()(r,e);var n=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=v()(e);if(t()){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}(r);function r(){return c()(this,r),n.apply(this,arguments)}return B()(r,[{key:"render",value:function(){var e,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,w=this;if("/"===Object(E.get)(x.a,"location.pathname"))return _.a.createElement(U.a,{to:{pathname:k.g.HOME_PAGE_PATH,state:{from:this.props.location}}});var S=this.props,C=S.userInfo,T=(S.videoOverlayMode,S.isPaused),O=S.coverImage,I=void 0===O?{}:O,M=S.miniCoverImage,P=S.isFullscreenMode,D=S.galleryVideoData,N=void 0===D?{}:D,R=S.videoId,B=S.currentActiveVideoType,H=S.showAttachmentReview,W=S.isToolbarShown,G=S.activeVideoStatus,q=(S.lastReviewStatus,S.userId),Y=S.createMeetingForm,K=S.openAddFilesToGalleryForm,X=S.isUpdatingCG,Q=S.isShowShareVideoModal,$=S.isShowExtractChaptersModal,J=S.setPriceModal,Z=S.publishVideoModal,ee=S.saveToMyVideosModal,te=S.exportVideoModal,ne=S.feedbackModal,re=(S.chapterId,S.currentActiveLv),ie=S.showVideoDescription,ae=S.showCopyChaptersModal,oe=S.showSwapChaptersModal,se=S.showCartModal,le=S.showChapterCoverImage,ce=(S.showSlideType,S.showLock,S.selectedVideo),ue=S.showChapterFileUploadModal,de=S.showChapterFileDeleteModal,he=S.showChapterFileManagerModal,fe=k.c.getRenderList().videoList,pe=k.c.getCurrentVideoCategory(),me=Object(E.find)(fe,{uid:R})||{},ge=me.permissions,ve=void 0===ge?{}:ge,be=this.state,ye=be.videoWidth,Ae=be.isMouseOverSBContainer,_e=be.firstAreaSize,we=be.isSearchingVideo,Ee=be.isOpenCourseVideoList,Se=(be.isMouseOverVideoList,be.isMouseOverCG),Ce=(be.isMouseOverPreviewSBContainer,N.cognitiveVideo),Te=(Ce=void 0===Ce?{}:Ce).status,ke=void 0===Te?"":Te,xe=C.subscriptionOptions,Oe=void 0===xe?{videoManipulationPermission:!1,resourceManipulationPermission:!1}:xe,Pe=Oe.videoManipulationPermission,Ne=(Oe.resourceManipulationPermission,pe===Ve.EXPERIENCING&&B===We.GALLERY),Le=pe===Ve.BRAINHIVE,Be=pe===Ve.MESSAGES,Fe=pe===Ve.EXPLORING,He=[Ve.EXPERIENCING,Ve.LEARNING,Ve.COMPOSING,Ve.HOME,Ve.BRAINHIVE,Ve.MESSAGES].includes(pe),Xe=He&&!!R,Qe=[Ve.REVIEW,Ve.EXPLORING,Ve.LEARNING].includes(pe),$e=k.c.getCurrentUserId(),Je=[Ve.EXPERIENCING,Ve.COMPOSING,Ve.BRAINHIVE].includes(pe)&&!!$e&&!P&&Pe,Ze=!!R,et=(Ze?me:ce)||{};window.videoData=et;var tt=Object(E.isEmpty)(et)?Ne&&ke&&ke!==Ge.PUBLISHED||G!==Ge.PUBLISHED:et.cognitiveVideo.status!==Ge.PUBLISHED,nt=0===(null==et?void 0:et.videoLength),rt=k.c.checkIsPublicProcessing(null==et?void 0:et.lastReviewStatus,null==et?void 0:null===(e=et.cognitiveVideo)||void 0===e?void 0:e.status),it=function(){w.toggleDisplayCreateCogvidForm(!0)};pe===Ve.EXPERIENCING&&(it=function(){w.toggleDisplayAddFilesToGalleryForm(!0)});var at=[Ve.EXPLORING,Ve.BRAINHIVE,Ve.MESSAGES].includes(pe),ot=null==et?void 0:et.thumbnailUrl,st=null==et?void 0:et.videoLength,lt=(null==I||I.type,qe.ATTACHMENT,0==(null==et?void 0:null===(n=et.cognitiveVideo)||void 0===n?void 0:null===(r=n.course)||void 0===r?void 0:r.serial)),ct=0==(null==et?void 0:null===(i=et.cognitiveVideo)||void 0===i?void 0:null===(a=i.primCourse)||void 0===a?void 0:a.serial),ut=[Ve.EXPLORING,Ve.LEARNING,Ve.COMPOSING].includes(pe)&&(null==et?void 0:null===(o=et.cognitiveVideo)||void 0===o?void 0:o.childCount)>0&&(lt||ct),dt=Object(E.get)(et,"cognitiveVideo.subject","");return _.a.createElement(Me.Provider,{value:{activeCogvidItem:this.activeCogvidItem,isComposingVideo:tt,isEnabledEditContent:Xe,isAttachmentEditable:He,isVideoInfoEditable:He,updateVideoPreviewData:this.updateVideoPreviewData,videoPreviewData:et,isEditableMenu:He,isEditBtnsHidden:Qe}},_.a.createElement(V.Z,{isFullScreen:!0,onFuviAppWrapMouseOver:function(){w.mouseOverCogvidList&&(w.mouseOverCogvidList=!1)},activeCogvidItem:this.activeCogvidItem,addBtnAction:it,isShowAddBtn:Je,videoData:et,showSubVideoList:ut,videoSearchComponent:_.a.createElement(V.rc,{className:"w-100 h-100",cognitiveVideoListScrollRef:this.cognitiveVideoListScrollRef}),chapterSearchComponent:_.a.createElement(V.u,{className:"w-100 h-100",videoId:null==et?void 0:et.uid,chapters:null==et?void 0:et.chapters}),header:_.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:"u-flex-center h-100"},_.a.createElement("div",{className:"w-100 h-100 px-2"},!W&&_.a.createElement("div",{className:"pl-3 text-white w-100 h-100 d-flex flex-column justify-content-center u-line-height-1"},_.a.createElement("div",{className:"text-center u-ws-pre-wrap mt-1 u-font-din-condensed flex-shrink-0"},_.a.createElement("span",{className:"u-fs-2x1o2"},"BRAIN-POWERED MATH"),_.a.createElement("span",{className:"u-fs-2x1o8 ml-3"},"Courses – Resources – Live Classes")))))),leftContentFullscreen:_.a.createElement(Ue,{chapterListRef:this.comprehensionGuidesRef,videoData:et,activateScrollingCogvidItem:this.activateScrollingCogvidItem}),bottomContentFullscreen:_.a.createElement(ze,{chapterListRef:this.comprehensionGuidesRef,videoData:et,activateScrollingCogvidItem:this.activateScrollingCogvidItem}),rightContentFullscreen:_.a.createElement(je,{slideCount:null==et?void 0:null===(s=et.chapters)||void 0===s?void 0:s.length}),leftContent:_.a.createElement(_.a.Fragment,null,_.a.createElement("div",{className:"flex-fill position-relative u-z-index-1"},_.a.createElement("div",{className:"".concat(De.a.leftBarContent," w-100 h-100 position-absolute"),"data-tut":"fuvi-sc"},Le||Be?_.a.createElement(Ie,{ref:this.cognitiveVideoListRef,isFullscreenMode:P,onClick:this.activateHoveredCognitiveVideo,scrollRef:this.cognitiveVideoListScrollRef,activeCogvidItem:this.activeCogvidItem,scrollToVideo:this.scrollToVideo,activateScrollingCogvidItem:this.activateScrollingCogvidItem,activeVideoFromUrl:this.activeVideoFromUrl,activeAttachmentFromLocation:this.activeAttachmentFromLocation,activeCommentFromLocation:this.activeCommentFromLocation,activeNoteFromLocation:this.activeNoteFromLocation,currentHoverdVideo:this.getCurrentHoveredVideo,activateHoveredVideo:this.activateHoveredCognitiveVideo}):_.a.createElement(V.A,{ref:function(e){window.cognitiveVideoListRef=e,w.cognitiveVideoListRef.current=e},isFullscreenMode:P,onClick:this.activateHoveredCognitiveVideo,scrollRef:this.cognitiveVideoListScrollRef,activeCogvidItem:this.activeCogvidItem,scrollToVideo:this.scrollToVideo,activateScrollingCogvidItem:this.activateScrollingCogvidItem,activeVideoFromUrl:this.activeVideoFromUrl,activeAttachmentFromLocation:this.activeAttachmentFromLocation,activeCommentFromLocation:this.activeCommentFromLocation,activeNoteFromLocation:this.activeNoteFromLocation,currentHoverdVideo:this.getCurrentHoveredVideo,onChangeCommentsLikesEnabled:this.handleChangeCommentsEnabled,activateHoveredVideo:this.activateHoveredCognitiveVideo})),_.a.createElement(V.f,{rootReviewContext:null==me?void 0:me.rootContext}))),firstArea:_.a.createElement("div",{className:z()(De.a.firstAreaWrapper,P&&De.a.isFullscreenMode),ref:this.firstAreaWrapRef,id:Ye,"data-tut":"fuvi-center",onMouseEnter:this.handleCBMouseEnter,onMouseLeave:this.handleCBMouseLeave},_.a.createElement("div",{className:z()(De.a.chapterCISliderWrapper,"u-flex-center",P&&"d-none")},_.a.createElement(V.v,{ref:function(e){window.chapterSliderRef=e},chapterListRef:this.comprehensionGuidesRef,className:z()(!(null==et?void 0:et.uid)&&"invisible"),width:Object(E.get)(this.firstAreaWrapRef,"current.offsetWidth")||_e.width,sliderWidth:_e.width,heightFirstArea:Object(E.get)(this.firstAreaWrapRef,"current.offsetHeight",0),min:0,max:(null==et?void 0:null===(l=et.chapters)||void 0===l?void 0:l.length)-1,chapters:null==et?void 0:et.chapters,videoId:null==et?void 0:et.uid,videoTitle:null==et?void 0:null===(c=et.cognitiveVideo)||void 0===c?void 0:c.title,rootContext:null==et?void 0:et.rootContext,tocUrl:null==et?void 0:et.tocUrl,onMouseEnter:this.handleCGMouseEnter,onMouseLeave:this.handleCGMouseLeave,videoCoverImage:ot})),_.a.createElement("div",{ref:this.videoPlayerArea,className:z()(De.a.videoPlayerArea,P&&De.a.isFullscreenMode),id:Ke,style:P?{width:ye}:{width:_e.width,height:_e.height},onClick:this.handleCBClick},!W&&(fe.length||H)&&_.a.createElement("div",{id:k.g.ID_FULLSCREEN_BUTTON,"data-html2canvas-ignore":"true",className:z()(De.a.fillScreenInFirstArea,H&&De.a.showAttachmentReview,"d-flex justify-content-end align-items-center u-cursor-pointer","d-none invisible u-opacity-0",P&&De.a.active),onClick:this.handleFullscreen},_.a.createElement(j.a,{placement:"top",delay:{show:800},overlay:_.a.createElement(F.a,null,t(P?H?"tooltip.closeAttachmentFullscreen":"tooltip.closeFullscreen":H?"tooltip.openAttachmentFullscreen":"tooltip.openFullscreen")),trigger:["hover","focus"]},_.a.createElement("i",{className:z()("fv u-fs-1x1o2",P?"fuvi-exit-fullscreen-b":"fuvi-enter-fullscreen-mobile")}))),_.a.createElement("div",{key:null==et?void 0:et.uid,className:z()(De.a.videoPlayer,Ze&&!le&&"show"),onClick:this.handleVideoPlayerClick},_.a.createElement("div",{"data-vjs-player":!0},_.a.createElement("video",{id:k.g.VIDEO_PLAYER_ID,className:"video-js vjs-big-play-centered"}))),H&&_.a.createElement(V.e,{className:z()((Ae||Se)&&"invisible",!1),wrapperWidth:this.videoPlayerArea.current?this.videoPlayerArea.current.offsetWidth:null,wrapperHeight:this.videoPlayerArea.current?this.videoPlayerArea.current.offsetHeight:null}),!ie&&!H&&_.a.createElement(V.q,{isFullscreenMode:P,invisible:!window.isArrowKeyDown&&!le,videoId:null==et?void 0:et.uid,chapterListRef:this.comprehensionGuidesRef,chapters:null==et?void 0:et.chapters,isVideoPaused:T,isVideoPlayable:st>0,videoCoverImage:ot,rootContext:null==et?void 0:et.rootContext,refVideoList:this.cognitiveVideoListRef}),Fe&&(null==et?void 0:et.accessGrantType)===k.g.ACCESS_GRANT_TYPE.PAID&&_.a.createElement(Re,{videoId:null==et?void 0:et.uid,videoTitle:null==et?void 0:null===(u=et.cognitiveVideo)||void 0===u?void 0:u.title,videoOwner:null==et?void 0:null===(d=et.cognitiveVideo)||void 0===d?void 0:d.owner,subscription:null==et?void 0:et.subscription}),M&&_.a.createElement("div",{className:z()(De.a.miniCoverImage)},"undefined"!=M&&_.a.createElement(V.J,{src:M})),!W&&k.r.isPlayer()&&Ze&&_.a.createElement("div",{className:De.a.volumeControl},_.a.createElement(V.xc,null)))),rightContent:_.a.createElement(_.a.Fragment,null,!ut&&_.a.createElement("div",{id:"id-video-control",className:z()(De.a.videoControlWrapper,!Fe&&De.a.withHeader,!(null==et?void 0:et.uid)&&"invisible")},_.a.createElement(V.qc,null),_.a.createElement(V.pc,{videoId:null==et?void 0:et.uid,activateVideo:function(){w.activeCogvidItem({videoData:ce})}})),!!et&&_.a.createElement("div",{onMouseEnter:this.handleSBMouseEnter,className:"h-100 flex-fill position-relative"},_.a.createElement(V.Qb,{ref:this.refSemanticBlocksView,videoId:et.uid,videoSemanticBlocks:et.semantics,permissions:et.permissions,highlightsBookmark:et.highlights,currentVideoCategory:pe,lastReviewStatus:null==et?void 0:et.lastReviewStatus,videoStatus:null==et?void 0:null===(h=et.cognitiveVideo)||void 0===h?void 0:h.status,semanticNoteCount:null==et?void 0:et.semanticNoteCount,chapters:null==et?void 0:et.chapters,rootContext:null==et?void 0:et.rootContext,videoSrc:null==et?void 0:et.playlistUrl,videoLength:null==et?void 0:et.videoLength,version:null==et?void 0:null===(f=et.cognitiveVideo)||void 0===f?void 0:f.version,isVideoMaster:ut,isVideoActive:Ze,isVideoEmpty:nt,isComposingVideo:tt,isPublicProcess:rt})),at&&_.a.createElement(V.Tb,null),_.a.createElement(V.C,null),_.a.createElement(V.qb,null)),bottomFirstArea:_.a.createElement(_.a.Fragment,null,!Fe&&_.a.createElement("div",{className:z()(De.a.quickMenuWrapper,P&&De.a.fullscreenMode)},_.a.createElement(V.Hb,{activeCogvidItem:this.activeCogvidItem,disabled:!Ze||X||rt,videoId:R,isVideoActive:Ze,scrollingCogvidItem:ce,permissions:(null==et?void 0:et.permissions)||ve,isPublicProcess:rt,videoStatus:(null==et?void 0:null===(p=et.cognitiveVideo)||void 0===p?void 0:p.status)||G,hideActions:ut,currentActiveLv:re,onCloseCourseClick:this.handleCloseCourseClick,videoDescription:dt,chapters:null==et?void 0:et.chapters})),_.a.createElement("div",{className:"d-flex align-items-stretch w-100 position-relative"},!P&&_.a.createElement(V.E,{key:null==et?void 0:et.uid,className:z()((!(null==et?void 0:et.uid)||ut)&&"invisible"),isPreview:!Ze,ref:this.comprehensionGuidesRef,videoData:et,rootReviewContext:null==et?void 0:et.rootContext,isComposingVideo:tt,videoType:null==et?void 0:et.videoType,accessGrantType:null==et?void 0:et.accessGrantType,videoStatus:null==et?void 0:null===(m=et.cognitiveVideo)||void 0===m?void 0:m.status,chapters:(null==et?void 0:et.chapters)||[],videoId:null==et?void 0:et.uid,isSearchingVideo:we,isOpenCourseVideoList:Ee,onPreviewItemActivate:function(e,t,n,r){return(!k.r.isPlayer()||k.r.paused())&&w.activateHoveredCognitiveVideo(e,t,n,r)},videoOwnerId:Object(E.get)(et,"cognitiveVideo.owner"),isPublicProcess:rt,videoScaffId:(null==et?void 0:et.ownerScaffId)||(null==et?void 0:et.userScaffId),commentsLikesEnabledOnPublic:null==et?void 0:et.commentsLikesEnabledOnPublic}),ut&&_.a.createElement("div",{className:z()(De.a.subVideoList,"border-top")},_.a.createElement(V.Zb,{ref:this.subVideoListRef,videoId:null==et?void 0:et.uid,courseId:lt?null==et?void 0:null===(g=et.cognitiveVideo)||void 0===g?void 0:null===(v=g.course)||void 0===v?void 0:v.uid:null==et?void 0:null===(b=et.cognitiveVideo)||void 0===b?void 0:null===(y=b.primCourse)||void 0===y?void 0:y.uid,childCount:null==et?void 0:null===(A=et.cognitiveVideo)||void 0===A?void 0:A.childCount,isCourseMaster:lt,isPrCourseMaster:ct,onMouseEnterSubItem:this.handleCGMouseEnter,onMouseLeaveSubItem:this.handleCGMouseLeave}))))},_.a.createElement(_.a.Suspense,{fallback:_.a.createElement("div",{className:"d-none position-absolute"})},se&&_.a.createElement(V.n,null)),q&&_.a.createElement(V.wb,null),q&&_.a.createElement(V.vb,null),Q&&_.a.createElement(V.Sb,null),Y.show&&_.a.createElement(V.O,Y),J.show&&_.a.createElement(V.Rb,L()({},J,{onClose:this.closeSetPriceForm})),Z.show&&_.a.createElement(V.Fb,L()({},Z,{onClose:this.closePublishVideoForm})),ee.show&&_.a.createElement(V.Mb,L()({},ee,{onClose:this.closeSaveVideoForm})),te.show&&_.a.createElement(V.V,L()({},te,{onClose:this.closeExportVideoForm})),ne.show&&_.a.createElement(V.nb,L()({},ne,{header:t("modal.fuviFeedback"),onConfirm:this.closeFeedbackModal,onClose:this.closeFeedbackModal})),K&&_.a.createElement(V.d,{onShow:function(){return w.toggleDisplayAddFilesToGalleryForm(!0)},onClose:function(){return w.toggleDisplayAddFilesToGalleryForm(!1)}}),$&&_.a.createElement(V.W,null),ae&&_.a.createElement(V.G,ae),oe&&_.a.createElement(V.w,oe),_.a.createElement(V.uc,null),ue&&_.a.createElement(V.t,null),de&&_.a.createElement(V.r,null),he&&_.a.createElement(V.s,null),_.a.createElement("div",{id:k.g.ID_VIDEO_PLAY_BUTTON_AREA,className:z()("invisible d-none"),onClick:function(){w.handleVideoPlayClick(et)}})),_.a.createElement(V.Bb,null))}}]),r}(A.Component);function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){y()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}k.g.COGVID_STATUS;var Je=k.g.SEARCH_PARAM,Ze=(k.g.CANVAS_DRAWING_TYPE,k.g.ANIMATION_DURATION,k.g.VIDEO_SEARCH_SCOPE),et=k.g.CHAPTER_TYPES,tt=(k.g.VIDEO_CATEGORY,function(e){f()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=v()(e);if(t()){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}(n);function n(){var e;c()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),y()(d()(e),"htmlElem",document.documentElement),y()(d()(e),"videoPlayerArea",Object(A.createRef)()),y()(d()(e),"firstAreaWrapRef",Object(A.createRef)()),y()(d()(e),"cognitiveVideoListRef",Object(A.createRef)()),y()(d()(e),"cognitiveVideoListScrollRef",Object(A.createRef)()),y()(d()(e),"comprehensionGuidesRef",Object(A.createRef)()),y()(d()(e),"chapterCoverImagesRef",Object(A.createRef)()),y()(d()(e),"subVideoListRef",Object(A.createRef)()),y()(d()(e),"refChapterCoverImages",Object(A.createRef)()),y()(d()(e),"refSemanticBlocksView",Object(A.createRef)()),y()(d()(e),"isScrollingToVideo",!1),y()(d()(e),"mouseOverCogvidList",!1),y()(d()(e),"cogvidItemHeightInPx",k.c.getCogvidItemHeight()),y()(d()(e),"state",{isOpenMyMediaList:!1,videoWidth:"100%",paddingBottom:null,isMouseOverSBContainer:!1,firstAreaSize:{width:"100%",height:"100%"},openEditCogvidForm:!1,isSearchingVideo:!1,isOpenCourseVideoList:!1,isActivatingHoveredItem:!1,isMouseOverVideoList:!1,isMouseOverCG:!1}),y()(d()(e),"handleKeyDown",(function(t){var n=e.props,r=n.openCreateCogvidForm,i=n.oldOpenCreateCogvidForm,a=n.openAddFilesToGalleryForm;if(13!==t.keyCode||!e.mouseOverCogvidList||r||i||a){if(37===t.keyCode||39===t.keyCode){var o=!window.isArrowKeyDown;window.isArrowKeyDown=!0,o&&e.forceUpdate()}Object(k.n)(t)}else e.activateHoveredCognitiveVideo()})),y()(d()(e),"handleKeyUp",(function(e){window.isArrowKeyDown=!1,Object(k.o)(e)})),y()(d()(e),"handleFullscreen",(function(){T.a.enabled&&(window.isFullscreenMode||(window.isFullscreenMode=!0,window.leftBarScrollTop=Object(E.get)(e.cognitiveVideoListScrollRef,"current.scrollRef.scrollTop",0)),T.a.toggle())})),y()(d()(e),"componentDidMount",(function(){var t=e.props,n=t.fullscreenMode,r=t.noNewSharedVideo,i=t.resetNoNewSharedVideo,a=t.resetNoNewSharedMessageVideos,o=t.noNewSharedMessageVideos;e.calculaterResponsive(),document.addEventListener("keydown",e.handleKeyDown),document.addEventListener("keyup",e.handleKeyUp),window.addEventListener("resize",e.calculaterResponsive),window.addEventListener("storage",e.handleLocalStorageChange),T.a.onchange=function(){n(),e.calculateFirstAreaOnFullscreenMode(),e.calculaterResponsive()},T.a.onenter=function(){Object(E.invoke)(e.cognitiveVideoListRef,"current.handleOnEnterFullscreen")},T.a.onexit=function(){Object(E.invoke)(e.cognitiveVideoListRef,"current.handleOnExitFullscreen"),window.isFullscreenMode=!1};var s=k.c.getCurrentVideoCategory();s===k.g.VIDEO_CATEGORY.BRAINHIVE&&r>0&&i(),s===k.g.VIDEO_CATEGORY.MESSAGES&&o>0&&a(),e.unlistenHistory=x.a.listen((function(t){return e.handleURLChange(t)}))})),y()(d()(e),"handleURLChange",(function(){var t=k.c.getDataFromUrl(),n=t.searchTerm,r=void 0===n?"":n,i=t.courseId,a=!!r;a!==e.state.isSearchingVideo&&e.setState({isSearchingVideo:a});var o=!!i;o!==e.state.isOpenCourseVideoList&&e.setState({isOpenCourseVideoList:o})})),y()(d()(e),"activeVideoFromUrl",(function(t,n,r){var i=k.c.getDataFromUrl(t),a=i.videoId,o=i.chapterId,s=i.attachmentId,l=i.chapterAttachmentId,c=i.timestamp,u=i.action;void 0===a?e.updateVideoPreviewData():(e.setState({isLayerVideo:!1}),e.activeVideo(t,{videoId:a,chapterId:o,attachmentId:s,chapterAttachmentId:l,videoList:n,timestamp:c,isInitial:r,action:u}))})),y()(d()(e),"activeVideo",(function(t,n){var r,i=n.videoId,a=n.attachmentId,o=n.chapterAttachmentId,s=(n.timestamp,n.reActiveVideo),l=(n.isInitial,n.action),c=e.props,u=c.displayVideoAttachments,d=c.updateReviewAttachment,h=c.displayComments,f=c.displayNotes,p=(c.displayCoverImage,c.displayProductsLayer),m=n.videoList||(null===(r=k.c.getRenderList())||void 0===r?void 0:r.videoList);u({}),d({attachmentId:""}),h(null),f(null);var g=Object(E.find)(m,(function(e){return e.uid===i}));if(g){e.activeCogvidItem({videoData:g,reActiveVideo:s},(function(){if(a){var n=e.props,r=n.getVideoAttachments,s=n.getVideoChaptersAttachments;(o?s:r)({videoId:i,chapterAttachmentId:o},(function(){var n=e.getAttachmentList(i,o).find((function(e){return e.contentId===a}));e.activeAttachmentFromLocation(t,$e($e({},n),{},{videoTitle:g.cognitiveVideo.title}),a,i,o),e.activeCommentFromLocation(t)}))}else l===Je.VALUE.ACTION.OPEN_RESOURCE?setTimeout((function(){p({videoId:i,title:g.cognitiveVideo.title,author:g.cognitiveVideo.author,subject:g.cognitiveVideo.subject,topic:g.cognitiveVideo.topic,videoOwnerId:g.cognitiveVideo.owner})}),500):(e.activeAttachmentFromLocation(t),e.activeCommentFromLocation(t),e.activeNoteFromLocation(t))}));var v=k.c.getDataFromUrl(t).chapterId;e.scrollToVideo({uid:i,chapterLinked:{uid:v}},!1,!0,void 0,void 0,m)}else e.setState({isActivatingHoveredItem:!1}),e.updateVideoPreviewData()})),y()(d()(e),"getAttachmentList",(function(e,t){var n=Object(E.get)(S.a.getState(),"cogvid"),r=n.videoAttachments,i=void 0===r?{}:r,a=n.chapterAttachments;return(t?Object(E.get)(a,[e,t],[]):i[e])||[]})),y()(d()(e),"activeAttachmentFromLocation",(function(t,n,r,i){var a=e.props,o=a.chapters,s=void 0===o?[]:o,l=a.displayVideoAttachments,c=a.updateReviewAttachment,u=k.c.getDataFromUrl(t).videoId,d=n||Object(E.get)(t,"state.attachment");if(d&&(d.videoId===u||i===d.videoId)){k.r.pause();var h=d.videoId,f=d.chapterId,p=d.attachmentId,m=d.title,g=d.attachmentTitle,v=d.mediaType,b=d.url,y=d.videoScaffId,A=d.videoTitle,_=d.thumbnailUrl,w=d.freeDownload,S=Object(E.find)(s,{uid:f});l({videoId:h,chapterId:f,videoScaffId:y,title:(S?S.content:null)||A,editable:!0,isOwner:!1,permissions:(null==S?void 0:S.permissions)||[],attachmentId:r||p}),(p||r)&&c({url:b,fileName:g||m,fileType:v,attachmentId:r||p,videoId:h,chapterId:f,thumbnailUrl:_,freeDownload:w}),x.a.replace($e($e({},x.a.location),{},{state:{noAction:!0}}))}})),y()(d()(e),"activeCommentFromLocation",(function(t){var n=e.props,r=n.chapters,i=void 0===r?[]:r,a=n.displayComments,o=k.c.getDataFromUrl(t).videoId,s=Object(E.get)(t,"state.comment");if(s&&s.videoId===o){k.r.pause();var l=s.videoId,c=s.chapterId,u=s.videoScaffId,d=s.chapterTitle,h=Object(E.find)(i,{uid:c});a({videoId:l,chapterId:c,videoScaffId:u,title:d,permissions:(null==h?void 0:h.permissions)||[]}),x.a.replace($e($e({},x.a.location),{},{state:{noAction:!0}}))}})),y()(d()(e),"activeNoteFromLocation",(function(t){var n=e.props,r=n.chapters,i=void 0===r?[]:r,a=n.displayNotes,o=k.c.getDataFromUrl(t).videoId,s=Object(E.get)(t,"state.note");if(s&&s.videoId===o){k.r.pause();var l=s.videoId,c=s.chapterId,u=s.chapterTitle,d=Object(E.find)(i,{uid:c});a({videoId:l,chapterId:c,title:u,permissions:(null==d?void 0:d.permissions)||[]}),x.a.replace($e($e({},x.a.location),{},{state:{noAction:!0}}))}})),y()(d()(e),"handleLocalStorageChange",s()(a.a.mark((function t(){var n,r,i,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props,r=n.userInfo,i=n.initializeApp,o=n.logout,t.next=3,k.c.getToken();case 3:!(s=t.sent)&&r.userId&&o(),s&&!r.userId&&i();case 6:case"end":return t.stop()}}),t)})))),y()(d()(e),"componentWillUnmount",(function(){e.props.resetCogvidReducer(),document.removeEventListener("keydown",e.handleKeyDown),document.removeEventListener("keyup",e.handleKeyUp),window.removeEventListener("resize",e.calculaterResponsive),window.removeEventListener("storage",e.handleLocalStorageChange),e.unlistenHistory&&e.unlistenHistory()})),y()(d()(e),"componentDidUpdate",(function(t){var n,r,i,a,o=t.cogvidListLv,s=void 0===o?{}:o,l=t.showRequirePurchaseModal,c=t.showHighlightEditModal,u=t.isPopupOpen,d=0===(null===(n=k.c.getRenderList())||void 0===n?void 0:null===(r=n.videoList)||void 0===r?void 0:r.length),h=0===(null===(i=k.c.getRenderList(s))||void 0===i?void 0:null===(a=i.videoList)||void 0===a?void 0:a.length),f=e.props,p=f.showRequirePurchaseModal,m=f.showHighlightEditModal,g=f.isPopupOpen;d!==h&&d&&e.props.updateSelectedVideo({idx:-1,data:{}}),(!l&&p||c!==m||u&&!g)&&e.setState({isMouseOverCG:!1,isMouseOverVideoList:!1,isMouseOverSBContainer:!1})})),y()(d()(e),"calculateFirstAreaOnFullscreenMode",(function(){var t=e.props.isFullscreenMode,n=(k.c.convertRemToPx(D.topBarHeight),k.c.convertRemToPx(D.heightPlayback),document.querySelector("#hubspot-messages-iframe-container")),r=null==n?void 0:n.classList.contains("d-none");if(t){n&&!r&&n.classList.add("d-none");var i=Object(E.get)(e.firstAreaWrapRef,"current.offsetWidth"),a=Object(E.get)(e.firstAreaWrapRef,"current.offsetHeight");.5625*i>=a?e.setState({videoWidth:1.77*a,paddingBottom:a}):e.setState({videoWidth:"100%",paddingBottom:"".concat(56.25,"%")})}else n&&r&&n.classList.remove("d-none"),e.setState({videoWidth:"100%",paddingBottom:"".concat(56.25,"%")})})),y()(d()(e),"calculaterResponsive",(function(){document.body.style.height=window.innerHeight+"px",Object(E.invoke)(e.cognitiveVideoListRef,"current.updateScrollbarDirection");var t=k.c.convertRemToPx(D.heightChapterSlider),n=Object(E.get)(e.firstAreaWrapRef,"current.offsetWidth")-26,r=Object(E.get)(e.firstAreaWrapRef,"current.offsetHeight")-t;n/r>=16/9?e.setState({firstAreaSize:{width:r*(16/9),height:"calc(100% - ".concat(t,"px)")}}):e.setState({firstAreaSize:{width:"calc(100% - ".concat(26,"px)"),height:.5625*n}}),e.calculateFirstAreaOnFullscreenMode(),e.cogvidItemHeightInPx=k.c.getCogvidItemHeight()})),y()(d()(e),"scrollToVideo",(function(t,n,r,i,a,o,s){var l;e.cognitiveVideoListScrollRef.current.scrollRef.setMomentum(0,0);var c=$e({},t||e.props.selectedVideo),u=o||(null===(l=k.c.getRenderList())||void 0===l?void 0:l.videoList),d=(o||u).findIndex((function(e){return e.uid===c.uid})),h=u.findIndex((function(e){return e.uid===c.uid})),f=(c.semantics,c.rootContext,c.uid),p=(c.videoLength,c.cognitiveVideo),m=((p=void 0===p?{}:p).version,c.chapterLinked),g=(m=void 0===m?{}:m).uid,v=c.actionData||{},b=v.attachment,y=v.comment,A=v.note,_=v.action;if(-1!==d){e.cogvidItemHeightInPx=k.c.getCogvidItemHeight();var w=-1==h?e.cognitiveVideoListScrollRef.current.scrollRef.scrollTop:e.cogvidItemHeightInPx*h,S=e.props,C=S.videoId,T=(S.updateSb,S.setUpdateVideoTime),O=S.showVideoOverlay,M=C===f;if(r){var P;k.c.getDataFromUrl().ts;if(!M||s)if(O(""),T({setTimeFrom:"",currentTime:0,remainingTime:0,duration:0,lockedUpdateVideoTime:!0}),M)Object(E.invoke)(window,"player.currentTime",0),null===(P=window.videojs)||void 0===P||P.play()}e.isScrollingToVideo=!0,n?e.cognitiveVideoListScrollRef.current.setScrollPosition(w,(function(){if(e.isScrollingToVideo=!1,r&&(!M||s)){var t=!!b||!!y||!!A,n=k.c.addURLSearchParams([[Je.KEY.VIDEO_ID,f],[Je.KEY.CHAPTER_ID,g],[Je.KEY.ATTACHMENT_ID,null==b?void 0:b.attachmentId],[Je.KEY.CHAPTER_ATTACHMENT_ID,null==b?void 0:b.chapterId],[Je.KEY.ACTION,_],[Je.KEY.TIMESTAMP,i],[Je.KEY.BLOCK_OFFSET,a],[Je.KEY.STOP_AUTOPLAY,t],["ts",s?I()().valueOf():""]],null,!0,{attachment:b});x.a.push(n,{attachment:b,comment:y,note:A})}})):(e.cognitiveVideoListScrollRef.current.scrollRef.scrollTop=w,e.isScrollingToVideo=!1)}})),y()(d()(e),"activateScrollingCogvidItem",(function(t,n){var r,i=e.props,a=(i.videoId,i.hasActiveChapter,i.displayComments,i.displayNotes,i.displayProductsLayer),o=i.showProductsLayer,s=i.updateChapterImageSlider,l=i.updateSelectedVideo,c=e.state,u=c.isActivatingHoveredItem;if(c.isMouseOverCG&&Object(E.invoke)(e.subVideoListRef,"current.handleItemMouseLeave",null),s({chapterId:""}),!u){var d=(null===(r=k.c.getRenderList())||void 0===r?void 0:r.videoList).findIndex((function(e){return e.uid===t.uid}));o&&o.videoId!==(null==t?void 0:t.uid)&&(a(null),k.c.changeURLWithoutSideEffect([[Je.KEY.ACTION]])),l({idx:d,data:n||!(null==t?void 0:t.uid)?null:$e({},t)})}})),y()(d()(e),"activeCogvidItem",Object(E.debounce)((function(t,n){var r=t.videoData,i=e.props,a=i.getCogvidDetails,o=i.setTypeEditting,s=i.updateCogvidDetails,l=i.galleryVideoData,c=(l=void 0===l?{}:l).uid,u=r||{},d=u.cognitiveVideo,h=(d=void 0===d?{}:d).owner,f=void 0===h?"":h,p=d.uid,m=void 0===p?"":p,g=u.uid,v=k.c.getCurrentVideoCategory(),b=Ze[v.toUpperCase()];e.t1=(new Date).getTime(),s($e({videoId:g,ownerId:f},r));var y=[k.g.VIDEO_CATEGORY.EXPERIENCING,k.g.VIDEO_CATEGORY.LEARNING,k.g.VIDEO_CATEGORY.COMPOSING,k.g.VIDEO_CATEGORY.HOME,k.g.VIDEO_CATEGORY.BRAINHIVE].includes(v)&&c!==m;a({videoData:$e({},r),canFetchRawVideos:y,scope:b},(function(){o(""),window.globalTypeEditting="",n&&n(),e.setState({isActivatingHoveredItem:!1})}))}),300)),y()(d()(e),"getCurrentHoveredVideo",(function(t){var n,r,i,a=t||(null===(n=k.c.getRenderList())||void 0===n?void 0:n.videoList);if(0===(null===(r=k.c.getRenderList())||void 0===r?void 0:null===(i=r.videoList)||void 0===i?void 0:i.length)||Object(E.isEmpty)(a))return null;e.cogvidItemHeightInPx=k.c.getCogvidItemHeight();var o=k.c.getIndicatorVideoIndex(e.cognitiveVideoListScrollRef,e.cogvidItemHeightInPx);return-1!==o&&a[o]?a[o]:null})),y()(d()(e),"activateHoveredCognitiveVideo",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=e.props,s=o.isPopupOpen,l=o.videoId,c=o.chapterHighlightingType;o.showProductsLayer;if(!s){var u=i||e.getCurrentHoveredVideo(),d=e.getCurrentHoveredVideo(),h=l===(null==i?void 0:i.uid)&&l!==(null==d?void 0:d.uid);if(h)e.activeVideo(location,{videoId:l,reActiveVideo:h});else{k.c.getCurrentVideoCategory();h||u&&(null==u?void 0:u.uid)!==l?(e.setState({isActivatingHoveredItem:!0}),e.scrollToVideo($e($e({},u),{},{chapterLinked:t,actionData:n}),!0,!0,r,null,a,h)):c===et.EPISODIC.key&&l!==(null==i?void 0:i.uid)&&k.c.checkCanPlayVideo()&&Object(k.p)({willPlay:!0})}}})),y()(d()(e),"toggleDisplayCreateCogvidForm",(function(t){(0,e.props.toggleCreateCogvidForm)(t)})),y()(d()(e),"toggleDisplayAddFilesToGalleryForm",(function(t){(0,e.props.toggleAddFilesToGalleryForm)(t)})),y()(d()(e),"updateVideoPreviewData",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.videoId,r=t.data,i=void 0===r?{}:r,a=t.fromVideoSearch,o=void 0!==a&&a,s=t.hideVideoDescription,l=void 0===s||s,c=e.props.selectedVideo,u=i;if(!o||(null==c?void 0:c.uid)!==u.uid)if(l&&e.props.displayVideoDescription(!1),Object(E.isEmpty)(u));else{if(u.semantics||(u.semantics=[]),u.chapters||(u.chapters=[]),u.thumbnailUrl||(u.thumbnailUrl=""),(null==c?void 0:c.uid)!==n&&!o)return;e.props.updateSelectedVideo({data:$e($e({},c),u)})}})),y()(d()(e),"closeSetPriceForm",(function(){(0,e.props.updateSetPriceModal)($e({},P.h))})),y()(d()(e),"closePublishVideoForm",(function(){(0,e.props.updatePublishVideoModal)($e({},P.f))})),y()(d()(e),"closeSaveVideoForm",(function(){(0,e.props.updateSaveToMyVideoModal)($e({},P.g))})),y()(d()(e),"closeExportVideoForm",(function(){(0,e.props.updateExportVideoModal)($e({},P.d))})),y()(d()(e),"closeFeedbackModal",(function(){(0,e.props.updateFeedbackModal)($e({},P.e))})),y()(d()(e),"handleCloseCourseClick",(function(t){(0,e.props.displayVideoAttachments)({}),Object(E.invoke)(e.cognitiveVideoListRef,"current.handleCloseCourseClick",t)})),y()(d()(e),"handleChangeCommentsEnabled",(function(t,n){var r=e.props.selectedVideo;Object(E.isEmpty)(r)||r.uid!==n||e.props.updateSelectedVideo({data:$e($e({},r),{},{commentsLikesEnabledOnPublic:t})})})),y()(d()(e),"handleActivateChapterById",(function(t){var n=e.props.chapters,r=void 0===n?[]:n,i=Object(E.find)(r,{uid:t});i&&Object(E.invoke)(e.comprehensionGuidesRef,"current.handleItemClick",i)})),y()(d()(e),"handleCGMouseEnter",(function(t){e.setState({isMouseOverCG:!0})})),y()(d()(e),"handleCGMouseLeave",(function(t){e.setState({isMouseOverCG:!1})})),y()(d()(e),"handleVideoPlayerClick",(function(e){Object(k.p)(e)})),y()(d()(e),"handleCBMouseEnter",(function(){})),y()(d()(e),"handleSBMouseEnter",(function(){})),y()(d()(e),"handleCBClick",(function(){window.isScrollingVideo&&e.cognitiveVideoListRef&&Object(E.invoke)(e.cognitiveVideoListRef,"current.handleItemThumbnailClick")})),y()(d()(e),"handleVideoPlayClick",(function(t){var n,r=e.props.displaySlide;if(t.uid){var i;if(!k.c.isExploring())return r(0),void((null===(i=t.chapters[0])||void 0===i?void 0:i.type)===et.EPISODIC.key&&k.r.play());var a=Object(E.find)(t.chapters,(function(e){return(k.c.checkSubscribedOffer(k.g.SUB_OFFER.VIEW_VIDEOS)||k.c.checkChapterAccessible(e.seqNumber))&&e.type===et.EPISODIC.key}));a||(a=Object(E.find)(t.chapters,(function(e){return k.c.checkSubscribedOffer(k.g.SUB_OFFER.VIEW_VIDEOS)||k.c.checkChapterAccessible(e.seqNumber)}))),a||(a=t.chapters[0]),r(a.seqNumber),(k.c.checkSubscribedOffer(k.g.SUB_OFFER.VIEW_VIDEOS)||k.c.checkChapterAccessible(a.seqNumber))&&(null===(n=a)||void 0===n?void 0:n.type)===et.EPISODIC.key&&k.r.play(a.startTime/1e3)}})),e}return n}(Xe));n.b=Object(w.b)((function(e){var t,n,r,i,a,o,s,l=e.canvas,c=e.auth,u=e.cogvid,d=e.common,h=e.notification,f=(e.playerStatus,e.cart),p=e.cg;return{isLoadingCogvidList:u.cogvidListLv.isLoading||u.cogvidListLv.isLoadingMore,currentActiveLv:u.cogvidListLv.currentActiveLv,cogvidListLv:u.cogvidListLv,selectedVideo:u.selectedVideo.data,userInfo:c.userInfo,userId:c.userInfo.userId,isFullscreenMode:d.isFullscreenMode,openCreateCogvidForm:u.openCreateCogvidForm,createMeetingForm:u.createMeetingForm,openAddFilesToGalleryForm:u.openAddFilesToGalleryForm,oldOpenCreateCogvidForm:u.oldOpenCreateCogvidForm,isPaused:u.videoTime.isPaused,showChapterAttachments:u.showChapterAttachments,hasActiveChapter:!!(null===(t=u.chapterHighlighting)||void 0===t?void 0:t.uid),chapterHighlightingType:null===(n=u.chapterHighlighting)||void 0===n?void 0:n.type,miniCoverImage:u.miniCoverImage,galleryVideoData:u.galleryVideoData,isFetchingGalleryVideo:u.isFetchingGalleryVideo,videoId:u.cogvidDetails.videoId,currentActiveVideoType:u.cogvidDetails.videoType,chapters:u.cogvidDetails.chapters,activeVideoStatus:null===(r=u.cogvidDetails.cognitiveVideo)||void 0===r?void 0:r.status,lastReviewStatus:u.cogvidDetails.lastReviewStatus,showVideoAttachments:u.showVideoAttachments,showAttachmentReview:!!u.attachmentReview.attachmentId,isToolbarShown:l.isToolbarShown,isPopupOpen:d.isPopupOpen,isVideoPlayingChapterMode:u.isVideoPlayingChapterMode,isUpdatingCG:u.isUpdatingCG,isOpenUserProfileModal:c.isOpenUserProfileModal,isUpdatingProfile:c.isUpdatingProfile,noNewSharedVideo:h.noNewSharedVideo,noNewSharedMessageVideos:h.noNewSharedMessageVideos,isShowShareVideoModal:u.shareVideoChapterModal.show,isShowExtractChaptersModal:u.extractChaptersModal.show,editVideoModal:u.editVideoModal,setPriceModal:u.setPriceModal,publishVideoModal:u.publishVideoModal,saveToMyVideosModal:u.saveToMyVideosModal,exportVideoModal:u.exportVideoModal,feedbackModal:u.feedbackModal,sharedPeopleData:u.sharedPeopleData,isShowingAttachmentPreview:!!u.showPreviewAttachments.videoId,showRequirePurchaseModal:u.showRequirePurchaseModal,showVideoDescription:u.showVideoDescription,showHighlightEditModal:!!(null===(i=u.highlightEditInfo)||void 0===i?void 0:i.endTime),showCopyChaptersModal:u.showCopyChaptersModal,showSwapChaptersModal:u.showSwapChaptersModal,showCartModal:f.isOpen,showProductsLayer:u.showProductsLayer,showChapterCoverImage:p.showChapterCoverImage,showSlideType:p.showSlideType,showLock:p.showLock,showChapterFileUploadModal:!!(null===(a=p.showChapterFileUploadModal)||void 0===a?void 0:a.videoId),showChapterFileDeleteModal:!!(null===(o=p.showChapterFileDeleteModal)||void 0===o?void 0:o.videoId),showChapterFileManagerModal:!!(null===(s=p.showChapterFileManagerModal)||void 0===s?void 0:s.videoId)}}),(function(e){return{getCogvidDetails:function(t,n){return e(M.e.getCogvidDetails(t,n))},setUpdateVideoTime:function(t){return e(M.e.setUpdateVideoTime(t))},resetVideoTime:function(){return e(M.e.resetVideoTime())},setTypeEditting:function(t){return e(M.f.setTypeEditting(t))},updateCogvidDetails:function(t){return e(M.e.updateCogvidDetails(t))},updateSb:function(t){return e(M.e.updateSb(t))},showVideoOverlay:function(t){return e(M.e.showVideoOverlay(t))},toggleCreateCogvidForm:function(t){return e(M.e.toggleCreateCogvidForm(t))},toggleAddFilesToGalleryForm:function(t){return e(M.e.toggleAddFilesToGalleryForm(t))},resetCogvidReducer:function(){return e(M.e.resetReducer())},fullscreenMode:function(){return e(M.f.fullscreenMode())},setActiveChapter:function(t){return e(M.e.setActiveChapter(t))},resetNoNewSharedVideo:function(){return e(M.h.resetNoNewSharedVideo())},resetNoNewSharedMessageVideos:function(){return e(M.h.resetNoNewSharedMessageVideos())},displayVideoAttachments:function(t){return e(M.e.displayVideoAttachments(t))},updateReviewAttachment:function(t,n,r){return e(M.e.updateReviewAttachment(t,n,r))},displayComments:function(t){return e(M.d.displayComments(t))},displayNotes:function(t){return e(M.d.displayNotes(t))},getVideoAttachments:function(t,n,r){return e(M.e.getVideoAttachments(t,n,r))},getVideoChaptersAttachments:function(t,n,r){return e(M.e.getVideoChaptersAttachments(t,n,r))},fetchTrackingState:function(t,n,r){return e(M.f.fetchTrackingState(t,n,r))},updateEditVideoModal:function(t,n){return e(M.e.updateEditVideoModal(t,n))},updateSetPriceModal:function(t,n){return e(M.e.updateSetPriceModal(t,n))},updatePublishVideoModal:function(t,n){return e(M.e.updatePublishVideoModal(t,n))},updateSaveToMyVideoModal:function(t,n){return e(M.e.updateSaveToMyVideoModal(t,n))},updateExportVideoModal:function(t,n){return e(M.e.updateExportVideoModal(t,n))},updateFeedbackModal:function(t,n){return e(M.e.updateFeedbackModal(t,n))},updateCanvasProperties:function(t){return e(M.b.updateCanvasProperties(t))},displayCoverImage:function(t){return e(M.e.displayCoverImage(t))},displayRequirePurchaseModal:function(t){return e(M.e.displayRequirePurchaseModal(t))},displayVideoDescription:function(t){return e(M.e.displayVideoDescription(t))},getVideoDescription:function(t,n,r){return e(M.e.getVideoDescription(t,n,r))},initializeApp:function(){return e(M.f.initializeApp())},logout:function(){return e(M.a.authLogOut())},displayProductsLayer:function(t,n,r){return e(M.e.displayProductsLayer(t,n,r))},updateChapterImageSlider:function(t){return e(M.d.updateChapterImageSlider(t))},displayChapterCoverImage:function(t){return e(M.d.displayChapterCoverImage(t))},displaySlide:function(t){return e(M.d.displaySlide(t))},updateSelectedVideo:function(t){return e(M.e.updateSelectedVideo(t))}}}))(tt)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return l}));var r=n(0),i=n.n(r);const a=Object(r.createContext)(null);function o({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:o,children:s}){const l=function(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:i}=e,[a,o]=Object(r.useState)(!1),s=Object(r.useRef)(n);s.current=n;const l=Object(r.useRef)(i);return l.current=i,Object(r.useEffect)(()=>{const e=document.createElement("script");return e.src="https://accounts.google.com/gsi/client",e.async=!0,e.defer=!0,e.nonce=t,e.onload=()=>{var e;o(!0),null===(e=s.current)||void 0===e||e.call(s)},e.onerror=()=>{var e;o(!1),null===(e=l.current)||void 0===e||e.call(l)},document.body.appendChild(e),()=>{document.body.removeChild(e)}},[t]),a}({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:o}),c=Object(r.useMemo)(()=>({clientId:e,scriptLoadedSuccessfully:l}),[e,l]);return i.a.createElement(a.Provider,{value:c},s)}function s(){const e=Object(r.useContext)(a);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function l({flow:e="implicit",scope:t="",onSuccess:n,onError:i,onNonOAuthError:a,overrideScope:o,state:l,...c}){const{clientId:u,scriptLoadedSuccessfully:d}=s(),h=Object(r.useRef)(),f=Object(r.useRef)(n);f.current=n;const p=Object(r.useRef)(i);p.current=i;const m=Object(r.useRef)(a);m.current=a,Object(r.useEffect)(()=>{var n,r;if(!d)return;const i="implicit"===e?"initTokenClient":"initCodeClient",a=null===(r=null===(n=null===window||void 0===window?void 0:window.google)||void 0===n?void 0:n.accounts)||void 0===r?void 0:r.oauth2[i]({client_id:u,scope:o?t:`openid profile email ${t}`,callback:e=>{var t,n;if(e.error)return null===(t=p.current)||void 0===t?void 0:t.call(p,e);null===(n=f.current)||void 0===n||n.call(f,e)},error_callback:e=>{var t;null===(t=m.current)||void 0===t||t.call(m,e)},state:l,...c});h.current=a},[u,d,e,t,l]);const g=Object(r.useCallback)(e=>{var t;return null===(t=h.current)||void 0===t?void 0:t.requestAccessToken(e)},[]),v=Object(r.useCallback)(()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.requestCode()},[]);return"implicit"===e?g:v}},function(e,t,n){!function(e,t){"use strict";function n(e){return(n="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)}function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(){}function o(){}t=t&&t.hasOwnProperty("default")?t.default:t,o.resetWarningCache=a;var s=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,i,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}()})),l=function(e){return null!==e&&"object"===n(e)},c=function e(t,n){if(!l(t)||!l(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var i="[object Object]"===Object.prototype.toString.call(t);if(i!==("[object Object]"===Object.prototype.toString.call(n)))return!1;if(!i&&!r)return!1;var a=Object.keys(t),o=Object.keys(n);if(a.length!==o.length)return!1;for(var s={},c=0;c<a.length;c+=1)s[a[c]]=!0;for(var u=0;u<o.length;u+=1)s[o[u]]=!0;var d=Object.keys(s);if(d.length!==a.length)return!1;var h=t,f=n;return d.every((function(t){return e(h[t],f[t])}))},u=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},d=function(e){if(null===e||l(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},h=function(e){if(function(e){return l(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(d)};var t=d(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},f=t.createContext(null);f.displayName="ElementsContext";var p=function(e){var n=e.stripe,r=e.options,a=e.children,o=t.useRef(!1),s=t.useRef(!0),l=t.useMemo((function(){return h(n)}),[n]),d=i(t.useState((function(){return{stripe:null,elements:null}})),2),p=d[0],m=d[1],g=u(n),v=u(r);return null!==g&&(g!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it."),c(r,v)||console.warn("Unsupported prop change on Elements: You cannot change the `options` prop after setting the `stripe` prop.")),o.current||("sync"===l.tag&&(o.current=!0,m({stripe:l.stripe,elements:l.stripe.elements(r)})),"async"===l.tag&&(o.current=!0,l.stripePromise.then((function(e){e&&s.current&&m({stripe:e,elements:e.elements(r)})})))),t.useEffect((function(){return function(){s.current=!1}}),[]),t.useEffect((function(){var e=p.stripe;e&&e._registerWrapper&&e._registerWrapper({name:"react-stripe-js",version:"1.1.2"})}),[p.stripe]),t.createElement(f.Provider,{value:p},a)};p.propTypes={stripe:s.any,options:s.object};var m=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(f),e)},g=function(e){return(0,e.children)(m("mounts <ElementsConsumer>"))};g.propTypes={children:s.func.isRequired};var v=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),function(){n.current&&n.current.apply(n,arguments)}},b=function(e){return l(e)?(e.paymentRequest,r(e,["paymentRequest"])):{}},y=function(){},A=function(e,n){var r,i="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),a=n?function(e){m("mounts <".concat(i,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r=n.id,a=n.className,o=n.options,s=void 0===o?{}:o,l=n.onBlur,u=void 0===l?y:l,d=n.onFocus,h=void 0===d?y:d,f=n.onReady,p=void 0===f?y:f,g=n.onChange,A=void 0===g?y:g,_=n.onEscape,w=void 0===_?y:_,E=n.onClick,S=void 0===E?y:E,C=m("mounts <".concat(i,">")).elements,T=t.useRef(null),k=t.useRef(null),x=v(p),O=v(u),I=v(h),M=v(S),P=v(A),D=v(w);t.useLayoutEffect((function(){if(null==T.current&&C&&null!=k.current){var t=C.create(e,s);T.current=t,t.mount(k.current),t.on("ready",(function(){return x(t)})),t.on("change",P),t.on("blur",O),t.on("focus",I),t.on("escape",D),t.on("click",M)}}));var N=t.useRef(s);return t.useEffect((function(){N.current&&N.current.paymentRequest!==s.paymentRequest&&console.warn("Unsupported prop change: options.paymentRequest is not a customizable property.");var e=b(s);0===Object.keys(e).length||c(e,b(N.current))||T.current&&(T.current.update(e),N.current=s)}),[s]),t.useEffect((function(){return function(){T.current&&T.current.destroy()}}),[]),t.createElement("div",{id:r,className:a,ref:k})};return a.propTypes={id:s.string,className:s.string,onChange:s.func,onBlur:s.func,onFocus:s.func,onReady:s.func,onClick:s.func,options:s.object},a.displayName=i,a.__elementType=e,a},_="undefined"==typeof window,w=A("auBankAccount",_),E=A("card",_),S=A("cardNumber",_),C=A("cardExpiry",_),T=A("cardCvc",_),k=A("fpxBank",_),x=A("iban",_),O=A("idealBank",_),I=A("paymentRequestButton",_);e.AuBankAccountElement=w,e.CardCvcElement=T,e.CardElement=E,e.CardExpiryElement=C,e.CardNumberElement=S,e.Elements=p,e.ElementsConsumer=g,e.FpxBankElement=k,e.IbanElement=x,e.IdealBankElement=O,e.PaymentRequestButtonElement=I,e.useElements=function(){return m("calls useElements()").elements},e.useStripe=function(){return m("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(0))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),i=n.n(r).a.createContext()},function(e,t,n){"use strict";var r=n(278),i=!1,a=!1;try{var o={get passive(){return i=!0},get once(){return a=i=!0}};r.a&&(window.addEventListener("test",o,o),window.removeEventListener("test",o,!0))}catch(e){}t.a=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!a){var o=r.once,s=r.capture,l=n;!a&&o&&(l=n.__once||function e(r){this.removeEventListener(t,e,s),n.call(this,r)},n.__once=l),e.addEventListener(t,l,i?r:s)}e.addEventListener(t,n,r)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){var t=Object(r.useRef)(null);return Object(r.useEffect)((function(){t.current=e})),t.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(){var e=Object(r.useRef)(!0),t=Object(r.useRef)((function(){return e.current}));return Object(r.useEffect)((function(){return function(){e.current=!1}}),[]),t.current}},function(e,t,n){"use strict";var r=n(45),i=n(170);function a(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 o(e){return[r.m,r.k,r.c,r.f].some((function(t){return e[t]>=0}))}t.a={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,s=t.rects.popper,l=t.modifiersData.preventOverflow,c=Object(i.a)(t,{elementContext:"reference"}),u=Object(i.a)(t,{altBoundary:!0}),d=a(c,r),h=a(u,s,l),f=o(d),p=o(h);t.modifiersData[n]={referenceClippingOffsets:d,popperEscapeOffsets:h,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(393);function i(e){return Object.assign({},Object(r.a)(),e)}},function(e,t,n){"use strict";function r(){return{top:0,right:0,bottom:0,left:0}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(90);function i(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Object(r.c)(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(129),i=n(172),a=n(283),o=n(45);function s(e){var t,n=e.reference,s=e.element,l=e.placement,c=l?Object(r.a)(l):null,u=l?Object(i.a)(l):null,d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2;switch(c){case o.m:t={x:d,y:n.y-s.height};break;case o.c:t={x:d,y:n.y+n.height};break;case o.k:t={x:n.x+n.width,y:h};break;case o.f:t={x:n.x-s.width,y:h};break;default:t={x:n.x,y:n.y}}var f=c?Object(a.a)(c):null;if(null!=f){var p="y"===f?"height":"width";switch(u){case o.l:t[f]=t[f]-(n[p]/2-s[p]/2);break;case o.e:t[f]=t[f]+(n[p]/2-s[p]/2)}}return t}},function(e,t,n){"use strict";var r=n(396);t.a={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Object(r.a)({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}}},function(e,t,n){"use strict";var r=n(45),i=n(189),a=n(119),o=n(138),s=n(143),l=n(129),c=n(172),u=n(116),d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function h(e){var t,n=e.popper,l=e.popperRect,c=e.placement,h=e.variation,f=e.offsets,p=e.position,m=e.gpuAcceleration,g=e.adaptive,v=e.roundOffsets,b=!0===v?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:Object(u.c)(Object(u.c)(t*r)/r)||0,y:Object(u.c)(Object(u.c)(n*r)/r)||0}}(f):"function"==typeof v?v(f):f,y=b.x,A=void 0===y?0:y,_=b.y,w=void 0===_?0:_,E=f.hasOwnProperty("x"),S=f.hasOwnProperty("y"),C=r.f,T=r.m,k=window;if(g){var x=Object(i.a)(n),O="clientHeight",I="clientWidth";x===Object(a.a)(n)&&(x=Object(o.a)(n),"static"!==Object(s.a)(x).position&&"absolute"===p&&(O="scrollHeight",I="scrollWidth")),x=x,c!==r.m&&(c!==r.f&&c!==r.k||h!==r.e)||(T=r.c,w-=x[O]-l.height,w*=m?1:-1),c!==r.f&&(c!==r.m&&c!==r.c||h!==r.e)||(C=r.k,A-=x[I]-l.width,A*=m?1:-1)}var M,P=Object.assign({position:p},g&&d);return m?Object.assign({},P,((M={})[T]=S?"0":"",M[C]=E?"0":"",M.transform=(k.devicePixelRatio||1)<=1?"translate("+A+"px, "+w+"px)":"translate3d("+A+"px, "+w+"px, 0)",M)):Object.assign({},P,((t={})[T]=S?w+"px":"",t[C]=E?A+"px":"",t.transform="",t))}t.a={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,a=n.adaptive,o=void 0===a||a,s=n.roundOffsets,u=void 0===s||s,d={placement:Object(l.a)(t.placement),variation:Object(c.a)(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,h(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,h(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}}},function(e,t,n){"use strict";var r=n(119),i={passive:!0};t.a={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,a=e.options,o=a.scroll,s=void 0===o||o,l=a.resize,c=void 0===l||l,u=Object(r.a)(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&d.forEach((function(e){e.addEventListener("scroll",n.update,i)})),c&&u.addEventListener("resize",n.update,i),function(){s&&d.forEach((function(e){e.removeEventListener("scroll",n.update,i)})),c&&u.removeEventListener("resize",n.update,i)}},data:{}}},function(e,t,n){"use strict";var r=n(129),i=n(45);t.a={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,a=e.name,o=n.offset,s=void 0===o?[0,0]:o,l=i.h.reduce((function(e,n){return e[n]=function(e,t,n){var a=Object(r.a)(e),o=[i.f,i.m].indexOf(a)>=0?-1:1,s="function"==typeof n?n(Object.assign({},t,{placement:e})):n,l=s[0],c=s[1];return l=l||0,c=(c||0)*o,[i.f,i.k].indexOf(a)>=0?{x:c,y:l}:{x:l,y:c}}(n,t.rects,s),e}),{}),c=l[t.placement],u=c.x,d=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=d),t.modifiersData[a]=l}}},function(e,t,n){"use strict";var r=n(129),i=n(282),a=n(395),o=n(189),s=n(283),l=n(290),c=n(392),u=n(394),d=n(45);t.a={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,a=e.name,h=e.options,f=n.elements.arrow,p=n.modifiersData.popperOffsets,m=Object(r.a)(n.placement),g=Object(s.a)(m),v=[d.f,d.k].indexOf(m)>=0?"height":"width";if(f&&p){var b=function(e,t){return e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e,Object(c.a)("number"!=typeof e?e:Object(u.a)(e,d.b))}(h.padding,n),y=Object(i.a)(f),A="y"===g?d.m:d.f,_="y"===g?d.c:d.k,w=n.rects.reference[v]+n.rects.reference[g]-p[g]-n.rects.popper[v],E=p[g]-n.rects.reference[g],S=Object(o.a)(f),C=S?"y"===g?S.clientHeight||0:S.clientWidth||0:0,T=w/2-E/2,k=b[A],x=C-y[v]-b[_],O=C/2-y[v]/2+T,I=Object(l.a)(k,O,x),M=g;n.modifiersData[a]=((t={})[M]=I,t.centerOffset=I-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Object(a.a)(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(94);function i(e){var t,n,i,a,o,s=e.enabled,l=e.enableEvents,c=e.placement,u=e.flip,d=e.offset,h=e.fixed,f=e.containerPadding,p=e.arrowElement,m=e.popperConfig,g=void 0===m?{}:m,v=function(e){var t={};return Array.isArray(e)?(null==e||e.forEach((function(e){t[e.name]=e})),t):e||t}(g.modifiers);return Object(r.a)({},g,{placement:c,enabled:s,strategy:h?"fixed":g.strategy,modifiers:(o=Object(r.a)({},v,{eventListeners:{enabled:l},preventOverflow:Object(r.a)({},v.preventOverflow,{options:f?Object(r.a)({padding:f},null==(t=v.preventOverflow)?void 0:t.options):null==(n=v.preventOverflow)?void 0:n.options}),offset:{options:Object(r.a)({offset:d},null==(i=v.offset)?void 0:i.options)},arrow:Object(r.a)({},v.arrow,{enabled:!!p,options:Object(r.a)({},null==(a=v.arrow)?void 0:a.options,{element:p})}),flip:Object(r.a)({enabled:!!u},v.flip)}),void 0===o&&(o={}),Array.isArray(o)?o:Object.keys(o).map((function(e){return o[e].name=e,o[e]})))})}},function(e,t,n){"use strict";function r(e){e.offsetHeight}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(177),i=n(429);function a(e,t){var n=Object(r.a)(e,t)||"",i=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*i}function o(e,t){var n=a(e,"transitionDuration"),r=a(e,"transitionDelay"),o=Object(i.a)(e,(function(n){n.target===e&&(o(),t(n))}),n+r)}},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(284),i=!1,a=!1;try{var o={get passive(){return i=!0},get once(){return a=i=!0}};r.a&&(window.addEventListener("test",o,o),window.removeEventListener("test",o,!0))}catch(e){}t.a=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!a){var o=r.once,s=r.capture,l=n;!a&&o&&(l=n.__once||function e(r){this.removeEventListener(t,e,s),n.call(this,r)},n.__once=l),e.addEventListener(t,l,i?r:s)}e.addEventListener(t,n,r)}},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(6),o=n.n(a),s=n(0),l=n.n(s),c=n(42),u=n.n(c),d=["label","onClick","className"],h={label:o.a.string.isRequired,onClick:o.a.func},f=l.a.forwardRef((function(e,t){var n=e.label,a=e.onClick,o=e.className,s=Object(i.a)(e,d);return(l.a.createElement("button",Object(r.a)({ref:t,type:"button",className:u()("close",o),onClick:a},s),l.a.createElement("span",{"aria-hidden":"true"},"×"),l.a.createElement("span",{className:"sr-only"},n)))}));f.displayName="CloseButton",f.propTypes=h,f.defaultProps={label:"Close"},t.a=f},function(e,t,n){"use strict";(function(e){for(var r,i=n(23),a=n.n(i),o=n(44),s=n.n(o),l=n(224),c=n.n(l),u=n(74),d=n.n(u),h=n(71),f=n.n(h),p=n(49),m=n.n(p),g=n(383),v=n.n(g),b=n(559),y=n.n(b),A=n(560),_=n.n(A),w=n(545),E=n.n(w),S=n(1012),C=n.n(S),T=n(291),k=n(1049),x=n(104),O=n(563),I=n(34),M=n(225),P=n(1015),D=n.n(P),N=n(251),L=n(344),R=n(337),B=n(1016),j=n.n(B),F={},U=function(e,t){return F[e]=F[e]||[],t&&(F[e]=F[e].concat(t)),F[e]},H=function(e,t){var n=U(e).indexOf(t);return!(n<=-1)&&(F[e]=F[e].slice(),F[e].splice(n,1),!0)},z={prefixed:!0},V=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],W=V[0],G=0;G<V.length;G++)if(V[G][1]in s.a){r=V[G];break}if(r){for(var q=0;q<r.length;q++)z[W[q]]=r[q];z.prefixed=r[0]!==W[0]}var Y=[];var K=function e(t){var n,r="info",i=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=function(e,t){return function(n,r,i){var o=t.levels[r],s=new RegExp("^("+o+")$");if("log"!==n&&i.unshift(n.toUpperCase()+":"),i.unshift(e+":"),Y){Y.push([].concat(i));var l=Y.length-1e3;Y.splice(0,l>0?l:0)}if(a.a.console){var c=a.a.console[n];c||"debug"!==n||(c=a.a.console.info||a.a.console.log),c&&o&&s.test(n)&&c[Array.isArray(i)?"apply":"call"](a.a.console,i)}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(i.history=function(){return Y?[].concat(Y):[]}).filter=function(e){return(Y||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){Y&&(Y.length=0)},i.history.disable=function(){null!==Y&&(Y.length=0,Y=null)},i.history.enable=function(){null===Y&&(Y=[])},i.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},i.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},i.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},i}("VIDEOJS"),X=K.createLogger,Q=Object.prototype.toString,$=function(e){return ee(e)?Object.keys(e):[]};function J(e,t){$(e).forEach((function(n){return t(e[n],n)}))}function Z(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?c.a.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&J(t,(function(t,n){e[n]=t}))})),e)}function ee(e){return!!e&&"object"==typeof e}function te(e){return ee(e)&&"[object Object]"===Q.call(e)&&e.constructor===Object}function ne(e,t){if(!e||!t)return"";if("function"==typeof a.a.getComputedStyle){var n;try{n=a.a.getComputedStyle(e)}catch(e){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}var re,ie=a.a.navigator&&a.a.navigator.userAgent||"",ae=/AppleWebKit\/([\d.]+)/i.exec(ie),oe=ae?parseFloat(ae.pop()):null,se=/iPod/i.test(ie),le=(re=ie.match(/OS (\d+)_/i))&&re[1]?re[1]:null,ce=/Android/i.test(ie),ue=function(){var e=ie.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),de=ce&&ue<5&&oe<537,he=/Firefox/i.test(ie),fe=/Edg/i.test(ie),pe=!fe&&(/Chrome/i.test(ie)||/CriOS/i.test(ie)),me=function(){var e=ie.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),ge=function(){var e=/MSIE\s(\d+)\.\d/.exec(ie),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(ie)&&/rv:11.0/.test(ie)&&(t=11),t}(),ve=/Safari/i.test(ie)&&!pe&&!ce&&!fe,be=/Windows/i.test(ie),ye=Boolean(ke()&&("ontouchstart"in a.a||a.a.navigator.maxTouchPoints||a.a.DocumentTouch&&a.a.document instanceof a.a.DocumentTouch)),Ae=/iPad/i.test(ie)||ve&&ye&&!/iPhone/i.test(ie),_e=/iPhone/i.test(ie)&&!Ae,we=_e||Ae||se,Ee=(ve||we)&&!pe,Se=Object.freeze({__proto__:null,IS_IPOD:se,IOS_VERSION:le,IS_ANDROID:ce,ANDROID_VERSION:ue,IS_NATIVE_ANDROID:de,IS_FIREFOX:he,IS_EDGE:fe,IS_CHROME:pe,CHROME_VERSION:me,IE_VERSION:ge,IS_SAFARI:ve,IS_WINDOWS:be,TOUCH_ENABLED:ye,IS_IPAD:Ae,IS_IPHONE:_e,IS_IOS:we,IS_ANY_SAFARI:Ee});function Ce(e){return"string"==typeof e&&Boolean(e.trim())}function Te(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function ke(){return s.a===a.a.document}function xe(e){return ee(e)&&1===e.nodeType}function Oe(){try{return a.a.parent!==a.a.self}catch(e){return!0}}function Ie(e){return function(t,n){if(!Ce(t))return s.a[e](null);Ce(n)&&(n=s.a.querySelector(n));var r=xe(n)?n:s.a;return r[e]&&r[e](t)}}function Me(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=s.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(K.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?Pe(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&$e(i,r),i}function Pe(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function De(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Ne(e,t){return Te(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function Le(e,t){return e.classList?e.classList.add(t):Ne(e,t)||(e.className=(e.className+" "+t).trim()),e}function Re(e,t){return e?(e.classList?e.classList.remove(t):(Te(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):(K.warn("removeClass was called with an element that doesn't exist"),null)}function Be(e,t,n){var r=Ne(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?Le(e,t):Re(e,t),e}function je(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function Fe(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var a=r[i].name,o=r[i].value;"boolean"!=typeof e[a]&&-1===n.indexOf(","+a+",")||(o=null!==o),t[a]=o}return t}function Ue(e,t){return e.getAttribute(t)}function He(e,t,n){e.setAttribute(t,n)}function ze(e,t){e.removeAttribute(t)}function Ve(){s.a.body.focus(),s.a.onselectstart=function(){return!1}}function We(){s.a.onselectstart=function(){return!0}}function Ge(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(ne(e,"height"))),n.width||(n.width=parseFloat(ne(e,"width"))),n}}function qe(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;e.offsetParent&&e!==s.a[z.fullscreenElement];)r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{left:r,top:i,width:t,height:n}}function Ye(e,t){var n={x:0,y:0};if(we)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var i=ne(r,"transform");if(/^matrix/.test(i)){var a=i.slice(7,-1).split(/,\s/).map(Number);n.x+=a[4],n.y+=a[5]}else if(/^matrix3d/.test(i)){var o=i.slice(9,-1).split(/,\s/).map(Number);n.x+=o[12],n.y+=o[13]}r=r.parentNode}var s={},l=qe(t.target),c=qe(e),u=c.width,d=c.height,h=t.offsetY-(c.top-l.top),f=t.offsetX-(c.left-l.left);return t.changedTouches&&(f=t.changedTouches[0].pageX-c.left,h=t.changedTouches[0].pageY+c.top,we&&(f-=n.x,h-=n.y)),s.y=1-Math.max(0,Math.min(1,h/d)),s.x=Math.max(0,Math.min(1,f/u)),s}function Ke(e){return ee(e)&&3===e.nodeType}function Xe(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Qe(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),xe(e)||Ke(e)?e:"string"==typeof e&&/\S/.test(e)?s.a.createTextNode(e):void 0})).filter((function(e){return e}))}function $e(e,t){return Qe(t).forEach((function(t){return e.appendChild(t)})),e}function Je(e,t){return $e(Xe(e),t)}function Ze(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var et,tt=Ie("querySelector"),nt=Ie("querySelectorAll"),rt=Object.freeze({__proto__:null,isReal:ke,isEl:xe,isInFrame:Oe,createEl:Me,textContent:Pe,prependTo:De,hasClass:Ne,addClass:Le,removeClass:Re,toggleClass:Be,setAttributes:je,getAttributes:Fe,getAttribute:Ue,setAttribute:He,removeAttribute:ze,blockTextSelection:Ve,unblockTextSelection:We,getBoundingClientRect:Ge,findPosition:qe,getPointerPosition:Ye,isTextNode:Ke,emptyEl:Xe,normalizeContent:Qe,appendContent:$e,insertContent:Je,isSingleLeftClick:Ze,$:tt,$$:nt}),it=!1,at=function(){if(!1!==et.options.autoSetup){var e=Array.prototype.slice.call(s.a.getElementsByTagName("video")),t=Array.prototype.slice.call(s.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(s.a.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,a=r.length;i<a;i++){var o=r[i];if(!o||!o.getAttribute){ot(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&et(o)}else it||ot(1)}};function ot(e,t){ke()&&(t&&(et=t),a.a.setTimeout(at,e))}function st(){it=!0,a.a.removeEventListener("load",st)}ke()&&("complete"===s.a.readyState?st():a.a.addEventListener("load",st));var lt,ct=function(e){var t=s.a.createElement("style");return t.className=e,t},ut=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},dt=3;function ht(){return dt++}a.a.WeakMap||(lt=function(){function e(){this.vdata="vdata"+Math.floor(a.a.performance&&a.a.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||ht();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];K("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var ft,pt=a.a.WeakMap?new WeakMap:new lt;function mt(e,t){if(pt.has(e)){var n=pt.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&pt.delete(e)}}function gt(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function vt(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){var r=e||a.a.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&"path"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||s.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=s.a.documentElement,l=s.a.body;e.pageX=e.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var bt=["touchstart","touchmove"];function yt(e,t,n){if(Array.isArray(t))return gt(yt,e,t,n);pt.has(e)||pt.set(e,{});var r=pt.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=ht()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=vt(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),o=0,s=a.length;o<s&&!t.isImmediatePropagationStopped();o++)try{a[o].call(e,t,n)}catch(e){K.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;(function(){if("boolean"!=typeof ft){ft=!1;try{var e=Object.defineProperty({},"passive",{get:function(){ft=!0}});a.a.addEventListener("test",null,e),a.a.removeEventListener("test",null,e)}catch(e){}}return ft})()&&bt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function At(e,t,n){if(pt.has(e)){var r=pt.get(e);if(r.handlers){if(Array.isArray(t))return gt(At,e,t,n);var i=function(e,t){r.handlers[t]=[],mt(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var o=0;o<a.length;o++)a[o].guid===n.guid&&a.splice(o--,1);mt(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function _t(e,t,n){var r=pt.has(e)?pt.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=vt(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)_t.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){pt.has(t.target)||pt.set(t.target,{});var a=pt.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function wt(e,t,n){if(Array.isArray(t))return gt(wt,e,t,n);var r=function r(){At(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||ht(),yt(e,t,r)}function Et(e,t,n){var r=function r(){At(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||ht(),yt(e,t,r)}var St,Ct=Object.freeze({__proto__:null,fixEvent:vt,on:yt,off:At,trigger:_t,one:wt,any:Et}),Tt=function(e,t,n){t.guid||(t.guid=ht());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},kt=function(e,t){var n=a.a.performance.now();return function(){var r=a.a.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},xt=function(){};xt.prototype.allowedEvents_={},xt.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},yt(this,e,t),this.addEventListener=n},xt.prototype.addEventListener=xt.prototype.on,xt.prototype.off=function(e,t){At(this,e,t)},xt.prototype.removeEventListener=xt.prototype.off,xt.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},wt(this,e,t),this.addEventListener=n},xt.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Et(this,e,t),this.addEventListener=n},xt.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=vt(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),_t(this,e)},xt.prototype.dispatchEvent=xt.prototype.trigger,xt.prototype.queueTrigger=function(e){var t=this;St||(St=new Map);var n=e.type||e,r=St.get(this);r||(r=new Map,St.set(this,r));var i=r.get(n);r.delete(n),a.a.clearTimeout(i);var o=a.a.setTimeout((function(){r.delete(n),0===r.size&&(r=null,St.delete(t)),t.trigger(e)}),0);r.set(n,o)};var Ot=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},It=function(e){return e instanceof xt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},Mt=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Pt=function(e,t,n){if(!e||!e.nodeName&&!It(e))throw new Error("Invalid target for "+Ot(t)+"#"+n+"; must be a DOM node or evented object.")},Dt=function(e,t,n){if(!Mt(e))throw new Error("Invalid event type for "+Ot(t)+"#"+n+"; must be a non-empty string or array.")},Nt=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+Ot(t)+"#"+n+"; must be a function.")},Lt=function(e,t,n){var r,i,a,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),Pt(r,e,n),Dt(i,e,n),Nt(a,e,n),{isTargetingSelf:o,target:r,type:i,listener:a=Tt(e,a)}},Rt=function(e,t,n,r){Pt(e,e,t),e.nodeName?Ct[t](e,n,r):e[t](n,r)},Bt={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Lt(this,n,"on"),a=i.isTargetingSelf,o=i.target,s=i.type,l=i.listener;if(Rt(o,"on",s,l),!a){var c=function(){return e.off(o,s,l)};c.guid=l.guid;var u=function(){return e.off("dispose",c)};u.guid=l.guid,Rt(this,"on","dispose",c),Rt(o,"on","dispose",u)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Lt(this,n,"one"),a=i.isTargetingSelf,o=i.target,s=i.type,l=i.listener;if(a)Rt(o,"one",s,l);else{var c=function t(){e.off(o,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];l.apply(null,r)};c.guid=l.guid,Rt(o,"one",s,c)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Lt(this,n,"any"),a=i.isTargetingSelf,o=i.target,s=i.type,l=i.listener;if(a)Rt(o,"any",s,l);else{var c=function t(){e.off(o,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];l.apply(null,r)};c.guid=l.guid,Rt(o,"any",s,c)}},off:function(e,t,n){if(!e||Mt(e))At(this.eventBusEl_,e,t);else{var r=e,i=t;Pt(r,this,"off"),Dt(i,this,"off"),Nt(n,this,"off"),n=Tt(this,n),this.off("dispose",n),r.nodeName?(At(r,i,n),At(r,"dispose",n)):It(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){Pt(this.eventBusEl_,this,"trigger");var n=e&&"string"!=typeof e?e.type:e;if(!Mt(n)){var r="Invalid event type for "+Ot(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(r);(this.log||K).error(r)}return _t(this.eventBusEl_,e,t)}};function jt(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=Me("span",{className:"vjs-event-bus"});return Z(e,Bt),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&pt.has(e)&&pt.delete(e)})),a.a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var Ft={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),J(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&It(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Ut(e,t){return Z(e,Ft),e.state=Z({},e.state,t),"function"==typeof e.handleStateChanged&&It(e)&&e.on("statechanged",e.handleStateChanged),e}var Ht=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},zt=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Vt(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&J(t,(function(t,n){te(t)?(te(e[n])||(e[n]={}),e[n]=Vt(e[n],t)):e[n]=t}))})),e}var Wt=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),Gt=a.a.Map?a.a.Map:Wt,qt=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},e}(),Yt=a.a.Set?a.a.Set:qt,Kt=function(){function e(e,t,n){var r=this;if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Vt({},this.options_),t=this.options_=Vt(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+ht()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((function(e){return r.addClass(e)})),!1!==t.evented&&(jt(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Ut(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Yt,this.setIntervalIds_=new Yt,this.rafIds_=new Yt,this.namedRafs_=new Gt,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(e){if(void 0===e&&(e={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=Vt(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return Me(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),a=i&&i[r],o=r&&r.split("-")[0],s=i&&i[o],l=n;return a&&a[e]?l=a[e]:s&&s[e]&&(l=s[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),l},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,a;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){a=zt(t);var o=n.componentClass||a;n.name=a;var s=e.getComponent(o);if(!s)throw new Error("Component "+o+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(a=a||i.name&&zt(i.name()))&&(this.childNameIndex_[a]=i,this.childNameIndex_[Ht(a)]=i),"function"==typeof i.el&&i.el()){var l=null;this.children_[r+1]&&(this.children_[r+1].el_?l=this.children_[r+1].el_:xe(this.children_[r+1])&&(l=this.children_[r+1])),this.contentEl().insertBefore(i.el(),l)}return i},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[zt(e.name())]=null,this.childNameIndex_[Ht(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,a=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||zt(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(n,r);a&&(t[n]=a)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return tt(e,t||this.contentEl())},t.$$=function(e,t){return nt(e,t||this.contentEl())},t.hasClass=function(e){return Ne(this.el_,e)},t.addClass=function(e){Le(this.el_,e)},t.removeClass=function(e){Re(this.el_,e)},t.toggleClass=function(e,t){Be(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return Ue(this.el_,e)},t.setAttribute=function(e,t){He(this.el_,e,t)},t.removeAttribute=function(e){ze(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+zt(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=ne(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+zt(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(d.a.isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=a.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===e)&&(a.a.performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Tt(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=Tt(this,e),this.clearTimersOnDispose_(),n=a.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),a.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=Tt(this,e),this.clearTimersOnDispose_();var n=a.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),a.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Tt(this,e),t=a.a.requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Tt(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),a.a.cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r,i=e.getComponent("Tech"),a=i&&i.isTech(n),o=e===n||e.prototype.isPrototypeOf(n.prototype);if(a||!o)throw r=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=zt(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var l=s.players,c=Object.keys(l);if(l&&c.length>0&&c.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Ht(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Xt(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function Qt(e){var t;return t=void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Xt.bind(null,"start",0,e),end:Xt.bind(null,"end",1,e)},a.a.Symbol&&a.a.Symbol.iterator&&(t[a.a.Symbol.iterator]=function(){return(e||[]).values()}),t}function $t(e,t){return Array.isArray(e)?Qt(e):void 0===e||void 0===t?Qt():Qt([[e,t]])}function Jt(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=$t(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(r=e.end(a))>t&&(r=t),i+=r-n;return i/t}function Zt(e){if(e instanceof Zt)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:ee(e)&&("number"==typeof e.code&&(this.code=e.code),Z(this,e)),this.message||(this.message=Zt.defaultMessages[this.code]||"")}Kt.prototype.supportsRaf_="function"==typeof a.a.requestAnimationFrame&&"function"==typeof a.a.cancelAnimationFrame,Kt.registerComponent("Component",Kt),Zt.prototype.code=0,Zt.prototype.message="",Zt.prototype.status=null,Zt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Zt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var en=0;en<Zt.errorTypes.length;en++)Zt[Zt.errorTypes[en]]=en,Zt.prototype[Zt.errorTypes[en]]=en;function tn(e){return null!=e&&"function"==typeof e.then}function nn(e){tn(e)&&e.then(null,(function(e){}))}var rn=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},an=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=rn(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(rn))},on=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},sn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleKeyDown_=function(e){return r.handleKeyDown(e)},r.close_=function(e){return r.close(e)},r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=Me("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=Me("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),Pe(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),Je(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),Xe(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=s.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),d.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(d.a.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}s.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof a.a.HTMLAnchorElement||e instanceof a.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof a.a.HTMLInputElement||e instanceof a.a.HTMLSelectElement||e instanceof a.a.HTMLTextAreaElement||e instanceof a.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof a.a.HTMLIFrameElement||e instanceof a.a.HTMLObjectElement||e instanceof a.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(Kt);sn.prototype.options_={pauseOnOpen:!0,temporary:!0},Kt.registerComponent("ModalDialog",sn);var ln=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(f()(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}m()(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},It(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(xt);for(var cn in ln.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},ln.prototype.allowedEvents_)ln.prototype["on"+cn]=null;var un=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},dn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){un(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}m()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&un(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,un(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(ln),hn=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},fn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){hn(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(f()(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}m()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&hn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,hn(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(ln),pn=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(ln),mn=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),gn=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),vn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},bn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},yn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},An={disabled:"disabled",hidden:"hidden",showing:"showing"},_n=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+ht(),kind:t.kind||"",language:t.language||""},i=t.label||"",a=function(e){Object.defineProperty(f()(n),e,{get:function(){return r[e]},set:function(){}})};for(var o in r)a(o);return Object.defineProperty(f()(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return m()(t,e),t}(xt),wn=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=s.a.createElement("a");n.href=e;for(var r={},i=0;i<t.length;i++)r[t[i]]=n[t[i]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=a.a.location.protocol),r.host||(r.host=a.a.location.host),r},En=function(e){if(!e.match(/^https?:\/\//)){var t=s.a.createElement("a");t.href=e,e=t.href}return e},Sn=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Cn=function(e,t){void 0===t&&(t=a.a.location);var n=wn(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Tn=Object.freeze({__proto__:null,parseUrl:wn,getAbsoluteURL:En,getFileExtension:Sn,isCrossOrigin:Cn}),kn=function(e,t){var n=new a.a.WebVTT.Parser(a.a,a.a.vttjs,a.a.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(a.a.console&&a.a.console.groupCollapsed&&a.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return K.error(e)})),a.a.console&&a.a.console.groupEnd&&a.a.console.groupEnd()),n.flush()},xn=function(e,t){var n={uri:e},r=Cn(e);r&&(n.cors=r);var i="use-credentials"===t.tech_.crossOrigin();i&&(n.withCredentials=i),y()(n,Tt(this,(function(e,n,r){if(e)return K.error(e,n);t.loaded_=!0,"function"!=typeof a.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return kn(r,t);K.error("vttjs failed to load, stopping trying to process "+t.src)})):kn(r,t)})))},On=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=Vt(t,{kind:yn[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=An[r.mode]||"disabled",a=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var o=new gn(n.cues_),s=new gn(n.activeCues_),l=!1;n.timeupdateHandler=Tt(f()(n),(function(e){void 0===e&&(e={}),this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));return n.tech_.one("dispose",(function(){n.stopTracking()})),"disabled"!==i&&n.startTracking(),Object.defineProperties(f()(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return i},set:function(e){An[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||xn(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?o:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=e&&i.endTime>=e?t.push(i):i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e&&t.push(i)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(l=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==r.kind&&"captions"!==r.kind)&&xn(n.src,f()(n))):n.loaded_=!0,n}m()(t,e);var n=t.prototype;return n.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},n.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},n.addCue=function(e){var t=e;if(a.a.vttjs&&!(e instanceof a.a.vttjs.VTTCue)){for(var n in t=new a.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(_n);On.prototype.allowedEvents_={cuechange:"cuechange"};var In=function(e){function t(t){var n;void 0===t&&(t={});var r=Vt(t,{kind:bn[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(f()(n),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return m()(t,e),t}(_n),Mn=function(e){function t(t){var n;void 0===t&&(t={});var r=Vt(t,{kind:vn[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(f()(n),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return m()(t,e),t}(_n),Pn=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new On(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(f()(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:f()(n)})})),n}return m()(t,e),t}(xt);Pn.prototype.allowedEvents_={load:"load"},Pn.NONE=0,Pn.LOADING=1,Pn.LOADED=2,Pn.ERROR=3;var Dn={audio:{ListClass:dn,TrackClass:In,capitalName:"Audio"},video:{ListClass:fn,TrackClass:Mn,capitalName:"Video"},text:{ListClass:pn,TrackClass:On,capitalName:"Text"}};Object.keys(Dn).forEach((function(e){Dn[e].getterName=e+"Tracks",Dn[e].privateName=e+"Tracks_"}));var Nn={remoteText:{ListClass:pn,TrackClass:On,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:mn,TrackClass:Pn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ln=c()({},Dn,Nn);Nn.names=Object.keys(Nn),Dn.names=Object.keys(Dn),Ln.names=[].concat(Nn.names).concat(Dn.names);var Rn=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).onDurationChange_=function(e){return r.onDurationChange(e)},r.trackProgress_=function(e){return r.trackProgress(e)},r.trackCurrentTime_=function(e){return r.trackCurrentTime(e)},r.stopTrackingCurrentTime_=function(e){return r.stopTrackingCurrentTime(e)},r.disposeSourceHandler_=function(e){return r.disposeSourceHandler(e)},r.queuedHanders_=new Set,r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Ln.names.forEach((function(e){var n=Ln[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new Ln.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}m()(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Tt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return $t(0,0)},n.bufferedPercent=function(){return Jt(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(Dn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Zt(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?$t(0,0):$t()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Dn.names.forEach((function(t){var n=Dn[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!a.a.WebVTT)if(s.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&te(_.a)&&Object.keys(_.a).length>0)return void this.trigger("vttjsloaded");var t=s.a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),a.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},o=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};o(),t.addEventListener("change",o),t.addEventListener("addtrack",o),t.addEventListener("removetrack",o),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",o),t.removeEventListener("addtrack",o),t.removeEventListener("removetrack",o);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var a=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var o=new Ln.text.TrackClass(i);return a.addTrack(o),o}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=Vt(e,{tech:this});return new Nn.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(K.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||a.a.Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.requestVideoFrameCallback=function(e){var t=this,n=ht();return!this.isReady_||this.paused()?(this.queuedHanders_.add(n),this.one("playing",(function(){t.queuedHanders_.has(n)&&(t.queuedHanders_.delete(n),e())}))):this.requestNamedAnimationFrame(n,e),n},n.cancelVideoFrameCallback=function(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=zt(e),t.techs_[e]=n,t.techs_[Ht(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=zt(e),a.a&&a.a.videojs&&a.a.videojs[e]?(K.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),a.a.videojs[e]):void 0)},t}(Kt);Ln.names.forEach((function(e){var t=Ln[e];Rn.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Rn.prototype.featuresVolumeControl=!0,Rn.prototype.featuresMuteControl=!0,Rn.prototype.featuresFullscreenResize=!1,Rn.prototype.featuresPlaybackRate=!1,Rn.prototype.featuresProgressEvents=!1,Rn.prototype.featuresSourceset=!1,Rn.prototype.featuresTimeupdateEvents=!1,Rn.prototype.featuresNativeTextTracks=!1,Rn.prototype.featuresVideoFrameCallback=!1,Rn.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:K.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Kt.registerComponent("Tech",Rn),Rn.registerTech("Tech",Rn),Rn.defaultTechOrder_=[];var Bn={},jn={},Fn={};function Un(e,t,n){e.setTimeout((function(){return function e(t,n,r,i,a,o){void 0===t&&(t={});void 0===n&&(n=[]);void 0===a&&(a=[]);void 0===o&&(o=!1);var s=n,l=s[0],c=s.slice(1);if("string"==typeof l)e(t,Bn[l],r,i,a,o);else if(l){var u=function(e,t){var n=jn[e.id()],r=null;if(null==n)return r=t(e),jn[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var a=n[i],o=a[0],s=a[1];o===t&&(r=s)}null===r&&(r=t(e),n.push([t,r]));return r}(i,l);if(!u.setSource)return a.push(u),e(t,c,r,i,a,o);u.setSource(Z({},t),(function(n,s){if(n)return e(t,c,r,i,a,o);a.push(u),e(s,t.type===s.type?c:Bn[s.type],r,i,a,o)}))}else c.length?e(t,c,r,i,a,o):o?r(t,a):e(t,Bn["*"],r,i,a,!0)}(t,Bn[t.type],n,e)}),1)}function Hn(e,t,n,r){void 0===r&&(r=null);var i="call"+zt(n),a=e.reduce(Gn(i),r),o=a===Fn,s=o?null:t[n](a);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var a=e[i];a[t]&&a[t](r,n)}}(e,n,s,o),s}var zn={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Vn={setCurrentTime:1,setMuted:1,setVolume:1},Wn={play:1,pause:1};function Gn(e){return function(t,n){return t===Fn?Fn:n[e]?n[e](t):t}}var qn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Yn=function(e){void 0===e&&(e="");var t=Sn(e);return qn[t.toLowerCase()]||""};function Kn(e){if(!e.type){var t=Yn(e.src);t&&(e.type=t)}return e}var Xn=function(e){function t(t,n,r){var i,a=Vt({createEl:!1},n);if(i=e.call(this,t,a,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var o=0,s=n.playerOptions.techOrder;o<s.length;o++){var l=zt(s[o]),c=Rn.getTech(l);if(l||(c=Kt.getComponent(l)),c&&c.isSupported()){t.loadTech_(l);break}}return i}return m()(t,e),t}(Kt);Kt.registerComponent("MediaLoader",Xn);var Qn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).options_.controlText&&r.controlText(r.options_.controlText),r.handleMouseOver_=function(e){return r.handleMouseOver(e)},r.handleMouseOut_=function(e){return r.handleMouseOut(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.emitTapEvents(),r.enable(),r}m()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={}),t=Z({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&K.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=Z({role:"button"},n),this.tabIndex_=t.tabIndex;var r=Me(e,t,n);return r.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=Me("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,Pe(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){d.a.isEventKey(t,"Space")||d.a.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Kt);Kt.registerComponent("ClickableComponent",Qn);var $n=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),r.update_=function(e){return r.update(e)},t.on("posterchange",r.update_),r}m()(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},n.createEl=function(){return Me("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(ge||fe)&&t||this.player_.tech(!0).focus(),this.player_.paused()?nn(this.player_.play()):this.player_.pause()}},t}(Qn);Kt.registerComponent("PosterImage",$n);var Jn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Zn(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function er(e,t,n){try{e.style[t]=n}catch(e){return}}var tr=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=function(e){return i.updateDisplay(e)};return t.on("loadstart",(function(e){return i.toggleDisplay(e)})),t.on("texttrackchange",o),t.on("loadedmetadata",(function(e){return i.preselectTrack(e)})),t.ready(Tt(f()(i),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",o),t.on("playerresize",o),a.a.addEventListener("orientationchange",o),t.on("dispose",(function(){return a.a.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),i}m()(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,o=0;o<i.length;o++){var s=i[o];a&&a.enabled&&a.language&&a.language===s.language&&s.kind in r?s.kind===a.kind?n=s:n||(n=s):a&&!a.enabled?(n=null,e=null,t=null):s.default&&("descriptions"!==s.kind||e?s.kind in r&&!t&&(t=s):e=s)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof a.a.WebVTT&&a.a.WebVTT.processCues(a.a,[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var a=null,o=null,s=e.length;s--;){var l=e[s];"showing"===l.mode&&("descriptions"===l.kind?a=l:o=l)}o?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(o)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&er(o.firstChild,"color",Zn(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&er(o.firstChild,"backgroundColor",Zn(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?er(o,"backgroundColor",Zn(t.windowColor,t.windowOpacity)):o.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var s=a.a.parseFloat(o.style.fontSize);o.style.fontSize=s*t.fontPercent+"px",o.style.height="auto",o.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Jn[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof a.a.WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=0;i<r.activeCues.length;++i)t.push(r.activeCues[i]);a.a.WebVTT.processCues(a.a,t,this.el_);for(var o=0;o<e.length;++o){for(var s=e[o],l=0;l<s.activeCues.length;++l){var c=s.activeCues[l].displayState;Le(c,"vjs-text-track-cue"),Le(c,"vjs-text-track-cue-"+(s.language?s.language:o)),s.language&&He(c,"lang",s.language)}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},t}(Kt);Kt.registerComponent("TextTrackDisplay",tr);var nr=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=Me("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(Kt);Kt.registerComponent("LoadingSpinner",nr);var rr=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r=Me("button",t=Z({className:this.buildCSSClass()},t),n=Z({type:"button"},n));return r.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return K.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Kt.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){d.a.isEventKey(t,"Space")||d.a.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Qn);Kt.registerComponent("Button",rr);var ir=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return nn(t),void(!this.player_.tech(!0)||(ge||fe)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var a=function(){return i.focus()};tn(t)?t.then(a,(function(){})):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(rr);ir.prototype.controlText_="Play Video",Kt.registerComponent("BigPlayButton",ir);var ar=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){d.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(rr);Kt.registerComponent("CloseButton",ar);var or=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",(function(e){return r.handlePlay(e)})),r.on(t,"pause",(function(e){return r.handlePause(e)})),n.replay&&r.on(t,"ended",(function(e){return r.handleEnded(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?nn(this.player_.play()):this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(rr);or.prototype.controlText_="Play",Kt.registerComponent("PlayToggle",or);var sr=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||o>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},lr=sr;function cr(e,t){return void 0===t&&(t=e),lr(e,t)}var ur=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return r.updateContent(e)})),r.updateTextNode_(),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),r=Me("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return n.appendChild(r),this.contentEl_=Me("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=cr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,K.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=s.a.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(Kt);ur.prototype.labelText_="Time",ur.prototype.controlText_="Time",Kt.registerComponent("TimeDisplay",ur);var dr=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(ur);dr.prototype.labelText_="Current Time",dr.prototype.controlText_="Current Time",Kt.registerComponent("CurrentTimeDisplay",dr);var hr=function(e){function t(t,n){var r,i=function(e){return r.updateContent(e)};return(r=e.call(this,t,n)||this).on(t,"durationchange",i),r.on(t,"loadstart",i),r.on(t,"loadedmetadata",i),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(ur);hr.prototype.labelText_="Duration",hr.prototype.controlText_="Duration",Kt.registerComponent("DurationDisplay",hr);var fr=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=e.prototype.createEl.call(this,"div"),r=e.prototype.createEl.call(this,"span",{textContent:"/"});return n.appendChild(r),t.appendChild(n),t},t}(Kt);Kt.registerComponent("TimeDivider",fr);var pr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return r.updateContent(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&t.insertBefore(Me("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(ur);pr.prototype.labelText_="Remaining Time",pr.prototype.controlText_="Remaining Time",Kt.registerComponent("RemainingTimeDisplay",pr);var mr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",(function(e){return r.updateShowing(e)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Me("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Me("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(s.a.createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Kt);Kt.registerComponent("LiveDisplay",mr);var gr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(e){return r.updateLiveEdgeStatus(e)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Me("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(rr);gr.prototype.controlText_="Seek to live, currently playing live",Kt.registerComponent("SeekToLive",gr);var vr=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},br=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseDown_=function(e){return r.handleMouseDown(e)},r.handleMouseUp_=function(e){return r.handleMouseUp(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleMouseMove_=function(e){return r.handleMouseMove(e)},r.update_=function(e){return r.update(e)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}m()(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=Z({tabIndex:0},n),r=Z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||pe||e.preventDefault(),Ve(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;We(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_?t:(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"})),t)}},n.getProgress=function(){return Number(vr(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=Ye(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){d.a.isEventKey(t,"Left")||d.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):d.a.isEventKey(t,"Right")||d.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Kt);Kt.registerComponent("Slider",br);var yr=function(e,t){return vr(e/t*100,0,100).toFixed(2)+"%"},Ar=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",(function(e){return r.update(e)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Me("span",{className:"vjs-control-text"}),r=Me("span",{textContent:this.localize("Loaded")}),i=s.a.createTextNode(": ");return this.percentageEl_=Me("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),a=t.partEls_,o=yr(i,r);t.percent_!==o&&(t.el_.style.width=o,Pe(t.percentageEl_,o),t.percent_=o);for(var s=0;s<n.length;s++){var l=n.start(s),c=n.end(s),u=a[s];u||(u=t.el_.appendChild(Me()),a[s]=u),u.dataset.start===l&&u.dataset.end===c||(u.dataset.start=l,u.dataset.end=c,u.style.left=yr(l,i),u.style.width=yr(c-l,i))}for(var d=a.length;d>n.length;d--)t.el_.removeChild(a[d-1]);a.length=n.length}))},t}(Kt);Kt.registerComponent("LoadProgressBar",Ar);var _r=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=kt(Tt(f()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=qe(this.el_),i=Ge(this.player_.el()),a=e.width*t;if(i&&r){var o=e.left-i.left+a,s=e.width-a+(i.right-e.right),l=r.width/2;o<l?l+=l-o:s<l&&(l=s),l<0?l=0:l>r.width&&(l=r.width),l=Math.round(l),this.el_.style.right="-"+l+"px",this.write(n)}},n.write=function(e){Pe(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,o=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),l=s-t*s;a=(l<1?"":"-")+cr(l,s)}else a=cr(n,o);i.update(e,t,a),r&&r()}))},t}(Kt);Kt.registerComponent("TimeTooltip",_r);var wr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=kt(Tt(f()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(Kt);wr.prototype.options_={children:[]},we||ce||wr.prototype.options_.children.push("timeTooltip"),Kt.registerComponent("PlayProgressBar",wr);var Er=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=kt(Tt(f()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(Kt);Er.prototype.options_={children:["timeTooltip"]},Kt.registerComponent("MouseTimeDisplay",Er);var Sr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}m()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Tt(this,this.update),this.update=kt(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s.a&&"visibilityState"in s.a&&this.on(s.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===s.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this;if("hidden"!==s.a.visibilityState){var r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[cr(e,i),cr(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(Ge(n.el()),n.getProgress())})),r}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){Ze(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),Ze(e)){var n;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var r=this.calculateDistance(e),i=this.player_.liveTracker;if(i&&i.isLive()){if(r>=.99)return void i.seekToLiveEdge();var a=i.seekableStart(),o=i.liveCurrentTime();if((n=a+r*i.liveWindow())>=o&&(n=o),n<=a&&(n=a+.1),n===1/0)return}else(n=r*this.player_.duration())===this.player_.duration()&&(n-=.1);this.userSeek_(n)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?nn(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(d.a.isEventKey(t,"Space")||d.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(d.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(d.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(d()(t))){t.preventDefault(),t.stopPropagation();var r=10*(d.a.codes[d()(t)]-d.a.codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else d.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):d.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s.a&&"visibilityState"in s.a&&this.off(s.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(br);Sr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},we||ce||Sr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Kt.registerComponent("SeekBar",Sr);var Cr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=kt(Tt(f()(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=kt(Tt(f()(r),r.handleMouseSeek),30),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),a=qe(i),o=Ye(i,e).x;o=vr(o,0,1),r&&r.update(a,o),n&&n.update(a,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&nn(this.player_.play())}},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(Kt);Cr.prototype.options_={children:["seekBar"]},Kt.registerComponent("ProgressControl",Cr);var Tr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return r.handlePictureInPictureChange(e)})),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return r.handlePictureInPictureEnabledChange(e)})),r.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(function(){"audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()?(t.isInPictureInPicture()&&t.exitPictureInPicture(),r.hide()):r.show()})),r.disable(),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){s.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(rr);Tr.prototype.controlText_="Picture-in-Picture",Kt.registerComponent("PictureInPictureToggle",Tr);var kr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return r.handleFullscreenChange(e)})),!1===s.a[t.fsApi_.fullscreenEnabled]&&r.disable(),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(rr);kr.prototype.controlText_="Fullscreen",Kt.registerComponent("FullscreenToggle",kr);var xr=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},t}(Kt);Kt.registerComponent("VolumeLevel",xr);var Or=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=kt(Tt(f()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,r){if(!n){var i=Ge(this.el_),a=Ge(this.player_.el()),o=e.width*t;if(!a||!i)return;var s=e.left-a.left+o,l=e.width-o+(a.right-e.right),c=i.width/2;s<c?c+=c-s:l<c&&(c=l),c<0?c=0:c>i.width&&(c=i.width),this.el_.style.right="-"+c+"px"}this.write(r+"%")},n.write=function(e){Pe(this.el_,e)},n.updateVolume=function(e,t,n,r,i){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){a.update(e,t,n,r.toFixed(0)),i&&i()}))},t}(Kt);Kt.registerComponent("VolumeLevelTooltip",Or);var Ir=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=kt(Tt(f()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var r=this,i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(function(){n?r.el_.style.bottom=e.height*t+"px":r.el_.style.left=e.width*t+"px"}))},t}(Kt);Ir.prototype.options_={children:["volumeLevelTooltip"]},Kt.registerComponent("MouseVolumeLevelDisplay",Ir);var Mr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",(function(e){return r.updateLastVolume_(e)})),r.on(t,"volumechange",(function(e){return r.updateARIAAttributes(e)})),t.ready((function(){return r.updateARIAAttributes()})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){Ze(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=Ge(n),i=this.vertical(),a=Ye(n,e);a=i?a.y:a.x,a=vr(a,0,1),t.update(r,a,i)}Ze(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(br);Mr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},we||ce||Mr.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Mr.prototype.playerEvent="volumechange",Kt.registerComponent("VolumeBar",Mr);var Pr=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||te(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(f()(r),t),r.throttledHandleMouseMove=kt(Tt(f()(r),r.handleMouseMove),30),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r.on("touchstart",(function(e){return r.handleMouseDown(e)})),r.on("mousemove",(function(e){return r.handleMouseMove(e)})),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Kt);Pr.prototype.options_={children:["volumeBar"]},Kt.registerComponent("VolumeControl",Pr);var Dr=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(f()(r),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;we&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)Re(this.el_,"vjs-vol-"+n);Le(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(rr);Dr.prototype.controlText_="Mute",Kt.registerComponent("MuteToggle",Dr);var Nr=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||te(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return r.handleKeyPress(e)},r.on(t,["loadstart"],(function(e){return r.volumePanelState_(e)})),r.on(r.muteToggle,"keyup",(function(e){return r.handleKeyPress(e)})),r.on(r.volumeControl,"keyup",(function(e){return r.handleVolumeControlKeyUp(e)})),r.on("keydown",(function(e){return r.handleKeyPress(e)})),r.on("mouseover",(function(e){return r.handleMouseOver(e)})),r.on("mouseout",(function(e){return r.handleMouseOut(e)})),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}m()(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){d.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),yt(s.a,"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),At(s.a,"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){d.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(Kt);Nr.prototype.options_={children:["muteToggle","volumeControl"]},Kt.registerComponent("VolumePanel",Nr);var Lr=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",(function(e){return r.handleKeyDown(e)})),r.boundHandleBlur_=function(e){return r.handleBlur(e)},r.boundHandleTapClick_=function(e){return r.handleTapClick(e)},r}m()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof Kt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof Kt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=Me(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),yt(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||s.a.activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){d.a.isEventKey(e,"Left")||d.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(d.a.isEventKey(e,"Right")||d.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(Kt);Kt.registerComponent("Menu",Lr);var Rr=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new rr(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=rr.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var a=function(e){return r.handleClick(e)};return r.handleMenuKeyUp_=function(e){return r.handleMenuKeyUp(e)},r.on(r.menuButton_,"tap",a),r.on(r.menuButton_,"click",a),r.on(r.menuButton_,"keydown",(function(e){return r.handleKeyDown(e)})),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),yt(s.a,"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}m()(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},n.createMenu=function(){var e=new Lr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=Me("li",{className:"vjs-menu-title",textContent:zt(this.options_.title),tabIndex:-1}),n=new Kt(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+rr.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),At(s.a,"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){d.a.isEventKey(e,"Esc")||d.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),d.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(d.a.isEventKey(e,"Up")||d.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(d.a.isEventKey(e,"Esc")||d.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(d.a.isEventKey(e,"Esc")||d.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),d.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),we&&Oe())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(Kt);Kt.registerComponent("MenuButton",Rr);var Br=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return f()(r);var a=Tt(f()(r),r.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),i.addEventListener("labelchange",a),r.player_.on("ready",a),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a),i.removeEventListener("labelchange",a)})),r}return m()(t,e),t}(Rr);Kt.registerComponent("TrackButton",Br);var jr=["Tab","Esc","Up","Down","Right","Left"],Fr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}m()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){this.nonIconControl=!0;var i=e.prototype.createEl.call(this,"li",Z({className:"vjs-menu-item",tabIndex:-1},n),r);return i.replaceChild(Me("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),i.querySelector(".vjs-icon-placeholder")),i},n.handleKeyDown=function(t){jr.some((function(e){return d.a.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Qn);Kt.registerComponent("MenuItem",Fr);var Ur=function(e){function t(t,n){var r,i=n.track,o=t.textTracks();n.label=i.label||i.language||"Unknown",n.selected="showing"===i.mode,(r=e.call(this,t,n)||this).track=i,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var l,c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(f()(r),t)},u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(f()(r),t)};(t.on(["loadstart","texttrackchange"],c),o.addEventListener("change",c),o.addEventListener("selectedlanguagechange",u),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],c),o.removeEventListener("change",c),o.removeEventListener("selectedlanguagechange",u)})),void 0===o.onchange)&&r.on(["tap","click"],(function(){if("object"!=typeof a.a.Event)try{l=new a.a.Event("change")}catch(e){}l||(l=s.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(l)}));return r.handleTracksChange(),r}m()(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var a=r[i];-1!==this.kinds.indexOf(a.kind)&&(a===n?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Fr);Kt.registerComponent("TextTrackMenuItem",Ur);var Hr=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}m()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Ur);Kt.registerComponent("OffTextTrackMenuItem",Hr);var zr=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return m()(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Ur),this.label_&&(n=this.label_+" off"),e.push(new Hr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var a=r[i];if(this.kinds_.indexOf(a.kind)>-1){var o=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});o.addClass("vjs-"+a.kind+"-menu-item"),e.push(o)}}return e},t}(Br);Kt.registerComponent("TextTrackButton",zr);var Vr=function(e){function t(t,n){var r,i=n.track,a=n.cue,o=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=o&&o<a.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=a,r}return m()(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},t}(Fr);Kt.registerComponent("ChaptersTrackMenuItem",Vr);var Wr=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r)||this).selectCurrentItem_=function(){i.items.forEach((function(e){e.selected(i.track_.activeCues[0]===e.cue)}))},i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){if(!t||!t.track||"chapters"===t.track.kind){var n=this.findChaptersTrack();n!==this.track_?(this.setTrack(n),e.prototype.update.call(this)):(!this.items||n&&n.cues&&n.cues.length!==this.items.length)&&e.prototype.update.call(this)}},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(zt(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],a=new Vr(this.player_,{track:this.track_,cue:i});e.push(a)}return e},t}(zr);Wr.prototype.kind_="chapters",Wr.prototype.controlText_="Chapters",Kt.registerComponent("ChaptersButton",Wr);var Gr=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var a=t.textTracks(),o=Tt(f()(i),i.handleTracksChange);return a.addEventListener("change",o),i.on("dispose",(function(){a.removeEventListener("change",o)})),i}m()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(zr);Gr.prototype.kind_="descriptions",Gr.prototype.controlText_="Descriptions",Kt.registerComponent("DescriptionsButton",Gr);var qr=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(zr);qr.prototype.kind_="subtitles",qr.prototype.controlText_="Subtitles",Kt.registerComponent("SubtitlesButton",qr);var Yr=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return m()(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Ur);Kt.registerComponent("CaptionSettingsMenuItem",Yr);var Kr=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Yr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(zr);Kr.prototype.kind_="captions",Kr.prototype.controlText_="Captions",Kt.registerComponent("CaptionsButton",Kr);var Xr=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(t,n,r){var i=e.prototype.createEl.call(this,t,n,r),a=i.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(a.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Me("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),i},t}(Ur);Kt.registerComponent("SubsCapsMenuItem",Xr);var Qr=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(zt(r.label_)),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Yr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Xr)},t}(zr);Qr.prototype.kinds_=["captions","subtitles"],Qr.prototype.controlText_="Subtitles",Kt.registerComponent("SubsCapsButton",Qr);var $r=function(e){function t(t,n){var r,i=n.track,a=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(f()(r),t)};return a.addEventListener("change",o),r.on("dispose",(function(){a.removeEventListener("change",o)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i=e.prototype.createEl.call(this,t,n,r),a=i.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(a.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Me("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),i},n.handleClick=function(t){if(e.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var n=this.player_.audioTracks(),r=0;r<n.length;r++){var i=n[r];i!==this.track&&(i.enabled=i===this.track)}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Fr);Kt.registerComponent("AudioTrackMenuItem",$r);var Jr=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new $r(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(Br);Jr.prototype.controlText_="Audio Track",Kt.registerComponent("AudioTrackButton",Jr);var Zr=function(e){function t(t,n){var r,i=n.rate,a=parseFloat(i,10);return n.label=i,n.selected=a===t.playbackRate(),n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=a,r.on(t,"ratechange",(function(e){return r.update(e)})),r}m()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Fr);Zr.prototype.contentElType="button",Kt.registerComponent("PlaybackRateMenuItem",Zr);var ei=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",r.labelElId_),r.updateVisibility(),r.updateLabel(),r.on(t,"loadstart",(function(e){return r.updateVisibility(e)})),r.on(t,"ratechange",(function(e){return r.updateLabel(e)})),r.on(t,"playbackrateschange",(function(e){return r.handlePlaybackRateschange(e)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Me("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){for(var e=this.playbackRates(),t=[],n=e.length-1;n>=0;n--)t.push(new Zr(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){var t=this.player().playbackRate(),n=this.playbackRates(),r=(n.indexOf(t)+1)%n.length;this.player().playbackRate(n[r])},n.handlePlaybackRateschange=function(e){this.update()},n.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Rr);ei.prototype.controlText_="Playback Rate",Kt.registerComponent("PlaybackRateMenuButton",ei);var ti=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(t,n,r){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n.className||(n.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,n,r)},t}(Kt);Kt.registerComponent("Spacer",ti);var ni=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},t}(ti);Kt.registerComponent("CustomControlSpacer",ni);var ri=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Kt);ri.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in s.a&&ri.prototype.options_.children.splice(ri.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Kt.registerComponent("ControlBar",ri);var ii=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",(function(e){return r.open(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(sn);ii.prototype.options_=c()({},sn.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Kt.registerComponent("ErrorDisplay",ii);var ai=["#000","Black"],oi=["#00F","Blue"],si=["#0FF","Cyan"],li=["#0F0","Green"],ci=["#F0F","Magenta"],ui=["#F00","Red"],di=["#FFF","White"],hi=["#FF0","Yellow"],fi=["1","Opaque"],pi=["0.5","Semi-Transparent"],mi=["0","Transparent"],gi={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ai,di,ui,li,oi,hi,ci,si]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[fi,pi,mi]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[di,ai,ui,li,oi,hi,ci,si]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[fi,pi]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[mi,pi,fi]}};function vi(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}gi.windowColor.options=gi.backgroundColor.options;var bi=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind(f()(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Me("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),J(gi,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}m()(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=gi[e],a=i.id.replace("%s",this.id_),o=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+o+'">'].concat(i.options.map((function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return Me("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Me("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Me("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,a,o=(i=r.$(t.selector),a=t.parser,vi(i.options[i.options.selectedIndex].value,a));return void 0!==o&&(e[n]=o),e},void 0===(n={})&&(n=0),$(e=gi).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;J(gi,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(vi(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;J(gi,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(a.a.localStorage.getItem("vjs-text-track-settings"))}catch(e){K.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?a.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):a.a.localStorage.removeItem("vjs-text-track-settings")}catch(e){K.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(sn);Kt.registerComponent("TextTrackSettings",bi);var yi=function(e){function t(t,n){var r,i=n.ResizeObserver||a.a.ResizeObserver;null===n.ResizeObserver&&(i=!1);var o=Vt({createEl:!i,reportTouchActivity:!1},n);return(r=e.call(this,t,o)||this).ResizeObserver=n.ResizeObserver||a.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var i;void 0===r&&(r=a.a);var o=function(){var a=this,o=arguments,s=function(){i=null,s=null,n||e.apply(a,o)};!i&&n&&e.apply(a,o),r.clearTimeout(i),i=r.setTimeout(s,t)};return o.cancel=function(){r.clearTimeout(i),i=null},o}((function(){r.resizeHandler()}),100,!1,f()(r)),i?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){At(this,"resize",e),At(this,"unload",t),t=null};yt(r.el_.contentWindow,"unload",t),yt(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(Kt);Kt.registerComponent("ResizeManager",yi);var Ai={trackingThreshold:20,liveTolerance:15},_i=function(e){function t(t,n){var r,i=Vt(Ai,n,{createEl:!1});return(r=e.call(this,t,i)||this).handleVisibilityChange_=function(e){return r.handleVisibilityChange(e)},r.trackLiveHandler_=function(){return r.trackLive_()},r.handlePlay_=function(e){return r.handlePlay(e)},r.handleFirstTimeupdate_=function(e){return r.handleFirstTimeupdate(e)},r.handleSeeked_=function(e){return r.handleSeeked(e)},r.seekToLiveEdge_=function(e){return r.seekToLiveEdge(e)},r.reset_(),r.on(r.player_,"durationchange",(function(e){return r.handleDurationchange(e)})),r.on(r.player_,"canplay",(function(){return r.toggleTracking()})),ge&&"hidden"in s.a&&"visibilityState"in s.a&&r.on(s.a,"visibilitychange",r.handleVisibilityChange_),r}m()(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(s.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(a.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),i=this.player_.currentTime(),o=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-i)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},n.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(s.a,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(Kt);Kt.registerComponent("LiveTracker",_i);var wi,Ei=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var o=n[a].src;o&&-1===r.indexOf(o)&&r.push(o)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},Si=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=s.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=s.a.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",a.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),Ci=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},Ti=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return Ci([e.el(),a.a.HTMLMediaElement.prototype,a.a.Element.prototype,Si],"innerHTML")}(e),i=function(n){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=n.apply(t,i);return Ei(e),o}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",Vt(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},ki=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?En(a.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return a.a.Element.prototype.setAttribute.call(this,"src",e),e}}),xi=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return Ci([e.el(),a.a.HTMLMediaElement.prototype,ki],"src")}(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",Vt(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var a=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=i.call(t);return Ei(e)||(e.triggerSourceset(""),Ti(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):Ei(e)||Ti(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},Oi=function(e,t,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(a.set=i),Object.defineProperty(e,t,a)},Ii=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,a=!1;if(r.featuresVideoFrameCallback=r.featuresVideoFrameCallback&&"VIDEO"===r.el_.tagName,i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var o=r.el_.childNodes,s=o.length,l=[];s--;){var c=o[s];"track"===c.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(c),r.remoteTextTracks().addTrack(c.track),r.textTracks().addTrack(c.track),a||r.el_.hasAttribute("crossorigin")||!Cn(c.src)||(a=!0)):l.push(c))}for(var u=0;u<l.length;u++)r.el_.removeChild(l[u])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&a&&K.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(ye||_e||de)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}m()(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){xi(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=Dn[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var a={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[Nn.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},o=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,a=0;a<r.length;a++)if(r[a]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach((function(e){var n=a[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",o),this.on("dispose",(function(e){return t.off("loadstart",o)}))}},n.proxyNativeTracks_=function(){var e=this;Dn.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=s.a.createElement("video");var r=Vt({},this.options_.tag&&Fe(this.options_.tag));ye&&!0===this.options_.nativeControlsForTouch||delete r.controls,je(e,Z(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&He(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],a=0;a<i.length;a++){var o=i[a],l=this.options_[o];void 0!==l&&(l?He(e,o,o):ze(e,o),e[o]=l)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ee?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){K(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&ce&&pe&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=a.a.navigator&&a.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)nn(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):e.prototype.requestVideoFrameCallback.call(this,t)},n.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):e.prototype.cancelVideoFrameCallback.call(this,t)},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=s.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),a.a.performance&&"function"==typeof a.a.performance.now?e.creationTime=a.a.performance.now():a.a.performance&&a.a.performance.timing&&"number"==typeof a.a.performance.timing.navigationStart&&(e.creationTime=a.a.Date.now()-a.a.performance.timing.navigationStart),e},t}(Rn);Oi(Ii,"TEST_VID",(function(){if(ke()){var e=s.a.createElement("video"),t=s.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),Ii.isSupported=function(){try{Ii.TEST_VID.volume=.5}catch(e){return!1}return!(!Ii.TEST_VID||!Ii.TEST_VID.canPlayType)},Ii.canPlayType=function(e){return Ii.TEST_VID.canPlayType(e)},Ii.canPlaySource=function(e,t){return Ii.canPlayType(e.type)},Ii.canControlVolume=function(){try{var e=Ii.TEST_VID.volume;Ii.TEST_VID.volume=e/2+.1;var t=e!==Ii.TEST_VID.volume;return t&&we?(a.a.setTimeout((function(){Ii&&Ii.prototype&&(Ii.prototype.featuresVolumeControl=e!==Ii.TEST_VID.volume)})),!1):t}catch(e){return!1}},Ii.canMuteVolume=function(){try{var e=Ii.TEST_VID.muted;return Ii.TEST_VID.muted=!e,Ii.TEST_VID.muted?He(Ii.TEST_VID,"muted","muted"):ze(Ii.TEST_VID,"muted"),e!==Ii.TEST_VID.muted}catch(e){return!1}},Ii.canControlPlaybackRate=function(){if(ce&&pe&&me<58)return!1;try{var e=Ii.TEST_VID.playbackRate;return Ii.TEST_VID.playbackRate=e/2+.1,e!==Ii.TEST_VID.playbackRate}catch(e){return!1}},Ii.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(s.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Ii.supportsNativeTextTracks=function(){return Ee||we&&pe},Ii.supportsNativeVideoTracks=function(){return!(!Ii.TEST_VID||!Ii.TEST_VID.videoTracks)},Ii.supportsNativeAudioTracks=function(){return!(!Ii.TEST_VID||!Ii.TEST_VID.audioTracks)},Ii.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];Oi(Ii.prototype,t,(function(){return Ii[n]()}),!0)})),Ii.prototype.featuresVolumeControl=Ii.canControlVolume(),Ii.prototype.movingMediaElementInDOM=!we,Ii.prototype.featuresFullscreenResize=!0,Ii.prototype.featuresProgressEvents=!0,Ii.prototype.featuresTimeupdateEvents=!0,Ii.prototype.featuresVideoFrameCallback=!(!Ii.TEST_VID||!Ii.TEST_VID.requestVideoFrameCallback),Ii.patchCanPlayType=function(){ue>=4&&!he&&!pe&&(wi=Ii.TEST_VID&&Ii.TEST_VID.constructor.prototype.canPlayType,Ii.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":wi.call(this,e)})},Ii.unpatchCanPlayType=function(){var e=Ii.TEST_VID.constructor.prototype.canPlayType;return wi&&(Ii.TEST_VID.constructor.prototype.canPlayType=wi),e},Ii.patchCanPlayType(),Ii.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Ii.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Ii.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Ii.prototype["set"+zt(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Ii.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Ii.prototype["set"+zt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Ii.prototype[e]=function(){return this.el_[e]()}})),Rn.withSourceHandlers(Ii),Ii.nativeSourceHandler={},Ii.nativeSourceHandler.canPlayType=function(e){try{return Ii.TEST_VID.canPlayType(e)}catch(e){return""}},Ii.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Ii.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Sn(e.src);return Ii.nativeSourceHandler.canPlayType("video/"+n)}return""},Ii.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Ii.nativeSourceHandler.dispose=function(){},Ii.registerSourceHandler(Ii.nativeSourceHandler),Rn.registerTech("Html5",Ii);var Mi=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Pi={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Di=["tiny","xsmall","small","medium","large","xlarge","huge"],Ni={};Di.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Ni[e]="vjs-layout-"+t}));var Li={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Ri=function(e){function t(n,r,i){var a;if(n.id=n.id||r.id||"vjs_video_"+ht(),(r=Z(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else for(var l=n;l&&1===l.nodeType;){if(Fe(l).hasOwnProperty("lang")){r.language=l.getAttribute("lang");break}l=l.parentNode}if((a=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=function(e){return a.documentFullscreenChange_(e)},a.boundFullWindowOnEscKey_=function(e){return a.fullWindowOnEscKey(e)},a.boundUpdateStyleEl_=function(e){return a.updateStyleEl_(e)},a.boundApplyInitTime_=function(e){return a.applyInitTime_(e)},a.boundUpdateCurrentBreakpoint_=function(e){return a.updateCurrentBreakpoint_(e)},a.boundHandleTechClick_=function(e){return a.handleTechClick_(e)},a.boundHandleTechDoubleClick_=function(e){return a.handleTechDoubleClick_(e)},a.boundHandleTechTouchStart_=function(e){return a.handleTechTouchStart_(e)},a.boundHandleTechTouchMove_=function(e){return a.handleTechTouchMove_(e)},a.boundHandleTechTouchEnd_=function(e){return a.handleTechTouchEnd_(e)},a.boundHandleTechTap_=function(e){return a.handleTechTap_(e)},a.isFullscreen_=!1,a.log=X(a.id_),a.fsApi_=z,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,a.audioOnlyMode_=!1,a.audioPosterMode_=!1,a.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&Fe(n),a.language(a.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach((function(e){c[e.toLowerCase()]=r.languages[e]})),a.languages_=c}else a.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=r.poster||"",a.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),jt(f()(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(yt(s.a,a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var u=Vt(a.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){a[e](r.plugins[e])})),r.debug&&a.debug(!0),a.options_.playerOptions=u,a.middleware_=[],a.playbackRates(r.playbackRates),a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),ye&&a.addClass("vjs-touch-enabled"),we||a.addClass("vjs-workinghover"),t.players[a.id_]=f()(a);var d="7.21.4".split(".")[0];return a.addClass("vjs-v"+d),a.userActive(!0),a.reportUserActivity(),a.one("play",(function(e){return a.listenForUserActivity_(e)})),a.on("stageclick",(function(e){return a.handleStageClick_(e)})),a.on("keydown",(function(e){return a.handleKeyDown(e)})),a.on("languagechange",(function(e){return a.handleLanguagechange(e)})),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a.on("ready",(function(){a.audioPosterMode(a.options_.audioPosterMode),a.audioOnlyMode(a.options_.audioOnlyMode)})),a}m()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),At(s.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),At(s.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),jn[this.id()]=null,Ln.names.forEach((function(e){var t=Ln[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:i||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=Fe(n);if(i){for(t=this.el_=n,n=this.tag=s.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);Ne(t,"video-js")||Le(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(ge||pe&&be)&&(n.setAttribute("role","application"),o.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){i&&"class"===e||t.setAttribute(e,o[e]),i&&n.setAttribute(e,o[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=ct("vjs-styles-dimensions");var l=tt(".vjs-styles-defaults"),c=tt("head");c.insertBefore(this.styleEl_,l?l.nextSibling:c.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var u=n.getElementsByTagName("a"),d=0;d<u.length;d++){var h=u.item(d);Le(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),De(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):K.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?K.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,It(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),function(e,t){It(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))}(this,(function(){t.on(["playerreset","resize"],t.boundUpdateStyleEl_)}))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),ut(this.styleEl_,"\n      ."+n+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+n+".vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: "+100*i+"%;\n      }\n    ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(o>=0&&(l.width=o),s>=0&&(l.height=s))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=zt(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Rn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(a=!1);var o={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Ln.names.forEach((function(e){var t=Ln[e];o[t.getterName]=n[t.privateName]})),Z(o,this.options_[r]),Z(o,this.options_[i]),Z(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var s=Rn.getTech(e);if(!s)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new s(o),this.tech_.ready(Tt(this,this.handleTechReady_),!0),on(this.textTracksJson_||[],this.tech_),Mi.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+zt(e)+"_"](t)}))})),Object.keys(Pi).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Pi[e]+"_"].bind(n),event:t}):n["handleTech"+Pi[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||De(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Ln.names.forEach((function(t){var n=Ln[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=an(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&K.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(tn(r))return r.catch((function(e){throw n(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))}))};if("any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():r():tn(n=this.play())&&(n=n.catch(r)),tn(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var a=r[i];if(a.type&&a.src&&a.src===t)return a.type}return Yn(t)}(this,t)),this.cache_.source=Vt({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],a=this.$$("source"),o=[],s=0;s<a.length;s++){var l=Fe(a[s]);i.push(l),l.src&&l.src===t&&o.push(l.src)}o.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(K.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?nn(this.play()):this.pause()))},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=s.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){var n=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){n.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in Vn)return function(e,t,n,r){return t[n](e.reduce(Gn(n),r))}(this.middleware_,this.tech_,e,t);if(e in Wn)return Hn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw K(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in zn)return function(e,t,n){return e.reduceRight(Gn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Wn)return Hn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw K("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw K("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw K(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||a.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=nn),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),r=Boolean(Ee||we);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!n&&r&&this.load());var i=this.techGet_("play");r&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||$t(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=$t(0,0)),e},n.bufferedPercent=function(){return Jt(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||a.a.Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",o),n.off("fullscreenchange",a)}function a(){i(),t()}function o(e,t){i(),r(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",o);var s=n.requestFullscreenHelper_(e);s&&(s.then(i,i),s.then(t,r))}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||a.a.Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",i)}function i(){r(),e()}function a(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",a);var o=t.exitFullscreenHelper_();o&&(o.then(r,r),o.then(e,n))}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=s.a[this.fsApi_.exitFullscreen]();return t&&nn(t.then((function(){return e.isFullscreen(!1)}))),t}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=s.a.documentElement.style.overflow,yt(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow="hidden",Le(s.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){d.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,At(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow=this.docOrigOverflow,Re(s.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in s.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in s.a)return s.a.exitPictureInPicture()},n.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return d.a.isEventKey(e,"f")}:n,i=t.muteKey,a=void 0===i?function(e){return d.a.isEventKey(e,"m")}:i,o=t.playPauseKey,l=void 0===o?function(e){return d.a.isEventKey(e,"k")||d.a.isEventKey(e,"Space")}:o;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var c=Kt.getComponent("FullscreenToggle");!1!==s.a[this.fsApi_.fullscreenEnabled]&&c.prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),Kt.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(l.call(this,e)){e.preventDefault(),e.stopPropagation(),Kt.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],a=Rn.getTech(i);if(a||(a=Kt.getComponent(i)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else K.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,Rn.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(K.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},a=function(e,t){var r=e[0];if(e[1].canPlaySource(t,n.options_[r.toLowerCase()]))return{source:t,tech:r}};return(this.options_.sourceOrder?i(e,r,(t=a,function(e,n){return t(n,e)})):i(r,e,a))||!1},n.handleSrc_=function(e,t){var n=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var r=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):ee(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[Kn({src:t})]:ee(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Kn(t)]:[];return t}(e);if(r.length){if(this.changingSrc_=!0,t||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),Un(this,r[0],(function(e,i){var a,o;if(n.middleware_=i,t||(n.cache_.sources=r),n.updateSourceCaches_(e),n.src_(e))return r.length>1?n.handleSrc_(r.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void n.triggerReady());a=i,o=n.tech_,a.forEach((function(e){return e.setTech&&e.setTech(o)}))})),this.options_.retryOnError&&r.length>1){var i=function(){n.error(null),n.handleSrc_(r.slice(1),!0)},a=function(){n.off("error",i)};this.one("error",i),this.one("playing",a),this.resetRetryOnError_=function(){n.off("error",i),n.off("playing",a)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,zt(t)!==zt(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||a.a.Promise;this.paused()||!t?this.doReset_():nn(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),It(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar||{},t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){var t=this;if(void 0===e)return this.error_||null;if(U("beforeerror").forEach((function(n){var r=n(t,e);ee(r)&&!Array.isArray(r)||"string"==typeof r||"number"==typeof r||null===r?e=r:t.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){var n=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),void this.one("loadstart",(function(){this.off(["click","touchstart"],n)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Zt(e),this.addClass("vjs-error"),K.error("(CODE:"+this.error_.code+" "+Zt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),U("error").forEach((function(e){return e(t,t.error_)}))},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,r=Tt(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var a,o=this.getChild("controlBar");!o||we||ce||(o.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),o.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var t=this.children(),n=this.getChild("ControlBar"),r=n&&n.currentHeight();t.forEach((function(t){t!==n&&t.el_&&!t.hasClass("vjs-hidden")&&(t.hide(),e.audioOnlyCache_.hiddenChildren.push(t))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(r),this.trigger("audioonlymodechange")},n.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach((function(e){return e.show()})),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},n.audioOnlyMode=function(e){var t=this;if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var n=this.options_.Promise||a.a.Promise;if(n){if(e){var r=[];return this.isInPictureInPicture()&&r.push(this.exitPictureInPicture()),this.isFullscreen()&&r.push(this.exitFullscreen()),this.audioPosterMode()&&r.push(this.audioPosterMode(!1)),n.all(r).then((function(){return t.enableAudioOnlyUI_()}))}return n.resolve().then((function(){return t.disableAudioOnlyUI_()}))}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},n.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.audioPosterMode=function(e){var t=this;if("boolean"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var n=this.options_.Promise||a.a.Promise;return n?e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.disablePosterModeUI_()})):e?(this.audioOnlyMode()&&this.audioOnlyMode(!1),void this.enablePosterModeUI_()):void this.disablePosterModeUI_()},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),It(this)&&this.trigger("languagechange"))},n.languages=function(){return Vt(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Vt(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=Vt(r)).player=void 0,e.tracks[n]=r}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new sn(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<Di.length;n++){var r=Di[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(Ni[e]),this.addClass(Ni[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e?Z(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Z({},Li,e),this.updateCurrentBreakpoint_(),Z(this.breakpoints_))},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Ni[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Vt(e);var r=this.cache_.media,i=r.artwork,a=r.poster,o=r.src,s=r.textTracks;!i&&a&&(this.cache_.media.artwork=[{src:a,type:Yn(a)}]),o&&this.src(o),a&&this.poster(a),Array.isArray(s)&&s.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Yn(t.poster)}]),t}return Vt(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=Fe(e),r=n["data-setup"];if(Ne(e,"vjs-fill")&&(n.fill=!0),Ne(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=v()(r||"{}"),a=i[0],o=i[1];a&&K.error(a),Z(n,o)}if(Z(t,n),e.hasChildNodes())for(var s=e.childNodes,l=0,c=s.length;l<c;l++){var u=s[l],d=u.nodeName.toLowerCase();"source"===d?t.sources.push(Fe(u)):"track"===d&&t.tracks.push(Fe(u))}return t},n.flexNotSupported_=function(){var e=s.a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},n.playbackRates=function(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((function(e){return"number"==typeof e}))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},t}(Kt);Ln.names.forEach((function(e){var t=Ln[e];Ri.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Ri.prototype.crossorigin=Ri.prototype.crossOrigin,Ri.players={};var Bi=a.a.navigator;Ri.prototype.options_={techOrder:Rn.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Bi&&(Bi.languages&&Bi.languages[0]||Bi.userLanguage||Bi.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Ri.prototype[e]=function(){return this.techGet_(e)}})),Mi.forEach((function(e){Ri.prototype["handleTech"+zt(e)+"_"]=function(){return this.trigger(e)}})),Kt.registerComponent("Player",Ri);var ji={},Fi=function(e){return ji.hasOwnProperty(e)},Ui=function(e){return Fi(e)?ji[e]:void 0},Hi=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},zi=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},Vi=function(e,t){return t.prototype.name=e,function(){zi(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=E()(t,[this].concat(r));return this[e]=function(){return a},zi(this,a.getEventHash()),a}},Wi=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),jt(this),delete this.trigger,Ut(this,this.constructor.defaultState),Hi(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),_t(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=Vi(e,ji[e])},e.isBasic=function(t){var n="string"==typeof t?Ui(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Fi(t))K.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Ri.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return ji[t]=n,"plugin"!==t&&(e.isBasic(n)?Ri.prototype[t]=function(e,t){var n=function(){zi(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Hi(this,e),zi(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):Ri.prototype[t]=Vi(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");Fi(e)&&(delete ji[e],delete Ri.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(ji)),e.forEach((function(e){var n=Ui(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=Ui(e);return t&&t.VERSION||""},e}();Wi.getPlugin=Ui,Wi.BASE_PLUGIN_NAME="plugin",Wi.registerPlugin("plugin",Wi),Ri.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Ri.prototype.hasPlugin=function(e){return!!Fi(e)};var Gi=!1,qi=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Yi(e,t,n){var r=Yi.getPlayer(e);if(r)return t&&K.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?tt("#"+qi(e)):e;if(!xe(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||K.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(i.parentNode&&i.parentNode.hasAttribute("data-vjs-player")?i.parentNode:i).cloneNode(!0)),U("beforesetup").forEach((function(e){var n=e(i,Vt(t));ee(n)&&!Array.isArray(n)?t=Vt(t,n):K.error("please return an object in beforesetup hooks")}));var a=Kt.getComponent("Player");return r=new a(i,t,n),U("setup").forEach((function(e){return e(r)})),r}if(Yi.hooks_=F,Yi.hooks=U,Yi.hook=function(e,t){U(e,t)},Yi.hookOnce=function(e,t){U(e,[].concat(t).map((function(t){return function n(){return H(e,n),t.apply(void 0,arguments)}})))},Yi.removeHook=H,!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE&&ke()){var Ki=tt(".vjs-styles-defaults");if(!Ki){Ki=ct("vjs-styles-defaults");var Xi=tt("head");Xi&&Xi.insertBefore(Ki,Xi.firstChild),ut(Ki,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    ")}}ot(1,Yi),Yi.VERSION="7.21.4",Yi.options=Ri.prototype.options_,Yi.getPlayers=function(){return Ri.players},Yi.getPlayer=function(e){var t,n=Ri.players;if("string"==typeof e){var r=qi(e),i=n[r];if(i)return i;t=tt("#"+r)}else t=e;if(xe(t)){var a=t,o=a.player,s=a.playerId;if(o||n[s])return o||n[s]}},Yi.getAllPlayers=function(){return Object.keys(Ri.players).map((function(e){return Ri.players[e]})).filter(Boolean)},Yi.players=Ri.players,Yi.getComponent=Kt.getComponent,Yi.registerComponent=function(e,t){Rn.isTech(t)&&K.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Kt.registerComponent.call(Kt,e,t)},Yi.getTech=Rn.getTech,Yi.registerTech=Rn.registerTech,Yi.use=function(e,t){Bn[e]=Bn[e]||[],Bn[e].push(t)},Object.defineProperty(Yi,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Yi.middleware,"TERMINATOR",{value:Fn,writeable:!1,enumerable:!0}),Yi.browser=Se,Yi.TOUCH_ENABLED=ye,Yi.extend=function(e,t){void 0===t&&(t={}),Gi||(K.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),Gi=!0);var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),C()(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Yi.mergeOptions=Vt,Yi.bind=Tt,Yi.registerPlugin=Wi.registerPlugin,Yi.deregisterPlugin=Wi.deregisterPlugin,Yi.plugin=function(e,t){return K.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Wi.registerPlugin(e,t)},Yi.getPlugins=Wi.getPlugins,Yi.getPlugin=Wi.getPlugin,Yi.getPluginVersion=Wi.getPluginVersion,Yi.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Yi.options.languages=Vt(Yi.options.languages,((n={})[e]=t,n)),Yi.options.languages[e]},Yi.log=K,Yi.createLogger=X,Yi.createTimeRange=Yi.createTimeRanges=$t,Yi.formatTime=cr,Yi.setFormatTime=function(e){lr=e},Yi.resetFormatTime=function(){lr=sr},Yi.parseUrl=wn,Yi.isCrossOrigin=Cn,Yi.EventTarget=xt,Yi.on=yt,Yi.one=wt,Yi.off=At,Yi.trigger=_t,Yi.xhr=y.a,Yi.TextTrack=On,Yi.AudioTrack=In,Yi.VideoTrack=Mn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Yi[e]=function(){return K.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),rt[e].apply(null,arguments)}})),Yi.computedStyle=ne,Yi.dom=rt,Yi.url=Tn,Yi.defineLazyProperty=Oi,Yi.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});
/*! @name @videojs/http-streaming @version 2.16.2 @license Apache-2.0 */
var Qi=T.a,$i=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},Ji=function(e){return Yi.log.debug?Yi.log.debug.bind(Yi,"VHS:",e+" >"):function(){}},Zi=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&r.push([e.start(n),e.end(n)]);return Yi.createTimeRanges(r)},ea=function(e,t){return Zi(e,(function(e,n){return e-.1<=t&&n+.1>=t}))},ta=function(e,t){return Zi(e,(function(e){return e-1/30>=t}))},na=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},ra=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},ia=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},aa=function(e,t){var n=0;if(!e||!e.length)return n;for(var r=0;r<e.length;r++){var i=e.start(r),a=e.end(r);t>a||(n+=t>i&&t<=a?a-t:a-i)}return n},oa=Yi.createTimeRange,sa=function(e,t){if(!t.preload)return t.duration;var n=0;return(t.parts||[]).forEach((function(e){n+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(n+=e.partTargetDuration)})),n},la=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(r,i){e.push({duration:r.duration,segmentIndex:n,partIndex:i,part:r,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e}),[])},ca=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},ua=function(e){var t=e.preloadSegment;if(t){var n=t.parts,r=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return r+=n&&n.length?n.length:0}},da=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=ca(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},ha=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=sa(e,i),void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var i=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=sa(e,n),void 0!==n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return i.precise?i.result:r.result+n},fa=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return a.a.Infinity}return ha(e,t,n)},pa=function(e){var t=e.defaultDuration,n=e.durationList,r=e.startIndex,i=e.endIndex,a=0;if(r>i){var o=[i,r];r=o[0],i=o[1]}if(r<0){for(var s=r;s<Math.min(0,i);s++)a+=t;r=0}for(var l=r;l<i;l++)a+=n[l].duration;return a},ma=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return fa(e);if(null===t)return null;t=t||0;var i=ha(e,e.mediaSequence+e.segments.length,t);return n&&(i-=r="number"==typeof r?r:da(null,e)),Math.max(0,i)},ga=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},va=function(e){return e.excludeUntil&&e.excludeUntil===1/0},ba=function(e){var t=ga(e);return!e.disabled&&!t},ya=function(e,t){return t.attributes&&t.attributes[e]},Aa=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!ba(e)&&(e.attributes.BANDWIDTH||0)<n})).length},_a=function(e,t){return!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri))))},wa=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var i in n){for(var a in n[i])if(r=t(n[i][a]))break;if(r)break}return!!r},Ea=function(e){if(!e||!e.playlists||!e.playlists.length)return wa(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var n=e.playlists[t],r=n.attributes&&n.attributes.CODECS;return r&&r.split(",").every((function(e){return Object(x.f)(e)}))?"continue":wa(e,(function(e){return _a(n,e)}))?"continue":{v:!1}},n=0;n<e.playlists.length;n++){var r=t(n);if("continue"!==r&&"object"==typeof r)return r.v}return!0},Sa={liveEdgeDelay:da,duration:fa,seekable:function(e,t,n){var r=t||0,i=ma(e,t,!0,n);return null===i?oa():oa(r,i)},getMediaInfoForTime:function(e){for(var t=e.playlist,n=e.currentTime,r=e.startingSegmentIndex,i=e.startingPartIndex,a=e.startTime,o=e.experimentalExactManifestTimings,s=n-a,l=la(t),c=0,u=0;u<l.length;u++){var d=l[u];if(r===d.segmentIndex&&("number"!=typeof i||"number"!=typeof d.partIndex||i===d.partIndex)){c=u;break}}if(s<0){if(c>0)for(var h=c-1;h>=0;h--){var f=l[h];if(s+=f.duration,o){if(s<0)continue}else if(s+1/30<=0)continue;return{partIndex:f.partIndex,segmentIndex:f.segmentIndex,startTime:a-pa({defaultDuration:t.targetDuration,durationList:l,startIndex:c,endIndex:h})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n}}if(c<0){for(var p=c;p<0;p++)if((s-=t.targetDuration)<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n};c=0}for(var m=c;m<l.length;m++){var g=l[m];if(s-=g.duration,o){if(s>0)continue}else if(s-1/30>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a+pa({defaultDuration:t.targetDuration,durationList:l,startIndex:c,endIndex:m})}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:n}},isEnabled:ba,isDisabled:function(e){return e.disabled},isBlacklisted:ga,isIncompatible:va,playlistEnd:ma,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:ya,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),ya("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:Aa,isAudioOnly:Ea,playlistMatch:_a,segmentDurationWithParts:sa},Ca=Yi.log,Ta=function(e,t){return e+"-"+t},ka=function(e,t,n){return"placeholder-uri-"+e+"-"+t+"-"+n},xa=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(n){if(e.mediaGroups[n])for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var a=e.mediaGroups[n][r][i];t(a,n,r,i)}}))},Oa=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},Ia=function(e,t,n){void 0===n&&(n=ka),e.uri=t;for(var r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){var i="placeholder-uri-"+r;e.playlists[r].uri=i}var a=Ea(e);xa(e,(function(t,r,i,o){if(!t.playlists||!t.playlists.length){if(a&&"AUDIO"===r&&!t.uri)for(var s=0;s<e.playlists.length;s++){var l=e.playlists[s];if(l.attributes&&l.attributes.AUDIO&&l.attributes.AUDIO===i)return}t.playlists=[c()({},t)]}t.playlists.forEach((function(t,a){var s=n(r,i,o,t),l=Ta(a,s);t.uri?t.resolvedUri=t.resolvedUri||Qi(e.uri,t.uri):(t.uri=0===a?s:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Oa({playlist:n,id:Ta(t,n.uri)}),n.resolvedUri=Qi(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||Ca.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){xa(e,(function(t){t.uri&&(t.resolvedUri=Qi(e.uri,t.uri))}))}(e)},Ma=Yi.mergeOptions,Pa=Yi.EventTarget,Da=function(e,t){if(!e)return t;var n=Ma(e,t);if(e.preloadHints&&!t.preloadHints&&delete n.preloadHints,e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(var r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(n.parts[r]=Ma(e.parts[r],t.parts[r]));return!e.skipped&&t.skipped&&(n.skipped=!1),e.preload&&!t.preload&&(n.preload=!1),n},Na=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Qi(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Qi(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Qi(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Qi(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Qi(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Qi(t,e.uri))}))},La=function(e){var t=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints)for(var r=0;r<n.preloadHints.length;r++)if("MAP"===n.preloadHints[r].type)return t;n.duration=e.targetDuration,n.preload=!0,t.push(n)}return t},Ra=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment},Ba=function(e,t,n){void 0===n&&(n=Ra);var r=Ma(e,{}),i=r.playlists[t.id];if(!i)return null;if(n(i,t))return null;t.segments=La(t);var a=Ma(i,t);if(a.preloadSegment&&!t.preloadSegment&&delete a.preloadSegment,i.segments){if(t.skip){t.segments=t.segments||[];for(var o=0;o<t.skip.skippedSegments;o++)t.segments.unshift({skipped:!0})}a.segments=function(e,t,n){var r=e.slice(),i=t.slice();n=n||0;for(var a,o=[],s=0;s<i.length;s++){var l=r[s+n],c=i[s];l?(a=l.map||a,o.push(Da(l,c))):(a&&!c.map&&(c.map=a),o.push(c))}return o}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)}a.segments.forEach((function(e){Na(e,a.resolvedUri)}));for(var s=0;s<r.playlists.length;s++)r.playlists[s].id===t.id&&(r.playlists[s]=a);return r.playlists[t.id]=a,r.playlists[t.uri]=a,xa(e,(function(e,n,r,i){if(e.playlists)for(var o=0;o<e.playlists.length;o++)t.id===e.playlists[o].id&&(e.playlists[o]=a)})),r},ja=function(e,t){var n=e.segments||[],r=n[n.length-1],i=r&&r.parts&&r.parts[r.parts.length-1],a=i&&i.duration||r&&r.duration;return t&&a?1e3*a:500*(e.partTargetDuration||e.targetDuration||10)},Fa=function(e){function t(t,n,r){var i;if(void 0===r&&(r={}),i=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");i.logger_=Ji("PlaylistLoader");var a=r,o=a.withCredentials,s=void 0!==o&&o,l=a.handleManifestRedirects,c=void 0!==l&&l;i.src=t,i.vhs_=n,i.withCredentials=s,i.handleManifestRedirects=c;var u=n.options_;return i.customTagParsers=u&&u.customTagParsers||[],i.customTagMappers=u&&u.customTagMappers||[],i.experimentalLLHLS=u&&u.experimentalLLHLS||!1,Yi.browser.IE_VERSION&&(i.experimentalLLHLS=!1),i.state="HAVE_NOTHING",i.handleMediaupdatetimeout_=i.handleMediaupdatetimeout_.bind(f()(i)),i.on("mediaupdatetimeout",i.handleMediaupdatetimeout_),i}m()(t,e);var n=t.prototype;return n.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),n=Qi(this.master.uri,t.uri);this.experimentalLLHLS&&(n=function(e,t){if(t.endList||!t.serverControl)return e;var n={};if(t.serverControl.canBlockReload){var r=t.preloadSegment,i=t.mediaSequence+t.segments.length;if(r){var o=r.parts||[],s=ua(t)-1;s>-1&&s!==o.length-1&&(n._HLS_part=s),(s>-1||o.length)&&i--}n._HLS_msn=i}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var l=new a.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&l.searchParams.set(e,n[e])})),e=l.toString()}return e}(n,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials},(function(t,n){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}))}},n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.parseManifest_=function(e){var t=this,n=e.url;return function(e){var t=e.onwarn,n=e.oninfo,r=e.manifestString,i=e.customTagParsers,a=void 0===i?[]:i,o=e.customTagMappers,s=void 0===o?[]:o,l=e.experimentalLLHLS,c=new k.a;t&&c.on("warn",t),n&&c.on("info",n),a.forEach((function(e){return c.addParser(e)})),s.forEach((function(e){return c.addTagMapper(e)})),c.push(r),c.end();var u=c.manifest;if(l||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){u.hasOwnProperty(e)&&delete u[e]})),u.segments&&u.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!u.targetDuration){var d=10;u.segments&&u.segments.length&&(d=u.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+d),u.targetDuration=d}var h=ca(u);if(h.length&&!u.partTargetDuration){var f=h.reduce((function(e,t){return Math.max(e,t.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+f),Ca.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),u.partTargetDuration=f}return u}({onwarn:function(e){var r=e.message;return t.logger_("m3u8-parser warn for "+n+": "+r)},oninfo:function(e){var r=e.message;return t.logger_("m3u8-parser info for "+n+": "+r)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=e.playlistString,n=e.playlistObject,r=e.url,i=e.id;this.request=null,this.state="HAVE_METADATA";var a=n||this.parseManifest_({url:r,manifestString:t});a.lastRequest=Date.now(),Oa({playlist:a,uri:r,id:i});var o=Ba(this.master,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,o?(this.master=o,this.media_=this.master.playlists[i]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(ja(this.media(),!!o)),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(a.a.clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=a.a.setTimeout(this.media.bind(this,e,!1),r)}else{var i=this.state,o=!this.media_||e.id!==this.media_.id,s=this.master.playlists[e.id];if(s&&s.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),"HAVE_MASTER"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(ja(e,!0)),o){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=$i(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,i);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===i?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.mediaUpdateTimeout&&(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;this.mediaUpdateTimeout&&(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var n=this.media();if(e){var r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=a.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=a.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=$i(e.handleManifestRedirects,e.src,n);var r=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Ia(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=La(e),e.segments.forEach((function(t){Na(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||a.a.location.href;this.master=function(e,t){var n=Ta(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:a.a.location.href,resolvedUri:a.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Pa),Ua=Yi.xhr,Ha=Yi.mergeOptions,za=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},Va=function(){var e=function e(t,n){t=Ha({timeout:45e3},t);var r=e.beforeRequest||Yi.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var a=(!0===Yi.Vhs.xhr.original?Ua:Yi.Vhs.xhr)(t,(function(e,t){return za(a,e,t,n)})),o=a.abort;return a.abort=function(){return a.aborted=!0,o.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},Wa=function(e){var t,n={};return e.byterange&&(n.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"==typeof t.offset||"bigint"==typeof t.length?a.a.BigInt(t.offset)+a.a.BigInt(t.length)-a.a.BigInt(1):t.offset+t.length-1)),n},Ga=function(e,t){return e.start(t)+"-"+e.end(t)},qa=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Ya=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ka=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];Object(I.e)(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},Xa=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Qa=function(e){return e.resolvedUri},$a=function(e){for(var t=Array.prototype.slice.call(e),n="",r=0;r<t.length/16;r++)n+=t.slice(16*r,16*r+16).map(qa).join("")+" "+t.slice(16*r,16*r+16).map(Ya).join("")+"\n";return n},Ja=Object.freeze({__proto__:null,createTransferableMessage:Ka,initSegmentId:Xa,segmentKeyId:Qa,hexDump:$a,tagDump:function(e){var t=e.bytes;return $a(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=Ga(e,t)+" ";return n}}),Za=function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,r=0,i=0;i<t.segments.length&&!(e<=(r=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={mediaSeconds:r},s=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,a.segment);return s&&(o.programDateTime=s.toISOString()),i(null,o)},eo=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,a=void 0===i?2:i,o=t.seekTo,s=t.pauseAfterSeek,l=void 0===s||s,c=t.tech,u=t.callback;if(!u)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!o)return u({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!c.hasStarted_)return u({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++){if(!e.segments[t].dateTimeObject)return!1}return!0}(r))return u({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var d=function(e,t){var n;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1;i++){if(r=t.segments[i],n<t.segments[i+1].dateTimeObject)break}var a,o=t.segments[t.segments.length-1],s=o.dateTimeObject,l=o.videoTimingInfo?(a=o.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:o.duration+.25*o.duration;return n>new Date(s.getTime()+1e3*l)?null:(n>s&&(r=o),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Sa.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!d)return u({message:n+" was not found in the stream"});var h=d.segment,f=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===d.type)return 0===a?u({message:n+" is not buffered yet. Try again"}):(o(d.estimatedStart+f),void c.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:a-1,seekTo:o,pauseAfterSeek:l,tech:c,callback:u})})));var p=h.start+f;c.one("seeked",(function(){return u(null,c.currentTime())})),l&&c.pause(),o(p)},to=function(e,t){if(4===e.readyState)return t()},no=Yi.EventTarget,ro=Yi.mergeOptions,io=function(e,t){if(!Ra(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n<e.segments.length;n++){var r=e.segments[n],i=t.segments[n];if(r.uri!==i.uri)return!1;if(r.byterange||i.byterange){var a=r.byterange,o=i.byterange;if(a&&!o||!a&&o)return!1;if(a.offset!==o.offset||a.length!==o.length)return!1}}return!0},ao=function(e,t,n,r){return"placeholder-uri-"+e+"-"+t+"-"+(r.attributes.NAME||n)},oo=function(e,t,n){for(var r=!0,i=ro(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a<t.playlists.length;a++){var o=t.playlists[a];if(o.sidx){var s=Object(M.b)(o.sidx);n&&n[s]&&n[s].sidx&&Object(M.a)(o,n[s].sidx,o.sidx.resolvedUri)}var l=Ba(i,o,io);l&&(i=l,r=!1)}return xa(t,(function(e,t,n,a){if(e.playlists&&e.playlists.length){var o=e.playlists[0].id,s=Ba(i,e.playlists[0],io);s&&(a in(i=s).mediaGroups[t][n]||(i.mediaGroups[t][n][a]=e),i.mediaGroups[t][n][a].playlists[0]=i.playlists[o],r=!1)}})),function(e,t){xa(e,(function(n,r,i,a){a in t.mediaGroups[r][i]||delete e.mediaGroups[r][i][a]}))}(i,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i},so=function(e,t){var n,r,i={};for(var a in e){var o=e[a].sidx;if(o){var s=Object(M.b)(o);if(!t[s])break;var l=t[s].sidxInfo;n=l,r=o,(Boolean(!n.map&&!r.map)||Boolean(n.map&&r.map&&n.map.byterange.offset===r.map.byterange.offset&&n.map.byterange.length===r.map.byterange.length))&&n.uri===r.uri&&n.byterange.offset===r.byterange.offset&&n.byterange.length===r.byterange.length&&(i[s]=t[s])}}return i},lo=function(e){function t(t,n,r,i){var a;void 0===r&&(r={}),(a=e.call(this)||this).masterPlaylistLoader_=i||f()(a),i||(a.isMaster_=!0);var o=r,s=o.withCredentials,l=void 0!==s&&s,c=o.handleManifestRedirects,u=void 0!==c&&c;if(a.vhs_=n,a.withCredentials=l,a.handleManifestRedirects=u,!t)throw new Error("A non-empty playlist URL or object is required");return a.on("minimumUpdatePeriod",(function(){a.refreshXml_()})),a.on("mediaupdatetimeout",(function(){a.refreshMedia_(a.media().id)})),a.state="HAVE_NOTHING",a.loadedPlaylists_={},a.logger_=Ji("DashPlaylistLoader"),a.isMaster_?(a.masterPlaylistLoader_.srcUrl=t,a.masterPlaylistLoader_.sidxMapping_={}):a.childPlaylist_=t,a}m()(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,i=e.sidx&&Object(M.b)(e.sidx);if(e.sidx&&i&&!this.masterPlaylistLoader_.sidxMapping_[i]){var o=$i(this.handleManifestRedirects,e.sidx.resolvedUri),s=function(a,o){if(!r.requestErrored_(a,o,t)){var s,l=r.masterPlaylistLoader_.sidxMapping_;try{s=D()(Object(I.k)(o.response).subarray(8))}catch(e){return void r.requestErrored_(e,o,t)}return l[i]={sidxInfo:e.sidx,sidx:s},Object(M.a)(e,s,e.sidx.resolvedUri),n(!0)}};this.request=function(e,t,n){var r,i=[],a=!1,o=function(e,t,r,i){return t.abort(),a=!0,n(e,t,r,i)},s=function(e,t){if(!a){if(e)return o(e,t,"",i);var n=t.responseText.substring(i&&i.byteLength||0,t.responseText.length);if(i=Object(I.d)(i,Object(I.h)(n,!0)),r=r||Object(N.a)(i),i.length<10||r&&i.length<r+2)return to(t,(function(){return o(e,t,"",i)}));var s=Object(L.a)(i);return"ts"===s&&i.length<188?to(t,(function(){return o(e,t,"",i)})):!s&&i.length<376?to(t,(function(){return o(e,t,"",i)})):o(null,t,s,i)}},l=t({uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,za(e,null,{statusCode:e.status},s)}))}},(function(e,t){return za(l,e,t,s)}));return l}(o,this.vhs_.xhr,(function(t,n,i,a){if(t)return s(t,n);if(!i||"mp4"!==i)return s({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+o,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var l=e.sidx.byterange,c=l.offset,u=l.length;if(a.length>=u+c)return s(t,{response:a.subarray(c,c+u),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:o,responseType:"arraybuffer",headers:Wa({byterange:e.sidx.byterange})},s)}))}else this.mediaRequest_=a.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},a.a.clearTimeout(this.minimumUpdatePeriodTimeout_),a.a.clearTimeout(this.mediaRequest_),a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(a.a.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=a.a.setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=$i(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=Object(M.d)(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Qi(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var a;a="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,r,i,a,o,s=this.masterPlaylistLoader_.master,l=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:s},t=e.masterXml,n=e.srcUrl,r=e.clientOffset,i=e.sidxMapping,a=e.previousManifest,o=Object(M.c)(t,{manifestUri:n,clientOffset:r,sidxMapping:i,previousManifest:a}),Ia(o,n,ao),o);s&&(l=oo(s,l,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=l||s;var c=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return c&&c!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=c),(!s||l&&l.minimumUpdatePeriod!==s.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(l)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(a.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=a.a.setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var r,i,a;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,a=so(r.playlists,i),xa(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var o=e.playlists;a=ro(a,so(o,i))}})),a),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];if(r?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=a.a.setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),ja(t.media(),Boolean(r))))}()}this.trigger("loadedplaylist")},t}(no),co={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},uo=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},ho=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=uo(new Worker(t));n.objURL=t;var r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},n}},fo=function(e){return"var browserWorkerPolyFill = "+uo.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},po=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},mo=ho(fo(po((function(){var t=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,a;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,a)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger("data",e)},t.prototype.flush=function(e){this.trigger("done",e)},t.prototype.partialFlush=function(e){this.trigger("partialdone",e)},t.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},t.prototype.reset=function(e){this.trigger("reset",e)};var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x,O,I,M,P,D,N,L,R,B,j,F,U,H,z=t,V=Math.pow(2,32),W={getUint64:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(t=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:n.getUint32(0)*V+n.getUint32(4)},MAX_UINT32:V},G=W.MAX_UINT32;!function(){var e;if(E={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in E)E.hasOwnProperty(e)&&(E[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);S=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),T=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),C=new Uint8Array([0,0,0,1]),k=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),x=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),O={video:k,audio:x},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),M=new Uint8Array([0,0,0,0,0,0,0,0]),D=new Uint8Array([0,0,0,0,0,0,0,0]),N=D,L=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),R=D,I=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},r=function(){return n(E.dinf,n(E.dref,P))},i=function(e){return n(E.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return n(E.hdlr,O[e])},m=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(E.mdhd,t)},p=function(e){return n(E.mdia,m(e),g(e.type),s(e))},o=function(e){return n(E.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},s=function(e){return n(E.minf,"video"===e.type?n(E.vmhd,I):n(E.smhd,M),r(),b(e))},l=function(e,t){for(var r=[],i=t.length;i--;)r[i]=A(t[i]);return n.apply(null,[E.moof,o(e)].concat(r))},c=function(e){for(var t=e.length,r=[];t--;)r[t]=h(e[t]);return n.apply(null,[E.moov,d(4294967295)].concat(r).concat(u(e)))},u=function(e){for(var t=e.length,r=[];t--;)r[t]=_(e[t]);return n.apply(null,[E.mvex].concat(r))},d=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(E.mvhd,t)},v=function(e){var t,r,i=e.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)t=i[r].flags,a[r+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return n(E.sdtp,a)},b=function(e){return n(E.stbl,y(e),n(E.stts,R),n(E.stsc,N),n(E.stsz,L),n(E.stco,D))},y=function(e){return n(E.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?B(e):j(e))},B=function(e){var t,r,i=e.sps||[],a=e.pps||[],o=[],s=[];for(t=0;t<i.length;t++)o.push((65280&i[t].byteLength)>>>8),o.push(255&i[t].byteLength),o=o.concat(Array.prototype.slice.call(i[t]));for(t=0;t<a.length;t++)s.push((65280&a[t].byteLength)>>>8),s.push(255&a[t].byteLength),s=s.concat(Array.prototype.slice.call(a[t]));if(r=[E.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(E.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],o,[a.length],s))),n(E.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],c=e.sarRatio[1];r.push(n(E.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return n.apply(null,r)},j=function(e){return n(E.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},f=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(E.tkhd,t)},A=function(e){var t,r,i,a,o,s;return t=n(E.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/G),s=Math.floor(e.baseMediaDecodeTime%G),r=n(E.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(i=w(e,92),n(E.traf,t,r,i)):(a=v(e),i=w(e,a.length+92),n(E.traf,t,r,i,a))},h=function(e){return e.duration=e.duration||4294967295,n(E.trak,f(e),p(e))},_=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(E.trex,t)},H=function(e,t){var n=0,r=0,i=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|r|i|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},U=function(e,t){var r,i,a,o,s,l;for(t+=20+16*(o=e.samples||[]).length,a=H(o,t),(i=new Uint8Array(a.length+16*o.length)).set(a),r=a.length,l=0;l<o.length;l++)s=o[l],i[r++]=(4278190080&s.duration)>>>24,i[r++]=(16711680&s.duration)>>>16,i[r++]=(65280&s.duration)>>>8,i[r++]=255&s.duration,i[r++]=(4278190080&s.size)>>>24,i[r++]=(16711680&s.size)>>>16,i[r++]=(65280&s.size)>>>8,i[r++]=255&s.size,i[r++]=s.flags.isLeading<<2|s.flags.dependsOn,i[r++]=s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,i[r++]=61440&s.flags.degradationPriority,i[r++]=15&s.flags.degradationPriority,i[r++]=(4278190080&s.compositionTimeOffset)>>>24,i[r++]=(16711680&s.compositionTimeOffset)>>>16,i[r++]=(65280&s.compositionTimeOffset)>>>8,i[r++]=255&s.compositionTimeOffset;return n(E.trun,i)},F=function(e,t){var r,i,a,o,s,l;for(t+=20+8*(o=e.samples||[]).length,a=H(o,t),(r=new Uint8Array(a.length+8*o.length)).set(a),i=a.length,l=0;l<o.length;l++)s=o[l],r[i++]=(4278190080&s.duration)>>>24,r[i++]=(16711680&s.duration)>>>16,r[i++]=(65280&s.duration)>>>8,r[i++]=255&s.duration,r[i++]=(4278190080&s.size)>>>24,r[i++]=(16711680&s.size)>>>16,r[i++]=(65280&s.size)>>>8,r[i++]=255&s.size;return n(E.trun,r)},w=function(e,t){return"audio"===e.type?F(e,t):U(e,t)};a=function(){return n(E.ftyp,S,C,S,T)};var q,Y,K,X,Q,$,J,Z,ee=function(e){return n(E.mdat,e)},te=l,ne=function(e){var t,n=a(),r=c(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},re=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ie=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i},ae=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},oe=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},se=function(e,t){var n,r,i,a,o,s=t||0,l=[];for(n=0;n<e.length;n++)for(a=e[n],r=0;r<a.length;r++)o=a[r],s+=(i=re(o,s)).size,l.push(i);return l},le=function(e){var t,n,r,i,a,o,s=0,l=e.byteLength,c=e.nalCount,u=new Uint8Array(l+4*c),d=new DataView(u.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(a=i[n],r=0;r<a.length;r++)o=a[r],d.setUint32(s,o.data.byteLength),s+=4,u.set(o.data,s),s+=o.data.byteLength;return u},ce=[33,16,5,32,164,27],ue=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],de=function(e){for(var t=[];e--;)t.push(0);return t},he=function(){if(!q){var e={96e3:[ce,[227,64],de(154),[56]],88200:[ce,[231],de(170),[56]],64e3:[ce,[248,192],de(240),[56]],48e3:[ce,[255,192],de(268),[55,148,128],de(54),[112]],44100:[ce,[255,192],de(268),[55,163,128],de(84),[112]],32e3:[ce,[255,192],de(268),[55,234],de(226),[112]],24e3:[ce,[255,192],de(268),[55,255,128],de(268),[111,112],de(126),[224]],16e3:[ce,[255,192],de(268),[55,255,128],de(268),[111,255],de(269),[223,108],de(195),[1,192]],12e3:[ue,de(268),[3,127,248],de(268),[6,255,240],de(268),[13,255,224],de(268),[27,253,128],de(259),[56]],11025:[ue,de(268),[3,127,248],de(268),[6,255,240],de(268),[13,255,224],de(268),[27,255,192],de(268),[55,175,128],de(108),[112]],8e3:[ue,de(268),[3,121,16],de(47),[7]]};t=e,q=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return q};$=function(e,t){return Y(Q(e,t))},J=function(e,t){return K(X(e),t)},Z=function(e,t,n){return X(n?e:e-t)};var fe=9e4,pe=Y=function(e){return 9e4*e},me=(K=function(e,t){return e*t},X=function(e){return e/9e4}),ge=(Q=function(e,t){return e/t},$),ve=J,be=Z,ye=function(e,t,n,r){var i,a,o,s,l,c=0,u=0,d=0;if(t.length&&(i=ge(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(fe/(e.samplerate/1024)),n&&r&&(c=i-Math.max(n,r),d=(u=Math.floor(c/a))*a),!(u<1||d>fe/2))){for((o=he()[e.samplerate])||(o=t[0].data),s=0;s<u;s++)l=t[0],t.splice(0,0,{data:o,dts:l.dts-a,pts:l.pts-a});return e.baseMediaDecodeTime-=Math.floor(ve(d,e.samplerate)),d}},Ae=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},_e=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},we=function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i},Ee=fe,Se=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Ce=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/Ee,n=Math.floor(n)),n},Te=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},ke=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}n.payload=void 0}t+=i,r=0,i=0}return n},xe=function(e){return 181!==e.payload[0]?null:49!=(e.payload[1]<<8|e.payload[2])?null:"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])?null:3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Oe=function(e,t){var n,r,i,a,o=[];if(!(64&t[0]))return o;for(r=31&t[0],n=0;n<r;n++)a={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(a.ccData=t[i+3]<<8|t[i+4],o.push(a));return o},Ie=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},Me=4,Pe=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new ze(0,0),new ze(0,1),new ze(1,0),new ze(1,1)],this.parse708captions_&&(this.cc708Stream_=new Be({captionServices:t.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(Pe.prototype=new z).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=ke(e.escapedRBSP)).payload&&t.payloadType===Me&&(n=xe(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Oe(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Pe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Pe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Pe.prototype.flush=function(){return this.flushStream("flush")},Pe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Pe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Pe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Pe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Pe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Pe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},Pe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var De={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Ne=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Le=function(e){this.windowNum=e,this.reset()};Le.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Le.prototype.getText=function(){return this.rows.join("\n")},Le.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Le.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Le.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Le.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Le.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Re=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new Le(-1),this.windows=[],this.stream=n,"string"==typeof t&&this.createTextDecoder(t)};Re.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new Le(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Re.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Re.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Be=function e(t){t=t||{},e.prototype.init.call(this);var n,r=this,i=t.captionServices||{},a={};Object.keys(i).forEach((function(e){n=i[e],/^SERVICE/.test(e)&&(a[e]=n.encoding)})),this.serviceEncodings=a,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(r.new708Packet(),r.add708Bytes(e)):(null===r.current708Packet&&r.new708Packet(),r.add708Bytes(e))}};Be.prototype=new z,Be.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Be.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},Be.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,a=t[i++];for(e.seq=a>>6,e.sizeCode=63&a;i<t.length;i++)r=31&(a=t[i++]),7===(n=a>>5)&&r>0&&(n=a=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},Be.prototype.pushServiceBlock=function(e,t,n){var r,i=t,a=this.current708Packet.data,o=this.services[e];for(o||(o=this.initService(e,i));i<t+n&&i<a.length;i++)r=a[i],Ne(r)?i=this.handleText(i,o):24===r?i=this.multiByteCharacter(i,o):16===r?i=this.extendedCommands(i,o):128<=r&&r<=135?i=this.setCurrentWindow(i,o):152<=r&&r<=159?i=this.defineWindow(i,o):136===r?i=this.clearWindows(i,o):140===r?i=this.deleteWindows(i,o):137===r?i=this.displayWindows(i,o):138===r?i=this.hideWindows(i,o):139===r?i=this.toggleWindows(i,o):151===r?i=this.setWindowAttributes(i,o):144===r?i=this.setPenAttributes(i,o):145===r?i=this.setPenColor(i,o):146===r?i=this.setPenLocation(i,o):143===r?o=this.reset(i,o):8===r?o.currentWindow.backspace():12===r?o.currentWindow.clearText():13===r?o.currentWindow.pendingNewLine=!0:14===r?o.currentWindow.clearText():141===r&&i++},Be.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Ne(n)&&(e=this.handleText(e,t,{isExtended:!0})),e},Be.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Be.prototype.initService=function(e,t){var n,r,i=this;return(n="SERVICE"+e)in this.serviceEncodings&&(r=this.serviceEncodings[n]),this.services[e]=new Re(e,r,i),this.services[e].init(this.getPts(t),(function(t){i.flushDisplayed(t,i.services[e])})),this.services[e]},Be.prototype.handleText=function(e,t,n){var r,i,a,o,s=n&&n.isExtended,l=n&&n.isMultiByte,c=this.current708Packet.data,u=s?4096:0,d=c[e],h=c[e+1],f=t.currentWindow;return t.textDecoder_&&!s?(l?(i=[d,h],e++):i=[d],r=t.textDecoder_.decode(new Uint8Array(i))):(o=De[a=u|d]||a,r=4096&a&&a===o?"":String.fromCharCode(o)),f.pendingNewLine&&!f.isEmpty()&&f.newLine(this.getPts(e)),f.pendingNewLine=!1,f.addText(r),e},Be.prototype.multiByteCharacter=function(e,t){var n=this.current708Packet.data,r=n[e+1],i=n[e+2];return Ne(r)&&Ne(i)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Be.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},Be.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var a=t.currentWindow;return r=n[++e],a.visible=(32&r)>>5,a.rowLock=(16&r)>>4,a.columnLock=(8&r)>>3,a.priority=7&r,r=n[++e],a.relativePositioning=(128&r)>>7,a.anchorVertical=127&r,r=n[++e],a.anchorHorizontal=r,r=n[++e],a.anchorPoint=(240&r)>>4,a.rowCount=15&r,r=n[++e],a.columnCount=63&r,r=n[++e],a.windowStyle=(56&r)>>3,a.penStyle=7&r,a.virtualRowCount=a.rowCount+1,e},Be.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},Be.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Be.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Be.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=1);return e},Be.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=0);return e},Be.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible^=1);return e},Be.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].clearText();return e},Be.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].reset();return e},Be.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penAttr;return r=n[++e],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},Be.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},Be.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},Be.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var je={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Fe=function(e){return null===e?"":(e=je[e]||e,String.fromCharCode(e))},Ue=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],He=function(){for(var e=[],t=15;t--;)e.push("");return e},ze=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=He();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=He();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=He()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))a=Fe((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Fe((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var o=Ue.indexOf(7968&t);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(e.pts,o)),o!==this.row_&&(this.clearFormatting(e.pts),this.row_=o),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),a=Fe(r),a+=Fe(i),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};ze.prototype=new z,ze.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}}),this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},ze.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=He(),this.nonDisplayed_=He(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},ze.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},ze.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},ze.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},ze.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},ze.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},ze.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},ze.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},ze.prototype.isNormalChar=function(e){return e>=32&&e<=127},ze.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=He(),this.displayed_=He()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},ze.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},ze.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},ze.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},ze.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},ze.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},ze.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var Ve={CaptionStream:Pe,Cea608Stream:ze,Cea708Stream:Be},We={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ge=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},qe=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=Ge(e.dts,r),e.pts=Ge(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};qe.prototype=new z;var Ye,Ke=qe,Xe=Ge,Qe=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},$e=function(e,t,n){return decodeURIComponent(Qe(e,t,n))},Je=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ze={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=$e(e.data,1,t),e.value=$e(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=$e(e.data,1,t),e.url=$e(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(Qe(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Ye=function(e){var t,n={descriptor:e&&e.descriptor},r=0,i=[],a=0;if(Ye.prototype.init.call(this),this.dispatchType=We.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,n,o,s,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(i.push(e),a+=e.data.byteLength,1===i.length&&(r=Je(e.data.subarray(6,10)),r+=10),!(a<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)t.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,a-=i[0].data.byteLength,i.shift();n=10,64&t.data[5]&&(n+=4,n+=Je(t.data.subarray(10,14)),r-=Je(t.data.subarray(16,20)));do{if((o=Je(t.data.subarray(n+4,n+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((s={id:String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),data:t.data.subarray(n+10,n+o+10)}).key=s.id,Ze[s.id]&&(Ze[s.id](s),"com.apple.streaming.transportStreamTimestamp"===s.owner)){var c=s.data,u=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;u*=4,u+=3&c[7],s.timeStamp=u,void 0===t.pts&&void 0===t.dts&&(t.pts=s.timeStamp,t.dts=s.timeStamp),this.trigger("timestamp",s)}t.frames.push(s),n+=10,n+=o}while(n<r);this.trigger("data",t)}}}).prototype=new z;var et,tt,nt,rt=Ye,it=Ke;(et=function(){var e=new Uint8Array(188),t=0;et.prototype.init.call(this),this.push=function(n){var r,i=0,a=188;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;a<r.byteLength;)71!==r[i]||71!==r[a]?(i++,a++):(this.trigger("data",r.subarray(i,a)),i+=188,a+=188);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new z,(tt=function(){var e,t,n,r;tt.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var a=e[i],o=(31&e[i+1])<<8|e[i+2];a===We.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=o:a===We.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=o:a===We.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][o]=a),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=We.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=We.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new z,tt.STREAM_TYPES={h264:27,adts:15},(nt=function(){var e,t=this,n=!1,r={data:[],size:0},i={data:[],size:0},a={data:[],size:0},o=function(e,n,r){var i,a,o=new Uint8Array(e.size),s={type:n},l=0,c=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,l=0;l<e.data.length;l++)a=e.data[l],o.set(a.data,c),c+=a.data.byteLength;var u,d,h,f;d=s,f=(u=o)[0]<<16|u[1]<<8|u[2],d.data=new Uint8Array,1===f&&(d.packetLength=6+(u[4]<<8|u[5]),d.dataAlignmentIndicator=0!=(4&u[6]),192&(h=u[7])&&(d.pts=(14&u[9])<<27|(255&u[10])<<20|(254&u[11])<<12|(255&u[12])<<5|(254&u[13])>>>3,d.pts*=4,d.pts+=(6&u[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&u[14])<<27|(255&u[15])<<20|(254&u[16])<<12|(255&u[17])<<5|(254&u[18])>>>3,d.dts*=4,d.dts+=(6&u[18])>>>1)),d.data=u.subarray(9+u[8])),i="video"===n||s.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",s)}};nt.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var e,t;switch(s.streamType){case We.H264_STREAM_TYPE:e=r,t="video";break;case We.ADTS_STREAM_TYPE:e=i,t="audio";break;case We.METADATA_STREAM_TYPE:e=a,t="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(s),e.size+=s.data.byteLength},pmt:function(){var r={type:"metadata",tracks:[]};null!==(e=s.programMapTable).video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",r)}})[s.type]()},this.reset=function(){r.size=0,r.data.length=0,i.size=0,i.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(r,"video"),o(i,"audio"),o(a,"timed-metadata")},this.flush=function(){if(!n&&e){var r={type:"metadata",tracks:[]};null!==e.video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",r)}n=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new z;var at={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:et,TransportParseStream:tt,ElementaryStream:nt,TimestampRolloverStream:it,CaptionStream:Ve.CaptionStream,Cea608Stream:Ve.Cea608Stream,Cea708Stream:Ve.Cea708Stream,MetadataStream:rt};for(var ot in We)We.hasOwnProperty(ot)&&(at[ot]=We[ot]);var st,lt=at,ct=fe,ut=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,n=0;st.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+n+" outside syncword"})},this.push=function(r){var i,a,o,s,l,c=0;if(e||(n=0),"audio"===r.type){var u;for(t&&t.length?(o=t,(t=new Uint8Array(o.byteLength+r.data.byteLength)).set(o),t.set(r.data,o.byteLength)):t=r.data;c+7<t.length;)if(255===t[c]&&240==(246&t[c+1])){if("number"==typeof u&&(this.skipWarn_(u,c),u=null),a=2*(1&~t[c+1]),i=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(s=1024*(1+(3&t[c+6])))*ct/ut[(60&t[c+2])>>>2],t.byteLength-c<i)break;this.trigger("data",{pts:r.pts+n*l,dts:r.dts+n*l,sampleCount:s,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:ut[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+a,c+i)}),n++,c+=i}else"number"!=typeof u&&(u=c),c++;"number"==typeof u&&(this.skipWarn_(u,c),u=null),t=t.subarray(c)}},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new z;var dt,ht,ft,pt=st,mt=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,a=new Uint8Array(4),o=Math.min(4,t);if(0===o)throw new Error("no bytes available");a.set(e.subarray(i,i+o)),n=new DataView(a.buffer).getUint32(0),r=8*o,t-=o},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),a=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?a<<i|this.readBits(i):a},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ht=function(){var e,t,n=0;ht.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var a=t.byteLength;n<a-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<a;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<a);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new z,ft={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(dt=function(){var e,t,n,r,i,a,o,s=new ht;dt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,s.push(e))},s.on("data",(function(o){var s={trackId:t,pts:n,dts:r,data:o,nalUnitTypeCode:31&o[0]};switch(s.nalUnitTypeCode){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(o.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(o.subarray(1)),s.config=a(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",s)})),s.on("done",(function(){e.trigger("done")})),s.on("partialdone",(function(){e.trigger("partialdone")})),s.on("reset",(function(){e.trigger("reset")})),s.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){s.flush()},this.partialFlush=function(){s.partialFlush()},this.reset=function(){s.reset()},this.endTimeline=function(){s.endTimeline()},o=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},a=function(e){var t,n,r,i,a,s,l,c,u,d,h,f,p=0,m=0,g=0,v=0,b=[1,1];if(n=(t=new mt(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ft[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,f=0;f<h;f++)t.readBoolean()&&o(f<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),f=0;f<l;f++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),u=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(p=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}b&&(b[0],b[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:16*(c+1)-2*p-2*m,height:(2-d)*(u+1)*16-2*g-2*v,sarRatio:b}}}).prototype=new z;var gt,vt={H264Stream:dt,NalByteStream:ht},bt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},At=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},_t={isLikelyAacData:function(e){var t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=yt(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:yt,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return bt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=At(e.subarray(10,14)));do{if((n=At(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i))){var a=r.subarray(i+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(gt=function(){var e=new Uint8Array,t=0;gt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,a,o,s=0,l=0;for(e.length?(o=e.length,(e=new Uint8Array(n.byteLength+o)).set(e.subarray(0,o)),e.set(n,o)):e=n;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!=(255&e[l])||240!=(240&e[l+1]))l++;else{if(e.length-l<7)break;if(l+(s=_t.parseAdtsSize(e,l))>e.length)break;a={type:"audio",data:e.subarray(l,l+s),pts:t,dts:t},this.trigger("data",a),l+=s}else{if(e.length-l<10)break;if(l+(s=_t.parseId3TagSize(e,l))>e.length)break;i={type:"timed-metadata",data:e.subarray(l,l+s)},this.trigger("data",i),l+=s}r=e.length-l,e=r>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new z;var wt,Et,St,Ct,Tt=gt,kt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],xt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ot=vt.H264Stream,It=_t.isLikelyAacData,Mt=fe,Pt=function(e,t){t.stream=e,this.trigger("log",t)},Dt=function(e,t){for(var n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];"headOfPipeline"!==i&&t[i].on&&t[i].on("log",Pt.bind(e,i))}},Nt=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Lt=function(e,t,n,r,i,a){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:a,baseMediaDecodeTime:e}};(Et=function(e,t){var n,r=[],i=0,a=0,o=1/0;n=(t=t||{}).firstSequenceNumber||0,Et.prototype.init.call(this),this.push=function(t){Te(e,t),e&&kt.forEach((function(n){e[n]=t[n]})),r.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){o=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var s,l,c,u,d,h,f;0!==r.length?(s=Ae(r,e,i),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),f=ye(e,s,a,o),e.samples=_e(s),c=ee(we(s)),r=[],l=te(n,[e]),u=new Uint8Array(l.byteLength+c.byteLength),n++,u.set(l),u.set(c,l.byteLength),Se(e),d=Math.ceil(1024*Mt/e.samplerate),s.length&&(h=s.length*d,this.trigger("segmentTimingInfo",Lt(ge(e.baseMediaDecodeTime,e.samplerate),s[0].dts,s[0].pts,s[0].dts+h,s[0].pts+h,f||0)),this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+h})),this.trigger("data",{track:e,boxes:u}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Se(e),r=[],this.trigger("reset")}}).prototype=new z,(wt=function(e,t){var n,r,i,a=[],o=[];n=(t=t||{}).firstSequenceNumber||0,wt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Te(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.config,e.sps=[t.data],xt.forEach((function(t){e[t]=r[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var r,i,s,l,c,u,d,h,f=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(r=ie(a),(s=ae(r))[0][0].keyFrame||((i=this.getGopForFusion_(a[0],e))?(f=i.duration,s.unshift(i),s.byteLength+=i.byteLength,s.nalCount+=i.nalCount,s.pts=i.pts,s.dts=i.dts,s.duration+=i.duration):s=oe(s)),o.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Se(e),s=p}Te(e,s),e.samples=se(s),c=ee(le(s)),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=s[0],h=s[s.length-1],this.trigger("segmentTimingInfo",Lt(e.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,f)),this.trigger("timingInfo",{start:s[0].pts,end:s[s.length-1].pts+s[s.length-1].duration}),this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=te(n,[e]),u=new Uint8Array(l.byteLength+c.byteLength),n++,u.set(l),u.set(c,l.byteLength),this.trigger("data",{track:e,boxes:u}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,o.length=0,this.trigger("reset")},this.resetStream_=function(){Se(e),r=void 0,i=void 0},this.getGopForFusion_=function(t){var n,r,i,a,o,s=1/0;for(o=0;o<this.gopCache_.length;o++)i=(a=this.gopCache_[o]).gop,e.pps&&Nt(e.pps[0],a.pps[0])&&e.sps&&Nt(e.sps[0],a.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=a,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,a,s,l,c;for(a=e.byteLength,s=e.nalCount,l=e.duration,t=n=0;t<o.length&&n<e.length&&(r=o[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,a-=i.byteLength,s-=i.nalCount,l-=i.duration);return 0===n?e:n===e.length?null:((c=e.slice(n)).byteLength=a,c.duration=l,c.nalCount=s,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,n,r,i,a,s,l;for(t=o.length-1,n=e.length-1,a=null,s=!1;t>=0&&n>=0;){if(r=o[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===o.length-1&&(a=n),n--)}if(!s&&null===a)return null;if(0===(l=s?n:a))return e;var c=e.slice(l),u=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=u.byteLength,c.duration=u.duration,c.nalCount=u.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){o=e}}).prototype=new z,(Ct=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Ct.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new z,Ct.prototype.flush=function(e){var t,n,r,i,a=0,o={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,xt.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,kt.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,r=ne(this.pendingTracks),o.initSegment=new Uint8Array(r.byteLength),o.initSegment.set(r),o.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)o.data.set(this.pendingBoxes[i],a),a+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=be(t.startPts,s,this.keepOriginalTimestamps),t.endTime=be(t.endPts,s,this.keepOriginalTimestamps),o.captionStreams[t.stream]=!0,o.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=be(n.pts,s,this.keepOriginalTimestamps),o.metadata.push(n);for(o.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",o),i=0;i<o.captions.length;i++)t=o.captions[i],this.trigger("caption",t);for(i=0;i<o.metadata.length;i++)n=o.metadata[i],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Ct.prototype.setRemux=function(e){this.remuxTracks=e},(St=function(e){var t,n,r=this,i=!0;St.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new lt.MetadataStream,i.aacStream=new Tt,i.audioTimestampRolloverStream=new lt.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new lt.TimestampRolloverStream("timed-metadata"),i.adtsStream=new pt,i.coalesceStream=new Ct(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(a){"timed-metadata"!==a.type&&"audio"!==a.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Et(n,e),i.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Dt(this,i)},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new lt.MetadataStream,i.packetStream=new lt.TransportPacketStream,i.parseStream=new lt.TransportParseStream,i.elementaryStream=new lt.ElementaryStream,i.timestampRolloverStream=new lt.TimestampRolloverStream,i.adtsStream=new pt,i.h264Stream=new Ot,i.captionStream=new lt.CaptionStream(e),i.coalesceStream=new Ct(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(a){var o;if("metadata"===a.type){for(o=a.tracks.length;o--;)t||"video"!==a.tracks[o].type?n||"audio"!==a.tracks[o].type||((n=a.tracks[o]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=a.tracks[o]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new wt(t,e),i.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream")),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Et(n,e),i.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Dt(this,i)},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Se(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Se(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(i){var t=It(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new z;var Rt,Bt,jt,Ft={Transmuxer:St,VideoSegmentStream:wt,AudioSegmentStream:Et,AUDIO_PROPERTIES:kt,VIDEO_PROPERTIES:xt,generateSegmentTimingInfo:Lt},Ut=function(e){return e>>>0},Ht=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},zt=Ut,Vt=function e(t,n){var r,i,a,o,s,l=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=zt(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),a=Ht(t.subarray(r+4,r+8)),o=i>1?r+i:t.byteLength,a===n[0]&&(1===n.length?l.push(t.subarray(r+8,o)):(s=e(t.subarray(r+8,o),n.slice(1))).length&&(l=l.concat(s))),r=o;return l},Wt=Ut,Gt=W.getUint64,qt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Gt(e.subarray(4)):t.baseMediaDecodeTime=Wt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Yt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Kt=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],a=4&n.flags[2],o=1&n.flags[1],s=2&n.flags[1],l=4&n.flags[1],c=8&n.flags[1],u=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),a&&u&&(t={flags:Yt(e.subarray(d,d+4))},d+=4,o&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),c&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),u--);u--;)t={},o&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),l&&(t.flags=Yt(e.subarray(d,d+4)),d+=4),c&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n},Xt=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],a=2&r.flags[2],o=8&r.flags[2],s=16&r.flags[2],l=32&r.flags[2],c=65536&r.flags[0],u=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),a&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),o&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),l&&(r.defaultSampleFlags=n.getUint32(t)),c&&(r.durationIsEmpty=!0),!i&&u&&(r.baseDataOffsetIsMoof=!0),r},Qt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},$t="undefined"!=typeof window?window:void 0!==Qt?Qt:"undefined"!=typeof self?self:{},Jt=Ie,Zt=Ve.CaptionStream,en=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},tn=function(e,t){var n=Vt(e,["moof","traf"]),r=Vt(e,["mdat"]),i={},a=[];return r.forEach((function(e,t){var r=n[t];a.push({mdat:e,traf:r})})),a.forEach((function(e){var n,r=e.mdat,a=e.traf,o=Vt(a,["tfhd"]),s=Xt(o[0]),l=s.trackId,c=Vt(a,["tfdt"]),u=c.length>0?qt(c[0]).baseMediaDecodeTime:0,d=Vt(a,["trun"]);t===l&&d.length>0&&(n=function(e,t,n){var r,i,a,o,s=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(i=0;i+4<e.length;i+=a)if(a=s.getUint32(i),i+=4,!(a<=0))switch(31&e[i]){case 6:var c=e.subarray(i+1,i+1+a),u=en(i,t);if(r={nalUnitType:"sei_rbsp",size:a,data:c,escapedRBSP:Jt(c),trackId:n},u)r.pts=u.pts,r.dts=u.dts,o=u;else{if(!o){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+i+" for trackId "+n+". See mux.js#223."});break}r.pts=o.pts,r.dts=o.dts}l.seiNals.push(r)}return l}(r,function(e,t,n){var r=t,i=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,o=n.trackId,s=[];return e.forEach((function(e){var t=Kt(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=a),e.trackId=o,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof r?(e.pts=r+$t.BigInt(e.compositionTimeOffset),r+=$t.BigInt(e.duration)):(e.pts=r+e.compositionTimeOffset,r+=e.duration)})),s=s.concat(t)})),s}(d,u,s),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(n.seiNals),i[l].logs=i[l].logs.concat(n.logs))})),i},nn=function(){var e,t,n,r,i,a,o=!1;this.isInitialized=function(){return o},this.init=function(t){e=new Zt,o=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0})),e.on("log",(function(e){i.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||r!==t[n])},this.parse=function(e,a,o){var s;if(!this.isInitialized())return null;if(!a||!o)return null;if(this.isNewInit(a,o))n=a[0],r=o[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,a,o)}return(s=function(e,t,n){if(null===t)return null;var r=tn(e,t)[t]||{};return{seiNals:r.seiNals,logs:r.logs,timescale:n}}(e,n,r))&&s.logs&&(i.logs=i.logs.concat(s.logs)),null!==s&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):i.logs.length?{logs:i.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={},i.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},rn=Ut,an=function(e){return("00"+e.toString(16)).slice(-2)},on=W.getUint64;Rt=function(e,t){var n=Vt(t,["moof","traf"]).reduce((function(t,n){var r,i,a=Vt(n,["tfhd"])[0],o=rn(a[4]<<24|a[5]<<16|a[6]<<8|a[7]),s=e[o]||9e4,l=Vt(n,["tfdt"])[0],c=new DataView(l.buffer,l.byteOffset,l.byteLength);return"bigint"==typeof(r=1===l[0]?on(l.subarray(4,12)):c.getUint32(4))?i=r/$t.BigInt(s):"number"!=typeof r||isNaN(r)||(i=r/s),i<Number.MAX_SAFE_INTEGER&&(i=Number(i)),i<t&&(t=i),t}),1/0);return"bigint"==typeof n||isFinite(n)?n:0},Bt=function(e){var t=Vt(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},a=Vt(e,["tkhd"])[0];a&&(r=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var o=Vt(e,["mdia","hdlr"])[0];if(o){var s=Ht(o.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var l=Vt(e,["mdia","minf","stbl","stsd"])[0];if(l){var c=l.subarray(8);i.codec=Ht(c.subarray(4,8));var u,d=Vt(c,[i.codec])[0];d&&(/^[asm]vc[1-9]$/i.test(i.codec)?(u=d.subarray(78),"avcC"===Ht(u.subarray(4,8))&&u.length>11?(i.codec+=".",i.codec+=an(u[9]),i.codec+=an(u[10]),i.codec+=an(u[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(u=d.subarray(28),"esds"===Ht(u.subarray(4,8))&&u.length>20&&0!==u[19]?(i.codec+="."+an(u[19]),i.codec+="."+an(u[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var h=Vt(e,["mdia","mdhd"])[0];h&&(i.timescale=jt(h)),n.push(i)})),n};var sn=Rt,ln=Bt,cn=(jt=function(e){var t=0===e[0]?12:20;return rn(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},function(e){var t=31&e[1];return t<<=8,t|=e[2]}),un=function(e){return!!(64&e[1])},dn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},hn=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},fn={parseType:function(e,t){var n=cn(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=un(e),n=4+dn(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=un(e),r=4+dn(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var a=12+((15&e[r+10])<<8|e[r+11]);a<i;){var o=r+a;t[(31&e[o+1])<<8|e[o+2]]=e[o],a+=5+((15&e[o+3])<<8|e[o+4])}return t}},parsePayloadUnitStartIndicator:un,parsePesType:function(e,t){switch(t[cn(e)]){case We.H264_STREAM_TYPE:return"video";case We.ADTS_STREAM_TYPE:return"audio";case We.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!un(e))return null;var t=4+dn(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+dn(e),n=e.subarray(t),r=0,i=0,a=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===hn(31&n[i+3])&&(a=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===hn(31&n[i+3])&&(a=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===hn(31&n[i+3])&&(a=!0),a}},pn=Xe,mn={};mn.ts=fn,mn.aac=_t;var gn=fe,vn=function(e,t,n){for(var r,i,a,o,s=0,l=188,c=!1;l<=e.byteLength;)if(71!==e[s]||71!==e[l]&&l!==e.byteLength)s++,l++;else{switch(r=e.subarray(s,l),mn.ts.parseType(r,t.pid)){case"pes":i=mn.ts.parsePesType(r,t.table),a=mn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(o=mn.ts.parsePesTime(r))&&(o.type="audio",n.audio.push(o),c=!0)}if(c)break;s+=188,l+=188}for(s=(l=e.byteLength)-188,c=!1;s>=0;)if(71!==e[s]||71!==e[l]&&l!==e.byteLength)s--,l--;else{switch(r=e.subarray(s,l),mn.ts.parseType(r,t.pid)){case"pes":i=mn.ts.parsePesType(r,t.table),a=mn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(o=mn.ts.parsePesTime(r))&&(o.type="audio",n.audio.push(o),c=!0)}if(c)break;s-=188,l-=188}},bn=function(e,t,n){for(var r,i,a,o,s,l,c,u=0,d=188,h=!1,f={data:[],size:0};d<e.byteLength;)if(71!==e[u]||71!==e[d])u++,d++;else{switch(r=e.subarray(u,d),mn.ts.parseType(r,t.pid)){case"pes":if(i=mn.ts.parsePesType(r,t.table),a=mn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!h&&(o=mn.ts.parsePesTime(r))&&(o.type="video",n.video.push(o),h=!0),!n.firstKeyFrame)){if(a&&0!==f.size){for(s=new Uint8Array(f.size),l=0;f.data.length;)c=f.data.shift(),s.set(c,l),l+=c.byteLength;if(mn.ts.videoPacketContainsKeyFrame(s)){var p=mn.ts.parsePesTime(s);p?(n.firstKeyFrame=p,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(r),f.size+=r.byteLength}}if(h&&n.firstKeyFrame)break;u+=188,d+=188}for(u=(d=e.byteLength)-188,h=!1;u>=0;)if(71!==e[u]||71!==e[d])u--,d--;else{switch(r=e.subarray(u,d),mn.ts.parseType(r,t.pid)){case"pes":i=mn.ts.parsePesType(r,t.table),a=mn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(o=mn.ts.parsePesTime(r))&&(o.type="video",n.video.push(o),h=!0)}if(h)break;u-=188,d-=188}},yn=function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),mn.ts.parseType(n,t.pid)){case"pat":t.pid=mn.ts.parsePat(n);break;case"pmt":var a=mn.ts.parsePmt(n);t.table=t.table||{},Object.keys(a).forEach((function(e){t.table[e]=a[e]}))}r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case We.H264_STREAM_TYPE:n.video=[],bn(e,t,n),0===n.video.length&&delete n.video;break;case We.ADTS_STREAM_TYPE:n.audio=[],vn(e,t,n),0===n.audio.length&&delete n.audio}}return n},An=function(e,t){var n;return(n=mn.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,a=null,o=0,s=0;e.length-s>=3;){switch(mn.aac.parseType(e,s)){case"timed-metadata":if(e.length-s<10){n=!0;break}if((o=mn.aac.parseId3TagSize(e,s))>e.length){n=!0;break}null===a&&(t=e.subarray(s,s+o),a=mn.aac.parseAacTimestamp(t)),s+=o;break;case"audio":if(e.length-s<7){n=!0;break}if((o=mn.aac.parseAdtsSize(e,s))>e.length){n=!0;break}null===i&&(t=e.subarray(s,s+o),i=mn.aac.parseSampleRate(t)),r++,s+=o;break;default:s++}if(n)return null}if(null===i||null===a)return null;var l=gn/i;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*l,pts:a+1024*r*l}]}}(e):yn(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=pn(e.dts,n),e.pts=pn(e.pts,n),e.dtsTime=e.dts/gn,e.ptsTime=e.pts/gn}))}if(e.video&&e.video.length){var r=t;if((void 0===r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=pn(e.dts,r),e.pts=pn(e.pts,r),e.dtsTime=e.dts/gn,e.ptsTime=e.pts/gn})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=pn(i.dts,r),i.pts=pn(i.pts,r),i.dtsTime=i.dts/gn,i.ptsTime=i.pts/gn}}}(n,t),n):null},_n=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Ft.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:me(t.start.dts),presentation:me(t.start.pts)},end:{decode:me(t.end.dts),presentation:me(t.end.pts)},baseMediaDecodeTime:me(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=me(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:me(t.start.dts),presentation:me(t.start.pts)},end:{decode:me(t.end.dts),presentation:me(t.end.pts)},baseMediaDecodeTime:me(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=me(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:me(t.start),end:me(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:me(t.start),end:me(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new nn,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,r=sn(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=ln(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,r="number"!=typeof n||isNaN(n)?void 0:n*fe,i=An(t,r),a=null;i&&((a={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(a.videoStart=i.video[0].ptsTime),a.hasAudio&&(a.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(pe(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(pe(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new _n(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new _n(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})))),go=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,a=e.remux,o=e.onData,s=e.onTrackInfo,l=e.onAudioTimingInfo,c=e.onVideoTimingInfo,u=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,h=e.onId3,f=e.onCaptions,p=e.onDone,m=e.onEndedTimeline,g=e.onTransmuxerLog,v=e.isEndOfTimeline,b={buffer:[]},y=v;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,a=r.initSegment,o=r.captions,s=r.captionStreams,l=r.metadata,c=r.videoFrameDtsTime,u=r.videoFramePtsTime;t.buffer.push({captions:o,captionStreams:s,metadata:l});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};void 0!==c&&(h.videoFrameDtsTime=c),void 0!==u&&(h.videoFramePtsTime=u),n(h)}(n,b,o),"trackinfo"===n.data.action&&s(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,b),"audioTimingInfo"===n.data.action&&l(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&c(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&u(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&f(n.data.caption),"endedtimeline"===n.data.action&&(y=!1,m()),"log"===n.data.action&&g(n.data.log),"transmuxed"===n.data.type&&(y||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:b,callback:p}),vo(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var A=n instanceof ArrayBuffer?n:n.buffer,_=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:A,byteOffset:_,byteLength:n.byteLength},[A])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},vo=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():go(e.currentTransmux))},bo=function(e,t){e.postMessage({action:t}),vo(e)},yo=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void bo(t,e);t.transmuxQueue.push(bo.bind(null,t,e))},Ao=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void go(e);e.transmuxer.transmuxQueue.push(e)},_o=function(e){yo("reset",e)},wo=function(e){var t=new mo;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t},Eo=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,i=c()({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function i(a){a.data.action===n&&(t.removeEventListener("message",i),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),r(a.data))})),e.data){var a=e.data instanceof ArrayBuffer;i.byteOffset=a?0:e.data.byteOffset,i.byteLength=e.data.byteLength;var o=[a?e.data:e.data.buffer];t.postMessage(i,o)}else t.postMessage(i)},So=2,Co=-101,To=-102,ko=function(e){e.forEach((function(e){e.abort()}))},xo=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Co,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:To,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:So,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:So,xhr:t}:null},Oo=function(e,t,n){return function(r,i){var a=i.response,o=xo(r,i);if(o)return n(o,e);if(16!==a.byteLength)return n({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:So,xhr:i},e);for(var s=new DataView(a),l=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),c=0;c<t.length;c++)t[c].bytes=l;return n(null,e)}},Io=function(e,t){var n=Object(L.a)(e.map.bytes);if("mp4"!==n){var r=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+r,code:So})}Eo({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(n){var r=n.tracks,i=n.data;return e.map.bytes=i,r.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null)}})},Mo=function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var a=xo(e,i);if(a)return n(a,t);var o="arraybuffer"!==r&&i.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(i.responseText.substring(t.lastReachedChar||0)):i.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t)}},Po=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,u=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=e.onTransmuxerLog,p=t.map&&t.map.tracks||{},m=Boolean(p.audio&&p.video),g=i.bind(null,t,"audio","start"),v=i.bind(null,t,"audio","end"),b=i.bind(null,t,"video","start"),y=i.bind(null,t,"video","end");Eo({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=n=e.data;var i=e.result;i&&(r(t,{hasAudio:i.hasAudio,hasVideo:i.hasVideo,isMuxed:m}),r=null,i.hasAudio&&!m&&g(i.audioStart),i.hasVideo&&b(i.videoStart),g=null,b=null),Ao({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:m,onData:function(e){e.type="combined"===e.type?"video":e.type,d(t,e)},onTrackInfo:function(e){r&&(m&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){g&&void 0!==e.start&&(g(e.start),g=null),v&&void 0!==e.end&&v(e.end)},onVideoTimingInfo:function(e){b&&void 0!==e.start&&(b(e.start),b=null),y&&void 0!==e.end&&y(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){o(e)},onId3:function(e,n){s(t,e,n)},onCaptions:function(e){l(t,[e])},isEndOfTimeline:c,onEndedTimeline:function(){u()},onTransmuxerLog:f,onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},Do=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,u=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=e.onTransmuxerLog,p=new Uint8Array(n);if(Object(L.b)(p)){t.isFmp4=!0;var m=t.map.tracks,g={isFmp4:!0,hasVideo:!!m.video,hasAudio:!!m.audio};m.audio&&m.audio.codec&&"enca"!==m.audio.codec&&(g.audioCodec=m.audio.codec),m.video&&m.video.codec&&"encv"!==m.video.codec&&(g.videoCodec=m.video.codec),m.video&&m.audio&&(g.isMuxed=!0),r(t,g);var v=function(e){d(t,{data:p,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),e&&e.length&&l(t,e),h(null,t,{})};Eo({action:"probeMp4StartTime",timescales:t.map.timescales,data:p,transmuxer:t.transmuxer,callback:function(e){var r=e.data,a=e.startTime;n=r.buffer,t.bytes=p=r,g.hasAudio&&!g.isMuxed&&i(t,"audio","start",a),g.hasVideo&&i(t,"video","start",a),m.video&&r.byteLength&&t.transmuxer?Eo({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:p,timescales:t.map.timescales,trackIds:[m.video.id],callback:function(e){n=e.data.buffer,t.bytes=p=e.data,e.logs.forEach((function(e){f(Yi.mergeOptions(e,{stream:"mp4CaptionParser"}))})),v(e.captions)}}):v()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=Object(L.a)(p)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Po({segment:t,bytes:n,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:u,dataFn:d,doneFn:h,onTransmuxerLog:f})}else h(null,t,{})},No=function(e,t){var n,r=e.id,i=e.key,a=e.encryptedBytes,o=e.decryptionWorker;o.addEventListener("message",(function e(n){if(n.data.source===r){o.removeEventListener("message",e);var i=n.data.decrypted;t(new Uint8Array(i.bytes,i.byteOffset,i.byteLength))}})),n=i.bytes.slice?i.bytes.slice():new Uint32Array(Array.prototype.slice.call(i.bytes)),o.postMessage(Ka({source:r,encrypted:a,key:n,iv:i.iv}),[a.buffer,n.buffer])},Lo=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,u=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=e.onTransmuxerLog,p=0,m=!1;return function(e,g){if(!m){if(e)return m=!0,ko(t),h(e,g);if((p+=1)===t.length){var v=function(){if(g.encryptedBytes)return function(e){var t=e.decryptionWorker,n=e.segment,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,u=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=e.onTransmuxerLog;No({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t},(function(e){n.bytes=e,Do({segment:n,bytes:n.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:u,dataFn:d,doneFn:h,onTransmuxerLog:f})}))}({decryptionWorker:n,segment:g,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:u,dataFn:d,doneFn:h,onTransmuxerLog:f});Do({segment:g,bytes:g.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:u,dataFn:d,doneFn:h,onTransmuxerLog:f})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return No({decryptionWorker:n,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},(function(e){g.map.bytes=e,Io(g,(function(e){if(e)return ko(t),h(e,g);v()}))}));v()}}}},Ro=function(e){var t=e.segment,n=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=Yi.mergeOptions(t.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}},Bo=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,a=e.abortFn,o=e.progressFn,s=e.trackInfoFn,l=e.timingInfoFn,c=e.videoSegmentTimingInfoFn,u=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,f=e.isEndOfTimeline,p=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=e.onTransmuxerLog,b=[],y=Lo({activeXhrs:b,decryptionWorker:r,trackInfoFn:s,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:u,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:p,dataFn:m,doneFn:g,onTransmuxerLog:v});if(i.key&&!i.key.bytes){var A=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&A.push(i.map.key);var _=t(Yi.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),Oo(i,A,y));b.push(_)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){var w=t(Yi.mergeOptions(n,{uri:i.map.key.resolvedUri,responseType:"arraybuffer"}),Oo(i,[i.map.key],y));b.push(w)}var E=t(Yi.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Wa(i.map)}),function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=xo(e,r);if(i)return n(i,t);var a=new Uint8Array(r.response);if(t.map.key)return t.map.encryptedBytes=a,n(null,t);t.map.bytes=a,Io(t,(function(e){if(e)return e.xhr=r,e.status=r.status,n(e,t);n(null,t)}))}}({segment:i,finishProcessingFn:y}));b.push(E)}var S=Yi.mergeOptions(n,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:Wa(i)}),C=t(S,Mo({segment:i,finishProcessingFn:y,responseType:S.responseType}));C.addEventListener("progress",Ro({segment:i,progressFn:o,trackInfoFn:s,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:u,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:p,dataFn:m})),b.push(C);var T={};return b.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:T,abortFn:a}))})),function(){return ko(b)}},jo=Ji("CodecUtils"),Fo=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Uo=function(e){var t={};return e.forEach((function(e){var n=e.mediaType,r=e.type,i=e.details;t[n]=t[n]||[],t[n].push(Object(x.i)(""+r+i))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return jo("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},Ho=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},zo=function(e,t){var n=t.attributes||{},r=Uo(function(e){var t=e.attributes||{};if(t.CODECS)return Object(x.h)(t.CODECS)}(t)||[]);if(Fo(e,t)&&!r.audio&&!function(e,t){if(!Fo(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=Uo(Object(x.d)(e,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},Vo=Ji("PlaylistSelector"),Wo=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Go=function(e,t){if(!e)return"";var n=a.a.getComputedStyle(e);return n?n[t]:""},qo=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},Yo=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||a.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||a.a.Number.MAX_VALUE)},Ko=function(e,t,n,r,i,o){if(e){var s={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:i},l=e.playlists;Sa.isAudioOnly(e)&&(l=o.getAudioTrackPlaylists_(),s.audioOnly=!0);var c=l.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||a.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));qo(c,(function(e,t){return e.bandwidth-t.bandwidth}));var u=(c=c.filter((function(e){return!Sa.isIncompatible(e.playlist)}))).filter((function(e){return Sa.isEnabled(e.playlist)}));u.length||(u=c.filter((function(e){return!Sa.isDisabled(e.playlist)})));var d=u.filter((function(e){return e.bandwidth*co.BANDWIDTH_VARIANCE<t})),h=d[d.length-1],f=d.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(!1===i){var p=f||u[0]||c[0];if(p&&p.playlist){var m="sortedPlaylistReps";return f&&(m="bandwidthBestRep"),u[0]&&(m="enabledPlaylistReps"),Vo("choosing "+Wo(p)+" using "+m+" with options",s),p.playlist}return Vo("could not choose a playlist with options",s),null}var g=d.filter((function(e){return e.width&&e.height}));qo(g,(function(e,t){return e.width-t.width}));var v=g.filter((function(e){return e.width===n&&e.height===r}));h=v[v.length-1];var b,y,A,_,w=v.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(w||(y=(b=g.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===b[0].width&&e.height===b[0].height})),h=y[y.length-1],A=y.filter((function(e){return e.bandwidth===h.bandwidth}))[0]),o.experimentalLeastPixelDiffSelector){var E=g.map((function(e){return e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-r),e}));qo(E,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),_=E[0]}var S=_||A||w||f||u[0]||c[0];if(S&&S.playlist){var C="sortedPlaylistReps";return _?C="leastPixelDiffRep":A?C="resolutionPlusOneRep":w?C="resolutionBestRep":f?C="bandwidthBestRep":u[0]&&(C="enabledPlaylistReps"),Vo("choosing "+Wo(S)+" using "+C+" with options",s),S.playlist}return Vo("could not choose a playlist with options",s),null}},Xo=function(){var e=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return Ko(this.playlists.master,this.systemBandwidth,parseInt(Go(this.tech_.el(),"width"),10)*e,parseInt(Go(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Qo=function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,i=e.videoDuration;if(n){var o=a.a.WebKitDataCue||a.a.VTTCue,s=t.metadataTrack_;if(s&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!=typeof t||a.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new o(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Yi.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Yi.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Yi.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),s.addCue(n)}))})),s.cues&&s.cues.length)){for(var l=s.cues,c=[],u=0;u<l.length;u++)l[u]&&c.push(l[u]);var d=c.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),h=Object.keys(d).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var n=d[e],r=Number(h[t+1])||i;n.forEach((function(e){e.endTime=r}))}))}}},$o=function(e,t,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=e&&i.endTime<=t&&n.removeCue(i)},Jo=function(e){return"number"==typeof e&&isFinite(e)},Zo=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,i=e.part,a=e.playlist,o=a.mediaSequence,s=a.id,l=a.segments,c=void 0===l?[]:l,u=e.mediaIndex,d=e.partIndex,h=e.timeline,f=c.length-1,p="mediaIndex/partIndex increment";e.getMediaInfoForTime?p="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(p="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(p+=" with independent "+e.independent);var m="number"==typeof d,g=e.segment.uri?"segment":"pre-segment",v=m?ua({preloadSegment:r})-1:0;return g+" ["+(o+u)+"/"+(o+f)+"]"+(m?" part ["+d+"/"+v+"]":"")+" segment start/end ["+r.start+" => "+r.end+"]"+(m?" part start/end ["+i.start+" => "+i.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+h+"] selected by ["+p+"] playlist ["+s+"]"},es=function(e){return e+"TimingInfo"},ts=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,a=e.audioDisabled;if(n===r)return!1;if("audio"===i){var o=t.lastTimelineChange({type:"main"});return!o||o.to!==r}if("main"===i&&a){var s=t.pendingTimelineChange({type:"audio"});return!s||s.to!==r}return!1},ns=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+1/30},rs=function(e,t){if("hls"!==t)return null;var n,r,i=(n={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},r=0,["video","audio"].forEach((function(e){var t=n[e+"TimingInfo"];if(t){var i,o=t.start,s=t.end;"bigint"==typeof o||"bigint"==typeof s?i=a.a.BigInt(s)-a.a.BigInt(o):"number"==typeof o&&"number"==typeof s&&(i=s-o),void 0!==i&&i>r&&(r=i)}})),"bigint"==typeof r&&r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r);if(!i)return null;var o=e.playlist.targetDuration,s=ns({segmentDuration:i,maxDuration:2*o}),l=ns({segmentDuration:i,maxDuration:o}),c="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+i+" when the reported duration is "+e.duration+" and the target duration is "+o+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return s||l?{severity:s?"warn":"info",message:c}:null},is=function(e){function t(t,n){var r;if(r=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=t.parse708captions,r.useDtsForTimestampOffset_=t.useDtsForTimestampOffset,r.captionServices_=t.captionServices,r.experimentalExactManifestTimings=t.experimentalExactManifestTimings,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Yi.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=Ji("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(f()(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}m()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return wo({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,a.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&_o(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Yi.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Xa(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Qa(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var a=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){var s=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=s}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&_o(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n,r){if(void 0===n&&(n=function(){}),void 0===r&&(r=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var i=1,a=function(){0===--i&&n()};for(var o in!r&&this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,a)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*R.ONE_SECOND_IN_TS),a=Math.ceil((n-r)*R.ONE_SECOND_IN_TS),o=e.slice(),s=e.length;s--&&!(e[s].pts<=a););if(-1===s)return o;for(var l=s+1;l--&&!(e[l].pts<=i););return l=Math.max(l,0),o.splice(l,s-l+1),o}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)$o(e,t,this.inbandTextTracks_[o]);$o(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var r="number"==typeof e&&t.segments[e],i=e+1===t.segments.length,a=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&i&&a},n.chooseNextRequest_=function(){var e=this.buffered_(),t=ia(e)||0,n=aa(e,this.currentTime_()),r=!this.hasPlayed_()&&n>=1,i=n>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||r||i)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(o.isSyncRequest)o.mediaIndex=function(e,t,n){t=t||[];for(var r=[],i=0,a=0;a<t.length;a++){var o=t[a];if(e===o.timeline&&(r.push(a),(i+=o.duration)>n))return a}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,a,t);else if(null!==this.mediaIndex){var s=a[this.mediaIndex],l="number"==typeof this.partIndex?this.partIndex:-1;o.startOfSegment=s.end?s.end:t,s.parts&&s.parts[l+1]?(o.mediaIndex=this.mediaIndex,o.partIndex=l+1):o.mediaIndex=this.mediaIndex+1}else{var c=Sa.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),u=c.segmentIndex,d=c.startTime,h=c.partIndex;o.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),o.mediaIndex=u,o.startOfSegment=d,o.partIndex=h}var f=a[o.mediaIndex],p=f&&"number"==typeof o.partIndex&&f.parts&&f.parts[o.partIndex];if(!f||"number"==typeof o.partIndex&&!p)return null;if("number"!=typeof o.partIndex&&f.parts&&(o.partIndex=0,p=f.parts[0]),!n&&p&&!p.independent)if(0===o.partIndex){var m=a[o.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(o.mediaIndex-=1,o.partIndex=m.parts.length-1,o.independent="previous segment")}else f.parts[o.partIndex-1].independent&&(o.partIndex-=1,o.independent="previous part");var v=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return o.mediaIndex>=a.length-1&&v&&!this.seeking_()?null:this.generateSegmentInfo_(o)},n.generateSegmentInfo_=function(e){var t=e.independent,n=e.playlist,r=e.mediaIndex,i=e.startOfSegment,a=e.isSyncRequest,o=e.partIndex,s=e.forceTimestampOffset,l=e.getMediaInfoForTime,c=n.segments[r],u="number"==typeof o&&c.parts[o],d={requestId:"segment-loader-"+Math.random(),uri:u&&u.resolvedUri||c.resolvedUri,mediaIndex:r,partIndex:u?o:null,isSyncRequest:a,startOfSegment:i,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:u&&u.duration||c.duration,segment:c,part:u,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==s?s:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:i,buffered:this.buffered_(),overrideCheck:h});var f=ia(this.sourceUpdater_.audioBuffered());return"number"==typeof f&&(d.audioAppendStart=f-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var r,i=Math.ceil((t-n+3)*R.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d},n.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,r=t.currentTimeline,i=t.startOfSegment,a=t.buffered,t.overrideCheck||n!==r?n<r?i:a.length?a.end(a.length-1):i:null;var t,n,r,i,a},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=Sa.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),a=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(i<=a)){var o=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,a=e.segmentDuration,o=e.timeUntilRebuffer,s=e.currentTimeline,l=e.syncController,c=t.playlists.filter((function(e){return!Sa.isIncompatible(e)})),u=c.filter(Sa.isEnabled);u.length||(u=c.filter((function(e){return!Sa.isDisabled(e)})));var d=u.filter(Sa.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=l.getSyncPoint(e,i,s,n)?1:2;return{playlist:e,rebufferingImpact:Sa.estimateSegmentRequestTime(a,r,e)*t-o}})),h=d.filter((function(e){return e.rebufferingImpact<=0}));return qo(h,(function(e,t){return Yo(t.playlist,e.playlist)})),h.length?h[0]:(qo(d,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),d[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(o){var s=i-a-o.rebufferingImpact,l=.5;a<=1/30&&(l=1),!o.playlist||o.playlist.uri===this.playlist_.uri||s<l||(this.bandwidth=o.playlist.attributes.BANDWIDTH*co.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+Zo(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(a!==r[i])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,a=es(t);i[a]=i[a]||{},i[a][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),i={};t.forEach((function(e){i[e.stream]=i[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=i[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)})),Object.keys(i).forEach((function(e){var t=i[e],o=t.startTime,s=t.endTime,l=t.captions,c=n.inbandTextTracks_;n.logger_("adding cues from "+o+" -> "+s+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=n;/^cc708_/.test(n)&&(r="SERVICE"+n.split("_")[1]);var i=t.textTracks().getTrackById(r);if(i)e[n]=i;else{var a=n,o=n,s=!1,l=(t.options_.vhs&&t.options_.vhs.captionServices||{})[r];l&&(a=l.label,o=l.language,s=l.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:r,default:s,label:a,language:o},!1).track}}}(c,n.vhs_.tech_,e),$o(o,s,c[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var i=a.a.WebKitDataCue||a.a.VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new i(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:l,inbandTextTracks:c,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Qo({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!ts({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},n.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},n.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;return!(r&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo)&&!ts({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[es(t.type)].start;else{var r,i=this.getCurrentMediaInfo_(),a="main"===this.loaderType_&&i&&i.hasVideo;a&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var o=this.chooseNextRequest_();if(o.mediaIndex!==n.mediaIndex||o.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var a=Xa(r);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,r=e.segmentInfo,i=e.type,o=e.bytes,s=this.sourceUpdater_.audioBuffered(),l=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+ra(s).join(", ")),l.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+ra(l).join(", "));var c=s.length?s.start(0):0,u=s.length?s.end(s.length-1):0,d=l.length?l.start(0):0,h=l.length?l.end(l.length-1):0;if(u-c<=1&&h-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+o.byteLength+", audio buffer: "+ra(s).join(", ")+", video buffer: "+ra(l).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:r,type:i,bytes:o}));var f=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+f),this.remove(0,f,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=a.a.setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,r=e.type,i=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+i.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:r,bytes:i}))},n.appendToSourceBuffer_=function(e){var t,n,r,i=e.segmentInfo,a=e.type,o=e.initSegment,s=e.data,l=e.bytes;if(!l){var c=[s],u=s.byteLength;o&&(c.unshift(o),u+=o.byteLength),r=0,(t={bytes:u,segments:c}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach((function(e){n.set(e,r),r+=e.byteLength}))),l=n}this.sourceUpdater_.appendBuffer({segmentInfo:i,type:a,bytes:l},this.handleAppendError_.bind(this,{segmentInfo:i,type:a,bytes:l}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=c()({},e,{forceTimestampOffset:!0});c()(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var n=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,o=r||i&&a;this.logger_("Requesting "+Zo(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Bo({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:o,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(n){var r=n.message,i=n.level,a=n.stream;t.logger_(Zo(e)+" logged from transmuxer stream "+a+" as a "+i+": "+r)}})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-co.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,r={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},i=e.playlist.segments[e.mediaIndex-1];if(i&&i.timeline===t.timeline&&(i.videoTimingInfo?r.baseStartTime=i.videoTimingInfo.transmuxedDecodeEnd:i.audioTimingInfo&&(r.baseStartTime=i.audioTimingInfo.transmuxedDecodeEnd)),t.key){var a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=a}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===To)return;return this.pause(),e.code===Co?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,o=e.useVideoTimingInfo,s=e.videoTimingInfo,l=e.audioTimingInfo;if(void 0!==t)return t;if(!o)return l.start;var c=n.segments[r-1];return 0!==r&&c&&void 0!==c.start&&c.end===i+a?s.start:i},n.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,a="main"===this.loaderType_&&r,o=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,o&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),o&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,n=e.audioTimingInfo,r=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"==typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:r.start:r.start},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),n="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"==typeof n.end?n.end:n.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=rs(e,this.sourceType_);if(t&&("warn"===t.severity?Yi.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+Zo(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment,r=e.part,i=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,a=r&&r.end&&this.currentTime_()-r.end>3*e.playlist.partTargetDuration;if(i||a)return this.logger_("bad "+(i?"segment":"part")+" "+Zo(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Zo(e))},n.recordThroughput_=function(e){if(e.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(Jo(n)&&Jo(r)){$o(n,r,this.segmentMetadataTrack_);var i=a.a.WebKitDataCue||a.a.VTTCue,o={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},s=new i(n,r,JSON.stringify(o));s.value=o,this.segmentMetadataTrack_.addCue(s)}}},t}(Yi.EventTarget);function as(){}var os,ss=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},ls=["video","audio"],cs=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},us=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!cs(t,n)){if(i.type!==t){if(null===(r=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("mediaSource"===r.type)return null;if(r.type===e)return n}return null}(t,n.queue)))return;i=n.queue[r]}return n.queue.splice(r,1),n.queuePending[t]=i,i.action(t,n),i.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),e("audio",n),e("video",n))}},ds=function(e,t){var n=t[e+"Buffer"],r=ss(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},hs=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},fs=function(e,t,n){return function(r,i){var a=i[r+"Buffer"];if(hs(i.mediaSource,a)){i.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{a.appendBuffer(e)}catch(e){i.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+r+"Buffer"),i.queuePending[r]=null,n(e)}}}},ps=function(e,t){return function(n,r){var i=r[n+"Buffer"];if(hs(r.mediaSource,i)){r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{i.remove(e,t)}catch(i){r.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},ms=function(e){return function(t,n){var r=n[t+"Buffer"];hs(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},gs=function(e){return function(t,n){e()}},vs=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Yi.log.warn("Failed to call media source endOfStream",e)}}}},bs=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){Yi.log.warn("Failed to set media source duration",e)}}},ys=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(hs(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){Yi.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},As=function(e,t){return function(n){var r=ss(e),i=Object(x.e)(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=n.mediaSource.addSourceBuffer(i);a.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),a.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=a}},_s=function(e){return function(t){var n=t[e+"Buffer"];if(ds(e,t),hs(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){Yi.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},ws=function(e){return function(t,n){var r=n[t+"Buffer"],i=Object(x.e)(e);hs(n.mediaSource,r)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),r.changeType(i),n.codecs[t]=e)}},Es=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,a=e.name;n.queue.push({type:t,action:r,doneFn:i,name:a}),us(t,n)},Ss=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}us(e,t)}},Cs=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return us("mediaSource",f()(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=Ji("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=Ss("video",f()(n)),n.onAudioUpdateEnd_=Ss("audio",f()(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}m()(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){Es({type:"mediaSource",sourceUpdater:this,action:As(e,t),name:"addSourceBuffer"})},n.abort=function(e){Es({type:e,sourceUpdater:this,action:ys(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Es({type:"mediaSource",sourceUpdater:this,action:_s(e),name:"removeSourceBuffer"}):Yi.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Yi.browser.IE_VERSION&&!Yi.browser.IS_FIREFOX&&a.a.MediaSource&&a.a.MediaSource.prototype&&"function"==typeof a.a.MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return a.a.SourceBuffer&&a.a.SourceBuffer.prototype&&"function"==typeof a.a.SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?Es({type:e,sourceUpdater:this,action:ws(t),name:"changeType"}):Yi.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(Es({type:i,sourceUpdater:this,action:fs(a,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var o=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+o.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,o.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return hs(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Yi.createTimeRange()},n.videoBuffered=function(){return hs(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Yi.createTimeRange()},n.buffered=function(){var e=hs(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=hs(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,r=null,i=0,a=[],o=[];if(!(e&&e.length&&t&&t.length))return Yi.createTimeRange();for(var s=e.length;s--;)a.push({time:e.start(s),type:"start"}),a.push({time:e.end(s),type:"end"});for(s=t.length;s--;)a.push({time:t.start(s),type:"start"}),a.push({time:t.end(s),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),s=0;s<a.length;s++)"start"===a[s].type?2===++i&&(n=a[s].time):"end"===a[s].type&&1===--i&&(r=a[s].time),null!==n&&null!==r&&(o.push([n,r]),n=null,r=null);return Yi.createTimeRanges(o)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=as),Es({type:"mediaSource",sourceUpdater:this,action:bs(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=as),"string"!=typeof e&&(e=void 0),Es({type:"mediaSource",sourceUpdater:this,action:vs(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=as),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Es({type:"audio",sourceUpdater:this,action:ps(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=as),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Es({type:"video",sourceUpdater:this,action:ps(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!cs("audio",this)&&!cs("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Es({type:"audio",sourceUpdater:this,action:ms(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Es({type:"video",sourceUpdater:this,action:ms(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&Es({type:"audio",sourceUpdater:this,action:gs(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&Es({type:"video",sourceUpdater:this,action:gs(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),ls.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return ds(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Yi.EventTarget),Ts=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},ks=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),xs=function(e){function t(){return e.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return m()(t,e),t}(j()(Error)),Os=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.loadVttJs=t.loadVttJs,r.shouldSaveSegmentTimingInfo_=!1,r}m()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Yi.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Yi.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Xa(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=ks.byteLength+e.bytes.byteLength,a=new Uint8Array(i);a.set(e.bytes),a.set(ks,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return void 0===e?this.subtitlesTrack_:(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)},n.remove=function(e,t){$o(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},n.timestampOffsetForSegment_=function(){return null},n.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Co&&this.handleTimeout_(),e.code===To?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");var o=i.segment;if(o.map&&(o.map.bytes=t.map.bytes),i.bytes=t.bytes,"function"!=typeof a.a.WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((function(){return r.segmentRequestFinished_(e,t,n)}),(function(){return r.stopForError({message:"Error loading vtt.js"})}));o.requested=!0;try{this.parseVTTCues_(i)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,i.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new a.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var r=[],i=0,a=0;a<t.length;a++)t[n].startTime===t[a].startTime&&t[n].endTime===t[a].endTime&&t[n].text===t[a].text&&++i>1&&r.push(t[a]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;if("function"!=typeof a.a.WebVTT)throw new xs;"function"==typeof a.a.TextDecoder?t=new a.a.TextDecoder("utf8"):(t=a.a.WebVTT.StringDecoder(),n=!0);var r=new a.a.WebVTT.Parser(a.a,a.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Yi.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var i=e.segment.map.bytes;n&&(i=Ts(i)),r.parse(i)}var o=e.bytes;n&&(o=Ts(o)),r.parse(o),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,a=i.MPEGTS/R.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var o=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(o,s-r.duration)}}}else r.empty=!0},t}(is),Is=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},Ms=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=null,o=null,s=la(t);i=i||0;for(var l=0;l<s.length;l++){var c=s[t.endList||0===i?l:s.length-(l+1)],u=c.segment,d=e.timelineToDatetimeMappings[u.timeline];if(d&&u.dateTimeObject){var h=u.dateTimeObject.getTime()/1e3+d;if(u.parts&&"number"==typeof c.partIndex)for(var f=0;f<c.partIndex;f++)h+=u.parts[f].duration;var p=Math.abs(i-h);if(null!==o&&(0===p||o<p))break;o=p,a={time:h,segmentIndex:c.segmentIndex,partIndex:c.partIndex}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var a=null,o=null;i=i||0;for(var s=la(t),l=0;l<s.length;l++){var c=s[t.endList||0===i?l:s.length-(l+1)],u=c.segment,d=c.part&&c.part.start||u&&u.start;if(u.timeline===r&&void 0!==d){var h=Math.abs(i-d);if(null!==o&&o<h)break;(!a||null===o||o>=h)&&(o=h,a={time:d,segmentIndex:c.segmentIndex,partIndex:c.partIndex})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=null,s=0;s<t.discontinuityStarts.length;s++){var l=t.discontinuityStarts[s],c=t.discontinuitySequence+s+1,u=e.discontinuities[c];if(u){var d=Math.abs(i-u.time);if(null!==o&&o<d)break;(!a||null===o||o>=d)&&(o=d,a={time:u.time,segmentIndex:l,partIndex:null})}}return a}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Ps=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=Ji("SyncController"),n}m()(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+pa({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,r){for(var i=[],a=0;a<Ms.length;a++){var o=Ms[a],s=o.run(this,e,t,n,r);s&&(s.strategy=o.name,i.push({strategy:o.name,syncPoint:s}))}return i},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,a=1;a<e.length;a++){var o=Math.abs(e[a].syncPoint[t.key]-t.value);o<r&&(r=o,n=e[a].syncPoint,i=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+("number"==typeof n.partIndex?",partIndex:"+n.partIndex:"")+"]"),n},n.saveExpiredSegmentInfo=function(e,t){var n=t.mediaSequence-e.mediaSequence;if(n>86400)Yi.log.warn("Not saving expired segment info. Media sequence gap "+n+" is too large.");else for(var r=n-1;r>=0;r--){var i=e.segments[r];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+r,time:i.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),i=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));var a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-a.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r,i,a=e.segment,o=e.part,s=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)s={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+s.time+"] [mapping: "+s.mapping+"]")),r=e.startOfSegment,i=t.end+s.mapping;else{if(!s)return!1;r=t.start+s.mapping,i=t.end+s.mapping}return o&&(o.start=r,o.end=i),(!a.start||r<a.start)&&(a.start=r),a.end=i,!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,o=i-e.mediaIndex,s=Math.abs(o);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>s){var l=void 0;l=o<0?n.start-pa({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:i}):n.end+pa({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:i}),this.discontinuities[a]={time:l,accuracy:s}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Yi.EventTarget),Ds=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}m()(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Yi.EventTarget),Ns=ho(fo(po((function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var r=n((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0})),i=n((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),a=n((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),o=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,o=0;o<a;++o)t[o].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();
/*! @name aes-decrypter @version 3.1.3 @license Apache-2.0 */
var s,l=null,c=function(){function e(e){var t,n,r;l||(l=function(){var e,t,n,r,i,a,o,s,l=[[[],[],[],[],[]],[[],[],[],[],[]]],c=l[0],u=l[1],d=c[4],h=u[4],f=[],p=[];for(e=0;e<256;e++)p[(f[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=r||1,n=p[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,d[t]=a,h[a]=t,s=16843009*f[i=f[r=f[t]]]^65537*i^257*r^16843008*t,o=257*f[a]^16843008*a,e=0;e<4;e++)c[e][t]=o=o<<24^o>>>8,u[e][a]=s=s<<24^s>>>8;for(e=0;e<5;e++)c[e]=c[e].slice(0),u[e]=u[e].slice(0);return l}()),this._tables=[[l[0][0].slice(),l[0][1].slice(),l[0][2].slice(),l[0][3].slice(),l[0][4].slice()],[l[1][0].slice(),l[1][1].slice(),l[1][2].slice(),l[1][3].slice(),l[1][4].slice()]];var i=this._tables[0][4],a=this._tables[1],o=e.length,s=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var c=e.slice(0),u=[];for(this._key=[c,u],t=o;t<4*o+28;t++)r=c[t-1],(t%o==0||8===o&&t%o==4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%o==0&&(r=r<<8^r>>>24^s<<24,s=s<<1^283*(s>>7))),c[t]=c[t-o]^r;for(n=0;t;n++,t--)r=c[3&n?t:t-4],u[n]=t<=4||n<4?r:a[0][i[r>>>24]]^a[1][i[r>>16&255]]^a[2][i[r>>8&255]]^a[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,a){var o,s,l,c,u=this._key[1],d=e^u[0],h=r^u[1],f=n^u[2],p=t^u[3],m=u.length/4-2,g=4,v=this._tables[1],b=v[0],y=v[1],A=v[2],_=v[3],w=v[4];for(c=0;c<m;c++)o=b[d>>>24]^y[h>>16&255]^A[f>>8&255]^_[255&p]^u[g],s=b[h>>>24]^y[f>>16&255]^A[p>>8&255]^_[255&d]^u[g+1],l=b[f>>>24]^y[p>>16&255]^A[d>>8&255]^_[255&h]^u[g+2],p=b[p>>>24]^y[d>>16&255]^A[h>>8&255]^_[255&f]^u[g+3],g+=4,d=o,h=s,f=l;for(c=0;c<4;c++)i[(3&-c)+a]=w[d>>>24]<<24^w[h>>16&255]<<16^w[f>>8&255]<<8^w[255&p]^u[g++],o=d,d=h,h=f,f=p,p=o},e}(),u=function(e){function t(){var t;return(t=e.call(this,o)||this).jobs=[],t.delay=1,t.timeout_=null,t}a(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(o),d=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},h=function(){function e(t,n,r,i){var a=e.STEP,o=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),l=0;for(this.asyncStream_=new u,this.asyncStream_.push(this.decryptChunk_(o.subarray(l,l+a),n,r,s)),l=a;l<o.length;l+=a)r=new Uint32Array([d(o[l-4]),d(o[l-3]),d(o[l-2]),d(o[l-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(l,l+a),n,r,s));this.asyncStream_.push((function(){
/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
var e;i(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,a,o,s,l,u,h,f,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new c(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(r=n[0],i=n[1],a=n[2],o=n[3],f=0;f<p.length;f+=4)s=d(p[f]),l=d(p[f+1]),u=d(p[f+2]),h=d(p[f+3]),m.decrypt(s,l,u,h,v,f),v[f]=d(v[f]^r),v[f+1]=d(v[f+1]^i),v[f+2]=d(v[f+2]^a),v[f+3]=d(v[f+3]^o),r=s,i=l,a=u,o=h;return g}(e,t,n);r.set(i,e.byteOffset)}},r(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();s="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};var f=s.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000");var p=function(e){var t={};return Object.keys(e).forEach((function(n){var r,i=e[n];r=i,("function"===ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t};self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),i=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new h(n,r,i,(function(e,n){self.postMessage(p({source:t.source,decrypted:n}),[n.buffer])}))}})))),Ls=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Rs=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Bs=function(e,t){t.activePlaylistLoader=e,e.load()},js={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;Rs(n,r);var a=r.activeTrack(),o=r.activeGroup(),s=(o.filter((function(e){return e.default}))[0]||o[0]).id,l=r.tracks[s];if(a!==l){for(var c in Yi.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[c].enabled=r.tracks[c]===l;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];Yi.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Rs(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Fs={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",js[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e],o=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),a.track(o.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",js[e](e,n))}},Us={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],a=t.requestOptions,o=t.master.mediaGroups,s=t.mediaTypes[e],l=s.groups,c=s.tracks,u=s.logger_,d=t.masterPlaylistLoader,h=Ea(d.master);for(var f in o[e]&&0!==Object.keys(o[e]).length||(o[e]={main:{default:{default:!0}}},h&&(o[e].main.default.playlists=d.master.playlists)),o[e])for(var p in l[f]||(l[f]=[]),o[e][f]){var m=o[e][f][p],g=void 0;if(h?(u("AUDIO group '"+f+"' label '"+p+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===r&&m.playlists?new Fa(m.playlists[0],n,a):m.resolvedUri?new Fa(m.resolvedUri,n,a):m.playlists&&"dash"===r?new lo(m.playlists[0],n,a,d):null,m=Yi.mergeOptions({id:p,playlistLoader:g},m),Fs[e](e,m.playlistLoader,t),l[f].push(m),void 0===c[p]){var v=new Yi.AudioTrack({id:p,kind:Ls(m),enabled:!1,language:m.language,default:m.default,label:p});c[p]=v}}i.on("error",js[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,a=t.segmentLoaders[e],o=t.requestOptions,s=t.master.mediaGroups,l=t.mediaTypes[e],c=l.groups,u=l.tracks,d=t.masterPlaylistLoader;for(var h in s[e])for(var f in c[h]||(c[h]=[]),s[e][h])if(!s[e][h][f].forced){var p=s[e][h][f],m=void 0;if("hls"===i)m=new Fa(p.resolvedUri,r,o);else if("dash"===i){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new lo(p.playlists[0],r,o,d)}else"vhs-json"===i&&(m=new Fa(p.playlists?p.playlists[0]:p.resolvedUri,r,o));if(p=Yi.mergeOptions({id:f,playlistLoader:m},p),Fs[e](e,p.playlistLoader,t),c[h].push(p),void 0===u[f]){var g=n.addRemoteTextTrack({id:f,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:f},!1).track;u[f]=g}}a.on("error",js[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],a=i.groups,o=i.tracks;for(var s in r[e])for(var l in a[s]||(a[s]=[]),r[e][s]){var c=r[e][s][l];if(/^(?:CC|SERVICE)/.test(c.instreamId)){var u=n.options_.vhs&&n.options_.vhs.captionServices||{},d={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(u[d.instreamId]&&(d=Yi.mergeOptions(d,u[d.instreamId])),void 0===d.default&&delete d.default,a[s].push(Yi.mergeOptions({id:l},c)),void 0===o[l]){var h=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;o[l]=h}}}}},Hs=function e(t,n){for(var r=0;r<t.length;r++){if(_a(n,t[r]))return!0;if(t[r].playlists&&e(t[r].playlists,n))return!0}return!1},zs={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},Vs=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Us[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs,a=e.segmentLoaders,o=a.AUDIO,s=a.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,a=r.media();if(!a)return null;var o=null;a.attributes[e]&&(o=i[a.attributes[e]]);var s=Object.keys(i);if(!o)if("AUDIO"===e&&s.length>1&&Ea(t.master))for(var l=0;l<s.length;l++){var c=i[s[l]];if(Hs(c,a)){o=c;break}}else i.main?o=i.main:1===s.length&&(o=i[s[0]]);return void 0===n?o:null!==n&&o&&o.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=zs[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,a=t.mediaTypes[e],o=a.activeTrack(),s=a.getActiveGroup(),l=a.activePlaylistLoader,c=a.lastGroup_;s&&c&&s.id===c.id||(a.lastGroup_=s,a.lastTrack_=o,Rs(r,a),s&&!s.isMasterPlaylist&&(s.playlistLoader?(r.resyncLoader(),Bs(s.playlistLoader,a)):l&&i.resetEverything()))}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.masterPlaylistLoader,r=t.segmentLoaders,i=r[e],a=r.main,o=t.mediaTypes[e],s=o.activeTrack(),l=o.getActiveGroup(),c=o.activePlaylistLoader,u=o.lastTrack_;if((!u||!s||u.id!==s.id)&&(o.lastGroup_=l,o.lastTrack_=s,Rs(i,o),l)){if(l.isMasterPlaylist){if(!s||!u||s.id===u.id)return;var d=t.vhs.masterPlaylistController_,h=d.selectPlaylist();if(d.media()===h)return;return o.logger_("track change. Switching master audio from "+u.id+" to "+s.id),n.pause(),a.resetEverything(),void d.fastQualityChange_(h)}if("AUDIO"===e){if(!l.playlistLoader)return a.setAudio(!0),void a.resetEverything();i.setAudio(!0),a.setAudio(!1)}c!==l.playlistLoader?(i.track&&i.track(s),i.resetEverything(),Bs(l.playlistLoader,o)):Bs(l.playlistLoader,o)}}}(n,e),t[n].getActiveGroup=function(e,t){var n=t.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}}(n,e)}));var l=t.AUDIO.activeGroup();if(l){var c=(l.filter((function(e){return e.default}))[0]||l[0]).id;t.AUDIO.tracks[c].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),o.setAudio(!0)):s.setAudio(!0)}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var u=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var d in r.audioTracks().addEventListener("change",u),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",u),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[d])},Ws=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Gs=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},qs=function(e){function t(t){var n;n=e.call(this)||this;var r=t.src,i=t.handleManifestRedirects,o=t.withCredentials,s=t.tech,l=t.bandwidth,c=t.externVhs,u=t.useCueTags,d=t.blacklistDuration,h=t.enableLowInitialPlaylist,p=t.sourceType,m=t.cacheEncryptionKeys,g=t.experimentalBufferBasedABR,v=t.experimentalLeastPixelDiffSelector,b=t.captionServices;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");var y,A=t.maxPlaylistRetries;null==A&&(A=1/0),os=c,n.experimentalBufferBasedABR=Boolean(g),n.experimentalLeastPixelDiffSelector=Boolean(v),n.withCredentials=o,n.tech_=s,n.vhs_=s.vhs,n.sourceType_=p,n.useCueTags_=u,n.blacklistDuration=d,n.maxPlaylistRetries=A,n.enableLowInitialPlaylist=h,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:o,handleManifestRedirects:i,maxPlaylistRetries:A,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=(y={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){y[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:as,activeTrack:as,getActiveGroup:as,onGroupChanged:as,onTrackChanged:as,lastTrack_:null,logger_:Ji("MediaGroups["+e+"]")}})),y),n.mediaSource=new a.a.MediaSource,n.handleDurationChange_=n.handleDurationChange_.bind(f()(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(f()(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(f()(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=Yi.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new Ps(t),n.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Ns,n.sourceUpdater_=new Cs(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new Ds;var _={vhs:n.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:b,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:l,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_,experimentalExactManifestTimings:t.experimentalExactManifestTimings};n.masterPlaylistLoader_="dash"===n.sourceType_?new lo(r,n.vhs_,n.requestOptions_):new Fa(r,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new is(Yi.mergeOptions(_,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new is(Yi.mergeOptions(_,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new Os(Yi.mergeOptions(_,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise((function(e,t){function n(){s.off("vttjserror",r),e()}function r(){s.off("vttjsloaded",n),t()}s.one("vttjsloaded",n),s.one("vttjserror",r),s.addWebVttScript_()}))}}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),Ws.forEach((function(e){n[e+"_"]=Gs.bind(f()(n),e)})),n.logger_=Ji("MPC"),n.triggeredFmp4Usage=!1,"none"===n.tech_.preload()?(n.loadOnPlay_=function(){n.loadOnPlay_=null,n.masterPlaylistLoader_.load()},n.tech_.one("play",n.loadOnPlay_)):n.masterPlaylistLoader_.load(),n.timeToLoadedData__=-1,n.mainAppendsToLoadedData__=-1,n.audioAppendsToLoadedData__=-1;var w="none"===n.tech_.preload()?"play":"loadstart";return n.tech_.one(w,(function(){var e=Date.now();n.tech_.one("loadeddata",(function(){n.timeToLoadedData__=Date.now()-e,n.mainAppendsToLoadedData__=n.mainSegmentLoader_.mediaAppends,n.audioAppendsToLoadedData__=n.audioSegmentLoader_.mediaAppends}))})),n}m()(t,e);var n=t.prototype;return n.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},n.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},n.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},n.timeToLoadedData_=function(){return this.timeToLoadedData__},n.checkABR_=function(e){void 0===e&&(e="abr");var t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)},n.switchMedia_=function(e,t,n){var r=this.media(),i=r&&(r.id||r.uri),a=e.id||e.uri;i&&i!==a&&(this.logger_("switch media "+i+" -> "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=a.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(a.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var n,r=e.mediaGroups.AUDIO,i=Object.keys(r);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{var a=r.main||i.length&&r[i[0]];for(var o in a)if(a[o].default){n={label:o};break}}if(!n)return t;var s=[];for(var l in r)if(r[l][n.label]){var c=r[l][n.label];if(c.playlists&&c.playlists.length)s.push.apply(s,c.playlists);else if(c.uri)s.push(c);else if(e.playlists.length)for(var u=0;u<e.playlists.length;u++){var d=e.playlists[u];d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===l&&s.push(d)}}return s.length?s:t},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Aa(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),Vs({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.switchMedia_(e.initialMedia_,"initial"),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Aa(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.masterPlaylistLoader_.load(),e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&(e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck")))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var o in n.AUDIO[a]){n.AUDIO[a][o].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),os.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),r=this.bufferLowWaterLine(),i=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,n=e.buffered,r=e.currentTime,i=e.nextPlaylist,a=e.bufferLowWaterLine,o=e.bufferHighWaterLine,s=e.duration,l=e.experimentalBufferBasedABR,c=e.log;if(!i)return Yi.log.warn("We received no playlist to switch to. Please check your stream."),!1;var u="allowing switch "+(t&&t.id||"null")+" -> "+i.id;if(!t)return c(u+" as current playlist is not set"),!0;if(i.id===t.id)return!1;var d=Boolean(ea(n,r).length);if(!t.endList)return d||"number"!=typeof t.partTargetDuration?(c(u+" as current playlist is live"),!0):(c("not "+u+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=aa(n,r),f=l?co.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:co.MAX_BUFFER_LOW_WATER_LINE;if(s<f)return c(u+" as duration < max low water line ("+s+" < "+f+")"),!0;var p=i.attributes.BANDWIDTH,m=t.attributes.BANDWIDTH;if(p<m&&(!l||h<o)){var g=u+" as next bandwidth < current bandwidth ("+p+" < "+m+")";return l&&(g+=" and forwardBuffer < bufferHighWaterLine ("+h+" < "+o+")"),c(g),!0}if((!l||p>m)&&h>=a){var v=u+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+a+")";return l&&(v+=" and next bandwidth > current bandwidth ("+p+" > "+m+")"),c(v),!0}return c("not "+u+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:i,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()})),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Yi.browser.IE_VERSION||Yi.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(Yi.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=os.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var a=i.end(i.length-1);return a-r<=.1&&n-a<=.1},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));n.playlistErrors_++;var r,i=this.masterPlaylistLoader_.master.playlists,a=i.filter(ba),o=1===a.length&&a[0]===n;if(1===i.length&&t!==1/0)return Yi.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(o);if(o){var s=!1;i.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(s=!0,delete e.excludeUntil)}})),s&&(Yi.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}r=n.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=r,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var l=this.selectPlaylist();if(!l)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var c=e.internal?this.logger_:Yi.log.warn,u=e.message?" "+e.message:"";c((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+u+" Switching to playlist "+l.id+"."),l.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var d=l.targetDuration/2*1e3||5e3,h="number"==typeof l.lastRequest&&Date.now()-l.lastRequest<=d;return this.switchMedia_(l,"exclude",o||h)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var a=[];(i||"audio"===e)&&a.push("AUDIO"),(i||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=ea(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:os.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master,i=os.Playlist.seekable(t,n,os.Playlist.liveEdgeDelay(r,t));if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=os.Playlist.seekable(t,n,os.Playlist.liveEdgeDelay(r,t))).length)return}var a,o;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),o=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Yi.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===o||(this.logger_("seekable updated ["+na(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=os.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;var r=zo(this.master(),n),i={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=r.video||t.main.videoCodec||x.b),t.main.isMuxed&&(i.video+=","+(r.audio||t.main.audioCodec||x.a)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||a)&&(i.audio=r.audio||t.main.audioCodec||t.audio.audioCodec||x.a,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),i.audio||i.video){var o,s={};if(["video","audio"].forEach((function(e){if(i.hasOwnProperty(e)&&(r=t[e].isFmp4,a=i[e],!(r?Object(x.c)(a):Object(x.g)(a)))){var n=t[e].isFmp4?"browser":"muxer";s[n]=s[n]||[],s[n].push(i[e]),"audio"===e&&(o=n)}var r,a})),a&&o&&n.attributes.AUDIO){var l=n.attributes.AUDIO;this.master().playlists.forEach((function(e){(e.attributes&&e.attributes.AUDIO)===l&&e!==n&&(e.excludeUntil=1/0)})),this.logger_("excluding audio group "+l+" as "+o+' does not support codec(s): "'+i.audio+'"')}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var c=[];if(["video","audio"].forEach((function(t){var n=(Object(x.h)(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(Object(x.h)(i[t]||"")[0]||{}).type;n&&r&&n.toLowerCase()!==r.toLowerCase()&&c.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+i[t]+'"')})),c.length)return void this.blacklistCurrentPlaylist({playlist:n,message:"Codec switching not supported: "+c.join(", ")+".",blacklistDuration:1/0,internal:!0})}return i}var u=Object.keys(s).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+s[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:n,internal:!0,message:u,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:n,message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var a=zo(e.master,i),o=[];!a.audio||Object(x.g)(a.audio)||Object(x.c)(a.audio)||o.push("audio codec "+a.audio),!a.video||Object(x.g)(a.video)||Object(x.c)(a.video)||o.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&o.push("text codec "+a.text),o.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+o.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,i=Uo(Object(x.h)(e)),a=Ho(i),o=i.video&&Object(x.h)(i.video)[0]||null,s=i.audio&&Object(x.h)(i.audio)[0]||null;Object.keys(r).forEach((function(e){var i=r[e];if(-1===n.indexOf(i.id)&&i.excludeUntil!==1/0){n.push(i.id);var l=[],c=zo(t.masterPlaylistLoader_.master,i),u=Ho(c);if(c.audio||c.video){if(u!==a&&l.push('codec count "'+u+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var d=c.video&&Object(x.h)(c.video)[0]||null,h=c.audio&&Object(x.h)(c.audio)[0]||null;d&&o&&d.type.toLowerCase()!==o.type.toLowerCase()&&l.push('video codec "'+d.type+'" !== "'+o.type+'"'),h&&s&&h.type.toLowerCase()!==s.type.toLowerCase()&&l.push('audio codec "'+h.type+'" !== "'+s.type+'"')}l.length&&(i.excludeUntil=1/0,t.logger_("blacklisting "+i.id+": "+l.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,i=n,o=0;o<e.segments.length;o++){var s=e.segments[o];if(r||(r=Is(t,i+s.duration/2)),r){if("cueIn"in s){r.endTime=i,r.adEndTime=i,i+=s.duration,r=null;continue}if(i<r.endTime){i+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new a.a.VTTCue(i,i+s.duration,s.cueOut)).adStartTime=i,r.adEndTime=i+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var l=s.cueOutCont.split("/").map(parseFloat),c=l[0],u=l[1];(r=new a.a.VTTCue(i,i+s.duration,"")).adStartTime=i-c,r.adEndTime=r.adStartTime+u,t.addCue(r)}i+=s.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=co.GOAL_BUFFER_LENGTH,n=co.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,co.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=co.BUFFER_LOW_WATER_LINE,n=co.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,co.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,co.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return co.BUFFER_HIGH_WATER_LINE},t}(Yi.EventTarget),Ys=function(e,t,n){var r,i,a,o=e.masterPlaylistController_,s=o[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);if(t.attributes){var l=t.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=zo(o.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,a=s,function(e){var t=r.master.playlists[i],n=va(t),o=ba(t);return void 0===e?o:(e?delete t.disabled:t.disabled=!0,e===o||n||(a(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},Ks=["seeking","seeked","pause","playing","error"],Xs=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Ji("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.monitorCurrentTime_()},i=function(){return t.techWaiting_()},o=function(){return t.cancelTimer_()},s=this.masterPlaylistController_,l=["main","subtitle","audio"],c={};l.forEach((function(e){c[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",c[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",c[e].reset),t.tech_.on(["seeked","seeking"],c[e].reset)}));var u=function(e){["main","audio"].forEach((function(n){s[n+"SegmentLoader_"][e]("appended",t.seekingAppendCheck_)}))};this.seekingAppendCheck_=function(){t.fixesBadSeeks_()&&(t.consecutiveUpdates=0,t.lastRecordedTime=t.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=function(){return u("off")},this.watchForBadSeeking_=function(){t.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(Ks,o),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=function(){t.clearSeekingAppendCheck_(),t.logger_("dispose"),t.tech_.off("waiting",i),t.tech_.off(Ks,o),t.tech_.off("canplay",r),t.tech_.off("play",n),t.tech_.off("seeking",t.watchForBadSeeking_),t.tech_.off("seeked",t.clearSeekingAppendCheck_),l.forEach((function(e){s[e+"SegmentLoader_"].off("appendsdone",c[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",c[e].reset),t.tech_.off(["seeked","seeking"],c[e].reset)})),t.checkCurrentTimeTimeout_&&a.a.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&a.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=a.a.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:ra(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:.1)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+na(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var i=this.masterPlaylistController_.sourceUpdater_,a=this.tech_.buffered(),o=i.audioBuffer?i.audioBuffered():null,s=i.videoBuffer?i.videoBuffered():null,l=this.media(),c=l.partTargetDuration?l.partTargetDuration:2*(l.targetDuration-1/30),u=[o,s],d=0;d<u.length;d++){if(u[d])if(aa(u[d],n)<c)return!1}var h=ta(a,n);return 0!==h.length&&(e=h.start(0)+.1,this.logger_("Buffered region starts ("+h.start(0)+")  just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ea(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=ta(i,t);if(a.length>0){var o=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+o+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+.1;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var a=ea(t,r-3),o=ea(t,r),s=ea(n,r);s.length&&!o.length&&a.length&&(i={start:a.end(0),end:s.end(0)})}else{ta(t,r).length||(i=this.gapFromVideoUnderflow_(t,r))}return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=ta(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+1/30),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return Yi.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return Yi.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),a=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:a}}return null},e}(),Qs={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},$s={PlaylistLoader:Fa,Playlist:Sa,utils:Ja,STANDARD_PLAYLIST_SELECTOR:Xo,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Sa.isEnabled);return qo(t,(function(e,t){return Yo(e,t)})),t.filter((function(t){return!!zo(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Xo,movingAverageBandwidthSelector:function(e){var t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var r=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),Ko(this.playlists.master,t,parseInt(Go(this.tech_.el(),"width"),10)*r,parseInt(Go(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Yo,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||a.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||a.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:Va()};Object.keys(co).forEach((function(e){Object.defineProperty($s,e,{get:function(){return Yi.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),co[e]},set:function(t){Yi.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Yi.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):co[e]=t}})}));var Js=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};$s.canPlaySource=function(){return Yi.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Zs=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?i.concat([r]):i,Object.keys(n)),o=[],s=[];return a.forEach((function(e){s.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),o.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(o),Promise.race(s)])},el=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=Uo(Object(x.h)(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);var i=Object(x.e)(r.video),a=Object(x.e)(r.audio),o={};for(var s in e)o[s]={},a&&(o[s].audioContentType=a),i&&(o[s].videoContentType=i),t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(o[s].pssh=t.contentProtection[s].pssh),"string"==typeof e[s]&&(o[s].url=e[s]);return Yi.mergeOptions(e,o)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(Yi.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},tl=function(){if(!a.a.localStorage)return null;var e=a.a.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};$s.supportsNativeHls=function(){if(!s.a||!s.a.createElement)return!1;var e=s.a.createElement("video");if(!Yi.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),$s.supportsNativeDash=!!(s.a&&s.a.createElement&&Yi.getTech("Html5").isSupported())&&/maybe|probably/i.test(s.a.createElement("video").canPlayType("application/dash+xml")),$s.supportsTypeNatively=function(e){return"hls"===e?$s.supportsNativeHls:"dash"===e&&$s.supportsNativeDash},$s.isSupported=function(){return Yi.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var nl=function(e){function t(t,n,r){var i;if(i=e.call(this,n,Yi.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&Yi.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),"number"==typeof r.initialBandwidth&&(i.options_.bandwidth=r.initialBandwidth),i.logger_=Ji("VhsHandler"),n.options_&&n.options_.playerId){var a=Yi(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return Yi.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),f()(i)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return Yi.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),f()(i)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return Yi.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),f()(i)},configurable:!0}),i.player_=a}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(s.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=s.a.fullscreenElement||s.a.webkitFullscreenElement||s.a.mozFullScreenElement||s.a.msFullscreenElement;t&&t.contains(i.tech_.el())?i.masterPlaylistController_.fastQualityChange_():i.masterPlaylistController_.checkABR_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}m()(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=tl();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=co.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===co.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=$s,this.options_.sourceType=Object(O.a)(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&Yi.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new qs(this.options_);var i=Yi.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Xs(i),this.masterPlaylistController_.on("error",(function(){var e=Yi.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var o=this.options_.experimentalBufferBasedABR?$s.movingAverageBandwidthSelector(.55):$s.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.masterPlaylistController_.selectInitialPlaylist=$s.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var e=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,t=a.a.navigator.connection||a.a.navigator.mozConnection||a.a.navigator.webkitConnection;if(this.options_.useNetworkInformationApi&&t){var n=1e3*t.downlink*1e3;e=n>=1e7&&e>=1e7?Math.max(e,n):n}return e},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Yi.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return n.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return n.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return n.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return ra(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return ra(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!a.a.localStorage)return!1;var t=tl();t=t?Yi.mergeOptions(t,e):e;try{a.a.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=Ea(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!va(e)})).map((function(t,n){return new Ys(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=a.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Zs({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))},n.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=el({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",(function(t){if("output-restricted"===t.status){var n=e.masterPlaylistController_.master();if(n&&n.playlists){var r,i=[];if(n.playlists.forEach((function(e){e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,i.push(e))})),i.length)(r=Yi.log).warn.apply(r,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(i)),e.masterPlaylistController_.fastQualityChange_()}}})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==Yi.browser.IE_VERSION&&n?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Yi.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),Js(t,n.playlists)})),this.playlists.on("mediachange",(function(){Js(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":"2.16.2","mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return Cs.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&a.a.URL.revokeObjectURL&&(a.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return Za({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),eo({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Yi.getComponent("Component")),rl={name:"videojs-http-streaming",VERSION:"2.16.2",canHandleSource:function(e,t){void 0===t&&(t={});var n=Yi.mergeOptions(Yi.options,t);return rl.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=Yi.mergeOptions(Yi.options,n);return t.vhs=new nl(e,t,r),Yi.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Yi.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Va(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){var n=Object(O.a)(e);if(!n)return"";var r=rl.getOverrideNative(t);return!$s.supportsTypeNatively(n)||r?"maybe":""},getOverrideNative:function(e){void 0===e&&(e={});var t=e,n=t.vhs,r=void 0===n?{}:n,i=t.hls,a=void 0===i?{}:i,o=!(Yi.browser.IS_ANY_SAFARI||Yi.browser.IS_IOS),s=r.overrideNative,l=void 0===s?o:s,c=a.overrideNative;return void 0!==c&&c||l}};(Object(x.c)("avc1.4d400d,mp4a.40.2")&&Yi.getTech("Html5").registerSourceHandler(rl,0),Yi.VhsHandler=nl,Object.defineProperty(Yi,"HlsHandler",{get:function(){return Yi.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),nl},configurable:!0}),Yi.VhsSourceHandler=rl,Object.defineProperty(Yi,"HlsSourceHandler",{get:function(){return Yi.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),rl},configurable:!0}),Yi.Vhs=$s,Object.defineProperty(Yi,"Hls",{get:function(){return Yi.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),$s},configurable:!0}),Yi.use||(Yi.registerComponent("Hls",$s),Yi.registerComponent("Vhs",$s)),Yi.options.vhs=Yi.options.vhs||{},Yi.options.hls=Yi.options.hls||{},Yi.getPlugin&&Yi.getPlugin("reloadSourceOnError"))||(Yi.registerPlugin||Yi.plugin)("reloadSourceOnError",(function(e){!function e(t,n){var r=0,i=0,a=Yi.mergeOptions(Qs,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var o=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",o),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},l=function(){return Date.now()-r<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"==typeof a.getSource?(r=Date.now(),a.getSource.call(t,s)):void Yi.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},c=function e(){t.off("loadedmetadata",o),t.off("error",l),t.off("dispose",e)};t.on("error",l),t.on("dispose",c),t.reloadSourceOnError=function(n){c(),e(t,n)}}(this,e)}));t.a=Yi}).call(this,n(68))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(130),i=n.n(r);function a(t){for(var n,r=(n=t,i.a.atob?i.a.atob(n):e.from(n,"base64").toString("binary")),a=new Uint8Array(r.length),o=0;o<r.length;o++)a[o]=r.charCodeAt(o);return a}}).call(this,n(113).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return F}));var r=n(100),i=n.n(r),a=n(338),o=function(){return"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this}();function s(){o.console&&"function"==typeof o.console.log&&o.console.log.apply(o.console,arguments)}var l={log:s,warn:function(e){o.console&&("function"==typeof o.console.warn?o.console.warn.apply(o.console,arguments):s.call(null,arguments))},error:function(e){o.console&&("function"==typeof o.console.error?o.console.error.apply(o.console,arguments):s(e))}};function c(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){p(r.response,t,n)},r.onerror=function(){l.error("could not download file")},r.send()}function u(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function d(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var h,f,p=o.saveAs||("object"!==("undefined"==typeof window?"undefined":i()(window))||window!==o?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=o.URL||o.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener","string"==typeof e?(i.href=e,i.origin!==location.origin?u(i.href)?c(e,t,n):d(i,i.target="_blank"):d(i)):(i.href=r.createObjectURL(e),setTimeout((function(){r.revokeObjectURL(i.href)}),4e4),setTimeout((function(){d(i)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download","string"==typeof e)if(u(e))c(e,t,n);else{var r=document.createElement("a");r.href=e,r.target="_blank",setTimeout((function(){d(r)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==i()(t)&&(l.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),t)}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return c(e,t,n);var a="application/octet-stream"===e.type,s=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&s)&&"object"===("undefined"==typeof FileReader?"undefined":i()(FileReader))){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},u.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);r?r.location=h:location.href=h,r=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});
/**
 * A class to parse color values
 * @author Stoyan Stefanov <sstoo@gmail.com>
 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
 * @license Use it if you like it
 */function m(e){var t;e=e||"",this.ok=!1,"#"==e.charAt(0)&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,a=n[r].process,o=i.exec(e);o&&(t=a(o),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return 1==e.length&&(e="0"+e),1==t.length&&(t="0"+t),1==n.length&&(n="0"+n),"#"+e+t+n
/**
 * @license
 * Joseph Myers does not specify a particular license for his work.
 *
 * Author: Joseph Myers
 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
 *
 * Modified by: Owen Leong
 */}}function g(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];n=b(n,r,i,a,t[0],7,-680876936),a=b(a,n,r,i,t[1],12,-389564586),i=b(i,a,n,r,t[2],17,606105819),r=b(r,i,a,n,t[3],22,-1044525330),n=b(n,r,i,a,t[4],7,-176418897),a=b(a,n,r,i,t[5],12,1200080426),i=b(i,a,n,r,t[6],17,-1473231341),r=b(r,i,a,n,t[7],22,-45705983),n=b(n,r,i,a,t[8],7,1770035416),a=b(a,n,r,i,t[9],12,-1958414417),i=b(i,a,n,r,t[10],17,-42063),r=b(r,i,a,n,t[11],22,-1990404162),n=b(n,r,i,a,t[12],7,1804603682),a=b(a,n,r,i,t[13],12,-40341101),i=b(i,a,n,r,t[14],17,-1502002290),n=y(n,r=b(r,i,a,n,t[15],22,1236535329),i,a,t[1],5,-165796510),a=y(a,n,r,i,t[6],9,-1069501632),i=y(i,a,n,r,t[11],14,643717713),r=y(r,i,a,n,t[0],20,-373897302),n=y(n,r,i,a,t[5],5,-701558691),a=y(a,n,r,i,t[10],9,38016083),i=y(i,a,n,r,t[15],14,-660478335),r=y(r,i,a,n,t[4],20,-405537848),n=y(n,r,i,a,t[9],5,568446438),a=y(a,n,r,i,t[14],9,-1019803690),i=y(i,a,n,r,t[3],14,-187363961),r=y(r,i,a,n,t[8],20,1163531501),n=y(n,r,i,a,t[13],5,-1444681467),a=y(a,n,r,i,t[2],9,-51403784),i=y(i,a,n,r,t[7],14,1735328473),n=A(n,r=y(r,i,a,n,t[12],20,-1926607734),i,a,t[5],4,-378558),a=A(a,n,r,i,t[8],11,-2022574463),i=A(i,a,n,r,t[11],16,1839030562),r=A(r,i,a,n,t[14],23,-35309556),n=A(n,r,i,a,t[1],4,-1530992060),a=A(a,n,r,i,t[4],11,1272893353),i=A(i,a,n,r,t[7],16,-155497632),r=A(r,i,a,n,t[10],23,-1094730640),n=A(n,r,i,a,t[13],4,681279174),a=A(a,n,r,i,t[0],11,-358537222),i=A(i,a,n,r,t[3],16,-722521979),r=A(r,i,a,n,t[6],23,76029189),n=A(n,r,i,a,t[9],4,-640364487),a=A(a,n,r,i,t[12],11,-421815835),i=A(i,a,n,r,t[15],16,530742520),n=_(n,r=A(r,i,a,n,t[2],23,-995338651),i,a,t[0],6,-198630844),a=_(a,n,r,i,t[7],10,1126891415),i=_(i,a,n,r,t[14],15,-1416354905),r=_(r,i,a,n,t[5],21,-57434055),n=_(n,r,i,a,t[12],6,1700485571),a=_(a,n,r,i,t[3],10,-1894986606),i=_(i,a,n,r,t[10],15,-1051523),r=_(r,i,a,n,t[1],21,-2054922799),n=_(n,r,i,a,t[8],6,1873313359),a=_(a,n,r,i,t[15],10,-30611744),i=_(i,a,n,r,t[6],15,-1560198380),r=_(r,i,a,n,t[13],21,1309151649),n=_(n,r,i,a,t[4],6,-145523070),a=_(a,n,r,i,t[11],10,-1120210379),i=_(i,a,n,r,t[2],15,718787259),r=_(r,i,a,n,t[9],21,-343485551),e[0]=O(n,e[0]),e[1]=O(r,e[1]),e[2]=O(i,e[2]),e[3]=O(a,e[3])}function v(e,t,n,r,i,a){return t=O(O(t,e),O(r,a)),O(t<<i|t>>>32-i,n)}function b(e,t,n,r,i,a,o){return v(t&n|~t&r,e,t,i,a,o)}function y(e,t,n,r,i,a,o){return v(t&r|n&~r,e,t,i,a,o)}function A(e,t,n,r,i,a,o){return v(t^n^r,e,t,i,a,o)}function _(e,t,n,r,i,a,o){return v(n^(t|~r),e,t,i,a,o)}function w(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)g(r,E(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(g(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*n,g(r,i),r}function E(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}h=o.atob.bind(o),f=o.btoa.bind(o);var S="0123456789abcdef".split("");function C(e){for(var t="",n=0;n<4;n++)t+=S[e>>8*n+4&15]+S[e>>8*n&15];return t}function T(e){return String.fromCharCode((255&e)>>0,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function k(e){return w(e).map(T).join("")}var x="5d41402abc4b2a76b9719d911017c592"!=function(e){for(var t=0;t<e.length;t++)e[t]=C(e[t]);return e.join("")}(w("hello"));function O(e,t){if(x){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}return e+t&4294967295}
/**
 * @license
 * FPDF is released under a permissive license: there is no usage restriction.
 * You may embed it freely in your application (commercial or not), with or
 * without modifications.
 *
 * Reference: http://www.fpdf.org/en/script/script37.php
 */function I(e,t){var n,r,i,a;if(e!==n){for(var o=(i=e,a=1+(256/e.length>>0),new Array(a+1).join(i)),s=[],l=0;l<256;l++)s[l]=l;var c=0;for(l=0;l<256;l++){var u=s[l];c=(c+u+o.charCodeAt(l))%256,s[l]=s[c],s[c]=u}n=e,r=s}else s=r;var d=t.length,h=0,f=0,p="";for(l=0;l<d;l++)f=(f+(u=s[h=(h+1)%256]))%256,s[h]=s[f],s[f]=u,o=s[(s[h]+s[f])%256],p+=String.fromCharCode(t.charCodeAt(l)^o);return p}
/**
 * @license
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 * Author: Owen Leong (@owenl131)
 * Date: 15 Oct 2020
 * References:
 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
 * http://www.fpdf.org/en/script/script37.php
 */var M={print:4,modify:8,copy:16,"annot-forms":32};function P(e,t,n,r){this.v=1,this.r=2;var i=192;e.forEach((function(e){if(void 0!==M.perm)throw new Error("Invalid permission: "+e);i+=M[e]})),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var a=(t+this.padding).substr(0,32),o=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=k(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=I(this.encryptionKey,this.padding)}function D(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);t+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):e[r]}return t}function N(e){if("object"!==i()(e))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,n,r){if(r=r||!1,"string"!=typeof e||"function"!=typeof n||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var i=Math.random().toString(35);return t[e][i]=[n,!!r],i},this.unsubscribe=function(e){for(var n in t)if(t[n][e])return delete t[n][e],0===Object.keys(t[n]).length&&delete t[n],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in t[n]){var s=t[n][a];try{s[0].apply(e,r)}catch(n){o.console&&l.error("jsPDF PubSub Error",n.message,n)}s[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function L(e){if(!(this instanceof L))return new L(e);var t="opacity,stroke-opacity".split(",");for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id="",this.objectNumber=-1}function R(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function B(e,t,n,r,i){if(!(this instanceof B))return new B(e,t,n,r,i);this.type="axial"===e?2:3,this.coords=t,this.colors=n,R.call(this,r,i)}function j(e,t,n,r,i){if(!(this instanceof j))return new j(e,t,n,r,i);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream="",this.cloneIndex=0,R.call(this,r,i)}function F(e){var t,n="string"==typeof arguments[0]?arguments[0]:"p",r=arguments[1],a=arguments[2],s=arguments[3],c=[],u=1,d=16,h="S",g=null;"object"===i()(e=e||{})&&(n=e.orientation,r=e.unit||r,a=e.format||a,s=e.compress||e.compressPdf||s,null!==(g=e.encryption||null)&&(g.userPassword=g.userPassword||"",g.ownerPassword=g.ownerPassword||"",g.userPermissions=g.userPermissions||[]),u="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(t=e.precision),void 0!==e.floatPrecision&&(d=e.floatPrecision),h=e.defaultPathOperation||"S"),c=e.filters||(!0===s?["FlateEncode"]:c),r=r||"mm",n=(""+(n||"P")).toLowerCase();var v=e.putOnlyUsedFonts||!1,b={},y={internal:{},__private__:{}};y.__private__.PubSub=N;var A="1.3",_=y.__private__.getPdfVersion=function(){return A};y.__private__.setPdfVersion=function(e){A=e};var w={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};y.__private__.getPageFormats=function(){return w};var E=y.__private__.getPageFormat=function(e){return w[e]};a=a||"a4";var S={COMPAT:"compat",ADVANCED:"advanced"},C=S.COMPAT;function T(){this.saveGraphicsState(),de(new Ge(Te,0,0,-Te,0,Un()*Te).toString()+" cm"),this.setFontSize(this.getFontSize()/Te),h="n",C=S.ADVANCED}function k(){this.restoreGraphicsState(),h="S",C=S.COMPAT}var x=y.__private__.combineFontStyleAndFontWeight=function(e,t){if("bold"==e&&"normal"==t||"bold"==e&&400==t||"normal"==e&&"italic"==t||"bold"==e&&"italic"==t)throw new Error("Invalid Combination of fontweight and fontstyle");return t&&(e=400==t||"normal"===t?"italic"===e?"italic":"normal":700!=t&&"bold"!==t||"normal"!==e?(700==t?"bold":t)+""+e:"bold"),e};y.advancedAPI=function(e){var t=C===S.COMPAT;return t&&T.call(this),"function"!=typeof e||(e(this),t&&k.call(this)),this},y.compatAPI=function(e){var t=C===S.ADVANCED;return t&&k.call(this),"function"!=typeof e||(e(this),t&&T.call(this)),this},y.isAdvancedAPI=function(){return C===S.ADVANCED};var O,I=function(e){if(C!==S.ADVANCED)throw new Error(e+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},M=y.roundToPrecision=y.__private__.roundToPrecision=function(e,n){var r=t||n;if(isNaN(e)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return e.toFixed(r).replace(/0+$/,"")};O=y.hpf=y.__private__.hpf="number"==typeof d?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return M(e,d)}:"smart"===d?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return M(e,e>-1&&e<1?16:5)}:function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return M(e,16)};var R=y.f2=y.__private__.f2=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f2");return M(e,2)},U=y.__private__.f3=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f3");return M(e,3)},H=y.scale=y.__private__.scale=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.scale");return C===S.COMPAT?e*Te:C===S.ADVANCED?e:void 0},z=function(e){return C===S.COMPAT?Un()-e:C===S.ADVANCED?e:void 0},V=function(e){return H(z(e))};y.__private__.setPrecision=y.setPrecision=function(e){"number"==typeof parseInt(e,10)&&(t=parseInt(e,10))};var W,G="00000000000000000000000000000000",q=y.__private__.getFileId=function(){return G},Y=y.__private__.setFileId=function(e){return G=void 0!==e&&/^[a-fA-F0-9]{32}$/.test(e)?e.toUpperCase():G.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==g&&(Yt=new P(g.userPermissions,g.userPassword,g.ownerPassword,G)),G};y.setFileId=function(e){return Y(e),this},y.getFileId=function(){return q()};var K=y.__private__.convertDateToPDFDate=function(e){var t=e.getTimezoneOffset(),n=t<0?"+":"-",r=Math.floor(Math.abs(t/60)),i=Math.abs(t%60),a=[n,Z(r),"'",Z(i),"'"].join("");return["D:",e.getFullYear(),Z(e.getMonth()+1),Z(e.getDate()),Z(e.getHours()),Z(e.getMinutes()),Z(e.getSeconds()),a].join("")},X=y.__private__.convertPDFDateToDate=function(e){var t=parseInt(e.substr(2,4),10),n=parseInt(e.substr(6,2),10)-1,r=parseInt(e.substr(8,2),10),i=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),o=parseInt(e.substr(14,2),10);return new Date(t,n,r,i,a,o,0)},Q=y.__private__.setCreationDate=function(e){var t;if(void 0===e&&(e=new Date),e instanceof Date)t=K(e);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(e))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=e}return W=t},$=y.__private__.getCreationDate=function(e){var t=W;return"jsDate"===e&&(t=X(W)),t};y.setCreationDate=function(e){return Q(e),this},y.getCreationDate=function(e){return $(e)};var J,Z=y.__private__.padd2=function(e){return("0"+parseInt(e)).slice(-2)},ee=y.__private__.padd2Hex=function(e){return("00"+(e=e.toString())).substr(e.length)},te=0,ne=[],re=[],ie=0,ae=[],oe=[],se=!1,le=re,ce=function(){te=0,ie=0,re=[],ne=[],ae=[],Ze=Qe(),et=Qe()};y.__private__.setCustomOutputDestination=function(e){se=!0,le=e};var ue=function(e){se||(le=e)};y.__private__.resetCustomOutputDestination=function(){se=!1,le=re};var de=y.__private__.out=function(e){return e=e.toString(),ie+=e.length+1,le.push(e),le},he=y.__private__.write=function(e){return de(1===arguments.length?e.toString():Array.prototype.join.call(arguments," "))},fe=y.__private__.getArrayBuffer=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n);t--;)r[t]=e.charCodeAt(t);return n},pe=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];y.__private__.getStandardFonts=function(){return pe};var me=e.fontSize||16;y.__private__.setFontSize=y.setFontSize=function(e){return me=C===S.ADVANCED?e/Te:e,this};var ge,ve=y.__private__.getFontSize=y.getFontSize=function(){return C===S.COMPAT?me:me*Te},be=e.R2L||!1;y.__private__.setR2L=y.setR2L=function(e){return be=e,this},y.__private__.getR2L=y.getR2L=function(){return be};var ye,Ae=y.__private__.setZoomMode=function(e){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(e))ge=e;else if(isNaN(e)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(e))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+e+'" is not recognized.');ge=e}else ge=parseInt(e,10)};y.__private__.getZoomMode=function(){return ge};var _e,we=y.__private__.setPageMode=function(e){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(e))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+e+'" is not recognized.');ye=e};y.__private__.getPageMode=function(){return ye};var Ee=y.__private__.setLayoutMode=function(e){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(e))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+e+'" is not recognized.');_e=e};y.__private__.getLayoutMode=function(){return _e},y.__private__.setDisplayMode=y.setDisplayMode=function(e,t,n){return Ae(e),Ee(t),we(n),this};var Se={title:"",subject:"",author:"",keywords:"",creator:""};y.__private__.getDocumentProperty=function(e){if(-1===Object.keys(Se).indexOf(e))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Se[e]},y.__private__.getDocumentProperties=function(){return Se},y.__private__.setDocumentProperties=y.setProperties=y.setDocumentProperties=function(e){for(var t in Se)Se.hasOwnProperty(t)&&e[t]&&(Se[t]=e[t]);return this},y.__private__.setDocumentProperty=function(e,t){if(-1===Object.keys(Se).indexOf(e))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Se[e]=t};var Ce,Te,ke,xe,Oe,Ie={},Me={},Pe=[],De={},Ne={},Le={},Re={},Be=null,je=0,Fe=[],Ue=new N(y),He=e.hotfixes||[],ze={},Ve={},We=[],Ge=function e(t,n,r,i,a,o){if(!(this instanceof e))return new e(t,n,r,i,a,o);isNaN(t)&&(t=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(i)&&(i=1),isNaN(a)&&(a=0),isNaN(o)&&(o=0),this._matrix=[t,n,r,i,a,o]};Object.defineProperty(Ge.prototype,"sx",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Ge.prototype,"shy",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Ge.prototype,"shx",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Ge.prototype,"sy",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Ge.prototype,"tx",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Ge.prototype,"ty",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Ge.prototype,"a",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Ge.prototype,"b",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Ge.prototype,"c",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Ge.prototype,"d",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Ge.prototype,"e",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Ge.prototype,"f",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Ge.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ge.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ge.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ge.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Ge.prototype.join=function(e){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(O).join(e)},Ge.prototype.multiply=function(e){var t=e.sx*this.sx+e.shy*this.shx,n=e.sx*this.shy+e.shy*this.sy,r=e.shx*this.sx+e.sy*this.shx,i=e.shx*this.shy+e.sy*this.sy,a=e.tx*this.sx+e.ty*this.shx+this.tx,o=e.tx*this.shy+e.ty*this.sy+this.ty;return new Ge(t,n,r,i,a,o)},Ge.prototype.decompose=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(e*e+t*t),s=(e/=o)*n+(t/=o)*r;n-=e*s,r-=t*s;var l=Math.sqrt(n*n+r*r);return s/=l,e*(r/=l)<t*(n/=l)&&(e=-e,t=-t,s=-s,o=-o),{scale:new Ge(o,0,0,l,0,0),translate:new Ge(1,0,0,1,i,a),rotate:new Ge(e,t,-t,e,0,0),skew:new Ge(1,0,s,1,0,0)}},Ge.prototype.toString=function(e){return this.join(" ")},Ge.prototype.inversed=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=1/(e*r-t*n),s=r*o,l=-t*o,c=-n*o,u=e*o;return new Ge(s,l,c,u,-s*i-c*a,-l*i-u*a)},Ge.prototype.applyToPoint=function(e){var t=e.x*this.sx+e.y*this.shx+this.tx,n=e.x*this.shy+e.y*this.sy+this.ty;return new Pn(t,n)},Ge.prototype.applyToRectangle=function(e){var t=this.applyToPoint(e),n=this.applyToPoint(new Pn(e.x+e.w,e.y+e.h));return new Dn(t.x,t.y,n.x-t.x,n.y-t.y)},Ge.prototype.clone=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty;return new Ge(e,t,n,r,i,a)},y.Matrix=Ge;var qe=y.matrixMult=function(e,t){return t.multiply(e)},Ye=new Ge(1,0,0,1,0,0);y.unitMatrix=y.identityMatrix=Ye;var Ke=function(e,t){if(!Ne[e]){var n=(t instanceof B?"Sh":"P")+(Object.keys(De).length+1).toString(10);t.id=n,Ne[e]=n,De[n]=t,Ue.publish("addPattern",t)}};y.ShadingPattern=B,y.TilingPattern=j,y.addShadingPattern=function(e,t){return I("addShadingPattern()"),Ke(e,t),this},y.beginTilingPattern=function(e){I("beginTilingPattern()"),Ln(e.boundingBox[0],e.boundingBox[1],e.boundingBox[2]-e.boundingBox[0],e.boundingBox[3]-e.boundingBox[1],e.matrix)},y.endTilingPattern=function(e,t){I("endTilingPattern()"),t.stream=oe[J].join("\n"),Ke(e,t),Ue.publish("endTilingPattern",t),We.pop().restore()};var Xe=y.__private__.newObject=function(){var e=Qe();return $e(e,!0),e},Qe=y.__private__.newObjectDeferred=function(){return te++,ne[te]=function(){return ie},te},$e=function(e,t){return t="boolean"==typeof t&&t,ne[e]=ie,t&&de(e+" 0 obj"),e},Je=y.__private__.newAdditionalObject=function(){var e={objId:Qe(),content:""};return ae.push(e),e},Ze=Qe(),et=Qe(),tt=y.__private__.decodeColorString=function(e){var t=e.split(" ");if(2!==t.length||"g"!==t[1]&&"G"!==t[1])5!==t.length||"k"!==t[4]&&"K"!==t[4]||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),"r"]);else{var n=parseFloat(t[0]);t=[n,n,n,"r"]}for(var r="#",i=0;i<3;i++)r+=("0"+Math.floor(255*parseFloat(t[i])).toString(16)).slice(-2);return r},nt=y.__private__.encodeColorString=function(e){var t;"string"==typeof e&&(e={ch1:e});var n=e.ch1,r=e.ch2,a=e.ch3,o=e.ch4,s="draw"===e.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var l=new m(n);if(l.ok)n=l.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n="#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),"string"==typeof n&&/^#[0-9A-Fa-f]{6}$/.test(n)){var c=parseInt(n.substr(1),16);n=c>>16&255,r=c>>8&255,a=255&c}if(void 0===r||void 0===o&&n===r&&r===a)if("string"==typeof n)t=n+" "+s[0];else switch(e.precision){case 2:t=R(n/255)+" "+s[0];break;case 3:default:t=U(n/255)+" "+s[0]}else if(void 0===o||"object"===i()(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.","1.","1.",s[1]].join(" ");if("string"==typeof n)t=[n,r,a,s[1]].join(" ");else switch(e.precision){case 2:t=[R(n/255),R(r/255),R(a/255),s[1]].join(" ");break;default:case 3:t=[U(n/255),U(r/255),U(a/255),s[1]].join(" ")}}else if("string"==typeof n)t=[n,r,a,o,s[2]].join(" ");else switch(e.precision){case 2:t=[R(n),R(r),R(a),R(o),s[2]].join(" ");break;case 3:default:t=[U(n),U(r),U(a),U(o),s[2]].join(" ")}return t},rt=y.__private__.getFilters=function(){return c},it=y.__private__.putStream=function(e){var t=(e=e||{}).data||"",n=e.filters||rt(),r=e.alreadyAppliedFilters||[],i=e.addLength1||!1,a=t.length,o=e.objectId,s=function(e){return e};if(null!==g&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==g&&(s=Yt.encryptor(o,0));var l={};!0===n&&(n=["FlateEncode"]);var c=e.additionalKeyValues||[],u=(l=void 0!==F.API.processDataByFilters?F.API.processDataByFilters(t,n):{data:t,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==l.data.length&&(c.push({key:"Length",value:l.data.length}),!0===i&&c.push({key:"Length1",value:a})),0!=u.length)if(u.split("/").length-1==1)c.push({key:"Filter",value:u});else{c.push({key:"Filter",value:"["+u+"]"});for(var d=0;d<c.length;d+=1)if("DecodeParms"===c[d].key){for(var h=[],f=0;f<l.reverseChain.split("/").length-1;f+=1)h.push("null");h.push(c[d].value),c[d].value="["+h.join(" ")+"]"}}de("<<");for(var p=0;p<c.length;p++)de("/"+c[p].key+" "+c[p].value);de(">>"),0!==l.data.length&&(de("stream"),de(s(l.data)),de("endstream"))},at=y.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;$e(r,!0),de("<</Type /Page"),de("/Parent "+e.rootDictionaryObjId+" 0 R"),de("/Resources "+e.resourceDictionaryObjId+" 0 R"),de("/MediaBox ["+parseFloat(O(e.mediaBox.bottomLeftX))+" "+parseFloat(O(e.mediaBox.bottomLeftY))+" "+O(e.mediaBox.topRightX)+" "+O(e.mediaBox.topRightY)+"]"),null!==e.cropBox&&de("/CropBox ["+O(e.cropBox.bottomLeftX)+" "+O(e.cropBox.bottomLeftY)+" "+O(e.cropBox.topRightX)+" "+O(e.cropBox.topRightY)+"]"),null!==e.bleedBox&&de("/BleedBox ["+O(e.bleedBox.bottomLeftX)+" "+O(e.bleedBox.bottomLeftY)+" "+O(e.bleedBox.topRightX)+" "+O(e.bleedBox.topRightY)+"]"),null!==e.trimBox&&de("/TrimBox ["+O(e.trimBox.bottomLeftX)+" "+O(e.trimBox.bottomLeftY)+" "+O(e.trimBox.topRightX)+" "+O(e.trimBox.topRightY)+"]"),null!==e.artBox&&de("/ArtBox ["+O(e.artBox.bottomLeftX)+" "+O(e.artBox.bottomLeftY)+" "+O(e.artBox.topRightX)+" "+O(e.artBox.topRightY)+"]"),"number"==typeof e.userUnit&&1!==e.userUnit&&de("/UserUnit "+e.userUnit),Ue.publish("putPage",{objId:r,pageContext:Fe[t],pageNumber:t,page:n}),de("/Contents "+i+" 0 R"),de(">>"),de("endobj");var a=n.join("\n");return C===S.ADVANCED&&(a+="\nQ"),$e(i,!0),it({data:a,filters:rt(),objectId:i}),de("endobj"),r},ot=y.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=je;e++)Fe[e].objId=Qe(),Fe[e].contentsObjId=Qe();for(e=1;e<=je;e++)n.push(at({number:e,data:oe[e],objId:Fe[e].objId,contentsObjId:Fe[e].contentsObjId,mediaBox:Fe[e].mediaBox,cropBox:Fe[e].cropBox,bleedBox:Fe[e].bleedBox,trimBox:Fe[e].trimBox,artBox:Fe[e].artBox,userUnit:Fe[e].userUnit,rootDictionaryObjId:Ze,resourceDictionaryObjId:et}));$e(Ze,!0),de("<</Type /Pages");var r="/Kids [";for(t=0;t<je;t++)r+=n[t]+" 0 R ";de(r+"]"),de("/Count "+je),de(">>"),de("endobj"),Ue.publish("postPutPages")},st=function(e){Ue.publish("putFont",{font:e,out:de,newObject:Xe,putStream:it}),!0!==e.isAlreadyPutted&&(e.objectNumber=Xe(),de("<<"),de("/Type /Font"),de("/BaseFont /"+D(e.postScriptName)),de("/Subtype /Type1"),"string"==typeof e.encoding&&de("/Encoding /"+e.encoding),de("/FirstChar 32"),de("/LastChar 255"),de(">>"),de("endobj"))},lt=function(){for(var e in Ie)Ie.hasOwnProperty(e)&&(!1===v||!0===v&&b.hasOwnProperty(e))&&st(Ie[e])},ct=function(e){e.objectNumber=Xe();var t=[];t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Form"}),t.push({key:"BBox",value:"["+[O(e.x),O(e.y),O(e.x+e.width),O(e.y+e.height)].join(" ")+"]"}),t.push({key:"Matrix",value:"["+e.matrix.toString()+"]"});var n=e.pages[1].join("\n");it({data:n,additionalKeyValues:t,objectId:e.objectNumber}),de("endobj")},ut=function(){for(var e in ze)ze.hasOwnProperty(e)&&ct(ze[e])},dt=function(e,t){var n,r=[],i=1/(t-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),0!=e[0].offset){var a={offset:0,color:e[0].color};e.unshift(a)}if(1!=e[e.length-1].offset){var o={offset:1,color:e[e.length-1].color};e.push(o)}for(var s="",l=0,c=0;c<r.length;c++){for(n=r[c];n>e[l+1].offset;)l++;var u=e[l].offset,d=(n-u)/(e[l+1].offset-u),h=e[l].color,f=e[l+1].color;s+=ee(Math.round((1-d)*h[0]+d*f[0]).toString(16))+ee(Math.round((1-d)*h[1]+d*f[1]).toString(16))+ee(Math.round((1-d)*h[2]+d*f[2]).toString(16))}return s.trim()},ht=function(e,t){t||(t=21);var n=Xe(),r=dt(e.colors,t),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+t+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),it({data:r,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),de("endobj"),e.objectNumber=Xe(),de("<< /ShadingType "+e.type),de("/ColorSpace /DeviceRGB");var a="/Coords ["+O(parseFloat(e.coords[0]))+" "+O(parseFloat(e.coords[1]))+" ";2===e.type?a+=O(parseFloat(e.coords[2]))+" "+O(parseFloat(e.coords[3])):a+=O(parseFloat(e.coords[2]))+" "+O(parseFloat(e.coords[3]))+" "+O(parseFloat(e.coords[4]))+" "+O(parseFloat(e.coords[5])),de(a+="]"),e.matrix&&de("/Matrix ["+e.matrix.toString()+"]"),de("/Function "+n+" 0 R"),de("/Extend [true true]"),de(">>"),de("endobj")},ft=function(e,t){var n=Qe(),r=Xe();t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+e.boundingBox.map(O).join(" ")+"]"}),i.push({key:"XStep",value:O(e.xStep)}),i.push({key:"YStep",value:O(e.yStep)}),i.push({key:"Resources",value:n+" 0 R"}),e.matrix&&i.push({key:"Matrix",value:"["+e.matrix.toString()+"]"}),it({data:e.stream,additionalKeyValues:i,objectId:e.objectNumber}),de("endobj")},pt=function(e){var t;for(t in De)De.hasOwnProperty(t)&&(De[t]instanceof B?ht(De[t]):De[t]instanceof j&&ft(De[t],e))},mt=function(e){for(var t in e.objectNumber=Xe(),de("<<"),e)switch(t){case"opacity":de("/ca "+R(e[t]));break;case"stroke-opacity":de("/CA "+R(e[t]))}de(">>"),de("endobj")},gt=function(){var e;for(e in Le)Le.hasOwnProperty(e)&&mt(Le[e])},vt=function(){for(var e in de("/XObject <<"),ze)ze.hasOwnProperty(e)&&ze[e].objectNumber>=0&&de("/"+e+" "+ze[e].objectNumber+" 0 R");Ue.publish("putXobjectDict"),de(">>")},bt=function(){Yt.oid=Xe(),de("<<"),de("/Filter /Standard"),de("/V "+Yt.v),de("/R "+Yt.r),de("/U <"+Yt.toHexString(Yt.U)+">"),de("/O <"+Yt.toHexString(Yt.O)+">"),de("/P "+Yt.P),de(">>"),de("endobj")},yt=function(){for(var e in de("/Font <<"),Ie)Ie.hasOwnProperty(e)&&(!1===v||!0===v&&b.hasOwnProperty(e))&&de("/"+e+" "+Ie[e].objectNumber+" 0 R");de(">>")},At=function(){if(Object.keys(De).length>0){for(var e in de("/Shading <<"),De)De.hasOwnProperty(e)&&De[e]instanceof B&&De[e].objectNumber>=0&&de("/"+e+" "+De[e].objectNumber+" 0 R");Ue.publish("putShadingPatternDict"),de(">>")}},_t=function(e){if(Object.keys(De).length>0){for(var t in de("/Pattern <<"),De)De.hasOwnProperty(t)&&De[t]instanceof y.TilingPattern&&De[t].objectNumber>=0&&De[t].objectNumber<e&&de("/"+t+" "+De[t].objectNumber+" 0 R");Ue.publish("putTilingPatternDict"),de(">>")}},wt=function(){if(Object.keys(Le).length>0){var e;for(e in de("/ExtGState <<"),Le)Le.hasOwnProperty(e)&&Le[e].objectNumber>=0&&de("/"+e+" "+Le[e].objectNumber+" 0 R");Ue.publish("putGStateDict"),de(">>")}},Et=function(e){$e(e.resourcesOid,!0),de("<<"),de("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),yt(),At(),_t(e.objectOid),wt(),vt(),de(">>"),de("endobj")},St=function(){var e=[];lt(),gt(),ut(),pt(e),Ue.publish("putResources"),e.forEach(Et),Et({resourcesOid:et,objectOid:Number.MAX_SAFE_INTEGER}),Ue.publish("postPutResources")},Ct=function(){Ue.publish("putAdditionalObjects");for(var e=0;e<ae.length;e++){var t=ae[e];$e(t.objId,!0),de(t.content),de("endobj")}Ue.publish("postPutAdditionalObjects")},Tt=function(e){Me[e.fontName]=Me[e.fontName]||{},Me[e.fontName][e.fontStyle]=e.id},kt=function(e,t,n,r,i){var a={id:"F"+(Object.keys(Ie).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:n,encoding:r,isStandardFont:i||!1,metadata:{}};return Ue.publish("addFont",{font:a,instance:this}),Ie[a.id]=a,Tt(a),a.id},xt=function(e){for(var t=0,n=pe.length;t<n;t++){var r=kt.call(this,e[t][0],e[t][1],e[t][2],pe[t][3],!0);!1===v&&(b[r]=!0);var i=e[t][0].split("-");Tt({id:r,fontName:i[0],fontStyle:i[1]||""})}Ue.publish("addFonts",{fonts:Ie,dictionary:Me})},Ot=function(e){return e.foo=function(){try{return e.apply(this,arguments)}catch(e){var t=e.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var n="Error in function "+t.split("\n")[0].split("<")[0]+": "+e.message;if(!o.console)throw new Error(n);o.console.error(n,e),o.alert&&alert(n)}},e.foo.bar=e,e.foo},It=function(e,t){var n,r,i,a,o,s,l,c,u;if(i=(t=t||{}).sourceEncoding||"Unicode",o=t.outputEncoding,(t.autoencode||o)&&Ie[Ce].metadata&&Ie[Ce].metadata[i]&&Ie[Ce].metadata[i].encoding&&(a=Ie[Ce].metadata[i].encoding,!o&&Ie[Ce].encoding&&(o=Ie[Ce].encoding),!o&&a.codePages&&(o=a.codePages[0]),"string"==typeof o&&(o=a[o]),o)){for(l=!1,s=[],n=0,r=e.length;n<r;n++)(c=o[e.charCodeAt(n)])?s.push(String.fromCharCode(c)):s.push(e[n]),s[n].charCodeAt(0)>>8&&(l=!0);e=s.join("")}for(n=e.length;void 0===l&&0!==n;)e.charCodeAt(n-1)>>8&&(l=!0),n--;if(!l)return e;for(s=t.noBOM?[]:[254,255],n=0,r=e.length;n<r;n++){if((u=(c=e.charCodeAt(n))>>8)>>8)throw new Error("Character at position "+n+" of string '"+e+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(u),s.push(c-(u<<8))}return String.fromCharCode.apply(void 0,s)},Mt=y.__private__.pdfEscape=y.pdfEscape=function(e,t){return It(e,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Pt=y.__private__.beginPage=function(e){oe[++je]=[],Fe[je]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},Lt(je),ue(oe[J])},Dt=function(e,t){var r,i,o;switch(n=t||n,"string"==typeof e&&(r=E(e.toLowerCase()),Array.isArray(r)&&(i=r[0],o=r[1])),Array.isArray(e)&&(i=e[0]*Te,o=e[1]*Te),isNaN(i)&&(i=a[0],o=a[1]),(i>14400||o>14400)&&(l.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),o=Math.min(14400,o)),a=[i,o],n.substr(0,1)){case"l":o>i&&(a=[o,i]);break;case"p":i>o&&(a=[o,i])}Pt(a),mn(fn),de(En),0!==On&&de(On+" J"),0!==In&&de(In+" j"),Ue.publish("addPage",{pageNumber:je})},Nt=function(e){e>0&&e<=je&&(oe.splice(e,1),Fe.splice(e,1),je--,J>je&&(J=je),this.setPage(J))},Lt=function(e){e>0&&e<=je&&(J=e)},Rt=y.__private__.getNumberOfPages=y.getNumberOfPages=function(){return oe.length-1},Bt=function(e,t,n){var r,i=void 0;return n=n||{},e=void 0!==e?e:Ie[Ce].fontName,t=void 0!==t?t:Ie[Ce].fontStyle,r=e.toLowerCase(),void 0!==Me[r]&&void 0!==Me[r][t]?i=Me[r][t]:void 0!==Me[e]&&void 0!==Me[e][t]?i=Me[e][t]:!1===n.disableWarning&&l.warn("Unable to look up font label for font '"+e+"', '"+t+"'. Refer to getFontList() for available fonts."),i||n.noFallback||null==(i=Me.times[t])&&(i=Me.times.normal),i},jt=y.__private__.putInfo=function(){var e=Xe(),t=function(e){return e};for(var n in null!==g&&(t=Yt.encryptor(e,0)),de("<<"),de("/Producer ("+Mt(t("jsPDF "+F.version))+")"),Se)Se.hasOwnProperty(n)&&Se[n]&&de("/"+n.substr(0,1).toUpperCase()+n.substr(1)+" ("+Mt(t(Se[n]))+")");de("/CreationDate ("+Mt(t(W))+")"),de(">>"),de("endobj")},Ft=y.__private__.putCatalog=function(e){var t=(e=e||{}).rootDictionaryObjId||Ze;switch(Xe(),de("<<"),de("/Type /Catalog"),de("/Pages "+t+" 0 R"),ge||(ge="fullwidth"),ge){case"fullwidth":de("/OpenAction [3 0 R /FitH null]");break;case"fullheight":de("/OpenAction [3 0 R /FitV null]");break;case"fullpage":de("/OpenAction [3 0 R /Fit]");break;case"original":de("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+ge;"%"===n.substr(n.length-1)&&(ge=parseInt(ge)/100),"number"==typeof ge&&de("/OpenAction [3 0 R /XYZ null null "+R(ge)+"]")}switch(_e||(_e="continuous"),_e){case"continuous":de("/PageLayout /OneColumn");break;case"single":de("/PageLayout /SinglePage");break;case"two":case"twoleft":de("/PageLayout /TwoColumnLeft");break;case"tworight":de("/PageLayout /TwoColumnRight")}ye&&de("/PageMode /"+ye),Ue.publish("putCatalog"),de(">>"),de("endobj")},Ut=y.__private__.putTrailer=function(){de("trailer"),de("<<"),de("/Size "+(te+1)),de("/Root "+te+" 0 R"),de("/Info "+(te-1)+" 0 R"),null!==g&&de("/Encrypt "+Yt.oid+" 0 R"),de("/ID [ <"+G+"> <"+G+"> ]"),de(">>")},Ht=y.__private__.putHeader=function(){de("%PDF-"+A),de("%ºß¬à")},zt=y.__private__.putXRef=function(){var e="0000000000";de("xref"),de("0 "+(te+1)),de("0000000000 65535 f ");for(var t=1;t<=te;t++)"function"==typeof ne[t]?de((e+ne[t]()).slice(-10)+" 00000 n "):void 0!==ne[t]?de((e+ne[t]).slice(-10)+" 00000 n "):de("0000000000 00000 n ")},Vt=y.__private__.buildDocument=function(){ce(),ue(re),Ue.publish("buildDocument"),Ht(),ot(),Ct(),St(),null!==g&&bt(),jt(),Ft();var e=ie;return zt(),Ut(),de("startxref"),de(""+e),de("%%EOF"),ue(oe[J]),re.join("\n")},Wt=y.__private__.getBlob=function(e){return new Blob([fe(e)],{type:"application/pdf"})},Gt=y.output=y.__private__.output=Ot((function(e,t){switch("string"==typeof(t=t||{})?t={filename:t}:t.filename=t.filename||"generated.pdf",e){case void 0:return Vt();case"save":y.save(t.filename);break;case"arraybuffer":return fe(Vt());case"blob":return Wt(Vt());case"bloburi":case"bloburl":if(void 0!==o.URL&&"function"==typeof o.URL.createObjectURL)return o.URL&&o.URL.createObjectURL(Wt(Vt()))||void 0;l.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",r=Vt();try{n=f(r)}catch(e){n=f(unescape(encodeURIComponent(r)))}return"data:application/pdf;filename="+t.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(o)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",a=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';t.pdfObjectUrl&&(i=t.pdfObjectUrl,a="");var s='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+i+'"'+a+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(t)+");<\/script></body></html>",c=o.open();return null!==c&&c.document.write(s),c}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(o)){var u='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(t.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+t.filename+'" width="500px" height="400px" /></body></html>',d=o.open();if(null!==d){d.document.write(u);var h=this;d.document.documentElement.querySelector("#pdfViewer").onload=function(){d.document.title=t.filename,d.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(h.output("bloburl"))}}return d}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(o))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var p='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",t)+'"></iframe></body></html>',m=o.open();if(null!==m&&(m.document.write(p),m.document.title=t.filename),m||"undefined"==typeof safari)return m;break;case"datauri":case"dataurl":return o.document.location.href=this.output("datauristring",t);default:return null}})),qt=function(e){return!0===Array.isArray(He)&&He.indexOf(e)>-1};switch(r){case"pt":Te=1;break;case"mm":Te=72/25.4;break;case"cm":Te=72/2.54;break;case"in":Te=72;break;case"px":Te=1==qt("px_scaling")?.75:96/72;break;case"pc":case"em":Te=12;break;case"ex":Te=6;break;default:if("number"!=typeof r)throw new Error("Invalid unit: "+r);Te=r}var Yt=null;Q(),Y();var Kt=function(e){return null!==g?Yt.encryptor(e,0):function(e){return e}},Xt=y.__private__.getPageInfo=y.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Fe[e].objId,pageNumber:e,pageContext:Fe[e]}},Qt=y.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var t in Fe)if(Fe[t].objId===e)break;return Xt(t)},$t=y.__private__.getCurrentPageInfo=y.getCurrentPageInfo=function(){return{objId:Fe[J].objId,pageNumber:J,pageContext:Fe[J]}};y.addPage=function(){return Dt.apply(this,arguments),this},y.setPage=function(){return Lt.apply(this,arguments),ue.call(this,oe[J]),this},y.insertPage=function(e){return this.addPage(),this.movePage(J,e),this},y.movePage=function(e,t){var n,r;if(e>t){n=oe[e],r=Fe[e];for(var i=e;i>t;i--)oe[i]=oe[i-1],Fe[i]=Fe[i-1];oe[t]=n,Fe[t]=r,this.setPage(t)}else if(e<t){n=oe[e],r=Fe[e];for(var a=e;a<t;a++)oe[a]=oe[a+1],Fe[a]=Fe[a+1];oe[t]=n,Fe[t]=r,this.setPage(t)}return this},y.deletePage=function(){return Nt.apply(this,arguments),this},y.__private__.text=y.text=function(e,t,n,r,a){var o,s,l,c,u,d,h,f,p,m=(r=r||{}).scope||this;if("number"==typeof e&&"number"==typeof t&&("string"==typeof n||Array.isArray(n))){var g=n;n=t,t=e,e=g}if(arguments[3]instanceof Ge==0?(l=arguments[4],c=arguments[5],"object"===i()(h=arguments[3])&&null!==h||("string"==typeof l&&(c=l,l=null),"string"==typeof h&&(c=h,h=null),"number"==typeof h&&(l=h,h=null),r={flags:h,angle:l,align:c})):(I("The transform parameter of text() with a Matrix value"),p=a),isNaN(t)||isNaN(n)||null==e)throw new Error("Invalid arguments passed to jsPDF.text");if(0===e.length)return m;var v="",y=!1,A="number"==typeof r.lineHeightFactor?r.lineHeightFactor:hn,_=m.internal.scaleFactor;function w(e){return e=e.split("\t").join(Array(r.TabLen||9).join(" ")),Mt(e,h)}function E(e){for(var t,n=e.concat(),r=[],i=n.length;i--;)"string"==typeof(t=n.shift())?r.push(t):Array.isArray(e)&&(1===t.length||void 0===t[1]&&void 0===t[2])?r.push(t[0]):r.push([t[0],t[1],t[2]]);return r}function T(e,t){var n;if("string"==typeof e)n=t(e)[0];else if(Array.isArray(e)){for(var r,i,a=e.concat(),o=[],s=a.length;s--;)"string"==typeof(r=a.shift())?o.push(t(r)[0]):Array.isArray(r)&&"string"==typeof r[0]&&(i=t(r[0],r[1],r[2]),o.push([i[0],i[1],i[2]]));n=o}return n}var k=!1,x=!0;if("string"==typeof e)k=!0;else if(Array.isArray(e)){var M=e.concat();s=[];for(var P,D=M.length;D--;)("string"!=typeof(P=M.shift())||Array.isArray(P)&&"string"!=typeof P[0])&&(x=!1);k=x}if(!1===k)throw new Error('Type of text must be string or Array. "'+e+'" is not recognized.');"string"==typeof e&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var N=me/m.internal.scaleFactor,L=N*(A-1);switch(r.baseline){case"bottom":n-=L;break;case"top":n+=N-L;break;case"hanging":n+=N-2*L;break;case"middle":n+=N/2-L}if((d=r.maxWidth||0)>0&&("string"==typeof e?e=m.splitTextToSize(e,d):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce((function(e,t){return e.concat(m.splitTextToSize(t,d))}),[]))),o={text:e,x:t,y:n,options:r,mutex:{pdfEscape:Mt,activeFontKey:Ce,fonts:Ie,activeFontSize:me}},Ue.publish("preProcessText",o),e=o.text,l=(r=o.options).angle,p instanceof Ge==0&&l&&"number"==typeof l){l*=Math.PI/180,0===r.rotationDirection&&(l=-l),C===S.ADVANCED&&(l=-l);var R=Math.cos(l),B=Math.sin(l);p=new Ge(R,B,-B,R,0,0)}else l&&l instanceof Ge&&(p=l);C!==S.ADVANCED||p||(p=Ye),void 0!==(u=r.charSpace||kn)&&(v+=O(H(u))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(f=r.horizontalScale)&&(v+=O(100*f)+" Tz\n"),r.lang;var j=-1,F=void 0!==r.renderingMode?r.renderingMode:r.stroke,U=m.internal.getCurrentPageInfo().pageContext;switch(F){case 0:case!1:case"fill":j=0;break;case 1:case!0:case"stroke":j=1;break;case 2:case"fillThenStroke":j=2;break;case 3:case"invisible":j=3;break;case 4:case"fillAndAddForClipping":j=4;break;case 5:case"strokeAndAddPathForClipping":j=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":j=6;break;case 7:case"addToPathForClipping":j=7}var z=void 0!==U.usedRenderingMode?U.usedRenderingMode:-1;-1!==j?v+=j+" Tr\n":-1!==z&&(v+="0 Tr\n"),-1!==j&&(U.usedRenderingMode=j),c=r.align||"left";var V,W=me*A,G=m.internal.pageSize.getWidth(),q=Ie[Ce];u=r.charSpace||kn,d=r.maxWidth||0,h=Object.assign({autoencode:!0,noBOM:!0},r.flags);var Y=[];if("[object Array]"===Object.prototype.toString.call(e)){var K;s=E(e),"left"!==c&&(V=s.map((function(e){return m.getStringUnitWidth(e,{font:q,charSpace:u,fontSize:me,doKerning:!1})*me/_})));var X,Q=0;if("right"===c){t-=V[0],e=[],D=s.length;for(var $=0;$<D;$++)0===$?(X=yn(t),K=An(n)):(X=H(Q-V[$]),K=-W),e.push([s[$],X,K]),Q=V[$]}else if("center"===c){t-=V[0]/2,e=[],D=s.length;for(var J=0;J<D;J++)0===J?(X=yn(t),K=An(n)):(X=H((Q-V[J])/2),K=-W),e.push([s[J],X,K]),Q=V[J]}else if("left"===c){e=[],D=s.length;for(var Z=0;Z<D;Z++)e.push(s[Z])}else{if("justify"!==c)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');e=[],D=s.length,d=0!==d?d:G;for(var ee=0;ee<D;ee++)K=0===ee?An(n):-W,X=0===ee?yn(t):0,ee<D-1?Y.push(O(H((d-V[ee])/(s[ee].split(" ").length-1)))):Y.push(0),e.push([s[ee],X,K])}}var te="boolean"==typeof r.R2L?r.R2L:be;!0===te&&(e=T(e,(function(e,t,n){return[e.split("").reverse().join(""),t,n]}))),o={text:e,x:t,y:n,options:r,mutex:{pdfEscape:Mt,activeFontKey:Ce,fonts:Ie,activeFontSize:me}},Ue.publish("postProcessText",o),e=o.text,y=o.mutex.isHex||!1;var ne=Ie[Ce].encoding;"WinAnsiEncoding"!==ne&&"StandardEncoding"!==ne||(e=T(e,(function(e,t,n){return[w(e),t,n]}))),s=E(e),e=[];for(var re,ie,ae,oe=0,se=1,le=Array.isArray(s[0])?se:oe,ce="",ue=function(e,t,n){var i="";return n instanceof Ge?(n="number"==typeof r.angle?qe(n,new Ge(1,0,0,1,e,t)):qe(new Ge(1,0,0,1,e,t),n),C===S.ADVANCED&&(n=qe(new Ge(1,0,0,-1,0,0),n)),i=n.join(" ")+" Tm\n"):i=O(e)+" "+O(t)+" Td\n",i},he=0;he<s.length;he++){switch(ce="",le){case se:ae=(y?"<":"(")+s[he][0]+(y?">":")"),re=parseFloat(s[he][1]),ie=parseFloat(s[he][2]);break;case oe:ae=(y?"<":"(")+s[he]+(y?">":")"),re=yn(t),ie=An(n)}void 0!==Y&&void 0!==Y[he]&&(ce=Y[he]+" Tw\n"),0===he?e.push(ce+ue(re,ie,p)+ae):le===oe?e.push(ce+ae):le===se&&e.push(ce+ue(re,ie,p)+ae)}e=le===oe?e.join(" Tj\nT* "):e.join(" Tj\n"),e+=" Tj\n";var fe="BT\n/";return fe+=Ce+" "+me+" Tf\n",fe+=O(me*A)+" TL\n",fe+=Cn+"\n",fe+=v,fe+=e,de(fe+="ET"),b[Ce]=!0,m};var Jt=y.__private__.clip=y.clip=function(e){return de("evenodd"===e?"W*":"W"),this};y.clipEvenOdd=function(){return Jt("evenodd")},y.__private__.discardPath=y.discardPath=function(){return de("n"),this};var Zt=y.__private__.isValidStyle=function(e){var t=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(e)&&(t=!0),t};y.__private__.setDefaultPathOperation=y.setDefaultPathOperation=function(e){return Zt(e)&&(h=e),this};var en=y.__private__.getStyle=y.getStyle=function(e){var t=h;switch(e){case"D":case"S":t="S";break;case"F":t="f";break;case"FD":case"DF":t="B";break;case"f":case"f*":case"B":case"B*":t=e}return t},tn=y.close=function(){return de("h"),this};y.stroke=function(){return de("S"),this},y.fill=function(e){return nn("f",e),this},y.fillEvenOdd=function(e){return nn("f*",e),this},y.fillStroke=function(e){return nn("B",e),this},y.fillStrokeEvenOdd=function(e){return nn("B*",e),this};var nn=function(e,t){"object"===i()(t)?on(t,e):de(e)},rn=function(e){null===e||C===S.ADVANCED&&void 0===e||(e=en(e),de(e))};function an(e,t,n,r,i){var a=new j(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,i||this.matrix);a.stream=this.stream;var o=e+"$$"+this.cloneIndex+++"$$";return Ke(o,a),a}var on=function(e,t){var n=Ne[e.key],r=De[n];if(r instanceof B)de("q"),de(sn(t)),r.gState&&y.setGState(r.gState),de(e.matrix.toString()+" cm"),de("/"+n+" sh"),de("Q");else if(r instanceof j){var i=new Ge(1,0,0,-1,0,Un());e.matrix&&(i=i.multiply(e.matrix||Ye),n=an.call(r,e.key,e.boundingBox,e.xStep,e.yStep,i).id),de("q"),de("/Pattern cs"),de("/"+n+" scn"),r.gState&&y.setGState(r.gState),de(t),de("Q")}},sn=function(e){switch(e){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},ln=y.moveTo=function(e,t){return de(O(H(e))+" "+O(V(t))+" m"),this},cn=y.lineTo=function(e,t){return de(O(H(e))+" "+O(V(t))+" l"),this},un=y.curveTo=function(e,t,n,r,i,a){return de([O(H(e)),O(V(t)),O(H(n)),O(V(r)),O(H(i)),O(V(a)),"c"].join(" ")),this};y.__private__.line=y.line=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Zt(i))throw new Error("Invalid arguments passed to jsPDF.line");return C===S.COMPAT?this.lines([[n-e,r-t]],e,t,[1,1],i||"S"):this.lines([[n-e,r-t]],e,t,[1,1]).stroke()},y.__private__.lines=y.lines=function(e,t,n,r,i,a){var o,s,l,c,u,d,h,f,p,m,g,v;if("number"==typeof e&&(v=n,n=t,t=e,e=v),r=r||[1,1],a=a||!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!Zt(i)||"boolean"!=typeof a)throw new Error("Invalid arguments passed to jsPDF.lines");for(ln(t,n),o=r[0],s=r[1],c=e.length,m=t,g=n,l=0;l<c;l++)2===(u=e[l]).length?(m=u[0]*o+m,g=u[1]*s+g,cn(m,g)):(d=u[0]*o+m,h=u[1]*s+g,f=u[2]*o+m,p=u[3]*s+g,m=u[4]*o+m,g=u[5]*s+g,un(d,h,f,p,m,g));return a&&tn(),rn(i),this},y.path=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.c;switch(n.op){case"m":ln(r[0],r[1]);break;case"l":cn(r[0],r[1]);break;case"c":un.apply(this,r);break;case"h":tn()}}return this},y.__private__.rect=y.rect=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Zt(i))throw new Error("Invalid arguments passed to jsPDF.rect");return C===S.COMPAT&&(r=-r),de([O(H(e)),O(V(t)),O(H(n)),O(H(r)),"re"].join(" ")),rn(i),this},y.__private__.triangle=y.triangle=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!Zt(o))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[n-e,r-t],[i-n,a-r],[e-i,t-a]],e,t,[1,1],o,!0),this},y.__private__.roundedRect=y.roundedRect=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!Zt(o))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*n),a=Math.min(a,.5*r),this.lines([[n-2*i,0],[i*s,0,i,a-a*s,i,a],[0,r-2*a],[0,a*s,-i*s,a,-i,a],[2*i-n,0],[-i*s,0,-i,-a*s,-i,-a],[0,2*a-r],[0,-a*s,i*s,-a,i,-a]],e+i,t,[1,1],o,!0),this},y.__private__.ellipse=y.ellipse=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Zt(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var a=4/3*(Math.SQRT2-1)*n,o=4/3*(Math.SQRT2-1)*r;return ln(e+n,t),un(e+n,t-o,e+a,t-r,e,t-r),un(e-a,t-r,e-n,t-o,e-n,t),un(e-n,t+o,e-a,t+r,e,t+r),un(e+a,t+r,e+n,t+o,e+n,t),rn(i),this},y.__private__.circle=y.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!Zt(r))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(e,t,n,n,r)},y.setFont=function(e,t,n){return n&&(t=x(t,n)),Ce=Bt(e,t,{disableWarning:!1}),this};var dn=y.__private__.getFont=y.getFont=function(){return Ie[Bt.apply(y,arguments)]};y.__private__.getFontList=y.getFontList=function(){var e,t,n={};for(e in Me)if(Me.hasOwnProperty(e))for(t in n[e]=[],Me[e])Me[e].hasOwnProperty(t)&&n[e].push(t);return n},y.addFont=function(e,t,n,r,i){var a=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==a.indexOf(arguments[3])?i=arguments[3]:arguments[3]&&-1==a.indexOf(arguments[3])&&(n=x(n,r)),i=i||"Identity-H",kt.call(this,e,t,n,i)};var hn,fn=e.lineWidth||.200025,pn=y.__private__.getLineWidth=y.getLineWidth=function(){return fn},mn=y.__private__.setLineWidth=y.setLineWidth=function(e){return fn=e,de(O(H(e))+" w"),this};y.__private__.setLineDash=F.API.setLineDash=F.API.setLineDashPattern=function(e,t){if(e=e||[],t=t||0,isNaN(t)||!Array.isArray(e))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return e=e.map((function(e){return O(H(e))})).join(" "),t=O(H(t)),de("["+e+"] "+t+" d"),this};var gn=y.__private__.getLineHeight=y.getLineHeight=function(){return me*hn};y.__private__.getLineHeight=y.getLineHeight=function(){return me*hn};var vn=y.__private__.setLineHeightFactor=y.setLineHeightFactor=function(e){return"number"==typeof(e=e||1.15)&&(hn=e),this},bn=y.__private__.getLineHeightFactor=y.getLineHeightFactor=function(){return hn};vn(e.lineHeight);var yn=y.__private__.getHorizontalCoordinate=function(e){return H(e)},An=y.__private__.getVerticalCoordinate=function(e){return C===S.ADVANCED?e:Fe[J].mediaBox.topRightY-Fe[J].mediaBox.bottomLeftY-H(e)},_n=y.__private__.getHorizontalCoordinateString=y.getHorizontalCoordinateString=function(e){return O(yn(e))},wn=y.__private__.getVerticalCoordinateString=y.getVerticalCoordinateString=function(e){return O(An(e))},En=e.strokeColor||"0 G";y.__private__.getStrokeColor=y.getDrawColor=function(){return tt(En)},y.__private__.setStrokeColor=y.setDrawColor=function(e,t,n,r){return En=nt({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"draw",precision:2}),de(En),this};var Sn=e.fillColor||"0 g";y.__private__.getFillColor=y.getFillColor=function(){return tt(Sn)},y.__private__.setFillColor=y.setFillColor=function(e,t,n,r){return Sn=nt({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"fill",precision:2}),de(Sn),this};var Cn=e.textColor||"0 g",Tn=y.__private__.getTextColor=y.getTextColor=function(){return tt(Cn)};y.__private__.setTextColor=y.setTextColor=function(e,t,n,r){return Cn=nt({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"text",precision:3}),this};var kn=e.charSpace,xn=y.__private__.getCharSpace=y.getCharSpace=function(){return parseFloat(kn||0)};y.__private__.setCharSpace=y.setCharSpace=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return kn=e,this};var On=0;y.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},y.__private__.setLineCap=y.setLineCap=function(e){var t=y.CapJoinStyles[e];if(void 0===t)throw new Error("Line cap style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return On=t,de(t+" J"),this};var In=0;y.__private__.setLineJoin=y.setLineJoin=function(e){var t=y.CapJoinStyles[e];if(void 0===t)throw new Error("Line join style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return In=t,de(t+" j"),this},y.__private__.setLineMiterLimit=y.__private__.setMiterLimit=y.setLineMiterLimit=y.setMiterLimit=function(e){if(e=e||0,isNaN(e))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return de(O(H(e))+" M"),this},y.GState=L,y.setGState=function(e){(e="string"==typeof e?Le[Re[e]]:Mn(null,e)).equals(Be)||(de("/"+e.id+" gs"),Be=e)};var Mn=function(e,t){if(!e||!Re[e]){var n=!1;for(var r in Le)if(Le.hasOwnProperty(r)&&Le[r].equals(t)){n=!0;break}if(n)t=Le[r];else{var i="GS"+(Object.keys(Le).length+1).toString(10);Le[i]=t,t.id=i}return e&&(Re[e]=t.id),Ue.publish("addGState",t),t}};y.addGState=function(e,t){return Mn(e,t),this},y.saveGraphicsState=function(){return de("q"),Pe.push({key:Ce,size:me,color:Cn}),this},y.restoreGraphicsState=function(){de("Q");var e=Pe.pop();return Ce=e.key,me=e.size,Cn=e.color,Be=null,this},y.setCurrentTransformationMatrix=function(e){return de(e.toString()+" cm"),this},y.comment=function(e){return de("#"+e),this};var Pn=function(e,t){var n=e||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return n},set:function(e){isNaN(e)||(n=parseFloat(e))}});var r=t||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return r},set:function(e){isNaN(e)||(r=parseFloat(e))}});var i="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return i},set:function(e){i=e.toString()}}),this},Dn=function(e,t,n,r){Pn.call(this,e,t),this.type="rect";var i=n||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return i},set:function(e){isNaN(e)||(i=parseFloat(e))}});var a=r||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return a},set:function(e){isNaN(e)||(a=parseFloat(e))}}),this},Nn=function(){this.page=je,this.currentPage=J,this.pages=oe.slice(0),this.pagesContext=Fe.slice(0),this.x=ke,this.y=xe,this.matrix=Oe,this.width=jn(J),this.height=Un(J),this.outputDestination=le,this.id="",this.objectNumber=-1};Nn.prototype.restore=function(){je=this.page,J=this.currentPage,Fe=this.pagesContext,oe=this.pages,ke=this.x,xe=this.y,Oe=this.matrix,Fn(J,this.width),Hn(J,this.height),le=this.outputDestination};var Ln=function(e,t,n,r,i){We.push(new Nn),je=J=0,oe=[],ke=e,xe=t,Oe=i,Pt([n,r])},Rn=function(e){if(Ve[e])We.pop().restore();else{var t=new Nn,n="Xo"+(Object.keys(ze).length+1).toString(10);t.id=n,Ve[e]=n,ze[n]=t,Ue.publish("addFormObject",t),We.pop().restore()}};for(var Bn in y.beginFormObject=function(e,t,n,r,i){return Ln(e,t,n,r,i),this},y.endFormObject=function(e){return Rn(e),this},y.doFormObject=function(e,t){var n=ze[Ve[e]];return de("q"),de(t.toString()+" cm"),de("/"+n.id+" Do"),de("Q"),this},y.getFormObject=function(e){var t=ze[Ve[e]];return{x:t.x,y:t.y,width:t.width,height:t.height,matrix:t.matrix}},y.save=function(e,t){return e=e||"generated.pdf",(t=t||{}).returnPromise=t.returnPromise||!1,!1===t.returnPromise?(p(Wt(Vt()),e),"function"==typeof p.unload&&o.setTimeout&&setTimeout(p.unload,911),this):new Promise((function(t,n){try{var r=p(Wt(Vt()),e);"function"==typeof p.unload&&o.setTimeout&&setTimeout(p.unload,911),t(r)}catch(e){n(e.message)}}))},F.API)F.API.hasOwnProperty(Bn)&&("events"===Bn&&F.API.events.length?function(e,t){var n,r,i;for(i=t.length-1;-1!==i;i--)n=t[i][0],r=t[i][1],e.subscribe.apply(e,[n].concat("function"==typeof r?[r]:r))}(Ue,F.API.events):y[Bn]=F.API[Bn]);var jn=y.getPageWidth=function(e){return(Fe[e=e||J].mediaBox.topRightX-Fe[e].mediaBox.bottomLeftX)/Te},Fn=y.setPageWidth=function(e,t){Fe[e].mediaBox.topRightX=t*Te+Fe[e].mediaBox.bottomLeftX},Un=y.getPageHeight=function(e){return(Fe[e=e||J].mediaBox.topRightY-Fe[e].mediaBox.bottomLeftY)/Te},Hn=y.setPageHeight=function(e,t){Fe[e].mediaBox.topRightY=t*Te+Fe[e].mediaBox.bottomLeftY};return y.internal={pdfEscape:Mt,getStyle:en,getFont:dn,getFontSize:ve,getCharSpace:xn,getTextColor:Tn,getLineHeight:gn,getLineHeightFactor:bn,getLineWidth:pn,write:he,getHorizontalCoordinate:yn,getVerticalCoordinate:An,getCoordinateString:_n,getVerticalCoordinateString:wn,collections:{},newObject:Xe,newAdditionalObject:Je,newObjectDeferred:Qe,newObjectDeferredBegin:$e,getFilters:rt,putStream:it,events:Ue,scaleFactor:Te,pageSize:{getWidth:function(){return jn(J)},setWidth:function(e){Fn(J,e)},getHeight:function(){return Un(J)},setHeight:function(e){Hn(J,e)}},encryptionOptions:g,encryption:Yt,getEncryptor:Kt,output:Gt,getNumberOfPages:Rt,pages:oe,out:de,f2:R,f3:U,getPageInfo:Xt,getPageInfoByObjId:Qt,getCurrentPageInfo:$t,getPDFVersion:_,Point:Pn,Rectangle:Dn,Matrix:Ge,hasHotfix:qt},Object.defineProperty(y.internal.pageSize,"width",{get:function(){return jn(J)},set:function(e){Fn(J,e)},enumerable:!0,configurable:!0}),Object.defineProperty(y.internal.pageSize,"height",{get:function(){return Un(J)},set:function(e){Hn(J,e)},enumerable:!0,configurable:!0}),xt.call(y,pe),Ce="F1",Dt(a,n),Ue.publish("initialized"),y}P.prototype.lsbFirstWord=function(e){return String.fromCharCode(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},P.prototype.toHexString=function(e){return e.split("").map((function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)})).join("")},P.prototype.hexToBytes=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join("")},P.prototype.processOwnerPassword=function(e,t){return I(k(t).substr(0,5),e)},P.prototype.encryptor=function(e,t){var n=k(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(e){return I(n,e)}},L.prototype.equals=function(e){var t,n="id,objectNumber,equals";if(!e||i()(e)!==i()(this))return!1;var r=0;for(t in this)if(!(n.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t))return!1;if(this[t]!==e[t])return!1;r++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&r--;return 0===r},F.API={events:[]},F.version="2.5.1";var U=F.API,H=1,z=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},V=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},W=function(e){return e.toFixed(2)},G=function(e){return e.toFixed(5)};U.__acroform__={};var q=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},Y=function(e){return e*H},K=function(e){var t=new de,n=Ce.internal.getHeight(e)||0,r=Ce.internal.getWidth(e)||0;return t.BBox=[0,0,Number(W(r)),Number(W(n))],t},X=U.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},Q=U.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},$=U.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(e&1<<t)?0:1},J=U.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return $(e,t-1)},Z=U.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return X(e,t-1)},ee=U.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Q(e,t-1)},te=U.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,i=e[0],a=e[1],o=e[2],s=e[3],l={};return l.lowerLeft_X=n(i)||0,l.lowerLeft_Y=r(a+s)||0,l.upperRight_X=n(i+o)||0,l.upperRight_Y=r(a)||0,[Number(W(l.lowerLeft_X)),Number(W(l.lowerLeft_Y)),Number(W(l.upperRight_X)),Number(W(l.upperRight_Y))]},ne=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],n=e._V||e.DV,r=re(e,n),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+i+" "+W(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var a=K(e);return a.scope=e.scope,a.stream=t.join("\n"),a}},re=function(e,t){var n=0===e.fontSize?e.maxFontSize:e.fontSize,r={text:"",fontSize:""},i=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" ");i=e.multiline?i.map((function(e){return e.split("\n")})):i.map((function(e){return[e]}));var a=n,o=Ce.internal.getHeight(e)||0;o=o<0?-o:o;var s=Ce.internal.getWidth(e)||0;s=s<0?-s:s;var l=function(t,n,r){if(t+1<i.length){var a=n+" "+i[t+1][0];return ie(a,e,r).width<=s-4}return!1};a++;e:for(;a>0;){t="",a--;var c,u,d=ie("3",e,a).height,h=e.multiline?o-a:(o-d)/2,f=h+=2,p=0,m=0,g=0;if(a<=0){t="(...) Tj\n",t+="% Width of Text: "+ie(t,e,a=12).width+", FieldWidth:"+s+"\n";break}for(var v="",b=0,y=0;y<i.length;y++)if(i.hasOwnProperty(y)){var A=!1;if(1!==i[y].length&&g!==i[y].length-1){if((d+2)*(b+2)+2>o)continue e;v+=i[y][g],A=!0,m=y,y--}else{v=" "==(v+=i[y][g]+" ").substr(v.length-1)?v.substr(0,v.length-1):v;var _=parseInt(y),w=l(_,v,a),E=y>=i.length-1;if(w&&!E){v+=" ",g=0;continue}if(w||E){if(E)m=_;else if(e.multiline&&(d+2)*(b+2)+2>o)continue e}else{if(!e.multiline)continue e;if((d+2)*(b+2)+2>o)continue e;m=_}}for(var S="",C=p;C<=m;C++){var T=i[C];if(e.multiline){if(C===m){S+=T[g]+" ",g=(g+1)%T.length;continue}if(C===p){S+=T[T.length-1]+" ";continue}}S+=T[0]+" "}switch(S=" "==S.substr(S.length-1)?S.substr(0,S.length-1):S,u=ie(S,e,a).width,e.textAlign){case"right":c=s-u-2;break;case"center":c=(s-u)/2;break;case"left":default:c=2}t+=W(c)+" "+W(f)+" Td\n",t+="("+z(S)+") Tj\n",t+=-W(c)+" 0 Td\n",f=-(a+2),u=0,p=A?m:m+1,b++,v=""}break}return r.text=t,r.fontSize=a,r},ie=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},ae={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},oe=function(e,t){var n={type:"reference",object:e};void 0===t.internal.getPageInfo(e.page).pageContext.annotations.find((function(e){return e.type===n.type&&e.object===n.object}))&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},se=function(e,t){if(t.scope=e,void 0!==e.internal&&(void 0===e.internal.acroformPlugin||!1===e.internal.acroformPlugin.isInitialized)){if(fe.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(ae)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");H=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new he,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",(function(){!function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0}(e)})),e.internal.events.subscribe("buildDocument",(function(){!function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r.objId=void 0,r.hasAnnotation&&oe(r,e)}}(e)})),e.internal.events.subscribe("putCatalog",(function(){!function(e){if(void 0===e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(e)})),e.internal.events.subscribe("postPutPages",(function(t){!function(e,t){var n=!e;for(var r in e||(t.internal.newObjectDeferredBegin(t.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),t.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e=e||t.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(r)){var a=e[r],o=[],s=a.Rect;if(a.Rect&&(a.Rect=te(a.Rect,t)),t.internal.newObjectDeferredBegin(a.objId,!0),a.DA=Ce.createDefaultAppearanceStream(a),"object"===i()(a)&&"function"==typeof a.getKeyValueListForStream&&(o=a.getKeyValueListForStream()),a.Rect=s,a.hasAppearanceStream&&!a.appearanceStreamContent){var l=ne(a);o.push({key:"AP",value:"<</N "+l+">>"}),t.internal.acroformPlugin.xForms.push(l)}if(a.appearanceStreamContent){var c="";for(var u in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(u)){var d=a.appearanceStreamContent[u];if(c+="/"+u+" ",c+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var r in d)if(d.hasOwnProperty(r)){var h=d[r];"function"==typeof h&&(h=h.call(t,a)),c+="/"+r+" "+h+" ",t.internal.acroformPlugin.xForms.indexOf(h)>=0||t.internal.acroformPlugin.xForms.push(h)}}else"function"==typeof(h=d)&&(h=h.call(t,a)),c+="/"+r+" "+h,t.internal.acroformPlugin.xForms.indexOf(h)>=0||t.internal.acroformPlugin.xForms.push(h);c+=">>"}o.push({key:"AP",value:"<<\n"+c+">>"})}t.internal.putStream({additionalKeyValues:o,objectId:a.objId}),t.internal.out("endobj")}n&&function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=n,a=e[n];t.internal.newObjectDeferredBegin(a.objId,!0),"object"===i()(a)&&"function"==typeof a.putStream&&a.putStream(),delete e[r]}}(t.internal.acroformPlugin.xForms,t)}(t,e)})),e.internal.acroformPlugin.isInitialized=!0}},le=U.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(e){return e};if(Array.isArray(e)){for(var a="[",o=0;o<e.length;o++)switch(0!==o&&(a+=" "),i()(e[o])){case"boolean":case"number":case"object":a+=e[o].toString();break;case"string":"/"!==e[o].substr(0,1)?(void 0!==t&&n&&(r=n.internal.getEncryptor(t)),a+="("+z(r(e[o].toString()))+")"):a+=e[o].toString()}return a+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},ce=function(e,t,n){var r=function(e){return e};return void 0!==t&&n&&(r=n.internal.getEncryptor(t)),(e=e||"").toString(),"("+z(r(e))+")"},ue=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};ue.prototype.toString=function(){return this.objId+" 0 R"},ue.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},ue.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter((function(e){return"content"!=e&&"appearanceStreamContent"!=e&&"scope"!=e&&"objId"!=e&&"_"!=e.substring(0,1)}));for(var n in t)if(!1===Object.getOwnPropertyDescriptor(this,t[n]).configurable){var r=t[n],i=this[r];i&&(Array.isArray(i)?e.push({key:r,value:le(i,this.objId,this.scope)}):i instanceof ue?(i.scope=this.scope,e.push({key:r,value:i.objId+" 0 R"})):"function"!=typeof i&&e.push({key:r,value:i}))}return e};var de=function(){ue.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};q(de,ue);var he=function(){ue.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+z(t(e))+")"}},set:function(t){e=t}})};q(he,ue);var fe=function e(){ue.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute F supplied.');t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(t,3))},set:function(e){!0===Boolean(e)?this.F=Z(t,3):this.F=ee(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute Ff supplied.');n=e}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==r.length)return r},set:function(e){r=void 0!==e?e:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(e){r[0]=e}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(e){r[1]=e}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(e){r[2]=e}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(e){r[3]=e}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){switch(e){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=e;break;default:throw new Error('Invalid value "'+e+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof _e)return;a="FieldObject"+e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+z(t(a))+")"},set:function(e){a=e.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(e){a=e}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(e){o=e}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(e){s=e}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(e){l=e}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===c?50/H:c},set:function(e){c=e}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(e){u=e}});var d="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!d||this instanceof _e||this instanceof Ee))return ce(d,this.objId,this.scope)},set:function(e){e=e.toString(),d=e}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof be==0?ce(h,this.objId,this.scope):h},set:function(e){e=e.toString(),h=this instanceof be==0?"("===e.substr(0,1)?V(e.substr(1,e.length-2)):V(e):e}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof be==1?V(h.substr(1,h.length-1)):h},set:function(e){e=e.toString(),h=this instanceof be==1?"/"+e:e}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(e){this.V=e}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof be==0?ce(f,this.objId,this.scope):f},set:function(e){e=e.toString(),f=this instanceof be==0?"("===e.substr(0,1)?V(e.substr(1,e.length-2)):V(e):e}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof be==1?V(f.substr(1,f.length-1)):f},set:function(e){e=e.toString(),f=this instanceof be==1?"/"+e:e}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(e){e=Boolean(e),m=e}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(e){p=e}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,1))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,1):this.Ff=ee(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,2))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,2):this.Ff=ee(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,3))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,3):this.Ff=ee(this.Ff,3)}});var g=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==g)return g},set:function(e){if(-1===[0,1,2].indexOf(e))throw new Error('Invalid value "'+e+'" for attribute Q supplied.');g=e}}),Object.defineProperty(this,"textAlign",{get:function(){var e;switch(g){case 0:default:e="left";break;case 1:e="center";break;case 2:e="right"}return e},configurable:!0,enumerable:!0,set:function(e){switch(e){case"right":case 2:g=2;break;case"center":case 1:g=1;break;case"left":case 0:default:g=0}}})};q(fe,ue);var pe=function(){fe.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return le(t,this.objId,this.scope)},set:function(e){var n,r;r=[],"string"==typeof(n=e)&&(r=function(e,t,n){n||(n=1);for(var r,i=[];r=t.exec(e);)i.push(r[n]);return i}(n,/\((.*?)\)/g)),t=r}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,n){for(n=n||!1,e=(e=e||"").toString();-1!==t.indexOf(e)&&(t.splice(t.indexOf(e),1),!1!==n););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,18))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,18):this.Ff=ee(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,19))},set:function(e){!0===this.combo&&(!0===Boolean(e)?this.Ff=Z(this.Ff,19):this.Ff=ee(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,20))},set:function(e){!0===Boolean(e)?(this.Ff=Z(this.Ff,20),t.sort()):this.Ff=ee(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,22))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,22):this.Ff=ee(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,23):this.Ff=ee(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,27))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,27):this.Ff=ee(this.Ff,27)}}),this.hasAppearanceStream=!1};q(pe,fe);var me=function(){pe.call(this),this.fontName="helvetica",this.combo=!1};q(me,pe);var ge=function(){me.call(this),this.combo=!0};q(ge,me);var ve=function(){ge.call(this),this.edit=!0};q(ve,ge);var be=function(){fe.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,15))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,15):this.Ff=ee(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,16))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,16):this.Ff=ee(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,17))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,17):this.Ff=ee(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,26):this.Ff=ee(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(t).length){var n,r=[];for(n in r.push("<<"),t)r.push("/"+n+" ("+z(e(t[n]))+")");return r.push(">>"),r.join("\n")}},set:function(e){"object"===i()(e)&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){"string"==typeof e&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};q(be,fe);var ye=function(){be.call(this),this.pushButton=!0};q(ye,be);var Ae=function(){be.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})};q(Ae,be);var _e=function(){var e,t;fe.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,n=[];for(t in n.push("<<"),r)n.push("/"+t+" ("+z(e(r[t]))+")");return n.push(">>"),n.join("\n")},set:function(e){"object"===i()(e)&&(r=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(e){"string"==typeof e&&(r.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+e}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ce.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};q(_e,fe),Ae.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e&&"getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},Ae.prototype.createOption=function(e){var t=new _e;return t.Parent=this,t.optionName=e,this.Kids.push(t),Te.call(this.scope,t),t};var we=function(){be.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ce.CheckBox.createAppearanceStream()};q(we,be);var Ee=function(){fe.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,13))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,13):this.Ff=ee(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,21))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,21):this.Ff=ee(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,23):this.Ff=ee(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,24))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,24):this.Ff=ee(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,25))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,25):this.Ff=ee(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,26):this.Ff=ee(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};q(Ee,fe);var Se=function(){Ee.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,14))},set:function(e){!0===Boolean(e)?this.Ff=Z(this.Ff,14):this.Ff=ee(this.Ff,14)}}),this.password=!0};q(Se,Ee);var Ce={CheckBox:{createAppearanceStream:function(){return{N:{On:Ce.CheckBox.YesNormal},D:{On:Ce.CheckBox.YesPushDown,Off:Ce.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=K(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),a=re(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+W(Ce.internal.getWidth(e))+" "+W(Ce.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+W(a.fontSize)+" Tf "+i),n.push("BT"),n.push(a.text),n.push("ET"),n.push("Q"),n.push("EMC"),t.stream=n.join("\n"),t},YesNormal:function(e){var t=K(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),i=[],a=Ce.internal.getHeight(e),o=Ce.internal.getWidth(e),s=re(e,e.caption);return i.push("1 g"),i.push("0 0 "+W(o)+" "+W(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+W(o-1)+" "+W(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+W(s.fontSize)+" Tf "+r),i.push(s.text),i.push("ET"),i.push("Q"),t.stream=i.join("\n"),t},OffPushDown:function(e){var t=K(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+W(Ce.internal.getWidth(e))+" "+W(Ce.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Ce.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Ce.RadioButton.Circle.YesNormal,t.D[e]=Ce.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=K(e);t.scope=e.scope;var n=[],r=Ce.internal.getWidth(e)<=Ce.internal.getHeight(e)?Ce.internal.getWidth(e)/4:Ce.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Ce.internal.Bezier_C,a=Number((r*i).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+G(Ce.internal.getWidth(e)/2)+" "+G(Ce.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=K(e);t.scope=e.scope;var n=[],r=Ce.internal.getWidth(e)<=Ce.internal.getHeight(e)?Ce.internal.getWidth(e)/4:Ce.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*Ce.internal.Bezier_C).toFixed(5)),o=Number((r*Ce.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+G(Ce.internal.getWidth(e)/2)+" "+G(Ce.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+G(Ce.internal.getWidth(e)/2)+" "+G(Ce.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},OffPushDown:function(e){var t=K(e);t.scope=e.scope;var n=[],r=Ce.internal.getWidth(e)<=Ce.internal.getHeight(e)?Ce.internal.getWidth(e)/4:Ce.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*Ce.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+G(Ce.internal.getWidth(e)/2)+" "+G(Ce.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Ce.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Ce.RadioButton.Cross.YesNormal,t.D[e]=Ce.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=K(e);t.scope=e.scope;var n=[],r=Ce.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+W(Ce.internal.getWidth(e)-2)+" "+W(Ce.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(W(r.x1.x)+" "+W(r.x1.y)+" m"),n.push(W(r.x2.x)+" "+W(r.x2.y)+" l"),n.push(W(r.x4.x)+" "+W(r.x4.y)+" m"),n.push(W(r.x3.x)+" "+W(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=K(e);t.scope=e.scope;var n=Ce.internal.calculateCross(e),r=[];return r.push("0.749023 g"),r.push("0 0 "+W(Ce.internal.getWidth(e))+" "+W(Ce.internal.getHeight(e))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+W(Ce.internal.getWidth(e)-2)+" "+W(Ce.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(W(n.x1.x)+" "+W(n.x1.y)+" m"),r.push(W(n.x2.x)+" "+W(n.x2.y)+" l"),r.push(W(n.x4.x)+" "+W(n.x4.y)+" m"),r.push(W(n.x3.x)+" "+W(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join("\n"),t},OffPushDown:function(e){var t=K(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+W(Ce.internal.getWidth(e))+" "+W(Ce.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+n}};Ce.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Ce.internal.getWidth(e),n=Ce.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},Ce.internal.getWidth=function(e){var t=0;return"object"===i()(e)&&(t=Y(e.Rect[2])),t},Ce.internal.getHeight=function(e){var t=0;return"object"===i()(e)&&(t=Y(e.Rect[3])),t};var Te=U.addField=function(e){if(se(this,e),!(e instanceof fe))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};U.AcroFormChoiceField=pe,U.AcroFormListBox=me,U.AcroFormComboBox=ge,U.AcroFormEditBox=ve,U.AcroFormButton=be,U.AcroFormPushButton=ye,U.AcroFormRadioButton=Ae,U.AcroFormCheckBox=we,U.AcroFormTextField=Ee,U.AcroFormPasswordField=Se,U.AcroFormAppearance=Ce,U.AcroForm={ChoiceField:pe,ListBox:me,ComboBox:ge,EditBox:ve,Button:be,PushButton:ye,RadioButton:Ae,CheckBox:we,TextField:Ee,PasswordField:Se,Appearance:Ce},F.AcroForm={ChoiceField:pe,ListBox:me,ComboBox:ge,EditBox:ve,Button:be,PushButton:ye,RadioButton:Ae,CheckBox:we,TextField:Ee,PasswordField:Se,Appearance:Ce};F.AcroForm;function ke(e){return e.reduce((function(e,t,n){return e[t]=n,e}),{})}!function(e){e.__addimage__={};var t="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},r=e.__addimage__.getImageFileTypeByImageData=function(e,r){var i,a,o,s,l,c=t;if("RGBA"===(r=r||t)||void 0!==e.data&&e.data instanceof Uint8ClampedArray&&"height"in e&&"width"in e)return"RGBA";if(S(e))for(l in n)for(o=n[l],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(void 0!==o[i][a]&&o[i][a]!==e[a]){s=!1;break}if(!0===s){c=l;break}}else for(l in n)for(o=n[l],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(void 0!==o[i][a]&&o[i][a]!==e.charCodeAt(a)){s=!1;break}if(!0===s){c=l;break}}return c===t&&r!==t&&(c=r),c},a=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);t.objectId=this.internal.newObject();var a=[];if(a.push({key:"Type",value:"/XObject"}),a.push({key:"Subtype",value:"/Image"}),a.push({key:"Width",value:t.width}),a.push({key:"Height",value:t.height}),t.colorSpace===b.INDEXED?a.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.palette.length/3-1)+" "+("sMask"in t&&void 0!==t.sMask?t.objectId+2:t.objectId+1)+" 0 R]"}):(a.push({key:"ColorSpace",value:"/"+t.colorSpace}),t.colorSpace===b.DEVICE_CMYK&&a.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),a.push({key:"BitsPerComponent",value:t.bitsPerComponent}),"decodeParameters"in t&&void 0!==t.decodeParameters&&a.push({key:"DecodeParms",value:"<<"+t.decodeParameters+">>"}),"transparency"in t&&Array.isArray(t.transparency)){for(var o="",s=0,l=t.transparency.length;s<l;s++)o+=t.transparency[s]+" "+t.transparency[s]+" ";a.push({key:"Mask",value:"["+o+"]"})}void 0!==t.sMask&&a.push({key:"SMask",value:t.objectId+1+" 0 R"});var c=void 0!==t.filter?["/"+t.filter]:void 0;if(r({data:t.data,additionalKeyValues:a,alreadyAppliedFilters:c,objectId:t.objectId}),n("endobj"),"sMask"in t&&void 0!==t.sMask){var u="/Predictor "+t.predictor+" /Colors 1 /BitsPerComponent "+t.bitsPerComponent+" /Columns "+t.width,d={width:t.width,height:t.height,colorSpace:"DeviceGray",bitsPerComponent:t.bitsPerComponent,decodeParameters:u,data:t.sMask};"filter"in t&&(d.filter=t.filter),e.call(this,d)}if(t.colorSpace===b.INDEXED){var h=this.internal.newObject();r({data:T(new Uint8Array(t.palette)),objectId:h}),n("endobj")}},o=function(){var e=this.internal.collections.addImage_images;for(var t in e)a.call(this,e[t])},s=function(){var e,t=this.internal.collections.addImage_images,n=this.internal.write;for(var r in t)n("/I"+(e=t[r]).index,e.objectId,"0","R")},l=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",s))},c=function(){var e=this.internal.collections.addImage_images;return l.call(this),e},u=function(){return Object.keys(this.internal.collections.addImage_images).length},d=function(t){return"function"==typeof e["process"+t.toUpperCase()]},f=function(e){return"object"===i()(e)&&1===e.nodeType},p=function(t,n){if("IMG"===t.nodeName&&t.hasAttribute("src")){var r=""+t.getAttribute("src");if(0===r.indexOf("data:image/"))return h(unescape(r).split("base64,").pop());var i=e.loadFile(r,!0);if(void 0!==i)return i}if("CANVAS"===t.nodeName){if(0===t.width||0===t.height)throw new Error("Given canvas must have data. Canvas width: "+t.width+", height: "+t.height);var a;switch(n){case"PNG":a="image/png";break;case"WEBP":a="image/webp";break;case"JPEG":case"JPG":default:a="image/jpeg"}return h(t.toDataURL(a,1).split("base64,").pop())}},m=function(e){var t=this.internal.collections.addImage_images;if(t)for(var n in t)if(e===t[n].alias)return t[n]},g=function(e,t,n){return e||t||(e=-96,t=-96),e<0&&(e=-1*n.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.height*72/t/this.internal.scaleFactor),0===e&&(e=t*n.width/n.height),0===t&&(t=e*n.height/n.width),[e,t]},v=function(e,t,n,r,i,a){var o=g.call(this,n,r,i),s=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=c.call(this);if(n=o[0],r=o[1],u[i.index]=i,a){a*=Math.PI/180;var d=Math.cos(a),h=Math.sin(a),f=function(e){return e.toFixed(4)},p=[f(d),f(h),f(-1*h),f(d),0,0,"cm"]}this.internal.write("q"),a?(this.internal.write([1,"0","0",1,s(e),l(t+r),"cm"].join(" ")),this.internal.write(p.join(" ")),this.internal.write([s(n),"0","0",s(r),"0","0","cm"].join(" "))):this.internal.write([s(n),"0","0",s(r),s(e),l(t+r),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+i.index+" Do"),this.internal.write("Q")},b=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var y=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},A=e.__addimage__.sHashCode=function(e){var t,n,r=0;if("string"==typeof e)for(n=e.length,t=0;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;else if(S(e))for(n=e.byteLength/2,t=0;t<n;t++)r=(r<<5)-r+e[t],r|=0;return r},_=e.__addimage__.validateStringAsBase64=function(e){(e=e||"").toString().trim();var t=!0;return 0===e.length&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&(t=!1),t},w=e.__addimage__.extractImageFromDataUrl=function(e){var t=(e=e||"").split("base64,"),n=null;if(2===t.length){var r=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(t[0]);Array.isArray(r)&&(n={mimeType:r[1],charset:r[2],data:t[1]})}return n},E=e.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};e.__addimage__.isArrayBuffer=function(e){return E()&&e instanceof ArrayBuffer};var S=e.__addimage__.isArrayBufferView=function(e){return E()&&"undefined"!=typeof Uint32Array&&(e instanceof Int8Array||e instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)},C=e.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n},T=e.__addimage__.arrayBufferToBinaryString=function(e){for(var t="",n=S(e)?e:new Uint8Array(e),r=0;r<n.length;r+=8192)t+=String.fromCharCode.apply(null,n.subarray(r,r+8192));return t};e.addImage=function(){var e,n,r,a,o,s,c,u,d;if("number"==typeof arguments[1]?(n=t,r=arguments[1],a=arguments[2],o=arguments[3],s=arguments[4],c=arguments[5],u=arguments[6],d=arguments[7]):(n=arguments[1],r=arguments[2],a=arguments[3],o=arguments[4],s=arguments[5],c=arguments[6],u=arguments[7],d=arguments[8]),"object"===i()(e=arguments[0])&&!f(e)&&"imageData"in e){var h=e;e=h.imageData,n=h.format||n||t,r=h.x||r||0,a=h.y||a||0,o=h.w||h.width||o,s=h.h||h.height||s,c=h.alias||c,u=h.compression||u,d=h.rotation||h.angle||d}var p=this.internal.getFilters();if(void 0===u&&-1!==p.indexOf("FlateEncode")&&(u="SLOW"),isNaN(r)||isNaN(a))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var m=k.call(this,e,n,c,u);return v.call(this,r,a,o,s,m,d),this};var k=function(n,i,a,o){var s,l,c;if("string"==typeof n&&r(n)===t){n=unescape(n);var h=x(n,!1);(""!==h||void 0!==(h=e.loadFile(n,!0)))&&(n=h)}if(f(n)&&(n=p(n,i)),i=r(n,i),!d(i))throw new Error("addImage does not support files of type '"+i+"', please ensure that a plugin for '"+i+"' support is added.");if((null==(c=a)||0===c.length)&&(a=function(e){return"string"==typeof e||S(e)?A(e):S(e.data)?A(e.data):null}(n)),(s=m.call(this,a))||(E()&&(n instanceof Uint8Array||"RGBA"===i||(l=n,n=C(n))),s=this["process"+i.toUpperCase()](n,u.call(this),a,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:y.NONE}(o),l)),!s)throw new Error("An unknown error occurred whilst processing the image.");return s},x=e.__addimage__.convertBase64ToBinaryString=function(e,t){var n;t="boolean"!=typeof t||t;var r,i="";if("string"==typeof e){r=null!==(n=w(e))?n.data:e;try{i=h(r)}catch(e){if(t)throw _(r)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+e.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return i};e.getImageProperties=function(n){var i,a,o="";if(f(n)&&(n=p(n)),"string"==typeof n&&r(n)===t&&(""===(o=x(n,!1))&&(o=e.loadFile(n)||""),n=o),a=r(n),!d(a))throw new Error("addImage does not support files of type '"+a+"', please ensure that a plugin for '"+a+"' support is added.");if(!E()||n instanceof Uint8Array||(n=C(n)),!(i=this["process"+a.toUpperCase()](n)))throw new Error("An unknown error occurred whilst processing the image");return i.fileType=a,i}}(F.API),
/**
 * @license
 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){var t=function(e){if(void 0!==e&&""!=e)return!0};F.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(e){for(var n,r,i,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,s=this.internal.getPageInfoByObjId(e.objId),l=e.pageContext.annotations,c=!1,u=0;u<l.length&&!c;u++)switch((n=l[u]).type){case"link":(t(n.options.url)||t(n.options.pageNumber))&&(c=!0);break;case"reference":case"text":case"freetext":c=!0}if(0!=c){this.internal.write("/Annots [");for(var d=0;d<l.length;d++){n=l[d];var h=this.internal.pdfEscape,f=this.internal.getEncryptor(e.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),m=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(p.objId),v=n.title||"Note";i="<</Type /Annot /Subtype /Text "+(r="/Rect ["+a(n.bounds.x)+" "+o(n.bounds.y+n.bounds.h)+" "+a(n.bounds.x+n.bounds.w)+" "+o(n.bounds.y)+"] ")+"/Contents ("+h(g(n.contents))+")",i+=" /Popup "+m.objId+" 0 R",i+=" /P "+s.objId+" 0 R",i+=" /T ("+h(g(v))+") >>",p.content=i;var b=p.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(r="/Rect ["+a(n.bounds.x+30)+" "+o(n.bounds.y+n.bounds.h)+" "+a(n.bounds.x+n.bounds.w+30)+" "+o(n.bounds.y)+"] ")+" /Parent "+b,n.open&&(i+=" /Open true"),i+=" >>",m.content=i,this.internal.write(p.objId,"0 R",m.objId,"0 R");break;case"freetext":r="/Rect ["+a(n.bounds.x)+" "+o(n.bounds.y)+" "+a(n.bounds.x+n.bounds.w)+" "+o(n.bounds.y+n.bounds.h)+"] ";var y=n.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+r+"/Contents ("+h(f(n.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+y+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(n.options.name){var A=this.annotations._nameMap[n.options.name];n.options.pageNumber=A.page,n.options.top=A.y}else n.options.top||(n.options.top=0);if(r="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",i="",n.options.url)i="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /A <</S /URI /URI ("+h(f(n.options.url))+") >>";else if(n.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,i+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var _=o(n.options.top);n.options.left=n.options.left||0,void 0===n.options.zoom&&(n.options.zoom=0),i+=" /XYZ "+n.options.left+" "+_+" "+n.options.zoom+"]"}""!=i&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),e.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":t.pageContext.annotations.push(e)}},e.link=function(e,t,n,r,i){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(e),y:s(t),w:o(e+n),h:s(t+r)},options:i,type:"link"})},e.textWithLink=function(e,t,n,r){var i,a,o=this.getTextWidth(e),s=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==r.maxWidth){a=r.maxWidth;var l=this.splitTextToSize(e,a).length;i=Math.ceil(s*l)}else a=o,i=s;return this.text(e,t,n,r),n+=.2*s,"center"===r.align&&(t-=o/2),"right"===r.align&&(t-=o),this.link(t,n-s,a,i,r),o},e.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor}}(F.API),
/**
 * @license
 * Copyright (c) 2017 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var a=e.__arabicParser__.isInArabicSubstitutionA=function(e){return void 0!==t[e.charCodeAt(0)]},o=e.__arabicParser__.isArabicLetter=function(e){return"string"==typeof e&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},s=e.__arabicParser__.isArabicEndLetter=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(e){return o(e)&&i.indexOf(e.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=1};var c=e.__arabicParser__.arabicLetterHasFinalForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=3};var u=e.__arabicParser__.arabicLetterHasMedialForm=function(e){return o(e)&&a(e)&&4==t[e.charCodeAt(0)].length},d=e.__arabicParser__.resolveLigatures=function(e){var t=0,r=n,i="",a=0;for(t=0;t<e.length;t+=1)void 0!==r[e.charCodeAt(t)]?(a++,"number"==typeof(r=r[e.charCodeAt(t)])&&(i+=String.fromCharCode(r),r=n,a=0),t===e.length-1&&(r=n,i+=e.charAt(t-(a-1)),t-=a-1,a=0)):(r=n,i+=e.charAt(t-a),t-=a,a=0);return i};e.__arabicParser__.isArabicDiacritic=function(e){return void 0!==e&&void 0!==r[e.charCodeAt(0)]};var h=e.__arabicParser__.getCorrectForm=function(e,t,n){return o(e)?!1===a(e)?-1:!c(e)||!o(t)&&!o(n)||!o(n)&&s(t)||s(e)&&!o(t)||s(e)&&l(t)||s(e)&&s(t)?0:u(e)&&o(t)&&!s(t)&&o(n)&&c(n)?3:s(e)||!o(n)?1:2:-1},f=function(e){var n=0,r=0,i=0,a="",s="",l="",c=(e=e||"").split("\\s+"),u=[];for(n=0;n<c.length;n+=1){for(u.push(""),r=0;r<c[n].length;r+=1)a=c[n][r],s=c[n][r-1],l=c[n][r+1],o(a)?(i=h(a,s,l),u[n]+=-1!==i?String.fromCharCode(t[a.charCodeAt(0)][i]):a):u[n]+=a;u[n]=d(u[n])}return u.join(" ")},p=e.__arabicParser__.processArabic=e.processArabic=function(){var e,t="string"==typeof arguments[0]?arguments[0]:arguments[0].text,n=[];if(Array.isArray(t)){var r=0;for(n=[],r=0;r<t.length;r+=1)Array.isArray(t[r])?n.push([f(t[r][0]),t[r][1],t[r][2]]):n.push([f(t[r])]);e=n}else e=f(t);return"string"==typeof arguments[0]?e:(arguments[0].text=e,arguments[0])};e.events.push(["preProcessText",p])}(F.API),F.API.autoPrint=function(e){var t;switch((e=e||{}).variant=e.variant||"non-conform",e.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",(function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){this.internal.out("/OpenAction "+t+" 0 R")}))}return this},
/**
 * @license
 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=t+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(e){r=e}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,t){var n;if("2d"!==(e=e||"2d"))return null;for(n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(F.API),function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,r=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new o,this.internal.__cell__.pages=1},o=function(){var e=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var t=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var n=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return n},set:function(e){n=e}});var r=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return r},set:function(e){r=e}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(e){i=e}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return a},set:function(e){a=e}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(e){o=e}}),this};o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},o.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(e){return r.call(this),this.internal.__cell__.headerFunction="function"==typeof e?e:void 0,this},e.getTextDimensions=function(e,t){r.call(this);var n=(t=t||{}).fontSize||this.getFontSize(),i=t.font||this.getFont(),a=t.scaleFactor||this.internal.scaleFactor,o=0,s=0,l=0,c=this;if(!Array.isArray(e)&&"string"!=typeof e){if("number"!=typeof e)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");e=String(e)}var u=t.maxWidth;u>0?"string"==typeof e?e=this.splitTextToSize(e,u):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce((function(e,t){return e.concat(c.splitTextToSize(t,u))}),[])):e=Array.isArray(e)?e:[e];for(var d=0;d<e.length;d++)o<(l=this.getStringUnitWidth(e[d],{font:i})*n)&&(o=l);return 0!==o&&(s=e.length),{w:o/=a,h:Math.max((s*n*this.getLineHeightFactor()-n*(this.getLineHeightFactor()-1))/a,0)}},e.cellAddPage=function(){r.call(this),this.addPage();var e=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new o(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var s=e.cell=function(){var e;e=arguments[0]instanceof o?arguments[0]:new o(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),r.call(this);var i=this.internal.__cell__.lastCell,a=this.internal.__cell__.padding,s=this.internal.__cell__.margins||t,l=this.internal.__cell__.tableHeaderRow,c=this.internal.__cell__.printHeaders;return void 0!==i.lineNumber&&(i.lineNumber===e.lineNumber?(e.x=(i.x||0)+(i.width||0),e.y=i.y||0):i.y+i.height+e.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),e.y=s.top,c&&l&&(this.printHeaderRow(e.lineNumber,!0),e.y+=l[0].height)):e.y=i.y+i.height||e.y),void 0!==e.text[0]&&(this.rect(e.x,e.y,e.width,e.height,!0===n?"FD":void 0),"right"===e.align?this.text(e.text,e.x+e.width-a,e.y+a,{align:"right",baseline:"top"}):"center"===e.align?this.text(e.text,e.x+e.width/2,e.y+a,{align:"center",baseline:"top",maxWidth:e.width-a-a}):this.text(e.text,e.x+a,e.y+a,{align:"left",baseline:"top",maxWidth:e.width-a-a})),this.internal.__cell__.lastCell=e,this};e.table=function(e,n,c,u,d){if(r.call(this),!c)throw new Error("No data for PDF table.");var h,f,p,m,g=[],v=[],b=[],y={},A={},_=[],w=[],E=(d=d||{}).autoSize||!1,S=!1!==d.printHeaders,C=d.css&&void 0!==d.css["font-size"]?16*d.css["font-size"]:d.fontSize||12,T=d.margins||Object.assign({width:this.getPageWidth()},t),k="number"==typeof d.padding?d.padding:3,x=d.headerBackgroundColor||"#c8c8c8",O=d.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=S,this.internal.__cell__.margins=T,this.internal.__cell__.table_font_size=C,this.internal.__cell__.padding=k,this.internal.__cell__.headerBackgroundColor=x,this.internal.__cell__.headerTextColor=O,this.setFontSize(C),null==u)v=g=Object.keys(c[0]),b=g.map((function(){return"left"}));else if(Array.isArray(u)&&"object"===i()(u[0]))for(g=u.map((function(e){return e.name})),v=u.map((function(e){return e.prompt||e.name||""})),b=u.map((function(e){return e.align||"left"})),h=0;h<u.length;h+=1)A[u[h].name]=u[h].width*(19.049976/25.4);else Array.isArray(u)&&"string"==typeof u[0]&&(v=g=u,b=g.map((function(){return"left"})));if(E||Array.isArray(u)&&"string"==typeof u[0])for(h=0;h<g.length;h+=1){for(y[m=g[h]]=c.map((function(e){return e[m]})),this.setFont(void 0,"bold"),_.push(this.getTextDimensions(v[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),f=y[m],this.setFont(void 0,"normal"),p=0;p<f.length;p+=1)_.push(this.getTextDimensions(f[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);A[m]=Math.max.apply(null,_)+k+k,_=[]}if(S){var I={};for(h=0;h<g.length;h+=1)I[g[h]]={},I[g[h]].text=v[h],I[g[h]].align=b[h];var M=l.call(this,I,A);w=g.map((function(t){return new o(e,n,A[t],M,I[t].text,void 0,I[t].align)})),this.setTableHeaderRow(w),this.printHeaderRow(1,!1)}var P=u.reduce((function(e,t){return e[t.name]=t.align,e}),{});for(h=0;h<c.length;h+=1){"rowStart"in d&&d.rowStart instanceof Function&&d.rowStart({row:h,data:c[h]},this);var D=l.call(this,c[h],A);for(p=0;p<g.length;p+=1){var N=c[h][g[p]];"cellStart"in d&&d.cellStart instanceof Function&&d.cellStart({row:h,col:p,data:N},this),s.call(this,new o(e,n,A[g[p]],D,N,h+2,P[g[p]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var l=function(e,t){var n=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(e).map((function(r){var i=e[r];return this.splitTextToSize(i.hasOwnProperty("text")?i.text:i,t[r]-n-n)}),this).map((function(e){return this.getLineHeightFactor()*e.length*r/i+n+n}),this).reduce((function(e,t){return Math.max(e,t)}),0)};e.setTableHeaderRow=function(e){r.call(this),this.internal.__cell__.tableHeaderRow=e},e.printHeaderRow=function(e,t){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var i;if(n=!0,"function"==typeof this.internal.__cell__.headerFunction){var a=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new o(a[0],a[1],a[2],a[3],void 0,-1)}this.setFont(void 0,"bold");for(var l=[],c=0;c<this.internal.__cell__.tableHeaderRow.length;c+=1){i=this.internal.__cell__.tableHeaderRow[c].clone(),t&&(i.y=this.internal.__cell__.margins.top||0,l.push(i)),i.lineNumber=e;var u=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,i),this.setTextColor(u)}l.length>0&&this.setTableHeaderRow(l),this.setFont(void 0,"normal"),n=!1}}(F.API);var xe={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Oe=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Ie=ke(Oe),Me=[100,200,300,400,500,600,700,800,900],Pe=ke(Me);function De(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),n=function(e){return xe[e=e||"normal"]?e:"normal"}(e.style),r=function(e){if(!e)return 400;if("number"==typeof e)return e>=100&&e<=900&&e%100==0?e:400;if(/^\d00$/.test(e))return parseInt(e);switch(e){case"bold":return 700;case"normal":default:return 400}}(e.weight),i=function(e){return"number"==typeof Ie[e=e||"normal"]?e:"normal"}(e.stretch);return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(" ")}}}function Ne(e,t,n,r){var i;for(i=n;i>=0&&i<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;i>=0&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var Le={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Re={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Be(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function je(e){return e.trimLeft()}function Fe(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function Ue(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===t?null:[t[0],e.substring(t[0].length)]}var He,ze,Ve,We=["times"];!function(e){var t,n,r,a,o,s,c,u,d,h=function(e){return e=e||{},this.isStrokeTransparent=e.isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||"#000000",this.fillStyle=e.fillStyle||"#000000",this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||"10px sans-serif",this.textBaseline=e.textBaseline||"alphabetic",this.textAlign=e.textAlign||"left",this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||"miter",this.lineCap=e.lineCap||"butt",this.path=e.path||[],this.transform=void 0!==e.transform?e.transform.clone():new u,this.globalCompositeOperation=e.globalCompositeOperation||"normal",this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new s,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new s,this.lineDashOffset=e.lineDashOffset||0,this.lineDash=e.lineDash||[],this.margin=e.margin||[0,0,0,0],this.prevPageLastElemOffset=e.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof e.ignoreClearRect||e.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new f(this),t=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,o=this.internal.getVerticalCoordinate,s=this.internal.Point,c=this.internal.Rectangle,u=this.internal.Matrix,d=new h}]);var f=function(e){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var t=e;Object.defineProperty(this,"pdf",{get:function(){return t}});var n=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return n},set:function(e){n=Boolean(e)}});var r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(e){r=Boolean(e)}});var i=0;Object.defineProperty(this,"posX",{get:function(){return i},set:function(e){isNaN(e)||(i=e)}});var a=0;Object.defineProperty(this,"posY",{get:function(){return a},set:function(e){isNaN(e)||(a=e)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(e){var t;"number"==typeof e?t=[e,e,e,e]:((t=new Array(4))[0]=e[0],t[1]=e.length>=2?e[1]:t[0],t[2]=e.length>=3?e[2]:t[0],t[3]=e.length>=4?e[3]:t[1]),d.margin=t}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(e){o=e}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(e){s=e}});var l=[];Object.defineProperty(this,"pageBreaks",{get:function(){return l},set:function(e){l=e}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(e){e instanceof h&&(d=e)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(e){d.path=e}});var c=[];Object.defineProperty(this,"ctxStack",{get:function(){return c},set:function(e){c=e}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(e){var t;t=p(e),this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=0===t.a,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(e){var t=p(e);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=0===t.a,this.ctx.strokeOpacity=t.a,0===t.a?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(e){-1!==["butt","round","square"].indexOf(e)&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(e){-1!==["bevel","round","miter"].indexOf(e)&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(e){-1!==["right","end","center","left","start"].indexOf(e)&&(this.ctx.textAlign=e)}});var u=null;function f(e,t){if(null===u){var n=function(e){var t=[];return Object.keys(e).forEach((function(n){e[n].forEach((function(e){var r=null;switch(e){case"bold":r={family:n,weight:"bold"};break;case"italic":r={family:n,style:"italic"};break;case"bolditalic":r={family:n,weight:"bold",style:"italic"};break;case"":case"normal":r={family:n}}null!==r&&(r.ref={name:n,style:e},t.push(r))}))})),t}(e.getFontList());u=function(e){for(var t={},n=0;n<e.length;++n){var r=De(e[n]),i=r.family,a=r.stretch,o=r.style,s=r.weight;t[i]=t[i]||{},t[i][a]=t[i][a]||{},t[i][a][o]=t[i][a][o]||{},t[i][a][o][s]=r}return t}(n.concat(t))}return u}var m=null;Object.defineProperty(this,"fontFaces",{get:function(){return m},set:function(e){u=null,m=e}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(e){var t;if(this.ctx.font=e,null!==(t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(e))){var n=t[1],r=(t[2],t[3]),i=t[4],a=(t[5],t[6]),o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i="px"===o?Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor):"em"===o?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(e){var t,n,r=[],i=e.trim();if(""===i)return We;if(i in Re)return[Re[i]];for(;""!==i;){switch(n=null,t=(i=je(i)).charAt(0)){case'"':case"'":n=Fe(i.substring(1),t);break;default:n=Ue(i)}if(null===n)return We;if(r.push(n[0]),""!==(i=je(n[1]))&&","!==i.charAt(0))return We;i=i.replace(/^,/,"")}return r}(a);if(this.fontFaces){var l=function(e,t,n){for(var r=(n=n||{}).defaultFontFamily||"times",i=Object.assign({},Le,n.genericFontFamilies||{}),a=null,o=null,s=0;s<t.length;++s)if(i[(a=De(t[s])).family]&&(a.family=i[a.family]),e.hasOwnProperty(a.family)){o=e[a.family];break}if(!(o=o||e[r]))throw new Error("Could not find a font-family for the rule '"+Be(a)+"' and default family '"+r+"'.");if(o=function(e,t){if(t[e])return t[e];var n=Ie[e],r=n<=Ie.normal?-1:1,i=Ne(t,Oe,n,r);if(!i)throw new Error("Could not find a matching font-stretch value for "+e);return i}(a.stretch,o),o=function(e,t){if(t[e])return t[e];for(var n=xe[e],r=0;r<n.length;++r)if(t[n[r]])return t[n[r]];throw new Error("Could not find a matching font-style for "+e)}(a.style,o),!(o=function(e,t){if(t[e])return t[e];if(400===e&&t[500])return t[500];if(500===e&&t[400])return t[400];var n=Pe[e],r=Ne(t,Me,n,e<400?-1:1);if(!r)throw new Error("Could not find a matching font-weight for value "+e);return r}(a.weight,o)))throw new Error("Failed to resolve a font for the rule '"+Be(a)+"'.");return o}(f(this.pdf,this.fontFaces),s.map((function(e){return{family:e,stretch:"normal",weight:r,style:n}})));this.pdf.setFont(l.ref.name,l.ref.style)}else{var c="";("bold"===r||parseInt(r,10)>=700||"bold"===n)&&(c="bold"),"italic"===n&&(c+="italic"),0===c.length&&(c="normal");for(var u="",d={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},h=0;h<s.length;h++){if(void 0!==this.pdf.internal.getFont(s[h],c,{noFallback:!0,disableWarning:!0})){u=s[h];break}if("bolditalic"===c&&void 0!==this.pdf.internal.getFont(s[h],"bold",{noFallback:!0,disableWarning:!0}))u=s[h],c="bold";else if(void 0!==this.pdf.internal.getFont(s[h],"normal",{noFallback:!0,disableWarning:!0})){u=s[h],c="normal";break}}if(""===u)for(var p=0;p<s.length;p++)if(d[s[p]]){u=d[s[p]];break}u=""===u?"Times":u,this.pdf.setFont(u,c)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(e){this.ctx.lineDashOffset=e,U.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(e){this.ctx.lineDash=e,U.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=Boolean(e)}})};f.prototype.setLineDash=function(e){this.lineDash=e},f.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},f.prototype.fill=function(){E.call(this,"fill",!1)},f.prototype.stroke=function(){E.call(this,"stroke",!1)},f.prototype.beginPath=function(){this.path=[{type:"begin"}]},f.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw l.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var n=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:"mt",x:n.x,y:n.y}),this.ctx.lastPoint=new s(e,t)},f.prototype.closePath=function(){var e=new s(0,0),t=0;for(t=this.path.length-1;-1!==t;t--)if("begin"===this.path[t].type&&"object"===i()(this.path[t+1])&&"number"==typeof this.path[t+1].x){e=new s(this.path[t+1].x,this.path[t+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new s(e.x,e.y)},f.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw l.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var n=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:"lt",x:n.x,y:n.y}),this.ctx.lastPoint=new s(n.x,n.y)},f.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),E.call(this,null,!0)},f.prototype.quadraticCurveTo=function(e,t,n,r){if(isNaN(n)||isNaN(r)||isNaN(e)||isNaN(t))throw l.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var i=this.ctx.transform.applyToPoint(new s(n,r)),a=this.ctx.transform.applyToPoint(new s(e,t));this.path.push({type:"qct",x1:a.x,y1:a.y,x:i.x,y:i.y}),this.ctx.lastPoint=new s(i.x,i.y)},f.prototype.bezierCurveTo=function(e,t,n,r,i,a){if(isNaN(i)||isNaN(a)||isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw l.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var o=this.ctx.transform.applyToPoint(new s(i,a)),c=this.ctx.transform.applyToPoint(new s(e,t)),u=this.ctx.transform.applyToPoint(new s(n,r));this.path.push({type:"bct",x1:c.x,y1:c.y,x2:u.x,y2:u.y,x:o.x,y:o.y}),this.ctx.lastPoint=new s(o.x,o.y)},f.prototype.arc=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i))throw l.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(a=Boolean(a),!this.ctx.transform.isIdentity){var o=this.ctx.transform.applyToPoint(new s(e,t));e=o.x,t=o.y;var c=this.ctx.transform.applyToPoint(new s(0,n)),u=this.ctx.transform.applyToPoint(new s(0,0));n=Math.sqrt(Math.pow(c.x-u.x,2)+Math.pow(c.y-u.y,2))}Math.abs(i-r)>=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:"arc",x:e,y:t,radius:n,startAngle:r,endAngle:i,counterclockwise:a})},f.prototype.arcTo=function(e,t,n,r,i){throw new Error("arcTo not implemented.")},f.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw l.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},f.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw l.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(e,t,n,r),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},f.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw l.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");v.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},f.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw l.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(e,t,n,r))},f.prototype.save=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("q");if(this.pdf.setPage(t),e){this.ctx.fontSize=this.pdf.internal.getFontSize();var r=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=r}},f.prototype.restore=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("Q");this.pdf.setPage(t),e&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},f.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var p=function(e){var t,n,r,i;if(!0===e.isCanvasGradient&&(e=e.getColor()),!e)return{r:0,g:0,b:0,a:0,style:e};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e))t=0,n=0,r=0,i=0;else{var a=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e);if(null!==a)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=1;else if(null!==(a=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e)))t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=parseFloat(a[4]);else{if(i=1,"string"==typeof e&&"#"!==e.charAt(0)){var o=new m(e);e=o.ok?o.toHex():"#000000"}4===e.length?(t=e.substring(1,2),t+=t,n=e.substring(2,3),n+=n,r=e.substring(3,4),r+=r):(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7)),t=parseInt(t,16),n=parseInt(n,16),r=parseInt(r,16)}}return{r:t,g:n,b:r,a:i,style:e}},g=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},v=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};f.prototype.fillText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||"string"!=typeof e)throw l.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(r=isNaN(r)?void 0:r,!g.call(this)){var i=B(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;M.call(this,{text:e,x:t,y:n,scale:a,angle:i,align:this.textAlign,maxWidth:r})}},f.prototype.strokeText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||"string"!=typeof e)throw l.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!v.call(this)){r=isNaN(r)?void 0:r;var i=B(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;M.call(this,{text:e,x:t,y:n,scale:a,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:r})}},f.prototype.measureText=function(e){if("string"!=typeof e)throw l.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var t=this.pdf,n=this.pdf.internal.scaleFactor,r=t.internal.getFontSize(),i=t.getStringUnitWidth(e)*r/t.internal.scaleFactor,a=function(e){var t=(e=e||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this};return new a({width:i*=Math.round(96*n/72*1e4)/1e4})},f.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw l.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var n=new u(e,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(n)},f.prototype.rotate=function(e){if(isNaN(e))throw l.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var t=new u(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},f.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw l.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var n=new u(1,0,0,1,e,t);this.ctx.transform=this.ctx.transform.multiply(n)},f.prototype.transform=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a))throw l.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var o=new u(e,t,n,r,i,a);this.ctx.transform=this.ctx.transform.multiply(o)},f.prototype.setTransform=function(e,t,n,r,i,a){e=isNaN(e)?1:e,t=isNaN(t)?0:t,n=isNaN(n)?0:n,r=isNaN(r)?1:r,i=isNaN(i)?0:i,a=isNaN(a)?0:a,this.ctx.transform=new u(e,t,n,r,i,a)};var b=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};f.prototype.drawImage=function(e,t,n,r,i,a,o,s,l){var d=this.pdf.getImageProperties(e),h=1,f=1,p=1,m=1;void 0!==r&&void 0!==s&&(p=s/r,m=l/i,h=d.width/r*s/r,f=d.height/i*l/i),void 0===a&&(a=t,o=n,t=0,n=0),void 0!==r&&void 0===s&&(s=r,l=i),void 0===r&&void 0===s&&(s=d.width,l=d.height);for(var g,v=this.ctx.transform.decompose(),A=B(v.rotate.shx),E=new u,C=(E=(E=(E=E.multiply(v.translate)).multiply(v.skew)).multiply(v.scale)).applyToRectangle(new c(a-t*p,o-n*m,r*h,i*f)),T=y.call(this,C),k=[],x=0;x<T.length;x+=1)-1===k.indexOf(T[x])&&k.push(T[x]);if(w(k),this.autoPaging)for(var O=k[0],I=k[k.length-1],M=O;M<I+1;M++){this.pdf.setPage(M);var P=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],D=1===M?this.posY+this.margin[0]:this.margin[0],N=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],L=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],R=1===M?0:N+(M-2)*L;if(0!==this.ctx.clip_path.length){var j=this.path;g=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(g,this.posX+this.margin[3],-R+D+this.ctx.prevPageLastElemOffset),S.call(this,"fill",!0),this.path=j}var F=JSON.parse(JSON.stringify(C));F=_([F],this.posX+this.margin[3],-R+D+this.ctx.prevPageLastElemOffset)[0];var U=(M>O||M<I)&&b.call(this);U&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],P,L,null).clip().discardPath()),this.pdf.addImage(e,"JPEG",F.x,F.y,F.w,F.h,null,null,A),U&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(e,"JPEG",C.x,C.y,C.w,C.h,null,null,A)};var y=function(e,t,n){var r=[];t=t||this.pdf.internal.pageSize.width,n=n||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(e.type){default:case"mt":case"lt":r.push(Math.floor((e.y+i)/n)+1);break;case"arc":r.push(Math.floor((e.y+i-e.radius)/n)+1),r.push(Math.floor((e.y+i+e.radius)/n)+1);break;case"qct":var a=j(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);r.push(Math.floor((a.y+i)/n)+1),r.push(Math.floor((a.y+a.h+i)/n)+1);break;case"bct":var o=F(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y);r.push(Math.floor((o.y+i)/n)+1),r.push(Math.floor((o.y+o.h+i)/n)+1);break;case"rect":r.push(Math.floor((e.y+i)/n)+1),r.push(Math.floor((e.y+e.h+i)/n)+1)}for(var s=0;s<r.length;s+=1)for(;this.pdf.internal.getNumberOfPages()<r[s];)A.call(this);return r},A=function(){var e=this.fillStyle,t=this.strokeStyle,n=this.font,r=this.lineCap,i=this.lineWidth,a=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=n,this.lineCap=r,this.lineWidth=i,this.lineJoin=a},_=function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r].type){case"bct":e[r].x2+=t,e[r].y2+=n;case"qct":e[r].x1+=t,e[r].y1+=n;case"mt":case"lt":case"arc":default:e[r].x+=t,e[r].y+=n}return e},w=function(e){return e.sort((function(e,t){return e-t}))},E=function(e,t){for(var n,r,i=this.fillStyle,a=this.strokeStyle,o=this.lineCap,s=this.lineWidth,l=Math.abs(s*this.ctx.transform.scaleX),c=this.lineJoin,u=JSON.parse(JSON.stringify(this.path)),d=JSON.parse(JSON.stringify(this.path)),h=[],f=0;f<d.length;f++)if(void 0!==d[f].x)for(var p=y.call(this,d[f]),m=0;m<p.length;m+=1)-1===h.indexOf(p[m])&&h.push(p[m]);for(var g=0;g<h.length;g++)for(;this.pdf.internal.getNumberOfPages()<h[g];)A.call(this);if(w(h),this.autoPaging)for(var v=h[0],E=h[h.length-1],C=v;C<E+1;C++){this.pdf.setPage(C),this.fillStyle=i,this.strokeStyle=a,this.lineCap=o,this.lineWidth=l,this.lineJoin=c;var T=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],k=1===C?this.posY+this.margin[0]:this.margin[0],x=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],O=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],I=1===C?0:x+(C-2)*O;if(0!==this.ctx.clip_path.length){var M=this.path;n=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(n,this.posX+this.margin[3],-I+k+this.ctx.prevPageLastElemOffset),S.call(this,e,!0),this.path=M}if(r=JSON.parse(JSON.stringify(u)),this.path=_(r,this.posX+this.margin[3],-I+k+this.ctx.prevPageLastElemOffset),!1===t||0===C){var P=(C>v||C<E)&&b.call(this);P&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],T,O,null).clip().discardPath()),S.call(this,e,t),P&&this.pdf.restoreGraphicsState()}this.lineWidth=s}else this.lineWidth=l,S.call(this,e,t),this.lineWidth=s;this.path=u},S=function(e,t){if(("stroke"!==e||t||!v.call(this))&&("stroke"===e||t||!g.call(this))){for(var n,r,i=[],a=this.path,o=0;o<a.length;o++){var s=a[o];switch(s.type){case"begin":i.push({begin:!0});break;case"close":i.push({close:!0});break;case"mt":i.push({start:s,deltas:[],abs:[]});break;case"lt":var l=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(n=[s.x-a[o-1].x,s.y-a[o-1].y],l>0))for(;l>=0;l--)if(!0!==i[l-1].close&&!0!==i[l-1].begin){i[l-1].deltas.push(n),i[l-1].abs.push(s);break}break;case"bct":n=[s.x1-a[o-1].x,s.y1-a[o-1].y,s.x2-a[o-1].x,s.y2-a[o-1].y,s.x-a[o-1].x,s.y-a[o-1].y],i[i.length-1].deltas.push(n);break;case"qct":var c=a[o-1].x+2/3*(s.x1-a[o-1].x),u=a[o-1].y+2/3*(s.y1-a[o-1].y),d=s.x+2/3*(s.x1-s.x),h=s.y+2/3*(s.y1-s.y),f=s.x,p=s.y;n=[c-a[o-1].x,u-a[o-1].y,d-a[o-1].x,h-a[o-1].y,f-a[o-1].x,p-a[o-1].y],i[i.length-1].deltas.push(n);break;case"arc":i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}r=t?null:"stroke"===e?"stroke":"fill";for(var m=!1,b=0;b<i.length;b++)if(i[b].arc)for(var y=i[b].abs,A=0;A<y.length;A++){var _=y[A];"arc"===_.type?k.call(this,_.x,_.y,_.radius,_.startAngle,_.endAngle,_.counterclockwise,void 0,t,!m):P.call(this,_.x,_.y),m=!0}else if(!0===i[b].close)this.pdf.internal.out("h"),m=!1;else if(!0!==i[b].begin){var w=i[b].start.x,E=i[b].start.y;D.call(this,i[b].deltas,w,E),m=!0}r&&x.call(this,r),t&&O.call(this)}},C=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return e-n;case"top":return e+t-n;case"hanging":return e+t-2*n;case"middle":return e+t/2-n;case"ideographic":return e;case"alphabetic":default:return e}},T=function(e){return e+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};f.prototype.createLinearGradient=function(){var e=function(){};return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},e.isCanvasGradient=!0,e},f.prototype.createPattern=function(){return this.createLinearGradient()},f.prototype.createRadialGradient=function(){return this.createLinearGradient()};var k=function(e,t,n,r,i,a,o,s,l){for(var c=L.call(this,n,r,i,a),u=0;u<c.length;u++){var d=c[u];0===u&&(l?I.call(this,d.x1+e,d.y1+t):P.call(this,d.x1+e,d.y1+t)),N.call(this,e,t,d.x2,d.y2,d.x3,d.y3,d.x4,d.y4)}s?O.call(this):x.call(this,o)},x=function(e){switch(e){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},O=function(){this.pdf.clip(),this.pdf.discardPath()},I=function(e,t){this.pdf.internal.out(n(e)+" "+r(t)+" m")},M=function(e){var t;switch(e.align){case"right":case"end":t="right";break;case"center":t="center";break;case"left":case"start":default:t="left"}var n=this.pdf.getTextDimensions(e.text),r=C.call(this,e.y),i=T.call(this,r)-n.h,a=this.ctx.transform.applyToPoint(new s(e.x,r)),o=this.ctx.transform.decompose(),l=new u;l=(l=(l=l.multiply(o.translate)).multiply(o.skew)).multiply(o.scale);for(var d,h,f,p=this.ctx.transform.applyToRectangle(new c(e.x,r,n.w,n.h)),m=l.applyToRectangle(new c(e.x,i,n.w,n.h)),g=y.call(this,m),v=[],A=0;A<g.length;A+=1)-1===v.indexOf(g[A])&&v.push(g[A]);if(w(v),this.autoPaging)for(var E=v[0],k=v[v.length-1],x=E;x<k+1;x++){this.pdf.setPage(x);var O=1===x?this.posY+this.margin[0]:this.margin[0],I=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],M=this.pdf.internal.pageSize.height-this.margin[2],P=M-this.margin[0],D=this.pdf.internal.pageSize.width-this.margin[1],N=D-this.margin[3],L=1===x?0:I+(x-2)*P;if(0!==this.ctx.clip_path.length){var R=this.path;d=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(d,this.posX+this.margin[3],-1*L+O),S.call(this,"fill",!0),this.path=R}var B=_([JSON.parse(JSON.stringify(m))],this.posX+this.margin[3],-L+O+this.ctx.prevPageLastElemOffset)[0];e.scale>=.01&&(h=this.pdf.internal.getFontSize(),this.pdf.setFontSize(h*e.scale),f=this.lineWidth,this.lineWidth=f*e.scale);var j="text"!==this.autoPaging;if(j||B.y+B.h<=M){if(j||B.y>=O&&B.x<=D){var F=j?e.text:this.pdf.splitTextToSize(e.text,e.maxWidth||D-B.x)[0],U=_([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-L+O+this.ctx.prevPageLastElemOffset)[0],H=j&&(x>E||x<k)&&b.call(this);H&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],N,P,null).clip().discardPath()),this.pdf.text(F,U.x,U.y,{angle:e.angle,align:t,renderingMode:e.renderingMode}),H&&this.pdf.restoreGraphicsState()}}else B.y<M&&(this.ctx.prevPageLastElemOffset+=M-B.y);e.scale>=.01&&(this.pdf.setFontSize(h),this.lineWidth=f)}else e.scale>=.01&&(h=this.pdf.internal.getFontSize(),this.pdf.setFontSize(h*e.scale),f=this.lineWidth,this.lineWidth=f*e.scale),this.pdf.text(e.text,a.x+this.posX,a.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),e.scale>=.01&&(this.pdf.setFontSize(h),this.lineWidth=f)},P=function(e,t,i,a){i=i||0,a=a||0,this.pdf.internal.out(n(e+i)+" "+r(t+a)+" l")},D=function(e,t,n){return this.pdf.lines(e,t,n,null,null)},N=function(e,n,r,i,s,l,c,u){this.pdf.internal.out([t(a(r+e)),t(o(i+n)),t(a(s+e)),t(o(l+n)),t(a(c+e)),t(o(u+n)),"c"].join(" "))},L=function(e,t,n,r){for(var i=2*Math.PI,a=Math.PI/2;t>n;)t-=i;var o=Math.abs(n-t);o<i&&r&&(o=i-o);for(var s=[],l=r?-1:1,c=t;o>1e-5;){var u=c+l*Math.min(o,a);s.push(R.call(this,e,c,u)),o-=Math.abs(u-c),c=u}return s},R=function(e,t,n){var r=(n-t)/2,i=e*Math.cos(r),a=e*Math.sin(r),o=i,s=-a,l=o*o+s*s,c=l+o*i+s*a,u=4/3*(Math.sqrt(2*l*c)-c)/(o*a-s*i),d=o-u*s,h=s+u*o,f=d,p=-h,m=r+t,g=Math.cos(m),v=Math.sin(m);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:d*g-h*v,y2:d*v+h*g,x3:f*g-p*v,y3:f*v+p*g,x4:e*Math.cos(n),y4:e*Math.sin(n)}},B=function(e){return 180*e/Math.PI},j=function(e,t,n,r,i,a){var o=e+.5*(n-e),s=t+.5*(r-t),l=i+.5*(n-i),u=a+.5*(r-a),d=Math.min(e,i,o,l),h=Math.max(e,i,o,l),f=Math.min(t,a,s,u),p=Math.max(t,a,s,u);return new c(d,f,h-d,p-f)},F=function(e,t,n,r,i,a,o,s){var l,u,d,h,f,p,m,g,v,b,y,A,_,w,E=n-e,S=r-t,C=i-n,T=a-r,k=o-i,x=s-a;for(u=0;u<41;u++)v=(m=(d=e+(l=u/40)*E)+l*((f=n+l*C)-d))+l*(f+l*(i+l*k-f)-m),b=(g=(h=t+l*S)+l*((p=r+l*T)-h))+l*(p+l*(a+l*x-p)-g),0==u?(y=v,A=b,_=v,w=b):(y=Math.min(y,v),A=Math.min(A,b),_=Math.max(_,v),w=Math.max(w,b));return new c(Math.round(y),Math.round(A),Math.round(_-y),Math.round(w-A))},U=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var e,t,n=(e=this.ctx.lineDash,t=this.ctx.lineDashOffset,JSON.stringify({lineDash:e,lineDashOffset:t}));this.prevLineDash!==n&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=n)}}}(F.API),
/**
 * @license
 * jsPDF filters PlugIn
 * Copyright (c) 2014 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){var t=function(e){var t,n,r,i,a,o,s,l,c,u;for(/[^\x00-\xFF]/.test(e),n=[],r=0,i=(e+=t="\0\0\0\0".slice(e.length%4||4)).length;i>r;r+=4)0!==(a=(e.charCodeAt(r)<<24)+(e.charCodeAt(r+1)<<16)+(e.charCodeAt(r+2)<<8)+e.charCodeAt(r+3))?(o=(a=((a=((a=((a=(a-(u=a%85))/85)-(c=a%85))/85)-(l=a%85))/85)-(s=a%85))/85)%85,n.push(o+33,s+33,l+33,c+33,u+33)):n.push(122);return function(e,t){for(var n=t;n>0;n--)e.pop()}(n,t.length),String.fromCharCode.apply(String,n)+"~>"},n=function(e){var t,n,r,i,a,o=String,s="length",l=255,c="charCodeAt",u="slice",d="replace";for(e[u](-2),e=e[u](0,-2)[d](/\s/g,"")[d]("z","!!!!!"),r=[],i=0,a=(e+=t="uuuuu"[u](e[s]%5||5))[s];a>i;i+=5)n=52200625*(e[c](i)-33)+614125*(e[c](i+1)-33)+7225*(e[c](i+2)-33)+85*(e[c](i+3)-33)+(e[c](i+4)-33),r.push(l&n>>24,l&n>>16,l&n>>8,l&n);return function(e,t){for(var n=t;n>0;n--)e.pop()}(r,t[s]),o.fromCharCode.apply(o,r)},r=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(e=e.replace(/\s/g,"")).indexOf(">")&&(e=e.substr(0,e.indexOf(">"))),e.length%2&&(e+="0"),!1===t.test(e))return"";for(var n="",r=0;r<e.length;r+=2)n+=String.fromCharCode("0x"+(e[r]+e[r+1]));return n},i=function(e){for(var t=new Uint8Array(e.length),n=e.length;n--;)t[n]=e.charCodeAt(n);return(t=Object(a.b)(t)).reduce((function(e,t){return e+String.fromCharCode(t)}),"")};e.processDataByFilters=function(e,a){var o=0,s=e||"",l=[];for("string"==typeof(a=a||[])&&(a=[a]),o=0;o<a.length;o+=1)switch(a[o]){case"ASCII85Decode":case"/ASCII85Decode":s=n(s),l.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":s=t(s),l.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":s=r(s),l.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":s=s.split("").map((function(e){return("0"+e.charCodeAt().toString(16)).slice(-2)})).join("")+">",l.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":s=i(s),l.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[o]+'" is not implemented')}return{data:s,reverseChain:l.reverse().join(" ")}}}(F.API),
/**
 * @license
 * jsPDF fileloading PlugIn
 * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n="function"==typeof n?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,i=0,a=function(e){var t=e.length,n=[],r=String.fromCharCode;for(i=0;i<t;i+=1)n.push(r(255&e.charCodeAt(i)));return n.join("")};if(r.open("GET",e,!t),r.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(r.onload=function(){200===r.status?n(a(this.responseText)):n(void 0)}),r.send(null),t&&200===r.status)return a(r.responseText)}(e,t,n)}catch(e){}return r}(e,t,n)},e.loadImageFile=e.loadFile}(F.API),function(e){function t(){return(o.html2canvas?Promise.resolve(o.html2canvas):Promise.resolve().then(n.t.bind(null,243,7))).catch((function(e){return Promise.reject(new Error("Could not load html2canvas: "+e))})).then((function(e){return e.default?e.default:e}))}function r(){return(o.DOMPurify?Promise.resolve(o.DOMPurify):Promise.resolve().then(n.t.bind(null,552,7))).catch((function(e){return Promise.reject(new Error("Could not load dompurify: "+e))})).then((function(e){return e.default?e.default:e}))}var a=function(e){var t=i()(e);return"undefined"===t?"undefined":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===t?"object":"unknown"},s=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n},l=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(e,t){return e.__proto__=t||l.prototype,e},l.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},l.prototype.from=function(e,t){return this.then((function(){switch(t=t||function(e){switch(a(e)){case"string":return"string";case"element":return"canvas"===e.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(e)){case"string":return this.then(r).then((function(t){return this.set({src:s("div",{innerHTML:e,dompurify:t})})}));case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}}))},l.prototype.to=function(e){switch(e){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},l.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then((function(){var e={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},t=function e(t,n){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==n&&1===i.nodeType&&"SCRIPT"===i.nodeName||r.appendChild(e(i,n));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",(function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft}),!0)),r}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(s("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"}))},l.prototype.toCanvas=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then((function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)})).then((function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)}))},l.prototype.toContext2d=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then((function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete i.onrendered,t.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var a=0;a<n.length;++a){var o=n[a],s=o.src.find((function(e){return"truetype"===e.format}));s&&t.addFont(s.url,o.ref.name,o.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,t.context2d.save(!0),e(this.prop.container,i)})).then((function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)}))},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var e=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=e}))},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},l.prototype.output=function(e,t,n){return"img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(e,t):this.outputPdf(e,t)},l.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(e,t)}))},l.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(e){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+e+'" is not supported.'}}))},l.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then((function(){this.prop.pdf.save(this.opt.filename)}))},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},l.prototype.set=function(e){if("object"!==a(e))return this;var t=Object.keys(e||{}).map((function(t){if(t in l.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}}),this);return this.then((function(){return this.thenList(t)}))},l.prototype.get=function(e,t){return this.then((function(){var n=e in l.template.prop?this.prop[e]:this.opt[e];return t?t(n):n}))},l.prototype.setMargin=function(e){return this.then((function(){switch(a(e)){case"number":e=[e,e,e,e];case"array":if(2===e.length&&(e=[e[0],e[1],e[0],e[1]]),4===e.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=e})).then(this.setPageSize)},l.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then((function(){(e=e||F.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e}))},l.prototype.setProgress=function(e,t,n,r){return null!=e&&(this.progress.val=e),null!=t&&(this.progress.state=t),null!=n&&(this.progress.n=n),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},l.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,(function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,(function(t){return n.updateProgress(null,e),t})).then(e,t).then((function(e){return n.updateProgress(1),e}))}))},l.prototype.thenCore=function(e,t,n){n=n||Promise.prototype.then,e&&(e=e.bind(this)),t&&(t=t.bind(this));var r=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:l.convert(Object.assign({},this),Promise.prototype),i=n.call(r,e,t);return l.convert(i,this.__proto__)},l.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},l.prototype.thenList=function(e){var t=this;return e.forEach((function(e){t=t.thenCore(e)})),t},l.prototype.catch=function(e){e&&(e=e.bind(this));var t=Promise.prototype.catch.call(this,e);return l.convert(t,this)},l.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},l.prototype.error=function(e){return this.then((function(){throw new Error(e)}))},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.export=l.prototype.output,l.prototype.run=l.prototype.then,F.getPageSize=function(e,t,n){if("object"===i()(e)){var r=e;e=r.orientation,t=r.unit||t,n=r.format||n}t=t||"mm",n=n||"a4",e=(""+(e||"P")).toLowerCase();var a,o=(""+n).toLowerCase(),s={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case"pt":a=1;break;case"mm":a=72/25.4;break;case"cm":a=72/2.54;break;case"in":a=72;break;case"px":a=.75;break;case"pc":case"em":a=12;break;case"ex":a=6;break;default:throw"Invalid unit: "+t}var l,c=0,u=0;if(s.hasOwnProperty(o))c=s[o][1]/a,u=s[o][0]/a;else try{c=n[1],u=n[0]}catch(e){throw new Error("Invalid format: "+n)}if("p"===e||"portrait"===e)e="p",u>c&&(l=u,u=c,c=l);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",c>u&&(l=u,u=c,c=l)}return{width:u,height:c,unit:t,k:a,orientation:e}},e.html=function(e,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(De):null;var n=new l(t);return t.worker?n:n.from(e).doCallback()}}(F.API),F.API.addJS=function(e){return Ve=e,this.internal.events.subscribe("postPutResources",(function(){He=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(He+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),ze=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ve+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==He&&void 0!==ze&&this.internal.out("/Names <</JavaScript "+He+" 0 R>>")})),this
/**
 * @license
 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */},function(e){var t;e.events.push(["postPutResources",function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=e.outline.render().split(/\r\n/),i=0;i<r.length;i++){var a=r[i],o=n.exec(a);if(null!=o){var s=o[1];e.internal.newObjectDeferredBegin(s,!1)}e.internal.write(a)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,c=[];for(i=0;i<l;i++){var u=e.internal.newObject();c.push(u);var d=e.internal.getPageInfo(i+1);e.internal.write("<< /D["+d.objId+" 0 R /XYZ null null null]>> endobj")}var h=e.internal.newObject();for(e.internal.write("<< /Names [ "),i=0;i<c.length;i++)e.internal.write("(page_"+(i+1)+")"+c[i]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+h+" 0 R"),e.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,n){var r={title:t,options:n,children:[]};return null==e&&(e=this.root),e.children.push(r),r},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var n=0;n<t.children.length;n++)this.genIds_r(t.children[n])},e.outline.renderRoot=function(e){this.objStart(e),this.line("/Type /Outlines"),e.children.length>0&&(this.line("/First "+this.makeRef(e.children[0])),this.line("/Last "+this.makeRef(e.children[e.children.length-1]))),this.line("/Count "+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++){var i=t.children[r];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(t)),r>0&&this.line("/Prev "+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line("/Next "+this.makeRef(t.children[r+1])),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var a=this.count=this.count_r({count:0},i);if(a>0&&this.line("/Count "+a),i.options&&i.options.pageNumber){var o=e.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+n(0)+" 0]")}this.objEnd()}for(var s=0;s<t.children.length;s++)this.renderItems(t.children[s])},e.outline.line=function(e){this.ctx.val+=e+"\r\n"},e.outline.makeRef=function(e){return e.id+" 0 R"},e.outline.makeString=function(t){return"("+e.internal.pdfEscape(t)+")"},e.outline.objStart=function(e){this.ctx.val+="\r\n"+e.id+" 0 obj\r\n<<\r\n"},e.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}])}(F.API),
/**
 * @license
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,n,r,i,a,o){var s,l=this.decode.DCT_DECODE,c=null;if("string"==typeof e||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=a||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,(s=function(e){for(var n,r=256*e.charCodeAt(4)+e.charCodeAt(5),i=e.length,a={width:0,height:0,numcomponents:1},o=4;o<i;o+=2){if(o+=r,-1!==t.indexOf(e.charCodeAt(o+1))){n=256*e.charCodeAt(o+5)+e.charCodeAt(o+6),a={width:256*e.charCodeAt(o+7)+e.charCodeAt(o+8),height:n,numcomponents:e.charCodeAt(o+9)};break}r=256*e.charCodeAt(o+2)+e.charCodeAt(o+3)}return a}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e)).numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}c={data:e,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:l,index:n,alias:r}}return c}}(F.API);var Ge,qe,Ye,Ke,Xe,Qe=function(){var e,t,n;function r(e){var t,n,r,i,a,o,s,l,c,u,d,h,f,p;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},o=null;;){switch(t=this.readUInt32(),c=function(){var e,t;for(t=[],e=0;e<4;++e)t.push(String.fromCharCode(this.data[this.pos++]));return t}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":o&&this.animation.frames.push(o),this.pos+=4,o={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},a=this.readUInt16(),i=this.readUInt16()||100,o.delay=1e3*a/i,o.disposeOp=this.data[this.pos++],o.blendOp=this.data[this.pos++],o.data=[];break;case"IDAT":case"fdAT":for("fdAT"===c&&(this.pos+=4,t-=4),e=(null!=o?o.data:void 0)||this.imgData,h=0;0<=t?h<t:h>t;0<=t?++h:--h)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(r=this.palette.length/3,this.transparency.indexed=this.read(t),this.transparency.indexed.length>r)throw new Error("More transparent colors than palette size");if((u=r-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":s=(d=this.read(t)).indexOf(0),l=String.fromCharCode.apply(String,d.slice(0,s)),this.text[l]=String.fromCharCode.apply(String,d.slice(s+1));break;case"IEND":return o&&this.animation.frames.push(o),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(p=this.colorType)||6===p,n=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*n,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}r.prototype.read=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)n.push(this.data[this.pos++]);return n},r.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},r.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},r.prototype.decodePixels=function(e){var t=this.pixelBitlength/8,n=new Uint8Array(this.width*this.height*t),r=0,i=this;if(null==e&&(e=this.imgData),0===e.length)return new Uint8Array(0);function o(a,o,s,l){var c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x,O,I=Math.ceil((i.width-a)/s),M=Math.ceil((i.height-o)/l),P=i.width==I&&i.height==M;for(w=t*I,A=P?n:new Uint8Array(w*M),p=e.length,_=0,u=0;_<M&&r<p;){switch(e[r++]){case 0:for(h=C=0;C<w;h=C+=1)A[u++]=e[r++];break;case 1:for(h=T=0;T<w;h=T+=1)c=e[r++],f=h<t?0:A[u-t],A[u++]=(c+f)%256;break;case 2:for(h=k=0;k<w;h=k+=1)c=e[r++],d=(h-h%t)/t,E=_&&A[(_-1)*w+d*t+h%t],A[u++]=(E+c)%256;break;case 3:for(h=x=0;x<w;h=x+=1)c=e[r++],d=(h-h%t)/t,f=h<t?0:A[u-t],E=_&&A[(_-1)*w+d*t+h%t],A[u++]=(c+Math.floor((f+E)/2))%256;break;case 4:for(h=O=0;O<w;h=O+=1)c=e[r++],d=(h-h%t)/t,f=h<t?0:A[u-t],0===_?E=S=0:(E=A[(_-1)*w+d*t+h%t],S=d&&A[(_-1)*w+(d-1)*t+h%t]),m=f+E-S,g=Math.abs(m-f),b=Math.abs(m-E),y=Math.abs(m-S),v=g<=b&&g<=y?f:b<=y?E:S,A[u++]=(c+v)%256;break;default:throw new Error("Invalid filter algorithm: "+e[r-1])}if(!P){var D=((o+_*l)*i.width+a)*t,N=_*w;for(h=0;h<I;h+=1){for(var L=0;L<t;L+=1)n[D++]=A[N++];D+=(s-1)*t}}_++}}return e=Object(a.a)(e),1==i.interlaceMethod?(o(0,0,8,8),o(4,0,8,8),o(0,4,4,8),o(2,0,4,4),o(0,2,2,4),o(1,0,2,2),o(0,1,1,2)):o(0,0,1,1),n},r.prototype.decodePalette=function(){var e,t,n,r,i,a,o,s,l;for(n=this.palette,a=this.transparency.indexed||[],i=new Uint8Array((a.length||0)+n.length),r=0,e=0,t=o=0,s=n.length;o<s;t=o+=3)i[r++]=n[t],i[r++]=n[t+1],i[r++]=n[t+2],i[r++]=null!=(l=a[e++])?l:255;return i},r.prototype.copyToImageData=function(e,t){var n,r,i,a,o,s,l,c,u,d,h;if(r=this.colors,u=null,n=this.hasAlphaChannel,this.palette.length&&(u=null!=(h=this._decodedPalette)?h:this._decodedPalette=this.decodePalette(),r=4,n=!0),c=(i=e.data||e).length,o=u||t,a=s=0,1===r)for(;a<c;)l=u?4*t[a/4]:s,d=o[l++],i[a++]=d,i[a++]=d,i[a++]=d,i[a++]=n?o[l++]:255,s=l;else for(;a<c;)l=u?4*t[a/4]:s,i[a++]=o[l++],i[a++]=o[l++],i[a++]=o[l++],i[a++]=n?o[l++]:255,s=l},r.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e};var i=function(){if("[object Window]"===Object.prototype.toString.call(o)){try{t=o.document.createElement("canvas"),n=t.getContext("2d")}catch(e){return!1}return!0}return!1};return i(),e=function(e){var r;if(!0===i())return n.width=e.width,n.height=e.height,n.clearRect(0,0,e.width,e.height),n.putImageData(e,0,0),(r=new Image).src=t.toDataURL(),r;throw new Error("This method requires a Browser with Canvas-capability.")},r.prototype.decodeFrames=function(t){var n,r,i,a,o,s,l,c;if(this.animation){for(c=[],r=o=0,s=(l=this.animation.frames).length;o<s;r=++o)n=l[r],i=t.createImageData(n.width,n.height),a=this.decodePixels(new Uint8Array(n.data)),this.copyToImageData(i,a),n.imageData=i,c.push(n.image=e(i));return c}},r.prototype.renderFrame=function(e,t){var n,r,i;return n=(r=this.animation.frames)[t],i=r[t-1],0===t&&e.clearRect(0,0,this.width,this.height),1===(null!=i?i.disposeOp:void 0)?e.clearRect(i.xOffset,i.yOffset,i.width,i.height):2===(null!=i?i.disposeOp:void 0)&&e.putImageData(i.imageData,i.xOffset,i.yOffset),0===n.blendOp&&e.clearRect(n.xOffset,n.yOffset,n.width,n.height),e.drawImage(n.image,n.xOffset,n.yOffset)},r.prototype.animate=function(e){var t,n,r,i,a,o,s=this;return n=0,o=this.animation,i=o.numFrames,r=o.frames,a=o.numPlays,(t=function(){var o,l;if(o=n++%i,l=r[o],s.renderFrame(e,o),i>1&&n/i<a)return s.animation._timeout=setTimeout(t,l.delay)})()},r.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},r.prototype.render=function(e){var t,n;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,t=e.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(n=t.createImageData(this.width,this.height),this.copyToImageData(n,this.decodePixels()),t.putImageData(n,0,0))},r}();
/**
 * @license
 *
 * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * ====================================================================
 */
/**
 * @license
 * (c) Dean McNamee <dean@gmail.com>, 2013.
 *
 * https://github.com/deanm/omggif
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 *
 * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
 * including animation and compression.  It does not rely on any specific
 * underlying system, so should run in the browser, Node, or Plask.
 */function $e(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw new Error("Invalid GIF 87a/89a header.");var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],a=i>>7,o=1<<1+(7&i);e[t++],e[t++];var s=null,l=null;a&&(s=t,l=o,t+=3*o);var c=!0,u=[],d=0,h=null,f=0,p=null;for(this.width=n,this.height=r;c&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,p=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((k=e[t++])>=0))throw Error("Invalid block size");if(0===k)break;t+=k}break;case 249:if(4!==e[t++]||0!==e[t+4])throw new Error("Invalid graphics extension block.");var m=e[t++];d=e[t++]|e[t++]<<8,h=e[t++],0==(1&m)&&(h=null),f=m>>2&7,t++;break;case 254:for(;;){if(!((k=e[t++])>=0))throw Error("Invalid block size");if(0===k)break;t+=k}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var g=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,A=e[t++],_=A>>6&1,w=1<<1+(7&A),E=s,S=l,C=!1;A>>7&&(C=!0,E=t,S=w,t+=3*w);var T=t;for(t++;;){var k;if(!((k=e[t++])>=0))throw Error("Invalid block size");if(0===k)break;t+=k}u.push({x:g,y:v,width:b,height:y,has_local_palette:C,palette_offset:E,palette_size:S,data_offset:T,data_length:t-T,transparent_index:h,interlaced:!!_,delay:d,disposal:f});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return p},this.frameInfo=function(e){if(e<0||e>=u.length)throw new Error("Frame index out of range.");return u[e]},this.decodeAndBlitFrameBGRA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height,o=new Uint8Array(a);Je(e,i.data_offset,o,a);var s=i.palette_offset,l=i.transparent_index;null===l&&(l=256);var c=i.width,u=n-c,d=c,h=4*(i.y*n+i.x),f=4*((i.y+i.height)*n+i.x),p=h,m=4*u;!0===i.interlaced&&(m+=4*n*7);for(var g=8,v=0,b=o.length;v<b;++v){var y=o[v];if(0===d&&(d=c,(p+=m)>=f&&(m=4*u+4*n*(g-1),p=h+(c+u)*(g<<1),g>>=1)),y===l)p+=4;else{var A=e[s+3*y],_=e[s+3*y+1],w=e[s+3*y+2];r[p++]=w,r[p++]=_,r[p++]=A,r[p++]=255}--d}},this.decodeAndBlitFrameRGBA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height,o=new Uint8Array(a);Je(e,i.data_offset,o,a);var s=i.palette_offset,l=i.transparent_index;null===l&&(l=256);var c=i.width,u=n-c,d=c,h=4*(i.y*n+i.x),f=4*((i.y+i.height)*n+i.x),p=h,m=4*u;!0===i.interlaced&&(m+=4*n*7);for(var g=8,v=0,b=o.length;v<b;++v){var y=o[v];if(0===d&&(d=c,(p+=m)>=f&&(m=4*u+4*n*(g-1),p=h+(c+u)*(g<<1),g>>=1)),y===l)p+=4;else{var A=e[s+3*y],_=e[s+3*y+1],w=e[s+3*y+2];r[p++]=A,r[p++]=_,r[p++]=w,r[p++]=255}--d}}}function Je(e,t,n,r){for(var i=e[t++],a=1<<i,o=a+1,s=o+1,c=i+1,u=(1<<c)-1,d=0,h=0,f=0,p=e[t++],m=new Int32Array(4096),g=null;;){for(;d<16&&0!==p;)h|=e[t++]<<d,d+=8,1===p?p=e[t++]:--p;if(d<c)break;var v=h&u;if(h>>=c,d-=c,v!==a){if(v===o)break;for(var b=v<s?v:g,y=0,A=b;A>a;)A=m[A]>>8,++y;var _=A;if(f+y+(b!==v?1:0)>r)return void l.log("Warning, gif stream longer than expected.");n[f++]=_;var w=f+=y;for(b!==v&&(n[f++]=_),A=b;y--;)A=m[A],n[--w]=255&A,A>>=8;null!==g&&s<4096&&(m[s++]=g<<8|_,s>=u+1&&c<12&&(++c,u=u<<1|1)),g=v}else s=o+1,u=(1<<(c=i+1))-1,g=null}return f!==r&&l.log("Warning, gif stream shorter than expected."),n}
/**
 * @license
  Copyright (c) 2008, Adobe Systems Incorporated
  All rights reserved.

  Redistribution and use in source and binary forms, with or without 
  modification, are permitted provided that the following conditions are
  met:

  * Redistributions of source code must retain the above copyright notice, 
    this list of conditions and the following disclaimer.
  
  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the 
    documentation and/or other materials provided with the distribution.
  
  * Neither the name of Adobe Systems Incorporated nor the names of its 
    contributors may be used to endorse or promote products derived from 
    this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/function Ze(e){var t,n,r,i,a,o=Math.floor,s=new Array(64),l=new Array(64),c=new Array(64),u=new Array(64),d=new Array(65535),h=new Array(65535),f=new Array(64),p=new Array(64),m=[],g=0,v=7,b=new Array(64),y=new Array(64),A=new Array(64),_=new Array(256),w=new Array(2048),E=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],S=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],C=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],k=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],x=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],O=[0,1,2,3,4,5,6,7,8,9,10,11],I=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],M=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function P(e,t){for(var n=0,r=0,i=new Array,a=1;a<=16;a++){for(var o=1;o<=e[a];o++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=a,r++,n++;n*=2}return i}function D(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(g|=1<<v),n--,--v<0&&(255==g?(N(255),N(0)):N(g),v=7,g=0)}function N(e){m.push(e)}function L(e){N(e>>8&255),N(255&e)}function R(e,t,n,r,i){for(var a,o=i[0],s=i[240],l=function(e,t){var n,r,i,a,o,s,l,c,u,d,h=0;for(u=0;u<8;++u){n=e[h],r=e[h+1],i=e[h+2],a=e[h+3],o=e[h+4],s=e[h+5],l=e[h+6];var p=n+(c=e[h+7]),m=n-c,g=r+l,v=r-l,b=i+s,y=i-s,A=a+o,_=a-o,w=p+A,E=p-A,S=g+b,C=g-b;e[h]=w+S,e[h+4]=w-S;var T=.707106781*(C+E);e[h+2]=E+T,e[h+6]=E-T;var k=.382683433*((w=_+y)-(C=v+m)),x=.5411961*w+k,O=1.306562965*C+k,I=.707106781*(S=y+v),M=m+I,P=m-I;e[h+5]=P+x,e[h+3]=P-x,e[h+1]=M+O,e[h+7]=M-O,h+=8}for(h=0,u=0;u<8;++u){n=e[h],r=e[h+8],i=e[h+16],a=e[h+24],o=e[h+32],s=e[h+40],l=e[h+48];var D=n+(c=e[h+56]),N=n-c,L=r+l,R=r-l,B=i+s,j=i-s,F=a+o,U=a-o,H=D+F,z=D-F,V=L+B,W=L-B;e[h]=H+V,e[h+32]=H-V;var G=.707106781*(W+z);e[h+16]=z+G,e[h+48]=z-G;var q=.382683433*((H=U+j)-(W=R+N)),Y=.5411961*H+q,K=1.306562965*W+q,X=.707106781*(V=j+R),Q=N+X,$=N-X;e[h+40]=$+Y,e[h+24]=$-Y,e[h+8]=Q+K,e[h+56]=Q-K,h++}for(u=0;u<64;++u)d=e[u]*t[u],f[u]=d>0?d+.5|0:d-.5|0;return f}(e,t),c=0;c<64;++c)p[E[c]]=l[c];var u=p[0]-n;n=p[0],0==u?D(r[0]):(D(r[h[a=32767+u]]),D(d[a]));for(var m=63;m>0&&0==p[m];)m--;if(0==m)return D(o),n;for(var g,v=1;v<=m;){for(var b=v;0==p[v]&&v<=m;)++v;var y=v-b;if(y>=16){g=y>>4;for(var A=1;A<=g;++A)D(s);y&=15}a=32767+p[v],D(i[(y<<4)+h[a]]),D(d[a]),v++}return 63!=m&&D(o),n}function B(e){e=Math.min(Math.max(e,1),100),a!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=o((t[n]*e+50)/100);r=Math.min(Math.max(r,1),255),s[E[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var d=o((i[a]*e+50)/100);d=Math.min(Math.max(d,1),255),l[E[a]]=d}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],f=0,p=0;p<8;p++)for(var m=0;m<8;m++)c[f]=1/(s[E[f]]*h[p]*h[m]*8),u[f]=1/(l[E[f]]*h[p]*h[m]*8),f++}(e<50?Math.floor(5e3/e):Math.floor(200-2*e)),a=e)}this.encode=function(e,a){a&&B(a),m=new Array,g=0,v=7,L(65496),L(65504),L(16),N(74),N(70),N(73),N(70),N(0),N(1),N(1),N(0),L(1),L(1),N(0),N(0),function(){L(65499),L(132),N(0);for(var e=0;e<64;e++)N(s[e]);N(1);for(var t=0;t<64;t++)N(l[t])}(),function(e,t){L(65472),L(17),N(8),L(t),L(e),N(3),N(1),N(17),N(0),N(2),N(17),N(1),N(3),N(17),N(1)}(e.width,e.height),function(){L(65476),L(418),N(0);for(var e=0;e<16;e++)N(S[e+1]);for(var t=0;t<=11;t++)N(C[t]);N(16);for(var n=0;n<16;n++)N(T[n+1]);for(var r=0;r<=161;r++)N(k[r]);N(1);for(var i=0;i<16;i++)N(x[i+1]);for(var a=0;a<=11;a++)N(O[a]);N(17);for(var o=0;o<16;o++)N(I[o+1]);for(var s=0;s<=161;s++)N(M[s])}(),L(65498),L(12),N(3),N(1),N(0),N(2),N(17),N(3),N(17),N(0),N(63),N(0);var o=0,d=0,h=0;g=0,v=7,this.encode.displayName="_encode_";for(var f,p,_,E,P,j,F,U,H,z=e.data,V=e.width,W=e.height,G=4*V,q=0;q<W;){for(f=0;f<G;){for(P=G*q+f,F=-1,U=0,H=0;H<64;H++)j=P+(U=H>>3)*G+(F=4*(7&H)),q+U>=W&&(j-=G*(q+1+U-W)),f+F>=G&&(j-=f+F-G+4),p=z[j++],_=z[j++],E=z[j++],b[H]=(w[p]+w[_+256>>0]+w[E+512>>0]>>16)-128,y[H]=(w[p+768>>0]+w[_+1024>>0]+w[E+1280>>0]>>16)-128,A[H]=(w[p+1280>>0]+w[_+1536>>0]+w[E+1792>>0]>>16)-128;o=R(b,c,o,t,r),d=R(y,u,d,n,i),h=R(A,u,h,n,i),f+=32}q+=8}if(v>=0){var Y=[];Y[1]=v+1,Y[0]=(1<<v+1)-1,D(Y)}return L(65497),new Uint8Array(m)},e=e||50,function(){for(var e=String.fromCharCode,t=0;t<256;t++)_[t]=e(t)}(),t=P(S,C),n=P(x,O),r=P(T,k),i=P(I,M),function(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)h[32767+r]=n,d[32767+r]=[],d[32767+r][1]=n,d[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)h[32767+i]=n,d[32767+i]=[],d[32767+i][1]=n,d[32767+i][0]=t-1+i;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)w[e]=19595*e,w[e+256>>0]=38470*e,w[e+512>>0]=7471*e+32768,w[e+768>>0]=-11059*e,w[e+1024>>0]=-21709*e,w[e+1280>>0]=32768*e+8421375,w[e+1536>>0]=-27439*e,w[e+1792>>0]=-5329*e}(),B(e)}
/**
 * @license
 * Copyright (c) 2017 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */function et(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function tt(e){function t(e){if(!e)throw Error("assert :P")}function n(e,t,n){for(var r=0;4>r;r++)if(e[t+r]!=n.charCodeAt(r))return!0;return!1}function r(e,t,n,r,i){for(var a=0;a<i;a++)e[t+a]=n[r+a]}function i(e,t,n,r){for(var i=0;i<r;i++)e[t+i]=n}function a(e){return new Int32Array(e)}function o(e,t){for(var n=[],r=0;r<e;r++)n.push(new t);return n}function s(e,t){var n=[];return function e(n,r,i){for(var a=i[r],o=0;o<a&&(n.push(i.length>r+1?[]:new t),!(i.length<r+1));o++)e(n[o],r+1,i)}(n,0,e),n}var l=function(){var e=this;function l(e,t){for(var n=1<<t-1>>>0;e&n;)n>>>=1;return n?(e&n-1)+n:e}function c(e,n,r,i,a){t(!(i%r));do{e[n+(i-=r)]=a}while(0<i)}function u(e,n,r,i,o){if(t(2328>=o),512>=o)var s=a(512);else if(null==(s=a(o)))return 0;return function(e,n,r,i,o,s){var u,h,f=n,p=1<<r,m=a(16),g=a(16);for(t(0!=o),t(null!=i),t(null!=e),t(0<r),h=0;h<o;++h){if(15<i[h])return 0;++m[i[h]]}if(m[0]==o)return 0;for(g[1]=0,u=1;15>u;++u){if(m[u]>1<<u)return 0;g[u+1]=g[u]+m[u]}for(h=0;h<o;++h)u=i[h],0<i[h]&&(s[g[u]++]=h);if(1==g[15])return(i=new d).g=0,i.value=s[0],c(e,f,1,p,i),p;var v,b=-1,y=p-1,A=0,_=1,w=1,E=1<<r;for(h=0,u=1,o=2;u<=r;++u,o<<=1){if(_+=w<<=1,0>(w-=m[u]))return 0;for(;0<m[u];--m[u])(i=new d).g=u,i.value=s[h++],c(e,f+A,o,E,i),A=l(A,u)}for(u=r+1,o=2;15>=u;++u,o<<=1){if(_+=w<<=1,0>(w-=m[u]))return 0;for(;0<m[u];--m[u]){if(i=new d,(A&y)!=b){for(f+=E,v=1<<(b=u)-r;15>b&&!(0>=(v-=m[b]));)++b,v<<=1;p+=E=1<<(v=b-r),e[n+(b=A&y)].g=v+r,e[n+b].value=f-n-b}i.g=u-r,i.value=s[h++],c(e,f+(A>>r),o,E,i),A=l(A,u)}}return _!=2*g[15]-1?0:p}(e,n,r,i,o,s)}function d(){this.value=this.g=0}function h(){this.value=this.g=0}function f(){this.G=o(5,d),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Fn,h)}function p(e,n,r,i){t(null!=e),t(null!=n),t(2147483648>i),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=n,e.pa=r,e.Jd=n,e.Yc=r+i,e.Zc=4<=i?r+i-4+1:r,T(e)}function m(e,t){for(var n=0;0<t--;)n|=x(e,128)<<t;return n}function g(e,t){var n=m(e,t);return k(e)?-n:n}function v(e,n,r,i){var a,o=0;for(t(null!=e),t(null!=n),t(4294967288>i),e.Sb=i,e.Ra=0,e.u=0,e.h=0,4<i&&(i=4),a=0;a<i;++a)o+=n[r+a]<<8*a;e.Ra=o,e.bb=i,e.oa=n,e.pa=r}function b(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<zn-8>>>0,++e.bb,e.u-=8;E(e)&&(e.h=1,e.u=0)}function y(e,n){if(t(0<=n),!e.h&&n<=Hn){var r=w(e)&Un[n];return e.u+=n,b(e),r}return e.h=1,e.u=0}function A(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function _(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function w(e){return e.Ra>>>(e.u&zn-1)>>>0}function E(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>zn}function S(e,t){e.u=t,e.h=E(e)}function C(e){e.u>=Vn&&(t(e.u>=Vn),b(e))}function T(e){t(null!=e&&null!=e.oa),e.pa<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(null!=e&&null!=e.oa),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function k(e){return m(e,1)}function x(e,t){var n=e.Ca;0>e.b&&T(e);var r=e.b,i=n*t>>>8,a=(e.I>>>r>i)+0;for(a?(n-=i,e.I-=i+1<<r>>>0):n=i+1,r=n,i=0;256<=r;)i+=8,r>>=8;return r=7^i+Wn[r],e.b-=r,e.Ca=(n<<r)-1,a}function O(e,t,n){e[t+0]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=n>>0&255}function I(e,t){return e[t+0]<<0|e[t+1]<<8}function M(e,t){return I(e,t)|e[t+2]<<16}function P(e,t){return I(e,t)|I(e,t+2)<<16}function D(e,n){var r=1<<n;return t(null!=e),t(0<n),e.X=a(r),null==e.X?0:(e.Mb=32-n,e.Xa=n,1)}function N(e,n){t(null!=e),t(null!=n),t(e.Xa==n.Xa),r(n.X,0,e.X,0,1<<n.Xa)}function L(){this.X=[],this.Xa=this.Mb=0}function R(e,n,r,i){t(null!=r),t(null!=i);var a=r[0],o=i[0];return 0==a&&(a=(e*o+n/2)/n),0==o&&(o=(n*a+e/2)/e),0>=a||0>=o?0:(r[0]=a,i[0]=o,1)}function B(e,t){return e+(1<<t)-1>>>t}function j(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function F(t,n){e[n]=function(n,r,i,a,o,s,l){var c;for(c=0;c<o;++c){var u=e[t](s[l+c-1],i,a+c);s[l+c]=j(n[r+c],u)}}}function U(){this.ud=this.hd=this.jd=0}function H(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function z(e){return 0<=e&&256>e?e:0>e?0:255<e?255:void 0}function V(e,t){return z(e+(e-t+.5>>1))}function W(e,t,n){return Math.abs(t-n)-Math.abs(e-n)}function G(e,t,n,r,i,a,o){for(r=a[o-1],n=0;n<i;++n)a[o+n]=r=j(e[t+n],r)}function q(e,t,n,r,i){var a;for(a=0;a<n;++a){var o=e[t+a],s=o>>8&255,l=16711935&(l=(l=16711935&o)+((s<<16)+s));r[i+a]=(4278255360&o)+l>>>0}}function Y(e,t){t.jd=e>>0&255,t.hd=e>>8&255,t.ud=e>>16&255}function K(e,t,n,r,i,a){var o;for(o=0;o<r;++o){var s=t[n+o],l=s>>>8,c=s,u=255&(u=(u=s>>>16)+((e.jd<<24>>24)*(l<<24>>24)>>>5));c=255&(c=(c+=(e.hd<<24>>24)*(l<<24>>24)>>>5)+((e.ud<<24>>24)*(u<<24>>24)>>>5)),i[a+o]=(4278255360&s)+(u<<16)+c}}function X(t,n,r,i,a){e[n]=function(e,t,n,r,o,s,l,c,u){for(r=l;r<c;++r)for(l=0;l<u;++l)o[s++]=a(n[i(e[t++])])},e[t]=function(t,n,o,s,l,c,u){var d=8>>t.b,h=t.Ea,f=t.K[0],p=t.w;if(8>d)for(t=(1<<t.b)-1,p=(1<<d)-1;n<o;++n){var m,g=0;for(m=0;m<h;++m)m&t||(g=i(s[l++])),c[u++]=a(f[g&p]),g>>=d}else e["VP8LMapColor"+r](s,l,f,p,c,u,n,o,h)}}function Q(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=a>>0&255}}function $(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=a>>0&255,r[i++]=a>>24&255}}function J(e,t,n,r,i){for(n=t+n;t<n;){var a=(o=e[t++])>>16&240|o>>12&15,o=o>>0&240|o>>28&15;r[i++]=a,r[i++]=o}}function Z(e,t,n,r,i){for(n=t+n;t<n;){var a=(o=e[t++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;r[i++]=a,r[i++]=o}}function ee(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>0&255,r[i++]=a>>8&255,r[i++]=a>>16&255}}function te(e,t,n,i,a,o){if(0==o)for(n=t+n;t<n;)O(i,((o=e[t++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else r(i,a,e,t,n)}function ne(t,n){e[n][0]=e[t+"0"],e[n][1]=e[t+"1"],e[n][2]=e[t+"2"],e[n][3]=e[t+"3"],e[n][4]=e[t+"4"],e[n][5]=e[t+"5"],e[n][6]=e[t+"6"],e[n][7]=e[t+"7"],e[n][8]=e[t+"8"],e[n][9]=e[t+"9"],e[n][10]=e[t+"10"],e[n][11]=e[t+"11"],e[n][12]=e[t+"12"],e[n][13]=e[t+"13"],e[n][14]=e[t+"0"],e[n][15]=e[t+"0"]}function re(e){return e==Vr||e==Wr||e==Gr||e==qr}function ie(){this.eb=[],this.size=this.A=this.fb=0}function ae(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function oe(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ie,this.f.kb=new ae,this.sd=null}function se(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function le(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ce(e){return alert("todo:WebPSamplerProcessPlane"),e.T}function ue(e,t){var n=e.T,i=t.ba.f.RGBA,a=i.eb,o=i.fb+e.ka*i.A,s=vi[t.ba.S],l=e.y,c=e.O,u=e.f,d=e.N,h=e.ea,f=e.W,p=t.cc,m=t.dc,g=t.Mc,v=t.Nc,b=e.ka,y=e.ka+e.T,A=e.U,_=A+1>>1;for(0==b?s(l,c,null,null,u,d,h,f,u,d,h,f,a,o,null,null,A):(s(t.ec,t.fc,l,c,p,m,g,v,u,d,h,f,a,o-i.A,a,o,A),++n);b+2<y;b+=2)p=u,m=d,g=h,v=f,d+=e.Rc,f+=e.Rc,o+=2*i.A,s(l,(c+=2*e.fa)-e.fa,l,c,p,m,g,v,u,d,h,f,a,o-i.A,a,o,A);return c+=e.fa,e.j+y<e.o?(r(t.ec,t.fc,l,c,A),r(t.cc,t.dc,u,d,_),r(t.Mc,t.Nc,h,f,_),n--):1&y||s(l,c,null,null,u,d,h,f,u,d,h,f,a,o+i.A,null,null,A),n}function de(e,n,r){var i=e.F,a=[e.J];if(null!=i){var o=e.U,s=n.ba.S,l=s==Ur||s==Gr;n=n.ba.f.RGBA;var c=[0],u=e.ka;c[0]=e.T,e.Kb&&(0==u?--c[0]:(--u,a[0]-=e.width),e.j+e.ka+e.T==e.o&&(c[0]=e.o-e.j-u));var d=n.eb;u=n.fb+u*n.A,e=Cr(i,a[0],e.width,o,c,d,u+(l?0:3),n.A),t(r==c),e&&re(s)&&Er(d,u,l,o,c,n.A)}return 0}function he(e){var t=e.ma,n=t.ba.S,r=11>n,i=n==Br||n==Fr||n==Ur||n==Hr||12==n||re(n);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!Rn(t.Oa,e,i?11:12))return 0;if(i&&re(n)&&yn(),e.da)alert("todo:use_scaling");else{if(r){if(t.Ib=ce,e.Kb){if(n=e.U+1>>1,t.memory=a(e.U+2*n),null==t.memory)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+n,t.Ib=ue,yn()}}else alert("todo:EmitYUV");i&&(t.Jb=de,r&&vn())}if(r&&!Mi){for(e=0;256>e;++e)Pi[e]=89858*(e-128)+Ti>>Ci,Li[e]=-22014*(e-128)+Ti,Ni[e]=-45773*(e-128),Di[e]=113618*(e-128)+Ti>>Ci;for(e=ki;e<xi;++e)t=76283*(e-16)+Ti>>Ci,Ri[e-ki]=Ge(t,255),Bi[e-ki]=Ge(t+8>>4,15);Mi=1}return 1}function fe(e){var n=e.ma,r=e.U,i=e.T;return t(!(1&e.ka)),0>=r||0>=i?0:(r=n.Ib(e,n),null!=n.Jb&&n.Jb(e,n,r),n.Dc+=r,1)}function pe(e){e.ma.memory=null}function me(e,t,n,r){return 47!=y(e,8)?0:(t[0]=y(e,14)+1,n[0]=y(e,14)+1,r[0]=y(e,1),0!=y(e,3)?0:!e.h)}function ge(e,t){if(4>e)return e+1;var n=e-2>>1;return(2+(1&e)<<n)+y(t,n)+1}function ve(e,t){return 120<t?t-120:1<=(n=((n=Jr[t-1])>>4)*e+(8-(15&n)))?n:1;var n}function be(e,t,n){var r=w(n),i=e[t+=255&r].g-8;return 0<i&&(S(n,n.u+8),r=w(n),t+=e[t].value,t+=r&(1<<i)-1),S(n,n.u+e[t].g),e[t].value}function ye(e,n,r){return r.g+=e.g,r.value+=e.value<<n>>>0,t(8>=r.g),e.g}function Ae(e,n,r){var i=e.xc;return t((n=0==i?0:e.vc[e.md*(r>>i)+(n>>i)])<e.Wb),e.Ya[n]}function _e(e,n,i,a){var o=e.ab,s=e.c*n,l=e.C;n=l+n;var c=i,u=a;for(a=e.Ta,i=e.Ua;0<o--;){var d=e.gc[o],h=l,f=n,p=c,m=u,g=(u=a,c=i,d.Ea);switch(t(h<f),t(f<=d.nc),d.hc){case 2:Yn(p,m,(f-h)*g,u,c);break;case 0:var v=h,b=f,y=u,A=c,_=(T=d).Ea;0==v&&(Gn(p,m,null,null,1,y,A),G(p,m+1,0,0,_-1,y,A+1),m+=_,A+=_,++v);for(var w=1<<T.b,E=w-1,S=B(_,T.b),C=T.K,T=T.w+(v>>T.b)*S;v<b;){var k=C,x=T,O=1;for(qn(p,m,y,A-_,1,y,A);O<_;){var I=(O&~E)+w;I>_&&(I=_),(0,Jn[k[x++]>>8&15])(p,m+ +O,y,A+O-_,I-O,y,A+O),O=I}m+=_,A+=_,++v&E||(T+=S)}f!=d.nc&&r(u,c-g,u,c+(f-h-1)*g,g);break;case 1:for(g=p,b=m,_=(p=d.Ea)-(A=p&~(y=(m=1<<d.b)-1)),v=B(p,d.b),w=d.K,d=d.w+(h>>d.b)*v;h<f;){for(E=w,S=d,C=new U,T=b+A,k=b+p;b<T;)Y(E[S++],C),Zn(C,g,b,m,u,c),b+=m,c+=m;b<k&&(Y(E[S++],C),Zn(C,g,b,_,u,c),b+=_,c+=_),++h&y||(d+=v)}break;case 3:if(p==u&&m==c&&0<d.b){for(b=u,p=g=c+(f-h)*g-(A=(f-h)*B(d.Ea,d.b)),m=u,y=c,v=[],A=(_=A)-1;0<=A;--A)v[A]=m[y+A];for(A=_-1;0<=A;--A)b[p+A]=v[A];Kn(d,h,f,u,g,u,c)}else Kn(d,h,f,p,m,u,c)}c=a,u=i}u!=i&&r(a,i,c,u,s)}function we(e,n){var r=e.V,i=e.Ba+e.c*e.C,a=n-e.C;if(t(n<=e.l.o),t(16>=a),0<a){var o=e.l,s=e.Ta,l=e.Ua,c=o.width;if(_e(e,a,r,i),a=l=[l],t((r=e.C)<(i=n)),t(o.v<o.va),i>o.o&&(i=o.o),r<o.j){var u=o.j-r;r=o.j,a[0]+=u*c}if(r>=i?r=0:(a[0]+=4*o.v,o.ka=r-o.j,o.U=o.va-o.v,o.T=i-r,r=1),r){if(l=l[0],11>(r=e.ca).S){var d=r.f.RGBA,h=(i=r.S,a=o.U,o=o.T,u=d.eb,d.A),f=o;for(d=d.fb+e.Ma*d.A;0<f--;){var p=s,m=l,g=a,v=u,b=d;switch(i){case Rr:er(p,m,g,v,b);break;case Br:tr(p,m,g,v,b);break;case Vr:tr(p,m,g,v,b),Er(v,b,0,g,1,0);break;case jr:ir(p,m,g,v,b);break;case Fr:te(p,m,g,v,b,1);break;case Wr:te(p,m,g,v,b,1),Er(v,b,0,g,1,0);break;case Ur:te(p,m,g,v,b,0);break;case Gr:te(p,m,g,v,b,0),Er(v,b,1,g,1,0);break;case Hr:nr(p,m,g,v,b);break;case qr:nr(p,m,g,v,b),Sr(v,b,g,1,0);break;case zr:rr(p,m,g,v,b);break;default:t(0)}l+=c,d+=h}e.Ma+=o}else alert("todo:EmitRescaledRowsYUVA");t(e.Ma<=r.height)}}e.C=n,t(e.C<=e.i)}function Ee(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var n=e.Ya[t].G,r=e.Ya[t].H;if(0<n[1][r[1]+0].g||0<n[2][r[2]+0].g||0<n[3][r[3]+0].g)return 0}return 1}function Se(e,n,r,i,a,o){if(0!=e.Z){var s=e.qd,l=e.rd;for(t(null!=gi[e.Z]);n<r;++n)gi[e.Z](s,l,i,a,i,a,o),s=i,l=a,a+=o;e.qd=s,e.rd=l}}function Ce(e,n){var r=e.l.ma,i=0==r.Z||1==r.Z?e.l.j:e.C;if(i=e.C<i?i:e.C,t(n<=e.l.o),n>i){var a=e.l.width,o=r.ca,s=r.tb+a*i,l=e.V,c=e.Ba+e.c*i,u=e.gc;t(1==e.ab),t(3==u[0].hc),Qn(u[0],i,n,l,c,o,s),Se(r,i,n,o,s,a)}e.C=e.Ma=n}function Te(e,n,r,i,a,o,s){var l=e.$/i,c=e.$%i,u=e.m,d=e.s,h=r+e.$,f=h;a=r+i*a;var p=r+i*o,m=280+d.ua,g=e.Pb?l:16777216,v=0<d.ua?d.Wa:null,b=d.wc,y=h<p?Ae(d,c,l):null;t(e.C<o),t(p<=a);var A=!1;e:for(;;){for(;A||h<p;){var _=0;if(l>=g){var T=h-r;t((g=e).Pb),g.wd=g.m,g.xd=T,0<g.s.ua&&N(g.s.Wa,g.s.vb),g=l+ei}if(c&b||(y=Ae(d,c,l)),t(null!=y),y.Qb&&(n[h]=y.qb,A=!0),!A)if(C(u),y.jc){_=u,T=n;var k=h,x=y.pd[w(_)&Fn-1];t(y.jc),256>x.g?(S(_,_.u+x.g),T[k]=x.value,_=0):(S(_,_.u+x.g-256),t(256<=x.value),_=x.value),0==_&&(A=!0)}else _=be(y.G[0],y.H[0],u);if(u.h)break;if(A||256>_){if(!A)if(y.nd)n[h]=(y.qb|_<<8)>>>0;else{if(C(u),A=be(y.G[1],y.H[1],u),C(u),T=be(y.G[2],y.H[2],u),k=be(y.G[3],y.H[3],u),u.h)break;n[h]=(k<<24|A<<16|_<<8|T)>>>0}if(A=!1,++h,++c>=i&&(c=0,++l,null!=s&&l<=o&&!(l%16)&&s(e,l),null!=v))for(;f<h;)_=n[f++],v.X[(506832829*_&4294967295)>>>v.Mb]=_}else if(280>_){if(_=ge(_-256,u),T=be(y.G[4],y.H[4],u),C(u),T=ve(i,T=ge(T,u)),u.h)break;if(h-r<T||a-h<_)break e;for(k=0;k<_;++k)n[h+k]=n[h+k-T];for(h+=_,c+=_;c>=i;)c-=i,++l,null!=s&&l<=o&&!(l%16)&&s(e,l);if(t(h<=a),c&b&&(y=Ae(d,c,l)),null!=v)for(;f<h;)_=n[f++],v.X[(506832829*_&4294967295)>>>v.Mb]=_}else{if(!(_<m))break e;for(A=_-280,t(null!=v);f<h;)_=n[f++],v.X[(506832829*_&4294967295)>>>v.Mb]=_;_=h,t(!(A>>>(T=v).Xa)),n[_]=T.X[A],A=!0}A||t(u.h==E(u))}if(e.Pb&&u.h&&h<a)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&N(e.s.vb,e.s.Wa);else{if(u.h)break e;null!=s&&s(e,l>o?o:l),e.a=0,e.$=h-r}return 1}return e.a=3,0}function ke(e){t(null!=e),e.vc=null,e.yc=null,e.Ya=null;var n=e.Wa;null!=n&&(n.X=null),e.vb=null,t(null!=e)}function xe(){var t=new sn;return null==t?null:(t.a=0,t.xb=mi,ne("Predictor","VP8LPredictors"),ne("Predictor","VP8LPredictors_C"),ne("PredictorAdd","VP8LPredictorsAdd"),ne("PredictorAdd","VP8LPredictorsAdd_C"),Yn=q,Zn=K,er=Q,tr=$,nr=J,rr=Z,ir=ee,e.VP8LMapColor32b=Xn,e.VP8LMapColor8b=$n,t)}function Oe(e,n,r,s,l){var c=1,h=[e],p=[n],m=s.m,g=s.s,v=null,b=0;e:for(;;){if(r)for(;c&&y(m,1);){var A=h,_=p,E=s,T=1,k=E.m,x=E.gc[E.ab],O=y(k,2);if(E.Oc&1<<O)c=0;else{switch(E.Oc|=1<<O,x.hc=O,x.Ea=A[0],x.nc=_[0],x.K=[null],++E.ab,t(4>=E.ab),O){case 0:case 1:x.b=y(k,3)+2,T=Oe(B(x.Ea,x.b),B(x.nc,x.b),0,E,x.K),x.K=x.K[0];break;case 3:var I,M=y(k,8)+1,P=16<M?0:4<M?1:2<M?2:3;if(A[0]=B(x.Ea,P),x.b=P,I=T=Oe(M,1,0,E,x.K)){var N,L=M,R=x,F=1<<(8>>R.b),U=a(F);if(null==U)I=0;else{var H=R.K[0],z=R.w;for(U[0]=R.K[0][0],N=1;N<1*L;++N)U[N]=j(H[z+N],U[N-1]);for(;N<4*F;++N)U[N]=0;R.K[0]=null,R.K[0]=U,I=1}}T=I;break;case 2:break;default:t(0)}c=T}}if(h=h[0],p=p[0],c&&y(m,1)&&!(c=1<=(b=y(m,4))&&11>=b)){s.a=3;break e}var V;if(V=c)t:{var W,G,q,Y=s,K=h,X=p,Q=b,$=r,J=Y.m,Z=Y.s,ee=[null],te=1,ne=0,re=Zr[Q];n:for(;;){if($&&y(J,1)){var ie=y(J,3)+2,ae=B(K,ie),oe=B(X,ie),se=ae*oe;if(!Oe(ae,oe,0,Y,ee))break n;for(ee=ee[0],Z.xc=ie,W=0;W<se;++W){var le=ee[W]>>8&65535;ee[W]=le,le>=te&&(te=le+1)}}if(J.h)break n;for(G=0;5>G;++G){var ce=Xr[G];!G&&0<Q&&(ce+=1<<Q),ne<ce&&(ne=ce)}var ue=o(te*re,d),de=te,he=o(de,f);if(null==he)var fe=null;else t(65536>=de),fe=he;var pe=a(ne);if(null==fe||null==pe||null==ue){Y.a=1;break n}var me=ue;for(W=q=0;W<te;++W){var ge=fe[W],ve=ge.G,be=ge.H,Ae=0,_e=1,we=0;for(G=0;5>G;++G){ce=Xr[G],ve[G]=me,be[G]=q,!G&&0<Q&&(ce+=1<<Q);r:{var Ee,Se=ce,Ce=Y,xe=pe,Ie=me,Me=q,Pe=0,De=Ce.m,Ne=y(De,1);if(i(xe,0,0,Se),Ne){var Le=y(De,1)+1,Re=y(De,1),Be=y(De,0==Re?1:8);xe[Be]=1,2==Le&&(xe[Be=y(De,8)]=1);var je=1}else{var Fe=a(19),Ue=y(De,4)+4;if(19<Ue){Ce.a=3;var He=0;break r}for(Ee=0;Ee<Ue;++Ee)Fe[$r[Ee]]=y(De,3);var ze=void 0,Ve=void 0,We=Ce,Ge=Fe,qe=Se,Ye=xe,Ke=0,Xe=We.m,Qe=8,$e=o(128,d);i:for(;u($e,0,7,Ge,19);){if(y(Xe,1)){var Je=2+2*y(Xe,3);if((ze=2+y(Xe,Je))>qe)break i}else ze=qe;for(Ve=0;Ve<qe&&ze--;){C(Xe);var Ze=$e[0+(127&w(Xe))];S(Xe,Xe.u+Ze.g);var et=Ze.value;if(16>et)Ye[Ve++]=et,0!=et&&(Qe=et);else{var tt=16==et,nt=et-16,rt=Kr[nt],it=y(Xe,Yr[nt])+rt;if(Ve+it>qe)break i;for(var at=tt?Qe:0;0<it--;)Ye[Ve++]=at}}Ke=1;break i}Ke||(We.a=3),je=Ke}(je=je&&!De.h)&&(Pe=u(Ie,Me,8,xe,Se)),je&&0!=Pe?He=Pe:(Ce.a=3,He=0)}if(0==He)break n;if(_e&&1==Qr[G]&&(_e=0==me[q].g),Ae+=me[q].g,q+=He,3>=G){var ot,st=pe[0];for(ot=1;ot<ce;++ot)pe[ot]>st&&(st=pe[ot]);we+=st}}if(ge.nd=_e,ge.Qb=0,_e&&(ge.qb=(ve[3][be[3]+0].value<<24|ve[1][be[1]+0].value<<16|ve[2][be[2]+0].value)>>>0,0==Ae&&256>ve[0][be[0]+0].value&&(ge.Qb=1,ge.qb+=ve[0][be[0]+0].value<<8)),ge.jc=!ge.Qb&&6>we,ge.jc){var lt,ct=ge;for(lt=0;lt<Fn;++lt){var ut=lt,dt=ct.pd[ut],ht=ct.G[0][ct.H[0]+ut];256<=ht.value?(dt.g=ht.g+256,dt.value=ht.value):(dt.g=0,dt.value=0,ut>>=ye(ht,8,dt),ut>>=ye(ct.G[1][ct.H[1]+ut],16,dt),ut>>=ye(ct.G[2][ct.H[2]+ut],0,dt),ye(ct.G[3][ct.H[3]+ut],24,dt))}}}Z.vc=ee,Z.Wb=te,Z.Ya=fe,Z.yc=ue,V=1;break t}V=0}if(!(c=V)){s.a=3;break e}if(0<b){if(g.ua=1<<b,!D(g.Wa,b)){s.a=1,c=0;break e}}else g.ua=0;var ft=s,pt=h,mt=p,gt=ft.s,vt=gt.xc;if(ft.c=pt,ft.i=mt,gt.md=B(pt,vt),gt.wc=0==vt?-1:(1<<vt)-1,r){s.xb=pi;break e}if(null==(v=a(h*p))){s.a=1,c=0;break e}c=(c=Te(s,v,0,h,p,p,null))&&!m.h;break e}return c?(null!=l?l[0]=v:(t(null==v),t(r)),s.$=0,r||ke(g)):ke(g),c}function Ie(e,n){var r=e.c*e.i,i=r+n+16*n;return t(e.c<=n),e.V=a(i),null==e.V?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+r+n,1)}function Me(e,n){var r=e.C,i=n-r,a=e.V,o=e.Ba+e.c*r;for(t(n<=e.l.o);0<i;){var s=16<i?16:i,l=e.l.ma,c=e.l.width,u=c*s,d=l.ca,h=l.tb+c*r,f=e.Ta,p=e.Ua;_e(e,s,a,o),Tr(f,p,d,h,u),Se(l,r,r+s,d,h,c),i-=s,a+=s*e.c,r+=s}t(r==n),e.C=e.Ma=n}function Pe(){this.ub=this.yd=this.td=this.Rb=0}function De(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ne(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Le(){this.Yb=function(){var e=[];return function e(t,n,r){for(var i=r[n],a=0;a<i&&(t.push(r.length>n+1?[]:0),!(r.length<n+1));a++)e(t[a],n+1,r)}(e,0,[3,11]),e}()}function Re(){this.jb=a(3),this.Wc=s([4,8],Le),this.Xc=s([4,17],Le)}function Be(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function je(){this.ld=this.La=this.dd=this.tc=0}function Fe(){this.Na=this.la=0}function Ue(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function He(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ze(){this.uc=this.M=this.Nb=0,this.wa=Array(new je),this.Y=0,this.ya=Array(new He),this.aa=0,this.l=new qe}function Ve(){this.y=a(16),this.f=a(8),this.ea=a(8)}function We(){this.cb=this.a=0,this.sc="",this.m=new A,this.Od=new Pe,this.Kc=new De,this.ed=new Be,this.Qa=new Ne,this.Ic=this.$c=this.Aa=0,this.D=new ze,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,A),this.ia=0,this.pb=o(4,Ue),this.Pa=new Re,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ve),this.Hd=0,this.rb=Array(new Fe),this.sb=0,this.wa=Array(new je),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new He),this.L=this.aa=0,this.gd=s([4,2],je),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Ge(e,t){return 0>e?0:e>t?t:e}function qe(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Ye(){var e=new We;return null!=e&&(e.a=0,e.sc="OK",e.cb=0,e.Xb=0,ri||(ri=$e)),e}function Ke(e,t,n){return 0==e.a&&(e.a=t,e.sc=n,e.cb=0),0}function Xe(e,t,n){return 3<=n&&157==e[t+0]&&1==e[t+1]&&42==e[t+2]}function Qe(e,n){if(null==e)return 0;if(e.a=0,e.sc="OK",null==n)return Ke(e,2,"null VP8Io passed to VP8GetHeaders()");var r=n.data,a=n.w,o=n.ha;if(4>o)return Ke(e,7,"Truncated header.");var s=r[a+0]|r[a+1]<<8|r[a+2]<<16,l=e.Od;if(l.Rb=!(1&s),l.td=s>>1&7,l.yd=s>>4&1,l.ub=s>>5,3<l.td)return Ke(e,3,"Incorrect keyframe parameters.");if(!l.yd)return Ke(e,4,"Frame not displayable.");a+=3,o-=3;var c=e.Kc;if(l.Rb){if(7>o)return Ke(e,7,"cannot parse picture header");if(!Xe(r,a,o))return Ke(e,3,"Bad code word");c.c=16383&(r[a+4]<<8|r[a+3]),c.Td=r[a+4]>>6,c.i=16383&(r[a+6]<<8|r[a+5]),c.Ud=r[a+6]>>6,a+=7,o-=7,e.za=c.c+15>>4,e.Ub=c.i+15>>4,n.width=c.c,n.height=c.i,n.Da=0,n.j=0,n.v=0,n.va=n.width,n.o=n.height,n.da=0,n.ib=n.width,n.hb=n.height,n.U=n.width,n.T=n.height,i((s=e.Pa).jb,0,255,s.jb.length),t(null!=(s=e.Qa)),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(l.ub>o)return Ke(e,7,"bad partition length");p(s=e.m,r,a,l.ub),a+=l.ub,o-=l.ub,l.Rb&&(c.Ld=k(s),c.Kd=k(s)),c=e.Qa;var u,d=e.Pa;if(t(null!=s),t(null!=c),c.Cb=k(s),c.Cb){if(c.Bb=k(s),k(s)){for(c.Fb=k(s),u=0;4>u;++u)c.Zb[u]=k(s)?g(s,7):0;for(u=0;4>u;++u)c.Lb[u]=k(s)?g(s,6):0}if(c.Bb)for(u=0;3>u;++u)d.jb[u]=k(s)?m(s,8):255}else c.Bb=0;if(s.Ka)return Ke(e,3,"cannot parse segment header");if((c=e.ed).zd=k(s),c.Tb=m(s,6),c.wb=m(s,3),c.Pc=k(s),c.Pc&&k(s)){for(d=0;4>d;++d)k(s)&&(c.vd[d]=g(s,6));for(d=0;4>d;++d)k(s)&&(c.od[d]=g(s,6))}if(e.L=0==c.Tb?0:c.zd?1:2,s.Ka)return Ke(e,3,"cannot parse filter header");var h=o;if(o=u=a,a=u+h,c=h,e.Xb=(1<<m(e.m,2))-1,h<3*(d=e.Xb))r=7;else{for(u+=3*d,c-=3*d,h=0;h<d;++h){var f=r[o+0]|r[o+1]<<8|r[o+2]<<16;f>c&&(f=c),p(e.Jc[+h],r,u,f),u+=f,c-=f,o+=3}p(e.Jc[+d],r,u,c),r=u<a?0:5}if(0!=r)return Ke(e,r,"cannot parse partitions");for(r=m(u=e.m,7),o=k(u)?g(u,4):0,a=k(u)?g(u,4):0,c=k(u)?g(u,4):0,d=k(u)?g(u,4):0,u=k(u)?g(u,4):0,h=e.Qa,f=0;4>f;++f){if(h.Cb){var v=h.Zb[f];h.Fb||(v+=r)}else{if(0<f){e.pb[f]=e.pb[0];continue}v=r}var b=e.pb[f];b.Sc[0]=ti[Ge(v+o,127)],b.Sc[1]=ni[Ge(v+0,127)],b.Eb[0]=2*ti[Ge(v+a,127)],b.Eb[1]=101581*ni[Ge(v+c,127)]>>16,8>b.Eb[1]&&(b.Eb[1]=8),b.Qc[0]=ti[Ge(v+d,117)],b.Qc[1]=ni[Ge(v+u,127)],b.lc=v+u}if(!l.Rb)return Ke(e,4,"Not a key frame.");for(k(s),l=e.Pa,r=0;4>r;++r){for(o=0;8>o;++o)for(a=0;3>a;++a)for(c=0;11>c;++c)d=x(s,ci[r][o][a][c])?m(s,8):si[r][o][a][c],l.Wc[r][o].Yb[a][c]=d;for(o=0;17>o;++o)l.Xc[r][o]=l.Wc[r][ui[o]]}return e.kc=k(s),e.kc&&(e.Bd=m(s,8)),e.cb=1}function $e(e,t,n,r,i,a,o){var s=t[i].Yb[n];for(n=0;16>i;++i){if(!x(e,s[n+0]))return i;for(;!x(e,s[n+1]);)if(s=t[++i].Yb[0],n=0,16==i)return 16;var l=t[i+1].Yb;if(x(e,s[n+2])){var c=e,u=0;if(x(c,(h=s)[(d=n)+3]))if(x(c,h[d+6])){for(s=0,d=2*(u=x(c,h[d+8]))+(h=x(c,h[d+9+u])),u=0,h=ii[d];h[s];++s)u+=u+x(c,h[s]);u+=3+(8<<d)}else x(c,h[d+7])?(u=7+2*x(c,165),u+=x(c,145)):u=5+x(c,159);else u=x(c,h[d+4])?3+x(c,h[d+5]):2;s=l[2]}else u=1,s=l[1];l=o+ai[i],0>(c=e).b&&T(c);var d,h=c.b,f=(d=c.Ca>>1)-(c.I>>h)>>31;--c.b,c.Ca+=f,c.Ca|=1,c.I-=(d+1&f)<<h,a[l]=((u^f)-f)*r[(0<i)+0]}return 16}function Je(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,i(e.zc,0,0,e.zc.length),e.ja=0}function Ze(e,n){if(null==e)return 0;if(null==n)return Ke(e,2,"NULL VP8Io parameter in VP8Decode().");if(!e.cb&&!Qe(e,n))return 0;if(t(e.cb),null==n.ac||n.ac(n)){n.ob&&(e.L=0);var s=Fi[e.L];if(2==e.L?(e.yb=0,e.zb=0):(e.yb=n.v-s>>4,e.zb=n.j-s>>4,0>e.yb&&(e.yb=0),0>e.zb&&(e.zb=0)),e.Va=n.o+15+s>>4,e.Hb=n.va+15+s>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0<e.L){var l=e.ed;for(s=0;4>s;++s){var c;if(e.Qa.Cb){var u=e.Qa.Lb[s];e.Qa.Fb||(u+=l.Tb)}else u=l.Tb;for(c=0;1>=c;++c){var d=e.gd[s][c],h=u;if(l.Pc&&(h+=l.vd[0],c&&(h+=l.od[0])),0<(h=0>h?0:63<h?63:h)){var f=h;0<l.wb&&(f=4<l.wb?f>>2:f>>1)>9-l.wb&&(f=9-l.wb),1>f&&(f=1),d.dd=f,d.tc=2*h+f,d.ld=40<=h?2:15<=h?1:0}else d.tc=0;d.La=c}}}s=0}else Ke(e,6,"Frame setup failed"),s=e.a;if(s=0==s){if(s){e.$c=0,0<e.Aa||(e.Ic=Hi);e:{s=e.Ic,l=4*(f=e.za);var p=32*f,m=f+1,g=0<e.L?f*(0<e.Aa?2:1):0,v=(2==e.Aa?2:1)*f;if((d=l+832+(c=3*(16*s+Fi[e.L])/2*p)+(u=null!=e.Fa&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=d)s=0;else{if(d>e.Vb){if(e.Vb=0,e.Ec=a(d),e.Fc=0,null==e.Ec){s=Ke(e,1,"no memory during frame initialization.");break e}e.Vb=d}d=e.Ec,h=e.Fc,e.Ac=d,e.Bc=h,h+=l,e.Gd=o(p,Ve),e.Hd=0,e.rb=o(m+1,Fe),e.sb=1,e.wa=g?o(g,je):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0<e.Aa&&(e.D.Y+=f),t(!0),e.oc=d,e.pc=h,h+=832,e.ya=o(v,He),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,2==e.Aa&&(e.D.aa+=f),e.R=16*f,e.B=8*f,f=(p=Fi[e.L])*e.R,p=p/2*e.B,e.sa=d,e.ta=h+f,e.qa=e.sa,e.ra=e.ta+16*s*e.R+p,e.Ha=e.qa,e.Ia=e.ra+8*s*e.B+p,e.$c=0,h+=c,e.mb=u?d:null,e.nb=u?h:null,t(h+u<=e.Fc+e.Vb),Je(e),i(e.Ac,e.Bc,0,l),s=1}}if(s){if(n.ka=0,n.y=e.sa,n.O=e.ta,n.f=e.qa,n.N=e.ra,n.ea=e.Ha,n.Vd=e.Ia,n.fa=e.R,n.Rc=e.B,n.F=null,n.J=0,!Mr){for(s=-255;255>=s;++s)kr[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)xr[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)Or[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)Ir[255+s]=0>s?0:255<s?255:s;Mr=1}ar=ct,or=at,lr=ot,cr=st,ur=lt,sr=it,dr=Kt,hr=Xt,fr=Jt,pr=Zt,mr=Qt,gr=$t,vr=en,br=tn,yr=zt,Ar=Vt,_r=Wt,wr=Gt,hi[0]=St,hi[1]=dt,hi[2]=wt,hi[3]=Et,hi[4]=Ct,hi[5]=kt,hi[6]=Tt,hi[7]=xt,hi[8]=It,hi[9]=Ot,di[0]=vt,di[1]=ft,di[2]=pt,di[3]=mt,di[4]=bt,di[5]=yt,di[6]=At,fi[0]=Nt,fi[1]=ht,fi[2]=Mt,fi[3]=Pt,fi[4]=Rt,fi[5]=Lt,fi[6]=Bt,s=1}else s=0}s&&(s=function(e,n){for(e.M=0;e.M<e.Va;++e.M){var o,s=e.Jc[e.M&e.Xb],l=e.m,c=e;for(o=0;o<c.za;++o){var u=l,d=c,h=d.Ac,f=d.Bc+4*o,p=d.zc,m=d.ya[d.aa+o];if(d.Qa.Bb?m.$b=x(u,d.Pa.jb[0])?2+x(u,d.Pa.jb[2]):x(u,d.Pa.jb[1]):m.$b=0,d.kc&&(m.Ad=x(u,d.Bd)),m.Za=!x(u,145)+0,m.Za){var g=m.Ob,v=0;for(d=0;4>d;++d){var b,y=p[0+d];for(b=0;4>b;++b){y=li[h[f+b]][y];for(var A=oi[x(u,y[0])];0<A;)A=oi[2*A+x(u,y[A])];y=-A,h[f+b]=y}r(g,v,h,f,4),v+=4,p[0+d]=y}}else y=x(u,156)?x(u,128)?1:3:x(u,163)?2:0,m.Ob[0]=y,i(h,f,y,4),i(p,0,y,4);m.Dd=x(u,142)?x(u,114)?x(u,183)?1:3:2:0}if(c.m.Ka)return Ke(e,7,"Premature end-of-partition0 encountered.");for(;e.ja<e.za;++e.ja){if(c=s,u=(l=e).rb[l.sb-1],h=l.rb[l.sb+l.ja],o=l.ya[l.aa+l.ja],f=l.kc?o.Ad:0)u.la=h.la=0,o.Za||(u.Na=h.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var _,w;if(u=h,h=c,f=l.Pa.Xc,p=l.ya[l.aa+l.ja],m=l.pb[p.$b],d=p.ad,g=0,v=l.rb[l.sb-1],y=b=0,i(d,g,0,384),p.Za)var E=0,S=f[3];else{A=a(16);var C=u.Na+v.Na;if(C=ri(h,f[1],C,m.Eb,0,A,0),u.Na=v.Na=(0<C)+0,1<C)ar(A,0,d,g);else{var T=A[0]+3>>3;for(A=0;256>A;A+=16)d[g+A]=T}E=1,S=f[0]}var k=15&u.la,O=15&v.la;for(A=0;4>A;++A){var I=1&O;for(T=w=0;4>T;++T)k=k>>1|(I=(C=ri(h,S,C=I+(1&k),m.Sc,E,d,g))>E)<<7,w=w<<2|(3<C?3:1<C?2:0!=d[g+0]),g+=16;k>>=4,O=O>>1|I<<7,b=(b<<8|w)>>>0}for(S=k,E=O>>4,_=0;4>_;_+=2){for(w=0,k=u.la>>4+_,O=v.la>>4+_,A=0;2>A;++A){for(I=1&O,T=0;2>T;++T)C=I+(1&k),k=k>>1|(I=0<(C=ri(h,f[2],C,m.Qc,0,d,g)))<<3,w=w<<2|(3<C?3:1<C?2:0!=d[g+0]),g+=16;k>>=2,O=O>>1|I<<5}y|=w<<4*_,S|=k<<4<<_,E|=(240&O)<<_}u.la=S,v.la=E,p.Hc=b,p.Gc=y,p.ia=43690&y?0:m.ia,f=!(b|y)}if(0<l.L&&(l.wa[l.Y+l.ja]=l.gd[o.$b][o.Za],l.wa[l.Y+l.ja].La|=!f),c.Ka)return Ke(e,7,"Premature end-of-file encountered.")}if(Je(e),l=n,c=1,o=(s=e).D,u=0<s.L&&s.M>=s.zb&&s.M<=s.Va,0==s.Aa)e:{if(o.M=s.M,o.uc=u,Nn(s,o),c=1,o=(w=s.D).Nb,u=(y=Fi[s.L])*s.R,h=y/2*s.B,A=16*o*s.R,T=8*o*s.B,f=s.sa,p=s.ta-u+A,m=s.qa,d=s.ra-h+T,g=s.Ha,v=s.Ia-h+T,O=0==(k=w.M),b=k>=s.Va-1,2==s.Aa&&Nn(s,w),w.uc)for(I=(C=s).D.M,t(C.D.uc),w=C.yb;w<C.Hb;++w){E=w,S=I;var M=(P=(H=C).D).Nb;_=H.R;var P=P.wa[P.Y+E],D=H.sa,N=H.ta+16*M*_+16*E,L=P.dd,R=P.tc;if(0!=R)if(t(3<=R),1==H.L)0<E&&Ar(D,N,_,R+4),P.La&&wr(D,N,_,R),0<S&&yr(D,N,_,R+4),P.La&&_r(D,N,_,R);else{var B=H.B,j=H.qa,F=H.ra+8*M*B+8*E,U=H.Ha,H=H.Ia+8*M*B+8*E;M=P.ld,0<E&&(hr(D,N,_,R+4,L,M),pr(j,F,U,H,B,R+4,L,M)),P.La&&(gr(D,N,_,R,L,M),br(j,F,U,H,B,R,L,M)),0<S&&(dr(D,N,_,R+4,L,M),fr(j,F,U,H,B,R+4,L,M)),P.La&&(mr(D,N,_,R,L,M),vr(j,F,U,H,B,R,L,M))}}if(s.ia&&alert("todo:DitherRow"),null!=l.put){if(w=16*k,k=16*(k+1),O?(l.y=s.sa,l.O=s.ta+A,l.f=s.qa,l.N=s.ra+T,l.ea=s.Ha,l.W=s.Ia+T):(w-=y,l.y=f,l.O=p,l.f=m,l.N=d,l.ea=g,l.W=v),b||(k-=y),k>l.o&&(k=l.o),l.F=null,l.J=null,null!=s.Fa&&0<s.Fa.length&&w<k&&(l.J=hn(s,l,w,k-w),l.F=s.mb,null==l.F&&0==l.F.length)){c=Ke(s,3,"Could not decode alpha data.");break e}w<l.j&&(y=l.j-w,w=l.j,t(!(1&y)),l.O+=s.R*y,l.N+=s.B*(y>>1),l.W+=s.B*(y>>1),null!=l.F&&(l.J+=l.width*y)),w<k&&(l.O+=l.v,l.N+=l.v>>1,l.W+=l.v>>1,null!=l.F&&(l.J+=l.v),l.ka=w-l.j,l.U=l.va-l.v,l.T=k-w,c=l.put(l))}o+1!=s.Ic||b||(r(s.sa,s.ta-u,f,p+16*s.R,u),r(s.qa,s.ra-h,m,d+8*s.B,h),r(s.Ha,s.Ia-h,g,v+8*s.B,h))}if(!c)return Ke(e,6,"Output aborted.")}return 1}(e,n)),null!=n.bc&&n.bc(n),s&=1}return s?(e.cb=0,s):0}function et(e,t,n,r,i){i=e[t+n+32*r]+(i>>3),e[t+n+32*r]=-256&i?0>i?0:255:i}function tt(e,t,n,r,i,a){et(e,t,0,n,r+i),et(e,t,1,n,r+a),et(e,t,2,n,r-a),et(e,t,3,n,r-i)}function nt(e){return(20091*e>>16)+e}function rt(e,t,n,r){var i,o=0,s=a(16);for(i=0;4>i;++i){var l=e[t+0]+e[t+8],c=e[t+0]-e[t+8],u=(35468*e[t+4]>>16)-nt(e[t+12]),d=nt(e[t+4])+(35468*e[t+12]>>16);s[o+0]=l+d,s[o+1]=c+u,s[o+2]=c-u,s[o+3]=l-d,o+=4,t++}for(i=o=0;4>i;++i)l=(e=s[o+0]+4)+s[o+8],c=e-s[o+8],u=(35468*s[o+4]>>16)-nt(s[o+12]),et(n,r,0,0,l+(d=nt(s[o+4])+(35468*s[o+12]>>16))),et(n,r,1,0,c+u),et(n,r,2,0,c-u),et(n,r,3,0,l-d),o++,r+=32}function it(e,t,n,r){var i=e[t+0]+4,a=35468*e[t+4]>>16,o=nt(e[t+4]),s=35468*e[t+1]>>16;tt(n,r,0,i+o,e=nt(e[t+1]),s),tt(n,r,1,i+a,e,s),tt(n,r,2,i-a,e,s),tt(n,r,3,i-o,e,s)}function at(e,t,n,r,i){rt(e,t,n,r),i&&rt(e,t+16,n,r+4)}function ot(e,t,n,r){or(e,t+0,n,r,1),or(e,t+32,n,r+128,1)}function st(e,t,n,r){var i;for(e=e[t+0]+4,i=0;4>i;++i)for(t=0;4>t;++t)et(n,r,t,i,e)}function lt(e,t,n,r){e[t+0]&&cr(e,t+0,n,r),e[t+16]&&cr(e,t+16,n,r+4),e[t+32]&&cr(e,t+32,n,r+128),e[t+48]&&cr(e,t+48,n,r+128+4)}function ct(e,t,n,r){var i,o=a(16);for(i=0;4>i;++i){var s=e[t+0+i]+e[t+12+i],l=e[t+4+i]+e[t+8+i],c=e[t+4+i]-e[t+8+i],u=e[t+0+i]-e[t+12+i];o[0+i]=s+l,o[8+i]=s-l,o[4+i]=u+c,o[12+i]=u-c}for(i=0;4>i;++i)s=(e=o[0+4*i]+3)+o[3+4*i],l=o[1+4*i]+o[2+4*i],c=o[1+4*i]-o[2+4*i],u=e-o[3+4*i],n[r+0]=s+l>>3,n[r+16]=u+c>>3,n[r+32]=s-l>>3,n[r+48]=u-c>>3,r+=64}function ut(e,t,n){var r,i=t-32,a=Nr,o=255-e[i-1];for(r=0;r<n;++r){var s,l=a,c=o+e[t-1];for(s=0;s<n;++s)e[t+s]=l[c+e[i+s]];t+=32}}function dt(e,t){ut(e,t,4)}function ht(e,t){ut(e,t,8)}function ft(e,t){ut(e,t,16)}function pt(e,t){var n;for(n=0;16>n;++n)r(e,t+32*n,e,t-32,16)}function mt(e,t){var n;for(n=16;0<n;--n)i(e,t,e[t-1],16),t+=32}function gt(e,t,n){var r;for(r=0;16>r;++r)i(t,n+32*r,e,16)}function vt(e,t){var n,r=16;for(n=0;16>n;++n)r+=e[t-1+32*n]+e[t+n-32];gt(r>>5,e,t)}function bt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t-1+32*n];gt(r>>4,e,t)}function yt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t+n-32];gt(r>>4,e,t)}function At(e,t){gt(128,e,t)}function _t(e,t,n){return e+2*t+n+2>>2}function wt(e,t){var n,i=t-32;for(i=new Uint8Array([_t(e[i-1],e[i+0],e[i+1]),_t(e[i+0],e[i+1],e[i+2]),_t(e[i+1],e[i+2],e[i+3]),_t(e[i+2],e[i+3],e[i+4])]),n=0;4>n;++n)r(e,t+32*n,i,0,i.length)}function Et(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];O(e,t+0,16843009*_t(e[t-1-32],n,r)),O(e,t+32,16843009*_t(n,r,i)),O(e,t+64,16843009*_t(r,i,a)),O(e,t+96,16843009*_t(i,a,a))}function St(e,t){var n,r=4;for(n=0;4>n;++n)r+=e[t+n-32]+e[t-1+32*n];for(r>>=3,n=0;4>n;++n)i(e,t+32*n,r,4)}function Ct(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],l=e[t+2-32],c=e[t+3-32];e[t+0+96]=_t(r,i,e[t-1+96]),e[t+1+96]=e[t+0+64]=_t(n,r,i),e[t+2+96]=e[t+1+64]=e[t+0+32]=_t(a,n,r),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=_t(o,a,n),e[t+3+64]=e[t+2+32]=e[t+1+0]=_t(s,o,a),e[t+3+32]=e[t+2+0]=_t(l,s,o),e[t+3+0]=_t(c,l,s)}function Tt(e,t){var n=e[t+1-32],r=e[t+2-32],i=e[t+3-32],a=e[t+4-32],o=e[t+5-32],s=e[t+6-32],l=e[t+7-32];e[t+0+0]=_t(e[t+0-32],n,r),e[t+1+0]=e[t+0+32]=_t(n,r,i),e[t+2+0]=e[t+1+32]=e[t+0+64]=_t(r,i,a),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=_t(i,a,o),e[t+3+32]=e[t+2+64]=e[t+1+96]=_t(a,o,s),e[t+3+64]=e[t+2+96]=_t(o,s,l),e[t+3+96]=_t(s,l,l)}function kt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],l=e[t+2-32],c=e[t+3-32];e[t+0+0]=e[t+1+64]=a+o+1>>1,e[t+1+0]=e[t+2+64]=o+s+1>>1,e[t+2+0]=e[t+3+64]=s+l+1>>1,e[t+3+0]=l+c+1>>1,e[t+0+96]=_t(i,r,n),e[t+0+64]=_t(r,n,a),e[t+0+32]=e[t+1+96]=_t(n,a,o),e[t+1+32]=e[t+2+96]=_t(a,o,s),e[t+2+32]=e[t+3+96]=_t(o,s,l),e[t+3+32]=_t(s,l,c)}function xt(e,t){var n=e[t+0-32],r=e[t+1-32],i=e[t+2-32],a=e[t+3-32],o=e[t+4-32],s=e[t+5-32],l=e[t+6-32],c=e[t+7-32];e[t+0+0]=n+r+1>>1,e[t+1+0]=e[t+0+64]=r+i+1>>1,e[t+2+0]=e[t+1+64]=i+a+1>>1,e[t+3+0]=e[t+2+64]=a+o+1>>1,e[t+0+32]=_t(n,r,i),e[t+1+32]=e[t+0+96]=_t(r,i,a),e[t+2+32]=e[t+1+96]=_t(i,a,o),e[t+3+32]=e[t+2+96]=_t(a,o,s),e[t+3+64]=_t(o,s,l),e[t+3+96]=_t(s,l,c)}function Ot(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];e[t+0+0]=n+r+1>>1,e[t+2+0]=e[t+0+32]=r+i+1>>1,e[t+2+32]=e[t+0+64]=i+a+1>>1,e[t+1+0]=_t(n,r,i),e[t+3+0]=e[t+1+32]=_t(r,i,a),e[t+3+32]=e[t+1+64]=_t(i,a,a),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=a}function It(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96],o=e[t-1-32],s=e[t+0-32],l=e[t+1-32],c=e[t+2-32];e[t+0+0]=e[t+2+32]=n+o+1>>1,e[t+0+32]=e[t+2+64]=r+n+1>>1,e[t+0+64]=e[t+2+96]=i+r+1>>1,e[t+0+96]=a+i+1>>1,e[t+3+0]=_t(s,l,c),e[t+2+0]=_t(o,s,l),e[t+1+0]=e[t+3+32]=_t(n,o,s),e[t+1+32]=e[t+3+64]=_t(r,n,o),e[t+1+64]=e[t+3+96]=_t(i,r,n),e[t+1+96]=_t(a,i,r)}function Mt(e,t){var n;for(n=0;8>n;++n)r(e,t+32*n,e,t-32,8)}function Pt(e,t){var n;for(n=0;8>n;++n)i(e,t,e[t-1],8),t+=32}function Dt(e,t,n){var r;for(r=0;8>r;++r)i(t,n+32*r,e,8)}function Nt(e,t){var n,r=8;for(n=0;8>n;++n)r+=e[t+n-32]+e[t-1+32*n];Dt(r>>4,e,t)}function Lt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t+n-32];Dt(r>>3,e,t)}function Rt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t-1+32*n];Dt(r>>3,e,t)}function Bt(e,t){Dt(128,e,t)}function jt(e,t,n){var r=e[t-n],i=e[t+0],a=3*(i-r)+Pr[1020+e[t-2*n]-e[t+n]],o=Dr[112+(a+4>>3)];e[t-n]=Nr[255+r+Dr[112+(a+3>>3)]],e[t+0]=Nr[255+i-o]}function Ft(e,t,n,r){var i=e[t+0],a=e[t+n];return Lr[255+e[t-2*n]-e[t-n]]>r||Lr[255+a-i]>r}function Ut(e,t,n,r){return 4*Lr[255+e[t-n]-e[t+0]]+Lr[255+e[t-2*n]-e[t+n]]<=r}function Ht(e,t,n,r,i){var a=e[t-3*n],o=e[t-2*n],s=e[t-n],l=e[t+0],c=e[t+n],u=e[t+2*n],d=e[t+3*n];return 4*Lr[255+s-l]+Lr[255+o-c]>r?0:Lr[255+e[t-4*n]-a]<=i&&Lr[255+a-o]<=i&&Lr[255+o-s]<=i&&Lr[255+d-u]<=i&&Lr[255+u-c]<=i&&Lr[255+c-l]<=i}function zt(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Ut(e,t+r,n,i)&&jt(e,t+r,n)}function Vt(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Ut(e,t+r*n,1,i)&&jt(e,t+r*n,1)}function Wt(e,t,n,r){var i;for(i=3;0<i;--i)zt(e,t+=4*n,n,r)}function Gt(e,t,n,r){var i;for(i=3;0<i;--i)Vt(e,t+=4,n,r)}function qt(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Ht(e,t,n,a,o))if(Ft(e,t,n,s))jt(e,t,n);else{var l=e,c=t,u=n,d=l[c-2*u],h=l[c-u],f=l[c+0],p=l[c+u],m=l[c+2*u],g=27*(b=Pr[1020+3*(f-h)+Pr[1020+d-p]])+63>>7,v=18*b+63>>7,b=9*b+63>>7;l[c-3*u]=Nr[255+l[c-3*u]+b],l[c-2*u]=Nr[255+d+v],l[c-u]=Nr[255+h+g],l[c+0]=Nr[255+f-g],l[c+u]=Nr[255+p-v],l[c+2*u]=Nr[255+m-b]}t+=r}}function Yt(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Ht(e,t,n,a,o))if(Ft(e,t,n,s))jt(e,t,n);else{var l=e,c=t,u=n,d=l[c-u],h=l[c+0],f=l[c+u],p=Dr[112+(4+(m=3*(h-d))>>3)],m=Dr[112+(m+3>>3)],g=p+1>>1;l[c-2*u]=Nr[255+l[c-2*u]+g],l[c-u]=Nr[255+d+m],l[c+0]=Nr[255+h-p],l[c+u]=Nr[255+f-g]}t+=r}}function Kt(e,t,n,r,i,a){qt(e,t,n,1,16,r,i,a)}function Xt(e,t,n,r,i,a){qt(e,t,1,n,16,r,i,a)}function Qt(e,t,n,r,i,a){var o;for(o=3;0<o;--o)Yt(e,t+=4*n,n,1,16,r,i,a)}function $t(e,t,n,r,i,a){var o;for(o=3;0<o;--o)Yt(e,t+=4,1,n,16,r,i,a)}function Jt(e,t,n,r,i,a,o,s){qt(e,t,i,1,8,a,o,s),qt(n,r,i,1,8,a,o,s)}function Zt(e,t,n,r,i,a,o,s){qt(e,t,1,i,8,a,o,s),qt(n,r,1,i,8,a,o,s)}function en(e,t,n,r,i,a,o,s){Yt(e,t+4*i,i,1,8,a,o,s),Yt(n,r+4*i,i,1,8,a,o,s)}function tn(e,t,n,r,i,a,o,s){Yt(e,t+4,1,i,8,a,o,s),Yt(n,r+4,1,i,8,a,o,s)}function nn(){this.ba=new oe,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new le,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function rn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function an(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function on(){this.ua=0,this.Wa=new L,this.vb=new L,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new f,this.yc=new d}function sn(){this.xb=this.a=0,this.l=new qe,this.ca=new oe,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new _,this.Pb=0,this.wd=new _,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new on,this.ab=0,this.gc=o(4,an),this.Oc=0}function ln(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new qe,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function cn(e,t,n,r,i,a,o){for(e=null==e?0:e[t+0],t=0;t<o;++t)i[a+t]=e+n[r+t]&255,e=i[a+t]}function un(e,t,n,r,i,a,o){var s;if(null==e)cn(null,null,n,r,i,a,o);else for(s=0;s<o;++s)i[a+s]=e[t+s]+n[r+s]&255}function dn(e,t,n,r,i,a,o){if(null==e)cn(null,null,n,r,i,a,o);else{var s,l=e[t+0],c=l,u=l;for(s=0;s<o;++s)c=u+(l=e[t+s])-c,u=n[r+s]+(-256&c?0>c?0:255:c)&255,c=l,i[a+s]=u}}function hn(e,n,i,o){var s=n.width,l=n.o;if(t(null!=e&&null!=n),0>i||0>=o||i+o>l)return null;if(!e.Cc){if(null==e.ga){var c;if(e.ga=new ln,(c=null==e.ga)||(c=n.width*n.o,t(0==e.Gb.length),e.Gb=a(c),e.Uc=0,null==e.Gb?c=0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,c=1),c=!c),!c){c=e.ga;var u=e.Fa,d=e.P,h=e.qc,f=e.mb,p=e.nb,m=d+1,g=h-1,b=c.l;if(t(null!=u&&null!=f&&null!=n),gi[0]=null,gi[1]=cn,gi[2]=un,gi[3]=dn,c.ca=f,c.tb=p,c.c=n.width,c.i=n.height,t(0<c.c&&0<c.i),1>=h)n=0;else if(c.$a=u[d+0]>>0&3,c.Z=u[d+0]>>2&3,c.Lc=u[d+0]>>4&3,d=u[d+0]>>6&3,0>c.$a||1<c.$a||4<=c.Z||1<c.Lc||d)n=0;else if(b.put=fe,b.ac=he,b.bc=pe,b.ma=c,b.width=n.width,b.height=n.height,b.Da=n.Da,b.v=n.v,b.va=n.va,b.j=n.j,b.o=n.o,c.$a)e:{t(1==c.$a),n=xe();t:for(;;){if(null==n){n=0;break e}if(t(null!=c),c.mc=n,n.c=c.c,n.i=c.i,n.l=c.l,n.l.ma=c,n.l.width=c.c,n.l.height=c.i,n.a=0,v(n.m,u,m,g),!Oe(c.c,c.i,1,n,null))break t;if(1==n.ab&&3==n.gc[0].hc&&Ee(n.s)?(c.ic=1,u=n.c*n.i,n.Ta=null,n.Ua=0,n.V=a(u),n.Ba=0,null==n.V?(n.a=1,n=0):n=1):(c.ic=0,n=Ie(n,c.c)),!n)break t;n=1;break e}c.mc=null,n=0}else n=g>=c.c*c.i;c=!n}if(c)return null;1!=e.ga.Lc?e.Ga=0:o=l-i}t(null!=e.ga),t(i+o<=l);e:{if(n=(u=e.ga).c,l=u.l.o,0==u.$a){if(m=e.rc,g=e.Vc,b=e.Fa,d=e.P+1+i*n,h=e.mb,f=e.nb+i*n,t(d<=e.P+e.qc),0!=u.Z)for(t(null!=gi[u.Z]),c=0;c<o;++c)gi[u.Z](m,g,b,d,h,f,n),m=h,g=f,f+=n,d+=n;else for(c=0;c<o;++c)r(h,f,b,d,n),m=h,g=f,f+=n,d+=n;e.rc=m,e.Vc=g}else{if(t(null!=u.mc),n=i+o,t(null!=(c=u.mc)),t(n<=c.i),c.C>=n)n=1;else if(u.ic||vn(),u.ic){u=c.V,m=c.Ba,g=c.c;var y=c.i,A=(b=1,d=c.$/g,h=c.$%g,f=c.m,p=c.s,c.$),_=g*y,w=g*n,S=p.wc,T=A<w?Ae(p,h,d):null;t(A<=_),t(n<=y),t(Ee(p));t:for(;;){for(;!f.h&&A<w;){if(h&S||(T=Ae(p,h,d)),t(null!=T),C(f),256>(y=be(T.G[0],T.H[0],f)))u[m+A]=y,++A,++h>=g&&(h=0,++d<=n&&!(d%16)&&Ce(c,d));else{if(!(280>y)){b=0;break t}y=ge(y-256,f);var k,x=be(T.G[4],T.H[4],f);if(C(f),!(A>=(x=ve(g,x=ge(x,f)))&&_-A>=y)){b=0;break t}for(k=0;k<y;++k)u[m+A+k]=u[m+A+k-x];for(A+=y,h+=y;h>=g;)h-=g,++d<=n&&!(d%16)&&Ce(c,d);A<w&&h&S&&(T=Ae(p,h,d))}t(f.h==E(f))}Ce(c,d>n?n:d);break t}!b||f.h&&A<_?(b=0,c.a=f.h?5:3):c.$=A,n=b}else n=Te(c,c.V,c.Ba,c.c,c.i,n,Me);if(!n){o=0;break e}}i+o>=l&&(e.Cc=1),o=1}if(!o)return null;if(e.Cc&&(null!=(o=e.ga)&&(o.mc=null),e.ga=null,0<e.Ga))return alert("todo:WebPDequantizeLevels"),null}return e.nb+i*s}function fn(e,t,n,r,i,a){for(;0<i--;){var o,s=e,l=t+(n?1:0),c=e,u=t+(n?0:3);for(o=0;o<r;++o){var d=c[u+4*o];255!=d&&(d*=32897,s[l+4*o+0]=s[l+4*o+0]*d>>23,s[l+4*o+1]=s[l+4*o+1]*d>>23,s[l+4*o+2]=s[l+4*o+2]*d>>23)}t+=a}}function pn(e,t,n,r,i){for(;0<r--;){var a;for(a=0;a<n;++a){var o=e[t+2*a+0],s=15&(c=e[t+2*a+1]),l=4369*s,c=(240&c|c>>4)*l>>16;e[t+2*a+0]=(240&o|o>>4)*l>>16&240|(15&o|o<<4)*l>>16>>4&15,e[t+2*a+1]=240&c|s}t+=i}}function mn(e,t,n,r,i,a,o,s){var l,c,u=255;for(c=0;c<i;++c){for(l=0;l<r;++l){var d=e[t+l];a[o+4*l]=d,u&=d}t+=n,o+=s}return 255!=u}function gn(e,t,n,r,i){var a;for(a=0;a<i;++a)n[r+a]=e[t+a]>>8}function vn(){Er=fn,Sr=pn,Cr=mn,Tr=gn}function bn(n,r,i){e[n]=function(e,n,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y){var A,_=y-1>>1,w=s[l+0]|c[u+0]<<16,E=d[h+0]|f[p+0]<<16;t(null!=e);var S=3*w+E+131074>>2;for(r(e[n+0],255&S,S>>16,m,g),null!=a&&(S=3*E+w+131074>>2,r(a[o+0],255&S,S>>16,v,b)),A=1;A<=_;++A){var C=s[l+A]|c[u+A]<<16,T=d[h+A]|f[p+A]<<16,k=w+C+E+T+524296,x=k+2*(C+E)>>3;S=x+w>>1,w=(k=k+2*(w+T)>>3)+C>>1,r(e[n+2*A-1],255&S,S>>16,m,g+(2*A-1)*i),r(e[n+2*A-0],255&w,w>>16,m,g+(2*A-0)*i),null!=a&&(S=k+E>>1,w=x+T>>1,r(a[o+2*A-1],255&S,S>>16,v,b+(2*A-1)*i),r(a[o+2*A+0],255&w,w>>16,v,b+(2*A+0)*i)),w=C,E=T}1&y||(S=3*w+E+131074>>2,r(e[n+y-1],255&S,S>>16,m,g+(y-1)*i),null!=a&&(S=3*E+w+131074>>2,r(a[o+y-1],255&S,S>>16,v,b+(y-1)*i)))}}function yn(){vi[Rr]=bi,vi[Br]=Ai,vi[jr]=yi,vi[Fr]=_i,vi[Ur]=wi,vi[Hr]=Ei,vi[zr]=Si,vi[Vr]=Ai,vi[Wr]=_i,vi[Gr]=wi,vi[qr]=Ei}function An(e){return e&~Ii?0>e?0:255:e>>Oi}function _n(e,t){return An((19077*e>>8)+(26149*t>>8)-14234)}function wn(e,t,n){return An((19077*e>>8)-(6419*t>>8)-(13320*n>>8)+8708)}function En(e,t){return An((19077*e>>8)+(33050*t>>8)-17685)}function Sn(e,t,n,r,i){r[i+0]=_n(e,n),r[i+1]=wn(e,t,n),r[i+2]=En(e,t)}function Cn(e,t,n,r,i){r[i+0]=En(e,t),r[i+1]=wn(e,t,n),r[i+2]=_n(e,n)}function Tn(e,t,n,r,i){var a=wn(e,t,n);t=a<<3&224|En(e,t)>>3,r[i+0]=248&_n(e,n)|a>>5,r[i+1]=t}function kn(e,t,n,r,i){var a=240&En(e,t)|15;r[i+0]=240&_n(e,n)|wn(e,t,n)>>4,r[i+1]=a}function xn(e,t,n,r,i){r[i+0]=255,Sn(e,t,n,r,i+1)}function On(e,t,n,r,i){Cn(e,t,n,r,i),r[i+3]=255}function In(e,t,n,r,i){Sn(e,t,n,r,i),r[i+3]=255}function Ge(e,t){return 0>e?0:e>t?t:e}function Mn(t,n,r){e[t]=function(e,t,i,a,o,s,l,c,u){for(var d=c+(-2&u)*r;c!=d;)n(e[t+0],i[a+0],o[s+0],l,c),n(e[t+1],i[a+0],o[s+0],l,c+r),t+=2,++a,++s,c+=2*r;1&u&&n(e[t+0],i[a+0],o[s+0],l,c)}}function Pn(e,t,n){return 0==n?0==e?0==t?6:5:0==t?4:0:n}function Dn(e,t,n,r,i){switch(e>>>30){case 3:or(t,n,r,i,0);break;case 2:sr(t,n,r,i);break;case 1:cr(t,n,r,i)}}function Nn(e,t){var n,a,o=t.M,s=t.Nb,l=e.oc,c=e.pc+40,u=e.oc,d=e.pc+584,h=e.oc,f=e.pc+600;for(n=0;16>n;++n)l[c+32*n-1]=129;for(n=0;8>n;++n)u[d+32*n-1]=129,h[f+32*n-1]=129;for(0<o?l[c-1-32]=u[d-1-32]=h[f-1-32]=129:(i(l,c-32-1,127,21),i(u,d-32-1,127,9),i(h,f-32-1,127,9)),a=0;a<e.za;++a){var p=t.ya[t.aa+a];if(0<a){for(n=-1;16>n;++n)r(l,c+32*n-4,l,c+32*n+12,4);for(n=-1;8>n;++n)r(u,d+32*n-4,u,d+32*n+4,4),r(h,f+32*n-4,h,f+32*n+4,4)}var m=e.Gd,g=e.Hd+a,v=p.ad,b=p.Hc;if(0<o&&(r(l,c-32,m[g].y,0,16),r(u,d-32,m[g].f,0,8),r(h,f-32,m[g].ea,0,8)),p.Za){var y=l,A=c-32+16;for(0<o&&(a>=e.za-1?i(y,A,m[g].y[15],4):r(y,A,m[g+1].y,0,4)),n=0;4>n;n++)y[A+128+n]=y[A+256+n]=y[A+384+n]=y[A+0+n];for(n=0;16>n;++n,b<<=2)y=l,A=c+ji[n],hi[p.Ob[n]](y,A),Dn(b,v,16*+n,y,A)}else if(y=Pn(a,o,p.Ob[0]),di[y](l,c),0!=b)for(n=0;16>n;++n,b<<=2)Dn(b,v,16*+n,l,c+ji[n]);for(n=p.Gc,y=Pn(a,o,p.Dd),fi[y](u,d),fi[y](h,f),b=v,y=u,A=d,255&(p=n>>0)&&(170&p?lr(b,256,y,A):ur(b,256,y,A)),p=h,b=f,255&(n>>=8)&&(170&n?lr(v,320,p,b):ur(v,320,p,b)),o<e.Ub-1&&(r(m[g].y,0,l,c+480,16),r(m[g].f,0,u,d+224,8),r(m[g].ea,0,h,f+224,8)),n=8*s*e.B,m=e.sa,g=e.ta+16*a+16*s*e.R,v=e.qa,p=e.ra+8*a+n,b=e.Ha,y=e.Ia+8*a+n,n=0;16>n;++n)r(m,g+n*e.R,l,c+32*n,16);for(n=0;8>n;++n)r(v,p+n*e.B,u,d+32*n,8),r(b,y+n*e.B,h,f+32*n,8)}}function Ln(e,r,i,a,o,s,l,c,u){var d=[0],h=[0],f=0,p=null!=u?u.kd:0,m=null!=u?u:new rn;if(null==e||12>i)return 7;m.data=e,m.w=r,m.ha=i,r=[r],i=[i],m.gb=[m.gb];e:{var g=r,b=i,y=m.gb;if(t(null!=e),t(null!=b),t(null!=y),y[0]=0,12<=b[0]&&!n(e,g[0],"RIFF")){if(n(e,g[0]+8,"WEBP")){y=3;break e}var A=P(e,g[0]+4);if(12>A||4294967286<A){y=3;break e}if(p&&A>b[0]-8){y=7;break e}y[0]=A,g[0]+=12,b[0]-=12}y=0}if(0!=y)return y;for(A=0<m.gb[0],i=i[0];;){e:{var w=e;b=r,y=i;var E=d,S=h,C=g=[0];if((x=f=[f])[0]=0,8>y[0])y=7;else{if(!n(w,b[0],"VP8X")){if(10!=P(w,b[0]+4)){y=3;break e}if(18>y[0]){y=7;break e}var T=P(w,b[0]+8),k=1+M(w,b[0]+12);if(2147483648<=k*(w=1+M(w,b[0]+15))){y=3;break e}null!=C&&(C[0]=T),null!=E&&(E[0]=k),null!=S&&(S[0]=w),b[0]+=18,y[0]-=18,x[0]=1}y=0}}if(f=f[0],g=g[0],0!=y)return y;if(b=!!(2&g),!A&&f)return 3;if(null!=s&&(s[0]=!!(16&g)),null!=l&&(l[0]=b),null!=c&&(c[0]=0),l=d[0],g=h[0],f&&b&&null==u){y=0;break}if(4>i){y=7;break}if(A&&f||!A&&!f&&!n(e,r[0],"ALPH")){i=[i],m.na=[m.na],m.P=[m.P],m.Sa=[m.Sa];e:{T=e,y=r,A=i;var x=m.gb;E=m.na,S=m.P,C=m.Sa,k=22,t(null!=T),t(null!=A),w=y[0];var O=A[0];for(t(null!=E),t(null!=C),E[0]=null,S[0]=null,C[0]=0;;){if(y[0]=w,A[0]=O,8>O){y=7;break e}var I=P(T,w+4);if(4294967286<I){y=3;break e}var D=8+I+1&-2;if(k+=D,0<x&&k>x){y=3;break e}if(!n(T,w,"VP8 ")||!n(T,w,"VP8L")){y=0;break e}if(O[0]<D){y=7;break e}n(T,w,"ALPH")||(E[0]=T,S[0]=w+8,C[0]=I),w+=D,O-=D}}if(i=i[0],m.na=m.na[0],m.P=m.P[0],m.Sa=m.Sa[0],0!=y)break}i=[i],m.Ja=[m.Ja],m.xa=[m.xa];e:if(x=e,y=r,A=i,E=m.gb[0],S=m.Ja,C=m.xa,T=y[0],w=!n(x,T,"VP8 "),k=!n(x,T,"VP8L"),t(null!=x),t(null!=A),t(null!=S),t(null!=C),8>A[0])y=7;else{if(w||k){if(x=P(x,T+4),12<=E&&x>E-12){y=3;break e}if(p&&x>A[0]-8){y=7;break e}S[0]=x,y[0]+=8,A[0]-=8,C[0]=k}else C[0]=5<=A[0]&&47==x[T+0]&&!(x[T+4]>>5),S[0]=A[0];y=0}if(i=i[0],m.Ja=m.Ja[0],m.xa=m.xa[0],r=r[0],0!=y)break;if(4294967286<m.Ja)return 3;if(null==c||b||(c[0]=m.xa?2:1),l=[l],g=[g],m.xa){if(5>i){y=7;break}c=l,p=g,b=s,null==e||5>i?e=0:5<=i&&47==e[r+0]&&!(e[r+4]>>5)?(A=[0],x=[0],E=[0],v(S=new _,e,r,i),me(S,A,x,E)?(null!=c&&(c[0]=A[0]),null!=p&&(p[0]=x[0]),null!=b&&(b[0]=E[0]),e=1):e=0):e=0}else{if(10>i){y=7;break}c=g,null==e||10>i||!Xe(e,r+3,i-3)?e=0:(p=e[r+0]|e[r+1]<<8|e[r+2]<<16,b=16383&(e[r+7]<<8|e[r+6]),e=16383&(e[r+9]<<8|e[r+8]),1&p||3<(p>>1&7)||!(p>>4&1)||p>>5>=m.Ja||!b||!e?e=0:(l&&(l[0]=b),c&&(c[0]=e),e=1))}if(!e)return 3;if(l=l[0],g=g[0],f&&(d[0]!=l||h[0]!=g))return 3;null!=u&&(u[0]=m,u.offset=r-u.w,t(4294967286>r-u.w),t(u.offset==u.ha-i));break}return 0==y||7==y&&f&&null==u?(null!=s&&(s[0]|=null!=m.na&&0<m.na.length),null!=a&&(a[0]=l),null!=o&&(o[0]=g),0):y}function Rn(e,t,n){var r=t.width,i=t.height,a=0,o=0,s=r,l=i;if(t.Da=null!=e&&0<e.Da,t.Da&&(s=e.cd,l=e.bd,a=e.v,o=e.j,11>n||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=l||a+s>r||o+l>i))return 0;if(t.v=a,t.j=o,t.va=a+s,t.o=o+l,t.U=s,t.T=l,t.da=null!=e&&0<e.da,t.da){if(!R(s,l,n=[e.ib],a=[e.hb]))return 0;t.ib=n[0],t.hb=a[0]}return t.ob=null!=e&&e.ob,t.Kb=null==e||!e.Sd,t.da&&(t.ob=t.ib<3*r/4&&t.hb<3*i/4,t.Kb=0),1}function Bn(e){if(null==e)return 2;if(11>e.S){var t=e.f.RGBA;t.fb+=(e.height-1)*t.A,t.A=-t.A}else t=e.f.kb,e=e.height,t.O+=(e-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,null!=t.F&&(t.J+=(e-1)*t.lb,t.lb=-t.lb);return 0}function jn(e,t,n,r){if(null==r||0>=e||0>=t)return 2;if(null!=n){if(n.Da){var i=n.cd,o=n.bd,s=-2&n.v,l=-2&n.j;if(0>s||0>l||0>=i||0>=o||s+i>e||l+o>t)return 2;e=i,t=o}if(n.da){if(!R(e,t,i=[n.ib],o=[n.hb]))return 2;e=i[0],t=o[0]}}r.width=e,r.height=t;e:{var c=r.width,u=r.height;if(e=r.S,0>=c||0>=u||!(e>=Rr&&13>e))e=2;else{if(0>=r.Rd&&null==r.sd){s=o=i=t=0;var d=(l=c*zi[e])*u;if(11>e||(o=(u+1)/2*(t=(c+1)/2),12==e&&(s=(i=c)*u)),null==(u=a(d+2*o+s))){e=1;break e}r.sd=u,11>e?((c=r.f.RGBA).eb=u,c.fb=0,c.A=l,c.size=d):((c=r.f.kb).y=u,c.O=0,c.fa=l,c.Fd=d,c.f=u,c.N=0+d,c.Ab=t,c.Cd=o,c.ea=u,c.W=0+d+o,c.Db=t,c.Ed=o,12==e&&(c.F=u,c.J=0+d+2*o),c.Tc=s,c.lb=i)}if(t=1,i=r.S,o=r.width,s=r.height,i>=Rr&&13>i)if(11>i)e=r.f.RGBA,t&=(l=Math.abs(e.A))*(s-1)+o<=e.size,t&=l>=o*zi[i],t&=null!=e.eb;else{e=r.f.kb,l=(o+1)/2,d=(s+1)/2,c=Math.abs(e.fa),u=Math.abs(e.Ab);var h=Math.abs(e.Db),f=Math.abs(e.lb),p=f*(s-1)+o;t&=c*(s-1)+o<=e.Fd,t&=u*(d-1)+l<=e.Cd,t=(t&=h*(d-1)+l<=e.Ed)&c>=o&u>=l&h>=l,t&=null!=e.y,t&=null!=e.f,t&=null!=e.ea,12==i&&(t&=f>=o,t&=p<=e.Tc,t&=null!=e.F)}else t=0;e=t?0:2}}return 0!=e||null!=n&&n.fd&&(e=Bn(r)),e}var Fn=64,Un=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Hn=24,zn=32,Vn=8,Wn=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];F("Predictor0","PredictorAdd0"),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,n){return t[n+0]},e.Predictor3=function(e,t,n){return t[n+1]},e.Predictor4=function(e,t,n){return t[n-1]},e.Predictor5=function(e,t,n){return H(H(e,t[n+1]),t[n+0])},e.Predictor6=function(e,t,n){return H(e,t[n-1])},e.Predictor7=function(e,t,n){return H(e,t[n+0])},e.Predictor8=function(e,t,n){return H(t[n-1],t[n+0])},e.Predictor9=function(e,t,n){return H(t[n+0],t[n+1])},e.Predictor10=function(e,t,n){return H(H(e,t[n-1]),H(t[n+0],t[n+1]))},e.Predictor11=function(e,t,n){var r=t[n+0];return 0>=W(r>>24&255,e>>24&255,(t=t[n-1])>>24&255)+W(r>>16&255,e>>16&255,t>>16&255)+W(r>>8&255,e>>8&255,t>>8&255)+W(255&r,255&e,255&t)?r:e},e.Predictor12=function(e,t,n){var r=t[n+0];return(z((e>>24&255)+(r>>24&255)-((t=t[n-1])>>24&255))<<24|z((e>>16&255)+(r>>16&255)-(t>>16&255))<<16|z((e>>8&255)+(r>>8&255)-(t>>8&255))<<8|z((255&e)+(255&r)-(255&t)))>>>0},e.Predictor13=function(e,t,n){var r=t[n-1];return(V((e=H(e,t[n+0]))>>24&255,r>>24&255)<<24|V(e>>16&255,r>>16&255)<<16|V(e>>8&255,r>>8&255)<<8|V(e>>0&255,r>>0&255))>>>0};var Gn=e.PredictorAdd0;e.PredictorAdd1=G,F("Predictor2","PredictorAdd2"),F("Predictor3","PredictorAdd3"),F("Predictor4","PredictorAdd4"),F("Predictor5","PredictorAdd5"),F("Predictor6","PredictorAdd6"),F("Predictor7","PredictorAdd7"),F("Predictor8","PredictorAdd8"),F("Predictor9","PredictorAdd9"),F("Predictor10","PredictorAdd10"),F("Predictor11","PredictorAdd11"),F("Predictor12","PredictorAdd12"),F("Predictor13","PredictorAdd13");var qn=e.PredictorAdd2;X("ColorIndexInverseTransform","MapARGB","32b",(function(e){return e>>8&255}),(function(e){return e})),X("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(e){return e}),(function(e){return e>>8&255}));var Yn,Kn=e.ColorIndexInverseTransform,Xn=e.MapARGB,Qn=e.VP8LColorIndexInverseTransformAlpha,$n=e.MapAlpha,Jn=e.VP8LPredictorsAdd=[];Jn.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var Zn,er,tr,nr,rr,ir,ar,or,sr,lr,cr,ur,dr,hr,fr,pr,mr,gr,vr,br,yr,Ar,_r,wr,Er,Sr,Cr,Tr,kr=a(511),xr=a(2041),Or=a(225),Ir=a(767),Mr=0,Pr=xr,Dr=Or,Nr=Ir,Lr=kr,Rr=0,Br=1,jr=2,Fr=3,Ur=4,Hr=5,zr=6,Vr=7,Wr=8,Gr=9,qr=10,Yr=[2,3,7],Kr=[3,3,11],Xr=[280,256,256,256,40],Qr=[0,1,1,1,0],$r=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Jr=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Zr=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],ei=8,ti=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],ni=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ri=null,ii=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],ai=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],oi=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],si=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],li=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],ci=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ui=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],di=[],hi=[],fi=[],pi=1,mi=2,gi=[],vi=[];bn("UpsampleRgbLinePair",Sn,3),bn("UpsampleBgrLinePair",Cn,3),bn("UpsampleRgbaLinePair",In,4),bn("UpsampleBgraLinePair",On,4),bn("UpsampleArgbLinePair",xn,4),bn("UpsampleRgba4444LinePair",kn,2),bn("UpsampleRgb565LinePair",Tn,2);var bi=e.UpsampleRgbLinePair,yi=e.UpsampleBgrLinePair,Ai=e.UpsampleRgbaLinePair,_i=e.UpsampleBgraLinePair,wi=e.UpsampleArgbLinePair,Ei=e.UpsampleRgba4444LinePair,Si=e.UpsampleRgb565LinePair,Ci=16,Ti=1<<Ci-1,ki=-227,xi=482,Oi=6,Ii=(256<<Oi)-1,Mi=0,Pi=a(256),Di=a(256),Ni=a(256),Li=a(256),Ri=a(xi-ki),Bi=a(xi-ki);Mn("YuvToRgbRow",Sn,3),Mn("YuvToBgrRow",Cn,3),Mn("YuvToRgbaRow",In,4),Mn("YuvToBgraRow",On,4),Mn("YuvToArgbRow",xn,4),Mn("YuvToRgba4444Row",kn,2),Mn("YuvToRgb565Row",Tn,2);var ji=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Fi=[0,2,8],Ui=[8,7,6,4,4,2,2,2,1,1,1,1],Hi=1;this.WebPDecodeRGBA=function(e,n,r,i,a){var o=Br,s=new nn,l=new oe;s.ba=l,l.S=o,l.width=[l.width],l.height=[l.height];var c=l.width,u=l.height,d=new se;if(null==d||null==e)var h=2;else t(null!=d),h=Ln(e,n,r,d.width,d.height,d.Pd,d.Qd,d.format,null);if(0!=h?c=0:(null!=c&&(c[0]=d.width[0]),null!=u&&(u[0]=d.height[0]),c=1),c){l.width=l.width[0],l.height=l.height[0],null!=i&&(i[0]=l.width),null!=a&&(a[0]=l.height);e:{if(i=new qe,(a=new rn).data=e,a.w=n,a.ha=r,a.kd=1,n=[0],t(null!=a),(0==(e=Ln(a.data,a.w,a.ha,null,null,null,n,null,a))||7==e)&&n[0]&&(e=4),0==(n=e)){if(t(null!=s),i.data=a.data,i.w=a.w+a.offset,i.ha=a.ha-a.offset,i.put=fe,i.ac=he,i.bc=pe,i.ma=s,a.xa){if(null==(e=xe())){s=1;break e}if(function(e,n){var r=[0],i=[0],a=[0];t:for(;;){if(null==e)return 0;if(null==n)return e.a=2,0;if(e.l=n,e.a=0,v(e.m,n.data,n.w,n.ha),!me(e.m,r,i,a)){e.a=3;break t}if(e.xb=mi,n.width=r[0],n.height=i[0],!Oe(r[0],i[0],1,e,null))break t;return 1}return t(0!=e.a),0}(e,i)){if(i=0==(n=jn(i.width,i.height,s.Oa,s.ba))){t:{i=e;n:for(;;){if(null==i){i=0;break t}if(t(null!=i.s.yc),t(null!=i.s.Ya),t(0<i.s.Wb),t(null!=(r=i.l)),t(null!=(a=r.ma)),0!=i.xb){if(i.ca=a.ba,i.tb=a.tb,t(null!=i.ca),!Rn(a.Oa,r,Fr)){i.a=2;break n}if(!Ie(i,r.width))break n;if(r.da)break n;if((r.da||re(i.ca.S))&&vn(),11>i.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=i.ca.f.kb.F&&vn()),i.Pb&&0<i.s.ua&&null==i.s.vb.X&&!D(i.s.vb,i.s.Wa.Xa)){i.a=1;break n}i.xb=0}if(!Te(i,i.V,i.Ba,i.c,i.i,r.o,we))break n;a.Dc=i.Ma,i=1;break t}t(0!=i.a),i=0}i=!i}i&&(n=e.a)}else n=e.a}else{if(null==(e=new Ye)){s=1;break e}if(e.Fa=a.na,e.P=a.P,e.qc=a.Sa,Qe(e,i)){if(0==(n=jn(i.width,i.height,s.Oa,s.ba))){if(e.Aa=0,r=s.Oa,t(null!=(a=e)),null!=r){if(0<(c=0>(c=r.Md)?0:100<c?255:255*c/100)){for(u=d=0;4>u;++u)12>(h=a.pb[u]).lc&&(h.ia=c*Ui[0>h.lc?0:h.lc]>>3),d|=h.ia;d&&(alert("todo:VP8InitRandom"),a.ia=1)}a.Ga=r.Id,100<a.Ga?a.Ga=100:0>a.Ga&&(a.Ga=0)}Ze(e,i)||(n=e.a)}}else n=e.a}0==n&&null!=s.Oa&&s.Oa.fd&&(n=Bn(s.ba))}s=n}o=0!=s?null:11>o?l.f.RGBA.eb:l.f.kb.y}else o=null;return o};var zi=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(e,t){for(var n="",r=0;r<4;r++)n+=String.fromCharCode(e[t++]);return n}function u(e,t){return(e[t+0]<<0|e[t+1]<<8|e[t+2]<<16)>>>0}function d(e,t){return(e[t+0]<<0|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new l;var h=[0],f=[0],p=[],m=new l,g=e,v=function(e,t){var n={},r=0,i=!1,a=0,o=0;if(n.frames=[],!
/** @license
   * Copyright (c) 2017 Dominik Homberger
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  https://webpjs.appspot.com
  WebPRiffParser dominikhlbg@gmail.com
  */
function(e,t,n,r){for(var i=0;i<4;i++)if(e[t+i]!="RIFF".charCodeAt(i))return!0;return!1}(e,t)){var s,l;for(d(e,t+=4),t+=8;t<e.length;){var h=c(e,t),f=d(e,t+=4);t+=4;var p=f+(1&f);switch(h){case"VP8 ":case"VP8L":void 0===n.frames[r]&&(n.frames[r]={}),(v=n.frames[r]).src_off=i?o:t-8,v.src_size=a+f+8,r++,i&&(i=!1,a=0,o=0);break;case"VP8X":(v=n.header={}).feature_flags=e[t];var m=t+4;v.canvas_width=1+u(e,m),m+=3,v.canvas_height=1+u(e,m),m+=3;break;case"ALPH":i=!0,a=p+8,o=t-8;break;case"ANIM":(v=n.header).bgcolor=d(e,t),m=t+4,v.loop_count=(s=e)[(l=m)+0]<<0|s[l+1]<<8,m+=2;break;case"ANMF":var g,v;(v=n.frames[r]={}).offset_x=2*u(e,t),t+=3,v.offset_y=2*u(e,t),t+=3,v.width=1+u(e,t),t+=3,v.height=1+u(e,t),t+=3,v.duration=u(e,t),t+=3,g=e[t++],v.dispose=1&g,v.blend=g>>1&1}"ANMF"!=h&&(t+=p)}return n}}(g,0);v.response=g,v.rgbaoutput=!0,v.dataurl=!1;var b=v.header?v.header:null,y=v.frames?v.frames:null;if(b){b.loop_counter=b.loop_count,h=[b.canvas_height],f=[b.canvas_width];for(var A=0;A<y.length&&0!=y[A].blend;A++);}var _=y[0],w=m.WebPDecodeRGBA(g,_.src_off,_.src_size,f,h);_.rgba=w,_.imgwidth=f[0],_.imgheight=h[0];for(var E=0;E<f[0]*h[0]*4;E++)p[E]=w[E];return this.width=f,this.height=h,this.data=p,this}!function(e){var t=function(t,r,c,u){var d=4,h=o;switch(u){case e.image_compression.FAST:d=1,h=i;break;case e.image_compression.MEDIUM:d=6,h=s;break;case e.image_compression.SLOW:d=9,h=l}t=n(t,r,c,h);var f=Object(a.b)(t,{level:d});return e.__addimage__.arrayBufferToBinaryString(f)},n=function(e,t,n,r){for(var i,a,o,s=e.length/t,l=new Uint8Array(e.length+s),c=u(),h=0;h<s;h+=1){if(o=h*t,i=e.subarray(o,o+t),r)l.set(r(i,n,a),o+h);else{for(var f,p=c.length,m=[];f<p;f+=1)m[f]=c[f](i,n,a);var g=d(m.concat());l.set(m[g],o+h)}a=i}return l},r=function(e){var t=Array.apply([],e);return t.unshift(0),t},i=function(e,t){var n,r=[],i=e.length;r[0]=1;for(var a=0;a<i;a+=1)n=e[a-t]||0,r[a+1]=e[a]-n+256&255;return r},o=function(e,t,n){var r,i=[],a=e.length;i[0]=2;for(var o=0;o<a;o+=1)r=n&&n[o]||0,i[o+1]=e[o]-r+256&255;return i},s=function(e,t,n){var r,i,a=[],o=e.length;a[0]=3;for(var s=0;s<o;s+=1)r=e[s-t]||0,i=n&&n[s]||0,a[s+1]=e[s]+256-(r+i>>>1)&255;return a},l=function(e,t,n){var r,i,a,o,s=[],l=e.length;s[0]=4;for(var u=0;u<l;u+=1)r=e[u-t]||0,i=n&&n[u]||0,a=n&&n[u-t]||0,o=c(r,i,a),s[u+1]=e[u]-o+256&255;return s},c=function(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),i=Math.abs(e-n),a=Math.abs(e+t-n-n);return r<=i&&r<=a?e:i<=a?t:n},u=function(){return[r,i,o,s,l]},d=function(e){var t=e.map((function(e){return e.reduce((function(e,t){return e+Math.abs(t)}),0)}));return t.indexOf(Math.min.apply(null,t))};e.processPNG=function(n,r,i,o){var s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w=this.decode.FLATE_DECODE,E="";if(this.__addimage__.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.__addimage__.isArrayBufferView(n)){if(n=(c=new Qe(n)).imgData,l=c.bits,s=c.colorSpace,d=c.colors,-1!==[4,6].indexOf(c.colorType)){if(8===c.bits){m=(p=32==c.pixelBitlength?new Uint32Array(c.decodePixels().buffer):16==c.pixelBitlength?new Uint16Array(c.decodePixels().buffer):new Uint8Array(c.decodePixels().buffer)).length,v=new Uint8Array(m*c.colors),g=new Uint8Array(m);var S,C=c.pixelBitlength-c.bits;for(A=0,_=0;A<m;A++){for(y=p[A],S=0;S<C;)v[_++]=y>>>S&255,S+=c.bits;g[A]=y>>>S&255}}if(16===c.bits){m=(p=new Uint32Array(c.decodePixels().buffer)).length,v=new Uint8Array(m*(32/c.pixelBitlength)*c.colors),g=new Uint8Array(m*(32/c.pixelBitlength)),b=c.colors>1,A=0,_=0;for(var T=0;A<m;)y=p[A++],v[_++]=y>>>0&255,b&&(v[_++]=y>>>16&255,y=p[A++],v[_++]=y>>>0&255),g[T++]=y>>>16&255;l=8}o!==e.image_compression.NONE&&"function"==typeof a.b?(n=t(v,c.width*c.colors,c.colors,o),f=t(g,c.width,1,o)):(n=v,f=g,w=void 0)}if(3===c.colorType&&(s=this.color_spaces.INDEXED,h=c.palette,c.transparency.indexed)){var k=c.transparency.indexed,x=0;for(A=0,m=k.length;A<m;++A)x+=k[A];if((x/=255)==m-1&&-1!==k.indexOf(0))u=[k.indexOf(0)];else if(x!==m){for(p=c.decodePixels(),g=new Uint8Array(p.length),A=0,m=p.length;A<m;A++)g[A]=k[p[A]];f=t(g,c.width,1)}}var O=function(t){var n;switch(t){case e.image_compression.FAST:n=11;break;case e.image_compression.MEDIUM:n=13;break;case e.image_compression.SLOW:n=14;break;default:n=12}return n}(o);return w===this.decode.FLATE_DECODE&&(E="/Predictor "+O+" "),E+="/Colors "+d+" /BitsPerComponent "+l+" /Columns "+c.width,(this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n))&&(n=this.__addimage__.arrayBufferToBinaryString(n)),(f&&this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),{alias:i,data:n,index:r,filter:w,decodeParameters:E,transparency:u,palette:h,sMask:f,predictor:O,width:c.width,height:c.height,bitsPerComponent:l,colorSpace:s}}}}(F.API),function(e){e.processGIF89A=function(t,n,r,i){var a=new $e(t),o=a.width,s=a.height,l=[];a.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:o,height:s},u=new Ze(100).encode(c,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A}(F.API),et.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},et.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(e){l.log("bit decode error:"+e)}},et.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var l=this.palette[a>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}0!==n&&(this.pos+=4-n)}},et.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*i*4,s=a>>4,l=15&a,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*i+1>=this.width)break;c=this.palette[l],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}0!==t&&(this.pos+=4-t)}},et.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*r;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}0!==e&&(this.pos+=4-e)}},et.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,s=(a>>5&t)/t*255|0,l=(a>>10&t)/t*255|0,c=a>>15?255:0,u=r*this.width*4+4*i;this.data[u]=l,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=c}this.pos+=e}},et.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,l=(o>>5&n)/n*255|0,c=(o>>11)/t*255|0,u=i*this.width*4+4*a;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=s,this.data[u+3]=255}this.pos+=e}},et.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},et.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=o}},et.prototype.getData=function(){return this.data},
/**
 * @license
 * Copyright (c) 2018 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){e.processBMP=function(t,n,r,i){var a=new et(t,!1),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new Ze(100).encode(l,100);return e.processJPEG.call(this,c,n,r,i)}}(F.API),tt.prototype.getData=function(){return this.data},
/**
 * @license
 * Copyright (c) 2019 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){e.processWEBP=function(t,n,r,i){var a=new tt(t,!1),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new Ze(100).encode(l,100);return e.processJPEG.call(this,c,n,r,i)}}(F.API),F.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,l=0,c=0;c<i;c+=4){var u=r[c],d=r[c+1],h=r[c+2],f=r[c+3];a[s++]=u,a[s++]=d,a[s++]=h,o[l++]=f}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:p,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},F.API.setLanguage=function(e){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]&&(this.internal.languageSettings.languageCode=e,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")})),this.internal.languageSettings.isSubscribed=!0)),this},Ge=F.API,qe=Ge.getCharWidthsArray=function(e,t){var n,r,a=(t=t||{}).font||this.internal.getFont(),o=t.fontSize||this.internal.getFontSize(),s=t.charSpace||this.internal.getCharSpace(),l=t.widths?t.widths:a.metadata.Unicode.widths,c=l.fof?l.fof:1,u=t.kerning?t.kerning:a.metadata.Unicode.kerning,d=u.fof?u.fof:1,h=!1!==t.doKerning,f=0,p=e.length,m=0,g=l[0]||c,v=[];for(n=0;n<p;n++)r=e.charCodeAt(n),"function"==typeof a.metadata.widthOfString?v.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(r))+s*(1e3/o)||0)/1e3):(f=h&&"object"===i()(u[r])&&!isNaN(parseInt(u[r][m],10))?u[r][m]/d:0,v.push((l[r]||g)/c+f)),m=r;return v},Ye=Ge.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return Ge.processArabic&&(e=Ge.processArabic(e)),"function"==typeof r.metadata.widthOfString?r.metadata.widthOfString(e,n,i)/n:qe.apply(this,arguments).reduce((function(e,t){return e+t}),0)},Ke=function(e,t,n,r){for(var i=[],a=0,o=e.length,s=0;a!==o&&s+t[a]<n;)s+=t[a],a++;i.push(e.slice(0,a));var l=a;for(s=0;a!==o;)s+t[a]>r&&(i.push(e.slice(l,a)),s=0,l=a),s+=t[a],a++;return l!==a&&i.push(e.slice(l,a)),i},Xe=function(e,t,n){n||(n={});var r,i,a,o,s,l,c,u=[],d=[u],h=n.textIndent||0,f=0,p=0,m=e.split(" "),g=qe.apply(this,[" ",n])[0];if(l=-1===n.lineIndent?m[0].length+2:n.lineIndent||0){var v=Array(l).join(" "),b=[];m.map((function(e){(e=e.split(/\s*\n/)).length>1?b=b.concat(e.map((function(e,t){return(t&&e.length?"\n":"")+e}))):b.push(e[0])})),m=b,l=Ye.apply(this,[v,n])}for(a=0,o=m.length;a<o;a++){var y=0;if(r=m[a],l&&"\n"==r[0]&&(r=r.substr(1),y=1),h+f+(p=(i=qe.apply(this,[r,n])).reduce((function(e,t){return e+t}),0))>t||y){if(p>t){for(s=Ke.apply(this,[r,i,t-(h+f),t]),u.push(s.shift()),u=[s.pop()];s.length;)d.push([s.shift()]);p=i.slice(r.length-(u[0]?u[0].length:0)).reduce((function(e,t){return e+t}),0)}else u=[r];d.push(u),h=p+l,f=g}else u.push(r),h+=f+p,f=g}return c=l?function(e,t){return(t?v:"")+e.join(" ")}:function(e){return e.join(" ")},d.map(c)},Ge.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),a=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle);return t.metadata.Unicode?{widths:t.metadata.Unicode.widths||{0:1},kerning:t.metadata.Unicode.kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,l,c=[];for(s=0,l=r.length;s<l;s++)c=c.concat(Xe.apply(this,[r[s],o,a]));return c},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="klmnopqrstuvwxyz",n={},r={},a=0;a<t.length;a++)n[t[a]]="0123456789abcdef"[a],r["0123456789abcdef"[a]]=t[a];var o=function(e){return"0x"+parseInt(e,10).toString(16)},s=e.__fontmetrics__.compress=function(e){var t,n,a,l,c=["{"];for(var u in e){if(t=e[u],isNaN(parseInt(u,10))?n="'"+u+"'":(u=parseInt(u,10),n=(n=o(u).slice(2)).slice(0,-1)+r[n.slice(-1)]),"number"==typeof t)t<0?(a=o(t).slice(3),l="-"):(a=o(t).slice(2),l=""),a=l+a.slice(0,-1)+r[a.slice(-1)];else{if("object"!==i()(t))throw new Error("Don't know what to do with value type "+i()(t)+".");a=s(t)}c.push(n+a)}return c.push("}"),c.join("")},l=e.__fontmetrics__.uncompress=function(e){if("string"!=typeof e)throw new Error("Invalid argument passed to uncompress.");for(var t,r,i,a,o={},s=1,l=o,c=[],u="",d="",h=e.length-1,f=1;f<h;f+=1)"'"==(a=e[f])?t?(i=t.join(""),t=void 0):t=[]:t?t.push(a):"{"==a?(c.push([l,i]),l={},i=void 0):"}"==a?((r=c.pop())[0][r[1]]=l,i=void 0,l=r[0]):"-"==a?s=-1:void 0===i?n.hasOwnProperty(a)?(u+=n[a],i=parseInt(u,16)*s,s=1,u=""):u+=a:n.hasOwnProperty(a)?(d+=n[a],l[i]=parseInt(d,16)*s,s=1,i=void 0,d=""):d+=a;return o},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},d={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(e){var t=e.font,n=d.Unicode[t.postScriptName];n&&(t.metadata.Unicode={},t.metadata.Unicode.widths=n.widths,t.metadata.Unicode.kerning=n.kerning);var r=u.Unicode[t.postScriptName];r&&(t.metadata.Unicode.encoding=r,t.encoding=r.codePages[0])}])}(F.API),
/**
 * @license
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(void 0===a)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if("string"!=typeof(r=!1===a.existsFileInVFS(i.postScriptName)?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");!function(n,r){r=/^\x00\x01\x00\x00/.test(r)?t(r):t(h(r)),n.metadata=e.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]}(i,r)}}])}(F),
/** @license
 * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * ====================================================================
 */
function(e){function t(){return(o.canvg?Promise.resolve(o.canvg):n.e(1).then(n.bind(null,1816))).catch((function(e){return Promise.reject(new Error("Could not load canvg: "+e))})).then((function(e){return e.default?e.default:e}))}F.API.addSvgAsImage=function(e,n,r,i,a,o,s,c){if(isNaN(n)||isNaN(r))throw l.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(a))throw l.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=i,u.height=a;var d=u.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,u.width,u.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return t().then((function(t){return t.fromString(d,e,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(e){return e.render(h)})).then((function(){f.addImage(u.toDataURL("image/jpeg",1),n,r,i,a,s,c)}))}}(),F.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},F.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},l=Object.keys(s),c=[],u=0,d=0,h=0;function f(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===t){var p=l.length;for(h=0;h<p;h+=1)n[l[h]].value=n[l[h]].defaultValue,n[l[h]].explicitSet=!1}if("object"===i()(e))for(a in e)if(o=e[a],f(l,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&f(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(u=0;u<o.length;u+=1)if(r=!0,1===o[u].length&&"number"==typeof o[u][0])c.push(String(o[u]-1));else if(o[u].length>1){for(d=0;d<o[u].length;d+=1)"number"!=typeof o[u][d]&&(r=!1);!0===r&&c.push([o[u][0]-1,o[u][1]-1].join(" "))}n[a].value="["+c.join(" ")+"]"}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&("name"===n[e].type?t.push("/"+e+" /"+n[e].value):t.push("/"+e+" "+n[e].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this
/** ====================================================================
 * @license
 * jsPDF XMP metadata plugin
 * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * ====================================================================
 */},function(e){var t=function(){var e='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',t=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),n=unescape(encodeURIComponent(e)),r=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),i=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),a=unescape(encodeURIComponent("</x:xmpmeta>")),o=n.length+r.length+i.length+t.length+a.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+o+" >>"),this.internal.write("stream"),this.internal.write(t+n+r+i+a),this.internal.write("endstream"),this.internal.write("endobj")},n=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(e,r){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:e,namespaceuri:r||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",n),this.internal.events.subscribe("postPutResources",t)),this}}(F.API),function(e){var t=e.API,n=t.pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,i=["","0","00","000","0000"],a=[""],o=0,s=e.length;o<s;++o){if(n=t.metadata.characterToGlyph(e.charCodeAt(o)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(o),-1==r.indexOf(n)&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),"0"==n)return a.join("");n=n.toString(16),a.push(i[4-n.length],n)}return a.join("")},r=function(e){var t,n,r,i,a,o,s;for(a="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",r=[],o=0,s=(n=Object.keys(e).sort((function(e,t){return e-t}))).length;o<s;o++)t=n[o],r.length>=100&&(a+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),void 0!==e[t]&&null!==e[t]&&"function"==typeof e[t].toString&&(i=("0000"+e[t].toString(16)).slice(-4),t=("0000"+(+t).toString(16)).slice(-4),r.push("<"+t+"><"+i+">"));return r.length&&(a+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),a+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};t.events.push(["putFont",function(t){!function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&"Identity-H"===n.encoding){for(var s=n.metadata.Unicode.widths,l=n.metadata.subset.encode(n.metadata.glyIdsUsed,1),c="",u=0;u<l.length;u++)c+=String.fromCharCode(l[u]);var d=a();o({data:c,addLength1:!0,objectId:d}),i("endobj");var h=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:h}),i("endobj");var f=a();i("<<"),i("/Type /FontDescriptor"),i("/FontName /"+D(n.fontName)),i("/FontFile2 "+d+" 0 R"),i("/FontBBox "+e.API.PDFObject.convert(n.metadata.bbox)),i("/Flags "+n.metadata.flags),i("/StemV "+n.metadata.stemV),i("/ItalicAngle "+n.metadata.italicAngle),i("/Ascent "+n.metadata.ascender),i("/Descent "+n.metadata.decender),i("/CapHeight "+n.metadata.capHeight),i(">>"),i("endobj");var p=a();i("<<"),i("/Type /Font"),i("/BaseFont /"+D(n.fontName)),i("/FontDescriptor "+f+" 0 R"),i("/W "+e.API.PDFObject.convert(s)),i("/CIDToGIDMap /Identity"),i("/DW 1000"),i("/Subtype /CIDFontType2"),i("/CIDSystemInfo"),i("<<"),i("/Supplement 0"),i("/Registry (Adobe)"),i("/Ordering ("+n.encoding+")"),i(">>"),i(">>"),i("endobj"),n.objectNumber=a(),i("<<"),i("/Type /Font"),i("/Subtype /Type0"),i("/ToUnicode "+h+" 0 R"),i("/BaseFont /"+D(n.fontName)),i("/Encoding /"+n.encoding),i("/DescendantFonts ["+p+" 0 R]"),i(">>"),i("endobj"),n.isAlreadyPutted=!0}}(t)}]),t.events.push(["putFont",function(t){!function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&"WinAnsiEncoding"===n.encoding){for(var s=n.metadata.rawData,l="",c=0;c<s.length;c++)l+=String.fromCharCode(s[c]);var u=a();o({data:l,addLength1:!0,objectId:u}),i("endobj");var d=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:d}),i("endobj");var h=a();i("<<"),i("/Descent "+n.metadata.decender),i("/CapHeight "+n.metadata.capHeight),i("/StemV "+n.metadata.stemV),i("/Type /FontDescriptor"),i("/FontFile2 "+u+" 0 R"),i("/Flags 96"),i("/FontBBox "+e.API.PDFObject.convert(n.metadata.bbox)),i("/FontName /"+D(n.fontName)),i("/ItalicAngle "+n.metadata.italicAngle),i("/Ascent "+n.metadata.ascender),i(">>"),i("endobj"),n.objectNumber=a();for(var f=0;f<n.metadata.hmtx.widths.length;f++)n.metadata.hmtx.widths[f]=parseInt(n.metadata.hmtx.widths[f]*(1e3/n.metadata.head.unitsPerEm));i("<</Subtype/TrueType/Type/Font/ToUnicode "+d+" 0 R/BaseFont/"+D(n.fontName)+"/FontDescriptor "+h+" 0 R/Encoding/"+n.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(n.metadata.hmtx.widths)+">>"),i("endobj"),n.isAlreadyPutted=!0}}(t)}]);var i=function(e){var t,r=e.text||"",i=e.x,a=e.y,o=e.options||{},s=e.mutex||{},l=s.pdfEscape,c=s.activeFontKey,u=s.fonts,d=c,h="",f=0,p="",m=u[d].encoding;if("Identity-H"!==u[d].encoding)return{text:r,x:i,y:a,options:o,mutex:s};for(p=r,d=c,Array.isArray(r)&&(p=r[0]),f=0;f<p.length;f+=1)u[d].metadata.hasOwnProperty("cmap")&&(t=u[d].metadata.cmap.unicode.codeMap[p[f].charCodeAt(0)]),t||p[f].charCodeAt(0)<256&&u[d].metadata.hasOwnProperty("Unicode")?h+=p[f]:h+="";var g="";return parseInt(d.slice(1))<14||"WinAnsiEncoding"===m?g=l(h,d).split("").map((function(e){return e.charCodeAt(0).toString(16)})).join(""):"Identity-H"===m&&(g=n(h,u[d])),s.isHex=!0,{text:g,x:i,y:a,options:o,mutex:s}};t.events.push(["postProcessText",function(e){var t=e.text||"",n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var a=0;for(a=0;a<t.length;a+=1)Array.isArray(t[a])&&3===t[a].length?n.push([i(Object.assign({},r,{text:t[a][0]})).text,t[a][1],t[a][2]]):n.push(i(Object.assign({},r,{text:t[a]})).text);e.text=n}else e.text=i(Object.assign({},r,{text:t})).text}])}(F),
/**
 * @license
 * jsPDF virtual FileSystem functionality
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(e){var t=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),void 0!==this.internal.vFS[e]},e.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},e.getFileFromVFS=function(e){return t.call(this),void 0!==this.internal.vFS[e]?this.internal.vFS[e]:null}}(F.API),
/**
 * @license
 * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
 * MIT License
 */
function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,i,a,o,s,l,c=t,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},f={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},p=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],m=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,v=0;this.__bidiEngine__={};var b=function(e){var t=e.charCodeAt(),n=t>>8,r=f[n];return void 0!==r?c[256*r+(255&t)]:252===n||253===n?"AL":m.test(n)?"L":8===n?"R":"N"},y=function(e){for(var t,n=0;n<e.length;n++){if("L"===(t=b(e.charAt(n))))return!1;if("R"===t)return!0}return!1},A=function(e,t,o,s){var l,c,u,d,h=t[s];switch(h){case"L":case"R":g=!1;break;case"N":case"AN":break;case"EN":g&&(h="AN");break;case"AL":g=!0,h="R";break;case"WS":h="N";break;case"CS":s<1||s+1>=t.length||"EN"!==(l=o[s-1])&&"AN"!==l||"EN"!==(c=t[s+1])&&"AN"!==c?h="N":g&&(c="AN"),h=c===l?c:"N";break;case"ES":h="EN"===(l=s>0?o[s-1]:"B")&&s+1<t.length&&"EN"===t[s+1]?"EN":"N";break;case"ET":if(s>0&&"EN"===o[s-1]){h="EN";break}if(g){h="N";break}for(u=s+1,d=t.length;u<d&&"ET"===t[u];)u++;h=u<d&&"EN"===t[u]?"EN":"N";break;case"NSM":if(i&&!a){for(d=t.length,u=s+1;u<d&&"NSM"===t[u];)u++;if(u<d){var f=e[s],p=f>=1425&&f<=2303||64286===f;if(l=t[u],p&&("R"===l||"AL"===l)){h="R";break}}}h=s<1||"B"===(l=t[s-1])?"N":o[s-1];break;case"B":g=!1,n=!0,h=v;break;case"S":r=!0,h="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":g=!1;break;case"BN":h="N"}return h},_=function(e,t,n){var r=e.split("");return n&&w(r,n,{hiLevel:v}),r.reverse(),t&&t.reverse(),r.join("")},w=function(e,t,i){var a,o,s,l,c,f=-1,p=e.length,m=0,y=[],_=v?d:u,w=[];for(g=!1,n=!1,r=!1,o=0;o<p;o++)w[o]=b(e[o]);for(s=0;s<p;s++){if(c=m,y[s]=A(e,w,y,s),a=240&(m=_[c][h[y[s]]]),m&=15,t[s]=l=_[m][5],a>0)if(16===a){for(o=f;o<s;o++)t[o]=1;f=-1}else f=-1;if(_[m][6])-1===f&&(f=s);else if(f>-1){for(o=f;o<s;o++)t[o]=l;f=-1}"B"===w[s]&&(t[s]=0),i.hiLevel|=l}r&&function(e,t,n){for(var r=0;r<n;r++)if("S"===e[r]){t[r]=v;for(var i=r-1;i>=0&&"WS"===e[i];i--)t[i]=v}}(w,t,p)},E=function(e,t,r,i,a){if(!(a.hiLevel<e)){if(1===e&&1===v&&!n)return t.reverse(),void(r&&r.reverse());for(var o,s,l,c,u=t.length,d=0;d<u;){if(i[d]>=e){for(l=d+1;l<u&&i[l]>=e;)l++;for(c=d,s=l-1;c<s;c++,s--)o=t[c],t[c]=t[s],t[s]=o,r&&(o=r[c],r[c]=r[s],r[s]=o);d=l}d++}}},S=function(e,t,n){var r=e.split(""),i={hiLevel:v};return n||(n=[]),w(r,n,i),function(e,t,n){if(0!==n.hiLevel&&l)for(var r,i=0;i<e.length;i++)1===t[i]&&(r=p.indexOf(e[i]))>=0&&(e[i]=p[r+1])}(r,n,i),E(2,r,t,n,i),E(1,r,t,n,i),r.join("")};return this.__bidiEngine__.doBidiReorder=function(e,t,n){if(function(e,t){if(t)for(var n=0;n<e.length;n++)t[n]=n;void 0===a&&(a=y(e)),void 0===s&&(s=y(e))}(e,t),i||!o||s)if(i&&o&&a^s)v=a?1:0,e=_(e,t,n);else if(!i&&o&&s)v=a?1:0,e=S(e,t,n),e=_(e,t);else if(!i||a||o||s){if(i&&!o&&a^s)e=_(e,t),a?(v=0,e=S(e,t,n)):(v=1,e=S(e,t,n),e=_(e,t));else if(i&&a&&!o&&s)v=1,e=S(e,t,n),e=_(e,t);else if(!i&&!o&&a^s){var r=l;a?(v=1,e=S(e,t,n),v=0,l=!1,e=S(e,t,n),l=r):(v=0,e=S(e,t,n),e=_(e,t),v=1,l=!1,e=S(e,t,n),l=r,e=_(e,t))}}else v=0,e=S(e,t,n);else v=a?1:0,e=S(e,t,n);return e},this.__bidiEngine__.setOptions=function(e){e&&(i=e.isInputVisual,o=e.isOutputVisual,a=e.isInputRtl,s=e.isOutputRtl,l=e.isSymmetricSwapping)},this.__bidiEngine__.setOptions(e),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(e){var t=e.text,r=(e.x,e.y,e.options||{}),i=(e.mutex,r.lang,[]);if(r.isInputVisual="boolean"!=typeof r.isInputVisual||r.isInputVisual,n.setOptions(r),"[object Array]"===Object.prototype.toString.call(t)){var a=0;for(i=[],a=0;a<t.length;a+=1)"[object Array]"===Object.prototype.toString.call(t[a])?i.push([n.doBidiReorder(t[a][0]),t[a][1],t[a][2]]):i.push([n.doBidiReorder(t[a])]);e.text=i}else e.text=n.doBidiReorder(t);n.setOptions({isInputVisual:!0})}])}(F),F.API.TTFFont=function(){function e(e){var t;if(this.rawData=e,t=this.contents=new rt(e),this.contents.pos=4,"ttcf"===t.readString(4))throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new wt(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new it(this.contents),this.head=new st(this),this.name=new pt(this),this.cmap=new ct(this),this.toUnicode={},this.hhea=new ut(this),this.maxp=new mt(this),this.hmtx=new gt(this),this.post=new ht(this),this.os2=new dt(this),this.loca=new _t(this),this.glyf=new bt(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var e,t,n,r,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,n,r,i;for(i=[],t=0,n=(r=this.bbox).length;t<n;t++)e=r[t],i.push(Math.round(e*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(n=255&(r=this.post.italic_angle),0!=(32768&(t=r>>16))&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(e){var t;return(null!=(t=this.cmap.unicode)?t.codeMap[e]:void 0)||0},e.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},e.prototype.widthOfString=function(e,t,n){var r,i,a,o;for(a=0,i=0,o=(e=""+e).length;0<=o?i<o:i>o;i=0<=o?++i:--i)r=e.charCodeAt(i),a+=this.widthOfGlyph(this.characterToGlyph(r))+n*(1e3/t)||0;return a*(t/1e3)},e.prototype.lineHeight=function(e,t){var n;return null==t&&(t=!1),n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},e}();var nt,rt=function(){function e(e){this.data=null!=e?e:[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(e){return this.data[this.pos++]=e},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},e.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},e.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},e.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(e){var t,n,r;for(r=[],t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)r.push(this.writeByte(e.charCodeAt(t)));return r},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(e){return this.writeInt16(e)},e.prototype.readLongLong=function(){var e,t,n,r,i,a,o,s;return e=this.readByte(),t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^a)+256*(255^o)+(255^s)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*r+16777216*i+65536*a+256*o+s},e.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(e){return this.writeInt32(e)},e.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},e.prototype.write=function(e){var t,n,r,i;for(i=[],n=0,r=e.length;n<r;n++)t=e[n],i.push(this.writeByte(t));return i},e}(),it=function(){var e;function t(e){var t,n,r;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},n=0,r=this.tableCount;0<=r?n<r:n>r;n=0<=r?++n:--n)t={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[t.tag]=t}return t.prototype.encode=function(t){var n,r,i,a,o,s,l,c,u,d,h,f,p;for(p in h=Object.keys(t).length,s=Math.log(2),u=16*Math.floor(Math.log(h)/s),a=Math.floor(u/s),c=16*h-u,(r=new rt).writeInt(this.scalarType),r.writeShort(h),r.writeShort(u),r.writeShort(a),r.writeShort(c),i=16*h,l=r.pos+i,o=null,f=[],t)for(d=t[p],r.writeString(p),r.writeInt(e(d)),r.writeInt(l),r.writeInt(d.length),f=f.concat(d),"head"===p&&(o=l),l+=d.length;l%4;)f.push(0),l++;return r.write(f),n=2981146554-e(r.data),r.pos=o+8,r.writeUInt32(n),r.data},e=function(e){var t,n,r,i;for(e=vt.call(e);e.length%4;)e.push(0);for(r=new rt(e),n=0,t=0,i=e.length;t<i;t=t+=4)n+=r.readUInt32();return 4294967295&n},t}(),at={}.hasOwnProperty,ot=function(e,t){for(var n in t)at.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};nt=function(){function e(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var st=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="head",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},t.prototype.encode=function(e){var t;return(t=new rt).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},t}(),lt=function(){function e(e,t){var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),u=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=e.readByte();break;case 4:for(h=e.readUInt16(),d=h/2,e.pos+=6,i=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),e.pos+=2,p=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),l=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),c=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),r=(this.length-e.pos+this.offset)/2,o=function(){var t,n;for(n=[],s=t=0;0<=r?t<r:t>r;s=0<=r?++t:--t)n.push(e.readUInt16());return n}(),s=g=0,b=i.length;g<b;s=++g)for(m=i[s],n=v=f=p[s];f<=m?v<=m:v>=m;n=f<=m?++v:--v)0===c[s]?a=n+l[s]:0!==(a=o[c[s]/2+(n-f)-(d-s)]||0)&&(a+=l[s]),this.codeMap[n]=65535&a}e.pos=u}return e.encode=function(e,t){var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x,O,I,M,P,D,N,L,R,B,j,F,U,H,z,V,W,G,q,Y;switch(O=new rt,a=Object.keys(e).sort((function(e,t){return e-t})),t){case"macroman":for(p=0,m=function(){var e=[];for(f=0;f<256;++f)e.push(0);return e}(),v={0:0},i={},I=0,N=a.length;I<N;I++)null==v[W=e[r=a[I]]]&&(v[W]=++p),i[r]={old:e[r],new:v[e[r]]},m[r]=v[e[r]];return O.writeUInt16(1),O.writeUInt16(0),O.writeUInt32(12),O.writeUInt16(0),O.writeUInt16(262),O.writeUInt16(0),O.write(m),{charMap:i,subtable:O.data,maxGlyphID:p+1};case"unicode":for(k=[],u=[],b=0,v={},n={},g=l=null,M=0,L=a.length;M<L;M++)null==v[A=e[r=a[M]]]&&(v[A]=++b),n[r]={old:A,new:v[A]},o=v[A]-r,null!=g&&o===l||(g&&u.push(g),k.push(r),l=o),g=r;for(g&&u.push(g),u.push(65535),k.push(65535),C=2*(S=k.length),E=2*Math.pow(Math.log(S)/Math.LN2,2),d=Math.log(E/2)/Math.LN2,w=2*S-E,s=[],_=[],h=[],f=P=0,R=k.length;P<R;f=++P){if(T=k[f],c=u[f],65535===T){s.push(0),_.push(0);break}if(T-(x=n[T].new)>=32768)for(s.push(0),_.push(2*(h.length+S-f)),r=D=T;T<=c?D<=c:D>=c;r=T<=c?++D:--D)h.push(n[r].new);else s.push(x-T),_.push(0)}for(O.writeUInt16(3),O.writeUInt16(1),O.writeUInt32(12),O.writeUInt16(4),O.writeUInt16(16+8*S+2*h.length),O.writeUInt16(0),O.writeUInt16(C),O.writeUInt16(E),O.writeUInt16(d),O.writeUInt16(w),z=0,B=u.length;z<B;z++)r=u[z],O.writeUInt16(r);for(O.writeUInt16(0),V=0,j=k.length;V<j;V++)r=k[V],O.writeUInt16(r);for(G=0,F=s.length;G<F;G++)o=s[G],O.writeUInt16(o);for(q=0,U=_.length;q<U;q++)y=_[q],O.writeUInt16(y);for(Y=0,H=h.length;Y<H;Y++)p=h[Y],O.writeUInt16(p);return{charMap:n,subtable:O.data,maxGlyphID:b+1}}},e}(),ct=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="cmap",t.prototype.parse=function(e){var t,n,r;for(e.pos=this.offset,this.version=e.readUInt16(),r=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=r?n<r:n>r;n=0<=r?++n:--n)t=new lt(e,this.offset),this.tables.push(t),t.isUnicode&&null==this.unicode&&(this.unicode=t);return!0},t.encode=function(e,t){var n,r;return null==t&&(t="macroman"),n=lt.encode(e,t),(r=new rt).writeUInt16(0),r.writeUInt16(1),n.table=r.data.concat(n.subtable),n},t}(),ut=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="hhea",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},t}(),dt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="OS/2",t.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,n;for(n=[],t=0;t<10;++t)n.push(e.readByte());return n}(),this.charRange=function(){var t,n;for(n=[],t=0;t<4;++t)n.push(e.readInt());return n}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,n;for(n=[],t=0;t<2;t=++t)n.push(e.readInt());return n}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},t}(),ht=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="post",t.prototype.parse=function(e){var t,n,r;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:break;case 131072:var i;for(n=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],r=[];e.pos<this.offset+this.length;)t=e.readByte(),r.push(this.names.push(e.readString(t)));return r;case 151552:return n=e.readUInt16(),this.offsets=e.read(n);case 196608:break;case 262144:return this.map=function(){var t,n,r;for(r=[],i=t=0,n=this.file.maxp.numGlyphs;0<=n?t<n:t>n;i=0<=n?++t:--t)r.push(e.readUInt32());return r}.call(this)}},t}(),ft=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},pt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="name",t.prototype.parse=function(e){var t,n,r,i,a,o,s,l,c,u,d;for(e.pos=this.offset,e.readShort(),t=e.readShort(),o=e.readShort(),n=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+o+e.readShort()});for(s={},i=c=0,u=n.length;c<u;i=++c)r=n[i],e.pos=r.offset,l=e.readString(r.length),a=new ft(l,r),null==s[d=r.nameID]&&(s[d]=[]),s[r.nameID].push(a);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(e){this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},t}(),mt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="maxp",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},t}(),gt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="hmtx",t.prototype.parse=function(e){var t,n,r,i,a,o,s;for(e.pos=this.offset,this.metrics=[],t=0,o=this.file.hhea.numberOfMetrics;0<=o?t<o:t>o;t=0<=o?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,i;for(i=[],t=n=0;0<=r?n<r:n>r;t=0<=r?++n:--n)i.push(e.readInt16());return i}(),this.widths=function(){var e,t,n,r;for(r=[],e=0,t=(n=this.metrics).length;e<t;e++)i=n[e],r.push(i.advance);return r}.call(this),n=this.widths[this.widths.length-1],s=[],t=a=0;0<=r?a<r:a>r;t=0<=r?++a:--a)s.push(this.widths.push(n));return s},t.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},t}(),vt=[].slice,bt=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(e){var t,n,r,i,a,o,s,l,c,u;return e in this.cache?this.cache[e]:(i=this.file.loca,t=this.file.contents,n=i.indexOf(e),0===(r=i.lengthOf(e))?this.cache[e]=null:(t.pos=this.offset+n,a=(o=new rt(t.read(r))).readShort(),l=o.readShort(),u=o.readShort(),s=o.readShort(),c=o.readShort(),this.cache[e]=-1===a?new At(o,l,u,s,c):new yt(o,a,l,u,s,c),this.cache[e]))},t.prototype.encode=function(e,t,n){var r,i,a,o,s;for(a=[],i=[],o=0,s=t.length;o<s;o++)r=e[t[o]],i.push(a.length),r&&(a=a.concat(r.encode(n)));return i.push(a.length),{table:a,offsets:i}},t}(),yt=function(){function e(e,t,n,r,i,a){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=a,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),At=function(){function e(e,t,n,r,i){var a,o;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=r,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],a=this.raw;o=a.readShort(),this.glyphOffsets.push(a.pos),this.glyphIDs.push(a.readUInt16()),32&o;)a.pos+=1&o?4:2,128&o?a.pos+=8:64&o?a.pos+=4:8&o&&(a.pos+=2)}return e.prototype.encode=function(){var e,t,n;for(t=new rt(vt.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},e}(),_t=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return ot(t,nt),t.prototype.tag="loca",t.prototype.parse=function(e){var t,n;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=0===t?function(){var t,r;for(r=[],n=0,t=this.length;n<t;n+=2)r.push(2*e.readUInt16());return r}.call(this):function(){var t,r;for(r=[],n=0,t=this.length;n<t;n+=4)r.push(e.readUInt32());return r}.call(this)},t.prototype.indexOf=function(e){return this.offsets[e]},t.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},t.prototype.encode=function(e,t){for(var n=new Uint32Array(this.offsets.length),r=0,i=0,a=0;a<n.length;++a)if(n[a]=r,i<t.length&&t[i]==a){++i,n[a]=r;var o=this.offsets[a],s=this.offsets[a+1]-o;s>0&&(r+=s)}for(var l=new Array(4*n.length),c=0;c<n.length;++c)l[4*c+3]=255&n[c],l[4*c+2]=(65280&n[c])>>8,l[4*c+1]=(16711680&n[c])>>16,l[4*c]=(4278190080&n[c])>>24;return l},t}(),wt=function(){function e(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var e,t,n,r,i;for(t in r=this.font.cmap.tables[0].codeMap,e={},i=this.subset)n=i[t],e[t]=r[n];return e},e.prototype.glyphsFor=function(e){var t,n,r,i,a,o,s;for(r={},a=0,o=e.length;a<o;a++)r[i=e[a]]=this.font.glyf.glyphFor(i);for(i in t=[],r)(null!=(n=r[i])?n.compound:void 0)&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(i in s=this.glyphsFor(t))n=s[i],r[i]=n;return r},e.prototype.encode=function(e,t){var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g;for(r in n=ct.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(e),h={0:0},g=n.charMap)h[(s=g[r]).old]=s.new;for(f in d=n.maxGlyphID,a)f in h||(h[f]=d++);return c=function(e){var t,n;for(t in n={},e)n[e[t]]=t;return n}(h),u=Object.keys(c).sort((function(e,t){return e-t})),p=function(){var e,t,n;for(n=[],e=0,t=u.length;e<t;e++)o=u[e],n.push(c[o]);return n}(),i=this.font.glyf.encode(a,p,h),l=this.font.loca.encode(i.offsets,p),m={cmap:this.font.cmap.raw(),glyf:i.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(m["OS/2"]=this.font.os2.raw()),this.font.directory.encode(m)},e}();F.API.PDFObject=function(){var e;function t(){}return e=function(e,t){return(Array(t+1).join("0")+e).slice(-t)},t.convert=function(n){var r,i,a,o;if(Array.isArray(n))return"["+function(){var e,i,a;for(a=[],e=0,i=n.length;e<i;e++)r=n[e],a.push(t.convert(r));return a}().join(" ")+"]";if("string"==typeof n)return"/"+n;if(null!=n?n.isString:void 0)return"("+n+")";if(n instanceof Date)return"(D:"+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(n)){for(i in a=["<<"],n)o=n[i],a.push("/"+i+" "+t.convert(o));return a.push(">>"),a.join("\n")}return""+n},t}()}).call(this,n(68))},function(e,t,n){(function(e){!function(t,n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x,O,I,M,P,D,N,L,R,B,j,F,U,H,z,V,W,G,q,Y,K,X,Q,$,J,Z,ee,te,ne,re,ie,ae,oe,se,le,ce){"use strict";function ue(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var de=ue(n),he=ue(i),fe=ue(a),pe=ue(o),me=ue(s),ge=ue(l),ve=ue(c),be=ue(u),ye=ue(d),Ae=ue(h),_e=ue(f),we=ue(g),Ee=ue(v),Se=ue(b),Ce=ue(y),Te=ue(A),ke=ue(_),xe=ue(w),Oe=ue(E),Ie=ue(S),Me=ue(C),Pe=ue(T),De=ue(k),Ne=ue(x),Le=ue(O),Re=ue(I),Be=ue(M),je=ue(P),Fe=ue(D),Ue=ue(N),He=ue(L),ze=ue(R),Ve=ue(B),We=ue(j),Ge=ue(F),qe=ue(H),Ye=ue(z),Ke=ue(V),Xe=ue(W),Qe=ue(G),$e=ue(q),Je=ue(Y),Ze=ue(Q),et=ue($),tt=ue(J),nt=ue(Z),rt=ue(ee),it=ue(te),at=ue(ne),ot=ue(re),st=ue(ie),lt=ue(ae),ct=ue(oe),ut=ue(se),dt=ue(ce);function ht(e){return(ht="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)}function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mt(e,t,n){return t&&pt(e.prototype,t),n&&pt(e,n),e}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vt(){return(vt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function At(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Et(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?wt(e):t}function St(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_t(e);if(t){var i=_t(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Et(this,n)}}function Ct(e){return function(e){if(Array.isArray(e))return Tt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kt(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function xt(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var Ot={p:xt,P:function(e,t){var n,r=e.match(/(P+)(p+)?/),i=r[1],a=r[2];if(!a)return kt(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",kt(i,t)).replace("{{time}}",xt(a,t))}},It=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function Mt(e){var t=e?"string"==typeof e||e instanceof String?ct.default(e):st.default(e):new Date;return Dt(t)?t:null}function Pt(e,t,n,r){var i=null,a=Qt(n)||Qt(Xt()),o=!0;return Array.isArray(t)?(t.forEach((function(t){var n=lt.default(e,t,new Date,{locale:a});r&&(o=Dt(n)&&e===me.default(n,t,{awareOfUnicodeTokens:!0})),Dt(n)&&o&&(i=n)})),i):(i=lt.default(e,t,new Date,{locale:a}),r?o=Dt(i)&&e===me.default(i,t,{awareOfUnicodeTokens:!0}):Dt(i)||(t=t.match(It).map((function(e){var t=e[0];return"p"===t||"P"===t?a?(0,Ot[t])(e,a.formatLong):t:e})).join(""),e.length>0&&(i=lt.default(e,t.slice(0,e.length),new Date)),Dt(i)||(i=new Date(e))),Dt(i)&&o?i:null)}function Dt(e){return pe.default(e)&&it.default(e,new Date("1/1/1000"))}function Nt(e,t,n){if("en"===n)return me.default(e,t,{awareOfUnicodeTokens:!0});var r=Qt(n);return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&Xt()&&Qt(Xt())&&(r=Qt(Xt())),me.default(e,t,{locale:r||null,awareOfUnicodeTokens:!0})}function Lt(e,t){var n=t.hour,r=void 0===n?0:n,i=t.minute,a=void 0===i?0:i,o=t.second,s=void 0===o?0:o;return je.default(Be.default(Re.default(e,s),a),r)}function Rt(e,t){var n=t&&Qt(t)||Xt()&&Qt(Xt());return Me.default(e,n?{locale:n}:null)}function Bt(e,t){return Nt(e,"ddd",t)}function jt(e){return Ye.default(e)}function Ft(e,t){var n=Qt(t||Xt());return Ke.default(e,{locale:n})}function Ut(e){return Xe.default(e)}function Ht(e){return $e.default(e)}function zt(e){return Qe.default(e)}function Vt(e,t){return e&&t?nt.default(e,t):!e&&!t}function Wt(e,t){return e&&t?tt.default(e,t):!e&&!t}function Gt(e,t){return e&&t?rt.default(e,t):!e&&!t}function qt(e,t){return e&&t?et.default(e,t):!e&&!t}function Yt(e,t){return e&&t?Ze.default(e,t):!e&&!t}function Kt(e,t,n){var r,i=Ye.default(t),a=Je.default(n);try{r=ot.default(e,{start:i,end:a})}catch(e){r=!1}return r}function Xt(){return("undefined"!=typeof window?window:e).__localeId__}function Qt(t){if("string"==typeof t){var n="undefined"!=typeof window?window:e;return n.__localeData__?n.__localeData__[t]:null}return t}function $t(e,t){return Nt(Fe.default(Mt(),e),"LLLL",t)}function Jt(e,t){return Nt(Fe.default(Mt(),e),"LLL",t)}function Zt(e,t){return Nt(Ue.default(Mt(),e),"QQQ",t)}function en(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,a=t.includeDates,o=t.filterDate;return ln(e,{minDate:n,maxDate:r})||i&&i.some((function(t){return qt(e,t)}))||a&&!a.some((function(t){return qt(e,t)}))||o&&!o(Mt(e))||!1}function tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeDates;return n&&n.some((function(t){return qt(e,t)}))||!1}function nn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,a=t.includeDates,o=t.filterDate;return ln(e,{minDate:n,maxDate:r})||i&&i.some((function(t){return Wt(e,t)}))||a&&!a.some((function(t){return Wt(e,t)}))||o&&!o(Mt(e))||!1}function rn(e,t,n,r){var i=Ne.default(e),a=Pe.default(e),o=Ne.default(t),s=Pe.default(t),l=Ne.default(r);return i===o&&i===l?a<=n&&n<=s:i<o?l===i&&a<=n||l===o&&s>=n||l<o&&l>i:void 0}function an(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,a=t.includeDates,o=t.filterDate;return ln(e,{minDate:n,maxDate:r})||i&&i.some((function(t){return Gt(e,t)}))||a&&!a.some((function(t){return Gt(e,t)}))||o&&!o(Mt(e))||!1}function on(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate,i=new Date(e,0,1);return ln(i,{minDate:n,maxDate:r})||!1}function sn(e,t,n,r){var i=Ne.default(e),a=De.default(e),o=Ne.default(t),s=De.default(t),l=Ne.default(r);return i===o&&i===l?a<=n&&n<=s:i<o?l===i&&a<=n||l===o&&s>=n||l<o&&l>i:void 0}function ln(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&We.default(e,n)<0||r&&We.default(e,r)>0}function cn(e,t){return t.some((function(t){return xe.default(t)===xe.default(e)&&ke.default(t)===ke.default(e)}))}function un(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&cn(e,n)||r&&!cn(e,r)||i&&!i(e)||!1}function dn(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,a=Mt(),o=je.default(Be.default(a,ke.default(e)),xe.default(e)),s=je.default(Be.default(a,ke.default(n)),xe.default(n)),l=je.default(Be.default(a,ke.default(r)),xe.default(r));try{i=!ot.default(o,{start:s,end:l})}catch(e){i=!1}return i}function hn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Se.default(e,1);return n&&Ge.default(n,i)>0||r&&r.every((function(e){return Ge.default(e,i)>0}))||!1}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=Ae.default(e,1);return n&&Ge.default(i,n)>0||r&&r.every((function(e){return Ge.default(i,e)>0}))||!1}function pn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Ce.default(e,1);return n&&qe.default(n,i)>0||r&&r.every((function(e){return qe.default(e,i)>0}))||!1}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=_e.default(e,1);return n&&qe.default(i,n)>0||r&&r.every((function(e){return qe.default(i,e)>0}))||!1}function gn(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter((function(e){return We.default(e,t)>=0}));return ze.default(r)}return n?ze.default(n):t}function vn(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter((function(e){return We.default(e,t)<=0}));return Ve.default(r)}return n?Ve.default(n):t}function bn(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r<i;r++){var a=e[r];if(fe.default(a)){var o=Nt(a,"MM.dd.yyyy"),s=n.get(o)||[];s.includes(t)||(s.push(t),n.set(o,s))}else if("object"===ht(a)){var l=Object.keys(a),c=l[0],u=a[l[0]];if("string"==typeof c&&u.constructor===Array)for(var d=0,h=u.length;d<h;d++){var f=Nt(u[d],"MM.dd.yyyy"),p=n.get(f)||[];p.includes(c)||(p.push(c),n.set(f,p))}}}return n}function yn(e,t,n,r,i){for(var a=i.length,o=[],s=0;s<a;s++){var l=ge.default(ve.default(e,xe.default(i[s])),ke.default(i[s])),c=ge.default(e,(n+1)*r);it.default(l,t)&&at.default(l,c)&&o.push(i[s])}return o}function An(e){return e<10?"0".concat(e):"".concat(e)}function _n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,n=Math.ceil(Ne.default(e)/t)*t,r=n-(t-1);return{startPeriod:r,endPeriod:n}}function wn(e,t,n,r){for(var i=[],a=0;a<2*t+1;a++){var o=e+t-a,s=!0;n&&(s=Ne.default(n)<=o),r&&s&&(s=Ne.default(r)>=o),s&&i.push(o)}return i}var En=function(e){At(n,e);var t=St(n);function n(e){var r;ft(this,n),gt(wt(r=t.call(this,e)),"renderOptions",(function(){var e=r.props.year,t=r.state.yearsList.map((function(t){return de.default.createElement("div",{className:e===t?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:t,onClick:r.onChange.bind(wt(r),t)},e===t?de.default.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",t)})),n=r.props.minDate?Ne.default(r.props.minDate):null,i=r.props.maxDate?Ne.default(r.props.maxDate):null;return i&&r.state.yearsList.find((function(e){return e===i}))||t.unshift(de.default.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:r.incrementYears},de.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),n&&r.state.yearsList.find((function(e){return e===n}))||t.push(de.default.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:r.decrementYears},de.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),t})),gt(wt(r),"onChange",(function(e){r.props.onChange(e)})),gt(wt(r),"handleClickOutside",(function(){r.props.onCancel()})),gt(wt(r),"shiftYears",(function(e){var t=r.state.yearsList.map((function(t){return t+e}));r.setState({yearsList:t})})),gt(wt(r),"incrementYears",(function(){return r.shiftYears(1)})),gt(wt(r),"decrementYears",(function(){return r.shiftYears(-1)}));var i=e.yearDropdownItemNumber,a=e.scrollableYearDropdown,o=i||(a?10:5);return r.state={yearsList:wn(r.props.year,o,r.props.minDate,r.props.maxDate)},r}return mt(n,[{key:"render",value:function(){var e=he.default({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return de.default.createElement("div",{className:e},this.renderOptions())}}]),n}(de.default.Component),Sn=ut.default(En),Cn=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"state",{dropdownVisible:!1}),gt(wt(e),"renderSelectOptions",(function(){for(var t=e.props.minDate?Ne.default(e.props.minDate):1900,n=e.props.maxDate?Ne.default(e.props.maxDate):2100,r=[],i=t;i<=n;i++)r.push(de.default.createElement("option",{key:i,value:i},i));return r})),gt(wt(e),"onSelectChange",(function(t){e.onChange(t.target.value)})),gt(wt(e),"renderSelectMode",(function(){return de.default.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())})),gt(wt(e),"renderReadView",(function(t){return de.default.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(t){return e.toggleDropdown(t)}},de.default.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),de.default.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))})),gt(wt(e),"renderDropdown",(function(){return de.default.createElement(Sn,{key:"dropdown",year:e.props.year,onChange:e.onChange,onCancel:e.toggleDropdown,minDate:e.props.minDate,maxDate:e.props.maxDate,scrollableYearDropdown:e.props.scrollableYearDropdown,yearDropdownItemNumber:e.props.yearDropdownItemNumber})})),gt(wt(e),"renderScrollMode",(function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n})),gt(wt(e),"onChange",(function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)})),gt(wt(e),"toggleDropdown",(function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},(function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)}))})),gt(wt(e),"handleYearChange",(function(t,n){e.onSelect(t,n),e.setOpen()})),gt(wt(e),"onSelect",(function(t,n){e.props.onSelect&&e.props.onSelect(t,n)})),gt(wt(e),"setOpen",(function(){e.props.setOpen&&e.props.setOpen(!0)})),e}return mt(n,[{key:"render",value:function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode()}return de.default.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),n}(de.default.Component),Tn=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"renderOptions",(function(){return e.props.monthNames.map((function(t,n){return de.default.createElement("div",{className:e.props.month===n?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(wt(e),n)},e.props.month===n?de.default.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)}))})),gt(wt(e),"onChange",(function(t){return e.props.onChange(t)})),gt(wt(e),"handleClickOutside",(function(){return e.props.onCancel()})),e}return mt(n,[{key:"render",value:function(){return de.default.createElement("div",{className:"react-datepicker__month-dropdown"},this.renderOptions())}}]),n}(de.default.Component),kn=ut.default(Tn),xn=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"state",{dropdownVisible:!1}),gt(wt(e),"renderSelectOptions",(function(e){return e.map((function(e,t){return de.default.createElement("option",{key:t,value:t},e)}))})),gt(wt(e),"renderSelectMode",(function(t){return de.default.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(t){return e.onChange(t.target.value)}},e.renderSelectOptions(t))})),gt(wt(e),"renderReadView",(function(t,n){return de.default.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},de.default.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),de.default.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},n[e.props.month]))})),gt(wt(e),"renderDropdown",(function(t){return de.default.createElement(kn,{key:"dropdown",month:e.props.month,monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown})})),gt(wt(e),"renderScrollMode",(function(t){var n=e.state.dropdownVisible,r=[e.renderReadView(!n,t)];return n&&r.unshift(e.renderDropdown(t)),r})),gt(wt(e),"onChange",(function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)})),gt(wt(e),"toggleDropdown",(function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})})),e}return mt(n,[{key:"render",value:function(){var e,t=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(e){return Jt(e,t.props.locale)}:function(e){return $t(e,t.props.locale)});switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode(n);break;case"select":e=this.renderSelectMode(n)}return de.default.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),n}(de.default.Component);function On(e,t){for(var n=[],r=Ut(e),i=Ut(t);!it.default(r,i);)n.push(Mt(r)),r=Ae.default(r,1);return n}var In=function(e){At(n,e);var t=St(n);function n(e){var r;return ft(this,n),gt(wt(r=t.call(this,e)),"renderOptions",(function(){return r.state.monthYearsList.map((function(e){var t=Le.default(e),n=Vt(r.props.date,e)&&Wt(r.props.date,e);return de.default.createElement("div",{className:n?"react-datepicker__month-year-option --selected_month-year":"react-datepicker__month-year-option",key:t,onClick:r.onChange.bind(wt(r),t)},n?de.default.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Nt(e,r.props.dateFormat,r.props.locale))}))})),gt(wt(r),"onChange",(function(e){return r.props.onChange(e)})),gt(wt(r),"handleClickOutside",(function(){r.props.onCancel()})),r.state={monthYearsList:On(r.props.minDate,r.props.maxDate)},r}return mt(n,[{key:"render",value:function(){var e=he.default({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return de.default.createElement("div",{className:e},this.renderOptions())}}]),n}(de.default.Component),Mn=ut.default(In),Pn=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"state",{dropdownVisible:!1}),gt(wt(e),"renderSelectOptions",(function(){for(var t=Ut(e.props.minDate),n=Ut(e.props.maxDate),r=[];!it.default(t,n);){var i=Le.default(t);r.push(de.default.createElement("option",{key:i,value:i},Nt(t,e.props.dateFormat,e.props.locale))),t=Ae.default(t,1)}return r})),gt(wt(e),"onSelectChange",(function(t){e.onChange(t.target.value)})),gt(wt(e),"renderSelectMode",(function(){return de.default.createElement("select",{value:Le.default(Ut(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())})),gt(wt(e),"renderReadView",(function(t){var n=Nt(e.props.date,e.props.dateFormat,e.props.locale);return de.default.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:function(t){return e.toggleDropdown(t)}},de.default.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),de.default.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},n))})),gt(wt(e),"renderDropdown",(function(){return de.default.createElement(Mn,{key:"dropdown",date:e.props.date,dateFormat:e.props.dateFormat,onChange:e.onChange,onCancel:e.toggleDropdown,minDate:e.props.minDate,maxDate:e.props.maxDate,scrollableMonthYearDropdown:e.props.scrollableMonthYearDropdown,locale:e.props.locale})})),gt(wt(e),"renderScrollMode",(function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n})),gt(wt(e),"onChange",(function(t){e.toggleDropdown();var n=Mt(parseInt(t));Vt(e.props.date,n)&&Wt(e.props.date,n)||e.props.onChange(n)})),gt(wt(e),"toggleDropdown",(function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})})),e}return mt(n,[{key:"render",value:function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode()}return de.default.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),n}(de.default.Component),Dn=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"dayEl",de.default.createRef()),gt(wt(e),"handleClick",(function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)})),gt(wt(e),"handleMouseEnter",(function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)})),gt(wt(e),"handleOnKeyDown",(function(t){" "===t.key&&(t.preventDefault(),t.key="Enter"),e.props.handleOnKeyDown(t)})),gt(wt(e),"isSameDay",(function(t){return qt(e.props.day,t)})),gt(wt(e),"isKeyboardSelected",(function(){return!e.props.disabledKeyboardNavigation&&!e.isSameDay(e.props.selected)&&e.isSameDay(e.props.preSelection)})),gt(wt(e),"isDisabled",(function(){return en(e.props.day,e.props)})),gt(wt(e),"isExcluded",(function(){return tn(e.props.day,e.props)})),gt(wt(e),"getHighLightedClass",(function(t){var n=e.props,r=n.day,i=n.highlightDates;if(!i)return!1;var a=Nt(r,"MM.dd.yyyy");return i.get(a)})),gt(wt(e),"isInRange",(function(){var t=e.props,n=t.day,r=t.startDate,i=t.endDate;return!(!r||!i)&&Kt(n,r,i)})),gt(wt(e),"isInSelectingRange",(function(){var t=e.props,n=t.day,r=t.selectsStart,i=t.selectsEnd,a=t.selectsRange,o=t.selectingDate,s=t.startDate,l=t.endDate;return!(!(r||i||a)||!o||e.isDisabled())&&(r&&l&&(at.default(o,l)||Yt(o,l))?Kt(n,o,l):(i&&s&&(it.default(o,s)||Yt(o,s))||!(!a||!s||l||!it.default(o,s)&&!Yt(o,s)))&&Kt(n,s,o))})),gt(wt(e),"isSelectingRangeStart",(function(){if(!e.isInSelectingRange())return!1;var t=e.props,n=t.day,r=t.selectingDate,i=t.startDate;return qt(n,t.selectsStart?r:i)})),gt(wt(e),"isSelectingRangeEnd",(function(){if(!e.isInSelectingRange())return!1;var t=e.props,n=t.day,r=t.selectingDate,i=t.endDate;return qt(n,t.selectsEnd?r:i)})),gt(wt(e),"isRangeStart",(function(){var t=e.props,n=t.day,r=t.startDate,i=t.endDate;return!(!r||!i)&&qt(r,n)})),gt(wt(e),"isRangeEnd",(function(){var t=e.props,n=t.day,r=t.startDate,i=t.endDate;return!(!r||!i)&&qt(i,n)})),gt(wt(e),"isWeekend",(function(){var t=Oe.default(e.props.day);return 0===t||6===t})),gt(wt(e),"isOutsideMonth",(function(){return void 0!==e.props.month&&e.props.month!==Pe.default(e.props.day)})),gt(wt(e),"getClassNames",(function(t){var n=e.props.dayClassName?e.props.dayClassName(t):void 0;return he.default("react-datepicker__day",n,"react-datepicker__day--"+Bt(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSameDay(e.props.selected),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isSameDay(Mt()),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isOutsideMonth()},e.getHighLightedClass("react-datepicker__day--highlighted"))})),gt(wt(e),"getAriaLabel",(function(){var t=e.props,n=t.day,r=t.ariaLabelPrefixWhenEnabled,i=void 0===r?"Choose":r,a=t.ariaLabelPrefixWhenDisabled,o=void 0===a?"Not available":a,s=e.isDisabled()||e.isExcluded()?o:i;return"".concat(s," ").concat(Nt(n,"PPPP"))})),gt(wt(e),"getTabIndex",(function(t,n){var r=t||e.props.selected,i=n||e.props.preSelection;return e.isKeyboardSelected()||e.isSameDay(r)&&qt(i,r)?0:-1})),gt(wt(e),"handleFocusDay",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1;0===e.getTabIndex()&&!t.isInputFocused&&e.isSameDay(e.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(n=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(n=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(n=!0)),n&&e.dayEl.current.focus({preventScroll:!0})})),gt(wt(e),"renderDayContents",(function(){if(e.isOutsideMonth()){if(e.props.monthShowsDuplicateDaysEnd&&Ie.default(e.props.day)<10)return null;if(e.props.monthShowsDuplicateDaysStart&&Ie.default(e.props.day)>20)return null}return e.props.renderDayContents?e.props.renderDayContents(Ie.default(e.props.day),e.props.day):Ie.default(e.props.day)})),gt(wt(e),"render",(function(){return de.default.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"button","aria-disabled":e.isDisabled()},e.renderDayContents())})),e}return mt(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(e){this.handleFocusDay(e)}}]),n}(de.default.Component),Nn=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"handleClick",(function(t){e.props.onClick&&e.props.onClick(t)})),e}return mt(n,[{key:"render",value:function(){var e=this.props,t=e.weekNumber,n=e.ariaLabelPrefix,r=void 0===n?"week ":n,i={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!e.onClick};return de.default.createElement("div",{className:he.default(i),"aria-label":"".concat(r," ").concat(this.props.weekNumber),onClick:this.handleClick},t)}}]),n}(de.default.Component),Ln=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"handleDayClick",(function(t,n){e.props.onDayClick&&e.props.onDayClick(t,n)})),gt(wt(e),"handleDayMouseEnter",(function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)})),gt(wt(e),"handleWeekClick",(function(t,n,r){"function"==typeof e.props.onWeekSelect&&e.props.onWeekSelect(t,n,r),e.props.shouldCloseOnSelect&&e.props.setOpen(!1)})),gt(wt(e),"formatWeekNumber",(function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):Rt(t)})),gt(wt(e),"renderDays",(function(){var t=Ft(e.props.day,e.props.locale),n=[],r=e.formatWeekNumber(t);if(e.props.showWeekNumber){var i=e.props.onWeekSelect?e.handleWeekClick.bind(wt(e),t,r):void 0;n.push(de.default.createElement(Nn,{key:"W",weekNumber:r,onClick:i,ariaLabelPrefix:e.props.ariaLabelPrefix}))}return n.concat([0,1,2,3,4,5,6].map((function(n){var r=be.default(t,n);return de.default.createElement(Dn,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:r.valueOf(),day:r,month:e.props.month,onClick:e.handleDayClick.bind(wt(e),r),onMouseEnter:e.handleDayMouseEnter.bind(wt(e),r),minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,highlightDates:e.props.highlightDates,selectingDate:e.props.selectingDate,filterDate:e.props.filterDate,preSelection:e.props.preSelection,selected:e.props.selected,selectsStart:e.props.selectsStart,selectsEnd:e.props.selectsEnd,selectsRange:e.props.selectsRange,startDate:e.props.startDate,endDate:e.props.endDate,dayClassName:e.props.dayClassName,renderDayContents:e.props.renderDayContents,disabledKeyboardNavigation:e.props.disabledKeyboardNavigation,handleOnKeyDown:e.props.handleOnKeyDown,isInputFocused:e.props.isInputFocused,containerRef:e.props.containerRef,inline:e.props.inline,shouldFocusDayInline:e.props.shouldFocusDayInline,monthShowsDuplicateDaysEnd:e.props.monthShowsDuplicateDaysEnd,monthShowsDuplicateDaysStart:e.props.monthShowsDuplicateDaysStart})})))})),e}return mt(n,[{key:"render",value:function(){return de.default.createElement("div",{className:"react-datepicker__week"},this.renderDays())}}],[{key:"defaultProps",get:function(){return{shouldCloseOnSelect:!0}}}]),n}(de.default.Component),Rn=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"MONTH_REFS",Ct(Array(12)).map((function(){return de.default.createRef()}))),gt(wt(e),"isDisabled",(function(t){return en(t,e.props)})),gt(wt(e),"isExcluded",(function(t){return tn(t,e.props)})),gt(wt(e),"handleDayClick",(function(t,n){e.props.onDayClick&&e.props.onDayClick(t,n,e.props.orderInDisplay)})),gt(wt(e),"handleDayMouseEnter",(function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)})),gt(wt(e),"handleMouseLeave",(function(){e.props.onMouseLeave&&e.props.onMouseLeave()})),gt(wt(e),"isRangeStartMonth",(function(t){var n=e.props,r=n.day,i=n.startDate,a=n.endDate;return!(!i||!a)&&Wt(Fe.default(r,t),i)})),gt(wt(e),"isRangeStartQuarter",(function(t){var n=e.props,r=n.day,i=n.startDate,a=n.endDate;return!(!i||!a)&&Gt(Ue.default(r,t),i)})),gt(wt(e),"isRangeEndMonth",(function(t){var n=e.props,r=n.day,i=n.startDate,a=n.endDate;return!(!i||!a)&&Wt(Fe.default(r,t),a)})),gt(wt(e),"isRangeEndQuarter",(function(t){var n=e.props,r=n.day,i=n.startDate,a=n.endDate;return!(!i||!a)&&Gt(Ue.default(r,t),a)})),gt(wt(e),"isWeekInMonth",(function(t){var n=e.props.day,r=be.default(t,6);return Wt(t,n)||Wt(r,n)})),gt(wt(e),"renderWeeks",(function(){for(var t=[],n=e.props.fixedHeight,r=Ft(Ut(e.props.day),e.props.locale),i=0,a=!1;t.push(de.default.createElement(Ln,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,chooseDayAriaLabelPrefix:e.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:e.props.disabledDayAriaLabelPrefix,key:i,day:r,month:Pe.default(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,onWeekSelect:e.props.onWeekSelect,formatWeekNumber:e.props.formatWeekNumber,locale:e.props.locale,minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,inline:e.props.inline,shouldFocusDayInline:e.props.shouldFocusDayInline,highlightDates:e.props.highlightDates,selectingDate:e.props.selectingDate,filterDate:e.props.filterDate,preSelection:e.props.preSelection,selected:e.props.selected,selectsStart:e.props.selectsStart,selectsEnd:e.props.selectsEnd,selectsRange:e.props.selectsRange,showWeekNumber:e.props.showWeekNumbers,startDate:e.props.startDate,endDate:e.props.endDate,dayClassName:e.props.dayClassName,setOpen:e.props.setOpen,shouldCloseOnSelect:e.props.shouldCloseOnSelect,disabledKeyboardNavigation:e.props.disabledKeyboardNavigation,renderDayContents:e.props.renderDayContents,handleOnKeyDown:e.props.handleOnKeyDown,isInputFocused:e.props.isInputFocused,containerRef:e.props.containerRef,monthShowsDuplicateDaysEnd:e.props.monthShowsDuplicateDaysEnd,monthShowsDuplicateDaysStart:e.props.monthShowsDuplicateDaysStart})),!a;){i++,r=ye.default(r,1);var o=n&&i>=6,s=!n&&!e.isWeekInMonth(r);if(o||s){if(!e.props.peekNextMonth)break;a=!0}}return t})),gt(wt(e),"onMonthClick",(function(t,n){e.handleDayClick(Ut(Fe.default(e.props.day,n)),t)})),gt(wt(e),"handleMonthNavigation",(function(t,n){e.isDisabled(n)||e.isExcluded(n)||(e.props.setPreSelection(n),e.MONTH_REFS[t].current&&e.MONTH_REFS[t].current.focus())})),gt(wt(e),"onMonthKeyDown",(function(t,n){var r=t.key;if(!e.props.disabledKeyboardNavigation)switch(r){case"Enter":e.onMonthClick(t,n),e.props.setPreSelection(e.props.selected);break;case"ArrowRight":e.handleMonthNavigation(11===n?0:n+1,Ae.default(e.props.preSelection,1));break;case"ArrowLeft":e.handleMonthNavigation(0===n?11:n-1,Se.default(e.props.preSelection,1))}})),gt(wt(e),"onQuarterClick",(function(t,n){e.handleDayClick(zt(Ue.default(e.props.day,n)),t)})),gt(wt(e),"getMonthClassNames",(function(t){var n=e.props,r=n.day,i=n.startDate,a=n.endDate,o=n.selected,s=n.minDate,l=n.maxDate,c=n.preSelection,u=n.monthClassName,d=u?u(r):void 0;return he.default("react-datepicker__month-text","react-datepicker__month-".concat(t),d,{"react-datepicker__month--disabled":(s||l)&&nn(Fe.default(r,t),e.props),"react-datepicker__month--selected":Pe.default(r)===t&&Ne.default(r)===Ne.default(o),"react-datepicker__month-text--keyboard-selected":Pe.default(c)===t,"react-datepicker__month--in-range":rn(i,a,t,r),"react-datepicker__month--range-start":e.isRangeStartMonth(t),"react-datepicker__month--range-end":e.isRangeEndMonth(t)})})),gt(wt(e),"getTabIndex",(function(t){var n=Pe.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==n?"-1":"0"})),gt(wt(e),"getAriaLabel",(function(t){var n=e.props,r=n.ariaLabelPrefix,i=void 0===r?"Choose":r,a=n.disabledDayAriaLabelPrefix,o=void 0===a?"Not available":a,s=n.day,l=Fe.default(s,t),c=e.isDisabled(l)||e.isExcluded(l)?o:i;return"".concat(c," ").concat(Nt(l,"MMMM yyyy"))})),gt(wt(e),"getQuarterClassNames",(function(t){var n=e.props,r=n.day,i=n.startDate,a=n.endDate,o=n.selected,s=n.minDate,l=n.maxDate;return he.default("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter--disabled":(s||l)&&an(Ue.default(r,t),e.props),"react-datepicker__quarter--selected":De.default(r)===t&&Ne.default(r)===Ne.default(o),"react-datepicker__quarter--in-range":sn(i,a,t,r),"react-datepicker__quarter--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter--range-end":e.isRangeEndQuarter(t)})})),gt(wt(e),"renderMonths",(function(){var t=e.props,n=t.showFullMonthYearPicker,r=t.showTwoColumnMonthYearPicker,i=t.showFourColumnMonthYearPicker,a=t.locale;return(i?[[0,1,2,3],[4,5,6,7],[8,9,10,11]]:r?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map((function(t,r){return de.default.createElement("div",{className:"react-datepicker__month-wrapper",key:r},t.map((function(t,r){return de.default.createElement("div",{ref:e.MONTH_REFS[t],key:r,onClick:function(n){e.onMonthClick(n,t)},onKeyDown:function(n){e.onMonthKeyDown(n,t)},tabIndex:e.getTabIndex(t),className:e.getMonthClassNames(t),role:"button","aria-label":e.getAriaLabel(t)},n?$t(t,a):Jt(t,a))})))}))})),gt(wt(e),"renderQuarters",(function(){return de.default.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map((function(t,n){return de.default.createElement("div",{key:n,onClick:function(n){e.onQuarterClick(n,t)},className:e.getQuarterClassNames(t)},Zt(t,e.props.locale))})))})),gt(wt(e),"getClassNames",(function(){var t=e.props;t.day;var n=t.selectingDate,r=t.selectsStart,i=t.selectsEnd,a=t.showMonthYearPicker,o=t.showQuarterYearPicker;return he.default("react-datepicker__month",{"react-datepicker__month--selecting-range":n&&(r||i)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":o})})),e}return mt(n,[{key:"render",value:function(){var e=this.props,t=e.showMonthYearPicker,n=e.showQuarterYearPicker,r=e.day,i=e.ariaLabelPrefix,a=void 0===i?"month ":i;return de.default.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(a," ").concat(Nt(r,"yyyy-MM"))},t?this.renderMonths():n?this.renderQuarters():this.renderWeeks())}}]),n}(de.default.Component),Bn=function(e){At(n,e);var t=St(n);function n(){var e;ft(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"state",{height:null}),gt(wt(e),"handleClick",(function(t){(e.props.minTime||e.props.maxTime)&&dn(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&un(t,e.props)||e.props.onChange(t)})),gt(wt(e),"liClasses",(function(t,n,r){var i=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t,n,r):void 0];return e.props.selected&&n===xe.default(t)&&r===ke.default(t)&&i.push("react-datepicker__time-list-item--selected"),((e.props.minTime||e.props.maxTime)&&dn(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&un(t,e.props))&&i.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(60*xe.default(t)+ke.default(t))%e.props.intervals!=0&&i.push("react-datepicker__time-list-item--injected"),i.join(" ")})),gt(wt(e),"renderTimes",(function(){for(var t=[],n=e.props.format?e.props.format:"p",r=e.props.intervals,i=jt(Mt(e.props.selected)),a=1440/r,o=e.props.injectTimes&&e.props.injectTimes.sort((function(e,t){return e-t})),s=e.props.selected||e.props.openToDate||Mt(),l=xe.default(s),c=ke.default(s),u=je.default(Be.default(i,c),l),d=0;d<a;d++){var h=ge.default(i,d*r);if(t.push(h),o){var f=yn(i,h,d,r,o);t=t.concat(f)}}return t.map((function(t,r){return de.default.createElement("li",{key:r,onClick:e.handleClick.bind(wt(e),t),className:e.liClasses(t,l,c),ref:function(n){(at.default(t,u)||Yt(t,u))&&(e.centerLi=n)},tabIndex:"0"},Nt(t,n,e.props.locale))}))})),e}return mt(n,[{key:"componentDidMount",value:function(){this.list.scrollTop=n.calcCenterPosition(this.props.monthRef?this.props.monthRef.clientHeight-this.header.clientHeight:this.list.clientHeight,this.centerLi),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})}},{key:"render",value:function(){var e=this,t=this.state.height;return de.default.createElement("div",{className:"react-datepicker__time-container ".concat(this.props.todayButton?"react-datepicker__time-container--with-today-button":"")},de.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(this.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},de.default.createElement("div",{className:"react-datepicker-time__header"},this.props.timeCaption)),de.default.createElement("div",{className:"react-datepicker__time"},de.default.createElement("div",{className:"react-datepicker__time-box"},de.default.createElement("ul",{className:"react-datepicker__time-list",ref:function(t){e.list=t},style:t?{height:t}:{},tabIndex:"0"},this.renderTimes()))))}}],[{key:"defaultProps",get:function(){return{intervals:30,onTimeChange:function(){},todayButton:null,timeCaption:"Time"}}}]),n}(de.default.Component);gt(Bn,"calcCenterPosition",(function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)}));var jn=function(e){At(n,e);var t=St(n);function n(e){var r;return ft(this,n),gt(wt(r=t.call(this,e)),"handleYearClick",(function(e,t){r.props.onDayClick&&r.props.onDayClick(e,t)})),gt(wt(r),"isSameDay",(function(e,t){return qt(e,t)})),gt(wt(r),"isKeyboardSelected",(function(e){var t=Ht(He.default(r.props.date,e));return!r.props.disabledKeyboardNavigation&&!r.props.inline&&!qt(t,Ht(r.props.selected))&&qt(t,Ht(r.props.preSelection))})),gt(wt(r),"onYearClick",(function(e,t){var n=r.props.date;r.handleYearClick(Ht(He.default(n,t)),e)})),gt(wt(r),"getYearClassNames",(function(e){var t=r.props,n=t.minDate,i=t.maxDate,a=t.selected;return he.default("react-datepicker__year-text",{"react-datepicker__year-text--selected":e===Ne.default(a),"react-datepicker__year-text--disabled":(n||i)&&on(e,r.props),"react-datepicker__year-text--keyboard-selected":r.isKeyboardSelected(e),"react-datepicker__year-text--today":e===Ne.default(Mt())})})),r}return mt(n,[{key:"render",value:function(){for(var e=this,t=[],n=this.props,r=_n(n.date,n.yearItemNumber),i=r.startPeriod,a=r.endPeriod,o=function(n){t.push(de.default.createElement("div",{onClick:function(t){e.onYearClick(t,n)},className:e.getYearClassNames(n),key:n},n))},s=i;s<=a;s++)o(s);return de.default.createElement("div",{className:"react-datepicker__year"},de.default.createElement("div",{className:"react-datepicker__year-wrapper"},t))}}]),n}(de.default.Component),Fn=function(e){At(n,e);var t=St(n);function n(e){var r;return ft(this,n),gt(wt(r=t.call(this,e)),"onTimeChange",(function(e){r.setState({time:e});var t=new Date;t.setHours(e.split(":")[0]),t.setMinutes(e.split(":")[1]),r.props.onChange(t)})),gt(wt(r),"renderTimeInput",(function(){var e=r.state.time,t=r.props,n=t.date,i=t.timeString,a=t.customTimeInput;return a?de.default.cloneElement(a,{date:n,value:e,onChange:r.onTimeChange}):de.default.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",required:!0,value:e,onChange:function(e){r.onTimeChange(e.target.value||i)}})})),r.state={time:r.props.timeString},r}return mt(n,[{key:"render",value:function(){return de.default.createElement("div",{className:"react-datepicker__input-time-container"},de.default.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),de.default.createElement("div",{className:"react-datepicker-time__input-container"},de.default.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.timeString!==t.time?{time:e.timeString}:null}}]),n}(de.default.Component);function Un(e){var t=e.className,n=e.children,r=e.showPopperArrow,i=e.arrowProps,a=void 0===i?{}:i;return de.default.createElement("div",{className:t},r&&de.default.createElement("div",vt({className:"react-datepicker__triangle"},a)),n)}var Hn=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],zn=function(e){At(n,e);var t=St(n);function n(e){var r;return ft(this,n),gt(wt(r=t.call(this,e)),"handleClickOutside",(function(e){r.props.onClickOutside(e)})),gt(wt(r),"setClickOutsideRef",(function(){return r.containerRef.current})),gt(wt(r),"handleDropdownFocus",(function(e){(function(){var e=((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).className||"").split(/\s+/);return Hn.some((function(t){return e.indexOf(t)>=0}))})(e.target)&&r.props.onDropdownFocus()})),gt(wt(r),"getDateInView",(function(){var e=r.props,t=e.preSelection,n=e.selected,i=e.openToDate,a=gn(r.props),o=vn(r.props),s=Mt();return i||n||t||(a&&at.default(s,a)?a:o&&it.default(s,o)?o:s)})),gt(wt(r),"increaseMonth",(function(){r.setState((function(e){var t=e.date;return{date:Ae.default(t,1)}}),(function(){return r.handleMonthChange(r.state.date)}))})),gt(wt(r),"decreaseMonth",(function(){r.setState((function(e){var t=e.date;return{date:Se.default(t,1)}}),(function(){return r.handleMonthChange(r.state.date)}))})),gt(wt(r),"handleDayClick",(function(e,t,n){r.props.onSelect(e,t,n),r.props.setPreSelection&&r.props.setPreSelection(e)})),gt(wt(r),"handleDayMouseEnter",(function(e){r.setState({selectingDate:e}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(e)})),gt(wt(r),"handleMonthMouseLeave",(function(){r.setState({selectingDate:null}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()})),gt(wt(r),"handleYearChange",(function(e){r.props.onYearChange&&r.props.onYearChange(e),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(e),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(e)})),gt(wt(r),"handleMonthChange",(function(e){r.props.onMonthChange&&r.props.onMonthChange(e),r.props.adjustDateOnChange&&(r.props.onSelect&&r.props.onSelect(e),r.props.setOpen&&r.props.setOpen(!0)),r.props.setPreSelection&&r.props.setPreSelection(e)})),gt(wt(r),"handleMonthYearChange",(function(e){r.handleYearChange(e),r.handleMonthChange(e)})),gt(wt(r),"changeYear",(function(e){r.setState((function(t){var n=t.date;return{date:He.default(n,e)}}),(function(){return r.handleYearChange(r.state.date)}))})),gt(wt(r),"changeMonth",(function(e){r.setState((function(t){var n=t.date;return{date:Fe.default(n,e)}}),(function(){return r.handleMonthChange(r.state.date)}))})),gt(wt(r),"changeMonthYear",(function(e){r.setState((function(t){var n=t.date;return{date:He.default(Fe.default(n,Pe.default(e)),Ne.default(e))}}),(function(){return r.handleMonthYearChange(r.state.date)}))})),gt(wt(r),"header",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.date,t=Ft(e,r.props.locale),n=[];return r.props.showWeekNumbers&&n.push(de.default.createElement("div",{key:"W",className:"react-datepicker__day-name"},r.props.weekLabel||"#")),n.concat([0,1,2,3,4,5,6].map((function(e){var n=be.default(t,e),i=r.formatWeekday(n,r.props.locale),a=r.props.weekDayClassName?r.props.weekDayClassName(n):void 0;return de.default.createElement("div",{key:e,className:he.default("react-datepicker__day-name",a)},i)})))})),gt(wt(r),"formatWeekday",(function(e,t){return r.props.formatWeekDay?function(e,t,n){return t(Nt(e,"EEEE",n))}(e,r.props.formatWeekDay,t):r.props.useWeekdaysShort?function(e,t){return Nt(e,"EEE",t)}(e,t):function(e,t){return Nt(e,"EEEEEE",t)}(e,t)})),gt(wt(r),"decreaseYear",(function(){r.setState((function(e){var t=e.date;return{date:Ce.default(t,r.props.showYearPicker?r.props.yearItemNumber:1)}}),(function(){return r.handleYearChange(r.state.date)}))})),gt(wt(r),"renderPreviousButton",(function(){if(!r.props.renderCustomHeader){var e;switch(!0){case r.props.showMonthYearPicker:e=pn(r.state.date,r.props);break;case r.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,r=t.yearItemNumber,i=void 0===r?12:r,a=_n(Ht(Ce.default(e,i)),i).endPeriod,o=n&&Ne.default(n);return o&&o>a||!1}(r.state.date,r.props);break;default:e=hn(r.state.date,r.props)}if((r.props.forceShowMonthNavigation||r.props.showDisabledMonthNavigation||!e)&&!r.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--previous"],n=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(n=r.decreaseYear),e&&r.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--previous--disabled"),n=null);var i=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,a=r.props,o=a.previousMonthAriaLabel,s=void 0===o?"Previous Month":o,l=a.previousYearAriaLabel,c=void 0===l?"Previous Year":l;return de.default.createElement("button",{type:"button",className:t.join(" "),onClick:n,"aria-label":i?c:s},i?r.props.previousYearButtonLabel:r.props.previousMonthButtonLabel)}}})),gt(wt(r),"increaseYear",(function(){r.setState((function(e){var t=e.date;return{date:_e.default(t,r.props.showYearPicker?r.props.yearItemNumber:1)}}),(function(){return r.handleYearChange(r.state.date)}))})),gt(wt(r),"renderNextButton",(function(){if(!r.props.renderCustomHeader){var e;switch(!0){case r.props.showMonthYearPicker:e=mn(r.state.date,r.props);break;case r.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,r=t.yearItemNumber,i=void 0===r?12:r,a=_n(_e.default(e,i),i).startPeriod,o=n&&Ne.default(n);return o&&o<a||!1}(r.state.date,r.props);break;default:e=fn(r.state.date,r.props)}if((r.props.forceShowMonthNavigation||r.props.showDisabledMonthNavigation||!e)&&!r.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--next"];r.props.showTimeSelect&&t.push("react-datepicker__navigation--next--with-time"),r.props.todayButton&&t.push("react-datepicker__navigation--next--with-today-button");var n=r.increaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(n=r.increaseYear),e&&r.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--next--disabled"),n=null);var i=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,a=r.props,o=a.nextMonthAriaLabel,s=void 0===o?"Next Month":o,l=a.nextYearAriaLabel,c=void 0===l?"Next Year":l;return de.default.createElement("button",{type:"button",className:t.join(" "),onClick:n,"aria-label":i?c:s},i?r.props.nextYearButtonLabel:r.props.nextMonthButtonLabel)}}})),gt(wt(r),"renderCurrentMonth",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.date,t=["react-datepicker__current-month"];return r.props.showYearDropdown&&t.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&t.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&t.push("react-datepicker__current-month--hasMonthYearDropdown"),de.default.createElement("div",{className:t.join(" ")},Nt(e,r.props.dateFormat,r.props.locale))})),gt(wt(r),"renderYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showYearDropdown&&!e)return de.default.createElement(Cn,{adjustDateOnChange:r.props.adjustDateOnChange,date:r.state.date,onSelect:r.props.onSelect,setOpen:r.props.setOpen,dropdownMode:r.props.dropdownMode,onChange:r.changeYear,minDate:r.props.minDate,maxDate:r.props.maxDate,year:Ne.default(r.state.date),scrollableYearDropdown:r.props.scrollableYearDropdown,yearDropdownItemNumber:r.props.yearDropdownItemNumber})})),gt(wt(r),"renderMonthDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showMonthDropdown&&!e)return de.default.createElement(xn,{dropdownMode:r.props.dropdownMode,locale:r.props.locale,onChange:r.changeMonth,month:Pe.default(r.state.date),useShortMonthInDropdown:r.props.useShortMonthInDropdown})})),gt(wt(r),"renderMonthYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.showMonthYearDropdown&&!e)return de.default.createElement(Pn,{dropdownMode:r.props.dropdownMode,locale:r.props.locale,dateFormat:r.props.dateFormat,onChange:r.changeMonthYear,minDate:r.props.minDate,maxDate:r.props.maxDate,date:r.state.date,scrollableMonthYearDropdown:r.props.scrollableMonthYearDropdown})})),gt(wt(r),"renderTodayButton",(function(){if(r.props.todayButton&&!r.props.showTimeSelectOnly)return de.default.createElement("div",{className:"react-datepicker__today-button",onClick:function(e){return r.props.onSelect(Ye.default(Mt()),e)}},r.props.todayButton)})),gt(wt(r),"renderDefaultHeader",(function(e){var t=e.monthDate,n=e.i;return de.default.createElement("div",{className:"react-datepicker__header ".concat(r.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},r.renderCurrentMonth(t),de.default.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(0!==n),r.renderMonthYearDropdown(0!==n),r.renderYearDropdown(0!==n)),de.default.createElement("div",{className:"react-datepicker__day-names"},r.header(t)))})),gt(wt(r),"renderCustomHeader",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.monthDate,n=e.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var i=hn(r.state.date,r.props),a=fn(r.state.date,r.props),o=pn(r.state.date,r.props),s=mn(r.state.date,r.props),l=!r.props.showMonthYearPicker&&!r.props.showQuarterYearPicker&&!r.props.showYearPicker;return de.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},r.props.renderCustomHeader(yt(yt({},r.state),{},{customHeaderCount:n,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:i,nextMonthButtonDisabled:a,prevYearButtonDisabled:o,nextYearButtonDisabled:s})),l&&de.default.createElement("div",{className:"react-datepicker__day-names"},r.header(t)))})),gt(wt(r),"renderYearHeader",(function(){var e=r.state.date,t=r.props,n=t.showYearPicker,i=_n(e,t.yearItemNumber),a=i.startPeriod,o=i.endPeriod;return de.default.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},n?"".concat(a," - ").concat(o):Ne.default(e))})),gt(wt(r),"renderHeader",(function(e){switch(!0){case void 0!==r.props.renderCustomHeader:return r.renderCustomHeader(e);case r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker:return r.renderYearHeader(e);default:return r.renderDefaultHeader(e)}})),gt(wt(r),"renderMonths",(function(){if(!r.props.showTimeSelectOnly&&!r.props.showYearPicker){for(var e=[],t=r.props.showPreviousMonths?r.props.monthsShown-1:0,n=Se.default(r.state.date,t),i=0;i<r.props.monthsShown;++i){var a=i-r.props.monthSelectedIn,o=Ae.default(n,a),s="month-".concat(i),l=i<r.props.monthsShown-1,c=i>0;e.push(de.default.createElement("div",{key:s,ref:function(e){r.monthContainer=e},className:"react-datepicker__month-container"},r.renderHeader({monthDate:o,i:i}),de.default.createElement(Rn,{chooseDayAriaLabelPrefix:r.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:r.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:r.props.weekAriaLabelPrefix,onChange:r.changeMonthYear,day:o,dayClassName:r.props.dayClassName,monthClassName:r.props.monthClassName,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,onWeekSelect:r.props.onWeekSelect,orderInDisplay:i,formatWeekNumber:r.props.formatWeekNumber,locale:r.props.locale,minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,highlightDates:r.props.highlightDates,selectingDate:r.state.selectingDate,includeDates:r.props.includeDates,inline:r.props.inline,shouldFocusDayInline:r.props.shouldFocusDayInline,fixedHeight:r.props.fixedHeight,filterDate:r.props.filterDate,preSelection:r.props.preSelection,setPreSelection:r.props.setPreSelection,selected:r.props.selected,selectsStart:r.props.selectsStart,selectsEnd:r.props.selectsEnd,selectsRange:r.props.selectsRange,showWeekNumbers:r.props.showWeekNumbers,startDate:r.props.startDate,endDate:r.props.endDate,peekNextMonth:r.props.peekNextMonth,setOpen:r.props.setOpen,shouldCloseOnSelect:r.props.shouldCloseOnSelect,renderDayContents:r.props.renderDayContents,disabledKeyboardNavigation:r.props.disabledKeyboardNavigation,showMonthYearPicker:r.props.showMonthYearPicker,showFullMonthYearPicker:r.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:r.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:r.props.showFourColumnMonthYearPicker,showYearPicker:r.props.showYearPicker,showQuarterYearPicker:r.props.showQuarterYearPicker,isInputFocused:r.props.isInputFocused,containerRef:r.containerRef,monthShowsDuplicateDaysEnd:l,monthShowsDuplicateDaysStart:c})))}return e}})),gt(wt(r),"renderYears",(function(){if(!r.props.showTimeSelectOnly)return r.props.showYearPicker?de.default.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader(),de.default.createElement(jn,vt({onDayClick:r.handleDayClick,date:r.state.date},r.props))):void 0})),gt(wt(r),"renderTimeSection",(function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return de.default.createElement(Bn,{selected:r.props.selected,openToDate:r.props.openToDate,onChange:r.props.onTimeChange,timeClassName:r.props.timeClassName,format:r.props.timeFormat,includeTimes:r.props.includeTimes,intervals:r.props.timeIntervals,minTime:r.props.minTime,maxTime:r.props.maxTime,excludeTimes:r.props.excludeTimes,filterTime:r.props.filterTime,timeCaption:r.props.timeCaption,todayButton:r.props.todayButton,showMonthDropdown:r.props.showMonthDropdown,showMonthYearDropdown:r.props.showMonthYearDropdown,showYearDropdown:r.props.showYearDropdown,withPortal:r.props.withPortal,monthRef:r.state.monthContainer,injectTimes:r.props.injectTimes,locale:r.props.locale,showTimeSelectOnly:r.props.showTimeSelectOnly})})),gt(wt(r),"renderInputTimeSection",(function(){var e=new Date(r.props.selected),t=Dt(e)&&Boolean(r.props.selected)?"".concat(An(e.getHours()),":").concat(An(e.getMinutes())):"";if(r.props.showTimeInput)return de.default.createElement(Fn,{date:e,timeString:t,timeInputLabel:r.props.timeInputLabel,onChange:r.props.onTimeChange,customTimeInput:r.props.customTimeInput})})),r.containerRef=de.default.createRef(),r.state={date:r.getDateInView(),selectingDate:null,monthContainer:null},r}return mt(n,[{key:"componentDidMount",value:function(){this.props.showTimeSelect&&(this.assignMonthContainer=void this.setState({monthContainer:this.monthContainer}))}},{key:"componentDidUpdate",value:function(e){this.props.preSelection&&!qt(this.props.preSelection,e.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!qt(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var e=this.props.container||Un;return de.default.createElement("div",{ref:this.containerRef},de.default.createElement(e,{className:he.default("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),n}(de.default.Component),Vn=function(e){return!e.disabled&&-1!==e.tabIndex},Wn=function(e){At(n,e);var t=St(n);function n(e){var r;return ft(this,n),gt(wt(r=t.call(this,e)),"getTabChildren",(function(){return Array.prototype.slice.call(r.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Vn)})),gt(wt(r),"handleFocusStart",(function(e){var t=r.getTabChildren();t&&t.length>1&&t[t.length-1].focus()})),gt(wt(r),"handleFocusEnd",(function(e){var t=r.getTabChildren();t&&t.length>1&&t[0].focus()})),r.tabLoopRef=de.default.createRef(),r}return mt(n,[{key:"render",value:function(){return this.props.enableTabLoop?de.default.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},de.default.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,de.default.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(de.default.Component),Gn=function(e){At(n,e);var t=St(n);function n(e){var r;return ft(this,n),(r=t.call(this,e)).el=document.createElement("div"),r}return mt(n,[{key:"componentDidMount",value:function(){this.portalRoot=document.getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),document.body.appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return dt.default.createPortal(this.props.children,this.el)}}]),n}(de.default.Component),qn=function(e){At(n,e);var t=St(n);function n(){return ft(this,n),t.apply(this,arguments)}return mt(n,[{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.wrapperClassName,i=t.hidePopper,a=t.popperComponent,o=t.popperModifiers,s=t.popperPlacement,l=t.popperProps,c=t.targetComponent,u=t.enableTabLoop,d=t.popperOnKeyDown,h=t.portalId;if(!i){var f=he.default("react-datepicker-popper",n);e=de.default.createElement(le.Popper,vt({modifiers:o,placement:s},l),(function(e){var t=e.ref,n=e.style,r=e.placement,i=e.arrowProps;return de.default.createElement(Wn,{enableTabLoop:u},de.default.createElement("div",{ref:t,style:n,className:f,"data-placement":r,onKeyDown:d},de.default.cloneElement(a,{arrowProps:i})))}))}this.props.popperContainer&&(e=de.default.createElement(this.props.popperContainer,{},e)),h&&!i&&(e=de.default.createElement(Gn,{portalId:h},e));var p=he.default("react-datepicker-wrapper",r);return de.default.createElement(le.Manager,{className:"react-datepicker-manager"},de.default.createElement(le.Reference,null,(function(e){var t=e.ref;return de.default.createElement("div",{ref:t,className:p},c)})),e)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:{preventOverflow:{enabled:!0,escapeWithReference:!0,boundariesElement:"viewport"}},popperProps:{},popperPlacement:"bottom-start"}}}]),n}(de.default.Component),Yn="react-datepicker-ignore-onclickoutside",Kn=ut.default(zn),Xn="Date input not valid.",Qn=function(e){At(n,e);var t=St(n);function n(e){var r;return ft(this,n),gt(wt(r=t.call(this,e)),"getPreSelection",(function(){return r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:Mt()})),gt(wt(r),"calcInitialState",(function(){var e=r.getPreSelection(),t=gn(r.props),n=vn(r.props),i=t&&at.default(e,Ye.default(t))?t:n&&it.default(e,Je.default(n))?n:e;return{open:r.props.startOpen||!1,preventFocus:!1,preSelection:r.props.selected?r.props.selected:i,highlightDates:bn(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1}})),gt(wt(r),"clearPreventFocusTimeout",(function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)})),gt(wt(r),"setFocus",(function(){r.input&&r.input.focus&&r.input.focus({preventScroll:!0})})),gt(wt(r),"setBlur",(function(){r.input&&r.input.blur&&r.input.blur(),r.cancelFocusInput()})),gt(wt(r),"setOpen",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.setState({open:e,preSelection:e&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:Jn},(function(){e||r.setState((function(e){return{focused:!!t&&e.focused}}),(function(){!t&&r.setBlur(),r.setState({inputValue:null})}))}))})),gt(wt(r),"inputOk",(function(){return fe.default(r.state.preSelection)})),gt(wt(r),"isCalendarOpen",(function(){return void 0===r.props.open?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open})),gt(wt(r),"handleFocus",(function(e){r.state.preventFocus||(r.props.onFocus(e),r.props.preventOpenOnFocus||r.props.readOnly||r.setOpen(!0)),r.setState({focused:!0})})),gt(wt(r),"cancelFocusInput",(function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=null})),gt(wt(r),"deferFocusInput",(function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout((function(){return r.setFocus()}),1)})),gt(wt(r),"handleDropdownFocus",(function(){r.cancelFocusInput()})),gt(wt(r),"handleBlur",(function(e){(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&r.props.onBlur(e),r.setState({focused:!1})})),gt(wt(r),"handleCalendarClickOutside",(function(e){r.props.inline||r.setOpen(!1),r.props.onClickOutside(e),r.props.withPortal&&e.preventDefault()})),gt(wt(r),"handleChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0];if(!r.props.onChangeRaw||(r.props.onChangeRaw.apply(wt(r),t),"function"==typeof i.isDefaultPrevented&&!i.isDefaultPrevented())){r.setState({inputValue:i.target.value,lastPreSelectChange:$n});var a=Pt(i.target.value,r.props.dateFormat,r.props.locale,r.props.strictParsing);!a&&i.target.value||r.setSelected(a,i,!0)}})),gt(wt(r),"handleSelect",(function(e,t,n){r.setState({preventFocus:!0},(function(){return r.preventFocusTimeout=setTimeout((function(){return r.setState({preventFocus:!1})}),50),r.preventFocusTimeout})),r.props.onChangeRaw&&r.props.onChangeRaw(t),r.setSelected(e,t,!1,n),!r.props.shouldCloseOnSelect||r.props.showTimeSelect?r.setPreSelection(e):r.props.inline||r.setOpen(!1)})),gt(wt(r),"setSelected",(function(e,t,n,i){var a=e;if(null===a||!en(a,r.props)){var o=r.props,s=o.onChange,l=o.selectsRange,c=o.startDate,u=o.endDate;if(!Yt(r.props.selected,a)||r.props.allowSameDay||l)if(null!==a&&(!r.props.selected||n&&(r.props.showTimeSelect||r.props.showTimeSelectOnly||r.props.showTimeInput)||(a=Lt(a,{hour:xe.default(r.props.selected),minute:ke.default(r.props.selected),second:Te.default(r.props.selected)})),r.props.inline||r.setState({preSelection:a}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:i})),l){var d=c&&u;c||u?c&&!u&&(at.default(a,c)?s([a,null],t):s([c,a],t)):s([a,null],t),d&&s([a,null],t)}else s(a,t);n||(r.props.onSelect(a,t),r.setState({inputValue:null}))}})),gt(wt(r),"setPreSelection",(function(e){var t=void 0!==r.props.minDate,n=void 0!==r.props.maxDate,i=!0;if(e){var a=Ye.default(e);if(t&&n)i=Kt(e,r.props.minDate,r.props.maxDate);else if(t){var o=Ye.default(r.props.minDate);i=it.default(e,o)||Yt(a,o)}else if(n){var s=Je.default(r.props.maxDate);i=at.default(e,s)||Yt(a,s)}}i&&r.setState({preSelection:e})})),gt(wt(r),"handleTimeChange",(function(e){var t=Lt(r.props.selected?r.props.selected:r.getPreSelection(),{hour:xe.default(e),minute:ke.default(e)});r.setState({preSelection:t}),r.props.onChange(t),r.props.shouldCloseOnSelect&&r.setOpen(!1),r.props.showTimeInput&&r.setOpen(!0),r.setState({inputValue:null})})),gt(wt(r),"onInputClick",(function(){r.props.disabled||r.props.readOnly||r.setOpen(!0),r.props.onInputClick()})),gt(wt(r),"onInputKeyDown",(function(e){r.props.onKeyDown(e);var t=e.key;if(r.state.open||r.props.inline||r.props.preventOpenOnFocus){if(r.state.open){if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault();var n=r.calendar.componentNode&&r.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(n&&n.focus({preventScroll:!0}))}var i=Mt(r.state.preSelection);"Enter"===t?(e.preventDefault(),r.inputOk()&&r.state.lastPreSelectChange===Jn?(r.handleSelect(i,e),!r.props.shouldCloseOnSelect&&r.setPreSelection(i)):r.setOpen(!1)):"Escape"===t&&(e.preventDefault(),r.setOpen(!1)),r.inputOk()||r.props.onInputError({code:1,msg:Xn})}}else"ArrowDown"!==t&&"ArrowUp"!==t&&"Enter"!==t||r.onInputClick()})),gt(wt(r),"onDayKeyDown",(function(e){r.props.onKeyDown(e);var t=e.key,n=Mt(r.state.preSelection);if("Enter"===t)e.preventDefault(),r.handleSelect(n,e),!r.props.shouldCloseOnSelect&&r.setPreSelection(n);else if("Escape"===t)e.preventDefault(),r.setOpen(!1),r.inputOk()||r.props.onInputError({code:1,msg:Xn});else if(!r.props.disabledKeyboardNavigation){var i;switch(t){case"ArrowLeft":i=we.default(n,1);break;case"ArrowRight":i=be.default(n,1);break;case"ArrowUp":i=Ee.default(n,1);break;case"ArrowDown":i=ye.default(n,1);break;case"PageUp":i=Se.default(n,1);break;case"PageDown":i=Ae.default(n,1);break;case"Home":i=Ce.default(n,1);break;case"End":i=_e.default(n,1)}if(!i)return void(r.props.onInputError&&r.props.onInputError({code:1,msg:Xn}));if(e.preventDefault(),r.setState({lastPreSelectChange:Jn}),r.props.adjustDateOnChange&&r.setSelected(i),r.setPreSelection(i),r.props.inline){var a=Pe.default(n),o=Pe.default(i),s=Ne.default(n),l=Ne.default(i);a!==o||s!==l?r.setState({shouldFocusDayInline:!0}):r.setState({shouldFocusDayInline:!1})}}})),gt(wt(r),"onPopperKeyDown",(function(e){"Escape"===e.key&&(e.preventDefault(),r.setState({preventFocus:!0},(function(){r.setOpen(!1),setTimeout((function(){r.setFocus(),r.setState({preventFocus:!1})}))})))})),gt(wt(r),"onClearClick",(function(e){e&&e.preventDefault&&e.preventDefault(),r.props.onChange(null,e),r.setState({inputValue:null})})),gt(wt(r),"clear",(function(){r.onClearClick()})),gt(wt(r),"onScroll",(function(e){"boolean"==typeof r.props.closeOnScroll&&r.props.closeOnScroll?e.target!==document&&e.target!==document.documentElement&&e.target!==document.body||r.setOpen(!1):"function"==typeof r.props.closeOnScroll&&r.props.closeOnScroll(e)&&r.setOpen(!1)})),gt(wt(r),"renderCalendar",(function(){return r.props.inline||r.isCalendarOpen()?de.default.createElement(Kn,{ref:function(e){r.calendar=e},locale:r.props.locale,chooseDayAriaLabelPrefix:r.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:r.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:r.props.weekAriaLabelPrefix,adjustDateOnChange:r.props.adjustDateOnChange,setOpen:r.setOpen,shouldCloseOnSelect:r.props.shouldCloseOnSelect,dateFormat:r.props.dateFormatCalendar,useWeekdaysShort:r.props.useWeekdaysShort,formatWeekDay:r.props.formatWeekDay,dropdownMode:r.props.dropdownMode,selected:r.props.selected,preSelection:r.state.preSelection,onSelect:r.handleSelect,onWeekSelect:r.props.onWeekSelect,openToDate:r.props.openToDate,minDate:r.props.minDate,maxDate:r.props.maxDate,selectsStart:r.props.selectsStart,selectsEnd:r.props.selectsEnd,selectsRange:r.props.selectsRange,startDate:r.props.startDate,endDate:r.props.endDate,excludeDates:r.props.excludeDates,filterDate:r.props.filterDate,onClickOutside:r.handleCalendarClickOutside,formatWeekNumber:r.props.formatWeekNumber,highlightDates:r.state.highlightDates,includeDates:r.props.includeDates,includeTimes:r.props.includeTimes,injectTimes:r.props.injectTimes,inline:r.props.inline,shouldFocusDayInline:r.state.shouldFocusDayInline,peekNextMonth:r.props.peekNextMonth,showMonthDropdown:r.props.showMonthDropdown,showPreviousMonths:r.props.showPreviousMonths,useShortMonthInDropdown:r.props.useShortMonthInDropdown,showMonthYearDropdown:r.props.showMonthYearDropdown,showWeekNumbers:r.props.showWeekNumbers,showYearDropdown:r.props.showYearDropdown,withPortal:r.props.withPortal,forceShowMonthNavigation:r.props.forceShowMonthNavigation,showDisabledMonthNavigation:r.props.showDisabledMonthNavigation,scrollableYearDropdown:r.props.scrollableYearDropdown,scrollableMonthYearDropdown:r.props.scrollableMonthYearDropdown,todayButton:r.props.todayButton,weekLabel:r.props.weekLabel,outsideClickIgnoreClass:Yn,fixedHeight:r.props.fixedHeight,monthsShown:r.props.monthsShown,monthSelectedIn:r.state.monthSelectedIn,onDropdownFocus:r.handleDropdownFocus,onMonthChange:r.props.onMonthChange,onYearChange:r.props.onYearChange,dayClassName:r.props.dayClassName,weekDayClassName:r.props.weekDayClassName,monthClassName:r.props.monthClassName,timeClassName:r.props.timeClassName,showTimeSelect:r.props.showTimeSelect,showTimeSelectOnly:r.props.showTimeSelectOnly,onTimeChange:r.handleTimeChange,timeFormat:r.props.timeFormat,timeIntervals:r.props.timeIntervals,minTime:r.props.minTime,maxTime:r.props.maxTime,excludeTimes:r.props.excludeTimes,filterTime:r.props.filterTime,timeCaption:r.props.timeCaption,className:r.props.calendarClassName,container:r.props.calendarContainer,yearItemNumber:r.props.yearItemNumber,yearDropdownItemNumber:r.props.yearDropdownItemNumber,previousMonthButtonLabel:r.props.previousMonthButtonLabel,nextMonthButtonLabel:r.props.nextMonthButtonLabel,previousYearButtonLabel:r.props.previousYearButtonLabel,nextYearButtonLabel:r.props.nextYearButtonLabel,timeInputLabel:r.props.timeInputLabel,disabledKeyboardNavigation:r.props.disabledKeyboardNavigation,renderCustomHeader:r.props.renderCustomHeader,popperProps:r.props.popperProps,renderDayContents:r.props.renderDayContents,onDayMouseEnter:r.props.onDayMouseEnter,onMonthMouseLeave:r.props.onMonthMouseLeave,showTimeInput:r.props.showTimeInput,showMonthYearPicker:r.props.showMonthYearPicker,showFullMonthYearPicker:r.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:r.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:r.props.showFourColumnMonthYearPicker,showYearPicker:r.props.showYearPicker,showQuarterYearPicker:r.props.showQuarterYearPicker,showPopperArrow:r.props.showPopperArrow,excludeScrollbar:r.props.excludeScrollbar,handleOnKeyDown:r.onDayKeyDown,isInputFocused:r.state.focused,customTimeInput:r.props.customTimeInput,setPreSelection:r.setPreSelection},r.props.children):null})),gt(wt(r),"renderDateInput",(function(){var e,t,n,i,a,o=he.default(r.props.className,gt({},Yn,r.state.open)),s=r.props.customInput||de.default.createElement("input",{type:"text"}),l=r.props.customInputRef||"ref",c="string"==typeof r.props.value?r.props.value:"string"==typeof r.state.inputValue?r.state.inputValue:(t=r.props.selected,i=(n=r.props).dateFormat,a=n.locale,t&&Nt(t,Array.isArray(i)?i[0]:i,a)||"");return de.default.cloneElement(s,(gt(e={},l,(function(e){r.input=e})),gt(e,"value",c),gt(e,"onBlur",r.handleBlur),gt(e,"onChange",r.handleChange),gt(e,"onClick",r.onInputClick),gt(e,"onFocus",r.handleFocus),gt(e,"onKeyDown",r.onInputKeyDown),gt(e,"id",r.props.id),gt(e,"name",r.props.name),gt(e,"autoFocus",r.props.autoFocus),gt(e,"placeholder",r.props.placeholderText),gt(e,"disabled",r.props.disabled),gt(e,"autoComplete",r.props.autoComplete),gt(e,"className",he.default(s.props.className,o)),gt(e,"title",r.props.title),gt(e,"readOnly",r.props.readOnly),gt(e,"required",r.props.required),gt(e,"tabIndex",r.props.tabIndex),gt(e,"aria-describedby",r.props.ariaDescribedBy),gt(e,"aria-invalid",r.props.ariaInvalid),gt(e,"aria-labelledby",r.props.ariaLabelledBy),gt(e,"aria-required",r.props.ariaRequired),e))})),gt(wt(r),"renderClearButton",(function(){var e=r.props,t=e.isClearable,n=e.selected,i=e.clearButtonTitle,a=e.clearButtonClassName,o=e.ariaLabelClose,s=void 0===o?"Close":o;return t&&null!=n?de.default.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(a),"aria-label":s,onClick:r.onClearClick,title:i,tabIndex:-1}):null})),r.state=r.calcInitialState(),r}return mt(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(e,t){var n,r;e.inline&&(n=e.selected,r=this.props.selected,n&&r?Pe.default(n)!==Pe.default(r)||Ne.default(n)!==Ne.default(r):n!==r)&&this.setPreSelection(this.props.selected),void 0!==this.state.monthSelectedIn&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:bn(this.props.highlightDates)}),t.focused||Yt(e.selected,this.props.selected)||this.setState({inputValue:null}),t.open!==this.state.open&&(!1===t.open&&!0===this.state.open&&this.props.onCalendarOpen(),!0===t.open&&!1===this.state.open&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"render",value:function(){var e=this.renderCalendar();return this.props.inline&&!this.props.withPortal?e:this.props.withPortal?de.default.createElement("div",null,this.props.inline?null:de.default.createElement("div",{className:"react-datepicker__input-container"},this.renderDateInput(),this.renderClearButton()),this.state.open||this.props.inline?de.default.createElement("div",{className:"react-datepicker__portal"},e):null):de.default.createElement(qn,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,popperModifiers:this.props.popperModifiers,targetComponent:de.default.createElement("div",{className:"react-datepicker__input-container"},this.renderDateInput(),this.renderClearButton()),popperContainer:this.props.popperContainer,popperComponent:e,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:12,renderDayContents:function(e){return e},focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null}}}]),n}(de.default.Component),$n="input",Jn="navigate";t.CalendarContainer=Un,t.default=Qn,t.getDefaultLocale=Xt,t.registerLocale=function(t,n){var r="undefined"!=typeof window?window:e;r.__localeData__||(r.__localeData__={}),r.__localeData__[t]=n},t.setDefaultLocale=function(t){("undefined"!=typeof window?window:e).__localeId__=t},Object.defineProperty(t,"__esModule",{value:!0})}(t,n(0),n(6),n(4),n(1234),n(546),n(1812),n(547),n(548),n(322),n(549),n(323),n(550),n(1235),n(1236),n(1237),n(1238),n(1239),n(1240),n(1241),n(1242),n(1243),n(1244),n(1245),n(1814),n(1246),n(1247),n(1248),n(1249),n(1250),n(1251),n(1252),n(555),n(1253),n(1254),n(1255),n(1256),n(1257),n(1258),n(1259),n(1260),n(248),n(287),n(1261),n(415),n(1262),n(1263),n(1264),n(1265),n(1266),n(1267),n(1268),n(1269),n(1270),n(1271),n(1272),n(1273),n(38),n(1811),n(1274),n(1275),n(1813),n(79))}).call(this,n(68))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50),i=n(285),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.a)(e,-n)}},function(e,t,n){"use strict";function r(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function i(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var a={p:i,P:function(e,t){var n,a=e.match(/(P+)(p+)?/),o=a[1],s=a[2];if(!s)return r(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",r(o,t)).replace("{{time}}",i(s,t))}};t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(38),i=n(191),a=n(30);function o(e){Object(a.a)(1,arguments);var t=Object(r.default)(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var s=Object(i.a)(o),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var c=Object(i.a)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(68))},function(e,t){function n(e,t,r,i,a){i[e]||(i[e]={});for(let n of t.i)if(!i[e][n]){i[e][n]=!0,r[n]||(r[n]=[],r[n][0]=1e5,r[n][1]=0);let o=a;r[n][0]-=o,r[n][1]+=t.d[n]}for(let o in t.n)n(e,t.n[o],r,i,a>1?a/2:1)}function r(e,t){let n=t.i.indexOf(e);n>=0&&t.i.splice(n,1),delete t.d[e];for(let n in t.n)r(e,t.n[n])}function i(e,t){return e.r?t.r?t.r-e.r:-1:t.r?1:e.l-t.l}function a(e,t){let n=e.length,r=t.length;e.length+=r;for(let i=0;i<r;i++)e[n+i]=t[i]}e.exports=class{constructor(){}addText(e,t,n=0){if(void 0===e)throw"id is a required parameter";let r=this.cleanupText(t);if(r.length>1e3){let e=r.lastIndexOf(" ",1e3);r=r.substr(0,e)}this.c||(this.c=[]),function e(t,n,r,a){var o=n.length,s=void 0!==r?r:0,l=void 0!==a?a:o-1,c=s+Math.floor((l-s)/2);0!=o?i(t,n[l])>=0?n.splice(l+1,0,t):i(t,n[s])<=0?n.splice(s,0,t):s>=l?n.splice(s,0,t):i(t,n[c])<=0?e(t,n,s,c-1):e(t,n,c+1,l):n.push(t)}({i:e,t:r},this.c);let a=r.split(" ");this.t||(this.t={d:{},i:[],n:{}}),n>1e3&&(n=1e3),n=Math.floor(n);for(let t of a){let i=this.t;for(var o=0;o<t.length;o++){let e=t.charAt(o);i.n[e]||(i.n[e]={d:{},i:[],n:{}}),i=i.n[e]}let a=1+r.indexOf(t);n&&(a+=n),i.d[e]?i.d[e]>a&&(i.d[e]=a):(i.d[e]=a,i.i.push(e))}}search(e){let t=this.accurateSearch(e);return 0==t.length&&(t=this.accurateSearch(this.fullCleanupText(e))),0==t.length&&(t=this.fuzzySearch(e)),t}accurateSearch(e){let t=this.cleanupText(e).split(" ");if(t=[...new Set(t)],!this.t)throw"There is no text added to search index";let r={},i={};for(let e of t)if(e){let t,a=this.t;for(t=0;t<e.length;t++){let n=a.n[e.charAt(t)];if(!n)break;a=n}t===e.length&&n(e,a,r,i,4)}let o={};for(let e in r){let t=r[e][0],n=r[e][1];o[t]||(o[t]={}),o[t][n]||(o[t][n]=[]),o[t][n].push(e)}let s=[];for(let e in o){let t=o[e];for(let e in t)a(s,t[e])}return s}fuzzySearch(e){let t=this.fullCleanupText(e);for(let n=e.length-1;n>=2;n--)t+=" "+e.substr(0,n);let n=t.split(" ").filter((e,t)=>e.length>1);return t=n.join(" "),this.accurateSearch(t)}suggestions(e,t){e=this.cleanupText(e);let n=[];for(let r of this.c){let i=r.t;if(i.length>e.length){let t=i.indexOf(e);if(t>=0&&(0===t||" "===i.charAt(t-1))){let r=i.indexOf(" ",t+e.length+1);i=r>0?i.substr(t,r-t):i.substr(t),i.length>e.length&&!n.includes(i)&&n.push(i)}}if(n.length>=t)break}return n.sort((e,t)=>e.length-t.length),n}remove(e){for(let t=0;t<this.c.length;t++)this.c[t].i===e&&this.c.splice(t,1);let t=this.t;if(t)for(let n in t.n)r(e,t.n[n])}cleanupText(e){return(e=e.replace(/<[^>]*>?/gm," ")).toLowerCase().replace(/[`~!%^*()_|=?;:",\.<>\{\}\[\]\\\/]/g," ").trim()}fullCleanupText(e){return(e=e.replace(/<[^>]*>?/gm," ")).toLowerCase().replace(/[^a-z0-9 ]/g," ").trim()}}},function(e,t,n){var r;e.exports=(r=n(0),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(2)()},function(e,t){e.exports=r},function(e,t,n){"use strict";var r=n(3);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return O})),n.d(t,"Component",(function(){return O})),n.d(t,"makeAspectCrop",(function(){return C})),n.d(t,"containCrop",(function(){return x}));var r=n(1),i=n.n(r),a=n(0),o=n.n(a);function s(e){var t,n,r="";if(e)if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=s(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(n=s(t))&&(r&&(r+=" "),r+=n);else"boolean"==typeof e||e.call||(r&&(r+=" "),r+=e);return r}function l(e){return(l="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)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var A=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return A=!0,!0}}))}catch(e){}function _(e){var t,n;if(e.touches){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.touches,1)[0];t=r.pageX,n=r.pageY}else t=e.pageX,n=e.pageY;return{x:t,y:n}}function w(e,t,n){return Math.min(Math.max(e,t),n)}function E(e){return e&&!isNaN(e.width)&&!isNaN(e.height)}function S(e){return"n"===e?"s":"ne"===e?"sw":"e"===e?"w":"se"===e?"nw":"s"===e?"n":"sw"===e?"ne":"w"===e?"e":"nw"===e?"se":e}function C(e,t,n){if(isNaN(e.aspect))return console.warn("`crop.aspect` should be a number in order to make an aspect crop",e),e;var r=v({unit:"px",x:0,y:0},e);return e.width&&(r.height=r.width/e.aspect),e.height&&(r.width=r.height*e.aspect),r.y+r.height>n&&(r.height=n-r.y,r.width=r.height*e.aspect),r.x+r.width>t&&(r.width=t-r.x,r.height=r.width/e.aspect),r}function T(e,t,n){return"%"===e.unit?e:{unit:"%",aspect:e.aspect,x:e.x/t*100,y:e.y/n*100,width:e.width/t*100,height:e.height/n*100}}function k(e,t,n){return e.unit?"px"===e.unit?e:{unit:"px",aspect:e.aspect,x:e.x*t/100,y:e.y*n/100,width:e.width*t/100,height:e.height*n/100}:v({},e,{unit:"px"})}function x(e,t,n,r){var i=k(t,n,r),a=k(e,n,r),o=v({},i);if(!i.aspect)return i.x<0?(o.x=0,o.width+=i.x):i.x+i.width>n&&(o.width=n-i.x),i.y+i.height>r&&(o.height=r-i.y),o;var s=!1;i.x<0?(o.x=0,o.width+=i.x,o.height=o.width/i.aspect,s=!0):i.x+i.width>n&&(o.width=n-i.x,o.height=o.width/i.aspect,s=!0),s&&a.y>o.y&&(o.y=i.y+(i.height-o.height));var l=!1;return o.y+o.height>r&&(o.height=r-i.y,o.width=o.height*i.aspect,l=!0),l&&a.x>o.x&&(o.x=i.x+(i.width-o.width)),o}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(o,e);var t,n,r,a=(t=o,function(){var e,n=p(t);if(f()){var r=p(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function o(){var e;c(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(h(e=a.call.apply(a,[this].concat(n))),"window","undefined"!=typeof window?window:{}),b(h(e),"document","undefined"!=typeof document?document:{}),b(h(e),"state",{}),b(h(e),"onCropMouseTouchDown",(function(t){var n=e.props,r=n.crop,i=n.disabled,a=e.mediaDimensions,o=k(r,a.width,a.height);if(!i){t.preventDefault();var s=_(t);e.componentRef.setActive?e.componentRef.setActive({preventScroll:!0}):e.componentRef.focus({preventScroll:!0});var l,c=t.target.dataset.ord,u="nw"===c||"w"===c||"sw"===c,d="nw"===c||"n"===c||"ne"===c;o.aspect&&(l=e.getElementOffset(e.cropSelectRef)),e.evData={clientStartX:s.x,clientStartY:s.y,cropStartWidth:o.width,cropStartHeight:o.height,cropStartX:u?o.x+o.width:o.x,cropStartY:d?o.y+o.height:o.y,xInversed:u,yInversed:d,xCrossOver:u,yCrossOver:d,startXCrossOver:u,startYCrossOver:d,isResize:t.target.dataset.ord,ord:c,cropOffset:l},e.mouseDownOnCrop=!0,e.setState({cropIsActive:!0})}})),b(h(e),"onComponentMouseTouchDown",(function(t){var n=e.props,r=n.crop,i=n.disabled,a=n.locked,o=n.keepSelection,s=n.onChange,l=e.mediaWrapperRef.firstChild;if(t.target===l&&l.contains(t.target)&&!(i||a||o&&E(r))){t.preventDefault();var c=_(t);e.componentRef.setActive?e.componentRef.setActive({preventScroll:!0}):e.componentRef.focus({preventScroll:!0});var u=e.getElementOffset(e.mediaWrapperRef),d=c.x-u.left,h=c.y-u.top,f={unit:"px",aspect:r?r.aspect:void 0,x:d,y:h,width:0,height:0};e.evData={clientStartX:c.x,clientStartY:c.y,cropStartWidth:f.width,cropStartHeight:f.height,cropStartX:f.x,cropStartY:f.y,xInversed:!1,yInversed:!1,xCrossOver:!1,yCrossOver:!1,startXCrossOver:!1,startYCrossOver:!1,isResize:!0,ord:"nw"},e.mouseDownOnCrop=!0;var p=e.mediaDimensions,m=p.width,g=p.height;s(k(f,m,g),T(f,m,g)),e.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}})),b(h(e),"onDocMouseTouchMove",(function(t){var n=e.props,r=n.crop,i=n.disabled,a=n.onChange,o=n.onDragStart;if(!i&&e.mouseDownOnCrop){t.preventDefault(),e.dragStarted||(e.dragStarted=!0,o(t));var s,l=h(e).evData,c=_(t);if(l.isResize&&r.aspect&&l.cropOffset&&(c.y=e.straightenYPath(c.x)),l.xDiff=c.x-l.clientStartX,l.yDiff=c.y-l.clientStartY,(s=l.isResize?e.resizeCrop():e.dragCrop())!==r){var u=e.mediaDimensions,d=u.width,f=u.height;a(k(s,d,f),T(s,d,f))}}})),b(h(e),"onComponentKeyDown",(function(t){var n=e.props,r=n.crop,i=n.disabled,a=n.onChange,s=n.onComplete;if(!i){var l=t.key,c=!1;if(E(r)){var u=e.makeNewCrop(),d=t.shiftKey?o.nudgeStepLarge:o.nudgeStep;if("ArrowLeft"===l?(u.x-=d,c=!0):"ArrowRight"===l?(u.x+=d,c=!0):"ArrowUp"===l?(u.y-=d,c=!0):"ArrowDown"===l&&(u.y+=d,c=!0),c){t.preventDefault();var h=e.mediaDimensions,f=h.width,p=h.height;u.x=w(u.x,0,f-u.width),u.y=w(u.y,0,p-u.height);var m=k(u,f,p),g=T(u,f,p);a(m,g),s(m,g)}}}})),b(h(e),"onDocMouseTouchEnd",(function(t){var n=e.props,r=n.crop,i=n.disabled,a=n.onComplete,o=n.onDragEnd;if(!i&&e.mouseDownOnCrop){e.mouseDownOnCrop=!1,e.dragStarted=!1;var s=e.mediaDimensions,l=s.width,c=s.height;o(t),a(k(r,l,c),T(r,l,c)),e.setState({cropIsActive:!1,newCropIsBeingDrawn:!1})}})),b(h(e),"onMediaLoaded",(function(){var t=e.props,n=t.onComplete,r=t.onChange,i=e.createNewCrop(),a=i.pixelCrop,o=i.percentCrop;r(a,o),n(a,o)})),e}return n=o,(r=[{key:"componentDidMount",value:function(){if(this.document.addEventListener){var e=!!A&&{passive:!1};this.document.addEventListener("mousemove",this.onDocMouseTouchMove,e),this.document.addEventListener("touchmove",this.onDocMouseTouchMove,e),this.document.addEventListener("mouseup",this.onDocMouseTouchEnd,e),this.document.addEventListener("touchend",this.onDocMouseTouchEnd,e),this.document.addEventListener("touchcancel",this.onDocMouseTouchEnd,e),this.componentRef.addEventListener("medialoaded",this.onMediaLoaded)}}},{key:"componentWillUnmount",value:function(){this.document.removeEventListener&&(this.document.removeEventListener("mousemove",this.onDocMouseTouchMove),this.document.removeEventListener("touchmove",this.onDocMouseTouchMove),this.document.removeEventListener("mouseup",this.onDocMouseTouchEnd),this.document.removeEventListener("touchend",this.onDocMouseTouchEnd),this.document.removeEventListener("touchcancel",this.onDocMouseTouchEnd),this.componentRef.removeEventListener("medialoaded",this.onMediaLoaded))}},{key:"componentDidUpdate",value:function(e){var t=this.props.crop;if(this.imageRef&&e.crop!==t&&t.aspect&&(t.width&&!t.height||!t.width&&t.height)){var n=this.imageRef,r=n.width,i=n.height,a=C(this.makeNewCrop(),r,i),o=k(a,r,i),s=T(a,r,i);this.props.onChange(o,s),this.props.onComplete(o,s)}}},{key:"createNewCrop",value:function(){var e=this.mediaDimensions,t=e.width,n=e.height,r=function(e,t,n){return!e.aspect||e.width&&e.height?e:C(e,t,n)}(this.makeNewCrop(),t,n);return{pixelCrop:k(r,t,n),percentCrop:T(r,t,n)}}},{key:"onImageLoad",value:function(e){var t=this.props,n=t.onComplete,r=t.onChange;if(!1!==(0,t.onImageLoaded)(e)){var i=this.createNewCrop(),a=i.pixelCrop,o=i.percentCrop;r(a,o),n(a,o)}}},{key:"getDocumentOffset",value:function(){var e=this.document.documentElement||{},t=e.clientTop,n=void 0===t?0:t,r=e.clientLeft;return{clientTop:n,clientLeft:void 0===r?0:r}}},{key:"getWindowOffset",value:function(){var e=this.window,t=e.pageYOffset,n=void 0===t?0:t,r=e.pageXOffset;return{pageYOffset:n,pageXOffset:void 0===r?0:r}}},{key:"getElementOffset",value:function(e){var t=e.getBoundingClientRect(),n=this.getDocumentOffset(),r=this.getWindowOffset();return{top:t.top+r.pageYOffset-n.clientTop,left:t.left+r.pageXOffset-n.clientLeft}}},{key:"getCropStyle",value:function(){var e=this.makeNewCrop(this.props.crop?this.props.crop.unit:"px");return{top:"".concat(e.y).concat(e.unit),left:"".concat(e.x).concat(e.unit),width:"".concat(e.width).concat(e.unit),height:"".concat(e.height).concat(e.unit)}}},{key:"getNewSize",value:function(){var e,t=this.props,n=t.crop,r=t.minWidth,i=t.maxWidth,a=t.minHeight,o=t.maxHeight,s=this.evData,l=this.mediaDimensions,c=l.width,u=l.height,d=s.cropStartWidth+s.xDiff;return s.xCrossOver&&(d=Math.abs(d)),d=w(d,r,i||c),e=n.aspect?d/n.aspect:s.cropStartHeight+s.yDiff,s.yCrossOver&&(e=Math.min(Math.abs(e),s.cropStartY)),e=w(e,a,o||u),n.aspect&&(d=w(e*n.aspect,0,c)),{width:d,height:e}}},{key:"dragCrop",value:function(){var e=this.makeNewCrop(),t=this.evData,n=this.mediaDimensions,r=n.width,i=n.height;return e.x=w(t.cropStartX+t.xDiff,0,r-e.width),e.y=w(t.cropStartY+t.yDiff,0,i-e.height),e}},{key:"resizeCrop",value:function(){var e=this.evData,t=this.makeNewCrop(),n=e.ord;e.xInversed&&(e.xDiff-=2*e.cropStartWidth,e.xDiffPc-=2*e.cropStartWidth),e.yInversed&&(e.yDiff-=2*e.cropStartHeight,e.yDiffPc-=2*e.cropStartHeight);var r=this.getNewSize(),i=e.cropStartX,a=e.cropStartY;e.xCrossOver&&(i=t.x+(t.width-r.width)),e.yCrossOver&&(a=!1===e.lastYCrossover?t.y-r.height:t.y+(t.height-r.height));var s=this.mediaDimensions,l=s.width,c=s.height,u=x(this.props.crop,{unit:t.unit,x:i,y:a,width:r.width,height:r.height,aspect:t.aspect},l,c);return t.aspect||o.xyOrds.indexOf(n)>-1?(t.x=u.x,t.y=u.y,t.width=u.width,t.height=u.height):o.xOrds.indexOf(n)>-1?(t.x=u.x,t.width=u.width):o.yOrds.indexOf(n)>-1&&(t.y=u.y,t.height=u.height),e.lastYCrossover=e.yCrossOver,this.crossOverCheck(),t}},{key:"straightenYPath",value:function(e){var t,n,r=this.evData,i=r.ord,a=r.cropOffset,o=r.cropStartWidth,s=r.cropStartHeight;return"nw"===i||"se"===i?(t=s/o,n=a.top-a.left*t):(t=-s/o,n=a.top+(s-a.left*t)),t*e+n}},{key:"createCropSelection",value:function(){var e=this,t=this.props,n=t.disabled,r=t.locked,a=t.renderSelectionAddon,o=t.ruleOfThirds,s=this.getCropStyle();return i.a.createElement("div",{ref:function(t){return e.cropSelectRef=t},style:s,className:"ReactCrop__crop-selection",onMouseDown:this.onCropMouseTouchDown,onTouchStart:this.onCropMouseTouchDown,tabIndex:"0"},!n&&!r&&i.a.createElement("div",{className:"ReactCrop__drag-elements"},i.a.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),i.a.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),i.a.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),i.a.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),i.a.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw"}),i.a.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n"}),i.a.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne"}),i.a.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e"}),i.a.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se"}),i.a.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s"}),i.a.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw"}),i.a.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w"})),a&&i.a.createElement("div",{className:"ReactCrop__selection-addon",onMouseDown:function(e){return e.stopPropagation()}},a(this.state)),o&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),i.a.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}},{key:"makeNewCrop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"px",t=v({},o.defaultCrop,{},this.props.crop),n=this.mediaDimensions,r=n.width,i=n.height;return"px"===e?k(t,r,i):T(t,r,i)}},{key:"crossOverCheck",value:function(){var e=this.evData,t=this.props,n=t.minWidth,r=t.minHeight;!n&&(!e.xCrossOver&&-Math.abs(e.cropStartWidth)-e.xDiff>=0||e.xCrossOver&&-Math.abs(e.cropStartWidth)-e.xDiff<=0)&&(e.xCrossOver=!e.xCrossOver),!r&&(!e.yCrossOver&&-Math.abs(e.cropStartHeight)-e.yDiff>=0||e.yCrossOver&&-Math.abs(e.cropStartHeight)-e.yDiff<=0)&&(e.yCrossOver=!e.yCrossOver);var i=e.xCrossOver!==e.startXCrossOver,a=e.yCrossOver!==e.startYCrossOver;e.inversedXOrd=!!i&&S(e.ord),e.inversedYOrd=!!a&&S(e.ord)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.circularCrop,a=t.className,o=t.crossorigin,l=t.crop,c=t.disabled,u=t.locked,d=t.imageAlt,h=t.onImageError,f=t.renderComponent,p=t.src,m=t.style,g=t.imageStyle,v=t.ruleOfThirds,b=this.state,y=b.cropIsActive,A=b.newCropIsBeingDrawn,_=E(l)&&this.componentRef?this.createCropSelection():null,w=function(){for(var e,t=0,n="";t<arguments.length;)(e=s(arguments[t++]))&&(n&&(n+=" "),n+=e);return n}("ReactCrop",a,{"ReactCrop--active":y,"ReactCrop--disabled":c,"ReactCrop--locked":u,"ReactCrop--new-crop":A,"ReactCrop--fixed-aspect":l&&l.aspect,"ReactCrop--circular-crop":l&&r,"ReactCrop--rule-of-thirds":l&&v,"ReactCrop--invisible-crop":!this.dragStarted&&l&&!l.width&&!l.height});return i.a.createElement("div",{ref:function(t){e.componentRef=t},className:w,style:m,onTouchStart:this.onComponentMouseTouchDown,onMouseDown:this.onComponentMouseTouchDown,tabIndex:"0",onKeyDown:this.onComponentKeyDown},i.a.createElement("div",{ref:function(t){e.mediaWrapperRef=t}},f||i.a.createElement("img",{ref:function(t){return e.imageRef=t},crossOrigin:o,className:"ReactCrop__image",style:g,src:p,onLoad:function(t){return e.onImageLoad(t.target)},onError:h,alt:d})),n,_)}},{key:"mediaDimensions",get:function(){var e=this.mediaWrapperRef;return{width:e.clientWidth,height:e.clientHeight}}}])&&u(n.prototype,r),o}(r.PureComponent);O.xOrds=["e","w"],O.yOrds=["n","s"],O.xyOrds=["nw","ne","se","sw"],O.nudgeStep=.2,O.nudgeStepLarge=2,O.defaultCrop={x:0,y:0,width:0,height:0,unit:"px"},O.propTypes={className:o.a.string,children:o.a.oneOfType([o.a.arrayOf(o.a.node),o.a.node]),circularCrop:o.a.bool,crop:o.a.shape({aspect:o.a.number,x:o.a.number,y:o.a.number,width:o.a.number,height:o.a.number,unit:o.a.oneOf(["px","%"])}),crossorigin:o.a.string,disabled:o.a.bool,locked:o.a.bool,imageAlt:o.a.string,imageStyle:o.a.shape({}),keepSelection:o.a.bool,minWidth:o.a.number,minHeight:o.a.number,maxWidth:o.a.number,maxHeight:o.a.number,onChange:o.a.func.isRequired,onImageError:o.a.func,onComplete:o.a.func,onImageLoaded:o.a.func,onDragStart:o.a.func,onDragEnd:o.a.func,src:o.a.string.isRequired,style:o.a.shape({}),renderComponent:o.a.node,renderSelectionAddon:o.a.func,ruleOfThirds:o.a.bool},O.defaultProps={circularCrop:!1,className:void 0,crop:void 0,crossorigin:void 0,disabled:!1,locked:!1,imageAlt:"",maxWidth:void 0,maxHeight:void 0,minWidth:0,minHeight:0,keepSelection:!1,onComplete:function(){},onImageError:function(){},onImageLoaded:function(){},onDragStart:function(){},onDragEnd:function(){},children:void 0,style:void 0,renderComponent:void 0,imageStyle:void 0,renderSelectionAddon:void 0,ruleOfThirds:!1}}]))},function(e,t,n){"use strict";var r=n(227),i=n(1438),a=n(1452),o=n(6),s=n(1498),l=n(1500),c=n(1504),u=n(1505),d=n(1506),h=n(1507),f=n(1508),p=n(1509),m=n(1510),g=Object.keys(p),v=function(e){var t=e.source||e.children||"";if(e.allowedTypes&&e.disallowedTypes)throw new Error("Only one of `allowedTypes` and `disallowedTypes` should be defined");var n=r(p,e.renderers),o=i().use(a).use(e.plugins||[]),f=o.runSync(o.parse(t)),v=r(e,{renderers:n,definitions:h(f)});return function(e){var t=[d,s()],n=e.disallowedTypes;e.allowedTypes&&(n=g.filter((function(t){return"root"!==t&&-1===e.allowedTypes.indexOf(t)})));var r=e.unwrapDisallowed?"unwrap":"remove";n&&n.length>0&&t.push(c.ofType(n,r));e.allowNode&&t.push(c.ifNotMatch(e.allowNode,r));var i=(e.allowDangerousHtml||!1===e.escapeHtml)&&!e.skipHtml,a=(e.astPlugins||[]).some((function(e){return e.identity===m.HtmlParser}));i&&!a&&t.push(l);e.astPlugins&&(t=t.concat(e.astPlugins));return t.push(u),t}(e).forEach((function(e){f=e(f,v)})),f};v.defaultProps={transformLinkUri:f},v.propTypes={className:o.string,source:o.string,children:o.string,sourcePos:o.bool,rawSourcePos:o.bool,escapeHtml:o.bool,allowDangerousHtml:o.bool,skipHtml:o.bool,allowNode:o.func,allowedTypes:o.arrayOf(o.oneOf(g)),disallowedTypes:o.arrayOf(o.oneOf(g)),transformLinkUri:o.oneOfType([o.func,o.bool]),linkTarget:o.oneOfType([o.func,o.string]),transformImageUri:o.func,astPlugins:o.arrayOf(o.func),unwrapDisallowed:o.bool,renderers:o.object,plugins:o.array},v.types=g,v.renderers=p,v.uriTransformer=f,e.exports=v},function(e,t,n){"use strict";(function(e){var r=n(114),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.a.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(345)(e))},function(e,t,n){!function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var a=/[&<>"']/,o=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u=function(e){return c[e]};function d(e,t){if(t){if(a.test(e))return e.replace(o,u)}else if(s.test(e))return e.replace(l,u);return e}var h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function f(e){return e.replace(h,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g;function m(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(p,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var g=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(e,t,n){if(e){var r;try{r=decodeURIComponent(f(n)).replace(g,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!v.test(n)&&(n=function(e,t){y[" "+e]||(A.test(e)?y[" "+e]=e+"/":y[" "+e]=T(e,"/",!0));var n=-1===(e=y[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(w,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}var y={},A=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/,E={exec:function(){}};function S(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function C(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function T(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}function k(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function x(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function O(e,t,n,r){var i=t.href,a=t.title?d(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var s={type:"link",raw:n,href:i,title:a,text:o,tokens:r.inlineTokens(o,[])};return r.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:a,text:d(o)}}var I=function(){function t(t){this.options=t||e.defaults}var n=t.prototype;return n.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},n.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:T(n,"\n")}}},n.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},n.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=T(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}var i={type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},n.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},n.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}},n.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,i,a,o,s,l,c,u,d,h,f,p,m=t[1].trim(),g=m.length>1,v={type:"list",raw:"",ordered:g,start:g?+m.slice(0,-1):"",loose:!1,items:[]};m=g?"\\d{1,9}\\"+m.slice(-1):"\\"+m,this.options.pedantic&&(m=g?m:"[*+-]");for(var b=new RegExp("^( {0,3}"+m+")((?: [^\\n]*)?(?:\\n|$))");e&&(p=!1,t=b.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),u=t[2].split("\n",1)[0],d=e.split("\n",1)[0],this.options.pedantic?(o=2,f=u.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,f=u.slice(o),o+=t[1].length),l=!1,!u&&/^ *$/.test(d)&&(n+=d+"\n",e=e.substring(d.length+1),p=!0),!p)for(var y=new RegExp("^ {0,"+Math.min(3,o-1)+"}(?:[*+-]|\\d{1,9}[.)])");e&&(u=h=e.split("\n",1)[0],this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),!y.test(u));){if(u.search(/[^ ]/)>=o||!u.trim())f+="\n"+u.slice(o);else{if(l)break;f+="\n"+u}l||u.trim()||(l=!0),n+=h+"\n",e=e.substring(h.length+1)}v.loose||(c?v.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(f))&&(a="[ ] "!==i[0],f=f.replace(/^\[[ xX]\] +/,"")),v.items.push({type:"list_item",raw:n,task:!!i,checked:a,loose:!1,text:f}),v.raw+=n}v.items[v.items.length-1].raw=n.trimRight(),v.items[v.items.length-1].text=f.trimRight(),v.raw=v.raw.trimRight();var A=v.items.length;for(s=0;s<A;s++){this.lexer.state.top=!1,v.items[s].tokens=this.lexer.blockTokens(v.items[s].text,[]);var _=v.items[s].tokens.filter((function(e){return"space"===e.type})),w=_.every((function(e){for(var t,n=0,i=r(e.raw.split(""));!(t=i()).done;)if("\n"===t.value&&(n+=1),n>1)return!0;return!1}));!v.loose&&_.length&&w&&(v.loose=!0,v.items[s].loose=!0)}return v}},n.html=function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(n.type="paragraph",n.text=this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]),n.tokens=[],this.lexer.inline(n.text,n.tokens)),n}},n.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},n.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:C(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,a,o,s=n.align.length;for(r=0;r<s;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(s=n.rows.length,r=0;r<s;r++)n.rows[r]=C(n.rows[r],n.header.length).map((function(e){return{text:e}}));for(s=n.header.length,i=0;i<s;i++)n.header[i].tokens=[],this.lexer.inlineTokens(n.header[i].text,n.header[i].tokens);for(s=n.rows.length,i=0;i<s;i++)for(o=n.rows[i],a=0;a<o.length;a++)o[a].tokens=[],this.lexer.inlineTokens(o[a].text,o[a].tokens);return n}}},n.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t){var n={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var n={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.text=function(e){var t=this.rules.block.text.exec(e);if(t){var n={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:d(t[1])}},n.tag=function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]):t[0]}},n.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;var r=T(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1}(t[2],"()");if(i>-1){var a=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}var o=t[2],s="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],s=l[3])}else s=t[3]?t[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(o=this.options.pedantic&&!/>$/.test(n)?o.slice(1):o.slice(1,-1)),O(t,{href:o?o.replace(this.rules.inline._escapes,"$1"):o,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0],this.lexer)}},n.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return O(n,r,n[0],this.lexer)}},n.emStrong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var a,o,s=r[0].length-1,l=s,c=0,u="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+s);null!=(r=u.exec(t));)if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(o=a.length,r[3]||r[4])l+=o;else if(!((r[5]||r[6])&&s%3)||(s+o)%3){if(!((l-=o)>0)){if(o=Math.min(o,o+l+c),Math.min(s,o)%2){var d=e.slice(1,s+r.index+o);return{type:"em",raw:e.slice(0,s+r.index+o+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}var h=e.slice(2,s+r.index+o-1);return{type:"strong",raw:e.slice(0,s+r.index+o+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}}else c+=o}}},n.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=d(n,!0),{type:"codespan",raw:t[0],text:n}}},n.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},n.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}},n.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=d(this.options.mangle?t(i[1]):i[1])):n=d(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},n.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=d(this.options.mangle?t(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=d(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},n.inlineText=function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):d(r[0]):r[0]:d(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}},t}(),M={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:E,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};M.def=m(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.listItemStart=m(/^( *)(bull) */).replace("bull",M.bullet).getRegex(),M.list=m(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",M._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,M.html=m(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=m(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.blockquote=m(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=S({},M),M.gfm=S({},M.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),M.gfm.table=m(M.gfm.table).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.gfm.paragraph=m(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",M.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.pedantic=S({},M.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",M._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,paragraph:m(M.normal._paragraph).replace("hr",M.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var P={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:E,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:E,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function D(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function N(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}P._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",P.punctuation=m(P.punctuation).replace(/punctuation/g,P._punctuation).getRegex(),P.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,P.escapedEmSt=/\\\*|\\_/g,P._comment=m(M._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),P.emStrong.lDelim=m(P.emStrong.lDelim).replace(/punct/g,P._punctuation).getRegex(),P.emStrong.rDelimAst=m(P.emStrong.rDelimAst,"g").replace(/punct/g,P._punctuation).getRegex(),P.emStrong.rDelimUnd=m(P.emStrong.rDelimUnd,"g").replace(/punct/g,P._punctuation).getRegex(),P._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,P._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,P._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,P.autolink=m(P.autolink).replace("scheme",P._scheme).replace("email",P._email).getRegex(),P._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,P.tag=m(P.tag).replace("comment",P._comment).replace("attribute",P._attribute).getRegex(),P._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,P._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,P.link=m(P.link).replace("label",P._label).replace("href",P._href).replace("title",P._title).getRegex(),P.reflink=m(P.reflink).replace("label",P._label).replace("ref",M._label).getRegex(),P.nolink=m(P.nolink).replace("ref",M._label).getRegex(),P.reflinkSearch=m(P.reflinkSearch,"g").replace("reflink",P.reflink).replace("nolink",P.nolink).getRegex(),P.normal=S({},P),P.pedantic=S({},P.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",P._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",P._label).getRegex()}),P.gfm=S({},P.normal,{escape:m(P.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),P.gfm.url=m(P.gfm.url,"i").replace("email",P.gfm._extended_email).getRegex(),P.breaks=S({},P.gfm,{br:m(P.br).replace("{2,}","*").getRegex(),text:m(P.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var L=function(){function n(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new I,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={block:M.normal,inline:P.normal};this.options.pedantic?(n.block=M.pedantic,n.inline=P.pedantic):this.options.gfm&&(n.block=M.gfm,this.options.breaks?n.inline=P.breaks:n.inline=P.gfm),this.tokenizer.rules=n}n.lex=function(e,t){return new n(t).lex(e)},n.lexInline=function(e,t){return new n(t).inlineTokens(e)};var r,i,a,o=n.prototype;return o.lex=function(e){var t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens},o.blockTokens=function(e,t){var n,r,i,a,o=this;for(void 0===t&&(t=[]),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(r){return!!(n=r.call({lexer:o},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)}))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),!(r=t[t.length-1])||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),!(r=t[t.length-1])||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else if(i=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,n=e.slice(1),r=void 0;o.options.extensions.startBlock.forEach((function(e){"number"==typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],a&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),a=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),(r=t[t.length-1])&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){var s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return this.state.top=!0,t},o.inline=function(e,t){this.inlineQueue.push({src:e,tokens:t})},o.inlineTokens=function(e,t){var n,r,i,a=this;void 0===t&&(t=[]);var o,s,l,c=e;if(this.tokens.links){var u=Object.keys(this.tokens.links);if(u.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(c));)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,o.index)+"["+x("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,o.index)+"["+x("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,o.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(l=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(r){return!!(n=r.call({lexer:a},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)}))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),(r=t[t.length-1])&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),(r=t[t.length-1])&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,l))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,N))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,N))){if(i=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),r=void 0;a.options.extensions.startInline.forEach((function(e){"number"==typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),n=this.tokenizer.inlineText(i,D))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),s=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}throw new Error(d)}}else e=e.substring(n.raw.length),t.push(n);return t},r=n,a=[{key:"rules",get:function(){return{block:M,inline:P}}}],(i=null)&&t(r.prototype,i),a&&t(r,a),Object.defineProperty(r,"prototype",{writable:!1}),n}(),R=function(){function t(t){this.options=t||e.defaults}var n=t.prototype;return n.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+d(r,!0)+'">'+(n?e:d(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:d(e,!0))+"</code></pre>\n"},n.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.html=function(e){return e},n.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},n.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},n.listitem=function(e){return"<li>"+e+"</li>\n"},n.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},n.paragraph=function(e){return"<p>"+e+"</p>\n"},n.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},n.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},n.strong=function(e){return"<strong>"+e+"</strong>"},n.em=function(e){return"<em>"+e+"</em>"},n.codespan=function(e){return"<code>"+e+"</code>"},n.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.del=function(e){return"<del>"+e+"</del>"},n.link=function(e,t,n){if(null===(e=b(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+d(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},n.image=function(e,t,n){if(null===(e=b(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},n.text=function(e){return e},t}(),B=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),j=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),F=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new R,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new B,this.slugger=new j}t.parse=function(e,n){return new t(n).parse(e)},t.parseInline=function(e,n){return new t(n).parseInline(e)};var n=t.prototype;return n.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,a,o,s,l,c,u,d,h,p,m,g,v,b,y,A,_,w="",E=e.length;for(n=0;n<E;n++)if(d=e[n],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type])||!1===(_=this.options.extensions.renderers[d.type].call({parser:this},d))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))switch(d.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(d.tokens),d.depth,f(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",l="",a=d.header.length,r=0;r<a;r++)l+=this.renderer.tablecell(this.parseInline(d.header[r].tokens),{header:!0,align:d.align[r]});for(c+=this.renderer.tablerow(l),u="",a=d.rows.length,r=0;r<a;r++){for(l="",o=(s=d.rows[r]).length,i=0;i<o;i++)l+=this.renderer.tablecell(this.parseInline(s[i].tokens),{header:!1,align:d.align[i]});u+=this.renderer.tablerow(l)}w+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),w+=this.renderer.blockquote(u);continue;case"list":for(h=d.ordered,p=d.start,m=d.loose,a=d.items.length,u="",r=0;r<a;r++)b=(v=d.items[r]).checked,y=v.task,g="",v.task&&(A=this.renderer.checkbox(b),m?v.tokens.length>0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=A+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=A+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:A}):g+=A),g+=this.parse(v.tokens,m),u+=this.renderer.listitem(g,y,b);w+=this.renderer.list(u,h,p);continue;case"html":w+=this.renderer.html(d.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<E&&"text"===e[n+1].type;)u+="\n"+((d=e[++n]).tokens?this.parseInline(d.tokens):d.text);w+=t?this.renderer.paragraph(u):u;continue;default:var S='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(S);throw new Error(S)}else w+=_||"";return w},n.parseInline=function(e,t){t=t||this.renderer;var n,r,i,a="",o=e.length;for(n=0;n<o;n++)if(r=e[n],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type])||!1===(i=this.options.extensions.renderers[r.type].call({parser:this},r))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type))switch(r.type){case"escape":a+=t.text(r.text);break;case"html":a+=t.html(r.text);break;case"link":a+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":a+=t.image(r.href,r.title,r.text);break;case"strong":a+=t.strong(this.parseInline(r.tokens,t));break;case"em":a+=t.em(this.parseInline(r.tokens,t));break;case"codespan":a+=t.codespan(r.text);break;case"br":a+=t.br();break;case"del":a+=t.del(this.parseInline(r.tokens,t));break;case"text":a+=t.text(r.text);break;default:var s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(s);throw new Error(s)}else a+=i||"";return a},t}();function U(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),k(t=S({},U.defaults,t||{})),n){var r,i=t.highlight;try{r=L.lex(e,t)}catch(e){return n(e)}var a=function(e){var a;if(!e)try{t.walkTokens&&U.walkTokens(r,t.walkTokens),a=F.parse(r,t)}catch(t){e=t}return t.highlight=i,e?n(e):n(null,a)};if(!i||i.length<3)return a();if(delete t.highlight,!r.length)return a();var o=0;return U.walkTokens(r,(function(e){"code"===e.type&&(o++,setTimeout((function(){i(e.text,e.lang,(function(t,n){if(t)return a(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0==--o&&a()}))}),0))})),void(0===o&&a())}try{var s=L.lex(e,t);return t.walkTokens&&U.walkTokens(s,t.walkTokens),F.parse(s,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}}U.options=U.setOptions=function(t){var n;return S(U.defaults,t),n=U.defaults,e.defaults=n,U},U.getDefaults=i,U.defaults=e.defaults,U.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=S.apply(void 0,[{}].concat(t)),a=U.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((function(e){if(e.extensions&&(r=!0,e.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=a.renderers?a.renderers[e.name]:null;a.renderers[e.name]=t?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=e.renderer.apply(this,r);return!1===a&&(a=t.apply(this,r)),a}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");a[e.level]?a[e.level].unshift(e.tokenizer):a[e.level]=[e.tokenizer],e.start&&("block"===e.level?a.startBlock?a.startBlock.push(e.start):a.startBlock=[e.start]:"inline"===e.level&&(a.startInline?a.startInline.push(e.start):a.startInline=[e.start]))}e.childTokens&&(a.childTokens[e.name]=e.childTokens)}))),e.renderer&&function(){var t=U.defaults.renderer||new R,n=function(n){var r=t[n];t[n]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=e.renderer[n].apply(t,a);return!1===s&&(s=r.apply(t,a)),s}};for(var r in e.renderer)n(r);i.renderer=t}(),e.tokenizer&&function(){var t=U.defaults.tokenizer||new I,n=function(n){var r=t[n];t[n]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=e.tokenizer[n].apply(t,a);return!1===s&&(s=r.apply(t,a)),s}};for(var r in e.tokenizer)n(r);i.tokenizer=t}(),e.walkTokens){var t=U.defaults.walkTokens;i.walkTokens=function(n){e.walkTokens.call(this,n),t&&t.call(this,n)}}r&&(i.extensions=a),U.setOptions(i)}))},U.walkTokens=function(e,t){for(var n,i=function(){var e=n.value;switch(t.call(U,e),e.type){case"table":for(var i,a=r(e.header);!(i=a()).done;){var o=i.value;U.walkTokens(o.tokens,t)}for(var s,l=r(e.rows);!(s=l()).done;)for(var c,u=r(s.value);!(c=u()).done;){var d=c.value;U.walkTokens(d.tokens,t)}break;case"list":U.walkTokens(e.items,t);break;default:U.defaults.extensions&&U.defaults.extensions.childTokens&&U.defaults.extensions.childTokens[e.type]?U.defaults.extensions.childTokens[e.type].forEach((function(n){U.walkTokens(e[n],t)})):e.tokens&&U.walkTokens(e.tokens,t)}},a=r(e);!(n=a()).done;)i()},U.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");k(t=S({},U.defaults,t||{}));try{var n=L.lexInline(e,t);return t.walkTokens&&U.walkTokens(n,t.walkTokens),F.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}},U.Parser=F,U.parser=F.parse,U.Renderer=R,U.TextRenderer=B,U.Lexer=L,U.lexer=L.lex,U.Tokenizer=I,U.Slugger=j,U.parse=U;var H=U.options,z=U.setOptions,V=U.use,W=U.walkTokens,G=U.parseInline,q=U,Y=F.parse,K=L.lex;e.Lexer=L,e.Parser=F,e.Renderer=R,e.Slugger=j,e.TextRenderer=B,e.Tokenizer=I,e.getDefaults=i,e.lexer=K,e.marked=U,e.options=H,e.parse=q,e.parseInline=G,e.parser=Y,e.setOptions=z,e.use=V,e.walkTokens=W,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(939);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1655);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(519).default,i=n(86);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function i(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var a={date:i({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:i({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:i({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},o={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return function(t,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=i.width?String(i.width):a;r=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=i.width?String(i.width):e.defaultWidth;r=e.values[l]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o,s=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(l)?u(l,(function(e){return e.test(s)})):c(l,(function(e){return e.test(s)}));o=e.valueCallback?e.valueCallback(d):d,o=n.valueCallback?n.valueCallback(o):o;var h=t.slice(s.length);return{value:o,rest:h}}}function c(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function u(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}var d,h={code:"en-US",formatDistance:function(e,t,n){var i;return n=n||{},i="string"==typeof r[e]?r[e]:1===t?r[e].one:r[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+i:i+" ago":i},formatLong:a,formatRelative:function(e,t,n,r){return o[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(d={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(d.matchPattern);if(!n)return null;var r=n[0],i=e.match(d.parsePattern);if(!i)return null;var a=d.valueCallback?d.valueCallback(i[0]):i[0];a=t.valueCallback?t.valueCallback(a):a;var o=e.slice(r.length);return{value:a,rest:o}}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};t.a=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(171),i=n(280),a=n(119),o=n(90);var s=n(136),l=n(281),c=n(138),u=n(279);function d(e,t,n){void 0===n&&(n=!1);var d,h,f=Object(o.b)(t),p=Object(o.b)(t)&&function(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return 1!==n||1!==r}(t),m=Object(c.a)(t),g=Object(r.a)(e,p),v={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!n)&&(("body"!==Object(s.a)(t)||Object(u.a)(m))&&(v=(d=t)!==Object(a.a)(d)&&Object(o.b)(d)?{scrollLeft:(h=d).scrollLeft,scrollTop:h.scrollTop}:Object(i.a)(d)),Object(o.b)(t)?((b=Object(r.a)(t,!0)).x+=t.clientLeft,b.y+=t.clientTop):m&&(b.x=Object(l.a)(m))),{x:g.left+v.scrollLeft-b.x,y:g.top+v.scrollTop-b.y,width:g.width,height:g.height}}var h=n(282),f=n(293),p=n(189),m=n(45);function g(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(r){if(!n.has(r)){var i=t.get(r);i&&e(i)}})),r.push(i)}(e)})),r}var v={placement:"bottom",modifiers:[],strategy:"absolute"};function b(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function y(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,a=void 0===i?v:i;return function(e,t,n){void 0===n&&(n=a);var i,s,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},v,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,y={state:l,setOptions:function(n){var i="function"==typeof n?n(l.options):n;A(),l.options=Object.assign({},a,l.options,i),l.scrollParents={reference:Object(o.a)(e)?Object(f.a)(e):e.contextElement?Object(f.a)(e.contextElement):[],popper:Object(f.a)(t)};var s=function(e){var t=g(e);return m.g.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,l.options.modifiers)));return l.orderedModifiers=s.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var a=i({state:l,name:t,instance:y,options:r});c.push(a||function(){})}})),y.update()},forceUpdate:function(){if(!u){var e=l.elements,t=e.reference,n=e.popper;if(b(t,n)){l.rects={reference:d(t,Object(p.a)(n),"fixed"===l.options.strategy),popper:Object(h.a)(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<l.orderedModifiers.length;r++)if(!0!==l.reset){var i=l.orderedModifiers[r],a=i.fn,o=i.options,s=void 0===o?{}:o,c=i.name;"function"==typeof a&&(l=a({state:l,options:s,name:c,instance:y})||l)}else l.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){y.forceUpdate(),e(l)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){A(),u=!0}};if(!b(e,t))return y;function A(){c.forEach((function(e){return e()})),c=[]}return y.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),y}}},function(e,t,n){"use strict";var r={left:"right",right:"left",bottom:"top",top:"bottom"};function i(e){return e.replace(/left|right|bottom|top/g,(function(e){return r[e]}))}var a=n(129),o={start:"end",end:"start"};function s(e){return e.replace(/start|end/g,(function(e){return o[e]}))}var l=n(170),c=n(172),u=n(45);t.a={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,d=void 0===o||o,h=n.altAxis,f=void 0===h||h,p=n.fallbackPlacements,m=n.padding,g=n.boundary,v=n.rootBoundary,b=n.altBoundary,y=n.flipVariations,A=void 0===y||y,_=n.allowedAutoPlacements,w=t.options.placement,E=Object(a.a)(w),S=p||(E===w||!A?[i(w)]:function(e){if(Object(a.a)(e)===u.a)return[];var t=i(e);return[s(e),t,s(t)]}(w)),C=[w].concat(S).reduce((function(e,n){return e.concat(Object(a.a)(n)===u.a?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,d=n.flipVariations,h=n.allowedAutoPlacements,f=void 0===h?u.h:h,p=Object(c.a)(r),m=p?d?u.n:u.n.filter((function(e){return Object(c.a)(e)===p})):u.b,g=m.filter((function(e){return f.indexOf(e)>=0}));0===g.length&&(g=m);var v=g.reduce((function(t,n){return t[n]=Object(l.a)(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[Object(a.a)(n)],t}),{});return Object.keys(v).sort((function(e,t){return v[e]-v[t]}))}(t,{placement:n,boundary:g,rootBoundary:v,padding:m,flipVariations:A,allowedAutoPlacements:_}):n)}),[]),T=t.rects.reference,k=t.rects.popper,x=new Map,O=!0,I=C[0],M=0;M<C.length;M++){var P=C[M],D=Object(a.a)(P),N=Object(c.a)(P)===u.l,L=[u.m,u.c].indexOf(D)>=0,R=L?"width":"height",B=Object(l.a)(t,{placement:P,boundary:g,rootBoundary:v,altBoundary:b,padding:m}),j=L?N?u.k:u.f:N?u.c:u.m;T[R]>k[R]&&(j=i(j));var F=i(j),U=[];if(d&&U.push(B[D]<=0),f&&U.push(B[j]<=0,B[F]<=0),U.every((function(e){return e}))){I=P,O=!1;break}x.set(P,U)}if(O)for(var H=function(e){var t=C.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return I=t,"break"},z=A?3:1;z>0;z--){if("break"===H(z))break}t.placement!==I&&(t.modifiersData[r]._skip=!0,t.placement=I,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(177),i=n(406),a=n(328);var o=function(e,t,n,r){return Object(i.a)(e,t,n,r),function(){Object(a.a)(e,t,n,r)}};function s(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)}),t+n),a=o(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),a()}}function l(e,t,n,i){var a,l,c;null==n&&(a=e,l=Object(r.a)(a,"transitionDuration")||"",c=-1===l.indexOf("ms")?1e3:1,n=parseFloat(l)*c||0);var u=s(e,n,i),d=o(e,"transitionend",t);return function(){u(),d()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0);function i(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}var a=n(47);function o(e){var t=window.getComputedStyle(e);return{top:parseFloat(t.marginTop)||0,right:parseFloat(t.marginRight)||0,bottom:parseFloat(t.marginBottom)||0,left:parseFloat(t.marginLeft)||0}}function s(){var e=Object(r.useRef)(null),t=Object(r.useRef)(null),n=Object(r.useRef)(null),s=Object(a.a)(void 0,"popover"),l=Object(a.a)(void 0,"dropdown-menu");return[Object(r.useCallback)((function(n){n&&(i(n,s)||i(n,l))&&(t.current=o(n),n.style.margin="0",e.current=n)}),[s,l]),[Object(r.useMemo)((function(){return{name:"offset",options:{offset:function(e){var n=e.placement;if(!t.current)return[0,0];var r=t.current,i=r.top,a=r.left,o=r.bottom,s=r.right;switch(n.split("-")[0]){case"top":return[0,o];case"left":return[0,s];case"bottom":return[0,i];case"right":return[0,a];default:return[0,0]}}}}}),[t]),Object(r.useMemo)((function(){return{name:"arrow",options:{padding:function(){if(!n.current)return 0;var e=n.current,t=e.top,r=e.right,i=t||r;return{top:i,left:i,right:i,bottom:i}}}}}),[n]),Object(r.useMemo)((function(){return{name:"popoverArrowMargins",enabled:!0,phase:"main",fn:function(){},requiresIfExists:["arrow"],effect:function(t){var r=t.state;if(e.current&&r.elements.arrow&&i(e.current,s)){if(r.modifiersData["arrow#persistent"]){var a=o(r.elements.arrow),l=a.top,c=a.right,u=l||c;r.modifiersData["arrow#persistent"].padding={top:u,left:u,right:u,bottom:u}}else n.current=o(r.elements.arrow);return r.elements.arrow.style.margin="0",function(){r.elements.arrow&&(r.elements.arrow.style.margin="")}}}}}),[s])]]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){var t,n,i=(t=e,(n=Object(r.useRef)(t)).current=t,n);Object(r.useEffect)((function(){return function(){return i.current()}}),[])}},function(e,t,n){"use strict";var r=n(94),i=n(166),a=n(0),o=n(390);var s=function(e){var t=Object(o.a)();return[e[0],Object(a.useCallback)((function(n){if(t())return e[1](n)}),[t,e[1]])]},l=n(544),c=function(e){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},u={name:"applyStyles",enabled:!1},d={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(e){var t=e.state;return function(){var e=t.elements,n=e.reference,r=e.popper;if("removeAttribute"in n){var i=(n.getAttribute("aria-describedby")||"").split(",").filter((function(e){return e.trim()!==r.id}));i.length?n.setAttribute("aria-describedby",i.join(",")):n.removeAttribute("aria-describedby")}}},fn:function(e){var t,n=e.state.elements,r=n.popper,i=n.reference,a=null==(t=r.getAttribute("role"))?void 0:t.toLowerCase();if(r.id&&"tooltip"===a&&"setAttribute"in i){var o=i.getAttribute("aria-describedby");if(o&&-1!==o.split(",").indexOf(r.id))return;i.setAttribute("aria-describedby",o?o+","+r.id:r.id)}}},h=[];t.a=function(e,t,n){var o=void 0===n?{}:n,f=o.enabled,p=void 0===f||f,m=o.placement,g=void 0===m?"bottom":m,v=o.strategy,b=void 0===v?"absolute":v,y=o.modifiers,A=void 0===y?h:y,_=Object(i.a)(o,["enabled","placement","strategy","modifiers"]),w=Object(a.useRef)(),E=Object(a.useCallback)((function(){var e;null==(e=w.current)||e.update()}),[]),S=Object(a.useCallback)((function(){var e;null==(e=w.current)||e.forceUpdate()}),[]),C=s(Object(a.useState)({placement:g,update:E,forceUpdate:S,attributes:{},styles:{popper:c(b),arrow:{}}})),T=C[0],k=C[1],x=Object(a.useMemo)((function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(e){var t=e.state,n={},r={};Object.keys(t.elements).forEach((function(e){n[e]=t.styles[e],r[e]=t.attributes[e]})),k({state:t,styles:n,attributes:r,update:E,forceUpdate:S,placement:t.placement})}}}),[E,S,k]);return Object(a.useEffect)((function(){w.current&&p&&w.current.setOptions({placement:g,strategy:b,modifiers:[].concat(A,[x,u])})}),[b,g,x,p]),Object(a.useEffect)((function(){if(p&&null!=e&&null!=t)return w.current=Object(l.a)(e,t,Object(r.a)({},_,{placement:g,strategy:b,modifiers:[].concat(A,[d,x])})),function(){null!=w.current&&(w.current.destroy(),w.current=void 0,k((function(e){return Object(r.a)({},e,{attributes:{},styles:{popper:c(b)}})})))}}),[p,e,t]),T}},function(e,t,n){"use strict";var r=n(327),i=n(223),a=n(0),o=n(151),s=n(142),l=n.n(s),c=n(173),u=n(246),d=function(){};var h=function(e){return e&&("current"in e?e.current:e)};t.a=function(e,t,n){var s=void 0===n?{}:n,f=s.disabled,p=s.clickTrigger,m=void 0===p?"click":p,g=Object(a.useRef)(!1),v=t||d,b=Object(a.useCallback)((function(t){var n,i=h(e);l()(!!i,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),g.current=!(i&&(n=t,!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey))&&function(e){return 0===e.button}(t)&&!Object(r.a)(i,t.target))}),[e]),y=Object(o.a)((function(e){g.current||v(e)})),A=Object(o.a)((function(e){27===e.keyCode&&v(e)}));Object(a.useEffect)((function(){if(!f&&null!=e){var t,n=window.event,r=(t=h(e),Object(c.a)(Object(u.a)(t))),a=Object(i.a)(r,m,b,!0),o=Object(i.a)(r,m,(function(e){e!==n?y(e):n=void 0})),s=Object(i.a)(r,"keyup",(function(e){e!==n?A(e):n=void 0})),l=[];return"ontouchstart"in r.documentElement&&(l=[].slice.call(r.body.children).map((function(e){return Object(i.a)(e,"mousemove",d)}))),function(){a(),o(),s(),l.forEach((function(e){return e()}))}}}),[e,f,m,b,y,A])}},function(e,t,n){"use strict";var r=n(45),i=n(129),a=n(283);var o=n(290),s=n(282),l=n(189),c=n(170),u=n(172),d=n(393),h=n(116);t.a={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,f=e.name,p=n.mainAxis,m=void 0===p||p,g=n.altAxis,v=void 0!==g&&g,b=n.boundary,y=n.rootBoundary,A=n.altBoundary,_=n.padding,w=n.tether,E=void 0===w||w,S=n.tetherOffset,C=void 0===S?0:S,T=Object(c.a)(t,{boundary:b,rootBoundary:y,padding:_,altBoundary:A}),k=Object(i.a)(t.placement),x=Object(u.a)(t.placement),O=!x,I=Object(a.a)(k),M="x"===I?"y":"x",P=t.modifiersData.popperOffsets,D=t.rects.reference,N=t.rects.popper,L="function"==typeof C?C(Object.assign({},t.rects,{placement:t.placement})):C,R={x:0,y:0};if(P){if(m||v){var B="y"===I?r.m:r.f,j="y"===I?r.c:r.k,F="y"===I?"height":"width",U=P[I],H=P[I]+T[B],z=P[I]-T[j],V=E?-N[F]/2:0,W=x===r.l?D[F]:N[F],G=x===r.l?-N[F]:-D[F],q=t.elements.arrow,Y=E&&q?Object(s.a)(q):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Object(d.a)(),X=K[B],Q=K[j],$=Object(o.a)(0,D[F],Y[F]),J=O?D[F]/2-V-$-X-L:W-$-X-L,Z=O?-D[F]/2+V+$+Q+L:G+$+Q+L,ee=t.elements.arrow&&Object(l.a)(t.elements.arrow),te=ee?"y"===I?ee.clientTop||0:ee.clientLeft||0:0,ne=t.modifiersData.offset?t.modifiersData.offset[t.placement][I]:0,re=P[I]+J-ne-te,ie=P[I]+Z-ne;if(m){var ae=Object(o.a)(E?Object(h.b)(H,re):H,U,E?Object(h.a)(z,ie):z);P[I]=ae,R[I]=ae-U}if(v){var oe="x"===I?r.m:r.f,se="x"===I?r.c:r.k,le=P[M],ce=le+T[oe],ue=le-T[se],de=Object(o.a)(E?Object(h.b)(ce,re):ce,le,E?Object(h.a)(ue,ie):ue);P[M]=de,R[M]=de-le}}t.modifiersData[f]=R}},requiresIfExists:["offset"]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(38),i=n(176),a=n(50),o=n(286),s=n(30);function l(e,t){Object(s.a)(1,arguments);var n=t||{},r=n.locale,l=r&&r.options&&r.options.firstWeekContainsDate,c=null==l?1:Object(a.a)(l),u=null==n.firstWeekContainsDate?c:Object(a.a)(n.firstWeekContainsDate),d=Object(o.a)(e,t),h=new Date(0);h.setUTCFullYear(d,0,u),h.setUTCHours(0,0,0,0);var f=Object(i.a)(h,t);return f}function c(e,t){Object(s.a)(1,arguments);var n=Object(r.default)(e),a=Object(i.a)(n,t).getTime()-l(n,t).getTime();return Math.round(a/6048e5)+1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(38),i=n(191),a=n(414),o=n(30);function s(e){Object(o.a)(1,arguments);var t=Object(a.a)(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Object(i.a)(n);return r}function l(e){Object(o.a)(1,arguments);var t=Object(r.default)(e),n=Object(i.a)(t).getTime()-s(t).getTime();return Math.round(n/6048e5)+1}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",avatarCol:"avatarCol--3mDg_",avatarImg:"avatarImg--2TX7N",videoInfoCol:"videoInfoCol--1zix7"}},function(e,t,n){var r=n(1211);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",modalWrapper:"modalWrapper--1wqZV",modalBody:"modalBody--3j-qe"}},function(e,t,n){e.exports=n(1663)},function(e,t,n){var r;e.exports=(r=n(84),n(378),n(1668),n(1669),n(271),n(1670),n(272),n(520),n(940),n(1671),n(941),n(1672),n(1673),n(1674),n(521),n(1675),n(237),n(135),n(1676),n(1677),n(1678),n(1679),n(1680),n(1681),n(1682),n(1683),n(1684),n(1685),n(1686),n(1687),n(1688),n(1689),n(1690),n(1691),r)},,function(e,t,n){"use strict";(function(t){var r=n(154),i=n(1073),a=n(585),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?l=n(586):void 0!==t&&"[object process]"===Object.prototype.toString.call(t)&&(l=n(586)),l),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(o)})),e.exports=c}).call(this,n(96))},function(e,t,n){"use strict";var r=n(258).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,a){if("function"==typeof n)return e(t,null,n);n||(n={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(a||i);var o=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,l=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){s=!1,c=!0,o||a.call(t)},d=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,d=!0,s||a.call(t)},f=function(e){a.call(t,e)},p=function(){var e;return o&&!d?(t._readableState&&t._readableState.ended||(e=new r),a.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new r),a.call(t,e)):void 0},m=function(){t.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",u),t.on("abort",p),t.req?m():t.on("request",m)),t.on("end",h),t.on("finish",u),!1!==n.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",h),t.removeListener("error",f),t.removeListener("close",p)}}},function(e,t){var n=1e3,r=6e4,i=36e5,a=24*i;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*a;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return o(e,t,a,"day");if(t>=i)return o(e,t,i,"hour");if(t>=r)return o(e,t,r,"minute");if(t>=n)return o(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(260).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,a){if("function"==typeof n)return e(t,null,n);n||(n={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(a||i);var o=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,l=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){s=!1,c=!0,o||a.call(t)},d=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,d=!0,s||a.call(t)},f=function(e){a.call(t,e)},p=function(){var e;return o&&!d?(t._readableState&&t._readableState.ended||(e=new r),a.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new r),a.call(t,e)):void 0},m=function(){t.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",u),t.on("abort",p),t.req?m():t.on("request",m)),t.on("end",h),t.on("finish",u),!1!==n.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",h),t.removeListener("error",f),t.removeListener("close",p)}}},function(e,t,n){"use strict";const r=n(1141),i=n(739),a=n(300)("mqttjs:tls");e.exports=function(e,t){t.port=t.port||8883,t.host=t.hostname||t.host||"localhost",0===i.isIP(t.host)&&(t.servername=t.host),t.rejectUnauthorized=!1!==t.rejectUnauthorized,delete t.path,a("port %d host %s rejectUnauthorized %b",t.port,t.host,t.rejectUnauthorized);const n=r.connect(t);function o(r){t.rejectUnauthorized&&e.emit("error",r),n.end()}return n.on("secureConnect",(function(){t.rejectUnauthorized&&!n.authorized?n.emit("error",new Error("TLS not authorized")):n.removeListener("error",o)})),n.on("error",o),n}},function(e,t,n){(function(t,r){var i=n(257),a=n(1142),o=n(155),s=n(1145),l=t.from&&t.from!==Uint8Array.from?t.from([0]):new t([0]),c=function(e,t){e._corked?e.once("uncork",t):t()},u=function(e,t){return function(n){n?function(e,t){e._autoDestroy&&e.destroy(t)}(e,"premature close"===n.message?null:n):t&&!e._ended&&e.end()}},d=function(){},h=function(e,t,n){if(!(this instanceof h))return new h(e,t,n);i.Duplex.call(this,n),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!n||!1!==n.autoDestroy,this._forwardDestroy=!n||!1!==n.destroy,this._forwardEnd=!n||!1!==n.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};o(h,i.Duplex),h.obj=function(e,t,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new h(e,t,n)},h.prototype.cork=function(){1==++this._corked&&this.emit("cork")},h.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},h.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)e&&e.destroy&&e.destroy();else if(null!==e&&!1!==e){var t=this,n=a(e,{writable:!0,readable:!1},u(this,this._forwardEnd)),i=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&r.nextTick(i),this._writable=e,this._writable.on("drain",i),this._unwrite=function(){t._writable.removeListener("drain",i),n()},this.uncork()}else this.end()},h.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)e&&e.destroy&&e.destroy();else{if(null===e||!1===e)return this.push(null),void this.resume();var t,n=this,r=a(e,{writable:!1,readable:!0},u(this)),o=function(){n._forward()},s=function(){n.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:(t=e,new i.Readable({objectMode:!0,highWaterMark:16}).wrap(t)),this._readable2.on("readable",o),this._readable2.on("end",s),this._unread=function(){n._readable2.removeListener("readable",o),n._readable2.removeListener("end",s),r()},this._forward()}},h.prototype._read=function(){this._drained=!0,this._forward()},h.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var e;for(this._forwarding=!0;this._drained&&null!==(e=s(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},h.prototype.destroy=function(e,t){if(t||(t=d),this.destroyed)return t(null);this.destroyed=!0;var n=this;r.nextTick((function(){n._destroy(e),t(null)}))},h.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},h.prototype._write=function(e,t,n){if(!this.destroyed)return this._corked?c(this,this._write.bind(this,e,t,n)):e===l?this._finish(n):this._writable?void(!1===this._writable.write(e)?this._ondrain=n:this.destroyed||n()):n()},h.prototype._finish=function(e){var t=this;this.emit("preend"),c(this,(function(){var n,r;n=t._forwardEnd&&t._writable,r=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),c(t,e)},n?n._writableState&&n._writableState.finished?r():n._writableState?n.end(r):(n.end(),r()):r()}))},h.prototype.end=function(e,t,n){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this._writableState.destroyed||this.write(l),i.Writable.prototype.end.call(this,n))},e.exports=h}).call(this,n(113).Buffer,n(96))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(1151)),o=n(126),s=i(n(744)),l=i(n(117)),c=function(e,t,n){var r=t.slice();n=n||0;for(var i=Math.min(e.length,t.length+n),a=n;a<i;a++)r[a-n]=(0,o.mergeOptions)(e[a],r[a-n]);return r};t.updateSegments=c;var u=function(e,t){e.resolvedUri||(e.resolvedUri=(0,a.default)(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=(0,a.default)(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=(0,a.default)(t,e.map.uri))};t.resolveSegmentUris=u;var d=function(e,t){var n=(0,o.mergeOptions)(e,{}),r=n.playlists.filter((function(e){return e.uri===t.uri}))[0];if(!r)return null;if(r.segments&&t.segments&&r.segments.length===t.segments.length&&r.mediaSequence===t.mediaSequence)return null;var i=(0,o.mergeOptions)(r,t);r.segments&&(i.segments=c(r.segments,t.segments,t.mediaSequence-r.mediaSequence)),i.segments.forEach((function(e){u(e,i.resolvedUri)}));for(var a=0;a<n.playlists.length;a++)n.playlists[a].uri===t.uri&&(n.playlists[a]=i);return n.playlists[t.uri]=i,n};t.updateMaster=d;var h=function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];e.playlists[n.uri]=n,n.resolvedUri=(0,a.default)(e.uri,n.uri),n.attributes||(n.attributes={},o.log.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}};t.setupMediaPlaylists=h;var f=function(e){["AUDIO","SUBTITLES"].forEach((function(t){for(var n in e.mediaGroups[t])for(var r in e.mediaGroups[t][n]){var i=e.mediaGroups[t][n][r];i.uri&&(i.resolvedUri=(0,a.default)(e.uri,i.uri))}}))};t.resolveMediaGroupUris=f;var p=function(e,t){var n=e.segments[e.segments.length-1];return t&&n&&n.duration?1e3*n.duration:500*(e.targetDuration||10)};t.refreshDelay=p;var m=function(e){function t(e,n,r){var i=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),r=r||{},this.srcUrl=e,this.hls_=n,this.withCredentials=!!r.withCredentials,this.handleManifestRedirects=!!r.handleManifestRedirects,!this.srcUrl)throw new Error("A non-empty playlist URL is required");this.state="HAVE_NOTHING",this.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.hls_.xhr({uri:(0,a.default)(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(e,t){if(i.request)return e?i.playlistRequestError(i.request,i.media().uri,"HAVE_METADATA"):void i.haveMetadata(i.request,i.media().uri)})))}))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"playlistRequestError",value:function(e,t,n){this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[t],status:e.status,message:"HLS playlist request error at URL: "+t,responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t){var n=this;this.request=null,this.state="HAVE_METADATA";var r=new s.default.Parser;r.push(e.responseText),r.end(),r.manifest.uri=t,r.manifest.attributes=r.manifest.attributes||{};var i=d(this.master,r.manifest);this.targetDuration=r.manifest.targetDuration,i?(this.master=i,this.media_=this.master.playlists[r.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(l.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=l.default.setTimeout((function(){n.trigger("mediaupdatetimeout")}),p(this.media(),!!i))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),l.default.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var r=!this.media_||e.uri!==this.media_.uri;if(this.master.playlists[e.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(r){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(e.resolvedUri=t.resolveManifestRedirect(e.resolvedUri,i),r)return t.playlistRequestError(t.request,e.uri,n);t.haveMetadata(i,e.uri),"HAVE_MASTER"===n?t.trigger("loadedmetadata"):t.trigger("mediachange")}}))}}},{key:"resolveManifestRedirect",value:function(e,t){return this.handleManifestRedirects&&t.responseURL&&e!==t.responseURL?t.responseURL:e}},{key:"pause",value:function(){this.stopRequest(),l.default.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(e){var t=this;l.default.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=l.default.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var e=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");var r=new s.default.Parser;return r.push(n.responseText),r.end(),e.state="HAVE_MASTER",e.srcUrl=e.resolveManifestRedirect(e.srcUrl,n),r.manifest.uri=e.srcUrl,r.manifest.playlists?(e.master=r.manifest,h(e.master),f(e.master),e.trigger("loadedplaylist"),void(e.request||e.media(r.manifest.playlists[0]))):(e.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:l.default.location.href,playlists:[{uri:e.srcUrl,resolvedUri:e.srcUrl,attributes:{}}]},e.master.playlists[e.srcUrl]=e.master.playlists[0],e.haveMetadata(n,e.srcUrl),e.trigger("loadedmetadata"))}}))}}]),t}(o.EventTarget);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}return r(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"off",value:function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1}},{key:"trigger",value:function(e){var t=this.listeners[e],n=void 0,r=void 0,i=void 0;if(t)if(2===arguments.length)for(r=t.length,n=0;n<r;++n)t[n].call(this,arguments[1]);else for(i=Array.prototype.slice.call(arguments,1),r=t.length,n=0;n<r;++n)t[n].apply(this,i)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(e){this.on("data",(function(t){e.push(t)}))}}]),e}();t.default=i},function(e,t,n){"use strict";var r;(r=function(e,t){var n,i=0,a=16384,o=function(e,t){var n,r=e.position+t;r<e.bytes.byteLength||((n=new Uint8Array(2*r)).set(e.bytes.subarray(0,e.position),0),e.bytes=n,e.view=new DataView(e.bytes.buffer))},s=r.widthBytes||new Uint8Array("width".length),l=r.heightBytes||new Uint8Array("height".length),c=r.videocodecidBytes||new Uint8Array("videocodecid".length);if(!r.widthBytes){for(n=0;n<"width".length;n++)s[n]="width".charCodeAt(n);for(n=0;n<"height".length;n++)l[n]="height".charCodeAt(n);for(n=0;n<"videocodecid".length;n++)c[n]="videocodecid".charCodeAt(n);r.widthBytes=s,r.heightBytes=l,r.videocodecidBytes=c}switch(this.keyFrame=!1,e){case r.VIDEO_TAG:this.length=16,a*=6;break;case r.AUDIO_TAG:this.length=13,this.keyFrame=!0;break;case r.METADATA_TAG:this.length=29,this.keyFrame=!0;break;default:throw new Error("Unknown FLV tag type")}this.bytes=new Uint8Array(a),this.view=new DataView(this.bytes.buffer),this.bytes[0]=e,this.position=this.length,this.keyFrame=t,this.pts=0,this.dts=0,this.writeBytes=function(e,t,n){var r,i=t||0;r=i+(n=n||e.byteLength),o(this,n),this.bytes.set(e.subarray(i,r),this.position),this.position+=n,this.length=Math.max(this.length,this.position)},this.writeByte=function(e){o(this,1),this.bytes[this.position]=e,this.position++,this.length=Math.max(this.length,this.position)},this.writeShort=function(e){o(this,2),this.view.setUint16(this.position,e),this.position+=2,this.length=Math.max(this.length,this.position)},this.negIndex=function(e){return this.bytes[this.length-e]},this.nalUnitSize=function(){return 0===i?0:this.length-(i+4)},this.startNalUnit=function(){if(i>0)throw new Error("Attempted to create new NAL wihout closing the old one");i=this.length,this.length+=4,this.position=this.length},this.endNalUnit=function(e){var t,n;this.length===i+4?this.length-=4:i>0&&(t=i+4,n=this.length-t,this.position=i,this.view.setUint32(this.position,n),this.position=this.length,e&&e.push(this.bytes.subarray(t,t+n))),i=0},this.writeMetaDataDouble=function(e,t){var n;if(o(this,2+e.length+9),this.view.setUint16(this.position,e.length),this.position+=2,"width"===e)this.bytes.set(s,this.position),this.position+=5;else if("height"===e)this.bytes.set(l,this.position),this.position+=6;else if("videocodecid"===e)this.bytes.set(c,this.position),this.position+=12;else for(n=0;n<e.length;n++)this.bytes[this.position]=e.charCodeAt(n),this.position++;this.position++,this.view.setFloat64(this.position,t),this.position+=8,this.length=Math.max(this.length,this.position),++i},this.writeMetaDataBoolean=function(e,t){var n;for(o(this,2),this.view.setUint16(this.position,e.length),this.position+=2,n=0;n<e.length;n++)o(this,1),this.bytes[this.position]=e.charCodeAt(n),this.position++;o(this,2),this.view.setUint8(this.position,1),this.position++,this.view.setUint8(this.position,t?1:0),this.position++,this.length=Math.max(this.length,this.position),++i},this.finalize=function(){var e,n;switch(this.bytes[0]){case r.VIDEO_TAG:this.bytes[11]=7|(this.keyFrame||t?16:32),this.bytes[12]=t?0:1,e=this.pts-this.dts,this.bytes[13]=(16711680&e)>>>16,this.bytes[14]=(65280&e)>>>8,this.bytes[15]=(255&e)>>>0;break;case r.AUDIO_TAG:this.bytes[11]=175,this.bytes[12]=t?0:1;break;case r.METADATA_TAG:this.position=11,this.view.setUint8(this.position,2),this.position++,this.view.setUint16(this.position,10),this.position+=2,this.bytes.set([111,110,77,101,116,97,68,97,116,97],this.position),this.position+=10,this.bytes[this.position]=8,this.position++,this.view.setUint32(this.position,i),this.position=this.length,this.bytes.set([0,0,9],this.position),this.position+=3,this.length=this.position}return n=this.length-11,this.bytes[1]=(16711680&n)>>>16,this.bytes[2]=(65280&n)>>>8,this.bytes[3]=(255&n)>>>0,this.bytes[4]=(16711680&this.dts)>>>16,this.bytes[5]=(65280&this.dts)>>>8,this.bytes[6]=(255&this.dts)>>>0,this.bytes[7]=(4278190080&this.dts)>>>24,this.bytes[8]=0,this.bytes[9]=0,this.bytes[10]=0,o(this,4),this.view.setUint32(this.length,this.length),this.length+=4,this.position+=4,this.bytes=this.bytes.subarray(0,this.length),this.frameTime=r.frameTime(this.bytes),this}}).AUDIO_TAG=8,r.VIDEO_TAG=9,r.METADATA_TAG=18,r.isAudioFrame=function(e){return r.AUDIO_TAG===e[0]},r.isVideoFrame=function(e){return r.VIDEO_TAG===e[0]},r.isMetaData=function(e){return r.METADATA_TAG===e[0]},r.isKeyFrame=function(e){return r.isVideoFrame(e)?23===e[11]:!!r.isAudioFrame(e)||!!r.isMetaData(e)},r.frameTime=function(e){var t=e[4]<<16;return t|=e[5]<<8,t|=e[6]<<0,t|=e[7]<<24},e.exports=r},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(117)),a=r(n(264)),o=function(e){return isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e};t.default={addTextTrackData:function(e,t,n){var r,s=i.default.WebKitDataCue||i.default.VTTCue;t&&t.forEach((function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new s(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))}),e),n&&(r=o(e.mediaSource_.duration),n.forEach((function(e){var t=e.cueTime+this.timestampOffset;e.frames.forEach((function(e){var n=new s(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return a.default.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return a.default.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return a.default.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),this.metadataTrack_.addCue(n)}),this)}),e),e.metadataTrack_&&e.metadataTrack_.cues&&e.metadataTrack_.cues.length&&function(){for(var t=e.metadataTrack_.cues,n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);var a=n.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),o=Object.keys(a).sort((function(e,t){return Number(e)-Number(t)}));o.forEach((function(e,t){var n=a[e],i=Number(o[t+1])||r;n.forEach((function(e){e.endTime=i}))}))}())},durationOfVideo:o},e.exports=t.default},function(e,t,n){var r=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify,s=!1,l=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=entryModule)};void 0===r&&(s=!0,r=l,i=n.m);var c=function(e){for(var t,n=Object.keys(a),s=0;s<n.length;s++){var l=n[s],c=a[l].exports;if(c===e||c&&c.default===e){t=l;break}}if(!t){t=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var u={};for(s=0;s<n.length;s++){u[l=n[s]]=l}i[t]=["function(require,module,exports){"+e+"(self); }",u]}var d=Math.floor(Math.pow(16,8)*Math.random()).toString(16),h={};return h[t]=t,i[d]=["function(require,module,exports){var f = require("+o(t)+");(f.default ? f.default : f)(self);}",h],"("+r+")({"+Object.keys(i).map((function(e){return o(e)+":["+i[e][0]+","+o(i[e][1])+"]"})).join(",")+"},{},["+o(d)+"])"},u=function(e,t){var a,s="string"==typeof t;a=s?{}:[],Object.keys(i).forEach((function(e){i[e]&&(a[e]=i[e].toString())}));var l,c=n(t);if(!c||c!==e&&c.default!==e){var u=a[t];a[t]=u.substring(0,u.length-1)+"\n"+e.name+"();\n}"}s?(t=o(t),l="{"+Object.keys(a).map((function(e){return o(e)+":"+a[e]})).join(",")+"}"):l="["+a.join(",")+"]";return"var fn = ("+r.toString().replace("entryModule",t)+")("+l+');\n(typeof fn === "function") && fn(self);'};e.exports=function(e,t){var n;n=s?u(e,t):c(e);var r=new Blob([n],{type:"text/javascript"}),i=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(r),a=new Worker(i);return a.objectURL=i,a}},function(e,t,n){"use strict";var r,i,a,o,s,l,c,u,d,h,f=n(180),p=n(758),m=n(751),g=n(752),v=n(753).H264Stream,b=n(1186),y=n(1187),A=n(1188),_=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],w=["width","height","profileIdc","levelIdc","profileCompatibility"];s=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},d=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},h=function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n},(i=function(e){var t=[],n=0,r=0,a=0,o=1/0;i.prototype.init.call(this),this.push=function(n){l(e,n),e&&_.forEach((function(t){e[t]=n[t]})),t.push(n)},this.setEarliestDts=function(t){r=t-e.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){o=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var r,i,a,o;0!==t.length?(r=this.trimAdtsFramesByEarliestDts_(t),e.baseMediaDecodeTime=u(e),this.prefixWithSilence_(e,r),e.samples=this.generateSampleTable_(r),a=p.mdat(this.concatenateFrameData_(r)),t=[],i=p.moof(n,[e]),o=new Uint8Array(i.byteLength+a.byteLength),n++,o.set(i),o.set(a,i.byteLength),c(e),this.trigger("data",{track:e,boxes:o}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.prefixWithSilence_=function(e,t){var n,r,i,s,l=0,c=0,u=0;if(t.length&&(n=A.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(9e4/(e.samplerate/1024)),a&&o&&(l=n-Math.max(a,o),u=(c=Math.floor(l/r))*r),!(c<1||u>45e3))){for((i=y[e.samplerate])||(i=t[0].data),s=0;s<c;s++)t.splice(s,0,{data:i});e.baseMediaDecodeTime-=Math.floor(A.videoTsToAudioTs(u,e.samplerate))}},this.trimAdtsFramesByEarliestDts_=function(t){return e.minSegmentDts>=r?t:(e.minSegmentDts=1/0,t.filter((function(t){return t.dts>=r&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)})))},this.generateSampleTable_=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},this.concatenateFrameData_=function(e){var t,n,r=0,i=new Uint8Array(h(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i}}).prototype=new f,(r=function(e,t){var n,i,a=0,o=[],s=[];t=t||{},r.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){l(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],w.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,e.pps=[t.data]),o.push(t)},this.flush=function(){for(var n,r,i,d,h,f;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=this.groupNalsIntoFrames_(o),(i=this.groupFramesIntoGops_(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],e))?(i.unshift(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.pts=r.pts,i.dts=r.dts,i.duration+=r.duration):i=this.extendFirstKeyFrame_(i)),s.length){var m;if(!(m=t.alignGopsAtEnd?this.alignGopsAtEnd_(i):this.alignGopsAtStart_(i)))return this.gopCache_.unshift({gop:i.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");c(e),i=m}l(e,i),e.samples=this.generateSampleTable_(i),h=p.mdat(this.concatenateNalData_(i)),e.baseMediaDecodeTime=u(e),this.trigger("processedGopsInfo",i.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),this.gopCache_.unshift({gop:i.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),d=p.moof(a,[e]),f=new Uint8Array(d.byteLength+h.byteLength),a++,f.set(d),f.set(h,d.byteLength),this.trigger("data",{track:e,boxes:f}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){c(e),n=void 0,i=void 0},this.getGopForFusion_=function(t){var n,r,i,a,o,s=1/0;for(o=0;o<this.gopCache_.length;o++)i=(a=this.gopCache_[o]).gop,e.pps&&d(e.pps[0],a.pps[0])&&e.sps&&d(e.sps[0],a.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=a,s=n));return r?r.gop:null},this.extendFirstKeyFrame_=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},this.groupNalsIntoFrames_=function(e){var t,n,r=[],i=[];for(r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.push(r),i},this.groupFramesIntoGops_=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},this.generateSampleTable_=function(e,t){var n,r,i,a,o,s=t||0,l=[];for(n=0;n<e.length;n++)for(a=e[n],r=0;r<a.length;r++)o=a[r],(i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}}).dataOffset=s,i.compositionTimeOffset=o.pts-o.dts,i.duration=o.duration,i.size=4*o.length,i.size+=o.byteLength,o.keyFrame&&(i.flags.dependsOn=2),s+=i.size,l.push(i);return l},this.concatenateNalData_=function(e){var t,n,r,i,a,o,s=0,l=e.byteLength,c=e.nalCount,u=new Uint8Array(l+4*c),d=new DataView(u.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(a=i[n],r=0;r<a.length;r++)o=a[r],d.setUint32(s,o.data.byteLength),s+=4,u.set(o.data,s),s+=o.data.byteLength;return u},this.alignGopsAtStart_=function(e){var t,n,r,i,a,o,l,c;for(a=e.byteLength,o=e.nalCount,l=e.duration,t=n=0;t<s.length&&n<e.length&&(r=s[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,a-=i.byteLength,o-=i.nalCount,l-=i.duration);return 0===n?e:n===e.length?null:((c=e.slice(n)).byteLength=a,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,n,r,i,a,o,l;for(t=s.length-1,n=e.length-1,a=null,o=!1;t>=0&&n>=0;){if(r=s[t],i=e[n],r.pts===i.pts){o=!0;break}r.pts>i.pts?t--:(t===s.length-1&&(a=n),n--)}if(!o&&null===a)return null;if(0===(l=o?n:a))return e;var c=e.slice(l),u=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=u.byteLength,c.duration=u.duration,c.nalCount=u.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){s=e}}).prototype=new f,l=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},c=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},u=function(e){var t,n=e.minSegmentDts-e.timelineStartInfo.dts;return t=e.timelineStartInfo.baseMediaDecodeTime,t+=n,t=Math.max(0,t),"audio"===e.type&&(t*=e.samplerate/9e4,t=Math.floor(t)),t},(o=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==e.remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,o.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}}).prototype=new f,o.prototype.flush=function(e){var t,n,r,i,a=0,o={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,w.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,_.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,r=p.initSegment(this.pendingTracks),o.initSegment=new Uint8Array(r.byteLength),o.initSegment.set(r),o.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)o.data.set(this.pendingBoxes[i],a),a+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=t.startPts-s,t.startTime/=9e4,t.endTime=t.endPts-s,t.endTime/=9e4,o.captionStreams[t.stream]=!0,o.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=n.pts-s,n.cueTime/=9e4,o.metadata.push(n);o.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",o),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(a=function(e){var t,n,l=this,u=!0;a.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new m.MetadataStream,t.aacStream=new b,t.audioTimestampRolloverStream=new m.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new m.TimestampRolloverStream("timed-metadata"),t.adtsStream=new g,t.coalesceStream=new o(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",(function(e){t.aacStream.setTimestamp(e.timeStamp)})),t.aacStream.on("data",(function(e){"timed-metadata"!==e.type||t.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:l.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new i(n),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))})),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var a={};this.transmuxPipeline_=a,a.type="ts",a.metadataStream=new m.MetadataStream,a.packetStream=new m.TransportPacketStream,a.parseStream=new m.TransportParseStream,a.elementaryStream=new m.ElementaryStream,a.videoTimestampRolloverStream=new m.TimestampRolloverStream("video"),a.audioTimestampRolloverStream=new m.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new m.TimestampRolloverStream("timed-metadata"),a.adtsStream=new g,a.h264Stream=new v,a.captionStream=new m.CaptionStream,a.coalesceStream=new o(e,a.metadataStream),a.headOfPipeline=a.packetStream,a.packetStream.pipe(a.parseStream).pipe(a.elementaryStream),a.elementaryStream.pipe(a.videoTimestampRolloverStream).pipe(a.h264Stream),a.elementaryStream.pipe(a.audioTimestampRolloverStream).pipe(a.adtsStream),a.elementaryStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.h264Stream.pipe(a.captionStream).pipe(a.coalesceStream),a.elementaryStream.on("data",(function(o){var s;if("metadata"===o.type){for(s=o.tracks.length;s--;)t||"video"!==o.tracks[s].type?n||"audio"!==o.tracks[s].type||((n=o.tracks[s]).timelineStartInfo.baseMediaDecodeTime=l.baseMediaDecodeTime):(t=o.tracks[s]).timelineStartInfo.baseMediaDecodeTime=l.baseMediaDecodeTime;t&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=new r(t,e),a.videoSegmentStream.on("timelineStartInfo",(function(e){n&&(n.timelineStartInfo=e,a.audioSegmentStream.setEarliestDts(e.dts))})),a.videoSegmentStream.on("processedGopsInfo",l.trigger.bind(l,"gopInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),a.h264Stream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),n&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new i(n),a.adtsStream.pipe(a.audioSegmentStream).pipe(a.coalesceStream))}})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(e){var r=this.transmuxPipeline_;this.baseMediaDecodeTime=e,n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,c(n),n.timelineStartInfo.baseMediaDecodeTime=e,r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,c(t),r.captionStream.reset(),t.timelineStartInfo.baseMediaDecodeTime=e),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(u){var t=s(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),u=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){u=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new f,e.exports={Transmuxer:a,VideoSegmentStream:r,AudioSegmentStream:i,AUDIO_PROPERTIES:_,VIDEO_PROPERTIES:w}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};var i,a=n(126),o=(i=a)&&i.__esModule?i:{default:i},s=function(e,t){var n=[],r=void 0;if(e&&e.length)for(r=0;r<e.length;r++)t(e.start(r),e.end(r))&&n.push([e.start(r),e.end(r)]);return o.default.createTimeRanges(n)},l=function(e,t){var n=null,r=null,i=0,a=[],s=[];if(!(e&&e.length&&t&&t.length))return o.default.createTimeRange();for(var l=e.length;l--;)a.push({time:e.start(l),type:"start"}),a.push({time:e.end(l),type:"end"});for(l=t.length;l--;)a.push({time:t.start(l),type:"start"}),a.push({time:t.end(l),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),l=0;l<a.length;l++)"start"===a[l].type?2===++i&&(n=a[l].time):"end"===a[l].type&&1===--i&&(r=a[l].time),null!==n&&null!==r&&(s.push([n,r]),n=null,r=null);return o.default.createTimeRanges(s)};t.default={findRange:function(e,t){return s(e,(function(e,n){return e-1/30<=t&&n+1/30>=t}))},findNextRange:function(e,t){return s(e,(function(e){return e-1/30>=t}))},findGaps:function(e){if(e.length<2)return o.default.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return o.default.createTimeRanges(t)},findSoleUncommonTimeRangesEnd:function(e,t){var n=void 0,r=void 0,i=void 0,a=[],o=[],s=function(e){return e[0]<=i&&e[1]>=i};if(e)for(n=0;n<e.length;n++)r=e.start(n),i=e.end(n),o.push([r,i]);if(t)for(n=0;n<t.length;n++)r=t.start(n),i=t.end(n),o.some(s)||a.push(i);return 1!==a.length?null:a[0]},getSegmentBufferedPercent:function(e,t,n,i){var a,s,c,u,d,h=e+t,f=o.default.createTimeRanges([[e,h]]),p=o.default.createTimeRanges([[(a=e,s=[n,h],c=r(s,2),u=c[0],d=c[1],Math.min(Math.max(u,a),d)),h]]);if(p.start(0)===p.end(0))return 0;var m=function(e,t,n,r){for(var i=t.end(0)-t.start(0),a=i-(e.end(0)-e.start(0)),o=l(e,r),s=l(t,r),c=0,u=0,d=o.length;d--;)c+=o.end(d)-o.start(d),o.start(d)===n&&(c+=a);for(d=s.length;d--;)u+=s.end(d)-s.start(d);return Math.max(c,u)/i*100}(p,f,n,i);return isNaN(m)||m===1/0||m===-1/0?0:m},TIME_FUDGE_FACTOR:1/30,SAFE_TIME_DELTA:.1,printableRange:function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},timeUntilRebuffer:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2],r=e.length?e.end(e.length-1):0;return(r-t)/n}},e.exports=t.default},function(e,t,n){(function(e){
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C=C||{version:"4.6.0"};if(t.fabric=C,"undefined"!=typeof document&&"undefined"!=typeof window)document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?C.document=document:C.document=document.implementation.createHTMLDocument(""),C.window=window;else{var T=new(n(1222).JSDOM)(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;C.document=T.document,C.jsdomImplForWrapper=n(1223).implForWrapper,C.nodeCanvas=n(1224).Canvas,C.window=T,DOMParser=C.window.DOMParser}function k(e,t){var n=e.canvas,r=t.targetCanvas,i=r.getContext("2d");i.translate(0,r.height),i.scale(1,-1);var a=n.height-r.height;i.drawImage(n,0,a,r.width,r.height,0,0,r.width,r.height)}function x(e,t){var n=t.targetCanvas.getContext("2d"),r=t.destinationWidth,i=t.destinationHeight,a=r*i*4,o=new Uint8Array(this.imageBuffer,0,a),s=new Uint8ClampedArray(this.imageBuffer,0,a);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,o);var l=new ImageData(s,r,i);n.putImageData(l,0,0)}C.isTouchSupported="ontouchstart"in C.window||"ontouchstart"in C.document||C.window&&C.window.navigator&&C.window.navigator.maxTouchPoints>0,C.isLikelyNode=void 0!==e&&"undefined"==typeof window,C.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"],C.DPI=96,C.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",C.commaWsp="(?:\\s+,?\\s*|,\\s*)",C.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,C.reNonWord=/[ \n\.,;!\?\-]/,C.fontPaths={},C.iMatrix=[1,0,0,1,0,0],C.svgNS="http://www.w3.org/2000/svg",C.perfLimitSizeTotal=2097152,C.maxCacheSideLimit=4096,C.minCacheSideLimit=256,C.charWidthsCache={},C.textureSize=2048,C.disableStyleCopyPaste=!1,C.enableGLFiltering=!0,C.devicePixelRatio=C.window.devicePixelRatio||C.window.webkitDevicePixelRatio||C.window.mozDevicePixelRatio||1,C.browserShadowBlurConstant=1,C.arcToSegmentsCache={},C.boundsOfCurveCache={},C.cachesBoundsOfCurve=!0,C.forceGLPutImageData=!1,C.initFilterBackend=function(){return C.enableGLFiltering&&C.isWebglSupported&&C.isWebglSupported(C.textureSize)?(console.log("max texture size: "+C.maxTextureSize),new C.WebglFilterBackend({tileSize:C.textureSize})):C.Canvas2dFilterBackend?new C.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=C),function(){function e(e,t){if(this.__eventListeners[e]){var n=this.__eventListeners[e];t?n[n.indexOf(t)]=!1:C.util.array.fill(n,!1)}}function t(e,t){var n=function(){t.apply(this,arguments),this.off(e,n)}.bind(this);this.on(e,n)}C.Observable={fire:function(e,t){if(!this.__eventListeners)return this;var n=this.__eventListeners[e];if(!n)return this;for(var r=0,i=n.length;r<i;r++)n[r]&&n[r].call(this,t||{});return this.__eventListeners[e]=n.filter((function(e){return!1!==e})),this},on:function(e,t){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var n in e)this.on(n,e[n]);else this.__eventListeners[e]||(this.__eventListeners[e]=[]),this.__eventListeners[e].push(t);return this},once:function(e,n){if(1===arguments.length)for(var r in e)t.call(this,r,e[r]);else t.call(this,e,n);return this},off:function(t,n){if(!this.__eventListeners)return this;if(0===arguments.length)for(t in this.__eventListeners)e.call(this,t);else if(1===arguments.length&&"object"==typeof arguments[0])for(var r in t)e.call(this,r,t[r]);else e.call(this,t,n);return this}}}(),C.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var e=0,t=arguments.length;e<t;e++)this._onObjectAdded(arguments[e]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(e,t,n){var r=this._objects;return n?r[t]=e:r.splice(t,0,e),this._onObjectAdded&&this._onObjectAdded(e),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var e,t=this._objects,n=!1,r=0,i=arguments.length;r<i;r++)-1!==(e=t.indexOf(arguments[r]))&&(n=!0,t.splice(e,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[r]));return this.renderOnAddRemove&&n&&this.requestRenderAll(),this},forEachObject:function(e,t){for(var n=this.getObjects(),r=0,i=n.length;r<i;r++)e.call(t,n[r],r,n);return this},getObjects:function(e){return void 0===e?this._objects.concat():this._objects.filter((function(t){return t.type===e}))},item:function(e){return this._objects[e]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(e,t){return this._objects.indexOf(e)>-1||!!t&&this._objects.some((function(t){return"function"==typeof t.contains&&t.contains(e,!0)}))},complexity:function(){return this._objects.reduce((function(e,t){return e+=t.complexity?t.complexity():0}),0)}},C.CommonMethods={_setOptions:function(e){for(var t in e)this.set(t,e[t])},_initGradient:function(e,t){!e||!e.colorStops||e instanceof C.Gradient||this.set(t,new C.Gradient(e))},_initPattern:function(e,t,n){!e||!e.source||e instanceof C.Pattern?n&&n():this.set(t,new C.Pattern(e,n))},_setObject:function(e){for(var t in e)this._set(t,e[t])},set:function(e,t){return"object"==typeof e?this._setObject(e):this._set(e,t),this},_set:function(e,t){this[e]=t},toggle:function(e){var t=this.get(e);return"boolean"==typeof t&&this.set(e,!t),this},get:function(e){return this[e]}},r=t,i=Math.sqrt,a=Math.atan2,o=Math.pow,s=Math.PI/180,l=Math.PI/2,C.util={cos:function(e){if(0===e)return 1;switch(e<0&&(e=-e),e/l){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(0===e)return 0;var t=1;switch(e<0&&(t=-1),e/l){case 1:return t;case 2:return 0;case 3:return-t}return Math.sin(e)},removeFromArray:function(e,t){var n=e.indexOf(t);return-1!==n&&e.splice(n,1),e},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},degreesToRadians:function(e){return e*s},radiansToDegrees:function(e){return e/s},rotatePoint:function(e,t,n){var r=new C.Point(e.x-t.x,e.y-t.y),i=C.util.rotateVector(r,n);return new C.Point(i.x,i.y).addEquals(t)},rotateVector:function(e,t){var n=C.util.sin(t),r=C.util.cos(t);return{x:e.x*r-e.y*n,y:e.x*n+e.y*r}},transformPoint:function(e,t,n){return n?new C.Point(t[0]*e.x+t[2]*e.y,t[1]*e.x+t[3]*e.y):new C.Point(t[0]*e.x+t[2]*e.y+t[4],t[1]*e.x+t[3]*e.y+t[5])},makeBoundingBoxFromPoints:function(e,t){if(t)for(var n=0;n<e.length;n++)e[n]=C.util.transformPoint(e[n],t);var r=[e[0].x,e[1].x,e[2].x,e[3].x],i=C.util.array.min(r),a=C.util.array.max(r)-i,o=[e[0].y,e[1].y,e[2].y,e[3].y],s=C.util.array.min(o);return{left:i,top:s,width:a,height:C.util.array.max(o)-s}},invertTransform:function(e){var t=1/(e[0]*e[3]-e[1]*e[2]),n=[t*e[3],-t*e[1],-t*e[2],t*e[0]],r=C.util.transformPoint({x:e[4],y:e[5]},n,!0);return n[4]=-r.x,n[5]=-r.y,n},toFixed:function(e,t){return parseFloat(Number(e).toFixed(t))},parseUnit:function(e,t){var n=/\D{0,2}$/.exec(e),r=parseFloat(e);switch(t||(t=C.Text.DEFAULT_SVG_FONT_SIZE),n[0]){case"mm":return r*C.DPI/25.4;case"cm":return r*C.DPI/2.54;case"in":return r*C.DPI;case"pt":return r*C.DPI/72;case"pc":return r*C.DPI/72*12;case"em":return r*t;default:return r}},falseFunction:function(){return!1},getKlass:function(e,t){return e=C.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),C.util.resolveNamespace(t)[e]},getSvgAttributes:function(e){var t=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":t=t.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":t=t.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":t=t.concat(["offset","stop-color","stop-opacity"])}return t},resolveNamespace:function(e){if(!e)return C;var t,n=e.split("."),i=n.length,a=r||C.window;for(t=0;t<i;++t)a=a[n[t]];return a},loadImage:function(e,t,n,r){if(e){var i=C.util.createImage(),a=function(){t&&t.call(n,i,!1),i=i.onload=i.onerror=null};i.onload=a,i.onerror=function(){C.log("Error loading "+i.src),t&&t.call(n,null,!0),i=i.onload=i.onerror=null},0!==e.indexOf("data")&&null!=r&&(i.crossOrigin=r),"data:image/svg"===e.substring(0,14)&&(i.onload=null,C.util.loadImageInDom(i,a)),i.src=e}else t&&t.call(n,e)},loadImageInDom:function(e,t){var n=C.document.createElement("div");n.style.width=n.style.height="1px",n.style.left=n.style.top="-100%",n.style.position="absolute",n.appendChild(e),C.document.querySelector("body").appendChild(n),e.onload=function(){t(),n.parentNode.removeChild(n),n=null}},enlivenObjects:function(e,t,n,r){var i=[],a=0,o=(e=e||[]).length;function s(){++a===o&&t&&t(i.filter((function(e){return e})))}o?e.forEach((function(e,t){e&&e.type?C.util.getKlass(e.type,n).fromObject(e,(function(n,a){a||(i[t]=n),r&&r(e,n,a),s()})):s()})):t&&t(i)},enlivenPatterns:function(e,t){function n(){++i===a&&t&&t(r)}var r=[],i=0,a=(e=e||[]).length;a?e.forEach((function(e,t){e&&e.source?new C.Pattern(e,(function(e){r[t]=e,n()})):(r[t]=e,n())})):t&&t(r)},groupSVGElements:function(e,t,n){var r;return e&&1===e.length?e[0]:(t&&(t.width&&t.height?t.centerPoint={x:t.width/2,y:t.height/2}:(delete t.width,delete t.height)),r=new C.Group(e,t),void 0!==n&&(r.sourcePath=n),r)},populateWithProperties:function(e,t,n){if(n&&"[object Array]"===Object.prototype.toString.call(n))for(var r=0,i=n.length;r<i;r++)n[r]in e&&(t[n[r]]=e[n[r]])},drawDashedLine:function(e,t,n,r,o,s){var l=r-t,c=o-n,u=i(l*l+c*c),d=a(c,l),h=s.length,f=0,p=!0;for(e.save(),e.translate(t,n),e.moveTo(0,0),e.rotate(d),t=0;u>t;)(t+=s[f++%h])>u&&(t=u),e[p?"lineTo":"moveTo"](t,0),p=!p;e.restore()},createCanvasElement:function(){return C.document.createElement("canvas")},copyCanvasElement:function(e){var t=C.util.createCanvasElement();return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},toDataURL:function(e,t,n){return e.toDataURL("image/"+t,n)},createImage:function(){return C.document.createElement("img")},multiplyTransformMatrices:function(e,t,n){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],n?0:e[0]*t[4]+e[2]*t[5]+e[4],n?0:e[1]*t[4]+e[3]*t[5]+e[5]]},qrDecompose:function(e){var t=a(e[1],e[0]),n=o(e[0],2)+o(e[1],2),r=i(n),l=(e[0]*e[3]-e[2]*e[1])/r,c=a(e[0]*e[2]+e[1]*e[3],n);return{angle:t/s,scaleX:r,scaleY:l,skewX:c/s,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return C.iMatrix.concat();var t=C.util.degreesToRadians(e.angle),n=C.util.cos(t),r=C.util.sin(t);return[n,r,-r,n,0,0]},calcDimensionsMatrix:function(e){var t=void 0===e.scaleX?1:e.scaleX,n=void 0===e.scaleY?1:e.scaleY,r=[e.flipX?-t:t,0,0,e.flipY?-n:n,0,0],i=C.util.multiplyTransformMatrices,a=C.util.degreesToRadians;return e.skewX&&(r=i(r,[1,0,Math.tan(a(e.skewX)),1],!0)),e.skewY&&(r=i(r,[1,Math.tan(a(e.skewY)),0,1],!0)),r},composeMatrix:function(e){var t=[1,0,0,1,e.translateX||0,e.translateY||0],n=C.util.multiplyTransformMatrices;return e.angle&&(t=n(t,C.util.calcRotateMatrix(e))),(1!==e.scaleX||1!==e.scaleY||e.skewX||e.skewY||e.flipX||e.flipY)&&(t=n(t,C.util.calcDimensionsMatrix(e))),t},resetObjectTransform:function(e){e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},saveObjectTransform:function(e){return{scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}},isTransparent:function(e,t,n,r){r>0&&(t>r?t-=r:t=0,n>r?n-=r:n=0);var i,a=!0,o=e.getImageData(t,n,2*r||1,2*r||1),s=o.data.length;for(i=3;i<s&&!1!=(a=o.data[i]<=0);i+=4);return o=null,a},parsePreserveAspectRatioAttribute:function(e){var t,n="meet",r=e.split(" ");return r&&r.length&&("meet"!==(n=r.pop())&&"slice"!==n?(t=n,n="meet"):r.length&&(t=r.pop())),{meetOrSlice:n,alignX:"none"!==t?t.slice(1,4):"none",alignY:"none"!==t?t.slice(5,8):"none"}},clearFabricFontCache:function(e){(e=(e||"").toLowerCase())?C.charWidthsCache[e]&&delete C.charWidthsCache[e]:C.charWidthsCache={}},limitDimsByArea:function(e,t){var n=Math.sqrt(t*e),r=Math.floor(t/n);return{x:Math.floor(n),y:r}},capValue:function(e,t,n){return Math.max(e,Math.min(t,n))},findScaleToFit:function(e,t){return Math.min(t.width/e.width,t.height/e.height)},findScaleToCover:function(e,t){return Math.max(t.width/e.width,t.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map((function(e){return C.util.toFixed(e,C.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"},removeTransformFromObject:function(e,t){var n=C.util.invertTransform(t),r=C.util.multiplyTransformMatrices(n,e.calcOwnMatrix());C.util.applyTransformToObject(e,r)},addTransformToObject:function(e,t){C.util.applyTransformToObject(e,C.util.multiplyTransformMatrices(t,e.calcOwnMatrix()))},applyTransformToObject:function(e,t){var n=C.util.qrDecompose(t),r=new C.Point(n.translateX,n.translateY);e.flipX=!1,e.flipY=!1,e.set("scaleX",n.scaleX),e.set("scaleY",n.scaleY),e.skewX=n.skewX,e.skewY=n.skewY,e.angle=n.angle,e.setPositionByOrigin(r,"center","center")},sizeAfterTransform:function(e,t,n){var r=e/2,i=t/2,a=[{x:-r,y:-i},{x:r,y:-i},{x:-r,y:i},{x:r,y:i}],o=C.util.calcDimensionsMatrix(n),s=C.util.makeBoundingBoxFromPoints(a,o);return{x:s.width,y:s.height}}},function(){var e=Array.prototype.join,t={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},n={m:"l",M:"L"};function r(e,t,n,r,i,a,o,s,l,c,u){var d=C.util.cos(e),h=C.util.sin(e),f=C.util.cos(t),p=C.util.sin(t),m=n*i*f-r*a*p+o,g=r*i*f+n*a*p+s;return["C",c+l*(-n*i*h-r*a*d),u+l*(-r*i*h+n*a*d),m+l*(n*i*p+r*a*f),g+l*(r*i*p-n*a*f),m,g]}function i(e,t,n,i,o,s,l){var c=Math.PI,u=l*c/180,d=C.util.sin(u),h=C.util.cos(u),f=0,p=0,m=-h*e*.5-d*t*.5,g=-h*t*.5+d*e*.5,v=(n=Math.abs(n))*n,b=(i=Math.abs(i))*i,y=g*g,A=m*m,_=v*b-v*y-b*A,w=0;if(_<0){var E=Math.sqrt(1-_/(v*b));n*=E,i*=E}else w=(o===s?-1:1)*Math.sqrt(_/(v*y+b*A));var S=w*n*g/i,T=-w*i*m/n,k=h*S-d*T+.5*e,x=d*S+h*T+.5*t,O=a(1,0,(m-S)/n,(g-T)/i),I=a((m-S)/n,(g-T)/i,(-m-S)/n,(-g-T)/i);0===s&&I>0?I-=2*c:1===s&&I<0&&(I+=2*c);for(var M=Math.ceil(Math.abs(I/c*2)),P=[],D=I/M,N=8/3*Math.sin(D/4)*Math.sin(D/4)/Math.sin(D/2),L=O+D,R=0;R<M;R++)P[R]=r(O,L,h,d,n,i,k,x,N,f,p),f=P[R][5],p=P[R][6],O=L,L+=D;return P}function a(e,t,n,r){var i=Math.atan2(t,e),a=Math.atan2(r,n);return a>=i?a-i:2*Math.PI-(i-a)}function o(t,n,r,i,a,o,s,l){var c;if(C.cachesBoundsOfCurve&&(c=e.call(arguments),C.boundsOfCurveCache[c]))return C.boundsOfCurveCache[c];var u,d,h,f,p,m,g,v,b=Math.sqrt,y=Math.min,A=Math.max,_=Math.abs,w=[],E=[[],[]];d=6*t-12*r+6*a,u=-3*t+9*r-9*a+3*s,h=3*r-3*t;for(var S=0;S<2;++S)if(S>0&&(d=6*n-12*i+6*o,u=-3*n+9*i-9*o+3*l,h=3*i-3*n),_(u)<1e-12){if(_(d)<1e-12)continue;0<(f=-h/d)&&f<1&&w.push(f)}else(g=d*d-4*h*u)<0||(0<(p=(-d+(v=b(g)))/(2*u))&&p<1&&w.push(p),0<(m=(-d-v)/(2*u))&&m<1&&w.push(m));for(var T,k,x,O=w.length,I=O;O--;)T=(x=1-(f=w[O]))*x*x*t+3*x*x*f*r+3*x*f*f*a+f*f*f*s,E[0][O]=T,k=x*x*x*n+3*x*x*f*i+3*x*f*f*o+f*f*f*l,E[1][O]=k;E[0][I]=t,E[1][I]=n,E[0][I+1]=s,E[1][I+1]=l;var M=[{x:y.apply(null,E[0]),y:y.apply(null,E[1])},{x:A.apply(null,E[0]),y:A.apply(null,E[1])}];return C.cachesBoundsOfCurve&&(C.boundsOfCurveCache[c]=M),M}function s(e,t,n){for(var r=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=i(n[6]-e,n[7]-t,r,a,s,l,o),u=0,d=c.length;u<d;u++)c[u][1]+=e,c[u][2]+=t,c[u][3]+=e,c[u][4]+=t,c[u][5]+=e,c[u][6]+=t;return c}function l(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}function c(e,t,n,r,i,a,o,s){return function(l){var c=function(e){return e*e*e}(l),u=function(e){return 3*e*e*(1-e)}(l),d=function(e){return 3*e*(1-e)*(1-e)}(l),h=function(e){return(1-e)*(1-e)*(1-e)}(l);return{x:o*c+i*u+n*d+e*h,y:s*c+a*u+r*d+t*h}}}function u(e,t,n,r,i,a,o,s){return function(l){var c=1-l,u=3*c*c*(n-e)+6*c*l*(i-n)+3*l*l*(o-i),d=3*c*c*(r-t)+6*c*l*(a-r)+3*l*l*(s-a);return Math.atan2(d,u)}}function d(e,t,n,r,i,a){return function(o){var s=function(e){return e*e}(o),l=function(e){return 2*e*(1-e)}(o),c=function(e){return(1-e)*(1-e)}(o);return{x:i*s+n*l+e*c,y:a*s+r*l+t*c}}}function h(e,t,n,r,i,a){return function(o){var s=1-o,l=2*s*(n-e)+2*o*(i-n),c=2*s*(r-t)+2*o*(a-r);return Math.atan2(c,l)}}function f(e,t,n){var r,i,a={x:t,y:n},o=0;for(i=1;i<=100;i+=1)r=e(i/100),o+=l(a.x,a.y,r.x,r.y),a=r;return o}function p(e,t){for(var n,r,i,a=0,o=0,s=e.iterator,c={x:e.x,y:e.y},u=.01,d=e.angleFinder;o<t&&a<=1&&u>1e-4;)n=s(a),i=a,(r=l(c.x,c.y,n.x,n.y))+o>t?a-=u/=2:(c=n,a+=u,o+=r);return n.angle=d(i),n}function m(e){for(var t,n,r,i,a=0,o=e.length,s=0,p=0,m=0,g=0,v=[],b=0;b<o;b++){switch(r={x:s,y:p,command:(t=e[b])[0]},t[0]){case"M":r.length=0,m=s=t[1],g=p=t[2];break;case"L":r.length=l(s,p,t[1],t[2]),s=t[1],p=t[2];break;case"C":n=c(s,p,t[1],t[2],t[3],t[4],t[5],t[6]),i=u(s,p,t[1],t[2],t[3],t[4],t[5],t[6]),r.iterator=n,r.angleFinder=i,r.length=f(n,s,p),s=t[5],p=t[6];break;case"Q":n=d(s,p,t[1],t[2],t[3],t[4]),i=h(s,p,t[1],t[2],t[3],t[4]),r.iterator=n,r.angleFinder=i,r.length=f(n,s,p),s=t[3],p=t[4];break;case"Z":case"z":r.destX=m,r.destY=g,r.length=l(s,p,m,g),s=m,p=g}a+=r.length,v.push(r)}return v.push({length:a,x:s,y:p}),v}C.util.joinPath=function(e){return e.map((function(e){return e.join(" ")})).join(" ")},C.util.parsePath=function(e){var r,i,a,o,s,l=[],c=[],u=C.rePathCommand,d="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",h="("+d+")"+C.commaWsp,f="([01])"+C.commaWsp+"?",p=new RegExp(h+"?"+h+"?"+h+f+f+h+"?("+d+")","g");if(!e||!e.match)return l;for(var m,g=0,v=(s=e.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi)).length;g<v;g++){o=(r=s[g]).slice(1).trim(),c.length=0;var b=r.charAt(0);if(m=[b],"a"===b.toLowerCase())for(var y;y=p.exec(o);)for(var A=1;A<y.length;A++)c.push(y[A]);else for(;a=u.exec(o);)c.push(a[0]);A=0;for(var _=c.length;A<_;A++)i=parseFloat(c[A]),isNaN(i)||m.push(i);var w=t[b.toLowerCase()],E=n[b]||b;if(m.length-1>w)for(var S=1,T=m.length;S<T;S+=w)l.push([b].concat(m.slice(S,S+w))),b=E;else l.push(m)}return l},C.util.makePathSimpler=function(e){var t,n,r,i,a,o,l=0,c=0,u=e.length,d=0,h=0,f=[];for(n=0;n<u;++n){switch(r=!1,(t=e[n].slice(0))[0]){case"l":t[0]="L",t[1]+=l,t[2]+=c;case"L":l=t[1],c=t[2];break;case"h":t[1]+=l;case"H":t[0]="L",t[2]=c,l=t[1];break;case"v":t[1]+=c;case"V":t[0]="L",c=t[1],t[1]=l,t[2]=c;break;case"m":t[0]="M",t[1]+=l,t[2]+=c;case"M":l=t[1],c=t[2],d=t[1],h=t[2];break;case"c":t[0]="C",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c,t[5]+=l,t[6]+=c;case"C":a=t[3],o=t[4],l=t[5],c=t[6];break;case"s":t[0]="S",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c;case"S":"C"===i?(a=2*l-a,o=2*c-o):(a=l,o=c),l=t[3],c=t[4],t[0]="C",t[5]=t[3],t[6]=t[4],t[3]=t[1],t[4]=t[2],t[1]=a,t[2]=o,a=t[3],o=t[4];break;case"q":t[0]="Q",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c;case"Q":a=t[1],o=t[2],l=t[3],c=t[4];break;case"t":t[0]="T",t[1]+=l,t[2]+=c;case"T":"Q"===i?(a=2*l-a,o=2*c-o):(a=l,o=c),t[0]="Q",l=t[1],c=t[2],t[1]=a,t[2]=o,t[3]=l,t[4]=c;break;case"a":t[0]="A",t[6]+=l,t[7]+=c;case"A":r=!0,f=f.concat(s(l,c,t)),l=t[6],c=t[7];break;case"z":case"Z":l=d,c=h}r||f.push(t),i=t[0]}return f},C.util.getSmoothPathFromPoints=function(e,t){var n,r=[],i=new C.Point(e[0].x,e[0].y),a=new C.Point(e[1].x,e[1].y),o=e.length,s=1,l=0,c=o>2;for(t=t||0,c&&(s=e[2].x<a.x?-1:e[2].x===a.x?0:1,l=e[2].y<a.y?-1:e[2].y===a.y?0:1),r.push(["M",i.x-s*t,i.y-l*t]),n=1;n<o;n++){if(!i.eq(a)){var u=i.midPointFrom(a);r.push(["Q",i.x,i.y,u.x,u.y])}i=e[n],n+1<e.length&&(a=e[n+1])}return c&&(s=i.x>e[n-2].x?1:i.x===e[n-2].x?0:-1,l=i.y>e[n-2].y?1:i.y===e[n-2].y?0:-1),r.push(["L",i.x+s*t,i.y+l*t]),r},C.util.getPathSegmentsInfo=m,C.util.getBoundsOfCurve=o,C.util.getPointOnPath=function(e,t,n){n||(n=m(e));for(var r=0;t-n[r].length>0&&r<n.length-2;)t-=n[r].length,r++;var i,a=n[r],o=t/a.length,s=a.command,l=e[r];switch(s){case"M":return{x:a.x,y:a.y,angle:0};case"Z":case"z":return(i=new C.Point(a.x,a.y).lerp(new C.Point(a.destX,a.destY),o)).angle=Math.atan2(a.destY-a.y,a.destX-a.x),i;case"L":return(i=new C.Point(a.x,a.y).lerp(new C.Point(l[1],l[2]),o)).angle=Math.atan2(l[2]-a.y,l[1]-a.x),i;case"C":case"Q":return p(a,t)}},C.util.transformPath=function(e,t,n){return n&&(t=C.util.multiplyTransformMatrices(t,[1,0,0,1,-n.x,-n.y])),e.map((function(e){for(var n=e.slice(0),r={},i=1;i<e.length-1;i+=2)r.x=e[i],r.y=e[i+1],r=C.util.transformPoint(r,t),n[i]=r.x,n[i+1]=r.y;return n}))},C.util.fromArcToBeizers=s,C.util.getBoundsOfArc=function(e,t,n,r,a,s,l,c,u){for(var d,h=0,f=0,p=[],m=i(c-e,u-t,n,r,s,l,a),g=0,v=m.length;g<v;g++)d=o(h,f,m[g][1],m[g][2],m[g][3],m[g][4],m[g][5],m[g][6]),p.push({x:d[0].x+e,y:d[0].y+t}),p.push({x:d[1].x+e,y:d[1].y+t}),h=m[g][5],f=m[g][6];return p},C.util.drawArc=function(e,t,n,r){s(t,n,r=r.slice(0).unshift("X")).forEach((function(t){e.bezierCurveTo.apply(e,t.slice(1))}))}}(),function(){var e=Array.prototype.slice;function t(e,t,n){if(e&&0!==e.length){var r=e.length-1,i=t?e[r][t]:e[r];if(t)for(;r--;)n(e[r][t],i)&&(i=e[r][t]);else for(;r--;)n(e[r],i)&&(i=e[r]);return i}}C.util.array={fill:function(e,t){for(var n=e.length;n--;)e[n]=t;return e},invoke:function(t,n){for(var r=e.call(arguments,2),i=[],a=0,o=t.length;a<o;a++)i[a]=r.length?t[a][n].apply(t[a],r):t[a][n].call(t[a]);return i},min:function(e,n){return t(e,n,(function(e,t){return e<t}))},max:function(e,n){return t(e,n,(function(e,t){return e>=t}))}}}(),function(){function e(t,n,r){if(r)if(!C.isLikelyNode&&n instanceof Element)t=n;else if(n instanceof Array){t=[];for(var i=0,a=n.length;i<a;i++)t[i]=e({},n[i],r)}else if(n&&"object"==typeof n)for(var o in n)"canvas"===o||"group"===o?t[o]=null:n.hasOwnProperty(o)&&(t[o]=e({},n[o],r));else t=n;else for(var o in n)t[o]=n[o];return t}C.util.object={extend:e,clone:function(t,n){return e({},t,n)}},C.util.object.extend(C.util,C.Observable)}(),function(){function e(e,t){var n=e.charCodeAt(t);if(isNaN(n))return"";if(n<55296||n>57343)return e.charAt(t);if(55296<=n&&n<=56319){if(e.length<=t+1)throw"High surrogate without following low surrogate";var r=e.charCodeAt(t+1);if(56320>r||r>57343)throw"High surrogate without following low surrogate";return e.charAt(t)+e.charAt(t+1)}if(0===t)throw"Low surrogate without preceding high surrogate";var i=e.charCodeAt(t-1);if(55296>i||i>56319)throw"Low surrogate without preceding high surrogate";return!1}C.util.string={camelize:function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},capitalize:function(e,t){return e.charAt(0).toUpperCase()+(t?e.slice(1):e.slice(1).toLowerCase())},escapeXml:function(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},graphemeSplit:function(t){var n,r=0,i=[];for(r=0;r<t.length;r++)!1!==(n=e(t,r))&&i.push(n);return i}}}(),function(){var e=Array.prototype.slice,t=function(){},n=function(){for(var e in{toString:1})if("toString"===e)return!1;return!0}(),r=function(e,t,r){for(var i in t)i in e.prototype&&"function"==typeof e.prototype[i]&&(t[i]+"").indexOf("callSuper")>-1?e.prototype[i]=function(e){return function(){var n=this.constructor.superclass;this.constructor.superclass=r;var i=t[e].apply(this,arguments);if(this.constructor.superclass=n,"initialize"!==e)return i}}(i):e.prototype[i]=t[i],n&&(t.toString!==Object.prototype.toString&&(e.prototype.toString=t.toString),t.valueOf!==Object.prototype.valueOf&&(e.prototype.valueOf=t.valueOf))};function i(){}function a(t){for(var n=null,r=this;r.constructor.superclass;){var i=r.constructor.superclass.prototype[t];if(r[t]!==i){n=i;break}r=r.constructor.superclass.prototype}return n?arguments.length>1?n.apply(this,e.call(arguments,1)):n.call(this):console.log("tried to callSuper "+t+", method not found in prototype chain",this)}C.util.createClass=function(){var n=null,o=e.call(arguments,0);function s(){this.initialize.apply(this,arguments)}"function"==typeof o[0]&&(n=o.shift()),s.superclass=n,s.subclasses=[],n&&(i.prototype=n.prototype,s.prototype=new i,n.subclasses.push(s));for(var l=0,c=o.length;l<c;l++)r(s,o[l],n);return s.prototype.initialize||(s.prototype.initialize=t),s.prototype.constructor=s,s.prototype.callSuper=a,s}}(),c=!!C.document.createElement("div").attachEvent,u=["touchstart","touchmove","touchend"],C.util.addListener=function(e,t,n,r){e&&e.addEventListener(t,n,!c&&r)},C.util.removeListener=function(e,t,n,r){e&&e.removeEventListener(t,n,!c&&r)},C.util.getPointer=function(e){var t=e.target,n=C.util.getScrollLeftTop(t),r=function(e){var t=e.changedTouches;return t&&t[0]?t[0]:e}(e);return{x:r.clientX+n.left,y:r.clientY+n.top}},C.util.isTouchEvent=function(e){return u.indexOf(e.type)>-1||"touch"===e.pointerType},d=C.document.createElement("div"),h="string"==typeof d.style.opacity,f="string"==typeof d.style.filter,p=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,m=function(e){return e},h?m=function(e,t){return e.style.opacity=t,e}:f&&(m=function(e,t){var n=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(n.zoom=1),p.test(n.filter)?(t=t>=.9999?"":"alpha(opacity="+100*t+")",n.filter=n.filter.replace(p,t)):n.filter+=" alpha(opacity="+100*t+")",e}),C.util.setStyle=function(e,t){var n=e.style;if(!n)return e;if("string"==typeof t)return e.style.cssText+=";"+t,t.indexOf("opacity")>-1?m(e,t.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var r in t)"opacity"===r?m(e,t[r]):n["float"===r||"cssFloat"===r?void 0===n.styleFloat?"cssFloat":"styleFloat":r]=t[r];return e},function(){var e=Array.prototype.slice;var t,n,r,i,a=function(t){return e.call(t,0)};try{t=a(C.document.childNodes)instanceof Array}catch(e){}function o(e,t){var n=C.document.createElement(e);for(var r in t)"class"===r?n.className=t[r]:"for"===r?n.htmlFor=t[r]:n.setAttribute(r,t[r]);return n}function s(e){for(var t=0,n=0,r=C.document.documentElement,i=C.document.body||{scrollLeft:0,scrollTop:0};e&&(e.parentNode||e.host)&&((e=e.parentNode||e.host)===C.document?(t=i.scrollLeft||r.scrollLeft||0,n=i.scrollTop||r.scrollTop||0):(t+=e.scrollLeft||0,n+=e.scrollTop||0),1!==e.nodeType||"fixed"!==e.style.position););return{left:t,top:n}}t||(a=function(e){for(var t=new Array(e.length),n=e.length;n--;)t[n]=e[n];return t}),n=C.document.defaultView&&C.document.defaultView.getComputedStyle?function(e,t){var n=C.document.defaultView.getComputedStyle(e,null);return n?n[t]:void 0}:function(e,t){var n=e.style[t];return!n&&e.currentStyle&&(n=e.currentStyle[t]),n},r=C.document.documentElement.style,i="userSelect"in r?"userSelect":"MozUserSelect"in r?"MozUserSelect":"WebkitUserSelect"in r?"WebkitUserSelect":"KhtmlUserSelect"in r?"KhtmlUserSelect":"",C.util.makeElementUnselectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=C.util.falseFunction),i?e.style[i]="none":"string"==typeof e.unselectable&&(e.unselectable="on"),e},C.util.makeElementSelectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=null),i?e.style[i]="":"string"==typeof e.unselectable&&(e.unselectable=""),e},C.util.setImageSmoothing=function(e,t){e.imageSmoothingEnabled=e.imageSmoothingEnabled||e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled||e.oImageSmoothingEnabled,e.imageSmoothingEnabled=t},C.util.getById=function(e){return"string"==typeof e?C.document.getElementById(e):e},C.util.toArray=a,C.util.addClass=function(e,t){e&&-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=(e.className?" ":"")+t)},C.util.makeElement=o,C.util.wrapElement=function(e,t,n){return"string"==typeof t&&(t=o(t,n)),e.parentNode&&e.parentNode.replaceChild(t,e),t.appendChild(e),t},C.util.getScrollLeftTop=s,C.util.getElementOffset=function(e){var t,r,i=e&&e.ownerDocument,a={left:0,top:0},o={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!i)return o;for(var c in l)o[l[c]]+=parseInt(n(e,c),10)||0;return t=i.documentElement,void 0!==e.getBoundingClientRect&&(a=e.getBoundingClientRect()),r=s(e),{left:a.left+r.left-(t.clientLeft||0)+o.left,top:a.top+r.top-(t.clientTop||0)+o.top}},C.util.getNodeCanvas=function(e){var t=C.jsdomImplForWrapper(e);return t._canvas||t._image},C.util.cleanUpJsdomNode=function(e){if(C.isLikelyNode){var t=C.jsdomImplForWrapper(e);t&&(t._image=null,t._canvas=null,t._currentSrc=null,t._attributes=null,t._classList=null)}}}(),function(){function e(){}C.util.request=function(t,n){n||(n={});var r=n.method?n.method.toUpperCase():"GET",i=n.onComplete||function(){},a=new C.window.XMLHttpRequest,o=n.body||n.parameters;return a.onreadystatechange=function(){4===a.readyState&&(i(a),a.onreadystatechange=e)},"GET"===r&&(o=null,"string"==typeof n.parameters&&(t=function(e,t){return e+(/\?/.test(e)?"&":"?")+t}(t,n.parameters))),a.open(r,t,!0),"POST"!==r&&"PUT"!==r||a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.send(o),a}}(),C.log=console.log,C.warn=console.warn,function(){function e(){return!1}function t(e,t,n,r){return-n*Math.cos(e/r*(Math.PI/2))+n+t}var n=C.window.requestAnimationFrame||C.window.webkitRequestAnimationFrame||C.window.mozRequestAnimationFrame||C.window.oRequestAnimationFrame||C.window.msRequestAnimationFrame||function(e){return C.window.setTimeout(e,1e3/60)},r=C.window.cancelAnimationFrame||C.window.clearTimeout;function i(){return n.apply(C.window,arguments)}C.util.animate=function(n){var r=!1;return i((function(a){n||(n={});var o,s=a||+new Date,l=n.duration||500,c=s+l,u=n.onChange||e,d=n.abort||e,h=n.onComplete||e,f=n.easing||t,p="startValue"in n?n.startValue:0,m="endValue"in n?n.endValue:100,g=n.byValue||m-p;n.onStart&&n.onStart(),function e(t){var n=(o=t||+new Date)>c?l:o-s,a=n/l,v=f(n,p,g,l),b=Math.abs((v-p)/g);if(!r){if(!d(v,b,a))return o>c?(u(m,1,1),void h(m,1,1)):(u(v,b,a),void i(e));h(m,1,1)}}(s)})),function(){r=!0}},C.util.requestAnimFrame=i,C.util.cancelAnimFrame=function(){return r.apply(C.window,arguments)}}(),function(){function e(e,t,n){var r="rgba("+parseInt(e[0]+n*(t[0]-e[0]),10)+","+parseInt(e[1]+n*(t[1]-e[1]),10)+","+parseInt(e[2]+n*(t[2]-e[2]),10);return r+=","+(e&&t?parseFloat(e[3]+n*(t[3]-e[3])):1),r+=")"}C.util.animateColor=function(t,n,r,i){var a=new C.Color(t).getSource(),o=new C.Color(n).getSource(),s=i.onComplete,l=i.onChange;return i=i||{},C.util.animate(C.util.object.extend(i,{duration:r||500,startValue:a,endValue:o,byValue:o,easing:function(t,n,r,a){return e(n,r,i.colorEasing?i.colorEasing(t,a):1-Math.cos(t/a*(Math.PI/2)))},onComplete:function(t,n,r){if(s)return s(e(o,o,0),n,r)},onChange:function(t,n,r){if(l){if(Array.isArray(t))return l(e(t,t,0),n,r);l(t,n,r)}}}))}}(),function(){function e(e,t,n,r){return e<Math.abs(t)?(e=t,r=n/4):r=0===t&&0===e?n/(2*Math.PI)*Math.asin(1):n/(2*Math.PI)*Math.asin(t/e),{a:e,c:t,p:n,s:r}}function t(e,t,n){return e.a*Math.pow(2,10*(t-=1))*Math.sin((t*n-e.s)*(2*Math.PI)/e.p)}function n(e,t,n,i){return n-r(i-e,0,n,i)+t}function r(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t}C.util.ease={easeInQuad:function(e,t,n,r){return n*(e/=r)*e+t},easeOutQuad:function(e,t,n,r){return-n*(e/=r)*(e-2)+t},easeInOutQuad:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,n,r){return n*(e/=r)*e*e+t},easeOutCubic:function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t},easeInOutCubic:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,n,r){return n*(e/=r)*e*e*e+t},easeOutQuart:function(e,t,n,r){return-n*((e=e/r-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e+t:-n/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,n,r){return n*(e/=r)*e*e*e*e+t},easeOutQuint:function(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,n,r){return-n*Math.cos(e/r*(Math.PI/2))+n+t},easeOutSine:function(e,t,n,r){return n*Math.sin(e/r*(Math.PI/2))+t},easeInOutSine:function(e,t,n,r){return-n/2*(Math.cos(Math.PI*e/r)-1)+t},easeInExpo:function(e,t,n,r){return 0===e?t:n*Math.pow(2,10*(e/r-1))+t},easeOutExpo:function(e,t,n,r){return e===r?t+n:n*(1-Math.pow(2,-10*e/r))+t},easeInOutExpo:function(e,t,n,r){return 0===e?t:e===r?t+n:(e/=r/2)<1?n/2*Math.pow(2,10*(e-1))+t:n/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,n,r){return-n*(Math.sqrt(1-(e/=r)*e)-1)+t},easeOutCirc:function(e,t,n,r){return n*Math.sqrt(1-(e=e/r-1)*e)+t},easeInOutCirc:function(e,t,n,r){return(e/=r/2)<1?-n/2*(Math.sqrt(1-e*e)-1)+t:n/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(n,r,i,a){var o=0;return 0===n?r:1===(n/=a)?r+i:(o||(o=.3*a),-t(e(i,i,o,1.70158),n,a)+r)},easeOutElastic:function(t,n,r,i){var a=0;if(0===t)return n;if(1===(t/=i))return n+r;a||(a=.3*i);var o=e(r,r,a,1.70158);return o.a*Math.pow(2,-10*t)*Math.sin((t*i-o.s)*(2*Math.PI)/o.p)+o.c+n},easeInOutElastic:function(n,r,i,a){var o=0;if(0===n)return r;if(2===(n/=a/2))return r+i;o||(o=a*(.3*1.5));var s=e(i,i,o,1.70158);return n<1?-.5*t(s,n,a)+r:s.a*Math.pow(2,-10*(n-=1))*Math.sin((n*a-s.s)*(2*Math.PI)/s.p)*.5+s.c+r},easeInBack:function(e,t,n,r,i){return void 0===i&&(i=1.70158),n*(e/=r)*e*((i+1)*e-i)+t},easeOutBack:function(e,t,n,r,i){return void 0===i&&(i=1.70158),n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},easeInOutBack:function(e,t,n,r,i){return void 0===i&&(i=1.70158),(e/=r/2)<1?n/2*(e*e*((1+(i*=1.525))*e-i))+t:n/2*((e-=2)*e*((1+(i*=1.525))*e+i)+2)+t},easeInBounce:n,easeOutBounce:r,easeInOutBounce:function(e,t,i,a){return e<a/2?.5*n(2*e,0,i,a)+t:.5*r(2*e-a,0,i,a)+.5*i+t}}}(),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.util.object.clone,i=t.util.toFixed,a=t.util.parseUnit,o=t.util.multiplyTransformMatrices,s={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},l={stroke:"strokeOpacity",fill:"fillOpacity"};function c(e){return e in s?s[e]:e}function u(e,n,r,i){var s,l="[object Array]"===Object.prototype.toString.call(n);if("fill"!==e&&"stroke"!==e||"none"!==n){if("strokeUniform"===e)return"non-scaling-stroke"===n;if("strokeDashArray"===e)n="none"===n?null:n.replace(/,/g," ").split(/\s+/).map(parseFloat);else if("transformMatrix"===e)n=r&&r.transformMatrix?o(r.transformMatrix,t.parseTransformAttribute(n)):t.parseTransformAttribute(n);else if("visible"===e)n="none"!==n&&"hidden"!==n,r&&!1===r.visible&&(n=!1);else if("opacity"===e)n=parseFloat(n),r&&void 0!==r.opacity&&(n*=r.opacity);else if("textAnchor"===e)n="start"===n?"left":"end"===n?"right":"center";else if("charSpacing"===e)s=a(n,i)/i*1e3;else if("paintFirst"===e){var c=n.indexOf("fill"),u=n.indexOf("stroke");n="fill";c>-1&&u>-1&&u<c?n="stroke":-1===c&&u>-1&&(n="stroke")}else{if("href"===e||"xlink:href"===e||"font"===e)return n;if("imageSmoothing"===e)return"optimizeQuality"===n;s=l?n.map(a):a(n,i)}}else n="";return!l&&isNaN(s)?n:s}function d(e){return new RegExp("^("+e.join("|")+")\\b","i")}function h(e,t){var n,r,i,a,o=[];for(i=0,a=t.length;i<a;i++)n=t[i],r=e.getElementsByTagName(n),o=o.concat(Array.prototype.slice.call(r));return o}function f(e,t){var n,r=!0;return(n=p(e,t.pop()))&&t.length&&(r=function(e,t){var n,r=!0;for(;e.parentNode&&1===e.parentNode.nodeType&&t.length;)r&&(n=t.pop()),e=e.parentNode,r=p(e,n);return 0===t.length}(e,t)),n&&r&&0===t.length}function p(e,t){var n,r,i=e.nodeName,a=e.getAttribute("class"),o=e.getAttribute("id");if(n=new RegExp("^"+i,"i"),t=t.replace(n,""),o&&t.length&&(n=new RegExp("#"+o+"(?![a-zA-Z\\-]+)","i"),t=t.replace(n,"")),a&&t.length)for(r=(a=a.split(" ")).length;r--;)n=new RegExp("\\."+a[r]+"(?![a-zA-Z\\-]+)","i"),t=t.replace(n,"");return 0===t.length}function m(e,t){var n;if(e.getElementById&&(n=e.getElementById(t)),n)return n;var r,i,a,o=e.getElementsByTagName("*");for(i=0,a=o.length;i<a;i++)if(t===(r=o[i]).getAttribute("id"))return r}t.svgValidTagNamesRegEx=d(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]),t.svgViewBoxElementsRegEx=d(["symbol","image","marker","pattern","view","svg"]),t.svgInvalidAncestorsRegEx=d(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),t.svgValidParentsRegEx=d(["symbol","g","a","svg","clipPath","defs"]),t.cssRules={},t.gradientDefs={},t.clipPaths={},t.parseTransformAttribute=function(){function e(e,n,r){e[r]=Math.tan(t.util.degreesToRadians(n[0]))}var n=t.iMatrix,r=t.reNum,i=t.commaWsp,a="(?:"+("(?:(matrix)\\s*\\(\\s*("+r+")"+i+"("+r+")"+i+"("+r+")"+i+"("+r+")"+i+"("+r+")"+i+"("+r+")\\s*\\))")+"|"+("(?:(translate)\\s*\\(\\s*("+r+")(?:"+i+"("+r+"))?\\s*\\))")+"|"+("(?:(scale)\\s*\\(\\s*("+r+")(?:"+i+"("+r+"))?\\s*\\))")+"|"+("(?:(rotate)\\s*\\(\\s*("+r+")(?:"+i+"("+r+")"+i+"("+r+"))?\\s*\\))")+"|"+("(?:(skewX)\\s*\\(\\s*("+r+")\\s*\\))")+"|"+("(?:(skewY)\\s*\\(\\s*("+r+")\\s*\\))")+")",o=new RegExp("^\\s*(?:"+("(?:"+a+"(?:"+i+"*"+a+")*)")+"?)\\s*$"),s=new RegExp(a,"g");return function(r){var i=n.concat(),l=[];if(!r||r&&!o.test(r))return i;r.replace(s,(function(r){var o=new RegExp(a).exec(r).filter((function(e){return!!e})),s=o[1],c=o.slice(2).map(parseFloat);switch(s){case"translate":!function(e,t){e[4]=t[0],2===t.length&&(e[5]=t[1])}(i,c);break;case"rotate":c[0]=t.util.degreesToRadians(c[0]),function(e,n){var r=t.util.cos(n[0]),i=t.util.sin(n[0]),a=0,o=0;3===n.length&&(a=n[1],o=n[2]),e[0]=r,e[1]=i,e[2]=-i,e[3]=r,e[4]=a-(r*a-i*o),e[5]=o-(i*a+r*o)}(i,c);break;case"scale":!function(e,t){var n=t[0],r=2===t.length?t[1]:t[0];e[0]=n,e[3]=r}(i,c);break;case"skewX":e(i,c,2);break;case"skewY":e(i,c,1);break;case"matrix":i=c}l.push(i.concat()),i=n.concat()}));for(var c=l[0];l.length>1;)l.shift(),c=t.util.multiplyTransformMatrices(c,l[0]);return c}}();var g=new RegExp("^\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*$");function v(e){if(!t.svgViewBoxElementsRegEx.test(e.nodeName))return{};var n,r,i,o,s,l,c=e.getAttribute("viewBox"),u=1,d=1,h=e.getAttribute("width"),f=e.getAttribute("height"),p=e.getAttribute("x")||0,m=e.getAttribute("y")||0,v=e.getAttribute("preserveAspectRatio")||"",b=!c||!(c=c.match(g)),y=!h||!f||"100%"===h||"100%"===f,A=b&&y,_={},w="",E=0,S=0;if(_.width=0,_.height=0,_.toBeParsed=A,b&&(p||m)&&e.parentNode&&"#document"!==e.parentNode.nodeName&&(w=" translate("+a(p)+" "+a(m)+") ",s=(e.getAttribute("transform")||"")+w,e.setAttribute("transform",s),e.removeAttribute("x"),e.removeAttribute("y")),A)return _;if(b)return _.width=a(h),_.height=a(f),_;if(n=-parseFloat(c[1]),r=-parseFloat(c[2]),i=parseFloat(c[3]),o=parseFloat(c[4]),_.minX=n,_.minY=r,_.viewBoxWidth=i,_.viewBoxHeight=o,y?(_.width=i,_.height=o):(_.width=a(h),_.height=a(f),u=_.width/i,d=_.height/o),"none"!==(v=t.util.parsePreserveAspectRatioAttribute(v)).alignX&&("meet"===v.meetOrSlice&&(d=u=u>d?d:u),"slice"===v.meetOrSlice&&(d=u=u>d?u:d),E=_.width-i*u,S=_.height-o*u,"Mid"===v.alignX&&(E/=2),"Mid"===v.alignY&&(S/=2),"Min"===v.alignX&&(E=0),"Min"===v.alignY&&(S=0)),1===u&&1===d&&0===n&&0===r&&0===p&&0===m)return _;if((p||m)&&"#document"!==e.parentNode.nodeName&&(w=" translate("+a(p)+" "+a(m)+") "),s=w+" matrix("+u+" 0 0 "+d+" "+(n*u+E)+" "+(r*d+S)+") ","svg"===e.nodeName){for(l=e.ownerDocument.createElementNS(t.svgNS,"g");e.firstChild;)l.appendChild(e.firstChild);e.appendChild(l)}else(l=e).removeAttribute("x"),l.removeAttribute("y"),s=l.getAttribute("transform")+s;return l.setAttribute("transform",s),_}function b(e,t){var n=m(e,t.getAttribute("xlink:href").substr(1));if(n&&n.getAttribute("xlink:href")&&b(e,n),["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"].forEach((function(e){n&&!t.hasAttribute(e)&&n.hasAttribute(e)&&t.setAttribute(e,n.getAttribute(e))})),!t.children.length)for(var r=n.cloneNode(!0);r.firstChild;)t.appendChild(r.firstChild);t.removeAttribute("xlink:href")}t.parseSVGDocument=function(e,n,i,a){if(e){!function(e){for(var n=h(e,["use","svg:use"]),r=0;n.length&&r<n.length;){var i=n[r],a=i.getAttribute("xlink:href")||i.getAttribute("href");if(null===a)return;var o,s,l,c,u=a.substr(1),d=i.getAttribute("x")||0,f=i.getAttribute("y")||0,p=m(e,u).cloneNode(!0),g=(p.getAttribute("transform")||"")+" translate("+d+", "+f+")",b=n.length,y=t.svgNS;if(v(p),/^svg$/i.test(p.nodeName)){var A=p.ownerDocument.createElementNS(y,"g");for(s=0,c=(l=p.attributes).length;s<c;s++)o=l.item(s),A.setAttributeNS(y,o.nodeName,o.nodeValue);for(;p.firstChild;)A.appendChild(p.firstChild);p=A}for(s=0,c=(l=i.attributes).length;s<c;s++)"x"!==(o=l.item(s)).nodeName&&"y"!==o.nodeName&&"xlink:href"!==o.nodeName&&"href"!==o.nodeName&&("transform"===o.nodeName?g=o.nodeValue+" "+g:p.setAttribute(o.nodeName,o.nodeValue));p.setAttribute("transform",g),p.setAttribute("instantiated_by_use","1"),p.removeAttribute("id"),i.parentNode.replaceChild(p,i),n.length===b&&r++}}(e);var o,s,l=t.Object.__uid++,c=v(e),u=t.util.toArray(e.getElementsByTagName("*"));if(c.crossOrigin=a&&a.crossOrigin,c.svgUid=l,0===u.length&&t.isLikelyNode){var d=[];for(o=0,s=(u=e.selectNodes('//*[name(.)!="svg"]')).length;o<s;o++)d[o]=u[o];u=d}var f=u.filter((function(e){return v(e),t.svgValidTagNamesRegEx.test(e.nodeName.replace("svg:",""))&&!function(e,t){for(;e&&(e=e.parentNode);)if(e.nodeName&&t.test(e.nodeName.replace("svg:",""))&&!e.getAttribute("instantiated_by_use"))return!0;return!1}(e,t.svgInvalidAncestorsRegEx)}));if(!f||f&&!f.length)n&&n([],{});else{var p={};u.filter((function(e){return"clipPath"===e.nodeName.replace("svg:","")})).forEach((function(e){var n=e.getAttribute("id");p[n]=t.util.toArray(e.getElementsByTagName("*")).filter((function(e){return t.svgValidTagNamesRegEx.test(e.nodeName.replace("svg:",""))}))})),t.gradientDefs[l]=t.getGradientDefs(e),t.cssRules[l]=t.getCSSRules(e),t.clipPaths[l]=p,t.parseElements(f,(function(e,r){n&&(n(e,c,r,u),delete t.gradientDefs[l],delete t.cssRules[l],delete t.clipPaths[l])}),r(c),i,a)}}};var y=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+t.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+t.reNum+"))?\\s+(.*)");n(t,{parseFontDeclaration:function(e,t){var n=e.match(y);if(n){var r=n[1],i=n[3],o=n[4],s=n[5],l=n[6];r&&(t.fontStyle=r),i&&(t.fontWeight=isNaN(parseFloat(i))?i:parseFloat(i)),o&&(t.fontSize=a(o)),l&&(t.fontFamily=l),s&&(t.lineHeight="normal"===s?1:s)}},getGradientDefs:function(e){var t,n=h(e,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),r=0,i={};for(r=n.length;r--;)(t=n[r]).getAttribute("xlink:href")&&b(e,t),i[t.getAttribute("id")]=t;return i},parseAttributes:function(e,r,o){if(e){var s,d,h,p={};void 0===o&&(o=e.getAttribute("svgUid")),e.parentNode&&t.svgValidParentsRegEx.test(e.parentNode.nodeName)&&(p=t.parseAttributes(e.parentNode,r,o));var m=r.reduce((function(t,n){return(s=e.getAttribute(n))&&(t[n]=s),t}),{}),g=n(function(e,n){var r={};for(var i in t.cssRules[n])if(f(e,i.split(" ")))for(var a in t.cssRules[n][i])r[a]=t.cssRules[n][i][a];return r}(e,o),t.parseStyleAttribute(e));m=n(m,g),g["clip-path"]&&e.setAttribute("clip-path",g["clip-path"]),d=h=p.fontSize||t.Text.DEFAULT_SVG_FONT_SIZE,m["font-size"]&&(m["font-size"]=d=a(m["font-size"],h));var v,b,y={};for(var A in m)b=u(v=c(A),m[A],p,d),y[v]=b;y&&y.font&&t.parseFontDeclaration(y.font,y);var _=n(p,y);return t.svgValidParentsRegEx.test(e.nodeName)?_:function(e){for(var n in l)if(void 0!==e[l[n]]&&""!==e[n]){if(void 0===e[n]){if(!t.Object.prototype[n])continue;e[n]=t.Object.prototype[n]}if(0!==e[n].indexOf("url(")){var r=new t.Color(e[n]);e[n]=r.setAlpha(i(r.getAlpha()*e[l[n]],2)).toRgba()}}return e}(_)}},parseElements:function(e,n,r,i,a){new t.ElementsParser(e,n,r,i,a).parse()},parseStyleAttribute:function(e){var t={},n=e.getAttribute("style");return n?("string"==typeof n?function(e,t){var n,r;e.replace(/;\s*$/,"").split(";").forEach((function(e){var i=e.split(":");n=i[0].trim().toLowerCase(),r=i[1].trim(),t[n]=r}))}(n,t):function(e,t){var n,r;for(var i in e)void 0!==e[i]&&(n=i.toLowerCase(),r=e[i],t[n]=r)}(n,t),t):t},parsePointsAttribute:function(e){if(!e)return null;var t,n,r=[];for(t=0,n=(e=(e=e.replace(/,/g," ").trim()).split(/\s+/)).length;t<n;t+=2)r.push({x:parseFloat(e[t]),y:parseFloat(e[t+1])});return r},getCSSRules:function(e){var n,r,i=e.getElementsByTagName("style"),a={};for(n=0,r=i.length;n<r;n++){var o=i[n].textContent;""!==(o=o.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&o.match(/[^{]*\{[\s\S]*?\}/g).map((function(e){return e.trim()})).forEach((function(e){var i=e.match(/([\s\S]*?)\s*\{([^}]*)\}/),o={},s=i[2].trim().replace(/;$/,"").split(/\s*;\s*/);for(n=0,r=s.length;n<r;n++){var l=s[n].split(/\s*:\s*/),c=l[0],u=l[1];o[c]=u}(e=i[1]).split(",").forEach((function(e){""!==(e=e.replace(/^svg/i,"").trim())&&(a[e]?t.util.object.extend(a[e],o):a[e]=t.util.object.clone(o))}))}))}return a},loadSVGFromURL:function(e,n,r,i){e=e.replace(/^\n\s*/,"").trim(),new t.util.request(e,{method:"get",onComplete:function(e){var a=e.responseXML;if(!a||!a.documentElement)return n&&n(null),!1;t.parseSVGDocument(a.documentElement,(function(e,t,r,i){n&&n(e,t,r,i)}),r,i)}})},loadSVGFromString:function(e,n,r,i){var a=(new t.window.DOMParser).parseFromString(e.trim(),"text/xml");t.parseSVGDocument(a.documentElement,(function(e,t,r,i){n(e,t,r,i)}),r,i)}})}(t),C.ElementsParser=function(e,t,n,r,i,a){this.elements=e,this.callback=t,this.options=n,this.reviver=r,this.svgUid=n&&n.svgUid||0,this.parsingOptions=i,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=a},(g=C.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},g.createObjects=function(){var e=this;this.elements.forEach((function(t,n){t.setAttribute("svgUid",e.svgUid),e.createObject(t,n)}))},g.findTag=function(e){return C[C.util.string.capitalize(e.tagName.replace("svg:",""))]},g.createObject=function(e,t){var n=this.findTag(e);if(n&&n.fromElement)try{n.fromElement(e,this.createCallback(t,e),this.options)}catch(e){C.log(e)}else this.checkIfDone()},g.createCallback=function(e,t){var n=this;return function(r){var i;n.resolveGradient(r,t,"fill"),n.resolveGradient(r,t,"stroke"),r instanceof C.Image&&r._originalElement&&(i=r.parsePreserveAspectRatioAttribute(t)),r._removeTransformMatrix(i),n.resolveClipPath(r,t),n.reviver&&n.reviver(t,r),n.instances[e]=r,n.checkIfDone()}},g.extractPropertyDefinition=function(e,t,n){var r=e[t],i=this.regexUrl;if(i.test(r)){i.lastIndex=0;var a=i.exec(r)[1];return i.lastIndex=0,C[n][this.svgUid][a]}},g.resolveGradient=function(e,t,n){var r=this.extractPropertyDefinition(e,n,"gradientDefs");if(r){var i=t.getAttribute(n+"-opacity"),a=C.Gradient.fromElement(r,e,i,this.options);e.set(n,a)}},g.createClipPathCallback=function(e,t){return function(e){e._removeTransformMatrix(),e.fillRule=e.clipRule,t.push(e)}},g.resolveClipPath=function(e,t){var n,r,i,a,o=this.extractPropertyDefinition(e,"clipPath","clipPaths");if(o){i=[],r=C.util.invertTransform(e.calcTransformMatrix());for(var s=o[0].parentNode,l=t;l.parentNode&&l.getAttribute("clip-path")!==e.clipPath;)l=l.parentNode;l.parentNode.appendChild(s);for(var c=0;c<o.length;c++)n=o[c],this.findTag(n).fromElement(n,this.createClipPathCallback(e,i),this.options);o=1===i.length?i[0]:new C.Group(i),a=C.util.multiplyTransformMatrices(r,o.calcTransformMatrix()),o.clipPath&&this.resolveClipPath(o,l);var u=C.util.qrDecompose(a);o.flipX=!1,o.flipY=!1,o.set("scaleX",u.scaleX),o.set("scaleY",u.scaleY),o.angle=u.angle,o.skewX=u.skewX,o.skewY=0,o.setPositionByOrigin({x:u.translateX,y:u.translateY},"center","center"),e.clipPath=o}else delete e.clipPath},g.checkIfDone=function(){0==--this.numElements&&(this.instances=this.instances.filter((function(e){return null!=e})),this.callback(this.instances,this.elements))},function(e){"use strict";var t=e.fabric||(e.fabric={});function n(e,t){this.x=e,this.y=t}t.Point?t.warn("fabric.Point is already defined"):(t.Point=n,n.prototype={type:"point",constructor:n,add:function(e){return new n(this.x+e.x,this.y+e.y)},addEquals:function(e){return this.x+=e.x,this.y+=e.y,this},scalarAdd:function(e){return new n(this.x+e,this.y+e)},scalarAddEquals:function(e){return this.x+=e,this.y+=e,this},subtract:function(e){return new n(this.x-e.x,this.y-e.y)},subtractEquals:function(e){return this.x-=e.x,this.y-=e.y,this},scalarSubtract:function(e){return new n(this.x-e,this.y-e)},scalarSubtractEquals:function(e){return this.x-=e,this.y-=e,this},multiply:function(e){return new n(this.x*e,this.y*e)},multiplyEquals:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return new n(this.x/e,this.y/e)},divideEquals:function(e){return this.x/=e,this.y/=e,this},eq:function(e){return this.x===e.x&&this.y===e.y},lt:function(e){return this.x<e.x&&this.y<e.y},lte:function(e){return this.x<=e.x&&this.y<=e.y},gt:function(e){return this.x>e.x&&this.y>e.y},gte:function(e){return this.x>=e.x&&this.y>=e.y},lerp:function(e,t){return void 0===t&&(t=.5),t=Math.max(Math.min(1,t),0),new n(this.x+(e.x-this.x)*t,this.y+(e.y-this.y)*t)},distanceFrom:function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},midPointFrom:function(e){return this.lerp(e)},min:function(e){return new n(Math.min(this.x,e.x),Math.min(this.y,e.y))},max:function(e){return new n(Math.max(this.x,e.x),Math.max(this.y,e.y))},toString:function(){return this.x+","+this.y},setXY:function(e,t){return this.x=e,this.y=t,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setFromPoint:function(e){return this.x=e.x,this.y=e.y,this},swap:function(e){var t=this.x,n=this.y;this.x=e.x,this.y=e.y,e.x=t,e.y=n},clone:function(){return new n(this.x,this.y)}})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});function n(e){this.status=e,this.points=[]}t.Intersection?t.warn("fabric.Intersection is already defined"):(t.Intersection=n,t.Intersection.prototype={constructor:n,appendPoint:function(e){return this.points.push(e),this},appendPoints:function(e){return this.points=this.points.concat(e),this}},t.Intersection.intersectLineLine=function(e,r,i,a){var o,s=(a.x-i.x)*(e.y-i.y)-(a.y-i.y)*(e.x-i.x),l=(r.x-e.x)*(e.y-i.y)-(r.y-e.y)*(e.x-i.x),c=(a.y-i.y)*(r.x-e.x)-(a.x-i.x)*(r.y-e.y);if(0!==c){var u=s/c,d=l/c;0<=u&&u<=1&&0<=d&&d<=1?(o=new n("Intersection")).appendPoint(new t.Point(e.x+u*(r.x-e.x),e.y+u*(r.y-e.y))):o=new n}else o=new n(0===s||0===l?"Coincident":"Parallel");return o},t.Intersection.intersectLinePolygon=function(e,t,r){var i,a,o,s,l=new n,c=r.length;for(s=0;s<c;s++)i=r[s],a=r[(s+1)%c],o=n.intersectLineLine(e,t,i,a),l.appendPoints(o.points);return l.points.length>0&&(l.status="Intersection"),l},t.Intersection.intersectPolygonPolygon=function(e,t){var r,i=new n,a=e.length;for(r=0;r<a;r++){var o=e[r],s=e[(r+1)%a],l=n.intersectLinePolygon(o,s,t);i.appendPoints(l.points)}return i.points.length>0&&(i.status="Intersection"),i},t.Intersection.intersectPolygonRectangle=function(e,r,i){var a=r.min(i),o=r.max(i),s=new t.Point(o.x,a.y),l=new t.Point(a.x,o.y),c=n.intersectLinePolygon(a,s,e),u=n.intersectLinePolygon(s,o,e),d=n.intersectLinePolygon(o,l,e),h=n.intersectLinePolygon(l,a,e),f=new n;return f.appendPoints(c.points),f.appendPoints(u.points),f.appendPoints(d.points),f.appendPoints(h.points),f.points.length>0&&(f.status="Intersection"),f})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});function n(e){e?this._tryParsingColor(e):this.setSource([0,0,0,1])}function r(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}t.Color?t.warn("fabric.Color is already defined."):(t.Color=n,t.Color.prototype={_tryParsingColor:function(e){var t;e in n.colorNameMap&&(e=n.colorNameMap[e]),"transparent"===e&&(t=[255,255,255,0]),t||(t=n.sourceFromHex(e)),t||(t=n.sourceFromRgb(e)),t||(t=n.sourceFromHsl(e)),t||(t=[0,0,0,1]),t&&this.setSource(t)},_rgbToHsl:function(e,n,r){e/=255,n/=255,r/=255;var i,a,o,s=t.util.array.max([e,n,r]),l=t.util.array.min([e,n,r]);if(o=(s+l)/2,s===l)i=a=0;else{var c=s-l;switch(a=o>.5?c/(2-s-l):c/(s+l),s){case e:i=(n-r)/c+(n<r?6:0);break;case n:i=(r-e)/c+2;break;case r:i=(e-n)/c+4}i/=6}return[Math.round(360*i),Math.round(100*a),Math.round(100*o)]},getSource:function(){return this._source},setSource:function(e){this._source=e},toRgb:function(){var e=this.getSource();return"rgb("+e[0]+","+e[1]+","+e[2]+")"},toRgba:function(){var e=this.getSource();return"rgba("+e[0]+","+e[1]+","+e[2]+","+e[3]+")"},toHsl:function(){var e=this.getSource(),t=this._rgbToHsl(e[0],e[1],e[2]);return"hsl("+t[0]+","+t[1]+"%,"+t[2]+"%)"},toHsla:function(){var e=this.getSource(),t=this._rgbToHsl(e[0],e[1],e[2]);return"hsla("+t[0]+","+t[1]+"%,"+t[2]+"%,"+e[3]+")"},toHex:function(){var e,t,n,r=this.getSource();return e=1===(e=r[0].toString(16)).length?"0"+e:e,t=1===(t=r[1].toString(16)).length?"0"+t:t,n=1===(n=r[2].toString(16)).length?"0"+n:n,e.toUpperCase()+t.toUpperCase()+n.toUpperCase()},toHexa:function(){var e,t=this.getSource();return e=1===(e=(e=Math.round(255*t[3])).toString(16)).length?"0"+e:e,this.toHex()+e.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(e){var t=this.getSource();return t[3]=e,this.setSource(t),this},toGrayscale:function(){var e=this.getSource(),t=parseInt((.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),10),n=e[3];return this.setSource([t,t,t,n]),this},toBlackWhite:function(e){var t=this.getSource(),n=(.3*t[0]+.59*t[1]+.11*t[2]).toFixed(0),r=t[3];return e=e||127,n=Number(n)<Number(e)?0:255,this.setSource([n,n,n,r]),this},overlayWith:function(e){e instanceof n||(e=new n(e));var t,r=[],i=this.getAlpha(),a=this.getSource(),o=e.getSource();for(t=0;t<3;t++)r.push(Math.round(.5*a[t]+.5*o[t]));return r[3]=i,this.setSource(r),this}},t.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,t.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,t.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,t.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},t.Color.fromRgb=function(e){return n.fromSource(n.sourceFromRgb(e))},t.Color.sourceFromRgb=function(e){var t=e.match(n.reRGBa);if(t){var r=parseInt(t[1],10)/(/%$/.test(t[1])?100:1)*(/%$/.test(t[1])?255:1),i=parseInt(t[2],10)/(/%$/.test(t[2])?100:1)*(/%$/.test(t[2])?255:1),a=parseInt(t[3],10)/(/%$/.test(t[3])?100:1)*(/%$/.test(t[3])?255:1);return[parseInt(r,10),parseInt(i,10),parseInt(a,10),t[4]?parseFloat(t[4]):1]}},t.Color.fromRgba=n.fromRgb,t.Color.fromHsl=function(e){return n.fromSource(n.sourceFromHsl(e))},t.Color.sourceFromHsl=function(e){var t=e.match(n.reHSLa);if(t){var i,a,o,s=(parseFloat(t[1])%360+360)%360/360,l=parseFloat(t[2])/(/%$/.test(t[2])?100:1),c=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(0===l)i=a=o=c;else{var u=c<=.5?c*(l+1):c+l-c*l,d=2*c-u;i=r(d,u,s+1/3),a=r(d,u,s),o=r(d,u,s-1/3)}return[Math.round(255*i),Math.round(255*a),Math.round(255*o),t[4]?parseFloat(t[4]):1]}},t.Color.fromHsla=n.fromHsl,t.Color.fromHex=function(e){return n.fromSource(n.sourceFromHex(e))},t.Color.sourceFromHex=function(e){if(e.match(n.reHex)){var t=e.slice(e.indexOf("#")+1),r=3===t.length||4===t.length,i=8===t.length||4===t.length,a=r?t.charAt(0)+t.charAt(0):t.substring(0,2),o=r?t.charAt(1)+t.charAt(1):t.substring(2,4),s=r?t.charAt(2)+t.charAt(2):t.substring(4,6),l=i?r?t.charAt(3)+t.charAt(3):t.substring(6,8):"FF";return[parseInt(a,16),parseInt(o,16),parseInt(s,16),parseFloat((parseInt(l,16)/255).toFixed(2))]}},t.Color.fromSource=function(e){var t=new n;return t.setSource(e),t})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=["e","se","s","sw","w","nw","n","ne","e"],r=["ns","nesw","ew","nwse"],i={},a="left",o="top",s={top:"bottom",bottom:o,left:"right",right:a,center:"center"},l=t.util.radiansToDegrees,c=Math.sign||function(e){return(e>0)-(e<0)||+e};function u(e,t){var n=e.angle+l(Math.atan2(t.y,t.x))+360;return Math.round(n%360/45)}function d(e,n){var r=n.transform.target,i=r.canvas,a=t.util.object.clone(n);a.target=r,i&&i.fire("object:"+e,a),r.fire(e,n)}function h(e,t){var n=t.canvas,r=e[n.uniScaleKey];return n.uniformScaling&&!r||!n.uniformScaling&&r}function f(e){return"center"===e.originX&&"center"===e.originY}function p(e,t,n){var r=e.lockScalingX,i=e.lockScalingY;return!(!r||!i)||(!(t||!r&&!i||!n)||(!(!r||"x"!==t)||!(!i||"y"!==t)))}function m(e,t,n,r){return{e:e,transform:t,pointer:{x:n,y:r}}}function g(e){return function(t,n,r,i){var a=n.target,o=a.getCenterPoint(),s=a.translateToOriginPoint(o,n.originX,n.originY),l=e(t,n,r,i);return a.setPositionByOrigin(s,n.originX,n.originY),l}}function v(e,t){return function(n,r,i,a){var o=t(n,r,i,a);return o&&d(e,m(n,r,i,a)),o}}function b(e,n,r,i,a){var o=e.target,s=o.controls[e.corner],l=o.canvas.getZoom(),c=o.padding/l,u=o.toLocalPoint(new t.Point(i,a),n,r);return u.x>=c&&(u.x-=c),u.x<=-c&&(u.x+=c),u.y>=c&&(u.y-=c),u.y<=c&&(u.y+=c),u.x-=s.offsetX,u.y-=s.offsetY,u}function y(e){return e.flipX!==e.flipY}function A(e,t,n,r,i){if(0!==e[t]){var a=i/e._getTransformedDimensions()[r]*e[n];e.set(n,a)}}function _(e,t,n,r){var i,s=t.target,c=s._getTransformedDimensions(0,s.skewY),u=b(t,t.originX,t.originY,n,r),d=Math.abs(2*u.x)-c.x,h=s.skewX;d<2?i=0:(i=l(Math.atan2(d/s.scaleX,c.y/s.scaleY)),t.originX===a&&"bottom"===t.originY&&(i=-i),"right"===t.originX&&t.originY===o&&(i=-i),y(s)&&(i=-i));var f=h!==i;if(f){var p=s._getTransformedDimensions().y;s.set("skewX",i),A(s,"skewY","scaleY","y",p)}return f}function w(e,t,n,r){var i,s=t.target,c=s._getTransformedDimensions(s.skewX,0),u=b(t,t.originX,t.originY,n,r),d=Math.abs(2*u.y)-c.y,h=s.skewY;d<2?i=0:(i=l(Math.atan2(d/s.scaleY,c.x/s.scaleX)),t.originX===a&&"bottom"===t.originY&&(i=-i),"right"===t.originX&&t.originY===o&&(i=-i),y(s)&&(i=-i));var f=h!==i;if(f){var p=s._getTransformedDimensions().x;s.set("skewY",i),A(s,"skewX","scaleX","x",p)}return f}function E(e,t,n,r,i){i=i||{};var a,o,l,u,d,m,g=t.target,v=g.lockScalingX,y=g.lockScalingY,A=i.by,_=h(e,g),w=p(g,A,_),E=t.gestureScale;if(w)return!1;if(E)o=t.scaleX*E,l=t.scaleY*E;else{if(a=b(t,t.originX,t.originY,n,r),d="y"!==A?c(a.x):1,m="x"!==A?c(a.y):1,t.signX||(t.signX=d),t.signY||(t.signY=m),g.lockScalingFlip&&(t.signX!==d||t.signY!==m))return!1;if(u=g._getTransformedDimensions(),_&&!A){var S=Math.abs(a.x)+Math.abs(a.y),C=t.original,T=S/(Math.abs(u.x*C.scaleX/g.scaleX)+Math.abs(u.y*C.scaleY/g.scaleY));o=C.scaleX*T,l=C.scaleY*T}else o=Math.abs(a.x*g.scaleX/u.x),l=Math.abs(a.y*g.scaleY/u.y);f(t)&&(o*=2,l*=2),t.signX!==d&&"y"!==A&&(t.originX=s[t.originX],o*=-1,t.signX=d),t.signY!==m&&"x"!==A&&(t.originY=s[t.originY],l*=-1,t.signY=m)}var k=g.scaleX,x=g.scaleY;return A?("x"===A&&g.set("scaleX",o),"y"===A&&g.set("scaleY",l)):(!v&&g.set("scaleX",o),!y&&g.set("scaleY",l)),k!==g.scaleX||x!==g.scaleY}i.scaleCursorStyleHandler=function(e,t,r){var i=h(e,r),a="";if(0!==t.x&&0===t.y?a="x":0===t.x&&0!==t.y&&(a="y"),p(r,a,i))return"not-allowed";var o=u(r,t);return n[o]+"-resize"},i.skewCursorStyleHandler=function(e,t,n){if(0!==t.x&&n.lockSkewingY)return"not-allowed";if(0!==t.y&&n.lockSkewingX)return"not-allowed";var i=u(n,t)%4;return r[i]+"-resize"},i.scaleSkewCursorStyleHandler=function(e,t,n){return e[n.canvas.altActionKey]?i.skewCursorStyleHandler(e,t,n):i.scaleCursorStyleHandler(e,t,n)},i.rotationWithSnapping=v("rotating",g((function(e,t,n,r){var i=t,a=i.target,o=a.translateToOriginPoint(a.getCenterPoint(),i.originX,i.originY);if(a.lockRotation)return!1;var s,c=Math.atan2(i.ey-o.y,i.ex-o.x),u=Math.atan2(r-o.y,n-o.x),d=l(u-c+i.theta);if(a.snapAngle>0){var h=a.snapAngle,f=a.snapThreshold||h,p=Math.ceil(d/h)*h,m=Math.floor(d/h)*h;Math.abs(d-m)<f?d=m:Math.abs(d-p)<f&&(d=p)}return d<0&&(d=360+d),d%=360,s=a.angle!==d,a.angle=d,s}))),i.scalingEqually=v("scaling",g((function(e,t,n,r){return E(e,t,n,r)}))),i.scalingX=v("scaling",g((function(e,t,n,r){return E(e,t,n,r,{by:"x"})}))),i.scalingY=v("scaling",g((function(e,t,n,r){return E(e,t,n,r,{by:"y"})}))),i.scalingYOrSkewingX=function(e,t,n,r){return e[t.target.canvas.altActionKey]?i.skewHandlerX(e,t,n,r):i.scalingY(e,t,n,r)},i.scalingXOrSkewingY=function(e,t,n,r){return e[t.target.canvas.altActionKey]?i.skewHandlerY(e,t,n,r):i.scalingX(e,t,n,r)},i.changeWidth=v("resizing",g((function(e,t,n,r){var i=t.target,a=b(t,t.originX,t.originY,n,r),o=i.strokeWidth/(i.strokeUniform?i.scaleX:1),s=f(t)?2:1,l=i.width,c=Math.abs(a.x*s/i.scaleX)-o;return i.set("width",Math.max(c,0)),l!==c}))),i.skewHandlerX=function(e,t,n,r){var i,s=t.target,l=s.skewX,c=t.originY;return!s.lockSkewingX&&(0===l?i=b(t,"center","center",n,r).x>0?a:"right":(l>0&&(i=c===o?a:"right"),l<0&&(i=c===o?"right":a),y(s)&&(i=i===a?"right":a)),t.originX=i,v("skewing",g(_))(e,t,n,r))},i.skewHandlerY=function(e,t,n,r){var i,s=t.target,l=s.skewY,c=t.originX;return!s.lockSkewingY&&(0===l?i=b(t,"center","center",n,r).y>0?o:"bottom":(l>0&&(i=c===a?o:"bottom"),l<0&&(i=c===a?"bottom":o),y(s)&&(i=i===o?"bottom":o)),t.originY=i,v("skewing",g(w))(e,t,n,r))},i.dragHandler=function(e,t,n,r){var i=t.target,a=n-t.offsetX,o=r-t.offsetY,s=!i.get("lockMovementX")&&i.left!==a,l=!i.get("lockMovementY")&&i.top!==o;return s&&i.set("left",a),l&&i.set("top",o),(s||l)&&d("moving",m(e,t,n,r)),s||l},i.scaleOrSkewActionName=function(e,t,n){var r=e[n.canvas.altActionKey];return 0===t.x?r?"skewX":"scaleY":0===t.y?r?"skewY":"scaleX":void 0},i.rotationStyleHandler=function(e,t,n){return n.lockRotation?"not-allowed":t.cursorStyle},i.fireEvent=d,i.wrapWithFixedAnchor=g,i.wrapWithFireEvent=v,i.getLocalPoint=b,t.controlsUtils=i}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.degreesToRadians,r=t.controlsUtils;r.renderCircleControl=function(e,t,n,r,i){r=r||{};var a,o=this.sizeX||r.cornerSize||i.cornerSize,s=this.sizeY||r.cornerSize||i.cornerSize,l=void 0!==r.transparentCorners?r.transparentCorners:i.transparentCorners,c=l?"stroke":"fill",u=!l&&(r.cornerStrokeColor||i.cornerStrokeColor),d=t,h=n;e.save(),e.fillStyle=r.cornerColor||i.cornerColor,e.strokeStyle=r.cornerStrokeColor||i.cornerStrokeColor,o>s?(a=o,e.scale(1,s/o),h=n*o/s):s>o?(a=s,e.scale(o/s,1),d=t*s/o):a=o,e.lineWidth=1,e.beginPath(),e.arc(d,h,a/2,0,2*Math.PI,!1),e[c](),u&&e.stroke(),e.restore()},r.renderSquareControl=function(e,t,r,i,a){i=i||{};var o=this.sizeX||i.cornerSize||a.cornerSize,s=this.sizeY||i.cornerSize||a.cornerSize,l=void 0!==i.transparentCorners?i.transparentCorners:a.transparentCorners,c=l?"stroke":"fill",u=!l&&(i.cornerStrokeColor||a.cornerStrokeColor),d=o/2,h=s/2;e.save(),e.fillStyle=i.cornerColor||a.cornerColor,e.strokeStyle=i.cornerStrokeColor||a.cornerStrokeColor,e.lineWidth=1,e.translate(t,r),e.rotate(n(a.angle)),e[c+"Rect"](-d,-h,o,s),u&&e.strokeRect(-d,-h,o,s),e.restore()}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Control=function(e){for(var t in e)this[t]=e[t]},t.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,sizeX:null,sizeY:null,touchSizeX:null,touchSizeY:null,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(e,t){return t.cursorStyle},getActionName:function(e,t){return t.actionName},getVisibility:function(e,t){var n=e._controlsVisibility;return n&&void 0!==n[t]?n[t]:this.visible},setVisibility:function(e){this.visible=e},positionHandler:function(e,n){return t.util.transformPoint({x:this.x*e.x+this.offsetX,y:this.y*e.y+this.offsetY},n)},calcCornerCoords:function(e,n,r,i,a){var o,s,l,c,u=a?this.touchSizeX:this.sizeX,d=a?this.touchSizeY:this.sizeY;if(u&&d&&u!==d){var h=Math.atan2(d,u),f=Math.sqrt(u*u+d*d)/2,p=h-t.util.degreesToRadians(e),m=Math.PI/2-h-t.util.degreesToRadians(e);o=f*t.util.cos(p),s=f*t.util.sin(p),l=f*t.util.cos(m),c=f*t.util.sin(m)}else{f=.7071067812*(u&&d?u:n);p=t.util.degreesToRadians(45-e);o=l=f*t.util.cos(p),s=c=f*t.util.sin(p)}return{tl:{x:r-c,y:i-l},tr:{x:r+o,y:i-s},bl:{x:r-o,y:i+s},br:{x:r+c,y:i+l}}},render:function(e,n,r,i,a){switch((i=i||{}).cornerStyle||a.cornerStyle){case"circle":t.controlsUtils.renderCircleControl.call(this,e,n,r,i,a);break;default:t.controlsUtils.renderSquareControl.call(this,e,n,r,i,a)}}}}(t),function(){function e(e,t){var n,r,i,a,o=e.getAttribute("style"),s=e.getAttribute("offset")||0;if(s=(s=parseFloat(s)/(/%$/.test(s)?100:1))<0?0:s>1?1:s,o){var l=o.split(/\s*;\s*/);for(""===l[l.length-1]&&l.pop(),a=l.length;a--;){var c=l[a].split(/\s*:\s*/),u=c[0].trim(),d=c[1].trim();"stop-color"===u?n=d:"stop-opacity"===u&&(i=d)}}return n||(n=e.getAttribute("stop-color")||"rgb(0,0,0)"),i||(i=e.getAttribute("stop-opacity")),r=(n=new C.Color(n)).getAlpha(),i=isNaN(parseFloat(i))?1:parseFloat(i),i*=r*t,{offset:s,color:n.toRgb(),opacity:i}}var t=C.util.object.clone;C.Gradient=C.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(e){e||(e={}),e.coords||(e.coords={});var t,n=this;Object.keys(e).forEach((function(t){n[t]=e[t]})),this.id?this.id+="_"+C.Object.__uid++:this.id=C.Object.__uid++,t={x1:e.coords.x1||0,y1:e.coords.y1||0,x2:e.coords.x2||0,y2:e.coords.y2||0},"radial"===this.type&&(t.r1=e.coords.r1||0,t.r2=e.coords.r2||0),this.coords=t,this.colorStops=e.colorStops.slice()},addColorStop:function(e){for(var t in e){var n=new C.Color(e[t]);this.colorStops.push({offset:parseFloat(t),color:n.toRgb(),opacity:n.getAlpha()})}return this},toObject:function(e){var t={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return C.util.populateWithProperties(this,t,e),t},toSVG:function(e,n){var r,i,a,o,s=t(this.coords,!0),l=(n=n||{},t(this.colorStops,!0)),c=s.r1>s.r2,u=this.gradientTransform?this.gradientTransform.concat():C.iMatrix.concat(),d=-this.offsetX,h=-this.offsetY,f=!!n.additionalTransform,p="pixels"===this.gradientUnits?"userSpaceOnUse":"objectBoundingBox";if(l.sort((function(e,t){return e.offset-t.offset})),"objectBoundingBox"===p?(d/=e.width,h/=e.height):(d+=e.width/2,h+=e.height/2),"path"===e.type&&"percentage"!==this.gradientUnits&&(d-=e.pathOffset.x,h-=e.pathOffset.y),u[4]-=d,u[5]-=h,o='id="SVGID_'+this.id+'" gradientUnits="'+p+'"',o+=' gradientTransform="'+(f?n.additionalTransform+" ":"")+C.util.matrixToSVG(u)+'" ',"linear"===this.type?a=["<linearGradient ",o,' x1="',s.x1,'" y1="',s.y1,'" x2="',s.x2,'" y2="',s.y2,'">\n']:"radial"===this.type&&(a=["<radialGradient ",o,' cx="',c?s.x1:s.x2,'" cy="',c?s.y1:s.y2,'" r="',c?s.r1:s.r2,'" fx="',c?s.x2:s.x1,'" fy="',c?s.y2:s.y1,'">\n']),"radial"===this.type){if(c)for((l=l.concat()).reverse(),r=0,i=l.length;r<i;r++)l[r].offset=1-l[r].offset;var m=Math.min(s.r1,s.r2);if(m>0){var g=m/Math.max(s.r1,s.r2);for(r=0,i=l.length;r<i;r++)l[r].offset+=g*(1-l[r].offset)}}for(r=0,i=l.length;r<i;r++){var v=l[r];a.push("<stop ",'offset="',100*v.offset+"%",'" style="stop-color:',v.color,void 0!==v.opacity?";stop-opacity: "+v.opacity:";",'"/>\n')}return a.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),a.join("")},toLive:function(e){var t,n,r,i=C.util.object.clone(this.coords);if(this.type){for("linear"===this.type?t=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2):"radial"===this.type&&(t=e.createRadialGradient(i.x1,i.y1,i.r1,i.x2,i.y2,i.r2)),n=0,r=this.colorStops.length;n<r;n++){var a=this.colorStops[n].color,o=this.colorStops[n].opacity,s=this.colorStops[n].offset;void 0!==o&&(a=new C.Color(a).setAlpha(o).toRgba()),t.addColorStop(s,a)}return t}}}),C.util.object.extend(C.Gradient,{fromElement:function(t,n,r,i){var a=parseFloat(r)/(/%$/.test(r)?100:1);a=a<0?0:a>1?1:a,isNaN(a)&&(a=1);var o,s,l,c,u=t.getElementsByTagName("stop"),d="userSpaceOnUse"===t.getAttribute("gradientUnits")?"pixels":"percentage",h=t.getAttribute("gradientTransform")||"",f=[],p=0,m=0;for("linearGradient"===t.nodeName||"LINEARGRADIENT"===t.nodeName?(o="linear",s=function(e){return{x1:e.getAttribute("x1")||0,y1:e.getAttribute("y1")||0,x2:e.getAttribute("x2")||"100%",y2:e.getAttribute("y2")||0}}(t)):(o="radial",s=function(e){return{x1:e.getAttribute("fx")||e.getAttribute("cx")||"50%",y1:e.getAttribute("fy")||e.getAttribute("cy")||"50%",r1:0,x2:e.getAttribute("cx")||"50%",y2:e.getAttribute("cy")||"50%",r2:e.getAttribute("r")||"50%"}}(t)),l=u.length;l--;)f.push(e(u[l],a));return c=C.parseTransformAttribute(h),function(e,t,n,r){var i,a;Object.keys(t).forEach((function(e){"Infinity"===(i=t[e])?a=1:"-Infinity"===i?a=0:(a=parseFloat(t[e],10),"string"==typeof i&&/^(\d+\.\d+)%|(\d+)%$/.test(i)&&(a*=.01,"pixels"===r&&("x1"!==e&&"x2"!==e&&"r2"!==e||(a*=n.viewBoxWidth||n.width),"y1"!==e&&"y2"!==e||(a*=n.viewBoxHeight||n.height)))),t[e]=a}))}(0,s,i,d),"pixels"===d&&(p=-n.left,m=-n.top),new C.Gradient({id:t.getAttribute("id"),type:o,coords:s,colorStops:f,gradientUnits:d,gradientTransform:c,offsetX:p,offsetY:m})}})}(),function(){"use strict";var e=C.util.toFixed;C.Pattern=C.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(e,t){if(e||(e={}),this.id=C.Object.__uid++,this.setOptions(e),!e.source||e.source&&"string"!=typeof e.source)t&&t(this);else{var n=this;this.source=C.util.createImage(),C.util.loadImage(e.source,(function(e,r){n.source=e,t&&t(n,r)}),null,this.crossOrigin)}},toObject:function(t){var n,r,i=C.Object.NUM_FRACTION_DIGITS;return"string"==typeof this.source.src?n=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(n=this.source.toDataURL()),r={type:"pattern",source:n,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:e(this.offsetX,i),offsetY:e(this.offsetY,i),patternTransform:this.patternTransform?this.patternTransform.concat():null},C.util.populateWithProperties(this,r,t),r},toSVG:function(e){var t="function"==typeof this.source?this.source():this.source,n=t.width/e.width,r=t.height/e.height,i=this.offsetX/e.width,a=this.offsetY/e.height,o="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(r=1,a&&(r+=Math.abs(a))),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(n=1,i&&(n+=Math.abs(i))),t.src?o=t.src:t.toDataURL&&(o=t.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+i+'" y="'+a+'" width="'+n+'" height="'+r+'">\n<image x="0" y="0" width="'+t.width+'" height="'+t.height+'" xlink:href="'+o+'"></image>\n</pattern>\n'},setOptions:function(e){for(var t in e)this[t]=e[t]},toLive:function(e){var t=this.source;if(!t)return"";if(void 0!==t.src){if(!t.complete)return"";if(0===t.naturalWidth||0===t.naturalHeight)return""}return e.createPattern(t,this.repeat)}})}(),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.toFixed;t.Shadow?t.warn("fabric.Shadow is already defined."):(t.Shadow=t.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1,initialize:function(e){for(var n in"string"==typeof e&&(e=this._parseShadow(e)),e)this[n]=e[n];this.id=t.Object.__uid++},_parseShadow:function(e){var n=e.trim(),r=t.Shadow.reOffsetsAndBlur.exec(n)||[];return{color:(n.replace(t.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseFloat(r[1],10)||0,offsetY:parseFloat(r[2],10)||0,blur:parseFloat(r[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(e){var r=40,i=40,a=t.Object.NUM_FRACTION_DIGITS,o=t.util.rotateVector({x:this.offsetX,y:this.offsetY},t.util.degreesToRadians(-e.angle)),s=new t.Color(this.color);return e.width&&e.height&&(r=100*n((Math.abs(o.x)+this.blur)/e.width,a)+20,i=100*n((Math.abs(o.y)+this.blur)/e.height,a)+20),e.flipX&&(o.x*=-1),e.flipY&&(o.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+i+'%" height="'+(100+2*i)+'%" x="-'+r+'%" width="'+(100+2*r)+'%" >\n\t<feGaussianBlur in="SourceAlpha" stdDeviation="'+n(this.blur?this.blur/2:0,a)+'"></feGaussianBlur>\n\t<feOffset dx="'+n(o.x,a)+'" dy="'+n(o.y,a)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+s.toRgb()+'" flood-opacity="'+s.getAlpha()+'"/>\n\t<feComposite in2="oBlur" operator="in" />\n\t<feMerge>\n\t\t<feMergeNode></feMergeNode>\n\t\t<feMergeNode in="SourceGraphic"></feMergeNode>\n\t</feMerge>\n</filter>\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var e={},n=t.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach((function(t){this[t]!==n[t]&&(e[t]=this[t])}),this),e}}),t.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(\d+(?:\.\d*)?(?:px)?)?(?:\s?|$)(?:$|\s)/)}(t),function(){"use strict";if(C.StaticCanvas)C.warn("fabric.StaticCanvas is already defined.");else{var e=C.util.object.extend,t=C.util.getElementOffset,n=C.util.removeFromArray,r=C.util.toFixed,i=C.util.transformPoint,a=C.util.invertTransform,o=C.util.getNodeCanvas,s=C.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");C.StaticCanvas=C.util.createClass(C.CommonMethods,{initialize:function(e,t){t||(t={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(e,t)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:C.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(e,t){var n=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(e),this._initOptions(t),this.interactive||this._initRetinaScaling(),t.overlayImage&&this.setOverlayImage(t.overlayImage,n),t.backgroundImage&&this.setBackgroundImage(t.backgroundImage,n),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor,n),t.overlayColor&&this.setOverlayColor(t.overlayColor,n),this.calcOffset()},_isRetinaScaling:function(){return 1!==C.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?C.devicePixelRatio:1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var e=C.devicePixelRatio;this.__initRetinaScaling(e,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(e,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(e,t,n){t.setAttribute("width",this.width*e),t.setAttribute("height",this.height*e),n.scale(e,e)},calcOffset:function(){return this._offset=t(this.lowerCanvasEl),this},setOverlayImage:function(e,t,n){return this.__setBgOverlayImage("overlayImage",e,t,n)},setBackgroundImage:function(e,t,n){return this.__setBgOverlayImage("backgroundImage",e,t,n)},setOverlayColor:function(e,t){return this.__setBgOverlayColor("overlayColor",e,t)},setBackgroundColor:function(e,t){return this.__setBgOverlayColor("backgroundColor",e,t)},__setBgOverlayImage:function(e,t,n,r){return"string"==typeof t?C.util.loadImage(t,(function(t,i){if(t){var a=new C.Image(t,r);this[e]=a,a.canvas=this}n&&n(t,i)}),this,r&&r.crossOrigin):(r&&t.setOptions(r),this[e]=t,t&&(t.canvas=this),n&&n(t,!1)),this},__setBgOverlayColor:function(e,t,n){return this[e]=t,this._initGradient(t,e),this._initPattern(t,e,n),this},_createCanvasElement:function(){var e=s();if(!e)throw l;if(e.style||(e.style={}),void 0===e.getContext)throw l;return e},_initOptions:function(e){var t=this.lowerCanvasEl;this._setOptions(e),this.width=this.width||parseInt(t.width,10)||0,this.height=this.height||parseInt(t.height,10)||0,this.lowerCanvasEl.style&&(t.width=this.width,t.height=this.height,t.style.width=this.width+"px",t.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(e){e&&e.getContext?this.lowerCanvasEl=e:this.lowerCanvasEl=C.util.getById(e)||this._createCanvasElement(),C.util.addClass(this.lowerCanvasEl,"lower-canvas"),this._originalCanvasStyle=this.lowerCanvasEl.style,this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(e,t){return this.setDimensions({width:e},t)},setHeight:function(e,t){return this.setDimensions({height:e},t)},setDimensions:function(e,t){var n;for(var r in t=t||{},e)n=e[r],t.cssOnly||(this._setBackstoreDimension(r,e[r]),n+="px",this.hasLostContext=!0),t.backstoreOnly||this._setCssDimension(r,n);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(),this._initRetinaScaling(),this.calcOffset(),t.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(e,t){return this.lowerCanvasEl[e]=t,this.upperCanvasEl&&(this.upperCanvasEl[e]=t),this.cacheCanvasEl&&(this.cacheCanvasEl[e]=t),this[e]=t,this},_setCssDimension:function(e,t){return this.lowerCanvasEl.style[e]=t,this.upperCanvasEl&&(this.upperCanvasEl.style[e]=t),this.wrapperEl&&(this.wrapperEl.style[e]=t),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(e){var t,n,r,i=this._activeObject,a=this.backgroundImage,o=this.overlayImage;for(this.viewportTransform=e,n=0,r=this._objects.length;n<r;n++)(t=this._objects[n]).group||t.setCoords(!0);return i&&i.setCoords(),a&&a.setCoords(!0),o&&o.setCoords(!0),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},zoomToPoint:function(e,t){var n=e,r=this.viewportTransform.slice(0);e=i(e,a(this.viewportTransform)),r[0]=t,r[3]=t;var o=i(e,r);return r[4]+=n.x-o.x,r[5]+=n.y-o.y,this.setViewportTransform(r)},setZoom:function(e){return this.zoomToPoint(new C.Point(0,0),e),this},absolutePan:function(e){var t=this.viewportTransform.slice(0);return t[4]=-e.x,t[5]=-e.y,this.setViewportTransform(t)},relativePan:function(e){return this.absolutePan(new C.Point(-e.x-this.viewportTransform[4],-e.y-this.viewportTransform[5]))},getElement:function(){return this.lowerCanvasEl},_onObjectAdded:function(e){this.stateful&&e.setupState(),e._set("canvas",this),e.setCoords(),this.fire("object:added",{target:e}),e.fire("added")},_onObjectRemoved:function(e){this.fire("object:removed",{target:e}),e.fire("removed"),delete e.canvas},clearContext:function(e){return e.clearRect(0,0,this.width,this.height),this},getContext:function(){return this.contextContainer},clear:function(){return this.remove.apply(this,this.getObjects()),this.backgroundImage=null,this.overlayImage=null,this.backgroundColor="",this.overlayColor="",this._hasITextHandlers&&(this.off("mouse:up",this._mouseUpITextHandler),this._iTextInstances=null,this._hasITextHandlers=!1),this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll(),this},renderAll:function(){var e=this.contextContainer;return this.renderCanvas(e,this._objects),this},renderAndReset:function(){this.isRendering=0,this.renderAll()},requestRenderAll:function(){return this.isRendering||(this.isRendering=C.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var e={},t=this.width,n=this.height,r=a(this.viewportTransform);return e.tl=i({x:0,y:0},r),e.br=i({x:t,y:n},r),e.tr=new C.Point(e.br.x,e.tl.y),e.bl=new C.Point(e.tl.x,e.br.y),this.vptCoords=e,e},cancelRequestedRender:function(){this.isRendering&&(C.util.cancelAnimFrame(this.isRendering),this.isRendering=0)},renderCanvas:function(e,t){var n=this.viewportTransform,r=this.clipPath;this.cancelRequestedRender(),this.calcViewportBoundaries(),this.clearContext(e),C.util.setImageSmoothing(e,this.imageSmoothingEnabled),this.fire("before:render",{ctx:e}),this._renderBackground(e),e.save(),e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this._renderObjects(e,t),e.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(e),r&&(r.canvas=this,r.shouldCache(),r._transformDone=!0,r.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(e)),this._renderOverlay(e),this.controlsAboveOverlay&&this.interactive&&this.drawControls(e),this.fire("after:render",{ctx:e})},drawClipPathOnCanvas:function(e){var t=this.viewportTransform,n=this.clipPath;e.save(),e.transform(t[0],t[1],t[2],t[3],t[4],t[5]),e.globalCompositeOperation="destination-in",n.transform(e),e.scale(1/n.zoomX,1/n.zoomY),e.drawImage(n._cacheCanvas,-n.cacheTranslationX,-n.cacheTranslationY),e.restore()},_renderObjects:function(e,t){var n,r;for(n=0,r=t.length;n<r;++n)t[n]&&t[n].render(e)},_renderBackgroundOrOverlay:function(e,t){var n=this[t+"Color"],r=this[t+"Image"],i=this.viewportTransform,a=this[t+"Vpt"];if(n||r){if(n){e.save(),e.beginPath(),e.moveTo(0,0),e.lineTo(this.width,0),e.lineTo(this.width,this.height),e.lineTo(0,this.height),e.closePath(),e.fillStyle=n.toLive?n.toLive(e,this):n,a&&e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.transform(1,0,0,1,n.offsetX||0,n.offsetY||0);var o=n.gradientTransform||n.patternTransform;o&&e.transform(o[0],o[1],o[2],o[3],o[4],o[5]),e.fill(),e.restore()}r&&(e.save(),a&&e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),r.render(e),e.restore())}},_renderBackground:function(e){this._renderBackgroundOrOverlay(e,"background")},_renderOverlay:function(e){this._renderBackgroundOrOverlay(e,"overlay")},getCenter:function(){return{top:this.height/2,left:this.width/2}},centerObjectH:function(e){return this._centerObject(e,new C.Point(this.getCenter().left,e.getCenterPoint().y))},centerObjectV:function(e){return this._centerObject(e,new C.Point(e.getCenterPoint().x,this.getCenter().top))},centerObject:function(e){var t=this.getCenter();return this._centerObject(e,new C.Point(t.left,t.top))},viewportCenterObject:function(e){var t=this.getVpCenter();return this._centerObject(e,t)},viewportCenterObjectH:function(e){var t=this.getVpCenter();return this._centerObject(e,new C.Point(t.x,e.getCenterPoint().y)),this},viewportCenterObjectV:function(e){var t=this.getVpCenter();return this._centerObject(e,new C.Point(e.getCenterPoint().x,t.y))},getVpCenter:function(){var e=this.getCenter(),t=a(this.viewportTransform);return i({x:e.left,y:e.top},t)},_centerObject:function(e,t){return e.setPositionByOrigin(t,"center","center"),e.setCoords(),this.renderOnAddRemove&&this.requestRenderAll(),this},toDatalessJSON:function(e){return this.toDatalessObject(e)},toObject:function(e){return this._toObjectMethod("toObject",e)},toDatalessObject:function(e){return this._toObjectMethod("toDatalessObject",e)},_toObjectMethod:function(t,n){var r=this.clipPath,i={version:C.version,objects:this._toObjects(t,n)};return r&&!r.excludeFromExport&&(i.clipPath=this._toObject(this.clipPath,t,n)),e(i,this.__serializeBgOverlay(t,n)),C.util.populateWithProperties(this,i,n),i},_toObjects:function(e,t){return this._objects.filter((function(e){return!e.excludeFromExport})).map((function(n){return this._toObject(n,e,t)}),this)},_toObject:function(e,t,n){var r;this.includeDefaultValues||(r=e.includeDefaultValues,e.includeDefaultValues=!1);var i=e[t](n);return this.includeDefaultValues||(e.includeDefaultValues=r),i},__serializeBgOverlay:function(e,t){var n={},r=this.backgroundImage,i=this.overlayImage,a=this.backgroundColor,o=this.overlayColor;return a&&a.toObject?a.excludeFromExport||(n.background=a.toObject(t)):a&&(n.background=a),o&&o.toObject?o.excludeFromExport||(n.overlay=o.toObject(t)):o&&(n.overlay=o),r&&!r.excludeFromExport&&(n.backgroundImage=this._toObject(r,e,t)),i&&!i.excludeFromExport&&(n.overlayImage=this._toObject(i,e,t)),n},svgViewportTransformation:!0,toSVG:function(e,t){e||(e={}),e.reviver=t;var n=[];return this._setSVGPreamble(n,e),this._setSVGHeader(n,e),this.clipPath&&n.push('<g clip-path="url(#'+this.clipPath.clipPathId+')" >\n'),this._setSVGBgOverlayColor(n,"background"),this._setSVGBgOverlayImage(n,"backgroundImage",t),this._setSVGObjects(n,t),this.clipPath&&n.push("</g>\n"),this._setSVGBgOverlayColor(n,"overlay"),this._setSVGBgOverlayImage(n,"overlayImage",t),n.push("</svg>"),n.join("")},_setSVGPreamble:function(e,t){t.suppressPreamble||e.push('<?xml version="1.0" encoding="',t.encoding||"UTF-8",'" standalone="no" ?>\n','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ','"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')},_setSVGHeader:function(e,t){var n,i=t.width||this.width,a=t.height||this.height,o='viewBox="0 0 '+this.width+" "+this.height+'" ',s=C.Object.NUM_FRACTION_DIGITS;t.viewBox?o='viewBox="'+t.viewBox.x+" "+t.viewBox.y+" "+t.viewBox.width+" "+t.viewBox.height+'" ':this.svgViewportTransformation&&(n=this.viewportTransform,o='viewBox="'+r(-n[4]/n[0],s)+" "+r(-n[5]/n[3],s)+" "+r(this.width/n[0],s)+" "+r(this.height/n[3],s)+'" '),e.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',i,'" ','height="',a,'" ',o,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",C.version,"</desc>\n","<defs>\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(t),"</defs>\n")},createSVGClipPathMarkup:function(e){var t=this.clipPath;return t?(t.clipPathId="CLIPPATH_"+C.Object.__uid++,'<clipPath id="'+t.clipPathId+'" >\n'+this.clipPath.toClipPathSVG(e.reviver)+"</clipPath>\n"):""},createSVGRefElementsMarkup:function(){var e=this;return["background","overlay"].map((function(t){var n=e[t+"Color"];if(n&&n.toLive){var r=e[t+"Vpt"],i=e.viewportTransform,a={width:e.width/(r?i[0]:1),height:e.height/(r?i[3]:1)};return n.toSVG(a,{additionalTransform:r?C.util.matrixToSVG(i):""})}})).join("")},createSVGFontFacesMarkup:function(){var e,t,n,r,i,a,o,s,l="",c={},u=C.fontPaths,d=[];for(this._objects.forEach((function e(t){d.push(t),t._objects&&t._objects.forEach(e)})),o=0,s=d.length;o<s;o++)if(t=(e=d[o]).fontFamily,-1!==e.type.indexOf("text")&&!c[t]&&u[t]&&(c[t]=!0,e.styles))for(i in n=e.styles)for(a in r=n[i])!c[t=r[a].fontFamily]&&u[t]&&(c[t]=!0);for(var h in c)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",h,"';\n","\t\t\tsrc: url('",u[h],"');\n","\t\t}\n"].join("");return l&&(l=['\t<style type="text/css">',"<![CDATA[\n",l,"]]>","</style>\n"].join("")),l},_setSVGObjects:function(e,t){var n,r,i,a=this._objects;for(r=0,i=a.length;r<i;r++)(n=a[r]).excludeFromExport||this._setSVGObject(e,n,t)},_setSVGObject:function(e,t,n){e.push(t.toSVG(n))},_setSVGBgOverlayImage:function(e,t,n){this[t]&&!this[t].excludeFromExport&&this[t].toSVG&&e.push(this[t].toSVG(n))},_setSVGBgOverlayColor:function(e,t){var n=this[t+"Color"],r=this.viewportTransform,i=this.width,a=this.height;if(n)if(n.toLive){var o=n.repeat,s=C.util.invertTransform(r),l=this[t+"Vpt"]?C.util.matrixToSVG(s):"";e.push('<rect transform="'+l+" translate(",i/2,",",a/2,')"',' x="',n.offsetX-i/2,'" y="',n.offsetY-a/2,'" ','width="',"repeat-y"===o||"no-repeat"===o?n.source.width:i,'" height="',"repeat-x"===o||"no-repeat"===o?n.source.height:a,'" fill="url(#SVGID_'+n.id+')"',"></rect>\n")}else e.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',n,'"',"></rect>\n")},sendToBack:function(e){if(!e)return this;var t,r,i,a=this._activeObject;if(e===a&&"activeSelection"===e.type)for(t=(i=a._objects).length;t--;)r=i[t],n(this._objects,r),this._objects.unshift(r);else n(this._objects,e),this._objects.unshift(e);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(e){if(!e)return this;var t,r,i,a=this._activeObject;if(e===a&&"activeSelection"===e.type)for(i=a._objects,t=0;t<i.length;t++)r=i[t],n(this._objects,r),this._objects.push(r);else n(this._objects,e),this._objects.push(e);return this.renderOnAddRemove&&this.requestRenderAll(),this},sendBackwards:function(e,t){if(!e)return this;var r,i,a,o,s,l=this._activeObject,c=0;if(e===l&&"activeSelection"===e.type)for(s=l._objects,r=0;r<s.length;r++)i=s[r],(a=this._objects.indexOf(i))>0+c&&(o=a-1,n(this._objects,i),this._objects.splice(o,0,i)),c++;else 0!==(a=this._objects.indexOf(e))&&(o=this._findNewLowerIndex(e,a,t),n(this._objects,e),this._objects.splice(o,0,e));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(e,t,n){var r,i;if(n)for(r=t,i=t-1;i>=0;--i){if(e.intersectsWithObject(this._objects[i])||e.isContainedWithinObject(this._objects[i])||this._objects[i].isContainedWithinObject(e)){r=i;break}}else r=t-1;return r},bringForward:function(e,t){if(!e)return this;var r,i,a,o,s,l=this._activeObject,c=0;if(e===l&&"activeSelection"===e.type)for(r=(s=l._objects).length;r--;)i=s[r],(a=this._objects.indexOf(i))<this._objects.length-1-c&&(o=a+1,n(this._objects,i),this._objects.splice(o,0,i)),c++;else(a=this._objects.indexOf(e))!==this._objects.length-1&&(o=this._findNewUpperIndex(e,a,t),n(this._objects,e),this._objects.splice(o,0,e));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewUpperIndex:function(e,t,n){var r,i,a;if(n)for(r=t,i=t+1,a=this._objects.length;i<a;++i){if(e.intersectsWithObject(this._objects[i])||e.isContainedWithinObject(this._objects[i])||this._objects[i].isContainedWithinObject(e)){r=i;break}}else r=t+1;return r},moveTo:function(e,t){return n(this._objects,e),this._objects.splice(t,0,e),this.renderOnAddRemove&&this.requestRenderAll()},dispose:function(){return this.isRendering&&(C.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.forEachObject((function(e){e.dispose&&e.dispose()})),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose&&this.backgroundImage.dispose(),this.backgroundImage=null,this.overlayImage&&this.overlayImage.dispose&&this.overlayImage.dispose(),this.overlayImage=null,this._iTextInstances=null,this.contextContainer=null,this.lowerCanvasEl.classList.remove("lower-canvas"),this.lowerCanvasEl.style=this._originalCanvasStyle,delete this._originalCanvasStyle,this.lowerCanvasEl.setAttribute("width",this.width),this.lowerCanvasEl.setAttribute("height",this.height),C.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),e(C.StaticCanvas.prototype,C.Observable),e(C.StaticCanvas.prototype,C.Collection),e(C.StaticCanvas.prototype,C.DataURLExporter),e(C.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(e){var t=s();if(!t||!t.getContext)return null;var n=t.getContext("2d");if(!n)return null;switch(e){case"setLineDash":return void 0!==n.setLineDash;default:return null}}}),C.StaticCanvas.prototype.toJSON=C.StaticCanvas.prototype.toObject,C.isLikelyNode&&(C.StaticCanvas.prototype.createPNGStream=function(){var e=o(this.lowerCanvasEl);return e&&e.createPNGStream()},C.StaticCanvas.prototype.createJPEGStream=function(e){var t=o(this.lowerCanvasEl);return t&&t.createJPEGStream(e)})}}(),C.BaseBrush=C.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,limitedToCanvasSize:!1,_setBrushStyles:function(){var e=this.canvas.contextTop;e.strokeStyle=this.color,e.lineWidth=this.width,e.lineCap=this.strokeLineCap,e.miterLimit=this.strokeMiterLimit,e.lineJoin=this.strokeLineJoin,e.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(e){var t=this.canvas.viewportTransform;e.save(),e.transform(t[0],t[1],t[2],t[3],t[4],t[5])},_setShadow:function(){if(this.shadow){var e=this.canvas,t=this.shadow,n=e.contextTop,r=e.getZoom();e&&e._isRetinaScaling()&&(r*=C.devicePixelRatio),n.shadowColor=t.color,n.shadowBlur=t.blur*r,n.shadowOffsetX=t.offsetX*r,n.shadowOffsetY=t.offsetY*r}},needsFullRender:function(){return new C.Color(this.color).getAlpha()<1||!!this.shadow},_resetShadow:function(){var e=this.canvas.contextTop;e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0},_isOutSideCanvas:function(e){return e.x<0||e.x>this.canvas.getWidth()||e.y<0||e.y>this.canvas.getHeight()}}),C.PencilBrush=C.util.createClass(C.BaseBrush,{decimate:.4,initialize:function(e){this.canvas=e,this._points=[]},_drawSegment:function(e,t,n){var r=t.midPointFrom(n);return e.quadraticCurveTo(t.x,t.y,r.x,r.y),r},onMouseDown:function(e,t){this.canvas._isMainEvent(t.e)&&(this._prepareForDrawing(e),this._captureDrawingPath(e),this._render())},onMouseMove:function(e,t){if(this.canvas._isMainEvent(t.e)&&(!0!==this.limitedToCanvasSize||!this._isOutSideCanvas(e))&&this._captureDrawingPath(e)&&this._points.length>1)if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var n=this._points,r=n.length,i=this.canvas.contextTop;this._saveAndTransform(i),this.oldEnd&&(i.beginPath(),i.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(i,n[r-2],n[r-1],!0),i.stroke(),i.restore()}},onMouseUp:function(e){return!this.canvas._isMainEvent(e.e)||(this.oldEnd=void 0,this._finalizeAndAddPath(),!1)},_prepareForDrawing:function(e){var t=new C.Point(e.x,e.y);this._reset(),this._addPoint(t),this.canvas.contextTop.moveTo(t.x,t.y)},_addPoint:function(e){return!(this._points.length>1&&e.eq(this._points[this._points.length-1])||(this._points.push(e),0))},_reset:function(){this._points=[],this._setBrushStyles(),this._setShadow()},_captureDrawingPath:function(e){var t=new C.Point(e.x,e.y);return this._addPoint(t)},_render:function(){var e,t,n=this.canvas.contextTop,r=this._points[0],i=this._points[1];if(this._saveAndTransform(n),n.beginPath(),2===this._points.length&&r.x===i.x&&r.y===i.y){var a=this.width/1e3;r=new C.Point(r.x,r.y),i=new C.Point(i.x,i.y),r.x-=a,i.x+=a}for(n.moveTo(r.x,r.y),e=1,t=this._points.length;e<t;e++)this._drawSegment(n,r,i),r=this._points[e],i=this._points[e+1];n.lineTo(r.x,r.y),n.stroke(),n.restore()},convertPointsToSVGPath:function(e){var t=this.width/1e3;return C.util.getSmoothPathFromPoints(e,t)},_isEmptySVGPath:function(e){return"M 0 0 Q 0 0 0 0 L 0 0"===C.util.joinPath(e)},createPath:function(e){var t=new C.Path(e,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray});return this.shadow&&(this.shadow.affectStroke=!0,t.shadow=new C.Shadow(this.shadow)),t},decimatePoints:function(e,t){if(e.length<=2)return e;var n,r=this.canvas.getZoom(),i=Math.pow(t/r,2),a=e.length-1,o=e[0],s=[o];for(n=1;n<a-1;n++)Math.pow(o.x-e[n].x,2)+Math.pow(o.y-e[n].y,2)>=i&&(o=e[n],s.push(o));return s.push(e[a]),s},_finalizeAndAddPath:function(){this.canvas.contextTop.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var e=this.convertPointsToSVGPath(this._points);if(this._isEmptySVGPath(e))this.canvas.requestRenderAll();else{var t=this.createPath(e);this.canvas.clearContext(this.canvas.contextTop),this.canvas.fire("before:path:created",{path:t}),this.canvas.add(t),this.canvas.requestRenderAll(),t.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:t})}}}),C.CircleBrush=C.util.createClass(C.BaseBrush,{width:10,initialize:function(e){this.canvas=e,this.points=[]},drawDot:function(e){var t=this.addPoint(e),n=this.canvas.contextTop;this._saveAndTransform(n),this.dot(n,t),n.restore()},dot:function(e,t){e.fillStyle=t.fill,e.beginPath(),e.arc(t.x,t.y,t.radius,0,2*Math.PI,!1),e.closePath(),e.fill()},onMouseDown:function(e){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(e)},_render:function(){var e,t,n=this.canvas.contextTop,r=this.points;for(this._saveAndTransform(n),e=0,t=r.length;e<t;e++)this.dot(n,r[e]);n.restore()},onMouseMove:function(e){!0===this.limitedToCanvasSize&&this._isOutSideCanvas(e)||(this.needsFullRender()?(this.canvas.clearContext(this.canvas.contextTop),this.addPoint(e),this._render()):this.drawDot(e))},onMouseUp:function(){var e,t,n=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;var r=[];for(e=0,t=this.points.length;e<t;e++){var i=this.points[e],a=new C.Circle({radius:i.radius,left:i.x,top:i.y,originX:"center",originY:"center",fill:i.fill});this.shadow&&(a.shadow=new C.Shadow(this.shadow)),r.push(a)}var o=new C.Group(r);o.canvas=this.canvas,this.canvas.fire("before:path:created",{path:o}),this.canvas.add(o),this.canvas.fire("path:created",{path:o}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=n,this.canvas.requestRenderAll()},addPoint:function(e){var t=new C.Point(e.x,e.y),n=C.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,r=new C.Color(this.color).setAlpha(C.util.getRandomInt(0,100)/100).toRgba();return t.radius=n,t.fill=r,this.points.push(t),t}}),C.SprayBrush=C.util.createClass(C.BaseBrush,{width:10,density:20,dotWidth:1,dotWidthVariance:1,randomOpacity:!1,optimizeOverlapping:!0,initialize:function(e){this.canvas=e,this.sprayChunks=[]},onMouseDown:function(e){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(e),this.render(this.sprayChunkPoints)},onMouseMove:function(e){!0===this.limitedToCanvasSize&&this._isOutSideCanvas(e)||(this.addSprayChunk(e),this.render(this.sprayChunkPoints))},onMouseUp:function(){var e=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var t=[],n=0,r=this.sprayChunks.length;n<r;n++)for(var i=this.sprayChunks[n],a=0,o=i.length;a<o;a++){var s=new C.Rect({width:i[a].width,height:i[a].width,left:i[a].x+1,top:i[a].y+1,originX:"center",originY:"center",fill:this.color});t.push(s)}this.optimizeOverlapping&&(t=this._getOptimizedRects(t));var l=new C.Group(t);this.shadow&&l.set("shadow",new C.Shadow(this.shadow)),this.canvas.fire("before:path:created",{path:l}),this.canvas.add(l),this.canvas.fire("path:created",{path:l}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=e,this.canvas.requestRenderAll()},_getOptimizedRects:function(e){var t,n,r,i={};for(n=0,r=e.length;n<r;n++)i[t=e[n].left+""+e[n].top]||(i[t]=e[n]);var a=[];for(t in i)a.push(i[t]);return a},render:function(e){var t,n,r=this.canvas.contextTop;for(r.fillStyle=this.color,this._saveAndTransform(r),t=0,n=e.length;t<n;t++){var i=e[t];void 0!==i.opacity&&(r.globalAlpha=i.opacity),r.fillRect(i.x,i.y,i.width,i.width)}r.restore()},_render:function(){var e,t,n=this.canvas.contextTop;for(n.fillStyle=this.color,this._saveAndTransform(n),e=0,t=this.sprayChunks.length;e<t;e++)this.render(this.sprayChunks[e]);n.restore()},addSprayChunk:function(e){this.sprayChunkPoints=[];var t,n,r,i,a=this.width/2;for(i=0;i<this.density;i++){t=C.util.getRandomInt(e.x-a,e.x+a),n=C.util.getRandomInt(e.y-a,e.y+a),r=this.dotWidthVariance?C.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var o=new C.Point(t,n);o.width=r,this.randomOpacity&&(o.opacity=C.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(o)}this.sprayChunks.push(this.sprayChunkPoints)}}),C.PatternBrush=C.util.createClass(C.PencilBrush,{getPatternSrc:function(){var e=C.util.createCanvasElement(),t=e.getContext("2d");return e.width=e.height=25,t.fillStyle=this.color,t.beginPath(),t.arc(10,10,10,0,2*Math.PI,!1),t.closePath(),t.fill(),e},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},getPattern:function(){return this.canvas.contextTop.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(){this.callSuper("_setBrushStyles"),this.canvas.contextTop.strokeStyle=this.getPattern()},createPath:function(e){var t=this.callSuper("createPath",e),n=t._getLeftTopCoords().scalarAdd(t.strokeWidth/2);return t.stroke=new C.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-n.x,offsetY:-n.y}),t}}),function(){var e=C.util.getPointer,t=C.util.degreesToRadians,n=C.util.isTouchEvent;for(var r in C.Canvas=C.util.createClass(C.StaticCanvas,{initialize:function(e,t){t||(t={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(e,t),this._initInteractive(),this._createCacheCanvas()},uniformScaling:!0,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",interactive:!0,selection:!0,selectionKey:"shiftKey",altSelectionKey:null,selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",rotationCursor:"crosshair",notAllowedCursor:"not-allowed",containerClass:"canvas-container",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,isDrawingMode:!1,preserveObjectStacking:!1,snapAngle:0,snapThreshold:null,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,targets:[],_hoveredTarget:null,_hoveredTargets:[],_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=C.PencilBrush&&new C.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var e,t,n,r=this.getActiveObjects();if(r.length>0&&!this.preserveObjectStacking){t=[],n=[];for(var i=0,a=this._objects.length;i<a;i++)e=this._objects[i],-1===r.indexOf(e)?t.push(e):n.push(e);r.length>1&&(this._activeObject._objects=n),t.push.apply(t,n)}else t=this._objects;return t},renderAll:function(){!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&this.renderTopLayer(this.contextTop);var e=this.contextContainer;return this.renderCanvas(e,this._chooseObjectsToRender()),this},renderTopLayer:function(e){e.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(e),this.contextTopDirty=!0),e.restore()},renderTop:function(){var e=this.contextTop;return this.clearContext(e),this.renderTopLayer(e),this.fire("after:render"),this},_normalizePointer:function(e,t){var n=e.calcTransformMatrix(),r=C.util.invertTransform(n),i=this.restorePointerVpt(t);return C.util.transformPoint(i,r)},isTargetTransparent:function(e,t,n){if(e.shouldCache()&&e._cacheCanvas&&e!==this._activeObject){var r=this._normalizePointer(e,{x:t,y:n}),i=Math.max(e.cacheTranslationX+r.x*e.zoomX,0),a=Math.max(e.cacheTranslationY+r.y*e.zoomY,0);return C.util.isTransparent(e._cacheContext,Math.round(i),Math.round(a),this.targetFindTolerance)}var o=this.contextCache,s=e.selectionBackgroundColor,l=this.viewportTransform;return e.selectionBackgroundColor="",this.clearContext(o),o.save(),o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),e.render(o),o.restore(),e.selectionBackgroundColor=s,C.util.isTransparent(o,t,n,this.targetFindTolerance)},_isSelectionKeyPressed:function(e){return"[object Array]"===Object.prototype.toString.call(this.selectionKey)?!!this.selectionKey.find((function(t){return!0===e[t]})):e[this.selectionKey]},_shouldClearSelection:function(e,t){var n=this.getActiveObjects(),r=this._activeObject;return!t||t&&r&&n.length>1&&-1===n.indexOf(t)&&r!==t&&!this._isSelectionKeyPressed(e)||t&&!t.evented||t&&!t.selectable&&r&&r!==t},_shouldCenterTransform:function(e,t,n){var r;if(e)return"scale"===t||"scaleX"===t||"scaleY"===t||"resizing"===t?r=this.centeredScaling||e.centeredScaling:"rotate"===t&&(r=this.centeredRotation||e.centeredRotation),r?!n:n},_getOriginFromCorner:function(e,t){var n={x:e.originX,y:e.originY};return"ml"===t||"tl"===t||"bl"===t?n.x="right":"mr"!==t&&"tr"!==t&&"br"!==t||(n.x="left"),"tl"===t||"mt"===t||"tr"===t?n.y="bottom":"bl"!==t&&"mb"!==t&&"br"!==t||(n.y="top"),n},_getActionFromCorner:function(e,t,n,r){if(!t||!e)return"drag";var i=r.controls[t];return i.getActionName(n,i,r)},_setupCurrentTransform:function(e,n,r){if(n){var i=this.getPointer(e),a=n.__corner,o=n.controls[a],s=r&&a?o.getActionHandler(e,n,o):C.controlsUtils.dragHandler,l=this._getActionFromCorner(r,a,e,n),c=this._getOriginFromCorner(n,a),u=e[this.centeredKey],d={target:n,action:l,actionHandler:s,corner:a,scaleX:n.scaleX,scaleY:n.scaleY,skewX:n.skewX,skewY:n.skewY,offsetX:i.x-n.left,offsetY:i.y-n.top,originX:c.x,originY:c.y,ex:i.x,ey:i.y,lastX:i.x,lastY:i.y,theta:t(n.angle),width:n.width*n.scaleX,shiftKey:e.shiftKey,altKey:u,original:C.util.saveObjectTransform(n)};this._shouldCenterTransform(n,l,u)&&(d.originX="center",d.originY="center"),d.original.originX=c.x,d.original.originY=c.y,this._currentTransform=d,this._beforeTransform(e)}},setCursor:function(e){this.upperCanvasEl.style.cursor=e},_drawSelection:function(e){var t=this._groupSelector,n=new C.Point(t.ex,t.ey),r=C.util.transformPoint(n,this.viewportTransform),i=new C.Point(t.ex+t.left,t.ey+t.top),a=C.util.transformPoint(i,this.viewportTransform),o=Math.min(r.x,a.x),s=Math.min(r.y,a.y),l=Math.max(r.x,a.x),c=Math.max(r.y,a.y),u=this.selectionLineWidth/2;this.selectionColor&&(e.fillStyle=this.selectionColor,e.fillRect(o,s,l-o,c-s)),this.selectionLineWidth&&this.selectionBorderColor&&(e.lineWidth=this.selectionLineWidth,e.strokeStyle=this.selectionBorderColor,o+=u,s+=u,l-=u,c-=u,C.Object.prototype._setLineDash.call(this,e,this.selectionDashArray),e.strokeRect(o,s,l-o,c-s))},findTarget:function(e,t){if(!this.skipTargetFind){var r,i,a=this.getPointer(e,!0),o=this._activeObject,s=this.getActiveObjects(),l=n(e),c=s.length>1&&!t||1===s.length;if(this.targets=[],c&&o._findTargetCorner(a,l))return o;if(s.length>1&&!t&&o===this._searchPossibleTargets([o],a))return o;if(1===s.length&&o===this._searchPossibleTargets([o],a)){if(!this.preserveObjectStacking)return o;r=o,i=this.targets,this.targets=[]}var u=this._searchPossibleTargets(this._objects,a);return e[this.altSelectionKey]&&u&&r&&u!==r&&(u=r,this.targets=i),u}},_checkTarget:function(e,t,n){if(t&&t.visible&&t.evented&&t.containsPoint(e)){if(!this.perPixelTargetFind&&!t.perPixelTargetFind||t.isEditing)return!0;if(!this.isTargetTransparent(t,n.x,n.y))return!0}},_searchPossibleTargets:function(e,t){for(var n,r,i=e.length;i--;){var a=e[i],o=a.group?this._normalizePointer(a.group,t):t;if(this._checkTarget(o,a,t)){(n=e[i]).subTargetCheck&&n instanceof C.Group&&(r=this._searchPossibleTargets(n._objects,t))&&this.targets.push(r);break}}return n},restorePointerVpt:function(e){return C.util.transformPoint(e,C.util.invertTransform(this.viewportTransform))},getPointer:function(t,n){if(this._absolutePointer&&!n)return this._absolutePointer;if(this._pointer&&n)return this._pointer;var r,i=e(t),a=this.upperCanvasEl,o=a.getBoundingClientRect(),s=o.width||0,l=o.height||0;s&&l||("top"in o&&"bottom"in o&&(l=Math.abs(o.top-o.bottom)),"right"in o&&"left"in o&&(s=Math.abs(o.right-o.left))),this.calcOffset(),i.x=i.x-this._offset.left,i.y=i.y-this._offset.top,n||(i=this.restorePointerVpt(i));var c=this.getRetinaScaling();return 1!==c&&(i.x/=c,i.y/=c),r=0===s||0===l?{width:1,height:1}:{width:a.width/s,height:a.height/l},{x:i.x*r.width,y:i.y*r.height}},_createUpperCanvas:function(){var e=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),t=this.lowerCanvasEl,n=this.upperCanvasEl;n?n.className="":(n=this._createCanvasElement(),this.upperCanvasEl=n),C.util.addClass(n,"upper-canvas "+e),this.wrapperEl.appendChild(n),this._copyCanvasStyle(t,n),this._applyCanvasStyle(n),this.contextTop=n.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=C.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),C.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),C.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(e){var t=this.width||e.width,n=this.height||e.height;C.util.setStyle(e,{position:"absolute",width:t+"px",height:n+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),e.width=t,e.height=n,C.util.makeElementUnselectable(e)},_copyCanvasStyle:function(e,t){t.style.cssText=e.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var e=this._activeObject;return e?"activeSelection"===e.type&&e._objects?e._objects.slice(0):[e]:[]},_onObjectRemoved:function(e){e===this._activeObject&&(this.fire("before:selection:cleared",{target:e}),this._discardActiveObject(),this.fire("selection:cleared",{target:e}),e.fire("deselected")),e===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",e)},_fireSelectionEvents:function(e,t){var n=!1,r=this.getActiveObjects(),i=[],a=[];e.forEach((function(e){-1===r.indexOf(e)&&(n=!0,e.fire("deselected",{e:t,target:e}),a.push(e))})),r.forEach((function(r){-1===e.indexOf(r)&&(n=!0,r.fire("selected",{e:t,target:r}),i.push(r))})),e.length>0&&r.length>0?n&&this.fire("selection:updated",{e:t,selected:i,deselected:a,updated:i[0]||a[0],target:this._activeObject}):r.length>0?this.fire("selection:created",{e:t,selected:i,target:this._activeObject}):e.length>0&&this.fire("selection:cleared",{e:t,deselected:a})},setActiveObject:function(e,t){var n=this.getActiveObjects();return this._setActiveObject(e,t),this._fireSelectionEvents(n,t),this},_setActiveObject:function(e,t){return this._activeObject!==e&&(!!this._discardActiveObject(t,e)&&(!e.onSelect({e:t})&&(this._activeObject=e,!0)))},_discardActiveObject:function(e,t){var n=this._activeObject;if(n){if(n.onDeselect({e:e,object:t}))return!1;this._activeObject=null}return!0},discardActiveObject:function(e){var t=this.getActiveObjects(),n=this.getActiveObject();return t.length&&this.fire("before:selection:cleared",{target:n,e:e}),this._discardActiveObject(e),this._fireSelectionEvents(t,e),this},dispose:function(){var e=this.wrapperEl;return this.removeListeners(),e.removeChild(this.upperCanvasEl),e.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach(function(e){C.util.cleanUpJsdomNode(this[e]),this[e]=void 0}.bind(this)),e.parentNode&&e.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,C.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(e){var t=this._activeObject;t&&t._renderControls(e)},_toObject:function(e,t,n){var r=this._realizeGroupTransformOnObject(e),i=this.callSuper("_toObject",e,t,n);return this._unwindGroupTransformOnObject(e,r),i},_realizeGroupTransformOnObject:function(e){if(e.group&&"activeSelection"===e.group.type&&this._activeObject===e.group){var t={};return["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"].forEach((function(n){t[n]=e[n]})),C.util.addTransformToObject(e,this._activeObject.calcOwnMatrix()),t}return null},_unwindGroupTransformOnObject:function(e,t){t&&e.set(t)},_setSVGObject:function(e,t,n){var r=this._realizeGroupTransformOnObject(t);this.callSuper("_setSVGObject",e,t,n),this._unwindGroupTransformOnObject(t,r)},setViewportTransform:function(e){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),C.StaticCanvas.prototype.setViewportTransform.call(this,e)}}),C.StaticCanvas)"prototype"!==r&&(C.Canvas[r]=C.StaticCanvas[r])}(),function(){var e=C.util.addListener,t=C.util.removeListener,n={passive:!1};function r(e,t){return e.button&&e.button===t-1}C.util.object.extend(C.Canvas.prototype,{mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(e,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(e,t){var r=this.upperCanvasEl,i=this._getEventPrefix();e(C.window,"resize",this._onResize),e(r,i+"down",this._onMouseDown),e(r,i+"move",this._onMouseMove,n),e(r,i+"out",this._onMouseOut),e(r,i+"enter",this._onMouseEnter),e(r,"wheel",this._onMouseWheel),e(r,"contextmenu",this._onContextMenu),e(r,"dblclick",this._onDoubleClick),e(r,"dragover",this._onDragOver),e(r,"dragenter",this._onDragEnter),e(r,"dragleave",this._onDragLeave),e(r,"drop",this._onDrop),this.enablePointerEvents||e(r,"touchstart",this._onTouchStart,n),"undefined"!=typeof eventjs&&t in eventjs&&(eventjs[t](r,"gesture",this._onGesture),eventjs[t](r,"drag",this._onDrag),eventjs[t](r,"orientation",this._onOrientationChange),eventjs[t](r,"shake",this._onShake),eventjs[t](r,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(t,"remove");var e=this._getEventPrefix();t(C.document,e+"up",this._onMouseUp),t(C.document,"touchend",this._onTouchEnd,n),t(C.document,e+"move",this._onMouseMove,n),t(C.document,"touchmove",this._onMouseMove,n)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._simpleEventHandler.bind(this,"drop"),this.eventsBound=!0)},_onGesture:function(e,t){this.__onTransformGesture&&this.__onTransformGesture(e,t)},_onDrag:function(e,t){this.__onDrag&&this.__onDrag(e,t)},_onMouseWheel:function(e){this.__onMouseWheel(e)},_onMouseOut:function(e){var t=this._hoveredTarget;this.fire("mouse:out",{target:t,e:e}),this._hoveredTarget=null,t&&t.fire("mouseout",{e:e});var n=this;this._hoveredTargets.forEach((function(r){n.fire("mouse:out",{target:t,e:e}),r&&t.fire("mouseout",{e:e})})),this._hoveredTargets=[],this._iTextInstances&&this._iTextInstances.forEach((function(e){e.isEditing&&e.hiddenTextarea.focus()}))},_onMouseEnter:function(e){this._currentTransform||this.findTarget(e)||(this.fire("mouse:over",{target:null,e:e}),this._hoveredTarget=null,this._hoveredTargets=[])},_onOrientationChange:function(e,t){this.__onOrientationChange&&this.__onOrientationChange(e,t)},_onShake:function(e,t){this.__onShake&&this.__onShake(e,t)},_onLongPress:function(e,t){this.__onLongPress&&this.__onLongPress(e,t)},_onDragOver:function(e){e.preventDefault();var t=this._simpleEventHandler("dragover",e);this._fireEnterLeaveEvents(t,e)},_onContextMenu:function(e){return this.stopContextMenu&&(e.stopPropagation(),e.preventDefault()),!1},_onDoubleClick:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"dblclick"),this._resetTransformEventData(e)},getPointerId:function(e){var t=e.changedTouches;return t?t[0]&&t[0].identifier:this.enablePointerEvents?e.pointerId:-1},_isMainEvent:function(e){return!0===e.isPrimary||!1!==e.isPrimary&&("touchend"===e.type&&0===e.touches.length||(!e.changedTouches||e.changedTouches[0].identifier===this.mainTouchId))},_onTouchStart:function(r){r.preventDefault(),null===this.mainTouchId&&(this.mainTouchId=this.getPointerId(r)),this.__onMouseDown(r),this._resetTransformEventData();var i=this.upperCanvasEl,a=this._getEventPrefix();e(C.document,"touchend",this._onTouchEnd,n),e(C.document,"touchmove",this._onMouseMove,n),t(i,a+"down",this._onMouseDown)},_onMouseDown:function(r){this.__onMouseDown(r),this._resetTransformEventData();var i=this.upperCanvasEl,a=this._getEventPrefix();t(i,a+"move",this._onMouseMove,n),e(C.document,a+"up",this._onMouseUp),e(C.document,a+"move",this._onMouseMove,n)},_onTouchEnd:function(r){if(!(r.touches.length>0)){this.__onMouseUp(r),this._resetTransformEventData(),this.mainTouchId=null;var i=this._getEventPrefix();t(C.document,"touchend",this._onTouchEnd,n),t(C.document,"touchmove",this._onMouseMove,n);var a=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout((function(){e(a.upperCanvasEl,i+"down",a._onMouseDown),a._willAddMouseDown=0}),400)}},_onMouseUp:function(r){this.__onMouseUp(r),this._resetTransformEventData();var i=this.upperCanvasEl,a=this._getEventPrefix();this._isMainEvent(r)&&(t(C.document,a+"up",this._onMouseUp),t(C.document,a+"move",this._onMouseMove,n),e(i,a+"move",this._onMouseMove,n))},_onMouseMove:function(e){!this.allowTouchScrolling&&e.preventDefault&&e.preventDefault(),this.__onMouseMove(e)},_onResize:function(){this.calcOffset()},_shouldRender:function(e){var t=this._activeObject;return!!(!!t!=!!e||t&&e&&t!==e)||(t&&t.isEditing,!1)},__onMouseUp:function(e){var t,n=this._currentTransform,i=this._groupSelector,a=!1,o=!i||0===i.left&&0===i.top;if(this._cacheTransformEventData(e),t=this._target,this._handleEvent(e,"up:before"),r(e,3))this.fireRightClick&&this._handleEvent(e,"up",3,o);else{if(r(e,2))return this.fireMiddleClick&&this._handleEvent(e,"up",2,o),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)this._onMouseUpInDrawingMode(e);else if(this._isMainEvent(e)){if(n&&(this._finalizeCurrentTransform(e),a=n.actionPerformed),!o){var s=t===this._activeObject;this._maybeGroupObjects(e),a||(a=this._shouldRender(t)||!s&&t===this._activeObject)}if(t){if(t.selectable&&t!==this._activeObject&&"up"===t.activeOn)this.setActiveObject(t,e),a=!0;else{var l=t._findTargetCorner(this.getPointer(e,!0),C.util.isTouchEvent(e)),c=t.controls[l],u=c&&c.getMouseUpHandler(e,t,c);if(u){var d=this.getPointer(e);u(e,n,d.x,d.y)}}t.isMoving=!1}this._setCursorFromEvent(e,t),this._handleEvent(e,"up",1,o),this._groupSelector=null,this._currentTransform=null,t&&(t.__corner=0),a?this.requestRenderAll():o||this.renderTop()}}},_simpleEventHandler:function(e,t){var n=this.findTarget(t),r=this.targets,i={e:t,target:n,subTargets:r};if(this.fire(e,i),n&&n.fire(e,i),!r)return n;for(var a=0;a<r.length;a++)r[a].fire(e,i);return n},_handleEvent:function(e,t,n,r){var i=this._target,a=this.targets||[],o={e:e,target:i,subTargets:a,button:n||1,isClick:r||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};"up"===t&&(o.currentTarget=this.findTarget(e),o.currentSubTargets=this.targets),this.fire("mouse:"+t,o),i&&i.fire("mouse"+t,o);for(var s=0;s<a.length;s++)a[s].fire("mouse"+t,o)},_finalizeCurrentTransform:function(e){var t,n=this._currentTransform,r=n.target,i={e:e,target:r,transform:n,action:n.action};r._scaling&&(r._scaling=!1),r.setCoords(),(n.actionPerformed||this.stateful&&r.hasStateChanged())&&(n.actionPerformed&&(t=this._addEventOptions(i,n),this._fire(t,i)),this._fire("modified",i))},_addEventOptions:function(e,t){var n,r;switch(t.action){case"scaleX":n="scaled",r="x";break;case"scaleY":n="scaled",r="y";break;case"skewX":n="skewed",r="x";break;case"skewY":n="skewed",r="y";break;case"scale":n="scaled",r="equally";break;case"rotate":n="rotated";break;case"drag":n="moved"}return e.by=r,n},_onMouseDownInDrawingMode:function(e){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(e).requestRenderAll();var t=this.getPointer(e);this.freeDrawingBrush.onMouseDown(t,{e:e,pointer:t}),this._handleEvent(e,"down")},_onMouseMoveInDrawingMode:function(e){if(this._isCurrentlyDrawing){var t=this.getPointer(e);this.freeDrawingBrush.onMouseMove(t,{e:e,pointer:t})}this.setCursor(this.freeDrawingCursor),this._handleEvent(e,"move")},_onMouseUpInDrawingMode:function(e){var t=this.getPointer(e);this._isCurrentlyDrawing=this.freeDrawingBrush.onMouseUp({e:e,pointer:t}),this._handleEvent(e,"up")},__onMouseDown:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"down:before");var t=this._target;if(r(e,3))this.fireRightClick&&this._handleEvent(e,"down",3);else if(r(e,2))this.fireMiddleClick&&this._handleEvent(e,"down",2);else if(this.isDrawingMode)this._onMouseDownInDrawingMode(e);else if(this._isMainEvent(e)&&!this._currentTransform){var n=this._pointer;this._previousPointer=n;var i=this._shouldRender(t),a=this._shouldGroup(e,t);if(this._shouldClearSelection(e,t)?this.discardActiveObject(e):a&&(this._handleGrouping(e,t),t=this._activeObject),!this.selection||t&&(t.selectable||t.isEditing||t===this._activeObject)||(this._groupSelector={ex:this._absolutePointer.x,ey:this._absolutePointer.y,top:0,left:0}),t){var o=t===this._activeObject;t.selectable&&"down"===t.activeOn&&this.setActiveObject(t,e);var s=t._findTargetCorner(this.getPointer(e,!0),C.util.isTouchEvent(e));if(t.__corner=s,t===this._activeObject&&(s||!a)){this._setupCurrentTransform(e,t,o);var l=t.controls[s],c=(n=this.getPointer(e),l&&l.getMouseDownHandler(e,t,l));c&&c(e,this._currentTransform,n.x,n.y)}}this._handleEvent(e,"down"),(i||a)&&this.requestRenderAll()}},_resetTransformEventData:function(){this._target=null,this._pointer=null,this._absolutePointer=null},_cacheTransformEventData:function(e){this._resetTransformEventData(),this._pointer=this.getPointer(e,!0),this._absolutePointer=this.restorePointerVpt(this._pointer),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(e)||null},_beforeTransform:function(e){var t=this._currentTransform;this.stateful&&t.target.saveState(),this.fire("before:transform",{e:e,transform:t})},__onMouseMove:function(e){var t,n;if(this._handleEvent(e,"move:before"),this._cacheTransformEventData(e),this.isDrawingMode)this._onMouseMoveInDrawingMode(e);else if(this._isMainEvent(e)){var r=this._groupSelector;r?(n=this._absolutePointer,r.left=n.x-r.ex,r.top=n.y-r.ey,this.renderTop()):this._currentTransform?this._transformObject(e):(t=this.findTarget(e)||null,this._setCursorFromEvent(e,t),this._fireOverOutEvents(t,e)),this._handleEvent(e,"move"),this._resetTransformEventData()}},_fireOverOutEvents:function(e,t){var n=this._hoveredTarget,r=this._hoveredTargets,i=this.targets,a=Math.max(r.length,i.length);this.fireSyntheticInOutEvents(e,t,{oldTarget:n,evtOut:"mouseout",canvasEvtOut:"mouse:out",evtIn:"mouseover",canvasEvtIn:"mouse:over"});for(var o=0;o<a;o++)this.fireSyntheticInOutEvents(i[o],t,{oldTarget:r[o],evtOut:"mouseout",evtIn:"mouseover"});this._hoveredTarget=e,this._hoveredTargets=this.targets.concat()},_fireEnterLeaveEvents:function(e,t){var n=this._draggedoverTarget,r=this._hoveredTargets,i=this.targets,a=Math.max(r.length,i.length);this.fireSyntheticInOutEvents(e,t,{oldTarget:n,evtOut:"dragleave",evtIn:"dragenter"});for(var o=0;o<a;o++)this.fireSyntheticInOutEvents(i[o],t,{oldTarget:r[o],evtOut:"dragleave",evtIn:"dragenter"});this._draggedoverTarget=e},fireSyntheticInOutEvents:function(e,t,n){var r,i,a,o=n.oldTarget,s=o!==e,l=n.canvasEvtIn,c=n.canvasEvtOut;s&&(r={e:t,target:e,previousTarget:o},i={e:t,target:o,nextTarget:e}),a=e&&s,o&&s&&(c&&this.fire(c,i),o.fire(n.evtOut,i)),a&&(l&&this.fire(l,r),e.fire(n.evtIn,r))},__onMouseWheel:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"wheel"),this._resetTransformEventData()},_transformObject:function(e){var t=this.getPointer(e),n=this._currentTransform;n.reset=!1,n.shiftKey=e.shiftKey,n.altKey=e[this.centeredKey],this._performTransformAction(e,n,t),n.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(e,t,n){var r=n.x,i=n.y,a=t.action,o=!1,s=t.actionHandler;s&&(o=s(e,t,r,i)),"drag"===a&&o&&(t.target.isMoving=!0,this.setCursor(t.target.moveCursor||this.moveCursor)),t.actionPerformed=t.actionPerformed||o},_fire:C.controlsUtils.fireEvent,_setCursorFromEvent:function(e,t){if(!t)return this.setCursor(this.defaultCursor),!1;var n=t.hoverCursor||this.hoverCursor,r=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,i=(!r||!r.contains(t))&&t._findTargetCorner(this.getPointer(e,!0));i?this.setCursor(this.getCornerCursor(i,t,e)):(t.subTargetCheck&&this.targets.concat().reverse().map((function(e){n=e.hoverCursor||n})),this.setCursor(n))},getCornerCursor:function(e,t,n){var r=t.controls[e];return r.cursorStyleHandler(n,r,t)}})}(),v=Math.min,b=Math.max,C.util.object.extend(C.Canvas.prototype,{_shouldGroup:function(e,t){var n=this._activeObject;return n&&this._isSelectionKeyPressed(e)&&t&&t.selectable&&this.selection&&(n!==t||"activeSelection"===n.type)&&!t.onSelect({e:e})},_handleGrouping:function(e,t){var n=this._activeObject;n.__corner||(t!==n||(t=this.findTarget(e,!0))&&t.selectable)&&(n&&"activeSelection"===n.type?this._updateActiveSelection(t,e):this._createActiveSelection(t,e))},_updateActiveSelection:function(e,t){var n=this._activeObject,r=n._objects.slice(0);n.contains(e)?(n.removeWithUpdate(e),this._hoveredTarget=e,this._hoveredTargets=this.targets.concat(),1===n.size()&&this._setActiveObject(n.item(0),t)):(n.addWithUpdate(e),this._hoveredTarget=n,this._hoveredTargets=this.targets.concat()),this._fireSelectionEvents(r,t)},_createActiveSelection:function(e,t){var n=this.getActiveObjects(),r=this._createGroup(e);this._hoveredTarget=r,this._setActiveObject(r,t),this._fireSelectionEvents(n,t)},_createGroup:function(e){var t=this._objects,n=t.indexOf(this._activeObject)<t.indexOf(e)?[this._activeObject,e]:[e,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new C.ActiveSelection(n,{canvas:this})},_groupSelectedObjects:function(e){var t,n=this._collectObjects(e);1===n.length?this.setActiveObject(n[0],e):n.length>1&&(t=new C.ActiveSelection(n.reverse(),{canvas:this}),this.setActiveObject(t,e))},_collectObjects:function(e){for(var t,n=[],r=this._groupSelector.ex,i=this._groupSelector.ey,a=r+this._groupSelector.left,o=i+this._groupSelector.top,s=new C.Point(v(r,a),v(i,o)),l=new C.Point(b(r,a),b(i,o)),c=!this.selectionFullyContained,u=r===a&&i===o,d=this._objects.length;d--&&!((t=this._objects[d])&&t.selectable&&t.visible&&(c&&t.intersectsWithRect(s,l,!0)||t.isContainedWithinRect(s,l,!0)||c&&t.containsPoint(s,null,!0)||c&&t.containsPoint(l,null,!0))&&(n.push(t),u)););return n.length>1&&(n=n.filter((function(t){return!t.onSelect({e:e})}))),n},_maybeGroupObjects:function(e){this.selection&&this._groupSelector&&this._groupSelectedObjects(e),this.setCursor(this.defaultCursor),this._groupSelector=null}}),C.util.object.extend(C.StaticCanvas.prototype,{toDataURL:function(e){e||(e={});var t=e.format||"png",n=e.quality||1,r=(e.multiplier||1)*(e.enableRetinaScaling?this.getRetinaScaling():1),i=this.toCanvasElement(r,e);return C.util.toDataURL(i,t,n)},toCanvasElement:function(e,t){e=e||1;var n=((t=t||{}).width||this.width)*e,r=(t.height||this.height)*e,i=this.getZoom(),a=this.width,o=this.height,s=i*e,l=this.viewportTransform,c=(l[4]-(t.left||0))*e,u=(l[5]-(t.top||0))*e,d=this.interactive,h=[s,0,0,s,c,u],f=this.enableRetinaScaling,p=C.util.createCanvasElement(),m=this.contextTop;return p.width=n,p.height=r,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=h,this.width=n,this.height=r,this.calcViewportBoundaries(),this.renderCanvas(p.getContext("2d"),this._objects),this.viewportTransform=l,this.width=a,this.height=o,this.calcViewportBoundaries(),this.interactive=d,this.enableRetinaScaling=f,this.contextTop=m,p}}),C.util.object.extend(C.StaticCanvas.prototype,{loadFromJSON:function(e,t,n){if(e){var r="string"==typeof e?JSON.parse(e):C.util.object.clone(e),i=this,a=r.clipPath,o=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete r.clipPath,this._enlivenObjects(r.objects,(function(e){i.clear(),i._setBgOverlay(r,(function(){a?i._enlivenObjects([a],(function(n){i.clipPath=n[0],i.__setupCanvas.call(i,r,e,o,t)})):i.__setupCanvas.call(i,r,e,o,t)}))}),n),this}},__setupCanvas:function(e,t,n,r){var i=this;t.forEach((function(e,t){i.insertAt(e,t)})),this.renderOnAddRemove=n,delete e.objects,delete e.backgroundImage,delete e.overlayImage,delete e.background,delete e.overlay,this._setOptions(e),this.renderAll(),r&&r()},_setBgOverlay:function(e,t){var n={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(e.backgroundImage||e.overlayImage||e.background||e.overlay){var r=function(){n.backgroundImage&&n.overlayImage&&n.backgroundColor&&n.overlayColor&&t&&t()};this.__setBgOverlay("backgroundImage",e.backgroundImage,n,r),this.__setBgOverlay("overlayImage",e.overlayImage,n,r),this.__setBgOverlay("backgroundColor",e.background,n,r),this.__setBgOverlay("overlayColor",e.overlay,n,r)}else t&&t()},__setBgOverlay:function(e,t,n,r){var i=this;if(!t)return n[e]=!0,void(r&&r());"backgroundImage"===e||"overlayImage"===e?C.util.enlivenObjects([t],(function(t){i[e]=t[0],n[e]=!0,r&&r()})):this["set"+C.util.string.capitalize(e,!0)](t,(function(){n[e]=!0,r&&r()}))},_enlivenObjects:function(e,t,n){e&&0!==e.length?C.util.enlivenObjects(e,(function(e){t&&t(e)}),null,n):t&&t([])},_toDataURL:function(e,t){this.clone((function(n){t(n.toDataURL(e))}))},_toDataURLWithMultiplier:function(e,t,n){this.clone((function(r){n(r.toDataURLWithMultiplier(e,t))}))},clone:function(e,t){var n=JSON.stringify(this.toJSON(t));this.cloneWithoutData((function(t){t.loadFromJSON(n,(function(){e&&e(t)}))}))},cloneWithoutData:function(e){var t=C.util.createCanvasElement();t.width=this.width,t.height=this.height;var n=new C.Canvas(t);this.backgroundImage?(n.setBackgroundImage(this.backgroundImage.src,(function(){n.renderAll(),e&&e(n)})),n.backgroundImageOpacity=this.backgroundImageOpacity,n.backgroundImageStretch=this.backgroundImageStretch):e&&e(n)}}),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.util.object.clone,i=t.util.toFixed,a=t.util.string.capitalize,o=t.util.degreesToRadians,s=!t.isLikelyNode;t.Object||(t.Object=t.util.createClass(t.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,touchCornerSize:24,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgb(178,204,255)",borderDashArray:null,cornerColor:"rgb(178,204,255)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,perPixelTargetFind:!1,includeDefaultValues:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:s,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",activeOn:"down",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),colorProperties:"fill stroke backgroundColor".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(e){e&&this.setOptions(e)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=t.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(e){var n=t.perfLimitSizeTotal,r=e.width,i=e.height,a=t.maxCacheSideLimit,o=t.minCacheSideLimit;if(r<=a&&i<=a&&r*i<=n)return r<o&&(e.width=o),i<o&&(e.height=o),e;var s=r/i,l=t.util.limitDimsByArea(s,n),c=t.util.capValue,u=c(o,l.x,a),d=c(o,l.y,a);return r>u&&(e.zoomX/=r/u,e.width=u,e.capped=!0),i>d&&(e.zoomY/=i/d,e.height=d,e.capped=!0),e},_getCacheCanvasDimensions:function(){var e=this.getTotalObjectScaling(),t=this._getTransformedDimensions(0,0),n=t.x*e.scaleX/this.scaleX,r=t.y*e.scaleY/this.scaleY;return{width:n+2,height:r+2,zoomX:e.scaleX,zoomY:e.scaleY,x:n,y:r}},_updateCacheCanvas:function(){var e=this.canvas;if(this.noScaleCache&&e&&e._currentTransform){var n=e._currentTransform.target,r=e._currentTransform.action;if(this===n&&r.slice&&"scale"===r.slice(0,5))return!1}var i,a,o=this._cacheCanvas,s=this._limitCacheSize(this._getCacheCanvasDimensions()),l=t.minCacheSideLimit,c=s.width,u=s.height,d=s.zoomX,h=s.zoomY,f=c!==this.cacheWidth||u!==this.cacheHeight,p=this.zoomX!==d||this.zoomY!==h,m=f||p,g=0,v=0,b=!1;if(f){var y=this._cacheCanvas.width,A=this._cacheCanvas.height,_=c>y||u>A;b=_||(c<.9*y||u<.9*A)&&y>l&&A>l,_&&!s.capped&&(c>l||u>l)&&(g=.1*c,v=.1*u)}return this instanceof t.Text&&this.path&&(m=!0,b=!0,g+=this.getHeightOfLine(0)*this.zoomX,v+=this.getHeightOfLine(0)*this.zoomY),!!m&&(b?(o.width=Math.ceil(c+g),o.height=Math.ceil(u+v)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,o.width,o.height)),i=s.x/2,a=s.y/2,this.cacheTranslationX=Math.round(o.width/2-i)+i,this.cacheTranslationY=Math.round(o.height/2-a)+a,this.cacheWidth=c,this.cacheHeight=u,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(d,h),this.zoomX=d,this.zoomY=h,!0)},setOptions:function(e){this._setOptions(e),this._initGradient(e.fill,"fill"),this._initGradient(e.stroke,"stroke"),this._initPattern(e.fill,"fill"),this._initPattern(e.stroke,"stroke")},transform:function(e){var t=this.group&&!this.group._transformDone||this.group&&this.canvas&&e===this.canvas.contextTop,n=this.calcTransformMatrix(!t);e.transform(n[0],n[1],n[2],n[3],n[4],n[5])},toObject:function(e){var n=t.Object.NUM_FRACTION_DIGITS,r={type:this.type,version:t.version,originX:this.originX,originY:this.originY,left:i(this.left,n),top:i(this.top,n),width:i(this.width,n),height:i(this.height,n),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:i(this.strokeWidth,n),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeUniform:this.strokeUniform,strokeMiterLimit:i(this.strokeMiterLimit,n),scaleX:i(this.scaleX,n),scaleY:i(this.scaleY,n),angle:i(this.angle,n),flipX:this.flipX,flipY:this.flipY,opacity:i(this.opacity,n),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,skewX:i(this.skewX,n),skewY:i(this.skewY,n)};return this.clipPath&&!this.clipPath.excludeFromExport&&(r.clipPath=this.clipPath.toObject(e),r.clipPath.inverted=this.clipPath.inverted,r.clipPath.absolutePositioned=this.clipPath.absolutePositioned),t.util.populateWithProperties(this,r,e),this.includeDefaultValues||(r=this._removeDefaultValues(r)),r},toDatalessObject:function(e){return this.toObject(e)},_removeDefaultValues:function(e){var n=t.util.getKlass(e.type).prototype;return n.stateProperties.forEach((function(t){"left"!==t&&"top"!==t&&(e[t]===n[t]&&delete e[t],"[object Array]"===Object.prototype.toString.call(e[t])&&"[object Array]"===Object.prototype.toString.call(n[t])&&0===e[t].length&&0===n[t].length&&delete e[t])})),e},toString:function(){return"#<fabric."+a(this.type)+">"},getObjectScaling:function(){if(!this.group)return{scaleX:this.scaleX,scaleY:this.scaleY};var e=t.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(e.scaleX),scaleY:Math.abs(e.scaleY)}},getTotalObjectScaling:function(){var e=this.getObjectScaling(),t=e.scaleX,n=e.scaleY;if(this.canvas){var r=this.canvas.getZoom(),i=this.canvas.getRetinaScaling();t*=r*i,n*=r*i}return{scaleX:t,scaleY:n}},getObjectOpacity:function(){var e=this.opacity;return this.group&&(e*=this.group.getObjectOpacity()),e},_set:function(e,n){var r="scaleX"===e||"scaleY"===e,i=this[e]!==n,a=!1;return r&&(n=this._constrainScale(n)),"scaleX"===e&&n<0?(this.flipX=!this.flipX,n*=-1):"scaleY"===e&&n<0?(this.flipY=!this.flipY,n*=-1):"shadow"!==e||!n||n instanceof t.Shadow?"dirty"===e&&this.group&&this.group.set("dirty",n):n=new t.Shadow(n),this[e]=n,i&&(a=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(e)>-1?(this.dirty=!0,a&&this.group.set("dirty",!0)):a&&this.stateProperties.indexOf(e)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:t.iMatrix.concat()},isNotVisible:function(){return 0===this.opacity||!this.width&&!this.height&&0===this.strokeWidth||!this.visible},render:function(e){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(e.save(),this._setupCompositeOperation(e),this.drawSelectionBackground(e),this.transform(e),this._setOpacity(e),this._setShadow(e,this),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(e)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(e),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),e.restore())},renderCache:function(e){e=e||{},this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,e.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},hasStroke:function(){return this.stroke&&"transparent"!==this.stroke&&0!==this.strokeWidth},hasFill:function(){return this.fill&&"transparent"!==this.fill},needsItsOwnCache:function(){return!("stroke"!==this.paintFirst||!this.hasFill()||!this.hasStroke()||"object"!=typeof this.shadow)||!!this.clipPath},shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(0!==this.shadow.offsetX||0!==this.shadow.offsetY)},drawClipPathOnCache:function(e){var n=this.clipPath;if(e.save(),n.inverted?e.globalCompositeOperation="destination-out":e.globalCompositeOperation="destination-in",n.absolutePositioned){var r=t.util.invertTransform(this.calcTransformMatrix());e.transform(r[0],r[1],r[2],r[3],r[4],r[5])}n.transform(e),e.scale(1/n.zoomX,1/n.zoomY),e.drawImage(n._cacheCanvas,-n.cacheTranslationX,-n.cacheTranslationY),e.restore()},drawObject:function(e,t){var n=this.fill,r=this.stroke;t?(this.fill="black",this.stroke="",this._setClippingProperties(e)):this._renderBackground(e),this._render(e),this._drawClipPath(e),this.fill=n,this.stroke=r},_drawClipPath:function(e){var t=this.clipPath;t&&(t.canvas=this.canvas,t.shouldCache(),t._transformDone=!0,t.renderCache({forClipping:!0}),this.drawClipPathOnCache(e))},drawCacheOnCanvas:function(e){e.scale(1/this.zoomX,1/this.zoomY),e.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(e){if(this.isNotVisible())return!1;if(this._cacheCanvas&&!e&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!e){var t=this.cacheWidth/this.zoomX,n=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-t/2,-n/2,t,n)}return!0}return!1},_renderBackground:function(e){if(this.backgroundColor){var t=this._getNonTransformedDimensions();e.fillStyle=this.backgroundColor,e.fillRect(-t.x/2,-t.y/2,t.x,t.y),this._removeShadow(e)}},_setOpacity:function(e){this.group&&!this.group._transformDone?e.globalAlpha=this.getObjectOpacity():e.globalAlpha*=this.opacity},_setStrokeStyles:function(e,t){var n=t.stroke;n&&(e.lineWidth=t.strokeWidth,e.lineCap=t.strokeLineCap,e.lineDashOffset=t.strokeDashOffset,e.lineJoin=t.strokeLineJoin,e.miterLimit=t.strokeMiterLimit,n.toLive?"percentage"===n.gradientUnits||n.gradientTransform||n.patternTransform?this._applyPatternForTransformedGradient(e,n):(e.strokeStyle=n.toLive(e,this),this._applyPatternGradientTransform(e,n)):e.strokeStyle=t.stroke)},_setFillStyles:function(e,t){var n=t.fill;n&&(n.toLive?(e.fillStyle=n.toLive(e,this),this._applyPatternGradientTransform(e,t.fill)):e.fillStyle=n)},_setClippingProperties:function(e){e.globalAlpha=1,e.strokeStyle="transparent",e.fillStyle="#000000"},_setLineDash:function(e,t){t&&0!==t.length&&(1&t.length&&t.push.apply(t,t),e.setLineDash(t))},_renderControls:function(e,n){var r,i,a,s=this.getViewportTransform(),l=this.calcTransformMatrix();i=void 0!==(n=n||{}).hasBorders?n.hasBorders:this.hasBorders,a=void 0!==n.hasControls?n.hasControls:this.hasControls,l=t.util.multiplyTransformMatrices(s,l),r=t.util.qrDecompose(l),e.save(),e.translate(r.translateX,r.translateY),e.lineWidth=1*this.borderScaleFactor,this.group||(e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),e.rotate(o(r.angle)),n.forActiveSelection||this.group?i&&this.drawBordersInGroup(e,r,n):i&&this.drawBorders(e,n),a&&this.drawControls(e,n),e.restore()},_setShadow:function(e){if(this.shadow){var n,r=this.shadow,i=this.canvas,a=i&&i.viewportTransform[0]||1,o=i&&i.viewportTransform[3]||1;n=r.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),i&&i._isRetinaScaling()&&(a*=t.devicePixelRatio,o*=t.devicePixelRatio),e.shadowColor=r.color,e.shadowBlur=r.blur*t.browserShadowBlurConstant*(a+o)*(n.scaleX+n.scaleY)/4,e.shadowOffsetX=r.offsetX*a*n.scaleX,e.shadowOffsetY=r.offsetY*o*n.scaleY}},_removeShadow:function(e){this.shadow&&(e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0)},_applyPatternGradientTransform:function(e,t){if(!t||!t.toLive)return{offsetX:0,offsetY:0};var n=t.gradientTransform||t.patternTransform,r=-this.width/2+t.offsetX||0,i=-this.height/2+t.offsetY||0;return"percentage"===t.gradientUnits?e.transform(this.width,0,0,this.height,r,i):e.transform(1,0,0,1,r,i),n&&e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),{offsetX:r,offsetY:i}},_renderPaintInOrder:function(e){"stroke"===this.paintFirst?(this._renderStroke(e),this._renderFill(e)):(this._renderFill(e),this._renderStroke(e))},_render:function(){},_renderFill:function(e){this.fill&&(e.save(),this._setFillStyles(e,this),"evenodd"===this.fillRule?e.fill("evenodd"):e.fill(),e.restore())},_renderStroke:function(e){if(this.stroke&&0!==this.strokeWidth){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this.strokeUniform&&this.group){var t=this.getObjectScaling();e.scale(1/t.scaleX,1/t.scaleY)}else this.strokeUniform&&e.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(e,this.strokeDashArray),this._setStrokeStyles(e,this),e.stroke(),e.restore()}},_applyPatternForTransformedGradient:function(e,n){var r,i=this._limitCacheSize(this._getCacheCanvasDimensions()),a=t.util.createCanvasElement(),o=this.canvas.getRetinaScaling(),s=i.x/this.scaleX/o,l=i.y/this.scaleY/o;a.width=s,a.height=l,(r=a.getContext("2d")).beginPath(),r.moveTo(0,0),r.lineTo(s,0),r.lineTo(s,l),r.lineTo(0,l),r.closePath(),r.translate(s/2,l/2),r.scale(i.zoomX/this.scaleX/o,i.zoomY/this.scaleY/o),this._applyPatternGradientTransform(r,n),r.fillStyle=n.toLive(e),r.fill(),e.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),e.scale(o*this.scaleX/i.zoomX,o*this.scaleY/i.zoomY),e.strokeStyle=r.createPattern(a,"no-repeat")},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var e=t.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",e.scaleX),this.set("scaleY",e.scaleY),this.angle=e.angle,this.skewX=e.skewX,this.skewY=0}},_removeTransformMatrix:function(e){var n=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),n=t.util.transformPoint(n,this.transformMatrix)),this.transformMatrix=null,e&&(this.scaleX*=e.scaleX,this.scaleY*=e.scaleY,this.cropX=e.cropX,this.cropY=e.cropY,n.x+=e.offsetLeft,n.y+=e.offsetTop,this.width=e.width,this.height=e.height),this.setPositionByOrigin(n,"center","center")},clone:function(e,n){var r=this.toObject(n);this.constructor.fromObject?this.constructor.fromObject(r,e):t.Object._fromObject("Object",r,e)},cloneAsImage:function(e,n){var r=this.toCanvasElement(n);return e&&e(new t.Image(r)),this},toCanvasElement:function(e){e||(e={});var n=t.util,r=n.saveObjectTransform(this),i=this.group,a=this.shadow,o=Math.abs,s=(e.multiplier||1)*(e.enableRetinaScaling?t.devicePixelRatio:1);delete this.group,e.withoutTransform&&n.resetObjectTransform(this),e.withoutShadow&&(this.shadow=null);var l,c,u,d,h=t.util.createCanvasElement(),f=this.getBoundingRect(!0,!0),p=this.shadow,m={x:0,y:0};p&&(c=p.blur,l=p.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),m.x=2*Math.round(o(p.offsetX)+c)*o(l.scaleX),m.y=2*Math.round(o(p.offsetY)+c)*o(l.scaleY)),u=f.width+m.x,d=f.height+m.y,h.width=Math.ceil(u),h.height=Math.ceil(d);var g=new t.StaticCanvas(h,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});"jpeg"===e.format&&(g.backgroundColor="#fff"),this.setPositionByOrigin(new t.Point(g.width/2,g.height/2),"center","center");var v=this.canvas;g.add(this);var b=g.toCanvasElement(s||1,e);return this.shadow=a,this.set("canvas",v),i&&(this.group=i),this.set(r).setCoords(),g._objects=[],g.dispose(),g=null,b},toDataURL:function(e){return e||(e={}),t.util.toDataURL(this.toCanvasElement(e),e.format||"png",e.quality||1)},isType:function(e){return this.type===e},complexity:function(){return 1},toJSON:function(e){return this.toObject(e)},rotate:function(e){var t=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return t&&this._setOriginToCenter(),this.set("angle",e),t&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(e,n){n=n||this.canvas.getPointer(e);var r=new t.Point(n.x,n.y),i=this._getLeftTopCoords();return this.angle&&(r=t.util.rotatePoint(r,i,o(-this.angle))),{x:r.x-i.x,y:r.y-i.y}},_setupCompositeOperation:function(e){this.globalCompositeOperation&&(e.globalCompositeOperation=this.globalCompositeOperation)}}),t.util.createAccessors&&t.util.createAccessors(t.Object),n(t.Object.prototype,t.Observable),t.Object.NUM_FRACTION_DIGITS=2,t.Object._fromObject=function(e,n,i,a){var o=t[e];n=r(n,!0),t.util.enlivenPatterns([n.fill,n.stroke],(function(e){void 0!==e[0]&&(n.fill=e[0]),void 0!==e[1]&&(n.stroke=e[1]),t.util.enlivenObjects([n.clipPath],(function(e){n.clipPath=e[0];var t=a?new o(n[a],n):new o(n);i&&i(t)}))}))},t.Object.__uid=0)}(t),y=C.util.degreesToRadians,A={left:-.5,center:0,right:.5},_={top:-.5,center:0,bottom:.5},C.util.object.extend(C.Object.prototype,{translateToGivenOrigin:function(e,t,n,r,i){var a,o,s,l=e.x,c=e.y;return"string"==typeof t?t=A[t]:t-=.5,"string"==typeof r?r=A[r]:r-=.5,"string"==typeof n?n=_[n]:n-=.5,"string"==typeof i?i=_[i]:i-=.5,o=i-n,((a=r-t)||o)&&(s=this._getTransformedDimensions(),l=e.x+a*s.x,c=e.y+o*s.y),new C.Point(l,c)},translateToCenterPoint:function(e,t,n){var r=this.translateToGivenOrigin(e,t,n,"center","center");return this.angle?C.util.rotatePoint(r,e,y(this.angle)):r},translateToOriginPoint:function(e,t,n){var r=this.translateToGivenOrigin(e,"center","center",t,n);return this.angle?C.util.rotatePoint(r,e,y(this.angle)):r},getCenterPoint:function(){var e=new C.Point(this.left,this.top);return this.translateToCenterPoint(e,this.originX,this.originY)},getPointByOrigin:function(e,t){var n=this.getCenterPoint();return this.translateToOriginPoint(n,e,t)},toLocalPoint:function(e,t,n){var r,i,a=this.getCenterPoint();return r=void 0!==t&&void 0!==n?this.translateToGivenOrigin(a,"center","center",t,n):new C.Point(this.left,this.top),i=new C.Point(e.x,e.y),this.angle&&(i=C.util.rotatePoint(i,a,-y(this.angle))),i.subtractEquals(r)},setPositionByOrigin:function(e,t,n){var r=this.translateToCenterPoint(e,t,n),i=this.translateToOriginPoint(r,this.originX,this.originY);this.set("left",i.x),this.set("top",i.y)},adjustPosition:function(e){var t,n,r=y(this.angle),i=this.getScaledWidth(),a=C.util.cos(r)*i,o=C.util.sin(r)*i;t="string"==typeof this.originX?A[this.originX]:this.originX-.5,n="string"==typeof e?A[e]:e-.5,this.left+=a*(n-t),this.top+=o*(n-t),this.setCoords(),this.originX=e},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var e=this.getCenterPoint();this.originX="center",this.originY="center",this.left=e.x,this.top=e.y},_resetOrigin:function(){var e=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=e.x,this.top=e.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}}),function(){var e=C.util,t=e.degreesToRadians,n=e.multiplyTransformMatrices,r=e.transformPoint;e.object.extend(C.Object.prototype,{oCoords:null,aCoords:null,lineCoords:null,ownMatrixCache:null,matrixCache:null,controls:{},_getCoords:function(e,t){return t?e?this.calcACoords():this.calcLineCoords():(this.aCoords&&this.lineCoords||this.setCoords(!0),e?this.aCoords:this.lineCoords)},getCoords:function(e,t){return n=this._getCoords(e,t),[new C.Point(n.tl.x,n.tl.y),new C.Point(n.tr.x,n.tr.y),new C.Point(n.br.x,n.br.y),new C.Point(n.bl.x,n.bl.y)];var n},intersectsWithRect:function(e,t,n,r){var i=this.getCoords(n,r);return"Intersection"===C.Intersection.intersectPolygonRectangle(i,e,t).status},intersectsWithObject:function(e,t,n){return"Intersection"===C.Intersection.intersectPolygonPolygon(this.getCoords(t,n),e.getCoords(t,n)).status||e.isContainedWithinObject(this,t,n)||this.isContainedWithinObject(e,t,n)},isContainedWithinObject:function(e,t,n){for(var r=this.getCoords(t,n),i=t?e.aCoords:e.lineCoords,a=0,o=e._getImageLines(i);a<4;a++)if(!e.containsPoint(r[a],o))return!1;return!0},isContainedWithinRect:function(e,t,n,r){var i=this.getBoundingRect(n,r);return i.left>=e.x&&i.left+i.width<=t.x&&i.top>=e.y&&i.top+i.height<=t.y},containsPoint:function(e,t,n,r){var i=this._getCoords(n,r),a=(t=t||this._getImageLines(i),this._findCrossPoints(e,t));return 0!==a&&a%2==1},isOnScreen:function(e){if(!this.canvas)return!1;var t=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br;return!!this.getCoords(!0,e).some((function(e){return e.x<=n.x&&e.x>=t.x&&e.y<=n.y&&e.y>=t.y}))||(!!this.intersectsWithRect(t,n,!0,e)||this._containsCenterOfCanvas(t,n,e))},_containsCenterOfCanvas:function(e,t,n){var r={x:(e.x+t.x)/2,y:(e.y+t.y)/2};return!!this.containsPoint(r,null,!0,n)},isPartiallyOnScreen:function(e){if(!this.canvas)return!1;var t=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br;return!!this.intersectsWithRect(t,n,!0,e)||this.getCoords(!0,e).every((function(e){return(e.x>=n.x||e.x<=t.x)&&(e.y>=n.y||e.y<=t.y)}))&&this._containsCenterOfCanvas(t,n,e)},_getImageLines:function(e){return{topline:{o:e.tl,d:e.tr},rightline:{o:e.tr,d:e.br},bottomline:{o:e.br,d:e.bl},leftline:{o:e.bl,d:e.tl}}},_findCrossPoints:function(e,t){var n,r,i,a=0;for(var o in t)if(!((i=t[o]).o.y<e.y&&i.d.y<e.y||i.o.y>=e.y&&i.d.y>=e.y||(i.o.x===i.d.x&&i.o.x>=e.x?r=i.o.x:(0,n=(i.d.y-i.o.y)/(i.d.x-i.o.x),r=-(e.y-0*e.x-(i.o.y-n*i.o.x))/(0-n)),r>=e.x&&(a+=1),2!==a)))break;return a},getBoundingRect:function(t,n){var r=this.getCoords(t,n);return e.makeBoundingBoxFromPoints(r)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(e){return Math.abs(e)<this.minScaleLimit?e<0?-this.minScaleLimit:this.minScaleLimit:0===e?1e-4:e},scale:function(e){return this._set("scaleX",e),this._set("scaleY",e),this.setCoords()},scaleToWidth:function(e,t){var n=this.getBoundingRect(t).width/this.getScaledWidth();return this.scale(e/this.width/n)},scaleToHeight:function(e,t){var n=this.getBoundingRect(t).height/this.getScaledHeight();return this.scale(e/this.height/n)},calcCoords:function(e){return e?this.calcACoords():this.calcOCoords()},calcLineCoords:function(){var n=this.getViewportTransform(),i=this.padding,a=t(this.angle),o=e.cos(a)*i,s=e.sin(a)*i,l=o+s,c=o-s,u=this.calcACoords(),d={tl:r(u.tl,n),tr:r(u.tr,n),bl:r(u.bl,n),br:r(u.br,n)};return i&&(d.tl.x-=c,d.tl.y-=l,d.tr.x+=l,d.tr.y-=c,d.bl.x-=l,d.bl.y+=c,d.br.x+=c,d.br.y+=l),d},calcOCoords:function(){var e=this._calcRotateMatrix(),t=this._calcTranslateMatrix(),r=this.getViewportTransform(),i=n(r,t),a=n(i,e),o=(a=n(a,[1/r[0],0,0,1/r[3],0,0]),this._calculateCurrentDimensions()),s={};return this.forEachControl((function(e,t,n){s[t]=e.positionHandler(o,a,n)})),s},calcACoords:function(){var e=this._calcRotateMatrix(),t=this._calcTranslateMatrix(),i=n(t,e),a=this._getTransformedDimensions(),o=a.x/2,s=a.y/2;return{tl:r({x:-o,y:-s},i),tr:r({x:o,y:-s},i),bl:r({x:-o,y:s},i),br:r({x:o,y:s},i)}},setCoords:function(e){return this.aCoords=this.calcACoords(),this.lineCoords=this.group?this.aCoords:this.calcLineCoords(),e?this:(this.oCoords=this.calcOCoords(),this._setCornerCoords&&this._setCornerCoords(),this)},_calcRotateMatrix:function(){return e.calcRotateMatrix(this)},_calcTranslateMatrix:function(){var e=this.getCenterPoint();return[1,0,0,1,e.x,e.y]},transformMatrixKey:function(e){var t="";return!e&&this.group&&(t=this.group.transformMatrixKey(e)+"_"),t+this.top+"_"+this.left+"_"+this.scaleX+"_"+this.scaleY+"_"+this.skewX+"_"+this.skewY+"_"+this.angle+"_"+this.originX+"_"+this.originY+"_"+this.width+"_"+this.height+"_"+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(e){var t=this.calcOwnMatrix();if(e||!this.group)return t;var r=this.transformMatrixKey(e),i=this.matrixCache||(this.matrixCache={});return i.key===r?i.value:(this.group&&(t=n(this.group.calcTransformMatrix(!1),t)),i.key=r,i.value=t,t)},calcOwnMatrix:function(){var t=this.transformMatrixKey(!0),n=this.ownMatrixCache||(this.ownMatrixCache={});if(n.key===t)return n.value;var r=this._calcTranslateMatrix(),i={angle:this.angle,translateX:r[4],translateY:r[5],scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY};return n.key=t,n.value=e.composeMatrix(i),n.value},_calcDimensionsTransformMatrix:function(t,n,r){return e.calcDimensionsMatrix({skewX:t,skewY:n,scaleX:this.scaleX*(r&&this.flipX?-1:1),scaleY:this.scaleY*(r&&this.flipY?-1:1)})},_getNonTransformedDimensions:function(){var e=this.strokeWidth;return{x:this.width+e,y:this.height+e}},_getTransformedDimensions:function(t,n){void 0===t&&(t=this.skewX),void 0===n&&(n=this.skewY);var r,i,a,o=0===t&&0===n;if(this.strokeUniform?(i=this.width,a=this.height):(i=(r=this._getNonTransformedDimensions()).x,a=r.y),o)return this._finalizeDimensions(i*this.scaleX,a*this.scaleY);var s=e.sizeAfterTransform(i,a,{scaleX:this.scaleX,scaleY:this.scaleY,skewX:t,skewY:n});return this._finalizeDimensions(s.x,s.y)},_finalizeDimensions:function(e,t){return this.strokeUniform?{x:e+this.strokeWidth,y:t+this.strokeWidth}:{x:e,y:t}},_calculateCurrentDimensions:function(){var e=this.getViewportTransform(),t=this._getTransformedDimensions();return r(t,e,!0).scalarAdd(2*this.padding)}})}(),C.util.object.extend(C.Object.prototype,{sendToBack:function(){return this.group?C.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?C.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(e){return this.group?C.StaticCanvas.prototype.sendBackwards.call(this.group,this,e):this.canvas&&this.canvas.sendBackwards(this,e),this},bringForward:function(e){return this.group?C.StaticCanvas.prototype.bringForward.call(this.group,this,e):this.canvas&&this.canvas.bringForward(this,e),this},moveTo:function(e){return this.group&&"activeSelection"!==this.group.type?C.StaticCanvas.prototype.moveTo.call(this.group,this,e):this.canvas&&this.canvas.moveTo(this,e),this}}),function(){function e(e,t){if(t){if(t.toLive)return e+": url(#SVGID_"+t.id+"); ";var n=new C.Color(t),r=e+": "+n.toRgb()+"; ",i=n.getAlpha();return 1!==i&&(r+=e+"-opacity: "+i.toString()+"; "),r}return e+": none; "}var t=C.util.toFixed;C.util.object.extend(C.Object.prototype,{getSvgStyles:function(t){var n=this.fillRule?this.fillRule:"nonzero",r=this.strokeWidth?this.strokeWidth:"0",i=this.strokeDashArray?this.strokeDashArray.join(" "):"none",a=this.strokeDashOffset?this.strokeDashOffset:"0",o=this.strokeLineCap?this.strokeLineCap:"butt",s=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",c=void 0!==this.opacity?this.opacity:"1",u=this.visible?"":" visibility: hidden;",d=t?"":this.getSvgFilter(),h=e("fill",this.fill);return[e("stroke",this.stroke),"stroke-width: ",r,"; ","stroke-dasharray: ",i,"; ","stroke-linecap: ",o,"; ","stroke-dashoffset: ",a,"; ","stroke-linejoin: ",s,"; ","stroke-miterlimit: ",l,"; ",h,"fill-rule: ",n,"; ","opacity: ",c,";",d,u].join("")},getSvgSpanStyles:function(t,n){var r=t.fontFamily?"font-family: "+(-1===t.fontFamily.indexOf("'")&&-1===t.fontFamily.indexOf('"')?"'"+t.fontFamily+"'":t.fontFamily)+"; ":"",i=t.strokeWidth?"stroke-width: "+t.strokeWidth+"; ":"",a=(r=r,t.fontSize?"font-size: "+t.fontSize+"px; ":""),o=t.fontStyle?"font-style: "+t.fontStyle+"; ":"",s=t.fontWeight?"font-weight: "+t.fontWeight+"; ":"",l=t.fill?e("fill",t.fill):"",c=t.stroke?e("stroke",t.stroke):"",u=this.getSvgTextDecoration(t);return u&&(u="text-decoration: "+u+"; "),[c,i,r,a,o,s,u,l,t.deltaY?"baseline-shift: "+-t.deltaY+"; ":"",n?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(e){return["overline","underline","line-through"].filter((function(t){return e[t.replace("-","")]})).join(" ")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(e,t){var n=e?this.calcTransformMatrix():this.calcOwnMatrix();return'transform="'+C.util.matrixToSVG(n)+(t||"")+'" '},_setSVGBg:function(e){if(this.backgroundColor){var n=C.Object.NUM_FRACTION_DIGITS;e.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',t(-this.width/2,n),'" y="',t(-this.height/2,n),'" width="',t(this.width,n),'" height="',t(this.height,n),'"></rect>\n')}},toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(e),{reviver:e})},toClipPathSVG:function(e){return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(e),{reviver:e})},_createBaseClipPathSVGMarkup:function(e,t){var n=(t=t||{}).reviver,r=t.additionalTransform||"",i=[this.getSvgTransform(!0,r),this.getSvgCommons()].join(""),a=e.indexOf("COMMON_PARTS");return e[a]=i,n?n(e.join("")):e.join("")},_createBaseSVGMarkup:function(e,t){var n,r,i=(t=t||{}).noStyle,a=t.reviver,o=i?"":'style="'+this.getSvgStyles()+'" ',s=t.withShadow?'style="'+this.getSvgFilter()+'" ':"",l=this.clipPath,c=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",u=l&&l.absolutePositioned,d=this.stroke,h=this.fill,f=this.shadow,p=[],m=e.indexOf("COMMON_PARTS"),g=t.additionalTransform;return l&&(l.clipPathId="CLIPPATH_"+C.Object.__uid++,r='<clipPath id="'+l.clipPathId+'" >\n'+l.toClipPathSVG(a)+"</clipPath>\n"),u&&p.push("<g ",s,this.getSvgCommons()," >\n"),p.push("<g ",this.getSvgTransform(!1),u?"":s+this.getSvgCommons()," >\n"),n=[o,c,i?"":this.addPaintOrder()," ",g?'transform="'+g+'" ':""].join(""),e[m]=n,h&&h.toLive&&p.push(h.toSVG(this)),d&&d.toLive&&p.push(d.toSVG(this)),f&&p.push(f.toSVG(this)),l&&p.push(r),p.push(e.join("")),p.push("</g>\n"),u&&p.push("</g>\n"),a?a(p.join("")):p.join("")},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var e=C.util.object.extend;function t(t,n,r){var i={};r.forEach((function(e){i[e]=t[e]})),e(t[n],i,!0)}C.util.object.extend(C.Object.prototype,{hasStateChanged:function(e){var t="_"+(e=e||"stateProperties");return Object.keys(this[t]).length<this[e].length||!function e(t,n,r){if(t===n)return!0;if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var i=0,a=t.length;i<a;i++)if(!e(t[i],n[i]))return!1;return!0}if(t&&"object"==typeof t){var o,s=Object.keys(t);if(!n||"object"!=typeof n||!r&&s.length!==Object.keys(n).length)return!1;for(i=0,a=s.length;i<a;i++)if("canvas"!==(o=s[i])&&"group"!==o&&!e(t[o],n[o]))return!1;return!0}}(this[t],this,!0)},saveState:function(e){var n=e&&e.propertySet||"stateProperties",r="_"+n;return this[r]?(t(this,r,this[n]),e&&e.stateProperties&&t(this,r,e.stateProperties),this):this.setupState(e)},setupState:function(e){var t=(e=e||{}).propertySet||"stateProperties";return e.propertySet=t,this["_"+t]={},this.saveState(e),this}})}(),function(){var e=C.util.degreesToRadians;C.util.object.extend(C.Object.prototype,{_findTargetCorner:function(e,t){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var n,r,i,a=e.x,o=e.y,s=Object.keys(this.oCoords),l=s.length-1;for(this.__corner=0;l>=0;l--)if(i=s[l],this.isControlVisible(i)&&(r=this._getImageLines(t?this.oCoords[i].touchCorner:this.oCoords[i].corner),0!==(n=this._findCrossPoints({x:a,y:o},r))&&n%2==1))return this.__corner=i,i;return!1},forEachControl:function(e){for(var t in this.controls)e(this.controls[t],t,this)},_setCornerCoords:function(){var e=this.oCoords;for(var t in e){var n=this.controls[t];e[t].corner=n.calcCornerCoords(this.angle,this.cornerSize,e[t].x,e[t].y,!1),e[t].touchCorner=n.calcCornerCoords(this.angle,this.touchCornerSize,e[t].x,e[t].y,!0)}},drawSelectionBackground:function(t){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;t.save();var n=this.getCenterPoint(),r=this._calculateCurrentDimensions(),i=this.canvas.viewportTransform;return t.translate(n.x,n.y),t.scale(1/i[0],1/i[3]),t.rotate(e(this.angle)),t.fillStyle=this.selectionBackgroundColor,t.fillRect(-r.x/2,-r.y/2,r.x,r.y),t.restore(),this},drawBorders:function(e,t){t=t||{};var n=this._calculateCurrentDimensions(),r=this.borderScaleFactor,i=n.x+r,a=n.y+r,o=void 0!==t.hasControls?t.hasControls:this.hasControls,s=!1;return e.save(),e.strokeStyle=t.borderColor||this.borderColor,this._setLineDash(e,t.borderDashArray||this.borderDashArray),e.strokeRect(-i/2,-a/2,i,a),o&&(e.beginPath(),this.forEachControl((function(t,n,r){t.withConnection&&t.getVisibility(r,n)&&(s=!0,e.moveTo(t.x*i,t.y*a),e.lineTo(t.x*i+t.offsetX,t.y*a+t.offsetY))})),s&&e.stroke()),e.restore(),this},drawBordersInGroup:function(e,t,n){n=n||{};var r=C.util.sizeAfterTransform(this.width,this.height,t),i=this.strokeWidth,a=this.strokeUniform,o=this.borderScaleFactor,s=r.x+i*(a?this.canvas.getZoom():t.scaleX)+o,l=r.y+i*(a?this.canvas.getZoom():t.scaleY)+o;return e.save(),this._setLineDash(e,n.borderDashArray||this.borderDashArray),e.strokeStyle=n.borderColor||this.borderColor,e.strokeRect(-s/2,-l/2,s,l),e.restore(),this},drawControls:function(e,t){t=t||{},e.save();var n,r,i=this.canvas.getRetinaScaling();return e.setTransform(i,0,0,i,0,0),e.strokeStyle=e.fillStyle=t.cornerColor||this.cornerColor,this.transparentCorners||(e.strokeStyle=t.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(e,t.cornerDashArray||this.cornerDashArray),this.setCoords(),this.group&&(n=this.group.calcTransformMatrix()),this.forEachControl((function(i,a,o){r=o.oCoords[a],i.getVisibility(o,a)&&(n&&(r=C.util.transformPoint(r,n)),i.render(e,r.x,r.y,t,o))})),e.restore(),this},isControlVisible:function(e){return this.controls[e]&&this.controls[e].getVisibility(this,e)},setControlVisible:function(e,t){return this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[e]=t,this},setControlsVisibility:function(e){for(var t in e||(e={}),e)this.setControlVisible(t,e[t]);return this},onDeselect:function(){},onSelect:function(){}})}(),C.util.object.extend(C.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(e,t){var n=function(){},r=(t=t||{}).onComplete||n,i=t.onChange||n,a=this;return C.util.animate({startValue:e.left,endValue:this.getCenter().left,duration:this.FX_DURATION,onChange:function(t){e.set("left",t),a.requestRenderAll(),i()},onComplete:function(){e.setCoords(),r()}}),this},fxCenterObjectV:function(e,t){var n=function(){},r=(t=t||{}).onComplete||n,i=t.onChange||n,a=this;return C.util.animate({startValue:e.top,endValue:this.getCenter().top,duration:this.FX_DURATION,onChange:function(t){e.set("top",t),a.requestRenderAll(),i()},onComplete:function(){e.setCoords(),r()}}),this},fxRemove:function(e,t){var n=function(){},r=(t=t||{}).onComplete||n,i=t.onChange||n,a=this;return C.util.animate({startValue:e.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(t){e.set("opacity",t),a.requestRenderAll(),i()},onComplete:function(){a.remove(e),r()}}),this}}),C.util.object.extend(C.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var e,t,n=[];for(e in arguments[0])n.push(e);for(var r=0,i=n.length;r<i;r++)e=n[r],t=r!==i-1,this._animate(e,arguments[0][e],arguments[1],t)}else this._animate.apply(this,arguments);return this},_animate:function(e,t,n,r){var i,a=this;t=t.toString(),n=n?C.util.object.clone(n):{},~e.indexOf(".")&&(i=e.split("."));var o=a.colorProperties.indexOf(e)>-1||i&&a.colorProperties.indexOf(i[1])>-1,s=i?this.get(i[0])[i[1]]:this.get(e);"from"in n||(n.from=s),o||(t=~t.indexOf("=")?s+parseFloat(t.replace("=","")):parseFloat(t));var l={startValue:n.from,endValue:t,byValue:n.by,easing:n.easing,duration:n.duration,abort:n.abort&&function(e,t,r){return n.abort.call(a,e,t,r)},onChange:function(t,o,s){i?a[i[0]][i[1]]=t:a.set(e,t),r||n.onChange&&n.onChange(t,o,s)},onComplete:function(e,t,i){r||(a.setCoords(),n.onComplete&&n.onComplete(e,t,i))}};return o?C.util.animateColor(l.startValue,l.endValue,l.duration,l):C.util.animate(l)}}),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.util.object.clone,i={x1:1,x2:1,y1:1,y2:1};function a(e,t){var n=e.origin,r=e.axis1,i=e.axis2,a=e.dimension,o=t.nearest,s=t.center,l=t.farthest;return function(){switch(this.get(n)){case o:return Math.min(this.get(r),this.get(i));case s:return Math.min(this.get(r),this.get(i))+.5*this.get(a);case l:return Math.max(this.get(r),this.get(i))}}}t.Line?t.warn("fabric.Line is already defined"):(t.Line=t.util.createClass(t.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:t.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(e,t){e||(e=[0,0,0,0]),this.callSuper("initialize",t),this.set("x1",e[0]),this.set("y1",e[1]),this.set("x2",e[2]),this.set("y2",e[3]),this._setWidthHeight(t)},_setWidthHeight:function(e){e||(e={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in e?e.left:this._getLeftToOriginX(),this.top="top"in e?e.top:this._getTopToOriginY()},_set:function(e,t){return this.callSuper("_set",e,t),void 0!==i[e]&&this._setWidthHeight(),this},_getLeftToOriginX:a({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:a({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(e){e.beginPath();var t=this.calcLinePoints();e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.lineWidth=this.strokeWidth;var n=e.strokeStyle;e.strokeStyle=this.stroke||e.fillStyle,this.stroke&&this._renderStroke(e),e.strokeStyle=n},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(e){return n(this.callSuper("toObject",e),this.calcLinePoints())},_getNonTransformedDimensions:function(){var e=this.callSuper("_getNonTransformedDimensions");return"butt"===this.strokeLineCap&&(0===this.width&&(e.y-=this.strokeWidth),0===this.height&&(e.x-=this.strokeWidth)),e},calcLinePoints:function(){var e=this.x1<=this.x2?-1:1,t=this.y1<=this.y2?-1:1,n=e*this.width*.5,r=t*this.height*.5;return{x1:n,x2:e*this.width*-.5,y1:r,y2:t*this.height*-.5}},_toSVG:function(){var e=this.calcLinePoints();return["<line ","COMMON_PARTS",'x1="',e.x1,'" y1="',e.y1,'" x2="',e.x2,'" y2="',e.y2,'" />\n']}}),t.Line.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),t.Line.fromElement=function(e,r,i){i=i||{};var a=t.parseAttributes(e,t.Line.ATTRIBUTE_NAMES),o=[a.x1||0,a.y1||0,a.x2||0,a.y2||0];r(new t.Line(o,n(a,i)))},t.Line.fromObject=function(e,n){var i=r(e,!0);i.points=[e.x1,e.y1,e.x2,e.y2],t.Object._fromObject("Line",i,(function(e){delete e.points,n&&n(e)}),"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=Math.PI;t.Circle?t.warn("fabric.Circle is already defined."):(t.Circle=t.util.createClass(t.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*n,cacheProperties:t.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(e,t){return this.callSuper("_set",e,t),"radius"===e&&this.setRadius(t),this},toObject:function(e){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(e))},_toSVG:function(){var e,r=(this.endAngle-this.startAngle)%(2*n);if(0===r)e=["<circle ","COMMON_PARTS",'cx="0" cy="0" ','r="',this.radius,'" />\n'];else{var i=t.util.cos(this.startAngle)*this.radius,a=t.util.sin(this.startAngle)*this.radius,o=t.util.cos(this.endAngle)*this.radius,s=t.util.sin(this.endAngle)*this.radius,l=r>n?"1":"0";e=['<path d="M '+i+" "+a," A "+this.radius+" "+this.radius," 0 ",+l+" 1"," "+o+" "+s,'" ',"COMMON_PARTS"," />\n"]}return e},_render:function(e){e.beginPath(),e.arc(0,0,this.radius,this.startAngle,this.endAngle,!1),this._renderPaintInOrder(e)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(e){return this.radius=e,this.set("width",2*e).set("height",2*e)}}),t.Circle.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),t.Circle.fromElement=function(e,n){var r,i=t.parseAttributes(e,t.Circle.ATTRIBUTE_NAMES);if(!("radius"in(r=i)&&r.radius>=0))throw new Error("value of `r` attribute is required and can not be negative");i.left=(i.left||0)-i.radius,i.top=(i.top||0)-i.radius,n(new t.Circle(i))},t.Circle.fromObject=function(e,n){t.Object._fromObject("Circle",e,n)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Triangle?t.warn("fabric.Triangle is already defined"):(t.Triangle=t.util.createClass(t.Object,{type:"triangle",width:100,height:100,_render:function(e){var t=this.width/2,n=this.height/2;e.beginPath(),e.moveTo(-t,n),e.lineTo(0,-n),e.lineTo(t,n),e.closePath(),this._renderPaintInOrder(e)},_toSVG:function(){var e=this.width/2,t=this.height/2;return["<polygon ","COMMON_PARTS",'points="',[-e+" "+t,"0 "+-t,e+" "+t].join(","),'" />']}}),t.Triangle.fromObject=function(e,n){return t.Object._fromObject("Triangle",e,n)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=2*Math.PI;t.Ellipse?t.warn("fabric.Ellipse is already defined."):(t.Ellipse=t.util.createClass(t.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:t.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(e){this.callSuper("initialize",e),this.set("rx",e&&e.rx||0),this.set("ry",e&&e.ry||0)},_set:function(e,t){switch(this.callSuper("_set",e,t),e){case"rx":this.rx=t,this.set("width",2*t);break;case"ry":this.ry=t,this.set("height",2*t)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(e){return this.callSuper("toObject",["rx","ry"].concat(e))},_toSVG:function(){return["<ellipse ","COMMON_PARTS",'cx="0" cy="0" ','rx="',this.rx,'" ry="',this.ry,'" />\n']},_render:function(e){e.beginPath(),e.save(),e.transform(1,0,0,this.ry/this.rx,0,0),e.arc(0,0,this.rx,0,n,!1),e.restore(),this._renderPaintInOrder(e)}}),t.Ellipse.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),t.Ellipse.fromElement=function(e,n){var r=t.parseAttributes(e,t.Ellipse.ATTRIBUTE_NAMES);r.left=(r.left||0)-r.rx,r.top=(r.top||0)-r.ry,n(new t.Ellipse(r))},t.Ellipse.fromObject=function(e,n){t.Object._fromObject("Ellipse",e,n)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend;t.Rect?t.warn("fabric.Rect is already defined"):(t.Rect=t.util.createClass(t.Object,{stateProperties:t.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:t.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(e){this.callSuper("initialize",e),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(e){var t=this.rx?Math.min(this.rx,this.width/2):0,n=this.ry?Math.min(this.ry,this.height/2):0,r=this.width,i=this.height,a=-this.width/2,o=-this.height/2,s=0!==t||0!==n,l=.4477152502;e.beginPath(),e.moveTo(a+t,o),e.lineTo(a+r-t,o),s&&e.bezierCurveTo(a+r-l*t,o,a+r,o+l*n,a+r,o+n),e.lineTo(a+r,o+i-n),s&&e.bezierCurveTo(a+r,o+i-l*n,a+r-l*t,o+i,a+r-t,o+i),e.lineTo(a+t,o+i),s&&e.bezierCurveTo(a+l*t,o+i,a,o+i-l*n,a,o+i-n),e.lineTo(a,o+n),s&&e.bezierCurveTo(a,o+l*n,a+l*t,o,a+t,o),e.closePath(),this._renderPaintInOrder(e)},toObject:function(e){return this.callSuper("toObject",["rx","ry"].concat(e))},_toSVG:function(){return["<rect ","COMMON_PARTS",'x="',-this.width/2,'" y="',-this.height/2,'" rx="',this.rx,'" ry="',this.ry,'" width="',this.width,'" height="',this.height,'" />\n']}}),t.Rect.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),t.Rect.fromElement=function(e,r,i){if(!e)return r(null);i=i||{};var a=t.parseAttributes(e,t.Rect.ATTRIBUTE_NAMES);a.left=a.left||0,a.top=a.top||0,a.height=a.height||0,a.width=a.width||0;var o=new t.Rect(n(i?t.util.object.clone(i):{},a));o.visible=o.visible&&o.width>0&&o.height>0,r(o)},t.Rect.fromObject=function(e,n){return t.Object._fromObject("Rect",e,n)})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.util.array.min,i=t.util.array.max,a=t.util.toFixed;t.Polyline?t.warn("fabric.Polyline is already defined"):(t.Polyline=t.util.createClass(t.Object,{type:"polyline",points:null,cacheProperties:t.Object.prototype.cacheProperties.concat("points"),initialize:function(e,t){t=t||{},this.points=e||[],this.callSuper("initialize",t),this._setPositionDimensions(t)},_setPositionDimensions:function(e){var t,n=this._calcDimensions(e);this.width=n.width,this.height=n.height,e.fromSVG||(t=this.translateToGivenOrigin({x:n.left-this.strokeWidth/2,y:n.top-this.strokeWidth/2},"left","top",this.originX,this.originY)),void 0===e.left&&(this.left=e.fromSVG?n.left:t.x),void 0===e.top&&(this.top=e.fromSVG?n.top:t.y),this.pathOffset={x:n.left+this.width/2,y:n.top+this.height/2}},_calcDimensions:function(){var e=this.points,t=r(e,"x")||0,n=r(e,"y")||0;return{left:t,top:n,width:(i(e,"x")||0)-t,height:(i(e,"y")||0)-n}},toObject:function(e){return n(this.callSuper("toObject",e),{points:this.points.concat()})},_toSVG:function(){for(var e=[],n=this.pathOffset.x,r=this.pathOffset.y,i=t.Object.NUM_FRACTION_DIGITS,o=0,s=this.points.length;o<s;o++)e.push(a(this.points[o].x-n,i),",",a(this.points[o].y-r,i)," ");return["<"+this.type+" ","COMMON_PARTS",'points="',e.join(""),'" />\n']},commonRender:function(e){var t,n=this.points.length,r=this.pathOffset.x,i=this.pathOffset.y;if(!n||isNaN(this.points[n-1].y))return!1;e.beginPath(),e.moveTo(this.points[0].x-r,this.points[0].y-i);for(var a=0;a<n;a++)t=this.points[a],e.lineTo(t.x-r,t.y-i);return!0},_render:function(e){this.commonRender(e)&&this._renderPaintInOrder(e)},complexity:function(){return this.get("points").length}}),t.Polyline.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(),t.Polyline.fromElementGenerator=function(e){return function(r,i,a){if(!r)return i(null);a||(a={});var o=t.parsePointsAttribute(r.getAttribute("points")),s=t.parseAttributes(r,t[e].ATTRIBUTE_NAMES);s.fromSVG=!0,i(new t[e](o,n(s,a)))}},t.Polyline.fromElement=t.Polyline.fromElementGenerator("Polyline"),t.Polyline.fromObject=function(e,n){return t.Object._fromObject("Polyline",e,n,"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Polygon?t.warn("fabric.Polygon is already defined"):(t.Polygon=t.util.createClass(t.Polyline,{type:"polygon",_render:function(e){this.commonRender(e)&&(e.closePath(),this._renderPaintInOrder(e))}}),t.Polygon.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(),t.Polygon.fromElement=t.Polyline.fromElementGenerator("Polygon"),t.Polygon.fromObject=function(e,n){t.Object._fromObject("Polygon",e,n,"points")})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.array.min,r=t.util.array.max,i=t.util.object.extend,a=Object.prototype.toString,o=t.util.toFixed;t.Path?t.warn("fabric.Path is already defined"):(t.Path=t.util.createClass(t.Object,{type:"path",path:null,cacheProperties:t.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:t.Object.prototype.stateProperties.concat("path"),initialize:function(e,n){n=n||{},this.callSuper("initialize",n),e||(e=[]);var r="[object Array]"===a.call(e);this.path=t.util.makePathSimpler(r?e:t.util.parsePath(e)),this.path&&t.Polyline.prototype._setPositionDimensions.call(this,n)},_renderPathCommands:function(e){var t,n=0,r=0,i=0,a=0,o=0,s=0,l=-this.pathOffset.x,c=-this.pathOffset.y;e.beginPath();for(var u=0,d=this.path.length;u<d;++u)switch((t=this.path[u])[0]){case"L":i=t[1],a=t[2],e.lineTo(i+l,a+c);break;case"M":n=i=t[1],r=a=t[2],e.moveTo(i+l,a+c);break;case"C":i=t[5],a=t[6],o=t[3],s=t[4],e.bezierCurveTo(t[1]+l,t[2]+c,o+l,s+c,i+l,a+c);break;case"Q":e.quadraticCurveTo(t[1]+l,t[2]+c,t[3]+l,t[4]+c),i=t[3],a=t[4],o=t[1],s=t[2];break;case"z":case"Z":i=n,a=r,e.closePath()}},_render:function(e){this._renderPathCommands(e),this._renderPaintInOrder(e)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},toObject:function(e){return i(this.callSuper("toObject",e),{path:this.path.map((function(e){return e.slice()}))})},toDatalessObject:function(e){var t=this.toObject(["sourcePath"].concat(e));return t.sourcePath&&delete t.path,t},_toSVG:function(){return["<path ","COMMON_PARTS",'d="',t.util.joinPath(this.path),'" stroke-linecap="round" ',"/>\n"]},_getOffsetTransform:function(){var e=t.Object.NUM_FRACTION_DIGITS;return" translate("+o(-this.pathOffset.x,e)+", "+o(-this.pathOffset.y,e)+")"},toClipPathSVG:function(e){var t=this._getOffsetTransform();return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})},toSVG:function(e){var t=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})},complexity:function(){return this.path.length},_calcDimensions:function(){for(var e,i,a=[],o=[],s=0,l=0,c=0,u=0,d=0,h=this.path.length;d<h;++d){switch((e=this.path[d])[0]){case"L":c=e[1],u=e[2],i=[];break;case"M":s=c=e[1],l=u=e[2],i=[];break;case"C":i=t.util.getBoundsOfCurve(c,u,e[1],e[2],e[3],e[4],e[5],e[6]),c=e[5],u=e[6];break;case"Q":i=t.util.getBoundsOfCurve(c,u,e[1],e[2],e[1],e[2],e[3],e[4]),c=e[3],u=e[4];break;case"z":case"Z":c=s,u=l}i.forEach((function(e){a.push(e.x),o.push(e.y)})),a.push(c),o.push(u)}var f=n(a)||0,p=n(o)||0;return{left:f,top:p,width:(r(a)||0)-f,height:(r(o)||0)-p}}}),t.Path.fromObject=function(e,n){if("string"==typeof e.sourcePath){var r=e.sourcePath;t.loadSVGFromURL(r,(function(t){var r=t[0];r.setOptions(e),n&&n(r)}))}else t.Object._fromObject("Path",e,n,"path")},t.Path.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(["d"]),t.Path.fromElement=function(e,n,r){var a=t.parseAttributes(e,t.Path.ATTRIBUTE_NAMES);a.fromSVG=!0,n(new t.Path(a.d,i(a,r)))})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.array.min,r=t.util.array.max;t.Group||(t.Group=t.util.createClass(t.Object,t.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,cacheProperties:[],useSetOnGroup:!1,initialize:function(e,t,n){t=t||{},this._objects=[],n&&this.callSuper("initialize",t),this._objects=e||[];for(var r=this._objects.length;r--;)this._objects[r].group=this;if(n)this._updateObjectsACoords();else{var i=t&&t.centerPoint;void 0!==t.originX&&(this.originX=t.originX),void 0!==t.originY&&(this.originY=t.originY),i||this._calcBounds(),this._updateObjectsCoords(i),delete t.centerPoint,this.callSuper("initialize",t)}this.setCoords()},_updateObjectsACoords:function(){for(var e=this._objects.length;e--;)this._objects[e].setCoords(!0)},_updateObjectsCoords:function(e){e=e||this.getCenterPoint();for(var t=this._objects.length;t--;)this._updateObjectCoords(this._objects[t],e)},_updateObjectCoords:function(e,t){var n=e.left,r=e.top;e.set({left:n-t.x,top:r-t.y}),e.group=this,e.setCoords(!0)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(e){var n=!!this.group;return this._restoreObjectsState(),t.util.resetObjectTransform(this),e&&(n&&t.util.removeTransformFromObject(e,this.group.calcTransformMatrix()),this._objects.push(e),e.group=this,e._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.dirty=!0,n?this.group.addWithUpdate():this.setCoords(),this},removeWithUpdate:function(e){return this._restoreObjectsState(),t.util.resetObjectTransform(this),this.remove(e),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(e){this.dirty=!0,e.group=this,e._set("canvas",this.canvas)},_onObjectRemoved:function(e){this.dirty=!0,delete e.group},_set:function(e,n){var r=this._objects.length;if(this.useSetOnGroup)for(;r--;)this._objects[r].setOnGroup(e,n);if("canvas"===e)for(;r--;)this._objects[r]._set(e,n);t.Object.prototype._set.call(this,e,n)},toObject:function(e){var n=this.includeDefaultValues,r=this._objects.filter((function(e){return!e.excludeFromExport})).map((function(t){var r=t.includeDefaultValues;t.includeDefaultValues=n;var i=t.toObject(e);return t.includeDefaultValues=r,i})),i=t.Object.prototype.toObject.call(this,e);return i.objects=r,i},toDatalessObject:function(e){var n,r=this.sourcePath;if(r)n=r;else{var i=this.includeDefaultValues;n=this._objects.map((function(t){var n=t.includeDefaultValues;t.includeDefaultValues=i;var r=t.toDatalessObject(e);return t.includeDefaultValues=n,r}))}var a=t.Object.prototype.toDatalessObject.call(this,e);return a.objects=n,a},render:function(e){this._transformDone=!0,this.callSuper("render",e),this._transformDone=!1},shouldCache:function(){var e=t.Object.prototype.shouldCache.call(this);if(e)for(var n=0,r=this._objects.length;n<r;n++)if(this._objects[n].willDrawShadow())return this.ownCaching=!1,!1;return e},willDrawShadow:function(){if(t.Object.prototype.willDrawShadow.call(this))return!0;for(var e=0,n=this._objects.length;e<n;e++)if(this._objects[e].willDrawShadow())return!0;return!1},isOnACache:function(){return this.ownCaching||this.group&&this.group.isOnACache()},drawObject:function(e){for(var t=0,n=this._objects.length;t<n;t++)this._objects[t].render(e);this._drawClipPath(e)},isCacheDirty:function(e){if(this.callSuper("isCacheDirty",e))return!0;if(!this.statefullCache)return!1;for(var t=0,n=this._objects.length;t<n;t++)if(this._objects[t].isCacheDirty(!0)){if(this._cacheCanvas){var r=this.cacheWidth/this.zoomX,i=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-r/2,-i/2,r,i)}return!0}return!1},_restoreObjectsState:function(){var e=this.calcOwnMatrix();return this._objects.forEach((function(n){t.util.addTransformToObject(n,e),delete n.group,n.setCoords()})),this},realizeTransform:function(e,n){return t.util.addTransformToObject(e,n),e},destroy:function(){return this._objects.forEach((function(e){e.set("dirty",!0)})),this._restoreObjectsState()},toActiveSelection:function(){if(this.canvas){var e=this._objects,n=this.canvas;this._objects=[];var r=this.toObject();delete r.objects;var i=new t.ActiveSelection([]);return i.set(r),i.type="activeSelection",n.remove(this),e.forEach((function(e){e.group=i,e.dirty=!0,n.add(e)})),i.canvas=n,i._objects=e,n._activeObject=i,i.setCoords(),i}},ungroupOnCanvas:function(){return this._restoreObjectsState()},setObjectsCoords:function(){return this.forEachObject((function(e){e.setCoords(!0)})),this},_calcBounds:function(e){for(var t,n,r,i,a=[],o=[],s=["tr","br","bl","tl"],l=0,c=this._objects.length,u=s.length;l<c;++l){for(r=(t=this._objects[l]).calcACoords(),i=0;i<u;i++)n=s[i],a.push(r[n].x),o.push(r[n].y);t.aCoords=r}this._getBounds(a,o,e)},_getBounds:function(e,i,a){var o=new t.Point(n(e),n(i)),s=new t.Point(r(e),r(i)),l=o.y||0,c=o.x||0,u=s.x-o.x||0,d=s.y-o.y||0;this.width=u,this.height=d,a||this.setPositionByOrigin({x:c,y:l},"left","top")},_toSVG:function(e){for(var t=["<g ","COMMON_PARTS"," >\n"],n=0,r=this._objects.length;n<r;n++)t.push("\t\t",this._objects[n].toSVG(e));return t.push("</g>\n"),t},getSvgStyles:function(){var e=void 0!==this.opacity&&1!==this.opacity?"opacity: "+this.opacity+";":"",t=this.visible?"":" visibility: hidden;";return[e,this.getSvgFilter(),t].join("")},toClipPathSVG:function(e){for(var t=[],n=0,r=this._objects.length;n<r;n++)t.push("\t",this._objects[n].toClipPathSVG(e));return this._createBaseClipPathSVGMarkup(t,{reviver:e})}}),t.Group.fromObject=function(e,n){var r=e.objects,i=t.util.object.clone(e,!0);delete i.objects,"string"!=typeof r?t.util.enlivenObjects(r,(function(r){t.util.enlivenObjects([e.clipPath],(function(i){var a=t.util.object.clone(e,!0);a.clipPath=i[0],delete a.objects,n&&n(new t.Group(r,a,!0))}))})):t.loadSVGFromURL(r,(function(a){var o=t.util.groupSVGElements(a,e,r);o.set(i),n&&n(o)}))})}(t),function(e){"use strict";var t=e.fabric||(e.fabric={});t.ActiveSelection||(t.ActiveSelection=t.util.createClass(t.Group,{type:"activeSelection",initialize:function(e,n){n=n||{},this._objects=e||[];for(var r=this._objects.length;r--;)this._objects[r].group=this;n.originX&&(this.originX=n.originX),n.originY&&(this.originY=n.originY),this._calcBounds(),this._updateObjectsCoords(),t.Object.prototype.initialize.call(this,n),this.setCoords()},toGroup:function(){var e=this._objects.concat();this._objects=[];var n=t.Object.prototype.toObject.call(this),r=new t.Group([]);if(delete n.type,r.set(n),e.forEach((function(e){e.canvas.remove(e),e.group=r})),r._objects=e,!this.canvas)return r;var i=this.canvas;return i.add(r),i._activeObject=r,r.setCoords(),r},onDeselect:function(){return this.destroy(),!1},toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(e,t,n){e.save(),e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",e,t),void 0===(n=n||{}).hasControls&&(n.hasControls=!1),n.forActiveSelection=!0;for(var r=0,i=this._objects.length;r<i;r++)this._objects[r]._renderControls(e,n);e.restore()}}),t.ActiveSelection.fromObject=function(e,n){t.util.enlivenObjects(e.objects,(function(r){delete e.objects,n&&n(new t.ActiveSelection(r,e,!0))}))})}(t),function(e){"use strict";var t=C.util.object.extend;e.fabric||(e.fabric={}),e.fabric.Image?C.warn("fabric.Image is already defined."):(C.Image=C.util.createClass(C.Object,{type:"image",strokeWidth:0,srcFromAttribute:!1,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:C.Object.prototype.stateProperties.concat("cropX","cropY"),cacheProperties:C.Object.prototype.cacheProperties.concat("cropX","cropY"),cacheKey:"",cropX:0,cropY:0,imageSmoothing:!0,initialize:function(e,t){t||(t={}),this.filters=[],this.cacheKey="texture"+C.Object.__uid++,this.callSuper("initialize",t),this._initElement(e,t)},getElement:function(){return this._element||{}},setElement:function(e,t){return this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._element=e,this._originalElement=e,this._initConfig(t),0!==this.filters.length&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters(),this},removeTexture:function(e){var t=C.filterBackend;t&&t.evictCachesForKey&&t.evictCachesForKey(e)},dispose:function(){this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(function(e){C.util.cleanUpJsdomNode(this[e]),this[e]=void 0}.bind(this))},getCrossOrigin:function(){return this._originalElement&&(this._originalElement.crossOrigin||null)},getOriginalSize:function(){var e=this.getElement();return{width:e.naturalWidth||e.width,height:e.naturalHeight||e.height}},_stroke:function(e){if(this.stroke&&0!==this.strokeWidth){var t=this.width/2,n=this.height/2;e.beginPath(),e.moveTo(-t,-n),e.lineTo(t,-n),e.lineTo(t,n),e.lineTo(-t,n),e.lineTo(-t,-n),e.closePath()}},toObject:function(e){var n=[];this.filters.forEach((function(e){e&&n.push(e.toObject())}));var r=t(this.callSuper("toObject",["cropX","cropY"].concat(e)),{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),filters:n});return this.resizeFilter&&(r.resizeFilter=this.resizeFilter.toObject()),r},hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},_toSVG:function(){var e,t=[],n=[],r=this._element,i=-this.width/2,a=-this.height/2,o="",s="";if(!r)return[];if(this.hasCrop()){var l=C.Object.__uid++;t.push('<clipPath id="imageCrop_'+l+'">\n','\t<rect x="'+i+'" y="'+a+'" width="'+this.width+'" height="'+this.height+'" />\n',"</clipPath>\n"),o=' clip-path="url(#imageCrop_'+l+')" '}if(this.imageSmoothing||(s='" image-rendering="optimizeSpeed'),n.push("\t<image ","COMMON_PARTS",'xlink:href="',this.getSvgSrc(!0),'" x="',i-this.cropX,'" y="',a-this.cropY,'" width="',r.width||r.naturalWidth,'" height="',r.height||r.height,s,'"',o,"></image>\n"),this.stroke||this.strokeDashArray){var c=this.fill;this.fill=null,e=["\t<rect ",'x="',i,'" y="',a,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'],this.fill=c}return t="fill"!==this.paintFirst?t.concat(e,n):t.concat(n,e)},getSrc:function(e){var t=e?this._element:this._originalElement;return t?t.toDataURL?t.toDataURL():this.srcFromAttribute?t.getAttribute("src"):t.src:this.src||""},setSrc:function(e,t,n){return C.util.loadImage(e,(function(e,r){this.setElement(e,n),this._setWidthHeight(),t&&t(this,r)}),this,n&&n.crossOrigin),this},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var e=this.resizeFilter,t=this.minimumScaleTrigger,n=this.getTotalObjectScaling(),r=n.scaleX,i=n.scaleY,a=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!e||r>t&&i>t)return this._element=a,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=r,void(this._lastScaleY=i);C.filterBackend||(C.filterBackend=C.initFilterBackend());var o=C.util.createCanvasElement(),s=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=a.width,c=a.height;o.width=l,o.height=c,this._element=o,this._lastScaleX=e.scaleX=r,this._lastScaleY=e.scaleY=i,C.filterBackend.applyFilters([e],a,l,c,this._element,s),this._filterScalingX=o.width/this._originalElement.width,this._filterScalingY=o.height/this._originalElement.height},applyFilters:function(e){if(e=(e=e||this.filters||[]).filter((function(e){return e&&!e.isNeutralState()})),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),0===e.length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var t=this._originalElement,n=t.naturalWidth||t.width,r=t.naturalHeight||t.height;if(this._element===this._originalElement){var i=C.util.createCanvasElement();i.width=n,i.height=r,this._element=i,this._filteredEl=i}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,n,r),this._lastScaleX=1,this._lastScaleY=1;return C.filterBackend||(C.filterBackend=C.initFilterBackend()),C.filterBackend.applyFilters(e,this._originalElement,n,r,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(e){C.util.setImageSmoothing(e,this.imageSmoothing),!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(e),this._renderPaintInOrder(e)},drawCacheOnCanvas:function(e){C.util.setImageSmoothing(e,this.imageSmoothing),C.Object.prototype.drawCacheOnCanvas.call(this,e)},shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(e){var t=this._element;if(t){var n=this._filterScalingX,r=this._filterScalingY,i=this.width,a=this.height,o=Math.min,s=Math.max,l=s(this.cropX,0),c=s(this.cropY,0),u=t.naturalWidth||t.width,d=t.naturalHeight||t.height,h=l*n,f=c*r,p=o(i*n,u-h),m=o(a*r,d-f),g=-i/2,v=-a/2,b=o(i,u/n-l),y=o(a,d/r-c);t&&e.drawImage(t,h,f,p,m,g,v,b,y)}},_needsResize:function(){var e=this.getTotalObjectScaling();return e.scaleX!==this._lastScaleX||e.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(e,t){this.setElement(C.util.getById(e),t),C.util.addClass(this.getElement(),C.Image.CSS_CANVAS)},_initConfig:function(e){e||(e={}),this.setOptions(e),this._setWidthHeight(e)},_initFilters:function(e,t){e&&e.length?C.util.enlivenObjects(e,(function(e){t&&t(e)}),"fabric.Image.filters"):t&&t()},_setWidthHeight:function(e){e||(e={});var t=this.getElement();this.width=e.width||t.naturalWidth||t.width||0,this.height=e.height||t.naturalHeight||t.height||0},parsePreserveAspectRatioAttribute:function(){var e,t=C.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),n=this._element.width,r=this._element.height,i=1,a=1,o=0,s=0,l=0,c=0,u=this.width,d=this.height,h={width:u,height:d};return!t||"none"===t.alignX&&"none"===t.alignY?(i=u/n,a=d/r):("meet"===t.meetOrSlice&&(e=(u-n*(i=a=C.util.findScaleToFit(this._element,h)))/2,"Min"===t.alignX&&(o=-e),"Max"===t.alignX&&(o=e),e=(d-r*a)/2,"Min"===t.alignY&&(s=-e),"Max"===t.alignY&&(s=e)),"slice"===t.meetOrSlice&&(e=n-u/(i=a=C.util.findScaleToCover(this._element,h)),"Mid"===t.alignX&&(l=e/2),"Max"===t.alignX&&(l=e),e=r-d/a,"Mid"===t.alignY&&(c=e/2),"Max"===t.alignY&&(c=e),n=u/i,r=d/a)),{width:n,height:r,scaleX:i,scaleY:a,offsetLeft:o,offsetTop:s,cropX:l,cropY:c}}}),C.Image.CSS_CANVAS="canvas-img",C.Image.prototype.getSvgSrc=C.Image.prototype.getSrc,C.Image.fromObject=function(e,t){var n=C.util.object.clone(e);C.util.loadImage(n.src,(function(e,r){r?t&&t(null,!0):C.Image.prototype._initFilters.call(n,n.filters,(function(r){n.filters=r||[],C.Image.prototype._initFilters.call(n,[n.resizeFilter],(function(r){n.resizeFilter=r[0],C.util.enlivenObjects([n.clipPath],(function(r){n.clipPath=r[0];var i=new C.Image(e,n);t(i,!1)}))}))}))}),null,n.crossOrigin)},C.Image.fromURL=function(e,t,n){C.util.loadImage(e,(function(e,r){t&&t(new C.Image(e,n),r)}),null,n&&n.crossOrigin)},C.Image.ATTRIBUTE_NAMES=C.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin image-rendering".split(" ")),C.Image.fromElement=function(e,n,r){var i=C.parseAttributes(e,C.Image.ATTRIBUTE_NAMES);C.Image.fromURL(i["xlink:href"],n,t(r?C.util.object.clone(r):{},i))})}(t),C.util.object.extend(C.Object.prototype,{_getAngleValueForStraighten:function(){var e=this.angle%360;return e>0?90*Math.round((e-1)/90):90*Math.round(e/90)},straighten:function(){return this.rotate(this._getAngleValueForStraighten()),this},fxStraighten:function(e){var t=function(){},n=(e=e||{}).onComplete||t,r=e.onChange||t,i=this;return C.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(e){i.rotate(e),r()},onComplete:function(){i.setCoords(),n()}}),this}}),C.util.object.extend(C.StaticCanvas.prototype,{straightenObject:function(e){return e.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(e){return e.fxStraighten({onChange:this.requestRenderAllBound}),this}}),function(){"use strict";function e(e,t){var n="precision "+t+" float;\nvoid main(){}",r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(r,n),e.compileShader(r),!!e.getShaderParameter(r,e.COMPILE_STATUS)}function t(e){e&&e.tileSize&&(this.tileSize=e.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}C.isWebglSupported=function(t){if(C.isLikelyNode)return!1;t=t||C.WebglFilterBackend.prototype.tileSize;var n=document.createElement("canvas"),r=n.getContext("webgl")||n.getContext("experimental-webgl"),i=!1;if(r){C.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),i=C.maxTextureSize>=t;for(var a=["highp","mediump","lowp"],o=0;o<3;o++)if(e(r,a[o])){C.webGlPrecision=a[o];break}}return this.isSupported=i,i},C.WebglFilterBackend=t,t.prototype={tileSize:2048,resources:{},setupGLContext:function(e,t){this.dispose(),this.createWebGLCanvas(e,t),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(e,t)},chooseFastestCopyGLTo2DMethod:function(e,t){var n,r=void 0!==window.performance;try{new ImageData(1,1),n=!0}catch(e){n=!1}var i="undefined"!=typeof ArrayBuffer,a="undefined"!=typeof Uint8ClampedArray;if(r&&n&&i&&a){var o=C.util.createCanvasElement(),s=new ArrayBuffer(e*t*4);if(C.forceGLPutImageData)return this.imageBuffer=s,void(this.copyGLTo2D=x);var l,c,u={imageBuffer:s,destinationWidth:e,destinationHeight:t,targetCanvas:o};o.width=e,o.height=t,l=window.performance.now(),k.call(u,this.gl,u),c=window.performance.now()-l,l=window.performance.now(),x.call(u,this.gl,u),c>window.performance.now()-l?(this.imageBuffer=s,this.copyGLTo2D=x):this.copyGLTo2D=k}},createWebGLCanvas:function(e,t){var n=C.util.createCanvasElement();n.width=e,n.height=t;var r={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},i=n.getContext("webgl",r);i||(i=n.getContext("experimental-webgl",r)),i&&(i.clearColor(0,0,0,0),this.canvas=n,this.gl=i)},applyFilters:function(e,t,n,r,i,a){var o,s=this.gl;a&&(o=this.getCachedTexture(a,t));var l={originalWidth:t.width||t.originalWidth,originalHeight:t.height||t.originalHeight,sourceWidth:n,sourceHeight:r,destinationWidth:n,destinationHeight:r,context:s,sourceTexture:this.createTexture(s,n,r,!o&&t),targetTexture:this.createTexture(s,n,r),originalTexture:o||this.createTexture(s,n,r,!o&&t),passes:e.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:i},c=s.createFramebuffer();return s.bindFramebuffer(s.FRAMEBUFFER,c),e.forEach((function(e){e&&e.applyTo(l)})),function(e){var t=e.targetCanvas,n=t.width,r=t.height,i=e.destinationWidth,a=e.destinationHeight;n===i&&r===a||(t.width=i,t.height=a)}(l),this.copyGLTo2D(s,l),s.bindTexture(s.TEXTURE_2D,null),s.deleteTexture(l.sourceTexture),s.deleteTexture(l.targetTexture),s.deleteFramebuffer(c),i.getContext("2d").setTransform(1,0,0,1,0,0),l},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(e,t,n,r){var i=e.createTexture();return e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),r?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,r):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,n,0,e.RGBA,e.UNSIGNED_BYTE,null),i},getCachedTexture:function(e,t){if(this.textureCache[e])return this.textureCache[e];var n=this.createTexture(this.gl,t.width,t.height,t);return this.textureCache[e]=n,n},evictCachesForKey:function(e){this.textureCache[e]&&(this.gl.deleteTexture(this.textureCache[e]),delete this.textureCache[e])},copyGLTo2D:k,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var e=this.gl,t={renderer:"",vendor:""};if(!e)return t;var n=e.getExtension("WEBGL_debug_renderer_info");if(n){var r=e.getParameter(n.UNMASKED_RENDERER_WEBGL),i=e.getParameter(n.UNMASKED_VENDOR_WEBGL);r&&(t.renderer=r.toLowerCase()),i&&(t.vendor=i.toLowerCase())}return this.gpuInfo=t,t}}}(),function(){"use strict";var e=function(){};function t(){}C.Canvas2dFilterBackend=t,t.prototype={evictCachesForKey:e,dispose:e,clearWebGLCaches:e,resources:{},applyFilters:function(e,t,n,r,i){var a=i.getContext("2d");a.drawImage(t,0,0,n,r);var o={sourceWidth:n,sourceHeight:r,imageData:a.getImageData(0,0,n,r),originalEl:t,originalImageData:a.getImageData(0,0,n,r),canvasEl:i,ctx:a,filterBackend:this};return e.forEach((function(e){e.applyTo(o)})),o.imageData.width===n&&o.imageData.height===r||(i.width=o.imageData.width,i.height=o.imageData.height),a.putImageData(o.imageData,0,0),o}}}(),C.Image=C.Image||{},C.Image.filters=C.Image.filters||{},C.Image.filters.BaseFilter=C.util.createClass({type:"BaseFilter",vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aPosition;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",initialize:function(e){e&&this.setOptions(e)},setOptions:function(e){for(var t in e)this[t]=e[t]},createProgram:function(e,t,n){t=t||this.fragmentSource,n=n||this.vertexSource,"highp"!==C.webGlPrecision&&(t=t.replace(/precision highp float/g,"precision "+C.webGlPrecision+" float"));var r=e.createShader(e.VERTEX_SHADER);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+e.getShaderInfoLog(r));var i=e.createShader(e.FRAGMENT_SHADER);if(e.shaderSource(i,t),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+e.getShaderInfoLog(i));var a=e.createProgram();if(e.attachShader(a,r),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+e.getProgramInfoLog(a));var o=this.getAttributeLocations(e,a),s=this.getUniformLocations(e,a)||{};return s.uStepW=e.getUniformLocation(a,"uStepW"),s.uStepH=e.getUniformLocation(a,"uStepH"),{program:a,attributeLocations:o,uniformLocations:s}},getAttributeLocations:function(e,t){return{aPosition:e.getAttribLocation(t,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(e,t,n){var r=t.aPosition,i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0),e.bufferData(e.ARRAY_BUFFER,n,e.STATIC_DRAW)},_setupFrameBuffer:function(e){var t,n,r=e.context;e.passes>1?(t=e.destinationWidth,n=e.destinationHeight,e.sourceWidth===t&&e.sourceHeight===n||(r.deleteTexture(e.targetTexture),e.targetTexture=e.filterBackend.createTexture(r,t,n)),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.targetTexture,0)):(r.bindFramebuffer(r.FRAMEBUFFER,null),r.finish())},_swapTextures:function(e){e.passes--,e.pass++;var t=e.targetTexture;e.targetTexture=e.sourceTexture,e.sourceTexture=t},isNeutralState:function(){var e=this.mainParameter,t=C.Image.filters[this.type].prototype;if(e){if(Array.isArray(t[e])){for(var n=t[e].length;n--;)if(this[e][n]!==t[e][n])return!1;return!0}return t[e]===this[e]}return!1},applyTo:function(e){e.webgl?(this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)},retrieveShader:function(e){return e.programCache.hasOwnProperty(this.type)||(e.programCache[this.type]=this.createProgram(e.context)),e.programCache[this.type]},applyToWebGL:function(e){var t=e.context,n=this.retrieveShader(e);0===e.pass&&e.originalTexture?t.bindTexture(t.TEXTURE_2D,e.originalTexture):t.bindTexture(t.TEXTURE_2D,e.sourceTexture),t.useProgram(n.program),this.sendAttributeData(t,n.attributeLocations,e.aPosition),t.uniform1f(n.uniformLocations.uStepW,1/e.sourceWidth),t.uniform1f(n.uniformLocations.uStepH,1/e.sourceHeight),this.sendUniformData(t,n.uniformLocations),t.viewport(0,0,e.destinationWidth,e.destinationHeight),t.drawArrays(t.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(e,t,n){e.activeTexture(n),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE0)},unbindAdditionalTexture:function(e,t){e.activeTexture(t),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(e){this[this.mainParameter]=e},sendUniformData:function(){},createHelpLayer:function(e){if(!e.helpLayer){var t=document.createElement("canvas");t.width=e.sourceWidth,t.height=e.sourceHeight,e.helpLayer=t}},toObject:function(){var e={type:this.type},t=this.mainParameter;return t&&(e[t]=this[t]),e},toJSON:function(){return this.toObject()}}),C.Image.filters.BaseFilter.fromObject=function(e,t){var n=new C.Image.filters[e.type](e);return t&&t(n),n},function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.ColorMatrix=r(n.BaseFilter,{type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(e){this.callSuper("initialize",e),this.matrix=this.matrix.slice(0)},applyTo2d:function(e){var t,n,r,i,a,o=e.imageData.data,s=o.length,l=this.matrix,c=this.colorsOnly;for(a=0;a<s;a+=4)t=o[a],n=o[a+1],r=o[a+2],c?(o[a]=t*l[0]+n*l[1]+r*l[2]+255*l[4],o[a+1]=t*l[5]+n*l[6]+r*l[7]+255*l[9],o[a+2]=t*l[10]+n*l[11]+r*l[12]+255*l[14]):(i=o[a+3],o[a]=t*l[0]+n*l[1]+r*l[2]+i*l[3]+255*l[4],o[a+1]=t*l[5]+n*l[6]+r*l[7]+i*l[8]+255*l[9],o[a+2]=t*l[10]+n*l[11]+r*l[12]+i*l[13]+255*l[14],o[a+3]=t*l[15]+n*l[16]+r*l[17]+i*l[18]+255*l[19])},getUniformLocations:function(e,t){return{uColorMatrix:e.getUniformLocation(t,"uColorMatrix"),uConstants:e.getUniformLocation(t,"uConstants")}},sendUniformData:function(e,t){var n=this.matrix,r=[n[0],n[1],n[2],n[3],n[5],n[6],n[7],n[8],n[10],n[11],n[12],n[13],n[15],n[16],n[17],n[18]],i=[n[4],n[9],n[14],n[19]];e.uniformMatrix4fv(t.uColorMatrix,!1,r),e.uniform4fv(t.uConstants,i)}}),t.Image.filters.ColorMatrix.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Brightness=r(n.BaseFilter,{type:"Brightness",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBrightness;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += uBrightness;\ngl_FragColor = color;\n}",brightness:0,mainParameter:"brightness",applyTo2d:function(e){if(0!==this.brightness){var t,n=e.imageData.data,r=n.length,i=Math.round(255*this.brightness);for(t=0;t<r;t+=4)n[t]=n[t]+i,n[t+1]=n[t+1]+i,n[t+2]=n[t+2]+i}},getUniformLocations:function(e,t){return{uBrightness:e.getUniformLocation(t,"uBrightness")}},sendUniformData:function(e,t){e.uniform1f(t.uBrightness,this.brightness)}}),t.Image.filters.Brightness.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.Image.filters,i=t.util.createClass;r.Convolute=i(r.BaseFilter,{type:"Convolute",opaque:!1,matrix:[0,0,0,0,1,0,0,0,0],fragmentSource:{Convolute_3_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_3_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_5_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_5_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_7_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_7_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_9_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_9_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}"},retrieveShader:function(e){var t=Math.sqrt(this.matrix.length),n=this.type+"_"+t+"_"+(this.opaque?1:0),r=this.fragmentSource[n];return e.programCache.hasOwnProperty(n)||(e.programCache[n]=this.createProgram(e.context,r)),e.programCache[n]},applyTo2d:function(e){var t,n,r,i,a,o,s,l,c,u,d,h,f,p=e.imageData,m=p.data,g=this.matrix,v=Math.round(Math.sqrt(g.length)),b=Math.floor(v/2),y=p.width,A=p.height,_=e.ctx.createImageData(y,A),w=_.data,E=this.opaque?1:0;for(d=0;d<A;d++)for(u=0;u<y;u++){for(a=4*(d*y+u),t=0,n=0,r=0,i=0,f=0;f<v;f++)for(h=0;h<v;h++)o=u+h-b,(s=d+f-b)<0||s>=A||o<0||o>=y||(l=4*(s*y+o),c=g[f*v+h],t+=m[l]*c,n+=m[l+1]*c,r+=m[l+2]*c,E||(i+=m[l+3]*c));w[a]=t,w[a+1]=n,w[a+2]=r,w[a+3]=E?m[a+3]:i}e.imageData=_},getUniformLocations:function(e,t){return{uMatrix:e.getUniformLocation(t,"uMatrix"),uOpaque:e.getUniformLocation(t,"uOpaque"),uHalfSize:e.getUniformLocation(t,"uHalfSize"),uSize:e.getUniformLocation(t,"uSize")}},sendUniformData:function(e,t){e.uniform1fv(t.uMatrix,this.matrix)},toObject:function(){return n(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),t.Image.filters.Convolute.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Grayscale=r(n.BaseFilter,{type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},mode:"average",mainParameter:"mode",applyTo2d:function(e){var t,n,r=e.imageData.data,i=r.length,a=this.mode;for(t=0;t<i;t+=4)"average"===a?n=(r[t]+r[t+1]+r[t+2])/3:"lightness"===a?n=(Math.min(r[t],r[t+1],r[t+2])+Math.max(r[t],r[t+1],r[t+2]))/2:"luminosity"===a&&(n=.21*r[t]+.72*r[t+1]+.07*r[t+2]),r[t]=n,r[t+1]=n,r[t+2]=n},retrieveShader:function(e){var t=this.type+"_"+this.mode;if(!e.programCache.hasOwnProperty(t)){var n=this.fragmentSource[this.mode];e.programCache[t]=this.createProgram(e.context,n)}return e.programCache[t]},getUniformLocations:function(e,t){return{uMode:e.getUniformLocation(t,"uMode")}},sendUniformData:function(e,t){e.uniform1i(t.uMode,1)},isNeutralState:function(){return!1}}),t.Image.filters.Grayscale.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Invert=r(n.BaseFilter,{type:"Invert",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uInvert;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nif (uInvert == 1) {\ngl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a);\n} else {\ngl_FragColor = color;\n}\n}",invert:!0,mainParameter:"invert",applyTo2d:function(e){var t,n=e.imageData.data,r=n.length;for(t=0;t<r;t+=4)n[t]=255-n[t],n[t+1]=255-n[t+1],n[t+2]=255-n[t+2]},isNeutralState:function(){return!this.invert},getUniformLocations:function(e,t){return{uInvert:e.getUniformLocation(t,"uInvert")}},sendUniformData:function(e,t){e.uniform1i(t.uInvert,this.invert)}}),t.Image.filters.Invert.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.Image.filters,i=t.util.createClass;r.Noise=i(r.BaseFilter,{type:"Noise",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uStepH;\nuniform float uNoise;\nuniform float uSeed;\nvarying vec2 vTexCoord;\nfloat rand(vec2 co, float seed, float vScale) {\nreturn fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0);\n}\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;\ngl_FragColor = color;\n}",mainParameter:"noise",noise:0,applyTo2d:function(e){if(0!==this.noise){var t,n,r=e.imageData.data,i=r.length,a=this.noise;for(t=0,i=r.length;t<i;t+=4)n=(.5-Math.random())*a,r[t]+=n,r[t+1]+=n,r[t+2]+=n}},getUniformLocations:function(e,t){return{uNoise:e.getUniformLocation(t,"uNoise"),uSeed:e.getUniformLocation(t,"uSeed")}},sendUniformData:function(e,t){e.uniform1f(t.uNoise,this.noise/255),e.uniform1f(t.uSeed,Math.random())},toObject:function(){return n(this.callSuper("toObject"),{noise:this.noise})}}),t.Image.filters.Noise.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Pixelate=r(n.BaseFilter,{type:"Pixelate",blocksize:4,mainParameter:"blocksize",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBlocksize;\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nfloat blockW = uBlocksize * uStepW;\nfloat blockH = uBlocksize * uStepW;\nint posX = int(vTexCoord.x / blockW);\nint posY = int(vTexCoord.y / blockH);\nfloat fposX = float(posX);\nfloat fposY = float(posY);\nvec2 squareCoords = vec2(fposX * blockW, fposY * blockH);\nvec4 color = texture2D(uTexture, squareCoords);\ngl_FragColor = color;\n}",applyTo2d:function(e){var t,n,r,i,a,o,s,l,c,u,d,h=e.imageData,f=h.data,p=h.height,m=h.width;for(n=0;n<p;n+=this.blocksize)for(r=0;r<m;r+=this.blocksize)for(i=f[t=4*n*m+4*r],a=f[t+1],o=f[t+2],s=f[t+3],u=Math.min(n+this.blocksize,p),d=Math.min(r+this.blocksize,m),l=n;l<u;l++)for(c=r;c<d;c++)f[t=4*l*m+4*c]=i,f[t+1]=a,f[t+2]=o,f[t+3]=s},isNeutralState:function(){return 1===this.blocksize},getUniformLocations:function(e,t){return{uBlocksize:e.getUniformLocation(t,"uBlocksize"),uStepW:e.getUniformLocation(t,"uStepW"),uStepH:e.getUniformLocation(t,"uStepH")}},sendUniformData:function(e,t){e.uniform1f(t.uBlocksize,this.blocksize)}}),t.Image.filters.Pixelate.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.extend,r=t.Image.filters,i=t.util.createClass;r.RemoveColor=i(r.BaseFilter,{type:"RemoveColor",color:"#FFFFFF",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uLow;\nuniform vec4 uHigh;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\nif(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) {\ngl_FragColor.a = 0.0;\n}\n}",distance:.02,useAlpha:!1,applyTo2d:function(e){var n,r,i,a,o=e.imageData.data,s=255*this.distance,l=new t.Color(this.color).getSource(),c=[l[0]-s,l[1]-s,l[2]-s],u=[l[0]+s,l[1]+s,l[2]+s];for(n=0;n<o.length;n+=4)r=o[n],i=o[n+1],a=o[n+2],r>c[0]&&i>c[1]&&a>c[2]&&r<u[0]&&i<u[1]&&a<u[2]&&(o[n+3]=0)},getUniformLocations:function(e,t){return{uLow:e.getUniformLocation(t,"uLow"),uHigh:e.getUniformLocation(t,"uHigh")}},sendUniformData:function(e,n){var r=new t.Color(this.color).getSource(),i=parseFloat(this.distance),a=[0+r[0]/255-i,0+r[1]/255-i,0+r[2]/255-i,1],o=[r[0]/255+i,r[1]/255+i,r[2]/255+i,1];e.uniform4fv(n.uLow,a),e.uniform4fv(n.uHigh,o)},toObject:function(){return n(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),t.Image.filters.RemoveColor.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass,i={Brownie:[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0],Vintage:[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0],Kodachrome:[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0],Technicolor:[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0],Polaroid:[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],Sepia:[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0],BlackWhite:[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]};for(var a in i)n[a]=r(n.ColorMatrix,{type:a,matrix:i[a],mainParameter:!1,colorsOnly:!0}),t.Image.filters[a].fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric,n=t.Image.filters,r=t.util.createClass;n.BlendColor=r(n.BaseFilter,{type:"BlendColor",color:"#F95C63",mode:"multiply",alpha:1,fragmentSource:{multiply:"gl_FragColor.rgb *= uColor.rgb;\n",screen:"gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);\n",add:"gl_FragColor.rgb += uColor.rgb;\n",diff:"gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);\n",subtract:"gl_FragColor.rgb -= uColor.rgb;\n",lighten:"gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);\n",darken:"gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);\n",exclusion:"gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);\n",overlay:"if (uColor.r < 0.5) {\ngl_FragColor.r *= 2.0 * uColor.r;\n} else {\ngl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r);\n}\nif (uColor.g < 0.5) {\ngl_FragColor.g *= 2.0 * uColor.g;\n} else {\ngl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g);\n}\nif (uColor.b < 0.5) {\ngl_FragColor.b *= 2.0 * uColor.b;\n} else {\ngl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b);\n}\n",tint:"gl_FragColor.rgb *= (1.0 - uColor.a);\ngl_FragColor.rgb += uColor.rgb;\n"},buildSource:function(e){return"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ngl_FragColor = color;\nif (color.a > 0.0) {\n"+this.fragmentSource[e]+"}\n}"},retrieveShader:function(e){var t,n=this.type+"_"+this.mode;return e.programCache.hasOwnProperty(n)||(t=this.buildSource(this.mode),e.programCache[n]=this.createProgram(e.context,t)),e.programCache[n]},applyTo2d:function(e){var n,r,i,a,o,s,l,c=e.imageData.data,u=c.length,d=1-this.alpha;n=(l=new t.Color(this.color).getSource())[0]*this.alpha,r=l[1]*this.alpha,i=l[2]*this.alpha;for(var h=0;h<u;h+=4)switch(a=c[h],o=c[h+1],s=c[h+2],this.mode){case"multiply":c[h]=a*n/255,c[h+1]=o*r/255,c[h+2]=s*i/255;break;case"screen":c[h]=255-(255-a)*(255-n)/255,c[h+1]=255-(255-o)*(255-r)/255,c[h+2]=255-(255-s)*(255-i)/255;break;case"add":c[h]=a+n,c[h+1]=o+r,c[h+2]=s+i;break;case"diff":case"difference":c[h]=Math.abs(a-n),c[h+1]=Math.abs(o-r),c[h+2]=Math.abs(s-i);break;case"subtract":c[h]=a-n,c[h+1]=o-r,c[h+2]=s-i;break;case"darken":c[h]=Math.min(a,n),c[h+1]=Math.min(o,r),c[h+2]=Math.min(s,i);break;case"lighten":c[h]=Math.max(a,n),c[h+1]=Math.max(o,r),c[h+2]=Math.max(s,i);break;case"overlay":c[h]=n<128?2*a*n/255:255-2*(255-a)*(255-n)/255,c[h+1]=r<128?2*o*r/255:255-2*(255-o)*(255-r)/255,c[h+2]=i<128?2*s*i/255:255-2*(255-s)*(255-i)/255;break;case"exclusion":c[h]=n+a-2*n*a/255,c[h+1]=r+o-2*r*o/255,c[h+2]=i+s-2*i*s/255;break;case"tint":c[h]=n+a*d,c[h+1]=r+o*d,c[h+2]=i+s*d}},getUniformLocations:function(e,t){return{uColor:e.getUniformLocation(t,"uColor")}},sendUniformData:function(e,n){var r=new t.Color(this.color).getSource();r[0]=this.alpha*r[0]/255,r[1]=this.alpha*r[1]/255,r[2]=this.alpha*r[2]/255,r[3]=this.alpha,e.uniform4fv(n.uColor,r)},toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),t.Image.filters.BlendColor.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric,n=t.Image.filters,r=t.util.createClass;n.BlendImage=r(n.BaseFilter,{type:"BlendImage",image:null,mode:"multiply",alpha:1,vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nuniform mat3 uTransformMatrix;\nvoid main() {\nvTexCoord = aPosition;\nvTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:{multiply:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.rgba *= color2.rgba;\ngl_FragColor = color;\n}",mask:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.a = color2.a;\ngl_FragColor = color;\n}"},retrieveShader:function(e){var t=this.type+"_"+this.mode,n=this.fragmentSource[this.mode];return e.programCache.hasOwnProperty(t)||(e.programCache[t]=this.createProgram(e.context,n)),e.programCache[t]},applyToWebGL:function(e){var t=e.context,n=this.createTexture(e.filterBackend,this.image);this.bindAdditionalTexture(t,n,t.TEXTURE1),this.callSuper("applyToWebGL",e),this.unbindAdditionalTexture(t,t.TEXTURE1)},createTexture:function(e,t){return e.getCachedTexture(t.cacheKey,t._element)},calculateMatrix:function(){var e=this.image,t=e._element.width,n=e._element.height;return[1/e.scaleX,0,0,0,1/e.scaleY,0,-e.left/t,-e.top/n,1]},applyTo2d:function(e){var n,r,i,a,o,s,l,c,u,d,h,f=e.imageData,p=e.filterBackend.resources,m=f.data,g=m.length,v=f.width,b=f.height,y=this.image;p.blendImage||(p.blendImage=t.util.createCanvasElement()),d=(u=p.blendImage).getContext("2d"),u.width!==v||u.height!==b?(u.width=v,u.height=b):d.clearRect(0,0,v,b),d.setTransform(y.scaleX,0,0,y.scaleY,y.left,y.top),d.drawImage(y._element,0,0,v,b),h=d.getImageData(0,0,v,b).data;for(var A=0;A<g;A+=4)switch(o=m[A],s=m[A+1],l=m[A+2],c=m[A+3],n=h[A],r=h[A+1],i=h[A+2],a=h[A+3],this.mode){case"multiply":m[A]=o*n/255,m[A+1]=s*r/255,m[A+2]=l*i/255,m[A+3]=c*a/255;break;case"mask":m[A+3]=a}},getUniformLocations:function(e,t){return{uTransformMatrix:e.getUniformLocation(t,"uTransformMatrix"),uImage:e.getUniformLocation(t,"uImage")}},sendUniformData:function(e,t){var n=this.calculateMatrix();e.uniform1i(t.uImage,1),e.uniformMatrix3fv(t.uTransformMatrix,!1,n)},toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),t.Image.filters.BlendImage.fromObject=function(e,n){t.Image.fromObject(e.image,(function(r){var i=t.util.object.clone(e);i.image=r,n(new t.Image.filters.BlendImage(i))}))}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=Math.pow,r=Math.floor,i=Math.sqrt,a=Math.abs,o=Math.round,s=Math.sin,l=Math.ceil,c=t.Image.filters,u=t.util.createClass;c.Resize=u(c.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3,getUniformLocations:function(e,t){return{uDelta:e.getUniformLocation(t,"uDelta"),uTaps:e.getUniformLocation(t,"uTaps")}},sendUniformData:function(e,t){e.uniform2fv(t.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),e.uniform1fv(t.uTaps,this.taps)},retrieveShader:function(e){var t=this.getFilterWindow(),n=this.type+"_"+t;if(!e.programCache.hasOwnProperty(n)){var r=this.generateShader(t);e.programCache[n]=this.createProgram(e.context,r)}return e.programCache[n]},getFilterWindow:function(){var e=this.tempScale;return Math.ceil(this.lanczosLobes/e)},getTaps:function(){for(var e=this.lanczosCreate(this.lanczosLobes),t=this.tempScale,n=this.getFilterWindow(),r=new Array(n),i=1;i<=n;i++)r[i-1]=e(i*t);return r},generateShader:function(e){for(var t=new Array(e),n=this.fragmentSourceTOP,r=1;r<=e;r++)t[r-1]=r+".0 * uDelta";return n+="uniform float uTaps["+e+"];\n",n+="void main() {\n",n+="  vec4 color = texture2D(uTexture, vTexCoord);\n",n+="  float sum = 1.0;\n",t.forEach((function(e,t){n+="  color += texture2D(uTexture, vTexCoord + "+e+") * uTaps["+t+"];\n",n+="  color += texture2D(uTexture, vTexCoord - "+e+") * uTaps["+t+"];\n",n+="  sum += 2.0 * uTaps["+t+"];\n"})),n+="  gl_FragColor = color / sum;\n",n+="}"},fragmentSourceTOP:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\n",applyTo:function(e){e.webgl?(e.passes++,this.width=e.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=e.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),e.destinationWidth=this.dW,this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e),e.sourceWidth=e.destinationWidth,this.height=e.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),e.destinationHeight=this.dH,this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e),e.sourceHeight=e.destinationHeight):this.applyTo2d(e)},isNeutralState:function(){return 1===this.scaleX&&1===this.scaleY},lanczosCreate:function(e){return function(t){if(t>=e||t<=-e)return 0;if(t<1.1920929e-7&&t>-1.1920929e-7)return 1;var n=(t*=Math.PI)/e;return s(t)/t*s(n)/n}},applyTo2d:function(e){var t=e.imageData,n=this.scaleX,r=this.scaleY;this.rcpScaleX=1/n,this.rcpScaleY=1/r;var i,a=t.width,s=t.height,l=o(a*n),c=o(s*r);"sliceHack"===this.resizeType?i=this.sliceByTwo(e,a,s,l,c):"hermite"===this.resizeType?i=this.hermiteFastResize(e,a,s,l,c):"bilinear"===this.resizeType?i=this.bilinearFiltering(e,a,s,l,c):"lanczos"===this.resizeType&&(i=this.lanczosResize(e,a,s,l,c)),e.imageData=i},sliceByTwo:function(e,n,i,a,o){var s,l,c=e.imageData,u=!1,d=!1,h=.5*n,f=.5*i,p=t.filterBackend.resources,m=0,g=0,v=n,b=0;for(p.sliceByTwo||(p.sliceByTwo=document.createElement("canvas")),((s=p.sliceByTwo).width<1.5*n||s.height<i)&&(s.width=1.5*n,s.height=i),(l=s.getContext("2d")).clearRect(0,0,1.5*n,i),l.putImageData(c,0,0),a=r(a),o=r(o);!u||!d;)n=h,i=f,a<r(.5*h)?h=r(.5*h):(h=a,u=!0),o<r(.5*f)?f=r(.5*f):(f=o,d=!0),l.drawImage(s,m,g,n,i,v,b,h,f),m=v,g=b,b+=f;return l.getImageData(m,g,a,o)},lanczosResize:function(e,t,o,s,c){var u=e.imageData.data,d=e.ctx.createImageData(s,c),h=d.data,f=this.lanczosCreate(this.lanczosLobes),p=this.rcpScaleX,m=this.rcpScaleY,g=2/this.rcpScaleX,v=2/this.rcpScaleY,b=l(p*this.lanczosLobes/2),y=l(m*this.lanczosLobes/2),A={},_={},w={};return function e(l){var E,S,C,T,k,x,O,I,M,P,D;for(_.x=(l+.5)*p,w.x=r(_.x),E=0;E<c;E++){for(_.y=(E+.5)*m,w.y=r(_.y),k=0,x=0,O=0,I=0,M=0,S=w.x-b;S<=w.x+b;S++)if(!(S<0||S>=t)){P=r(1e3*a(S-_.x)),A[P]||(A[P]={});for(var N=w.y-y;N<=w.y+y;N++)N<0||N>=o||(D=r(1e3*a(N-_.y)),A[P][D]||(A[P][D]=f(i(n(P*g,2)+n(D*v,2))/1e3)),(C=A[P][D])>0&&(k+=C,x+=C*u[T=4*(N*t+S)],O+=C*u[T+1],I+=C*u[T+2],M+=C*u[T+3]))}h[T=4*(E*s+l)]=x/k,h[T+1]=O/k,h[T+2]=I/k,h[T+3]=M/k}return++l<s?e(l):d}(0)},bilinearFiltering:function(e,t,n,i,a){var o,s,l,c,u,d,h,f,p,m=0,g=this.rcpScaleX,v=this.rcpScaleY,b=4*(t-1),y=e.imageData.data,A=e.ctx.createImageData(i,a),_=A.data;for(l=0;l<a;l++)for(c=0;c<i;c++)for(u=g*c-(o=r(g*c)),d=v*l-(s=r(v*l)),p=4*(s*t+o),h=0;h<4;h++)f=y[p+h]*(1-u)*(1-d)+y[p+4+h]*u*(1-d)+y[p+b+h]*d*(1-u)+y[p+b+4+h]*u*d,_[m++]=f;return A},hermiteFastResize:function(e,t,n,o,s){for(var c=this.rcpScaleX,u=this.rcpScaleY,d=l(c/2),h=l(u/2),f=e.imageData.data,p=e.ctx.createImageData(o,s),m=p.data,g=0;g<s;g++)for(var v=0;v<o;v++){for(var b=4*(v+g*o),y=0,A=0,_=0,w=0,E=0,S=0,C=0,T=(g+.5)*u,k=r(g*u);k<(g+1)*u;k++)for(var x=a(T-(k+.5))/h,O=(v+.5)*c,I=x*x,M=r(v*c);M<(v+1)*c;M++){var P=a(O-(M+.5))/d,D=i(I+P*P);D>1&&D<-1||(y=2*D*D*D-3*D*D+1)>0&&(C+=y*f[(P=4*(M+k*t))+3],_+=y,f[P+3]<255&&(y=y*f[P+3]/250),w+=y*f[P],E+=y*f[P+1],S+=y*f[P+2],A+=y)}m[b]=w/A,m[b+1]=E/A,m[b+2]=S/A,m[b+3]=C/_}return p},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),t.Image.filters.Resize.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Contrast=r(n.BaseFilter,{type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",contrast:0,mainParameter:"contrast",applyTo2d:function(e){if(0!==this.contrast){var t,n=e.imageData.data,r=n.length,i=Math.floor(255*this.contrast),a=259*(i+255)/(255*(259-i));for(t=0;t<r;t+=4)n[t]=a*(n[t]-128)+128,n[t+1]=a*(n[t+1]-128)+128,n[t+2]=a*(n[t+2]-128)+128}},getUniformLocations:function(e,t){return{uContrast:e.getUniformLocation(t,"uContrast")}},sendUniformData:function(e,t){e.uniform1f(t.uContrast,this.contrast)}}),t.Image.filters.Contrast.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Saturation=r(n.BaseFilter,{type:"Saturation",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uSaturation;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat rgMax = max(color.r, color.g);\nfloat rgbMax = max(rgMax, color.b);\ncolor.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00;\ncolor.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00;\ncolor.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00;\ngl_FragColor = color;\n}",saturation:0,mainParameter:"saturation",applyTo2d:function(e){if(0!==this.saturation){var t,n,r=e.imageData.data,i=r.length,a=-this.saturation;for(t=0;t<i;t+=4)n=Math.max(r[t],r[t+1],r[t+2]),r[t]+=n!==r[t]?(n-r[t])*a:0,r[t+1]+=n!==r[t+1]?(n-r[t+1])*a:0,r[t+2]+=n!==r[t+2]?(n-r[t+2])*a:0}},getUniformLocations:function(e,t){return{uSaturation:e.getUniformLocation(t,"uSaturation")}},sendUniformData:function(e,t){e.uniform1f(t.uSaturation,-this.saturation)}}),t.Image.filters.Saturation.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Vibrance=r(n.BaseFilter,{type:"Vibrance",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uVibrance;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat max = max(color.r, max(color.g, color.b));\nfloat avg = (color.r + color.g + color.b) / 3.0;\nfloat amt = (abs(max - avg) * 2.0) * uVibrance;\ncolor.r += max != color.r ? (max - color.r) * amt : 0.00;\ncolor.g += max != color.g ? (max - color.g) * amt : 0.00;\ncolor.b += max != color.b ? (max - color.b) * amt : 0.00;\ngl_FragColor = color;\n}",vibrance:0,mainParameter:"vibrance",applyTo2d:function(e){if(0!==this.vibrance){var t,n,r,i,a=e.imageData.data,o=a.length,s=-this.vibrance;for(t=0;t<o;t+=4)n=Math.max(a[t],a[t+1],a[t+2]),r=(a[t]+a[t+1]+a[t+2])/3,i=2*Math.abs(n-r)/255*s,a[t]+=n!==a[t]?(n-a[t])*i:0,a[t+1]+=n!==a[t+1]?(n-a[t+1])*i:0,a[t+2]+=n!==a[t+2]?(n-a[t+2])*i:0}},getUniformLocations:function(e,t){return{uVibrance:e.getUniformLocation(t,"uVibrance")}},sendUniformData:function(e,t){e.uniform1f(t.uVibrance,-this.vibrance)}}),t.Image.filters.Vibrance.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Blur=r(n.BaseFilter,{type:"Blur",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\nconst float nSamples = 15.0;\nvec3 v3offset = vec3(12.9898, 78.233, 151.7182);\nfloat random(vec3 scale) {\nreturn fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453);\n}\nvoid main() {\nvec4 color = vec4(0.0);\nfloat total = 0.0;\nfloat offset = random(v3offset);\nfor (float t = -nSamples; t <= nSamples; t++) {\nfloat percent = (t + offset - 0.5) / nSamples;\nfloat weight = 1.0 - abs(percent);\ncolor += texture2D(uTexture, vTexCoord + uDelta * percent) * weight;\ntotal += weight;\n}\ngl_FragColor = color / total;\n}",blur:0,mainParameter:"blur",applyTo:function(e){e.webgl?(this.aspectRatio=e.sourceWidth/e.sourceHeight,e.passes++,this._setupFrameBuffer(e),this.horizontal=!0,this.applyToWebGL(e),this._swapTextures(e),this._setupFrameBuffer(e),this.horizontal=!1,this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)},applyTo2d:function(e){e.imageData=this.simpleBlur(e)},simpleBlur:function(e){var n,r,i=e.filterBackend.resources,a=e.imageData.width,o=e.imageData.height;i.blurLayer1||(i.blurLayer1=t.util.createCanvasElement(),i.blurLayer2=t.util.createCanvasElement()),n=i.blurLayer1,r=i.blurLayer2,n.width===a&&n.height===o||(r.width=n.width=a,r.height=n.height=o);var s,l,c,u,d=n.getContext("2d"),h=r.getContext("2d"),f=.06*this.blur*.5;for(d.putImageData(e.imageData,0,0),h.clearRect(0,0,a,o),u=-15;u<=15;u++)c=f*(l=u/15)*a+(s=(Math.random()-.5)/4),h.globalAlpha=1-Math.abs(l),h.drawImage(n,c,s),d.drawImage(r,0,0),h.globalAlpha=1,h.clearRect(0,0,r.width,r.height);for(u=-15;u<=15;u++)c=f*(l=u/15)*o+(s=(Math.random()-.5)/4),h.globalAlpha=1-Math.abs(l),h.drawImage(n,s,c),d.drawImage(r,0,0),h.globalAlpha=1,h.clearRect(0,0,r.width,r.height);e.ctx.drawImage(n,0,0);var p=e.ctx.getImageData(0,0,n.width,n.height);return d.globalAlpha=1,d.clearRect(0,0,n.width,n.height),p},getUniformLocations:function(e,t){return{delta:e.getUniformLocation(t,"uDelta")}},sendUniformData:function(e,t){var n=this.chooseRightDelta();e.uniform2fv(t.delta,n)},chooseRightDelta:function(){var e,t=1,n=[0,0];return this.horizontal?this.aspectRatio>1&&(t=1/this.aspectRatio):this.aspectRatio<1&&(t=this.aspectRatio),e=t*this.blur*.12,this.horizontal?n[0]=e:n[1]=e,n}}),n.Blur.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Gamma=r(n.BaseFilter,{type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",gamma:[1,1,1],mainParameter:"gamma",initialize:function(e){this.gamma=[1,1,1],n.BaseFilter.prototype.initialize.call(this,e)},applyTo2d:function(e){var t,n=e.imageData.data,r=this.gamma,i=n.length,a=1/r[0],o=1/r[1],s=1/r[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),t=0,i=256;t<i;t++)this.rVals[t]=255*Math.pow(t/255,a),this.gVals[t]=255*Math.pow(t/255,o),this.bVals[t]=255*Math.pow(t/255,s);for(t=0,i=n.length;t<i;t+=4)n[t]=this.rVals[n[t]],n[t+1]=this.gVals[n[t+1]],n[t+2]=this.bVals[n[t+2]]},getUniformLocations:function(e,t){return{uGamma:e.getUniformLocation(t,"uGamma")}},sendUniformData:function(e,t){e.uniform3fv(t.uGamma,this.gamma)}}),t.Image.filters.Gamma.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.Composed=r(n.BaseFilter,{type:"Composed",subFilters:[],initialize:function(e){this.callSuper("initialize",e),this.subFilters=this.subFilters.slice(0)},applyTo:function(e){e.passes+=this.subFilters.length-1,this.subFilters.forEach((function(t){t.applyTo(e)}))},toObject:function(){return t.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map((function(e){return e.toObject()}))})},isNeutralState:function(){return!this.subFilters.some((function(e){return!e.isNeutralState()}))}}),t.Image.filters.Composed.fromObject=function(e,n){var r=(e.subFilters||[]).map((function(e){return new t.Image.filters[e.type](e)})),i=new t.Image.filters.Composed({subFilters:r});return n&&n(i),i}}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.Image.filters,r=t.util.createClass;n.HueRotation=r(n.ColorMatrix,{type:"HueRotation",rotation:0,mainParameter:"rotation",calculateMatrix:function(){var e=this.rotation*Math.PI,n=t.util.cos(e),r=t.util.sin(e),i=Math.sqrt(1/3)*r,a=1-n;this.matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.matrix[0]=n+a/3,this.matrix[1]=1/3*a-i,this.matrix[2]=1/3*a+i,this.matrix[5]=1/3*a+i,this.matrix[6]=n+1/3*a,this.matrix[7]=1/3*a-i,this.matrix[10]=1/3*a-i,this.matrix[11]=1/3*a+i,this.matrix[12]=n+1/3*a},isNeutralState:function(e){return this.calculateMatrix(),n.BaseFilter.prototype.isNeutralState.call(this,e)},applyTo:function(e){this.calculateMatrix(),n.BaseFilter.prototype.applyTo.call(this,e)}}),t.Image.filters.HueRotation.fromObject=t.Image.filters.BaseFilter.fromObject}(t),function(e){"use strict";var t=e.fabric||(e.fabric={}),n=t.util.object.clone;if(t.Text)t.warn("fabric.Text is already defined");else{var r="fontFamily fontWeight fontSize text underline overline linethrough textAlign fontStyle lineHeight textBackgroundColor charSpacing styles direction path pathStartOffset pathSide".split(" ");t.Text=t.util.createClass(t.Object,{_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles","path","pathStartOffset","pathSide"],_reNewline:/\r?\n/,_reSpacesAndTabs:/[ \t\r]/g,_reSpaceAndTab:/[ \t\r]/,_reWords:/\S+/g,type:"text",fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",underline:!1,overline:!1,linethrough:!1,textAlign:"left",fontStyle:"normal",lineHeight:1.16,superscript:{size:.6,baseline:-.35},subscript:{size:.6,baseline:.11},textBackgroundColor:"",stateProperties:t.Object.prototype.stateProperties.concat(r),cacheProperties:t.Object.prototype.cacheProperties.concat(r),stroke:null,shadow:null,path:null,pathStartOffset:0,pathSide:"left",_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.315,overline:-.88},_fontSizeMult:1.13,charSpacing:0,styles:null,_measuringContext:null,deltaY:0,direction:"ltr",_styleProperties:["stroke","strokeWidth","fill","fontFamily","fontSize","fontWeight","fontStyle","underline","overline","linethrough","deltaY","textBackgroundColor"],__charBounds:[],CACHE_FONT_SIZE:400,MIN_TEXT_WIDTH:2,initialize:function(e,t){this.styles=t&&t.styles||{},this.text=e,this.__skipDimension=!0,this.callSuper("initialize",t),this.path&&this.setPathInfo(),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},setPathInfo:function(){var e=this.path;e&&(e.segmentsInfo=t.util.getPathSegmentsInfo(e.path))},getMeasuringContext:function(){return t._measuringContext||(t._measuringContext=this.canvas&&this.canvas.contextCache||t.util.createCanvasElement().getContext("2d")),t._measuringContext},_splitText:function(){var e=this._splitTextIntoLines(this.text);return this.textLines=e.lines,this._textLines=e.graphemeLines,this._unwrappedTextLines=e._unwrappedLines,this._text=e.graphemeText,e},initDimensions:function(){this.__skipDimension||(this._splitText(),this._clearCache(),this.path?(this.width=this.path.width,this.height=this.path.height):(this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,this.height=this.calcTextHeight()),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.saveState({propertySet:"_dimensionAffectingProps"}))},enlargeSpaces:function(){for(var e,t,n,r,i,a,o,s=0,l=this._textLines.length;s<l;s++)if(("justify"===this.textAlign||s!==l-1&&!this.isEndOfWrapping(s))&&(r=0,i=this._textLines[s],(t=this.getLineWidth(s))<this.width&&(o=this.textLines[s].match(this._reSpacesAndTabs)))){n=o.length,e=(this.width-t)/n;for(var c=0,u=i.length;c<=u;c++)a=this.__charBounds[s][c],this._reSpaceAndTab.test(i[c])?(a.width+=e,a.kernedWidth+=e,a.left+=r,r+=e):a.left+=r}},isEndOfWrapping:function(e){return e===this._textLines.length-1},missingNewlineOffset:function(){return 1},toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},_getCacheCanvasDimensions:function(){var e=this.callSuper("_getCacheCanvasDimensions"),t=this.fontSize;return e.width+=t*e.zoomX,e.height+=t*e.zoomY,e},_render:function(e){var t=this.path;t&&!t.isNotVisible()&&t._render(e),this._setTextStyles(e),this._renderTextLinesBackground(e),this._renderTextDecoration(e,"underline"),this._renderText(e),this._renderTextDecoration(e,"overline"),this._renderTextDecoration(e,"linethrough")},_renderText:function(e){"stroke"===this.paintFirst?(this._renderTextStroke(e),this._renderTextFill(e)):(this._renderTextFill(e),this._renderTextStroke(e))},_setTextStyles:function(e,t,n){e.textBaseline="alphabetic",e.font=this._getFontDeclaration(t,n)},calcTextWidth:function(){for(var e=this.getLineWidth(0),t=1,n=this._textLines.length;t<n;t++){var r=this.getLineWidth(t);r>e&&(e=r)}return e},_renderTextLine:function(e,t,n,r,i,a){this._renderChars(e,t,n,r,i,a)},_renderTextLinesBackground:function(e){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var t,n,r,i,a,o,s,l=e.fillStyle,c=this._getLeftOffset(),u=this._getTopOffset(),d=0,h=0,f=this.path,p=0,m=this._textLines.length;p<m;p++)if(t=this.getHeightOfLine(p),this.textBackgroundColor||this.styleHas("textBackgroundColor",p)){r=this._textLines[p],n=this._getLineLeftOffset(p),h=0,d=0,i=this.getValueOfPropertyAt(p,0,"textBackgroundColor");for(var g=0,v=r.length;g<v;g++)a=this.__charBounds[p][g],o=this.getValueOfPropertyAt(p,g,"textBackgroundColor"),f?(e.save(),e.translate(a.renderLeft,a.renderTop),e.rotate(a.angle),e.fillStyle=o,o&&e.fillRect(-a.width/2,-t/this.lineHeight*(1-this._fontSizeFraction),a.width,t/this.lineHeight),e.restore()):o!==i?(s=c+n+d,"rtl"===this.direction&&(s=this.width-s-h),e.fillStyle=i,i&&e.fillRect(s,u,h,t/this.lineHeight),d=a.left,h=a.width,i=o):h+=a.kernedWidth;o&&!f&&(s=c+n+d,"rtl"===this.direction&&(s=this.width-s-h),e.fillStyle=o,e.fillRect(s,u,h,t/this.lineHeight)),u+=t}else u+=t;e.fillStyle=l,this._removeShadow(e)}},getFontCache:function(e){var n=e.fontFamily.toLowerCase();t.charWidthsCache[n]||(t.charWidthsCache[n]={});var r=t.charWidthsCache[n],i=e.fontStyle.toLowerCase()+"_"+(e.fontWeight+"").toLowerCase();return r[i]||(r[i]={}),r[i]},_measureChar:function(e,t,n,r){var i,a,o,s,l=this.getFontCache(t),c=n+e,u=this._getFontDeclaration(t)===this._getFontDeclaration(r),d=t.fontSize/this.CACHE_FONT_SIZE;if(n&&void 0!==l[n]&&(o=l[n]),void 0!==l[e]&&(s=i=l[e]),u&&void 0!==l[c]&&(s=(a=l[c])-o),void 0===i||void 0===o||void 0===a){var h=this.getMeasuringContext();this._setTextStyles(h,t,!0)}return void 0===i&&(s=i=h.measureText(e).width,l[e]=i),void 0===o&&u&&n&&(o=h.measureText(n).width,l[n]=o),u&&void 0===a&&(a=h.measureText(c).width,l[c]=a,s=a-o),{width:i*d,kernedWidth:s*d}},getHeightOfChar:function(e,t){return this.getValueOfPropertyAt(e,t,"fontSize")},measureLine:function(e){var t=this._measureLine(e);return 0!==this.charSpacing&&(t.width-=this._getWidthOfCharSpacing()),t.width<0&&(t.width=0),t},_measureLine:function(e){var n,r,i,a,o,s,l=0,c=this._textLines[e],u=new Array(c.length),d=0,h=this.path,f="right"===this.pathSide;for(this.__charBounds[e]=u,n=0;n<c.length;n++)r=c[n],a=this._getGraphemeBox(r,e,n,i),u[n]=a,l+=a.kernedWidth,i=r;if(u[n]={left:a?a.left+a.width:0,width:0,kernedWidth:0,height:this.fontSize},h){switch(s=h.segmentsInfo[h.segmentsInfo.length-1].length,(o=t.util.getPointOnPath(h.path,0,h.segmentsInfo)).x+=h.pathOffset.x,o.y+=h.pathOffset.y,this.textAlign){case"left":d=f?s-l:0;break;case"center":d=(s-l)/2;break;case"right":d=f?0:s-l}for(d+=this.pathStartOffset*(f?-1:1),n=f?c.length-1:0;f?n>=0:n<c.length;f?n--:n++)a=u[n],d>s?d%=s:d<0&&(d+=s),this._setGraphemeOnPath(d,a,o),d+=a.kernedWidth}return{width:l,numOfSpaces:0}},_setGraphemeOnPath:function(e,n,r){var i=e+n.kernedWidth/2,a=this.path,o=t.util.getPointOnPath(a.path,i,a.segmentsInfo);n.renderLeft=o.x-r.x,n.renderTop=o.y-r.y,n.angle=o.angle+("right"===this.pathSide?Math.PI:0)},_getGraphemeBox:function(e,t,n,r,i){var a,o=this.getCompleteStyleDeclaration(t,n),s=r?this.getCompleteStyleDeclaration(t,n-1):{},l=this._measureChar(e,o,r,s),c=l.kernedWidth,u=l.width;0!==this.charSpacing&&(u+=a=this._getWidthOfCharSpacing(),c+=a);var d={width:u,left:0,height:o.fontSize,kernedWidth:c,deltaY:o.deltaY};if(n>0&&!i){var h=this.__charBounds[t][n-1];d.left=h.left+h.width+l.kernedWidth-l.width}return d},getHeightOfLine:function(e){if(this.__lineHeights[e])return this.__lineHeights[e];for(var t=this._textLines[e],n=this.getHeightOfChar(e,0),r=1,i=t.length;r<i;r++)n=Math.max(this.getHeightOfChar(e,r),n);return this.__lineHeights[e]=n*this.lineHeight*this._fontSizeMult},calcTextHeight:function(){for(var e,t=0,n=0,r=this._textLines.length;n<r;n++)e=this.getHeightOfLine(n),t+=n===r-1?e/this.lineHeight:e;return t},_getLeftOffset:function(){return"ltr"===this.direction?-this.width/2:this.width/2},_getTopOffset:function(){return-this.height/2},_renderTextCommon:function(e,t){e.save();for(var n=0,r=this._getLeftOffset(),i=this._getTopOffset(),a=0,o=this._textLines.length;a<o;a++){var s=this.getHeightOfLine(a),l=s/this.lineHeight,c=this._getLineLeftOffset(a);this._renderTextLine(t,e,this._textLines[a],r+c,i+n+l,a),n+=s}e.restore()},_renderTextFill:function(e){(this.fill||this.styleHas("fill"))&&this._renderTextCommon(e,"fillText")},_renderTextStroke:function(e){(this.stroke&&0!==this.strokeWidth||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this._setLineDash(e,this.strokeDashArray),e.beginPath(),this._renderTextCommon(e,"strokeText"),e.closePath(),e.restore())},_renderChars:function(e,t,n,r,i,a){var o,s,l,c,u,d=this.getHeightOfLine(a),h=-1!==this.textAlign.indexOf("justify"),f="",p=0,m=this.path,g=!h&&0===this.charSpacing&&this.isEmptyStyles(a)&&!m,v="ltr"===this.direction,b="ltr"===this.direction?1:-1;if(t.save(),i-=d*this._fontSizeFraction/this.lineHeight,g)return t.canvas.setAttribute("dir",v?"ltr":"rtl"),t.direction=v?"ltr":"rtl",t.textAlign=v?"left":"right",this._renderChar(e,t,a,0,n.join(""),r,i,d),void t.restore();for(var y=0,A=n.length-1;y<=A;y++)c=y===A||this.charSpacing||m,f+=n[y],l=this.__charBounds[a][y],0===p?(r+=b*(l.kernedWidth-l.width),p+=l.width):p+=l.kernedWidth,h&&!c&&this._reSpaceAndTab.test(n[y])&&(c=!0),c||(o=o||this.getCompleteStyleDeclaration(a,y),s=this.getCompleteStyleDeclaration(a,y+1),c=this._hasStyleChanged(o,s)),c&&(m?(t.save(),t.translate(l.renderLeft,l.renderTop),t.rotate(l.angle),this._renderChar(e,t,a,y,f,-p/2,0,d),t.restore()):(u=r,t.canvas.setAttribute("dir",v?"ltr":"rtl"),t.direction=v?"ltr":"rtl",t.textAlign=v?"left":"right",this._renderChar(e,t,a,y,f,u,i,d)),f="",o=s,r+=b*p,p=0);t.restore()},_applyPatternGradientTransformText:function(e){var n,r=t.util.createCanvasElement(),i=this.width+this.strokeWidth,a=this.height+this.strokeWidth;return r.width=i,r.height=a,(n=r.getContext("2d")).beginPath(),n.moveTo(0,0),n.lineTo(i,0),n.lineTo(i,a),n.lineTo(0,a),n.closePath(),n.translate(i/2,a/2),n.fillStyle=e.toLive(n),this._applyPatternGradientTransform(n,e),n.fill(),n.createPattern(r,"no-repeat")},handleFiller:function(e,t,n){var r,i;return n.toLive?"percentage"===n.gradientUnits||n.gradientTransform||n.patternTransform?(r=-this.width/2,i=-this.height/2,e.translate(r,i),e[t]=this._applyPatternGradientTransformText(n),{offsetX:r,offsetY:i}):(e[t]=n.toLive(e,this),this._applyPatternGradientTransform(e,n)):(e[t]=n,{offsetX:0,offsetY:0})},_setStrokeStyles:function(e,t){return e.lineWidth=t.strokeWidth,e.lineCap=this.strokeLineCap,e.lineDashOffset=this.strokeDashOffset,e.lineJoin=this.strokeLineJoin,e.miterLimit=this.strokeMiterLimit,this.handleFiller(e,"strokeStyle",t.stroke)},_setFillStyles:function(e,t){return this.handleFiller(e,"fillStyle",t.fill)},_renderChar:function(e,t,n,r,i,a,o){var s,l,c=this._getStyleDeclaration(n,r),u=this.getCompleteStyleDeclaration(n,r),d="fillText"===e&&u.fill,h="strokeText"===e&&u.stroke&&u.strokeWidth;(h||d)&&(t.save(),d&&(s=this._setFillStyles(t,u)),h&&(l=this._setStrokeStyles(t,u)),t.font=this._getFontDeclaration(u),c&&c.textBackgroundColor&&this._removeShadow(t),c&&c.deltaY&&(o+=c.deltaY),d&&t.fillText(i,a-s.offsetX,o-s.offsetY),h&&t.strokeText(i,a-l.offsetX,o-l.offsetY),t.restore())},setSuperscript:function(e,t){return this._setScript(e,t,this.superscript)},setSubscript:function(e,t){return this._setScript(e,t,this.subscript)},_setScript:function(e,t,n){var r=this.get2DCursorLocation(e,!0),i=this.getValueOfPropertyAt(r.lineIndex,r.charIndex,"fontSize"),a=this.getValueOfPropertyAt(r.lineIndex,r.charIndex,"deltaY"),o={fontSize:i*n.size,deltaY:a+i*n.baseline};return this.setSelectionStyles(o,e,t),this},_hasStyleChanged:function(e,t){return e.fill!==t.fill||e.stroke!==t.stroke||e.strokeWidth!==t.strokeWidth||e.fontSize!==t.fontSize||e.fontFamily!==t.fontFamily||e.fontWeight!==t.fontWeight||e.fontStyle!==t.fontStyle||e.deltaY!==t.deltaY},_hasStyleChangedForSvg:function(e,t){return this._hasStyleChanged(e,t)||e.overline!==t.overline||e.underline!==t.underline||e.linethrough!==t.linethrough},_getLineLeftOffset:function(e){var t=this.getLineWidth(e),n=this.width-t,r=this.textAlign,i=this.direction,a=0,o=this.isEndOfWrapping(e);return"justify"===r||"justify-center"===r&&!o||"justify-right"===r&&!o||"justify-left"===r&&!o?0:("center"===r&&(a=n/2),"right"===r&&(a=n),"justify-center"===r&&(a=n/2),"justify-right"===r&&(a=n),"rtl"===i&&(a-=n),a)},_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]},_shouldClearDimensionCache:function(){var e=this._forceClearCache;return e||(e=this.hasStateChanged("_dimensionAffectingProps")),e&&(this.dirty=!0,this._forceClearCache=!1),e},getLineWidth:function(e){return this.__lineWidths[e]?this.__lineWidths[e]:(t=""===this._textLines[e]?0:this.measureLine(e).width,this.__lineWidths[e]=t,t);var t},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},getValueOfPropertyAt:function(e,t,n){var r=this._getStyleDeclaration(e,t);return r&&void 0!==r[n]?r[n]:this[n]},_renderTextDecoration:function(e,t){if(this[t]||this.styleHas(t)){for(var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b=this._getLeftOffset(),y=this._getTopOffset(),A=this.path,_=this._getWidthOfCharSpacing(),w=this.offsets[t],E=0,S=this._textLines.length;E<S;E++)if(n=this.getHeightOfLine(E),this[t]||this.styleHas(t,E)){l=this._textLines[E],m=n/this.lineHeight,a=this._getLineLeftOffset(E),d=0,h=0,c=this.getValueOfPropertyAt(E,0,t),v=this.getValueOfPropertyAt(E,0,"fill"),u=y+m*(1-this._fontSizeFraction),r=this.getHeightOfChar(E,0),o=this.getValueOfPropertyAt(E,0,"deltaY");for(var C=0,T=l.length;C<T;C++)if(f=this.__charBounds[E][C],p=this.getValueOfPropertyAt(E,C,t),g=this.getValueOfPropertyAt(E,C,"fill"),i=this.getHeightOfChar(E,C),s=this.getValueOfPropertyAt(E,C,"deltaY"),A&&p&&g)e.save(),e.fillStyle=v,e.translate(f.renderLeft,f.renderTop),e.rotate(f.angle),e.fillRect(-f.kernedWidth/2,w*i+s,f.kernedWidth,this.fontSize/15),e.restore();else if((p!==c||g!==v||i!==r||s!==o)&&h>0){var k=b+a+d;"rtl"===this.direction&&(k=this.width-k-h),c&&v&&(e.fillStyle=v,e.fillRect(k,u+w*r+o,h,this.fontSize/15)),d=f.left,h=f.width,c=p,v=g,r=i,o=s}else h+=f.kernedWidth;k=b+a+d;"rtl"===this.direction&&(k=this.width-k-h),e.fillStyle=g,p&&g&&e.fillRect(k,u+w*r+o,h-_,this.fontSize/15),y+=n}else y+=n;this._removeShadow(e)}},_getFontDeclaration:function(e,n){var r=e||this,i=this.fontFamily,a=t.Text.genericFonts.indexOf(i.toLowerCase())>-1,o=void 0===i||i.indexOf("'")>-1||i.indexOf(",")>-1||i.indexOf('"')>-1||a?r.fontFamily:'"'+r.fontFamily+'"';return[t.isLikelyNode?r.fontWeight:r.fontStyle,t.isLikelyNode?r.fontStyle:r.fontWeight,n?this.CACHE_FONT_SIZE+"px":r.fontSize+"px",o].join(" ")},render:function(e){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",e)))},_splitTextIntoLines:function(e){for(var n=e.split(this._reNewline),r=new Array(n.length),i=["\n"],a=[],o=0;o<n.length;o++)r[o]=t.util.string.graphemeSplit(n[o]),a=a.concat(r[o],i);return a.pop(),{_unwrappedLines:r,lines:n,graphemeText:a,graphemeLines:r}},toObject:function(e){var t=r.concat(e),i=this.callSuper("toObject",t);return i.styles=n(this.styles,!0),i.path&&(i.path=this.path.toObject()),i},set:function(e,t){this.callSuper("set",e,t);var n=!1,r=!1;if("object"==typeof e)for(var i in e)"path"===i&&this.setPathInfo(),n=n||-1!==this._dimensionAffectingProps.indexOf(i),r=r||"path"===i;else n=-1!==this._dimensionAffectingProps.indexOf(e),r="path"===e;return r&&this.setPathInfo(),n&&(this.initDimensions(),this.setCoords()),this},complexity:function(){return 1}}),t.Text.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size letter-spacing text-decoration text-anchor".split(" ")),t.Text.DEFAULT_SVG_FONT_SIZE=16,t.Text.fromElement=function(e,r,i){if(!e)return r(null);var a=t.parseAttributes(e,t.Text.ATTRIBUTE_NAMES),o=a.textAnchor||"left";if((i=t.util.object.extend(i?n(i):{},a)).top=i.top||0,i.left=i.left||0,a.textDecoration){var s=a.textDecoration;-1!==s.indexOf("underline")&&(i.underline=!0),-1!==s.indexOf("overline")&&(i.overline=!0),-1!==s.indexOf("line-through")&&(i.linethrough=!0),delete i.textDecoration}"dx"in a&&(i.left+=a.dx),"dy"in a&&(i.top+=a.dy),"fontSize"in i||(i.fontSize=t.Text.DEFAULT_SVG_FONT_SIZE);var l="";"textContent"in e?l=e.textContent:"firstChild"in e&&null!==e.firstChild&&"data"in e.firstChild&&null!==e.firstChild.data&&(l=e.firstChild.data),l=l.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var c=i.strokeWidth;i.strokeWidth=0;var u=new t.Text(l,i),d=u.getScaledHeight()/u.height,h=((u.height+u.strokeWidth)*u.lineHeight-u.height)*d,f=u.getScaledHeight()+h,p=0;"center"===o&&(p=u.getScaledWidth()/2),"right"===o&&(p=u.getScaledWidth()),u.set({left:u.left-p,top:u.top-(f-u.fontSize*(.07+u._fontSizeFraction))/u.lineHeight,strokeWidth:void 0!==c?c:1}),r(u)},t.Text.fromObject=function(e,r){var i=n(e),a=e.path;return delete i.path,t.Object._fromObject("Text",i,(function(e){a?t.Object._fromObject("Path",a,(function(t){e.set("path",t),r(e)}),"path"):r(e)}),"text")},t.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],t.util.createAccessors&&t.util.createAccessors(t.Text)}}(t),C.util.object.extend(C.Text.prototype,{isEmptyStyles:function(e){if(!this.styles)return!0;if(void 0!==e&&!this.styles[e])return!0;var t=void 0===e?this.styles:{line:this.styles[e]};for(var n in t)for(var r in t[n])for(var i in t[n][r])return!1;return!0},styleHas:function(e,t){if(!this.styles||!e||""===e)return!1;if(void 0!==t&&!this.styles[t])return!1;var n=void 0===t?this.styles:{0:this.styles[t]};for(var r in n)for(var i in n[r])if(void 0!==n[r][i][e])return!0;return!1},cleanStyle:function(e){if(!this.styles||!e||""===e)return!1;var t,n,r=this.styles,i=0,a=!0,o=0;for(var s in r){for(var l in t=0,r[s]){var c;i++,(c=r[s][l]).hasOwnProperty(e)?(n?c[e]!==n&&(a=!1):n=c[e],c[e]===this[e]&&delete c[e]):a=!1,0!==Object.keys(c).length?t++:delete r[s][l]}0===t&&delete r[s]}for(var u=0;u<this._textLines.length;u++)o+=this._textLines[u].length;a&&i===o&&(this[e]=n,this.removeStyle(e))},removeStyle:function(e){if(this.styles&&e&&""!==e){var t,n,r,i=this.styles;for(n in i){for(r in t=i[n])delete t[r][e],0===Object.keys(t[r]).length&&delete t[r];0===Object.keys(t).length&&delete i[n]}}},_extendStyles:function(e,t){var n=this.get2DCursorLocation(e);this._getLineStyle(n.lineIndex)||this._setLineStyle(n.lineIndex),this._getStyleDeclaration(n.lineIndex,n.charIndex)||this._setStyleDeclaration(n.lineIndex,n.charIndex,{}),C.util.object.extend(this._getStyleDeclaration(n.lineIndex,n.charIndex),t)},get2DCursorLocation:function(e,t){void 0===e&&(e=this.selectionStart);for(var n=t?this._unwrappedTextLines:this._textLines,r=n.length,i=0;i<r;i++){if(e<=n[i].length)return{lineIndex:i,charIndex:e};e-=n[i].length+this.missingNewlineOffset(i)}return{lineIndex:i-1,charIndex:n[i-1].length<e?n[i-1].length:e}},getSelectionStyles:function(e,t,n){void 0===e&&(e=this.selectionStart||0),void 0===t&&(t=this.selectionEnd||e);for(var r=[],i=e;i<t;i++)r.push(this.getStyleAtPosition(i,n));return r},getStyleAtPosition:function(e,t){var n=this.get2DCursorLocation(e);return(t?this.getCompleteStyleDeclaration(n.lineIndex,n.charIndex):this._getStyleDeclaration(n.lineIndex,n.charIndex))||{}},setSelectionStyles:function(e,t,n){void 0===t&&(t=this.selectionStart||0),void 0===n&&(n=this.selectionEnd||t);for(var r=t;r<n;r++)this._extendStyles(r,e);return this._forceClearCache=!0,this},_getStyleDeclaration:function(e,t){var n=this.styles&&this.styles[e];return n?n[t]:null},getCompleteStyleDeclaration:function(e,t){for(var n,r=this._getStyleDeclaration(e,t)||{},i={},a=0;a<this._styleProperties.length;a++)i[n=this._styleProperties[a]]=void 0===r[n]?this[n]:r[n];return i},_setStyleDeclaration:function(e,t,n){this.styles[e][t]=n},_deleteStyleDeclaration:function(e,t){delete this.styles[e][t]},_getLineStyle:function(e){return!!this.styles[e]},_setLineStyle:function(e){this.styles[e]={}},_deleteLineStyle:function(e){delete this.styles[e]}}),function(){function e(e){e.textDecoration&&(e.textDecoration.indexOf("underline")>-1&&(e.underline=!0),e.textDecoration.indexOf("line-through")>-1&&(e.linethrough=!0),e.textDecoration.indexOf("overline")>-1&&(e.overline=!0),delete e.textDecoration)}C.IText=C.util.createClass(C.Text,C.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"",cursorDelay:1e3,cursorDuration:600,caching:!0,hiddenTextareaContainer:null,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(e,t){this.callSuper("initialize",e,t),this.initBehavior()},setSelectionStart:function(e){e=Math.max(e,0),this._updateAndFire("selectionStart",e)},setSelectionEnd:function(e){e=Math.min(e,this.text.length),this._updateAndFire("selectionEnd",e)},_updateAndFire:function(e,t){this[e]!==t&&(this._fireSelectionChanged(),this[e]=t),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(e){this.clearContextTop(),this.callSuper("render",e),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(e){this.callSuper("_render",e)},clearContextTop:function(e){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var t=this.canvas.contextTop,n=this.canvas.viewportTransform;t.save(),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this.transform(t),this._clearTextArea(t),e||t.restore()}},renderCursorOrSelection:function(){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var e=this._getCursorBoundaries(),t=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(e,t):this.renderSelection(e,t),t.restore()}},_clearTextArea:function(e){var t=this.width+4,n=this.height+4;e.clearRect(-t/2,-n/2,t,n)},_getCursorBoundaries:function(e){void 0===e&&(e=this.selectionStart);var t=this._getLeftOffset(),n=this._getTopOffset(),r=this._getCursorBoundariesOffsets(e);return{left:t,top:n,leftOffset:r.left,topOffset:r.top}},_getCursorBoundariesOffsets:function(e){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var t,n,r,i,a=0,o=0,s=this.get2DCursorLocation(e);r=s.charIndex,n=s.lineIndex;for(var l=0;l<n;l++)a+=this.getHeightOfLine(l);t=this._getLineLeftOffset(n);var c=this.__charBounds[n][r];return c&&(o=c.left),0!==this.charSpacing&&r===this._textLines[n].length&&(o-=this._getWidthOfCharSpacing()),i={top:a,left:t+(o>0?o:0)},"rtl"===this.direction&&(i.left*=-1),this.cursorOffsetCache=i,this.cursorOffsetCache},renderCursor:function(e,t){var n=this.get2DCursorLocation(),r=n.lineIndex,i=n.charIndex>0?n.charIndex-1:0,a=this.getValueOfPropertyAt(r,i,"fontSize"),o=this.scaleX*this.canvas.getZoom(),s=this.cursorWidth/o,l=e.topOffset,c=this.getValueOfPropertyAt(r,i,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(r)/this.lineHeight-a*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(e,t),t.fillStyle=this.cursorColor||this.getValueOfPropertyAt(r,i,"fill"),t.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,t.fillRect(e.left+e.leftOffset-s/2,l+e.top+c,s,a)},renderSelection:function(e,t){for(var n=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,r=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,i=-1!==this.textAlign.indexOf("justify"),a=this.get2DCursorLocation(n),o=this.get2DCursorLocation(r),s=a.lineIndex,l=o.lineIndex,c=a.charIndex<0?0:a.charIndex,u=o.charIndex<0?0:o.charIndex,d=s;d<=l;d++){var h,f=this._getLineLeftOffset(d)||0,p=this.getHeightOfLine(d),m=0,g=0;if(d===s&&(m=this.__charBounds[s][c].left),d>=s&&d<l)g=i&&!this.isEndOfWrapping(d)?this.width:this.getLineWidth(d)||5;else if(d===l)if(0===u)g=this.__charBounds[l][u].left;else{var v=this._getWidthOfCharSpacing();g=this.__charBounds[l][u-1].left+this.__charBounds[l][u-1].width-v}h=p,(this.lineHeight<1||d===l&&this.lineHeight>1)&&(p/=this.lineHeight);var b=e.left+f+m,y=g-m,A=p,_=0;this.inCompositionMode?(t.fillStyle=this.compositionColor||"black",A=1,_=p):t.fillStyle=this.selectionColor,"rtl"===this.direction&&(b=this.width-b-y),t.fillRect(b,e.top+e.topOffset+_,y,A),e.topOffset+=h}},getCurrentCharFontSize:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fontSize")},getCurrentCharColor:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fill")},_getCurrentCharIndex:function(){var e=this.get2DCursorLocation(this.selectionStart,!0),t=e.charIndex>0?e.charIndex-1:0;return{l:e.lineIndex,c:t}}}),C.IText.fromObject=function(t,n){if(e(t),t.styles)for(var r in t.styles)for(var i in t.styles[r])e(t.styles[r][i]);C.Object._fromObject("IText",t,n,"text")}}(),w=C.util.object.clone,C.util.object.extend(C.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var e=this;this.on("added",(function(){var t=e.canvas;t&&(t._hasITextHandlers||(t._hasITextHandlers=!0,e._initCanvasHandlers(t)),t._iTextInstances=t._iTextInstances||[],t._iTextInstances.push(e))}))},initRemovedHandler:function(){var e=this;this.on("removed",(function(){var t=e.canvas;t&&(t._iTextInstances=t._iTextInstances||[],C.util.removeFromArray(t._iTextInstances,e),0===t._iTextInstances.length&&(t._hasITextHandlers=!1,e._removeCanvasHandlers(t)))}))},_initCanvasHandlers:function(e){e._mouseUpITextHandler=function(){e._iTextInstances&&e._iTextInstances.forEach((function(e){e.__isMousedown=!1}))},e.on("mouse:up",e._mouseUpITextHandler)},_removeCanvasHandlers:function(e){e.off("mouse:up",e._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(e,t,n,r){var i;return i={isAborted:!1,abort:function(){this.isAborted=!0}},e.animate("_currentCursorOpacity",t,{duration:n,onComplete:function(){i.isAborted||e[r]()},onChange:function(){e.canvas&&e.selectionStart===e.selectionEnd&&e.renderCursorOrSelection()},abort:function(){return i.isAborted}}),i},_onTickComplete:function(){var e=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout((function(){e._currentTickCompleteState=e._animateCursor(e,0,this.cursorDuration/2,"_tick")}),100)},initDelayedCursor:function(e){var t=this,n=e?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout((function(){t._tick()}),n)},abortCursorAnimation:function(){var e=this._currentTickState||this._currentTickCompleteState,t=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,e&&t&&t.clearContext(t.contextTop||t.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(e){var t=0,n=e-1;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)t++,n--;for(;/\S/.test(this._text[n])&&n>-1;)t++,n--;return e-t},findWordBoundaryRight:function(e){var t=0,n=e;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)t++,n++;for(;/\S/.test(this._text[n])&&n<this._text.length;)t++,n++;return e+t},findLineBoundaryLeft:function(e){for(var t=0,n=e-1;!/\n/.test(this._text[n])&&n>-1;)t++,n--;return e-t},findLineBoundaryRight:function(e){for(var t=0,n=e;!/\n/.test(this._text[n])&&n<this._text.length;)t++,n++;return e+t},searchWordBoundary:function(e,t){for(var n=this._text,r=this._reSpace.test(n[e])?e-1:e,i=n[r],a=C.reNonWord;!a.test(i)&&r>0&&r<n.length;)i=n[r+=t];return a.test(i)&&(r+=1===t?0:1),r},selectWord:function(e){e=e||this.selectionStart;var t=this.searchWordBoundary(e,-1),n=this.searchWordBoundary(e,1);this.selectionStart=t,this.selectionEnd=n,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(e){e=e||this.selectionStart;var t=this.findLineBoundaryLeft(e),n=this.findLineBoundaryRight(e);return this.selectionStart=t,this.selectionEnd=n,this._fireSelectionChanged(),this._updateTextarea(),this},enterEditing:function(e){if(!this.isEditing&&this.editable)return this.canvas&&(this.canvas.calcOffset(),this.exitEditingOnOthers(this.canvas)),this.isEditing=!0,this.initHiddenTextarea(e),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this._fireSelectionChanged(),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.initMouseMoveHandler(),this.canvas.requestRenderAll(),this):this},exitEditingOnOthers:function(e){e._iTextInstances&&e._iTextInstances.forEach((function(e){e.selected=!1,e.isEditing&&e.exitEditing()}))},initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler)},mouseMoveHandler:function(e){if(this.__isMousedown&&this.isEditing){var t=this.getSelectionStartFromPointer(e.e),n=this.selectionStart,r=this.selectionEnd;(t===this.__selectionStartOnMouseDown&&n!==r||n!==t&&r!==t)&&(t>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=t):(this.selectionStart=t,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===n&&this.selectionEnd===r||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(e,t,n){var r=n.slice(0,e),i=C.util.string.graphemeSplit(r).length;if(e===t)return{selectionStart:i,selectionEnd:i};var a=n.slice(e,t);return{selectionStart:i,selectionEnd:i+C.util.string.graphemeSplit(a).length}},fromGraphemeToStringSelection:function(e,t,n){var r=n.slice(0,e).join("").length;return e===t?{selectionStart:r,selectionEnd:r}:{selectionStart:r,selectionEnd:r+n.slice(e,t).join("").length}},_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var e=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=e.selectionStart,this.hiddenTextarea.selectionEnd=e.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var e=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=e.selectionEnd,this.inCompositionMode||(this.selectionStart=e.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var e=this._calcTextareaPosition();this.hiddenTextarea.style.left=e.left,this.hiddenTextarea.style.top=e.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var e=this.inCompositionMode?this.compositionStart:this.selectionStart,t=this._getCursorBoundaries(e),n=this.get2DCursorLocation(e),r=n.lineIndex,i=n.charIndex,a=this.getValueOfPropertyAt(r,i,"fontSize")*this.lineHeight,o=t.leftOffset,s=this.calcTransformMatrix(),l={x:t.left+o,y:t.top+t.topOffset+a},c=this.canvas.getRetinaScaling(),u=this.canvas.upperCanvasEl,d=u.width/c,h=u.height/c,f=d-a,p=h-a,m=u.clientWidth/d,g=u.clientHeight/h;return l=C.util.transformPoint(l,s),(l=C.util.transformPoint(l,this.canvas.viewportTransform)).x*=m,l.y*=g,l.x<0&&(l.x=0),l.x>f&&(l.x=f),l.y<0&&(l.y=0),l.y>p&&(l.y=p),l.x+=this.canvas._offset.left,l.y+=this.canvas._offset.top,{left:l.x+"px",top:l.y+"px",fontSize:a+"px",charHeight:a}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var e=this._textBeforeEdit!==this.text,t=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,t&&(t.blur&&t.blur(),t.parentNode&&t.parentNode.removeChild(t)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),e&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),e&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var e in this.styles)this._textLines[e]||delete this.styles[e]},removeStyleFromTo:function(e,t){var n,r,i=this.get2DCursorLocation(e,!0),a=this.get2DCursorLocation(t,!0),o=i.lineIndex,s=i.charIndex,l=a.lineIndex,c=a.charIndex;if(o!==l){if(this.styles[o])for(n=s;n<this._unwrappedTextLines[o].length;n++)delete this.styles[o][n];if(this.styles[l])for(n=c;n<this._unwrappedTextLines[l].length;n++)(r=this.styles[l][n])&&(this.styles[o]||(this.styles[o]={}),this.styles[o][s+n-c]=r);for(n=o+1;n<=l;n++)delete this.styles[n];this.shiftLineStyles(l,o-l)}else if(this.styles[o]){r=this.styles[o];var u,d,h=c-s;for(n=s;n<c;n++)delete r[n];for(d in this.styles[o])(u=parseInt(d,10))>=c&&(r[u-h]=r[d],delete r[d])}},shiftLineStyles:function(e,t){var n=w(this.styles);for(var r in this.styles){var i=parseInt(r,10);i>e&&(this.styles[i+t]=n[i],n[i-t]||delete this.styles[i])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(e,t,n,r){var i,a={},o=!1,s=this._unwrappedTextLines[e].length===t;for(var l in n||(n=1),this.shiftLineStyles(e,n),this.styles[e]&&(i=this.styles[e][0===t?t:t-1]),this.styles[e]){var c=parseInt(l,10);c>=t&&(o=!0,a[c-t]=this.styles[e][l],s&&0===t||delete this.styles[e][l])}var u=!1;for(o&&!s&&(this.styles[e+n]=a,u=!0),u&&n--;n>0;)r&&r[n-1]?this.styles[e+n]={0:w(r[n-1])}:i?this.styles[e+n]={0:w(i)}:delete this.styles[e+n],n--;this._forceClearCache=!0},insertCharStyleObject:function(e,t,n,r){this.styles||(this.styles={});var i=this.styles[e],a=i?w(i):{};for(var o in n||(n=1),a){var s=parseInt(o,10);s>=t&&(i[s+n]=a[s],a[s-n]||delete i[s])}if(this._forceClearCache=!0,r)for(;n--;)Object.keys(r[n]).length&&(this.styles[e]||(this.styles[e]={}),this.styles[e][t+n]=w(r[n]));else if(i)for(var l=i[t?t-1:1];l&&n--;)this.styles[e][t+n]=w(l)},insertNewStyleBlock:function(e,t,n){for(var r=this.get2DCursorLocation(t,!0),i=[0],a=0,o=0;o<e.length;o++)"\n"===e[o]?i[++a]=0:i[a]++;for(i[0]>0&&(this.insertCharStyleObject(r.lineIndex,r.charIndex,i[0],n),n=n&&n.slice(i[0]+1)),a&&this.insertNewlineStyleObject(r.lineIndex,r.charIndex+i[0],a),o=1;o<a;o++)i[o]>0?this.insertCharStyleObject(r.lineIndex+o,0,i[o],n):n&&(this.styles[r.lineIndex+o][0]=n[0]),n=n&&n.slice(i[o]+1);i[o]>0&&this.insertCharStyleObject(r.lineIndex+o,0,i[o],n)},setSelectionStartEndWithShift:function(e,t,n){n<=e?(t===e?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=e),this.selectionStart=n):n>e&&n<t?"right"===this._selectionDirection?this.selectionEnd=n:this.selectionStart=n:(t===e?this._selectionDirection="right":"left"===this._selectionDirection&&(this._selectionDirection="right",this.selectionStart=t),this.selectionEnd=n)},setSelectionInBoundaries:function(){var e=this.text.length;this.selectionStart>e?this.selectionStart=e:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>e?this.selectionEnd=e:this.selectionEnd<0&&(this.selectionEnd=0)}}),C.util.object.extend(C.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(e){if(this.canvas){this.__newClickTime=+new Date;var t=e.pointer;this.isTripleClick(t)&&(this.fire("tripleclick",e),this._stopEvent(e.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=t,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(e){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===e.x&&this.__lastPointer.y===e.y},_stopEvent:function(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(e){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(e.e))},tripleClickHandler:function(e){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(e.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(e){!this.canvas||!this.editable||e.e.button&&1!==e.e.button||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(e.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(e){!this.canvas||!this.editable||e.e.button&&1!==e.e.button||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(e){if(this.__isMousedown=!1,!(!this.editable||this.group||e.transform&&e.transform.actionPerformed||e.e.button&&1!==e.e.button)){if(this.canvas){var t=this.canvas._activeObject;if(t&&t!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(e.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(e){var t=this.getSelectionStartFromPointer(e),n=this.selectionStart,r=this.selectionEnd;e.shiftKey?this.setSelectionStartEndWithShift(n,r,t):(this.selectionStart=t,this.selectionEnd=t),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(e){for(var t,n=this.getLocalPointer(e),r=0,i=0,a=0,o=0,s=0,l=0,c=this._textLines.length;l<c&&a<=n.y;l++)a+=this.getHeightOfLine(l)*this.scaleY,s=l,l>0&&(o+=this._textLines[l-1].length+this.missingNewlineOffset(l-1));i=this._getLineLeftOffset(s)*this.scaleX,t=this._textLines[s],"rtl"===this.direction&&(n.x=this.width*this.scaleX-n.x+i);for(var u=0,d=t.length;u<d&&(r=i,(i+=this.__charBounds[s][u].kernedWidth*this.scaleX)<=n.x);u++)o++;return this._getNewSelectionStartFromOffset(n,r,i,o,d)},_getNewSelectionStartFromOffset:function(e,t,n,r,i){var a=e.x-t,o=n-e.x,s=r+(o>a||o<0?0:1);return this.flipX&&(s=i-s),s>this._text.length&&(s=this._text.length),s}}),C.util.object.extend(C.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=C.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var e=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+e.top+"; left: "+e.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; paddingｰtop: "+e.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):C.document.body.appendChild(this.hiddenTextarea),C.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),C.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),C.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),C.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),C.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),C.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),C.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(C.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(e){if(this.isEditing){var t="rtl"===this.direction?this.keysMapRtl:this.keysMap;if(e.keyCode in t)this[t[e.keyCode]](e);else{if(!(e.keyCode in this.ctrlKeysMapDown&&(e.ctrlKey||e.metaKey)))return;this[this.ctrlKeysMapDown[e.keyCode]](e)}e.stopImmediatePropagation(),e.preventDefault(),e.keyCode>=33&&e.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(e){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:e.keyCode in this.ctrlKeysMapUp&&(e.ctrlKey||e.metaKey)&&(this[this.ctrlKeysMapUp[e.keyCode]](e),e.stopImmediatePropagation(),e.preventDefault(),this.canvas&&this.canvas.requestRenderAll())},onInput:function(e){var t=this.fromPaste;if(this.fromPaste=!1,e&&e.stopPropagation(),this.isEditing){var n,r,i,a,o,s=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,l=this._text.length,c=s.length,u=c-l,d=this.selectionStart,h=this.selectionEnd,f=d!==h;if(""===this.hiddenTextarea.value)return this.styles={},this.updateFromTextArea(),this.fire("changed"),void(this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll()));var p=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),m=d>p.selectionStart;f?(n=this._text.slice(d,h),u+=h-d):c<l&&(n=m?this._text.slice(h+u,h):this._text.slice(d,d-u)),r=s.slice(p.selectionEnd-u,p.selectionEnd),n&&n.length&&(r.length&&(i=this.getSelectionStyles(d,d+1,!1),i=r.map((function(){return i[0]}))),f?(a=d,o=h):m?(a=h-n.length,o=h):(a=h,o=h+n.length),this.removeStyleFromTo(a,o)),r.length&&(t&&r.join("")===C.copiedText&&!C.disableStyleCopyPaste&&(i=C.copiedTextStyle),this.insertNewStyleBlock(r,d,i)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(e){this.compositionStart=e.target.selectionStart,this.compositionEnd=e.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(C.copiedText=this.getSelectedText(),C.disableStyleCopyPaste?C.copiedTextStyle=null:C.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(e){return e&&e.clipboardData||C.window.clipboardData},_getWidthBeforeCursor:function(e,t){var n,r=this._getLineLeftOffset(e);return t>0&&(r+=(n=this.__charBounds[e][t-1]).left+n.width),r},getDownCursorOffset:function(e,t){var n=this._getSelectionForOffset(e,t),r=this.get2DCursorLocation(n),i=r.lineIndex;if(i===this._textLines.length-1||e.metaKey||34===e.keyCode)return this._text.length-n;var a=r.charIndex,o=this._getWidthBeforeCursor(i,a),s=this._getIndexOnLine(i+1,o);return this._textLines[i].slice(a).length+s+1+this.missingNewlineOffset(i)},_getSelectionForOffset:function(e,t){return e.shiftKey&&this.selectionStart!==this.selectionEnd&&t?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(e,t){var n=this._getSelectionForOffset(e,t),r=this.get2DCursorLocation(n),i=r.lineIndex;if(0===i||e.metaKey||33===e.keyCode)return-n;var a=r.charIndex,o=this._getWidthBeforeCursor(i,a),s=this._getIndexOnLine(i-1,o),l=this._textLines[i].slice(0,a),c=this.missingNewlineOffset(i-1);return-this._textLines[i-1].length+s-l.length+(1-c)},_getIndexOnLine:function(e,t){for(var n,r,i=this._textLines[e],a=this._getLineLeftOffset(e),o=0,s=0,l=i.length;s<l;s++)if((a+=n=this.__charBounds[e][s].width)>t){r=!0;var c=a-n,u=a,d=Math.abs(c-t);o=Math.abs(u-t)<d?s:s-1;break}return r||(o=i.length-1),o},moveCursorDown:function(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",e)},moveCursorUp:function(e){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",e)},_moveCursorUpOrDown:function(e,t){var n=this["get"+e+"CursorOffset"](t,"right"===this._selectionDirection);t.shiftKey?this.moveCursorWithShift(n):this.moveCursorWithoutShift(n),0!==n&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(e){var t="left"===this._selectionDirection?this.selectionStart+e:this.selectionEnd+e;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,t),0!==e},moveCursorWithoutShift:function(e){return e<0?(this.selectionStart+=e,this.selectionEnd=this.selectionStart):(this.selectionEnd+=e,this.selectionStart=this.selectionEnd),0!==e},moveCursorLeft:function(e){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",e)},_move:function(e,t,n){var r;if(e.altKey)r=this["findWordBoundary"+n](this[t]);else{if(!e.metaKey&&35!==e.keyCode&&36!==e.keyCode)return this[t]+="Left"===n?-1:1,!0;r=this["findLineBoundary"+n](this[t])}if(void 0!==typeof r&&this[t]!==r)return this[t]=r,!0},_moveLeft:function(e,t){return this._move(e,t,"Left")},_moveRight:function(e,t){return this._move(e,t,"Right")},moveCursorLeftWithoutShift:function(e){var t=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(t=this._moveLeft(e,"selectionStart")),this.selectionEnd=this.selectionStart,t},moveCursorLeftWithShift:function(e){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(e,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(e,"selectionStart")):void 0},moveCursorRight:function(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",e)},_moveCursorLeftOrRight:function(e,t){var n="moveCursor"+e+"With";this._currentCursorOpacity=1,t.shiftKey?n+="Shift":n+="outShift",this[n](t)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(e){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(e,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(e,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(e){var t=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(t=this._moveRight(e,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,t},removeChars:function(e,t){void 0===t&&(t=e+1),this.removeStyleFromTo(e,t),this._text.splice(e,t-e),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(e,t,n,r){void 0===r&&(r=n),r>n&&this.removeStyleFromTo(n,r);var i=C.util.string.graphemeSplit(e);this.insertNewStyleBlock(i,n,t),this._text=[].concat(this._text.slice(0,n),i,this._text.slice(r)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),E=C.util.toFixed,S=/  +/g,C.util.object.extend(C.Text.prototype,{_toSVG:function(){var e=this._getSVGLeftTopOffsets(),t=this._getSVGTextAndBg(e.textTop,e.textLeft);return this._wrapSVGTextAndBg(t)},toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(e){var t=this.getSvgTextDecoration(this);return[e.textBgRects.join(""),'\t\t<text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",t?'text-decoration="'+t+'" ':"",'style="',this.getSvgStyles(!0),'"',this.addPaintOrder()," >",e.textSpans.join(""),"</text>\n"]},_getSVGTextAndBg:function(e,t){var n,r=[],i=[],a=e;this._setSVGBg(i);for(var o=0,s=this._textLines.length;o<s;o++)n=this._getLineLeftOffset(o),(this.textBackgroundColor||this.styleHas("textBackgroundColor",o))&&this._setSVGTextLineBg(i,o,t+n,a),this._setSVGTextLineText(r,o,t+n,a),a+=this.getHeightOfLine(o);return{textSpans:r,textBgRects:i}},_createTextCharSpan:function(e,t,n,r){var i=e!==e.trim()||e.match(S),a=this.getSvgSpanStyles(t,i),o=a?'style="'+a+'"':"",s=t.deltaY,l="",c=C.Object.NUM_FRACTION_DIGITS;return s&&(l=' dy="'+E(s,c)+'" '),['<tspan x="',E(n,c),'" y="',E(r,c),'" ',l,o,">",C.util.string.escapeXml(e),"</tspan>"].join("")},_setSVGTextLineText:function(e,t,n,r){var i,a,o,s,l,c=this.getHeightOfLine(t),u=-1!==this.textAlign.indexOf("justify"),d="",h=0,f=this._textLines[t];r+=c*(1-this._fontSizeFraction)/this.lineHeight;for(var p=0,m=f.length-1;p<=m;p++)l=p===m||this.charSpacing,d+=f[p],o=this.__charBounds[t][p],0===h?(n+=o.kernedWidth-o.width,h+=o.width):h+=o.kernedWidth,u&&!l&&this._reSpaceAndTab.test(f[p])&&(l=!0),l||(i=i||this.getCompleteStyleDeclaration(t,p),a=this.getCompleteStyleDeclaration(t,p+1),l=this._hasStyleChangedForSvg(i,a)),l&&(s=this._getStyleDeclaration(t,p)||{},e.push(this._createTextCharSpan(d,s,n,r)),d="",i=a,n+=h,h=0)},_pushTextBgRect:function(e,t,n,r,i,a){var o=C.Object.NUM_FRACTION_DIGITS;e.push("\t\t<rect ",this._getFillAttributes(t),' x="',E(n,o),'" y="',E(r,o),'" width="',E(i,o),'" height="',E(a,o),'"></rect>\n')},_setSVGTextLineBg:function(e,t,n,r){for(var i,a,o=this._textLines[t],s=this.getHeightOfLine(t)/this.lineHeight,l=0,c=0,u=this.getValueOfPropertyAt(t,0,"textBackgroundColor"),d=0,h=o.length;d<h;d++)i=this.__charBounds[t][d],(a=this.getValueOfPropertyAt(t,d,"textBackgroundColor"))!==u?(u&&this._pushTextBgRect(e,u,n+c,r,l,s),c=i.left,l=i.width,u=a):l+=i.kernedWidth;a&&this._pushTextBgRect(e,a,n+c,r,l,s)},_getFillAttributes:function(e){var t=e&&"string"==typeof e?new C.Color(e):"";return t&&t.getSource()&&1!==t.getAlpha()?'opacity="'+t.getAlpha()+'" fill="'+t.setAlpha(1).toRgb()+'"':'fill="'+e+'"'},_getSVGLineTopOffset:function(e){for(var t,n=0,r=0;r<e;r++)n+=this.getHeightOfLine(r);return t=this.getHeightOfLine(r),{lineTop:n,offset:(this._fontSizeMult-this._fontSizeFraction)*t/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(e){return C.Object.prototype.getSvgStyles.call(this,e)+" white-space: pre;"}}),function(e){"use strict";var t=e.fabric||(e.fabric={});t.Textbox=t.util.createClass(t.IText,t.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:t.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(e){for(var t=0,n=0,r=0,i={},a=0;a<e.graphemeLines.length;a++)"\n"===e.graphemeText[r]&&a>0?(n=0,r++,t++):!this.splitByGrapheme&&this._reSpaceAndTab.test(e.graphemeText[r])&&a>0&&(n++,r++),i[a]={line:t,offset:n},r+=e.graphemeLines[a].length,n+=e.graphemeLines[a].length;return i},styleHas:function(e,n){if(this._styleMap&&!this.isWrapping){var r=this._styleMap[n];r&&(n=r.line)}return t.Text.prototype.styleHas.call(this,e,n)},isEmptyStyles:function(e){if(!this.styles)return!0;var t,n,r=0,i=!1,a=this._styleMap[e],o=this._styleMap[e+1];for(var s in a&&(e=a.line,r=a.offset),o&&(i=o.line===e,t=o.offset),n=void 0===e?this.styles:{line:this.styles[e]})for(var l in n[s])if(l>=r&&(!i||l<t))for(var c in n[s][l])return!1;return!0},_getStyleDeclaration:function(e,t){if(this._styleMap&&!this.isWrapping){var n=this._styleMap[e];if(!n)return null;e=n.line,t=n.offset+t}return this.callSuper("_getStyleDeclaration",e,t)},_setStyleDeclaration:function(e,t,n){var r=this._styleMap[e];e=r.line,t=r.offset+t,this.styles[e][t]=n},_deleteStyleDeclaration:function(e,t){var n=this._styleMap[e];e=n.line,t=n.offset+t,delete this.styles[e][t]},_getLineStyle:function(e){var t=this._styleMap[e];return!!this.styles[t.line]},_setLineStyle:function(e){var t=this._styleMap[e];this.styles[t.line]={}},_wrapText:function(e,t){var n,r=[];for(this.isWrapping=!0,n=0;n<e.length;n++)r=r.concat(this._wrapLine(e[n],n,t));return this.isWrapping=!1,r},_measureWord:function(e,t,n){var r,i=0;n=n||0;for(var a=0,o=e.length;a<o;a++){i+=this._getGraphemeBox(e[a],t,a+n,r,!0).kernedWidth,r=e[a]}return i},_wrapLine:function(e,n,r,i){var a=0,o=this.splitByGrapheme,s=[],l=[],c=o?t.util.string.graphemeSplit(e):e.split(this._wordJoiners),u="",d=0,h=o?"":" ",f=0,p=0,m=0,g=!0,v=this._getWidthOfCharSpacing();i=i||0;0===c.length&&c.push([]),r-=i;for(var b=0;b<c.length;b++)u=o?c[b]:t.util.string.graphemeSplit(c[b]),f=this._measureWord(u,n,d),d+=u.length,(a+=p+f-v)>r&&!g?(s.push(l),l=[],a=f,g=!0):a+=v,g||o||l.push(h),l=l.concat(u),p=o?0:this._measureWord([h],n,d),d++,g=!1,f>m&&(m=f);return b&&s.push(l),m+i>this.dynamicMinWidth&&(this.dynamicMinWidth=m-v+i),s},isEndOfWrapping:function(e){return!this._styleMap[e+1]||this._styleMap[e+1].line!==this._styleMap[e].line},missingNewlineOffset:function(e){return this.splitByGrapheme?this.isEndOfWrapping(e)?1:0:1},_splitTextIntoLines:function(e){for(var n=t.Text.prototype._splitTextIntoLines.call(this,e),r=this._wrapText(n.lines,this.width),i=new Array(r.length),a=0;a<r.length;a++)i[a]=r[a].join("");return n.lines=i,n.graphemeLines=r,n},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var e={};for(var t in this._styleMap)this._textLines[t]&&(e[this._styleMap[t].line]=1);for(var t in this.styles)e[t]||delete this.styles[t]},toObject:function(e){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(e))}}),t.Textbox.fromObject=function(e,n){return t.Object._fromObject("Textbox",e,n,"text")}}(t),function(){var e=C.controlsUtils,t=e.scaleSkewCursorStyleHandler,n=e.scaleCursorStyleHandler,r=e.scalingEqually,i=e.scalingYOrSkewingX,a=e.scalingXOrSkewingY,o=e.scaleOrSkewActionName,s=C.Object.prototype.controls;if(s.ml=new C.Control({x:-.5,y:0,cursorStyleHandler:t,actionHandler:a,getActionName:o}),s.mr=new C.Control({x:.5,y:0,cursorStyleHandler:t,actionHandler:a,getActionName:o}),s.mb=new C.Control({x:0,y:.5,cursorStyleHandler:t,actionHandler:i,getActionName:o}),s.mt=new C.Control({x:0,y:-.5,cursorStyleHandler:t,actionHandler:i,getActionName:o}),s.tl=new C.Control({x:-.5,y:-.5,cursorStyleHandler:n,actionHandler:r}),s.tr=new C.Control({x:.5,y:-.5,cursorStyleHandler:n,actionHandler:r}),s.bl=new C.Control({x:-.5,y:.5,cursorStyleHandler:n,actionHandler:r}),s.br=new C.Control({x:.5,y:.5,cursorStyleHandler:n,actionHandler:r}),s.mtr=new C.Control({x:0,y:-.5,actionHandler:e.rotationWithSnapping,cursorStyleHandler:e.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),C.Textbox){var l=C.Textbox.prototype.controls={};l.mtr=s.mtr,l.tr=s.tr,l.br=s.br,l.tl=s.tl,l.bl=s.bl,l.mt=s.mt,l.mb=s.mb,l.mr=new C.Control({x:.5,y:0,actionHandler:e.changeWidth,cursorStyleHandler:t,actionName:"resizing"}),l.ml=new C.Control({x:-.5,y:0,actionHandler:e.changeWidth,cursorStyleHandler:t,actionName:"resizing"})}}()}).call(this,n(113).Buffer)},function(e,t,n){"use strict";var r=Array.prototype.slice,i=n(769),a=Object.keys,o=a?function(e){return a(e)}:n(1276),s=Object.keys;o.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(r.call(e)):s(e)}):Object.keys=o;return Object.keys||o},e.exports=o},function(e,t,n){"use strict";var r=n(156),i=RegExp.prototype.exec,a=Object.getOwnPropertyDescriptor,o=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!s)return"[object RegExp]"===o.call(e);var t=a(e,"lastIndex");return!(!t||!r(t,"value"))&&function(e){try{var t=e.lastIndex;return e.lastIndex=0,i.call(e),!0}catch(e){return!1}finally{e.lastIndex=t}}(e)}},function(e,t){function n(t){return e.exports=n="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.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(462),i={};i[n(164)("toStringTag")]="z",i+""!="[object z]"&&n(228)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(463),i=n(164)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(198),i=n(181),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(780)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";var r=n(1321)(!0);n(468)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,n){"use strict";var r=n(780),i=n(209),a=n(228),o=n(266),s=n(304),l=n(1322),c=n(472),u=n(1328),d=n(164)("iterator"),h=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,p,m,g,v){l(n,t,p);var b,y,A,_=function(e){if(!h&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",E="values"==m,S=!1,C=e.prototype,T=C[d]||C["@@iterator"]||m&&C[m],k=T||_(m),x=m?E?_("entries"):k:void 0,O="Array"==t&&C.entries||T;if(O&&(A=u(O.call(new e)))!==Object.prototype&&A.next&&(c(A,w,!0),r||"function"==typeof A[d]||o(A,d,f)),E&&T&&"values"!==T.name&&(S=!0,k=function(){return T.call(this)}),r&&!v||!h&&!S&&C[d]||o(C,d,k),s[t]=k,s[w]=f,m)if(b={values:E?k:_("values"),keys:g?k:_("keys"),entries:x},v)for(y in b)y in C||a(C,y,b[y]);else i(i.P+i.F*(h||S),t,b);return b}},function(e,t,n){var r=n(1324),i=n(786);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(463);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(464)("keys"),i=n(356);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(229).f,i=n(231),a=n(164)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){for(var r=n(1329),i=n(469),a=n(228),o=n(181),s=n(266),l=n(304),c=n(164),u=c("iterator"),d=c("toStringTag"),h=l.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(f),m=0;m<p.length;m++){var g,v=p[m],b=f[v],y=o[v],A=y&&y.prototype;if(A&&(A[u]||s(A,u,h),A[d]||s(A,d,v),l[v]=h,b))for(g in r)A[g]||a(A,g,r[g],!0)}},function(e,t,n){var r=n(228);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){"use strict";var r=n(181),i=n(209),a=n(228),o=n(474),s=n(361),l=n(305),c=n(475),u=n(169),d=n(303),h=n(792),f=n(472),p=n(1333);e.exports=function(e,t,n,m,g,v){var b=r[e],y=b,A=g?"set":"add",_=y&&y.prototype,w={},E=function(e){var t=_[e];a(_,e,"delete"==e?function(e){return!(v&&!u(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!u(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof y&&(v||_.forEach&&!d((function(){(new y).entries().next()})))){var S=new y,C=S[A](v?{}:-0,1)!=S,T=d((function(){S.has(1)})),k=h((function(e){new y(e)})),x=!v&&d((function(){for(var e=new y,t=5;t--;)e[A](t,t);return!e.has(-0)}));k||((y=t((function(t,n){c(t,y,e);var r=p(new b,t,y);return null!=n&&l(n,g,r[A],r),r}))).prototype=_,_.constructor=y),(T||x)&&(E("delete"),E("has"),g&&E("get")),(x||C)&&E(A),v&&_.clear&&delete _.clear}else y=m.getConstructor(t,e,g,A),o(y.prototype,n),s.NEED=!0;return f(y,e),w[e]=y,i(i.G+i.W+i.F*(y!=b),w),v||m.setStrong(y,e,g),y}},function(e,t,n){"use strict";var r=n(209);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){"use strict";var r=n(209),i=n(784),a=n(232),o=n(305);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,s,l=arguments[1];return i(this),(t=void 0!==l)&&i(l),null==e?new this:(n=[],t?(r=0,s=a(l,arguments[2],2),o(e,!1,(function(e){n.push(s(e,r++))}))):o(e,!1,n.push,n),new this(n))}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(268);t.default=class{constructor(e){this.selfAttendeeId=e,this.reset()}reset(){this.optimalReceiveSet=new r.default,this.subscribedReceiveSet=new r.default}updateIndex(e){this.optimalReceiveSet=this.calculateOptimalReceiveSet(e)}updateMetrics(e){}wantsResubscribe(){return!this.subscribedReceiveSet.equal(this.optimalReceiveSet)}chooseSubscriptions(){return this.subscribedReceiveSet=this.optimalReceiveSet.clone(),this.subscribedReceiveSet.clone()}calculateOptimalReceiveSet(e){return e.highestQualityStreamFromEachGroupExcludingSelf(this.selfAttendeeId)}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.IDLE="IDLE",e.RUNNING="RUNNING",e.CANCELED="CANCELED",e.FINISHED="FINISHED"}(r||(r={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.AudioLogEvent=void 0,function(e){e[e.DeviceChanged=0]="DeviceChanged",e[e.MutedLocal=1]="MutedLocal",e[e.UnmutedLocal=2]="UnmutedLocal",e[e.Connected=3]="Connected",e[e.ConnectFailed=4]="ConnectFailed",e[e.RedmicStartLoss=5]="RedmicStartLoss",e[e.RedmicEndLoss=6]="RedmicEndLoss"}(r=t.AudioLogEvent||(t.AudioLogEvent={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t){this.minHealth=e.minHealth,this.maxHealth=e.maxHealth,this.currentHealth=e.initialHealth,this.currentData=t.clone()}minimumHealth(){return this.minHealth}maximumHealth(){return this.maxHealth}health(){return this.maximumHealth()}update(e){this.currentData=e}getConnectionHealthData(){return this.currentData.clone()}healthy(){return this.health()>this.minimumHealth()}healthIfChanged(){const e=this.health();return e!==this.currentHealth?(this.currentHealth=e,e):null}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(157),a=n(158),o=n(820),s=n(182),l=n(211),c=n(484),u=n(823),d=n(824),h=n(233),f=n(825),p=n(826),m=n(827),g=n(485),v=n(828),b=n(829),y=n(486);class A{constructor(e,t,n=new i.default){this.logger=e,this.browserBehavior=n,this.deviceInfoCache=null,this.activeDevices={audio:null,video:null},this.chosenVideoTransformDevice=null,this.audioOutputDeviceId=null,this.deviceChangeObservers=new Set,this.deviceLabelTrigger=()=>navigator.mediaDevices.getUserMedia({audio:!0,video:!0}),this.audioInputDestinationNode=null,this.audioInputSourceNode=null,this.videoInputQualitySettings=null,this.useWebAudio=!1,this.inputDeviceCount=0,this.mediaStreamMuteObserver=(e,t)=>{for(const n of this.deviceChangeObservers)s.default.nextTick(()=>{this.deviceChangeObservers.has(n)&&n.audioInputMuteStateChanged&&n.audioInputMuteStateChanged(e,t)})},this.alreadyHandlingDeviceChange=!1;const{enableWebAudio:r=!1}=t||{};this.useWebAudio=r,this.muteCallback=e=>{var t;null===(t=this.transform)||void 0===t||t.device.mute(e)},this.videoInputQualitySettings=new b.default(A.defaultVideoWidth,A.defaultVideoHeight,A.defaultVideoFrameRate,A.defaultVideoMaxBandwidthKbps);const a=this.browserBehavior.requiresResolutionAlignment(this.videoInputQualitySettings.videoWidth,this.videoInputQualitySettings.videoHeight);this.videoInputQualitySettings.videoWidth=a[0],this.videoInputQualitySettings.videoHeight=a[1],this.logger.info(`DefaultDeviceController video dimension ${this.videoInputQualitySettings.videoWidth} x ${this.videoInputQualitySettings.videoHeight}`);try{this.mediaDeviceWrapper=(new o.default).create();const e=navigator.mediaDevices.getSupportedConstraints();this.logger.info(`Supported Constraints in this browser ${JSON.stringify(e)}`)}catch(t){e.error(t.message)}}isWatchingForDeviceChanges(){return!!this.onDeviceChangeCallback}ensureWatchingDeviceChanges(){var e;this.isWatchingForDeviceChanges()||(this.logger.info("Starting devicechange listener."),this.onDeviceChangeCallback=()=>{this.logger.info("Device change event callback is triggered"),this.handleDeviceChange()},null===(e=this.mediaDeviceWrapper)||void 0===e||e.addEventListener("devicechange",this.onDeviceChangeCallback))}stopWatchingDeviceChanges(){var e;this.isWatchingForDeviceChanges()&&(this.logger.info("Stopping devicechange listener."),null===(e=this.mediaDeviceWrapper)||void 0===e||e.removeEventListener("devicechange",this.onDeviceChangeCallback),this.onDeviceChangeCallback=void 0)}shouldObserveDeviceChanges(){if(this.deviceChangeObservers.size)return!0;return this.activeDevices.audio&&null!==this.activeDevices.audio.constraints||this.activeDevices.video&&null!==this.activeDevices.video.constraints||!!this.audioOutputDeviceId}watchForDeviceChangesIfNecessary(){this.shouldObserveDeviceChanges()?this.ensureWatchingDeviceChanges():this.stopWatchingDeviceChanges()}destroy(){var e,t;return r(this,void 0,void 0,(function*(){this.stopWatchingDeviceChanges(),yield this.chooseAudioInputDevice(null),yield this.chooseVideoInputDevice(null),null===(e=this.audioInputSourceNode)||void 0===e||e.disconnect(),null===(t=this.audioInputDestinationNode)||void 0===t||t.disconnect(),this.audioInputSourceNode=void 0,this.audioInputDestinationNode=void 0}))}listAudioInputDevices(e=!1){return r(this,void 0,void 0,(function*(){const t=yield this.listDevicesOfKind("audioinput",e);return this.trace("listAudioInputDevices",e,t),t}))}listVideoInputDevices(e=!1){return r(this,void 0,void 0,(function*(){const t=yield this.listDevicesOfKind("videoinput",e);return this.trace("listVideoInputDevices",e,t),t}))}listAudioOutputDevices(e=!1){return r(this,void 0,void 0,(function*(){const t=yield this.listDevicesOfKind("audiooutput",e);return this.trace("listAudioOutputDevices",e,t),t}))}pushAudioMeetingStateForPermissions(e){var t,n;null===(n=null===(t=this.boundAudioVideoController)||void 0===t?void 0:t.eventController)||void 0===n||n.publishEvent(null===e?"audioInputUnselected":"audioInputSelected")}pushVideoMeetingStateForPermissions(e){var t,n;null===(n=null===(t=this.boundAudioVideoController)||void 0===t?void 0:t.eventController)||void 0===n||n.publishEvent(null===e?"videoInputUnselected":"videoInputSelected")}chooseAudioInputDevice(e){var t,n;return r(this,void 0,void 0,(function*(){if(void 0===e)return void this.logger.error("Audio input device cannot be undefined");let r=this.useWebAudio;this.useWebAudio||this.logger.debug("Not using Web Audio. No need to recreate audio context."),"suspended"===(null===(t=A.audioContext)||void 0===t?void 0:t.state)&&(r=!1),r&&!this.browserBehavior.requiresContextRecreationForAudioWorklet()&&(this.logger.debug("Browser does not require audio context recreation hack."),r=!1),r&&!this.transform&&u.isAudioTransformDevice(e)&&(this.logger.debug("Neither device is a transform. No need to recreate audio context."),r=!1),r&&(this.logger.info("Recreating audio context when selecting new device."),this.transform&&(this.transform.nodes&&(this.transform.nodes.end.disconnect(),this.transform.nodes=void 0),this.transform=void 0),this.audioInputSourceNode&&(this.audioInputSourceNode.disconnect(),this.audioInputSourceNode=void 0),this.audioInputDestinationNode&&(this.audioInputDestinationNode.disconnect(),this.audioInputDestinationNode=void 0),A.closeAudioContext()),u.isAudioTransformDevice(e)?(this.logger.info(`Choosing transform input device ${e}`),yield this.chooseAudioTransformInputDevice(e)):(this.logger.info(`Choosing intrinsic audio input device ${e}`),this.removeTransform(),yield this.chooseInputIntrinsicDevice("audio",e,!1),this.trace("chooseAudioInputDevice",e,"success")),r&&(null===(n=this.boundAudioVideoController)||void 0===n?void 0:n.rtcPeerConnection)&&this.boundAudioVideoController.restartLocalAudio(()=>{this.logger.info("Local audio restarted.")}),this.pushAudioMeetingStateForPermissions(e)}))}chooseAudioTransformInputDevice(e){var t;return r(this,void 0,void 0,(function*(){if((null===(t=this.transform)||void 0===t?void 0:t.device)===e)return;if(!this.useWebAudio)throw new Error("Cannot apply transform device without enabling Web Audio.");const n=A.getAudioContext();if(n instanceof OfflineAudioContext);else switch(n.state){case"running":break;case"closed":throw new Error("Cannot choose a transform device with a closed audio context.");case"suspended":yield n.resume()}let r;try{r=yield e.createAudioNode(n)}catch(e){throw this.logger.error(`Unable to create transform device node: ${e}.`),e}const i=yield e.intrinsicDevice();yield this.chooseInputIntrinsicDevice("audio",i,!1),this.logger.debug(`Got inner stream: ${i}.`),this.setTransform(e,r)}))}chooseVideoTransformInputDevice(e){var t,n;return r(this,void 0,void 0,(function*(){if(e===this.chosenVideoTransformDevice)return void this.logger.info("Reselecting same VideoTransformDevice");const r=this.chosenVideoTransformDevice;r&&this.logger.info("Switched from previous VideoTransformDevice");const i=!!r,a=yield e.intrinsicDevice();if(!this.isMediaStreamReusableByDeviceId(null===(t=this.activeDevices.video)||void 0===t?void 0:t.stream,a))return this.logger.info("video transform device needs new intrinsic device"),i&&r.onOutputStreamDisconnect(),this.chosenVideoTransformDevice=e,this.activeDevices.video=null,void(yield this.chooseInputIntrinsicDevice("video",a,!1,!0));this.chosenVideoTransformDevice=e;const o=this.activeDevices.video.stream;if(this.logger.info("video transform device uses previous stream"),!a.id){const e=a;e.width=e.width||this.videoInputQualitySettings.videoWidth,e.height=e.height||this.videoInputQualitySettings.videoHeight,e.frameRate=e.frameRate||this.videoInputQualitySettings.videoFrameRate,yield o.getVideoTracks()[0].applyConstraints(e)}yield e.transformStream(this.activeDevices.video.stream),(null===(n=this.boundAudioVideoController)||void 0===n?void 0:n.videoTileController.hasStartedLocalVideoTile())&&(this.boundAudioVideoController.replaceLocalVideo?this.restartLocalVideoAfterSelection(!1,!0):yield this.boundAudioVideoController.update({needsRenegotiation:!0}))}))}chooseVideoInputDevice(e){return r(this,void 0,void 0,(function*(){if(void 0!==e){if(y.isVideoTransformDevice(e))return this.logger.info(`Choosing video transform device ${e}`),this.chooseVideoTransformInputDevice(e);this.updateMaxBandwidthKbps(),this.chosenVideoInputIsTransformDevice()&&(this.chosenVideoTransformDevice.onOutputStreamDisconnect(),this.chosenVideoTransformDevice=null),yield this.chooseInputIntrinsicDevice("video",e,!1),this.trace("chooseVideoInputDevice",e),this.pushVideoMeetingStateForPermissions(e)}else this.logger.error("Video input device cannot be undefined")}))}chooseAudioOutputDevice(e){return r(this,void 0,void 0,(function*(){this.audioOutputDeviceId=e,this.watchForDeviceChangesIfNecessary(),yield this.bindAudioOutput(),this.trace("chooseAudioOutputDevice",e,null)}))}addDeviceChangeObserver(e){this.logger.info("adding device change observer"),this.deviceChangeObservers.add(e),this.watchForDeviceChangesIfNecessary(),this.trace("addDeviceChangeObserver")}removeDeviceChangeObserver(e){this.logger.info("removing device change observer"),this.deviceChangeObservers.delete(e),this.watchForDeviceChangesIfNecessary(),this.trace("removeDeviceChangeObserver")}createAnalyserNodeForAudioInput(){var e,t;if(!this.activeDevices.audio)return null;const n=null===(t=null===(e=this.transform)||void 0===e?void 0:e.nodes)||void 0===t?void 0:t.end;if(n){const e=n.context.createAnalyser();return e.removeOriginalInputs=()=>{try{n.disconnect(e)}catch(e){}},n.connect(e),e}return this.createAnalyserNodeForRawAudioInput()}createAnalyserNodeForRawAudioInput(){return this.activeDevices.audio?this.createAnalyserNodeForStream(this.activeDevices.audio.stream):null}createAnalyserNodeForStream(e){const t=A.getAudioContext(),n=t.createAnalyser(),r=t.createMediaStreamSource(e);return r.connect(n),this.trace("createAnalyserNodeForAudioInput"),n.removeOriginalInputs=()=>{try{r.disconnect(n)}catch(e){}},n}startVideoPreviewForVideoInput(e){if(!this.activeDevices.video)return this.logger.warn("cannot bind video preview since video input device has not been chosen"),void this.trace("startVideoPreviewForVideoInput",e.id);const t=e.srcObject;t&&this.activeDevices.video.stream!==t&&(this.releaseMediaStream(e.srcObject),c.default.disconnectVideoStreamFromVideoElement(e,!1)),this.chosenVideoTransformDevice?c.default.connectVideoStreamToVideoElement(this.chosenVideoTransformDevice.outputMediaStream,e,!0):c.default.connectVideoStreamToVideoElement(this.activeDevices.video.stream,e,!0),this.trace("startVideoPreviewForVideoInput",e.id)}stopVideoPreviewForVideoInput(e){const t=e.srcObject,n=this.activeDevices.video;n&&this.releaseActiveDevice(n),t&&(this.releaseMediaStream(t),c.default.disconnectVideoStreamFromVideoElement(e,!1)),this.trace("stopVideoPreviewForVideoInput",e.id)}setDeviceLabelTrigger(e){if(this.deviceInfoCache)for(const e of this.deviceInfoCache)if(!e.label){this.deviceInfoCache=null;break}this.deviceLabelTrigger=e,this.trace("setDeviceLabelTrigger")}mixIntoAudioInput(e){let t=null;return this.useWebAudio?(t=A.getAudioContext().createMediaStreamSource(e),t.connect(this.getMediaStreamOutputNode())):this.logger.warn("WebAudio is not enabled, mixIntoAudioInput will not work"),this.trace("mixIntoAudioInput",e.id),t}chooseVideoInputQuality(e,t,n,r){const i=this.browserBehavior.requiresResolutionAlignment(e,t);this.videoInputQualitySettings=new b.default(i[0],i[1],n,r),this.updateMaxBandwidthKbps()}getVideoInputQualitySettings(){return this.videoInputQualitySettings}acquireAudioInputStream(){return this.acquireInputStream("audio")}acquireVideoInputStream(){return this.acquireInputStream("video")}acquireDisplayInputStream(e){return r(this,void 0,void 0,(function*(){return e&&e.video&&e.video.mandatory&&e.video.mandatory.chromeMediaSource&&e.video.mandatory.chromeMediaSourceId?navigator.mediaDevices.getUserMedia(e):navigator.mediaDevices.getDisplayMedia(e)}))}releaseAudioTransformStream(){this.logger.info("Stopping audio track for Web Audio graph"),this.stopTracksAndRemoveCallbacks("audio"),this.logger.info("Removing audio transform, if there is one."),this.removeTransform(),this.audioInputSourceNode&&(this.audioInputSourceNode.disconnect(),this.audioInputSourceNode=void 0),this.audioInputDestinationNode&&(this.audioInputDestinationNode.disconnect(),this.audioInputDestinationNode=void 0)}releaseVideoTransformStream(){this.logger.info("Stopping video track for transform"),this.stopTracksAndRemoveCallbacks("video"),this.logger.info("Disconnecting video transform"),this.chosenVideoTransformDevice.onOutputStreamDisconnect(),this.chosenVideoTransformDevice=null}stopTracksAndRemoveCallbacks(e){const t=this.activeDevices[e];if(!t)return;const n=t.endedCallback,r=t.trackMuteCallback,i=t.trackUnmuteCallback;for(const a of t.stream.getTracks())a.stop(),n&&a.removeEventListener("ended",n),r&&a.removeEventListener("mute",r),i&&a.removeEventListener("unmute",i),delete t.endedCallback,delete t.trackMuteCallback,delete t.trackUnmuteCallback,delete this.activeDevices[e]}releaseOrdinaryStream(e){var t;const n=e.getTracks();if(n.length){for(const e of n)e.stop();for(const n in this.activeDevices){const r=this.activeDevices[n];if((null==r?void 0:r.stream)===e){switch(n){case"audio":for(const t of e.getAudioTracks())t.removeEventListener("mute",r.trackMuteCallback),t.removeEventListener("unmute",r.trackUnmuteCallback),t.removeEventListener("ended",r.endedCallback);delete r.trackMuteCallback,delete r.trackUnmuteCallback,delete r.endedCallback;break;case"video":{if(r.endedCallback){for(const t of e.getTracks())t.removeEventListener("ended",r.endedCallback);delete r.endedCallback}const n=null===(t=this.boundAudioVideoController)||void 0===t?void 0:t.videoTileController;(null==n?void 0:n.hasStartedLocalVideoTile())&&n.stopLocalVideoTile();break}}delete this.activeDevices[n]}}}}releaseMediaStream(e){var t,n;if(e)try{if(e===(null===(t=this.audioInputDestinationNode)||void 0===t?void 0:t.stream))return void this.releaseAudioTransformStream();if(e===(null===(n=this.chosenVideoTransformDevice)||void 0===n?void 0:n.outputMediaStream))return void this.releaseVideoTransformStream();this.releaseOrdinaryStream(e)}finally{this.watchForDeviceChangesIfNecessary()}}chosenVideoInputIsTransformDevice(){return!!this.chosenVideoTransformDevice}bindToAudioVideoController(e){this.boundAudioVideoController&&this.unsubscribeFromMuteAndUnmuteLocalAudio(),this.boundAudioVideoController=e,this.subscribeToMuteAndUnmuteLocalAudio(),this.browserBehavior.supportsSetSinkId()&&s.default.nextTick(()=>{this.bindAudioOutput()})}subscribeToMuteAndUnmuteLocalAudio(){this.boundAudioVideoController&&this.boundAudioVideoController.realtimeController&&this.boundAudioVideoController.realtimeController.realtimeSubscribeToMuteAndUnmuteLocalAudio(this.muteCallback)}unsubscribeFromMuteAndUnmuteLocalAudio(){this.boundAudioVideoController.realtimeController&&this.boundAudioVideoController.realtimeController.realtimeUnsubscribeToMuteAndUnmuteLocalAudio(this.muteCallback)}static getIntrinsicDeviceId(e){if(void 0===e)return;if(null===e)return null;if("string"==typeof e)return e;if(e.id)return e.id;const t=e.deviceId;if(void 0===t)return;if(null===t)return null;if("string"==typeof t||Array.isArray(t))return t;const n=t;return"string"==typeof n.exact||Array.isArray(n.exact)?n.exact:void 0}static createEmptyAudioDevice(){return A.synthesizeAudioDevice(0)}static createEmptyVideoDevice(){return A.synthesizeVideoDevice("black")}static synthesizeAudioDevice(e){const t=A.getAudioContext(),n=t.createMediaStreamDestination();if(e){const r=t.createGain();r.gain.value=.1,r.connect(n);const i=t.createOscillator();i.frequency.value=e,i.connect(r),i.start()}else{const e=t.createBufferSource();try{e.buffer=t.createBuffer(1,5*t.sampleRate,t.sampleRate)}catch(n){if(!n||"NotSupportedError"!==n.name)throw n;e.buffer=t.createBuffer(1,5*A.defaultSampleRate,A.defaultSampleRate)}e.buffer.getChannelData(0)[0]=3e-4,e.loop=!0,e.connect(n),e.start()}return n.stream}static synthesizeVideoDevice(e){const t=document.createElement("canvas");t.width=480,t.height=t.width/16*9;const n=function(e,t){const n=new l.default(1e3),r=e.getContext("2d"),i=e.captureStream(5)||null;if(!i)return;n.start(()=>{"smpte"===t?function(e,t){const n=e.width,r=e.height,i=2*r/3,a=3*r/4,o=r,s=["#c0c0c0","#c0c000","#00c0c0","#00c000","#c000c0","#c00000","#0000c0"],l=["#0000c0","#000000","#c000c0","#000000","#00c0c0","#000000","#c0c0c0"],c=["#00214c","#ffffff","#32006a","#131313","#090909","#131313","#1d1d1d","#131313"],u=[0*n,1*n/4*(5/7),2*n/4*(5/7),3*n/4*(5/7),n*(5/7),n*(5/7+1/21),n*(5/7+2/21),n*(6/7),1*n],d=n/s.length,h=e.getContext("2d");for(let e=0;e<s.length;e++)h.fillStyle=s[e],h.fillRect(t+e*d,0,d,i),h.fillStyle=l[e],h.fillRect(t+e*d,i,d,a-i);for(let e=0;e<c.length;e++)h.fillStyle=c[e],h.fillRect(t+u[e],a,u[e+1]-u[e],o-a)}(e,0):(r.fillStyle=t,r.fillRect(0,0,e.width,e.height))});const a=()=>{n.stop()};return i.getVideoTracks()[0].addEventListener("ended",a),{listener:a,scheduler:n,stream:i}}(t,e);if(!n)return null;const{stream:r}=n;return r}updateMaxBandwidthKbps(){this.boundAudioVideoController&&this.boundAudioVideoController.setVideoMaxBandwidthKbps(this.videoInputQualitySettings.videoMaxBandwidthKbps)}listDevicesOfKind(e,t){return r(this,void 0,void 0,(function*(){return!t&&null!==this.deviceInfoCache&&this.isWatchingForDeviceChanges()||(yield this.updateDeviceInfoCacheFromBrowser()),this.listCachedDevicesOfKind(e)}))}updateDeviceInfoCacheFromBrowser(){return r(this,void 0,void 0,(function*(){if("undefined"==typeof MediaDeviceInfo)return void(this.deviceInfoCache=[]);let e=yield navigator.mediaDevices.enumerateDevices(),t=!0;for(const n of e)if(!n.label){t=!1;break}if(!t)try{this.logger.info("attempting to trigger media device labels since they are hidden");const t=yield this.deviceLabelTrigger();e=yield navigator.mediaDevices.enumerateDevices();for(const e of t.getTracks())e.stop()}catch(e){this.logger.info("unable to get media device labels")}this.logger.debug(`Update device info cache with devices: ${JSON.stringify(e)}`),this.deviceInfoCache=e}))}listCachedDevicesOfKind(e){const t=[];for(const n of this.deviceInfoCache)n.kind===e&&t.push(n);return t}handleDeviceChange(){return r(this,void 0,void 0,(function*(){if(null===this.deviceInfoCache)return;if(this.alreadyHandlingDeviceChange)return void s.default.nextTick(()=>{this.handleDeviceChange()});this.alreadyHandlingDeviceChange=!0;const e=this.listCachedDevicesOfKind("audioinput"),t=this.listCachedDevicesOfKind("videoinput"),n=this.listCachedDevicesOfKind("audiooutput");yield this.updateDeviceInfoCacheFromBrowser();const r=this.listCachedDevicesOfKind("audioinput"),i=this.listCachedDevicesOfKind("videoinput"),o=this.listCachedDevicesOfKind("audiooutput");this.forEachObserver(s=>{this.areDeviceListsEqual(e,r)||a.default.of(s.audioInputsChanged).map(e=>e.bind(s)(r)),this.areDeviceListsEqual(t,i)||a.default.of(s.videoInputsChanged).map(e=>e.bind(s)(i)),this.areDeviceListsEqual(n,o)||a.default.of(s.audioOutputsChanged).map(e=>e.bind(s)(o))}),this.alreadyHandlingDeviceChange=!1}))}handleDeviceStreamEnded(e,t){return r(this,void 0,void 0,(function*(){try{yield this.chooseInputIntrinsicDevice(e,null,!1)}catch(e){this.logger.error("Failed to choose null device after stream ended.")}"audio"===e?this.forEachObserver(e=>{a.default.of(e.audioInputStreamEnded).map(n=>n.bind(e)(t))}):this.forEachObserver(e=>{a.default.of(e.videoInputStreamEnded).map(n=>n.bind(e)(t))})}))}forEachObserver(e){for(const t of this.deviceChangeObservers)s.default.nextTick(()=>{this.deviceChangeObservers.has(t)&&e(t)})}areDeviceListsEqual(e,t){return JSON.stringify(e.map(e=>JSON.stringify(e)).sort())===JSON.stringify(t.map(e=>JSON.stringify(e)).sort())}intrinsicDeviceAsMediaStream(e){return e&&e.id?e:null}hasSameMediaStreamId(e,t,n){var r,i,a,o;let s;return"audio"===e?(s=null==n?void 0:n.audio.streamId,!!s&&s===(null===(i=null===(r=t.constraints)||void 0===r?void 0:r.audio)||void 0===i?void 0:i.streamId)):(s=null==n?void 0:n.video.streamId,!!s&&s===(null===(o=null===(a=t.constraints)||void 0===a?void 0:a.video)||void 0===o?void 0:o.streamId))}hasSameGroupId(e,t,n){if(""===e)return!0;const r=A.getIntrinsicDeviceId(n);return this.logger.debug(`Checking deviceIds ${r} of type ${typeof r} with groupId ${e}`),"string"==typeof r&&e===this.getGroupIdFromDeviceId(t,r)}getGroupIdFromDeviceId(e,t){if(null!==this.deviceInfoCache){const n=this.listCachedDevicesOfKind(`${e}input`).find(e=>e.deviceId===t);if(n&&n.groupId)return this.logger.debug(`GroupId of deviceId ${t} found in cache is ${n.groupId}`),n.groupId}else this.logger.error("Device cache is not populated. Please make sure to call list devices first");return this.logger.debug(`GroupId of deviceId ${t} found in cache is empty`),""}getActiveDeviceId(e){if(this.activeDevices[e]&&this.activeDevices[e].constraints){const t=(this.activeDevices[e].constraints.audio||this.activeDevices[e].constraints.video).deviceId;let n;return n="string"==typeof t?t:t.exact,n}return null}restartLocalVideoAfterSelection(e,t){return r(this,void 0,void 0,(function*(){!e&&this.boundAudioVideoController&&this.boundAudioVideoController.videoTileController.hasStartedLocalVideoTile()&&(t?(yield this.boundAudioVideoController.replaceLocalVideo(),this.logger.info("successfully replaced video track")):(this.logger.info("restarting local video to switch to new device"),this.boundAudioVideoController.restartLocalVideo(()=>{})))}))}handleGetUserMediaError(e,t){if(!e)throw new h.default(e);switch(e.name){case"NotReadableError":case"TrackStartError":throw new p.default(e);case"NotFoundError":case"DevicesNotFoundError":throw new f.default(e);case"NotAllowedError":case"PermissionDeniedError":case"SecurityError":throw t&&t<A.permissionDeniedOriginDetectionThresholdMs?new g.default(e,"Permission denied by browser"):new g.default(e,"Permission denied by user");case"OverconstrainedError":case"ConstraintNotSatisfiedError":throw new m.default(e);case"TypeError":throw new v.default(e);case"AbortError":default:throw new h.default(e)}}releaseActiveDevice(e){if(e&&e.stream){if(e.endedCallback){const t=e.stream.getTracks()[0];t&&t.removeEventListener("ended",e.endedCallback)}delete e.endedCallback,this.releaseMediaStream(e.stream),delete e.stream}}matchesDeviceSelection(e,t,n,r){return!!(n&&n.stream.active&&(this.hasSameMediaStreamId(e,n,r)||null!==n.groupId&&this.hasSameGroupId(n.groupId,e,t)))&&(this.logger.debug(`Compare current device constraint ${JSON.stringify(n.constraints)} to proposed constraints ${JSON.stringify(r)}`),n.matchesConstraints(r))}chooseInputIntrinsicDevice(e,t,n,i=!1){var a,o,s,l,c;return r(this,void 0,void 0,(function*(){this.inputDeviceCount+=1;const r=this.inputDeviceCount;if(null===t&&"video"===e){this.lastNoVideoInputDeviceCount=this.inputDeviceCount;const t=this.activeDevices[e];return void(t&&(this.releaseActiveDevice(t),delete this.activeDevices[e],this.watchForDeviceChangesIfNecessary()))}const u=this.calculateMediaStreamConstraints(e,t);if(this.matchesDeviceSelection(e,t,this.activeDevices[e],u))return void this.logger.info(`reusing existing ${e} input device`);this.activeDevices[e]&&this.activeDevices[e].stream&&("audio"===e?this.releaseActiveDevice(this.activeDevices[e]):"video"===e&&(this.stopTracksAndRemoveCallbacks("video"),delete this.activeDevices[e]));const h=Date.now(),f=new d.default;try{this.logger.info(`requesting new ${e} device with constraint ${JSON.stringify(u)}`);const n=this.intrinsicDeviceAsMediaStream(t);if("audio"===e&&null===t)f.stream=A.createEmptyAudioDevice(),f.constraints=null;else if(n)this.logger.info(`using media stream ${n.id} for ${e} device`),f.stream=n,f.constraints=u;else{if(f.stream=yield navigator.mediaDevices.getUserMedia(u),f.constraints=u,"video"===e&&this.lastNoVideoInputDeviceCount>r)return this.logger.warn(`ignored to get video device for constraints ${JSON.stringify(u)} as no device was requested`),void this.releaseMediaStream(f.stream);yield this.handleDeviceChange();const t=f.stream.getTracks()[0];f.endedCallback=()=>{this.activeDevices[e]&&this.activeDevices[e].stream===f.stream&&(this.logger.warn(`${e} input device which was active is no longer available, resetting to null device`),this.handleDeviceStreamEnded(e,this.getActiveDeviceId(e)),delete f.endedCallback)},t.addEventListener("ended",f.endedCallback,{once:!0})}if(null!==t){const t=null===(a=this.getMediaTrackSettings(f.stream))||void 0===a?void 0:a.deviceId;f.groupId=t?this.getGroupIdFromDeviceId(e,t):""}else f.groupId="";if("audio"===e){const e=f.stream.getAudioTracks()[0];if(e){const t=e.getSettings().deviceId||f.stream;f.trackMuteCallback=()=>{this.mediaStreamMuteObserver(t,!0)},f.trackUnmuteCallback=()=>{this.mediaStreamMuteObserver(t,!1)},e.addEventListener("mute",f.trackMuteCallback,{once:!1}),e.addEventListener("unmute",f.trackUnmuteCallback,{once:!1})}}}catch(t){let r;if(r=(null==t?void 0:t.name)&&t.message?`${t.name}: ${t.message}`:(null==t?void 0:t.name)?t.name:(null==t?void 0:t.message)?t.message:"UnknownError","audio"===e?null===(s=null===(o=this.boundAudioVideoController)||void 0===o?void 0:o.eventController)||void 0===s||s.publishEvent("audioInputFailed",{audioInputErrorMessage:r}):null===(c=null===(l=this.boundAudioVideoController)||void 0===l?void 0:l.eventController)||void 0===c||c.publishEvent("videoInputFailed",{videoInputErrorMessage:r}),this.logger.error(`failed to get ${e} device for constraints ${JSON.stringify(u)}: ${r}`),t&&"constraint"in t&&this.logger.error(`Over-constrained by constraint: ${t.constraint}`),"audio"===e){this.logger.info(`choosing null ${e} device instead`);try{f.stream=A.createEmptyAudioDevice(),f.constraints=null,yield this.handleNewInputDevice(e,f,n)}catch(t){this.logger.error(`failed to choose null ${e} device. ${t.name}: ${t.message}`)}}this.handleGetUserMediaError(t,Date.now()-h)}finally{this.watchForDeviceChangesIfNecessary()}if(this.logger.info(`got ${e} device for constraints ${JSON.stringify(u)}`),yield this.handleNewInputDevice(e,f,n,i),"audio"===e){this.logger.debug("Notifying mute state after selection");for(const e of f.stream.getAudioTracks())e.muted?f.trackMuteCallback():f.trackUnmuteCallback()}}))}handleNewInputDevice(e,t,n,i=!1){return r(this,void 0,void 0,(function*(){if(this.activeDevices[e]=t,this.logger.debug(`Set activeDevice to ${JSON.stringify(t)}`),this.watchForDeviceChangesIfNecessary(),"video"===e)this.chosenVideoInputIsTransformDevice()&&(this.logger.info("apply processors to transform"),yield this.chosenVideoTransformDevice.transformStream(this.activeDevices.video.stream)),yield this.restartLocalVideoAfterSelection(n,i);else if(this.useWebAudio)this.attachAudioInputStreamToAudioContext(this.activeDevices[e].stream);else if(this.boundAudioVideoController)try{yield this.boundAudioVideoController.restartLocalAudio(()=>{})}catch(e){this.logger.info(`cannot replace audio track due to: ${e.message}`)}else this.logger.info("no audio-video controller is bound to the device controller")}))}bindAudioOutput(){return r(this,void 0,void 0,(function*(){if(!this.boundAudioVideoController)return;const e=this.deviceInfoFromDeviceId("audiooutput",this.audioOutputDeviceId);yield this.boundAudioVideoController.audioMixController.bindAudioDevice(e)}))}calculateMediaStreamConstraints(e,t){let n={};""===t&&(t=null);const r=this.intrinsicDeviceAsMediaStream(t);if(null===t)return null;if("string"==typeof t?this.browserBehavior.requiresNoExactMediaStreamConstraints()&&this.browserBehavior.requiresGroupIdMediaStreamConstraints()?(n.deviceId=t,n.groupId=this.getGroupIdFromDeviceId(e,t)):this.browserBehavior.requiresNoExactMediaStreamConstraints()?n.deviceId=t:n.deviceId={exact:t}:r?n.streamId=r.id:!function(e){return"object"==typeof e&&"deviceId"in e&&"groupId"in e&&"kind"in e&&"label"in e}(t)?n=t:(n.deviceId=t.deviceId,n.groupId=t.groupId),"video"===e&&(n.width=n.width||{ideal:this.videoInputQualitySettings.videoWidth},n.height=n.height||{ideal:this.videoInputQualitySettings.videoHeight},n.frameRate=n.frameRate||{ideal:this.videoInputQualitySettings.videoFrameRate}),"audio"===e&&this.supportSampleRateConstraint()&&(n.sampleRate={ideal:A.defaultSampleRate}),"audio"===e&&this.supportSampleSizeConstraint()&&(n.sampleSize={ideal:A.defaultSampleSize}),"audio"===e&&this.supportChannelCountConstraint()&&(n.channelCount={ideal:A.defaultChannelCount}),"audio"===e){n=Object.assign({echoCancellation:!0,googEchoCancellation:!0,googEchoCancellation2:!0,googAutoGainControl:!0,googAutoGainControl2:!0,googNoiseSuppression:!0,googNoiseSuppression2:!0,googHighpassFilter:!0},n)}return"audio"===e?{audio:n}:{video:n}}deviceInfoFromDeviceId(e,t){if(null===this.deviceInfoCache)return null;for(const n of this.deviceInfoCache)if(n.kind===e&&n.deviceId===t)return n;return null}acquireInputStream(e){return r(this,void 0,void 0,(function*(){if("audio"===e&&this.useWebAudio){return this.getMediaStreamDestinationNode().stream}if("video"===e&&this.chosenVideoInputIsTransformDevice())return this.chosenVideoTransformDevice.outputMediaStream;let t=null;if(this.activeDevices[e]){this.logger.info(`checking whether existing ${e} input device can be reused`);const n=this.activeDevices[e];t=n.constraints?n.constraints[e]:null}else{if("audio"!==e)throw this.logger.error(`no ${e} device chosen, stopping local video tile`),this.boundAudioVideoController.videoTileController.stopLocalVideoTile(),new Error(`no ${e} device chosen, stopping local video tile`);this.logger.info(`no ${e} device chosen, creating empty ${e} device`)}try{yield this.chooseInputIntrinsicDevice(e,t,!0)}catch(t){if(this.logger.error(`unable to acquire ${e} device`),t instanceof g.default)throw t;throw new h.default(t,`unable to acquire ${e} device`)}return this.activeDevices[e].stream}))}hasAppliedTransform(){return!!this.transform}isMediaStreamReusableByDeviceId(e,t){if(!e||!e.active||!t)return!1;if(t.id)return e.id===t.id;const n=this.getMediaTrackSettings(e);if(!n.deviceId)return!1;const r=A.getIntrinsicDeviceId(t);return"string"==typeof r&&n.deviceId===r}getMediaTrackSettings(e){var t;return null===(t=e.getTracks()[0])||void 0===t?void 0:t.getSettings()}reconnectAudioInputs(){if(!this.audioInputSourceNode)return;this.audioInputSourceNode.disconnect();const e=this.getMediaStreamOutputNode();this.audioInputSourceNode.connect(e)}setTransform(e,t){var n,r;null===(r=null===(n=this.transform)||void 0===n?void 0:n.nodes)||void 0===r||r.end.disconnect(),this.transform={nodes:t,device:e};const i=null==t?void 0:t.end,a=this.getMediaStreamDestinationNode();this.logger.debug(`Connecting transform node ${i} to destination ${a}.`),null==i||i.connect(a),this.reconnectAudioInputs()}removeTransform(){var e;const t=this.transform;if(t)return null===(e=this.transform.nodes)||void 0===e||e.end.disconnect(),this.transform=void 0,this.reconnectAudioInputs(),t}attachAudioInputStreamToAudioContext(e){var t;null===(t=this.audioInputSourceNode)||void 0===t||t.disconnect(),this.audioInputSourceNode=A.getAudioContext().createMediaStreamSource(e);const n=this.getMediaStreamOutputNode();this.audioInputSourceNode.connect(n)}getMediaStreamDestinationNode(){return this.audioInputDestinationNode||(this.audioInputDestinationNode=A.getAudioContext().createMediaStreamDestination()),this.audioInputDestinationNode}getMediaStreamOutputNode(){var e,t;return(null===(t=null===(e=this.transform)||void 0===e?void 0:e.nodes)||void 0===t?void 0:t.start)||this.getMediaStreamDestinationNode()}static getAudioContext(){if(!A.audioContext){const e={};navigator.mediaDevices.getSupportedConstraints().sampleRate&&(e.sampleRate=A.defaultSampleRate),A.audioContext=new(window.AudioContext||window.webkitAudioContext)(e)}return A.audioContext}static closeAudioContext(){if(A.audioContext)try{A.audioContext.close()}catch(e){}A.audioContext=null}supportSampleRateConstraint(){return this.useWebAudio&&!!navigator.mediaDevices.getSupportedConstraints().sampleRate}supportSampleSizeConstraint(){return this.useWebAudio&&!!navigator.mediaDevices.getSupportedConstraints().sampleSize}supportChannelCountConstraint(){return this.useWebAudio&&!!navigator.mediaDevices.getSupportedConstraints().channelCount}trace(e,t,n){let r=`API/DefaultDeviceController/${e}`;void 0!==t&&(r+=` ${JSON.stringify(t)}`),void 0!==n&&(r+=` -> ${JSON.stringify(n)}`),this.logger.info(r)}}t.default=A,A.permissionDeniedOriginDetectionThresholdMs=500,A.defaultVideoWidth=960,A.defaultVideoHeight=540,A.defaultVideoFrameRate=15,A.defaultVideoMaxBandwidthKbps=1400,A.defaultSampleRate=48e3,A.defaultSampleSize=16,A.defaultChannelCount=1,A.audioContext=null},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(157),a=n(308),o=n(182),s=n(822);class l{constructor(e,t,n,r){this.tileController=n,this.devicePixelRatioMonitor=r,this.tileState=new s.default,this.tileState.tileId=e,this.tileState.localTile=t,this.devicePixelRatioMonitor.registerObserver(this)}static connectVideoStreamToVideoElement(e,t,n){const a=n&&"environment"!==e.getVideoTracks()[0].getSettings().facingMode?"rotateY(180deg)":"";l.setVideoElementFlag(t,"disablePictureInPicture",n),l.setVideoElementFlag(t,"disableRemotePlayback",n),t.style.transform!==a&&(t.style.transform=a),t.hasAttribute("controls")&&t.removeAttribute("controls"),t.hasAttribute("autoplay")||t.setAttribute("autoplay","true"),t.hasAttribute("playsinline")||t.setAttribute("playsinline","true"),t.hasAttribute("muted")||(t.setAttribute("muted","true"),t.muted=!0),t.srcObject!==e&&(t.srcObject=e),(new i.default).requiresVideoElementWorkaround()&&o.default.nextTick(()=>r(this,void 0,void 0,(function*(){try{yield t.play()}catch(e){}})))}static disconnectVideoStreamFromVideoElement(e,t){if(e)if(t)e.srcObject=null,e.style.transform="";else{if(!e.srcObject)return;e.pause(),e.style.transform="",l.setVideoElementFlag(e,"disablePictureInPicture",!1),l.setVideoElementFlag(e,"disableRemotePlayback",!1);const t=e.srcObject,n=t.getTracks();for(const e of n)e.stop(),t.removeTrack(e);if((new i.default).requiresVideoElementWorkaround()){const t=e.srcObject;o.default.nextTick(()=>{e.srcObject===t&&(e.srcObject=null)})}else e.srcObject=null}}destroy(){this.devicePixelRatioMonitor.removeObserver(this),this.tileState.boundVideoElement&&this.tileState.boundVideoElement.srcObject===this.tileState.boundVideoStream&&l.disconnectVideoStreamFromVideoElement(this.tileState.boundVideoElement,!1),this.tileState=new s.default}devicePixelRatioChanged(e){this.tileState.devicePixelRatio=e,this.sendTileStateUpdate()}id(){return this.tileState.tileId}state(){return this.tileState.clone()}stateRef(){return this.tileState}bindVideoStream(e,t,n,r,i,o,s){let l=!1;this.tileState.boundAttendeeId!==e&&(this.tileState.boundAttendeeId=e,new a.default(e).hasModality(a.default.MODALITY_CONTENT)&&(this.tileState.isContent=!0),l=!0),this.tileState.boundExternalUserId!==s&&(this.tileState.boundExternalUserId=s,l=!0),this.tileState.localTile!==t&&(this.tileState.localTile=t,l=!0),this.tileState.boundVideoStream!==n&&(this.tileState.boundVideoStream=n,l=!0),this.tileState.videoStreamContentWidth!==r&&(this.tileState.videoStreamContentWidth=r,l=!0),this.tileState.videoStreamContentHeight!==i&&(this.tileState.videoStreamContentHeight=i,l=!0),this.tileState.streamId!==o&&(this.tileState.streamId=o,l=!0),l&&this.sendTileStateUpdate()}bindVideoElement(e){let t=!1;this.tileState.boundVideoElement!==e&&(this.tileState.boundVideoElement=e,t=!0),null!==this.tileState.boundVideoElement?(this.tileState.videoElementCSSWidthPixels!==e.clientWidth&&(this.tileState.videoElementCSSWidthPixels=e.clientWidth,t=!0),this.tileState.videoElementCSSHeightPixels!==e.clientHeight&&(this.tileState.videoElementCSSHeightPixels=e.clientHeight,t=!0)):(this.tileState.videoElementCSSWidthPixels=null,this.tileState.videoElementCSSHeightPixels=null),t&&this.sendTileStateUpdate()}pause(){this.tileState.paused||(this.tileState.paused=!0,this.sendTileStateUpdate())}unpause(){this.tileState.paused&&(this.tileState.paused=!1,this.sendTileStateUpdate())}markPoorConnection(){return!this.tileState.poorConnection&&(this.tileState.poorConnection=!0,this.sendTileStateUpdate(),!0)}unmarkPoorConnection(){return!!this.tileState.poorConnection&&(this.tileState.poorConnection=!1,this.sendTileStateUpdate(),!0)}capture(){if(!this.tileState.active)return null;const e=document.createElement("canvas"),t=this.tileState.boundVideoElement;e.width=t.videoWidth||t.width,e.height=t.videoHeight||t.height;const n=e.getContext("2d");return n.drawImage(t,0,0,e.width,e.height),n.getImageData(0,0,e.width,e.height)}setStreamId(e){this.tileState.streamId=e,this.tileController.sendTileStateUpdate(this.state())}sendTileStateUpdate(){this.updateActiveState(),this.updateVideoStreamOnVideoElement(),this.updateVideoElementPhysicalPixels(),this.tileController.sendTileStateUpdate(this.state())}updateActiveState(){this.tileState.active=!(this.tileState.paused||this.tileState.poorConnection||!this.tileState.boundAttendeeId||!this.tileState.boundVideoElement||!this.tileState.boundVideoStream)}updateVideoElementPhysicalPixels(){"number"==typeof this.tileState.videoElementCSSWidthPixels&&"number"==typeof this.tileState.videoElementCSSHeightPixels?(this.tileState.videoElementPhysicalWidthPixels=this.tileState.devicePixelRatio*this.tileState.videoElementCSSWidthPixels,this.tileState.videoElementPhysicalHeightPixels=this.tileState.devicePixelRatio*this.tileState.videoElementCSSHeightPixels):(this.tileState.videoElementPhysicalWidthPixels=null,this.tileState.videoElementPhysicalHeightPixels=null)}updateVideoStreamOnVideoElement(){this.tileState.active?l.connectVideoStreamToVideoElement(this.tileState.boundVideoStream,this.tileState.boundVideoElement,this.tileState.localTile):l.disconnectVideoStreamFromVideoElement(this.tileState.boundVideoElement,this.tileState.paused)}static setVideoElementFlag(e,t,n){t in e&&(e[t]=n)}}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(233);class i extends r.default{constructor(e,t){super(e,t)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVideoTransformDevice=void 0,t.isVideoTransformDevice=function(e){return!!e&&"object"==typeof e&&"transformStream"in e&&"stop"in e&&"intrinsicDevice"in e}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(157);t.default=class{constructor(e){this.logger=e,this.audioDevice=null,this.audioElement=null,this.audioStream=null,this.browserBehavior=new i.default}bindAudioElement(e){return r(this,void 0,void 0,(function*(){if(!e)throw new Error(`Cannot bind audio element: ${e}`);return this.audioElement=e,this.audioElement.autoplay=!0,this.bindAudioMix()}))}unbindAudioElement(){this.audioElement&&(this.audioElement.srcObject=null,this.audioElement=null)}bindAudioStream(e){return r(this,void 0,void 0,(function*(){if(e){this.audioStream=e;try{yield this.bindAudioMix()}catch(e){this.logger&&this.logger.warn(`Failed to bind audio stream: ${e}`)}}}))}bindAudioDevice(e){return r(this,void 0,void 0,(function*(){if(e&&!this.browserBehavior.supportsSetSinkId())throw new Error("Cannot select audio output device. This browser does not support setSinkId.");return this.audioDevice=e,this.bindAudioMix()}))}bindAudioMix(){var e,t;return r(this,void 0,void 0,(function*(){if(!this.audioElement)return;this.audioStream&&(this.audioElement.srcObject=this.audioStream);const n=(null===(e=this.audioDevice)||void 0===e?void 0:e.deviceId)!==this.audioElement.sinkId;if(n&&void 0===this.audioElement.sinkId)throw new Error("Cannot select audio output device. This browser does not support setSinkId.");const r=this.audioDevice?this.audioDevice.deviceId:"";if(r===this.audioElement.sinkId)return;const i=this.audioElement,a=this.audioStream;if(this.browserBehavior.hasChromiumWebRTC()&&(i.srcObject=null),n)try{yield i.setSinkId(r)}catch(e){throw null===(t=this.logger)||void 0===t||t.error(`Failed to set sinkId for audio element: ${e}`),e}this.browserBehavior.hasChromiumWebRTC()&&(i.srcObject=a)}))}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(834),a=n(487),o=n(799),s=n(157),l=n(815),c=n(835),u=n(836),d=n(158),h=n(310),f=n(183),p=n(489),m=n(840),g=n(841),v=n(182),b=n(849),y=n(490),A=n(491),_=n(492),w=n(851),E=n(146),S=n(853),C=n(133),T=n(854),k=n(797),x=n(812),O=n(813),I=n(830),M=n(831),P=n(860),D=n(861),N=n(863),L=n(864),R=n(865),B=n(868),j=n(870),F=n(871),U=n(872),H=n(873),z=n(874),V=n(875),W=n(876),G=n(877),q=n(878),Y=n(879),K=n(880),X=n(494),Q=n(882),$=n(366),J=n(495),Z=n(883),ee=n(311),te=n(479),ne=n(496),re=n(268),ie=n(499),ae=n(885),oe=n(886),se=n(889),le=n(890),ce=n(501),ue=n(892),de=n(800);class he{constructor(e,t,n,r,i,c){this._audioProfile=new o.default,this.connectionHealthData=new l.default,this.observerQueue=new Set,this.meetingSessionContext=new de.default,this.enableSimulcast=!1,this.useUpdateTransceiverControllerForUplink=!1,this.totalRetryCount=0,this.startAudioVideoTimestamp=0,this.mayNeedRenegotiationForSimulcastLayerChange=!1,this.destroyed=!1,this.usePromises=!0,this._logger=t,this.sessionStateController=new b.default(this._logger),this._configuration=e,this.enableSimulcast=e.enableUnifiedPlanForChromiumBasedBrowsers&&e.enableSimulcastForUnifiedPlanChromiumBasedBrowsers&&(new s.default).hasChromiumWebRTC(),this._webSocketAdapter=n,this._realtimeController=new g.default,this._realtimeController.realtimeSetLocalAttendeeId(e.credentials.attendeeId,e.credentials.externalUserId),this._mediaStreamBroker=r,this._reconnectController=i,this._videoTileController=new oe.default(new se.default,this,this._logger),this._audioMixController=new a.default(this._logger),this.meetingSessionContext.logger=this._logger,this._eventController=new u.default(this,c),e.videoDownlinkBandwidthPolicy instanceof ne.default&&e.videoDownlinkBandwidthPolicy.bindToTileController(this._videoTileController)}destroy(){return r(this,void 0,void 0,(function*(){this.observerQueue.clear(),this.destroyed=!0}))}get configuration(){return this._configuration}get realtimeController(){return this._realtimeController}get activeSpeakerDetector(){return this._activeSpeakerDetector||(this._activeSpeakerDetector=new i.default(this._realtimeController,this._configuration.credentials.attendeeId,this.handleHasBandwidthPriority.bind(this))),this._activeSpeakerDetector}get videoTileController(){return this._videoTileController}get audioMixController(){return this._audioMixController}get eventController(){return this._eventController}get logger(){return this._logger}get rtcPeerConnection(){return this.meetingSessionContext&&this.meetingSessionContext.peer||null}get mediaStreamBroker(){return this._mediaStreamBroker}getRTCPeerConnectionStats(e){return this.rtcPeerConnection?this.rtcPeerConnection.getStats(e):null}setAudioProfile(e){this._audioProfile=e}addObserver(e){this.logger.info("adding meeting observer"),this.observerQueue.add(e)}removeObserver(e){this.logger.info("removing meeting observer"),this.observerQueue.delete(e)}forEachObserver(e){for(const t of this.observerQueue)v.default.nextTick(()=>{this.observerQueue.has(t)&&e(t)})}initSignalingClient(){this.meetingSessionContext.signalingClient||(this.connectionHealthData.reset(),this.meetingSessionContext=new de.default,this.meetingSessionContext.logger=this.logger,this.meetingSessionContext.eventController=this.eventController,this.meetingSessionContext.browserBehavior=new s.default({enableUnifiedPlanForChromiumBasedBrowsers:this.configuration.enableUnifiedPlanForChromiumBasedBrowsers}),this.meetingSessionContext.meetingSessionConfiguration=this.configuration,this.meetingSessionContext.signalingClient=new w.default(this._webSocketAdapter,this.logger))}uninstallPreStartObserver(){this.meetingSessionContext.signalingClient.removeObserver(this.preStartObserver),this.preStartObserver=void 0}prestart(){return this.logger.info("Pre-connecting signaling connection."),this.createOrReuseSignalingTask().run().then(()=>{const e=()=>r(this,void 0,void 0,(function*(){this.logger.info("Early connection closed; discarding signaling task."),this.signalingTask=void 0,this.uninstallPreStartObserver()}));this.preStartObserver={handleSignalingClientEvent(t){t.type===E.default.WebSocketClosed&&e()}},this.meetingSessionContext.signalingClient.registerObserver(this.preStartObserver)}).catch(e=>{this.logger.error(`Signaling task pre-start failed: ${e}`),this.signalingTask=void 0})}start(e){this.startReturningPromise(e).then(()=>{this.logger.info("start completed")}).catch(e=>{this.logger.error(`start failed: ${e}`)})}startReturningPromise(e){return!0===(null==e?void 0:e.signalingOnly)?this.prestart():(this.activeSpeakerDetector,new Promise((e,t)=>{this.sessionStateController.perform(y.default.Connect,()=>{this.actionConnect(!1).then(e).catch(t)})}))}connectWithPromises(e){const t=this.meetingSessionContext,n=new R.default(t,this.configuration.connectionHealthPolicyConfiguration,this.connectionHealthData).once(),r=new F.default(t).once(),i=new G.default(this.logger,"Signaling",[this.createOrReuseSignalingTask(),new L.default(t),new W.default(t),new D.default(t),new U.default(t),new z.default(t)]).once(),a=new I.default(t).once(i),o=new k.default(t).once(a,r),s=new M.default(t).once(o),l=new q.default(t).once(s),c=new P.default(t).once(l),u=new K.default(t).once(c);return new G.default(this.logger,this.wrapTaskName("AudioVideoStart"),[n,((e,t)=>new X.default(this.logger,t,e))(this.configuration.connectionTimeoutMs,new G.default(this.logger,"Peer",[u,e?new X.default(this.logger,new j.default(this.logger,"FinalizeConnection",[new Q.default(t),new Y.default(t)]),this.meetingSessionContext.meetingSessionConfiguration.attendeePresenceTimeoutMs):new Y.default(t)]))])}connectWithTasks(e){return new G.default(this.logger,this.wrapTaskName("AudioVideoStart"),[new R.default(this.meetingSessionContext,this.configuration.connectionHealthPolicyConfiguration,this.connectionHealthData),new F.default(this.meetingSessionContext),new X.default(this.logger,new G.default(this.logger,"Media",[new G.default(this.logger,"Signaling",[new B.default(this.meetingSessionContext),new L.default(this.meetingSessionContext),new W.default(this.meetingSessionContext),new D.default(this.meetingSessionContext),new U.default(this.meetingSessionContext),new z.default(this.meetingSessionContext)]),new G.default(this.logger,"Peer",[new I.default(this.meetingSessionContext),new k.default(this.meetingSessionContext),new M.default(this.meetingSessionContext),new q.default(this.meetingSessionContext),new P.default(this.meetingSessionContext),new K.default(this.meetingSessionContext),e?new X.default(this.logger,new j.default(this.logger,"FinalizeConnection",[new Q.default(this.meetingSessionContext),new Y.default(this.meetingSessionContext)]),this.meetingSessionContext.meetingSessionConfiguration.attendeePresenceTimeoutMs):new Y.default(this.meetingSessionContext)])]),this.configuration.connectionTimeoutMs)])}actionConnect(e){return r(this,void 0,void 0,(function*(){this.initSignalingClient(),this.uninstallPreStartObserver(),this.meetingSessionContext.mediaStreamBroker=this._mediaStreamBroker,this.meetingSessionContext.realtimeController=this._realtimeController,this.meetingSessionContext.audioMixController=this._audioMixController,this.meetingSessionContext.audioVideoController=this;const t=!!this.configuration.urls.audioHostURL;if(t?this.enableSimulcast?(this.logger.info("Using transceiver controller with simulcast support"),this.meetingSessionContext.transceiverController=new J.default(this.logger,this.meetingSessionContext.browserBehavior)):(this.logger.info("Using default transceiver controller"),this.meetingSessionContext.transceiverController=new $.default(this.logger,this.meetingSessionContext.browserBehavior)):(this.logger.info("Using video only transceiver controller"),this.meetingSessionContext.transceiverController=new Z.default(this.logger,this.meetingSessionContext.browserBehavior)),this.meetingSessionContext.volumeIndicatorAdapter=new ue.default(this.logger,this._realtimeController,he.MIN_VOLUME_DECIBELS,he.MAX_VOLUME_DECIBELS,this.configuration.credentials.attendeeId),this.meetingSessionContext.videoTileController=this._videoTileController,this.meetingSessionContext.videoDownlinkBandwidthPolicy=this.configuration.videoDownlinkBandwidthPolicy,this.meetingSessionContext.videoUplinkBandwidthPolicy=this.configuration.videoUplinkBandwidthPolicy,this.meetingSessionContext.enableSimulcast=this.enableSimulcast,this.enableSimulcast){const e=new le.default(this.configuration.credentials.attendeeId,this.meetingSessionContext.logger);e.addObserver(this),this.meetingSessionContext.videoUplinkBandwidthPolicy=e,this.meetingSessionContext.videoStreamIndex=new ae.default(this.logger)}else this.meetingSessionContext.enableSimulcast=!1,this.meetingSessionContext.videoStreamIndex=new ie.default(this.logger),this.meetingSessionContext.videoDownlinkBandwidthPolicy||(this.meetingSessionContext.videoDownlinkBandwidthPolicy=new te.default(this.configuration.credentials.attendeeId)),this.meetingSessionContext.videoUplinkBandwidthPolicy||(this.meetingSessionContext.videoUplinkBandwidthPolicy=new ce.default(this.configuration.credentials.attendeeId)),this.meetingSessionContext.videoUplinkBandwidthPolicy.setTransceiverController&&this.meetingSessionContext.videoUplinkBandwidthPolicy.updateTransceiverController&&this.meetingSessionContext.browserBehavior.requiresUnifiedPlan()&&(this.useUpdateTransceiverControllerForUplink=!0,this.meetingSessionContext.videoUplinkBandwidthPolicy.setTransceiverController(this.meetingSessionContext.transceiverController)),this.meetingSessionContext.audioProfile=this._audioProfile;this.meetingSessionContext.lastKnownVideoAvailability=new p.default,this.meetingSessionContext.videoCaptureAndEncodeParameter=new ee.default(0,0,0,0,!1),this.meetingSessionContext.videosToReceive=new re.default,this.meetingSessionContext.videosPaused=new re.default,this.meetingSessionContext.statsCollector=new T.default(this,this.logger,this.meetingSessionContext.browserBehavior),this.meetingSessionContext.connectionMonitor=new c.default(this,this._realtimeController,this._videoTileController,this.connectionHealthData,new m.default(this.meetingSessionContext.signalingClient,he.PING_PONG_INTERVAL_MS,this.logger),this.meetingSessionContext.statsCollector),this.meetingSessionContext.reconnectController=this._reconnectController,this.meetingSessionContext.videoDeviceInformation={},e||(this.totalRetryCount=0,this._reconnectController.reset(),this.startAudioVideoTimestamp=Date.now(),this.forEachObserver(e=>{d.default.of(e.audioVideoDidStartConnecting).map(t=>t.bind(e)(!1))}),this.eventController&&this.eventController.publishEvent("meetingStartRequested")),this.meetingSessionContext.startAudioVideoTimestamp=this.startAudioVideoTimestamp,this._reconnectController.hasStartedConnectionAttempt()?this._reconnectController.startedConnectionAttempt(!1):this._reconnectController.startedConnectionAttempt(!0);const n=t&&this.meetingSessionContext.meetingSessionConfiguration.attendeePresenceTimeoutMs>0;let i;this.logger.info("Needs to wait for attendee presence? "+n),i=this.usePromises?this.connectWithPromises(n):this.connectWithTasks(n);try{yield i.run(),this.connectionHealthData.setConnectionStartTime(),this.sessionStateController.perform(y.default.FinishConnecting,()=>{this.eventController&&(this.meetingSessionContext.meetingStartDurationMs=Date.now()-this.startAudioVideoTimestamp,this.eventController.publishEvent("meetingStartSucceeded",{maxVideoTileCount:this.meetingSessionContext.maxVideoTileCount,poorConnectionCount:this.meetingSessionContext.poorConnectionCount,retryCount:this.totalRetryCount,signalingOpenDurationMs:this.meetingSessionContext.signalingOpenDurationMs,iceGatheringDurationMs:this.meetingSessionContext.iceGatheringDurationMs,meetingStartDurationMs:this.meetingSessionContext.meetingStartDurationMs})),this.meetingSessionContext.startTimeMs=Date.now(),this.actionFinishConnecting()})}catch(e){this.signalingTask=void 0;const t=new h.default(this.getMeetingStatusCode(e)||f.default.TaskFailed);if(this.logger.info(`Start failed: ${t} due to error ${e}.`),this.sessionStateController.state()===A.default.NotConnected)return void this.logger.info("Start failed and not connected. Not cleaning up.");this.sessionStateController.perform(y.default.Fail,()=>r(this,void 0,void 0,(function*(){yield this.actionDisconnect(t,!0,e),this.handleMeetingSessionStatus(t,e)||this.notifyStop(t,e)})))}}))}createOrReuseSignalingTask(){return this.signalingTask||(this.initSignalingClient(),this.signalingTask=new X.default(this.logger,new B.default(this.meetingSessionContext),this.configuration.connectionTimeoutMs).once()),this.signalingTask}actionFinishConnecting(){this.signalingTask=void 0,this.meetingSessionContext.videoDuplexMode=C.SdkStreamServiceType.RX,this.meetingSessionContext.enableSimulcast||(this.useUpdateTransceiverControllerForUplink?this.meetingSessionContext.videoUplinkBandwidthPolicy.updateTransceiverController():this.enforceBandwidthLimitationForSender(this.meetingSessionContext.videoCaptureAndEncodeParameter.encodeBitrates()[0])),this.forEachObserver(e=>{d.default.of(e.audioVideoDidStart).map(t=>t.bind(e)())}),this._reconnectController.reset()}stopReturningPromise(){var e;return this.sessionStateController.state()===A.default.NotConnected?(null===(e=this.meetingSessionContext.signalingClient)||void 0===e||e.closeConnection(),new V.default(this.meetingSessionContext).run()):new Promise((e,t)=>{this.sessionStateController.perform(y.default.Disconnect,()=>{this._reconnectController.disableReconnect(),this.logger.info("attendee left meeting, session will not be reconnected"),this.actionDisconnect(new h.default(f.default.Left),!1,null).then(e).catch(t)})})}stop(){this.stopReturningPromise()}actionDisconnect(e,t,n){return r(this,void 0,void 0,(function*(){try{yield new G.default(this.logger,this.wrapTaskName("AudioVideoStop"),[new X.default(this.logger,new N.default(this.meetingSessionContext),this.configuration.connectionTimeoutMs)]).run()}catch(e){this.logger.info("fail to stop")}try{const e=[new X.default(this.logger,new O.default(this.meetingSessionContext),this.configuration.connectionTimeoutMs)];t||e.push(new V.default(this.meetingSessionContext)),yield new G.default(this.logger,this.wrapTaskName("AudioVideoClean"),e).run()}catch(e){this.logger.info("fail to clean")}this.sessionStateController.perform(y.default.FinishDisconnecting,()=>{t||this.notifyStop(e,n)})}))}update(e={needsRenegotiation:!0}){let t=e.needsRenegotiation;if(t||(t=void 0===this.meetingSessionContext.peer),t||(t=!this.updateRemoteVideosFromLastVideosToReceive()),t||(t=!this.updateLocalVideoFromPolicy()),this.meetingSessionContext.lastVideosToReceive=this.meetingSessionContext.videosToReceive,!t)return this.logger.info("Update request does not require resubscribe"),this.actionFinishUpdating(),!0;this.logger.info("Update request requires resubscribe");const n=this.sessionStateController.perform(y.default.Update,()=>{this.actionUpdateWithRenegotiation(!0)});return n===_.default.Transitioned||n===_.default.DeferredTransition}updateRemoteVideosFromLastVideosToReceive(){var e,t;const n=this.meetingSessionContext;if((null===(e=n.videosToReceive)||void 0===e?void 0:e.empty())||(null===(t=n.lastVideosToReceive)||void 0===t?void 0:t.empty()))return!1;if(!(n.transceiverController&&n.transceiverController.getMidForStreamId&&n.transceiverController.setStreamIdForMid&&n.videosToReceive.forEach&&n.signalingClient.remoteVideoUpdate&&n.videoStreamIndex.overrideStreamIdMappings))return!1;let r=[];const i=new Map;let a=[];if(null===n.lastVideosToReceive)r=n.videosToReceive.array();else{const e=n.videoStreamIndex;n.videosToReceive.forEach(t=>{if(n.lastVideosToReceive.contain(t))return;let a=!1;n.lastVideosToReceive.forEach(n=>{a||e.StreamIdsInSameGroup(n,t)&&(i.set(n,t),a=!0)}),a||r.push(t)}),a=n.lastVideosToReceive.array().filter(e=>{const t=n.videosToReceive.contain(e),r=i.has(e);return!t&&!r})}this.logger.info(`Request to update remote videos with added: ${r}, updated: ${[...i.entries()]}, removed: ${a}`);const o=[];for(const[e,t]of i.entries()){const r=new S.default;if(r.streamId=t,r.attendeeId=n.videoStreamIndex.attendeeIdForStreamId(t),r.mid=n.transceiverController.getMidForStreamId(e),void 0===r.mid)return this.logger.info(`No MID found for stream ID ${e}, cannot update stream without renegotiation`),!1;if(o.push(r),n.transceiverController.setStreamIdForMid(r.mid,t),n.videoStreamIndex.overrideStreamIdMappings(e,t),n.videoTileController.haveVideoTileForAttendeeId(r.attendeeId)){const e=n.videoTileController.getVideoTileForAttendeeId(r.attendeeId);if(!e.setStreamId)return!1;e.setStreamId(t)}}return 0!==o.length&&n.signalingClient.remoteVideoUpdate(o,[]),0===r.length&&0===a.length}updateLocalVideoFromPolicy(){return this.mayNeedRenegotiationForSimulcastLayerChange?(this.logger.info("Needs regenotiation for local video simulcast layer change"),this.mayNeedRenegotiationForSimulcastLayerChange=!1,!1):(this.logger.info("Updating local video from policy without renegotiation"),this.meetingSessionContext.enableSimulcast?new k.default(this.meetingSessionContext).run():new H.default(this.meetingSessionContext).run(),!0)}restartLocalVideo(e){const t=()=>r(this,void 0,void 0,(function*(){this._videoTileController.hasStartedLocalVideoTile()&&(this.logger.info("stopping local video tile prior to local video restart"),this._videoTileController.stopLocalVideoTile(),this.logger.info("preparing local video restart update"),yield this.actionUpdateWithRenegotiation(!1),this.logger.info("starting local video tile for local video restart"),this._videoTileController.startLocalVideoTile()),this.logger.info("finalizing local video restart update"),yield this.actionUpdateWithRenegotiation(!0),e()})),n=this.sessionStateController.perform(y.default.Update,()=>{t()});return n===_.default.Transitioned||n===_.default.DeferredTransition}replaceLocalVideo(){return r(this,void 0,void 0,(function*(){let e=null;try{e=yield this.mediaStreamBroker.acquireVideoInputStream()}catch(e){throw new Error(`could not acquire video stream from mediaStreamBroker due to ${e.message}`)}if(!e||e.getVideoTracks().length<1)throw new Error("could not acquire video track");const t=e.getVideoTracks()[0];if(!this.meetingSessionContext||!this.meetingSessionContext.peer)throw new Error("no active meeting and peer connection");if(!this.meetingSessionContext.browserBehavior.requiresUnifiedPlan())throw new Error("cannot replace track on Plan B");yield this.meetingSessionContext.transceiverController.setVideoInput(t);const n=this.meetingSessionContext.videoTileController.getLocalVideoTile();if(n){const t=n.state(),r=e.getVideoTracks()[0].getSettings();n.bindVideoStream(t.boundAttendeeId,!0,e,r.width,r.height,t.streamId,t.boundExternalUserId)}this.meetingSessionContext.activeVideoInput=e}))}restartLocalAudio(e){return r(this,void 0,void 0,(function*(){let t=null;try{t=yield this.mediaStreamBroker.acquireAudioInputStream()}catch(e){this.logger.info("could not acquire audio stream from mediaStreamBroker")}if(!t||t.getAudioTracks().length<1)throw new Error("could not acquire audio track");this.connectionHealthData.reset(),this.connectionHealthData.setConnectionStartTime();const n=t.getAudioTracks()[0];if(!this.meetingSessionContext||!this.meetingSessionContext.peer)throw new Error("no active meeting and peer connection");let r=!1;return r=this.meetingSessionContext.browserBehavior.requiresUnifiedPlan()?yield this.meetingSessionContext.transceiverController.replaceAudioTrack(n):yield $.default.replaceAudioTrackForSender(this.meetingSessionContext.localAudioSender,n),this._realtimeController.realtimeSetLocalAudioInput(t),this.meetingSessionContext.activeAudioInput=t,e(),r?Promise.resolve():Promise.reject()}))}actionUpdateWithRenegotiation(e){return r(this,void 0,void 0,(function*(){try{yield new G.default(this.logger,this.wrapTaskName("AudioVideoUpdate"),[new H.default(this.meetingSessionContext),new X.default(this.logger,new G.default(this.logger,"UpdateSession",[new k.default(this.meetingSessionContext),new M.default(this.meetingSessionContext),new q.default(this.meetingSessionContext),new P.default(this.meetingSessionContext),new K.default(this.meetingSessionContext),new Y.default(this.meetingSessionContext)]),this.configuration.connectionTimeoutMs)]).run(),e&&this.sessionStateController.perform(y.default.FinishUpdating,()=>{this.actionFinishUpdating()})}catch(e){this.sessionStateController.perform(y.default.FinishUpdating,()=>{const t=new h.default(this.getMeetingStatusCode(e)||f.default.TaskFailed);t.statusCode()!==f.default.IncompatibleSDP&&this.logger.info("failed to update audio-video session"),this.handleMeetingSessionStatus(t,e)})}}))}notifyStop(e,t){var n;if(this.forEachObserver(t=>{d.default.of(t.audioVideoDidStop).map(n=>n.bind(t)(e))}),this.eventController){const{signalingOpenDurationMs:r,poorConnectionCount:i,startTimeMs:a,iceGatheringDurationMs:o,attendeePresenceDurationMs:s,meetingStartDurationMs:l}=this.meetingSessionContext,c={maxVideoTileCount:this.meetingSessionContext.maxVideoTileCount,meetingDurationMs:null===a?0:Math.round(Date.now()-a),meetingStatus:f.default[e.statusCode()],signalingOpenDurationMs:r,iceGatheringDurationMs:o,attendeePresenceDurationMs:s,poorConnectionCount:i,meetingStartDurationMs:l,retryCount:this.totalRetryCount},u=t&&t.message||(null===(n=e.toString)||void 0===n?void 0:n.call(e))||"";0===c.meetingDurationMs?(c.meetingErrorMessage=u,delete c.meetingDurationMs,delete c.attendeePresenceDurationMs,delete c.meetingStartDurationMs,this.eventController.publishEvent("meetingStartFailed",c)):e.isFailure()||e.isAudioConnectionFailure()?(c.meetingErrorMessage=u,this.eventController.publishEvent("meetingFailed",c)):this.eventController.publishEvent("meetingEnded",c)}}actionFinishUpdating(){if(!this.meetingSessionContext.enableSimulcast)if(this.useUpdateTransceiverControllerForUplink)this.meetingSessionContext.videoUplinkBandwidthPolicy.updateTransceiverController();else{const e=this.meetingSessionContext.videoCaptureAndEncodeParameter.encodeBitrates()[0];this.enforceBandwidthLimitationForSender(e)}this.logger.info("updated audio-video session")}reconnect(e,t){const n=this._reconnectController.retryWithBackoff(()=>r(this,void 0,void 0,(function*(){this.sessionStateController.state()===A.default.NotConnected?this.sessionStateController.perform(y.default.Connect,()=>{this.actionConnect(!0)}):this.sessionStateController.perform(y.default.Reconnect,()=>{this.actionReconnect(e)}),this.totalRetryCount+=1})),()=>{this.logger.info("canceled retry")});return n||this.sessionStateController.perform(y.default.Fail,()=>{this.actionDisconnect(e,!1,t)}),n}actionReconnect(e){return r(this,void 0,void 0,(function*(){this._reconnectController.hasStartedConnectionAttempt()||(this._reconnectController.startedConnectionAttempt(!1),this.forEachObserver(e=>{d.default.of(e.audioVideoDidStartConnecting).map(t=>t.bind(e)(!0))})),this.meetingSessionContext.volumeIndicatorAdapter.onReconnect(),this.connectionHealthData.reset();try{yield new G.default(this.logger,this.wrapTaskName("AudioVideoReconnect"),[new X.default(this.logger,new G.default(this.logger,"Media",[new x.default(this.meetingSessionContext),new G.default(this.logger,"Signaling",[new B.default(this.meetingSessionContext),new D.default(this.meetingSessionContext),new U.default(this.meetingSessionContext)]),new I.default(this.meetingSessionContext)]),this.configuration.connectionTimeoutMs),new H.default(this.meetingSessionContext),new X.default(this.logger,new G.default(this.logger,"UpdateSession",[new k.default(this.meetingSessionContext),new M.default(this.meetingSessionContext),new q.default(this.meetingSessionContext),new P.default(this.meetingSessionContext),new K.default(this.meetingSessionContext),new Y.default(this.meetingSessionContext)]),this.configuration.connectionTimeoutMs)]).run(),this.sessionStateController.perform(y.default.FinishConnecting,()=>{if(this.eventController){const{signalingOpenDurationMs:t,poorConnectionCount:n,startTimeMs:r,iceGatheringDurationMs:i,attendeePresenceDurationMs:a,meetingStartDurationMs:o}=this.meetingSessionContext,s={maxVideoTileCount:this.meetingSessionContext.maxVideoTileCount,meetingDurationMs:Math.round(Date.now()-r),meetingStatus:f.default[e.statusCode()],signalingOpenDurationMs:t,iceGatheringDurationMs:i,attendeePresenceDurationMs:a,poorConnectionCount:n,meetingStartDurationMs:o,retryCount:this.totalRetryCount};this.eventController.publishEvent("meetingReconnected",s)}this.actionFinishConnecting()})}catch(e){this.sessionStateController.perform(y.default.FinishConnecting,()=>{this.logger.info("failed to reconnect audio-video session");const t=new h.default(this.getMeetingStatusCode(e)||f.default.TaskFailed);this.handleMeetingSessionStatus(t,e)})}this.connectionHealthData.setConnectionStartTime()}))}wrapTaskName(e){return`${e}/${this.configuration.meetingId}/${this.configuration.credentials.attendeeId}`}getMeetingStatusCode(e){const t=/the meeting status code: (\d+)/.exec(e&&e.message);return t&&t.length>1?Number.parseInt(t[1],10):null}enforceBandwidthLimitationForSender(e){return r(this,void 0,void 0,(function*(){this.meetingSessionContext.browserBehavior.requiresUnifiedPlan()?yield this.meetingSessionContext.transceiverController.setVideoSendingBitrateKbps(e):yield $.default.setVideoSendingBitrateKbpsForSender(this.meetingSessionContext.localVideoSender,e,this.meetingSessionContext.logger)}))}handleMeetingSessionStatus(e,t){if(this.logger.info(`handling status: ${f.default[e.statusCode()]}`),e.isTerminal()||this.meetingSessionContext.statsCollector&&this.meetingSessionContext.statsCollector.logMeetingSessionStatus(e),e.statusCode()===f.default.IncompatibleSDP)return this.restartLocalVideo(()=>{this.logger.info("handled incompatible SDP by attempting to restart video")}),!0;if(e.statusCode()===f.default.VideoCallSwitchToViewOnly)return this._videoTileController.removeLocalVideoTile(),this.forEachObserver(e=>{d.default.of(e.videoSendDidBecomeUnavailable).map(t=>t.bind(e)())}),!1;if(e.isTerminal()&&(this.logger.error("session will not be reconnected"),this.meetingSessionContext.reconnectController&&this.meetingSessionContext.reconnectController.disableReconnect()),(e.isFailure()||e.isTerminal())&&this.meetingSessionContext.reconnectController){const n=this.reconnect(e,t);return n?this.logger.warn(`will retry due to status code ${f.default[e.statusCode()]}${t?` and error: ${t.message}`:""}`):this.logger.error(`failed with status code ${f.default[e.statusCode()]}${t?` and error: ${t.message}`:""}`),n}return!1}setVideoMaxBandwidthKbps(e){this.meetingSessionContext&&this.meetingSessionContext.videoUplinkBandwidthPolicy&&(this.logger.info(`video send has ideal max bandwidth ${e} kbps`),this.meetingSessionContext.videoUplinkBandwidthPolicy.setIdealMaxBandwidthKbps(e))}handleHasBandwidthPriority(e){return r(this,void 0,void 0,(function*(){if(this.meetingSessionContext&&this.meetingSessionContext.videoUplinkBandwidthPolicy&&!this.meetingSessionContext.enableSimulcast){if(this.useUpdateTransceiverControllerForUplink)return this.meetingSessionContext.videoUplinkBandwidthPolicy.setHasBandwidthPriority(e),void(yield this.meetingSessionContext.videoUplinkBandwidthPolicy.updateTransceiverController());const t=this.meetingSessionContext.videoUplinkBandwidthPolicy.maxBandwidthKbps();this.meetingSessionContext.videoUplinkBandwidthPolicy.setHasBandwidthPriority(e);const n=this.meetingSessionContext.videoUplinkBandwidthPolicy.maxBandwidthKbps();t!==n&&(this.logger.info(`video send bandwidth priority ${e} max has changed from ${t} kbps to ${n} kbps`),yield this.enforceBandwidthLimitationForSender(n))}}))}pauseReceivingStream(e){this.meetingSessionContext&&this.meetingSessionContext.signalingClient&&this.meetingSessionContext.signalingClient.pause([e])}resumeReceivingStream(e){this.meetingSessionContext&&this.meetingSessionContext.signalingClient&&this.meetingSessionContext.signalingClient.resume([e])}getRemoteVideoSources(){const{videoStreamIndex:e}=this.meetingSessionContext;if(!e)return this.logger.info("meeting has not started"),[];const t=this.configuration.credentials.attendeeId;return e.allVideoSendingSourcesExcludingSelf(t)}encodingSimulcastLayersDidChange(e){this.mayNeedRenegotiationForSimulcastLayerChange=!0,this.forEachObserver(t=>{d.default.of(t.encodingSimulcastLayersDidChange).map(n=>n.bind(t)(e))})}}t.default=he,he.MIN_VOLUME_DECIBELS=-42,he.MAX_VOLUME_DECIBELS=-14,he.PING_PONG_INTERVAL_MS=1e4},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){this.remoteVideoAvailable=!1,this.canStartLocalVideo=!1}equal(e){return this.remoteVideoAvailable===e.remoteVideoAvailable&&this.canStartLocalVideo===e.canStartLocalVideo}clone(){const e=new r;return e.remoteVideoAvailable=this.remoteVideoAvailable,e.canStartLocalVideo=this.canStartLocalVideo,e}}t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStateControllerAction=void 0,function(e){e[e.Connect=0]="Connect",e[e.FinishConnecting=1]="FinishConnecting",e[e.Update=2]="Update",e[e.FinishUpdating=3]="FinishUpdating",e[e.Reconnect=4]="Reconnect",e[e.Disconnect=5]="Disconnect",e[e.Fail=6]="Fail",e[e.FinishDisconnecting=7]="FinishDisconnecting"}(r=t.SessionStateControllerAction||(t.SessionStateControllerAction={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStateControllerState=void 0,function(e){e[e.NotConnected=0]="NotConnected",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Updating=3]="Updating",e[e.Disconnecting=4]="Disconnecting"}(r=t.SessionStateControllerState||(t.SessionStateControllerState={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStateControllerTransitionResult=void 0,function(e){e[e.Transitioned=0]="Transitioned",e[e.NoTransitionAvailable=1]="NoTransitionAvailable",e[e.DeferredTransition=2]="DeferredTransition",e[e.TransitionFailed=3]="TransitionFailed"}(r=t.SessionStateControllerTransitionResult||(t.SessionStateControllerTransitionResult={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.username=null,this.password=null,this.ttl=null,this.uris=null}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(362),a=n(101);class o extends a.default{constructor(e,t,n){super(e),this.taskToRunBeforeTimeout=t,this.timeoutMs=n,this.taskName=`Timeout${this.timeoutMs}ms`,t.setParent(this)}cancel(){this.logger.info(`canceling timeout task ${this.name()} subtask ${this.taskToRunBeforeTimeout}`),this.taskToRunBeforeTimeout.cancel()}run(){return r(this,void 0,void 0,(function*(){const e=new i.default(this.timeoutMs);e.start(()=>{this.logger.info(`timeout reached for task ${this.name()}`),this.taskToRunBeforeTimeout.cancel()});try{yield this.taskToRunBeforeTimeout.run()}finally{e.stop()}this.logger.info(`timeout task ${this.name()} completed`)}))}}t.default=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(366);class a extends i.default{constructor(e,t){super(e,t),this.videoQualityControlParameterMap=new Map;let n=4;for(let e=0;e<a.NAME_ARR_ASCENDING.length;e++){const t=a.NAME_ARR_ASCENDING[e];this.videoQualityControlParameterMap.set(t,{rid:t,scaleResolutionDownBy:n,maxBitrate:1e3*a.BITRATE_ARR_ASCENDING[e]}),n/=2}}setEncodingParameters(e){return r(this,void 0,void 0,(function*(){if(!this._localCameraTransceiver||"sendrecv"!==this._localCameraTransceiver.direction)return;const t=this._localCameraTransceiver.sender,n=Array.from(e.values());if(n.length<=0)return;const r=t.getParameters();if(r.encodings)for(let t=0;t<r.encodings.length;t++)r.encodings[t].rid===a.LOW_LEVEL_NAME&&(r.encodings[t].maxBitrate=e.get(a.LOW_LEVEL_NAME).maxBitrate,r.encodings[t].active=e.get(a.LOW_LEVEL_NAME).active),r.encodings[t].rid===a.MID_LEVEL_NAME&&(r.encodings[t].maxBitrate=e.get(a.MID_LEVEL_NAME).maxBitrate,r.encodings[t].active=e.get(a.MID_LEVEL_NAME).active),r.encodings[t].rid===a.HIGH_LEVEL_NAME&&(r.encodings[t].maxBitrate=e.get(a.HIGH_LEVEL_NAME).maxBitrate,r.encodings[t].active=e.get(a.HIGH_LEVEL_NAME).active);else r.encodings=n;yield t.setParameters(r),this.logVideoTransceiverParameters()}))}static replaceAudioTrackForSender(e,t){return r(this,void 0,void 0,(function*(){return!!e&&(yield e.replaceTrack(t),!0)}))}setVideoSendingBitrateKbps(e){return r(this,void 0,void 0,(function*(){}))}setupLocalTransceivers(){if(this.useTransceivers()&&(this.defaultMediaStream||"undefined"==typeof MediaStream||(this.defaultMediaStream=new MediaStream),this._localAudioTransceiver||(this._localAudioTransceiver=this.peer.addTransceiver("audio",{direction:"inactive",streams:[this.defaultMediaStream]})),!this._localCameraTransceiver)){const e=Array.from(this.videoQualityControlParameterMap.values());this._localCameraTransceiver=this.peer.addTransceiver("video",{direction:"inactive",streams:[this.defaultMediaStream],sendEncodings:e})}}logVideoTransceiverParameters(){const e=this._localCameraTransceiver.sender.getParameters().encodings;let t="simulcast: current encoding parameters \n";for(const n of e)t+=`rid=${n.rid} maxBitrate=${n.maxBitrate} active=${n.active} \n`;this.logger.info(t)}}t.default=a,a.LOW_LEVEL_NAME="low",a.MID_LEVEL_NAME="mid",a.HIGH_LEVEL_NAME="hi",a.NAME_ARR_ASCENDING=["low","mid","hi"],a.BITRATE_ARR_ASCENDING=[200,400,1100]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(306),i=n(307),a=n(210),o=n(268),s=n(497),l=n(498),c=n(367),u=n(884);class d{constructor(){this.bandwidthEstimateKbps=0,this.usedBandwidthKbps=0,this.packetsLost=0,this.nackCount=0,this.rttMs=0}}class h{constructor(e,t=u.default.Default){this.logger=e,this.videoPriorityBasedPolicyConfig=t,this.shouldPauseTiles=!0,this.observerQueue=new Set,this.pausedBwAttendeeIds=new Set,this.reset()}reset(){this.optimalReceiveSet=new o.default,this.optimalReceiveStreams=[],this.optimalNonPausedReceiveStreams=[],this.subscribedReceiveSet=new o.default,this.subscribedReceiveStreams=[],this.videoPreferences=void 0,this.defaultVideoPreferences=void 0,this.shouldPauseTiles=!0,this.pausedStreamIds=new o.default,this.pausedBwAttendeeIds=new Set,this.videoPreferencesUpdated=!1,this.logCount=0,this.startupPeriod=!0,this.usingPrevTargetRate=!1,this.rateProbeState="Not Probing",this.firstEstimateTimestamp=0,this.lastUpgradeRateKbps=0,this.timeBeforeAllowSubscribeMs=h.MIN_TIME_BETWEEN_SUBSCRIBE_MS,this.lastProbeTimestamp=Date.now(),this.timeBeforeAllowProbeMs=h.MIN_TIME_BETWEEN_PROBE_MS,this.downlinkStats=new d,this.prevDownlinkStats=new d,this.probeFailed=!1}bindToTileController(e){this.tileController=e,this.logger.info("tileController bound")}chooseRemoteVideoSources(e){var t;null!==(t=this.videoPreferences)&&void 0!==t&&t.equals(e)||(this.videoPreferences=e,this.videoPreferencesUpdated=!0,this.logger.info(`bwe: setVideoPreferences bwe: new preferences: ${JSON.stringify(e)}`))}updateIndex(e){this.videoIndex=e,this.videoPreferences||this.updateDefaultVideoPreferences()}updateDefaultVideoPreferences(){const e=new Set;for(const t of this.videoIndex.remoteStreamDescriptions())e.add(t.attendeeId);const t=c.VideoPreferences.prepare();for(const n of e)t.add(new l.default(n,1,s.default.High));this.defaultVideoPreferences=t.build()}updateMetrics(e){if(this.videoIndex.allStreams().empty())return;this.prevDownlinkStats=this.downlinkStats,this.downlinkStats=new d;const t=e.getObservableMetrics();this.downlinkStats.bandwidthEstimateKbps=t.availableReceiveBandwidth/1e3;for(const t in e.streamMetricReports){const n=Number.parseInt(t,10),i=e.streamMetricReports[n];i.direction===r.default.DOWNSTREAM&&(i.currentMetrics.hasOwnProperty("googNacksSent")&&i.currentMetrics.hasOwnProperty("googFrameRateReceived")&&(this.downlinkStats.nackCount+=e.countPerSecond("googNacksSent",n)),i.currentMetrics.hasOwnProperty("packetsLost")&&i.currentMetrics.hasOwnProperty("googFrameRateReceived")&&(this.downlinkStats.packetsLost+=e.countPerSecond("packetsLost",n)),i.currentMetrics.hasOwnProperty("bytesReceived")&&(this.downlinkStats.usedBandwidthKbps+=e.bitsPerSecond("bytesReceived",n)/1e3))}}wantsResubscribe(){return this.calculateOptimalReceiveSet(),!this.subscribedReceiveSet.equal(this.optimalReceiveSet)}chooseSubscriptions(){return this.subscribedReceiveSet.equal(this.optimalReceiveSet)||(this.lastSubscribeTimestamp=Date.now()),this.subscribedReceiveSet=this.optimalReceiveSet.clone(),this.subscribedReceiveStreams=this.optimalReceiveStreams.slice(),this.subscribedReceiveSet.clone()}addObserver(e){this.observerQueue.add(e)}removeObserver(e){this.observerQueue.delete(e)}forEachObserver(e){for(const t of this.observerQueue)setTimeout(()=>{this.observerQueue.has(t)&&e(t)},0)}setVideoPriorityBasedPolicyConfigs(e){this.videoPriorityBasedPolicyConfig=e}getSubscribeDelay(e,t){let n=h.MINIMUM_DELAY;const r=h.MAXIMUM_DELAY-h.MINIMUM_DELAY,i=this.videoPriorityBasedPolicyConfig.networkIssueResponseDelayFactor,a=this.videoPriorityBasedPolicyConfig.networkIssueRecoveryDelayFactor;switch(e){case 0:n+=r*i*(1+t/10),n=Math.min(h.MAXIMUM_DELAY,n);break;case 1:n+=r*a}return n}calculateOptimalReceiveStreams(){var e;const t=[],n=this.videoIndex.remoteStreamDescriptions();if(0===n.length||(null===(e=this.videoPreferences)||void 0===e?void 0:e.isEmpty()))return void(this.optimalReceiveStreams=[]);const r=this.rateProbeState;this.cleanBwPausedTiles(n),this.handleAppPausedStreams(t,n);const o=this.availStreamsSameAsLast(n),s=!this.startupPeriod&&o;if(s&&this.probeFailed&&Date.now()-this.lastSubscribeTimestamp<this.timeBeforeAllowSubscribeMs)return;this.probeFailed=!1,n.sort((e,t)=>e.maxBitrateKbps===t.maxBitrateKbps?e.streamId-t.streamId:e.maxBitrateKbps-t.maxBitrateKbps);for(const e of n)(0===e.avgBitrateKbps||e.avgBitrateKbps>e.maxBitrateKbps)&&(e.attendeeId.endsWith(i.default.Modality)&&e.maxBitrateKbps<100?e.maxBitrateKbps=e.avgBitrateKbps:e.avgBitrateKbps=e.maxBitrateKbps);const l={targetDownlinkBitrate:0,chosenTotalBitrate:0,deltaToNextUpgrade:0};l.targetDownlinkBitrate=this.determineTargetRate();const c=this.subscribedReceiveSet.size(),u=this.prevDownlinkStats.bandwidthEstimateKbps,d=this.downlinkStats.bandwidthEstimateKbps;if(d>u?this.timeBeforeAllowSubscribeMs=this.getSubscribeDelay(1,c):d<u&&(this.timeBeforeAllowSubscribeMs=this.getSubscribeDelay(0,c)),s&&Date.now()-this.lastSubscribeTimestamp<this.timeBeforeAllowSubscribeMs)return;const h=this.priorityPolicy(l,n,t);let f=0;if(!this.startupPeriod&&o?"Probing"===this.rateProbeState?f=this.handleProbe(t,l.targetDownlinkBitrate):0!==l.deltaToNextUpgrade&&(f=this.maybeOverrideOrProbe(t,l,h)):(this.setProbeState("Not Probing"),this.lastUpgradeRateKbps=0),this.prevRemoteInfos=n,this.videoPreferencesUpdated=!1,1===f)return this.logger.info(`bwe: keepSameSubscriptions stats:${JSON.stringify(this.downlinkStats)}`),void(this.prevTargetRateKbps=l.targetDownlinkBitrate);if(2===f){const e=this.calculateSubscribeRate(this.preProbeNonPausedReceiveStreams);return this.optimalReceiveStreams=this.preProbeReceiveStreams.slice(),this.processBwPausedStreams(n,this.preProbeNonPausedReceiveStreams),void this.logger.info("bwe: Use Pre-Probe subscription subscribedRate:"+e)}this.optimalNonPausedReceiveStreams=t.slice();const p=this.pausedBwAttendeeIds.size;this.processBwPausedStreams(n,t),this.logger.getLogLevel()<=a.LogLevel.INFO&&(this.logCount%15==0||this.rateProbeState!==r||this.optimalReceiveStreams.length!==t.length||p!==this.pausedBwAttendeeIds.size)&&(this.logger.info(this.policyStateLogStr(n,l.targetDownlinkBitrate)),this.logCount=0),this.logCount++,this.prevTargetRateKbps=l.targetDownlinkBitrate,this.optimalReceiveStreams=t.slice()}calculateOptimalReceiveSet(){const e=new o.default;this.calculateOptimalReceiveStreams();for(const t of this.optimalReceiveStreams)e.add(t.streamId);if(!this.optimalReceiveSet.equal(e)){const t=this.calculateSubscribeRate(this.optimalReceiveStreams);this.logger.info(`bwe: new streamSelection: ${JSON.stringify(e)} subscribedRate:${t}`)}this.optimalReceiveSet=e}determineTargetRate(){let e=0;const t=Date.now();return 0!==this.downlinkStats.bandwidthEstimateKbps?(0===this.firstEstimateTimestamp&&(this.firstEstimateTimestamp=t),this.startupPeriod&&(this.downlinkStats.bandwidthEstimateKbps>h.DEFAULT_BANDWIDTH_KBPS||this.downlinkStats.packetsLost>0||t-this.firstEstimateTimestamp>h.STARTUP_PERIOD_MS&&this.downlinkStats.bandwidthEstimateKbps<=this.prevDownlinkStats.bandwidthEstimateKbps)&&(this.startupPeriod=!1,this.prevTargetRateKbps=this.downlinkStats.bandwidthEstimateKbps),e=this.startupPeriod?h.DEFAULT_BANDWIDTH_KBPS:this.downlinkStats.bandwidthEstimateKbps):e=0===this.firstEstimateTimestamp?h.DEFAULT_BANDWIDTH_KBPS:this.prevTargetRateKbps,!this.startupPeriod&&(this.usingPrevTargetRate&&this.downlinkStats.bandwidthEstimateKbps<this.prevTargetRateKbps||this.downlinkStats.bandwidthEstimateKbps<this.prevTargetRateKbps*(100-h.LARGE_RATE_CHANGE_TRIGGER_PERCENT)/100||this.downlinkStats.bandwidthEstimateKbps<this.downlinkStats.usedBandwidthKbps*h.LARGE_RATE_CHANGE_TRIGGER_PERCENT/100)&&0===this.downlinkStats.packetsLost?(this.logger.debug(()=>"bwe: ValidateRate: Using Previous rate "+this.prevTargetRateKbps),this.usingPrevTargetRate=!0,e=this.prevTargetRateKbps):this.usingPrevTargetRate=!1,e}setProbeState(e){if(this.rateProbeState===e)return!1;const t=Date.now();switch(e){case"Not Probing":this.probePendingStartTimestamp=0;break;case"Probe Pending":if(!(0===this.lastProbeTimestamp||t-this.lastProbeTimestamp>h.MIN_TIME_BETWEEN_PROBE_MS))return!1;this.probePendingStartTimestamp=t;break;case"Probing":if(!(t-this.probePendingStartTimestamp>this.timeBeforeAllowProbeMs))return!1;this.lastProbeTimestamp=t,this.preProbeReceiveStreams=this.subscribedReceiveStreams.slice(),this.preProbeNonPausedReceiveStreams=this.optimalNonPausedReceiveStreams,this.timeBeforeAllowProbeMs=Math.min(2*this.timeBeforeAllowProbeMs,h.MAX_HOLD_BEFORE_PROBE_MS)}return this.logger.info("bwe: setProbeState to "+e+" from "+this.rateProbeState),this.rateProbeState=e,!0}upgradeToStream(e,t){for(let n=0;n<e.length;n++)if(e[n].groupId===t.groupId){const r=t.avgBitrateKbps-e[n].avgBitrateKbps;return this.logger.info("bwe: upgradeStream from "+JSON.stringify(e[n])+" to "+t),this.lastUpgradeRateKbps=r,e[n]=t,r}return e.push(t),this.lastUpgradeRateKbps=t.avgBitrateKbps,this.lastUpgradeRateKbps}handleProbe(e,t){if(Date.now()-this.lastProbeTimestamp>h.MAX_ALLOWED_PROBE_TIME_MS)return this.logger.info("bwe: Canceling probe due to timeout"),this.setProbeState("Not Probing"),0;if(this.downlinkStats.packetsLost>0)return this.setProbeState("Not Probing"),this.logger.info("bwe: Canceling probe due to network loss"),this.probeFailed=!0,this.timeBeforeAllowSubscribeMs=3*Math.max(h.MIN_TIME_BETWEEN_SUBSCRIBE_MS,this.timeBeforeAllowSubscribeMs),2;const n=this.calculateSubscribeRate(this.optimalReceiveStreams);if(this.chosenStreamsSameAsLast(e)||t>n){let n=0;for(const t of e)n+=t.avgBitrateKbps;if(t>n)return this.logger.info("bwe: Probe successful"),this.setProbeState("Not Probing"),this.timeBeforeAllowProbeMs=h.MIN_TIME_BETWEEN_PROBE_MS,0}return 1}maybeOverrideOrProbe(e,t,n){const r=this.chosenStreamsSameAsLast(e);let i=0;const a=t.targetDownlinkBitrate>h.LOW_BITRATE_THRESHOLD_KBPS?h.TARGET_RATE_CHANGE_TRIGGER_PERCENT:2*h.TARGET_RATE_CHANGE_TRIGGER_PERCENT,o=t.targetDownlinkBitrate*a/100;if(!r&&Math.abs(t.targetDownlinkBitrate-this.prevTargetRateKbps)<o&&(this.logger.info("bwe: MaybeOverrideOrProbe: Reuse last decision based on delta rate. {"+JSON.stringify(this.subscribedReceiveSet)+"}"),i=1),this.downlinkStats.packetsLost>this.prevDownlinkStats.packetsLost)return this.setProbeState("Not Probing"),this.lastUpgradeRateKbps=0,i;if(r||1===i)switch(this.rateProbeState){case"Not Probing":this.setProbeState("Probe Pending");break;case"Probe Pending":this.setProbeState("Probing")&&(this.upgradeToStream(e,n),i=0)}else this.setProbeState("Not Probing");return i}calculateSubscribeRate(e){let t=0;for(const n of e)this.pausedStreamIds.contain(n.streamId)||this.pausedBwAttendeeIds.has(n.attendeeId)||(t+=n.maxBitrateKbps);return t}handleAppPausedStreams(e,t){if(!this.tileController)return void this.logger.warn("tileController not found!");this.pausedStreamIds=new o.default;const n=this.tileController.getAllRemoteVideoTiles();for(const r of n){const n=r.state();if(n.paused&&!this.pausedBwAttendeeIds.has(n.boundAttendeeId)){let r=t.length;for(;r--;)t[r].attendeeId===n.boundAttendeeId&&(this.logger.info("bwe: removed paused attendee "+n.boundAttendeeId+" streamId: "+t[r].streamId),this.pausedStreamIds.add(t[r].streamId),this.subscribedReceiveSet.contain(t[r].streamId)&&e.push(t[r]),t.splice(r,1))}}}processBwPausedStreams(e,t){if(this.tileController){if(this.videoPreferences&&this.shouldPauseTiles){const n=this.tileController.getAllVideoTiles();for(const r of this.videoPreferences){const i=this.getVideoTileForAttendeeId(r.attendeeId,n),a=(null==i?void 0:i.state().paused)||!1;if(t.some(e=>e.attendeeId===r.attendeeId))a&&this.pausedBwAttendeeIds.has(r.attendeeId)&&(this.logger.info(`bwe: unpausing attendee ${r.attendeeId} due to bandwidth`),this.forEachObserver(e=>{e.tileWillBeUnpausedByDownlinkPolicy(i.id())}),this.tileController.unpauseVideoTile(i.id()),this.pausedBwAttendeeIds.delete(r.attendeeId));else if(i){const e=this.optimalReceiveStreams.find(e=>e.attendeeId===r.attendeeId);void 0!==e&&(a||(this.logger.info(`bwe: pausing streamId ${e.streamId} attendee ${r.attendeeId} due to bandwidth`),this.forEachObserver(e=>{e.tileWillBePausedByDownlinkPolicy(i.id())}),this.tileController.pauseVideoTile(i.id())),t.push(e)),this.pausedBwAttendeeIds.add(r.attendeeId)}else if(e.some(e=>e.attendeeId===r.attendeeId)){const e=this.tileController.addVideoTile();e.bindVideoStream(r.attendeeId,!1,null,0,0,0,null),this.forEachObserver(t=>{t.tileWillBePausedByDownlinkPolicy(e.id())}),e.pause(),this.logger.info(`bwe: Created video tile ${e.id()} for bw paused attendee ${r.attendeeId}`),this.pausedBwAttendeeIds.add(r.attendeeId)}}}}else this.logger.warn("tileController not found!")}cleanBwPausedTiles(e){if(!this.tileController)return void this.logger.warn("tileController not found!");const t=this.tileController.getAllRemoteVideoTiles();for(const n of t){const t=n.state();t.boundVideoStream||(e.some(e=>e.attendeeId===t.boundAttendeeId)?void 0===this.videoPreferences||this.videoPreferences.some(e=>e.attendeeId===t.boundAttendeeId)||this.tileController.removeVideoTile(t.tileId):(this.tileController.removeVideoTile(t.tileId),this.logger.info(`bwe: Removed video tile ${t.tileId} for bw paused attendee ${t.boundAttendeeId}`)))}}priorityPolicy(e,t,n){let r;const i=this.videoPreferences||this.defaultVideoPreferences,a=i.highestPriority();let o,s=a;for(;-1!==s;){o=-1;for(const a of i)if(a.priority===s)for(const i of t)i.attendeeId===a.attendeeId&&(n.some(e=>e.groupId===i.groupId)||(e.chosenTotalBitrate+i.avgBitrateKbps<=e.targetDownlinkBitrate?(n.push(i),e.chosenTotalBitrate+=i.avgBitrateKbps):0===e.deltaToNextUpgrade&&(e.deltaToNextUpgrade=i.avgBitrateKbps,r=i)));else if(a.priority>s){o=a.priority;break}for(const a of i)if(a.priority===s){for(const i of t)if(i.attendeeId===a.attendeeId){const o=n.findIndex(e=>e.groupId===i.groupId&&e.maxBitrateKbps<i.maxBitrateKbps);if(-1!==o){const s=i.avgBitrateKbps-n[o].avgBitrateKbps;this.hasSimulcastStreams(t,i.attendeeId,i.groupId)&&this.canUpgrade(i.avgBitrateKbps,a.targetSizeToBitrateKbps(a.targetSize))?(this.logger.info(`bwe: attendee: ${i.attendeeId} group: ${i.groupId} has simulcast and can upgrade avgBitrate: ${i.avgBitrateKbps} target: ${a.targetSizeToBitrateKbps(a.targetSize)} targetTotalBitrate: ${e.targetDownlinkBitrate}`),e.chosenTotalBitrate+s<=e.targetDownlinkBitrate?(e.chosenTotalBitrate+=s,n[o]=i):0===e.deltaToNextUpgrade&&(e.deltaToNextUpgrade=s,r=i)):this.logger.info("bwe: cannot upgrade stream quality beyond target size")}}}else if(a.priority>s)break;if(s===a&&0!==e.deltaToNextUpgrade)break;s=o}return r}getVideoTileForAttendeeId(e,t){for(const n of t){if(n.state().boundAttendeeId===e)return n}return null}canUpgrade(e,t){return e<=t?(this.logger.info(`bwe: canUpgrade: bitrateKbp: ${e} targetBitrateKbp: ${t}`),!0):(this.logger.info(`bwe: cannot Upgrade: bitrateKbp: ${e} targetBitrateKbp: ${t}`),!1)}hasSimulcastStreams(e,t,n){let r=0;for(const i of e)i.attendeeId===t&&i.groupId===n&&r++;return this.logger.info(`bwe: attendeeId: ${t} groupId: ${n} hasSimulcastStreams: streamCount: ${r}`),r>1}availStreamsSameAsLast(e){if(void 0===this.prevRemoteInfos||e.length!==this.prevRemoteInfos.length||!0===this.videoPreferencesUpdated)return!1;for(const t of e){if(void 0===this.prevRemoteInfos.find(e=>e.groupId===t.groupId&&e.streamId===t.streamId&&e.maxBitrateKbps===t.maxBitrateKbps))return!1}return!0}chosenStreamsSameAsLast(e){if(this.optimalNonPausedReceiveStreams.length!==e.length)return!1;for(const t of this.optimalNonPausedReceiveStreams)if(!e.some(e=>e.streamId===t.streamId))return!1;return!0}policyStateLogStr(e,t){const n={targetBitrate:t,subscribedRate:this.calculateSubscribeRate(this.optimalReceiveStreams),probeState:this.rateProbeState,startupPeriod:this.startupPeriod};let r="remoteInfos: [";for(const t of e)r+=`{grpId:${t.groupId} strId:${t.streamId} maxBr:${t.maxBitrateKbps} avgBr:${t.avgBitrateKbps}}, `;r+="]";let i=`bwe: optimalReceiveSet ${JSON.stringify(n)}\n`+`bwe:   prev ${JSON.stringify(this.prevDownlinkStats)}\n`+`bwe:   now  ${JSON.stringify(this.downlinkStats)}\n`+`bwe:   ${r}\n`;return(this.pausedStreamIds.size()>0||this.pausedBwAttendeeIds.size>0)&&(i+=`bwe:   paused: app stream ids ${JSON.stringify(this.pausedStreamIds)}  bw attendees { ${Array.from(this.pausedBwAttendeeIds).join(" ")} }\n`),this.videoPreferences&&(i+=`bwe:   preferences: ${JSON.stringify(this.videoPreferences)}`),i}}t.default=h,h.DEFAULT_BANDWIDTH_KBPS=2800,h.STARTUP_PERIOD_MS=6e3,h.LARGE_RATE_CHANGE_TRIGGER_PERCENT=20,h.TARGET_RATE_CHANGE_TRIGGER_PERCENT=15,h.LOW_BITRATE_THRESHOLD_KBPS=300,h.MIN_TIME_BETWEEN_PROBE_MS=5e3,h.MIN_TIME_BETWEEN_SUBSCRIBE_MS=2e3,h.MAX_HOLD_BEFORE_PROBE_MS=6e4,h.MAX_ALLOWED_PROBE_TIME_MS=6e4,h.MINIMUM_DELAY=h.MIN_TIME_BETWEEN_SUBSCRIBE_MS,h.MAXIMUM_DELAY=8e3},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.TargetDisplaySize=void 0,function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High"}(r=t.TargetDisplaySize||(t.TargetDisplaySize={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(497);class i{constructor(e,t,n){this.attendeeId=e,this.priority=t,this.targetSize=void 0!==n?n:r.default.High}partialCompare(e){return this.priority-e.priority}equals(e){return this.attendeeId===e.attendeeId&&this.targetSize===e.targetSize&&this.priority===e.priority}targetSizeToBitrateKbps(e){switch(e){case r.default.High:return i.HIGH_BITRATE_KBPS;case r.default.Medium:return i.MID_BITRATE_KBPS;case r.default.Low:return i.LOW_BITRATE_KBPS}}}t.default=i,i.LOW_BITRATE_KBPS=300,i.MID_BITRATE_KBPS=600,i.HIGH_BITRATE_KBPS=1200},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(133),i=n(268),a=n(500);t.default=class{constructor(e){this.logger=e,this.currentIndex=null,this.indexForSubscribe=null,this.currentSubscribeAck=null,this.subscribeTrackToStreamMap=null,this.subscribeStreamToAttendeeMap=null,this.subscribeStreamToExternalUserIdMap=null,this.subscribeSsrcToStreamMap=null,this.streamToAttendeeMap=null,this.streamToExternalUserIdMap=null,this.videoStreamDescription=new a.default,this.videoStreamDescription.trackLabel="AmazonChimeExpressVideo",this.videoStreamDescription.streamId=2,this.videoStreamDescription.groupId=2}localStreamDescriptions(){return[this.videoStreamDescription.clone()]}convertBpsToKbps(e){return e>0&&e<1e3?1:Math.trunc(e/1e3)}remoteStreamDescriptions(){if(!this.currentIndex||!this.currentIndex.sources)return[];const e=[];return this.currentIndex.sources.forEach(t=>{const n=new a.default;n.attendeeId=t.attendeeId,n.groupId=t.groupId,n.streamId=t.streamId,n.maxBitrateKbps=t.maxBitrateKbps,n.avgBitrateKbps=this.convertBpsToKbps(t.avgBitrateBps),e.push(n)}),e}integrateUplinkPolicyDecision(e){if(e&&e.length){const t=e[0];this.videoStreamDescription.maxBitrateKbps=t.maxBitrate/1e3,this.videoStreamDescription.maxFrameRate=t.maxFramerate}}integrateIndexFrame(e){this.currentIndex=e;const t=new Map;let n=!1;for(const r of e.sources){if(!t.has(r.attendeeId)){t.set(r.attendeeId,r.groupId);continue}const e=t.get(r.attendeeId);e<r.groupId&&(this.logger.warn(`Old group ID ${e} found for attendee ID ${r.attendeeId}, replacing with newer group ID ${r.groupId}`),t.set(r.attendeeId,r.groupId)),n=!0}n&&(this.currentIndex.sources=this.currentIndex.sources.filter(e=>t.get(e.attendeeId)===e.groupId)),this.streamToAttendeeMap=null,this.streamToExternalUserIdMap=null}subscribeFrameSent(){this.indexForSubscribe=this.currentIndex}integrateSubscribeAckFrame(e){this.currentSubscribeAck=e,this.subscribeTrackToStreamMap=this.buildTrackToStreamMap(this.currentSubscribeAck),this.subscribeSsrcToStreamMap=this.buildSSRCToStreamMap(this.currentSubscribeAck),this.subscribeStreamToAttendeeMap=this.buildStreamToAttendeeMap(this.indexForSubscribe),this.subscribeStreamToExternalUserIdMap=this.buildStreamExternalUserIdMap(this.indexForSubscribe)}integrateBitratesFrame(e){if(this.currentIndex)for(const t of e.bitrates){const e=this.currentIndex.sources.find(e=>e.streamId===t.sourceStreamId);void 0!==e&&(e.avgBitrateBps=t.avgBitrateBps)}}allStreams(){const e=new i.default;if(this.currentIndex)for(const t of this.currentIndex.sources)e.add(t.streamId);return e}allVideoSendingSourcesExcludingSelf(e){const t=[],n=new Set;if(this.currentIndex&&this.currentIndex.sources&&this.currentIndex.sources.length)for(const i of this.currentIndex.sources){const{attendeeId:a,externalUserId:o,mediaType:s}=i;a!==e&&s===r.SdkStreamMediaType.VIDEO&&(n.has(a)||(t.push({attendee:{attendeeId:a,externalUserId:o}}),n.add(a)))}return t}streamSelectionUnderBandwidthConstraint(e,t,n,a){const o=new Set;if(this.currentIndex)for(const i of this.currentIndex.sources)i.attendeeId!==e&&i.mediaType===r.SdkStreamMediaType.VIDEO&&(t.has(i.attendeeId)||n.has(i.attendeeId)||o.add(i.attendeeId));const s=this.buildAttendeeToSortedStreamDescriptorMapExcludingSelf(e),l=new Map;let c=0;s.forEach((e,t)=>{l.set(t,e[0]),c+=e[0].maxBitrateKbps}),c=this.trySelectHighBitrateForAttendees(s,t,c,a,l),this.trySelectHighBitrateForAttendees(s,o,c,a,l);const u=new i.default;for(const e of l.values())u.add(e.streamId);return u}highestQualityStreamFromEachGroupExcludingSelf(e){const t=new i.default;if(this.currentIndex){const n=new Map;for(const t of this.currentIndex.sources)t.attendeeId!==e&&t.mediaType===r.SdkStreamMediaType.VIDEO&&(!n.has(t.groupId)||t.maxBitrateKbps>n.get(t.groupId).maxBitrateKbps)&&n.set(t.groupId,t);for(const e of n.values())t.add(e.streamId)}return t}numberOfVideoPublishingParticipantsExcludingSelf(e){return this.highestQualityStreamFromEachGroupExcludingSelf(e).array().length}numberOfParticipants(){return this.currentIndex.numParticipants?this.currentIndex.numParticipants:-1}attendeeIdForTrack(e){const t=this.streamIdForTrack(e);if(void 0===t||!this.subscribeStreamToAttendeeMap)return this.logger.warn(`no attendee found for track ${e}`),"";const n=this.subscribeStreamToAttendeeMap.get(t);return n||(this.logger.info(`track ${e} (stream ${t}) does not correspond to a known attendee`),"")}externalUserIdForTrack(e){const t=this.streamIdForTrack(e);if(void 0===t||!this.subscribeStreamToExternalUserIdMap)return this.logger.warn(`no external user id found for track ${e}`),"";const n=this.subscribeStreamToExternalUserIdMap.get(t);return n||(this.logger.info(`track ${e} (stream ${t}) does not correspond to a known externalUserId`),"")}attendeeIdForStreamId(e){if(!this.streamToAttendeeMap){if(!this.currentIndex)return"";this.streamToAttendeeMap=this.buildStreamToAttendeeMap(this.currentIndex)}const t=this.streamToAttendeeMap.get(e);return t||(this.logger.info(`stream ${e}) does not correspond to a known attendee`),"")}groupIdForStreamId(e){for(const t of this.currentIndex.sources)if(t.streamId===e)return t.groupId;if(this.indexForSubscribe)for(const t of this.indexForSubscribe.sources)if(t.streamId===e)return t.groupId}StreamIdsInSameGroup(e,t){return this.groupIdForStreamId(e)===this.groupIdForStreamId(t)}streamIdForTrack(e){if(this.subscribeTrackToStreamMap)return this.subscribeTrackToStreamMap.get(e)}streamIdForSSRC(e){if(this.subscribeSsrcToStreamMap)return this.subscribeSsrcToStreamMap.get(e)}overrideStreamIdMappings(e,t){if(this.subscribeTrackToStreamMap)for(const[n,r]of this.subscribeTrackToStreamMap.entries())if(e===r){this.subscribeTrackToStreamMap.set(n,t);break}if(this.subscribeSsrcToStreamMap)for(const[n,r]of this.subscribeSsrcToStreamMap.entries())if(e===r){this.subscribeSsrcToStreamMap.set(n,t);break}}streamsPausedAtSource(){const e=new i.default;if(this.currentIndex)for(const t of this.currentIndex.pausedAtSourceIds)e.add(t);return e}buildTrackToStreamMap(e){const t=new Map;this.logger.debug(()=>`trackMap ${JSON.stringify(e.tracks)}`);for(const n of e.tracks)n.trackLabel.length>0&&n.streamId>0&&t.set(n.trackLabel,n.streamId);return t}buildSSRCToStreamMap(e){const t=new Map;this.logger.debug(()=>`ssrcMap ${JSON.stringify(e.tracks)}`);for(const n of e.tracks)n.trackLabel.length>0&&n.streamId>0&&t.set(n.ssrc,n.streamId);return t}buildStreamToAttendeeMap(e){const t=new Map;if(e)for(const n of e.sources)t.set(n.streamId,n.attendeeId);return t}buildStreamExternalUserIdMap(e){const t=new Map;if(e)for(const n of e.sources)n.externalUserId&&t.set(n.streamId,n.externalUserId);return t}trySelectHighBitrateForAttendees(e,t,n,r,i){for(const a of t){if(n>=r)break;if(e.has(a)){const t=e.get(a);for(const e of t.reverse())if(n-i.get(a).maxBitrateKbps+e.maxBitrateKbps<r){n=n-i.get(a).maxBitrateKbps+e.maxBitrateKbps,i.set(a,e);break}}}return n}buildAttendeeToSortedStreamDescriptorMapExcludingSelf(e){const t=new Map;if(this.currentIndex)for(const n of this.currentIndex.sources)n.attendeeId!==e&&n.mediaType===r.SdkStreamMediaType.VIDEO&&(t.has(n.attendeeId)?t.get(n.attendeeId).push(n):t.set(n.attendeeId,[n]));return t.forEach((e,t)=>{e.sort((e,t)=>e.maxBitrateKbps>t.maxBitrateKbps?1:e.maxBitrateKbps<t.maxBitrateKbps?-1:0)}),t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(133);class i{constructor(e,t,n,r,i){this.attendeeId="",this.groupId=0,this.streamId=0,this.ssrc=0,this.trackLabel="",this.maxBitrateKbps=0,this.avgBitrateKbps=0,this.maxFrameRate=0,this.timeEnabled=0,this.disabledByWebRTC=!1,this.disabledByUplinkPolicy=!1,this.attendeeId=e,this.groupId=t,this.streamId=n,this.maxBitrateKbps=r,this.avgBitrateKbps=i}clone(){const e=new i;return e.attendeeId=this.attendeeId,e.groupId=this.groupId,e.streamId=this.streamId,e.ssrc=this.ssrc,e.trackLabel=this.trackLabel,e.maxBitrateKbps=this.maxBitrateKbps,e.avgBitrateKbps=this.avgBitrateKbps,e.maxFrameRate=this.maxFrameRate,e.timeEnabled=this.timeEnabled,e.disabledByWebRTC=this.disabledByWebRTC,e.disabledByUplinkPolicy=this.disabledByUplinkPolicy,e}toStreamDescriptor(){const e=r.SdkStreamDescriptor.create();return e.mediaType=r.SdkStreamMediaType.VIDEO,e.trackLabel=this.trackLabel,e.attendeeId=this.attendeeId,e.streamId=this.streamId,e.groupId=this.groupId,e.framerate=this.maxFrameRate,e.maxBitrateKbps=this.disabledByUplinkPolicy||this.disabledByWebRTC?0:this.maxBitrateKbps,e.avgBitrateBps=this.avgBitrateKbps,e}}t.default=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(311);class a{constructor(e,t=!0){this.selfAttendeeId=e,this.scaleResolution=t,this.numParticipants=0,this.idealMaxBandwidthKbps=1400,this.hasBandwidthPriority=!1,this.encodingParamMap=new Map,this.optimalParameters=new i.default(0,0,0,0,!1),this.parametersInEffect=new i.default(0,0,0,0,!1),this.encodingParamMap.set(a.encodingMapKey,{scaleResolutionDownBy:1,maxBitrate:1e3*this.idealMaxBandwidthKbps})}updateConnectionMetric(e){}chooseMediaTrackConstraints(){return{}}chooseEncodingParameters(){return new Map}updateIndex(e){let t=!0,n=1;if(this.transceiverController&&(t=this.transceiverController.hasVideoInput()),this.numParticipants=e.numberOfVideoPublishingParticipantsExcludingSelf(this.selfAttendeeId)+(t?1:0),this.transceiverController){const e=this.getStreamCaptureSetting();if(e){n=this.calculateEncodingParameters(e).scaleResolutionDownBy}}this.optimalParameters=new i.default(this.captureWidth(),this.captureHeight(),this.captureFrameRate(),this.maxBandwidthKbps(),!1,n)}wantsResubscribe(){return!this.parametersInEffect.equal(this.optimalParameters)}chooseCaptureAndEncodeParameters(){return this.parametersInEffect=this.optimalParameters.clone(),this.parametersInEffect.clone()}captureWidth(){let e=640;return this.numParticipants>4&&(e=320),e}captureHeight(){let e=384;return this.numParticipants>4&&(e=192),e}captureFrameRate(){return 15}maxBandwidthKbps(){if(this.hasBandwidthPriority)return Math.trunc(this.idealMaxBandwidthKbps);let e=0;return e=this.numParticipants<=2?this.idealMaxBandwidthKbps:this.numParticipants<=4?2*this.idealMaxBandwidthKbps/3:(544/11+14880/(11*this.numParticipants))/600*this.idealMaxBandwidthKbps,Math.trunc(e)}setIdealMaxBandwidthKbps(e){this.idealMaxBandwidthKbps=e}setHasBandwidthPriority(e){this.hasBandwidthPriority=e}setTransceiverController(e){this.transceiverController=e}updateTransceiverController(){return r(this,void 0,void 0,(function*(){const e=this.getStreamCaptureSetting();if(!e)return;const t=this.calculateEncodingParameters(e);this.encodingParametersHaveSameBitrateAndScaling(t,this.encodingParamMap.get(a.encodingMapKey))||(this.encodingParamMap.set(a.encodingMapKey,t),this.transceiverController.setEncodingParameters(this.encodingParamMap))}))}encodingParametersHaveSameBitrateAndScaling(e,t){return e===t||e.maxBitrate===t.maxBitrate&&e.scaleResolutionDownBy===t.scaleResolutionDownBy}calculateEncodingParameters(e){const t=1e3*this.maxBandwidthKbps();let n=1;if(e&&this.scaleResolution&&!this.hasBandwidthPriority&&this.numParticipants>2){const t=a.targetHeightArray[Math.min(this.numParticipants,a.targetHeightArray.length-1)];n=Math.max(e.height/t,1)}return{scaleResolutionDownBy:n,maxBitrate:t}}getStreamCaptureSetting(){var e,t,n,r;return null===(r=null===(n=null===(t=null===(e=this.transceiverController)||void 0===e?void 0:e.localVideoTransceiver())||void 0===t?void 0:t.sender)||void 0===n?void 0:n.track)||void 0===r?void 0:r.getSettings()}}t.default=a,a.encodingMapKey="video",a.targetHeightArray=[0,0,0,540,540,480,480,480,480,360,360,360,360,270,270,270,270,180,180,180,180,180,180,180,180,180]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(816),i=n(503),a=n(479),o=n(501),s=n(368),l=n(504);t.default=class{constructor(e,t){this.meetingId=null,this.externalMeetingId=null,this.credentials=null,this.urls=null,this.connectionTimeoutMs=15e3,this.screenSharingTimeoutMs=5e3,this.screenViewingTimeoutMs=5e3,this.attendeePresenceTimeoutMs=0,this.connectionHealthPolicyConfiguration=new r.default,this.reconnectTimeoutMs=12e4,this.reconnectFixedWaitMs=0,this.reconnectShortBackOffMs=1e3,this.reconnectLongBackOffMs=5e3,this.enableUnifiedPlanForChromiumBasedBrowsers=!0,this.enableSimulcastForUnifiedPlanChromiumBasedBrowsers=!1,this.videoDownlinkBandwidthPolicy=null,this.videoUplinkBandwidthPolicy=null,e&&((e=i.toLowerCasePropertyNames(e)).meeting&&(e=e.meeting),this.meetingId=e.meetingid,this.externalMeetingId=e.externalmeetingid,this.urls=new l.default,this.urls.audioHostURL=e.mediaplacement.audiohosturl,this.urls.screenDataURL=e.mediaplacement.screendataurl,this.urls.screenSharingURL=e.mediaplacement.screensharingurl,this.urls.screenViewingURL=e.mediaplacement.screenviewingurl,this.urls.signalingURL=e.mediaplacement.signalingurl,this.urls.turnControlURL=e.mediaplacement.turncontrolurl,e.mediaplacement.eventingestionurl&&(this.urls.eventIngestionURL=e.mediaplacement.eventingestionurl)),t&&((t=i.toLowerCasePropertyNames(t)).attendee&&(t=t.attendee),this.credentials=new s.default,this.credentials.attendeeId=t.attendeeid,this.credentials.externalUserId=t.externaluserid,this.credentials.joinToken=t.jointoken),this.videoDownlinkBandwidthPolicy=new a.default(this.credentials?this.credentials.attendeeId:null),this.videoUplinkBandwidthPolicy=new o.default(this.credentials?this.credentials.attendeeId:null)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLowerCasePropertyNames=t.isIFramed=t.wait=void 0,t.wait=function(e){return new Promise(t=>setTimeout(t,e))},t.isIFramed=function(){var e;try{return"IFRAME"===(null===(e=window.frameElement)||void 0===e?void 0:e.nodeName)||parent!==top}catch(e){return!0}},t.toLowerCasePropertyNames=function e(t){return null===t?null:"object"!=typeof t?t:Array.isArray(t)?t.map(e):Object.keys(t).reduce((n,r)=>{const i=t[r],a="object"==typeof i?e(i):i;return n[r.toLowerCase()]=a,n},{})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this._audioHostURL=null,this._screenDataURL=null,this._screenSharingURL=null,this._screenViewingURL=null,this._signalingURL=null,this._turnControlURL=null,this._eventIngestionURL=null,this.urlRewriter=e=>e}get audioHostURL(){return this.urlRewriter(this._audioHostURL)}set audioHostURL(e){this._audioHostURL=e}get screenDataURL(){return this.urlRewriter(this._screenDataURL)}set screenDataURL(e){this._screenDataURL=e}get screenSharingURL(){return this.urlRewriter(this._screenSharingURL)}set screenSharingURL(e){this._screenSharingURL=e}get screenViewingURL(){return this.urlRewriter(this._screenViewingURL)}set screenViewingURL(e){this._screenViewingURL=e}get signalingURL(){return this.urlRewriter(this._signalingURL)}set signalingURL(e){this._signalingURL=e}get turnControlURL(){return this.urlRewriter(this._turnControlURL)}set turnControlURL(e){this._turnControlURL=e}get eventIngestionURL(){return this.urlRewriter(this._eventIngestionURL)}set eventIngestionURL(e){this._eventIngestionURL=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDestroyable=void 0,t.isDestroyable=function(e){return e&&"destroy"in e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{acquireAudioInputStream(){return Promise.reject()}acquireVideoInputStream(){return Promise.reject()}acquireDisplayInputStream(e){return Promise.reject()}releaseMediaStream(e){}bindToAudioVideoController(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadWorker=void 0;const r=n(909),i={method:"GET",mode:"cors",credentials:"omit",redirect:"follow",referrerPolicy:"no-referrer"};t.loadWorker=(e,t,n,a)=>{null==a||a.debug(`Loading ${t} worker from ${e}.`);let o=!1;try{o=self.origin===new URL(e).origin}catch(e){null==a||a.error("Could not compare origins.",e)}if(o){const i=r.withQueryString(e,n);return Promise.resolve(new Worker(i,{name:t}))}return r.fetchWithBehavior(e,i,n).then(e=>{if(e.ok)return e.blob().then(e=>new Worker(window.URL.createObjectURL(e)));throw new Error("Fetch failed.")})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VoiceFocusAudioWorkletNode=void 0;class r extends("undefined"!=typeof globalThis&&globalThis.AudioWorkletNode||class{}){}t.VoiceFocusAudioWorkletNode=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"}(t.Direction||(t.Direction={}))},function(e,t,n){"use strict";function r(){return Array.prototype.slice.call(arguments).reduce((function(e,t){return"string"==typeof t||Array.isArray(t)?e.concat(t):e}),[]).filter(Boolean).join(" ")}n.r(t),n.d(t,"default",(function(){return r}))},function(e,t,n){"use strict";e.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},function(e,t,n){"use strict";e.exports=function(e){return null==e?[]:"length"in e?e:[e]}},function(e,t,n){"use strict";var r=n(213);e.exports=function(e,t){return e.length?(r(e,e.length,0,t),e):t}},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var r,i=[],a=-1;++a<e.length;)(r=e[a].resolveAll)&&i.indexOf(r)<0&&(t=r(t,n),i.push(r));return t}},function(e,t,n){"use strict";var r=n(215)(/[A-Za-z]/);e.exports=r},function(e,t,n){"use strict";var r=n(214),i=n(513),a=n(213),o=n(511),s=n(514),l=n(270),c=n(926),u=n(927),d=n(929),h=n(928),f={name:"labelEnd",tokenize:function(e,t,n){var r,i,a=this,s=a.events.length;for(;s--;)if(("labelImage"===a.events[s][1].type||"labelLink"===a.events[s][1].type)&&!a.events[s][1]._balanced){r=a.events[s][1];break}return function(t){if(!r)return n(t);return r._inactive?c(t):(i=a.parser.defined.indexOf(o(a.sliceSerialize({start:r.end,end:a.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l)};function l(n){return 40===n?e.attempt(p,t,i?t:c)(n):91===n?e.attempt(m,t,i?e.attempt(g,t,c):c)(n):i?t(n):c(n)}function c(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){var n,r,o,c,u,d,h,f=e.length,p=0;for(;f--;)if(c=e[f][1],u){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[f][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(d){if("enter"===e[f][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(u=f,"labelLink"!==c.type)){p=2;break}}else"labelEnd"===c.type&&(d=f);return n={type:"labelLink"===e[u][1].type?"link":"image",start:l(e[u][1].start),end:l(e[e.length-1][1].end)},r={type:"label",start:l(e[u][1].start),end:l(e[d][1].end)},o={type:"labelText",start:l(e[u+p+2][1].end),end:l(e[d-2][1].start)},h=i(h=[["enter",n,t],["enter",r,t]],e.slice(u+1,u+p+3)),h=i(h,[["enter",o,t]]),h=i(h,s(t.parser.constructs.insideSpan.null,e.slice(u+p+4,d-3),t)),h=i(h,[["exit",o,t],e[d-2],e[d-1],["exit",r,t]]),h=i(h,e.slice(d+1)),h=i(h,[["exit",n,t]]),a(e,u,e.length,h),e},resolveAll:function(e){var t,n=-1;for(;++n<e.length;)(t=e[n][1])._used||"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},p={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),h(e,i)};function i(t){return 41===t?s(t):c(e,a,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function a(t){return r(t)?h(e,o)(t):s(t)}function o(t){return 34===t||39===t||40===t?d(e,h(e,s),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},m={tokenize:function(e,t,n){var r=this;return function(t){return u.call(r,e,i,n,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.indexOf(o(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))<0?n(e):t(e)}}},g={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};e.exports=f},function(e,t,n){var r=n(58),i=n(1581);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){var r=n(58),i=n(1612);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t){function n(t){return e.exports=n="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.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r,i,a,o,s,l,c,u;e.exports=(u=n(84),i=(r=u).lib,a=i.WordArray,o=i.Hasher,s=r.algo,l=[],c=s.SHA1=o.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var d=(r<<5|r>>>27)+s+l[c];d+=c<20?1518500249+(i&a|~i&o):c<40?1859775393+(i^a^o):c<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=o._createHelper(c),r.HmacSHA1=o._createHmacHelper(c),u.SHA1)},function(e,t,n){var r,i,a,o;e.exports=(r=n(84),a=(i=r).lib.Base,o=i.enc.Utf8,void(i.algo.HMAC=a.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,l=a.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;i.sigBytes=a.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},function(e,t,n){"use strict";var r=n(107)("%TypeError%"),i=n(523),a=n(318),o=n(201);e.exports=function(e,t){if("Object"!==o(e))throw new r("Assertion failed: Type(O) is not Object");if(!a(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+i(t));return e[t]}},function(e,t,n){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&i&&"function"==typeof i.get?i.get:null,o=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,u=s&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f=Boolean.prototype.valueOf,p=Object.prototype.toString,m=String.prototype.match,g="function"==typeof BigInt?BigInt.prototype.valueOf:null,v=n(1702).custom,b=v&&w(v)?v:null;function y(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function A(e){return String(e).replace(/"/g,"&quot;")}function _(e){return"[object Array]"===C(e)}function w(e){return"[object Symbol]"===C(e)}e.exports=function e(t,n,r,i){var s=n||{};if(S(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function(e,t){return y(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,T),"single",t)}(t,s);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var l=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=l&&l>0&&"object"==typeof t)return"[Object]";if(void 0===i)i=[];else if(function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}(i,t)>=0)return"[Circular]";function p(t,n){return n&&(i=i.slice()).push(n),e(t,s,r+1,i)}if("function"==typeof t){var v=function(e){if(e.name)return e.name;var t=m.call(e,/^function\s*([\w$]+)/);if(t)return t[1];return null}(t);return"[Function"+(v?": "+v:"")+"]"}if(w(t)){var E=Symbol.prototype.toString.call(t);return"object"==typeof t?k(E):E}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var M="<"+String(t.nodeName).toLowerCase(),P=t.attributes||[],D=0;D<P.length;D++)M+=" "+P[D].name+"="+y(A(P[D].value),"double",s);return M+=">",t.childNodes&&t.childNodes.length&&(M+="..."),M+="</"+String(t.nodeName).toLowerCase()+">"}if(_(t))return 0===t.length?"[]":"[ "+I(t,p).join(", ")+" ]";if(function(e){return"[object Error]"===C(e)}(t)){var N=I(t,p);return 0===N.length?"["+String(t)+"]":"{ ["+String(t)+"] "+N.join(", ")+" }"}if("object"==typeof t){if(b&&"function"==typeof t[b])return t[b]();if("function"==typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!=typeof e)return!1;try{a.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var L=[];return o.call(t,(function(e,n){L.push(p(n,t)+" => "+p(e,t))})),O("Map",a.call(t),L)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{a.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var R=[];return u.call(t,(function(e){R.push(p(e,t))})),O("Set",c.call(t),R)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return x("WeakMap");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return x("WeakSet");if(function(e){return"[object Number]"===C(e)}(t))return k(p(Number(t)));if(function(e){return"[object BigInt]"===C(e)}(t))return k(p(g.call(t)));if(function(e){return"[object Boolean]"===C(e)}(t))return k(f.call(t));if(function(e){return"[object String]"===C(e)}(t))return k(p(String(t)));if(!function(e){return"[object Date]"===C(e)}(t)&&!function(e){return"[object RegExp]"===C(e)}(t)){var B=I(t,p);return 0===B.length?"{}":"{ "+B.join(", ")+" }"}return String(t)};var E=Object.prototype.hasOwnProperty||function(e){return e in this};function S(e,t){return E.call(e,t)}function C(e){return p.call(e)}function T(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+t.toString(16)}function k(e){return"Object("+e+")"}function x(e){return e+" { ? }"}function O(e,t,n){return e+" ("+t+") {"+n.join(", ")+"}"}function I(e,t){var n=_(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=S(e,i)?t(e[i],e):""}for(var a in e)S(e,a)&&(n&&String(Number(a))===a&&a<e.length||(/[^\w$]/.test(a)?r.push(t(a,e)+": "+t(e[a],e)):r.push(a+": "+t(e[a],e))));return r}},function(e,t,n){"use strict";var r=n(107)("%Array%"),i=!r.isArray&&n(238)("Object.prototype.toString");e.exports=r.isArray||function(e){return"[object Array]"===i(e)}},function(e,t,n){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},function(e,t,n){"use strict";e.exports=n(527)},function(e,t,n){"use strict";var r=Function.prototype.toString,i=/^\s*class\b/,a=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},o=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(s)return function(e){try{return!a(e)&&(r.call(e),!0)}catch(e){return!1}}(e);if(a(e))return!1;var t=o.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},function(e,t,n){"use strict";e.exports=n(954)},function(e,t,n){"use strict";var r=n(141),i=n(265),a=n(960),o=n(962),s=n(1733),l=i(a);r(l,{getPolyfill:o,implementation:a,shim:s}),e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatten=void 0;var r=n(216);t.default={xml:!1,decodeEntities:!0};var i={_useHtmlParser2:!0,xmlMode:!0};t.flatten=function(e){return(null==e?void 0:e.xml)?"boolean"==typeof e.xml?i:r.__assign(r.__assign({},i),e.xml):null!=e?e:void 0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.parse=void 0,i(n(967),t);var o=n(967);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return a(o).default}});var s=n(1738);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a(s).default}})},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ﬃ","fflig":"ﬀ","ffllig":"ﬄ","Ffr":"𝔉","ffr":"𝔣","filig":"ﬁ","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"ﬂ","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"Ĳ","ijlig":"ĳ","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ŉ","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},function(e){e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTraversal=t.procedure=void 0,t.procedure={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1,_flexibleDescendant:-1},t.isTraversal=function(e){return t.procedure[e.type]<0}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.subselects=t.getNextSiblings=t.ensureIsTag=t.PLACEHOLDER_ELEMENT=void 0;var i=n(239),a=n(534);function o(e,t){return e===i.falseFunc?i.falseFunc:function(n){return t.isTag(n)&&e(n)}}function s(e,t){var n=t.getSiblings(e);if(n.length<=1)return[];var r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}t.PLACEHOLDER_ELEMENT={},t.ensureIsTag=o,t.getNextSiblings=s;var l=function(e,t,n,r,i){var a=i(t,{xmlMode:!!n.xmlMode,adapter:n.adapter,equals:n.equals},r);return function(t){return a(t)&&e(t)}};t.subselects={is:l,matches:l,where:l,not:function(e,t,n,r,a){var o=a(t,{xmlMode:!!n.xmlMode,adapter:n.adapter,equals:n.equals},r);return o===i.falseFunc?e:o===i.trueFunc?i.falseFunc:function(t){return!o(t)&&e(t)}},has:function(e,n,l,c,u){var d=l.adapter,h={xmlMode:!!l.xmlMode,adapter:d,equals:l.equals},f=n.some((function(e){return e.some(a.isTraversal)}))?[t.PLACEHOLDER_ELEMENT]:void 0,p=u(n,h,f);if(p===i.falseFunc)return i.falseFunc;if(p===i.trueFunc)return function(t){return d.getChildren(t).some(d.isTag)&&e(t)};var m=o(p,d),g=p.shouldTestNextSiblings,v=void 0!==g&&g;return f?function(t){f[0]=t;var n=d.getChildren(t),i=v?r(r([],n,!0),s(t,d),!0):n;return e(t)&&d.existsOne(m,i)}:function(t){return e(t)&&d.existsOne(m,d.getChildren(t))}}}},function(e,t,n){"use strict";const r=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="�",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";const r=n(202);e.exports=class extends r{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.update=void 0;var r=n(275),i=n(997),a=n(990),o=n(148);function s(e,t){var n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(var i=0;i<n.length;i++){var a=n[i];a.parent&&a.parent.children!==n&&r.DomUtils.removeElement(a),t?(a.prev=n[i-1]||null,a.next=n[i+1]||null):a.prev=a.next=null,a.parent=t}return t}t.default=function(t,n,r){if(void 0!==e&&e.isBuffer(t)&&(t=t.toString()),"string"==typeof t)return n.xmlMode||n._useHtmlParser2?i.parse(t,n):a.parse(t,n,r);var l=t;if(!Array.isArray(l)&&o.isDocument(l))return l;var c=new o.Document([]);return s(l,c),c},t.update=s}).call(this,n(113).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get=function(){return(0,r.default)({},o)},t.merge=s,t.reset=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o={},s(e)};var r=a(n(273)),i=a(n(541));function a(e){return e&&e.__esModule?e:{default:e}}var o={};function s(e){e.adapter&&(0,i.default)(e.adapter),(0,r.default)(o,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)throw new Error("\n      Enzyme Internal Error: Enzyme expects an adapter to be configured, but found none.\n      To configure an adapter, you should call `Enzyme.configure({ adapter: new Adapter() })`\n      before using any of Enzyme's top level APIs, where `Adapter` is the adapter\n      corresponding to the library currently being tested. For example:\n\n      import Adapter from 'enzyme-adapter-react-15';\n\n      To find out more about this, see https://airbnb.io/enzyme/docs/installation/index.html\n    ");if("function"==typeof e){if(Object.getPrototypeOf(e)===a.default)throw new Error("\n        Enzyme Internal Error: Enzyme expects an adapter instance to be configured -\n        you provided an adapter *constructor*.\n        To configure an adapter, you should call `Enzyme.configure({ adapter: new Adapter() })`\n        before using any of Enzyme's top level APIs, where `Adapter` is the adapter\n        corresponding to the library currently being tested. For example:\n\n        import Adapter from 'enzyme-adapter-react-15';\n\n        To find out more about this, see https://airbnb.io/enzyme/docs/installation/index.html\n      ");throw new Error("\n      Enzyme Internal Error: Enzyme expects an adapter to be configured -\n      an enzyme adapter must be an object instance; you provided a function.\n      To configure an adapter, you should call `Enzyme.configure({ adapter: new Adapter() })`\n      before using any of Enzyme's top level APIs, where `Adapter` is the adapter\n      corresponding to the library currently being tested. For example:\n\n      import Adapter from 'enzyme-adapter-react-15';\n\n      To find out more about this, see https://airbnb.io/enzyme/docs/installation/index.html\n    ")}if(!(e instanceof a.default))throw new Error("Enzyme Internal Error: configured enzyme adapter did not inherit from the EnzymeAdapter base class")};var r,i=n(998),a=(r=i)&&r.__esModule?r:{default:r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(68))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(401),i=n(398),a=n(399),o=n(428),s=n(391),l=n(400),c=n(397),u=n(434),d=n(427),h=Object(d.a)({defaultModifiers:[s.a,c.a,i.a,a.a,l.a,o.a,u.a,r.a]})},function(e,t,n){var r=n(351),i=n(1210);function a(t,n,o){return i()?(e.exports=a=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports),a.apply(null,arguments)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e);return!isNaN(t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(285),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.a)(e,6e4*n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(285),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.a)(e,36e5*n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(322),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t),o=7*n;return Object(i.default)(e,o)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(323),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.default)(e,12*n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=l(a),s=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},h=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),f=function(){return h?"_"+Math.random().toString(36).substr(2,12):void 0},p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||f(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||f(),prevId:n}:null}}]),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return h&&e?o.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,o.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),o.default.createElement("input",r({},i,{ref:this.inputRef})),o.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?o.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(a.Component);p.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},p.defaultProps={minWidth:1,injectStyles:!0},t.default=p},function(e,t,n){
/*! @license DOMPurify 2.3.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.8/LICENSE */
e.exports=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})(t)}function t(e,n){return(t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,i,a){return(r=n()?Reflect.construct:function(e,n,r){var i=[null];i.push.apply(i,n);var a=new(Function.bind.apply(e,i));return r&&t(a,r.prototype),a}).apply(null,arguments)}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o=Object.hasOwnProperty,s=Object.setPrototypeOf,l=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,d=Object.freeze,h=Object.seal,f=Object.create,p="undefined"!=typeof Reflect&&Reflect,m=p.apply,g=p.construct;m||(m=function(e,t,n){return e.apply(t,n)}),d||(d=function(e){return e}),h||(h=function(e){return e}),g||(g=function(e,t){return r(e,i(t))});var v,b=x(Array.prototype.forEach),y=x(Array.prototype.pop),A=x(Array.prototype.push),_=x(String.prototype.toLowerCase),w=x(String.prototype.match),E=x(String.prototype.replace),S=x(String.prototype.indexOf),C=x(String.prototype.trim),T=x(RegExp.prototype.test),k=(v=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g(v,t)});function x(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return m(e,t,r)}}function O(e,t){s&&s(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var i=_(r);i!==r&&(l(t)||(t[n]=i),r=i)}e[r]=!0}return e}function I(e){var t,n=f(null);for(t in e)m(o,e,[t])&&(n[t]=e[t]);return n}function M(e,t){for(;null!==e;){var n=u(e,t);if(n){if(n.get)return x(n.get);if("function"==typeof n.value)return x(n.value)}e=c(e)}return function(e){return console.warn("fallback value for",e),null}}var P=d(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=d(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N=d(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=d(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=d(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),B=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j=d(["#text"]),F=d(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),U=d(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=d(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=h(/<%[\w\W]*|[\w\W]*%>/gm),G=h(/^data-[\-\w.\u00B7-\uFFFF]/),q=h(/^aria-[\-\w]+$/),Y=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=h(/^(?:\w+script|data):/i),X=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=h(/^html$/i),$=function(){return"undefined"==typeof window?null:window},J=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null;n.currentScript&&n.currentScript.hasAttribute("data-tt-policy-suffix")&&(r=n.currentScript.getAttribute("data-tt-policy-suffix"));var i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};return function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$(),r=function(e){return t(e)};if(r.version="2.3.8",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var a=n.document,o=n.document,s=n.DocumentFragment,l=n.HTMLTemplateElement,c=n.Node,u=n.Element,h=n.NodeFilter,f=n.NamedNodeMap,p=void 0===f?n.NamedNodeMap||n.MozNamedAttrMap:f,m=n.HTMLFormElement,g=n.DOMParser,v=n.trustedTypes,x=u.prototype,Z=M(x,"cloneNode"),ee=M(x,"nextSibling"),te=M(x,"childNodes"),ne=M(x,"parentNode");if("function"==typeof l){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var ie=J(v,a),ae=ie?ie.createHTML(""):"",oe=o,se=oe.implementation,le=oe.createNodeIterator,ce=oe.createDocumentFragment,ue=oe.getElementsByTagName,de=a.importNode,he={};try{he=I(o).documentMode?o.documentMode:{}}catch(e){}var fe={};r.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==he;var pe,me,ge=V,ve=W,be=G,ye=q,Ae=K,_e=X,we=Y,Ee=null,Se=O({},[].concat(i(P),i(D),i(N),i(R),i(j))),Ce=null,Te=O({},[].concat(i(F),i(U),i(H),i(z))),ke=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Oe=null,Ie=!0,Me=!0,Pe=!1,De=!1,Ne=!1,Le=!1,Re=!1,Be=!1,je=!1,Fe=!1,Ue=!0,He=!0,ze=!1,Ve={},We=null,Ge=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qe=null,Ye=O({},["audio","video","img","source","image","track"]),Ke=null,Xe=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qe="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml",Ze=Je,et=!1,tt=["application/xhtml+xml","text/html"],nt="text/html",rt=null,it=o.createElement("form"),at=function(e){return e instanceof RegExp||e instanceof Function},ot=function(t){rt&&rt===t||(t&&"object"===e(t)||(t={}),t=I(t),Ee="ALLOWED_TAGS"in t?O({},t.ALLOWED_TAGS):Se,Ce="ALLOWED_ATTR"in t?O({},t.ALLOWED_ATTR):Te,Ke="ADD_URI_SAFE_ATTR"in t?O(I(Xe),t.ADD_URI_SAFE_ATTR):Xe,qe="ADD_DATA_URI_TAGS"in t?O(I(Ye),t.ADD_DATA_URI_TAGS):Ye,We="FORBID_CONTENTS"in t?O({},t.FORBID_CONTENTS):Ge,xe="FORBID_TAGS"in t?O({},t.FORBID_TAGS):{},Oe="FORBID_ATTR"in t?O({},t.FORBID_ATTR):{},Ve="USE_PROFILES"in t&&t.USE_PROFILES,Ie=!1!==t.ALLOW_ARIA_ATTR,Me=!1!==t.ALLOW_DATA_ATTR,Pe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,De=t.SAFE_FOR_TEMPLATES||!1,Ne=t.WHOLE_DOCUMENT||!1,Be=t.RETURN_DOM||!1,je=t.RETURN_DOM_FRAGMENT||!1,Fe=t.RETURN_TRUSTED_TYPE||!1,Re=t.FORCE_BODY||!1,Ue=!1!==t.SANITIZE_DOM,He=!1!==t.KEEP_CONTENT,ze=t.IN_PLACE||!1,we=t.ALLOWED_URI_REGEXP||we,Ze=t.NAMESPACE||Je,t.CUSTOM_ELEMENT_HANDLING&&at(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&at(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),pe=pe=-1===tt.indexOf(t.PARSER_MEDIA_TYPE)?nt:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===pe?function(e){return e}:_,De&&(Me=!1),je&&(Be=!0),Ve&&(Ee=O({},i(j)),Ce=[],!0===Ve.html&&(O(Ee,P),O(Ce,F)),!0===Ve.svg&&(O(Ee,D),O(Ce,U),O(Ce,z)),!0===Ve.svgFilters&&(O(Ee,N),O(Ce,U),O(Ce,z)),!0===Ve.mathMl&&(O(Ee,R),O(Ce,H),O(Ce,z))),t.ADD_TAGS&&(Ee===Se&&(Ee=I(Ee)),O(Ee,t.ADD_TAGS)),t.ADD_ATTR&&(Ce===Te&&(Ce=I(Ce)),O(Ce,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&O(Ke,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(We===Ge&&(We=I(We)),O(We,t.FORBID_CONTENTS)),He&&(Ee["#text"]=!0),Ne&&O(Ee,["html","head","body"]),Ee.table&&(O(Ee,["tbody"]),delete xe.tbody),d&&d(t),rt=t)},st=O({},["mi","mo","mn","ms","mtext"]),lt=O({},["foreignobject","desc","title","annotation-xml"]),ct=O({},["title","style","font","a","script"]),ut=O({},D);O(ut,N),O(ut,L);var dt=O({},R);O(dt,B);var ht=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});var n=_(e.tagName),r=_(t.tagName);return e.namespaceURI===$e?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Qe?"svg"===n&&("annotation-xml"===r||st[r]):Boolean(ut[n]):e.namespaceURI===Qe?t.namespaceURI===Je?"math"===n:t.namespaceURI===$e?"math"===n&&lt[r]:Boolean(dt[n]):e.namespaceURI===Je&&!(t.namespaceURI===$e&&!lt[r])&&!(t.namespaceURI===Qe&&!st[r])&&!dt[n]&&(ct[n]||!ut[n])},ft=function(e){A(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},pt=function(e,t){try{A(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){A(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ce[e])if(Be||je)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){var t,n;if(Re)e="<remove></remove>"+e;else{var r=w(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===pe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ie?ie.createHTML(e):e;if(Ze===Je)try{t=(new g).parseFromString(i,pe)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=et?"":i}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),Ze===Je?ue.call(t,Ne?"html":"body")[0]:Ne?t.documentElement:a},gt=function(e){return le.call(e.ownerDocument||e,e,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},vt=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},bt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},yt=function(e,t,n){fe[e]&&b(fe[e],(function(e){e.call(r,t,n,rt)}))},At=function(e){var t;if(yt("beforeSanitizeElements",e,null),vt(e))return ft(e),!0;if(T(/[\u0080-\uFFFF]/,e.nodeName))return ft(e),!0;var n=me(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:n,allowedTags:Ee}),e.hasChildNodes()&&!bt(e.firstElementChild)&&(!bt(e.content)||!bt(e.content.firstElementChild))&&T(/<[/\w]/g,e.innerHTML)&&T(/<[/\w]/g,e.textContent))return ft(e),!0;if("select"===n&&T(/<template/i,e.innerHTML))return ft(e),!0;if(!Ee[n]||xe[n]){if(!xe[n]&&wt(n)){if(ke.tagNameCheck instanceof RegExp&&T(ke.tagNameCheck,n))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))return!1}if(He&&!We[n]){var i=ne(e)||e.parentNode,a=te(e)||e.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(Z(a[o],!0),ee(e))}return ft(e),!0}return e instanceof u&&!ht(e)?(ft(e),!0):"noscript"!==n&&"noembed"!==n||!T(/<\/no(script|embed)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,t=E(t,ge," "),t=E(t,ve," "),e.textContent!==t&&(A(r.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(ft(e),!0)},_t=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in o||n in it))return!1;if(Me&&!Oe[t]&&T(be,t));else if(Ie&&T(ye,t));else if(!Ce[t]||Oe[t]){if(!(wt(e)&&(ke.tagNameCheck instanceof RegExp&&T(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&T(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&T(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Ke[t]);else if(T(we,E(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!qe[e])if(Pe&&!T(Ae,E(n,_e,"")));else if(n)return!1;return!0},wt=function(e){return e.indexOf("-")>0},Et=function(e){var t,n,i,a;yt("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce};for(a=o.length;a--;){var l=t=o[a],c=l.name,u=l.namespaceURI;if(n="value"===c?t.value:C(t.value),i=me(c),s.attrName=i,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,s),n=s.attrValue,!s.forceKeepAttr&&(pt(c,e),s.keepAttr))if(T(/\/>/i,n))pt(c,e);else{De&&(n=E(n,ge," "),n=E(n,ve," "));var d=me(e.nodeName);if(_t(d,i,n))try{u?e.setAttributeNS(u,c,n):e.setAttribute(c,n),y(r.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)}},St=function e(t){var n,r=gt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),At(n)||(n.content instanceof s&&e(n.content),Et(n));yt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(t,i){var o,l,u,d,h;if((et=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!bt(t)){if("function"!=typeof t.toString)throw k("toString is not a function");if("string"!=typeof(t=t.toString()))throw k("dirty is not a string, aborting")}if(!r.isSupported){if("object"===e(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof t)return n.toStaticHTML(t);if(bt(t))return n.toStaticHTML(t.outerHTML)}return t}if(Le||ot(i),r.removed=[],"string"==typeof t&&(ze=!1),ze){if(t.nodeName){var f=me(t.nodeName);if(!Ee[f]||xe[f])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(l=(o=mt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===l.nodeName?o=l:"HTML"===l.nodeName?o=l:o.appendChild(l);else{if(!Be&&!De&&!Ne&&-1===t.indexOf("<"))return ie&&Fe?ie.createHTML(t):t;if(!(o=mt(t)))return Be?null:Fe?ae:""}o&&Re&&ft(o.firstChild);for(var p=gt(ze?t:o);u=p.nextNode();)3===u.nodeType&&u===d||At(u)||(u.content instanceof s&&St(u.content),Et(u),d=u);if(d=null,ze)return t;if(Be){if(je)for(h=ce.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return Ce.shadowroot&&(h=de.call(a,h,!0)),h}var m=Ne?o.outerHTML:o.innerHTML;return Ne&&Ee["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&T(Q,o.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+m),De&&(m=E(m,ge," "),m=E(m,ve," ")),ie&&Fe?ie.createHTML(m):m},r.setConfig=function(e){ot(e),Le=!0},r.clearConfig=function(){rt=null,Le=!1},r.isValidAttribute=function(e,t,n){rt||ot({});var r=me(e),i=me(t);return _t(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],A(fe[e],t))},r.removeHook=function(e){if(fe[e])return y(fe[e])},r.removeHooks=function(e){fe[e]&&(fe[e]=[])},r.removeAllHooks=function(){fe={}},r}()}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(9),i=n.n(r),a=n(11),o=n(1),s=n(7),l=n(5),c=n(18),u=n(26),d=i.a.mark(g),h=i.a.mark(v),f=i.a.mark(b),p=i.a.mark(y),m=i.a.mark(A);function g(e){var t,n,r,h,f,p,m,g,v,b;return i.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=t.videoId,r=t.timePoint,h=t.ownerScaffId,i.next=3,Object(a.h)({type:l.b.CANVAS_UPDATE_DRAWING_PROPERTIES,data:{userComprehension:""}});case 3:if(f=Object(s.get)(u.a.getState(),"cogvid.cogvidDetails.videoLength"),n&&0!==f){i.next=6;break}return i.abrupt("return");case 6:return i.prev=6,p=o.c.getScaffIdBaseOnMenu({ownerScaffId:h}),i.next=10,c.g.get("videos/".concat(n,"/comprehensions/").concat(r),{params:{userScaffId:p}});case 10:return m=i.sent,g=m.userComprehension,v=void 0===g?"":g,b=m.blockSeq,i.next=14,Object(a.h)({type:l.b.GET_CB_DATA_SUCCESS,data:{userComprehension:v,blockSeq:b}});case 14:e.resolve&&e.resolve(v),i.next=24;break;case 17:return i.prev=17,i.t0=i.catch(6),i.next=21,Object(a.h)({type:l.b.GET_CB_DATA_FAILURE});case 21:return i.next=23,o.e.error(i.t0);case 23:e.reject&&e.reject();case 24:case"end":return i.stop()}}),d,null,[[6,17]])}function v(e){var t,n,r,s,u,d;return i.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=t.videoId,r=t.timePoint,s=t.userComprehension,u=t.blockSeq,d=t.ctxBg,i.prev=1,i.next=4,c.g.put("videos/".concat(n,"/comprehensions/").concat(r),{userComprehension:s,ctxBg:d});case 4:return i.next=6,Object(a.h)({type:l.b.SAVE_CB_DATA_SUCCESS,data:{blockSeq:u,ctxBg:d,empty:!s}});case 6:e.resolve&&e.resolve(),i.next=14;break;case 9:return i.prev=9,i.t0=i.catch(1),i.next=13,o.e.error(i.t0);case 13:e.reject&&e.reject();case 14:case"end":return i.stop()}}),h,null,[[1,9]])}function b(e){var t,n,r,a;return i.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=t.videoId,r=t.timePoint,a=t.ctxBg,i.prev=1,i.next=4,c.g.patch("videos/".concat(n,"/comprehensions/").concat(r),{ctxBg:a});case 4:e.resolve&&e.resolve(),i.next=12;break;case 7:return i.prev=7,i.t0=i.catch(1),i.next=11,o.e.error(i.t0);case 11:e.reject&&e.reject();case 12:case"end":return i.stop()}}),f,null,[[1,7]])}function y(e){var t,n,r,s;return i.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.data,n=t.videoId,r=t.timePoint,s=t.blockSeq,i.prev=1,i.next=4,c.g.delete("videos/".concat(n,"/comprehensions/").concat(r));case 4:return i.next=6,Object(a.h)({type:l.b.DELETE_CB_SUCCESS,data:{blockSeq:s}});case 6:e.resolve&&e.resolve(),i.next=14;break;case 9:return i.prev=9,i.t0=i.catch(1),i.next=13,o.e.error(i.t0);case 13:e.reject&&e.reject();case 14:case"end":return i.stop()}}),p,null,[[1,9]])}function A(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(a.j)(l.b.GET_CB_DATA,g);case 2:return e.next=4,Object(a.j)(l.b.SAVE_CB_DATA,v);case 4:return e.next=6,Object(a.j)(l.b.UPDATE_SHOW_CONTEXTUAL_IMG,b);case 6:return e.next=8,Object(a.j)(l.b.DELETE_CB,y);case 8:case"end":return e.stop()}}),m)}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",body:"body--3eGpS",formTitle:"formTitle--2sup6",activationDesc:"activationDesc--3r9zH"}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(50),i=n(38),a=n(30);function o(e){Object(a.a)(1,arguments);var t=Object(i.default)(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function s(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e),s=Object(r.a)(t),l=n.getFullYear(),c=n.getDate(),u=new Date(0);u.setFullYear(l,s,15),u.setHours(0,0,0,0);var d=o(u);return n.setMonth(s,Math.min(c,d)),n}},function(e,t,n){var r=n(1090);e.exports=f,e.exports.parse=a,e.exports.compile=function(e,t){return s(a(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,o=0,s="",u=t&&t.delimiter||"/";null!=(n=i.exec(e));){var d=n[0],h=n[1],f=n.index;if(s+=e.slice(o,f),o=f+d.length,h)s+=h[1];else{var p=e[o],m=n[2],g=n[3],v=n[4],b=n[5],y=n[6],A=n[7];s&&(r.push(s),s="");var _=null!=m&&null!=p&&p!==m,w="+"===y||"*"===y,E="?"===y||"*"===y,S=n[2]||u,C=v||b;r.push({name:g||a++,prefix:m||"",delimiter:S,optional:E,repeat:w,partial:_,asterisk:!!A,pattern:C?c(C):A?".*":"[^"+l(S)+"]+?"})}}return o<e.length&&(s+=e.substr(o)),s&&r.push(s),r}function o(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function s(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"==typeof e[i]&&(n[i]=new RegExp("^(?:"+e[i].pattern+")$",d(t)));return function(t,i){for(var a="",s=t||{},l=(i||{}).pretty?o:encodeURIComponent,c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var d,h=s[u.name];if(null==h){if(u.optional){u.partial&&(a+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(h)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<h.length;f++){if(d=l(h[f]),!n[c].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");a+=(0===f?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(h).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):l(h),!n[c].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');a+=u.prefix+d}}else a+=u}return a}}function l(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function h(e,t,n){r(t)||(n=t||n,t=[]);for(var i=(n=n||{}).strict,a=!1!==n.end,o="",s=0;s<e.length;s++){var c=e[s];if("string"==typeof c)o+=l(c);else{var h=l(c.prefix),f="(?:"+c.pattern+")";t.push(c),c.repeat&&(f+="(?:"+h+f+")*"),o+=f=c.optional?c.partial?h+"("+f+")?":"(?:"+h+"("+f+"))?":h+"("+f+")"}}var p=l(n.delimiter||"/"),m=o.slice(-p.length)===p;return i||(o=(m?o.slice(0,-p.length):o)+"(?:"+p+"(?=$))?"),o+=a?"$":i&&m?"":"(?="+p+"|$)",u(new RegExp("^"+o,d(n)),t)}function f(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(f(e[i],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return h(a(e,n),t,n)}(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createChangeEmitter=function(){var e=[],t=e;function n(){t===e&&(t=e.slice())}return{listen:function(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var r=!0;return n(),t.push(e),function(){if(r){r=!1,n();var i=t.indexOf(e);t.splice(i,1)}}},emit:function(){for(var n=e=t,r=0;r<n.length;r++)n[r].apply(n,arguments)}}}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",videoUploadModal:"videoUploadModal--1ezIp"}},function(e,t,n){"use strict";var r=n(764),i=n(31),a=n(749);s.httpHandler=n(1206);function o(e,t,n){var r=e;return a(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function s(e,t,n){return l(t=o(e,t,n))}function l(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(c),g)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(u),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,v)}function a(){if(!l){var t;clearTimeout(u),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=v,a=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:d,rawRequest:c},c.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(c.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,i,i.body)}}var o,l,c=e.xhr||null;c||(c=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var u,d=c.url=e.uri||e.url,h=c.method=e.method||"GET",f=e.body||e.data,p=c.headers=e.headers||{},m=!!e.sync,g=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:c};if("json"in e&&!1!==e.json&&(g=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(a,0)},c.onload=a,c.onerror=i,c.onprogress=function(){},c.onabort=function(){l=!0},c.ontimeout=i,c.open(h,d,!m,e.username,e.password),m||(c.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(u=setTimeout((function(){if(!l){l=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(o in p)p.hasOwnProperty(o)&&c.setRequestHeader(o,p[o]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(f||null),c}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=o(t,n,r)).method=e.toUpperCase(),l(n)}}))},function(e,t,n){var r=n(117),i=e.exports={WebVTT:n(1207),VTTCue:n(1208),VTTRegion:n(1209)};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,o=i.VTTRegion,s=r.VTTCue,l=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=o},i.restore=function(){r.VTTCue=s,r.VTTRegion=l},r.VTTCue||i.shim()},function(e,t,n){var r,i,a,o,s;r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var c={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var u=o.path,d=u.substring(0,u.lastIndexOf("/")+1)+a.path;c.path=s.normalizePath(d)}else c.path=o.path,a.params||(c.params=o.params,a.query||(c.query=o.query));return null===c.path&&(c.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(c)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i,a=function(e){return r.test(e)?"hls":i.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},function(e,t,n){"use strict";(function(e){
/**!
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version 1.16.1
 * @license
 * Copyright (c) 2016 Federico Zivolo and contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function a(e){return e&&"[object Function]"==={}.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=o(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:l(s(e))}function c(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),d=n&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?u:10===e?d:u||d}function f(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===o(n,"position")?f(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function m(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,a=document.createRange();a.setStart(r,0),a.setEnd(i,0);var o,s,l=a.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return"BODY"===(s=(o=l).nodeName)||"HTML"!==s&&f(o.firstElementChild)!==o?f(l):l;var c=p(e);return c.host?m(c.host,t):m(e,p(t).host)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||i;return a[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(t,"top"),i=g(t,"left"),a=n?-1:1;return e.top+=r*a,e.bottom+=r*a,e.left+=i*a,e.right+=i*a,e}function b(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],h(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function A(e){var t=e.body,n=e.documentElement,r=h(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var _=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},w=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function C(e){return S({},e,{right:e.left+e.width,bottom:e.top+e.height})}function T(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var n=g(e,"top"),r=g(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?A(e.ownerDocument):{},s=a.width||e.clientWidth||i.width,l=a.height||e.clientHeight||i.height,c=e.offsetWidth-s,u=e.offsetHeight-l;if(c||u){var d=o(e);c-=b(d,"x"),u-=b(d,"y"),i.width-=c,i.height-=u}return C(i)}function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=h(10),i="HTML"===t.nodeName,a=T(e),s=T(t),c=l(e),u=o(t),d=parseFloat(u.borderTopWidth),f=parseFloat(u.borderLeftWidth);n&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=C({top:a.top-s.top-d,left:a.left-s.left-f,width:a.width,height:a.height});if(p.marginTop=0,p.marginLeft=0,!r&&i){var m=parseFloat(u.marginTop),g=parseFloat(u.marginLeft);p.top-=d-m,p.bottom-=d-m,p.left-=f-g,p.right-=f-g,p.marginTop=m,p.marginLeft=g}return(r&&!n?t.contains(c):t===c&&"BODY"!==c.nodeName)&&(p=v(p,t)),p}function x(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=k(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),a=Math.max(n.clientHeight,window.innerHeight||0),o=t?0:g(n),s=t?0:g(n,"left"),l={top:o-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:a};return C(l)}function O(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===o(e,"position"))return!0;var n=s(e);return!!n&&O(n)}function I(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===o(t,"transform");)t=t.parentElement;return t||document.documentElement}function M(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a={top:0,left:0},o=i?I(e):m(e,c(t));if("viewport"===r)a=x(o,i);else{var u=void 0;"scrollParent"===r?"BODY"===(u=l(s(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===r?e.ownerDocument.documentElement:r;var d=k(u,o,i);if("HTML"!==u.nodeName||O(o))a=d;else{var h=A(e.ownerDocument),f=h.height,p=h.width;a.top+=d.top-d.marginTop,a.bottom=f+d.top,a.left+=d.left-d.marginLeft,a.right=p+d.left}}var g="number"==typeof(n=n||0);return a.left+=g?n:n.left||0,a.top+=g?n:n.top||0,a.right-=g?n:n.right||0,a.bottom-=g?n:n.bottom||0,a}function P(e){return e.width*e.height}function D(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var o=M(n,r,a,i),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map((function(e){return S({key:e},s[e],{area:P(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function N(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?I(t):m(t,c(n));return k(n,i,r)}function L(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function R(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function B(e,t,n){n=n.split("-")[0];var r=L(e),i={width:r.width,height:r.height},a=-1!==["right","left"].indexOf(n),o=a?"top":"left",s=a?"left":"top",l=a?"height":"width",c=a?"width":"height";return i[o]=t[o]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[R(s)],i}function j(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function F(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=j(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&a(n)&&(t.offsets.popper=C(t.offsets.popper),t.offsets.reference=C(t.offsets.reference),t=n(t,e))})),t}function U(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=N(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=D(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=B(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=F(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function H(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function z(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],a=i?""+i+n:e;if(void 0!==document.body.style[a])return a}return null}function V(){return this.state.isDestroyed=!0,H(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[z("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function W(e){var t=e.ownerDocument;return t?t.defaultView:window}function G(e,t,n,r){n.updateBound=r,W(e).addEventListener("resize",n.updateBound,{passive:!0});var i=l(e);return function e(t,n,r,i){var a="BODY"===t.nodeName,o=a?t.ownerDocument.defaultView:t;o.addEventListener(n,r,{passive:!0}),a||e(l(o.parentNode),n,r,i),i.push(o)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function q(){this.state.eventsEnabled||(this.state=G(this.reference,this.options,this.state,this.scheduleUpdate))}function Y(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,W(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function K(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function X(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&K(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var Q=n&&/Firefox/i.test(navigator.userAgent);function $(e,t,n){var r=j(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var a="`"+t+"`",o="`"+n+"`";console.warn(o+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return i}var J=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Z=J.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Z.indexOf(e),r=Z.slice(n+1).concat(Z.slice(0,n));return t?r.reverse():r}var te="flip",ne="clockwise",re="counterclockwise";function ie(e,t,n,r){var i=[0,0],a=-1!==["right","left"].indexOf(r),o=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=o.indexOf(j(o,(function(e){return-1!==e.search(/,|\s/)})));o[s]&&-1===o[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return(c=c.map((function(e,r){var i=(1===r?!a:a)?"height":"width",o=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+i[1],o=i[2];if(!a)return e;if(0===o.indexOf("%")){var s=void 0;switch(o){case"%p":s=n;break;case"%":case"%r":default:s=r}return C(s)[t]/100*a}if("vh"===o||"vw"===o){return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a}return a}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){K(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var ae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,a=i.reference,o=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:E({},l,a[l]),end:E({},l,a[l]+a[c]-o[c])};e.offsets.popper=S({},o,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,a=i.popper,o=i.reference,s=r.split("-")[0],l=void 0;return l=K(+n)?[+n,0]:ie(n,a,o,s),"left"===s?(a.top+=l[0],a.left-=l[1]):"right"===s?(a.top+=l[0],a.left+=l[1]):"top"===s?(a.left+=l[0],a.top-=l[1]):"bottom"===s&&(a.left+=l[0],a.top+=l[1]),e.popper=a,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||f(e.instance.popper);e.instance.reference===n&&(n=f(n));var r=z("transform"),i=e.instance.popper.style,a=i.top,o=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=M(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=a,i.left=o,i[r]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),E({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),E({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=S({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],a=Math.floor,o=-1!==["top","bottom"].indexOf(i),s=o?"right":"bottom",l=o?"left":"top",c=o?"width":"height";return n[s]<a(r[l])&&(e.offsets.popper[l]=a(r[l])-n[c]),n[l]>a(r[s])&&(e.offsets.popper[l]=a(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!$(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],a=e.offsets,s=a.popper,l=a.reference,c=-1!==["left","right"].indexOf(i),u=c?"height":"width",d=c?"Top":"Left",h=d.toLowerCase(),f=c?"left":"top",p=c?"bottom":"right",m=L(r)[u];l[p]-m<s[h]&&(e.offsets.popper[h]-=s[h]-(l[p]-m)),l[h]+m>s[p]&&(e.offsets.popper[h]+=l[h]+m-s[p]),e.offsets.popper=C(e.offsets.popper);var g=l[h]+l[u]/2-m/2,v=o(e.instance.popper),b=parseFloat(v["margin"+d]),y=parseFloat(v["border"+d+"Width"]),A=g-e.offsets.popper[h]-b-y;return A=Math.max(Math.min(s[u]-m,A),0),e.arrowElement=r,e.offsets.arrow=(E(n={},h,Math.round(A)),E(n,f,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(H(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=M(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=R(r),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case te:o=[r,i];break;case ne:o=ee(r);break;case re:o=ee(r,!0);break;default:o=t.behavior}return o.forEach((function(s,l){if(r!==s||o.length===l+1)return e;r=e.placement.split("-")[0],i=R(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,h="left"===r&&d(c.right)>d(u.left)||"right"===r&&d(c.left)<d(u.right)||"top"===r&&d(c.bottom)>d(u.top)||"bottom"===r&&d(c.top)<d(u.bottom),f=d(c.left)<d(n.left),p=d(c.right)>d(n.right),m=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),v="left"===r&&f||"right"===r&&p||"top"===r&&m||"bottom"===r&&g,b=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(b&&"start"===a&&f||b&&"end"===a&&p||!b&&"start"===a&&m||!b&&"end"===a&&g),A=!!t.flipVariationsByContent&&(b&&"start"===a&&p||b&&"end"===a&&f||!b&&"start"===a&&g||!b&&"end"===a&&m),_=y||A;(h||v||_)&&(e.flipped=!0,(h||v)&&(r=o[l+1]),_&&(a=function(e){return"end"===e?"start":"start"===e?"end":e}(a)),e.placement=r+(a?"-"+a:""),e.offsets.popper=S({},e.offsets.popper,B(e.instance.popper,e.offsets.reference,e.placement)),e=F(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,a=r.reference,o=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[o?"left":"top"]=a[n]-(s?i[o?"width":"height"]:0),e.placement=R(t),e.offsets.popper=C(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!$(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=j(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,a=j(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==a&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=void 0!==a?a:t.gpuAcceleration,s=f(e.instance.popper),l=T(s),c={position:i.position},u=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,a=Math.round,o=Math.floor,s=function(e){return e},l=a(i.width),c=a(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),h=t?u||d||l%2==c%2?a:o:s,f=t?a:s;return{left:h(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:f(r.top),bottom:f(r.bottom),right:h(r.right)}}(e,window.devicePixelRatio<2||!Q),d="bottom"===n?"top":"bottom",h="right"===r?"left":"right",p=z("transform"),m=void 0,g=void 0;if(g="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,m="right"===h?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,o&&p)c[p]="translate3d("+m+"px, "+g+"px, 0)",c[d]=0,c[h]=0,c.willChange="transform";else{var v="bottom"===d?-1:1,b="right"===h?-1:1;c[d]=g*v,c[h]=m*b,c.willChange=d+", "+h}var y={"x-placement":e.placement};return e.attributes=S({},y,e.attributes),e.styles=S({},c,e.styles),e.arrowStyles=S({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return X(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&X(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var a=N(i,t,e,n.positionFixed),o=D(n.placement,a,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",o),X(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},oe=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=S({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(S({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=S({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return S({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&a(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return w(e,[{key:"update",value:function(){return U.call(this)}},{key:"destroy",value:function(){return V.call(this)}},{key:"enableEventListeners",value:function(){return q.call(this)}},{key:"disableEventListeners",value:function(){return Y.call(this)}}]),e}();oe.Utils=("undefined"!=typeof window?window:e).PopperUtils,oe.placements=J,oe.Defaults=ae,t.a=oe}).call(this,n(68))},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(0)),i=a(n(1281));function a(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||i.default,e.exports=t.default},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",editVideoWrap:"editVideoWrap--2e8Ks",editVideoIndicator:"editVideoIndicator--2uIH4"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",wrap:"wrap--1VfgD",border:"border--1wpRD"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",widthSearchResultItem:"8rem",searchBoxWrapper:"searchBoxWrapper--31AH3",searchBox:"searchBox--1zCSD",showSearchResults:"showSearchResults--dD5o7",hideSearchResults:"hideSearchResults--2S15P",searchResults:"searchResults--3IRV6",searchResultItem:"searchResultItem--rmhP-",searchResultDraftItem:"searchResultDraftItem--3PMYb",searchResultItemHeader:"searchResultItemHeader--2_o1J",searchResultItemContent:"searchResultItemContent--3CNaV",indicator:"indicator--2zDb2"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",isDisabled:"isDisabled--2G9SC",errorMessage:"errorMessage--4yUVY"}},function(e,t,n){"use strict";(function(e){function r(e){a.length||(i(),!0),a[a.length]=e}n.d(t,"a",(function(){return r}));var i,a=[],o=0;function s(){for(;o<a.length;){var e=o;if(o+=1,a[e].call(),o>1024){for(var t=0,n=a.length-o;t<n;t++)a[t]=a[t+o];a.length-=o,o=0}}a.length=0,o=0,!1}var l=void 0!==e?e:self,c=l.MutationObserver||l.WebKitMutationObserver;function u(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}i="function"==typeof c?function(e){var t=1,n=new c(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(s):u(s),r.requestFlush=i,r.makeRequestCallFromTimer=u}).call(this,n(68))},function(e,t,n){(function(t){var n=t&&t.pid?t.pid.toString(36):"";function r(){var e=Date.now(),t=r.last||e;return r.last=e>t?e:t+1}e.exports=e.exports.default=function(e,t){return(e||"")+""+n+r().toString(36)+(t||"")},e.exports.process=function(e,t){return(e||"")+n+r().toString(36)+(t||"")},e.exports.time=function(e,t){return(e||"")+r().toString(36)+(t||"")}}).call(this,n(96))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",confirmationDialog:"confirmationDialog--3zAPo",modalBody:"modalBody--3wgoK",priceLabel:"priceLabel--1moCp"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",confirmationDialog:"confirmationDialog--2Cc3X",modalBody:"modalBody--1qOH5",priceLabel:"priceLabel---O-_0",separator:"separator--3m52T"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",searchBoxWrapper:"searchBoxWrapper--3KeW1",searchBox:"searchBox--1qm6m",searchResults:"searchResults--3sfCt",borderTop:"borderTop--37x4w"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",deviceSetupDialog:"deviceSetupDialog--2jTj0",modalTitle:"modalTitle--9u893"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",socialButton:"socialButton--30So2",facebook:"facebook--2ftoz",google:"google--2Dp6A"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",homeBtn:"homeBtn--Tjmcn"}},function(e,t,n){"use strict";const r=n(1692),i=n(1693),a=n(1694);function o(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function l(e,t){return t.decode?i(e):e}function c(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=c(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function h(e,t){o((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.split("").indexOf(e.arrayFormatSeparator)>-1?n.split(e.arrayFormatSeparator).map(t=>l(t,e)):null===n?n:l(n,e);r[t]=i};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){let[e,o]=a(t.decode?i.replace(/\+/g," "):i,"=");o=void 0===o?null:["comma","separator"].includes(t.arrayFormat)?o:l(o,t),n(l(e,t),o,r)}for(const e of Object.keys(r)){const n=r[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=d(n[e],t);else r[e]=d(n,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=u,t.parse=h,t.stringify=(e,t)=>{if(!e)return"";o((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[",i,"]"].join("")]:[...n,[s(t,e),"[",s(i,e),"]=",s(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[s(t,e),"[]"].join("")]:[...n,[s(t,e),"[]=",s(r,e)].join("")];case"comma":case"separator":return t=>(n,r)=>null==r||0===r.length?n:0===n.length?[[s(t,e),"=",s(r,e)].join("")]:[[n,s(r,e)].join(e.arrayFormatSeparator)];default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,s(t,e)]:[...n,[s(t,e),"=",s(r,e)].join("")]}}(t),i={};for(const t of Object.keys(e))n(t)||(i[t]=e[t]);const a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map(n=>{const i=e[n];return void 0===i?"":null===i?s(n,t):Array.isArray(i)?i.reduce(r(n),[]).join("&"):s(n,t)+"="+s(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>({url:c(e).split("?")[0]||"",query:h(u(e),t)}),t.stringifyUrl=(e,n)=>{const r=c(e.url).split("?")[0]||"",i=t.extract(e.url),a=t.parse(i),o=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url),s=Object.assign(a,e.query);let l=t.stringify(s,n);return l&&(l=`?${l}`),`${r}${l}${o}`}},function(e,t,n){"use strict";var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.a=i},,function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var i=t&&t.prototype instanceof u?t:u,a=Object.create(i.prototype),o=new w(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return S()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=y(o,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var c={};function u(){}function d(){}function h(){}var f={};f[i]=function(){return this};var p=Object.getPrototypeOf,m=p&&p(p(E([])));m&&m!==t&&n.call(m,i)&&(f=m);var g=h.prototype=u.prototype=Object.create(f);function v(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function b(e){var t;this._invoke=function(r,i){function a(){return new Promise((function(t,a){!function t(r,i,a,o){var s=l(e[r],e,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&n.call(u,"__await")?Promise.resolve(u.__await).then((function(e){t("next",e,a,o)}),(function(e){t("throw",e,a,o)})):Promise.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return t("throw",e,a,o)}))}o(s.arg)}(r,i,t,a)}))}return t=t?t.then(a,a):a()}}function y(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,y(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=g.constructor=h,h.constructor=d,h[o]=d.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},v(b.prototype),b.prototype[a]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i){var a=new b(s(t,n,r,i));return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(g),g[o]="Generator",g[i]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,c):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(154);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(154),i=n(1074),a=n(1075),o=n(584),s=n(1076),l=n(1079),c=n(1080),u=n(587);e.exports=function(e){return new Promise((function(t,n){var d=e.data,h=e.headers,f=e.responseType;r.isFormData(d)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(m+":"+g)}var v=s(e.baseURL,e.url);function b(){if(p){var r="getAllResponseHeaders"in p?l(p.getAllResponseHeaders()):null,a={data:f&&"text"!==f&&"json"!==f?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};i(t,n,a),p=null}}if(p.open(e.method.toUpperCase(),o(v,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=b:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(b)},p.onabort=function(){p&&(n(u("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||c(v))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;y&&(h[e.xsrfHeaderName]=y)}"setRequestHeader"in p&&r.forEach(h,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),f&&"json"!==f&&(p.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),d||(d=null),p.send(d)}))}},function(e,t,n){"use strict";var r=n(585);e.exports=function(e,t,n,i,a){var o=new Error(e);return r(o,t,n,i,a)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(154);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],a=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(a,c),r.forEach(o,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=i.concat(a).concat(o).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,c),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){!function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,n,a,o){var s=r(t),l=i[e][r(t)];return 2===s&&(l=l[n?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,i,a,o){var s=n(t),l=r[e][n(t)];return 2===s&&(l=l[i?0:1]),l.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r,i;return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(r=+e,i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function a(e){return e>1&&e<5&&1!=~~(e/10)}function o(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?i+(a(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(a(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(a(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(a(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(a(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(a(e)?"roky":"let"):i+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n,r=this._calendarEl[e],i=t&&t.hours();return((n=r)instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(r=r.apply(t)),r.replace("{}",i%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,r,i,a){var o="";switch(i){case"s":return a?"muutaman sekunnin":"muutama sekunti";case"ss":return a?"sekunnin":"sekuntia";case"m":return a?"minuutin":"minuutti";case"mm":o=a?"minuutin":"minuuttia";break;case"h":return a?"tunnin":"tunti";case"hh":o=a?"tunnin":"tuntia";break;case"d":return a?"päivän":"päivä";case"dd":o=a?"päivän":"päivää";break;case"M":return a?"kuukauden":"kuukausi";case"MM":o=a?"kuukauden":"kuukautta";break;case"y":return a?"vuoden":"vuosi";case"yy":o=a?"vuoden":"vuotta"}return o=function(e,r){return e<10?r?n[e]:t[e]:e}(e,a)+" "+o}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Méitheamh","Iúil","Lúnasa","Meán Fómhair","Deaireadh Fómhair","Samhain","Nollaig"],monthsShort:["Eaná","Feab","Márt","Aibr","Beal","Méit","Iúil","Lúna","Meán","Deai","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Satharn"],weekdaysShort:["Dom","Lua","Mái","Céa","Déa","hAo","Sat"],weekdaysMin:["Do","Lu","Má","Ce","Dé","hA","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?i[n][0]:i[n][1]}e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,r,i){var a=e+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?a+(n||i?"sekúndur":"sekúndum"):a+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?a+(n||i?"mínútur":"mínútum"):n?a+"mínúta":a+"mínútu";case"hh":return t(e)?a+(n||i?"klukkustundir":"klukkustundum"):a+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?a+"dagar":a+(i?"daga":"dögum"):n?a+"dagur":a+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?a+"mánuðir":a+(i?"mánuði":"mánuðum"):n?a+"mánuður":a+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?a+(n||i?"ár":"árum"):a+(n||i?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()<this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()<e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:r,monthsShort:r,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,r){return t?i(n)[0]:r?i(n)[1]:i(n)[2]}function r(e){return e%10==0||e>10&&e<20}function i(e){return t[e].split("_")}function a(e,t,a,o){var s=e+" ";return 1===e?s+n(0,t,a[0],o):t?s+(r(e)?i(a)[1]:i(a)[0]):o?s+i(a)[1]:s+(r(e)?i(a)[1]:i(a)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"},ss:a,m:n,mm:a,h:n,hh:a,d:n,dd:a,M:n,MM:a,y:n,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function r(e,r,i){return e+" "+n(t[i],e,r)}function i(e,r,i){return n(t[i],e,r)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function r(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function i(e,t,n){var i=e+" ";switch(n){case"ss":return i+(r(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return i+(r(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return i+(r(e)?"godziny":"godzin");case"MM":return i+(r(e)?"miesiące":"miesięcy");case"yy":return i+(r(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,r){return e?""===r?"("+n[e.month()]+"|"+t[e.month()]+")":/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:i,m:i,mm:i,h:i,hh:i,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:i,y:"rok",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=" ";return(e%100>=20||e>=100&&e%100==0)&&(r=" de "),e+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r,i;return"m"===n?t?"минута":"минуту":e+" "+(r=+e,i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(e){return e>1&&e<5}function i(e,t,n,i){var a=e+" ";switch(n){case"s":return t||i?"pár sekúnd":"pár sekundami";case"ss":return t||i?a+(r(e)?"sekundy":"sekúnd"):a+"sekundami";case"m":return t?"minúta":i?"minútu":"minútou";case"mm":return t||i?a+(r(e)?"minúty":"minút"):a+"minútami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?a+(r(e)?"hodiny":"hodín"):a+"hodinami";case"d":return t||i?"deň":"dňom";case"dd":return t||i?a+(r(e)?"dni":"dní"):a+"dňami";case"M":return t||i?"mesiac":"mesiacom";case"MM":return t||i?a+(r(e)?"mesiace":"mesiacov"):a+"mesiacmi";case"y":return t||i?"rok":"rokom";case"yy":return t||i?a+(r(e)?"roky":"rokov"):a+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+=1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami";case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi";case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci";case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Пагоҳ соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,r,i){var a=function(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),i=e%10,a="";return n>0&&(a+=t[n]+"vatlh"),r>0&&(a+=(""!==a?" ":"")+t[r]+"maH"),i>0&&(a+=(""!==a?" ":"")+t[i]),""===a?"pagh":a}(e);switch(r){case"ss":return a+" lup";case"mm":return a+" tup";case"hh":return a+" rep";case"dd":return a+" jaj";case"MM":return a+" jar";case"yy":return a+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var r=e%10;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r?i[n][0]:t?i[n][0]:i[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r,i;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,i={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(21))},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";const r=n(227),i=n(257).Readable,a={objectMode:!0},o={clean:!0};function s(e){if(!(this instanceof s))return new s(e);this.options=e||{},this.options=r(o,e),this._inflights=new Map}s.prototype.put=function(e,t){return this._inflights.set(e.messageId,e),t&&t(),this},s.prototype.createStream=function(){const e=new i(a),t=[];let n=!1,r=0;return this._inflights.forEach((function(e,n){t.push(e)})),e._read=function(){!n&&r<t.length?this.push(t[r++]):this.push(null)},e.destroy=function(){if(n)return;const e=this;n=!0,setTimeout((function(){e.emit("close")}),0)},e},s.prototype.del=function(e,t){return(e=this._inflights.get(e.messageId))?(this._inflights.delete(e.messageId),t(null,e)):t&&t(new Error("missing packet")),this},s.prototype.get=function(e,t){return(e=this._inflights.get(e.messageId))?t(null,e):t&&t(new Error("missing packet")),this},s.prototype.close=function(e){this.options.clean&&(this._inflights=null),e&&e()},e.exports=s},function(e,t,n){"use strict";(function(t,r){var i;e.exports=C,C.ReadableState=S;n(226).EventEmitter;var a=function(e,t){return e.listeners(t).length},o=n(722),s=n(113).Buffer,l=t.Uint8Array||function(){};var c,u=n(1096);c=u&&u.debuglog?u.debuglog("stream"):function(){};var d,h,f,p=n(1097),m=n(723),g=n(724).getHighWaterMark,v=n(258).codes,b=v.ERR_INVALID_ARG_TYPE,y=v.ERR_STREAM_PUSH_AFTER_EOF,A=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(155)(C,o);var w=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,r){i=i||n(259),e=e||{},"boolean"!=typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=n(346).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function C(e){if(i=i||n(259),!(this instanceof C))return new C(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function T(e,t,n,r,i){c("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}(e,o);else if(i||(a=function(e,t){var n;r=t,s.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(o,t)),a)w(e,a);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)o.endEmitted?w(e,new _):k(e,o,t,!0);else if(o.ended)w(e,new y);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?k(e,o,t,!1):M(e,o)):k(e,o,t,!1)}else r||(o.reading=!1,M(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),M(e,t)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),C.prototype.destroy=m.destroy,C.prototype._undestroy=m.undestroy,C.prototype._destroy=function(e,t){t(e)},C.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),T(this,e,t,!1,n)},C.prototype.unshift=function(e){return T(this,e,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(e){d||(d=n(346).StringDecoder);var t=new d(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(I,e))}function I(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,R(e)}function M(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(c("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function D(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){c("readable nexttick read 0"),e.read(0)}function L(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function j(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(F,t,e))}function F(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}C.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):O(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&j(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(n,t))),null===(r=e>0?B(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&j(this)),null!==r&&this.emit("data",r),r},C.prototype._read=function(e){w(this,new A("_read()"))},C.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",h),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){c("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",u);var d=!1;function h(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!d&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function f(t){c("onerror",t),g(),e.removeListener("error",f),0===a(e,"error")&&w(e,t)}function p(){e.removeListener("finish",m),g()}function m(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",p),e.once("finish",m),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},C.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=U(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},C.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||r.nextTick(N,this))),n},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(D,this),n},C.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(D,this),t},C.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(L,e,t))}(this,e)),e.paused=!1,this},C.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){c("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(C.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=n(1100)),h(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),C._fromList=B,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(C.from=function(e,t){return void 0===f&&(f=n(1101)),f(C,e,t)})}).call(this,n(68),n(96))},function(e,t,n){e.exports=n(226).EventEmitter},function(e,t,n){"use strict";(function(t){function n(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,a){var o=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?o._writableState?o._writableState.errorEmitted?t.nextTick(r,o):(o._writableState.errorEmitted=!0,t.nextTick(n,o,e)):t.nextTick(n,o,e):a?(t.nextTick(r,o),a(e)):t.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,n(96))},function(e,t,n){"use strict";var r=n(258).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},function(e,t,n){"use strict";(function(t,r){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var a;e.exports=C,C.WritableState=S;var o={deprecate:n(726)},s=n(722),l=n(113).Buffer,c=t.Uint8Array||function(){};var u,d=n(723),h=n(724).getHighWaterMark,f=n(258).codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,w=d.errorOrDestroy;function E(){}function S(e,t,o){a=a||n(259),e=e||{},"boolean"!=typeof o&&(o=t instanceof a),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,a=n.writecb;if("function"!=typeof a)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,a){--t.pendingcb,n?(r.nextTick(a,i),r.nextTick(M,e,t),e._writableState.errorEmitted=!0,w(e,i)):(a(i),e._writableState.errorEmitted=!0,w(e,i),M(e,t))}(e,n,i,t,a);else{var o=O(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||x(e,n),i?r.nextTick(k,e,n,o,a):k(e,n,o,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function C(e){var t=this instanceof(a=a||n(259));if(!t&&!u.call(C,this))return new C(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function T(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),M(e,t)}function x(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,a=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)a[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;a.allBuffers=l,T(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(n){t.pendingcb--,n&&w(e,n),t.prefinished=!0,e.emit("prefinish"),M(e,t)}))}function M(e,t){var n=O(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}n(155)(C,s),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===C&&(e&&e._writableState instanceof S)}})):u=function(e){return e instanceof this},C.prototype.pipe=function(){w(this,new v)},C.prototype.write=function(e,t,n){var i,a=this._writableState,o=!1,s=!a.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof n&&(n=E),a.ending?function(e,t){var n=new A;w(e,n),r.nextTick(t,n)}(this,n):(s||function(e,t,n,i){var a;return null===n?a=new y:"string"==typeof n||t.objectMode||(a=new p("chunk",["string","Buffer"],n)),!a||(w(e,a),r.nextTick(i,a),!1)}(this,a,e,n))&&(a.pendingcb++,o=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,s,r,i,a);return c}(this,a,s,e,t,n)),o},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},C.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(e,t,n){n(new m("_write()"))},C.prototype._writev=null,C.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,M(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),C.prototype.destroy=d.destroy,C.prototype._undestroy=d.undestroy,C.prototype._destroy=function(e,t){t(e)}}).call(this,n(68),n(96))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(68))},function(e,t,n){"use strict";e.exports=u;var r=n(258).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(259);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,n){h(e,t,n)}))}function h(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}n(155)(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new i("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,n){(function(r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(1111)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(96))},function(e,t,n){"use strict";(function(t,r){var i;e.exports=C,C.ReadableState=S;n(226).EventEmitter;var a=function(e,t){return e.listeners(t).length},o=n(730),s=n(113).Buffer,l=t.Uint8Array||function(){};var c,u=n(1116);c=u&&u.debuglog?u.debuglog("stream"):function(){};var d,h,f,p=n(1117),m=n(731),g=n(732).getHighWaterMark,v=n(260).codes,b=v.ERR_INVALID_ARG_TYPE,y=v.ERR_STREAM_PUSH_AFTER_EOF,A=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(155)(C,o);var w=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,r){i=i||n(261),e=e||{},"boolean"!=typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=n(346).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function C(e){if(i=i||n(261),!(this instanceof C))return new C(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function T(e,t,n,r,i){c("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}(e,o);else if(i||(a=function(e,t){var n;r=t,s.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(o,t)),a)w(e,a);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)o.endEmitted?w(e,new _):k(e,o,t,!0);else if(o.ended)w(e,new y);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?k(e,o,t,!1):M(e,o)):k(e,o,t,!1)}else r||(o.reading=!1,M(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),M(e,t)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),C.prototype.destroy=m.destroy,C.prototype._undestroy=m.undestroy,C.prototype._destroy=function(e,t){t(e)},C.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),T(this,e,t,!1,n)},C.prototype.unshift=function(e){return T(this,e,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(e){d||(d=n(346).StringDecoder);var t=new d(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(I,e))}function I(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,R(e)}function M(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(c("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function D(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){c("readable nexttick read 0"),e.read(0)}function L(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function j(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(F,t,e))}function F(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}C.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):O(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&j(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(n,t))),null===(r=e>0?B(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&j(this)),null!==r&&this.emit("data",r),r},C.prototype._read=function(e){w(this,new A("_read()"))},C.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",h),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){c("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",u);var d=!1;function h(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!d&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function f(t){c("onerror",t),g(),e.removeListener("error",f),0===a(e,"error")&&w(e,t)}function p(){e.removeListener("finish",m),g()}function m(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",p),e.once("finish",m),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},C.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=U(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},C.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||r.nextTick(N,this))),n},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(D,this),n},C.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(D,this),t},C.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(L,e,t))}(this,e)),e.paused=!1,this},C.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){c("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(C.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=n(1119)),h(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),C._fromList=B,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(C.from=function(e,t){return void 0===f&&(f=n(1120)),f(C,e,t)})}).call(this,n(68),n(96))},function(e,t,n){e.exports=n(226).EventEmitter},function(e,t,n){"use strict";(function(t){function n(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,a){var o=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?o._writableState?o._writableState.errorEmitted?t.nextTick(r,o):(o._writableState.errorEmitted=!0,t.nextTick(n,o,e)):t.nextTick(n,o,e):a?(t.nextTick(r,o),a(e)):t.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,n(96))},function(e,t,n){"use strict";var r=n(260).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},function(e,t,n){"use strict";(function(t,r){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var a;e.exports=C,C.WritableState=S;var o={deprecate:n(726)},s=n(730),l=n(113).Buffer,c=t.Uint8Array||function(){};var u,d=n(731),h=n(732).getHighWaterMark,f=n(260).codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,w=d.errorOrDestroy;function E(){}function S(e,t,o){a=a||n(261),e=e||{},"boolean"!=typeof o&&(o=t instanceof a),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,a=n.writecb;if("function"!=typeof a)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,a){--t.pendingcb,n?(r.nextTick(a,i),r.nextTick(M,e,t),e._writableState.errorEmitted=!0,w(e,i)):(a(i),e._writableState.errorEmitted=!0,w(e,i),M(e,t))}(e,n,i,t,a);else{var o=O(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||x(e,n),i?r.nextTick(k,e,n,o,a):k(e,n,o,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function C(e){var t=this instanceof(a=a||n(261));if(!t&&!u.call(C,this))return new C(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function T(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),M(e,t)}function x(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,a=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)a[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;a.allBuffers=l,T(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(n){t.pendingcb--,n&&w(e,n),t.prefinished=!0,e.emit("prefinish"),M(e,t)}))}function M(e,t){var n=O(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}n(155)(C,s),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===C&&(e&&e._writableState instanceof S)}})):u=function(e){return e instanceof this},C.prototype.pipe=function(){w(this,new v)},C.prototype.write=function(e,t,n){var i,a=this._writableState,o=!1,s=!a.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof n&&(n=E),a.ending?function(e,t){var n=new A;w(e,n),r.nextTick(t,n)}(this,n):(s||function(e,t,n,i){var a;return null===n?a=new y:"string"==typeof n||t.objectMode||(a=new p("chunk",["string","Buffer"],n)),!a||(w(e,a),r.nextTick(i,a),!1)}(this,a,e,n))&&(a.pendingcb++,o=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,s,r,i,a);return c}(this,a,s,e,t,n)),o},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},C.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(e,t,n){n(new m("_write()"))},C.prototype._writev=null,C.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,M(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),C.prototype.destroy=d.destroy,C.prototype._undestroy=d.undestroy,C.prototype._destroy=function(e,t){t(e)}}).call(this,n(68),n(96))},function(e,t,n){"use strict";e.exports=u;var r=n(260).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(261);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,n){h(e,t,n)}))}function h(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}n(155)(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new i("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,n){(function(t){const n=e.exports;n.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},n.codes={};for(const e in n.types){const t=n.types[e];n.codes[t]=e}n.CMD_SHIFT=4,n.CMD_MASK=240,n.DUP_MASK=8,n.QOS_MASK=3,n.QOS_SHIFT=1,n.RETAIN_MASK=1,n.VARBYTEINT_MASK=127,n.VARBYTEINT_FIN_MASK=128,n.VARBYTEINT_MAX=268435455,n.SESSIONPRESENT_MASK=1,n.SESSIONPRESENT_HEADER=t.from([n.SESSIONPRESENT_MASK]),n.CONNACK_HEADER=t.from([n.codes.connack<<n.CMD_SHIFT]),n.USERNAME_MASK=128,n.PASSWORD_MASK=64,n.WILL_RETAIN_MASK=32,n.WILL_QOS_MASK=24,n.WILL_QOS_SHIFT=3,n.WILL_FLAG_MASK=4,n.CLEAN_SESSION_MASK=2,n.CONNECT_HEADER=t.from([n.codes.connect<<n.CMD_SHIFT]),n.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},n.propertiesCodes={};for(const e in n.properties){const t=n.properties[e];n.propertiesCodes[t]=e}function r(e){return[0,1,2].map(r=>[0,1].map(i=>[0,1].map(a=>{const o=t.alloc(1);return o.writeUInt8(n.codes[e]<<n.CMD_SHIFT|(i?n.DUP_MASK:0)|r<<n.QOS_SHIFT|a,0,!0),o})))}n.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},n.PUBLISH_HEADER=r("publish"),n.SUBSCRIBE_HEADER=r("subscribe"),n.SUBSCRIBE_OPTIONS_QOS_MASK=3,n.SUBSCRIBE_OPTIONS_NL_MASK=1,n.SUBSCRIBE_OPTIONS_NL_SHIFT=2,n.SUBSCRIBE_OPTIONS_RAP_MASK=1,n.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,n.SUBSCRIBE_OPTIONS_RH_MASK=3,n.SUBSCRIBE_OPTIONS_RH_SHIFT=4,n.SUBSCRIBE_OPTIONS_RH=[0,16,32],n.SUBSCRIBE_OPTIONS_NL=4,n.SUBSCRIBE_OPTIONS_RAP=8,n.SUBSCRIBE_OPTIONS_QOS=[0,1,2],n.UNSUBSCRIBE_HEADER=r("unsubscribe"),n.ACKS={unsuback:r("unsuback"),puback:r("puback"),pubcomp:r("pubcomp"),pubrel:r("pubrel"),pubrec:r("pubrec")},n.SUBACK_HEADER=t.from([n.codes.suback<<n.CMD_SHIFT]),n.VERSION3=t.from([3]),n.VERSION4=t.from([4]),n.VERSION5=t.from([5]),n.VERSION131=t.from([131]),n.VERSION132=t.from([132]),n.QOS=[0,1,2].map(e=>t.from([e])),n.EMPTY={pingreq:t.from([n.codes.pingreq<<4,0]),pingresp:t.from([n.codes.pingresp<<4,0]),disconnect:t.from([n.codes.disconnect<<4,0])}}).call(this,n(113).Buffer)},function(e,t,n){(function(r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(1125)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(96))},function(e,t,n){(function(t){const r=n(735),i=t.allocUnsafe(0),a=t.from([0]),o=n(1127),s=n(1128).nextTick,l=n(736)("mqtt-packet:writeToStream"),c=o.cache,u=o.generateNumber,d=o.generateCache,h=o.genBufVariableByteInt,f=o.generate4ByteBuffer;let p=w,m=!0;function g(e,n,o){switch(l("generate called"),n.cork&&(n.cork(),s(v,n)),m&&(m=!1,d()),l("generate: packet.cmd: %s",e.cmd),e.cmd){case"connect":return function(e,n,i){const a=e||{},o=a.protocolId||"MQTT";let s=a.protocolVersion||4;const l=a.will;let c=a.clean;const u=a.keepalive||0,d=a.clientId||"",h=a.username,f=a.password,m=a.properties;void 0===c&&(c=!0);let g=0;if(!o||"string"!=typeof o&&!t.isBuffer(o))return n.emit("error",new Error("Invalid protocolId")),!1;g+=o.length+2;if(3!==s&&4!==s&&5!==s)return n.emit("error",new Error("Invalid protocol version")),!1;g+=1;if(("string"==typeof d||t.isBuffer(d))&&(d||s>=4)&&(d||c))g+=t.byteLength(d)+2;else{if(s<4)return n.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*c==0)return n.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!=typeof u||u<0||u>65535||u%1!=0)return n.emit("error",new Error("Invalid keepalive")),!1;g+=2;if(g+=1,5===s){var v=C(n,m);if(!v)return!1;g+=v.length}if(l){if("object"!=typeof l)return n.emit("error",new Error("Invalid will")),!1;if(!l.topic||"string"!=typeof l.topic)return n.emit("error",new Error("Invalid will topic")),!1;if(g+=t.byteLength(l.topic)+2,g+=2,l.payload){if(!(l.payload.length>=0))return n.emit("error",new Error("Invalid will payload")),!1;"string"==typeof l.payload?g+=t.byteLength(l.payload):g+=l.payload.length}var b={};if(5===s){if(!(b=C(n,l.properties)))return!1;g+=b.length}}let _=!1;if(null!=h){if(!I(h))return n.emit("error",new Error("Invalid username")),!1;_=!0,g+=t.byteLength(h)+2}if(null!=f){if(!_)return n.emit("error",new Error("Username is required to use password")),!1;if(!I(f))return n.emit("error",new Error("Invalid password")),!1;g+=O(f)+2}n.write(r.CONNECT_HEADER),y(n,g),S(n,o),a.bridgeMode&&(s+=128);n.write(131===s?r.VERSION131:132===s?r.VERSION132:4===s?r.VERSION4:5===s?r.VERSION5:r.VERSION3);let w=0;w|=null!=h?r.USERNAME_MASK:0,w|=null!=f?r.PASSWORD_MASK:0,w|=l&&l.retain?r.WILL_RETAIN_MASK:0,w|=l&&l.qos?l.qos<<r.WILL_QOS_SHIFT:0,w|=l?r.WILL_FLAG_MASK:0,w|=c?r.CLEAN_SESSION_MASK:0,n.write(t.from([w])),p(n,u),5===s&&v.write();S(n,d),l&&(5===s&&b.write(),A(n,l.topic),S(n,l.payload));null!=h&&S(n,h);null!=f&&S(n,f);return!0}(e,n);case"connack":return function(e,n,i){const o=i?i.protocolVersion:4,s=e||{},l=5===o?s.reasonCode:s.returnCode,c=s.properties;let u=2;if("number"!=typeof l)return n.emit("error",new Error("Invalid return code")),!1;let d=null;if(5===o){if(d=C(n,c),!d)return!1;u+=d.length}n.write(r.CONNACK_HEADER),y(n,u),n.write(s.sessionPresent?r.SESSIONPRESENT_HEADER:a),n.write(t.from([l])),null!=d&&d.write();return!0}(e,n,o);case"publish":return function(e,n,a){l("publish: packet: %o",e);const o=a?a.protocolVersion:4,s=e||{},c=s.qos||0,u=s.retain?r.RETAIN_MASK:0,d=s.topic,h=s.payload||i,f=s.messageId,m=s.properties;let g=0;if("string"==typeof d)g+=t.byteLength(d)+2;else{if(!t.isBuffer(d))return n.emit("error",new Error("Invalid topic")),!1;g+=d.length+2}t.isBuffer(h)?g+=h.length:g+=t.byteLength(h);if(c&&"number"!=typeof f)return n.emit("error",new Error("Invalid messageId")),!1;c&&(g+=2);let v=null;if(5===o){if(v=C(n,m),!v)return!1;g+=v.length}n.write(r.PUBLISH_HEADER[c][s.dup?1:0][u?1:0]),y(n,g),p(n,O(d)),n.write(d),c>0&&p(n,f);null!=v&&v.write();return l("publish: payload: %o",h),n.write(h)}(e,n,o);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(e,n,i){const a=i?i.protocolVersion:4,o=e||{},s=o.cmd||"puback",l=o.messageId,c=o.dup&&"pubrel"===s?r.DUP_MASK:0;let u=0;const d=o.reasonCode,h=o.properties;let f=5===a?3:2;"pubrel"===s&&(u=1);if("number"!=typeof l)return n.emit("error",new Error("Invalid messageId")),!1;let m=null;if(5===a&&"object"==typeof h){if(m=T(n,h,i,f),!m)return!1;f+=m.length}n.write(r.ACKS[s][u][c][0]),y(n,f),p(n,l),5===a&&n.write(t.from([d]));null!==m&&m.write();return!0}(e,n,o);case"subscribe":return function(e,n,i){l("subscribe: packet: ");const a=i?i.protocolVersion:4,o=e||{},s=o.dup?r.DUP_MASK:0,c=o.messageId,u=o.subscriptions,d=o.properties;let h=0;if("number"!=typeof c)return n.emit("error",new Error("Invalid messageId")),!1;h+=2;let f=null;if(5===a){if(f=C(n,d),!f)return!1;h+=f.length}if("object"!=typeof u||!u.length)return n.emit("error",new Error("Invalid subscriptions")),!1;for(let e=0;e<u.length;e+=1){const r=u[e].topic,i=u[e].qos;if("string"!=typeof r)return n.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if("number"!=typeof i)return n.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(5===a){if("boolean"!=typeof(u[e].nl||!1))return n.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;if("boolean"!=typeof(u[e].rap||!1))return n.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const t=u[e].rh||0;if("number"!=typeof t||t>2)return n.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}h+=t.byteLength(r)+2+1}l("subscribe: writing to stream: %o",r.SUBSCRIBE_HEADER),n.write(r.SUBSCRIBE_HEADER[1][s?1:0][0]),y(n,h),p(n,c),null!==f&&f.write();let m=!0;for(const e of u){const i=e.topic,o=e.qos,s=+e.nl,l=+e.rap,c=e.rh;let u;A(n,i),u=r.SUBSCRIBE_OPTIONS_QOS[o],5===a&&(u|=s?r.SUBSCRIBE_OPTIONS_NL:0,u|=l?r.SUBSCRIBE_OPTIONS_RAP:0,u|=c?r.SUBSCRIBE_OPTIONS_RH[c]:0),m=n.write(t.from([u]))}return m}(e,n,o);case"suback":return function(e,n,i){const a=i?i.protocolVersion:4,o=e||{},s=o.messageId,l=o.granted,c=o.properties;let u=0;if("number"!=typeof s)return n.emit("error",new Error("Invalid messageId")),!1;u+=2;if("object"!=typeof l||!l.length)return n.emit("error",new Error("Invalid qos vector")),!1;for(let e=0;e<l.length;e+=1){if("number"!=typeof l[e])return n.emit("error",new Error("Invalid qos vector")),!1;u+=1}let d=null;if(5===a){if(d=T(n,c,i,u),!d)return!1;u+=d.length}n.write(r.SUBACK_HEADER),y(n,u),p(n,s),null!==d&&d.write();return n.write(t.from(l))}(e,n,o);case"unsubscribe":return function(e,n,i){const a=i?i.protocolVersion:4,o=e||{},s=o.messageId,l=o.dup?r.DUP_MASK:0,c=o.unsubscriptions,u=o.properties;let d=0;if("number"!=typeof s)return n.emit("error",new Error("Invalid messageId")),!1;d+=2;if("object"!=typeof c||!c.length)return n.emit("error",new Error("Invalid unsubscriptions")),!1;for(let e=0;e<c.length;e+=1){if("string"!=typeof c[e])return n.emit("error",new Error("Invalid unsubscriptions")),!1;d+=t.byteLength(c[e])+2}let h=null;if(5===a){if(h=C(n,u),!h)return!1;d+=h.length}n.write(r.UNSUBSCRIBE_HEADER[1][l?1:0][0]),y(n,d),p(n,s),null!==h&&h.write();let f=!0;for(let e=0;e<c.length;e++)f=A(n,c[e]);return f}(e,n,o);case"unsuback":return function(e,n,i){const a=i?i.protocolVersion:4,o=e||{},s=o.messageId,l=o.dup?r.DUP_MASK:0,c=o.granted,u=o.properties,d=o.cmd;let h=2;if("number"!=typeof s)return n.emit("error",new Error("Invalid messageId")),!1;if(5===a){if("object"!=typeof c||!c.length)return n.emit("error",new Error("Invalid qos vector")),!1;for(let e=0;e<c.length;e+=1){if("number"!=typeof c[e])return n.emit("error",new Error("Invalid qos vector")),!1;h+=1}}let f=null;if(5===a){if(f=T(n,u,i,h),!f)return!1;h+=f.length}n.write(r.ACKS[d][0][l][0]),y(n,h),p(n,s),null!==f&&f.write();5===a&&n.write(t.from(c));return!0}(e,n,o);case"pingreq":case"pingresp":return function(e,t,n){return t.write(r.EMPTY[e.cmd])}(e,n);case"disconnect":return function(e,n,i){const a=i?i.protocolVersion:4,o=e||{},s=o.reasonCode,l=o.properties;let c=5===a?1:0,u=null;if(5===a){if(u=T(n,l,i,c),!u)return!1;c+=u.length}n.write(t.from([r.codes.disconnect<<4])),y(n,c),5===a&&n.write(t.from([s]));null!==u&&u.write();return!0}(e,n,o);case"auth":return function(e,n,i){const a=i?i.protocolVersion:4,o=e||{},s=o.reasonCode,l=o.properties;let c=5===a?1:0;5!==a&&n.emit("error",new Error("Invalid mqtt version for auth packet"));const u=T(n,l,i,c);if(!u)return!1;c+=u.length,n.write(t.from([r.codes.auth<<4])),y(n,c),n.write(t.from([s])),null!==u&&u.write();return!0}(e,n,o);default:return n.emit("error",new Error("Unknown command")),!1}}function v(e){e.uncork()}Object.defineProperty(g,"cacheNumbers",{get:()=>p===w,set(e){e?(c&&0!==Object.keys(c).length||(m=!0),p=w):(m=!1,p=E)}});const b={};function y(e,t){if(t>r.VARBYTEINT_MAX)return e.emit("error",new Error(`Invalid variable byte integer: ${t}`)),!1;let n=b[t];return n||(n=h(t),t<16384&&(b[t]=n)),l("writeVarByteInt: writing to stream: %o",n),e.write(n)}function A(e,n){const r=t.byteLength(n);return p(e,r),l("writeString: %s",n),e.write(n,"utf8")}function _(e,t,n){A(e,t),A(e,n)}function w(e,t){return l("writeNumberCached: number: %d",t),l("writeNumberCached: %o",c[t]),e.write(c[t])}function E(e,t){const n=u(t);return l("writeNumberGenerated: %o",n),e.write(n)}function S(e,t){"string"==typeof t?A(e,t):t?(p(e,t.length),e.write(t)):p(e,0)}function C(e,n){if("object"!=typeof n||null!=n.length)return{length:1,write(){x(e,{},0)}};let i=0;function a(n,i){let a=0;switch(r.propertiesTypes[n]){case"byte":if("boolean"!=typeof i)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;a+=2;break;case"int8":if("number"!=typeof i||i<0||i>255)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;a+=2;break;case"binary":if(i&&null===i)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;a+=1+t.byteLength(i)+2;break;case"int16":if("number"!=typeof i||i<0||i>65535)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;a+=3;break;case"int32":if("number"!=typeof i||i<0||i>4294967295)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;a+=5;break;case"var":if("number"!=typeof i||i<0||i>268435455)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;a+=1+t.byteLength(h(i));break;case"string":if("string"!=typeof i)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;a+=3+t.byteLength(i.toString());break;case"pair":if("object"!=typeof i)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;a+=Object.getOwnPropertyNames(i).reduce((e,n)=>{const r=i[n];return Array.isArray(r)?e+=r.reduce((e,r)=>e+=3+t.byteLength(n.toString())+2+t.byteLength(r.toString()),0):e+=3+t.byteLength(n.toString())+2+t.byteLength(i[n].toString()),e},0);break;default:return e.emit("error",new Error(`Invalid property ${n}: ${i}`)),!1}return a}if(n)for(const e in n){let t=0,r=0;const o=n[e];if(Array.isArray(o))for(let n=0;n<o.length;n++){if(r=a(e,o[n]),!r)return!1;t+=r}else{if(r=a(e,o),!r)return!1;t=r}if(!t)return!1;i+=t}return{length:t.byteLength(h(i))+i,write(){x(e,n,i)}}}function T(e,t,n,r){const i=["reasonString","userProperties"],a=n&&n.properties&&n.properties.maximumPacketSize?n.properties.maximumPacketSize:0;let o=C(e,t);if(a)for(;r+o.length>a;){const n=i.shift();if(!n||!t[n])return!1;delete t[n],o=C(e,t)}return o}function k(e,n,i){switch(r.propertiesTypes[n]){case"byte":e.write(t.from([r.properties[n]])),e.write(t.from([+i]));break;case"int8":e.write(t.from([r.properties[n]])),e.write(t.from([i]));break;case"binary":e.write(t.from([r.properties[n]])),S(e,i);break;case"int16":e.write(t.from([r.properties[n]])),p(e,i);break;case"int32":e.write(t.from([r.properties[n]])),function(e,t){const n=f(t);l("write4ByteNumber: %o",n),e.write(n)}(e,i);break;case"var":e.write(t.from([r.properties[n]])),y(e,i);break;case"string":e.write(t.from([r.properties[n]])),A(e,i);break;case"pair":Object.getOwnPropertyNames(i).forEach(a=>{const o=i[a];Array.isArray(o)?o.forEach(i=>{e.write(t.from([r.properties[n]])),_(e,a.toString(),i.toString())}):(e.write(t.from([r.properties[n]])),_(e,a.toString(),o.toString()))});break;default:return e.emit("error",new Error(`Invalid property ${n} value: ${i}`)),!1}}function x(e,t,n){y(e,n);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&null!==t[n]){const r=t[n];if(Array.isArray(r))for(let t=0;t<r.length;t++)k(e,n,r[t]);else k(e,n,r)}}function O(e){return e?e instanceof t?e.length:t.byteLength(e):0}function I(e){return"string"==typeof e||e instanceof t}e.exports=g}).call(this,n(113).Buffer)},function(e,t,n){"use strict";const r=n(739),i=n(300)("mqttjs:tcp");e.exports=function(e,t){t.port=t.port||1883,t.hostname=t.hostname||t.host||"localhost";const n=t.port,a=t.hostname;return i("port %d and host %s",n,a),r.createConnection(n,a)}},function(e,t){},function(e,t,n){"use strict";const{Buffer:r}=n(113),i=n(257).Transform,a=n(448);let o,s,l;e.exports=function(e,t){if(t.hostname=t.hostname||t.host,!t.hostname)throw new Error("Could not determine host. Specify host manually.");const n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(t);const c=function(e,t){const n="wxs"===e.protocol?"wss":"ws";let r=n+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(r=n+"://"+e.hostname+":"+e.port+e.path),"function"==typeof e.transformWsUrl&&(r=e.transformWsUrl(r,e,t)),r}(t,e);o=wx.connectSocket({url:c,protocols:[n]}),s=function(){const e=new i;return e._write=function(e,t,n){o.send({data:e.buffer,success:function(){n()},fail:function(e){n(new Error(e))}})},e._flush=function(e){o.close({success:function(){e()}})},e}(),l=a.obj(),l._destroy=function(e,t){o.close({success:function(){t&&t(e)}})};const u=l.destroy;return l.destroy=function(){l.destroy=u;const e=this;setTimeout((function(){o.close({fail:function(){e._destroy(new Error)}})}),0)}.bind(l),o.onOpen((function(){l.setReadable(s),l.setWritable(s),l.emit("connect")})),o.onMessage((function(e){let t=e.data;t=t instanceof ArrayBuffer?r.from(t):r.from(t,"utf8"),s.push(t)})),o.onClose((function(){l.end(),l.destroy()})),o.onError((function(e){l.destroy(new Error(e.errMsg))})),l}},function(e,t,n){"use strict";const{Buffer:r}=n(113),i=n(257).Transform,a=n(448);let o,s,l,c=!1;e.exports=function(e,t){if(t.hostname=t.hostname||t.host,!t.hostname)throw new Error("Could not determine host. Specify host manually.");const n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(t);const u=function(e,t){const n="alis"===e.protocol?"wss":"ws";let r=n+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(r=n+"://"+e.hostname+":"+e.port+e.path),"function"==typeof e.transformWsUrl&&(r=e.transformWsUrl(r,e,t)),r}(t,e);return o=t.my,o.connectSocket({url:u,protocols:n}),s=function(){const e=new i;return e._write=function(e,t,n){o.sendSocketMessage({data:e.buffer,success:function(){n()},fail:function(){n(new Error)}})},e._flush=function(e){o.closeSocket({success:function(){e()}})},e}(),l=a.obj(),c||(c=!0,o.onSocketOpen((function(){l.setReadable(s),l.setWritable(s),l.emit("connect")})),o.onSocketMessage((function(e){if("string"==typeof e.data){const t=r.from(e.data,"base64");s.push(t)}else{const t=new FileReader;t.addEventListener("load",(function(){let e=t.result;e=e instanceof ArrayBuffer?r.from(e):r.from(e,"utf8"),s.push(e)})),t.readAsArrayBuffer(e.data)}})),o.onSocketClose((function(){l.end(),l.destroy()})),o.onSocketError((function(e){l.destroy(e)}))),l}},function(e,t,n){"use strict";(function(t){const{Buffer:r}=n(113),i=n(1146),a=n(300)("mqttjs:ws"),o=n(448),s=n(257).Transform,l=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],c=void 0!==t&&"browser"===t.title||"function"==typeof n;function u(e,t){let n=e.protocol+"://"+e.hostname+":"+e.port+e.path;return"function"==typeof e.transformWsUrl&&(n=e.transformWsUrl(n,e,t)),n}function d(e){const t=e;return e.hostname||(t.hostname="localhost"),e.port||("wss"===e.protocol?t.port=443:t.port=80),e.path||(t.path="/"),e.wsOptions||(t.wsOptions={}),c||"wss"!==e.protocol||l.forEach((function(n){Object.prototype.hasOwnProperty.call(e,n)&&!Object.prototype.hasOwnProperty.call(e.wsOptions,n)&&(t.wsOptions[n]=e[n])})),t}e.exports=c?function(e,t){let n;a("browserStreamBuilder");const i=function(e){const t=d(e);if(t.hostname||(t.hostname=t.host),!t.hostname){if("undefined"==typeof document)throw new Error("Could not determine host. Specify host manually.");const e=new URL(document.URL);t.hostname=e.hostname,t.port||(t.port=e.port)}return void 0===t.objectMode&&(t.objectMode=!(!0===t.binary||void 0===t.binary)),t}(t).browserBufferSize||524288,l=t.browserBufferTimeout||1e3,c=!t.objectMode,h=function(e,t){const n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt",r=u(t,e),i=new WebSocket(r,[n]);return i.binaryType="arraybuffer",i}(e,t),f=function(e,t,n){const r=new s({objectModeMode:e.objectMode});return r._write=t,r._flush=n,r}(t,(function e(t,n,a){h.bufferedAmount>i&&setTimeout(e,l,t,n,a);c&&"string"==typeof t&&(t=r.from(t,"utf8"));try{h.send(t)}catch(e){return a(e)}a()}),(function(e){h.close(),e()}));t.objectMode||(f._writev=y),f.on("close",()=>{h.close()});const p=void 0!==h.addEventListener;function m(){n.setReadable(f),n.setWritable(f),n.emit("connect")}function g(){n.end(),n.destroy()}function v(e){n.destroy(e)}function b(e){let t=e.data;t=t instanceof ArrayBuffer?r.from(t):r.from(t,"utf8"),f.push(t)}function y(e,t){const n=new Array(e.length);for(let t=0;t<e.length;t++)"string"==typeof e[t].chunk?n[t]=r.from(e[t],"utf8"):n[t]=e[t].chunk;this._write(r.concat(n),"binary",t)}return(h.readyState===h.OPEN?n=f:(n=n=o(void 0,void 0,t),t.objectMode||(n._writev=y),p?h.addEventListener("open",m):h.onopen=m),n.socket=h,p?(h.addEventListener("close",g),h.addEventListener("error",v),h.addEventListener("message",b)):(h.onclose=g,h.onerror=v,h.onmessage=b),n)}:function(e,t){a("streamBuilder");const n=d(t),r=u(n,e),o=function(e,t,n){a("createWebSocket"),a("protocol: "+n.protocolId+" "+n.protocolVersion);const r="MQIsdp"===n.protocolId&&3===n.protocolVersion?"mqttv3.1":"mqtt";return a("creating new Websocket for url: "+t+" and protocol: "+r),new i(t,[r],n.wsOptions)}(0,r,n),s=i.createWebSocketStream(o,n.wsOptions);return s.url=r,o.on("close",()=>{s.destroy()}),s}}).call(this,n(96))},function(e,t){function n(e){return e.replace(/\n\r?\s*/g,"")}e.exports=function(e){for(var t="",r=0;r<arguments.length;r++)t+=n(e[r])+(arguments[r+1]||"");return t}},function(e,t,n){"use strict";var r=o(n(745)),i=o(n(746)),a=o(n(1158));function o(e){return e&&e.__esModule?e:{default:e}}e.exports={LineStream:r.default,ParseStream:i.default,Parser:a.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(450);var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.buffer="",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"push",value:function(e){var t=void 0;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(450),s=(r=o)&&r.__esModule?r:{default:r};var l=function(e){for(var t=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=t.length,i=void 0;r--;)""!==t[r]&&((i=/([^=]*)=(.*)/.exec(t[r]).slice(1))[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),n[i[0]]=i[1]);return n},c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"push",value:function(e){var t=void 0,n=void 0;if(0!==(e=e.replace(/^[\u0000\s]+|[\u0000\s]+$/g,"")).length)if("#"===e[0])if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void this.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"totalduration"},t[1]&&(n.duration=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void this.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void this.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"byterange"},t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),void this.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var r=l(t[1]);if(r.URI&&(n.uri=r.URI),r.BYTERANGE){var a=r.BYTERANGE.split("@"),o=i(a,2),s=o[0],c=o[1];n.byterange={},s&&(n.byterange.length=parseInt(s,10)),c&&(n.byterange.offset=parseInt(c,10))}}this.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=l(t[1]),n.attributes.RESOLUTION){var u=n.attributes.RESOLUTION.split("x"),d={};u[0]&&(d.width=parseInt(u[0],10)),u[1]&&(d.height=parseInt(u[1],10)),n.attributes.RESOLUTION=d}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}this.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=l(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void this.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=l(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void this.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void this.trigger("data",n);this.trigger("data",{type:"tag",data:e.slice(4)})}}}else this.trigger("data",{type:"comment",text:e.slice(1)});else this.trigger("data",{type:"uri",uri:e})}}]),t}(s.default);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1160),a=n(748),o=(r=a)&&r.__esModule?r:{default:r};t.default={decrypt:i.decrypt,Decrypter:i.Decrypter,AsyncStream:o.default},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i,a=n(1162),o=(i=a)&&i.__esModule?i:{default:i},s=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,o.default),this.jobs=[],this.delay=1,this.timeout_=null}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"processJob_",value:function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}},{key:"push",value:function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}]),t}(o.default);t.default=s,e.exports=t.default},function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){e.exports={tag:n(451),Transmuxer:n(1175),getFlvHeader:n(1182)}},function(e,t,n){"use strict";var r,i,a,o=n(180),s=n(1176),l=n(452),c=n(1177).TimestampRolloverStream,u=n(452);(r=function(){var e=new Uint8Array(188),t=0;r.prototype.init.call(this),this.push=function(n){var r,i=0,a=188;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;a<r.byteLength;)71!==r[i]||71!==r[a]?(i++,a++):(this.trigger("data",r.subarray(i,a)),i+=188,a+=188);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")}}).prototype=new o,(i=function(){var e,t,n,r;i.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var a=e[i],o=(31&e[i+1])<<8|e[i+2];a===l.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=o:a===l.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=o:a===l.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][o]=a),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=l.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=l.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new o,i.STREAM_TYPES={h264:27,adts:15},(a=function(){var e=this,t={data:[],size:0},n={data:[],size:0},r={data:[],size:0},i=function(t,n,r){var i,a,o=new Uint8Array(t.size),s={type:n},l=0,c=0;if(t.data.length&&!(t.size<9)){for(s.trackId=t.data[0].pid,l=0;l<t.data.length;l++)a=t.data[l],o.set(a.data,c),c+=a.data.byteLength;var u,d,h;u=o,(d=s).packetLength=6+(u[4]<<8|u[5]),d.dataAlignmentIndicator=0!=(4&u[6]),192&(h=u[7])&&(d.pts=(14&u[9])<<27|(255&u[10])<<20|(254&u[11])<<12|(255&u[12])<<5|(254&u[13])>>>3,d.pts*=4,d.pts+=(6&u[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&u[14])<<27|(255&u[15])<<20|(254&u[16])<<12|(255&u[17])<<5|(254&u[18])>>>3,d.dts*=4,d.dts+=(6&u[18])>>>1)),d.data=u.subarray(9+u[8]),i="video"===n||s.packetLength<=t.size,(r||i)&&(t.size=0,t.data.length=0),i&&e.trigger("data",s)}};a.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,o;switch(a.streamType){case l.H264_STREAM_TYPE:case u.H264_STREAM_TYPE:e=t,o="video";break;case l.ADTS_STREAM_TYPE:e=n,o="audio";break;case l.METADATA_STREAM_TYPE:e=r,o="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&i(e,o,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},n=a.programMapTable;null!==n.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"}),null!==n.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[a.type]()},this.flush=function(){i(t,"video"),i(n,"audio"),i(r,"timed-metadata"),this.trigger("done")}}).prototype=new o;var d={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:r,TransportParseStream:i,ElementaryStream:a,TimestampRolloverStream:c,CaptionStream:s.CaptionStream,Cea608Stream:s.Cea608Stream,MetadataStream:n(1178)};for(var h in l)l.hasOwnProperty(h)&&(d[h]=l[h]);e.exports=d},function(e,t,n){"use strict";var r,i=n(180),a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(r=function(){var e;r.prototype.init.call(this),this.push=function(t){var n,r,i,o,s,l,c=0,u=0;if("audio"===t.type)for(e?(o=e,(e=new Uint8Array(o.byteLength+t.data.byteLength)).set(o),e.set(t.data,o.byteLength)):e=t.data;c+5<e.length;)if(255===e[c]&&240==(246&e[c+1])){if(r=2*(1&~e[c+1]),n=(3&e[c+3])<<11|e[c+4]<<3|(224&e[c+5])>>5,l=9e4*(s=1024*(1+(3&e[c+6])))/a[(60&e[c+2])>>>2],i=c+n,e.byteLength<i)return;if(this.trigger("data",{pts:t.pts+u*l,dts:t.dts+u*l,sampleCount:s,audioobjecttype:1+(e[c+2]>>>6&3),channelcount:(1&e[c+2])<<2|(192&e[c+3])>>>6,samplerate:a[(60&e[c+2])>>>2],samplingfrequencyindex:(60&e[c+2])>>>2,samplesize:16,data:e.subarray(c+7+r,i)}),e.byteLength===i)return void(e=void 0);u++,e=e.subarray(i)}else c++},this.flush=function(){this.trigger("done")}}).prototype=new i,e.exports=r},function(e,t,n){"use strict";var r,i,a,o=n(180),s=n(1179);(i=function(){var e,t,n=0;i.prototype.init.call(this),this.push=function(r){var i;for(t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;n<t.byteLength-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<t.byteLength;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<t.length);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")}}).prototype=new o,a={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(r=function(){var e,t,n,o,l,c,u,d=new i;r.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,o=e.dts,d.push(e))},d.on("data",(function(r){var i={trackId:t,pts:n,dts:o,data:r};switch(31&r[0]){case 5:i.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:i.nalUnitType="sei_rbsp",i.escapedRBSP=l(r.subarray(1));break;case 7:i.nalUnitType="seq_parameter_set_rbsp",i.escapedRBSP=l(r.subarray(1)),i.config=c(i.escapedRBSP);break;case 8:i.nalUnitType="pic_parameter_set_rbsp";break;case 9:i.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",i)})),d.on("done",(function(){e.trigger("done")})),this.flush=function(){d.flush()},u=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},l=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},c=function(e){var t,n,r,i,o,l,c,d,h,f,p,m,g,v=0,b=0,y=0,A=0,_=1;if(n=(t=new s(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),a[n]&&(3===(o=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(p=3!==o?8:12,g=0;g<p;g++)t.readBoolean()&&u(g<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(l=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===l)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),c=t.readUnsignedExpGolomb(),g=0;g<c;g++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),h=t.readUnsignedExpGolomb(),0===(f=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(v=t.readUnsignedExpGolomb(),b=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),A=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:m=[1,1];break;case 2:m=[12,11];break;case 3:m=[10,11];break;case 4:m=[16,11];break;case 5:m=[40,33];break;case 6:m=[24,11];break;case 7:m=[20,11];break;case 8:m=[32,11];break;case 9:m=[80,33];break;case 10:m=[18,11];break;case 11:m=[15,11];break;case 12:m=[64,33];break;case 13:m=[160,99];break;case 14:m=[4,3];break;case 15:m=[3,2];break;case 16:m=[2,1];break;case 255:m=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}m&&(_=m[0]/m[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(d+1)-2*v-2*b)*_),height:(2-f)*(h+1)*16-2*y-2*A}}}).prototype=new o,e.exports={H264Stream:r,NalByteStream:i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n){var r=t.player_;if(n.captions&&n.captions.length)for(var i in e.inbandTextTracks_||(e.inbandTextTracks_={}),n.captionStreams)if(!e.inbandTextTracks_[i]){r.tech_.trigger({type:"usage",name:"hls-608"});var a=r.textTracks().getTrackById(i);e.inbandTextTracks_[i]=a||r.addRemoteTextTrack({kind:"captions",id:i,label:i},!1).track}n.metadata&&n.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=n.metadata.dispatchType)},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(117)),o=i(n(750)),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t||{},this.init()}return r(e,[{key:"init",value:function(){var e;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new o.default.Transmuxer(this.options),(e=this.transmuxer).on("data",(function(e){a.default.postMessage({action:"data",segment:e})})),e.on("done",(function(e){a.default.postMessage({action:"done"})}))}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"flush",value:function(){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}}]),e}(),l=function(e){e.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new s(e.data.options):(this.messageHandlers||(this.messageHandlers=new s),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}};t.default=function(e){return new l(e)},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={TIME_BETWEEN_CHUNKS:1,BYTES_PER_CHUNK:32768},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(117)),o=i(n(1185)),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t||{},this.init()}return r(e,[{key:"init",value:function(){var e;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new o.default.Transmuxer(this.options),(e=this.transmuxer).on("data",(function(e){var t=e.initSegment;e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength};var n=e.data;e.data=n.buffer,a.default.postMessage({action:"data",segment:e,byteOffset:n.byteOffset,byteLength:n.byteLength},[e.data])})),e.captionStream&&e.captionStream.on("data",(function(e){a.default.postMessage({action:"caption",data:e})})),e.on("done",(function(e){a.default.postMessage({action:"done"})})),e.on("gopInfo",(function(e){a.default.postMessage({action:"gopInfo",gopInfo:e})}))}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*t))}},{key:"setAudioAppendStart",value:function(e){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*e.appendStart))}},{key:"flush",value:function(e){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}]),e}(),l=function(e){e.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new s(e.data.options):(this.messageHandlers||(this.messageHandlers=new s),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}};t.default=function(e){return new l(e)},e.exports=t.default},function(e,t,n){"use strict";var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,A,_,w,E,S,C,T,k,x,O,I,M,P,D,N,L,R,B,j,F,U,H,z,V,W=Math.pow(2,32)-1;!function(){var e;if(C={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in C)C.hasOwnProperty(e)&&(C[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);T=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),x=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),O=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),I=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),M={video:O,audio:I},N=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),R=L,B=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),j=L,P=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),r=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},i=function(){return r(C.dinf,r(C.dref,N))},a=function(e){return r(C.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},o=function(){return r(C.ftyp,T,k,T,x)},b=function(e){return r(C.hdlr,M[e])},s=function(e){return r(C.mdat,e)},v=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),r(C.mdhd,t)},g=function(e){return r(C.mdia,v(e),b(e.type),c(e))},l=function(e){return r(C.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},c=function(e){return r(C.minf,"video"===e.type?r(C.vmhd,P):r(C.smhd,D),i(),A(e))},u=function(e,t){for(var n=[],i=t.length;i--;)n[i]=w(t[i]);return r.apply(null,[C.moof,l(e)].concat(n))},d=function(e){for(var t=e.length,n=[];t--;)n[t]=p(e[t]);return r.apply(null,[C.moov,f(4294967295)].concat(n).concat(h(e)))},h=function(e){for(var t=e.length,n=[];t--;)n[t]=E(e[t]);return r.apply(null,[C.mvex].concat(n))},f=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return r(C.mvhd,t)},y=function(e){var t,n,i=e.samples||[],a=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)t=i[n].flags,a[n+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return r(C.sdtp,a)},A=function(e){return r(C.stbl,_(e),r(C.stts,j),r(C.stsc,R),r(C.stsz,B),r(C.stco,L))},_=function(e){return r(C.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?F(e):U(e))},F=function(e){var t,n=e.sps||[],i=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<i.length;t++)o.push((65280&i[t].byteLength)>>>8),o.push(255&i[t].byteLength),o=o.concat(Array.prototype.slice.call(i[t]));return r(C.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),r(C.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length]).concat(a).concat([i.length]).concat(o))),r(C.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},U=function(e){return r(C.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),a(e))},m=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return r(C.tkhd,t)},w=function(e){var t,n,i,a,o,s;return t=r(C.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/(W+1)),s=Math.floor(e.baseMediaDecodeTime%(W+1)),n=r(C.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(i=S(e,92),r(C.traf,t,n,i)):(a=y(e),i=S(e,a.length+92),r(C.traf,t,n,i,a))},p=function(e){return e.duration=e.duration||4294967295,r(C.trak,m(e),g(e))},E=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),r(C.trex,t)},V=function(e,t){var n=0,r=0,i=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|r|i|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},z=function(e,t){var n,i,a,o;for(t+=20+16*(i=e.samples||[]).length,n=V(i,t),o=0;o<i.length;o++)a=i[o],n=n.concat([(4278190080&a.duration)>>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size,a.flags.isLeading<<2|a.flags.dependsOn,a.flags.isDependedOn<<6|a.flags.hasRedundancy<<4|a.flags.paddingValue<<1|a.flags.isNonSyncSample,61440&a.flags.degradationPriority,15&a.flags.degradationPriority,(4278190080&a.compositionTimeOffset)>>>24,(16711680&a.compositionTimeOffset)>>>16,(65280&a.compositionTimeOffset)>>>8,255&a.compositionTimeOffset]);return r(C.trun,new Uint8Array(n))},H=function(e,t){var n,i,a,o;for(t+=20+8*(i=e.samples||[]).length,n=V(i,t),o=0;o<i.length;o++)a=i[o],n=n.concat([(4278190080&a.duration)>>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size]);return r(C.trun,new Uint8Array(n))},S=function(e,t){return"audio"===e.type?H(e,t):z(e,t)},e.exports={ftyp:o,mdat:s,moof:u,moov:d,initSegment:function(e){var t,n=o(),r=d(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=a(n(263)),l=a(n(126)),c=a(n(1190)),u=a(n(350)),d=a(n(117)),h=a(n(348)),f=n(301),p=n(1191),m=n(456),g=n(760),v=function(e,t,n){if(!e||!t)return!1;var r=n===e.segments.length;return e.endList&&"open"===t.readyState&&r},b=function(e){return"number"==typeof e&&isFinite(e)},y=function(e,t,n){return"main"===e&&t&&n?n.containsAudio||n.containsVideo?t.containsVideo&&!n.containsVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.containsVideo&&n.containsVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null};t.illegalMediaSwitch=y;var A=function(e,t,n){var r=void 0;return r=e.length&&e.start(0)>0&&e.start(0)<t?e.start(0):t-30,Math.min(r,t-n)};t.safeBackBufferTrimTime=A;var _=function(e){function t(e){var n=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.state="INIT",this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.hls_=e.hls,this.loaderType_=e.loaderType,this.startingMedia_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.pendingSegment_=null,this.mimeType_=null,this.sourceUpdater_=null,this.xhrOptions_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.syncController_.on("syncinfoupdate",(function(){return n.trigger("syncinfoupdate")})),this.mediaSource_.addEventListener("sourceopen",(function(){return n.ended_=!1})),this.fetchAtBuffer_=!1,r.debug&&(this.logger_=l.default.log.bind(l.default,"segment-loader",this.loaderType_,"->"))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(e){return void 0!==e&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():l.default.createTimeRanges()}},{key:"initSegment",value:function(e){var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(!e)return null;var n=(0,f.initSegmentId)(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes}),r||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new c.default(this.mediaSource_,this.mimeType_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(e){var n=this.playlist_,r=this.pendingSegment_;if(this.playlist_=e,this.xhrOptions_=t,this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,time:0}),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(n&&n.uri===e.uri){var i=e.mediaSequence-n.mediaSequence;this.logger_("mediaSequenceDiff",i),null!==this.mediaIndex&&(this.mediaIndex-=i),r&&(r.mediaIndex-=i,r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(d.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e){this.mimeType_||(this.mimeType_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_()),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(e,t){this.sourceUpdater_&&this.sourceUpdater_.remove(e,t),(0,h.default)(e,t,this.segmentMetadataTrack_)}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&d.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=d.default.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&d.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=d.default.setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e)v(this.playlist_,this.mediaSource_,e.mediaIndex)?this.endOfStream():(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((e.timeline!==this.currentTimeline_||null!==e.startOfSegment&&e.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),e.timestampOffset=e.startOfSegment),this.loadSegment_(e))}}},{key:"checkBuffer_",value:function(e,t,n,r,i,a){var o=0,l=void 0;e.length&&(o=e.end(e.length-1));var c,u=Math.max(0,o-i);if(!t.segments.length)return null;if(u>=this.goalBufferLength_())return null;if(!r&&u>=1)return null;if(this.logger_("checkBuffer_","mediaIndex:",n,"hasPlayed:",r,"currentTime:",i,"syncPoint:",a,"fetchAtBuffer:",this.fetchAtBuffer_,"bufferedTime:",u),null===a)return n=this.getSyncSegmentCandidate_(t),this.logger_("getSync","mediaIndex:",n),this.generateSegmentInfo_(t,n,null,!0);if(null!==n){this.logger_("walkForward","mediaIndex:",n+1);var d=t.segments[n];return l=d&&d.end?d.end:o,this.generateSegmentInfo_(t,n+1,l,!1)}this.fetchAtBuffer_?(n=(c=s.default.getMediaInfoForTime(t,o,a.segmentIndex,a.time)).mediaIndex,l=c.startTime):(n=(c=s.default.getMediaInfoForTime(t,i,a.segmentIndex,a.time)).mediaIndex,l=c.startTime);return this.logger_("getMediaIndexForTime","mediaIndex:",n,"startOfSegment:",l),this.generateSegmentInfo_(t,n,l,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var t=this;if(-1===this.currentTimeline_)return 0;var n=e.segments.map((function(e,t){return{timeline:e.timeline,segmentIndex:t}})).filter((function(e){return e.timeline===t.currentTimeline_}));return n.length?n[Math.min(n.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,n,r){if(t<0||t>=e.segments.length)return null;var i=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:i.resolvedUri,mediaIndex:t,isSyncRequest:r,startOfSegment:n,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:i.timeline,duration:i.duration,segment:i}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=s.default.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),a=(0,m.timeUntilRebuffer)(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(i<=a)return!1;var o=(0,g.minRebufferMaxBandwidthSelector)({master:this.hls_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(o){var l=i-a-o.rebufferingImpact,c=.5;return a<=m.TIME_FUDGE_FACTOR&&(c=1),!o.playlist||o.playlist.uri===this.playlist_.uri||l<c?!1:(this.bandwidth=o.playlist.attributes.BANDWIDTH*u.default.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(e,t){this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(t.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),e.abortRequests=(0,p.mediaSegmentRequest)(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.createSimplifiedSegmentObj_(e),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(e){var t=A(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,n={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){var r=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key={resolvedUri:t.key.resolvedUri,iv:r}}return t.map&&(n.map=this.initSegment(t.map)),n}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),this.pendingSegment_){if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===p.REQUEST_ERRORS.ABORTED?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===p.REQUEST_ERRORS.TIMEOUT?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),this.processSegmentResponse_(t)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_){var t=this.pendingSegment_,n=t.segment,r=this.syncController_.probeSegmentInfo(t);void 0===this.startingMedia_&&r&&(r.containsAudio||r.containsVideo)&&(this.startingMedia_={containsAudio:r.containsAudio,containsVideo:r.containsVideo});var i=y(this.loaderType_,this.startingMedia_,r);if(i)return this.error({message:i,blacklistDuration:1/0}),void this.trigger("error");if(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset"));var a=this.syncController_.mappingForTimeline(t.timeline);null!==a&&this.trigger({type:"segmenttimemapping",mapping:a}),this.state="APPENDING",n.map&&function(){var t=(0,f.initSegmentId)(n.map);if(!e.activeInitSegmentId_||e.activeInitSegmentId_!==t){var r=e.initSegment(n.map);e.sourceUpdater_.appendBuffer(r.bytes,(function(){e.activeInitSegmentId_=t}))}}(),t.byteLength=t.bytes.byteLength,"number"==typeof n.start&&"number"==typeof n.end?this.mediaSecondsLoaded+=n.end-n.start:this.mediaSecondsLoaded+=n.duration,this.sourceUpdater_.appendBuffer(t.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(this.logger_("handleUpdateEnd_","segmentInfo:",this.pendingSegment_),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,n=null!==this.mediaIndex;(this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration)?this.resetEverything():(n&&this.trigger("bandwidthupdate"),this.trigger("progress"),v(e.playlist,this.mediaSource_,e.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},{key:"logger_",value:function(){}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(b(n)&&b(r)){(0,h.default)(n,r,this.segmentMetadataTrack_);var i=d.default.WebKitDataCue||d.default.VTTCue,a={bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.uri,start:n,end:r},o=new i(n,r,JSON.stringify(a));o.value=a,this.segmentMetadataTrack_.addCue(o)}}}}]),t}(l.default.EventTarget);t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(350)),a=r(n(263)),o=n(761),s=function(e,t){var n;return e&&(n=window.getComputedStyle(e))?n[t]:""},l=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},c=function(e,t){var n=void 0,r=void 0;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||window.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||window.Number.MAX_VALUE)};t.comparePlaylistBandwidth=c;t.comparePlaylistResolution=function(e,t){var n=void 0,r=void 0;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||window.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||window.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r};var u=function(e,t,n,r){var o=e.playlists.map((function(e){var t,n;return t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,{bandwidth:e.attributes.BANDWIDTH||window.Number.MAX_VALUE,width:t,height:n,playlist:e}}));l(o,(function(e,t){return e.bandwidth-t.bandwidth}));var s=(o=o.filter((function(e){return!a.default.isIncompatible(e.playlist)}))).filter((function(e){return a.default.isEnabled(e.playlist)}));s.length||(s=o.filter((function(e){return!a.default.isDisabled(e.playlist)})));var c=s.filter((function(e){return e.bandwidth*i.default.BANDWIDTH_VARIANCE<t})),u=c[c.length-1],d=c.filter((function(e){return e.bandwidth===u.bandwidth}))[0],h=c.filter((function(e){return e.width&&e.height}));l(h,(function(e,t){return e.width-t.width}));var f=h.filter((function(e){return e.width===n&&e.height===r}));u=f[f.length-1];var p=f.filter((function(e){return e.bandwidth===u.bandwidth}))[0],m=void 0,g=void 0,v=void 0;p||(g=(m=h.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===m[0].width&&e.height===m[0].height})),u=g[g.length-1],v=g.filter((function(e){return e.bandwidth===u.bandwidth}))[0]);var b=v||p||d||s[0]||o[0];return b?b.playlist:null};t.simpleSelector=u;t.lastBandwidthSelector=function(){return u(this.playlists.master,this.systemBandwidth,parseInt(s(this.tech_.el(),"width"),10),parseInt(s(this.tech_.el(),"height"),10))};t.movingAverageBandwidthSelector=function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,u(this.playlists.master,t,parseInt(s(this.tech_.el(),"width"),10),parseInt(s(this.tech_.el(),"height"),10))}};t.minRebufferMaxBandwidthSelector=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,o=e.segmentDuration,s=e.timeUntilRebuffer,u=e.currentTimeline,d=e.syncController,h=t.playlists.filter((function(e){return!a.default.isIncompatible(e)})),f=h.filter(a.default.isEnabled);f.length||(f=h.filter((function(e){return!a.default.isDisabled(e)})));var p=f.filter(a.default.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=d.getSyncPoint(e,i,u,n)?1:2;return{playlist:e,rebufferingImpact:a.default.estimateSegmentRequestTime(o,r,e)*t-s}})),m=p.filter((function(e){return e.rebufferingImpact<=0}));return l(m,(function(e,t){return c(t.playlist,e.playlist)})),m.length?m[0]:(l(p,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),p[0]||null)};t.lowestBitrateCompatibleVariantSelector=function(){var e=this.playlists.master.playlists.filter(a.default.isEnabled);return l(e,(function(e,t){return c(e,t)})),e.filter((function(e){return(0,o.parseCodecs)(e.attributes.CODECS).videoCodec}))[0]||null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.parseCodecs=function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t={codecCount:0},n=void 0;return t.codecCount=e.split(",").length,t.codecCount=t.codecCount||2,(n=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(e))&&(t.videoCodec=n[2],t.videoObjectTypeIndicator=n[3]),t.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(e),t.audioProfile=t.audioProfile&&t.audioProfile[2],t}},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(117),a=(r=i)&&r.__esModule?r:{default:r},o=n(747),s=n(301),l=function(e){e.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),i=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new o.Decrypter(n,r,i,(function(e,n){a.default.postMessage((0,s.createTransferableMessage)({source:t.source,decrypted:n}),[n.buffer])}))}};t.default=function(e){return new l(e)},e.exports=t.default},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(68))},function(e,t,n){var r=n(352),i=r.find,a=r.NAMESPACE;function o(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function l(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(o):[]}(e);return Object.keys(t.reduce(s,{}))}function c(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function u(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,c(n,r=new r),e.prototype=n=r}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var d={},h=d.ELEMENT_NODE=1,f=d.ATTRIBUTE_NODE=2,p=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,v=d.ENTITY_NODE=6,b=d.PROCESSING_INSTRUCTION_NODE=7,y=d.COMMENT_NODE=8,A=d.DOCUMENT_NODE=9,_=d.DOCUMENT_TYPE_NODE=10,w=d.DOCUMENT_FRAGMENT_NODE=11,E=d.NOTATION_NODE=12,S={},C={},T=(S.INDEX_SIZE_ERR=(C[1]="Index size error",1),S.DOMSTRING_SIZE_ERR=(C[2]="DOMString size error",2),S.HIERARCHY_REQUEST_ERR=(C[3]="Hierarchy request error",3)),k=(S.WRONG_DOCUMENT_ERR=(C[4]="Wrong document",4),S.INVALID_CHARACTER_ERR=(C[5]="Invalid character",5),S.NO_DATA_ALLOWED_ERR=(C[6]="No data allowed",6),S.NO_MODIFICATION_ALLOWED_ERR=(C[7]="No modification allowed",7),S.NOT_FOUND_ERR=(C[8]="Not found",8)),x=(S.NOT_SUPPORTED_ERR=(C[9]="Not supported",9),S.INUSE_ATTRIBUTE_ERR=(C[10]="Attribute in use",10));S.INVALID_STATE_ERR=(C[11]="Invalid state",11),S.SYNTAX_ERR=(C[12]="Syntax error",12),S.INVALID_MODIFICATION_ERR=(C[13]="Invalid modification",13),S.NAMESPACE_ERR=(C[14]="Invalid namespace",14),S.INVALID_ACCESS_ERR=(C[15]="Invalid access",15);function O(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,C[e]),this.message=C[e],Error.captureStackTrace&&Error.captureStackTrace(this,O);return n.code=e,t&&(this.message=this.message+": "+t),n}function I(){}function M(e,t){this._node=e,this._refresh=t,P(this)}function P(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);ve(e,"length",n.length),c(n,e),e._inc=t}}function D(){}function N(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function L(e,t,n,r){if(r?t[N(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&z(i,e,r),function(e,t,n){e&&e._inc++,n.namespaceURI===a.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function R(e,t,n){var r=N(t,n);if(!(r>=0))throw new O(k,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&(z(a,e,n),n.ownerElement=null)}}function B(){}function j(){}function F(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function U(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(U(e,t))return!0}while(e=e.nextSibling)}function H(){this.ownerDocument=this}function z(e,t,n,r){e&&e._inc++,n.namespaceURI===a.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function V(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function W(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,V(e.ownerDocument,e),t}function G(e){return e&&e.nodeType===j.DOCUMENT_TYPE_NODE}function q(e){return e&&e.nodeType===j.ELEMENT_NODE}function Y(e){return e&&e.nodeType===j.TEXT_NODE}function K(e,t){var n=e.childNodes||[];if(i(n,q)||G(t))return!1;var r=i(n,G);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function X(e,t){var n=e.childNodes||[];if(i(n,(function(e){return q(e)&&e!==t})))return!1;var r=i(n,G);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function Q(e,t,n){if(!function(e){return e&&(e.nodeType===j.DOCUMENT_NODE||e.nodeType===j.DOCUMENT_FRAGMENT_NODE||e.nodeType===j.ELEMENT_NODE)}(e))throw new O(T,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new O(k,"child not in parent");if(!function(e){return e&&(q(e)||Y(e)||G(e)||e.nodeType===j.DOCUMENT_FRAGMENT_NODE||e.nodeType===j.COMMENT_NODE||e.nodeType===j.PROCESSING_INSTRUCTION_NODE)}(t)||G(t)&&e.nodeType!==j.DOCUMENT_NODE)throw new O(T,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function $(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===j.DOCUMENT_FRAGMENT_NODE){var o=a.filter(q);if(o.length>1||i(a,Y))throw new O(T,"More than one element or text in fragment");if(1===o.length&&!K(e,n))throw new O(T,"Element in fragment can not be inserted before doctype")}if(q(t)&&!K(e,n))throw new O(T,"Only one element can be added and only after doctype");if(G(t)){if(i(r,G))throw new O(T,"Only one doctype is allowed");var s=i(r,q);if(n&&r.indexOf(s)<r.indexOf(n))throw new O(T,"Doctype can only be inserted before an element");if(!n&&s)throw new O(T,"Doctype can not be appended since element is present")}}function J(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===j.DOCUMENT_FRAGMENT_NODE){var o=a.filter(q);if(o.length>1||i(a,Y))throw new O(T,"More than one element or text in fragment");if(1===o.length&&!X(e,n))throw new O(T,"Element in fragment can not be inserted before doctype")}if(q(t)&&!X(e,n))throw new O(T,"Only one element can be added and only after doctype");if(G(t)){if(i(r,(function(e){return G(e)&&e!==n})))throw new O(T,"Only one doctype is allowed");var s=i(r,q);if(n&&r.indexOf(s)<r.indexOf(n))throw new O(T,"Doctype can only be inserted before an element")}}function Z(e,t,n,r){Q(e,t,n),e.nodeType===j.DOCUMENT_NODE&&(r||$)(e,t,n);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===w){var a=t.firstChild;if(null==a)return t;var o=t.lastChild}else a=o=t;var s=n?n.previousSibling:e.lastChild;a.previousSibling=s,o.nextSibling=n,s?s.nextSibling=a:e.firstChild=a,null==n?e.lastChild=o:n.previousSibling=o;do{a.parentNode=e}while(a!==o&&(a=a.nextSibling));return V(e.ownerDocument||e,e),t.nodeType==w&&(t.firstChild=t.lastChild=null),t}function ee(){this._nsMap={}}function te(){}function ne(){}function re(){}function ie(){}function ae(){}function oe(){}function se(){}function le(){}function ce(){}function ue(){}function de(){}function he(){}function fe(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&null==i&&null==(i=r.lookupPrefix(a)))var o=[{namespace:a,prefix:null}];return ge(this,n,e,t,o),n.join("")}function pe(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!i)return!1;if("xml"===r&&i===a.XML||i===a.XMLNS)return!1;for(var o=n.length;o--;){var s=n[o];if(s.prefix===r)return s.namespace!==i}return!0}function me(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,F),'"')}function ge(e,t,n,r,i){if(i||(i=[]),r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var o=e.attributes,s=o.length,l=e.firstChild,c=e.tagName,u=c;if(!(n=a.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var d,v=0;v<o.length;v++)if("xmlns"===o.item(v).name){d=o.item(v).value;break}if(!d)for(var E=i.length-1;E>=0;E--){if(""===(S=i[E]).prefix&&S.namespace===e.namespaceURI){d=S.namespace;break}}if(d!==e.namespaceURI)for(E=i.length-1;E>=0;E--){var S;if((S=i[E]).namespace===e.namespaceURI){S.prefix&&(u=S.prefix+":"+c);break}}}t.push("<",u);for(var C=0;C<s;C++){"xmlns"==(T=o.item(C)).prefix?i.push({prefix:T.localName,namespace:T.value}):"xmlns"==T.nodeName&&i.push({prefix:"",namespace:T.value})}for(C=0;C<s;C++){var T,k,x;if(pe(T=o.item(C),0,i))me(t,(k=T.prefix||"")?"xmlns:"+k:"xmlns",x=T.namespaceURI),i.push({prefix:k,namespace:x});ge(T,t,n,r,i)}if(c===u&&pe(e,0,i))me(t,(k=e.prefix||"")?"xmlns:"+k:"xmlns",x=e.namespaceURI),i.push({prefix:k,namespace:x});if(l||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),n&&/^script$/i.test(c))for(;l;)l.data?t.push(l.data):ge(l,t,n,r,i.slice()),l=l.nextSibling;else for(;l;)ge(l,t,n,r,i.slice()),l=l.nextSibling;t.push("</",u,">")}else t.push("/>");return;case A:case w:for(l=e.firstChild;l;)ge(l,t,n,r,i.slice()),l=l.nextSibling;return;case f:return me(t,e.name,e.value);case p:return t.push(e.data.replace(/[<&>]/g,F));case m:return t.push("<![CDATA[",e.data,"]]>");case y:return t.push("\x3c!--",e.data,"--\x3e");case _:var O=e.publicId,I=e.systemId;if(t.push("<!DOCTYPE ",e.name),O)t.push(" PUBLIC ",O),I&&"."!=I&&t.push(" ",I),t.push(">");else if(I&&"."!=I)t.push(" SYSTEM ",I,">");else{var M=e.internalSubset;M&&t.push(" [",M,"]"),t.push(">")}return;case b:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,n){e[t]=n}O.prototype=Error.prototype,c(S,O),I.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ge(this[r],n,e,t);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},M.prototype.item=function(e){return P(this),this[e]},u(M,I),D.prototype={length:0,item:I.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new O(x);var n=this.getNamedItem(e.nodeName);return L(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new O(x);return t=this.getNamedItemNS(e.namespaceURI,e.localName),L(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return R(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return R(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},B.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var r=new H;if(r.implementation=this,r.childNodes=new I,r.doctype=n||null,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new oe;return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=n||"",r}},j.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Z(this,e,t)},replaceChild:function(e,t){Z(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return W(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a)){var o=n[a];"object"!=typeof o&&o!=i[a]&&(i[a]=o)}n.childNodes&&(i.childNodes=new I);switch(i.ownerDocument=t,i.nodeType){case h:var s=n.attributes,l=i.attributes=new D,c=s.length;l._ownerElement=i;for(var u=0;u<c;u++)i.setAttributeNode(e(t,s.item(u),!0));break;case f:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==p&&e.nodeType==p?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e)return r;t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},c(d,j),c(d,j.prototype),H.prototype={nodeName:"#document",nodeType:A,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),W(this,e)},replaceChild:function(e,t){Z(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),q(e)&&(this.documentElement=e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case h:(i=n.cloneNode(!1)).ownerDocument=t;case w:break;case f:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var a=n.firstChild;a;)i.appendChild(e(t,a,r)),a=a.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return U(this.documentElement,(function(n){if(n.nodeType==h&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=l(e);return new M(this,(function(n){var r=[];return t.length>0&&U(n.documentElement,(function(i){if(i!==n&&i.nodeType===h){var a=i.getAttribute("class");if(a){var o=e===a;if(!o){var s=l(a);o=t.every((c=s,function(e){return c&&-1!==c.indexOf(e)}))}o&&r.push(i)}}var c})),r}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new I,(t.attributes=new D)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new I,e},createTextNode:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new de;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ce;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,r=t.split(":"),i=n.attributes=new D;return n.childNodes=new I,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new te,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},u(H,j),ee.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===w?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,V(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new M(this,(function(t){var n=[];return U(t,(function(r){r===t||r.nodeType!=h||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new M(this,(function(n){var r=[];return U(n,(function(i){i===n||i.nodeType!==h||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},H.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,H.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,u(ee,j),te.prototype.nodeType=f,u(te,j),ne.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(C[T])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},u(ne,j),re.prototype={nodeName:"#text",nodeType:p,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},u(re,ne),ie.prototype={nodeName:"#comment",nodeType:y},u(ie,ne),ae.prototype={nodeName:"#cdata-section",nodeType:m},u(ae,ne),oe.prototype.nodeType=_,u(oe,j),se.prototype.nodeType=E,u(se,j),le.prototype.nodeType=v,u(le,j),ce.prototype.nodeType=g,u(ce,j),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=w,u(ue,j),de.prototype.nodeType=b,u(de,j),he.prototype.serializeToString=function(e,t,n){return fe.call(e,t,n)},j.prototype.toString=fe;try{if(Object.defineProperty){Object.defineProperty(M.prototype,"length",{get:function(){return P(this),this.$$length}}),Object.defineProperty(j.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case h:case w:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case h:case w:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ve=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DocumentType=oe,t.DOMException=O,t.DOMImplementation=B,t.Element=ee,t.Node=j,t.NodeList=I,t.XMLSerializer=he},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";(function(t){var r=t.Symbol,i=n(771);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}}).call(this,n(68))},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(e,t,n){"use strict";var r=Object,i=TypeError;e.exports=function(){if(null!=this&&this!==r(this))throw new i("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}},function(e,t,n){"use strict";var r=n(772),i=n(141).supportsDescriptors,a=Object.getOwnPropertyDescriptor,o=TypeError;e.exports=function(){if(!i)throw new o("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=a(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return r}},function(e,t,n){"use strict";var r=Date.prototype.getDay,i=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(a?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Date]"===i.call(e))}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(777);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(355).default,i=n(1295);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(779);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=!1},function(e,t,n){e.exports=!n(208)&&!n(303)((function(){return 7!=Object.defineProperty(n(782)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(169),i=n(181).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(169);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(230),i=n(1323),a=n(786),o=n(471)("IE_PROTO"),s=function(){},l=function(){var e,t=n(782)("iframe"),r=a.length;for(t.style.display="none",n(1327).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(229).f,i=n(785),a=n(474),o=n(232),s=n(475),l=n(305),c=n(468),u=n(787),d=n(1332),h=n(208),f=n(361).fastKey,p=n(267),m=h?"_s":"size",g=function(e,t){var n,r=f(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var u=e((function(e,r){s(e,u,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,null!=r&&l(r,n,e[c],e)}));return a(u.prototype,{clear:function(){for(var e=p(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var n=p(this,t),r=g(n,e);if(r){var i=r.n,a=r.p;delete n._i[r.i],r.r=!0,a&&(a.n=i),i&&(i.p=a),n._f==r&&(n._f=i),n._l==r&&(n._l=a),n[m]--}return!!r},forEach:function(e){p(this,t);for(var n,r=o(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!g(p(this,t),e)}}),h&&r(u.prototype,"size",{get:function(){return p(this,t)[m]}}),u},def:function(e,t,n){var r,i,a=g(e,t);return a?a.v=n:(e._l=a={i:i=f(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[m]++,"F"!==i&&(e._i[i]=a)),e},getEntry:g,setStrong:function(e,t,n){c(e,t,(function(e,n){this._t=p(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?u(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,u(1))}),n?"entries":"values",!n,!0),d(t)}}},function(e,t,n){var r=n(230);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},function(e,t,n){var r=n(304),i=n(164)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){var r=n(462),i=n(164)("iterator"),a=n(304);e.exports=n(198).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){var r=n(164)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(462),i=n(1337);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(232),i=n(470),a=n(360),o=n(359),s=n(1347);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,d=6==e,h=5==e||d,f=t||s;return function(t,s,p){for(var m,g,v=a(t),b=i(v),y=r(s,p,3),A=o(b.length),_=0,w=n?f(t,A):l?f(t,0):void 0;A>_;_++)if((h||_ in b)&&(g=y(m=b[_],_,v),e))if(n)w[_]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return _;case 2:w.push(m)}else if(u)return!1;return d?-1:c||u?u:w}}},function(e,t,n){"use strict";var r=n(208),i=n(469),a=n(1350),o=n(793),s=n(360),l=n(470),c=Object.assign;e.exports=!c||n(303)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r}))?function(e,t){for(var n=s(e),c=arguments.length,u=1,d=a.f,h=o.f;c>u;)for(var f,p=l(arguments[u++]),m=d?i(p).concat(d(p)):i(p),g=m.length,v=0;g>v;)f=m[v++],r&&!h.call(p,f)||(n[f]=p[f]);return n}:c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(363),a=n(101);class o extends a.default{constructor(e){super(e.logger),this.context=e,this.taskName="AttachMediaInputTask"}run(){return r(this,void 0,void 0,(function*(){const e=this.context.transceiverController;e.setPeer(this.context.peer),e.setupLocalTransceivers();const t=this.context.activeAudioInput;if(t){const n=t.getAudioTracks();if(this.context.browserBehavior.requiresUnifiedPlan())this.context.logger.info("attaching audio track to peer connection (unified-plan)"),yield e.setAudioInput(n.length?n[0]:null);else{this.context.logger.info("attaching audio track to peer connection (plan-b)");const e=this.context.peer.getSenders();t.getAudioTracks().forEach(n=>{e.find(e=>e.track.id===n.id)||(this.context.localAudioSender=this.context.peer.addTrack(n,t))})}}else yield e.setAudioInput(null),this.context.logger.info("no audio track");const n=this.context.activeVideoInput;if(n){const t=n.getVideoTracks(),r=t.length?t[0]:null;if(this.context.browserBehavior.requiresUnifiedPlan()){if(this.context.logger.info("attaching video track to peer connection (unified-plan)"),yield e.setVideoInput(r),this.context.enableSimulcast&&this.context.videoUplinkBandwidthPolicy){const t=this.context.videoUplinkBandwidthPolicy.chooseEncodingParameters();e.setEncodingParameters(t)}}else{this.context.logger.info("attaching video track to peer connection (plan-b)"),this.context.peer.getSenders().find(e=>e.track&&e.track.id===t[0].id)||(this.context.localVideoSender&&(this.context.peer.removeTrack(this.context.localVideoSender),this.context.localVideoSender=null),this.context.localVideoSender=this.context.peer.addTrack(t[0],n))}r&&(this.context.statsCollector.logVideoEvent(i.default.InputAttached,this.context.videoDeviceInformation),this.context.videoInputAttachedTimestampMs=Date.now())}else yield e.setVideoInput(null),this.context.logger.info("no video track"),this.context.localVideoSender&&(this.context.logger.info("removing track from peer"),this.context.peer.removeTrack(this.context.localVideoSender),this.context.localVideoSender=null);this.context.videoSubscriptions=e.updateVideoTransceivers(this.context.videoStreamIndex,this.context.videosToReceive)}))}}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(210),i=n(182);t.default=class{constructor(e,t,n){this.logger=e,this.task=t,this.dependencies=n,this.canceled=!1}name(){return`${this.task.name()} (once)`}cancel(){if(!this.canceled){if(this.dependencies)for(const e of this.dependencies)e.cancel();this.logger.info(`Canceling ${this.name()}`),i.default.nextTick(()=>this.task.cancel()),this.canceled=!0,this.cancelPromise&&i.default.nextTick(()=>this.cancelPromise(new Error(`canceling ${this.name()}`)))}}logDependencies(){if(this.logger.getLogLevel()>r.default.INFO)return;if(!this.dependencies)return;const e=this.dependencies.filter(e=>e).map(e=>e.name()).join(", ");this.logger.info(`${this.task.name()} waiting for dependencies: ${e}`)}run(){if(this.promise)return this.promise;const e=this.dependencies?Promise.all(this.dependencies.map(e=>null==e?void 0:e.run())):Promise.resolve();return this.logDependencies(),this.ongoing=e.then(()=>this.task.run()),this.promise=new Promise((e,t)=>{this.cancelPromise=t,this.ongoing.then(e).catch(t)})}setParent(e){this.task.setParent(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e=null){this.audioBitrateBps=e}static fullbandSpeechMono(){return new r(4e4)}static fullbandMusicMono(){return new r(64e3)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.logger=null,this.browserBehavior=null,this.signalingClient=null,this.meetingSessionConfiguration=null,this.peer=null,this.previousSdpOffer=null,this.sdpOfferInit=null,this.audioVideoController=null,this.realtimeController=null,this.videoTileController=null,this.mediaStreamBroker=null,this.audioMixController=null,this.activeAudioInput=null,this.activeVideoInput=null,this.transceiverController=null,this.indexFrame=null,this.iceCandidates=[],this.iceCandidateHandler=null,this.iceGatheringStateEventHandler=null,this.sdpAnswer=null,this.turnCredentials=null,this.reconnectController=null,this.removableObservers=[],this.audioProfile=null,this.videoStreamIndex=null,this.videoDownlinkBandwidthPolicy=null,this.videoUplinkBandwidthPolicy=null,this.lastKnownVideoAvailability=null,this.localVideoSender=null,this.localAudioSender=null,this.videoCaptureAndEncodeParameter=null,this.videosToReceive=null,this.lastVideosToReceive=null,this.videoSubscriptions=null,this.videosPaused=null,this.videoDuplexMode=null,this.volumeIndicatorAdapter=null,this.statsCollector=null,this.connectionMonitor=null,this.videoInputAttachedTimestampMs=0,this.audioDeviceInformation={},this.videoDeviceInformation={},this.enableSimulcast=!1,this.eventController=null,this.signalingOpenDurationMs=null,this.iceGatheringDurationMs=null,this.startAudioVideoTimestamp=null,this.attendeePresenceDurationMs=null,this.meetingStartDurationMs=null,this.poorConnectionCount=0,this.maxVideoTileCount=0,this.startTimeMs=null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e){this.canvas=e,this.destroyed=!1}destroy(){this.canvas=null,this.destroyed=!0}asCanvasImageSource(){return r(this,void 0,void 0,(function*(){return this.destroyed?Promise.reject("canvas buffer is destroyed"):Promise.resolve(this.canvas)}))}asCanvasElement(){return this.canvas}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckAudioConnectivityFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.AudioInputRequestFailed=1]="AudioInputRequestFailed",e[e.AudioInputPermissionDenied=2]="AudioInputPermissionDenied",e[e.ConnectionFailed=3]="ConnectionFailed",e[e.AudioNotReceived=4]="AudioNotReceived"}(r=t.CheckAudioConnectivityFeedback||(t.CheckAudioConnectivityFeedback={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckAudioInputFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed",e[e.PermissionDenied=2]="PermissionDenied"}(r=t.CheckAudioInputFeedback||(t.CheckAudioInputFeedback={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckAudioOutputFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed"}(r=t.CheckAudioOutputFeedback||(t.CheckAudioOutputFeedback={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckCameraResolutionFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed",e[e.ResolutionNotSupported=2]="ResolutionNotSupported",e[e.PermissionDenied=3]="PermissionDenied"}(r=t.CheckCameraResolutionFeedback||(t.CheckCameraResolutionFeedback={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckContentShareConnectivityFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed",e[e.PermissionDenied=2]="PermissionDenied",e[e.TimedOut=3]="TimedOut",e[e.ConnectionFailed=4]="ConnectionFailed"}(r=t.CheckContentShareConnectivityFeedback||(t.CheckContentShareConnectivityFeedback={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckNetworkTCPConnectivityFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.MeetingSessionURLsNotInitialized=1]="MeetingSessionURLsNotInitialized",e[e.ConnectionFailed=2]="ConnectionFailed",e[e.ICENegotiationFailed=3]="ICENegotiationFailed"}(r=t.CheckNetworkTCPConnectivityFeedback||(t.CheckNetworkTCPConnectivityFeedback={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckNetworkUDPConnectivityFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.MeetingSessionURLsNotInitialized=1]="MeetingSessionURLsNotInitialized",e[e.ConnectionFailed=2]="ConnectionFailed",e[e.ICENegotiationFailed=3]="ICENegotiationFailed"}(r=t.CheckNetworkUDPConnectivityFeedback||(t.CheckNetworkUDPConnectivityFeedback={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckVideoConnectivityFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.VideoInputRequestFailed=1]="VideoInputRequestFailed",e[e.VideoInputPermissionDenied=2]="VideoInputPermissionDenied",e[e.ConnectionFailed=3]="ConnectionFailed",e[e.VideoNotSent=4]="VideoNotSent"}(r=t.CheckVideoConnectivityFeedback||(t.CheckVideoConnectivityFeedback={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckVideoInputFeedback=void 0,function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed",e[e.PermissionDenied=2]="PermissionDenied"}(r=t.CheckVideoInputFeedback||(t.CheckVideoInputFeedback={})),t.default=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(101);class a extends i.default{constructor(e){super(e.logger),this.context=e,this.taskName="CleanRestartedSessionTask"}run(){return r(this,void 0,void 0,(function*(){this.context.peer&&this.context.peer.close(),this.context.transceiverController.reset(),this.context.localVideoSender=null,this.context.peer=null,this.context.videoDownlinkBandwidthPolicy.reset(),this.context.iceCandidateHandler=null,this.context.iceCandidates=[],this.context.previousSdpOffer=null}))}}t.default=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(146),a=n(101);class o extends a.default{constructor(e){super(e.logger),this.context=e,this.taskName="CleanStoppedSessionTask",this.taskCanceler=null}cancel(){this.taskCanceler&&(this.taskCanceler.cancel(),this.taskCanceler=null)}run(){return r(this,void 0,void 0,(function*(){try{this.context.signalingClient.ready()&&(this.context.signalingClient.closeConnection(),yield this.receiveWebSocketClosedEvent())}catch(e){throw e}finally{for(const e of this.context.removableObservers)e.removeObserver();this.context.statsCollector.stop(),this.context.statsCollector=null,this.context.connectionMonitor.stop(),this.context.connectionMonitor=null,this.context.peer&&this.context.peer.close(),this.context.peer=null,this.context.localVideoSender=null,this.context.sdpAnswer=null,this.context.sdpOfferInit=null,this.context.indexFrame=null,this.context.videoDownlinkBandwidthPolicy.reset(),this.context.iceCandidateHandler=null,this.context.iceCandidates=[],this.context.turnCredentials=null,this.context.videoSubscriptions=null,this.context.transceiverController.reset(),this.context.videoUplinkBandwidthPolicy.setTransceiverController&&this.context.videoUplinkBandwidthPolicy.setTransceiverController(void 0);const e=this.context.videoTileController.getLocalVideoTile();e&&e.bindVideoStream("",!0,null,null,null,null),this.context.videoTileController.removeAllVideoTiles()}}))}receiveWebSocketClosedEvent(){return new Promise((e,t)=>{const n=new class{constructor(e){this.signalingClient=e}cancel(){this.signalingClient.removeObserver(this),t(new Error("CleanStoppedSessionTask got canceled while waiting for the WebSocket closed event"))}handleSignalingClientEvent(t){t.type===i.default.WebSocketClosed&&(this.signalingClient.removeObserver(this),e())}}(this.context.signalingClient);this.taskCanceler=n,this.context.signalingClient.registerObserver(n)})}}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){this.connectionStartTimestampMs=0,this.consecutiveStatsWithNoPackets=0,this.lastPacketLossInboundTimestampMs=0,this.lastGoodSignalTimestampMs=0,this.lastWeakSignalTimestampMs=0,this.lastNoSignalTimestampMs=0,this.consecutiveMissedPongs=0,this.packetsReceivedInLastMinute=[],this.fractionPacketsLostInboundInLastMinute=[],this.audioSpeakerDelayMs=0,this.connectionStartTimestampMs=Date.now(),this.lastGoodSignalTimestampMs=Date.now()}static isTimestampRecent(e,t){return Date.now()<e+t}setConnectionStartTime(){this.connectionStartTimestampMs=Date.now(),this.lastGoodSignalTimestampMs=Date.now()}reset(){this.connectionStartTimestampMs=0,this.consecutiveStatsWithNoPackets=0,this.lastPacketLossInboundTimestampMs=0,this.lastGoodSignalTimestampMs=0,this.lastWeakSignalTimestampMs=0,this.lastNoSignalTimestampMs=0,this.consecutiveMissedPongs=0,this.packetsReceivedInLastMinute=[],this.fractionPacketsLostInboundInLastMinute=[],this.audioSpeakerDelayMs=0,this.connectionStartTimestampMs=Date.now(),this.lastGoodSignalTimestampMs=Date.now()}isConnectionStartRecent(e){return r.isTimestampRecent(this.connectionStartTimestampMs,e)}isLastPacketLossRecent(e){return r.isTimestampRecent(this.lastPacketLossInboundTimestampMs,e)}isGoodSignalRecent(e){return r.isTimestampRecent(this.lastGoodSignalTimestampMs,e)}isWeakSignalRecent(e){return r.isTimestampRecent(this.lastWeakSignalTimestampMs,e)}isNoSignalRecent(e){return r.isTimestampRecent(this.lastNoSignalTimestampMs,e)}clone(){const e=new r;return e.connectionStartTimestampMs=this.connectionStartTimestampMs,e.consecutiveStatsWithNoPackets=this.consecutiveStatsWithNoPackets,e.lastPacketLossInboundTimestampMs=this.lastPacketLossInboundTimestampMs,e.lastGoodSignalTimestampMs=this.lastGoodSignalTimestampMs,e.lastWeakSignalTimestampMs=this.lastWeakSignalTimestampMs,e.lastNoSignalTimestampMs=this.lastNoSignalTimestampMs,e.consecutiveMissedPongs=this.consecutiveMissedPongs,e.packetsReceivedInLastMinute=this.packetsReceivedInLastMinute.slice(0),e.fractionPacketsLostInboundInLastMinute=this.fractionPacketsLostInboundInLastMinute.slice(0),e.audioSpeakerDelayMs=this.audioSpeakerDelayMs,e}setConsecutiveMissedPongs(e){this.consecutiveMissedPongs=e}setConsecutiveStatsWithNoPackets(e){this.consecutiveStatsWithNoPackets=e}setLastPacketLossInboundTimestampMs(e){this.lastPacketLossInboundTimestampMs=e}setLastNoSignalTimestampMs(e){this.lastNoSignalTimestampMs=e}setLastWeakSignalTimestampMs(e){this.lastWeakSignalTimestampMs=e}setLastGoodSignalTimestampMs(e){this.lastGoodSignalTimestampMs=e}setAudioSpeakerDelayMs(e){this.audioSpeakerDelayMs=e}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.minHealth=0,this.maxHealth=1,this.initialHealth=1,this.connectionUnhealthyThreshold=25,this.noSignalThresholdTimeMs=1e4,this.connectionWaitTimeMs=1e4,this.zeroBarsNoSignalTimeMs=5e3,this.oneBarWeakSignalTimeMs=5e3,this.twoBarsTimeMs=5e3,this.threeBarsTimeMs=1e4,this.fourBarsTimeMs=2e4,this.fiveBarsTimeMs=6e4,this.cooldownTimeMs=6e4,this.pastSamplesToConsider=15,this.goodSignalTimeMs=15e3,this.fractionalLoss=.5,this.packetsExpected=50,this.maximumTimesToWarn=2,this.missedPongsLowerThreshold=1,this.missedPongsUpperThreshold=4,this.maximumAudioDelayMs=6e4,this.maximumAudioDelayDataPoints=10}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(157),a=n(483);class o{constructor(e){this.logger=e}get mediaStream(){return this._mediaStream}set mediaStream(e){this._mediaStream=e}acquireAudioInputStream(){return r(this,void 0,void 0,(function*(){return 0===this._mediaStream.getAudioTracks().length?(this.logger.info("No audio stream available. Synthesizing an audio stream."),a.default.synthesizeAudioDevice(0)):this._mediaStream}))}acquireVideoInputStream(){return r(this,void 0,void 0,(function*(){return this._mediaStream}))}releaseMediaStream(e){this.logger.warn("release media stream called")}acquireDisplayInputStream(e){return r(this,void 0,void 0,(function*(){return e&&e.video&&e.video.mandatory&&e.video.mandatory.chromeMediaSource&&e.video.mandatory.chromeMediaSourceId?navigator.mediaDevices.getUserMedia(e):navigator.mediaDevices.getDisplayMedia(e)}))}bindToAudioVideoController(e){throw new Error("unsupported")}acquireScreenCaptureDisplayInputStream(e,t){return r(this,void 0,void 0,(function*(){return this.acquireDisplayInputStream(this.screenCaptureDisplayMediaConstraints(e,t))}))}screenCaptureDisplayMediaConstraints(e,t){return{audio:!(e||!(new i.default).getDisplayMediaAudioCaptureSupport()),video:Object.assign(Object.assign({},!e&&{frameRate:{max:t||o.defaultFrameRate}}),e&&{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,maxFrameRate:t||o.defaultFrameRate}})}}toggleMediaStream(e){let t=!1;if(this.mediaStream)for(let n=0;n<this.mediaStream.getTracks().length;n++)this.mediaStream.getTracks()[n].enabled!==e&&(this.mediaStream.getTracks()[n].enabled=e,t=!0);return t}cleanup(){if(this.mediaStream)for(let e=0;e<this.mediaStream.getTracks().length;e++){this.mediaStream.getTracks()[e].stop()}this.mediaStream=null}}t.default=o,o.defaultFrameRate=15},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(158);class i{constructor(){this.isSome=!1,this.isNone=!0}get(){throw new Error("value is null")}getOrElse(e){return e}map(e){return new i}flatMap(e){return new i}defaulting(e){return r.default.of(this.getOrElse(e))}static of(){return new i}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(158);class i{constructor(e){this.value=e,this.isSome=!0,this.isNone=!1}map(e){return r.default.of(e(this.value))}flatMap(e){return e(this.value)}get(){return this.value}getOrElse(e){return this.value}defaulting(e){return r.default.of(this.getOrElse(e))}static of(e){if(null==e)throw new Error("value is ${value}");return new i(e)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(821);t.default=class{constructor(){this.isMediaDevicesSupported="undefined"!=typeof navigator&&!!navigator.mediaDevices}create(){if(this.isMediaDevicesSupported)return new Proxy(navigator.mediaDevices,new r.default);throw new Error("navigator.mediaDevices is not supported")}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(182),a=n(211);class o{constructor(){this.scheduler=null,this.devices=null,this.deviceChangeListeners=new Set,this.get=(e,t,n)=>{if(!Reflect.has(e,t))return;if(!("ondevicechange"in navigator.mediaDevices)){if("addEventListener"===t)return this.patchAddEventListener(e,t,n);if("removeEventListener"===t)return this.patchRemoveEventListener(e,t,n)}const r=Reflect.get(e,t,n);return"function"==typeof r?r.bind(e):r},this.patchAddEventListener=(e,t,n)=>{const r=Reflect.get(e,t,n);return(t,n,i)=>{if("devicechange"!==t)return Reflect.apply(r,e,[t,n,i]);this.deviceChangeListeners.add(n),this.scheduler||(this.scheduler=new a.default(o.INTERVAL_MS),this.scheduler.start(this.pollDeviceLists))}},this.patchRemoveEventListener=(e,t,n)=>{const r=Reflect.get(e,t,n);return(t,n,i)=>{if("devicechange"!==t)return Reflect.apply(r,e,[t,n,i]);this.deviceChangeListeners.delete(n),0===this.deviceChangeListeners.size&&this.scheduler&&(this.scheduler.stop(),this.scheduler=null)}},this.pollDeviceLists=()=>r(this,void 0,void 0,(function*(){const e=yield this.sortedDeviceList();if(this.devices){(e.length!==this.devices.length||e.some((e,t)=>e.deviceId!==this.devices[t].deviceId))&&this.handleDeviceChangeEvent()}this.devices=e}))}sortedDeviceList(){return r(this,void 0,void 0,(function*(){return(yield navigator.mediaDevices.enumerateDevices()).sort((e,t)=>e.deviceId<t.deviceId?1:e.deviceId>t.deviceId?-1:0)}))}handleDeviceChangeEvent(){for(const e of this.deviceChangeListeners)i.default.nextTick(()=>{if(this.deviceChangeListeners.has(e)){const t=new Event("devicechange");"function"==typeof e?e(t):e.handleEvent(t)}})}}t.default=o,o.INTERVAL_MS=1e3},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){this.tileId=null,this.localTile=!1,this.localTileStarted=!1,this.isContent=!1,this.active=!1,this.paused=!1,this.poorConnection=!1,this.boundAttendeeId=null,this.boundExternalUserId=null,this.boundVideoStream=null,this.boundVideoElement=null,this.nameplate=null,this.videoStreamContentWidth=null,this.videoStreamContentHeight=null,this.videoElementCSSWidthPixels=null,this.videoElementCSSHeightPixels=null,this.devicePixelRatio=0,this.videoElementPhysicalWidthPixels=null,this.videoElementPhysicalHeightPixels=null,this.streamId=null}clone(){const e=new r;return e.tileId=this.tileId,e.localTile=this.localTile,e.isContent=this.isContent,e.active=this.active,e.paused=this.paused,e.poorConnection=this.poorConnection,e.boundAttendeeId=this.boundAttendeeId,e.boundExternalUserId=this.boundExternalUserId,e.boundVideoStream=this.boundVideoStream,e.boundVideoElement=this.boundVideoElement,e.nameplate=this.nameplate,e.videoStreamContentWidth=this.videoStreamContentWidth,e.videoStreamContentHeight=this.videoStreamContentHeight,e.videoElementCSSWidthPixels=this.videoElementCSSWidthPixels,e.videoElementCSSHeightPixels=this.videoElementCSSHeightPixels,e.devicePixelRatio=this.devicePixelRatio,e.videoElementPhysicalWidthPixels=this.videoElementPhysicalWidthPixels,e.videoElementPhysicalHeightPixels=this.videoElementPhysicalHeightPixels,e.streamId=this.streamId,e}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAudioTransformDevice=void 0,t.isAudioTransformDevice=function(e){return!!e&&"object"==typeof e&&"mute"in e&&"stop"in e&&"intrinsicDevice"in e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.groupId=""}matchesConstraints(e){return JSON.stringify(this.constraints)===JSON.stringify(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(233);class i extends r.default{constructor(e){super(e)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(233);class i extends r.default{constructor(e){super(e)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(233);class i extends r.default{constructor(e,t){super(e),this.constraint=t}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(233);class i extends r.default{constructor(e){super(e)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n,r){this.videoWidth=e,this.videoHeight=t,this.videoFrameRate=n,this.videoMaxBandwidthKbps=r}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(101);class a extends i.default{constructor(e){super(e.logger),this.context=e,this.taskName="CreatePeerConnectionTask",this.removeTrackAddedEventListener=null,this.removeTrackRemovedEventListeners={},this.trackEvents=["ended","mute","unmute","isolationchange","overconstrained"],this.removeVideoTrackEventListeners={},this.trackAddedHandler=e=>{const t=e.track;if(this.context.logger.info(`received track event: kind=${t.kind} id=${t.id} label=${t.label}`),e.transceiver&&"inactive"===e.transceiver.currentDirection)return;if(0===e.streams.length)return void this.context.logger.warn("Track event but no stream");const n=e.streams[0];"audio"===t.kind?this.context.audioMixController.bindAudioStream(n):"video"!==t.kind||this.trackIsVideoInput(t)||this.addRemoteVideoTrack(t,n)}}removeObserver(){this.removeTrackAddedEventListener&&this.removeTrackAddedEventListener();for(const e in this.removeTrackRemovedEventListeners)this.removeTrackRemovedEventListeners[e]()}addPeerConnectionEventLogger(){const e=this.context.peer;e.addEventListener("connectionstatechange",()=>{this.context.logger.info(`peer connection state changed: ${e.connectionState}`)}),e.addEventListener("negotiationneeded",()=>{this.context.logger.info("peer connection negotiation is needed")}),e.addEventListener("icegatheringstatechange",()=>{this.context.logger.info(`peer connection ice gathering state changed: ${e.iceGatheringState}`)}),e.addEventListener("icecandidate",e=>{this.context.logger.info(`peer connection ice candidate: ${e.candidate?e.candidate.candidate:"(null)"}`)}),e.addEventListener("iceconnectionstatechange",()=>{this.context.logger.info(`peer connection ice connection state changed: ${e.iceConnectionState}`)})}run(){return r(this,void 0,void 0,(function*(){this.context.removableObservers.push(this);const e=this.context.turnCredentials&&this.context.turnCredentials.uris.length>0?{iceServers:[{urls:this.context.turnCredentials.uris,username:this.context.turnCredentials.username,credential:this.context.turnCredentials.password,credentialType:"password"}],iceTransportPolicy:"relay"}:{};e.bundlePolicy=this.context.browserBehavior.requiresBundlePolicy(),e.sdpSemantics=this.context.browserBehavior.requiresUnifiedPlan()?"unified-plan":"plan-b",this.logger.info(`SDP semantics are ${e.sdpSemantics}`);const t={optional:[{googCpuOveruseDetection:!1},{googCombinedAudioVideoBwe:!0}]};this.context.peer?this.context.logger.info("reusing peer connection"):(this.context.logger.info("creating new peer connection"),this.context.peer=new RTCPeerConnection(e,t),this.addPeerConnectionEventLogger()),this.removeTrackAddedEventListener=()=>{this.context.peer&&this.context.peer.removeEventListener("track",this.trackAddedHandler),this.removeTrackAddedEventListener=null},this.context.peer.addEventListener("track",this.trackAddedHandler)}))}trackIsVideoInput(e){if(this.context.transceiverController.useTransceivers())return this.logger.debug(()=>"getting video track type (unified-plan)"),this.context.transceiverController.trackIsVideoInput(e);if(this.logger.debug(()=>"getting video track type (plan-b)"),this.context.activeVideoInput){const t=this.context.activeVideoInput.getVideoTracks();if(t&&t.length>0&&t[0].id===e.id)return!0}return!1}addRemoteVideoTrack(e,t){var n;let r=t.id;this.context.browserBehavior.requiresUnifiedPlan()||(t=new MediaStream([e]),r=e.id);const i=this.context.videoStreamIndex.attendeeIdForTrack(r);let a,o;if(this.context.videoTileController.getVideoTileForAttendeeId?(o=this.context.videoTileController.getVideoTileForAttendeeId(i),a=!!(null===(n=null==o?void 0:o.state())||void 0===n?void 0:n.boundVideoStream)):a=this.context.videoTileController.haveVideoTileForAttendeeId(i),a)return void this.context.logger.info(`Not adding remote track. Already have tile for attendeeId:  ${i}`);o||(o=this.context.videoTileController.addVideoTile(),this.logger.info(`Created video tile ${o.id()}`));let s,l,c=this.context.videoStreamIndex.streamIdForTrack(r);void 0===c&&(this.logger.warn(`stream not found for tile=${o.id()} track=${r}`),c=null);for(let n=0;n<this.trackEvents.length;n++){const r=this.trackEvents[n],i=t.getVideoTracks();if(i&&i.length){const t=i[0],n=()=>{this.context.logger.info(`received the ${r} event for tile=${o.id()} id=${e.id} streamId=${c}`),"ended"===r&&this.context.browserBehavior.requiresUnifiedPlan()&&this.removeRemoteVideoTrack(e,o.state())};t.addEventListener(r,n),this.removeVideoTrackEventListeners[e.id]||(this.removeVideoTrackEventListeners[e.id]=[]),this.removeVideoTrackEventListeners[e.id].push(()=>{t.removeEventListener(r,n)})}}if(e.getSettings){const t=e.getSettings();s=t.width,l=t.height}else{const t=e.getCapabilities();s=t.width,l=t.height}const u=this.context.videoStreamIndex.externalUserIdForTrack(r);o.bindVideoStream(i,!1,t,s,l,c,u),this.logger.info(`video track added, use tile=${o.id()} track=${r} streamId=${c}`);let d="removetrack",h=t;this.context.browserBehavior.requiresUnifiedPlan()||(this.logger.debug(()=>"updating end event and target track (plan-b)"),d="ended",h=e);const f=()=>this.removeRemoteVideoTrack(e,o.state());this.removeTrackRemovedEventListeners[e.id]=()=>{h.removeEventListener(d,f),delete this.removeTrackRemovedEventListeners[e.id]},h.addEventListener(d,f)}removeRemoteVideoTrack(e,t){if(this.removeTrackRemovedEventListeners.hasOwnProperty(e.id)){this.removeTrackRemovedEventListeners[e.id]();for(const t of this.removeVideoTrackEventListeners[e.id])t();delete this.removeVideoTrackEventListeners[e.id]}this.logger.info(`video track ended, removing tile=${t.tileId} id=${e.id} stream=${t.streamId}`),t.streamId?this.context.videosPaused.remove(t.streamId):this.logger.warn(`no stream found for tile=${t.tileId}`),this.context.videoTileController.removeVideoTile(t.tileId)}}t.default=a,a.REMOVE_HANDLER_INTERVAL_MS=1e4},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(183),a=n(309),o=n(101);class s extends o.default{constructor(e){super(e.logger),this.context=e,this.taskName="CreateSDPTask"}cancel(){if(this.cancelPromise){const e=new Error(`canceling ${this.name()}`);this.cancelPromise(e),delete this.cancelPromise}}sessionUsesAudio(){var e,t;return!!(null===(t=null===(e=this.context.meetingSessionConfiguration)||void 0===e?void 0:e.urls)||void 0===t?void 0:t.audioHostURL)}sessionUsesVideo(){let e;e=this.context.transceiverController.useTransceivers()?this.context.transceiverController.hasVideoInput():this.context.videoTileController.hasStartedLocalVideoTile();const t=!!this.context.videosToReceive&&!this.context.videosToReceive.empty(),n=e||t;return this.context.logger.info(`uses video: ${n} (enabled: true, sending: ${e}, receiving: ${t})`),n}run(){return r(this,void 0,void 0,(function*(){const e={offerToReceiveAudio:this.sessionUsesAudio(),offerToReceiveVideo:this.sessionUsesVideo()};this.logger.info(`peer connection offerOptions: ${JSON.stringify(e)}`),yield new Promise((t,n)=>r(this,void 0,void 0,(function*(){this.cancelPromise=e=>{n(e)};try{if(this.context.sdpOfferInit=yield this.context.peer.createOffer(e),this.context.logger.info("peer connection created offer"),this.context.previousSdpOffer&&new a.default(this.context.sdpOfferInit.sdp).videoSendSectionHasDifferentSSRC(this.context.previousSdpOffer)){const e=new Error(`canceling ${this.name()} due to the meeting status code: ${i.default.IncompatibleSDP}`);return this.context.previousSdpOffer=null,void n(e)}t()}catch(e){n(e)}finally{delete this.cancelPromise}})))}))}}t.default=s},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SDPCandidateType=void 0,function(e){e.Host="host",e.ServerReflexive="srflx",e.PeerReflexive="prflx",e.Relay="relay"}(r=t.SDPCandidateType||(t.SDPCandidateType={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n,r,i,a){this.timestampMs=e,this.topic=t,this.data=n,this.senderAttendeeId=r,this.senderExternalUserId=i,this.throttled=!!a}text(){return(new TextDecoder).decode(this.data)}json(){return JSON.parse((new TextDecoder).decode(this.data))}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(211);t.default=class{constructor(e,t,n,r=1e3,i=200){this.realtimeController=e,this.selfAttendeeId=t,this.hasBandwidthPriorityCallback=n,this.waitIntervalMs=r,this.updateIntervalMs=i,this.speakerScores={},this.speakerMuteState={},this.detectorCallbackToHandler=new Map,this.detectorCallbackToScoresTimer=new Map,this.detectorCallbackToActivityTimer=new Map,this.hasBandwidthPriority=!1,this.mostRecentUpdateTimestamp={}}needUpdate(e){return!this.activeSpeakers||(0===this.speakerScores[e]&&this.activeSpeakers.includes(e)||this.speakerScores[e]>0&&!this.activeSpeakers.includes(e))}updateActiveSpeakers(e,t,n){if(!this.needUpdate(n))return;const r=[],i=Object.keys(this.speakerScores);for(let e=0;e<i.length;e++){const t=i[e];r.push({attendeeId:t,activeScore:this.speakerScores[t]})}const a=r.sort((e,t)=>t.activeScore-e.activeScore).filter((function(e){return e.activeScore>0})).map((function(e){return e.attendeeId}));this.activeSpeakers=a,t(a);const o=a.length>0&&a[0]===this.selfAttendeeId&&e.prioritizeVideoSendBandwidthForActiveSpeaker();this.hasBandwidthPriority!==o&&(this.hasBandwidthPriority=o,this.hasBandwidthPriorityCallback(o))}updateScore(e,t,n,r,i){const a=e.calculateScore(n,r,i);this.speakerScores[n]!==a&&(this.speakerScores[n]=a,this.mostRecentUpdateTimestamp[n]=Date.now(),this.updateActiveSpeakers(e,t,n))}subscribe(e,t,n,r){const a=(n,r)=>{if(!r)return this.speakerScores[n]=0,this.mostRecentUpdateTimestamp[n]=Date.now(),void this.updateActiveSpeakers(e,t,n);this.realtimeController.realtimeSubscribeToVolumeIndicator(n,(n,r,i,a)=>{this.mostRecentUpdateTimestamp[n]=Date.now(),null!==i&&(this.speakerMuteState[n]=i),this.updateScore(e,t,n,r,i)})};this.detectorCallbackToHandler.set(t,a);const o=new i.default(this.updateIntervalMs);if(o.start(()=>{for(const n in this.speakerScores)Date.now()-this.mostRecentUpdateTimestamp[n]>this.waitIntervalMs&&this.updateScore(e,t,n,0,this.speakerMuteState[n])}),this.detectorCallbackToActivityTimer.set(t,o),n&&r){const e=new i.default(r);e.start(()=>{n(this.speakerScores)}),this.detectorCallbackToScoresTimer.set(t,e)}this.realtimeController.realtimeSubscribeToAttendeeIdPresence(a)}unsubscribe(e){const t=this.detectorCallbackToHandler.get(e);this.detectorCallbackToHandler.delete(e),t&&this.realtimeController.realtimeUnsubscribeToAttendeeIdPresence(t);const n=this.detectorCallbackToActivityTimer.get(e);n&&(n.stop(),this.detectorCallbackToActivityTimer.delete(e));const r=this.detectorCallbackToScoresTimer.get(e);r&&(r.stop(),this.detectorCallbackToHandler.delete(e))}destroy(){return r(this,void 0,void 0,(function*(){for(const e of this.detectorCallbackToHandler.values())this.realtimeController.realtimeUnsubscribeToAttendeeIdPresence(e);for(const e of this.detectorCallbackToActivityTimer.values())e.stop();for(const e of this.detectorCallbackToScoresTimer.values())e.stop();this.detectorCallbackToHandler.clear(),this.detectorCallbackToActivityTimer.clear(),this.detectorCallbackToScoresTimer.clear()}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(158);t.default=class{constructor(e,t,n,r,i,a){this.audioVideoController=e,this.realtimeController=t,this.videoTileController=n,this.connectionHealthData=r,this.pingPong=i,this.statsCollector=a,this.isActive=!1,this.hasSeenValidPacketMetricsBefore=!1,this.lastAvailableSendBandwidthKbps=0,this.lastAvailableRecvBandwidthKbps=0,this.realtimeController.realtimeSubscribeToLocalSignalStrengthChange(e=>{this.isActive&&this.receiveSignalStrengthChange(e)})}start(){this.isActive=!0,this.pingPong.addObserver(this),this.pingPong.start(),this.audioVideoController.addObserver(this)}stop(){this.isActive=!1,this.pingPong.removeObserver(this),this.pingPong.stop(),this.audioVideoController.removeObserver(this)}receiveSignalStrengthChange(e){0===e?this.connectionHealthData.setLastNoSignalTimestampMs(Date.now()):e<=.5?this.connectionHealthData.setLastWeakSignalTimestampMs(Date.now()):this.connectionHealthData.setLastGoodSignalTimestampMs(Date.now()),this.updateConnectionHealth()}didReceivePong(e,t,n){this.connectionHealthData.setConsecutiveMissedPongs(0),this.statsCollector.logLatency("ping_pong",t),this.statsCollector.logLatency("ping_pong_clock_skew",n),this.updateConnectionHealth()}didMissPongs(){this.connectionHealthData.setConsecutiveMissedPongs(this.connectionHealthData.consecutiveMissedPongs+1),this.updateConnectionHealth()}metricsDidReceive(e){let t=0,n=0;const r=e.getObservableMetrics(),i=r.audioPacketsReceived,a=r.audioPacketsReceivedFractionLoss;let o=0;const s=r.videoPacketSentPerSecond,l=r.videoUpstreamBitrate,c=r.availableSendBandwidth||r.availableOutgoingBitrate,u=r.availableReceiveBandwidth||r.availableIncomingBitrate,d=r.audioSpeakerDelayMs,h=r.nackCountReceivedPerSecond||r.googNackCountReceivedPerSecond;"number"!=typeof c||isNaN(c)||this.updateAvailableSendBandwidth(c/1e3,h),"number"!=typeof u||isNaN(u)||this.updateAvailableReceiveBandwidth(u/1e3),"number"!=typeof l||isNaN(l)||(o=l/1e3),"number"!=typeof d||isNaN(d)||this.connectionHealthData.setAudioSpeakerDelayMs(d),this.monitorVideoUplinkHealth(o,s),"number"==typeof i&&"number"==typeof a&&(t=i,n=a,t<0||n<0||(this.addToMinuteWindow(this.connectionHealthData.packetsReceivedInLastMinute,t),this.addToMinuteWindow(this.connectionHealthData.fractionPacketsLostInboundInLastMinute,n),t>0?(this.hasSeenValidPacketMetricsBefore=!0,this.connectionHealthData.setConsecutiveStatsWithNoPackets(0)):this.hasSeenValidPacketMetricsBefore&&this.connectionHealthData.setConsecutiveStatsWithNoPackets(this.connectionHealthData.consecutiveStatsWithNoPackets+1),(0===t||n>0)&&this.connectionHealthData.setLastPacketLossInboundTimestampMs(Date.now()),this.updateConnectionHealth()))}addToMinuteWindow(e,t){e.unshift(t),e.length>60&&e.pop()}updateAvailableSendBandwidth(e,t){if(e!==this.lastAvailableSendBandwidthKbps){if(0===this.lastAvailableSendBandwidthKbps)return void(this.lastAvailableSendBandwidthKbps=e);const n=this.lastAvailableSendBandwidthKbps;this.lastAvailableSendBandwidthKbps=e,this.audioVideoController.forEachObserver(i=>{r.default.of(i.videoSendBandwidthDidChange).map(r=>r.bind(i)(e,n,t))})}}updateAvailableReceiveBandwidth(e){if(e!==this.lastAvailableRecvBandwidthKbps){if(0===this.lastAvailableRecvBandwidthKbps)return void(this.lastAvailableRecvBandwidthKbps=e);const t=this.lastAvailableRecvBandwidthKbps;this.lastAvailableRecvBandwidthKbps=e,this.audioVideoController.forEachObserver(n=>{r.default.of(n.videoReceiveBandwidthDidChange).map(r=>r.bind(n)(e,t))})}}updateConnectionHealth(){this.audioVideoController.forEachObserver(e=>{r.default.of(e.connectionHealthDidChange).map(t=>t.bind(e)(this.connectionHealthData.clone()))})}monitorVideoUplinkHealth(e,t){this.videoTileController.hasStartedLocalVideoTile()&&this.audioVideoController.forEachObserver(n=>{r.default.of(n.videoSendHealthDidChange).map(r=>r.bind(n)(e,t))})}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(837),a=n(212),o=n(1366);class s{constructor(e,t){var n,r,a,o,l,c,u;this.audioVideoController=e,this.eventReporter=t,this.meetingHistoryStates=[];try{this.parserResult=navigator&&navigator.userAgent?new i.UAParser(navigator.userAgent).getResult():null}catch(t){e.logger.error(t.message)}this.browserMajorVersion=(null===(a=null===(r=null===(n=this.parserResult)||void 0===n?void 0:n.browser)||void 0===r?void 0:r.version)||void 0===a?void 0:a.split(".")[0])||s.UNAVAILABLE,this.browserName=(null===(o=this.parserResult)||void 0===o?void 0:o.browser.name)||s.UNAVAILABLE,this.browserVersion=(null===(l=this.parserResult)||void 0===l?void 0:l.browser.version)||s.UNAVAILABLE,this.deviceName=[(null===(c=this.parserResult)||void 0===c?void 0:c.device.vendor)||"",(null===(u=this.parserResult)||void 0===u?void 0:u.device.model)||""].join(" ").trim()||s.UNAVAILABLE}publishEvent(e,t){return r(this,void 0,void 0,(function*(){const n=Date.now();this.meetingHistoryStates.push({name:e,timestampMs:n});const r=Object.freeze(Object.assign(this.getAttributes(n),t));this.audioVideoController.forEachObserver(t=>{t.eventDidReceive&&t.eventDidReceive(e,r)}),this.reportEvent(e,n,t)}))}reportEvent(e,t,n){var i;return r(this,void 0,void 0,(function*(){let r;try{n&&(r=o.default(n)),yield null===(i=this.eventReporter)||void 0===i?void 0:i.reportEvent(t,e,r)}catch(e){this.audioVideoController.logger.error(`Error reporting event ${e}`)}}))}pushMeetingState(e,t=Date.now()){return r(this,void 0,void 0,(function*(){this.meetingHistoryStates.push({name:e,timestampMs:t}),this.reportEvent(e,t)}))}getAttributes(e){var t,n;return{attendeeId:this.audioVideoController.configuration.credentials.attendeeId,browserMajorVersion:this.browserMajorVersion,browserName:this.browserName,browserVersion:this.browserVersion,deviceName:this.deviceName,externalMeetingId:"string"==typeof this.audioVideoController.configuration.externalMeetingId?this.audioVideoController.configuration.externalMeetingId:"",externalUserId:this.audioVideoController.configuration.credentials.externalUserId,meetingHistory:this.meetingHistoryStates,meetingId:this.audioVideoController.configuration.meetingId,osName:(null===(t=this.parserResult)||void 0===t?void 0:t.os.name)||s.UNAVAILABLE,osVersion:(null===(n=this.parserResult)||void 0===n?void 0:n.os.version)||s.UNAVAILABLE,sdkVersion:a.default.sdkVersion,sdkName:a.default.sdkName,timestampMs:e}}}t.default=s,s.UNAVAILABLE="Unavailable"},function(e,t,n){var r;
/*!@license
 * UAParser.js v0.7.28
 * Lightweight JavaScript-based User-Agent string parser
 * https://github.com/faisalman/ua-parser-js
 *
 * Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
 * Licensed under MIT License
 */!function(i,a){"use strict";var o="model",s="name",l="type",c="vendor",u="version",d="mobile",h="tablet",f="smarttv",p={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e,t){return e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),void 0===t?e:e.substring(0,255)}},m={rgx:function(e,t){for(var n,r,i,a,o,s,l=0;l<t.length&&!o;){var c=t[l],u=t[l+1];for(n=r=0;n<c.length&&!o;)if(o=c[n++].exec(e))for(i=0;i<u.length;i++)s=o[++r],"object"==typeof(a=u[i])&&a.length>0?2==a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,s):this[a[0]]=a[1]:3==a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=s?s.replace(a[1],a[2]):void 0:this[a[0]]=s?a[1].call(this,s,a[2]):void 0:4==a.length&&(this[a[0]]=s?a[3].call(this,s.replace(a[1],a[2])):void 0):this[a]=s||void 0;l+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(p.has(t[n][r],e))return"?"===n?void 0:n}else if(p.has(t[n],e))return"?"===n?void 0:n;return e}},g={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},v={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[s,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[s,u],[/opios[\/\s]+([\w\.]+)/i],[u,[s,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[u,[s,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[s,u],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[u,[s,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[u,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[u,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[s,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[u,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[u,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],u],[/focus\/([\w\.]+)/i],[u,[s,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[u,[s,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[u,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[s,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[u,[s,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[u,[s,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],u],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[s,u],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[s],[/;fbav\/([\w\.]+);/i],[u,[s,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[s,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[s,u],[/\bgsa\/([\w\.]+)\s.*safari\//i],[u,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[u,[s,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],u],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[u,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[s,u],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[u,[s,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[u,s],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[s,[u,m.str,g.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[s,u],[/(navigator|netscape)\/([\w\.-]+)/i],[[s,"Netscape"],u],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[u,[s,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[s,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",p.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",p.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",p.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[o,[c,"Samsung"],[l,h]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[o,[c,"Samsung"],[l,d]],[/\((ip(?:hone|od)[\s\w]*);/i],[o,[c,"Apple"],[l,d]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[c,"Apple"],[l,h]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[o,[c,"Huawei"],[l,h]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[o,[c,"Huawei"],[l,d]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[o,/_/g," "],[c,"Xiaomi"],[l,d]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[o,/_/g," "],[c,"Xiaomi"],[l,h]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[o,[c,"OPPO"],[l,d]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[o,[c,"Vivo"],[l,d]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[o,[c,"Realme"],[l,d]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[o,[c,"Motorola"],[l,d]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[o,[c,"Motorola"],[l,h]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[o,[c,"LG"],[l,h]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[o,[c,"LG"],[l,d]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[o,[c,"Lenovo"],[l,h]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[o,/_/g," "],[c,"Nokia"],[l,d]],[/droid.+;\s(pixel\sc)[\s)]/i],[o,[c,"Google"],[l,h]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[o,[c,"Google"],[l,d]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[c,"Sony"],[l,d]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[o,"Xperia Tablet"],[c,"Sony"],[l,h]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[o,[c,"OnePlus"],[l,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[o,[c,"Amazon"],[l,h]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[o,"Fire Phone"],[c,"Amazon"],[l,d]],[/\((playbook);[\w\s\),;-]+(rim)/i],[o,c,[l,h]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[o,[c,"BlackBerry"],[l,d]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[o,[c,"ASUS"],[l,h]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[o,[c,"ASUS"],[l,d]],[/(nexus\s9)/i],[o,[c,"HTC"],[l,h]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[c,[o,/_/g," "],[l,d]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[o,[c,"Acer"],[l,h]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[o,[c,"Meizu"],[l,d]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[c,o,[l,d]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[c,o,[l,h]],[/\s(surface\sduo)\s/i],[o,[c,"Microsoft"],[l,h]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[o,[c,"Fairphone"],[l,d]],[/\s(u304aa)\sbuild/i],[o,[c,"AT&T"],[l,d]],[/sie-(\w*)/i],[o,[c,"Siemens"],[l,d]],[/[;\/]\s?(rct\w+)\sbuild/i],[o,[c,"RCA"],[l,h]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[o,[c,"Dell"],[l,h]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[o,[c,"Verizon"],[l,h]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[o,[c,"Barnes & Noble"],[l,h]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[o,[c,"NuVision"],[l,h]],[/;\s(k88)\sbuild/i],[o,[c,"ZTE"],[l,h]],[/;\s(nx\d{3}j)\sbuild/i],[o,[c,"ZTE"],[l,d]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[o,[c,"Swiss"],[l,d]],[/[;\/]\s?(zur\d{3})\sbuild/i],[o,[c,"Swiss"],[l,h]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[o,[c,"Zeki"],[l,h]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[c,"Dragon Touch"],o,[l,h]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[o,[c,"Insignia"],[l,h]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[o,[c,"NextBook"],[l,h]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[c,"Voice"],o,[l,d]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[c,"LvTel"],o,[l,d]],[/;\s(ph-1)\s/i],[o,[c,"Essential"],[l,d]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[o,[c,"Envizen"],[l,h]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[o,[c,"MachSpeed"],[l,h]],[/[;\/]\s?tu_(1491)\sbuild/i],[o,[c,"Rotor"],[l,h]],[/(shield[\w\s]+)\sbuild/i],[o,[c,"Nvidia"],[l,h]],[/(sprint)\s(\w+)/i],[c,o,[l,d]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[c,"Microsoft"],[l,d]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[c,"Zebra"],[l,h]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[c,"Zebra"],[l,d]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[c,o,[l,"console"]],[/droid.+;\s(shield)\sbuild/i],[o,[c,"Nvidia"],[l,"console"]],[/(playstation\s[345portablevi]+)/i],[o,[c,"Sony"],[l,"console"]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[o,[c,"Microsoft"],[l,"console"]],[/smart-tv.+(samsung)/i],[c,[l,f]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[c,"Samsung"],[l,f]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[c,"LG"],[l,f]],[/(apple)\s?tv/i],[c,[o,"Apple TV"],[l,f]],[/crkey/i],[[o,"Chromecast"],[c,"Google"],[l,f]],[/droid.+aft([\w])(\sbuild\/|\))/i],[o,[c,"Amazon"],[l,f]],[/\(dtv[\);].+(aquos)/i],[o,[c,"Sharp"],[l,f]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[c,p.trim],[o,p.trim],[l,f]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[l,f]],[/((pebble))app\/[\d\.]+\s/i],[c,o,[l,"wearable"]],[/droid.+;\s(glass)\s\d/i],[o,[c,"Google"],[l,"wearable"]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[o,[c,"Zebra"],[l,"wearable"]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[c,[l,"embedded"]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[o,[l,d]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[o,[l,h]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[l,p.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[o,[c,"Generic"]],[/(phone)/i],[[l,d]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[u,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[s,u],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,s]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[s,u],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[s,[u,m.str,g.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[s,"Windows"],[u,m.str,g.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[s,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[s,"Mac OS"],[u,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[s,u],[/\(bb(10);/i],[u,[s,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[u,[s,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[u,[s,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[s,"Chromium OS"],u],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[s,u],[/(sunos)\s?([\w\.\d]*)/i],[[s,"Solaris"],u],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[s,u]]},b=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof b))return new b(e,t).getResult();var n=e||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?p.extend(v,t):v;return this.getBrowser=function(){var e={name:void 0,version:void 0};return m.rgx.call(e,n,r.browser),e.major=p.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return m.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return m.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return m.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return m.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n="string"==typeof e&&e.length>255?p.trim(e,255):e,this},this.setUA(n),this};b.VERSION="0.7.28",b.BROWSER={NAME:s,MAJOR:"major",VERSION:u},b.CPU={ARCHITECTURE:"architecture"},b.DEVICE={MODEL:o,VENDOR:c,TYPE:l,CONSOLE:"console",MOBILE:d,SMARTTV:f,TABLET:h,WEARABLE:"wearable",EMBEDDED:"embedded"},b.ENGINE={NAME:s,VERSION:u},b.OS={NAME:s,VERSION:u},void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=b),t.UAParser=b):void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r);var y=void 0!==i&&(i.jQuery||i.Zepto);if(y&&!y.ua){var A=new b;y.ua=A.getResult(),y.ua.get=function(){return A.getUA()},y.ua.set=function(e){A.setUA(e);var t=A.getResult();for(var n in t)y.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t,n){"use strict";e.exports=d;var r,i=n(234),a=i.LongBits,o=i.base64,s=i.utf8;function l(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function c(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new l(c,0,0),this.tail=this.head,this.states=null}function h(e,t,n){t[n]=255&e}function f(e,t){this.len=e,this.next=void 0,this.val=t}function p(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function m(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}d.create=i.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d},d.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(d.alloc=i.pool(d.alloc,i.Array.prototype.subarray)),d.prototype._push=function(e,t,n){return this.tail=this.tail.next=new l(e,t,n),this.len+=t,this},f.prototype=Object.create(l.prototype),f.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(p,10,a.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=a.from(e);return this._push(p,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=a.from(e).zzEncode();return this._push(p,t.length(),t)},d.prototype.bool=function(e){return this._push(h,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=a.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var g=i.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};d.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(i.isString(e)){var n=d.alloc(t=o.length(e));o.decode(e,n,0),e=n}return this.uint32(t)._push(g,t,e)},d.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(h,1,0)},d.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new l(c,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(c,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},d._configure=function(e){r=e}},function(e,t,n){"use strict";e.exports=l;var r,i=n(234),a=i.LongBits,o=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function d(){var e=new a(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw s(this,8);return new a(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=i.Buffer?function(e){return(l.create=function(e){return i.Buffer.isBuffer(e)?new r(e):u(e)})(e)}:u,l.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,l.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return c}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},l.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){r=e;var t=i.Long?"toLong":"toNumber";i.merge(l.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(158),i=n(182),a=n(211),o=n(146),s=n(133);t.default=class{constructor(e,t,n){this.signalingClient=e,this.intervalMs=t,this.logger=n,this.observerQueue=new Set,this.consecutivePongsUnaccountedFor=0,this.intervalScheduler=new a.default(this.intervalMs),this.pingId=0}addObserver(e){this.logger.info("adding a ping-pong observer"),this.observerQueue.add(e)}removeObserver(e){this.logger.info("removing a ping-pong observer"),this.observerQueue.delete(e)}forEachObserver(e){for(const t of this.observerQueue)i.default.nextTick(()=>{this.observerQueue.has(t)&&e(t)})}start(){this.stop(),this.signalingClient.registerObserver(this),this.signalingClient.ready()&&this.startPingInterval()}stop(){this.stopPingInterval(),this.signalingClient.removeObserver(this)}startPingInterval(){this.intervalScheduler.start(()=>{this.ping()}),this.ping()}stopPingInterval(){this.intervalScheduler.stop(),this.pingId=0,this.consecutivePongsUnaccountedFor=0}ping(){this.consecutivePongsUnaccountedFor>0&&(this.logger.warn(`missed pong ${this.consecutivePongsUnaccountedFor} time(s)`),this.forEachObserver(e=>{r.default.of(e.didMissPongs).map(t=>t.bind(e)(this.consecutivePongsUnaccountedFor))})),this.consecutivePongsUnaccountedFor+=1,this.pingId=this.pingId+1&4294967295;const e=s.SdkPingPongFrame.create();e.pingId=this.pingId,e.type=s.SdkPingPongType.PING,this.pingTimestampLocalMs=this.signalingClient.pingPong(e),this.logger.debug(()=>`sent ping ${this.pingId}`)}pong(e){const t=s.SdkPingPongFrame.create();t.pingId=e,t.type=s.SdkPingPongType.PONG,this.signalingClient.pingPong(t)}handleSignalingClientEvent(e){switch(e.type){case o.default.WebSocketOpen:this.startPingInterval();break;case o.default.WebSocketFailed:case o.default.WebSocketError:this.logger.warn(`stopped pinging (${o.default[e.type]})`),this.stopPingInterval();break;case o.default.WebSocketClosing:case o.default.WebSocketClosed:this.logger.info(`stopped pinging (${o.default[e.type]})`),this.stopPingInterval();break;case o.default.ReceivedSignalFrame:if(e.message.type!==s.SdkSignalFrame.Type.PING_PONG)break;if(e.message.pingPong.type===s.SdkPingPongType.PONG){const t=e.message.pingPong.pingId;if(t!==this.pingId){this.logger.warn(`unexpected ping id ${t} (expected ${this.pingId})`);break}let n;if(this.consecutivePongsUnaccountedFor=0,"number"!=typeof e.message.timestampMs)break;n=e.message.timestampMs,this.logger.debug(()=>`received pong ${t} with timestamp ${n}`);const i=e.timestampMs-this.pingTimestampLocalMs,a=Math.round(n-i/2),o=this.pingTimestampLocalMs-a;this.logger.info(`local clock skew estimate=${o}ms from ping-pong time=${i}ms`),this.forEachObserver(e=>{r.default.of(e.didReceivePong).map(n=>n.bind(e)(t,o,i))})}else this.pong(e.message.pingPong.pingId)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(842),i=n(847),a=n(848);t.default=class{constructor(e){this.state=new i.default,this._transcriptionController=e||new r.default(this)}realtimeSetLocalAttendeeId(e,t){this.state.localAttendeeId=e,this.state.localExternalUserId=t}realtimeSetAttendeeIdPresence(e,t,n,r,i){try{t&&(this.state.attendeeIdToExternalUserId[e]=n);for(const a of this.state.attendeeIdChangesCallbacks)a(e,t,n,r,i)}catch(e){this.onError(e)}}realtimeSubscribeToAttendeeIdPresence(e){try{this.state.attendeeIdChangesCallbacks.push(e)}catch(e){this.onError(e)}}realtimeUnsubscribeToAttendeeIdPresence(e){try{const t=this.state.attendeeIdChangesCallbacks.indexOf(e);-1!==t&&this.state.attendeeIdChangesCallbacks.splice(t,1)}catch(e){this.onError(e)}}realtimeSetLocalAudioInput(e){try{if(this.state.audioInput===e)return;this.setAudioInputEnabled(!1),this.state.audioInput=e,this.setAudioInputEnabled(!this.state.muted)}catch(e){this.onError(e)}}realtimeSetCanUnmuteLocalAudio(e){try{if(this.state.canUnmute===e)return;this.state.canUnmute=e;for(const t of this.state.setCanUnmuteLocalAudioCallbacks)t(e)}catch(e){this.onError(e)}}realtimeSubscribeToSetCanUnmuteLocalAudio(e){try{this.state.setCanUnmuteLocalAudioCallbacks.push(e)}catch(e){this.onError(e)}}realtimeUnsubscribeToSetCanUnmuteLocalAudio(e){try{const t=this.state.setCanUnmuteLocalAudioCallbacks.indexOf(e);-1!==t&&this.state.setCanUnmuteLocalAudioCallbacks.splice(t,1)}catch(e){this.onError(e)}}realtimeCanUnmuteLocalAudio(){return this.state.canUnmute}realtimeMuteLocalAudio(){if(!this.state.muted)try{this.setAudioInputEnabled(!1),this.state.muted=!0,this.realtimeUpdateVolumeIndicator(this.state.localAttendeeId,null,null,null,this.state.localExternalUserId);for(const e of this.state.muteAndUnmuteLocalAudioCallbacks)e(!0)}catch(e){this.onError(e)}}realtimeUnmuteLocalAudio(){if(!this.state.muted)return!0;if(!this.state.canUnmute)return!1;try{this.setAudioInputEnabled(!0),this.state.muted=!1,this.realtimeUpdateVolumeIndicator(this.state.localAttendeeId,null,null,null,this.state.localExternalUserId);for(const e of this.state.muteAndUnmuteLocalAudioCallbacks)e(!1);return!0}catch(e){return this.onError(e),!1}}realtimeSubscribeToMuteAndUnmuteLocalAudio(e){try{this.state.muteAndUnmuteLocalAudioCallbacks.push(e)}catch(e){this.onError(e)}}realtimeUnsubscribeToMuteAndUnmuteLocalAudio(e){try{const t=this.state.muteAndUnmuteLocalAudioCallbacks.indexOf(e);-1!==t&&this.state.muteAndUnmuteLocalAudioCallbacks.splice(t,1)}catch(e){this.onError(e)}}realtimeIsLocalAudioMuted(){return this.state.muted}realtimeSubscribeToVolumeIndicator(e,t){try{this.state.volumeIndicatorCallbacks.hasOwnProperty(e)||(this.state.volumeIndicatorCallbacks[e]=[]),this.state.volumeIndicatorCallbacks[e].push(t),this.sendVolumeIndicatorChange(e,!0,!0,!0,this.state.attendeeIdToExternalUserId[e])}catch(e){this.onError(e)}}realtimeUnsubscribeFromVolumeIndicator(e,t){try{if(t){const n=this.state.volumeIndicatorCallbacks[e].indexOf(t);-1!==n&&this.state.volumeIndicatorCallbacks[e].splice(n,1)}else delete this.state.volumeIndicatorCallbacks[e]}catch(e){this.onError(e)}}realtimeUpdateVolumeIndicator(e,t,n,r,i){try{n=this.applyLocalMuteOverride(e,n);const a=this.getVolumeIndicatorState(e);let o=!1,s=!1,l=!1;null!==n&&a.muted!==n&&(a.muted=n,s=!0,a.muted&&0!==a.volume&&(a.volume=0,o=!0)),a.muted||null===t||(a.volume!==t&&(a.volume=t,o=!0),null===a.muted&&(a.muted=!1,s=!0)),null!==r&&a.signalStrength!==r&&(a.signalStrength=r,l=!0),this.sendVolumeIndicatorChange(e,o,s,l,i)}catch(e){this.onError(e)}}realtimeSubscribeToLocalSignalStrengthChange(e){try{if(this.state.localSignalStrengthChangeCallbacks.push(e),null===this.state.localAttendeeId)return;this.sendLocalSignalStrengthChange(this.state.localAttendeeId,!0)}catch(e){this.onError(e)}}realtimeUnsubscribeToLocalSignalStrengthChange(e){try{const t=this.state.localSignalStrengthChangeCallbacks.indexOf(e);-1!==t&&this.state.localSignalStrengthChangeCallbacks.splice(t,1)}catch(e){this.onError(e)}}realtimeSubscribeToSendDataMessage(e){try{this.state.sendDataMessageCallbacks.push(e)}catch(e){this.onError(e)}}realtimeUnsubscribeFromSendDataMessage(e){try{const t=this.state.sendDataMessageCallbacks.indexOf(e);-1!==t&&this.state.sendDataMessageCallbacks.splice(t,1)}catch(e){this.onError(e)}}realtimeSendDataMessage(e,t,n){try{for(const r of this.state.sendDataMessageCallbacks)r(e,t,n)}catch(e){this.onError(e)}}realtimeSubscribeToReceiveDataMessage(e,t){try{this.state.receiveDataMessageCallbacks.has(e)?this.state.receiveDataMessageCallbacks.get(e).push(t):this.state.receiveDataMessageCallbacks.set(e,[t])}catch(e){this.onError(e)}}realtimeUnsubscribeFromReceiveDataMessage(e){try{this.state.receiveDataMessageCallbacks.delete(e)}catch(e){this.onError(e)}}realtimeReceiveDataMessage(e){try{if(this.state.receiveDataMessageCallbacks.has(e.topic))for(const t of this.state.receiveDataMessageCallbacks.get(e.topic))t(e)}catch(e){this.onError(e)}}realtimeSubscribeToFatalError(e){try{this.state.fatalErrorCallbacks.push(e)}catch(e){this.onError(e)}}realtimeUnsubscribeToFatalError(e){try{const t=this.state.fatalErrorCallbacks.indexOf(e);-1!==t&&this.state.fatalErrorCallbacks.splice(t,1)}catch(e){this.onError(e)}}get transcriptionController(){return this._transcriptionController}setAudioInputEnabled(e){if(this.state.audioInput)for(const t of this.state.audioInput.getTracks())t.enabled!==e&&(t.enabled=e)}applyLocalMuteOverride(e,t){const n=this.state.localAttendeeId,r=this.state.muted;return e!==n?t:null===this.state.audioInput?t:r}sendVolumeIndicatorChange(e,t,n,r,i){if(this.sendLocalSignalStrengthChange(e,r),!this.state.volumeIndicatorCallbacks.hasOwnProperty(e))return;const o=this.getVolumeIndicatorState(e),s=new a.default;if(t&&(s.volume=o.volume),n&&(s.muted=o.muted),r&&(s.signalStrength=o.signalStrength),!this.stateIsEmpty(s))for(const t of this.state.volumeIndicatorCallbacks[e])t(e,s.volume,s.muted,s.signalStrength,i)}sendLocalSignalStrengthChange(e,t){if(!t)return;if(e!==this.state.localAttendeeId)return;const n=this.getVolumeIndicatorState(e).signalStrength;if(null!==n)for(const e of this.state.localSignalStrengthChangeCallbacks)e(n)}getVolumeIndicatorState(e){return this.state.volumeIndicatorState.hasOwnProperty(e)||(this.state.volumeIndicatorState[e]=new a.default),this.state.volumeIndicatorState[e]}stateIsEmpty(e){return null===e.volume&&null===e.muted&&null===e.signalStrength}onError(e){try{for(const t of this.state.fatalErrorCallbacks)t(e)}catch(t){try{console.error(e),console.error(t)}catch(e){}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TRANSCRIPTION_DATA_MESSAGE_TOPIC=void 0;const r=n(1382);t.TRANSCRIPTION_DATA_MESSAGE_TOPIC="aws:chime:transcription";t.default=class{constructor(e){this.realtimeController=e,this.transcriptEventCallbacks=new Set}subscribeToTranscriptEvent(e){0===this.transcriptEventCallbacks.size&&this.realtimeController.realtimeSubscribeToReceiveDataMessage(t.TRANSCRIPTION_DATA_MESSAGE_TOPIC,e=>{for(const t of r.TranscriptEventConverter.from(e))for(const e of this.transcriptEventCallbacks)e(t)}),this.transcriptEventCallbacks.add(e)}unsubscribeFromTranscriptEvent(e){this.transcriptEventCallbacks.delete(e),0===this.transcriptEventCallbacks.size&&this.realtimeController.realtimeUnsubscribeFromReceiveDataMessage(t.TRANSCRIPTION_DATA_MESSAGE_TOPIC)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.STARTED="started",e.INTERRUPTED="interrupted",e.RESUMED="resumed",e.STOPPED="stopped",e.FAILED="failed"}(r||(r={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.PRONUNCIATION="pronunciation",e.PUNCTUATION="punctuation"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.localAttendeeId=null,this.localExternalUserId=null,this.attendeeIdChangesCallbacks=[],this.canUnmute=!0,this.setCanUnmuteLocalAudioCallbacks=[],this.muted=!1,this.muteAndUnmuteLocalAudioCallbacks=[],this.audioInput=null,this.volumeIndicatorState={},this.attendeeIdToExternalUserId={},this.volumeIndicatorCallbacks={},this.localSignalStrengthChangeCallbacks=[],this.fatalErrorCallbacks=[],this.sendDataMessageCallbacks=[],this.receiveDataMessageCallbacks=new Map}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.volume=null,this.muted=null,this.signalStrength=null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(490),i=n(850),a=n(491),o=n(492);t.default=class{constructor(e){this.logger=e,this.currentState=a.SessionStateControllerState.NotConnected,this.deferredAction=null,this.deferredWork=null}perform(e,t){const n=this.currentState;if(n===a.SessionStateControllerState.NotConnected&&e===r.SessionStateControllerAction.Connect)this.transition(a.SessionStateControllerState.Connecting,e);else if(n===a.SessionStateControllerState.Connecting&&e===r.SessionStateControllerAction.Fail)this.transition(a.SessionStateControllerState.Disconnecting,e);else if(n===a.SessionStateControllerState.Connecting&&e===r.SessionStateControllerAction.FinishConnecting)this.transition(a.SessionStateControllerState.Connected,e);else if(n===a.SessionStateControllerState.Connected&&e===r.SessionStateControllerAction.Disconnect)this.transition(a.SessionStateControllerState.Disconnecting,e);else if(n===a.SessionStateControllerState.Connected&&e===r.SessionStateControllerAction.Reconnect)this.transition(a.SessionStateControllerState.Connecting,e);else if(n===a.SessionStateControllerState.Connected&&e===r.SessionStateControllerAction.Fail)this.transition(a.SessionStateControllerState.Disconnecting,e);else if(n===a.SessionStateControllerState.Connected&&e===r.SessionStateControllerAction.Update)this.transition(a.SessionStateControllerState.Updating,e);else if(n===a.SessionStateControllerState.Updating&&e===r.SessionStateControllerAction.Fail)this.transition(a.SessionStateControllerState.Disconnecting,e);else if(n===a.SessionStateControllerState.Updating&&e===r.SessionStateControllerAction.FinishUpdating)this.transition(a.SessionStateControllerState.Connected,e);else{if(n!==a.SessionStateControllerState.Disconnecting||e!==r.SessionStateControllerAction.FinishDisconnecting)return this.canDefer(e)?(this.logger.info(`deferring transition from ${a.SessionStateControllerState[this.currentState]} with ${r.SessionStateControllerAction[e]}`),this.deferAction(e,t),o.SessionStateControllerTransitionResult.DeferredTransition):(this.logger.warn(`no transition found from ${a.SessionStateControllerState[this.currentState]} with ${r.SessionStateControllerAction[e]}`),o.SessionStateControllerTransitionResult.NoTransitionAvailable);this.transition(a.SessionStateControllerState.NotConnected,e)}try{t()}catch(t){return this.logger.error(`error during state ${a.SessionStateControllerState[this.currentState]} with action ${r.SessionStateControllerAction[e]}: ${t}`),this.logger.info(`rolling back transition to ${a.SessionStateControllerState[n]}`),this.currentState=n,o.SessionStateControllerTransitionResult.TransitionFailed}return this.performDeferredAction(),o.SessionStateControllerTransitionResult.Transitioned}state(){return this.currentState}transition(e,t){this.logger.info(`transitioning from ${a.SessionStateControllerState[this.currentState]} to ${a.SessionStateControllerState[e]} with ${r.SessionStateControllerAction[t]}`),this.currentState=e}deferPriority(e){switch(e){case r.SessionStateControllerAction.Disconnect:return i.SessionStateControllerDeferPriority.VeryHigh;case r.SessionStateControllerAction.Fail:return i.SessionStateControllerDeferPriority.High;case r.SessionStateControllerAction.Reconnect:return i.SessionStateControllerDeferPriority.Medium;case r.SessionStateControllerAction.Update:return i.SessionStateControllerDeferPriority.Low;default:return i.SessionStateControllerDeferPriority.DoNotDefer}}deferAction(e,t){null!==this.deferredAction&&this.deferPriority(this.deferredAction)>this.deferPriority(e)||(this.deferredAction=e,this.deferredWork=t)}canDefer(e){return this.deferPriority(e)!==i.SessionStateControllerDeferPriority.DoNotDefer&&(this.currentState===a.SessionStateControllerState.Connecting||this.currentState===a.SessionStateControllerState.Updating)}performDeferredAction(){if(!this.deferredAction)return;const e=this.deferredAction,t=this.deferredWork;this.deferredAction=null,this.deferredWork=null,this.logger.info(`performing deferred action ${r.SessionStateControllerAction[e]}`),this.perform(e,t)!==o.SessionStateControllerTransitionResult.Transitioned&&this.logger.info(`unable to perform deferred action ${r.SessionStateControllerAction[e]} in state ${a.SessionStateControllerState[this.currentState]}`)}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStateControllerDeferPriority=void 0,function(e){e[e.DoNotDefer=0]="DoNotDefer",e[e.Low=1]="Low",e[e.Medium=2]="Medium",e[e.High=3]="High",e[e.VeryHigh=4]="VeryHigh"}(r=t.SessionStateControllerDeferPriority||(t.SessionStateControllerDeferPriority={})),t.default=r},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const r=n(157),i=n(133),a=n(212),o=n(365),s=n(852),l=n(146);class c{constructor(e,t){this.webSocket=e,this.logger=t,this.unloadHandler=null,this.observerQueue=new Set,this.connectionRequestQueue=[],this.resetConnection(),this.logger.debug(()=>"signaling client init"),this.audioSessionId=this.generateNewAudioSessionId()}registerObserver(e){this.logger.debug(()=>"registering signaling client observer"),this.observerQueue.add(e)}removeObserver(e){this.logger.debug(()=>"removing signaling client observer"),this.observerQueue.delete(e)}openConnection(e){this.logger.info("adding connection request to queue: "+e.url()),this.connectionRequestQueue.push(e),this.closeConnection()}pingPong(e){this.logger.debug(()=>"sending ping");const t=i.SdkSignalFrame.create();return t.type=i.SdkSignalFrame.Type.PING_PONG,t.pingPong=e,this.sendMessage(t),t.timestampMs}join(e){this.logger.info("sending join");const t=i.SdkJoinFrame.create();t.protocolVersion=2,t.maxNumOfVideos=e.maxVideos,t.flags=i.SdkJoinFlags.HAS_STREAM_UPDATE;const n=new r.default;n.supportsSenderSideBandwidthEstimation()&&(t.flags|=i.SdkJoinFlags.USE_SEND_SIDE_BWE),t.flags|=e.sendBitrates?i.SdkJoinFlags.SEND_BITRATES:0,t.clientDetails=i.SdkClientDetails.create({platformName:n.name(),platformVersion:n.version(),clientSource:a.default.sdkName,chimeSdkVersion:a.default.sdkVersion}),t.audioSessionId=this.audioSessionId;const o=i.SdkSignalFrame.create();o.type=i.SdkSignalFrame.Type.JOIN,o.join=t,this.sendMessage(o)}subscribe(e){const t=i.SdkSubscribeFrame.create();if(t.sendStreams=[],t.sdpOffer=e.sdpOffer,e.connectionTypeHasVideo&&(t.receiveStreamIds=e.receiveStreamIds),e.audioHost&&(t.audioCheckin=e.audioCheckin,t.audioHost=e.audioHost,t.audioMuted=e.audioMuted,!e.audioCheckin)){const n=i.SdkStreamDescriptor.create();n.mediaType=i.SdkStreamMediaType.AUDIO,n.trackLabel="AmazonChimeExpressAudio",n.attendeeId=e.attendeeId,n.streamId=1,n.groupId=1,n.framerate=15,n.maxBitrateKbps=600,n.avgBitrateBps=4e5,t.sendStreams.push(n)}if(t.duplex=i.SdkStreamServiceType.RX,e.localVideoEnabled){t.duplex=i.SdkStreamServiceType.DUPLEX;for(let n=0;n<e.videoStreamDescriptions.length;n++){const r=e.videoStreamDescriptions[n].clone();r.attendeeId=e.attendeeId,t.sendStreams.push(r.toStreamDescriptor())}}const n=i.SdkSignalFrame.create();n.type=i.SdkSignalFrame.Type.SUBSCRIBE,n.sub=t,this.sendMessage(n)}remoteVideoUpdate(e,t){const n=i.SdkRemoteVideoUpdateFrame.create();n.addedOrUpdatedVideoSubscriptions=e.map(this.convertVideoSubscriptionConfiguration),n.removedVideoSubscriptionMids=t;const r=i.SdkSignalFrame.create();r.type=i.SdkSignalFrame.Type.REMOTE_VIDEO_UPDATE,r.remoteVideoUpdate=n,this.sendMessage(r)}convertVideoSubscriptionConfiguration(e){const t=new i.SdkVideoSubscriptionConfiguration;return t.mid=e.mid,t.attendeeId=e.attendeeId,t.streamId=e.streamId,t}leave(){const e=i.SdkSignalFrame.create();e.type=i.SdkSignalFrame.Type.LEAVE,e.leave=i.SdkLeaveFrame.create(),this.sendMessage(e),this.logger.debug(()=>"sent leave")}sendClientMetrics(e){const t=i.SdkSignalFrame.create();t.type=i.SdkSignalFrame.Type.CLIENT_METRIC,t.clientMetric=e,this.sendMessage(t)}sendDataMessage(e){const t=i.SdkSignalFrame.create();t.type=i.SdkSignalFrame.Type.DATA_MESSAGE,t.dataMessage=e,this.sendMessage(t)}closeConnection(){this.webSocket.readyState()!==o.default.None&&this.webSocket.readyState()!==o.default.Closed?(this.isClosing=!0,this.sendEvent(new s.default(this,l.default.WebSocketClosing,null)),this.webSocket.close(),this.deactivatePageUnloadHandler()):(this.logger.info("no existing connection needs closing"),this.serviceConnectionRequestQueue())}ready(){return this.webSocket.readyState()===o.default.Open&&!this.isClosing&&this.wasOpened}mute(e){const t=i.SdkSignalFrame.create();t.type=i.SdkSignalFrame.Type.AUDIO_CONTROL;const n=i.SdkAudioControlFrame.create();n.muted=e,t.audioControl=n,this.sendMessage(t)}pause(e){const t=i.SdkSignalFrame.create();t.type=i.SdkSignalFrame.Type.PAUSE,t.pause=i.SdkPauseResumeFrame.create(),t.pause.streamIds=e,this.sendMessage(t)}resume(e){const t=i.SdkSignalFrame.create();t.type=i.SdkSignalFrame.Type.RESUME,t.pause=i.SdkPauseResumeFrame.create(),t.pause.streamIds=e,this.sendMessage(t)}resetConnection(){this.webSocket.destroy(),this.wasOpened=!1}sendMessage(e){e.timestampMs=Date.now(),this.logger.debug(()=>`sending: ${JSON.stringify(e)}`);const t=this.prependWithFrameTypeRTC(i.SdkSignalFrame.encode(e).finish());if(this.ready()){if(!this.webSocket.send(t))return void this.sendEvent(new s.default(this,l.default.WebSocketSendMessageFailure,null));this.sendEvent(new s.default(this,l.default.WebSocketSentMessage,null))}else this.sendEvent(new s.default(this,l.default.WebSocketSkippedMessage,null))}receiveMessage(e){let t;try{t=i.SdkSignalFrame.decode(e)}catch(t){return this.logger.info(`failed to decode: ${e}`),void this.sendEvent(new s.default(this,l.default.ProtocolDecodeFailure,null))}this.logger.debug(()=>`received: ${JSON.stringify(t)}`),this.webSocket.readyState()===o.default.Open?this.sendEvent(new s.default(this,l.default.ReceivedSignalFrame,t)):this.logger.info(`skipping notification of message since WebSocket is not open: ${JSON.stringify(t)}`)}stripFrameTypeRTC(e){const t=e[0];return t!==c.FRAME_TYPE_RTC&&2!==t&&this.logger.warn(`expected FrameTypeRTC for message but got ${t}`),e.slice(1)}prependWithFrameTypeRTC(e){const t=new Uint8Array(e.length+1);return t[0]=c.FRAME_TYPE_RTC,t.set(e,1),t}serviceConnectionRequestQueue(){if(0===this.connectionRequestQueue.length)return void this.logger.info("no connection requests to service");const e=this.connectionRequestQueue.shift();this.logger.info(`opening connection to ${e.url()}`),this.isClosing=!1,this.webSocket.create(e.url(),e.protocols()),this.setUpEventListeners(),this.sendEvent(new s.default(this,l.default.WebSocketConnecting,null))}sendEvent(e){switch(e.type){case l.default.WebSocketMessage:case l.default.ReceivedSignalFrame:case l.default.WebSocketSentMessage:this.logger.debug(()=>`notifying event: ${l.default[e.type]}`);break;case l.default.WebSocketSkippedMessage:this.logger.debug(()=>`notifying event: ${l.default[e.type]}, websocket state=${o.default[this.webSocket.readyState()]}`);break;default:this.logger.info(`notifying event: ${l.default[e.type]}`)}for(const t of this.observerQueue)t.handleSignalingClientEvent(e)}setUpEventListeners(){this.webSocket.addEventListener("open",()=>{this.activatePageUnloadHandler(),this.wasOpened=!0,this.sendEvent(new s.default(this,l.default.WebSocketOpen,null))}),this.webSocket.addEventListener("message",e=>{this.sendEvent(new s.default(this,l.default.WebSocketMessage,null)),this.receiveMessage(this.stripFrameTypeRTC(new Uint8Array(e.data)))}),this.webSocket.addEventListener("close",e=>{this.deactivatePageUnloadHandler(),this.resetConnection(),this.sendEvent(new s.default(this,l.default.WebSocketClosed,null,e.code,e.reason)),this.serviceConnectionRequestQueue()}),this.webSocket.addEventListener("error",()=>{!this.isClosing||this.wasOpened?this.wasOpened?(this.logger.error("received error while connected"),this.sendEvent(new s.default(this,l.default.WebSocketError,null))):(this.logger.error("failed to connect"),this.sendEvent(new s.default(this,l.default.WebSocketFailed,null))):this.logger.info("ignoring error closing signaling while connecting")})}activatePageUnloadHandler(){this.unloadHandler=()=>{this.leave()};const t=e;t.window&&t.window.addEventListener&&window.addEventListener("unload",this.unloadHandler)}deactivatePageUnloadHandler(){const t=e;t.window&&t.window.addEventListener&&window.removeEventListener("unload",this.unloadHandler),this.unloadHandler=null}generateNewAudioSessionId(){const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0]}}t.default=c,c.FRAME_TYPE_RTC=5}).call(this,n(68))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(146);t.default=class{constructor(e,t,n,r,i){this.client=e,this.type=t,this.message=n,this.closeCode=r,this.closeReason=i,this.timestampMs=Date.now()}isConnectionTerminated(){switch(this.type){case r.default.WebSocketFailed:case r.default.WebSocketError:case r.default.WebSocketClosing:case r.default.WebSocketClosed:return!0;default:return!1}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(306),i=n(364),a=n(855),o=n(857),s=n(158),l=n(858),c=n(859),u=n(211),d=n(133),h=n(481),f=n(363);class p{constructor(e,t,n,r=p.INTERVAL_MS){this.audioVideoController=e,this.logger=t,this.browserBehavior=n,this.interval=r,this.intervalScheduler=null,this.metricsAddTime=(e,t,n)=>{},this.metricsLogEvent=(e,t)=>{}}toAttribute(e){return this.toSuffix(e).substring(1)}toSuffix(e){return e.toLowerCase()===e?`_${e}`:e.toUpperCase()===e?`_${e.toLowerCase()}`:e.replace(/([A-Z][a-z]+)/g,(function(e){return`_${e}`})).replace(/([A-Z][A-Z]+)/g,(function(e){return`_${e}`})).toLowerCase()}logLatency(e,t,n){const r=this.toSuffix(e);this.logEventTime("meeting"+r,t,n)}logStateTimeout(e,t){const n=this.toSuffix(e);this.logEvent("meeting_session_state_timeout",Object.assign(Object.assign({},t),{state:`state${n}`}))}logAudioEvent(e,t){const n="audio"+this.toSuffix(h.default[e]);this.logEvent(n,t)}logVideoEvent(e,t){const n="video"+this.toSuffix(f.default[e]);this.logEvent(n,t)}logEventTime(e,t,n={}){const r=Object.assign(Object.assign({},n),{call_id:this.audioVideoController.configuration.meetingId,client_type:p.CLIENT_TYPE,metric_type:"latency"});this.logger.debug(()=>`[DefaultStatsCollector] ${e}: ${JSON.stringify(r)}`),this.metricsAddTime(e,t,r)}logMeetingSessionStatus(e){const t=`${e.statusCode()}`;this.logEvent(t);const n={status:t,status_code:`${e.statusCode()}`};this.logEvent("meeting_session_status",n),e.isTerminal()&&this.logEvent("meeting_session_stopped",n),e.isAudioConnectionFailure()&&this.logEvent("meeting_session_audio_failed",n),e.isFailure()&&this.logEvent("meeting_session_failed",n)}logLifecycleEvent(e,t){const n={lifecycle_event:`lifecycle${this.toSuffix(l.default[e])}`,lifecycle_event_code:`${e}`,lifecycle_event_condition:`condition${this.toSuffix(c.default[t])}`,lifecycle_event_condition_code:`${t}`};this.logEvent("meeting_session_lifecycle",n)}logEvent(e,t={}){const n=Object.assign(Object.assign({},t),{call_id:this.audioVideoController.configuration.meetingId,client_type:p.CLIENT_TYPE});this.logger.debug(()=>`[DefaultStatsCollector] ${e}: ${JSON.stringify(n)}`),this.metricsLogEvent(e,n)}start(e,t,n){return!this.intervalScheduler&&(this.logger.info("Starting DefaultStatsCollector"),this.signalingClient=e,this.videoStreamIndex=t,this.clientMetricReport=n||new a.default(this.logger,this.videoStreamIndex,this.audioVideoController.configuration.credentials.attendeeId),this.intervalScheduler=new u.default(this.interval),this.intervalScheduler.start(()=>{this.getStatsWrapper()}),!0)}stop(){this.logger.info("Stopping DefaultStatsCollector"),this.intervalScheduler&&this.intervalScheduler.stop(),this.intervalScheduler=null}updateMetricValues(e,t){const n=t?this.clientMetricReport.streamMetricReports[Number(e.ssrc)]:this.clientMetricReport.globalMetricReport;let r;r=t?this.clientMetricReport.getMetricMap(n.mediaType,n.direction):this.clientMetricReport.getMetricMap();for(const t in e)t in r&&(n.previousMetrics[t]=n.currentMetrics[t],n.currentMetrics[t]=e[t])}processRawMetricReports(e){this.clientMetricReport.currentSsrcs={};const t=Date.now();for(const t of e){const e=this.isStreamRawMetricReport(t.type);if(e){const e=this.clientMetricReport.streamMetricReports[Number(t.ssrc)];if(e)e.streamId=this.videoStreamIndex.streamIdForSSRC(Number(t.ssrc));else{const e=new o.default;e.mediaType=this.getMediaType(t),e.direction=this.getDirectionType(t),this.videoStreamIndex.allStreams().empty()||(e.streamId=this.videoStreamIndex.streamIdForSSRC(Number(t.ssrc))),this.clientMetricReport.streamMetricReports[Number(t.ssrc)]=e}this.clientMetricReport.currentSsrcs[Number(t.ssrc)]=1}this.updateMetricValues(t,e)}this.clientMetricReport.removeDestroyedSsrcs(),this.clientMetricReport.previousTimestampMs=this.clientMetricReport.currentTimestampMs,this.clientMetricReport.currentTimestampMs=t,this.clientMetricReport.print()}addMetricFrame(e,t,n,r){const i=n.type,a=n.transform,o=n.source,s=t.streamMetricFrames.length,l=t.streamMetricFrames[s-1];if(i){const n=d.SdkMetric.create();n.type=i,n.value=a(o||e,r),r?l.metrics.push(n):t.globalMetrics.push(n)}}addGlobalMetricsToProtobuf(e){const t=this.clientMetricReport.getMetricMap();for(const n in this.clientMetricReport.globalMetricReport.currentMetrics)this.addMetricFrame(n,e,t[n])}addStreamMetricsToProtobuf(e){for(const t in this.clientMetricReport.streamMetricReports){const n=this.clientMetricReport.streamMetricReports[t],r=d.SdkStreamMetricFrame.create();r.streamId=n.streamId,r.metrics=[],e.streamMetricFrames.push(r);const i=this.clientMetricReport.getMetricMap(n.mediaType,n.direction);for(const r in n.currentMetrics)this.addMetricFrame(r,e,i[r],Number(t))}}makeClientMetricProtobuf(){const e=d.SdkClientMetricFrame.create();return e.globalMetrics=[],e.streamMetricFrames=[],this.addGlobalMetricsToProtobuf(e),this.addStreamMetricsToProtobuf(e),e}sendClientMetricProtobuf(e){this.signalingClient.sendClientMetrics(e)}isStreamRawMetricReport(e){return"ssrc"===e||"inbound-rtp"===e||"outbound-rtp"===e}getMediaType(e){return"audio"===e.mediaType?i.default.AUDIO:i.default.VIDEO}getDirectionType(e){return-1!==e.id.toLowerCase().indexOf("send")||-1!==e.id.toLowerCase().indexOf("outbound")||"outbound-rtp"===e.type?r.default.UPSTREAM:r.default.DOWNSTREAM}isValidChromeRawMetric(e){return this.browserBehavior.hasChromiumWebRTC()&&("ssrc"===e.type||"VideoBwe"===e.type||"googCandidatePair"===e.type&&"true"===e.googWritable&&"true"===e.googReadable)}isValidStandardRawMetric(e){const t="inbound-rtp"===e.type||"outbound-rtp"===e.type||"candidate-pair"===e.type&&"succeeded"===e.state;return this.browserBehavior.hasFirefoxWebRTC()?-1===this.compareMajorVersion(p.FIREFOX_UPDATED_GET_STATS_VERSION)?t:t&&!1===e.isRemote:t}isValidSsrc(e){let t=!0;return this.isStreamRawMetricReport(e.type)&&this.getDirectionType(e)===r.default.DOWNSTREAM&&this.getMediaType(e)===i.default.VIDEO&&(t=this.videoStreamIndex.streamIdForSSRC(Number(e.ssrc))>0),t}isValidRawMetricReport(e){return(this.isValidChromeRawMetric(e)||this.isValidStandardRawMetric(e))&&this.isValidSsrc(e)}filterRawMetricReports(e){const t=[];for(const n of e)this.isValidRawMetricReport(n)&&t.push(n);return t}handleRawMetricReports(e){const t=this.filterRawMetricReports(e);this.logger.debug(()=>`Filtered raw metrics : ${JSON.stringify(t)}`),this.processRawMetricReports(t);const n=this.makeClientMetricProtobuf();this.sendClientMetricProtobuf(n),this.audioVideoController.forEachObserver(e=>{s.default.of(e.metricsDidReceive).map(t=>t.bind(e)(this.clientMetricReport.clone()))})}getStatsWrapper(){if(!this.audioVideoController.rtcPeerConnection)return;const e=[];this.browserBehavior.requiresPromiseBasedWebRTCGetStats()?this.audioVideoController.rtcPeerConnection.getStats().then(t=>{t.forEach(t=>{e.push(t)}),this.handleRawMetricReports(e)}).catch(e=>{this.logger.error(e.message)}):this.audioVideoController.rtcPeerConnection.getStats(t=>{t.result().forEach(t=>{const n={};t.names().forEach(e=>{n[e]=t.stat(e)}),n.id=t.id,n.type=t.type,n.timestamp=t.timestamp,e.push(n)}),this.handleRawMetricReports(e)},e=>{this.logger.error(e.message)})}compareMajorVersion(e){const t=parseInt(this.browserBehavior.version().split(".")[0]),n=parseInt(e.split(".")[0]);return n===t?0:n>t?1:-1}}t.default=p,p.INTERVAL_MS=1e3,p.FIREFOX_UPDATED_GET_STATS_VERSION="66.0.0",p.CLIENT_TYPE="amazon-chime-sdk-js"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(133),i=n(306),a=n(364),o=n(856);class s{constructor(e,t,n){this.logger=e,this.videoStreamIndex=t,this.selfAttendeeId=n,this.globalMetricReport=new o.default,this.streamMetricReports={},this.currentTimestampMs=0,this.previousTimestampMs=0,this.currentSsrcs={},this.identityValue=(e,t)=>{const n=t?this.streamMetricReports[t]:this.globalMetricReport;return Number(n.currentMetrics[e])},this.decoderLossPercent=(e,t)=>{const n=t?this.streamMetricReports[t]:this.globalMetricReport,r=n.currentMetrics.googDecodingNormal-(n.previousMetrics.googDecodingNormal||0),i=n.currentMetrics.googDecodingCTN-(n.previousMetrics.googDecodingCTN||0);if(i<=0)return 0;const a=i-r;return a<=0?0:100*a/i},this.packetLossPercent=(e,t)=>{const n=t?this.streamMetricReports[t]:this.globalMetricReport,r=n.currentMetrics[e]-(n.previousMetrics[e]||0),i=n.currentMetrics.packetsLost-(n.previousMetrics.packetsLost||0),a=r+i;return a<=0||i<=0?0:100*i/a},this.countPerSecond=(e,t)=>{const n=t?this.streamMetricReports[t]:this.globalMetricReport;let r=(this.currentTimestampMs-this.previousTimestampMs)/1e3;if(r<=0)return 0;this.previousTimestampMs<=0&&(r=1);const i=n.currentMetrics[e]-(n.previousMetrics[e]||0);return i<=0?0:Math.trunc(i/r)},this.bitsPerSecond=(e,t)=>{const n=t?this.streamMetricReports[t]:this.globalMetricReport;let r=(this.currentTimestampMs-this.previousTimestampMs)/1e3;if(r<=0)return 0;this.previousTimestampMs<=0&&(r=1);const i=8*(n.currentMetrics[e]-(n.previousMetrics[e]||0));return i<=0?0:Math.trunc(i/r)},this.secondsToMilliseconds=(e,t)=>{const n=t?this.streamMetricReports[t]:this.globalMetricReport;return Number(1e3*n.currentMetrics[e])},this.globalMetricMap={googActualEncBitrate:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_ACTUAL_ENCODER_BITRATE},googAvailableSendBandwidth:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_AVAILABLE_SEND_BANDWIDTH},googRetransmitBitrate:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_RETRANSMIT_BITRATE},googAvailableReceiveBandwidth:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_AVAILABLE_RECEIVE_BANDWIDTH},googTargetEncBitrate:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_TARGET_ENCODER_BITRATE},googBucketDelay:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_BUCKET_DELAY_MS},googRtt:{transform:this.identityValue,type:r.SdkMetric.Type.STUN_RTT_MS},packetsDiscardedOnSend:{transform:this.countPerSecond,type:r.SdkMetric.Type.SOCKET_DISCARDED_PPS},availableIncomingBitrate:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_AVAILABLE_RECEIVE_BANDWIDTH},availableOutgoingBitrate:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_AVAILABLE_SEND_BANDWIDTH},currentRoundTripTime:{transform:this.identityValue,type:r.SdkMetric.Type.STUN_RTT_MS}},this.audioUpstreamMetricMap={googJitterReceived:{transform:this.identityValue,type:r.SdkMetric.Type.RTC_MIC_JITTER_MS},jitter:{transform:this.secondsToMilliseconds,type:r.SdkMetric.Type.RTC_MIC_JITTER_MS},packetsSent:{transform:this.countPerSecond,type:r.SdkMetric.Type.RTC_MIC_PPS},bytesSent:{transform:this.bitsPerSecond,type:r.SdkMetric.Type.RTC_MIC_BITRATE},googRtt:{transform:this.identityValue,type:r.SdkMetric.Type.RTC_MIC_RTT_MS},packetsLost:{transform:this.packetLossPercent,type:r.SdkMetric.Type.RTC_MIC_FRACTION_PACKET_LOST_PERCENT,source:"packetsSent"}},this.audioDownstreamMetricMap={packetsReceived:{transform:this.countPerSecond,type:r.SdkMetric.Type.RTC_SPK_PPS},packetsLost:{transform:this.packetLossPercent,type:r.SdkMetric.Type.RTC_SPK_FRACTION_PACKET_LOST_PERCENT,source:"packetsReceived"},googJitterReceived:{transform:this.identityValue,type:r.SdkMetric.Type.RTC_SPK_JITTER_MS},jitter:{transform:this.secondsToMilliseconds,type:r.SdkMetric.Type.RTC_SPK_JITTER_MS},googDecodingCTN:{transform:this.countPerSecond},googDecodingNormal:{transform:this.decoderLossPercent,type:r.SdkMetric.Type.RTC_SPK_FRACTION_DECODER_LOSS_PERCENT,source:"googDecodingCTN"},bytesReceived:{transform:this.bitsPerSecond,type:r.SdkMetric.Type.RTC_SPK_BITRATE},googCurrentDelayMs:{transform:this.identityValue,type:r.SdkMetric.Type.RTC_SPK_CURRENT_DELAY_MS},googJitterBufferMs:{transform:this.identityValue,type:r.SdkMetric.Type.RTC_SPK_JITTER_BUFFER_MS}},this.videoUpstreamMetricMap={googRtt:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_SENT_RTT_MS},googEncodeUsagePercent:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_ENCODE_USAGE_PERCENT},googNacksReceived:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_NACKS_RECEIVED},nackCount:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_NACKS_RECEIVED},googPlisReceived:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_PLIS_RECEIVED},pliCount:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_PLIS_RECEIVED},googFirsReceived:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_FIRS_RECEIVED},firCount:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_FIRS_RECEIVED},googAvgEncodeMs:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_AVERAGE_ENCODE_MS},googFrameRateInput:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_INPUT_FPS},framesEncoded:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_ENCODE_FPS},googFrameRateSent:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_SENT_FPS},framerateMean:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_SENT_FPS},packetsSent:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_SENT_PPS},packetsLost:{transform:this.packetLossPercent,type:r.SdkMetric.Type.VIDEO_SENT_FRACTION_PACKET_LOST_PERCENT,source:"packetsSent"},bytesSent:{transform:this.bitsPerSecond,type:r.SdkMetric.Type.VIDEO_SENT_BITRATE},droppedFrames:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_DROPPED_FPS},qpSum:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_SENT_QP_SUM},googFrameHeightSent:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_ENCODE_HEIGHT},googFrameWidthSent:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_ENCODE_WIDTH},frameHeight:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_ENCODE_HEIGHT},frameWidth:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_ENCODE_WIDTH}},this.videoDownstreamMetricMap={googTargetDelayMs:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_TARGET_DELAY_MS},googDecodeMs:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_DECODE_MS},googFrameRateOutput:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_OUTPUT_FPS},packetsReceived:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_RECEIVED_PPS},packetsLost:{transform:this.packetLossPercent,type:r.SdkMetric.Type.VIDEO_RECEIVED_FRACTION_PACKET_LOST_PERCENT,source:"packetsReceived"},googRenderDelayMs:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_RENDER_DELAY_MS},googFrameRateReceived:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_RECEIVED_FPS},framerateMean:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_RECEIVED_FPS},framesDecoded:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_DECODE_FPS},googNacksSent:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_NACKS_SENT},nackCount:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_NACKS_SENT},googFirsSent:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_FIRS_SENT},firCount:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_FIRS_SENT},googPlisSent:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_PLIS_SENT},pliCount:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_PLIS_SENT},bytesReceived:{transform:this.bitsPerSecond,type:r.SdkMetric.Type.VIDEO_RECEIVED_BITRATE},googCurrentDelayMs:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_CURRENT_DELAY_MS},googJitterBufferMs:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_JITTER_BUFFER_MS},discardedPackets:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_DISCARDED_PPS},googJitterReceived:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_RECEIVED_JITTER_MS},jitter:{transform:this.secondsToMilliseconds,type:r.SdkMetric.Type.VIDEO_RECEIVED_JITTER_MS},qpSum:{transform:this.countPerSecond,type:r.SdkMetric.Type.VIDEO_RECEIVED_QP_SUM},googFrameHeightReceived:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_DECODE_HEIGHT},googFrameWidthReceived:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_DECODE_WIDTH},frameHeight:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_DECODE_HEIGHT},frameWidth:{transform:this.identityValue,type:r.SdkMetric.Type.VIDEO_DECODE_WIDTH}},this.observableVideoMetricSpec={videoUpstreamBitrate:{source:"bytesSent",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoUpstreamPacketsSent:{source:"packetsSent",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoUpstreamPacketLossPercent:{source:"packetsLost",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoUpstreamFramesEncodedPerSecond:{source:"framesEncoded",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoUpstreamGoogFrameHeight:{source:"googFrameHeightSent",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoUpstreamGoogFrameWidth:{source:"googFrameWidthSent",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoUpstreamFrameHeight:{source:"frameHeight",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoUpstreamFrameWidth:{source:"frameWidth",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoDownstreamBitrate:{source:"bytesReceived",media:a.default.VIDEO,dir:i.default.DOWNSTREAM},videoDownstreamPacketLossPercent:{source:"packetsLost",media:a.default.VIDEO,dir:i.default.DOWNSTREAM},videoDownstreamPacketsReceived:{source:"packetsReceived",media:a.default.VIDEO,dir:i.default.DOWNSTREAM},videoDownstreamFramesDecodedPerSecond:{source:"framesDecoded",media:a.default.VIDEO,dir:i.default.DOWNSTREAM},videoDownstreamGoogFrameHeight:{source:"googFrameHeightReceived",media:a.default.VIDEO,dir:i.default.DOWNSTREAM},videoDownstreamGoogFrameWidth:{source:"googFrameWidthReceived",media:a.default.VIDEO,dir:i.default.DOWNSTREAM},videoDownstreamFrameHeight:{source:"frameHeight",media:a.default.VIDEO,dir:i.default.DOWNSTREAM},videoDownstreamFrameWidth:{source:"frameWidth",media:a.default.VIDEO,dir:i.default.DOWNSTREAM}},this.observableMetricSpec={audioPacketsReceived:{source:"packetsReceived",media:a.default.AUDIO,dir:i.default.DOWNSTREAM},audioPacketsReceivedFractionLoss:{source:"packetsLost",media:a.default.AUDIO,dir:i.default.DOWNSTREAM},audioDecoderLoss:{source:"googDecodingNormal",media:a.default.AUDIO,dir:i.default.DOWNSTREAM},audioPacketsSent:{source:"packetsSent",media:a.default.AUDIO,dir:i.default.UPSTREAM},audioPacketLossPercent:{source:"packetsLost",media:a.default.AUDIO,dir:i.default.UPSTREAM},videoUpstreamBitrate:{source:"bytesSent",media:a.default.VIDEO,dir:i.default.UPSTREAM},videoPacketSentPerSecond:{source:"packetsSent",media:a.default.VIDEO,dir:i.default.UPSTREAM},availableSendBandwidth:{source:"googAvailableSendBandwidth"},availableReceiveBandwidth:{source:"googAvailableReceiveBandwidth"},audioSpeakerDelayMs:{source:"googCurrentDelayMs",media:a.default.AUDIO,dir:i.default.DOWNSTREAM},availableIncomingBitrate:{source:"availableIncomingBitrate"},availableOutgoingBitrate:{source:"availableOutgoingBitrate"},nackCountReceivedPerSecond:{source:"nackCount",media:a.default.VIDEO,dir:i.default.UPSTREAM},googNackCountReceivedPerSecond:{source:"googNacksReceived",media:a.default.VIDEO,dir:i.default.UPSTREAM}}}getMetricMap(e,t){switch(e){case a.default.AUDIO:switch(t){case i.default.UPSTREAM:return this.audioUpstreamMetricMap;case i.default.DOWNSTREAM:return this.audioDownstreamMetricMap}case a.default.VIDEO:switch(t){case i.default.UPSTREAM:return this.videoUpstreamMetricMap;case i.default.DOWNSTREAM:return this.videoDownstreamMetricMap}default:return this.globalMetricMap}}getObservableMetricValue(e){const t=this.observableMetricSpec[e],n=this.getMetricMap(t.media,t.dir)[t.source],r=n.transform,i=n.source;if(!t.hasOwnProperty("media"))return r(i||t.source);for(const e in this.streamMetricReports){const n=this.streamMetricReports[e];if(t.source in n.currentMetrics&&n.direction===t.dir&&n.mediaType===t.media)return r(i||t.source,Number(e))}return 0}getObservableVideoMetricValue(e,t){const n=this.observableVideoMetricSpec[e],r=this.getMetricMap(n.media,n.dir)[n.source],i=r.transform,a=r.source,o=this.streamMetricReports[t];return o&&n.source in o.currentMetrics?i(a||n.source,t):i(a||n.source)}getObservableMetrics(){const e={};for(const t in this.observableMetricSpec)e[t]=this.getObservableMetricValue(t);return e}getObservableVideoMetrics(){const e={};if(!this.videoStreamIndex||!this.selfAttendeeId)return this.logger.error("Need to define VideoStreamIndex and selfAttendeeId if using getObservableVideoMetrics API"),e;for(const t in this.streamMetricReports)if(this.streamMetricReports[t].mediaType===a.default.VIDEO){const n={};for(const e in this.observableVideoMetricSpec)if(this.observableVideoMetricSpec[e].dir===this.streamMetricReports[t].direction){const r=this.getObservableVideoMetricValue(e,Number(t));isNaN(r)||(n[e]=r)}const r=this.streamMetricReports[t].streamId,i=r?this.videoStreamIndex.attendeeIdForStreamId(r):this.selfAttendeeId;e[i]=e[i]?e[i]:{},e[i][t]=n}return e}clone(){const e=new s(this.logger,this.videoStreamIndex,this.selfAttendeeId);return e.globalMetricReport=this.globalMetricReport,e.streamMetricReports=this.streamMetricReports,e.currentTimestampMs=this.currentTimestampMs,e.previousTimestampMs=this.previousTimestampMs,e}print(){const e={globalMetricReport:this.globalMetricReport,streamMetricReports:this.streamMetricReports,currentTimestampMs:this.currentTimestampMs,previousTimestampMs:this.previousTimestampMs};this.logger.debug(()=>`Client Metric Report: ${JSON.stringify(e)}`)}removeDestroyedSsrcs(){for(const e in this.streamMetricReports)this.currentSsrcs[e]||delete this.streamMetricReports[e]}}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.previousMetrics={},this.currentMetrics={}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.previousMetrics={},this.currentMetrics={}}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MeetingSessionLifecycleEvent=void 0,function(e){e[e.Connecting=0]="Connecting",e[e.Started=1]="Started",e[e.Stopped=2]="Stopped"}(r=t.MeetingSessionLifecycleEvent||(t.MeetingSessionLifecycleEvent={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MeetingSessionLifecycleEventCondition=void 0,function(e){e[e.ConnectingNew=0]="ConnectingNew",e[e.ReconnectingExisting=1]="ReconnectingExisting",e[e.StartedNew=2]="StartedNew",e[e.StartedExisting=3]="StartedExisting",e[e.StartedAfterReconnect=4]="StartedAfterReconnect",e[e.StoppedCleanly=5]="StoppedCleanly",e[e.StoppedWithFailure=6]="StoppedWithFailure"}(r=t.MeetingSessionLifecycleEventCondition||(t.MeetingSessionLifecycleEventCondition={})),t.default=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(183),a=n(309),o=n(101);class s extends o.default{constructor(e,t=s.CHROME_VPN_TIMEOUT_MS){super(e.logger),this.context=e,this.chromeVpnTimeoutMs=t,this.taskName="FinishGatheringICECandidatesTask"}removeEventListener(){this.context.peer&&(this.context.peer.removeEventListener("icecandidate",this.context.iceCandidateHandler),this.context.turnCredentials||this.context.peer.removeEventListener("icegatheringstatechange",this.context.iceGatheringStateEventHandler))}cancel(){let e;if(this.context.browserBehavior.requiresIceCandidateGatheringTimeoutWorkaround()&&this.chromeVpnTimeoutMs<this.context.meetingSessionConfiguration.connectionTimeoutMs){Date.now()-this.startTimestampMs>this.chromeVpnTimeoutMs&&(e=new Error(`canceling ${this.name()} due to the meeting status code: ${i.default.ICEGatheringTimeoutWorkaround}`))}this.cancelPromise&&(e=e||new Error(`canceling ${this.name()}`),this.cancelPromise(e),delete this.cancelPromise)}run(){return r(this,void 0,void 0,(function*(){if(this.context.peer||this.logAndThrow("session does not have peer connection; bypass ice gathering"),this.context.browserBehavior.requiresCheckForSdpConnectionAttributes()){if(new a.default(this.context.peer.localDescription.sdp).hasCandidatesForAllMLines())return void this.context.logger.info(`ice gathering already complete; bypass gathering, current local description ${this.context.peer.localDescription.sdp}`)}else this.context.logger.info(`iOS device does not require checking for connection attributes in SDP, current local description ${this.context.peer.localDescription.sdp}`);if(!this.context.browserBehavior.hasFirefoxWebRTC()&&"complete"!==this.context.peer.iceGatheringState||!new a.default(this.context.peer.localDescription.sdp).hasCandidates())try{yield new Promise((e,t)=>{this.cancelPromise=e=>{this.removeEventListener(),t(e)},this.context.turnCredentials||(this.context.iceGatheringStateEventHandler=()=>{if("complete"===this.context.peer.iceGatheringState)return this.removeEventListener(),e(),void delete this.cancelPromise},this.context.peer.addEventListener("icegatheringstatechange",this.context.iceGatheringStateEventHandler)),this.context.iceCandidateHandler=n=>{if(this.context.logger.info(`ice candidate: ${n.candidate?n.candidate.candidate:"(null)"} state: ${this.context.peer.iceGatheringState}`),n.candidate&&(a.default.isRTPCandidate(n.candidate.candidate)&&this.context.iceCandidates.push(n.candidate),this.context.turnCredentials&&this.context.iceCandidates.length>=1))return this.context.logger.info("gathered at least one relay candidate"),this.removeEventListener(),e(),void delete this.cancelPromise;"complete"===this.context.peer.iceGatheringState&&(this.context.logger.info("done gathering ice candidates"),this.removeEventListener(),new a.default(this.context.peer.localDescription.sdp).hasCandidates()&&0!==this.context.iceCandidates.length?(e(),delete this.cancelPromise):(t(new Error("no ice candidates were gathered")),delete this.cancelPromise))},this.context.peer.addEventListener("icecandidate",this.context.iceCandidateHandler),this.startTimestampMs=Date.now()})}catch(e){throw e}finally{this.startTimestampMs&&(this.context.iceGatheringDurationMs=Math.round(Date.now()-this.startTimestampMs))}else this.context.logger.info("ice gathering state is complete and candidates are in SDP; bypass gathering")}))}}t.default=s,s.CHROME_VPN_TIMEOUT_MS=5e3},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(310),a=n(183),o=n(493),s=n(146),l=n(862),c=n(133),u=n(101);class d extends u.default{constructor(e){super(e.logger),this.context=e,this.taskName="JoinAndReceiveIndexTask",this.taskCanceler=null,this.maxVideos=25}cancel(){this.taskCanceler&&(this.taskCanceler.cancel(),this.taskCanceler=null)}run(){return r(this,void 0,void 0,(function*(){const e=yield new Promise((e,t)=>{const n=this.context;n.turnCredentials=null;const r=new class{constructor(e){this.signalingClient=e}cancel(){this.signalingClient.removeObserver(this),t(new Error("JoinAndReceiveIndexTask got canceled while waiting for SdkIndexFrame"))}handleSignalingClientEvent(t){if(t.type===s.default.WebSocketClosed){let e=`The signaling connection was closed with code ${t.closeCode} and reason: ${t.closeReason}`;n.logger.warn(e);let r=a.default.SignalingBadRequest;return 4410===t.closeCode?(e="The meeting already ended.",n.logger.warn(e),r=a.default.MeetingEnded):t.closeCode>=4500&&t.closeCode<4600&&(r=a.default.SignalingInternalServerError),void n.audioVideoController.handleMeetingSessionStatus(new i.default(r),new Error(e))}if(t.type!==s.default.ReceivedSignalFrame)return;if(t.message.type===c.SdkSignalFrame.Type.JOIN_ACK){const e=t.message.joinack;return void(e&&e.turnCredentials?(n.turnCredentials=new o.default,n.turnCredentials.username=e.turnCredentials.username,n.turnCredentials.password=e.turnCredentials.password,n.turnCredentials.ttl=e.turnCredentials.ttl,n.turnCredentials.uris=e.turnCredentials.uris.map(e=>n.meetingSessionConfiguration.urls.urlRewriter(e)).filter(e=>!!e)):n.logger.error("missing TURN credentials in JoinAckFrame"))}if(t.message.type!==c.SdkSignalFrame.Type.INDEX)return;this.signalingClient.removeObserver(this);const r=t.message.index;e(r)}}(this.context.signalingClient);this.context.signalingClient.registerObserver(r),this.taskCanceler=r,this.context.signalingClient.join(new l.default(this.maxVideos,!0))});this.context.logger.info(`received first index ${JSON.stringify(e)}`),this.context.indexFrame=e}))}}t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t){this.maxVideos=e,this.sendBitrates=t}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(146),a=n(133),o=n(101);class s extends o.default{constructor(e){super(e.logger),this.context=e,this.taskName="LeaveAndReceiveLeaveAckTask",this.taskCanceler=null}cancel(){this.taskCanceler&&(this.taskCanceler.cancel(),this.taskCanceler=null)}run(){return r(this,void 0,void 0,(function*(){this.context.signalingClient.ready()&&(this.context.signalingClient.leave(),this.context.logger.info("sent leave"),yield this.receiveLeaveAck())}))}receiveLeaveAck(){return new Promise((e,t)=>{const n=new class{constructor(e,t){this.signalingClient=e,this.logger=t}cancel(){this.signalingClient.removeObserver(this),t(new Error("LeaveAndReceiveLeaveAckTask got canceled while waiting for IndexFrame"))}handleSignalingClientEvent(t){if(t.isConnectionTerminated())return this.signalingClient.removeObserver(this),this.logger.info("LeaveAndReceiveLeaveAckTask connection terminated"),void e();t.type===i.default.ReceivedSignalFrame&&t.message.type===a.SdkSignalFrame.Type.LEAVE_ACK&&(this.signalingClient.removeObserver(this),this.logger.info("got leave ack"),e())}}(this.context.signalingClient,this.context.logger);this.taskCanceler=n,this.context.signalingClient.registerObserver(n)})}}t.default=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(146),a=n(133),o=n(101);class s extends o.default{constructor(e){super(e.logger),this.context=e,this.taskName="ListenForVolumeIndicatorsTask",this.realtimeMuteAndUnmuteHandler=e=>{this.context.signalingClient.mute(e)}}run(){return r(this,void 0,void 0,(function*(){this.context.removableObservers.push(this),this.context.signalingClient.registerObserver(this),this.context.realtimeController.realtimeSubscribeToMuteAndUnmuteLocalAudio(this.realtimeMuteAndUnmuteHandler)}))}removeObserver(){this.context.realtimeController.realtimeUnsubscribeToMuteAndUnmuteLocalAudio(this.realtimeMuteAndUnmuteHandler),this.context.signalingClient.removeObserver(this)}handleSignalingClientEvent(e){if(e.type===i.default.ReceivedSignalFrame)if(e.message.type===a.SdkSignalFrame.Type.AUDIO_STREAM_ID_INFO){const t=e.message.audioStreamIdInfo;this.context.volumeIndicatorAdapter.sendRealtimeUpdatesForAudioStreamIdInfo(t)}else if(e.message.type===a.SdkSignalFrame.Type.AUDIO_METADATA){const t=e.message.audioMetadata;this.context.volumeIndicatorAdapter.sendRealtimeUpdatesForAudioMetadata(t)}}}t.default=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(306),a=n(364),o=n(814),s=n(866),l=n(867),c=n(158),u=n(310),d=n(183),h=n(146),f=n(481),p=n(363),m=n(101);class g extends m.default{constructor(e,t,n){super(e.logger),this.context=e,this.initialConnectionHealthData=n,this.taskName="MonitorTask",this.prevSignalStrength=1,this.currentVideoDownlinkBandwidthEstimationKbps=1e4,this.currentAvailableStreamAvgBitrates=null,this.hasSignalingError=!1,this.presenceHandlerCalled=!1,this.checkAndSendWeakSignalEvent=e=>{const t=e<1,n=this.prevSignalStrength<1,r=t?n?null:f.default.RedmicStartLoss:n?f.default.RedmicEndLoss:null;r&&this.context.statsCollector.logAudioEvent(r),this.prevSignalStrength=e},this.realtimeFatalErrorCallback=e=>{this.logger.error(`realtime error: ${e}: ${e.stack}`),this.context.audioVideoController.handleMeetingSessionStatus(new u.default(d.default.RealtimeApiFailed),e)},this.realtimeAttendeeIdPresenceHandler=(e,t)=>{const n=this.context.meetingSessionConfiguration.credentials.attendeeId;this.logger.info(`attendeePresenceReceived: ${n}`),n===e&&t&&!this.presenceHandlerCalled&&(this.presenceHandlerCalled=!0,this.context.attendeePresenceDurationMs=Date.now()-this.context.startAudioVideoTimestamp,this.context.eventController&&this.context.eventController.publishEvent("attendeePresenceReceived",{attendeePresenceDurationMs:this.context.attendeePresenceDurationMs}))},this.generateAudioVideoEventAttributes=()=>{const{signalingOpenDurationMs:e,poorConnectionCount:t,startTimeMs:n,iceGatheringDurationMs:r,attendeePresenceDurationMs:i,meetingStartDurationMs:a}=this.context;return{maxVideoTileCount:this.context.maxVideoTileCount,meetingDurationMs:null===n?0:Math.round(Date.now()-n),signalingOpenDurationMs:e,iceGatheringDurationMs:r,attendeePresenceDurationMs:i,poorConnectionCount:t,meetingStartDurationMs:a}},this.reconnectionHealthPolicy=new s.default(e.logger,Object.assign({},t),this.initialConnectionHealthData.clone()),this.unusableAudioWarningHealthPolicy=new l.default(Object.assign({},t),this.initialConnectionHealthData.clone())}removeObserver(){this.context.audioVideoController.removeObserver(this),this.context.realtimeController.realtimeUnsubscribeToFatalError(this.realtimeFatalErrorCallback),this.context.realtimeController.realtimeUnsubscribeToLocalSignalStrengthChange(this.checkAndSendWeakSignalEvent),this.context.realtimeController.realtimeUnsubscribeToAttendeeIdPresence(this.realtimeAttendeeIdPresenceHandler),this.context.signalingClient.removeObserver(this)}run(){return r(this,void 0,void 0,(function*(){this.context.removableObservers.push(this),this.context.audioVideoController.addObserver(this),this.context.realtimeController.realtimeSubscribeToFatalError(this.realtimeFatalErrorCallback),this.context.realtimeController.realtimeSubscribeToLocalSignalStrengthChange(this.checkAndSendWeakSignalEvent),this.context.realtimeController.realtimeSubscribeToAttendeeIdPresence(this.realtimeAttendeeIdPresenceHandler),this.context.connectionMonitor.start(),this.context.statsCollector.start(this.context.signalingClient,this.context.videoStreamIndex),this.context.signalingClient.registerObserver(this)}))}videoTileDidUpdate(e){this.context.maxVideoTileCount=Math.max(this.context.maxVideoTileCount,this.context.videoTileController.getAllVideoTiles().length)}videoSendHealthDidChange(e,t){if(0===this.context.videoInputAttachedTimestampMs||!this.context.videoTileController.hasStartedLocalVideoTile()||!this.context.lastKnownVideoAvailability.canStartLocalVideo)return;const n=null!==this.context.activeVideoInput?this.context.activeVideoInput.getTracks():null;if(!n||!n[0])return;const r=Date.now()-this.context.videoInputAttachedTimestampMs;t>0||e>0?(this.context.statsCollector.logVideoEvent(p.default.SendingSuccess,this.context.videoDeviceInformation),this.context.statsCollector.logLatency("video_start_sending",r,this.context.videoDeviceInformation),this.context.videoInputAttachedTimestampMs=0):r>g.DEFAULT_TIMEOUT_FOR_START_SENDING_VIDEO_MS&&(this.context.statsCollector.logVideoEvent(p.default.SendingFailed,this.context.videoDeviceInformation),this.context.videoInputAttachedTimestampMs=0)}videoReceiveBandwidthDidChange(e,t){this.logger.debug(()=>`receiving bandwidth changed from prev=${t} Kbps to curr=${e} Kbps`),this.currentVideoDownlinkBandwidthEstimationKbps=e}checkResubscribe(e){const t=e.getObservableMetrics();if(!t)return!1;const n=t.availableSendBandwidth||t.availableOutgoingBitrate,r=t.nackCountReceivedPerSecond||t.googNackCountReceivedPerSecond;let i=!1;this.context.videoDownlinkBandwidthPolicy.updateMetrics(e);const a=this.context.videoDownlinkBandwidthPolicy.wantsResubscribe();if(i=i||a,a&&(this.context.videosToReceive=this.context.videoDownlinkBandwidthPolicy.chooseSubscriptions(),this.logger.info(`trigger resubscribe for down=${a}; videosToReceive=[${this.context.videosToReceive.array()}]`)),this.context.videoTileController.hasStartedLocalVideoTile()){this.context.videoUplinkBandwidthPolicy.updateConnectionMetric({uplinkKbps:n/1e3,nackCountPerSecond:r});const e=this.context.videoUplinkBandwidthPolicy.wantsResubscribe();i=i||e,e&&(this.logger.info(`trigger resubscribe for up=${e}; videosToReceive=[${this.context.videosToReceive.array()}]`),this.context.videoUplinkBandwidthPolicy.chooseEncodingParameters(),this.context.videoUplinkBandwidthPolicy.chooseMediaTrackConstraints())}return i}metricsDidReceive(e){const t=e;if(!t)return;if(this.checkResubscribe(e)&&this.context.audioVideoController.update({needsRenegotiation:!1}),!this.currentAvailableStreamAvgBitrates)return;const n=t.streamMetricReports;if(!n)return;const r=new Map,s=new Map;for(const e in n)n[e].mediaType===a.default.VIDEO&&n[e].direction===i.default.DOWNSTREAM&&r.set(n[e].streamId,n[e]);let l=!1;for(const e of this.currentAvailableStreamAvgBitrates.bitrates)if(r.has(e.sourceStreamId)){const t=r.get(e.sourceStreamId),n=this.context.videoStreamIndex.attendeeIdForStreamId(e.sourceStreamId);if(!n)continue;const i=new o.default,a=t.previousMetrics.bytesReceived,c=t.currentMetrics.bytesReceived;if(!a||!c)continue;const u=8*(c-a)/1e3;i.expectedAverageBitrateKbps=e.avgBitrateBps/1e3,i.receivedAverageBitrateKbps=u,i.attendeeId=n,u<e.avgBitrateBps/1e3*g.DEFAULT_DOWNLINK_CALLRATE_UNDERSHOOT_FACTOR&&(l=!0),s.set(n,i)}l&&(this.logger.debug(()=>"Downlink video streams are not receiving enough data"),this.context.audioVideoController.forEachObserver(e=>{c.default.of(e.videoNotReceivingEnoughData).map(t=>t.bind(e)(Array.from(s.values())))}))}connectionHealthDidChange(e){var t;0===e.consecutiveMissedPongs&&this.context.reconnectController&&this.context.reconnectController.setLastActiveTimestampMs(Date.now()),this.reconnectionHealthPolicy.update(e);const n=this.reconnectionHealthPolicy.healthIfChanged();null!==n&&(this.logger.info(`reconnection health is now: ${n}`),0===n&&this.context.audioVideoController.handleMeetingSessionStatus(new u.default(d.default.ConnectionHealthReconnect),null)),this.unusableAudioWarningHealthPolicy.update(e);const r=this.unusableAudioWarningHealthPolicy.healthIfChanged();if(null!==r)if(this.logger.info(`unusable audio warning is now: ${r}`),0===r){this.context.poorConnectionCount+=1;const e=this.generateAudioVideoEventAttributes();null===(t=this.context.eventController)||void 0===t||t.publishEvent("receivingAudioDropped",e),this.context.videoTileController.haveVideoTilesWithStreams()?this.context.audioVideoController.forEachObserver(e=>{c.default.of(e.connectionDidSuggestStopVideo).map(t=>t.bind(e)())}):this.context.audioVideoController.forEachObserver(e=>{c.default.of(e.connectionDidBecomePoor).map(t=>t.bind(e)())})}else this.context.audioVideoController.forEachObserver(e=>{c.default.of(e.connectionDidBecomeGood).map(t=>t.bind(e)())})}handleBitrateFrame(e){let t=0;this.currentAvailableStreamAvgBitrates=e,this.logger.debug(()=>`simulcast: bitrates from server ${JSON.stringify(e)}`);for(const n of e.bitrates)this.context.videosToReceive.contain(n.sourceStreamId)&&(t+=n.avgBitrateBps);t/=1e3,this.currentVideoDownlinkBandwidthEstimationKbps*g.DEFAULT_DOWNLINK_CALLRATE_OVERSHOOT_FACTOR<t&&(this.logger.info(`Downlink bandwidth pressure is high: estimated bandwidth ${this.currentVideoDownlinkBandwidthEstimationKbps}Kbps, required bandwidth ${t}Kbps`),this.context.audioVideoController.forEachObserver(e=>{c.default.of(e.estimatedDownlinkBandwidthLessThanRequired).map(n=>n.bind(e)(this.currentVideoDownlinkBandwidthEstimationKbps,t))}))}handleSignalingClientEvent(e){var t;if(e.type===h.default.WebSocketClosed&&(4410===e.closeCode||e.closeCode>=4500&&e.closeCode<4600)||e.type===h.default.WebSocketError||e.type===h.default.WebSocketFailed){if(!this.hasSignalingError){const e=this.generateAudioVideoEventAttributes();null===(t=this.context.eventController)||void 0===t||t.publishEvent("signalingDropped",e),this.hasSignalingError=!0}}else e.type===h.default.WebSocketOpen&&(this.hasSignalingError=!1);if(e.type===h.default.ReceivedSignalFrame){if(e.message.bitrates){const t=e.message.bitrates;this.context.videoStreamIndex.integrateBitratesFrame(t),this.context.videoDownlinkBandwidthPolicy.updateIndex(this.context.videoStreamIndex),this.handleBitrateFrame(e.message.bitrates)}const t=u.default.fromSignalFrame(e.message);t.statusCode()!==d.default.OK&&this.context.audioVideoController.handleMeetingSessionStatus(t,null)}}}t.default=g,g.DEFAULT_TIMEOUT_FOR_START_SENDING_VIDEO_MS=3e4,g.DEFAULT_DOWNLINK_CALLRATE_OVERSHOOT_FACTOR=1.5,g.DEFAULT_DOWNLINK_CALLRATE_UNDERSHOOT_FACTOR=.5},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(482);class i extends r.default{constructor(e,t,n){super(t,n),this.logger=e,this.audioDelayPointsOverMaximum=0,i.CONNECTION_UNHEALTHY_THRESHOLD=t.connectionUnhealthyThreshold,i.CONNECTION_WAIT_TIME_MS=t.connectionWaitTimeMs,i.MISSED_PONGS_THRESHOLD=t.missedPongsUpperThreshold,i.MAXIMUM_AUDIO_DELAY_MS=t.maximumAudioDelayMs,i.MAXIMUM_AUDIO_DELAY_DATA_POINTS=t.maximumAudioDelayDataPoints}health(){if(this.currentData.isConnectionStartRecent(i.CONNECTION_WAIT_TIME_MS))return 1;const e=this.currentData.consecutiveStatsWithNoPackets>=i.CONNECTION_UNHEALTHY_THRESHOLD,t=this.currentData.consecutiveMissedPongs>=i.MISSED_PONGS_THRESHOLD;this.currentData.audioSpeakerDelayMs>i.MAXIMUM_AUDIO_DELAY_MS?this.audioDelayPointsOverMaximum+=1:this.audioDelayPointsOverMaximum=0;const n=this.audioDelayPointsOverMaximum>i.MAXIMUM_AUDIO_DELAY_DATA_POINTS;return n&&(this.audioDelayPointsOverMaximum=0),e||t||n?(this.logger.warn(`reconnection recommended due to: no packets received: ${e}, missed pongs: ${t}, bad audio delay: ${n}`),0):1}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(482);class i extends r.default{constructor(e,t){super(e,t),this.coolDownTimeMs=e.cooldownTimeMs,this.pastSamplesToConsider=e.pastSamplesToConsider,this.fractionalLoss=e.fractionalLoss,this.packetsExpected=e.packetsExpected,this.maximumTimesToWarn=e.maximumTimesToWarn,this.lastWarnTimestampMs=0,this.warnCount=0}calculateFractionalLoss(){if(this.currentData.packetsReceivedInLastMinute.length<this.pastSamplesToConsider)return 0;const e=this.pastSamplesToConsider,t=e*this.packetsExpected;let n=0;for(let t=0;t<e;t++)n+=this.currentData.packetsReceivedInLastMinute[t];return Math.min(Math.max(1-n/t,0),1)}health(){return Date.now()-this.lastWarnTimestampMs<this.coolDownTimeMs?this.currentHealth:this.calculateFractionalLoss()>=this.fractionalLoss?0!==this.currentHealth&&(this.lastWarnTimestampMs=Date.now(),this.warnCount++,this.warnCount>this.maximumTimesToWarn)?1:0:1}}t.default=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(869),a=n(146),o=n(101);class s extends o.default{constructor(e){super(e.logger),this.context=e,this.taskName="OpenSignalingConnectionTask",this.taskCanceler=null}cancel(){this.taskCanceler&&(this.taskCanceler.cancel(),this.taskCanceler=null)}run(){return r(this,void 0,void 0,(function*(){const e=this.context.meetingSessionConfiguration;this.context.signalingClient.openConnection(new i.default(e.urls.signalingURL,e.credentials.joinToken));const t=Date.now();try{yield new Promise((e,t)=>{const n=new class{constructor(e){this.signalingClient=e}cancel(){this.signalingClient.removeObserver(this),t(new Error("OpenSignalingConnectionTask got canceled while waiting to open signaling connection"))}handleSignalingClientEvent(n){switch(n.type){case a.default.WebSocketOpen:this.signalingClient.removeObserver(this),e();break;case a.default.WebSocketFailed:this.signalingClient.removeObserver(this),t(new Error("WebSocket connection failed"))}}}(this.context.signalingClient);this.context.signalingClient.registerObserver(n),this.taskCanceler=n})}catch(e){throw e}finally{this.context.signalingOpenDurationMs=Math.round(Date.now()-t),this.logger.info(`Opening signaling connection took ${this.context.signalingOpenDurationMs} ms`)}}))}}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t){this.signalingURL=e,this.joinToken=t}url(){return this.signalingURL+"?X-Chime-Control-Protocol-Version=3&X-Amzn-Chime-Send-Close-On-Error=1"}protocols(){return["_aws_wt_session",this.joinToken]}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(101);class a extends i.default{constructor(e,t,n){super(e),this.taskName=t,this.tasksToRunParallel=n;for(const e of n)e.setParent(this)}cancel(){for(const e of this.tasksToRunParallel)this.logger.info(`canceling parallel group task ${this.name()} subtask ${e.name()}`),e.cancel()}run(){return r(this,void 0,void 0,(function*(){const e=[];for(const t of this.tasksToRunParallel)this.logger.info(`parallel group task ${this.name()} running subtask ${t.name()}`),e.push(t.run());const t=[];for(let n=0;n<e.length;n++){try{yield e[n]}catch(e){t.push(`task ${this.tasksToRunParallel[n].name()} failed: ${e.message}`)}this.logger.info(`parallel group task ${this.name()} completed subtask ${this.tasksToRunParallel[n].name()}`)}if(t.length>0){const e=t.join(", ");this.logAndThrow(`parallel group task ${this.name()} failed for tasks: ${e}`)}this.logger.info(`parallel group task ${this.name()} completed`)}))}}t.default=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(101);class a extends i.default{constructor(e){super(e.logger),this.context=e,this.taskName="ReceiveAudioInputTask"}run(){var e,t;return r(this,void 0,void 0,(function*(){if(!(null===(t=null===(e=this.context.meetingSessionConfiguration)||void 0===e?void 0:e.urls)||void 0===t?void 0:t.audioHostURL))return void this.context.logger.info("No audio connection: not acquiring audio input");if(this.context.activeAudioInput)return void this.context.logger.info("an active audio input exists");let n;try{n=yield this.context.mediaStreamBroker.acquireAudioInputStream()}catch(e){this.context.logger.warn("could not acquire audio input from current device")}n?(this.context.activeAudioInput=n,this.context.realtimeController.realtimeSetLocalAudioInput(n)):this.context.logger.warn("an audio input is not available")}))}}t.default=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(183),a=n(493),o=n(308),s=n(212),l=n(101);class c extends l.default{constructor(e){super(e.logger),this.context=e,this.taskName="ReceiveTURNCredentialsTask",this.url=e.meetingSessionConfiguration.urls.turnControlURL,this.meetingId=e.meetingSessionConfiguration.meetingId,this.joinToken=e.meetingSessionConfiguration.credentials.joinToken}cancel(){if(this.cancelPromise){const e=new Error(`canceling ${this.name()}`);this.cancelPromise(e),delete this.cancelPromise}}run(){return r(this,void 0,void 0,(function*(){if(this.context.turnCredentials)return void this.context.logger.info("TURN credentials available, skipping credentials fetch");if(this.context.logger.error("missing TURN credentials - falling back to fetch"),!this.url)return void this.context.logger.info("TURN control url not supplied, skipping credentials fetch");const e={method:"POST",mode:"cors",cache:"no-cache",credentials:"omit",headers:{"Content-Type":"application/json","X-Chime-Auth-Token":"_aws_wt_session="+new o.default(this.joinToken).base()},redirect:"follow",referrer:"no-referrer",body:JSON.stringify({meetingId:this.meetingId})};this.context.logger.info(`requesting TURN credentials from ${this.url}`);const t=yield new Promise((t,n)=>r(this,void 0,void 0,(function*(){this.cancelPromise=e=>{n(e)};try{const r=yield fetch(s.default.urlWithVersion(this.url),e);if(this.context.logger.info("received TURN credentials"),r.status&&403===r.status)return void n(new Error(`canceling ${this.name()} due to the meeting status code: ${i.default.TURNCredentialsForbidden}`));if(r.status&&404===r.status)return void n(new Error(`canceling ${this.name()} due to the meeting status code: ${i.default.MeetingEnded}`));t(yield r.json())}catch(e){n(e)}finally{delete this.cancelPromise}})));this.context.turnCredentials=new a.default,this.context.turnCredentials.password=t.password,this.context.turnCredentials.ttl=t.ttl,this.context.turnCredentials.uris=t.uris.map(e=>this.context.meetingSessionConfiguration.urls.urlRewriter(e)).filter(e=>!!e),this.context.turnCredentials.username=t.username}))}}t.default=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(133),a=n(101);class o extends a.default{constructor(e){super(e.logger),this.context=e,this.taskName="ReceiveVideoInputTask"}run(){return r(this,void 0,void 0,(function*(){const e=this.context.videoDuplexMode===i.SdkStreamServiceType.RX||this.context.videoDuplexMode===i.SdkStreamServiceType.DUPLEX;if(this.context.videoTileController.hasStartedLocalVideoTile()?this.context.videoDuplexMode=e?i.SdkStreamServiceType.DUPLEX:i.SdkStreamServiceType.TX:this.context.videoDuplexMode=e?i.SdkStreamServiceType.RX:0,this.context.videoCaptureAndEncodeParameter=this.context.videoUplinkBandwidthPolicy.chooseCaptureAndEncodeParameters(),!this.context.videoTileController.hasStartedLocalVideoTile())return this.context.logger.info("has not started local video tile"),void(this.context.activeVideoInput&&this.stopVideoInput());const t=this.context.videoTileController.getLocalVideoTile();let n=null;try{n=yield this.context.mediaStreamBroker.acquireVideoInputStream()}catch(e){this.context.logger.warn("could not acquire video input from current device")}if(this.context.enableSimulcast){const e=this.context.videoUplinkBandwidthPolicy.chooseEncodingParameters();this.context.videoStreamIndex.integrateUplinkPolicyDecision(Array.from(e.values()))}if(this.context.activeVideoInput=n,n){const e=n.getVideoTracks(),r=this.context.meetingSessionConfiguration.credentials.attendeeId,i=e[0].getSettings();if(this.context.enableSimulcast){const t=this.context.videoUplinkBandwidthPolicy.chooseMediaTrackConstraints();this.context.logger.info(`simulcast: choose constraint ${JSON.stringify(t)}`);try{yield e[0].applyConstraints(t)}catch(e){this.context.logger.info("simulcast: pass video without more constraint")}}const a=this.context.audioVideoController.configuration.credentials.externalUserId;t.bindVideoStream(r,!0,n,i.width,i.height,null,a);for(let t=0;t<e.length;t++){const n=e[t];this.logger.info(`using video device label=${n.label} id=${n.id}`),this.context.videoDeviceInformation.current_camera_name=n.label,this.context.videoDeviceInformation.current_camera_id=n.id}}}))}stopVideoInput(){this.context.mediaStreamBroker.releaseMediaStream(this.context.activeVideoInput),this.context.activeVideoInput=null}}t.default=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(158),a=n(489),o=n(308),s=n(146),l=n(133),c=n(101);class u extends c.default{constructor(e){super(e.logger),this.context=e,this.taskName="ReceiveVideoStreamIndexTask"}removeObserver(){this.context.signalingClient.removeObserver(this)}run(){return r(this,void 0,void 0,(function*(){this.handleIndexFrame(this.context.indexFrame),this.context.signalingClient.registerObserver(this),this.context.removableObservers.push(this)}))}handleSignalingClientEvent(e){if(e.type!==s.default.ReceivedSignalFrame||e.message.type!==l.SdkSignalFrame.Type.INDEX)return;const t=e.message.index;this.context.logger.info(`received new index ${JSON.stringify(t)}`),this.handleIndexFrame(t)}handleIndexFrame(e){if(!e)return;const t=this.context.audioVideoController.configuration.credentials.attendeeId;e.sources=e.sources.filter(e=>{const n=new o.default(e.attendeeId);return!(n.base()===t&&n.hasModality(o.default.MODALITY_CONTENT))});const{videoStreamIndex:n,videoDownlinkBandwidthPolicy:r,videoUplinkBandwidthPolicy:a}=this.context,s=n.allVideoSendingSourcesExcludingSelf(t);n.integrateIndexFrame(e),r.updateIndex(n),a.updateIndex(n),this.resubscribe(r,a),this.updateVideoAvailability(e),this.handleIndexVideosPausedAtSource();const l=n.allVideoSendingSourcesExcludingSelf(t);this.areVideoSourcesEqual(s,l)||this.context.audioVideoController.forEachObserver(e=>{i.default.of(e.remoteVideoSourcesDidChange).map(t=>t.bind(e)(l))})}areVideoSourcesEqual(e,t){if(e.length!==t.length)return!1;const n=(e,t)=>e.attendee.attendeeId.localeCompare(t.attendee.attendeeId),r=[...e].sort(n),i=[...t].sort(n);for(let e=0;e<r.length;e++)if(r[e].attendee.attendeeId!==i[e].attendee.attendeeId)return!1;return!0}resubscribe(e,t){const n=e.wantsResubscribe(),r=(this.context.videoDuplexMode===l.SdkStreamServiceType.TX||this.context.videoDuplexMode===l.SdkStreamServiceType.DUPLEX)&&t.wantsResubscribe(),i=n||r;this.logger.info(`should resubscribe: ${i} (downlink: ${n} uplink: ${r})`),i&&(this.context.videosToReceive=e.chooseSubscriptions(),this.context.videoCaptureAndEncodeParameter=t.chooseCaptureAndEncodeParameters(),this.logger.info(`trigger resubscribe for up=${r} down=${n}; videosToReceive=[${this.context.videosToReceive.array()}] captureParams=${JSON.stringify(this.context.videoCaptureAndEncodeParameter)}`),this.context.audioVideoController.update({needsRenegotiation:!1}))}updateVideoAvailability(e){if(!this.context.videosToReceive)return void this.logger.error("videosToReceive must be set in the meeting context.");const t=new a.default;t.remoteVideoAvailable=!this.context.videosToReceive.empty(),t.canStartLocalVideo=!e.atCapacity,this.context.lastKnownVideoAvailability&&this.context.lastKnownVideoAvailability.equal(t)||(this.context.lastKnownVideoAvailability=t.clone(),this.context.audioVideoController.forEachObserver(e=>{i.default.of(e.videoAvailabilityDidChange).map(n=>n.bind(e)(t.clone()))}))}handleIndexVideosPausedAtSource(){const e=this.context.videoStreamIndex.streamsPausedAtSource();for(const t of this.context.videoTileController.getAllVideoTiles()){const n=t.state();e.contain(n.streamId)?t.markPoorConnection()&&this.logger.info(`marks the tile ${n.tileId} as having a poor connection`):t.unmarkPoorConnection()&&this.logger.info(`unmarks the tile ${n.tileId} as having a poor connection`)}}}t.default=u},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(101);class a extends i.default{constructor(e){super(e.logger),this.context=e,this.taskName="ReleaseMediaStreamsTask"}run(){return r(this,void 0,void 0,(function*(){if(this.context.mediaStreamBroker)try{this.context.mediaStreamBroker.releaseMediaStream(this.context.activeAudioInput),this.context.activeAudioInput=null,this.context.mediaStreamBroker.releaseMediaStream(this.context.activeVideoInput),this.context.activeVideoInput=null,this.context.realtimeController.realtimeSetLocalAudioInput(null)}catch(e){this.context.logger.error(`Failed to release media streams: ${e}`)}}))}}t.default=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(833),a=n(146),o=n(133),s=n(101);class l extends s.default{constructor(e){super(e.logger),this.context=e,this.taskName="SendAndReceiveDataMessagesTask",this.sendDataMessageHandler=(e,t,n)=>{if(this.context.signalingClient.ready()){let r;r=t instanceof Uint8Array?t:"string"==typeof t?(new TextEncoder).encode(t):(new TextEncoder).encode(JSON.stringify(t)),this.validateDataMessage(e,r,n);const i=o.SdkDataMessagePayload.create();i.topic=e,i.lifetimeMs=n,i.data=r;const a=o.SdkDataMessageFrame.create();a.messages=[i],this.context.signalingClient.sendDataMessage(a)}else this.context.logger.error("Signaling client is not ready")}}run(){return r(this,void 0,void 0,(function*(){this.context.removableObservers.push(this),this.context.signalingClient.registerObserver(this),this.context.realtimeController.realtimeSubscribeToSendDataMessage(this.sendDataMessageHandler)}))}removeObserver(){this.context.realtimeController.realtimeUnsubscribeFromSendDataMessage(this.sendDataMessageHandler),this.context.signalingClient.removeObserver(this)}handleSignalingClientEvent(e){if(e.type===a.default.ReceivedSignalFrame&&e.message.type===o.SdkSignalFrame.Type.DATA_MESSAGE)for(const t of e.message.dataMessage.messages){const e=new i.default(t.ingestTimeNs/1e6,t.topic,t.data,t.senderAttendeeId,t.senderExternalUserId,0===t.ingestTimeNs);this.context.realtimeController.realtimeReceiveDataMessage(e)}}validateDataMessage(e,t,n){if(!l.TOPIC_REGEX.test(e))throw new Error("Invalid topic");if(t.length>l.DATA_SIZE)throw new Error("Data size has to be less than 2048 bytes");if(n&&n<0)throw new Error("The life time of the message has to be non negative")}}t.default=l,l.TOPIC_REGEX=new RegExp(/^[a-zA-Z0-9_-]{1,36}$/),l.DATA_SIZE=2048},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(101),a=n(480);class o extends i.default{constructor(e,t,n){super(e),this.taskName=t,this.tasksToRunSerially=n,this.currentTask=null;for(const e of n)e.setParent(this)}cancel(){this.currentTask&&(this.logger.info(`canceling serial group task ${this.name()} subtask ${this.currentTask.name()}`),this.currentTask.cancel())}run(){return r(this,void 0,void 0,(function*(){for(const e of this.tasksToRunSerially){this.getStatus()===a.default.CANCELED&&this.logAndThrow(`serial group task ${this.name()} was canceled`);try{this.logger.info(`serial group task ${this.name()} running subtask ${e.name()}`),this.currentTask=e,yield e.run(),this.logger.info(`serial group task ${this.name()} completed subtask ${e.name()}`)}catch(e){this.logAndThrow(`serial group task ${this.name()} was canceled due to subtask `+`${this.currentTask.name()} error: ${e.message}`)}finally{this.currentTask=null}}this.logger.info(`serial group task ${this.name()} completed`)}))}}t.default=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(101);class a extends i.default{constructor(e){super(e.logger),this.context=e,this.taskName="SetLocalDescriptionTask"}cancel(){if(this.cancelPromise){const e=new Error(`canceling ${this.name()}`);this.cancelPromise(e),delete this.cancelPromise}}run(){return r(this,void 0,void 0,(function*(){const e=this.context.peer,t=this.context.sdpOfferInit;this.logger.debug(()=>`local description is >>>${t.sdp}<<<`),yield new Promise((n,i)=>r(this,void 0,void 0,(function*(){this.cancelPromise=e=>{i(e)};try{yield e.setLocalDescription(t),n()}catch(e){i(e)}finally{delete this.cancelPromise}}))),this.context.logger.info("set local description")}))}}t.default=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(157),a=n(309),o=n(101);class s extends o.default{constructor(e){super(e.logger),this.context=e,this.taskName="SetRemoteDescriptionTask"}cancel(){this.cancelICEPromise&&this.cancelICEPromise()}run(){return r(this,void 0,void 0,(function*(){this.context.peer||this.logAndThrow("session does not have peer connection; bypass set remote description");let e=this.context.sdpAnswer;if(e=new a.default(e).withoutServerReflexiveCandidates().sdp,this.context.audioProfile&&(e=new a.default(e).withAudioMaxAverageBitrate(this.context.audioProfile.audioBitrateBps).sdp),!this.context.browserBehavior.requiresUnifiedPlan()&&(this.logger.info("checking for no videos (plan-b)"),this.context.videosToReceive.empty()&&this.context.peer.remoteDescription)){this.logger.info("have no videos and have remote description (plan-b)");const t=this.context.peer.localDescription.sdp,n=e;let r=n;const i=new a.default(t);if(i.hasVideo()){this.logger.info(`offer has video (plan-b): >>>${i.sdp}<<<`);const e=new a.default(n);this.logger.info(`existing answer (plan-b): >>>${e.sdp}<<<`),e.hasVideo()||(this.logger.info(`copying inactive video from offer into answer (plan-b); sdp answer before is >>>${n}<<<`),r=e.copyVideo(t).sdp)}e=r}(new i.default).requiresSortCodecPreferencesForSdpAnswer()&&(e=new a.default(e).preferH264IfExists().sdp),this.logger.info(`processed remote description is >>>${e}<<<`);const t={type:"answer",sdp:e,toJSON:null};try{yield this.createICEConnectionCompletedPromise(t)}catch(e){throw e}}))}createICEConnectionCompletedPromise(e){return new Promise((t,n)=>r(this,void 0,void 0,(function*(){const r=()=>{"connected"!==this.context.peer.iceConnectionState&&"completed"!==this.context.peer.iceConnectionState||(this.context.peer.removeEventListener("iceconnectionstatechange",r),t())};this.cancelICEPromise=()=>{this.context.peer&&this.context.peer.removeEventListener("iceconnectionstatechange",r),n(new Error(`${this.name()} got canceled while waiting for the ICE connection state`))},this.context.peer.addEventListener("iceconnectionstatechange",r);try{yield this.context.peer.setRemoteDescription(e),this.logger.info("set remote description, waiting for ICE connection"),r()}catch(e){n(e)}})))}}t.default=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(310),a=n(183),o=n(309),s=n(146),l=n(881),c=n(133),u=n(101);class d extends u.default{constructor(e){super(e.logger),this.context=e,this.taskName="SubscribeAndReceiveSubscribeAckTask",this.taskCanceler=null}cancel(){this.taskCanceler&&(this.taskCanceler.cancel(),this.taskCanceler=null)}run(){return r(this,void 0,void 0,(function*(){let e="";if(this.context.peer&&this.context.peer.localDescription&&(e=this.context.browserBehavior.requiresUnifiedPlanMunging()?new o.default(this.context.peer.localDescription.sdp).withUnifiedPlanFormat().sdp:this.context.peer.localDescription.sdp),!this.context.enableSimulcast){let e=0,t=0;this.context.videoCaptureAndEncodeParameter&&(e=this.context.videoCaptureAndEncodeParameter.captureFrameRate(),t=this.context.videoCaptureAndEncodeParameter.encodeBitrates()[0]);const n={rid:"hi",maxBitrate:1e3*t,maxFramerate:e,active:!0};this.context.videoStreamIndex.integrateUplinkPolicyDecision([n])}this.context.videoStreamIndex.subscribeFrameSent();const t=this.context.videoDuplexMode===c.SdkStreamServiceType.TX||this.context.videoDuplexMode===c.SdkStreamServiceType.DUPLEX;this.context.previousSdpOffer=new o.default(e);const n=new l.default(this.context.meetingSessionConfiguration.credentials.attendeeId,e,this.context.meetingSessionConfiguration.urls.audioHostURL,this.context.realtimeController.realtimeIsLocalAudioMuted(),!1,this.context.videoSubscriptions,t,this.context.videoStreamIndex.localStreamDescriptions(),!0);this.context.logger.info(`sending subscribe: ${JSON.stringify(n)}`),this.context.signalingClient.subscribe(n);const r=yield this.receiveSubscribeAck();this.context.logger.info(`got subscribe ack: ${JSON.stringify(r)}`),this.context.sdpAnswer=r.sdpAnswer,this.context.videoStreamIndex.integrateSubscribeAckFrame(r)}))}receiveSubscribeAck(){return new Promise((e,t)=>{const n=this.context;const r=new class{constructor(e){this.signalingClient=e}cancel(){this.signalingClient.removeObserver(this),t(new Error("SubscribeAndReceiveSubscribeAckTask got canceled while waiting for SdkSubscribeAckFrame"))}handleSignalingClientEvent(t){if(t.isConnectionTerminated()){const e=`SubscribeAndReceiveSubscribeAckTask connection was terminated with code ${t.closeCode} and reason: ${t.closeReason}`;n.logger.warn(e);let r=a.default.TaskFailed;return t.closeCode>=4500&&t.closeCode<4600&&(r=a.default.SignalingInternalServerError),void n.audioVideoController.handleMeetingSessionStatus(new i.default(r),new Error(e))}if(t.type!==s.default.ReceivedSignalFrame||t.message.type!==c.SdkSignalFrame.Type.SUBSCRIBE_ACK)return;this.signalingClient.removeObserver(this);const r=t.message.suback;e(r)}}(this.context.signalingClient);this.context.signalingClient.registerObserver(r),this.taskCanceler=r})}}t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n,r,i,a,o,s,l){this.attendeeId=e,this.sdpOffer=t,this.audioHost=n,this.audioMuted=r,this.audioCheckin=i,this.receiveStreamIds=a,this.localVideoEnabled=o,this.videoStreamDescriptions=s,this.connectionTypeHasVideo=l}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(183),a=n(101);class o extends a.default{constructor(e){super(e.logger),this.context=e,this.taskName="WaitForAttendeePresenceTask"}cancel(){if(this.cancelPromise){const e=new Error(`canceling ${this.name()} due to the meeting status code: ${i.default.NoAttendeePresent}`);this.cancelPromise(e),delete this.cancelPromise}}run(){return r(this,void 0,void 0,(function*(){const e=this.context.meetingSessionConfiguration.credentials.attendeeId;return new Promise((t,n)=>{const r=(n,i,a,o,s)=>{e===n&&i&&(this.context.realtimeController.realtimeUnsubscribeToAttendeeIdPresence(r),t(),delete this.cancelPromise)};this.cancelPromise=e=>{this.context.realtimeController.realtimeUnsubscribeToAttendeeIdPresence(r),n(e)},this.context.realtimeController.realtimeSubscribeToAttendeeIdPresence(r)})}))}}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(366);class i extends r.default{constructor(e,t){super(e,t)}setupLocalTransceivers(){this.useTransceivers()&&(this.defaultMediaStream||"undefined"==typeof MediaStream||(this.defaultMediaStream=new MediaStream),this._localCameraTransceiver||(this._localCameraTransceiver=this.peer.addTransceiver("video",{direction:"inactive",streams:[this.defaultMediaStream]})))}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e=0,t=0){this.networkIssueResponseDelayFactor=e,this.networkIssueRecoveryDelayFactor=t,e<0?e=0:e>1&&(e=1),this.networkIssueResponseDelayFactor=e,t<0?t=0:t>1&&(t=1),this.networkIssueRecoveryDelayFactor=t}}t.default=r,r.Default=new r(0,0),r.UnstableNetworkPreset=new r(0,1),r.StableNetworkPreset=new r(1,0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(133),i=n(499),a=n(500);class o extends i.default{constructor(e){super(e),this.streamIdToBitrateKbpsMap=new Map,this._localStreamInfos=[],this._lastBitRateMsgTime=Date.now()}localStreamDescriptions(){const e=[];return this._localStreamInfos.forEach(t=>{e.push(t.clone())}),e}integrateUplinkPolicyDecision(e){let t=!0,n=0;for(let r=0;r<e.length;r++){const i=e[r].maxBitrate/1e3,o=e[r].maxFramerate;if(t&&r!==this._localStreamInfos.length)0===this._localStreamInfos[n].maxBitrateKbps&&i>0&&(this._localStreamInfos[n].timeEnabled=Date.now()),this._localStreamInfos[n].maxBitrateKbps=i,this._localStreamInfos[n].maxFrameRate=o,this._localStreamInfos[n].disabledByUplinkPolicy=0===i,!0===this._localStreamInfos[n].disabledByUplinkPolicy&&(this._localStreamInfos[n].disabledByWebRTC=!1),n++;else{t=!1;const e=new a.default;e.maxBitrateKbps=i,e.maxFrameRate=o,e.disabledByUplinkPolicy=0===i,0!==i&&(e.timeEnabled=Date.now()),this._localStreamInfos.push(e),n++}}t&&this._localStreamInfos.splice(n)}integrateBitratesFrame(e){super.integrateBitratesFrame(e);const t=new Set,n=new Set(this.streamIdToBitrateKbpsMap.keys());for(const n of e.bitrates)t.add(n.sourceStreamId),this.streamIdToBitrateKbpsMap.set(n.sourceStreamId,this.convertBpsToKbps(n.avgBitrateBps));for(const e of n)if(!t.has(e)){this.streamIdToBitrateKbpsMap.get(e)===o.UNSEEN_STREAM_BITRATE?this.streamIdToBitrateKbpsMap.set(e,o.RECENTLY_INACTIVE_STREAM_BITRATE):this.streamIdToBitrateKbpsMap.set(e,o.NOT_SENDING_STREAM_BITRATE)}for(let e=0;e<this._localStreamInfos.length;e++){this._localStreamInfos[e].disabledByWebRTC=!1;const t=this._localStreamInfos[e].streamId;if(!this._localStreamInfos[e].disabledByUplinkPolicy)if(this.streamIdToBitrateKbpsMap.has(t)){this.streamIdToBitrateKbpsMap.get(t)===o.NOT_SENDING_STREAM_BITRATE&&this._lastBitRateMsgTime-this._localStreamInfos[e].timeEnabled>o.BitratesMsgFrequencyMs&&(this._localStreamInfos[e].disabledByWebRTC=!0)}else this._lastBitRateMsgTime-this._localStreamInfos[e].timeEnabled>o.BitratesMsgFrequencyMs&&(this._localStreamInfos[e].disabledByWebRTC=!0)}this._lastBitRateMsgTime=Date.now(),this.logLocalStreamDescriptions()}logLocalStreamDescriptions(){let e="";for(const t of this._localStreamInfos)e+=`streamId=${t.streamId} maxBitrate=${t.maxBitrateKbps} disabledByWebRTC=${t.disabledByWebRTC} disabledByUplink=${t.disabledByUplinkPolicy}\n`;this.logger.debug(()=>e)}integrateIndexFrame(e){super.integrateIndexFrame(e);const t=new Set,n=new Set(this.streamIdToBitrateKbpsMap.keys());for(const e of this.currentIndex.sources)e.mediaType===r.SdkStreamMediaType.VIDEO&&(t.add(e.streamId),this.streamIdToBitrateKbpsMap.has(e.streamId)||this.streamIdToBitrateKbpsMap.set(e.streamId,o.UNSEEN_STREAM_BITRATE));for(const e of n)t.has(e)||this.streamIdToBitrateKbpsMap.delete(e)}integrateSubscribeAckFrame(e){if(super.integrateSubscribeAckFrame(e),!e.allocations||void 0===e.allocations)return;let t=0;for(const n of e.allocations){if(this._localStreamInfos.length<t+1){this.logger.info("simulcast: allocation has more than number of local streams");break}this._localStreamInfos[t].groupId=n.groupId,this._localStreamInfos[t].streamId=n.streamId,this.streamIdToBitrateKbpsMap.has(n.streamId)||this.streamIdToBitrateKbpsMap.set(n.streamId,o.UNSEEN_STREAM_BITRATE),t++}}}t.default=o,o.UNSEEN_STREAM_BITRATE=-2,o.RECENTLY_INACTIVE_STREAM_BITRATE=-1,o.NOT_SENDING_STREAM_BITRATE=0,o.BitratesMsgFrequencyMs=4e3},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(887),a=n(888),o=n(158);t.default=class{constructor(e,t,n){this.tileFactory=e,this.audioVideoController=t,this.logger=n,this.tileMap=new Map,this.nextTileId=1,this.currentLocalTile=null,this.currentPausedTilesByIds=new Set}createDevicePixelRatioMonitorIfNeeded(){this.devicePixelRatioMonitor||(this.devicePixelRatioMonitor=new i.default(new a.default,this.logger))}discardDevicePixelRatioMonitorIfNotNeeded(){return r(this,void 0,void 0,(function*(){if(this.tileMap.size||!this.devicePixelRatioMonitor)return;const e=this.devicePixelRatioMonitor;return this.devicePixelRatioMonitor=void 0,e.destroy()}))}bindVideoElement(e,t){const n=this.getVideoTile(e);null!==n?n.bindVideoElement(t):this.logger.warn(`Ignoring video element binding for unknown tile id ${e}`)}unbindVideoElement(e){this.bindVideoElement(e,null)}startLocalVideoTile(){const e=this.findOrCreateLocalVideoTile();return this.currentLocalTile.stateRef().localTileStarted=!0,this.audioVideoController.update({needsRenegotiation:!0}),e.id()}stopLocalVideoTile(){this.currentLocalTile&&(this.currentLocalTile.stateRef().localTileStarted=!1,this.currentLocalTile.bindVideoStream(this.audioVideoController.configuration.credentials.attendeeId,!0,null,null,null,null,this.audioVideoController.configuration.credentials.externalUserId),this.audioVideoController.update({needsRenegotiation:!0}))}hasStartedLocalVideoTile(){return!(!this.currentLocalTile||!this.currentLocalTile.stateRef().localTileStarted)}removeLocalVideoTile(){this.currentLocalTile&&this.removeVideoTile(this.currentLocalTile.id())}getLocalVideoTile(){return this.currentLocalTile}pauseVideoTile(e){const t=this.getVideoTile(e);t&&(this.currentPausedTilesByIds.has(e)||(this.audioVideoController.pauseReceivingStream(t.stateRef().streamId),this.currentPausedTilesByIds.add(e)),t.pause())}unpauseVideoTile(e){const t=this.getVideoTile(e);t&&(this.currentPausedTilesByIds.has(e)&&(this.audioVideoController.resumeReceivingStream(t.stateRef().streamId),this.currentPausedTilesByIds.delete(e)),t.unpause())}getVideoTile(e){return this.tileMap.has(e)?this.tileMap.get(e):null}getVideoTileArea(e){const t=e.state();let n=0,r=0;return t.boundVideoElement&&(n=t.boundVideoElement.clientHeight*t.devicePixelRatio,r=t.boundVideoElement.clientWidth*t.devicePixelRatio),n*r}getAllRemoteVideoTiles(){const e=new Array;return this.tileMap.forEach((t,n)=>{this.currentLocalTile&&n===this.currentLocalTile.id()||e.push(t)}),e}getAllVideoTiles(){return Array.from(this.tileMap.values())}addVideoTile(e=!1){const t=this.nextTileId;this.nextTileId+=1,this.createDevicePixelRatioMonitorIfNeeded();const n=this.tileFactory.makeTile(t,e,this,this.devicePixelRatioMonitor);return this.tileMap.set(t,n),n}removeVideoTile(e){if(!this.tileMap.has(e))return;const t=this.tileMap.get(e);this.currentLocalTile===t&&(this.currentLocalTile=null),t.destroy(),this.tileMap.delete(e),this.audioVideoController.forEachObserver(t=>{o.default.of(t.videoTileWasRemoved).map(n=>n.bind(t)(e))}),this.discardDevicePixelRatioMonitorIfNotNeeded()}removeVideoTilesByAttendeeId(e){const t=[];for(const n of this.getAllVideoTiles()){const r=n.state();r.boundAttendeeId===e&&(this.removeVideoTile(r.tileId),t.push(r.tileId))}return t}removeAllVideoTiles(){const e=Array.from(this.tileMap.keys());for(const t of e)this.removeVideoTile(t)}sendTileStateUpdate(e){this.audioVideoController.forEachObserver(t=>{o.default.of(t.videoTileDidUpdate).map(n=>n.bind(t)(e))})}haveVideoTilesWithStreams(){for(const e of this.getAllVideoTiles())if(e.state().boundVideoStream)return!0;return!1}haveVideoTileForAttendeeId(e){return!!this.getVideoTileForAttendeeId(e)}getVideoTileForAttendeeId(e){for(const t of this.getAllVideoTiles()){if(t.state().boundAttendeeId===e)return t}}captureVideoTile(e){const t=this.getVideoTile(e);return t?t.capture():null}findOrCreateLocalVideoTile(){return this.currentLocalTile?this.currentLocalTile:(this.currentLocalTile=this.addVideoTile(!0),this.currentLocalTile.bindVideoStream(this.audioVideoController.configuration.credentials.attendeeId,!0,null,null,null,null,this.audioVideoController.configuration.credentials.externalUserId),this.currentLocalTile)}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t){if(this.devicePixelRatioSource=e,this.observerQueue=new Set,this.mediaQueryListener=()=>{this.observerQueue.forEach(e=>{e.devicePixelRatioChanged(this.devicePixelRatioSource.devicePixelRatio())})},"undefined"==typeof window)return;const n=matchMedia(`(resolution: ${this.devicePixelRatioSource.devicePixelRatio()}dppx)`);"function"==typeof n.addEventListener?(n.addEventListener("change",this.mediaQueryListener),this.mediaQueryList=n):"function"==typeof n.addListener?(n.addListener(this.mediaQueryListener),this.mediaQueryList=n):t.warn("ignoring DefaultDevicePixelRatioMonitor")}destroy(){return r(this,void 0,void 0,(function*(){this.mediaQueryList&&("function"==typeof this.mediaQueryList.addEventListener?this.mediaQueryList.removeEventListener("change",this.mediaQueryListener):this.mediaQueryList.removeListener(this.mediaQueryListener)),delete this.mediaQueryListener,this.observerQueue.clear()}))}registerObserver(e){this.observerQueue.add(e),e.devicePixelRatioChanged(this.devicePixelRatioSource.devicePixelRatio())}removeObserver(e){this.observerQueue.delete(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{devicePixelRatio(){return"undefined"!=typeof window&&window&&window.devicePixelRatio?window.devicePixelRatio:1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(484);t.default=class{makeTile(e,t,n,i){return new r.default(e,t,n,i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(158),i=n(182),a=n(891),o=n(495),s=n(311),l=n(801);class c{constructor(e,t){this.selfAttendeeId=e,this.logger=t,this.numSenders=0,this.numParticipants=-1,this.newQualityMap=new Map,this.currentQualityMap=new Map,this.newActiveStreams=1,this.currentActiveStreams=1,this.lastUplinkBandwidthKbps=c.defaultUplinkBandwidthKbps,this.startTimeMs=0,this.lastUpdatedMs=Date.now(),this.videoIndex=null,this.currLocalDescriptions=[],this.nextLocalDescriptions=[],this.observerQueue=new Set,this.optimalParameters=new s.default(0,0,0,0,!0),this.parametersInEffect=new s.default(0,0,0,0,!0),this.lastUplinkBandwidthKbps=c.defaultUplinkBandwidthKbps,this.currentQualityMap=this.fillEncodingParamWithBitrates([300,0,1200]),this.newQualityMap=this.fillEncodingParamWithBitrates([300,0,1200])}updateConnectionMetric({uplinkKbps:e=0}){if(isNaN(e))return;0===this.startTimeMs&&(this.startTimeMs=Date.now()),Date.now()-this.startTimeMs<c.startupDurationMs?this.lastUplinkBandwidthKbps=c.defaultUplinkBandwidthKbps:this.lastUplinkBandwidthKbps=e,this.logger.debug(()=>`simulcast: uplink policy update metrics ${this.lastUplinkBandwidthKbps}`);let t=c.holdDownDurationMs;3===this.currentActiveStreams?t=2*c.holdDownDurationMs:(2===this.currentActiveStreams&&e<=c.kMidDisabledRate||1===this.currentActiveStreams&&e<=c.kHiDisabledRate)&&(t=c.holdDownDurationMs/2),Date.now()<this.lastUpdatedMs+t||(this.newQualityMap=this.calculateEncodingParameters(!1))}calculateEncodingParameters(e){const t=[new l.default,new l.default,new l.default];let n=0,r=0;if(0===this.currentActiveStreams?(n=this.lastUplinkBandwidthKbps+1,r=0):1===this.currentActiveStreams?(n=2400,r=c.kHiDisabledRate):2===this.currentActiveStreams?(n=1e3,r=c.kMidDisabledRate):(n=300,r=0),e||this.lastUplinkBandwidthKbps>=n||this.lastUplinkBandwidthKbps<=r){this.numParticipants>=0&&this.numParticipants<=2?(this.newActiveStreams=0,t[0].maxBitrateKbps=0,t[1].maxBitrateKbps=0,t[2].maxBitrateKbps=1200):this.numSenders<=4&&this.lastUplinkBandwidthKbps>=c.kHiDisabledRate?(this.newActiveStreams=1,t[0].maxBitrateKbps=300,t[1].maxBitrateKbps=0,t[2].maxBitrateKbps=1200):this.lastUplinkBandwidthKbps>=c.kMidDisabledRate?(this.newActiveStreams=2,t[0].maxBitrateKbps=this.lastUplinkBandwidthKbps>=350?200:150,t[1].maxBitrateKbps=this.numSenders<=6?600:350,t[2].maxBitrateKbps=0):(this.newActiveStreams=3,t[0].maxBitrateKbps=300,t[1].maxBitrateKbps=0,t[2].maxBitrateKbps=0);const e=t.map((e,t,n)=>e.maxBitrateKbps);this.newQualityMap=this.fillEncodingParamWithBitrates(e),this.encodingParametersEqual()||this.logger.info(`simulcast: policy:calculateEncodingParameters bw:${this.lastUplinkBandwidthKbps} numSources:${this.numSenders} numClients:${this.numParticipants} newQualityMap: ${this.getQualityMapString(this.newQualityMap)}`)}return this.newQualityMap}chooseMediaTrackConstraints(){return{width:{ideal:1280},height:{ideal:768},frameRate:{ideal:15}}}chooseEncodingParameters(){return this.currentQualityMap=this.newQualityMap,this.currentActiveStreams=this.newActiveStreams,this.activeStreamsToPublish!==this.newActiveStreams&&(this.activeStreamsToPublish=this.newActiveStreams,this.publishEncodingSimulcastLayer()),this.currentQualityMap}updateIndex(e){const t=e.numberOfVideoPublishingParticipantsExcludingSelf(this.selfAttendeeId)+1,n=e.numberOfParticipants(),r=t!==this.numSenders,i=n>2&&this.numParticipants<=2||n<=2&&this.numParticipants>2;this.numSenders=t,this.numParticipants=n,this.optimalParameters=new s.default(this.captureWidth(),this.captureHeight(),this.captureFrameRate(),this.maxBandwidthKbps(),!1),this.videoIndex=e,this.newQualityMap=this.calculateEncodingParameters(r||i)}wantsResubscribe(){let e=!this.encodingParametersEqual();this.nextLocalDescriptions=this.videoIndex.localStreamDescriptions();for(let t=0;t<this.nextLocalDescriptions.length;t++){const n=this.nextLocalDescriptions[t].streamId;if(0!==n&&n){const r=this.currLocalDescriptions.findIndex(e=>e.streamId===n);-1!==r&&this.nextLocalDescriptions[t].disabledByWebRTC!==this.currLocalDescriptions[r].disabledByWebRTC&&(e=!0)}}return e&&(this.lastUpdatedMs=Date.now()),this.currLocalDescriptions=this.nextLocalDescriptions,e}compareEncodingParameter(e,t){return JSON.stringify(e)===JSON.stringify(t)}encodingParametersEqual(){let e=!1;for(const t of o.default.NAME_ARR_ASCENDING)if(e=e||!this.compareEncodingParameter(this.newQualityMap.get(t),this.currentQualityMap.get(t)),e)break;return!e}chooseCaptureAndEncodeParameters(){return this.parametersInEffect=this.optimalParameters.clone(),this.parametersInEffect.clone()}captureWidth(){return 1280}captureHeight(){return 768}captureFrameRate(){return 15}maxBandwidthKbps(){return 1400}setIdealMaxBandwidthKbps(e){}setHasBandwidthPriority(e){}fillEncodingParamWithBitrates(e){const t=new Map,n=o.default.NAME_ARR_ASCENDING,r=e;let i=4;for(let e=0;e<n.length;e++){const a=n[e];t.set(a,{rid:a,active:r[e]>0,scaleResolutionDownBy:i,maxBitrate:1e3*r[e]}),i/=2}return t}getQualityMapString(e){let t="";const n=this.videoIndex.localStreamDescriptions();return 3===n.length&&e.forEach(e=>{let r=!1;r="low"===e.rid?n[0].disabledByWebRTC:"mid"===e.rid?n[1].disabledByWebRTC:n[2].disabledByWebRTC,t+=`{ rid: ${e.rid} active:${e.active} disabledByWebRTC: ${r} maxBitrate:${e.maxBitrate}}`}),t}getEncodingSimulcastLayer(e){switch(e){case 0:return a.default.High;case 1:return a.default.LowAndHigh;case 2:return a.default.LowAndMedium;case 3:return a.default.Low}}publishEncodingSimulcastLayer(){const e=this.getEncodingSimulcastLayer(this.activeStreamsToPublish);this.forEachObserver(t=>{r.default.of(t.encodingSimulcastLayersDidChange).map(n=>n.bind(t)(e))})}addObserver(e){this.logger.info("adding simulcast uplink observer"),this.observerQueue.add(e)}removeObserver(e){this.logger.info("removing simulcast uplink observer"),this.observerQueue.delete(e)}forEachObserver(e){for(const t of this.observerQueue)i.default.nextTick(()=>{this.observerQueue.has(t)&&e(t)})}}t.default=c,c.defaultUplinkBandwidthKbps=1200,c.startupDurationMs=6e3,c.holdDownDurationMs=4e3,c.defaultMaxFrameRate=15,c.kHiDisabledRate=700,c.kMidDisabledRate=240},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SimulcastLayers=void 0,function(e){e[e.Low=0]="Low",e[e.LowAndMedium=1]="LowAndMedium",e[e.LowAndHigh=2]="LowAndHigh",e[e.Medium=3]="Medium",e[e.MediumAndHigh=4]="MediumAndHigh",e[e.High=5]="High"}(r=t.SimulcastLayers||(t.SimulcastLayers={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,n,r,i){this.logger=e,this.realtimeController=t,this.minVolumeDecibels=n,this.maxVolumeDecibels=r,this.selfAttendeeId=i,this.streamIdToAttendeeId={},this.streamIdToExternalUserId={},this.warnedAboutMissingStreamIdMapping={},this.attendeeIdToStreamId={},this.sessionReconnected=!1}onReconnect(){this.sessionReconnected=!0}sendRealtimeUpdatesForAudioStreamIdInfo(e){let t=0;for(const n of e.streams){const r=!!n.attendeeId,i=!!n.externalUserId,a=n.hasOwnProperty("muted"),o=!!n.dropped;if(r){this.attendeeIdToStreamId[n.attendeeId]&&this.attendeeIdToStreamId[n.attendeeId]<n.audioStreamId&&delete this.attendeeIdToStreamId[n.attendeeId],this.streamIdToAttendeeId[n.audioStreamId]=n.attendeeId;const r=i?n.externalUserId:n.attendeeId;this.streamIdToExternalUserId[n.audioStreamId]=r,this.attendeeIdToStreamId[n.attendeeId]=n.audioStreamId,this.realtimeController.realtimeSetAttendeeIdPresence(n.attendeeId,!0,r,!1,{attendeeIndex:t++,attendeesInFrame:e.streams.length})}if(a){const e=this.streamIdToAttendeeId[n.audioStreamId],t=this.streamIdToExternalUserId[n.audioStreamId];this.realtimeController.realtimeUpdateVolumeIndicator(e,null,n.muted,null,t)}if(!r&&!a){const r=this.streamIdToAttendeeId[n.audioStreamId];if(r){const i=this.streamIdToExternalUserId[n.audioStreamId];delete this.streamIdToAttendeeId[n.audioStreamId],delete this.streamIdToExternalUserId[n.audioStreamId],delete this.warnedAboutMissingStreamIdMapping[n.audioStreamId],this.attendeeIdToStreamId[r]===n.audioStreamId&&delete this.attendeeIdToStreamId[r];let a=!1;for(const e of Object.keys(this.streamIdToAttendeeId)){const t=parseInt(e);if(t>n.audioStreamId&&this.streamIdToAttendeeId[t]===r){a=!0;break}}a||this.realtimeController.realtimeSetAttendeeIdPresence(r,!1,i,o,{attendeeIndex:t++,attendeesInFrame:e.streams.length})}}}this.sessionReconnected&&(this.cleanUpState(e),this.sessionReconnected=!1)}cleanUpState(e){const t=Object.values(this.streamIdToAttendeeId),n=e.streams.map(e=>e.attendeeId),r=t.filter(e=>!n.includes(e));for(const[e,t]of r.entries()){const n=this.attendeeIdToStreamId[t],r=this.streamIdToExternalUserId[n];delete this.streamIdToAttendeeId[n],delete this.streamIdToExternalUserId[n],delete this.warnedAboutMissingStreamIdMapping[n],delete this.attendeeIdToStreamId[t],t!==this.selfAttendeeId?this.realtimeController.realtimeSetAttendeeIdPresence(t,!1,r,!1,{attendeeIndex:e,attendeesInFrame:t.length}):this.logger.warn("the volume indicator adapter cleans up the current attendee (presence = false) after reconnection")}}sendRealtimeUpdatesForAudioMetadata(e){let t=null,n=null;for(const r of e.attendeeStates){const e=this.attendeeIdForStreamId(r.audioStreamId);r.hasOwnProperty("volume")&&(null===t&&(t={}),null!==e&&(t[e]=this.normalizedVolume(r))),r.hasOwnProperty("signalStrength")&&(null===n&&(n={}),null!==e&&(n[e]=this.normalizedSignalStrength(r)))}this.applyRealtimeUpdatesForAudioMetadata(t,n)}normalizedVolume(e){const t=1-(-e.volume-this.maxVolumeDecibels)/(this.minVolumeDecibels-this.maxVolumeDecibels);return Math.min(Math.max(t,0),1)}normalizedSignalStrength(e){const t=e.signalStrength/r.MAX_SIGNAL_STRENGTH_LEVELS;return Math.min(Math.max(t,0),1)}applyRealtimeUpdatesForAudioMetadata(e,t){for(const n in this.streamIdToAttendeeId){const i=this.streamIdToAttendeeId[n],a=this.streamIdToExternalUserId[n];let o=null,s=null;null!==e&&(o=e.hasOwnProperty(i)?e[i]:r.IMPLICIT_VOLUME),null!==t&&(s=t.hasOwnProperty(i)?t[i]:r.IMPLICIT_SIGNAL_STRENGTH),null===o&&null===s||this.realtimeController.realtimeUpdateVolumeIndicator(i,o,null,s,a)}}attendeeIdForStreamId(e){if(0===e)return null;const t=this.streamIdToAttendeeId[e];return t||(this.warnedAboutMissingStreamIdMapping[e]||(this.warnedAboutMissingStreamIdMapping[e]=!0,this.logger.warn(`volume indicator stream id ${e} seen before being defined`)),null)}}t.default=r,r.MAX_SIGNAL_STRENGTH_LEVELS=2,r.IMPLICIT_VOLUME=0,r.IMPLICIT_SIGNAL_STRENGTH=1},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(486);t.default=class{constructor(e,t,n,r,i,a){this.audioVideoController=e,this.videoTileController=t,this.realtimeController=n,this.audioMixController=r,this.deviceController=i,this.contentShareController=a}addObserver(e){this.audioVideoController.addObserver(e),this.trace("addObserver")}removeObserver(e){this.audioVideoController.removeObserver(e),this.trace("removeObserver")}setAudioProfile(e){this.trace("setAudioProfile",e),this.audioVideoController.setAudioProfile(e)}start(e){this.audioVideoController.start(e),this.trace("start")}stop(){this.audioVideoController.stop(),this.trace("stop")}getRTCPeerConnectionStats(e){return this.trace("getRTCPeerConnectionStats",e?e.id:null),this.audioVideoController.getRTCPeerConnectionStats(e)}bindAudioElement(e){const t=this.audioMixController.bindAudioElement(e);return this.trace("bindAudioElement",e.id,t),t}unbindAudioElement(){this.audioMixController.unbindAudioElement(),this.trace("unbindAudioElement")}bindVideoElement(e,t){this.videoTileController.bindVideoElement(e,t),this.trace("bindVideoElement",{tileId:e,videoElementId:t.id})}unbindVideoElement(e){this.videoTileController.unbindVideoElement(e),this.trace("unbindVideoElement",e)}startLocalVideoTile(){const e=this.videoTileController.startLocalVideoTile();return this.trace("startLocalVideoTile",null,e),e}stopLocalVideoTile(){this.videoTileController.stopLocalVideoTile(),this.trace("stopLocalVideoTile")}hasStartedLocalVideoTile(){const e=this.videoTileController.hasStartedLocalVideoTile();return this.trace("hasStartedLocalVideoTile",null,e),e}removeLocalVideoTile(){this.videoTileController.removeLocalVideoTile(),this.trace("removeLocalVideoTile")}getLocalVideoTile(){const e=this.videoTileController.getLocalVideoTile();return this.trace("getLocalVideoTile"),e}pauseVideoTile(e){this.videoTileController.pauseVideoTile(e),this.trace("pauseVideoTile",e)}unpauseVideoTile(e){this.videoTileController.unpauseVideoTile(e),this.trace("unpauseVideoTile",e)}getVideoTile(e){const t=this.videoTileController.getVideoTile(e);return this.trace("getVideoTile",e),t}getAllRemoteVideoTiles(){const e=this.videoTileController.getAllRemoteVideoTiles();return this.trace("getAllRemoteVideoTiles"),e}getAllVideoTiles(){const e=this.videoTileController.getAllVideoTiles();return this.trace("getAllVideoTiles"),e}addVideoTile(){const e=this.videoTileController.addVideoTile();return this.trace("addVideoTile",null,e.state()),e}removeVideoTile(e){this.videoTileController.removeVideoTile(e),this.trace("removeVideoTile",e)}removeVideoTilesByAttendeeId(e){const t=this.videoTileController.removeVideoTilesByAttendeeId(e);return this.trace("removeVideoTilesByAttendeeId",e,t),t}removeAllVideoTiles(){this.videoTileController.removeAllVideoTiles(),this.trace("removeAllVideoTiles")}captureVideoTile(e){const t=this.videoTileController.captureVideoTile(e);return this.trace("captureVideoTile",e),t}realtimeSubscribeToAttendeeIdPresence(e){this.realtimeController.realtimeSubscribeToAttendeeIdPresence(e),this.trace("realtimeSubscribeToAttendeeIdPresence")}realtimeUnsubscribeToAttendeeIdPresence(e){this.realtimeController.realtimeUnsubscribeToAttendeeIdPresence(e),this.trace("realtimeUnsubscribeToAttendeeIdPresence")}realtimeSetCanUnmuteLocalAudio(e){this.realtimeController.realtimeSetCanUnmuteLocalAudio(e),this.trace("realtimeSetCanUnmuteLocalAudio",e)}realtimeSubscribeToSetCanUnmuteLocalAudio(e){this.realtimeController.realtimeSubscribeToSetCanUnmuteLocalAudio(e),this.trace("realtimeSubscribeToSetCanUnmuteLocalAudio")}realtimeUnsubscribeToSetCanUnmuteLocalAudio(e){this.realtimeController.realtimeUnsubscribeToSetCanUnmuteLocalAudio(e)}realtimeCanUnmuteLocalAudio(){const e=this.realtimeController.realtimeCanUnmuteLocalAudio();return this.trace("realtimeCanUnmuteLocalAudio",null,e),e}realtimeMuteLocalAudio(){this.realtimeController.realtimeMuteLocalAudio(),this.trace("realtimeMuteLocalAudio")}realtimeUnmuteLocalAudio(){const e=this.realtimeController.realtimeUnmuteLocalAudio();return this.trace("realtimeUnmuteLocalAudio"),e}realtimeSubscribeToMuteAndUnmuteLocalAudio(e){this.realtimeController.realtimeSubscribeToMuteAndUnmuteLocalAudio(e),this.trace("realtimeSubscribeToMuteAndUnmuteLocalAudio")}realtimeUnsubscribeToMuteAndUnmuteLocalAudio(e){this.realtimeController.realtimeUnsubscribeToMuteAndUnmuteLocalAudio(e)}realtimeIsLocalAudioMuted(){const e=this.realtimeController.realtimeIsLocalAudioMuted();return this.trace("realtimeIsLocalAudioMuted"),e}realtimeSubscribeToVolumeIndicator(e,t){this.realtimeController.realtimeSubscribeToVolumeIndicator(e,t),this.trace("realtimeSubscribeToVolumeIndicator",e)}realtimeUnsubscribeFromVolumeIndicator(e,t){this.realtimeController.realtimeUnsubscribeFromVolumeIndicator(e,t),this.trace("realtimeUnsubscribeFromVolumeIndicator",e,t)}realtimeSubscribeToLocalSignalStrengthChange(e){this.realtimeController.realtimeSubscribeToLocalSignalStrengthChange(e),this.trace("realtimeSubscribeToLocalSignalStrengthChange")}realtimeUnsubscribeToLocalSignalStrengthChange(e){this.realtimeController.realtimeUnsubscribeToLocalSignalStrengthChange(e),this.trace("realtimeUnsubscribeToLocalSignalStrengthChange")}realtimeSendDataMessage(e,t,n){this.realtimeController.realtimeSendDataMessage(e,t,n),this.trace("realtimeSendDataMessage")}realtimeSubscribeToReceiveDataMessage(e,t){this.realtimeController.realtimeSubscribeToReceiveDataMessage(e,t),this.trace("realtimeSubscribeToReceiveDataMessage")}realtimeUnsubscribeFromReceiveDataMessage(e){this.realtimeController.realtimeUnsubscribeFromReceiveDataMessage(e),this.trace("realtimeUnsubscribeFromReceiveDataMessage")}realtimeSubscribeToFatalError(e){this.realtimeController.realtimeSubscribeToFatalError(e)}realtimeUnsubscribeToFatalError(e){this.realtimeController.realtimeUnsubscribeToFatalError(e)}subscribeToActiveSpeakerDetector(e,t,n,r){this.audioVideoController.activeSpeakerDetector.subscribe(e,t,n,r),this.trace("subscribeToActiveSpeakerDetector")}unsubscribeFromActiveSpeakerDetector(e){this.audioVideoController.activeSpeakerDetector.unsubscribe(e),this.trace("unsubscribeFromActiveSpeakerDetector")}listAudioInputDevices(e=!1){return r(this,void 0,void 0,(function*(){const t=yield this.deviceController.listAudioInputDevices(e);return this.trace("listAudioInputDevices",e,t),t}))}listVideoInputDevices(e=!1){return r(this,void 0,void 0,(function*(){const t=yield this.deviceController.listVideoInputDevices(e);return this.trace("listVideoInputDevices",e,t),t}))}listAudioOutputDevices(e=!1){return r(this,void 0,void 0,(function*(){const t=yield this.deviceController.listAudioOutputDevices(e);return this.trace("listAudioOutputDevices",e,t),t}))}chooseAudioInputDevice(e){return this.trace("chooseAudioInputDevice",e),this.deviceController.chooseAudioInputDevice(e)}chooseVideoInputDevice(e){return i.isVideoTransformDevice(e)?this.trace("chooseVideoInputDevice with transform device"):this.trace("chooseVideoInputDevice",e),this.deviceController.chooseVideoInputDevice(e)}chooseAudioOutputDevice(e){const t=this.deviceController.chooseAudioOutputDevice(e);return this.trace("chooseAudioOutputDevice",e),t}addDeviceChangeObserver(e){this.deviceController.addDeviceChangeObserver(e),this.trace("addDeviceChangeObserver")}removeDeviceChangeObserver(e){this.deviceController.removeDeviceChangeObserver(e),this.trace("removeDeviceChangeObserver")}createAnalyserNodeForAudioInput(){const e=this.deviceController.createAnalyserNodeForAudioInput();return this.trace("createAnalyserNodeForAudioInput"),e}startVideoPreviewForVideoInput(e){this.deviceController.startVideoPreviewForVideoInput(e),this.trace("startVideoPreviewForVideoInput",e.id)}stopVideoPreviewForVideoInput(e){this.deviceController.stopVideoPreviewForVideoInput(e),this.trace("stopVideoPreviewForVideoInput",e.id)}setDeviceLabelTrigger(e){this.deviceController.setDeviceLabelTrigger(e),this.trace("setDeviceLabelTrigger")}mixIntoAudioInput(e){const t=this.deviceController.mixIntoAudioInput(e);return this.trace("mixIntoAudioInput",e.id),t}chooseVideoInputQuality(e,t,n,r){this.deviceController.chooseVideoInputQuality(e,t,n,r),this.trace("chooseVideoInputQuality",{width:e,height:t,frameRate:n,maxBandwidthKbps:r})}getVideoInputQualitySettings(){const e=this.deviceController.getVideoInputQualitySettings();return this.trace("getVideoInputQualitySettings"),e}setContentAudioProfile(e){this.trace("setContentAudioProfile",e),this.contentShareController.setContentAudioProfile(e)}startContentShare(e){const t=this.contentShareController.startContentShare(e);return this.trace("startContentShare"),t}startContentShareFromScreenCapture(e,t){const n=this.contentShareController.startContentShareFromScreenCapture(e,t);return this.trace("startContentShareFromScreenCapture"),n}pauseContentShare(){this.contentShareController.pauseContentShare(),this.trace("pauseContentShare")}unpauseContentShare(){this.contentShareController.unpauseContentShare(),this.trace("unpauseContentShare")}stopContentShare(){this.contentShareController.stopContentShare(),this.trace("stopContentShare")}addContentShareObserver(e){this.contentShareController.addContentShareObserver(e),this.trace("addContentShareObserver")}removeContentShareObserver(e){this.contentShareController.removeContentShareObserver(e),this.trace("removeContentShareObserver")}trace(e,t,n){let r=`API/DefaultAudioVideoFacade/${this.audioVideoController.configuration.meetingId}/${this.audioVideoController.configuration.credentials.attendeeId}/${e}`;void 0!==t&&(r+=` ${JSON.stringify(t)}`),void 0!==n&&(r+=` -> ${JSON.stringify(n)}`),this.audioVideoController.logger.info(r)}getRemoteVideoSources(){const e=this.audioVideoController.getRemoteVideoSources();return this.trace("getRemoteVideoSources",null,e),e}get transcriptionController(){return this.realtimeController.transcriptionController}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(158),a=n(502),o=n(368),s=n(308),l=n(182),c=n(307);t.default=class{constructor(e,t,n){this.mediaStreamBroker=e,this.contentAudioVideo=t,this.attendeeAudioVideo=n,this.observerQueue=new Set,this.destroyed=!1,this.contentAudioVideo.addObserver(this),this.setupContentShareEvents()}static createContentShareMeetingSessionConfigure(e){const t=new a.default;return t.meetingId=e.meetingId,t.externalMeetingId=e.externalMeetingId,t.urls=e.urls,t.credentials=new o.default,t.credentials.attendeeId=e.credentials.attendeeId+c.default.Modality,t.credentials.externalUserId=e.credentials.externalUserId,t.credentials.joinToken=e.credentials.joinToken+c.default.Modality,t}setContentAudioProfile(e){this.contentAudioVideo.setAudioProfile(e)}startContentShare(e){return r(this,void 0,void 0,(function*(){if(e){this.mediaStreamBroker.mediaStream=e;for(let e=0;e<this.mediaStreamBroker.mediaStream.getTracks().length;e++)this.mediaStreamBroker.mediaStream.getTracks()[e].addEventListener("ended",()=>{this.stopContentShare()});this.contentAudioVideo.start(),this.mediaStreamBroker.mediaStream.getVideoTracks().length>0&&this.contentAudioVideo.videoTileController.startLocalVideoTile()}}))}startContentShareFromScreenCapture(e,t){return r(this,void 0,void 0,(function*(){const n=yield this.mediaStreamBroker.acquireScreenCaptureDisplayInputStream(e,t);return yield this.startContentShare(n),n}))}pauseContentShare(){this.mediaStreamBroker.toggleMediaStream(!1)&&this.forEachContentShareObserver(e=>{i.default.of(e.contentShareDidPause).map(t=>t.call(e))})}unpauseContentShare(){this.mediaStreamBroker.toggleMediaStream(!0)&&this.forEachContentShareObserver(e=>{i.default.of(e.contentShareDidUnpause).map(t=>t.call(e))})}destroy(){return r(this,void 0,void 0,(function*(){this.contentAudioVideo&&(this.destroyed=!0,this.contentAudioVideo.removeObserver(this),this.stopContentShare(),this.observerQueue.clear(),this.contentAudioVideo=void 0,this.attendeeAudioVideo=void 0,this.mediaStreamBroker=void 0)}))}stopContentShare(){this.contentAudioVideo.stop(),this.mediaStreamBroker.cleanup()}addContentShareObserver(e){this.observerQueue.add(e)}removeContentShareObserver(e){this.observerQueue.delete(e)}forEachContentShareObserver(e){for(const t of this.observerQueue)l.default.nextTick(()=>{this.observerQueue.has(t)&&e(t)})}audioVideoDidStop(e){this.mediaStreamBroker.cleanup(),this.contentShareTile&&(this.attendeeAudioVideo.videoTileController.removeVideoTile(this.contentShareTile.id()),this.contentShareTile=null),this.forEachContentShareObserver(e=>{i.default.of(e.contentShareDidStop).map(t=>t.call(e))})}setupContentShareEvents(){this.attendeeAudioVideo.realtimeController.realtimeSubscribeToAttendeeIdPresence((e,t,n,r)=>{const a=new s.default(e).hasModality(s.default.MODALITY_CONTENT),o=new s.default(e).base()===this.attendeeAudioVideo.configuration.credentials.attendeeId;if(!a||!o||!t||this.contentShareTile)return;const l=this.mediaStreamBroker.mediaStream;if(null==l?void 0:l.getVideoTracks().length){this.contentShareTile=this.attendeeAudioVideo.videoTileController.addVideoTile();const e=l.getVideoTracks()[0];let t,n;if(e.getSettings){const r=e.getSettings();t=r.width,n=r.height}else{const r=e.getCapabilities();t=r.width,n=r.height}this.contentShareTile.bindVideoStream(this.contentAudioVideo.configuration.credentials.attendeeId,!1,l,t,n,null,this.contentAudioVideo.configuration.credentials.externalUserId)}this.forEachContentShareObserver(e=>{i.default.of(e.contentShareDidStart).map(t=>t.call(e))})})}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(505),a=n(896);t.default=class{constructor(e,t){this.reportingEvents=!1,this.importantEvents=["meetingEnded","meetingFailed","meetingStartFailed","audioInputFailed","videoInputFailed","meetingStartSucceeded"],this.destroyed=!1;const{eventsClientConfiguration:n,ingestionURL:r,eventBufferConfiguration:i}=e,{eventsToIgnore:o}=n;this.eventBuffer=new a.default(i,n,r,this.importantEvents,t),this.logger=t,this.eventsToIgnore=o,this.start()}start(){if(!this.reportingEvents)try{this.eventBuffer.start(),this.logger.info("Event reporting started"),this.reportingEvents=!0}catch(e){this.logger.error(`Event Reporting - Error starting the event buffer ${e}`)}}stop(){if(this.reportingEvents)try{this.eventBuffer.stop(),this.logger.info("Event reporting stopped"),this.reportingEvents=!1}catch(e){this.logger.error(`Event Reporting - Error stopping the event buffer ${e}`)}}reportEvent(e,t,n){return r(this,void 0,void 0,(function*(){if(this.logger.debug(`Event Reporting - DefaultMeetingEventReporter - event received in reportEvent ${e}, ${t}, ${JSON.stringify(n)}`),this.eventsToIgnore.includes(t))this.logger.debug(`Event Reporting - DefaultMeetingEventReporter - ${t} event will be ignored as it is in events to ignore`);else try{this.logger.debug("Event Reporting - DefaultMeetingEventReporter - adding item to event buffer"),yield this.eventBuffer.addItem({ts:e,name:t,attributes:n})}catch(e){this.logger.error(`Event Reporting - Error adding event to buffer ${e}`)}}))}destroy(){return r(this,void 0,void 0,(function*(){this.destroyed=!0,this.stop(),i.isDestroyable(this.eventBuffer)&&this.eventBuffer.destroy(),this.eventBuffer=void 0}))}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0});const a=n(235),o=n(211),s=n(897),l=n(503);class c{constructor(e,t,n,a,o){this.buffer=[],this.bufferSize=0,this.maxBufferItemCapacityBytes=0,this.ingestionEventSize=0,this.flushIntervalMs=0,this.flushSize=0,this.failedIngestionEvents=[],this.retryCountLimit=15,this.lock=!1,this.cancellableEvents=new Map,this.attributesToFilter=["externalUserId","externalMeetingId","timestampMs"],this.deepCopyCurrentIngestionEvent=e=>({type:e.type,v:e.v,payloads:[...e.payloads]}),this.sendEvents=()=>r(this,void 0,void 0,(function*(){if(this.lock)return;const e=this.getItems(this.flushSize);if(0===e.length)return;this.lock=!0;const t=this.makeRequestBody(e);let n=!1;const r=Date.now();"firefox"===this.metadata.browserName.toLowerCase()&&this.cancellableEvents.set(r,e);try{this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendEvents - sending body ${t}`);const e=yield this.send(t);if(this.cancellableEvents.delete(r),e.ok)try{const n=yield e.json();this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendEvents - send successful events: ${t} message: ${JSON.stringify(n)}`)}catch(e){this.logger.warn(`Event Reporting - InMemoryJSONEventBuffer - sendEvents error reading OK response ${e} for events ${t}`)}else this.logger.error(`Event Reporting - InMemoryJSONEventBuffer - sendEvents - Failed to send events ${t} with response status ${e.status}`),n=!0}catch(e){n=!0,this.logger.warn(`Event Reporting - InMemoryJSONEventBuffer - sendEvents - Error in sending events ${t} to the ingestion endpoint ${e}`)}finally{this.lock=!1}n&&(this.cancellableEvents.delete(r),this.failedIngestionEvents.push(...e))}));const l=new s.default(o).getParserResult(),{browserMajorVersion:c}=l,u=i(l,["browserMajorVersion"]),d=t.toJSON(),{type:h,v:f}=d,p=i(d,["type","v"]);this.authenticationToken=t.getAuthenticationToken(),this.metadata=Object.assign(Object.assign({},u),p),Object.keys(this.metadata).forEach(e=>this.attributesToFilter.push(e)),this.type=h,this.v=f,this.ingestionURL=n,this.logger=o,this.importantEvents=new Set(a);const{maxBufferCapacityKb:m,totalBufferItems:g,flushSize:v,flushIntervalMs:b,retryCountLimit:y}=e;this.maxBufferCapacityBytes=1024*m,this.totalBufferItems=g,this.maxBufferItemCapacityBytes=Math.round(this.maxBufferCapacityBytes/g),this.flushIntervalMs=b,this.flushSize=v,this.retryCountLimit=y,this.currentIngestionEvent=this.initializeAndGetCurrentIngestionEvent(),this.beaconEventListener=e=>this.beaconEventHandler(e),this.addEventListeners()}addEventListeners(){this.beaconEventListener&&"window"in e&&window.addEventListener&&"document"in e&&document.addEventListener&&(this.logger.debug("Event Reporting - InMemoryJSONEventBuffer - addEventListeners - adding pagehide and visibility change event listeners"),window.addEventListener("pagehide",this.beaconEventListener),document.addEventListener("visibilitychange",this.beaconEventListener))}beaconEventHandler(e){("visibilitychange"===e.type&&"hidden"===document.visibilityState||"pagehide"===e.type)&&(this.logger.debug("Event Reporting - InMemoryJSONEventBuffer - beaconEventHandler is triggered calling sendBeacon"),this.sendBeacon())}removeEventListeners(){this.beaconEventListener&&"window"in e&&window.removeEventListener&&"document"in e&&document.removeEventListener&&(window.removeEventListener("pagehide",this.beaconEventListener),document.removeEventListener("visibilitychange",this.beaconEventListener),this.logger.debug("Event Reporting - InMemoryJSONEventBuffer - removeEventListeners - removing pagehide and visibility change event listeners"))}start(){var e;this.removeEventListeners(),this.addEventListeners(),null===(e=this.intervalScheduler)||void 0===e||e.stop(),this.intervalScheduler=new o.default(this.flushIntervalMs),this.intervalScheduler.start(()=>this.sendEvents())}stop(){var e;null===(e=this.intervalScheduler)||void 0===e||e.stop(),this.intervalScheduler=void 0,this.sendBeacon(),this.removeEventListeners()}addItem(e){return r(this,void 0,void 0,(function*(){this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - addItem - received event ${JSON.stringify(e)}`);const{name:t,ts:n,attributes:r}=e,i=r&&this.filterAttributes(r,this.attributesToFilter),a=Object.assign({name:t,ts:n},i);this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - addItem - event after filtering attributes ${JSON.stringify(a)}`);const o=this.getSize(a);if(o>c.MAX_ITEM_SIZE_BYTES_ALLOWED)throw new Error(`Event Reporting - Item to be added has size ${o} bytes. Item cannot exceed max item size allowed of ${c.MAX_ITEM_SIZE_BYTES_ALLOWED} bytes.`);if(this.importantEvents.has(t))return this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - addItem - sending important event ${JSON.stringify(a)}`),void this.sendEventImmediately({name:t,ts:n,attributes:i});if(this.isFull())throw this.logger.warn("Event Reporting - Event buffer is full"),new Error("Buffer full");if(this.currentIngestionEvent.payloads.push(a),this.ingestionEventSize+=o,this.bufferItemThresholdReached(o)){const e=this.deepCopyCurrentIngestionEvent(this.currentIngestionEvent);this.buffer.push(e),this.bufferSize+=this.ingestionEventSize,this.currentIngestionEvent=this.initializeAndGetCurrentIngestionEvent(),this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - addItem - buffer item threshold reached updated buffer ${JSON.stringify(this.buffer)}`)}}))}filterAttributes(e,t){const n=new Set(t);return Object.keys(e).filter(e=>n.has(e)).forEach(t=>delete e[t]),e}initializeAndGetCurrentIngestionEvent(){const e={type:this.type,v:this.v,payloads:[]};return this.ingestionEventSize=this.getSize(e),e}bufferItemThresholdReached(e){return e+this.ingestionEventSize>=this.maxBufferItemCapacityBytes||this.currentIngestionEvent.payloads.length===c.MAX_PAYLOAD_ITEMS}getSize(e){let t=0;if("object"==typeof e)for(const[n,r]of Object.entries(e))t+=this.getPrimitiveSize(n),t+=this.getSize(r);else t+=this.getPrimitiveSize(e);return t}getPrimitiveSize(e){let t=0;return"string"==typeof e?t+=2*e.length:"number"==typeof e&&(t+=8),t}isFull(){return this.bufferSize===this.maxBufferCapacityBytes||this.buffer.length===this.totalBufferItems}isEmpty(){return 0===this.buffer.length||0===this.bufferSize}getItems(e,t=0){if(this.isEmpty())return[];return e=Math.min(this.buffer.length,e+1),this.buffer.splice(t,e)}makeBeaconRequestBody(e){const t={metadata:this.metadata,events:e,authorization:this.authenticationToken};return JSON.stringify(t)}makeRequestBody(e){const t={metadata:this.metadata,events:e};return JSON.stringify(t)}sendEventImmediately(e){return r(this,void 0,void 0,(function*(){this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendEventImmediately - important event received ${JSON.stringify(e)}`);const{name:t,ts:n,attributes:r}=e,i={type:this.type,v:this.v,payloads:[Object.assign({name:t,ts:n},r)]};let a=!1,o=null;const s=this.makeRequestBody([i]);try{if(o=yield this.send(s),o.ok){try{const e=yield o.json();this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendEventImmediately - send successful event: ${s}, message: ${JSON.stringify(e)}`)}catch(e){this.logger.warn(`Event Reporting - InMemoryJSONEventBuffer - sendEventImmediately - Error reading OK response ${e} for event ${s}`)}return}this.logger.error(`Event Reporting - InMemoryJSONEventBuffer - sendEventImmediately - Failed to send an important event ${s} with response status ${o.status}`),a=!0}catch(e){this.logger.warn(`Event Reporting - There may be a failure in sending an important event ${s} to the ingestion endpoint ${e}.`),a=!0;try{if("firefox"===this.metadata.browserName.toLowerCase()){const e=this.makeBeaconRequestBody([i]);this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendEventImmediately - beaconing data out ${e}`),a=!navigator.sendBeacon(`${this.ingestionURL}?beacon=1`,e)}}catch(e){this.logger.warn(`Event Reporting - Error sending beacon for an important event ${s}`),a=!0}}a&&(this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendEventImmediately - pushing to failed events ${s}`),this.failedIngestionEvents.push(i))}))}send(e){return r(this,void 0,void 0,(function*(){const t=new a.default(c.RETRY_FIXED_BACKOFF_WAIT_MS,c.RETRY_SHORT_BACKOFF_MS,c.RETRY_LONG_BACKOFF_MS);try{let n=0;for(;n<this.retryCountLimit;){const r=yield fetch(this.ingestionURL,{method:"POST",headers:{Authorization:`Bearer ${this.authenticationToken}`},body:e});if(r.ok||!c.SENDING_FAILURE_CODES.has(r.status))return r;if(this.logger.warn(`Will retry sending failure for ${e} due to status code ${r.status}.`),n++,n<this.retryCountLimit){const e=t.nextBackoffAmountMs();yield l.wait(e)}}if(n===this.retryCountLimit)throw new Error(`Retry count limit reached for ${e}`)}catch(e){throw e}}))}sendBeacon(){return r(this,void 0,void 0,(function*(){const e=this.buffer;if(this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendBeacon - clearing out buffer events ${JSON.stringify(e)}`),this.buffer=[],this.currentIngestionEvent.payloads.length>0){const t=this.deepCopyCurrentIngestionEvent(this.currentIngestionEvent);e.push(t),this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendBeacon - clearing out current ingestion event ${JSON.stringify(t)}`),this.currentIngestionEvent=this.initializeAndGetCurrentIngestionEvent()}if(this.failedIngestionEvents.length>0){const t=this.failedIngestionEvents.map(e=>this.deepCopyCurrentIngestionEvent(e));e.push(...t),this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendBeacon - clearing out any failed ingestion event ${JSON.stringify(t)}`),this.failedIngestionEvents=[]}if(this.cancellableEvents.size>0&&(this.cancellableEvents.forEach(t=>{e.push(...t),this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendBeacon - clearing out each cancellable event ${JSON.stringify(t)}`)}),this.cancellableEvents.clear()),0===e.length)return;const t=this.makeBeaconRequestBody(e);this.logger.debug(`Event Reporting - InMemoryJSONEventBuffer - sendBeacon - beacon data to send ${t}`);try{navigator.sendBeacon(`${this.ingestionURL}?beacon=1`,t)||this.logger.warn(`Event Reporting - Browser failed to queue beacon data ${t}`)}catch(e){this.logger.warn(`Event Reporting - Sending beacon data ${t} failed with error ${e}`)}}))}reset(){this.maxBufferCapacityBytes=0,this.totalBufferItems=0,this.buffer=[],this.bufferSize=0,this.maxBufferItemCapacityBytes=0,this.ingestionEventSize=0,this.flushIntervalMs=0,this.flushSize=0,this.failedIngestionEvents=[],this.lock=!1,this.beaconEventListener=void 0,this.cancellableEvents.clear()}destroy(){return r(this,void 0,void 0,(function*(){this.stop(),this.reset()}))}}t.default=c,c.SENDING_FAILURE_CODES=new Set([408,429,500,502,503,504]),c.RETRY_FIXED_BACKOFF_WAIT_MS=0,c.RETRY_SHORT_BACKOFF_MS=1e3,c.RETRY_LONG_BACKOFF_MS=15e3,c.MAX_PAYLOAD_ITEMS=2,c.MAX_ITEM_SIZE_BYTES_ALLOWED=3e3}).call(this,n(68))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(837),i=n(212);class a{constructor(e){var t,n,i,o,s,l,c;try{this.parserResult=navigator&&navigator.userAgent?new r.UAParser(navigator.userAgent).getResult():void 0}catch(t){e.error(t.message)}this.browserMajorVersion=(null===(i=null===(n=null===(t=this.parserResult)||void 0===t?void 0:t.browser)||void 0===n?void 0:n.version)||void 0===i?void 0:i.split(".")[0])||a.UNAVAILABLE,this.browserName=(null===(o=this.parserResult)||void 0===o?void 0:o.browser.name)||a.UNAVAILABLE,this.browserVersion=(null===(s=this.parserResult)||void 0===s?void 0:s.browser.version)||a.UNAVAILABLE,this.deviceName=[(null===(l=this.parserResult)||void 0===l?void 0:l.device.vendor)||"",(null===(c=this.parserResult)||void 0===c?void 0:c.device.model)||""].join(" ").trim()||a.UNAVAILABLE}getParserResult(){var e,t;return{browserMajorVersion:this.browserMajorVersion,browserName:this.browserName,browserVersion:this.browserVersion,deviceName:this.deviceName,osName:(null===(e=this.parserResult)||void 0===e?void 0:e.os.name)||a.UNAVAILABLE,osVersion:(null===(t=this.parserResult)||void 0===t?void 0:t.os.version)||a.UNAVAILABLE,sdkVersion:i.default.sdkVersion,sdkName:i.default.sdkName}}}t.default=a,a.UNAVAILABLE="Unavailable"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.timeoutMs=1e4,this.waitDurationMs=3e3}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(900);t.default=class{constructor(e,t,n=new r.default){this.eventsClientConfiguration=e,this.ingestionURL=t,this.eventBufferConfiguration=n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e=5e3,t=2,n=64,r=100,i=15){this.flushIntervalMs=e,this.flushSize=t,this.maxBufferCapacityKb=n,this.totalBufferItems=r,this.retryCountLimit=i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n,r=[]){this.type="Meet",this.v=1,this.meetingId=e,this.attendeeId=t,this.eventsToIgnore=r,this.authenticationToken=n}getAuthenticationToken(){return this.authenticationToken}toJSON(){const e={};return e.type=this.type,e.v=this.v,e.meetingId=this.meetingId,e.attendeeId=this.attendeeId,e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n){this.type=e,this.headers=t,this.payload=n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(212);t.default=class{constructor(e,t){this.chimeClient=e,this.awsClient=t}makeTwoDigits(e){return e>9?e.toString():"0"+e.toString()}getDateTimeString(){const e=new Date;return e.getUTCFullYear()+this.makeTwoDigits(e.getUTCMonth()+1)+this.makeTwoDigits(e.getUTCDate())+"T"+this.makeTwoDigits(e.getUTCHours())+this.makeTwoDigits(e.getUTCMinutes())+this.makeTwoDigits(e.getUTCSeconds())+"Z"}getDateString(e){return e.substring(0,e.indexOf("T"))}getSignatureKey(e,t,n,r){const i=this.awsClient.util.crypto.hmac("AWS4"+e,t,"buffer"),a=this.awsClient.util.crypto.hmac(i,n,"buffer"),o=this.awsClient.util.crypto.hmac(a,r,"buffer");return this.awsClient.util.crypto.hmac(o,"aws4_request","buffer")}signURL(e,t,n,i,a,o,s){const l=this.getDateTimeString(),c=this.getDateString(l),u=this.chimeClient.config.region,d="host:"+i.toLowerCase()+"\n",h=c+"/"+u+"/"+n+"/aws4_request",f=this.chimeClient.config.credentials;let p=new Map;p.set("X-Amz-Algorithm",["AWS4-HMAC-SHA256"]),p.set("X-Amz-Credential",[encodeURIComponent(f.accessKeyId+"/"+h)]),p.set("X-Amz-Date",[l]),p.set("X-Amz-Expires",["10"]),p.set("X-Amz-SignedHeaders",["host"]),f.sessionToken&&p.set("X-Amz-Security-Token",[encodeURIComponent(f.sessionToken)]),p.set(r.default.X_AMZN_VERSION,[encodeURIComponent(r.default.sdkVersion)]),p.set(r.default.X_AMZN_USER_AGENT,[encodeURIComponent(r.default.sdkUserAgentLowResolution)]),null==s||s.forEach((e,t)=>{const n=encodeURIComponent(t);e.sort().forEach(e=>{p.has(n)||p.set(n,[]),p.get(n).push(encodeURIComponent(e))})});let m="";p=new Map([...p.entries()].sort()),p.forEach((e,t)=>{e.forEach(e=>{m.length&&(m+="&"),m+=t+"="+e})});const g=e+"\n"+a+"\n"+m+"\n"+d+"\nhost\n"+this.awsClient.util.crypto.sha256(o,"hex"),v="AWS4-HMAC-SHA256\n"+l+"\n"+c+"/"+u+"/"+n+"/aws4_request\n"+this.awsClient.util.crypto.sha256(g,"hex"),b=this.getSignatureKey(f.secretAccessKey,c,u,n),y=this.awsClient.util.crypto.hmac(b,v,"hex");return t+"://"+i+a+"?"+(m+"&X-Amz-Signature="+y)}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(802);t.default=class{constructor(e,t){this.logger=e,this.stages=t,this.fr=15,this.outputMediaStream=new MediaStream,this.videoInput=document.createElement("video"),this.canvasOutput=document.createElement("canvas"),this.outputCtx=this.canvasOutput.getContext("2d"),this.canvasInput=document.createElement("canvas"),this.inputCtx=this.canvasInput.getContext("2d"),this.inputVideoStream=null,this.sourceBuffers=[],this.destBuffers=[],this.observers=new Set,this.hasStarted=!1,this.process=e=>r(this,void 0,void 0,(function*(){if(!this.inputVideoStream)return;const e=performance.now();this.videoInput.videoWidth&&(this.canvasInput.width!==this.videoInput.videoWidth&&(this.canvasInput.width=this.videoInput.videoWidth,this.canvasInput.height=this.videoInput.videoHeight,this.sourceBuffers[0].height=this.canvasInput.height,this.sourceBuffers[0].width=this.canvasInput.width,this.sourceBuffers[0].framerate=this.framerate),this.inputCtx.drawImage(this.videoInput,0,0));let t,n=[];n.push(this.sourceBuffers[0]);try{for(const e of this.processors)n=yield e.process(n)}catch(e){return void this.forEachObserver(e=>{e.processingDidFailToStart&&e.processingDidFailToStart()})}this.destBuffers=n;try{t=yield this.destBuffers[0].asCanvasImageSource()}catch(e){return void(this.inputVideoStream&&(this.logger.info("buffers are destroyed and pipeline could not start"),this.forEachObserver(e=>{e.processingDidFailToStart&&e.processingDidFailToStart()})))}const r=t.width,i=t.height;0!==r&&0!==i&&(this.canvasOutput.width!==r&&this.canvasOutput.height!==i&&(this.canvasOutput.width=r,this.canvasOutput.height=i),this.outputCtx.drawImage(t,0,0,r,i,0,0,r,i),this.hasStarted||(this.hasStarted=!0,this.forEachObserver(e=>{e.processingDidStart&&e.processingDidStart()})));const a=performance.now()-e,o=2e3/this.framerate-a,s=Math.max(0,1e3/this.framerate-a);o<=0&&this.forEachObserver(e=>{e.processingLatencyTooHigh&&e.processingLatencyTooHigh(a)}),this.lastTimeOut=setTimeout(this.process,s)}))}destroy(){if(this.stop(),this.stages)for(const e of this.stages)e.destroy()}get framerate(){return this.fr}set framerate(e){this.fr=e<0?15:e}stop(){if(this.videoInput.removeEventListener("loadedmetadata",this.process),this.videoInput.srcObject=null,this.destroyInputMediaStreamAndBuffers(),this.outputMediaStream)for(const e of this.outputMediaStream.getVideoTracks())e.stop();this.lastTimeOut&&(clearTimeout(this.lastTimeOut),this.lastTimeOut=void 0),this.hasStarted&&(this.hasStarted=!1,this.forEachObserver(e=>{e.processingDidStop&&e.processingDidStop()}))}addObserver(e){this.observers.add(e)}removeObserver(e){this.observers.delete(e)}getInputMediaStream(){return r(this,void 0,void 0,(function*(){return this.inputVideoStream}))}getActiveOutputMediaStream(){return this.outputMediaStream&&this.outputMediaStream.active?this.outputMediaStream:this.outputMediaStream=this.canvasOutput.captureStream(this.framerate)}setInputMediaStream(e){return r(this,void 0,void 0,(function*(){if(!e)return void this.stop();if(0===e.getVideoTracks().length)return void this.logger.error("No video tracks in input media stream, ignoring");this.inputVideoStream=e;const t=this.inputVideoStream.getVideoTracks()[0].getSettings();this.logger.info(`processing pipeline input stream settings ${t}`),this.canvasOutput.width=t.width,this.canvasOutput.height=t.height,this.videoInput.addEventListener("loadedmetadata",this.process),this.videoInput.srcObject=this.inputVideoStream,this.videoInput.setAttribute("playsinline","true");const n=new i.default(this.canvasInput);this.sourceBuffers.push(n),this.videoInput.load(),yield this.videoInput.play()}))}set processors(e){this.stages=e}get processors(){return this.stages}forEachObserver(e){for(const t of this.observers)setTimeout(()=>{e(t)},0)}destroyInputMediaStreamAndBuffers(){if(this.inputVideoStream)for(const e of this.inputVideoStream.getTracks())e.stop();this.inputVideoStream=null;for(const e of this.sourceBuffers)e.destroy();this.sourceBuffers=[]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(235);class i extends r.default{constructor(e,t,n,r){super(e,t,n),this.limit=r,this.attempts=0}nextBackoffAmountMs(){if(this.attempts++,this.attempts>this.limit)throw new Error("retry limit exceeded");return super.nextBackoffAmountMs()}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n,r){this.sequenceNumber=e,this.message=t,this.timestampMs=n,this.logLevel=r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(210),i=n(908);class a extends i.default{constructor(){super(r.default.DEBUG)}}t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(210);t.default=class{constructor(e=r.default.OFF){this.level=e}info(e){}warn(e){}error(e){}debug(e){r.default.DEBUG<this.level||"string"!=typeof e&&e()}setLogLevel(e){this.level=e}getLogLevel(){return this.level}}},function(e,t,n){"use strict";function r(e,t,n){if(!n)return fetch(e,t);const r=a(e,n),o=i(t,n);return fetch(r,o)}function i(e,t){return(null==t?void 0:t.headers)?e?Object.assign(Object.assign({},e),{headers:Object.assign(Object.assign({},e.headers||{}),t.headers)}):{headers:t.headers}:e}function a(e,t){if(!(null==t?void 0:t.escapedQueryString))return e;const n=-1!==e.lastIndexOf("?");return`${e}${n?"&":"?"}${t.escapedQueryString}`}Object.defineProperty(t,"__esModule",{value:!0}),t.isValidRevisionID=t.isValidAssetGroup=t.resolveURL=t.addQueryParams=t.withQueryString=t.withRequestHeaders=t.fetchWithBehavior=void 0,t.fetchWithBehavior=r,t.withRequestHeaders=i,t.withQueryString=a,t.addQueryParams=function(e,t){const n=Object.keys(t);if(!n.length)return e;const r=new URLSearchParams(null==e?void 0:e.escapedQueryString);for(const e of n)r.append(e,t[e]);return Object.assign(Object.assign({},e),{escapedQueryString:r.toString()})};const o={method:"HEAD",mode:"cors",credentials:"omit",redirect:"follow",referrerPolicy:"origin"};t.resolveURL=function(e,t){return r(e,o,t).then(t=>t.redirected?t.url:e)},t.isValidAssetGroup=function(e){return!!e&&/^[-.a-zA-Z0-9]+$/.test(e)},t.isValidRevisionID=function(e){return!!e&&/^[123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ]{22}$/.test(e)}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(157);class a{constructor(e,t,n,r,a=!1,o,s=new i.default){this.device=e,this.voiceFocus=t,this.delegate=n,this.nodeOptions=r,this.failed=a,this.node=o,this.browserBehavior=s}getInnerDevice(){return this.device}mute(e){return r(this,void 0,void 0,(function*(){this.node&&(e?yield this.node.disable():yield this.node.enable())}))}stop(){return r(this,void 0,void 0,(function*(){this.node&&(this.node.disconnect(),yield this.node.stop())}))}chooseNewInnerDevice(e){return r(this,void 0,void 0,(function*(){return this.device!==e||function(e){if("default"===e)return!0;if(!e||"object"!=typeof e)return!1;if("deviceId"in e&&"default"===e.deviceId)return!0;if("id"in e&&"default"===e.id)return!0;return!1}(e)?new a(e,this.voiceFocus,this.delegate,this.nodeOptions,this.failed,this.node,this.browserBehavior):this}))}intrinsicDevice(){return r(this,void 0,void 0,(function*(){if(this.failed)return this.device;const e={echoCancellation:!0,googEchoCancellation:!0,googEchoCancellation2:!0,noiseSuppression:!1,googNoiseSuppression:!1,googHighpassFilter:!1,googNoiseSuppression2:!1};let t;return t=!this.nodeOptions||void 0===this.nodeOptions.agc||this.nodeOptions.agc.useBuiltInAGC,e.autoGainControl=t,e.googAutoGainControl=t,e.googAutoGainControl2=t,this.device?"string"==typeof this.device?(this.browserBehavior.requiresNoExactMediaStreamConstraints()?e.deviceId=this.device:e.deviceId={exact:this.device},e):this.device.id?this.device:Object.assign(Object.assign({},this.device),e):e}))}createAudioNode(e){var t,n;return r(this,void 0,void 0,(function*(){if((null===(t=this.node)||void 0===t?void 0:t.context)===e)return{start:this.node,end:this.node};const r=Object.assign({enabled:!0,agc:{useVoiceFocusAGC:!1}},this.nodeOptions);try{return null===(n=this.node)||void 0===n||n.disconnect(),this.node=yield this.voiceFocus.createNode(e,r),{start:this.node,end:this.node}}catch(e){throw this.failed=!0,this.delegate.onFallback(this,e),e}}))}addObserver(e){this.delegate.addObserver(e)}removeObserver(e){this.delegate.removeObserver(e)}}t.default=a},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(509);function o(e,t,n){e.style.transform="translate("+t+"px, "+n+"px)"}t.getStepDecimals=function(e){var t=e.toString().split(".")[1];return t?t.length:0},t.isTouchEvent=function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length},t.isStepDivisible=function(e,t,n){var r=(t-e)/n;return parseInt(r.toString(),10)===r},t.normalizeValue=function(e,n,r,i,a,o,s){if(e=Math.round(1e11*e)/1e11,!o){var l=s[n-1],c=s[n+1];if(l&&l>e)return l;if(c&&c<e)return c}if(e>i)return i;if(e<r)return r;var u=Math.floor(1e11*e-1e11*r)%Math.floor(1e11*a),d=Math.floor(1e11*e-Math.abs(u)),h=0===u?e:d/1e11,f=Math.abs(u/1e11)<a/2?h:h+a,p=t.getStepDecimals(a);return parseFloat(f.toFixed(p))},t.relativeValue=function(e,t,n){return(e-t)/(n-t)},t.isVertical=function(e){return e===a.Direction.Up||e===a.Direction.Down},t.checkBoundaries=function(e,t,n){if(t>=n)throw new RangeError("min ("+t+") is equal/bigger than max ("+n+")");if(e<t)throw new RangeError("value ("+e+") is smaller than min ("+t+")");if(e>n)throw new RangeError("value ("+e+") is bigger than max ("+n+")")},t.checkInitialOverlap=function(e){if(!(e.length<2||e.slice(1).every((function(t,n){return e[n]<=t}))))throw new RangeError("values={["+e+"]} needs to be sorted when allowOverlap={false}")},t.getMargin=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["margin-top"],10),bottom:parseInt(t["margin-bottom"],10),left:parseInt(t["margin-left"],10),right:parseInt(t["margin-right"],10)}},t.getPaddingAndBorder=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["padding-top"],10)+parseInt(t["border-top-width"],10),bottom:parseInt(t["padding-bottom"],10)+parseInt(t["border-bottom-width"],10),left:parseInt(t["padding-left"],10)+parseInt(t["border-left-width"],10),right:parseInt(t["padding-right"],10)+parseInt(t["border-right-width"],10)}},t.translateThumbs=function(e,t,n){var r=n?-1:1;e.forEach((function(e,n){return o(e,r*t[n].x,t[n].y)}))},t.translate=o,t.schd=function(e){var t=[],n=null;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t=r,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))}},t.replaceAt=function(e,t,n){var r=e.slice(0);return r[t]=n,r},t.getTrackBackground=function(e){var t=e.values,n=e.colors,r=e.min,i=e.max,o=e.direction,s=void 0===o?a.Direction.Right:o,l=e.rtl,c=void 0!==l&&l;c&&s===a.Direction.Right?s=a.Direction.Left:c&&a.Direction.Left&&(s=a.Direction.Right);var u=t.map((function(e){return(e-r)/(i-r)*100})).reduce((function(e,t,r){return e+", "+n[r]+" "+t+"%, "+n[r+1]+" "+t+"%"}),"");return"linear-gradient("+s+", "+n[0]+" 0%"+u+", "+n[n.length-1]+" 100%)"},t.voidFn=function(){},t.assertUnreachable=function(e){throw new Error("Didn't expect to get here")};var s=function(e,t,n,i,a){return void 0===a&&(a=function(e){return e}),Math.ceil(r([e],Array.from(e.children)).reduce((function(e,r){var o=Math.ceil(r.getBoundingClientRect().width);if(r.innerText&&r.innerText.includes(n)&&0===r.childElementCount){var s=r.cloneNode(!0);s.innerHTML=a(t.toFixed(i)),s.style.visibility="hidden",document.body.appendChild(s),o=Math.ceil(s.getBoundingClientRect().width),document.body.removeChild(s)}return o>e?o:e}),e.getBoundingClientRect().width))};t.useThumbOverlap=function(e,n,a,o,l,c){void 0===o&&(o=.1),void 0===l&&(l=" - "),void 0===c&&(c=function(e){return e});var u=t.getStepDecimals(o),d=i.useState({}),h=d[0],f=d[1],p=i.useState(c(n[a].toFixed(u))),m=p[0],g=p[1];return i.useEffect((function(){if(e){var t=e.getThumbs();if(t.length<1)return;var i={},o=e.getOffsets(),d=function(e,t,n,i,a,o,l){void 0===l&&(l=function(e){return e});var c=[],u=function(e){var d=s(n[e],i[e],a,o,l),h=t[e].x;t.forEach((function(t,f){var p=t.x,m=s(n[f],i[f],a,o,l);e!==f&&(h>=p&&h<=p+m||h+d>=p&&h+d<=p+m)&&(c.includes(f)||(c.push(e),c.push(f),c=r(c,[e,f]),u(f)))}))};return u(e),Array.from(new Set(c.sort()))}(a,o,t,n,l,u,c),h=c(n[a].toFixed(u));if(d.length){var p=d.reduce((function(e,t,n,i){return e.length?r(e,[o[i[n]].x]):[o[i[n]].x]}),[]);if(Math.min.apply(Math,p)===o[a].x){var m=[];d.forEach((function(e){m.push(n[e].toFixed(u))})),h=Array.from(new Set(m.sort((function(e,t){return parseFloat(e)-parseFloat(t)})))).map(c).join(l);var v=Math.min.apply(Math,p),b=Math.max.apply(Math,p),y=t[d[p.indexOf(b)]].getBoundingClientRect().width;i.left=Math.abs(v-(b+y))/2+"px",i.transform="translate(-50%, 0)"}else i.visibility="hidden"}g(h),f(i)}}),[e,n]),[m,h]}},function(e,t,n){"use strict";var r=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=r(n(0)),a=r(n(6));function o(e){var t=e.children,n=e.type;return(i.default.createElement("div",{className:"react-pdf__message react-pdf__message--".concat(n)},t))}o.propTypes={children:a.default.node,type:a.default.oneOf(["error","loading","no-data"]).isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(1424).PDFLinkService;t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidRotation=function(e){return Number.isInteger(e)&&e%90==0},t.isValidScrollMode=function(e){return Number.isInteger(e)&&Object.values(r).includes(e)&&e!==r.UNKNOWN},t.isValidSpreadMode=function(e){return Number.isInteger(e)&&Object.values(i).includes(e)&&e!==i.UNKNOWN},t.isPortraitOrientation=function(e){return e.width<=e.height},t.clamp=d,t.getPDFFileNameFromURL=function(e,t="document.pdf"){if("string"!=typeof e)return t;if(function(e){let t=0;const n=e.length;for(;t<n&&""===e[t].trim();)t++;return"data:"===e.substring(t,t+5).toLowerCase()}(e))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),t;const n=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let i=n.exec(r[1])||n.exec(r[2])||n.exec(r[3]);if(i&&(i=i[0],i.includes("%")))try{i=n.exec(decodeURIComponent(i))[0]}catch(e){}return i||t},t.noContextMenuHandler=function(e){e.preventDefault()},t.parseQueryString=function(e){const t=e.split("&"),n=Object.create(null);for(let e=0,r=t.length;e<r;++e){const r=t[e].split("="),i=r[0].toLowerCase(),a=r.length>1?r[1]:null;n[decodeURIComponent(i)]=decodeURIComponent(a)}return n},t.backtrackBeforeAllVisibleElements=s,t.getVisibleElements=function(e,t,n=!1,r=!1){const i=e.scrollTop,a=i+e.clientHeight,l=e.scrollLeft,c=l+e.clientWidth;const u=[],d=t.length;let h=0===d?0:o(t,r?function(e){const t=e.div;return t.offsetLeft+t.clientLeft+t.clientWidth>l}:function(e){const t=e.div;return t.offsetTop+t.clientTop+t.clientHeight>i});h>0&&h<d&&!r&&(h=s(h,t,i));let f=r?c:-1;for(let e=h;e<d;e++){const n=t[e],o=n.div,s=o.offsetLeft+o.clientLeft,d=o.offsetTop+o.clientTop,h=o.clientWidth,p=o.clientHeight,m=s+h,g=d+p;if(-1===f)g>=a&&(f=g);else if((r?s:d)>f)break;if(g<=i||d>=a||m<=l||s>=c)continue;const v=Math.max(0,i-d)+Math.max(0,g-a),b=Math.max(0,l-s)+Math.max(0,m-c),y=(p-v)*(h-b)*100/p/h|0;u.push({id:n.id,x:s,y:d,view:n,percent:y})}const p=u[0],m=u[u.length-1];n&&u.sort((function(e,t){const n=e.percent-t.percent;return Math.abs(n)>.001?-n:e.id-t.id}));return{first:p,last:m,views:u}},t.roundToDivide=function(e,t){const n=e%t;return 0===n?e:Math.round(e-n+t)},t.getPageSizeInches=function({view:e,userUnit:t,rotate:n}){const[r,i,a,o]=e,s=n%180!=0,l=(a-r)/72*t,c=(o-i)/72*t;return{width:s?c:l,height:s?l:c}},t.approximateFraction=function(e){if(Math.floor(e)===e)return[e,1];const t=1/e;if(t>8)return[1,8];if(Math.floor(t)===t)return[1,t];const n=e>1?t:e;let r,i=0,a=1,o=1,s=1;for(;;){const e=i+o,t=a+s;if(t>8)break;n<=e/t?(o=e,s=t):(i=e,a=t)}r=n-i/a<o/s-n?n===e?[i,a]:[a,i]:n===e?[o,s]:[s,o];return r},t.getOutputScale=function(e){const t=window.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1,r=t/n;return{sx:r,sy:r,scaled:1!==r}},t.scrollIntoView=function(e,t,n=!1){let r=e.offsetParent;if(!r)return void console.error("offsetParent is not set -- cannot scroll");let i=e.offsetTop+e.clientTop,a=e.offsetLeft+e.clientLeft;for(;r.clientHeight===r.scrollHeight&&r.clientWidth===r.scrollWidth||n&&"hidden"===getComputedStyle(r).overflow;)if(r.dataset._scaleY&&(i/=r.dataset._scaleY,a/=r.dataset._scaleX),i+=r.offsetTop,a+=r.offsetLeft,r=r.offsetParent,!r)return;t&&(void 0!==t.top&&(i+=t.top),void 0!==t.left&&(a+=t.left,r.scrollLeft=a));r.scrollTop=i},t.watchScroll=function(e,t){const n=function(n){i||(i=window.requestAnimationFrame((function(){i=null;const n=e.scrollLeft,a=r.lastX;n!==a&&(r.right=n>a),r.lastX=n;const o=e.scrollTop,s=r.lastY;o!==s&&(r.down=o>s),r.lastY=o,t(r)})))},r={right:!0,down:!0,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:n};let i=null;return e.addEventListener("scroll",n,!0),r},t.binarySearchFirstItem=o,t.normalizeWheelEventDelta=function(e){let t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY);const n=Math.atan2(e.deltaY,e.deltaX);-.25*Math.PI<n&&n<.75*Math.PI&&(t=-t);0===e.deltaMode?t/=900:1===e.deltaMode&&(t/=30);return t},t.waitOnEventOrTimeout=function({target:e,name:t,delay:n=0}){return new Promise((function(r,i){if("object"!=typeof e||!t||"string"!=typeof t||!(Number.isInteger(n)&&n>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function a(n){e instanceof u?e._off(t,o):e.removeEventListener(t,o),c&&clearTimeout(c),r(n)}const o=a.bind(null,l.EVENT);e instanceof u?e._on(t,o):e.addEventListener(t,o);const s=a.bind(null,l.TIMEOUT),c=setTimeout(s,n)}))},t.moveToEndOfArray=function(e,t){const n=[],r=e.length;let i=0;for(let a=0;a<r;++a)t(e[a])?n.push(e[a]):(e[i]=e[a],++i);for(let t=0;i<r;++t,++i)e[i]=n[t]},t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0;t.CSS_UNITS=96/72;t.DEFAULT_SCALE_VALUE="auto";t.DEFAULT_SCALE=1;t.MIN_SCALE=.1;t.MAX_SCALE=10;t.UNKNOWN_SCALE=0;t.MAX_AUTO_SCALE=1.25;t.SCROLLBAR_PADDING=40;t.VERTICAL_PADDING=5;t.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};t.RendererType={CANVAS:"canvas",SVG:"svg"};t.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};const r={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};t.ScrollMode=r;const i={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};t.SpreadMode=i;t.AutoPrintRegExp=/\bprint\s*\(/;const a={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",get:async(e,t,n)=>function(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/g,(e,n)=>n in t?t[n]:"{{"+n+"}}"):e}(n,t),async translate(e){}};function o(e,t){let n=0,r=e.length-1;if(r<0||!t(e[r]))return e.length;if(t(e[n]))return n;for(;n<r;){const i=n+r>>1;t(e[i])?r=i:n=i+1}return n}function s(e,t,n){if(e<2)return e;let r=t[e].div,i=r.offsetTop+r.clientTop;i>=n&&(r=t[e-1].div,i=r.offsetTop+r.clientTop);for(let n=e-2;n>=0&&(r=t[n].div,!(r.offsetTop+r.clientTop+r.clientHeight<=i));--n)e=n;return e}t.NullL10n=a;const l={EVENT:"event",TIMEOUT:"timeout"};t.WaitOnType=l;const c=new Promise((function(e){window.requestAnimationFrame(e)}));t.animationStarted=c;class u{constructor(e){this._listeners=Object.create(null)}on(e,t){this._on(e,t,{external:!0})}off(e,t){this._off(e,t,{external:!0})}dispatch(e){const t=this._listeners[e];if(!t||0===t.length)return;const n=Array.prototype.slice.call(arguments,1);let r;t.slice(0).forEach((function({listener:e,external:t}){if(t)return r||(r=[]),void r.push(e);e.apply(null,n)})),r&&(r.forEach((function(e){e.apply(null,n)})),r=null)}_on(e,t,n=null){let r=this._listeners[e];r||(this._listeners[e]=r=[]),r.push({listener:t,external:!0===(n&&n.external)})}_off(e,t,n=null){const r=this._listeners[e];if(r)for(let e=0,n=r.length;e<n;e++)if(r[e].listener===t)return void r.splice(e,1)}}function d(e,t,n){return Math.min(Math.max(e,t),n)}t.EventBus=u;t.ProgressBar=class{constructor(e,{height:t,width:n,units:r}={}){this.visible=!0,this.div=document.querySelector(e+" .progress"),this.bar=this.div.parentNode,this.height=t||100,this.width=n||100,this.units=r||"%",this.div.style.height=this.height+this.units,this.percent=0}_updateBar(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");const e=this.width*this._percent/100;this.div.style.width=e+this.units}get percent(){return this._percent}set percent(e){this._indeterminate=isNaN(e),this._percent=d(e,0,100),this._updateBar()}setWidth(e){if(!e)return;const t=e.parentNode.offsetWidth-e.offsetWidth;t>0&&(this.bar.style.width=`calc(100% - ${t}px)`)}hide(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}show(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(0).createContext)(null);t.default=r},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);return r.length<=1?r[0]:function(e){r.forEach((function(t){"function"==typeof t?t(e):t.current=e}))}}n.r(t),n.d(t,"default",(function(){return r}))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){"use strict";var r={}.hasOwnProperty;function i(e){return e&&"object"==typeof e||(e={}),o(e.line)+":"+o(e.column)}function a(e){return e&&"object"==typeof e||(e={}),i(e.start)+"-"+i(e.end)}function o(e){return e&&"number"==typeof e?e:1}e.exports=function(e){if(!e||"object"!=typeof e)return"";if(r.call(e,"position")||r.call(e,"type"))return a(e.position);if(r.call(e,"start")||r.call(e,"end"))return a(e);if(r.call(e,"line")||r.call(e,"column"))return i(e);return""}},function(e,t,n){"use strict";var r={}.hasOwnProperty;e.exports=r},function(e,t,n){"use strict";e.exports=function(e){for(var t=-1,n=0;++t<e.length;)n+="string"==typeof e[t]?e[t].length:1;return n}},function(e,t,n){"use strict";var r=n(315),i=n(213),a=n(270);function o(e,t){for(var n,r,a,o,s,l,c=e[t][1],u=e[t][2],d=t-1,h=[],f=c._tokenizer||u.parser[c.contentType](c.start),p=f.events,m=[],g={};c;){for(;e[++d][1]!==c;);h.push(d),c._tokenizer||(n=u.sliceStream(c),c.next||n.push(null),r&&f.defineSkip(c.start),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(n),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),r=c,c=c.next}for(c=r,a=p.length;a--;)"enter"===p[a][0]?o=!0:o&&p[a][1].type===p[a-1][1].type&&p[a][1].start.line!==p[a][1].end.line&&(v(p.slice(a+1,s)),c._tokenizer=c.next=void 0,c=c.previous,s=a+1);for(f.events=c._tokenizer=c.next=void 0,v(p.slice(0,s)),a=-1,l=0;++a<m.length;)g[l+m[a][0]]=l+m[a][1],l+=m[a][1]-m[a][0]-1;return g;function v(t){var n=h.pop();m.unshift([n,n+t.length-1]),i(e,n,2,t)}}e.exports=function(e){for(var t,n,s,l,c,u,d,h={},f=-1;++f<e.length;){for(;f in h;)f=h[f];if(t=e[f],f&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[f-1][1].type&&((s=0)<(u=t[1]._tokenizer.events).length&&"lineEndingBlank"===u[s][1].type&&(s+=2),s<u.length&&"content"===u[s][1].type))for(;++s<u.length&&"content"!==u[s][1].type;)"chunkText"===u[s][1].type&&(u[s][1].isInFirstContentOfListItem=!0,s++);if("enter"===t[0])t[1].contentType&&(r(h,o(e,f)),f=h[f],d=!0);else if(t[1]._container||t[1]._movePreviousLineEndings){for(s=f,n=void 0;s--&&("lineEnding"===(l=e[s])[1].type||"lineEndingBlank"===l[1].type);)"enter"===l[0]&&(n&&(e[n][1].type="lineEndingBlank"),l[1].type="lineEnding",n=s);n&&(t[1].end=a(e[n][1].start),(c=e.slice(n,f)).unshift(t),i(e,n,f-n+1,c))}}return!d}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(315),i=n(270),a=l("text"),o=l("string"),s={resolveAll:c()};function l(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return l(e)?i(e):o(e)}function o(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){var t=r[e],i=-1;if(null===e)return!0;if(t)for(;++i<t.length;)if(!t[i].previous||t[i].previous.call(n,n.previous))return!0}},resolveAll:c("text"===e?u:void 0)}}function c(e){return function(t,n){var r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function u(e,t){for(var n,a,o,s,l,c,u,d,h=-1;++h<=e.length;)if((h===e.length||"lineEnding"===e[h][1].type)&&"data"===e[h-1][1].type){for(a=e[h-1][1],s=(n=t.sliceStream(a)).length,l=-1,c=0,u=void 0;s--;)if("string"==typeof(o=n[s])){for(l=o.length;32===o.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===o)u=!0,c++;else if(-1!==o){s++;break}c&&(d={type:h===e.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{line:a.end.line,column:a.end.column-c,offset:a.end.offset-c,_index:a.start._index+s,_bufferIndex:s?l:a.start._bufferIndex+l},end:i(a.end)},a.end=i(d.start),a.start.offset===a.end.offset?r(a,d):(e.splice(h,0,["enter",d,t],["exit",d,t]),h+=2)),h++}return e}t.resolver=s,t.string=o,t.text=a},function(e,t,n){"use strict";e.exports=function(e){return e<32||127===e}},function(e,t,n){"use strict";var r;e.exports=function(e){var t,n="&"+e+";";if((r=r||document.createElement("i")).innerHTML=n,59===(t=r.textContent).charCodeAt(t.length-1)&&"semi"!==e)return!1;return t!==n&&t}},function(e,t,n){"use strict";var r=n(215)(/\d/);e.exports=r},function(e,t,n){"use strict";var r=n(923),i=n(214),a=n(121);e.exports=function(e,t,n,o,s,l,c,u,d){var h=d||1/0,f=0;return function(t){if(60===t)return e.enter(o),e.enter(s),e.enter(l),e.consume(t),e.exit(l),p;if(r(t)||41===t)return n(t);return e.enter(o),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(t)};function p(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(s),e.exit(o),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(n))}function m(t){return 62===t?(e.exit("chunkString"),e.exit(u),p(t)):null===t||60===t||a(t)?n(t):(e.consume(t),92===t?g:m)}function g(t){return 60===t||62===t||92===t?(e.consume(t),m):m(t)}function v(a){return 40===a?++f>h?n(a):(e.consume(a),v):41===a?f--?(e.consume(a),v):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(o),t(a)):null===a||i(a)?f?n(a):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(o),t(a)):r(a)?n(a):(e.consume(a),92===a?b:v)}function b(t){return 40===t||41===t||92===t?(e.consume(t),v):v(t)}}},function(e,t,n){"use strict";var r=n(121),i=n(200);e.exports=function(e,t,n,a,o,s){var l,c=this,u=0;return function(t){return e.enter(a),e.enter(o),e.consume(t),e.exit(o),e.enter(s),d};function d(i){return null===i||91===i||93===i&&!l||94===i&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs||u>999?n(i):93===i?(e.exit(s),e.enter(o),e.consume(i),e.exit(o),e.exit(a),t):r(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(i))}function h(t){return null===t||91===t||93===t||r(t)||u++>999?(e.exit("chunkString"),d(t)):(e.consume(t),l=l||!i(t),92===t?f:h)}function f(t){return 91===t||92===t||93===t?(e.consume(t),u++,h):h(t)}}},function(e,t,n){"use strict";var r=n(121),i=n(200),a=n(134);e.exports=function(e,t){var n;return function o(s){if(r(s))return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,o;if(i(s))return a(e,o,n?"linePrefix":"lineSuffix")(s);return t(s)}}},function(e,t,n){"use strict";var r=n(121),i=n(134);e.exports=function(e,t,n,a,o,s){var l;return function(t){return e.enter(a),e.enter(o),e.consume(t),e.exit(o),l=40===t?41:t,c};function c(n){return n===l?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),t):(e.enter(s),u(n))}function u(t){return t===l?(e.exit(s),c(l)):null===t?n(t):r(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return t===l||null===t||r(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?h:d)}function h(t){return t===l||92===t?(e.consume(t),d):d(t)}}},function(e,t,n){"use strict";var r=n(121),i=n(200),a=n(134),o={name:"thematicBreak",tokenize:function(e,t,n){var o,s=0;return function(t){return e.enter("thematicBreak"),o=t,l(t)};function l(u){return u===o?(e.enter("thematicBreakSequence"),c(u)):i(u)?a(e,l,"whitespace")(u):s<3||null!==u&&!r(u)?n(u):(e.exit("thematicBreak"),t(u))}function c(t){return t===o?(e.consume(t),s++,c):(e.exit("thematicBreakSequence"),l(t))}}};e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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},i=n(932);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,a=void 0===n?500:n,o=t.context,s=void 0===o?window:o,l=t.offset,c=void 0===l?0:l,u=t.ease,d=void 0===u?"easeInOutCubic":u,h=t.callback;if("object"===("undefined"==typeof window?"undefined":r(window))){var f=s.scrollTop||window.pageYOffset,p=(0,i.calcEndPoint)(e,s,c),m=performance.now(),g=window.requestAnimationFrame,v=function t(){var n=performance.now()-m,r=(0,i.setPosition)(f,p,n,a,d);s!==window?s.scrollTop=r:window.scroll(0,r),n>a?"function"==typeof h&&h(e):g(t)};v()}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.easeFunctions={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}},i=t.isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};t.setPosition=function(e,t,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"easeInOutCubic";return n>i?t:e+(t-e)*r[a](n/i)},t.calcEndPoint=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(i(e))return parseInt(e)+n;var r=t===window?window.pageYOffset:t.scrollTop-t.getBoundingClientRect().top,a="html"===e.nodeName.toLowerCase()?-r:e.getBoundingClientRect().top+r;return a+n}},function(e,t,n){var r=n(58),i=n(1574);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){var r=n(58),i=n(1604);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){var r=n(58),i=n(1605);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t){e.exports={isFunction:function(e){return"function"==typeof e},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},each:function(e,t){for(var n=0,r=e.length;n<r&&!1!==t(e[n],n);n++);}}},function(e,t,n){var r=n(519).default,i=n(1653);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r;e.exports=(r=n(84),function(e){var t=r,n=t.lib,i=n.WordArray,a=n.Hasher,o=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),l[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],h=n[7],f=0;f<64;f++){if(f<16)c[f]=0|e[t+f];else{var p=c[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[f]=m+c[f-7]+v+c[f-16]}var b=r&i^r&a^i&a,y=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),A=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&d)+l[f]+c[f];h=d,d=u,u=s,s=o+A|0,o=a,a=i,i=r,r=A+(y+b)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(u),t.HmacSHA256=a._createHmacHelper(u)}(Math),r.SHA256)},function(e,t,n){var r;e.exports=(r=n(84),n(378),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,a=n.WordArray,o=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=o.SHA512=t.extend({_doReset:function(){this._hash=new a.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],d=n[6],h=n[7],f=r.high,p=r.low,m=i.high,g=i.low,v=a.high,b=a.low,y=o.high,A=o.low,_=s.high,w=s.low,E=u.high,S=u.low,C=d.high,T=d.low,k=h.high,x=h.low,O=f,I=p,M=m,P=g,D=v,N=b,L=y,R=A,B=_,j=w,F=E,U=S,H=C,z=T,V=k,W=x,G=0;G<80;G++){var q,Y,K=c[G];if(G<16)Y=K.high=0|e[t+2*G],q=K.low=0|e[t+2*G+1];else{var X=c[G-15],Q=X.high,$=X.low,J=(Q>>>1|$<<31)^(Q>>>8|$<<24)^Q>>>7,Z=($>>>1|Q<<31)^($>>>8|Q<<24)^($>>>7|Q<<25),ee=c[G-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),ae=c[G-7],oe=ae.high,se=ae.low,le=c[G-16],ce=le.high,ue=le.low;Y=(Y=(Y=J+oe+((q=Z+se)>>>0<Z>>>0?1:0))+re+((q+=ie)>>>0<ie>>>0?1:0))+ce+((q+=ue)>>>0<ue>>>0?1:0),K.high=Y,K.low=q}var de,he=B&F^~B&H,fe=j&U^~j&z,pe=O&M^O&D^M&D,me=I&P^I&N^P&N,ge=(O>>>28|I<<4)^(O<<30|I>>>2)^(O<<25|I>>>7),ve=(I>>>28|O<<4)^(I<<30|O>>>2)^(I<<25|O>>>7),be=(B>>>14|j<<18)^(B>>>18|j<<14)^(B<<23|j>>>9),ye=(j>>>14|B<<18)^(j>>>18|B<<14)^(j<<23|B>>>9),Ae=l[G],_e=Ae.high,we=Ae.low,Ee=V+be+((de=W+ye)>>>0<W>>>0?1:0),Se=ve+me;V=H,W=z,H=F,z=U,F=B,U=j,B=L+(Ee=(Ee=(Ee=Ee+he+((de+=fe)>>>0<fe>>>0?1:0))+_e+((de+=we)>>>0<we>>>0?1:0))+Y+((de+=q)>>>0<q>>>0?1:0))+((j=R+de|0)>>>0<R>>>0?1:0)|0,L=D,R=N,D=M,N=P,M=O,P=I,O=Ee+(ge+pe+(Se>>>0<ve>>>0?1:0))+((I=de+Se|0)>>>0<de>>>0?1:0)|0}p=r.low=p+I,r.high=f+O+(p>>>0<I>>>0?1:0),g=i.low=g+P,i.high=m+M+(g>>>0<P>>>0?1:0),b=a.low=b+N,a.high=v+D+(b>>>0<N>>>0?1:0),A=o.low=A+R,o.high=y+L+(A>>>0<R>>>0?1:0),w=s.low=w+j,s.high=_+B+(w>>>0<j>>>0?1:0),S=u.low=S+U,u.high=E+F+(S>>>0<U>>>0?1:0),T=d.low=T+z,d.high=C+H+(T>>>0<z>>>0?1:0),x=h.low=x+W,h.high=k+V+(x>>>0<W>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r="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},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=f(n(273)),o=f(n(317)),s=f(n(156)),l=n(379),c=f(n(242)),u=n(999),d=n(321),h=n(1e3);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var g=(0,l.sym)("__node__"),v=(0,l.sym)("__nodes__"),b=(0,l.sym)("__renderer__"),y=(0,l.sym)("__unrendered__"),A=(0,l.sym)("__root__"),_=(0,l.sym)("__options__"),w=(0,l.sym)("__rootNodes__"),E=(0,l.sym)("__wrappingComponent__"),S=(0,l.sym)("__linkedRoots__"),C=(0,l.sym)("__updatedBy__");function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.treeFilter;return e.flatMap((function(e){return n(e.getNodeInternal(),t)}))}function k(e,t){return e.wrap(e.getNodesInternal().filter(t).filter(Boolean))}function x(e){if(1!==e[A].length)throw new Error("getRootNodeInternal(wrapper) can only be called when wrapper wraps one node");return e[A]!==e?e[w][0]:e[A][g]}function O(e,t){return(0,d.parentsOfNode)(t,x(e))}function I(e,t){t?Array.isArray(t)?((0,l.privateSet)(e,g,t[0]),(0,l.privateSet)(e,v,t)):((0,l.privateSet)(e,g,t),(0,l.privateSet)(e,v,[t])):((0,l.privateSet)(e,g,null),(0,l.privateSet)(e,v,[])),(0,l.privateSet)(e,"length",e[v].length)}var M=function(){function t(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(m(this,t),!e.window&&!e.document)throw new Error("It looks like you called `mount()` without a global document being loaded.");var o=(0,l.makeOptions)(i);if(r)(0,l.privateSet)(this,b,r[b]),(0,l.privateSet)(this,A,r),I(this,n),(0,l.privateSet)(this,w,r[v]),(0,l.privateSet)(this,_,r[_]),(0,l.privateSet)(this,S,[]);else{var s=(0,c.default)(o);if(!s.isValidElement(n))throw new TypeError("ReactWrapper can only wrap valid elements");var u=s.createRenderer((0,a.default)({mode:"mount"},o));if((0,l.privateSet)(this,b,u),u.render(n,o.context),(0,l.privateSet)(this,A,this),I(this,this[b].getNode()),(0,l.privateSet)(this,_,o),(0,l.privateSet)(this,S,[]),(0,l.isCustomComponent)(o.wrappingComponent,s)){if("function"!=typeof this[b].getWrappingComponentRenderer)throw new TypeError("your adapter does not support `wrappingComponent`. Try upgrading it!");(0,l.privateSet)(this,E,new P(this,this[b].getWrappingComponentRenderer())),this[S].push(this[E])}}(0,l.privateSet)(this,y,n),(0,l.privateSet)(this,C,null)}return i(t,[{key:"root",value:function(){return this[A]}},{key:"getNodeInternal",value:function(){if(1!==this.length)throw new Error("ReactWrapper::getNode() can only be called when wrapping one node");return this[v][0]}},{key:"getNodesInternal",value:function(){return this[v]}},{key:"getElement",value:function(){var e=this;return this.single("getElement",(function(){return(0,c.default)(e[_]).nodeToElement(e[g])}))}},{key:"getElements",value:function(){var e=this;return this[v].map((function(t){return(0,c.default)(e[_]).nodeToElement(t)}))}},{key:"getNode",value:function(){throw new Error("ReactWrapper::getNode() is no longer supported. Use ReactWrapper::instance() instead")}},{key:"getNodes",value:function(){throw new Error("ReactWrapper::getNodes() is no longer supported.")}},{key:"getDOMNode",value:function(){var e=(0,c.default)(this[_]);return this.single("getDOMNode",(function(t){return e.nodeToHostNode(t,!0)}))}},{key:"ref",value:function(e){if(this[A]!==this)throw new Error("ReactWrapper::ref(refname) can only be called on the root");return this.instance().refs[e]}},{key:"instance",value:function(){var e=this;return this.single("instance",(function(){return e[g].instance}))}},{key:"getWrappingComponent",value:function(){if(this[A]!==this)throw new Error("ReactWrapper::getWrappingComponent() can only be called on the root");if(!this[_].wrappingComponent)throw new Error("ReactWrapper::getWrappingComponent() can only be called on a wrapper that was originally passed a `wrappingComponent` option");return this[E]}},{key:"update",value:function(){var e=this,t=this[A];return this!==t?t.update():(I(this,this[b].getNode()),this[S].forEach((function(t){if(t!==e[C]){t[C]=e;try{t.update()}finally{t[C]=null}}})),this)}},{key:"unmount",value:function(){var e=this;if(this[A]!==this)throw new Error("ReactWrapper::unmount() can only be called on the root");return this.single("unmount",(function(){e[b].unmount(),e.update()})),this}},{key:"mount",value:function(){var e=this;if(this[A]!==this)throw new Error("ReactWrapper::mount() can only be called on the root");return this[b].render(this[y],this[_].context,(function(){return e.update()})),this}},{key:"setProps",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this[A]!==this)throw new Error("ReactWrapper::setProps() can only be called on the root");if(arguments.length>1&&"function"!=typeof n)throw new TypeError("ReactWrapper::setProps() expects a function as its second argument");var r=(0,c.default)(this[_]);return this[y]=(0,l.cloneElement)(r,this[y],e),this[b].render(this[y],null,(function(){t.update(),n&&n()})),this}},{key:"setState",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(null===this.instance()||"class"!==this.getNodeInternal().nodeType)throw new Error("ReactWrapper::setState() can only be called on class components");if(arguments.length>1&&"function"!=typeof n)throw new TypeError("ReactWrapper::setState() expects a function as its second argument");return this.instance().setState(e,(function(){if(t.update(),n){var e=(0,c.default)(t[_]),r=t.instance();e.invokeSetStateCallback?e.invokeSetStateCallback(r,n):n.call(r)}})),this}},{key:"setContext",value:function(e){var t=this;if(this[A]!==this)throw new Error("ReactWrapper::setContext() can only be called on the root");if(!this[_].context)throw new Error("ReactWrapper::setContext() can only be called on a wrapper that was originally passed a context option");return this[b].render(this[y],e,(function(){return t.update()})),this}},{key:"contains",value:function(e){var t=(0,c.default)(this[_]);return T(this,Array.isArray(e)?function(n){return(0,l.containsChildrenSubArray)(l.nodeEqual,n,e.map((function(e){return t.elementToNode(e)})))}:function(n){return(0,l.nodeEqual)(t.elementToNode(e),n)}).length>0}},{key:"containsMatchingElement",value:function(e){var t=(0,c.default)(this[_]).elementToNode(e);return T(this,(function(e){return(0,l.nodeMatches)(t,e,(function(e,t){return e<=t}))})).length>0}},{key:"containsAllMatchingElements",value:function(e){var t=this;if(!Array.isArray(e))throw new TypeError("nodes should be an Array");return e.every((function(e){return t.containsMatchingElement(e)}))}},{key:"containsAnyMatchingElements",value:function(e){var t=this;return Array.isArray(e)&&e.some((function(e){return t.containsMatchingElement(e)}))}},{key:"equals",value:function(e){var t=this;return this.single("equals",(function(){return(0,l.nodeEqual)(t.getNodeInternal(),e)}))}},{key:"matchesElement",value:function(e){var t=this;return this.single("matchesElement",(function(){var n=(0,c.default)(t[_]).elementToNode(e);return(0,l.nodeMatches)(n,t.getNodeInternal(),(function(e,t){return e<=t}))}))}},{key:"find",value:function(e){return this.wrap((0,h.reduceTreesBySelector)(e,this.getNodesInternal()))}},{key:"is",value:function(e){var t=(0,h.buildPredicate)(e);return this.single("is",(function(e){return t(e)}))}},{key:"isEmptyRender",value:function(){var e=this.getNodeInternal();return(0,l.renderedDive)(e)}},{key:"filterWhere",value:function(e){var t=this;return k(this,(function(n){return e(t.wrap(n))}))}},{key:"filter",value:function(e){return k(this,(0,h.buildPredicate)(e))}},{key:"not",value:function(e){var t=(0,h.buildPredicate)(e);return k(this,(function(e){return!t(e)}))}},{key:"text",value:function(){var e=(0,c.default)(this[_]);return this.single("text",(function(t){return(0,d.getTextFromHostNodes)(t,e)}))}},{key:"html",value:function(){var e=(0,c.default)(this[_]);return this.single("html",(function(t){return(0,d.getHTMLFromHostNodes)(t,e)}))}},{key:"render",value:function(){var e=this.html();return(0,l.loadCheerioRoot)(e)}},{key:"simulate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.single("simulate",(function(r){return t[b].simulateEvent(r,e,n),t[A].update(),t}))}},{key:"simulateError",value:function(e){var t=this;if(this[A]===this)throw new Error("ReactWrapper::simulateError() may not be called on the root");return this.single("simulateError",(function(n){if("host"===n.nodeType)throw new Error("ReactWrapper::simulateError() can only be called on custom components");var r=t[b];if("function"!=typeof r.simulateError)throw new TypeError("your adapter does not support `simulateError`. Try upgrading it!");var i=x(t),a=[n].concat(O(t,n));return r.simulateError(a,i,e),t[A].update(),t}))}},{key:"props",value:function(){return this.single("props",d.propsOfNode)}},{key:"state",value:function(e){var t=this,n=this[A]===this?this[b].getNode():this.getNodeInternal();if(null===this.instance()||"class"!==n.nodeType)throw new Error("ReactWrapper::state() can only be called on class components");var r=this.single("state",(function(){return t.instance().state}));if(void 0!==e){if(null==r)throw new TypeError('ReactWrapper::state("'+String(e)+'") requires that `state` not be `null` or `undefined`');return r[e]}return r}},{key:"context",value:function(e){var t=this;if(this[A]!==this)throw new Error("ReactWrapper::context() can only be called on the root");var n=this.single("context",(function(){return t.instance()}));if(null===n)throw new Error("ReactWrapper::context() can only be called on components with instances");var r=n.context;return void 0!==e?r[e]:r}},{key:"children",value:function(e){var t=this.flatMap((function(e){return(0,d.childrenOfNode)(e.getNodeInternal())}));return e?t.filter(e):t}},{key:"childAt",value:function(e){var t=this;return this.single("childAt",(function(){return t.children().at(e)}))}},{key:"parents",value:function(e){var t=this;return this.single("parents",(function(n){var r=t.wrap(O(t,n));return e?r.filter(e):r}))}},{key:"parent",value:function(){return this.flatMap((function(e){return[e.parents().get(0)]}))}},{key:"closest",value:function(e){if(this.is(e))return this;var t=this.parents().filter(e);return t.length>0?t.first():this.findWhere((function(){return!1}))}},{key:"prop",value:function(e){return this.props()[e]}},{key:"invoke",value:function(e){var t=this;return this.single("invoke",(function(){var n=t.prop(e);if("function"!=typeof n)throw new TypeError("ReactWrapper::invoke() requires the name of a prop whose value is a function");return function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];var a="function"==typeof t[b].wrapInvoke?t[b].wrapInvoke((function(){return n.apply(void 0,r)})):n.apply(void 0,r);return t[A].update(),a}}))}},{key:"renderProp",value:function(e){var t=this,n=(0,c.default)(this[_]);if("function"!=typeof n.wrap)throw new RangeError("your adapter does not support `wrap`. Try upgrading it!");return this.single("renderProp",(function(i){if("host"===i.nodeType)throw new TypeError("ReactWrapper::renderProp() can only be called on custom components");if("string"!=typeof e)throw new TypeError("ReactWrapper::renderProp(): `propName` must be a string");var a=t.props();if(!(0,s.default)(a,e))throw new Error("ReactWrapper::renderProp(): no prop called “"+String(e)+"“ found");var o=a[e];if("function"!=typeof o)throw new TypeError("ReactWrapper::renderProp(): expected prop “"+String(e)+"“ to contain a function, but it holds “"+(void 0===o?"undefined":r(o))+"“");return function(){var e=o.apply(void 0,arguments),r=n.wrap(e);return t.wrap(r,null,t[_])}}))}},{key:"key",value:function(){return this.single("key",(function(e){return void 0===e.key?null:e.key}))}},{key:"type",value:function(){return this.single("type",(function(e){return(0,l.typeOfNode)(e)}))}},{key:"name",value:function(){var e=(0,c.default)(this[_]);return this.single("name",(function(t){return e.displayNameOfNode?e.displayNameOfNode(t):(0,l.displayNameOfNode)(t)}))}},{key:"hasClass",value:function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&console.warn("It looks like you're calling `ReactWrapper::hasClass()` with a CSS selector. hasClass() expects a class name, not a CSS selector."),this.single("hasClass",(function(t){return(0,d.hasClassName)(t,e)}))}},{key:"forEach",value:function(e){var t=this;return this.getNodesInternal().forEach((function(n,r){return e.call(t,t.wrap(n),r)})),this}},{key:"map",value:function(e){var t=this;return this.getNodesInternal().map((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"reduce",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return arguments.length>1?this.getNodesInternal().reduce((function(n,r,i){return e.call(t,n,t.wrap(r),i)}),n):this.getNodesInternal().reduce((function(n,r,i){return e.call(t,1===i?t.wrap(n):n,t.wrap(r),i)}))}},{key:"reduceRight",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return arguments.length>1?this.getNodesInternal().reduceRight((function(n,r,i){return e.call(t,n,t.wrap(r),i)}),n):this.getNodesInternal().reduceRight((function(n,r,i){return e.call(t,1===i?t.wrap(n):n,t.wrap(r),i)}))}},{key:"slice",value:function(e,t){return this.wrap(this.getNodesInternal().slice(e,t))}},{key:"some",value:function(e){if(this[A]===this)throw new Error("ReactWrapper::some() can not be called on the root");var t=(0,h.buildPredicate)(e);return this.getNodesInternal().some(t)}},{key:"someWhere",value:function(e){var t=this;return this.getNodesInternal().some((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"every",value:function(e){var t=(0,h.buildPredicate)(e);return this.getNodesInternal().every(t)}},{key:"everyWhere",value:function(e){var t=this;return this.getNodesInternal().every((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"flatMap",value:function(e){var t=this,n=this.getNodesInternal().map((function(n,r){return e.call(t,t.wrap(n),r)})),r=(0,o.default)(n,1);return this.wrap(r.filter(Boolean))}},{key:"findWhere",value:function(e){var t=this;return T(this,(function(n){var r=t.wrap(n);return r.length>0&&e(r)}))}},{key:"get",value:function(e){return this.getElements()[e]}},{key:"at",value:function(e){var t=this.getNodesInternal();return e<t.length?this.wrap(t[e]):this.wrap([])}},{key:"first",value:function(){return this.at(0)}},{key:"last",value:function(){return this.at(this.length-1)}},{key:"isEmpty",value:function(){return console.warn("Enzyme::Deprecated method isEmpty() called, use exists() instead."),!this.exists()}},{key:"exists",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return arguments.length>0?this.find(e).exists():this.length>0}},{key:"single",value:function(e,t){var n="string"==typeof e?e:"unknown",r="function"==typeof t?t:e;if(1!==this.length)throw new Error("Method “"+n+"” is meant to be run on 1 node. "+String(this.length)+" found instead.");return r.call(this,this.getNodeInternal())}},{key:"wrap",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[A];if(e instanceof t)return e;for(var r=arguments.length,i=Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];return new(Function.prototype.bind.apply(t,[null].concat([e,n],i)))}},{key:"debug",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,u.debugNodes)(this.getNodesInternal(),e)}},{key:"tap",value:function(e){return e(this),this}},{key:"detach",value:function(){if(this[A]!==this)throw new Error("ReactWrapper::detach() can only be called on the root");if(!this[_].attachTo)throw new Error("ReactWrapper::detach() can only be called on when the `attachTo` option was passed into `mount()`.");this[b].unmount()}},{key:"hostNodes",value:function(){return this.filterWhere((function(e){return"string"==typeof e.type()}))}}]),t}(),P=function(e){function t(e,n){m(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.getNode(),e));return(0,l.privateSet)(r,A,r),(0,l.privateSet)(r,b,n),r[S].push(e),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"getWrappingComponent",value:function(){throw new TypeError("ReactWrapper::getWrappingComponent() can only be called on the root")}}]),t}(M);function D(e,t){Object.defineProperty(M.prototype,e,{get:function(){throw new Error("\n        Attempted to access ReactWrapper::"+String(e)+", which was previously a private property on\n        Enzyme ReactWrapper instances, but is no longer and should not be relied upon.\n        "+String(t)+"\n      ")},enumerable:!1,configurable:!1})}l.ITERATOR_SYMBOL&&Object.defineProperty(M.prototype,l.ITERATOR_SYMBOL,{configurable:!0,value:function(){var e,t=this[v][l.ITERATOR_SYMBOL](),n=(0,c.default)(this[_]);return p(e={},l.ITERATOR_SYMBOL,(function(){return this})),p(e,"next",(function(){var e=t.next();return e.done?{done:!0}:{done:!1,value:n.nodeToElement(e.value)}})),e}}),D("node","Consider using the getElement() method instead."),D("nodes","Consider using the getElements() method instead."),D("renderer",""),D("options",""),D("complexSelector",""),t.default=M}).call(this,n(68))},function(e,t,n){"use strict";var r=n(458),i=n(302),a=function(e){return null!=e},o=n(771)(),s=Object,l=i.call(Function.call,Array.prototype.push),c=i.call(Function.call,Object.prototype.propertyIsEnumerable),u=o?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(!a(e))throw new TypeError("target must be an object");var n,i,d,h,f,p,m,g=s(e);for(n=1;n<arguments.length;++n){i=s(arguments[n]),h=r(i);var v=o&&(Object.getOwnPropertySymbols||u);if(v)for(f=v(i),d=0;d<f.length;++d)m=f[d],c(i,m)&&l(h,m);for(d=0;d<h.length;++d)p=i[m=h[d]],c(i,m)&&(g[m]=p)}return g}},function(e,t,n){"use strict";var r=n(943);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r<t.length;++r)n[t[r]]=t[r];var i=Object.assign({},n),a="";for(var o in i)a+=o;return e!==a}()?r:function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?r:Object.assign:r}},function(e,t,n){"use strict";var r=n(1701),i=n(1706),a=n(522),o=n(952),s=n(951),l=n(1729);e.exports=function(){var e=l(this),t=s(a(e,"length")),n=1;arguments.length>0&&void 0!==arguments[0]&&(n=o(arguments[0]));var c=r(e,0);return i(c,e,t,0,n),c}},function(e,t,n){"use strict";var r=Number.isNaN||function(e){return e!=e};e.exports=Number.isFinite||function(e){return"number"==typeof e&&!r(e)&&e!==1/0&&e!==-1/0}},function(e,t,n){"use strict";var r=n(107),i=r("%Math%"),a=r("%Number%");e.exports=a.MAX_SAFE_INTEGER||i.pow(2,53)-1},function(e,t,n){"use strict";var r=n(107),i=r("%TypeError%"),a=r("%SyntaxError%"),o=n(156),s={"Property Descriptor":function(e,t){if("Object"!==e(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(o(t,r)&&!n[r])return!1;var a=o(t,"[[Value]]"),s=o(t,"[[Get]]")||o(t,"[[Set]]");if(a&&s)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}};e.exports=function(e,t,n,r){var o=s[t];if("function"!=typeof o)throw new a("unknown record type: "+t);if(!o(e,r))throw new i(n+" must be a "+t)}},function(e,t,n){"use strict";e.exports=function(e){return!!e}},function(e,t,n){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},function(e,t,n){"use strict";var r=n(947),i=n(952);e.exports=function(e){var t=i(e);return t<=0?0:t>r?r:t}},function(e,t,n){"use strict";var r=n(1720),i=n(1723);e.exports=function(e){var t=i(e);return r(t)}},function(e,t,n){"use strict";var r=n(107),i=r("%String%"),a=r("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new a("Cannot convert a Symbol value to a string");return i(e)}},function(e,t,n){"use strict";var r=n(107)("%TypeError%");e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},function(e,t,n){"use strict";var r=n(945);e.exports=function(){return Array.prototype.flat||r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=function(e,t){if((0,i.default)(e,t))return!0;if(!e||!t||"object"!==(void 0===e?"undefined":r(e))||"object"!==(void 0===t?"undefined":r(t)))return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;n.sort(),o.sort();for(var s=0;s<n.length;s+=1)if(!(0,a.default)(t,n[s])||!(0,i.default)(e[n[s]],t[n[s]]))return!1;return!0};var i=o(n(354)),a=o(n(156));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";var r=n(141),i=n(958),a=n(959),o=n(1732),s=a();r(s,{getPolyfill:a,implementation:i,shim:o}),e.exports=s},function(e,t,n){"use strict";var r=n(528),i=n(156),a=n(302).call(Function.call,Object.prototype.propertyIsEnumerable);e.exports=function(e){var t=r(e),n=[];for(var o in t)i(t,o)&&a(t,o)&&n.push([o,t[o]]);return n}},function(e,t,n){"use strict";var r=n(958);e.exports=function(){return"function"==typeof Object.entries?Object.entries:r}},function(e,t,n){"use strict";var r=n(526),i=n(961)(),a=n(238),o=a("Function.prototype.toString"),s=a("String.prototype.match"),l=/^class /,c=/\s*function\s+([^(\s]*)\s*/,u=Function.prototype;e.exports=function(){if(!function(e){if(r(e))return!1;if("function"!=typeof e)return!1;try{return!!s(o(e),l)}catch(e){}return!1}(this)&&!r(this))throw new TypeError("Function.prototype.name sham getter called on non-function");if(i)return this.name;if(this===u)return"";var e=o(this),t=s(e,c);return t&&t[1]}},function(e,t,n){"use strict";var r=function(){return"string"==typeof function(){}.name},i=Object.getOwnPropertyDescriptor;if(i)try{i([],"length")}catch(e){i=null}r.functionsHaveConfigurableNames=function(){return r()&&i&&!!i((function(){}),"name").configurable};var a=Function.prototype.bind;r.boundFunctionsHaveNames=function(){return r()&&"function"==typeof a&&""!==function(){}.bind().name},e.exports=r},function(e,t,n){"use strict";var r=n(960);e.exports=function(){return r}},function(e,t,n){"use strict";var r=n(954),i=n(953),a=n(238)("String.prototype.replace"),o=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=i(r(this));return a(a(e,o,""),s,"")}},function(e,t,n){"use strict";var r=n(963);e.exports=function(){return String.prototype.trim&&"​"==="​".trim()?String.prototype.trim:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.load=void 0;var r=n(216),i=r.__importStar(n(530)),a=r.__importStar(n(319)),o=n(1777),s=r.__importDefault(n(539));t.load=function e(t,n,l){if(void 0===l&&(l=!0),null==t)throw new Error("cheerio.load() expects a string");var c=r.__assign(r.__assign({},i.default),i.flatten(n)),u=s.default(t,c,l),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(o.Cheerio);function h(e,t,n,a){return void 0===n&&(n=u),new d(e,t,n,r.__assign(r.__assign({},c),i.flatten(a)))}return Object.assign(h,a,{load:e,_root:u,_options:c,fn:d.prototype,prototype:d.prototype}),h}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},s=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.select=t.filter=t.some=t.is=t.aliases=t.pseudos=t.filters=void 0;var l=n(531),c=n(968),u=o(n(969)),d=n(1756),h=n(980),f=n(968);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return f.filters}}),Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return f.pseudos}}),Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return f.aliases}});var p={type:"pseudo",name:"scope",data:null},m=r({},p),g={type:"universal",namespace:null};function v(e,t,n){if(void 0===n&&(n={}),"function"==typeof t)return e.some(t);var r=d.groupSelectors(l.parse(t,n)),i=r[0],a=r[1];return i.length>0&&e.some(c._compileToken(i,n))||a.some((function(t){return y(t,e,n).length>0}))}function b(e,t,n){if(0===t.length)return[];var r,i=d.groupSelectors(e),a=i[0],o=i[1];if(a.length){var s=T(t,a,n);if(0===o.length)return s;s.length&&(r=new Set(s))}for(var l=0;l<o.length&&(null==r?void 0:r.size)!==t.length;l++){var c=o[l];if(0===(r?t.filter((function(e){return u.isTag(e)&&!r.has(e)})):t).length)break;if((s=y(c,t,n)).length)if(r)s.forEach((function(e){return r.add(e)}));else{if(l===o.length-1)return s;r=new Set(s)}}return void 0!==r?r.size===t.length?t:t.filter((function(e){return r.has(e)})):[]}function y(e,t,n){var r;return e.some(l.isTraversal)?E(null!==(r=n.root)&&void 0!==r?r:d.getDocumentRoot(t[0]),s(s([],e),[m]),n,!0,t):E(t,e,n,!1)}t.is=function(e,t,n){return void 0===n&&(n={}),v([e],t,n)},t.some=v,t.filter=function(e,t,n){return void 0===n&&(n={}),b(l.parse(e,n),t,n)},t.select=function(e,t,n){if(void 0===n&&(n={}),"function"==typeof e)return C(t,e);var r=d.groupSelectors(l.parse(e,n)),i=r[0],a=r[1].map((function(e){return E(t,e,n,!0)}));return i.length&&a.push(S(t,i,n,1/0)),1===a.length?a[0]:u.uniqueSort(a.reduce((function(e,t){return s(s([],e),t)})))};var A=new Set(["descendant","adjacent"]);function _(e){return e!==p&&"pseudo"===e.type&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((function(e){return e.some(_)})))}function w(e,t,n){return n&&e.some(_)?r(r({},t),{context:n}):t}function E(e,t,n,r,i){var a=t.findIndex(h.isFilter),o=t.slice(0,a),s=t[a],c=h.getLimit(s.name,s.data);if(0===c)return[];var d=w(o,n,i),f=(0!==o.length||Array.isArray(e)?0===o.length||1===o.length&&o[0]===p?(Array.isArray(e)?e:[e]).filter(u.isTag):r||o.some(l.isTraversal)?S(e,[o],d,c):T(e,[o],d):u.getChildren(e).filter(u.isTag)).slice(0,c),m=function(e,t,n,r){var i="string"==typeof n?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)<t.length?[i<0?t[t.length+i]:t[i]]:[];case"gt":return isFinite(i)?t.slice(i+1):[];case"even":return t.filter((function(e,t){return t%2==0}));case"odd":return t.filter((function(e,t){return t%2==1}));case"not":var a=new Set(b(n,t,r));return t.filter((function(e){return!a.has(e)}))}}(s.name,f,s.data,n);if(0===m.length||t.length===a+1)return m;var v=t.slice(a+1),y=v.some(l.isTraversal),_=w(v,n,i);return y&&(A.has(v[0].type)&&v.unshift(g),v.unshift(p)),v.some(h.isFilter)?E(m,v,n,!1,i):y?S(m,[v],_,1/0):T(m,[v],_)}function S(e,t,n,r){return 0===r?[]:C(e,c._compileToken(t,n,e),r)}function C(e,t,n){void 0===n&&(n=1/0);var r=c.prepareContext(e,u,t.shouldTestNextSiblings);return u.find((function(e){return u.isTag(e)&&t(e)}),r,!0,n)}function T(e,t,n){var r=(Array.isArray(e)?e:[e]).filter(u.isTag);if(0===r.length)return r;var i=c._compileToken(t,n);return r.filter(i)}},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.isTraversal=void 0;var i=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,a=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,o=new Map([["~","element"],["^","start"],["$","end"],["*","any"],["!","not"],["|","hyphen"]]),s={">":"child","<":"parent","~":"sibling","+":"adjacent"},l={"#":["id","equals"],".":["class","element"]},c=new Set(["has","not","matches","is","where","host","host-context"]),u=new Set(r(["descendant"],Object.keys(s).map((function(e){return s[e]})),!0)),d=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function h(e){return u.has(e.type)}t.isTraversal=h;var f=new Set(["contains","icontains"]),p=new Set(['"',"'"]);function m(e,t,n){var r=parseInt(t,16)-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}function g(e){return e.replace(a,m)}function v(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function b(e,t){if(e.length>0&&0===t.length)throw new Error("Empty sub-selector");e.push(t)}t.default=function(e,t){var n=[],r=function e(t,n,r,a){var u,m;void 0===r&&(r={});var y=[],A=!1;function _(e){var t=n.slice(a+e).match(i);if(!t)throw new Error("Expected name, found "+n.slice(a));var r=t[0];return a+=e+r.length,g(r)}function w(e){for(;v(n.charAt(a+e));)e++;a+=e}function E(e){for(var t=0;"\\"===n.charAt(--e);)t++;return 1==(1&t)}function S(){if(y.length>0&&h(y[y.length-1]))throw new Error("Did not expect successive traversals.")}w(0);for(;""!==n;){var C=n.charAt(a);if(v(C))A=!0,w(1);else if(C in s)S(),y.push({type:s[C]}),A=!1,w(1);else if(","===C){if(0===y.length)throw new Error("Empty sub-selector");t.push(y),y=[],A=!1,w(1)}else if(n.startsWith("/*",a)){var T=n.indexOf("*/",a+2);if(T<0)throw new Error("Comment was not terminated");a=T+2}else if(A&&(S(),y.push({type:"descendant"}),A=!1),C in l){var k=l[C],x=k[0],O=k[1];y.push({type:"attribute",name:x,action:O,value:_(1),namespace:null,ignoreCase:!!r.xmlMode&&null})}else if("["===C){w(1);var I=null;"|"===n.charAt(a)&&(I="",a+=1),n.startsWith("*|",a)&&(I="*",a+=2);var M=_(0);null===I&&"|"===n.charAt(a)&&"="!==n.charAt(a+1)&&(I=M,M=_(1)),(null!==(u=r.lowerCaseAttributeNames)&&void 0!==u?u:!r.xmlMode)&&(M=M.toLowerCase()),w(0);O="exists";var P=o.get(n.charAt(a));if(P){if(O=P,"="!==n.charAt(a+1))throw new Error("Expected `=`");w(2)}else"="===n.charAt(a)&&(O="equals",w(1));var D="",N=null;if("exists"!==O){if(p.has(n.charAt(a))){for(var L=n.charAt(a),R=a+1;R<n.length&&(n.charAt(R)!==L||E(R));)R+=1;if(n.charAt(R)!==L)throw new Error("Attribute value didn't end");D=g(n.slice(a+1,R)),a=R+1}else{for(var B=a;a<n.length&&(!v(n.charAt(a))&&"]"!==n.charAt(a)||E(a));)a+=1;D=g(n.slice(B,a))}w(0);var j=n.charAt(a);"s"===j||"S"===j?(N=!1,w(1)):"i"!==j&&"I"!==j||(N=!0,w(1))}if(r.xmlMode||null!=N||(N=d.has(M)),"]"!==n.charAt(a))throw new Error("Attribute selector didn't terminate");a+=1;var F={type:"attribute",name:M,action:O,value:D,namespace:I,ignoreCase:N};y.push(F)}else if(":"===C){if(":"===n.charAt(a+1)){y.push({type:"pseudo-element",name:_(2).toLowerCase()});continue}var U=_(1).toLowerCase(),H=null;if("("===n.charAt(a))if(c.has(U)){if(p.has(n.charAt(a+1)))throw new Error("Pseudo-selector "+U+" cannot be quoted");if(a=e(H=[],n,r,a+1),")"!==n.charAt(a))throw new Error("Missing closing parenthesis in :"+U+" ("+n+")");a+=1}else{for(var z=a+=1,V=1;V>0&&a<n.length;a++)"("!==n.charAt(a)||E(a)?")"!==n.charAt(a)||E(a)||V--:V++;if(V)throw new Error("Parenthesis not matched");if(H=n.slice(z,a-1),f.has(U)){var W=H.charAt(0);W===H.slice(-1)&&p.has(W)&&(H=H.slice(1,-1)),H=g(H)}}y.push({type:"pseudo",name:U,data:H})}else{I=null;var G=void 0;if("*"===C)a+=1,G="*";else{if(!i.test(n.slice(a)))return y.length&&"descendant"===y[y.length-1].type&&y.pop(),b(t,y),a;"|"===n.charAt(a)&&(I="",a+=1),G=_(0)}"|"===n.charAt(a)&&(I=G,"*"===n.charAt(a+1)?(G="*",a+=2):G=_(1)),"*"===G?y.push({type:"universal",namespace:I}):((null!==(m=r.lowerCaseTags)&&void 0!==m?m:!r.xmlMode)&&(G=G.toLowerCase()),y.push({type:"tag",name:G,namespace:I}))}}return b(t,y),a}(n,""+e,t,0);if(r<e.length)throw new Error("Unmatched selector: "+e.slice(r));return n}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=t.pseudos=t.filters=t.is=t.selectOne=t.selectAll=t.prepareContext=t._compileToken=t._compileUnsafe=t.compile=void 0;var o=a(n(969)),s=n(239),l=n(1746),c=n(535),u=function(e,t){return e===t},d={adapter:o,equals:u};function h(e){var t,n,r,i,a=null!=e?e:d;return null!==(t=a.adapter)&&void 0!==t||(a.adapter=o),null!==(n=a.equals)&&void 0!==n||(a.equals=null!==(i=null===(r=a.adapter)||void 0===r?void 0:r.equals)&&void 0!==i?i:u),a}function f(e){return function(t,n,r){var i=h(n);return e(t,i,r)}}function p(e){return function(t,n,r){var i=h(r);"function"!=typeof t&&(t=(0,l.compileUnsafe)(t,i,n));var a=m(n,i.adapter,t.shouldTestNextSiblings);return e(t,a,i)}}function m(e,t,n){return void 0===n&&(n=!1),n&&(e=function(e,t){for(var n=Array.isArray(e)?e.slice(0):[e],r=n.length,i=0;i<r;i++){var a=(0,c.getNextSiblings)(n[i],t);n.push.apply(n,a)}return n}(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}t.compile=f(l.compile),t._compileUnsafe=f(l.compileUnsafe),t._compileToken=f(l.compileToken),t.prepareContext=m,t.selectAll=p((function(e,t,n){return e!==s.falseFunc&&t&&0!==t.length?n.adapter.findAll(e,t):[]})),t.selectOne=p((function(e,t,n){return e!==s.falseFunc&&t&&0!==t.length?n.adapter.findOne(e,t):null})),t.is=function(e,t,n){var r=h(n);return("function"==typeof t?t:(0,l.compile)(t,r))(e)},t.default=t.selectAll;var g=n(979);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return g.filters}}),Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return g.pseudos}}),Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return g.aliases}})},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(n(970),t),i(n(1742),t),i(n(1743),t),i(n(977),t),i(n(978),t),i(n(1744),t),i(n(1745),t);var a=n(274);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return a.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return a.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return a.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return a.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return a.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return a.hasChildren}})},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=n(274),a=r(n(1739)),o=n(380);function s(e,t){return(0,a.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var o=n(380),s=new Map([[o.ElementType.Tag,1],[o.ElementType.Script,1],[o.ElementType.Style,1],[o.ElementType.Directive,1],[o.ElementType.Text,3],[o.ElementType.CDATA,4],[o.ElementType.Comment,8],[o.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=s.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),w(this,e)},e}();t.Node=l;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=c;var u=function(e){function t(t){return e.call(this,o.ElementType.Text,t)||this}return i(t,e),t}(c);t.Text=u;var d=function(e){function t(t){return e.call(this,o.ElementType.Comment,t)||this}return i(t,e),t}(c);t.Comment=d;var h=function(e){function t(t,n){var r=e.call(this,o.ElementType.Directive,n)||this;return r.name=t,r}return i(t,e),t}(c);t.ProcessingInstruction=h;var f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=f;var p=function(e){function t(t){return e.call(this,o.ElementType.Root,t)||this}return i(t,e),t}(f);t.Document=p;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var a=e.call(this,i,r)||this;return a.name=t,a.attribs=n,a}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function g(e){return(0,o.isTag)(e)}function v(e){return e.type===o.ElementType.CDATA}function b(e){return e.type===o.ElementType.Text}function y(e){return e.type===o.ElementType.Comment}function A(e){return e.type===o.ElementType.Directive}function _(e){return e.type===o.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),b(e))n=new u(e.data);else if(y(e))n=new d(e.data);else if(g(e)){var r=t?E(e.children):[],i=new m(e.name,a({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=i}else if(v(e)){r=t?E(e.children):[];var s=new f(o.ElementType.CDATA,r);r.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){r=t?E(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!A(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new h(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=v,t.isText=b,t.isComment=y,t.isDirective=A,t.isDocument=_,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(973),i=n(976);t.decode=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?i.encodeXML:i.encodeHTML)(e)};var a=n(976);t.encodeXML=a.encodeXML,t.encodeHTML=a.encodeHTML,t.escape=a.escape,t.encodeHTML4=a.encodeHTML,t.encodeHTML5=a.encodeHTML;var o=n(973);t.decodeXML=o.decodeXML,t.decodeHTML=o.decodeHTML,t.decodeHTMLStrict=o.decodeHTMLStrict,t.decodeHTML4=o.decodeHTML,t.decodeHTML5=o.decodeHTML,t.decodeHTML4Strict=o.decodeHTMLStrict,t.decodeHTML5Strict=o.decodeHTMLStrict,t.decodeXMLStrict=o.decodeXML},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(532)),a=r(n(974)),o=r(n(533)),s=r(n(975));function l(e){var t=Object.keys(e).join("|"),n=u(e),r=new RegExp("&(?:"+(t+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(e){return String(e).replace(r,n)}}t.decodeXML=l(o.default),t.decodeHTMLStrict=l(i.default);var c=function(e,t){return e<t?1:-1};function u(e){return function(t){return"#"===t.charAt(1)?"X"===t.charAt(2)||"x"===t.charAt(2)?s.default(parseInt(t.substr(3),16)):s.default(parseInt(t.substr(2),10)):e[t.slice(1,-1)]}}t.decodeHTML=function(){for(var e=Object.keys(a.default).sort(c),t=Object.keys(i.default).sort(c),n=0,r=0;n<t.length;n++)e[r]===t[n]?(t[n]+=";?",r++):t[n]+=";";var o=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),s=u(i.default);function l(e){return";"!==e.substr(-1)&&(e+=";"),s(e)}return function(e){return String(e).replace(o,l)}}()},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(1740));t.default=function(e){if(e>=55296&&e<=57343||e>1114111)return"�";e in i.default&&(e=i.default[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=l(r(n(533)).default),a=c(i);t.encodeXML=p(i,a);var o=l(r(n(532)).default),s=c(o);function l(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function c(e){var t=[],n=[];return Object.keys(e).forEach((function(e){return 1===e.length?t.push("\\"+e):n.push(e)})),n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.encodeHTML=p(o,s);var u=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function h(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function f(e,t){return"&#x"+(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function p(e,t){return function(n){return n.replace(t,(function(t){return e[t]})).replace(d,f).replace(u,h)}}var m=c(i);t.escape=function(e){return e.replace(m,h).replace(d,f).replace(u,h)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=n(274);function i(e,t,n,a){for(var o=[],s=0,l=t;s<l.length;s++){var c=l[s];if(e(c)&&(o.push(c),--a<=0))break;if(n&&(0,r.hasChildren)(c)&&c.children.length>0){var u=i(e,c.children,n,a);if(o.push.apply(o,u),(a-=u.length)<=0)break}}return o}t.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),i(e,t,n,r)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,i){void 0===i&&(i=!0);for(var a=null,o=0;o<n.length&&!a;o++){var s=n[o];(0,r.isTag)(s)&&(t(s)?a=s:i&&s.children.length>0&&(a=e(t,s.children)))}return a},t.existsOne=function e(t,n){return n.some((function(n){return(0,r.isTag)(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,i,a=[],o=t.filter(r.isTag);i=o.shift();){var s=null===(n=i.children)||void 0===n?void 0:n.filter(r.isTag);s&&s.length>0&&o.unshift.apply(o,s),e(i)&&a.push(i)}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var r=n(274),i=n(977),a={tag_name:function(e){return"function"==typeof e?function(t){return(0,r.isTag)(t)&&e(t.name)}:"*"===e?r.isTag:function(t){return(0,r.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,r.isText)(t)&&e(t.data)}:function(t){return(0,r.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(n){return(0,r.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,r.isTag)(n)&&n.attribs[e]===t}}function s(e,t){return function(n){return e(n)||t(n)}}function l(e){var t=Object.keys(e).map((function(t){var n=e[t];return Object.prototype.hasOwnProperty.call(a,t)?a[t](n):o(t,n)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var n=l(e);return!n||n(t)},t.getElements=function(e,t,n,r){void 0===r&&(r=1/0);var a=l(e);return a?(0,i.filter)(a,t,n,r):[]},t.getElementById=function(e,t,n){return void 0===n&&(n=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(o("id",e),t,n)},t.getElementsByTagName=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,i.filter)(a.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,i.filter)(a.tag_type(e),t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compilePseudoSelector=t.aliases=t.pseudos=t.filters=void 0;var r=n(239),i=n(531),a=n(1750);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return a.filters}});var o=n(1754);Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return o.pseudos}});var s=n(1755);Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return s.aliases}});var l=n(535);t.compilePseudoSelector=function(e,t,n,c,u){var d=t.name,h=t.data;if(Array.isArray(h))return l.subselects[d](e,h,n,c,u);if(d in s.aliases){if(null!=h)throw new Error("Pseudo ".concat(d," doesn't have any arguments"));var f=(0,i.parse)(s.aliases[d],n);return l.subselects.is(e,f,n,c,u)}if(d in a.filters)return a.filters[d](e,h,n,c);if(d in o.pseudos){var p=o.pseudos[d];return(0,o.verifyPseudoArgs)(p,d,h),p===r.falseFunc?r.falseFunc:e===r.trueFunc?function(e){return p(e,n,h)}:function(t){return p(t,n,h)&&e(t)}}throw new Error("unmatched pseudo-class :".concat(d))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLimit=t.isFilter=t.filterNames=void 0,t.filterNames=new Set(["first","last","eq","gt","nth","lt","even","odd"]),t.isFilter=function e(n){return"pseudo"===n.type&&(!!t.filterNames.has(n.name)||!("not"!==n.name||!Array.isArray(n.data))&&n.data.some((function(t){return t.some(e)})))},t.getLimit=function(e,t){var n=null!=t?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?n:1/0:0;case"gt":return isFinite(n)?1/0:0;default:return 1/0}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var i=r(n(982)),a=new Set(["input","option","optgroup","select","button","datalist","textarea"]),o=new Set(["p"]),s={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:o,h1:o,h2:o,h3:o,h4:o,h5:o,h6:o,select:a,input:a,output:a,button:a,datalist:a,textarea:a,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:o,article:o,aside:o,blockquote:o,details:o,div:o,dl:o,fieldset:o,figcaption:o,figure:o,footer:o,form:o,header:o,hr:o,main:o,nav:o,ol:o,pre:o,section:o,table:o,ul:o,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),d=/\s|\//,h=function(){function e(e,t){var n,r,a,o,s;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode,this.tokenizer=new(null!==(a=t.Tokenizer)&&void 0!==a?a:i.default)(this.options,this),null===(s=(o=this.cbs).onparserinit)||void 0===s||s.call(o,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,n;this.updatePosition(1),this.endIndex--,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,e)},e.prototype.onopentagname=function(e){var t,n;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(s,e))for(var r=void 0;this.stack.length>0&&s[e].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);!this.options.xmlMode&&l.has(e)||(this.stack.push(e),c.has(e)?this.foreignContext.push(!0):u.has(e)&&this.foreignContext.push(!1)),null===(n=(t=this.cbs).onopentagname)||void 0===n||n.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(c.has(e)||u.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&l.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,n=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===n&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,n),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,n;null===(n=(t=this.cbs).onattribute)||void 0===n||n.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(d),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,n,r,i;this.updatePosition(4),null===(n=(t=this.cbs).oncomment)||void 0===n||n.call(t,e),null===(i=(r=this.cbs).oncommentend)||void 0===i||i.call(r)},e.prototype.oncdata=function(e){var t,n,r,i,a,o;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(n=(t=this.cbs).oncdatastart)||void 0===n||n.call(t),null===(i=(r=this.cbs).ontext)||void 0===i||i.call(r,e),null===(o=(a=this.cbs).oncdataend)||void 0===o||o.call(a)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,n;null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=h},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(975)),a=r(n(532)),o=r(n(974)),s=r(n(533));function l(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function c(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,n){var r=e.toLowerCase();return e===r?function(e,i){i===r?e._state=t:(e._state=n,e._index--)}:function(i,a){a===r||a===e?i._state=t:(i._state=n,i._index--)}}function d(e,t){var n=e.toLowerCase();return function(r,i){i===n||i===e?r._state=t:(r._state=3,r._index--)}}var h=u("C",24,16),f=u("D",25,16),p=u("A",26,16),m=u("T",27,16),g=u("A",28,16),v=d("R",35),b=d("I",36),y=d("P",37),A=d("T",38),_=u("R",40,1),w=u("I",41,1),E=u("P",42,1),S=u("T",43,1),C=d("Y",45),T=d("L",46),k=d("E",47),x=u("Y",49,1),O=u("L",50,1),I=u("E",51,1),M=d("I",54),P=d("T",55),D=d("L",56),N=d("E",57),L=u("I",58,1),R=u("T",59,1),B=u("L",60,1),j=u("E",61,1),F=u("#",63,64),U=u("X",66,65),H=function(){function e(e,t){var n;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(n=null==e?void 0:e.decodeEntities)||void 0===n||n}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._index<this.buffer.length&&this.parse(),this.ended&&this.finish()},e.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index},e.prototype.stateText=function(e){"<"===e?(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.isTagStartChar=function(e){return c(e)||this.xmlMode&&!l(e)&&"/"!==e&&">"!==e},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||l(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||l(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){l(e)||(">"===e?this._state=1:1!==this.special?4===this.special||"s"!==e&&"S"!==e?4!==this.special||"t"!==e&&"T"!==e?(this._state=1,this._index--):this._state=53:this._state=33:this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||l(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:l(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):l(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||l(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):l(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):l(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){l(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||l(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||l(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?s.default:a.default),this.sectionStart+1<this._index){var t=this.buffer.substring(this.sectionStart+1,this._index);Object.prototype.hasOwnProperty.call(e,t)&&(this.emitPartial(e[t]),this.sectionStart=this._index+1)}},e.prototype.parseLegacyEntity=function(){for(var e=this.sectionStart+1,t=Math.min(this._index-e,6);t>=2;){var n=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(o.default,n))return this.emitPartial(o.default[n]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode&&this.parseLegacyEntity(),this._state=this.baseState):(e<"0"||e>"9")&&!c(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(o.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,n){var r=this.sectionStart+e;if(r!==this._index){var a=this.buffer.substring(r,this._index),o=parseInt(a,t);this.emitPartial(i.default(o)),this.sectionStart=n?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);1===this._state?this.stateText(e):12===this._state?this.stateInAttributeValueDoubleQuotes(e):9===this._state?this.stateInAttributeName(e):19===this._state?this.stateInComment(e):20===this._state?this.stateInSpecialComment(e):8===this._state?this.stateBeforeAttributeName(e):3===this._state?this.stateInTagName(e):6===this._state?this.stateInClosingTagName(e):2===this._state?this.stateBeforeTagName(e):10===this._state?this.stateAfterAttributeName(e):13===this._state?this.stateInAttributeValueSingleQuotes(e):11===this._state?this.stateBeforeAttributeValue(e):5===this._state?this.stateBeforeClosingTagName(e):7===this._state?this.stateAfterClosingTagName(e):32===this._state?this.stateBeforeSpecialS(e):21===this._state?this.stateAfterComment1(e):14===this._state?this.stateInAttributeValueNoQuotes(e):4===this._state?this.stateInSelfClosingTag(e):16===this._state?this.stateInDeclaration(e):15===this._state?this.stateBeforeDeclaration(e):22===this._state?this.stateAfterComment2(e):18===this._state?this.stateBeforeComment(e):33===this._state?this.stateBeforeSpecialSEnd(e):53===this._state?L(this,e):39===this._state?_(this,e):40===this._state?w(this,e):41===this._state?E(this,e):34===this._state?v(this,e):35===this._state?b(this,e):36===this._state?y(this,e):37===this._state?A(this,e):38===this._state?this.stateBeforeSpecialLast(e,2):42===this._state?S(this,e):43===this._state?this.stateAfterSpecialLast(e,6):44===this._state?C(this,e):29===this._state?this.stateInCdata(e):45===this._state?T(this,e):46===this._state?k(this,e):47===this._state?this.stateBeforeSpecialLast(e,3):48===this._state?x(this,e):49===this._state?O(this,e):50===this._state?I(this,e):51===this._state?this.stateAfterSpecialLast(e,5):52===this._state?M(this,e):54===this._state?P(this,e):55===this._state?D(this,e):56===this._state?N(this,e):57===this._state?this.stateBeforeSpecialLast(e,4):58===this._state?R(this,e):59===this._state?B(this,e):60===this._state?j(this,e):61===this._state?this.stateAfterSpecialLast(e,5):17===this._state?this.stateInProcessingInstruction(e):64===this._state?this.stateInNamedEntity(e):23===this._state?h(this,e):62===this._state?F(this,e):24===this._state?f(this,e):25===this._state?p(this,e):30===this._state?this.stateAfterCdata1(e):31===this._state?this.stateAfterCdata2(e):26===this._state?m(this,e):27===this._state?g(this,e):28===this._state?this.stateBeforeCdata6(e):66===this._state?this.stateInHexEntity(e):65===this._state?this.stateInNumericEntity(e):63===this._state?U(this,e):this.cbs.onerror(Error("unknown _state"),this._state),this._index++}this.cleanup()},e.prototype.finish=function(){this.sectionStart<this._index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.substr(this.sectionStart);29===this._state||30===this._state||31===this._state?this.cbs.oncdata(e):19===this._state||21===this._state||22===this._state?this.cbs.oncomment(e):64!==this._state||this.xmlMode?65!==this._state||this.xmlMode?66!==this._state||this.xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this.cbs.ontext(e):(this.decodeNumericEntity(3,16,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.decodeNumericEntity(2,10,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.parseLegacyEntity(),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData()))},e.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)},e.prototype.emitToken=function(e){this.cbs[e](this.getSection()),this.sectionStart=-1},e.prototype.emitPartial=function(e){1!==this.baseState?this.cbs.onattribdata(e):this.cbs.ontext(e)},e}();t.default=H},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var o=n(320),s=new Map([[o.ElementType.Tag,1],[o.ElementType.Script,1],[o.ElementType.Style,1],[o.ElementType.Directive,1],[o.ElementType.Text,3],[o.ElementType.CDATA,4],[o.ElementType.Comment,8],[o.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=s.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),w(this,e)},e}();t.Node=l;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=c;var u=function(e){function t(t){return e.call(this,o.ElementType.Text,t)||this}return i(t,e),t}(c);t.Text=u;var d=function(e){function t(t){return e.call(this,o.ElementType.Comment,t)||this}return i(t,e),t}(c);t.Comment=d;var h=function(e){function t(t,n){var r=e.call(this,o.ElementType.Directive,n)||this;return r.name=t,r}return i(t,e),t}(c);t.ProcessingInstruction=h;var f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=f;var p=function(e){function t(t){return e.call(this,o.ElementType.Root,t)||this}return i(t,e),t}(f);t.Document=p;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var a=e.call(this,i,r)||this;return a.name=t,a.attribs=n,a}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function g(e){return(0,o.isTag)(e)}function v(e){return e.type===o.ElementType.CDATA}function b(e){return e.type===o.ElementType.Text}function y(e){return e.type===o.ElementType.Comment}function A(e){return e.type===o.ElementType.Directive}function _(e){return e.type===o.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),b(e))n=new u(e.data);else if(y(e))n=new d(e.data);else if(g(e)){var r=t?E(e.children):[],i=new m(e.name,a({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=i}else if(v(e)){r=t?E(e.children):[];var s=new f(o.ElementType.CDATA,r);r.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){r=t?E(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!A(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new h(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=v,t.isText=b,t.isComment=y,t.isDirective=A,t.isDocument=_,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=w},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var c,u,d=l(n(148)),h=s(n(985)),f=n(981);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(c||(c={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(u||(u={}));var p=function(e){function t(t,n){return"object"==typeof t&&(n=t=void 0),e.call(this,t,n)||this}return i(t,e),t.prototype.onend=function(){var e,t,n=v(_,this.dom);if(n){var r={};if("feed"===n.name){var i=n.children;r.type="atom",A(r,"id","id",i),A(r,"title","title",i);var a=y("href",v("link",i));a&&(r.link=a),A(r,"description","subtitle",i),(o=b("updated",i))&&(r.updated=new Date(o)),A(r,"author","email",i,!0),r.items=g("entry",i).map((function(e){var t={},n=e.children;A(t,"id","id",n),A(t,"title","title",n);var r=y("href",v("link",n));r&&(t.link=r);var i=b("summary",n)||b("content",n);i&&(t.description=i);var a=b("updated",n);return a&&(t.pubDate=new Date(a)),t.media=m(n),t}))}else{var o;i=null!==(t=null===(e=v("channel",n.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[];r.type=n.name.substr(0,3),r.id="",A(r,"title","title",i),A(r,"link","link",i),A(r,"description","description",i),(o=b("lastBuildDate",i))&&(r.updated=new Date(o)),A(r,"author","managingEditor",i,!0),r.items=g("item",n.children).map((function(e){var t={},n=e.children;A(t,"id","guid",n),A(t,"title","title",n),A(t,"link","link",n),A(t,"description","description",n);var r=b("pubDate",n);return r&&(t.pubDate=new Date(r)),t.media=m(n),t}))}this.feed=r,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(d.default);function m(e){return g("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function g(e,t){return h.getElementsByTagName(e,t,!0)}function v(e,t){return h.getElementsByTagName(e,t,!0,1)[0]}function b(e,t,n){return void 0===n&&(n=!1),h.getText(h.getElementsByTagName(e,t,n,1)).trim()}function y(e,t){return t?t.attribs[e]:null}function A(e,t,n,r,i){void 0===i&&(i=!1);var a=b(n,r,i);a&&(e[t]=a)}function _(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=p,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var n=new p(t);return new f.Parser(n,t).end(e),n.feed}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(n(986),t),i(n(1758),t),i(n(1759),t),i(n(988),t),i(n(989),t),i(n(1760),t),i(n(1761),t);var a=n(148);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return a.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return a.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return a.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return a.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return a.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return a.hasChildren}})},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=n(148),a=r(n(987)),o=n(320);function s(e,t){return(0,a.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(320)),l=n(972),c=n(1757),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);var d=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(e,t){void 0===t&&(t={});for(var n=("length"in e?e:[e]),r="",i=0;i<n.length;i++)r+=f(n[i],t);return r}function f(e,t){switch(e.type){case s.Root:return h(e.children,t);case s.Directive:case s.Doctype:return"<"+e.data+">";case s.Comment:return function(e){return"\x3c!--"+e.data+"--\x3e"}(e);case s.CDATA:return function(e){return"<![CDATA["+e.children[0].data+"]]>"}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=c.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&p.has(e.parent.name)&&(t=r(r({},t),{xmlMode:!1})));!t.xmlMode&&m.has(e.name)&&(t=r(r({},t),{xmlMode:"foreign"}));var i="<"+e.name,a=function(e,t){if(e)return Object.keys(e).map((function(n){var r,i,a=null!==(r=e[n])&&void 0!==r?r:"";return"foreign"===t.xmlMode&&(n=null!==(i=c.attributeNames.get(n))&&void 0!==i?i:n),t.emptyAttrs||t.xmlMode||""!==a?n+'="'+(!1!==t.decodeEntities?l.encodeXML(a):a.replace(/"/g,"&quot;"))+'"':n})).join(" ")}(e.attribs,t);a&&(i+=" "+a);0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=h(e.children,t)),!t.xmlMode&&d.has(e.name)||(i+="</"+e.name+">"));return i}(e,t);case s.Text:return function(e,t){var n=e.data||"";!1===t.decodeEntities||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=l.encodeXML(n));return n}(e,t)}}t.default=h;var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=n(148);function i(e,t,n,a){for(var o=[],s=0,l=t;s<l.length;s++){var c=l[s];if(e(c)&&(o.push(c),--a<=0))break;if(n&&(0,r.hasChildren)(c)&&c.children.length>0){var u=i(e,c.children,n,a);if(o.push.apply(o,u),(a-=u.length)<=0)break}}return o}t.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),i(e,t,n,r)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,i){void 0===i&&(i=!0);for(var a=null,o=0;o<n.length&&!a;o++){var s=n[o];(0,r.isTag)(s)&&(t(s)?a=s:i&&s.children.length>0&&(a=e(t,s.children)))}return a},t.existsOne=function e(t,n){return n.some((function(n){return(0,r.isTag)(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,i,a=[],o=t.filter(r.isTag);i=o.shift();){var s=null===(n=i.children)||void 0===n?void 0:n.filter(r.isTag);s&&s.length>0&&o.unshift.apply(o,s),e(i)&&a.push(i)}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var r=n(148),i=n(988),a={tag_name:function(e){return"function"==typeof e?function(t){return(0,r.isTag)(t)&&e(t.name)}:"*"===e?r.isTag:function(t){return(0,r.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,r.isText)(t)&&e(t.data)}:function(t){return(0,r.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(n){return(0,r.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,r.isTag)(n)&&n.attribs[e]===t}}function s(e,t){return function(n){return e(n)||t(n)}}function l(e){var t=Object.keys(e).map((function(t){var n=e[t];return Object.prototype.hasOwnProperty.call(a,t)?a[t](n):o(t,n)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var n=l(e);return!n||n(t)},t.getElements=function(e,t,n,r){void 0===r&&(r=1/0);var a=l(e);return a?(0,i.filter)(a,t,n,r):[]},t.getElementById=function(e,t,n){return void 0===n&&(n=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(o("id",e),t,n)},t.getElementsByTagName=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,i.filter)(a.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,i.filter)(a.tag_type(e),t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.render=t.parse=void 0;var r=n(216),i=n(148),a=n(1762),o=r.__importDefault(n(1775));t.parse=function(e,t,n){var r={scriptingEnabled:"boolean"!=typeof t.scriptingEnabled||t.scriptingEnabled,treeAdapter:o.default,sourceCodeLocationInfo:t.sourceCodeLocationInfo},i=t.context;return n?a.parse(e,r):a.parseFragment(i,e,r)},t.render=function(e){for(var t,n=("length"in e?e:[e]),s=0;s<n.length;s+=1){var l=n[s];i.isDocument(l)&&(t=Array.prototype.splice).call.apply(t,r.__spreadArray([n,s,1],l.children))}return a.serialize({children:n},{treeAdapter:o.default})}},function(e,t,n){"use strict";const r=n(202),i=n(381),a=n(992);e.exports=class extends r{constructor(e){super(e),this.tokenizer=e,this.posTracker=r.install(e.preprocessor,a),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){const n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.ctLoc},_createCharacterToken(n,r){t._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===i.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col+1,n.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col,n.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(i.MODE).forEach(r=>{const a=i.MODE[r];n[a]=function(n){e.ctLoc=e._getCurrentLocation(),t[a].call(this,n)}}),n}}},function(e,t,n){"use strict";const r=n(202);e.exports=class extends r{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){const n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){const n=this.pos;t.dropParsedChunk.call(this);const r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(240);t.createDocument=function(){return{nodeName:"#document",mode:r.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const i=function(e){return{nodeName:"#text",value:e,parentNode:null}},a=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},o=t.insertBefore=function(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};t.setTemplateContent=function(e,t){e.content=t},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,n,r){let i=null;for(let t=0;t<e.childNodes.length;t++)if("#documentType"===e.childNodes[t].nodeName){i=e.childNodes[t];break}i?(i.name=t,i.publicId=n,i.systemId=r):a(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r})},t.setDocumentMode=function(e,t){e.mode=t},t.getDocumentMode=function(e){return e.mode},t.detachNode=function(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},t.insertText=function(e,t){if(e.childNodes.length){const n=e.childNodes[e.childNodes.length-1];if("#text"===n.nodeName)return void(n.value+=t)}a(e,i(t))},t.insertTextBefore=function(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&"#text"===r.nodeName?r.value+=t:o(e,i(t),n)},t.adoptAttributes=function(e,t){const n=[];for(let t=0;t<e.attrs.length;t++)n.push(e.attrs[t].name);for(let r=0;r<t.length;r++)-1===n.indexOf(t[r].name)&&e.attrs.push(t[r])},t.getFirstChild=function(e){return e.childNodes[0]},t.getChildNodes=function(e){return e.childNodes},t.getParentNode=function(e){return e.parentNode},t.getAttrList=function(e){return e.attrs},t.getTagName=function(e){return e.tagName},t.getNamespaceURI=function(e){return e.namespaceURI},t.getTextNodeContent=function(e){return e.value},t.getCommentNodeContent=function(e){return e.data},t.getDocumentTypeNodeName=function(e){return e.name},t.getDocumentTypeNodePublicId=function(e){return e.publicId},t.getDocumentTypeNodeSystemId=function(e){return e.systemId},t.isTextNode=function(e){return"#text"===e.nodeName},t.isCommentNode=function(e){return"#comment"===e.nodeName},t.isDocumentTypeNode=function(e){return"#documentType"===e.nodeName},t.isElementNode=function(e){return!!e.tagName},t.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t},t.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation},t.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t)}},function(e,t,n){"use strict";e.exports=function(e,t){return[e,t=t||Object.create(null)].reduce((e,t)=>(Object.keys(t).forEach(n=>{e[n]=t[n]}),e),Object.create(null))}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(240),i=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],a=i.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),o=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],s=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],l=s.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function c(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function u(e,t){for(let n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return!0;return!1}t.isConforming=function(e){return"html"===e.name&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},t.getDocumentMode=function(e){if("html"!==e.name)return r.QUIRKS;const t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return r.QUIRKS;let n=e.publicId;if(null!==n){if(n=n.toLowerCase(),o.indexOf(n)>-1)return r.QUIRKS;let e=null===t?a:i;if(u(n,e))return r.QUIRKS;if(e=null===t?s:l,u(n,e))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},t.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+c(t):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+c(n)),r}},function(e,t,n){"use strict";const r=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const i=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[r.HTML]:{[i.ADDRESS]:!0,[i.APPLET]:!0,[i.AREA]:!0,[i.ARTICLE]:!0,[i.ASIDE]:!0,[i.BASE]:!0,[i.BASEFONT]:!0,[i.BGSOUND]:!0,[i.BLOCKQUOTE]:!0,[i.BODY]:!0,[i.BR]:!0,[i.BUTTON]:!0,[i.CAPTION]:!0,[i.CENTER]:!0,[i.COL]:!0,[i.COLGROUP]:!0,[i.DD]:!0,[i.DETAILS]:!0,[i.DIR]:!0,[i.DIV]:!0,[i.DL]:!0,[i.DT]:!0,[i.EMBED]:!0,[i.FIELDSET]:!0,[i.FIGCAPTION]:!0,[i.FIGURE]:!0,[i.FOOTER]:!0,[i.FORM]:!0,[i.FRAME]:!0,[i.FRAMESET]:!0,[i.H1]:!0,[i.H2]:!0,[i.H3]:!0,[i.H4]:!0,[i.H5]:!0,[i.H6]:!0,[i.HEAD]:!0,[i.HEADER]:!0,[i.HGROUP]:!0,[i.HR]:!0,[i.HTML]:!0,[i.IFRAME]:!0,[i.IMG]:!0,[i.INPUT]:!0,[i.LI]:!0,[i.LINK]:!0,[i.LISTING]:!0,[i.MAIN]:!0,[i.MARQUEE]:!0,[i.MENU]:!0,[i.META]:!0,[i.NAV]:!0,[i.NOEMBED]:!0,[i.NOFRAMES]:!0,[i.NOSCRIPT]:!0,[i.OBJECT]:!0,[i.OL]:!0,[i.P]:!0,[i.PARAM]:!0,[i.PLAINTEXT]:!0,[i.PRE]:!0,[i.SCRIPT]:!0,[i.SECTION]:!0,[i.SELECT]:!0,[i.SOURCE]:!0,[i.STYLE]:!0,[i.SUMMARY]:!0,[i.TABLE]:!0,[i.TBODY]:!0,[i.TD]:!0,[i.TEMPLATE]:!0,[i.TEXTAREA]:!0,[i.TFOOT]:!0,[i.TH]:!0,[i.THEAD]:!0,[i.TITLE]:!0,[i.TR]:!0,[i.TRACK]:!0,[i.UL]:!0,[i.WBR]:!0,[i.XMP]:!0},[r.MATHML]:{[i.MI]:!0,[i.MO]:!0,[i.MN]:!0,[i.MS]:!0,[i.MTEXT]:!0,[i.ANNOTATION_XML]:!0},[r.SVG]:{[i.TITLE]:!0,[i.FOREIGN_OBJECT]:!0,[i.DESC]:!0}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.render=t.parse=void 0;var i=n(275);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return i.parseDocument}});var a=n(987);Object.defineProperty(t,"render",{enumerable:!0,get:function(){return r(a).default}})},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){return new Error(String(e)+" is a required method of "+String(t)+", but was not implemented.")}var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={}}return r(e,[{key:"createRenderer",value:function(e){throw i("createRenderer","EnzymeAdapter")}},{key:"nodeToElement",value:function(e){throw i("nodeToElement","EnzymeAdapter")}},{key:"matchesElementType",value:function(e,t){return e?e.type===t:e}},{key:"isValidElement",value:function(e){throw i("isValidElement","EnzymeAdapter")}},{key:"createElement",value:function(e,t){throw i("createElement","EnzymeAdapter")}},{key:"invokeSetStateCallback",value:function(e,t){t.call(e)}}]),e}();a.MODES={STRING:"string",MOUNT:"mount",SHALLOW:"shallow"},e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.typeName=g,t.spaces=v,t.indent=b,t.debugNode=w,t.debugNodes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.map((function(e){return w(e,void 0,t)})).join("\n\n\n")};var i=p(n(1784)),a=p(n(529)),o=p(n(1785)),s=p(n(1786)),l=p(n(527)),c=p(n(1787)),u=p(n(523)),d=p(n(156)),h=n(321),f=p(n(242));function p(e){return e&&e.__esModule?e:{default:e}}var m=Function.bind.call(Function.call,Boolean.prototype.valueOf);function g(e){return(0,f.default)().displayNameOfNode?(0,f.default)().displayNameOfNode(e)||"Component":"function"==typeof e.type?e.type.displayName||(0,a.default)(e.type)||"Component":e.type}function v(e){return Array(e+1).join(" ")}function b(e,t){return t.split("\n").map((function(t){return""+String(v(e))+String(t)})).join("\n")}function y(e,t){var n=(0,h.propsOfNode)(e);return Object.keys(n).filter((function(e){return"children"!==e})).map((function(e){return String(e)+"="+String(function(e,t){return(0,o.default)(e)?(0,u.default)(String(e),{quoteStyle:"double"}):(0,s.default)(e)?"{"+String((0,u.default)(Number(e)))+"}":(0,c.default)(e)?"{"+String((0,u.default)(m(e)))+"}":(0,l.default)(e)?"{"+String((0,u.default)(e))+"}":"object"===(void 0===e?"undefined":r(e))?t.verbose?"{"+String((0,u.default)(e))+"}":"{{...}}":"{["+(void 0===e?"undefined":r(e))+"]}"}(n[e],t))})).join(" ")}function A(e,t){return e.length?"\n"+String(e.map((function(e){return b(t,e)})).join("\n"))+"\n":""}function _(e){return(0,d.default)(e,"nodeType")&&"string"==typeof e.nodeType&&(0,d.default)(e,"type")&&(0,d.default)(e,"key")&&(0,d.default)(e,"ref")&&(0,d.default)(e,"instance")&&(0,d.default)(e,"rendered")}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof e||"number"==typeof e)return(0,i.default)(e);if("function"==typeof e){var r=(0,a.default)(e);return"[function"+(r?" "+String(r):"")+"]"}if(!e)return"";var o=(0,f.default)();if(!o.isValidElement(e)&&!_(e))return"{"+String((0,u.default)(e))+"}";var s=(0,h.childrenOfNode)(e).map((function(e){return w(e,t,n)})).filter(Boolean),l=g(e),c=n.ignoreProps?"":y(e,n),d=c?" ":"",p=s.length?">":" ",m=A(s,t),v=s.length?"</"+String(l)+">":"/>";return"<"+String(l)+d+String(c)+p+String(m)+v}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.buildPredicate=w,t.reduceTreeBySelector=k,t.reduceTreesBySelector=function(e,t){var n=t.map((function(t){return k(e,t)}));return g((0,s.default)(n,1))};var a=n(1788),o=p(n(1794)),s=p(n(317)),l=p(n(354)),c=p(n(156)),u=p(n(1796)),d=n(321),h=n(379),f=p(n(242));function p(e){return e&&e.__esModule?e:{default:e}}var m=(0,a.createParser)();function g(e){return[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(new Set(e)))}function v(e,t){return g(t.reduce(e,[]))}function b(e){try{return m.parse(e)}catch(t){throw new Error("Failed to parse selector: "+String(e))}}function y(e,t){var n=t.operator,r=t.value,i=t.name,a=(0,h.propsOfNode)(e),o=Object.getOwnPropertyDescriptor(a,i);if(o&&o.get)return!1;var s=a[i];if(void 0===s)return!1;if("attributePresenceSelector"===t.type)return(0,c.default)(a,t.name);if(("string"!=typeof s||"string"!=typeof r)&&"="!==n)return!1;switch(n){case"=":return(0,l.default)(s,r);case"~=":return-1!==s.split(" ").indexOf(r);case"|=":return s===r||s.startsWith(String(r)+"-");case"^=":return""!==r&&s.slice(0,r.length)===r;case"$=":return""!==r&&s.slice(-r.length)===r;case"*=":return""!==r&&-1!==s.indexOf(r);default:throw new Error('Enzyme::Selector: Unknown attribute selector operator "'+String(n)+'"')}}function A(e,t,n){if(null===e||"string"==typeof e)return!1;switch(t.type){case"universalSelector":return!0;case"classSelector":return(0,d.hasClassName)(e,t.name);case"typeSelector":return(0,h.nodeHasType)(e,t.name);case"idSelector":return(0,d.nodeHasId)(e,t.name);case"attributePresenceSelector":case"attributeValueSelector":return y(e,t);case"pseudoElementSelector":case"pseudoClassSelector":return function(e,t,n){var r=t.name,a=t.parameters;if("not"===r)return a.every((function(t){return 0===k(t,e).length}));if("empty"===r)return 0===(0,d.treeFilter)(e,(function(t){return t!==e})).length;if("first-child"===r){var o=(0,d.findParentNode)(n,e).rendered;return i(o,1)[0]===e}if("last-child"===r){var s=(0,d.findParentNode)(n,e).rendered;return s[s.length-1]===e}if("focus"===r){if("undefined"==typeof document)throw new Error('Enzyme::Selector does not support the ":focus" pseudo-element without a global `document`.');var l=(0,f.default)();return document.activeElement&&l.nodeToHostNode(e)===document.activeElement}throw new TypeError('Enzyme::Selector does not support the "'+String(t.name)+'" pseudo-element or pseudo-class selectors.')}(e,t,n);default:throw new Error("Unknown token type: "+String(t.type))}}function _(e,t){return function(n){return e.body.every((function(e){return A(n,e,t)}))}}function w(e){if("string"==typeof e){var t=b(e);if(function(e){return e.some((function(e){return"selector"!==e.type}))}(t))throw new TypeError("This method does not support complex CSS selectors");return _(t[0])}var n=(0,f.default)();if(n.isValidElementType?n.isValidElementType(e):"function"==typeof e)return function(t){return n.matchesElementType(t,e)};if("object"===(void 0===e?"undefined":r(e))){if(!Array.isArray(e)&&null!==e&&Object.keys(e).length>0){if((0,o.default)(e).some((function(e){return void 0===e})))throw new TypeError("Enzyme::Props can’t have `undefined` values. Try using ‘findWhere()’ instead.");return function(t){return(0,d.nodeMatchesObjectProps)(t,e)}}throw new TypeError("Enzyme::Selector does not support an array, null, or empty object as a selector")}throw new TypeError("Enzyme::Selector expects a string, object, or valid element type (Component Constructor)")}function E(e,t,n){return e.reduce((function(e,r){var i=(0,d.findParentNode)(n,r);if(!i)return e;var a=(0,d.childrenOfNode)(i),o=a.indexOf(r),s=a[o+1];return s?(t(s)&&e.push(s),e):e}),[])}function S(e,t,n){return v((function(e,r){var i=(0,d.findParentNode)(n,r);if(!i)return e;var a=(0,d.childrenOfNode)(i),o=a.indexOf(r),s=a.slice(o+1);return e.concat(s.filter(t))}),e)}function C(e,t){return v((function(e,n){return e.concat((0,d.childrenOfNode)(n).filter(t))}),e)}function T(e,t){return v((function(e,n){return e.concat((0,d.treeFilter)(n,t))}),(0,s.default)(e.map(d.childrenOfNode)))}function k(e,t){if("string"!=typeof e){var n=(0,u.default)(e);if(n.length>0)return(0,s.default)(n.map((function(e){return k(e.tag,t)})))}if("function"==typeof e||"object"===(void 0===e?"undefined":r(e)))return(0,d.treeFilter)(t,w(e));var i=[];if("string"!=typeof e)throw new TypeError("Enzyme::Selector expects a string, object, or Component Constructor");for(var a=b(e),o=0;o<a.length;){var l=a[o];if("selector"===l.type){var c=_(l,t);i=i.concat((0,d.treeFilter)(t,c))}else{var h=l.type,f=_(a[o+=1],t);switch(h){case"adjacentSiblingCombinator":i=E(i,f,t);break;case"generalSiblingCombinator":i=S(i,f,t);break;case"childCombinator":i=C(i,f);break;case"descendantCombinator":i=T(i,f);break;default:throw new Error("Unknown combinator selector: "+String(h))}}o+=1}return i}},function(e,t,n){"use strict";var r=n(156),i=n(528),a=n(238)("Object.prototype.propertyIsEnumerable");e.exports=function(e){var t=i(e),n=[];for(var o in t)r(t,o)&&a(t,o)&&n.push(t[o]);return n}},function(e,t,n){"use strict";var r=n(1001);e.exports=function(){return"function"==typeof Object.values?Object.values:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a="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},o=m(n(273)),s=m(n(317)),l=m(n(156)),c=m(n(956)),u=n(379),d=m(n(242)),h=n(999),f=n(321),p=n(1e3);function m(e){return e&&e.__esModule?e:{default:e}}function g(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=(0,u.sym)("__node__"),A=(0,u.sym)("__nodes__"),_=(0,u.sym)("__renderer__"),w=(0,u.sym)("__unrendered__"),E=(0,u.sym)("__root__"),S=(0,u.sym)("__options__"),C=(0,u.sym)("__setState__"),T=(0,u.sym)("__rootNodes__"),k=(0,u.sym)("__childContext__"),x=(0,u.sym)("__wrappingComponent__"),O=(0,u.sym)("__primaryWrapper__"),I=(0,u.sym)("__rootFinder__"),M=(0,u.sym)("__providerValues__");function P(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.treeFilter;return e.flatMap((function(e){return n(e.getNodeInternal(),t)}))}function D(e,t){return e.wrap(e.getNodesInternal().filter(t).filter(Boolean))}function N(e){var t=e.lifecycleExperimental,n=e.disableLifecycleMethods,r=e.enableComponentDidUpdateOnSetState,i=e.supportPrevContextArgumentOfComponentDidUpdate,a=e.lifecycles;if(void 0!==t&&"boolean"!=typeof t)throw new Error("lifecycleExperimental must be either true or false if provided");if(void 0!==n&&"boolean"!=typeof n)throw new Error("disableLifecycleMethods must be either true or false if provided");if(null!=t&&null!=n&&t===n)throw new Error("lifecycleExperimental and disableLifecycleMethods cannot be set to the same value");if(void 0!==r&&a.componentDidUpdate&&a.componentDidUpdate.onSetState!==r)throw new TypeError("the legacy enableComponentDidUpdateOnSetState option should be matched by `lifecycles: { componentDidUpdate: { onSetState: true } }`, for compatibility");if(void 0!==i&&a.componentDidUpdate&&a.componentDidUpdate.prevContext!==i)throw new TypeError("the legacy supportPrevContextArgumentOfComponentDidUpdate option should be matched by `lifecycles: { componentDidUpdate: { prevContext: true } }`, for compatibility")}function L(e){var t=e.options,n=t.lifecycles,r=void 0===n?{}:n,i=t.enableComponentDidUpdateOnSetState,a=t.supportPrevContextArgumentOfComponentDidUpdate,s=void 0!==i,l=void 0!==a,c=s||l?(0,o.default)({},s&&{onSetState:!!i},l&&{prevContext:!!a}):null,u=r.getDerivedStateFromProps,d=!!u&&{hasShouldComponentUpdateBug:!!u.hasShouldComponentUpdateBug};return(0,o.default)({},r,{setState:(0,o.default)({},r.setState),getChildContext:(0,o.default)({calledByRenderer:!0},r.getChildContext)},c&&{componentDidUpdate:c},{getDerivedStateFromProps:d})}function R(e){return"host"===e.nodeType?e:e.rendered}function B(e){if(1!==e[E].length)throw new Error("getRootNodeInternal(wrapper) can only be called when wrapper wraps one node");return e[E]!==e?e[T][0]:e[E][y]}function j(e,t){return(0,f.parentsOfNode)(t,B(e))}function F(e,t){Array.isArray(t)?((0,u.privateSet)(e,y,t[0]),(0,u.privateSet)(e,A,t)):((0,u.privateSet)(e,y,t),(0,u.privateSet)(e,A,[t])),(0,u.privateSet)(e,"length",e[A].length)}function U(e,t,n,r){return!(0,c.default)(e,t)||!(0,c.default)(n,r)}function H(e){return e&&e.isPureReactComponent}function z(e,t){return(0,u.isCustomComponentElement)(e,t)&&e.type.prototype&&"function"==typeof e.type.prototype.getChildContext?(0,u.spyMethod)(e.type.prototype,"getChildContext"):null}function V(e,t,n,r,i){var o=t[_];if("parent"===e.options.legacyContextMode)if(i)(0,u.privateSet)(t,k,i.getLastReturnValue()),i.restore();else if("function"==typeof n.getChildContext){var s=function(e,t,n){var r=e.instance,i=e.type,o=(0,u.displayNameOfNode)(e);if("object"!==a(i.childContextTypes))return console.warn(String(o)+".getChildContext(): childContextTypes must be defined in order to use getChildContext()."),{};var s=r.getChildContext();return Object.keys(s).forEach((function(e){if(!(e in i.childContextTypes))throw new Error(String(o)+'.getChildContext(): key "'+String(e)+'" is not defined in childContextTypes.')})),"function"==typeof n.checkPropTypes&&n.checkPropTypes(i.childContextTypes,s,"child context",t),s}(r,[t[y]].concat(j(t,t[y])),o);(0,u.privateSet)(t,k,s)}else(0,u.privateSet)(t,k,null)}function W(e,t){if("function"==typeof e.type.getDerivedStateFromProps)var n=e.instance,r=(0,u.spyMethod)(n,"shouldComponentUpdate",(function(e){return function(){n.state=t;for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=e.apply(n,a),l=a[1];return n.state=l,r(),s}})).restore}function G(e,t){var n=function e(t,n,r){var i=t[y],a=i&&r.nodeToElement(i);if(t.type()===n)return t.dive();if(a&&(0,u.isCustomComponentElement)(a,r))return e(t.dive(),n,r);for(var o=t.children(),s=0;s<o.length;s+=1){var l=e(o.at(s),n,r);if(void 0!==l)return l}}(e,e[I],t);if(!n)throw new Error("`wrappingComponent` must render its children!");return{legacyContext:n[S].context,providerValues:n[M]}}function q(e,t,n,r){var i=(0,u.makeOptions)(n),a=(0,d.default)(n);if((0,u.privateSet)(i,M,n[M]),t||!(0,u.isCustomComponent)(i.wrappingComponent,a))return i;if("function"!=typeof a.wrapWithWrappingComponent)throw new TypeError("your adapter does not support `wrappingComponent`. Try upgrading it!");var s=a.wrapWithWrappingComponent(e,i),l=s.node,c=s.RootFinder,h=new Q(l,r,c),f=G(h,a),p=f.legacyContext,m=f.providerValues;return(0,u.privateSet)(r,x,h),(0,o.default)({},i,b({context:(0,o.default)({},i.context,p)},M,m))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,o.default)({},e[S],t,{context:t.context||(0,o.default)({},e[S].context,e[E][k])});return(0,u.privateSet)(n,M,e[E][M]),n}var K=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};v(this,e),N(i);var a=q(t,n,i,this),s=(0,d.default)(a),l=L(s);if(n)(0,u.privateSet)(this,E,n),(0,u.privateSet)(this,w,null),(0,u.privateSet)(this,_,n[_]),F(this,t),(0,u.privateSet)(this,S,n[S]),(0,u.privateSet)(this,T,n[A]),(0,u.privateSet)(this,M,null);else{if(!s.isValidElement(t))throw new TypeError("ShallowWrapper can only wrap valid elements");var c=l.getChildContext.calledByRenderer?z(t,s):null;(0,u.privateSet)(this,E,this),(0,u.privateSet)(this,w,t);var h=s.createRenderer((0,o.default)({mode:"shallow"},a));(0,u.privateSet)(this,_,h);var f=new Map(a[M]||[]);this[_].render(t,a.context,{providerValues:f});var p=this[_].getNode();F(this,R(p)),(0,u.privateSet)(this,S,a),(0,u.privateSet)(this,M,f);var m=p.instance;m&&!a.disableLifecycleMethods&&(l.componentDidUpdate.onSetState&&!m[C]&&((0,u.privateSet)(m,C,m.setState),m.setState=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return r.setState.apply(r,g(null==t?[e]:[e,t]))}),"function"==typeof m.componentDidMount&&this[_].batchedUpdates((function(){m.componentDidMount()})),V(s,this,m,p,c))}}return i(e,[{key:"root",value:function(){return this[E]}},{key:"getNodeInternal",value:function(){if(1!==this.length)throw new Error("ShallowWrapper::getNode() can only be called when wrapping one node");return this[E]===this&&this.update(),this[y]}},{key:"getNodesInternal",value:function(){return this[E]===this&&1===this.length&&this.update(),this[A]}},{key:"getElement",value:function(){var e=this;return this.single("getElement",(function(t){return(0,d.default)(e[S]).nodeToElement(t)}))}},{key:"getElements",value:function(){var e=this;return this.getNodesInternal().map((function(t){return(0,d.default)(e[S]).nodeToElement(t)}))}},{key:"getNode",value:function(){throw new Error("ShallowWrapper::getNode() is no longer supported. Use ShallowWrapper::getElement() instead")}},{key:"getNodes",value:function(){throw new Error("ShallowWrapper::getNodes() is no longer supported. Use ShallowWrapper::getElements() instead")}},{key:"instance",value:function(){if(this[E]!==this)throw new Error("ShallowWrapper::instance() can only be called on the root");return this[_].getNode().instance}},{key:"getWrappingComponent",value:function(){if(this[E]!==this)throw new Error("ShallowWrapper::getWrappingComponent() can only be called on the root");if(!this[S].wrappingComponent)throw new Error("ShallowWrapper::getWrappingComponent() can only be called on a wrapper that was originally passed a `wrappingComponent` option");return this[x]}},{key:"update",value:function(){if(this[E]!==this)throw new Error("ShallowWrapper::update() can only be called on the root");if(1!==this.length)throw new Error("ShallowWrapper::update() can only be called when wrapping one node");return F(this,R(this[_].getNode())),this}},{key:"unmount",value:function(){return this[_].unmount(),this[E][x]&&this[E][x].unmount(),this}},{key:"rerender",value:function(e,t){var n=this,r=(0,d.default)(this[S]);return this.single("rerender",(function(){(0,u.withSetStateAllowed)((function(){var i=n[_].getNode(),a=i.instance||{},s=i.type||{},l=a.state,d=a.props||n[w].props,h=a.context||n[S].context,f=t||h;t&&(n[S]=(0,o.default)({},n[S],{context:f})),n[_].batchedUpdates((function(){var t=L(r),p=!0,m=void 0,g=void 0;if(!n[S].disableLifecycleMethods&&a){if("function"==typeof a.shouldComponentUpdate){var v=t.getDerivedStateFromProps;v&&v.hasShouldComponentUpdateBug&&W(i,l),m=(0,u.spyMethod)(a,"shouldComponentUpdate")}t.getChildContext.calledByRenderer&&"function"==typeof a.getChildContext&&(g=(0,u.spyMethod)(a,"getChildContext"))}if(!m&&H(a)&&(p=U(d,e,l,a.state)),e&&(n[w]=(0,u.cloneElement)(r,n[w],e)),n[_].render(n[w],f,{providerValues:n[M]}),m&&(p=m.getLastReturnValue(),m.restore()),p&&!n[S].disableLifecycleMethods&&a)if(V(r,n,a,i,g),t.getSnapshotBeforeUpdate){var b=void 0;"function"==typeof a.getSnapshotBeforeUpdate&&(b=a.getSnapshotBeforeUpdate(d,l)),!t.componentDidUpdate||"function"!=typeof a.componentDidUpdate||l&&!(0,c.default)(l,n.instance().state)&&"function"!=typeof s.getDerivedStateFromProps||a.componentDidUpdate(d,l,b)}else t.componentDidUpdate&&"function"==typeof a.componentDidUpdate&&(t.componentDidUpdate.prevContext?a.componentDidUpdate(d,l,h):l&&!(0,c.default)(n.instance().state,l)||a.componentDidUpdate(d,l));else(0,c.default)(e,a.props)||(a.props=(Object.freeze||Object)((0,o.default)({},a.props,e)));n.update()}))}))})),this}},{key:"setProps",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this[E]!==this)throw new Error("ShallowWrapper::setProps() can only be called on the root");if(arguments.length>1&&"function"!=typeof t)throw new TypeError("ReactWrapper::setProps() expects a function as its second argument");return this.rerender(e),t&&t(),this}},{key:"setState",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this[E]!==this)throw new Error("ShallowWrapper::setState() can only be called on the root");if(null===this.instance()||"class"!==this[_].getNode().nodeType)throw new Error("ShallowWrapper::setState() can only be called on class components");if(arguments.length>1&&"function"!=typeof n)throw new TypeError("ReactWrapper::setState() expects a function as its second argument");return this.single("setState",(function(){(0,u.withSetStateAllowed)((function(){var r=(0,d.default)(t[S]),i=L(r),a=t[_].getNode(),s=a.instance,l=s.props,c=s.state,h=s.context,f="function"==typeof e?e.call(s,c,l):e,p=!i.setState.skipsComponentDidUpdateOnNullish||null!=f,m=void 0,g=void 0,v=!0;if(!t[S].disableLifecycleMethods&&s){if(i.componentDidUpdate&&i.componentDidUpdate.onSetState&&"function"==typeof s.shouldComponentUpdate){var b=i.getDerivedStateFromProps;b&&b.hasShouldComponentUpdateBug&&W(a,e),m=(0,u.spyMethod)(s,"shouldComponentUpdate")}i.getChildContext.calledByRenderer&&"function"==typeof s.getChildContext&&(g=(0,u.spyMethod)(s,"getChildContext"))}if(!m&&H(s)&&(v=U(l,s.props,c,(0,o.default)({},c,f))),s[C]?s[C](f):s.setState(f),m&&(v=m.getLastReturnValue(),m.restore()),p&&v&&!t[S].disableLifecycleMethods&&(V(r,t,s,a,g),i.componentDidUpdate&&i.componentDidUpdate.onSetState))if(i.getSnapshotBeforeUpdate&&"function"==typeof s.getSnapshotBeforeUpdate){var y=s.getSnapshotBeforeUpdate(l,c);"function"==typeof s.componentDidUpdate&&s.componentDidUpdate(l,c,y)}else"function"==typeof s.componentDidUpdate&&(i.componentDidUpdate.prevContext?s.componentDidUpdate(l,c,h):s.componentDidUpdate(l,c));t.update(),n&&(r.invokeSetStateCallback?r.invokeSetStateCallback(s,n):n.call(s))}))})),this}},{key:"setContext",value:function(e){if(this[E]!==this)throw new Error("ShallowWrapper::setContext() can only be called on the root");if(!this[S].context)throw new Error("ShallowWrapper::setContext() can only be called on a wrapper that was originally passed a context option");return this.rerender(null,e)}},{key:"contains",value:function(e){var t=(0,d.default)(this[S]);if(!(0,u.isReactElementAlike)(e,t))throw new Error("ShallowWrapper::contains() can only be called with a ReactElement (or an array of them), a string, or a number as an argument.");return P(this,Array.isArray(e)?function(n){return(0,u.containsChildrenSubArray)(u.nodeEqual,n,e.map((function(e){return t.elementToNode(e)})))}:function(n){return(0,u.nodeEqual)(t.elementToNode(e),n)}).length>0}},{key:"containsMatchingElement",value:function(e){var t=(0,d.default)(this[S]).elementToNode(e);return P(this,(function(e){return(0,u.nodeMatches)(t,e,(function(e,t){return e<=t}))})).length>0}},{key:"containsAllMatchingElements",value:function(e){var t=this;if(!Array.isArray(e))throw new TypeError("nodes should be an Array");return e.every((function(e){return t.containsMatchingElement(e)}))}},{key:"containsAnyMatchingElements",value:function(e){var t=this;return Array.isArray(e)&&e.some((function(e){return t.containsMatchingElement(e)}))}},{key:"equals",value:function(e){var t=this;return this.single("equals",(function(){return(0,u.nodeEqual)(t.getNodeInternal(),e)}))}},{key:"matchesElement",value:function(e){var t=this;return this.single("matchesElement",(function(){var n=(0,d.default)(t[S]).elementToNode(e);return(0,u.nodeMatches)(n,t.getNodeInternal(),(function(e,t){return e<=t}))}))}},{key:"find",value:function(e){return this.wrap((0,p.reduceTreesBySelector)(e,this.getNodesInternal()))}},{key:"is",value:function(e){var t=(0,p.buildPredicate)(e);return this.single("is",(function(e){return t(e)}))}},{key:"isEmptyRender",value:function(){return this.getNodesInternal().every((function(e){return(0,u.isEmptyValue)(e)}))}},{key:"filterWhere",value:function(e){var t=this;return D(this,(function(n){return e(t.wrap(n))}))}},{key:"filter",value:function(e){return D(this,(0,p.buildPredicate)(e))}},{key:"not",value:function(e){var t=(0,p.buildPredicate)(e);return D(this,(function(e){return!t(e)}))}},{key:"text",value:function(){return this.single("text",f.getTextFromNode)}},{key:"html",value:function(){var e=this;return this.single("html",(function(t){if(null===e.type())return null;var n=(0,d.default)(e[S]);return n.createRenderer((0,o.default)({},e[S],{mode:"string"})).render(n.nodeToElement(t))}))}},{key:"render",value:function(){var e=this.html();return(0,u.loadCheerioRoot)(e)}},{key:"simulate",value:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return this.single("simulate",(function(n){var i;return(i=t[_]).simulateEvent.apply(i,[n,e].concat(r)),t[E].update(),t}))}},{key:"simulateError",value:function(e){var t=this;return this.single("simulateError",(function(n){if("host"===n.nodeType)throw new TypeError("ShallowWrapper::simulateError() can only be called on custom components");var r=t[_];if("function"!=typeof r.simulateError)throw new TypeError("your adapter does not support `simulateError`. Try upgrading it!");var i=B(t),a=[n].concat(j(t,n));return r.simulateError(a,i,e),t}))}},{key:"props",value:function(){return this.single("props",f.propsOfNode)}},{key:"state",value:function(e){var t=this;if(this[E]!==this)throw new Error("ShallowWrapper::state() can only be called on the root");if(null===this.instance()||"class"!==this[_].getNode().nodeType)throw new Error("ShallowWrapper::state() can only be called on class components");var n=this.single("state",(function(){return t.instance().state}));if(void 0!==e){if(null==n)throw new TypeError('ShallowWrapper::state("'+String(e)+'") requires that `state` not be `null` or `undefined`');return n[e]}return n}},{key:"context",value:function(e){var t=this;if(this[E]!==this)throw new Error("ShallowWrapper::context() can only be called on the root");if(!this[S].context)throw new Error("ShallowWrapper::context() can only be called on a wrapper that was originally passed a context option");if(null===this.instance())throw new Error("ShallowWrapper::context() can only be called on wrapped nodes that have a non-null instance");var n=this.single("context",(function(){return t.instance().context}));return e?n[e]:n}},{key:"children",value:function(e){var t=this.flatMap((function(e){return(0,f.childrenOfNode)(e.getNodeInternal())}));return e?t.filter(e):t}},{key:"childAt",value:function(e){var t=this;return this.single("childAt",(function(){return t.children().at(e)}))}},{key:"parents",value:function(e){var t=this;return this.single("parents",(function(n){var r=t.wrap(j(t,n));return e?r.filter(e):r}))}},{key:"parent",value:function(){return this.flatMap((function(e){return[e.parents().get(0)]}))}},{key:"closest",value:function(e){if(this.is(e))return this;var t=this.parents().filter(e);return t.length>0?t.first():this.findWhere((function(){return!1}))}},{key:"shallow",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.single("shallow",(function(n){var r=Y(e,t);return e.wrap((0,d.default)(e[S]).nodeToElement(n),null,r)}))}},{key:"prop",value:function(e){return this.props()[e]}},{key:"invoke",value:function(e){var t=this;return this.single("invoke",(function(){var n=t.prop(e);if("function"!=typeof n)throw new TypeError("ShallowWrapper::invoke() requires the name of a prop whose value is a function");return function(){var e=n.apply(void 0,arguments);return t[E].update(),e}}))}},{key:"renderProp",value:function(e){var t=this,n=(0,d.default)(this[S]);if("function"!=typeof n.wrap)throw new RangeError("your adapter does not support `wrap`. Try upgrading it!");return this.single("renderProp",(function(r){if("host"===r.nodeType)throw new TypeError("ShallowWrapper::renderProp() can only be called on custom components");if("string"!=typeof e)throw new TypeError("ShallowWrapper::renderProp(): `propName` must be a string");var i=t.props();if(!(0,l.default)(i,e))throw new Error("ShallowWrapper::renderProp(): no prop called “"+String(e)+"“ found");var o=i[e];if("function"!=typeof o)throw new TypeError("ShallowWrapper::renderProp(): expected prop “"+String(e)+"“ to contain a function, but it holds “"+(void 0===o?"undefined":a(o))+"“");return function(){var e=o.apply(void 0,arguments),r=n.wrap(e);return t.wrap(r,null,t[S])}}))}},{key:"key",value:function(){return this.single("key",(function(e){return void 0===e.key?null:e.key}))}},{key:"type",value:function(){return this.single("type",(function(e){return(0,u.typeOfNode)(e)}))}},{key:"name",value:function(){var e=(0,d.default)(this[S]);return this.single("name",(function(t){return e.displayNameOfNode?e.displayNameOfNode(t):(0,u.displayNameOfNode)(t)}))}},{key:"hasClass",value:function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&console.warn("It looks like you're calling `ShallowWrapper::hasClass()` with a CSS selector. hasClass() expects a class name, not a CSS selector."),this.single("hasClass",(function(t){return(0,f.hasClassName)(t,e)}))}},{key:"forEach",value:function(e){var t=this;return this.getNodesInternal().forEach((function(n,r){return e.call(t,t.wrap(n),r)})),this}},{key:"map",value:function(e){var t=this;return this.getNodesInternal().map((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"reduce",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return arguments.length>1?this.getNodesInternal().reduce((function(n,r,i){return e.call(t,n,t.wrap(r),i)}),n):this.getNodesInternal().reduce((function(n,r,i){return e.call(t,1===i?t.wrap(n):n,t.wrap(r),i)}))}},{key:"reduceRight",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return arguments.length>1?this.getNodesInternal().reduceRight((function(n,r,i){return e.call(t,n,t.wrap(r),i)}),n):this.getNodesInternal().reduceRight((function(n,r,i){return e.call(t,1===i?t.wrap(n):n,t.wrap(r),i)}))}},{key:"slice",value:function(e,t){return this.wrap(this.getNodesInternal().slice(e,t))}},{key:"some",value:function(e){if(this[E]===this)throw new Error("ShallowWrapper::some() can not be called on the root");var t=(0,p.buildPredicate)(e);return this.getNodesInternal().some(t)}},{key:"someWhere",value:function(e){var t=this;return this.getNodesInternal().some((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"every",value:function(e){var t=(0,p.buildPredicate)(e);return this.getNodesInternal().every(t)}},{key:"everyWhere",value:function(e){var t=this;return this.getNodesInternal().every((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"flatMap",value:function(e){var t=this,n=this.getNodesInternal().map((function(n,r){return e.call(t,t.wrap(n),r)})),r=(0,s.default)(n,1);return this.wrap(r.filter(Boolean))}},{key:"findWhere",value:function(e){var t=this;return P(this,(function(n){var r=t.wrap(n);return r.length>0&&e(r)}))}},{key:"get",value:function(e){return this.getElements()[e]}},{key:"at",value:function(e){var t=this.getNodesInternal();return e<t.length?this.wrap(t[e]):this.wrap([])}},{key:"first",value:function(){return this.at(0)}},{key:"last",value:function(){return this.at(this.length-1)}},{key:"isEmpty",value:function(){return console.warn("Enzyme::Deprecated method isEmpty() called, use exists() instead."),!this.exists()}},{key:"exists",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return arguments.length>0?this.find(e).exists():this.length>0}},{key:"single",value:function(e,t){var n="string"==typeof e?e:"unknown",r="function"==typeof t?t:e;if(1!==this.length)throw new Error("Method “"+n+"” is meant to be run on 1 node. "+String(this.length)+" found instead.");return r.call(this,this.getNodeInternal())}},{key:"wrap",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[E];if(t instanceof e)return t;for(var r=arguments.length,i=Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];return new(Function.prototype.bind.apply(e,[null].concat([t,n],i)))}},{key:"debug",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,h.debugNodes)(this.getNodesInternal(),e)}},{key:"tap",value:function(e){return e(this),this}},{key:"dive",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,d.default)(this[S]),r="dive";return this.single(r,(function(i){if(i&&"host"===i.nodeType)throw new TypeError("ShallowWrapper::"+r+"() can not be called on Host Components");var a=(0,d.default)(e[S]).nodeToElement(i);if(!(0,u.isCustomComponentElement)(a,n))throw new TypeError("ShallowWrapper::"+r+"() can only be called on components");var o=Y(e,t);return e.wrap(a,null,o)}))}},{key:"hostNodes",value:function(){return this.filterWhere((function(e){return"string"==typeof e.type()}))}}]),e}();function X(e){var t=(0,d.default)(e[S]),n=e[O],r=n[_].getNode(),i=G(e,t),a=i.legacyContext,s=i.providerValues,l=n[M];if(n.setContext((0,o.default)({},e[O][S].context,a)),n[M]=new Map([].concat(g(l),g(s))),"function"==typeof t.isContextConsumer&&t.isContextConsumer(r.type)){var c=r.type,u=t.getProviderFromConsumer(c);s.get(u)!==l.get(u)&&n.rerender()}}var Q=function(e){function t(e,n,r){v(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return(0,u.privateSet)(i,O,n),(0,u.privateSet)(i,I,r),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"rerender",value:function(){for(var e,n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=(e=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rerender",this)).call.apply(e,[this].concat(i));return X(this),o}},{key:"setState",value:function(){for(var e,n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=(e=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setState",this)).call.apply(e,[this].concat(i));return X(this),o}},{key:"getWrappingComponent",value:function(){throw new Error("ShallowWrapper::getWrappingComponent() can only be called on the root")}}]),t}(K);function $(e,t){Object.defineProperty(K.prototype,e,{get:function(){throw new Error("\n        Attempted to access ShallowWrapper::"+String(e)+", which was previously a private property on\n        Enzyme ShallowWrapper instances, but is no longer and should not be relied upon.\n        "+String(t)+"\n      ")},enumerable:!1,configurable:!1})}u.ITERATOR_SYMBOL&&Object.defineProperty(K.prototype,u.ITERATOR_SYMBOL,{configurable:!0,value:function(){var e,t=this.getNodesInternal()[u.ITERATOR_SYMBOL](),n=(0,d.default)(this[S]);return b(e={},u.ITERATOR_SYMBOL,(function(){return this})),b(e,"next",(function(){var e=t.next();return e.done?{done:!0}:{done:!1,value:n.nodeToElement(e.value)}})),e}}),$("node","Consider using the getElement() method instead."),$("nodes","Consider using the getElements() method instead."),$("renderer",""),$("options",""),$("complexSelector",""),t.default=K},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e){e.exports=JSON.parse('{"searchVideoContent":"Type a keyword to search INSIDE video","searchVideo":"Search for courses","searchChapter":"Search for Topics In the Current Course","alreadyHaveAnAccount":"Already have an account?","activationFinishTitle":"Activate your account to finish registering","activationFinishDesc":"We\'ve sent you a welcome email with an activation link. Simply \\nclick the link and you\'re good to go!","attachmentOnlyBefore":"Add Slide","uploading":"Uploading","failed":"Failed","title":"Title","subject":"Subject","topic":"Topic","addTitle":"Add title","chapter":"Chapter","addedNewVideos":"Added %{videos} new video(s)","willAddSubtitle":"The following subtitle will be added:","deletedVideos":"Deleted %{videos} video(s) associated with the following chapter(s)","willDeleteChapters":"The following chapter(s) will be deleted:","willDeleteSubtitle":"The following subtitle will be deleted:","noVideoDeleted":"No video will be deleted","selectAChapter":"Select a chapter","description":"Description","attachmentThumbnail":"Attachment thumbnail","dropFilesHere":"Drop files here","dropFilesFolderHere":"Drop files or folder here","dropFilesOr":"or use the \\"%{button}\\" button.","emptyGallery":"Empty Gallery","emptyVideo":"Empty Video","loadingVideo":"Video is loading","yourGallery":"Your IRL Gallery","yourVideo":"Your video","toCreateGallery":"To create gallery","toCreateVideo":"To create video","noGroup":"No Group","toCreateNewGroup":"To create new group","toEditVideo":"To edit video","isBeingProcessed":"is being processed","emptyList":"Empty list","emptyListInstruction1":"You can add videos to your list","emptyListInstruction2":"in View menu","ccv":"Create cognitive video","editCogvid":"Edit Cognitive Video","total":"Total","reorderInstruction1":"Drag the items into the order you prefer.","reorderInstruction2":"Click on the arrow on the right side to change the order of your items.","failedToLoadVideo":"Failed to load videos","clickHereToRetry":"Click here to retry","existing":"Existing","added":"Added","deleted":"Deleted","noVideoContentChanges":"No video content changes","noAttachments":"No Attachment file.","selected":"Selected","groupMembers":"Group members: ","transparent":"Transparent","firstAreaUnavailableNotice":"This chapter is currently unavailable. Please check back later.","firstAreaPurchaseNotice":"This is a paid chapter. Please purchase the video to get full access to all chapters.","firstAreaPurchaseNoticePurchased":"This chapter is locked in Exploring.<br />Click the button to view it in %{menu}.","firstAreaHiddenContent":"This video segment is private.","buyThisCourse":"Buy now","bio":"Bio","personalInformation":"Personal Information","fullName":"Full Name","dob":"D.O.B","email":"Email","livesIn":"Lives in","interestedTopics":"Interested topics","interestedSubjects":"Interested subjects","skills":"Skills","skillsAndEndorsements":"Skills and Endorsements","education":"Education","honorsAndAwards":"Honors and Awards","noSearchResultInstruction1":"We didn\'t find any results","noSearchResultInstruction2":"Make sure that everything is spelt correctly or try different keywords.","addFriendToShare":"Add friend to share","addFriendToGroup":"Add friend to group","permission":"Permission","followingVideoWillBeShared":"Following video will be shared","editGroupUser":"Edit group","enterFriendName":"Enter a friend\'s name","enterGroupName":"Enter a group\'s name","maxSharesReached":"You have reached the maximum number of shares","freePriceLabel":"Free","withPriceLabel":"With price","setPriceLabel":"Set price","ChapterIsUpdating":"Chapter is updating...","yourCognitiveVideoIsPublishing":"Your Cognitive video is publishing.","yourCognitiveVideoIsUpdating":"Your Cognitive video is updating.","createVideoForSharing":"Export chapters or highlights to new video.","createVideoCover":"Create video cover image","createChapterCover":"Create \\"%{content}\\" chapter cover image","captchaLabel":"Please tick the box to continue","forgotPasswordInstruction":"Make sure you already confirmed your email. By pressing button\\nabove, you’ll get an email with recovery code. Input this code on the\\nnext page to reset your password","signupInstruction":"I agree to the","termsAndConditions":"Terms & Conditions","privacyPolicies":"Privacy Policies","noVideo":"No Video","emptyBrainHiveInstruction":"To create a video in BrainHive,\\nplease see the detail steps","here":"here","instruction":"Instruction","typesOfLearning":"Types of Learning","testPreparation":"Test Preparation","realWorldContext":"Real-world Context","realLifeApplication":"Real-life Application","video":"video","createCoverInstruction":"Please select the approriate types of\\nlearning for your video. Then you can add \\ninformation from chapters\\nand present them on the video label.","review":"review","newChapterTitle":"Chapter title","newChapterHeadingText":"Heading text","createANewCourse":"Create a new course","courseSequence":"Course sequence","sharedPeopleOrGroups":"Shared people or group(s)","peopleLiked":"Like","menuText":"Menu","createNewTag":"Create new tag","orLoginWith":"or","forgotPassword":"Forgot password","dontHaveAnAccount":" Don’t have an account","registerNow":"Register Now","noMembers":"No member in this videos","chaptersPrivacyPrivate":"None","chaptersPrivacyProtected":"Specific shared users","chaptersPrivacyPublic":"All shared users","SearchVideoMember":"Search member","copyVideoLinkToClipboard":"Copied the %{videoTitle} video link to clipboard.","copyChapterLinkToClipboard":"Copied to clipboard.","covidFormGeneralTabTitle":"General information","covidFormVideoChapterTabTitle":"Chapters","covidFormTitle":"Title","covidFormTitlePlaceHolder":"Add video title","covidFormSubject":"Headline 1","covidFormSubjectPlaceHolder":"Add headline 1","covidFormTopic":"Headline 2","covidFormTopicPlaceHolder":"Add headline 2","covidFormLearningSubject":"Learning subject","shreWithFriendsAndGroups":"Share with friends and groups","publicViewAccess":"Public view access","accessSettings":"Access settings","ownership":"Ownership","minutes":"minutes","minute":"minute","hour":"hour","participants":"Participants","myStorage":"My Storage","storageInfoDisplay":"%{storageUsed} of %{storageCapacity} used","loadingStorage":"Loading storage...","live":"LIVE","hostedBy":"hosted by %{name}","on":"on","radioshareVideosearchPublic":"Public","radioshareVideosearchLimit":"Limit (direct link access)","chooseAccessScope":"Choose access scope:","changeOwnerShip":{"placeHolder":"Enter a friend\'s name","modalTitle":"Change video\'s owner","label":"Select a friend to transfer ownership","informHeader":"","informDescription":"You are about to transfer your ownership and full control of this video to %{userName}. Are you sure you want to proceed?"},"createBHVideoInstructions":["BrainHive is a place that stores all the videos that you shared with other users and the videos that your friends shared with you.","Here are some tips for you:"],"createBHVideoSteps":["In Create Video, select the video and the chapters that you want to share.","Select the Share button, and the selected video with selected chapters will be extracted to BrainHive.","To add a new video in BrainHive","In BrainHive, you can add your friends and set the permissions, they will receive your videos in their BrainHive."],"menu":{"explore":"Explore","people":"Connect","learn":"Master","composing":"Create","brainhive":"Share","showroom":"My Files","home":"IRL Gallery","messages":"Messages","review":"Review"},"form":{"firstName":"First name","lastName":"Last name","enterEmail":"Enter email","password":"Password","oldPassword":"Old password","newPassword":"New password","confirmPassword":"Confirm password","confirmNewPassword":"Confirm new password","paymentCountry":"Payment Country","selectPaymentOption":"Select Your Payment Option","verificationCode":"Verification code","gallery":"Add photos/videos to your IRL Gallery"},"message":{"videoCommentEnabled":"Comments have been enabled for your video","videoCommentDisabled":"Comments have been disabled for your video","importedSuccessfully":"Imported successfully.","publishedSuccessfullyForTrustUser":"The video publishing is in progress. You will receive a notification message when it is finished.","publishedToReview":"Your video has been transferred to Customer Success Team for reviewing. We will notify you the result once the process is completed.","cancelPublicSuccessfully":"Publishing canceled successfully.","unpublishedSuccessfully":"Your video is unpublished successfully.","createdVideoSuccessfully":"Video \\"%{name}\\" has been created.","updatedVideoSuccessfully":"Video \\"%{name}\\" has been updated.","updatedGallerySuccessfully":"Your IRL Gallery has been updated.","deleteVideoSuccessfully":"Video \\"%{name}\\" has been deleted successfully.","removeVideoSuccessfully":"Video \\"%{name}\\" has been removed from your list.","movedVideoToGallery":"Video \\"%{name}\\" has been moved to IRL gallery.","loadThumbnailFailed":"Failed to load thumbnail.","recaptcha":"Please verify you\'re a human.","videoTitleRequired":"Please enter video title.","eventTitleRequired":"Please enter event title.","differentNewPassword":"New password must be different from your previous password.","passwordMustHaveMixedCharacters":"Password must contain upper and lower case characters","passwordMustHaveSpecial":"Password must contain at least one special character","fileTitleRequired":"Please enter file title.","videoSubjectRequired":"Please enter headline 1.","videoTopicRequired":"Please enter headline 2","categoriesRequired":"Please select a category.","chapterRequired":"Please select a chapter.","attachmentRequired":"Please add at least one pdf, png, jpg, jpeg file from your device.","attachmentSupportedFiles":"We are currently supporting pdf, png, jpg, jpeg files only.","oneFileEachTime":"Cannot upload more than 1 file each time.","ignoreWhiteSpaceMessage":"Whitespaces will be ignored in this field.","clonedSuccessfully":"The video was successfully saved to Create menu","exportLinkSuccessfully":"The video chapters was successfully exported to html file.","acceptSrtFile":"We currently support srt file only.","updateVideoCoverImgSuccessfully":"Updated video cover image successfully.","updateAttachmentThumbnailSuccessfully":"Updated chapter cover image successfully.","deleteUploadingChapterWarning":"Cannot delete this chapter because there are attachment(s) being uploaded into it.","processingVideo":"Your video is being processed. It will be available upon completion.","validPrice":"Please enter a valid price.","priceBoundaryExceeded":"Price must be between %{min} and %{max}","setPriceSuccessfully":"The price for video \\"%{name}\\" has been updated successfully.","confirmPublishVideoPrice":"Your video will be published","withAccessScope":"with access scope:","updateChapterMinLenghtError":"Chapter could not be updated. A chapter length must be at least 2 seconds.","createChapterMinLenghtError":"Chapter could not be created. A chapter length must be at least 2 seconds.","selectOneVideo":"Please select one video.","selectOneImage":"Please select one image.","updateProfileSuccess":"Your profile has been updated successfully","extractSuccessfully":"Your video will be available in %{menu} shortly","updateSbContentSuccessfully":"Your changes have been saved","shareVideoSuccessfully":"Your video sharing has been updated","editChapterSharingSuccessfully":"Your chapter sharing has been updated","resetPasswordSuccessfully":"Your password has been updated successfully","unsupportedFileType":"Unsupported file type.","pleaseSelectParticipantType":"Please select participant type","courseCodeRequired":"Please enter course code","courseTitleRequired":"Please enter course title","courseTotalRequired":"Please enter course total","groupNameRequired":"Please enter group name.","courseSequenceRequired":"Please enter course sequence","createGroupSuccessfully":"Group \\"%{name}\\" has been created.","deleteGroupSuccessfully":"Group \\"%{name}\\" has been deleted successfully.","updateGroupAvatarSuccessfully":"Group has been updated avatar successfully.","updateGroupInfoSuccessfully":"Group has been updated info successfully.","addGroupMemberSuccessfully":"Members have been added to group.","removeGroupMemberSuccessfully":"Members have been removed out of group.","serverError":"Server is temporarily unavailable. Please try again later.","noConnectionError":"No Internet Connection. Check your network connection and try again.","cancelOrderSuccessfully":"Your order has been canceled successfully.","publishEmptyVideo":"Cannot publish empty video","selectMarketRequired":"Please select market(s) to publish.","loginToContinue":"Please login to continue!","changeOwnerShipSuccess":"Ownership changed to %{name}.","cannotAnonymousLike":"You already liked this one","cannotAnonymousLikeVideo":"You have liked video before, please wait for %{hour} hour(s) to perform this action again","primaryCourseCodeCannotSameAsCourseCode":"The primary course must be different from course.","primaryCourseSerialRequired":"Please enter your primary course sequence.","primaryCourseNotBeSet":"Primary course must not be set for a non-master video of a course.","courseMustBeSet":"Course must be set with a sequence of 0.","courseMustNotBeSet":"Course must not be set for the master video of primary course.","courseSerialRequired":"Please enter your course sequence.","courseCannotSameAsDefaultCourse":"The course must be different from default course.","cloneVideoSuccessfully":"Your video will be cloned into %{menu} shortly","retranscribeVideo":"Your video is being transcribed. Transcript will be available upon completion.","copyVideoIdSuccess":"Copied ID to clipboard","copyChaptersSuccess":"Your slides will be copied shortly","swapChaptersSuccess":"Your slides were successfully swapped","resourceTitleRequired":"Please enter resource\'s title.","createdResourceSuccessfully":"Resource \\"%{name}\\" has been created.","resourceRequired":"Please add at least one pdf, png, jpg, jpeg, zip file from your device.","resourceSupportedFiles":"We are currently supporting pdf, png, jpg, jpeg, zip files only.","imageRequired":"Please add at least one png, jpg, jpeg file from your device.","imageSupportedFiles":"We are currently supporting png, jpg, jpeg files only.","previewRequired":"Please add at least one pdf, png, jpg, jpeg file from your device.","previewSupportedFiles":"We are currently supporting pdf, png, jpg, jpeg files only.","updateResourceSuccessfully":"Resource \\"%{name}\\" has been updated.","deleteResourceSuccessfully":"Resource \\"%{name}\\" has been deleted successfully.","unlinkResourceSuccessfully":"Resource \\"%{name}\\" has been unlinked successfully.","registerForCourseSuccessfully":"Registered for the free course \\"%{name}\\" successfully.","searchResources":"Search for Resources & Classes","linkProductSuccess":"Your resource has been linked to video successfully.","linkProductToReview":"Your resource has been transferred to video owner for reviewing. It will be available upon completion.","remarkRequired":"Please enter a reason.","approveResourceSuccessfully":"Resource \\"%{name}\\" has been approved.","rejectResourceSuccessfully":"Resource \\"%{name}\\" has been rejected.","ratingResourceSuccessfully":"Resource \\"%{name}\\" has been rated successfully.","deleteRatingSuccessfully":"Your review has been deleted successfully.","maxFileSize":"The file size shouldn\'t be greater than %{size}.","invalidActivationCode":"Activation code is invalid.","resendEmailSuccessfully":"An activation code has been sent to your registered email. Please use the code to activate your account.","zipRequired":"Please enter a zip code.","invalidZip":"Invalid zip code.","arrangeProductsSuccess":"Your video resources have been arranged successfully.","maxResources":"The maximum number of resources is 10","maxPreviews":"The maximum number of preview files is 10","subscribedOk":"Plan \\"%{name}\\" was subscribed successfully","subscribedFailed":"Failed to subscribe plan \\"%{name}\\"","resourceStoreTitleRequired":"Please enter resource store\'s title","resourceStoreThumbnailRequired":"Please provide resource store\'s thumbnail","textbookTitleRequired":"Please enter textbook\'s title","textbookAuthorRequired":"Please select textbook\'s author","textbookPublisherRequired":"Please select textbook\'s publisher","paymentMethodDeleted":"Successfully deleted payment method","firstnameRequired":"Please enter first name","lastnameRequired":"Please enter last name","emailAddressRequired":"Please enter email address","addPaymentMethodSuccessfully":"Your payment method has been added successfully.","loginToPlayVideo":"Please log in to Play Videos.","updateSuccessfully":"Your change has been updated successfully.","invalidEndtime":"Invalid end time","invalidTotalHours":"Invalid total hours","fileRequired":"Please add at least one file from your device.","uploadCourseFileSuccessfully":"Upload course file successfully.","updateCourseFileSuccessfully":"Update course file successfully.","deleteCourseFileSuccessfully":"Delete course file successfully.","arrangeCourseFilesSuccessfully":"Arrange course files successfully.","fileSupportedFiles":"The selected file is not supported.","cancelCourseSubscriptionSuccessfully":"Your subscription has been canceled successfully.","confirmUnsubMessage":"Are you sure you want to unsubscribe this plan?"},"validation":{"duplicateKeywords":"Duplicate %{name} are not allowed","blankKeyword":"Blank %{name} is not allowed","maxLengthExceeded":"%{name} length should be within %{max} characters","maxNumberExceeded":"%{name} must be less than %{max}","blankVideoTitle":"Video title cannot be blank","existingMasterSequence":"Master sequence was in used","maxLength":"The %{name} text must not exceed %{max} characters."},"modal":{"publishing":"Publishing","unpublishingVideo":"Unpublishing video","deleteVideo":"Deleting video","completeLearning":"Complete learning video","inform":"Inform","information":"Information","confirmation":"Confirmation","publicConfirmModalTitle":"You are publishing this video: <b>%{name}</b>","unpublishConfirmModalTitle":"You are unpublishing this video: <b>%{name}</b>","deleteConfirmModalTitle":"Are you sure you want to delete this video: <b>%{name}</b>","deleteSharedVideoConfirmModalTitle":"Are you sure you want to remove this video from your list: <b>%{name}</b>","moveToGallery":"The following video will be moved to your IRL Gallery: <b>%{name}</b>","publicConfirmModalMessage":"Everyone can watch your video after successful publication.","cloneConfirmModalTitle":"The following video will be saved to Create menu: <b>%{name}</b>","confirmCancelModalTitle":"Are you sure you want to cancel?","confirmCancelModalMessage":"Your changes will be lost.","confirmLogoutModalTitle":"Are you sure you want to logout?","confirmReloadModalTitle":"Are you sure you want to reload page?","confirmCancelUploadingModalMessage":"All uploading actions will be canceled immediately. Your processing will be lost.","confirmProcessModalTitle":"Are you sure you want to cancel this process?","confirmProcessModalMessage":"This process will be canceled immediately.","confirmCancelOrderTitle":"Are you sure you want to cancel this order?","confirmCancelOrderMessage":"This order will be canceled immediately.","confirmDeleteAttachmentTitle":"Are you sure you want to delete this attachment?","confirmDeleteCommentTitle":"Are you sure you want to delete this comment?","confirmDeleteNoteTitle":"Are you sure you want to delete this note?","confirmDeleteGroupTitle":"Are you sure you want to delete this group?","highlightHighlightLabel":"Enter highlight label.","pricing":"Pricing","subscribe":"Subscribe","videoTitle":"Video title","currency":"Currency","price":"Price","enterYourPrice":"Enter price","checkout":"Check Out","paymentSuccessTitle":"Thank you for your purchase!\\nThe payment was successful","paymentVideoSuccessMessage":"The payment receipt has been sent to your registered email for your records.\\nWe hope you will enjoy learning with us.","paymentResourceSuccessMessage1":"The payment receipt has been sent to your registered email for your records.","paymentResourceSuccessMessage2":"Please click on the link below to download your purchased resource(s).","paymentResourceSuccessMessage3":"We hope you will enjoy learning with us.","paymentSuccessNote":"Having troubles? We are here to help you at ","paymentCancelMessage":"Your payment was cancelled","myProfile":"My Profile","cancelSharingConfirm":"Changes you have made so far will not be saved.\\nDo you want to cancel sharing?","confirmNavigationModalTitle":"Are you sure you want to navigate?","confirmRevertModalTitle":"Are you sure you want to revert?","fuviFeedback":"FUVi feedback","changePassword":"Change password","confirmCancelEditSbMessage":"There are unsaved changes in the current video that will be lost if you continue.","orderHistory":"Purchase history","receiptDetail":"Receipt Detail","receiptNote":"If you have any questions about this receipt, please contact our ","addNewCourse":"Add new course","createGroup":"Create Group","infoUpdatedVideoMessage":"The current video <b>%{name}</b> has just been modified. It will be reloaded with the latest updates.","quickExtractChapter":"Chapter <b>%{name}</b> will be extracted as a new video into Share menu.","delChapterConfirmModal":"Chapter <b>%{name}</b> will be deleted. Do you want to continue?","delHighlightConfirmModal":"Highlight <b>%{name}</b> color will be deleted. Do you want to continue?","publishNoPriceVideo1":"Your video <b>%{name}</b> price has not been set.","publishNoPriceVideo2":"Please","publishNoPriceVideo3":"to set price and then continue the publishing process","revenueReport":"Revenue report","chapterSetPrivacyHeader":"Chapter visibility settings.","chapterSetPrivacyDesc":"This chapter is visible to video owner and yourself by default. <br />Select additional viewers:","chapterSetPrivacyPrivateMessage":"Only Video owner and you can see this chapter.","chapterSetPrivacyProtectedMessage":"choose who you want to show this chapter in addition to Video owner.","chapterSetPrivacyPublicMessage":"Show this chapter to all member.","createInstantMeeting":"Create a new live session chapter","editMeeting":"Edit meeting","confirmModeChangeModalTitle":"Are you sure you want to continue?","confirmModeChangeModalMessage":"There are unsaved changes that will be lost.","saveToMyVideo":"Save this video to Create menu","exportVideoChapter":"Export video chapters to html file","cloneVideoTitle":"Clone cognitive video","exportConfirmModalTitle":"Are you sure you want to export links of this video: <b>%{name}</b>","exportConfirmModalLabel":"Do you want to export entire course to html file?","requirePurchaseMessage":"This video is paid content.\\nTo play it, please make a purchase.","copyChaptersTitle1":"Source chapter(s)","copyChaptersTitle2":"Insert selected chapter(s)","createProductTitle":"Create resource","editProductTitle":"Edit resource","confirmDeleteResourceTitle":"You are about to remove this resource from this store.","confirmDeleteResourceOption":"Also delete the underlying resource content.","wantToContinue":"Do you want to continue?","linkProductTitle":"Add my resources to video","reviewProductTitle":"Approve or reject","ratingProductTitle":"Review","confirmDeleteRatingTitle":"Are you sure you want to delete your previous review?","viewRatingsTitle":"View ratings","myProductsTitle":"My resources","activationTitle":"Activate your account","activationDesc":"An activation code has been sent to your registered email. Please use the code to activate your account.","activationDesc2":"Not receive activation code or it expired?","arrangeProductsTitle":"Arrange video resources","subscriptionFormTitle":"Subscription","mySubscribedCourses":"My subscribed courses","resourceStoreFormTitle":"Resource store\'s settings","withTextbook":"With a textbook?","confirmDeleteStoreTitle":"The store settings will be deleted.\\nDo you want to continue?","myFinanceAccountTitle":"Finance accounts","confirmDeletePaymentMethod":"The payment method will be deleted.\\nDo you want to continue?","confirmDeletePayoutAccount":"The payout account will be deleted.\\nDo you want to continue?","payoutAccountTitle":"Add New Payout Account","payoutAccountNote":"After saving, you will be rediredted to Stripe website. Please follow the instruction there to complete your connected account registration.","subscriptionNote":"Whether you’re a published textbook author, teacher, or content creator, FUVi technology can help you earn income by selling your instructional resources.","confirmDoThis":"Are you sure you want to do this?","confirmDeleteFileTitle":"Are you sure you want to delete this file?"},"btn":{"start":"Start","no":"No","yes":"Yes","cancel":"Cancel","abort":"Abort","browse":"Browse","submit":"Submit","submiting":"Submiting...","change":"Change","changing":"Changing...","signIn":"Sign in","signUp":"Sign up","login":"Login","register":"Register","add":"Add","create":"Create","save":"Save","saving":"Saving...","clickHere":"click here","sketch":"Sketch","close":"Close","addNewItem":"Add new item","externalVideoToLearning":"External Video to New Learning","ownPhotoVideoToGallery":"Own Photos/Videos to Library","addFile":"Add file","addFiles":"Add files","addFolder":"Add folder","addThumbnail":"Add thumbnail","next":"Next","update":"Update","back":"Back","publish":"Publish","setPrice":"Set Price","defaultChapters":"Default","rawVideos":"Videos","liveSessionChapter":"Live session","buy":"Buy","updateCoverPhoto":"Update Cover Photo","myProfile":"My Profile","logout":"Log out","edit":"Edit","people":"Connect","friends":"Friends","request":"Request","addFriend":"+ Add Friend","unfriend":"Unfriend","cancelFriendRequest":"Cancel Friend Request","confirm":"Confirm","decline":"Decline","open":"Open","addMore":"Add more","share":"Share","sharing":"Sharing...","markAllAsRead":"Mark all as read","ok":"OK","changePassword":"Change Password","getTheCode":"Get The Code","delete":"Delete","fromImage":"From image","fromHtml":"Design","capturedPhoto":"Newly captured photo","uploadPhoto":"Upload a photo","currentPhoto":"Previous cover image","selectChapter":"Chapters","selectHighlight":"Highlighted episodes","myOrderHistory":"My orders","detail":"Detail","groups":"Groups","createNewGroup":"Create new group","seeMore":"See more","seeLess":"See less","revenueReport":"Revenue report","backToHome":"Back to Home","goToToday":"Go to today","join":"Join","end":"End","ended":"Ended","more":"More","recordMeeting":"Record meeting","stopRecordMeeting":"Stop record meeting","less":"Less","allUsers":"All users","clone":"Clone","export":"Export","selectAgent":"Select agent","selectPackage":"Select package","brainhiveMenu":"Share menu","createVideoMenu":"Create menu","proceed":"Proceed","insertBefore":"Insert before","insertAfter":"Insert after","includeSemanticTexts":"Include transcription texts","includeHighlights":"Include highlighs","preview":"Preview","download":"Download","addToCart":"Add to cart","myResources":"My resources","activate":"Activate","activateNow":"Activate now","resendEmail":"Resend email","backToLogin":"Back to Login","subscribe":"Subscribe","mySubscription":"My subscription","mySubscribedCourses":"My subscribed courses","myFinanceAccount":"My finance accounts"},"label":{"autoTranscribe":"Auto-generate speech-to-text transcript","all":"All","file":"File","date":"Date","size":"Size","action":"Action","order":"Order","speechToText":"Speech to text","speechToTextTranscripted":"Speech-to-text transcripted","speechToTextTranscript":"Speech-to-text transcript","participantType":"Participant type","code":"Code","chapters":"Chapters","title":"Title","headline":"Headline","titleLine1":"Title line 1","titleLine2":"Title line 2","titleLine3":"Title line 3","titleLine4":"Title line 4","course":"Course","Friends":"Friends","Groups":"Groups","changeOwnership":"Change ownership","addCourse":"Add course","total":"Total","topics":"Topics","subjects":"Subjects","skills":"Skills","selectMarket":"Target markets:","timezone":"Time zone","time":"Time","fromDate":"From date","toDate":"To date","enableCommentLike":"Enable comments on chapters","eventTitle":"Event title","startTime":"Start time","endTime":"End time","duration":"Duration","reminder":"Reminder","primaryCourse":"Primary course","home":"Home","keyword":"Keywords","learningLevel":"Learning level","publishEntireCourse":"Publish entire course","applyEntireCourse":"Apply to entire course","saveEntireCourseToMyVideo":"Save entire course to Create menu","exportEntireCourse":"Export entire course","cloneEntireCourse":"Clone entire course","destination":"Destination","agent":"Agent","coursePackage":"Course/Package","extractTo":"Export to","grades":"Grades","format":"Format","types":"Types","resource":"Resource","thumbnail":"Thumbnail","preview":"Preview","remark":"Remark","approved":"Approved","rejected":"Rejected","masterResources":"Master resources","allResources":"All resources","otherResources":"Others","comment":"Comment","yourRating":"Your rating","stars":"Stars","addedAt":"Added at","activationCode":"Activation code","address":"Street address","country":"Country","state":"State/province","zip":"Zip/postal code","fullname":"Full name","emailAddress":"Email address","cityDistrict":"City/district","firstname":"First Name","lastname":"Last Name","defaultAccount":"Default payout account","city":"City","phone":"Phone"},"tooltip":{"featureComingSoon":"Feature coming soon","publishingRejectedInfo":"Your video failed review","cancelPublic":"Cancel publishing.","galleryBtn":"Show gallery video","toggleContextualImg":"Show/hide contextual image","publish":"Publish video to Explore","deleteVideo":"Delete video","unpublish":"Unpublish video","cloneVideo":"Save this video to Create menu","editVideo":"Edit video","shareVideo":"Share video","extractVideo":"Export chapters/highlights","completeLearning":"Mark video as learning completed","openFullscreen":"Play video in FullScreen","closeFullscreen":"Exit video FullScreen","semanticToolImportSubtitle":"Import text","semanticToolExportSubtitle":"Export text","semanticToolShowText":"Show text","semanticToolHideText":"Hide text","semanticToolRetranscribe":"Retranscribe video","semanticToolEnableEditText":"Enable edit text","semanticToolDisableEditText":"Disable edit text","semanticToolSetVideoCoverImg":"Set current contextual image as video cover image","cognitiveToolEnableEditText":"Enable edit video title/subject/topic","cognitiveToolDisableEditText":"Disable edit video title/subject/topic","setVideoCoverImg":"Change Course Cover Image","attachFile":"Attach file(s)","attachFolder":"Attach folder","attachmentDownload":"Download attachment","attachmentDelete":"Delete attachment","attachmentEdit":"Edit attachment name","uploadRetry":"Retry uploading","uploadCancel":"Cancel uploading","updateAttachmentThumbnail":"Set current view as attachment thumbnail","updateChapterCoverImage":"Change Slide","updateChapterVideo":"Change Video","chapterOrderPlayMode":"Chapter order play mode","normalPlayMode":"Video normal play mode","chapterEditStartTime":"Change chapter start time","chapterEditEndTime":"Change chapter end time","chapterMoveToStartTime":"Restart Chapter","chapterMoveToEndTime":"Next Chapter","chapterLoopOneChapterMode":"Chapter loop mode","chapterEnabledEditTitle":"Edit chapter title","chapterMakeTextBold":"Bold","chapterMakeTextItalic":"Italic","chapterMakeTextUnderline":"Underline","chapterCopyStyle":"Copy formatting from current active chapter and apply it to another.","hightlightAddNew":"Add \\"%{color}\\" highlight","highlightEditStart":"Edit start time of \\"%{color}\\" highlight","highlightEditEnd":"Edit start time of \\"%{color}\\" highlight","highlightPlay":"Play %{color} highlights ONLY","cancelHighlightPlay":"Cancel Play %{color} highlights","highlightLoop":"Play %{color} highlight Loop Mode","highlightPlayDisabled":"Play highlight","highlightLoopDisabled":"Highlight Loop Mode","highlightNextPart":"Play Next \\"%{color}\\" highlight","highlightNextPartDisabled":"Play Next Highlight","highlightPrevPart":"Play Prev \\"%{color}\\" highlight","highlightPrevPartDisabled":"Restart Highlight","insertVideo":"Add Video","updateVideoPrice":"Update video price","setVideoPrice":"Set video price","lockChapter":"Lock this chapter","unlockChapter":"Unlock this chapter","clickToBuyVideo":"Buy this video","clickToBuyCourse":"Buy this course","clickToExploreCourse":"Click to explore the full set of videos","selectMode":"Drag and resize","drawLine":"Draw straight line","drawCheck":"Draw check mark","drawSqrt":"Draw square root symbol","drawCurve":"Draw curve line","drawTriangle":"Draw triangle","drawRect":"Draw rectangle","drawCircle":"Draw circle","drawPolygon":"Draw polygon","drawHexagon":"Draw Hexagon","freeStyle":"Freestyle drawing","selectStroke":"Click to select stroke width","insertText":"Insert text field","emptyCb":"Empty current board","exportCb":"Export current board to pdf file","backToActiveItem":"Back to active item","permissionDesc":"View: allow playing the video and viewing all content, including playing highlights.\\n\\nSketch: allow playing the videos and viewing all content, sketching in the comprehension board and exporting to pdf file.\\n\\nEdit: allow playing the videos and viewing all content, sketching in the comprehension board and exporting to pdf file, editing video in scaffolding, editing the comprehension guide and semantic guide.\\n\\nEdit and re-distribute: allow playing the videos and viewing all content, sketching in the comprehension board and exporting to pdf file, editing video in scaffolding, editing the comprehension guide and semantic guide, sharing the received video to other friends.","undo":"Undo changes","redo":"Redo changes","revertChanges":"Undo changes","saveChanges":"Save changes","viewCourse":"Show all videos in this course","changeOwnership":"Change ownership","addGroup":"Add new group","deleteGroup":"Delete group","reloadVideoList":"Reload video list","proceedOrder":"Proceed payment","cancelOrder":"Cancel order","rateChapter":"Rate Video/Slide","shareChapter":"Share Chapter","viewAddNote":"View/Add Notes","viewAddComment":"View/Add Comments","viewaddAtt":"View/Add Attachments","extractChapter":"Extract this chapter as a new video","delCurrentChapter":"Delete the current selected chapter","delCurrentHighlight":"Delete the %{color} highlight","setPrivacyPrivate":"Set attachment private","setPrivacyPublic":"Set attachment public","setChapterPrivacyPrivate":"Set chapter private","setChapterPrivacyPublic":"Set chapter public","copyToClipBoard":"Copy Link & Share this course to friends","enableCommentVideo":"Enable comments on this video","disableCommentVideo":"Disable comments on this video","changeAccessScope":"Change access scope","editMeeting":"Edit this meeting","startMeeting":"Start meeting","joinMeeting":"Join meeting","meetingLength":"Meeting length: %{length}","downloadRecordedVideo":"Download recorded video","copyChapterLink":"Copy Link & Share this video to friends","openAttachmentFullscreen":"View attachment in FullScreen","closeAttachmentFullscreen":"Exit attachment FullScreen","cloneFullyVideo":"Clone this video","exportVideo":"Export video link","showVideoDescription":"Show video description","hideVideoDescription":"Hide video description","lockAttachment":"Lock this attachment","unlockAttachment":"Unlock this attachment","disabledAttachmentDownload":"To view or download this file, you must first purchase this video.","copyVideoId":"Copy video ID to clipboard","copyChapters":"Copy video/slide to other courses","swapChapters":"Swap two slides of this course","loadTargetVideo":"Load target video","learningResources":"Click to download PDFs , PPTs","uploadResource":"Upload your PDFs, PPTs, & Classes","linkResource":"Link existing resource","viewRatings":"View all ratings","rating":"Rating","editResource":"Edit resource","removeResource":"Remove resource","reviewResource":"Review resource","deleteRating":"Delete your previous review","subscriptionRequired":"Subscription required","downloadResource":"Download resource","arrangeResources":"Arrange video resources","toTop":"To top","refresh":"Refresh","storeSetting":"Open resource store settings","removeStoreSetting":"Remove resource store settings","sgUsageTip":"Cognitive Console","scUsageTip":"Hover over this bar for more courses","removePM":"Remove payment method","addPM":"Add a new payment method","removePA":"Remove payout account","addPA":"Add a new payout account","setDefault":"Set as default","login":"login","copyStoreLink":"Copy link to clipboard","copyResourceLink":"Copy link to clipboard","updateToc":"Upload or change table of contents","updateFoundation":"Upload or change foundation slide","updateUnderstanding":"Upload or change understanding slide","updateThumbnail":"Upload or change thumbnail"},"attachmentCount":{"one":"1 file attached","other":"{{count}} files attached","zero":"0 file attached"},"accessType":{"free":"free","paid":"paid","subscribe":"subscribe","none":"none"},"pdfPageCount":{"one":"1 page","other":"{{count}} pages","zero":"0 page"},"withPrice":{"zero":"for","other":"at"},"initialChapterLabel":"Chapters Initialization","inputChapterCountLabel":"Number of default chapters:","chapterCount":{"one":"Your video will have 1 chapter","other":"Your video will have {{count}} chapters"},"purchaseTerm":"By clicking \\"Buy\\", you agree to the FUVI ","termsOfService":"Terms of Service","refundPolicy":"Refund Policy","privacyPolicy":"Privacy Policy","and":"and","country":{"us":"United States","vn":"Vietnam","others":"Others"},"payment":{"stripe":"Stripe Connect","paypal":"Paypal"},"byAuthor":"by {{author}}","orderId":"Order ID","orderTotal":"Order Total","searchPeople":"Search people","notification":{"notifications":"Notifications","friendRequest":"{{fullname}} has sent friend request to you","friendRequestConfirmed":"You and {{fullname}} are now friends","friendRequestAccepted":"{{fullname}} accepted your friend request","sharedVideo":"{{fullname}} shared the <b>{{title}}</b> video to you"},"menuCategory":{"home":"Scaffolding IRL","createVideo":"Create","brainHive":"Share"},"noItemsFound":"No items found.","mostRecent":"Most recent","mostView":"Most views","mostRelevant":"Most relevant","most_recent":"most recent","most_view":"most views","most_relevant":"most relevant","search":"Search","publishingStatus":{"PENDING":"Pending","PROCESSING":"In-review","REJECTED":"Rejected","APPROVED":"Approved","CVS_PUBLISHING":"Publishing"},"placeholder":{"inputVerificationCode":"Input verification code","newPassword":"New password","confirmNewPassword":"Confirm new password","email":"Enter email","code":"Enter code","title":"Enter title","searchCourse":"Enter course","joinAs":"Join as","groupName":"Enter group name","groupDescription":"Enter group description","total":"Enter total","topic":"Enter topic","subject":"Enter subject","skill":"Enter skill","keyword":"Enter keyword","selectMarket":"Select market place","selectTimezone":"Select a timezone","ccvCourse":"Eg: HST.131 Introduction to Neuroscience (Fall 2005)","ccvPrimCourse":"Eg: MIT OpenCourseWare","videoDescription":"Add video description","targetVideoId":"Target video ID","description":"Enter description","addResource":"Select resource(s)","addThumbnail":"Select thumbnail","addIntro":"Select intro","addResourceTitle":"Add title","addTitleLine2":"Add title line 2","addTitleLine3":"Add title line 3","addTitleLine4":"Add title line 4","addResourceDescription":"Add description","addResourceGrades":"Eg: 7th, 8th, 9th, 10th, 12th, Higher Education, Homeschool","addResourceTypes":"Eg: Unit Plans, Video Files, Lesson","addResourceFormat":"Eg: PDF","addPreview":"Select preview file(s)","addReason":"Add a reason","addComment":"Add a comment","dropzone":"Drop files here or click to upload.","addProfile":"Add profile","addFileLink":"Add file link","storeMemberSubjects":"Subject(s)","storeMemberYears":"Year(s) of teaching experience","storeMemberGrades":"What grade (s) are you teaching?","storeMemberStudents":"How many students are you teaching?","storeMemberTextbooks":"Titles ( or authors) of the textbooks you are using","interestAreas":"Interest area(s)","interestSubjects":"Interest subject(s)","addAvatar":"Select avatar"},"addComment":"Add a comment...","commentCount":{"one":"1 comment","other":"{{count}} comments","zero":"0 comment"},"noCommentsFound":"No comments found.","nobodyLiked":"Nobody liked.","videoCount":{"one":"1 video","other":"{{count}} videos","zero":"0 video"},"noVideosFound":"No videos found.","searchingVideo":"Loading videos...","noChaptersFound":"No chapters found.","noHighlightsFound":"No highlighted episodes found.","selectedChapterCount":{"one":"1 chapter selected","other":"{{count}} chapters selected","zero":"0 chapter selected"},"selectedHighlightCount":{"one":"1 highlighted episode selected","other":"{{count}} highlighted episodes selected","zero":"0 highlighted episode selected"},"orderColumn":{"orderCode":"Order #","title":"Item(s)","date":"Date","totalPrice":"Total price","payment":"Payment type","status":"Status","quantity":"Quantity","price":"Price","amount":"Amount","videoName":"Video name","productName":"Product","productType":"Type","subtotal":"Subtotal","buyerName":"Buyer","purchasedDate":"Purchased Date","resources":"Resource(s)","productOwner":"Product owner","videoOwner":"Video owner","textbookOwner":"Textbook owner","transferred":"Paid out?"},"orderStatus":{"pending":"Pending","completed":"Completed","canceled":"Canceled","paid":"Paid"},"soldTo":"Sold to.","orderNo":"Order #:","totalPaid":"Total paid:","supportTeam":"Support team","cg":{"likes":"Likes","comments":"Comments","attachments":"Attachments","notes":"Notes","shares":"Shares"},"addNote":"Add a note...","noteCount":{"one":"1 note","other":"{{count}} notes","zero":"0 note"},"noNotesFound":"No notes found.","tourMsg":{"welcomeMsg":"Welcome to FUVi Cognitive Intelligent Network. The Platform will help leaners reach the training courses and lectures videos quickly; published by experts and the experienced teachers.","scMsg":"Scroll to put the label of your video across this redline.","filterMsg":"Select the best fit option to get your desire video.","searchMsg":"Type keyword(s) into this box to search for topics.","centerMsg":"Click any places in this area to play the selected video."},"filterAll":"All","filterSent":"Sent","filterReceived":"Received","filterCreated":"Created","filterPurchased":"Downloaded","about":"About","sharedVideos":"Shared videos","market":{"global":"Global","vn":"Vietnam","us":"US"},"timePeriod":{"last7days":"Last 7 days","last30days":"Last 30 days","last3months":"Last 3 months","days":"Days","months":"Months","years":"Years"},"totalRevenue":"Total revenue","estimatedRevenue":"Your estimated revenue","loginToAddComment":"Please login to add comment","featured":"Featured","meeting":{"deviceSettings":"Device settings","leaveMeetingConfirmText":"Do you wish to leave the meeting and keep it active for others or end the meeting for all attendees now?","leave":"Leave","leaveMeeting":"Leave meeting","endMeeting":"End meeting","endForAll":"End meeting for all","meetingEnded":"Meeting ended","meetingStatus":"Meeting status","meetingEndedNoti":"Meeting has been ended!","joinMeetingFailedMsg":"Join meeting failed, please try again!","recordingNotice":"By staying in this meeting, you consent to being recorded.","recording":"Recording...","meetingRosterTitle":"Participants","meetingChatTitle":"Chat"},"loadingVideos":"Loading videos...","backToLogin":"Back to login","sortBy":"Sort by","noSharedVideo":"No shared videos","noSharedVideoFound":"No shared video found","transcript":"Transcript","notes":"Notes","introduction":"Introduction","none":"None","basicInformation":"Basic information","storeInformation":"Store\'s information","textbookInfo":"Textbook information","noVideoChaptersFound":"No video chapters found.","appendCopiedChapters":"Append copied chapter(s) to video","selectCopiedChapters":"Select chapters to be copied","invalidTargetVideoId":"Invalid target video ID","resourceCount":{"one":"1 digital resource found","other":"{{count}} digital resources found","zero":"No digital resources found"},"ratingCount":{"one":"1 rating","other":"{{count}} ratings","zero":"0 rating"},"overallScore":"Overall score","summary":"Summary","noRatingFound":"No rating found","billingAddress":"Billing address","unlimited":"UNLIMITED","copyrightOptions":{"originalContent":"I attest that this product I am about to post is an original work and it does not infringe upon the Intellectual Property rights of others.","others":"I attest that I have used copyrighted and/or trademarked materials in my product and it does not infringe upon the Intellectual Property rights of others. I have either received express permission to use such materials, or I hereby certify that the use of such materials is otherwise non-infringing, for example as a fair use."},"tabPdfPpt":"PDFs - PPTs","tabLiveClass":"Live class","subscriptionNote":"(*) The percentage payout does not exclude textbook commissions (10% if any).","teachers":{"one":"teacher","other":"teachers","zero":"teacher"},"resources":{"one":"resource","other":"resources","zero":"resource"},"courses":{"one":"course","other":"courses","zero":"course"},"memberCount":{"one":"1 member found","other":"{{count}} members found","zero":"No member found"},"monthCount":{"one":"1 month","other":"{{count}} months","zero":"0 month"},"itemCount":{"one":"1 item","other":"{{count}} items","zero":"0 item"}}')},function(e){e.exports=JSON.parse('{"searchVideoContent":"Tìm nội dung của video","searchVideo":"Tìm video"}')},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(42),o=n.n(a),s=n(0),l=n.n(s),c=n(47),u=["bsPrefix","className","as"],d=["xl","lg","md","sm","xs"],h=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,s=e.as,h=void 0===s?"div":s,f=Object(i.a)(e,u),p=Object(c.a)(n,"col"),m=[],g=[];return d.forEach((function(e){var t,n,r,i=f[e];if(delete f[e],"object"==typeof i&&null!=i){var a=i.span;t=void 0===a||a,n=i.offset,r=i.order}else t=i;var o="xs"!==e?"-"+e:"";t&&m.push(!0===t?""+p+o:""+p+o+"-"+t),null!=r&&g.push("order"+o+"-"+r),null!=n&&g.push("offset"+o+"-"+n)})),m.length||m.push(p),l.a.createElement(h,Object(r.a)({},f,{ref:t,className:o.a.apply(void 0,[a].concat(m,g))}))}));h.displayName="Col",t.a=h},function(e,t,n){var r=n(718),i=n(582),a=n(719);e.exports=function(e){return r(e)||i(e)||a()}},function(e,t,n){"use strict";(function(t){const r=n(1092),i=n(720),a=n(1135),o=n(227),s=n(300)("mqttjs"),l={};function c(e,t){if(s("connecting to an MQTT broker..."),"object"!=typeof e||t||(t=e,e=null),t=t||{},e){const n=a.parse(e,!0);if(null!=n.port&&(n.port=Number(n.port)),null===(t=o(n,t)).protocol)throw new Error("Missing protocol");t.protocol=t.protocol.replace(/:$/,"")}if(function(e){let t;e.auth&&(t=e.auth.match(/^(.+):(.+)$/),t?(e.username=t[1],e.password=t[2]):e.username=e.auth)}(t),t.query&&"string"==typeof t.query.clientId&&(t.clientId=t.query.clientId),t.cert&&t.key){if(!t.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs","alis"].indexOf(t.protocol))switch(t.protocol){case"mqtt":t.protocol="mqtts";break;case"ws":t.protocol="wss";break;case"wx":t.protocol="wxs";break;case"ali":t.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+t.protocol+'"!')}}if(!l[t.protocol]){const e=-1!==["mqtts","wss"].indexOf(t.protocol);t.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((function(t,n){return(!e||n%2!=0)&&"function"==typeof l[t]}))[0]}if(!1===t.clean&&!t.clientId)throw new Error("Missing clientId for unclean clients");t.protocol&&(t.defaultProtocol=t.protocol);const n=new r((function(e){return t.servers&&(e._reconnectCount&&e._reconnectCount!==t.servers.length||(e._reconnectCount=0),t.host=t.servers[e._reconnectCount].host,t.port=t.servers[e._reconnectCount].port,t.protocol=t.servers[e._reconnectCount].protocol?t.servers[e._reconnectCount].protocol:t.defaultProtocol,t.hostname=t.host,e._reconnectCount++),s("calling streambuilder for",t.protocol),l[t.protocol](e,t)}),t);return n.on("error",(function(){})),n}void 0!==t&&"browser"!==t.title||"function"!=typeof n?(l.mqtt=n(738),l.tcp=n(738),l.ssl=n(447),l.tls=n(447),l.mqtts=n(447)):(l.wx=n(740),l.wxs=n(740),l.ali=n(741),l.alis=n(741)),l.ws=n(742),l.wss=n(742),e.exports=c,e.exports.connect=c,e.exports.MqttClient=r,e.exports.Store=i}).call(this,n(96))},function(e,t,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a=Object.defineProperty,o=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,u=c&&c(Object);e.exports=function e(t,n,d){if("string"!=typeof n){if(u){var h=c(n);h&&h!==u&&e(t,h,d)}var f=o(n);s&&(f=f.concat(s(n)));for(var p=0;p<f.length;++p){var m=f[p];if(!(r[m]||i[m]||d&&d[m])){var g=l(n,m);try{a(t,m,g)}catch(e){}}}return t}return t}},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(42),o=n.n(a),s=n(0),l=n.n(s),c=n(47),u=n(219),d=["bsPrefix","variant","size","active","className","block","type","as"],h=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.variant,s=e.size,h=e.active,f=e.className,p=e.block,m=e.type,g=e.as,v=Object(i.a)(e,d),b=Object(c.a)(n,"btn"),y=o()(f,b,h&&"active",a&&b+"-"+a,p&&b+"-block",s&&b+"-"+s);if(v.href)return l.a.createElement(u.a,Object(r.a)({},v,{as:g,ref:t,className:o()(y,v.disabled&&"disabled")}));t&&(v.ref=t),m?v.type=m:g||(v.type="button");var A=g||"button";return(l.a.createElement(A,Object(r.a)({},v,{className:y})))}));h.displayName="Button",h.defaultProps={variant:"primary",active:!1,disabled:!1},t.a=h},function(e,t,n){var r=n(351);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(765);t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=n(1212).DOMParser},function(e,t,n){var r=n(1215).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===n.version?(n.earliestPresentationTime=t.getUint32(i),n.firstOffset=t.getUint32(i+4),i+=8):(n.earliestPresentationTime=r(e.subarray(i)),n.firstOffset=r(e.subarray(i+8)),i+=16),i+=2;var a=t.getUint16(i);for(i+=2;a>0;i+=12,a--)n.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return n}},function(e,t,n){var r=n(1216),i=n(351),a=n(1217),o=n(545);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return o(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(42),o=n.n(a),s=n(0),l=n.n(s),c=n(120),u=n(47),d=["bsPrefix","className","children","controlId","as"],h=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,h=e.children,f=e.controlId,p=e.as,m=void 0===p?"div":p,g=Object(i.a)(e,d);n=Object(u.a)(n,"form-group");var v=Object(s.useMemo)((function(){return{controlId:f}}),[f]);return(l.a.createElement(c.a.Provider,{value:v},l.a.createElement(m,Object(r.a)({},g,{ref:t,className:o()(a,n)}),h)))}));h.displayName="FormGroup",t.a=h},function(e,t,n){"use strict";e.exports=n(1228)},function(e,t,n){var r=n(458),i=n(1277),a=n(354),o=n(459),s=n(1279),l=n(774),c=Date.prototype.getTime;function u(e,t,n){var f=n||{};return!(f.strict?!a(e,t):e!==t)||(!e||!t||"object"!=typeof e&&"object"!=typeof t?f.strict?a(e,t):e==t:function(e,t,n){var a,f;if(typeof e!=typeof t)return!1;if(d(e)||d(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e)!==i(t))return!1;var p=o(e),m=o(t);if(p!==m)return!1;if(p||m)return e.source===t.source&&s(e)===s(t);if(l(e)&&l(t))return c.call(e)===c.call(t);var g=h(e),v=h(t);if(g!==v)return!1;if(g||v){if(e.length!==t.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}if(typeof e!=typeof t)return!1;try{var b=r(e),y=r(t)}catch(e){return!1}if(b.length!==y.length)return!1;for(b.sort(),y.sort(),a=b.length-1;a>=0;a--)if(b[a]!=y[a])return!1;for(a=b.length-1;a>=0;a--)if(f=b[a],!u(e[f],t[f],n))return!1;return!0}(e,t,f))}function d(e){return null==e}function h(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}e.exports=u},function(e,t,n){e.exports=function(e,t){"use strict";function n(t){return e.createElement("button",{type:"button",className:t.classNames.selectedTag,title:t.removeButtonText,onClick:t.onDelete},e.createElement("span",{className:t.classNames.selectedTagName},t.tag.name))}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var r={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},i=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"],a=function(t){function n(n){t.call(this,n),this.state={inputWidth:null},this.input=e.createRef(),this.sizer=e.createRef()}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.componentDidMount=function(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth())},n.prototype.componentDidUpdate=function(e){var t=e.query,n=e.placeholder;t===this.props.query&&n===this.props.placeholder||this.updateInputWidth()},n.prototype.copyInputStyles=function(){var e=this,t=window.getComputedStyle(this.input.current);i.forEach((function(n){e.sizer.current.style[n]=t[n]}))},n.prototype.updateInputWidth=function(){var e;this.props.autoresize&&(e=Math.ceil(this.sizer.current.scrollWidth)+2),e!==this.state.inputWidth&&this.setState({inputWidth:e})},n.prototype.render=function(){var t=this.props,n=t.id,i=t.query,a=t.ariaLabelText,o=t.placeholderText,s=t.expanded,l=t.classNames,c=t.inputAttributes,u=t.inputEventHandlers,d=t.index;return e.createElement("div",{className:l.searchWrapper},e.createElement("input",Object.assign({},c,u,{ref:this.input,value:i,placeholder:o,className:l.searchInput,role:"combobox","aria-autocomplete":"list","aria-label":a||o,"aria-owns":n,"aria-activedescendant":d>-1?n+"-"+d:null,"aria-expanded":s,style:{width:this.state.inputWidth}})),e.createElement("div",{ref:this.sizer,style:r},i||o))},n}(e.Component);function o(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function s(e,t){var n=new RegExp(o(t),"gi");return e.replace(n,"<mark>$&</mark>")}var l=function(t){var n=t.item,r=t.query;return e.createElement("span",{dangerouslySetInnerHTML:{__html:s(n.name,r)}})},c=function(t){function n(){t.apply(this,arguments)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.onMouseDown=function(e,t){t.preventDefault(),this.props.addTag(e)},n.prototype.render=function(){var t=this;if(!this.props.expanded||!this.props.options.length)return null;var n=this.props.suggestionComponent||l,r=this.props.options.map((function(r,i){var a=t.props.id+"-"+i,o=[];return t.props.index===i&&o.push(t.props.classNames.suggestionActive),r.disabled&&o.push(t.props.classNames.suggestionDisabled),e.createElement("li",{id:a,key:a,role:"option",className:o.join(" "),"aria-disabled":!0===r.disabled,onMouseDown:t.onMouseDown.bind(t,r)},r.disableMarkIt?r.name:e.createElement(n,{item:r,query:t.props.query}))}));return e.createElement("div",{className:this.props.classNames.suggestions},e.createElement("ul",{role:"listbox",id:this.props.id},r))},n}(e.Component),u="Enter",d="Tab",h="Backspace",f="ArrowUp",p="Up",m="ArrowDown",g="Down";function v(){var e=this;if(this.state.query.length>=this.props.minQueryLength){var t=this.state.options.findIndex((function(t){return(n=e.state.query,new RegExp("^"+o(n)+"$","i")).test(t.name);var n})),n=-1===this.state.index?t:this.state.index;n>-1&&this.state.options[n]?this.addTag(this.state.options[n]):this.props.allowNew&&this.addTag({name:this.state.query})}}function b(e){e.preventDefault();var t=this.state.options.length-1;this.setState({index:this.state.index<=0?t:this.state.index-1})}function y(e){e.preventDefault();var t=this.state.options.length-1;this.setState({index:this.state.index>=t?0:this.state.index+1})}function A(){this.state.query.length||this.deleteTag(this.props.tags.length-1)}function _(e,t){var n;return 0===(n=e.suggestionsTransform?e.suggestionsTransform(t.query,e.suggestions):e.suggestions.filter((function(n){return e.suggestionsFilter(n,t.query)}))).length&&e.noSuggestionsText&&n.push({id:0,name:e.noSuggestionsText,disabled:!0,disableMarkIt:!0}),n.slice(0,e.maxSuggestionsLength)}var w=function(t){function r(n){t.call(this,n),this.state={query:"",focused:!1,index:-1},this.inputEventHandlers={onChange:function(){},onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this),onKeyDown:this.onKeyDown.bind(this)},this.container=e.createRef(),this.input=e.createRef(),this.suggestions=e.createRef()}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.onInput=function(e){var t=e.target.value;this.props.onInput&&this.props.onInput(t),t.length===this.state.query.length+1&&this.props.delimiters.indexOf(t.slice(-1))>-1?v.call(this):t!==this.state.query&&this.setState({query:t})},r.prototype.onKeyDown=function(e){this.props.delimiters.indexOf(e.key)>-1&&((this.state.query||this.state.index>-1)&&e.preventDefault(),v.call(this)),e.key===h&&this.props.allowBackspace&&A.call(this,e),e.key!==f&&e.key!==p||b.call(this,e),e.key!==m&&e.key!==g||y.call(this,e)},r.prototype.onClick=function(e){document.activeElement!==e.target&&this.input.current.input.current.focus()},r.prototype.onBlur=function(){this.setState({focused:!1,index:-1}),this.props.onBlur&&this.props.onBlur(),this.props.addOnBlur&&v.call(this)},r.prototype.onFocus=function(){this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus()},r.prototype.onDeleteTag=function(e,t){if(this.container.current){var n=this.container.current.querySelectorAll("a,button,input"),r=Array.prototype.findIndex.call(n,(function(e){return e===t.currentTarget})),i=n[r-1]||n[r+1];i&&i.focus()}this.deleteTag(e)},r.prototype.addTag=function(e){e.disabled||("function"!=typeof this.props.onValidate||this.props.onValidate(e))&&(this.props.onAddition(e),this.clearInput())},r.prototype.deleteTag=function(e){this.props.onDelete(e)},r.prototype.clearInput=function(){this.setState({query:"",index:-1})},r.prototype.render=function(){var t=this,r=this.props.tagComponent||n,i=this.state.focused&&this.state.query.length>=this.props.minQueryLength,o=[this.props.classNames.root];return this.state.focused&&o.push(this.props.classNames.rootFocused),e.createElement("div",{ref:this.container,className:o.join(" "),onClick:this.onClick.bind(this)},e.createElement("div",{className:this.props.classNames.selected,"aria-relevant":"additions removals","aria-live":"polite"},this.props.tags.map((function(n,i){return e.createElement(r,{key:i,tag:n,removeButtonText:t.props.removeButtonText,classNames:t.props.classNames,onDelete:t.onDeleteTag.bind(t,i)})}))),e.createElement("div",{className:this.props.classNames.search},e.createElement(a,Object.assign({},this.state,{id:this.props.id,ref:this.input,classNames:this.props.classNames,inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,autoresize:this.props.autoresize,expanded:i,placeholderText:this.props.placeholderText,ariaLabelText:this.props.ariaLabelText})),e.createElement(c,Object.assign({},this.state,{id:this.props.id,ref:this.suggestions,classNames:this.props.classNames,expanded:i,addTag:this.addTag.bind(this),suggestionComponent:this.props.suggestionComponent}))))},r.getDerivedStateFromProps=function(e,t){return t.prevQuery!==t.query||t.prevSuggestions!==e.suggestions?{prevQuery:t.query,prevSuggestions:e.suggestions,options:_(e,t)}:null},r}(e.Component);return w.defaultProps={id:"ReactTags",tags:[],placeholderText:"Add new tag",removeButtonText:"Click to remove tag",noSuggestionsText:null,suggestions:[],suggestionsFilter:function(e,t){return(n=t,new RegExp("(?:^|\\s)"+o(n),"i")).test(e.name);var n},suggestionsTransform:null,autoresize:!0,classNames:{root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchWrapper:"react-tags__search-wrapper",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled"},delimiters:[d,u],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,addOnBlur:!1,tagComponent:null,suggestionComponent:null,inputAttributes:{}},w.propTypes={id:t.string,tags:t.arrayOf(t.object),placeholderText:t.string,ariaLabelText:t.string,removeButtonText:t.string,noSuggestionsText:t.string,suggestions:t.arrayOf(t.object),suggestionsFilter:t.func,suggestionsTransform:t.func,autoresize:t.bool,delimiters:t.arrayOf(t.string),onDelete:t.func.isRequired,onAddition:t.func.isRequired,onInput:t.func,onFocus:t.func,onBlur:t.func,onValidate:t.func,minQueryLength:t.number,maxSuggestionsLength:t.number,classNames:t.object,allowNew:t.bool,allowBackspace:t.bool,addOnBlur:t.bool,tagComponent:t.oneOfType([t.func,t.element]),suggestionComponent:t.oneOfType([t.func,t.element]),inputAttributes:t.object},w}(n(0),n(6))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1316),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var r=n(0);let i;i="undefined"!=typeof window?window:"undefined"!=typeof self?self:e;let a=null,o=null;const s=i.clearTimeout,l=i.setTimeout,c=i.cancelAnimationFrame||i.mozCancelAnimationFrame||i.webkitCancelAnimationFrame,u=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame;function d(e){let t,n,r,s,l,c,u;const d="undefined"!=typeof document&&document.attachEvent;if(!d){c=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},l=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},u=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;c(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=o((function(){l(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,i="";r="animationstart";const d="Webkit Moz O ms".split(" ");let h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<d.length;n++)if(void 0!==t.style[d[n]+"AnimationName"]){f=d[n],i="-"+f.toLowerCase()+"-",r=h[n],e=!0;break}}n="resizeanim",t="@"+i+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",s=i+"animation: 1ms "+n+"; "}return{addResizeListener:function(a,o){if(d)a.attachEvent("onresize",o);else{if(!a.__resizeTriggers__){const o=a.ownerDocument,l=i.getComputedStyle(a);l&&"static"===l.position&&(a.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(s||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(o),a.__resizeLast__={},a.__resizeListeners__=[],(a.__resizeTriggers__=o.createElement("div")).className="resize-triggers";const d=o.createElement("div");d.className="expand-trigger",d.appendChild(o.createElement("div"));const h=o.createElement("div");h.className="contract-trigger",a.__resizeTriggers__.appendChild(d),a.__resizeTriggers__.appendChild(h),a.appendChild(a.__resizeTriggers__),c(a),a.addEventListener("scroll",u,!0),r&&(a.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&c(a)},a.__resizeTriggers__.addEventListener(r,a.__resizeTriggers__.__animationListener__))}a.__resizeListeners__.push(o)}},removeResizeListener:function(e,t){if(d)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",u,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==c||null==u?(a=s,o=function(e){return l(e,20)}):(a=function([e,t]){c(e),s(t)},o=function(e){const t=u((function(){s(n),e()})),n=l((function(){c(t),e()}),20);return[t,n]});class h extends r.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){var r,i,a,o;const s=window.getComputedStyle(this._parentNode)||{},l=parseFloat(null!==(r=s.paddingLeft)&&void 0!==r?r:"0"),c=parseFloat(null!==(i=s.paddingRight)&&void 0!==i?i:"0"),u=parseFloat(null!==(a=s.paddingTop)&&void 0!==a?a:"0"),d=parseFloat(null!==(o=s.paddingBottom)&&void 0!==o?o:"0"),h=this._parentNode.getBoundingClientRect(),f=h.height-u-d,p=h.width-l-c,m=this._parentNode.offsetHeight-u-d,g=this._parentNode.offsetWidth-l-c;(e||this.state.height===m&&this.state.scaledHeight===f)&&(t||this.state.width===g&&this.state.scaledWidth===p)||(this.setState({height:m,width:g,scaledHeight:f,scaledWidth:p}),"function"==typeof n&&n({height:m,scaledHeight:f,scaledWidth:p,width:g}))}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){const{nonce:e}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,null!=this._parentNode&&("undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=d(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:i=!1,disableWidth:a=!1,nonce:o,onResize:s,style:l={},tagName:c="div",...u}=this.props,{height:d,scaledHeight:h,scaledWidth:f,width:p}=this.state,m={overflow:"visible"},g={};let v=!1;return i||(0===d&&(v=!0),m.height=0,g.height=d,g.scaledHeight=h),a||(0===p&&(v=!0),m.width=0,g.width=p,g.scaledWidth=f),Object(r.createElement)(c,{ref:this._setRef,style:{...m,...l},...u},!v&&e(g))}}}).call(this,n(68))},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(i=n?n.call(r,u,d,c):void 0)||void 0===i&&u!==d)return!1}return!0}},function(e,t,n){"use strict";t.a=function(e){function t(e,t,r){var i=t.trim().split(p);t=i;var a=i.length,o=e.length;switch(o){case 0:case 1:var s=0;for(e=0===o?"":e[0]+" ";s<a;++s)t[s]=n(e,t[s],r).trim();break;default:var l=s=0;for(t=[];s<a;++s)for(var c=0;c<o;++c)t[l++]=n(e[c]+" ",i[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,a){var o=e+";",s=2*t+3*n+4*a;if(944===s){e=o.indexOf(":",9)+1;var l=o.substring(e,o.length-1).trim();return l=o.substring(0,e).trim()+l+";",1===O||2===O&&i(l,1)?"-webkit-"+l+l:l}if(0===O||2===O&&!i(o,1))return o;switch(s){case 1015:return 97===o.charCodeAt(10)?"-webkit-"+o+o:o;case 951:return 116===o.charCodeAt(3)?"-webkit-"+o+o:o;case 963:return 110===o.charCodeAt(5)?"-webkit-"+o+o:o;case 1009:if(100!==o.charCodeAt(4))break;case 969:case 942:return"-webkit-"+o+o;case 978:return"-webkit-"+o+"-moz-"+o+o;case 1019:case 983:return"-webkit-"+o+"-moz-"+o+"-ms-"+o+o;case 883:if(45===o.charCodeAt(8))return"-webkit-"+o+o;if(0<o.indexOf("image-set(",11))return o.replace(C,"$1-webkit-$2")+o;break;case 932:if(45===o.charCodeAt(4))switch(o.charCodeAt(5)){case 103:return"-webkit-box-"+o.replace("-grow","")+"-webkit-"+o+"-ms-"+o.replace("grow","positive")+o;case 115:return"-webkit-"+o+"-ms-"+o.replace("shrink","negative")+o;case 98:return"-webkit-"+o+"-ms-"+o.replace("basis","preferred-size")+o}return"-webkit-"+o+"-ms-"+o+o;case 964:return"-webkit-"+o+"-ms-flex-"+o+o;case 1023:if(99!==o.charCodeAt(8))break;return"-webkit-box-pack"+(l=o.substring(o.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+o+"-ms-flex-pack"+l+o;case 1005:return h.test(o)?o.replace(d,":-webkit-")+o.replace(d,":-moz-")+o:o;case 1e3:switch(t=(l=o.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=o.replace(y,"tb");break;case 232:l=o.replace(y,"tb-rl");break;case 220:l=o.replace(y,"lr");break;default:return o}return"-webkit-"+o+"-ms-"+l+o;case 1017:if(-1===o.indexOf("sticky",9))break;case 975:switch(t=(o=e).length-10,s=(l=(33===o.charCodeAt(t)?o.substring(0,t):o).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+o.replace(l,"-webkit-"+l)+";"+o.replace(l,"-ms-"+l+"box")+";"+o}return o+";";case 938:if(45===o.charCodeAt(5))switch(o.charCodeAt(6)){case 105:return l=o.replace("-items",""),"-webkit-"+o+"-webkit-box-"+l+"-ms-flex-"+l+o;case 115:return"-webkit-"+o+"-ms-flex-item-"+o.replace(w,"")+o;default:return"-webkit-"+o+"-ms-flex-line-pack"+o.replace("align-content","").replace(w,"")+o}break;case 973:case 989:if(45!==o.charCodeAt(3)||122===o.charCodeAt(4))break;case 931:case 953:if(!0===S.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,a).replace(":fill-available",":stretch"):o.replace(l,"-webkit-"+l)+o.replace(l,"-moz-"+l.replace("fill-",""))+o;break;case 962:if(o="-webkit-"+o+(102===o.charCodeAt(5)?"-ms-"+o:"")+o,211===n+a&&105===o.charCodeAt(13)&&0<o.indexOf("transform",10))return o.substring(0,o.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+o}return o}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),D(2!==t?r:r.replace(E,"$1"),n,t)}function a(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(_," or ($1)").substring(4):"("+t+")"}function o(e,t,n,r,i,a,o,s,c,u){for(var d,h=0,f=t;h<P;++h)switch(d=M[h].call(l,e,f,n,r,i,a,o,s,c,u)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function s(e){return void 0!==(e=e.prefix)&&(D=null,e?"function"!=typeof e?O=1:(O=2,D=e):O=0),s}function l(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<P){var l=o(-1,n,s,s,k,T,0,0,0,0);void 0!==l&&"string"==typeof l&&(n=l)}var d=function e(n,s,l,d,h){for(var f,p,m,y,_,w=0,E=0,S=0,C=0,M=0,D=0,L=m=f=0,R=0,B=0,j=0,F=0,U=l.length,H=U-1,z="",V="",W="",G="";R<U;){if(p=l.charCodeAt(R),R===H&&0!==E+C+S+w&&(0!==E&&(p=47===E?10:47),C=S=w=0,U++,H++),0===E+C+S+w){if(R===H&&(0<B&&(z=z.replace(u,"")),0<z.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:z+=l.charAt(R)}p=59}switch(p){case 123:for(f=(z=z.trim()).charCodeAt(0),m=1,F=++R;R<U;){switch(p=l.charCodeAt(R)){case 123:m++;break;case 125:m--;break;case 47:switch(p=l.charCodeAt(R+1)){case 42:case 47:e:{for(L=R+1;L<H;++L)switch(l.charCodeAt(L)){case 47:if(42===p&&42===l.charCodeAt(L-1)&&R+2!==L){R=L+1;break e}break;case 10:if(47===p){R=L+1;break e}}R=L}}break;case 91:p++;case 40:p++;case 34:case 39:for(;R++<H&&l.charCodeAt(R)!==p;);}if(0===m)break;R++}switch(m=l.substring(F,R),0===f&&(f=(z=z.replace(c,"").trim()).charCodeAt(0)),f){case 64:switch(0<B&&(z=z.replace(u,"")),p=z.charCodeAt(1)){case 100:case 109:case 115:case 45:B=s;break;default:B=I}if(F=(m=e(s,B,m,p,h+1)).length,0<P&&(_=o(3,m,B=t(I,z,j),s,k,T,F,p,h,d),z=B.join(""),void 0!==_&&0===(F=(m=_.trim()).length)&&(p=0,m="")),0<F)switch(p){case 115:z=z.replace(A,a);case 100:case 109:case 45:m=z+"{"+m+"}";break;case 107:m=(z=z.replace(g,"$1 $2"))+"{"+m+"}",m=1===O||2===O&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=z+m,112===d&&(V+=m,m="")}else m="";break;default:m=e(s,t(s,z,j),m,d,h+1)}W+=m,m=j=B=L=f=0,z="",p=l.charCodeAt(++R);break;case 125:case 59:if(1<(F=(z=(0<B?z.replace(u,""):z).trim()).length))switch(0===L&&(f=z.charCodeAt(0),45===f||96<f&&123>f)&&(F=(z=z.replace(" ",":")).length),0<P&&void 0!==(_=o(1,z,s,n,k,T,V.length,d,h,d))&&0===(F=(z=_.trim()).length)&&(z="\0\0"),f=z.charCodeAt(0),p=z.charCodeAt(1),f){case 0:break;case 64:if(105===p||99===p){G+=z+l.charAt(R);break}default:58!==z.charCodeAt(F-1)&&(V+=r(z,f,p,z.charCodeAt(2)))}j=B=L=f=0,z="",p=l.charCodeAt(++R)}}switch(p){case 13:case 10:47===E?E=0:0===1+f&&107!==d&&0<z.length&&(B=1,z+="\0"),0<P*N&&o(0,z,s,n,k,T,V.length,d,h,d),T=1,k++;break;case 59:case 125:if(0===E+C+S+w){T++;break}default:switch(T++,y=l.charAt(R),p){case 9:case 32:if(0===C+w+E)switch(M){case 44:case 58:case 9:case 32:y="";break;default:32!==p&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===C+E+w&&(B=j=1,y="\f"+y);break;case 108:if(0===C+E+w+x&&0<L)switch(R-L){case 2:112===M&&58===l.charCodeAt(R-3)&&(x=M);case 8:111===D&&(x=D)}break;case 58:0===C+E+w&&(L=R);break;case 44:0===E+S+C+w&&(B=1,y+="\r");break;case 34:case 39:0===E&&(C=C===p?0:0===C?p:C);break;case 91:0===C+E+S&&w++;break;case 93:0===C+E+S&&w--;break;case 41:0===C+E+w&&S--;break;case 40:if(0===C+E+w){if(0===f)switch(2*M+3*D){case 533:break;default:f=1}S++}break;case 64:0===E+S+C+w+L+m&&(m=1);break;case 42:case 47:if(!(0<C+w+S))switch(E){case 0:switch(2*p+3*l.charCodeAt(R+1)){case 235:E=47;break;case 220:F=R,E=42}break;case 42:47===p&&42===M&&F+2!==R&&(33===l.charCodeAt(F+2)&&(V+=l.substring(F,R+1)),y="",E=0)}}0===E&&(z+=y)}D=M,M=p,R++}if(0<(F=V.length)){if(B=s,0<P&&(void 0!==(_=o(2,V,B,n,k,T,F,d,h,d))&&0===(V=_).length))return G+V+W;if(V=B.join(",")+"{"+V+"}",0!=O*x){switch(2!==O||i(V,2)||(x=0),x){case 111:V=V.replace(b,":-moz-$1")+V;break;case 112:V=V.replace(v,"::-webkit-input-$1")+V.replace(v,"::-moz-$1")+V.replace(v,":-ms-input-$1")+V}x=0}}return G+V+W}(I,s,n,0,0);return 0<P&&(void 0!==(l=o(-2,d,s,s,k,T,d.length,0,0,0))&&(d=l)),"",x=0,T=k=1,d}var c=/^\0+/g,u=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,f=/([,: ])(transform)/g,p=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,b=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,A=/\(\s*(.*)\s*\)/g,_=/([\s\S]*?);/g,w=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,S=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,T=1,k=1,x=0,O=1,I=[],M=[],P=0,D=null,N=0;return l.use=function e(t){switch(t){case void 0:case null:P=M.length=0;break;default:if("function"==typeof t)M[P++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else N=0|!!t}return e},l.set=s,void 0!==e&&s(e),l}},function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",horizontalIndicator:"horizontalIndicator--2P8b7"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",searchBoxWrapper:"searchBoxWrapper--3FvEj",searchResults:"searchResults--2voHp",borderTop:"borderTop--1P9y5"}},function(e,t,n){(function(n){var r;!function(n,i){e.exports=function(n){"use strict";var i,a=(n=n||{}).Base64,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(o),l=String.fromCharCode,c=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?l(192|t>>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|63&t)},u=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(u,c)},h=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(n>>>18),o.charAt(n>>>12&63),t>=2?"=":o.charAt(n>>>6&63),t>=1?"=":o.charAt(63&n)].join("")},f=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,h)},p=function(e){return f(d(String(e)))},m=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?m(p(e)):p(e)};n.Uint8Array&&(i=function(e,t){for(var n="",r=0,i=e.length;r<i;r+=3){var a=e[r],s=e[r+1],l=e[r+2],c=a<<16|s<<8|l;n+=o.charAt(c>>>18)+o.charAt(c>>>12&63)+(void 0!==s?o.charAt(c>>>6&63):"=")+(void 0!==l?o.charAt(63&c):"=")}return t?m(n):n});var v,b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},A=function(e){return e.replace(b,y)},_=function(e){var t=e.length,n=t%4,r=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),i=[l(r>>>16),l(r>>>8&255),l(255&r)];return i.length-=[0,0,2,1][n],i.join("")},w=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},E=function(e){return w(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},S=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},C=function(e){return function(e){return A(w(e))}(S(e))};n.Uint8Array&&(v=function(e){return Uint8Array.from(E(S(e)),(function(e){return e.charCodeAt(0)}))});var T=function(){var e=n.Base64;return n.Base64=a,e};if(n.Base64={VERSION:"2.6.4",atob:E,btoa:f,fromBase64:C,toBase64:g,utob:d,encode:g,encodeURI:function(e){return g(e,!0)},btou:A,decode:C,noConflict:T,fromUint8Array:i,toUint8Array:v},"function"==typeof Object.defineProperty){var k=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",k((function(){return C(this)}))),Object.defineProperty(String.prototype,"toBase64",k((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",k((function(){return g(this,!0)})))}}n.Meteor&&(Base64=n.Base64);e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(t,[]))||(e.exports=r);return{Base64:n.Base64}}(n)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:this)}).call(this,n(68))},function(e,t,n){"use strict";(function(t){var r=n(1416),i=n(1417),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(a,"")}var h=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function p(e){var n,r=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},i={},a=typeof(e=e||r);if("blob:"===e.protocol)i=new v(unescape(e.pathname),{});else if("string"===a)for(n in i=new v(e,{}),f)delete i[n];else if("object"===a){for(n in e)n in f||(i[n]=e[n]);void 0===i.slashes&&(i.slashes=s.test(e.href))}return i}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=d(e)).replace(o,""),t=t||{};var n,r=c.exec(e),i=r[1]?r[1].toLowerCase():"",a=!!r[2],s=!!r[3],l=0;return a?s?(n=r[2]+r[3]+r[4],l=r[2].length+r[3].length):(n=r[2]+r[4],l=r[2].length):s?(n=r[3]+r[4],l=r[3].length):n=r[4],"file:"===i?l>=2&&(n=n.slice(2)):m(i)?n=r[4]:i?a&&(n=n.slice(2)):l>=2&&m(t.protocol)&&(n=r[4]),{protocol:i,slashes:a||m(i),slashesCount:l,rest:n}}function v(e,t,n){if(e=(e=d(e)).replace(o,""),!(this instanceof v))return new v(e,t,n);var a,s,l,c,f,b,y=h.slice(),A=typeof t,_=this,w=0;for("object"!==A&&"string"!==A&&(n=t,t=null),n&&"function"!=typeof n&&(n=i.parse),a=!(s=g(e||"",t=p(t))).protocol&&!s.slashes,_.slashes=s.slashes||a&&t.slashes,_.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||u.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!m(_.protocol)))&&(y[3]=[/(.*)/,"pathname"]);w<y.length;w++)"function"!=typeof(c=y[w])?(l=c[0],b=c[1],l!=l?_[b]=e:"string"==typeof l?~(f="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(_[b]=e.slice(0,f),e=e.slice(f+c[2])):(_[b]=e.slice(f),e=e.slice(0,f))):(f=l.exec(e))&&(_[b]=f[1],e=e.slice(0,f.index)),_[b]=_[b]||a&&c[3]&&t[b]||"",c[4]&&(_[b]=_[b].toLowerCase())):e=c(e,_);n&&(_.query=n(_.query)),a&&t.slashes&&"/"!==_.pathname.charAt(0)&&(""!==_.pathname||""!==t.pathname)&&(_.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],a=!1,o=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),o++):o&&(0===r&&(a=!0),n.splice(r,1),o--);return a&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(_.pathname,t.pathname)),"/"!==_.pathname.charAt(0)&&m(_.protocol)&&(_.pathname="/"+_.pathname),r(_.port,_.protocol)||(_.host=_.hostname,_.port=""),_.username=_.password="",_.auth&&(~(f=_.auth.indexOf(":"))?(_.username=_.auth.slice(0,f),_.username=encodeURIComponent(decodeURIComponent(_.username)),_.password=_.auth.slice(f+1),_.password=encodeURIComponent(decodeURIComponent(_.password))):_.username=encodeURIComponent(decodeURIComponent(_.auth)),_.auth=_.password?_.username+":"+_.password:_.username),_.origin="file:"!==_.protocol&&m(_.protocol)&&_.host?_.protocol+"//"+_.host:"null",_.href=_.toString()}v.prototype={set:function(e,t,n){var a=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||i.parse)(t)),a[e]=t;break;case"port":a[e]=t,r(t,a.protocol)?t&&(a.host=a.hostname+":"+t):(a.host=a.hostname,a[e]="");break;case"hostname":a[e]=t,a.port&&(t+=":"+a.port),a.host=t;break;case"host":a[e]=t,l.test(t)?(t=t.split(":"),a.port=t.pop(),a.hostname=t.join(":")):(a.hostname=t,a.port="");break;case"protocol":a.protocol=t.toLowerCase(),a.slashes=!n;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";a[e]=t.charAt(0)!==o?o+t:t}else a[e]=t;break;case"username":case"password":a[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(a.username=t.slice(0,s),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=t.slice(s+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<h.length;c++){var u=h[c];u[4]&&(a[u[1]]=a[u[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin="file:"!==a.protocol&&m(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a},toString:function(e){e&&"function"==typeof e||(e=i.stringify);var t,n=this,r=n.host,a=n.protocol;a&&":"!==a.charAt(a.length-1)&&(a+=":");var o=a+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(o+="@"),(":"===r[r.length-1]||l.test(n.hostname)&&!n.port)&&(r+=":"),o+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(o+=n.hash),o}},v.extractProtocol=g,v.location=p,v.trimLeft=d,v.qs=i,e.exports=v}).call(this,n(68))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",a=i.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim();return"."===t.charAt(0)?r.toLowerCase().endsWith(t.toLowerCase()):t.endsWith("/*")?a===t.replace(/\/.*$/,""):i===t}))}return!0}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",replaceItem:"replaceItem--T0Ek9"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(931)),i=n(932),a=s(n(1512)),o=s(n(1513));function s(e){return e&&e.__esModule?e:{default:e}}t.default={to:r.default,calcEndPoint:i.calcEndPoint,anchorScroll:a.default,observe:o.default},e.exports=t.default},function(e,t,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){var e=/(auto|scroll)/,t=function(e,n){return null===e.parentNode?n:t(e.parentNode,n.concat([e]))},n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},r=function(t){return e.test(function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")}(t))};return function(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var n=t(e.parentNode,[]),i=0;i<n.length;i+=1)if(r(n[i]))return n[i];return document.scrollingElement||document.documentElement}}})?r.apply(t,i):r)||(e.exports=a)},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",container:"container--226W9"}},function(e,t,n){(function(t){var r;e.exports=(r=n(0),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(2)()},function(e,t){e.exports=r},function(e,t,n){"use strict";var r=n(3);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n.n(r),a=n(0),o=n.n(a);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=function(e){var t=e.pageClassName,n=e.pageLinkClassName,r=e.page,a=e.selected,o=e.activeClassName,l=e.activeLinkClassName,c=e.getEventListener,u=e.pageSelectedHandler,d=e.href,h=e.extraAriaContext,f=e.pageLabelBuilder,p=e.ariaLabel||"Page "+r+(h?" "+h:""),m=null;return a&&(m="page",p=e.ariaLabel||"Page "+r+" is your current page",t=void 0!==t?t+" "+o:o,void 0!==n?void 0!==l&&(n=n+" "+l):n=l),i.a.createElement("li",{className:t},i.a.createElement("a",s({role:"button",className:n,href:d,tabIndex:"0","aria-label":p,"aria-current":m,onKeyPress:u},c(u)),f(r)))};l.propTypes={pageSelectedHandler:o.a.func.isRequired,selected:o.a.bool.isRequired,pageClassName:o.a.string,pageLinkClassName:o.a.string,activeClassName:o.a.string,activeLinkClassName:o.a.string,extraAriaContext:o.a.string,href:o.a.string,ariaLabel:o.a.string,page:o.a.number.isRequired,getEventListener:o.a.func.isRequired,pageLabelBuilder:o.a.func.isRequired};var c=l;function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d=function(e){var t=e.breakLabel,n=e.breakClassName,r=e.breakLinkClassName,a=e.breakHandler,o=e.getEventListener,s=n||"break";return i.a.createElement("li",{className:s},i.a.createElement("a",u({className:r,role:"button",tabIndex:"0",onKeyPress:a},o(a)),t))};d.propTypes={breakLabel:o.a.oneOfType([o.a.string,o.a.node]),breakClassName:o.a.string,breakLinkClassName:o.a.string,breakHandler:o.a.func.isRequired,getEventListener:o.a.func.isRequired};var h=d;function f(e){return(f="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)}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(a,e);var t,n,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}(a);function a(e){var t,n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),A(b(t=r.call(this,e)),"handlePreviousPage",(function(e){var n=t.state.selected;e.preventDefault?e.preventDefault():e.returnValue=!1,n>0&&t.handlePageSelected(n-1,e)})),A(b(t),"handleNextPage",(function(e){var n=t.state.selected,r=t.props.pageCount;e.preventDefault?e.preventDefault():e.returnValue=!1,n<r-1&&t.handlePageSelected(n+1,e)})),A(b(t),"handlePageSelected",(function(e,n){n.preventDefault?n.preventDefault():n.returnValue=!1,t.state.selected!==e?(t.setState({selected:e}),t.callCallback(e)):t.callActiveCallback(e)})),A(b(t),"getEventListener",(function(e){return A({},t.props.eventListener,e)})),A(b(t),"handleBreakClick",(function(e,n){n.preventDefault?n.preventDefault():n.returnValue=!1;var r=t.state.selected;t.handlePageSelected(r<e?t.getForwardJump():t.getBackwardJump(),n)})),A(b(t),"callCallback",(function(e){void 0!==t.props.onPageChange&&"function"==typeof t.props.onPageChange&&t.props.onPageChange({selected:e})})),A(b(t),"callActiveCallback",(function(e){void 0!==t.props.onPageActive&&"function"==typeof t.props.onPageActive&&t.props.onPageActive({selected:e})})),A(b(t),"pagination",(function(){var e=[],n=t.props,r=n.pageRangeDisplayed,a=n.pageCount,o=n.marginPagesDisplayed,s=n.breakLabel,l=n.breakClassName,c=n.breakLinkClassName,u=t.state.selected;if(a<=r)for(var d=0;d<a;d++)e.push(t.getPageElement(d));else{var f,p,m,g=r/2,v=r-g;u>a-r/2?g=r-(v=a-u):u<r/2&&(v=r-(g=u));var b=function(e){return t.getPageElement(e)};for(f=0;f<a;f++)(p=f+1)<=o||p>a-o||f>=u-g&&f<=u+v?e.push(b(f)):s&&e[e.length-1]!==m&&(m=i.a.createElement(h,{key:f,breakLabel:s,breakClassName:l,breakLinkClassName:c,breakHandler:t.handleBreakClick.bind(null,f),getEventListener:t.getEventListener}),e.push(m))}return e})),n=e.initialPage?e.initialPage:e.forcePage?e.forcePage:0,t.state={selected:n},t}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.initialPage,n=e.disableInitialCallback,r=e.extraAriaContext;void 0===t||n||this.callCallback(t),r&&console.warn("DEPRECATED (react-paginate): The extraAriaContext prop is deprecated. You should now use the ariaLabelBuilder instead.")}},{key:"componentDidUpdate",value:function(e){void 0!==this.props.forcePage&&this.props.forcePage!==e.forcePage&&this.setState({selected:this.props.forcePage})}},{key:"getForwardJump",value:function(){var e=this.state.selected,t=this.props,n=t.pageCount,r=e+t.pageRangeDisplayed;return r>=n?n-1:r}},{key:"getBackwardJump",value:function(){var e=this.state.selected-this.props.pageRangeDisplayed;return e<0?0:e}},{key:"hrefBuilder",value:function(e){var t=this.props,n=t.hrefBuilder,r=t.pageCount;if(n&&e!==this.state.selected&&e>=0&&e<r)return n(e+1)}},{key:"ariaLabelBuilder",value:function(e){var t=e===this.state.selected;if(this.props.ariaLabelBuilder&&e>=0&&e<this.props.pageCount){var n=this.props.ariaLabelBuilder(e+1,t);return this.props.extraAriaContext&&!t&&(n=n+" "+this.props.extraAriaContext),n}}},{key:"getPageElement",value:function(e){var t=this.state.selected,n=this.props,r=n.pageClassName,a=n.pageLinkClassName,o=n.activeClassName,s=n.activeLinkClassName,l=n.extraAriaContext,u=n.pageLabelBuilder;return i.a.createElement(c,{key:e,pageSelectedHandler:this.handlePageSelected.bind(null,e),selected:t===e,pageClassName:r,pageLinkClassName:a,activeClassName:o,activeLinkClassName:s,extraAriaContext:l,href:this.hrefBuilder(e),ariaLabel:this.ariaLabelBuilder(e),page:e+1,pageLabelBuilder:u,getEventListener:this.getEventListener})}},{key:"render",value:function(){var e=this.props,t=e.disabledClassName,n=e.pageCount,r=e.containerClassName,a=e.previousLabel,o=e.previousClassName,s=e.previousLinkClassName,l=e.previousAriaLabel,c=e.prevRel,u=e.nextLabel,d=e.nextClassName,h=e.nextLinkClassName,f=e.nextAriaLabel,m=e.nextRel,g=this.state.selected,v=o+(0===g?" ".concat(t):""),b=d+(g===n-1?" ".concat(t):""),y=0===g?"true":"false",A=g===n-1?"true":"false";return i.a.createElement("ul",{className:r},i.a.createElement("li",{className:v},i.a.createElement("a",p({className:s,href:this.hrefBuilder(g-1),tabIndex:"0",role:"button",onKeyPress:this.handlePreviousPage,"aria-disabled":y,"aria-label":l,rel:c},this.getEventListener(this.handlePreviousPage)),a)),this.pagination(),i.a.createElement("li",{className:b},i.a.createElement("a",p({className:h,href:this.hrefBuilder(g+1),tabIndex:"0",role:"button",onKeyPress:this.handleNextPage,"aria-disabled":A,"aria-label":f,rel:m},this.getEventListener(this.handleNextPage)),u)))}}])&&m(t.prototype,n),a}(r.Component);A(_,"propTypes",{pageCount:o.a.number.isRequired,pageRangeDisplayed:o.a.number.isRequired,marginPagesDisplayed:o.a.number.isRequired,previousLabel:o.a.node,previousAriaLabel:o.a.string,prevRel:o.a.string,nextLabel:o.a.node,nextAriaLabel:o.a.string,nextRel:o.a.string,breakLabel:o.a.oneOfType([o.a.string,o.a.node]),hrefBuilder:o.a.func,onPageChange:o.a.func,onPageActive:o.a.func,initialPage:o.a.number,forcePage:o.a.number,disableInitialCallback:o.a.bool,containerClassName:o.a.string,pageClassName:o.a.string,pageLinkClassName:o.a.string,pageLabelBuilder:o.a.func,activeClassName:o.a.string,activeLinkClassName:o.a.string,previousClassName:o.a.string,nextClassName:o.a.string,previousLinkClassName:o.a.string,nextLinkClassName:o.a.string,disabledClassName:o.a.string,breakClassName:o.a.string,breakLinkClassName:o.a.string,extraAriaContext:o.a.string,ariaLabelBuilder:o.a.func,eventListener:o.a.string}),A(_,"defaultProps",{pageCount:10,pageRangeDisplayed:2,marginPagesDisplayed:3,activeClassName:"selected",previousLabel:"Previous",previousClassName:"previous",previousAriaLabel:"Previous page",prevRel:"prev",nextLabel:"Next",nextClassName:"next",nextAriaLabel:"Next page",nextRel:"next",breakLabel:"...",disabledClassName:"disabled",disableInitialCallback:!1,pageLabelBuilder:function(e){return e},eventListener:"onClick"}),t.default=_}]))}).call(this,n(68))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",videoDescriptionLayer:"videoDescriptionLayer--sDQQD"}},function(e,t,n){"use strict";t.a=function(){return!1}},function(e){e.exports=JSON.parse('{"ar":{"latex":"LaTeX","cancel":"إلغاء","accept":"إدراج","manual":"الدليل","insert_math":"إدراج صيغة رياضية - MathType","insert_chem":"إدراج صيغة كيميائية - ChemType","minimize":"تصغير","maximize":"تكبير","fullscreen":"ملء الشاشة","exit_fullscreen":"الخروج من ملء الشاشة","close":"إغلاق","mathtype":"MathType","title_modalwindow":"نافذة MathType مشروطة","close_modal_warning":"هل تريد المغادرة بالتأكيد؟ ستُفقد التغييرات التي أجريتها.","latex_name_label":"صيغة Latex","browser_no_compatible":"المستعرض غير متوافق مع تقنية AJAX. الرجاء استخدام أحدث إصدار من Mozilla Firefox.","error_convert_accessibility":"حدث خطأ أثناء التحويل من MathML إلى نص قابل للاستخدام.","exception_cross_site":"البرمجة النصية للمواقع المشتركة مسموح بها لـ HTTP فقط.","exception_high_surrogate":"المركّب المرتفع غير متبوع بمركّب منخفض في fixedCharCodeAt()‎","exception_string_length":"سلسلة غير صالحة. يجب أن يكون الطول من مضاعفات العدد 4","exception_key_nonobject":"Object.keys مستدعاة على غير كائن","exception_null_or_undefined":" هذا فارغ أو غير محدد","exception_not_function":" ليست دالة","exception_invalid_date_format":"تنسيق تاريخ غير صالح: ","exception_casting":"لا يمكن الصياغة ","exception_casting_to":" إلى "},"ca":{"latex":"LaTeX","cancel":"Cancel·lar","accept":"Inserir","manual":"Manual","insert_math":"Inserir fórmula matemàtica - MathType","insert_chem":"Inserir fórmula química - ChemType","minimize":"Minimitza","maximize":"Maximitza","fullscreen":"Pantalla completa","exit_fullscreen":"Sortir de la pantalla complera","close":"Tanca","mathtype":"MathType","title_modalwindow":" Finestra modal de MathType","close_modal_warning":"N\'estàs segur que vols sortir? Es perdran els canvis que has fet.","latex_name_label":"Fórmula en Latex","browser_no_compatible":"El teu navegador no és compatible amb AJAX. Si us plau, usa la darrera versió de Mozilla Firefox.","error_convert_accessibility":"Error en convertir de MathML a text accessible.","exception_cross_site":"Els scripts de llocs creuats només estan permesos per HTTP.","exception_high_surrogate":"Subrogat alt no seguit de subrogat baix a fixedCharCodeAt()","exception_string_length":"Cadena invàlida. La longitud ha de ser un múltiple de 4","exception_key_nonobject":"Object.keys anomenat a non-object","exception_null_or_undefined":" això és null o no definit","exception_not_function":" no és una funció","exception_invalid_date_format":"Format de data invàlid : ","exception_casting":"No es pot emetre ","exception_casting_to":" a "},"cs":{"latex":"LaTeX","cancel":"Storno","accept":"Vložit","manual":"Příručka","insert_math":"Vložit matematický vzorec - MathType","insert_chem":"Vložení chemického vzorce – ChemType","minimize":"Minimalizovat","maximize":"Maximalizovat","fullscreen":"Celá obrazovka","exit_fullscreen":"Opustit režim celé obrazovky","close":"Zavřít","mathtype":"MathType","title_modalwindow":"Modální okno MathType","close_modal_warning":"Opravdu chcete okno zavřít? Provedené změny budou ztraceny.","latex_name_label":"Vzorec v LaTeXu","browser_no_compatible":"Váš prohlížeč nepodporuje technologii AJAX. Použijte nejnovější verzi prohlížeče Mozilla Firefox.","error_convert_accessibility":"Při převodu kódu MathML na čitelný text došlo k chybě.","exception_cross_site":"Skriptování mezi více servery je povoleno jen v HTTP.","exception_high_surrogate":"Ve funkci fixedCharCodeAt() nenásleduje po první části kódu znaku druhá část","exception_string_length":"Neplatný řetězec. Délka musí být násobkem 4.","exception_key_nonobject":"Funkce Object.keys byla použita pro prvek, který není objektem","exception_null_or_undefined":" hodnota je null nebo není definovaná","exception_not_function":" není funkce","exception_invalid_date_format":"Neplatný formát data: ","exception_casting":"Nelze přetypovat ","exception_casting_to":" na "},"da":{"latex":"LaTeX","cancel":"Annuller","accept":"Indsæt","manual":"Brugervejledning","insert_math":"Indsæt matematisk formel - MathType","insert_chem":"Indsæt en kemisk formel - ChemType","minimize":"Minimer","maximize":"Maksimer","fullscreen":"Fuld skærm","exit_fullscreen":"Afslut Fuld skærm","close":"Luk","mathtype":"MathType","title_modalwindow":"MathType-modalvindue","close_modal_warning":"Er du sikker på, du vil lukke? Dine ændringer går tabt.","latex_name_label":"LaTex-formel","browser_no_compatible":"Din browser er ikke kompatibel med AJAX-teknologi. Brug den nyeste version af Mozilla Firefox.","error_convert_accessibility":"Fejl under konvertering fra MathML til tilgængelig tekst.","exception_cross_site":"Scripts på tværs af websteder er kun tilladt for HTTP.","exception_high_surrogate":"Et højt erstatningstegn er ikke fulgt af et lavt erstatningstegn i fixedCharCodeAt()","exception_string_length":"Ugyldig streng. Længden skal være et multiplum af 4","exception_key_nonobject":"Object.keys kaldet ved ikke-objekt","exception_null_or_undefined":" dette er nul eller ikke defineret","exception_not_function":" er ikke en funktion","exception_invalid_date_format":"Ugyldigt datoformat: ","exception_casting":"Kan ikke beregne ","exception_casting_to":" til "},"de":{"latex":"LaTeX","cancel":"Abbrechen","accept":"Einfügen","manual":"Handbuch","insert_math":"Mathematische Formel einfügen - MathType","insert_chem":"Eine chemische Formel einfügen – ChemType","minimize":"Verkleinern","maximize":"Vergrößern","fullscreen":"Vollbild","exit_fullscreen":"Vollbild schließen","close":"Schließen","mathtype":"MathType","title_modalwindow":"Modales MathType-Fenster","close_modal_warning":"Bist du sicher, dass du das Programm verlassen willst? Alle vorgenommenen Änderungen gehen damit verloren.","latex_name_label":"Latex-Formel","browser_no_compatible":"Dein Browser ist nicht mit der AJAX-Technologie kompatibel. Verwende bitte die neueste Version von Mozilla Firefox.","error_convert_accessibility":"Fehler beim Konvertieren von MathML in barrierefreien Text.","exception_cross_site":"Cross-Site-Scripting ist nur bei HTTP zulässig.","exception_high_surrogate":"Hoher Ersatz bei bei festerZeichenkodierungbei() nicht von niedrigem Ersatz befolgt.","exception_string_length":"Ungültige Zeichenfolge. Länge muss ein Vielfaches von 4 sein.","exception_key_nonobject":"Object.keys wurde für ein Nicht-Objekt aufgerufen.","exception_null_or_undefined":" Das ist Null oder nicht definiert.","exception_not_function":" ist keine Funktion","exception_invalid_date_format":"Ungültiges Datumsformat: ","exception_casting":"Umwandlung nicht möglich ","exception_casting_to":" zu "},"el":{"latex":"LaTeX","cancel":"Άκυρο","accept":"Εισαγωγή","manual":"Χειροκίνητα","insert_math":"Εισαγωγή μαθηματικού τύπου - MathType","insert_chem":"Εισαγωγή χημικού τύπου - ChemType","minimize":"Ελαχιστοποίηση","maximize":"Μεγιστοποίηση","fullscreen":"Πλήρης οθόνη","exit_fullscreen":"Έξοδος από πλήρη οθόνη","close":"Κλείσιμο","mathtype":"MathType","title_modalwindow":"Τροπικό παράθυρο MathType","close_modal_warning":"Επιθυμείτε σίγουρα αποχώρηση; Θα χαθούν οι αλλαγές που έχετε κάνει.","latex_name_label":"Τύπος LaTeX","browser_no_compatible":"Το πρόγραμμα περιήγησής σας δεν είναι συμβατό με την τεχνολογία AJAX. Χρησιμοποιήστε την πιο πρόσφατη έκδοση του Mozilla Firefox.","error_convert_accessibility":"Σφάλμα κατά τη μετατροπή από MathML σε προσβάσιμο κείμενο.","exception_cross_site":"Το XSS (Cross site scripting) επιτρέπεται μόνο για HTTP.","exception_high_surrogate":"Το υψηλό υποκατάστατο δεν ακολουθείται από χαμηλό υποκατάστατο στο fixedCharCodeAt()","exception_string_length":"Μη έγκυρη συμβολοσειρά. Το μήκος πρέπει να είναι πολλαπλάσιο του 4","exception_key_nonobject":"Έγινε κλήση του Object.keys σε μη αντικείμενο","exception_null_or_undefined":" αυτό είναι μηδενικό ή δεν έχει οριστεί","exception_not_function":" δεν είναι συνάρτηση","exception_invalid_date_format":"Μη έγκυρη μορφή ημερομηνίας: ","exception_casting":"Δεν είναι δυνατή η μετατροπή ","exception_casting_to":" σε "},"en":{"latex":"LaTeX","cancel":"Cancel","accept":"Insert","manual":"Manual","insert_math":"Insert a math equation - MathType","insert_chem":"Insert a chemistry formula - ChemType","minimize":"Minimize","maximize":"Maximize","fullscreen":"Full-screen","exit_fullscreen":"Exit full-screen","close":"Close","mathtype":"MathType","title_modalwindow":"MathType modal window","close_modal_warning":"Are you sure you want to leave? The changes you made will be lost.","latex_name_label":"Latex Formula","browser_no_compatible":"Your browser is not compatible with AJAX technology. Please, use the latest version of Mozilla Firefox.","error_convert_accessibility":"Error converting from MathML to accessible text.","exception_cross_site":"Cross site scripting is only allowed for HTTP.","exception_high_surrogate":"High surrogate not followed by low surrogate in fixedCharCodeAt()","exception_string_length":"Invalid string. Length must be a multiple of 4","exception_key_nonobject":"Object.keys called on non-object","exception_null_or_undefined":" this is null or not defined","exception_not_function":" is not a function","exception_invalid_date_format":"Invalid date format : ","exception_casting":"Cannot cast ","exception_casting_to":" to "},"es":{"latex":"LaTeX","cancel":"Cancelar","accept":"Insertar","manual":"Manual","insert_math":"Insertar fórmula matemática - MathType","insert_chem":"Insertar fórmula química - ChemType","minimize":"Minimizar","maximize":"Maximizar","fullscreen":"Pantalla completa","exit_fullscreen":"Salir de pantalla completa","close":"Cerrar","mathtype":"MathType","title_modalwindow":"Ventana modal de MathType","close_modal_warning":"Seguro que quieres cerrar? Los cambios que has hecho se perderán","latex_name_label":"Formula en Latex","browser_no_compatible":"Tu navegador no es complatible con AJAX. Por favor, usa la última version de Mozilla Firefox.","error_convert_accessibility":"Error conviertiendo una fórmula MathML a texto accesible.","exception_cross_site":"Cross site scripting solo está permitido para HTTP.","exception_high_surrogate":"Subrogado alto no seguido por subrogado bajo en fixedCharCodeAt()","exception_string_length":"Cadena no válida. La longitud debe ser múltiplo de 4","exception_key_nonobject":"Object.keys called on non-object","exception_null_or_undefined":" esto es null o no definido","exception_not_function":" no es una función","exception_invalid_date_format":"Formato de fecha inválido: ","exception_casting":"No se puede emitir","exception_casting_to":" a "},"et":{"latex":"LaTeX","cancel":"Loobu","accept":"Lisa","manual":"Käsiraamat","insert_math":"Lisa matemaatiline valem – WIRIS","insert_chem":"Lisa keemiline valem – ChemType","minimize":"Minimeeri","maximize":"Maksimeeri","fullscreen":"Täiskuva","exit_fullscreen":"Välju täiskuvalt","close":"Sule","mathtype":"MathType","title_modalwindow":"MathType\'i modaalaken","close_modal_warning":"Kas soovite kindlasti lahkuda? Tehtud muudatused lähevad kaduma.","latex_name_label":"Latexi valem","browser_no_compatible":"Teie brauser ei ühildu AJAXi tehnoloogiaga. Palun kasutage Mozilla Firefoxi uusimat versiooni.","error_convert_accessibility":"Tõrge teisendamisel MathML-ist muudetavaks tekstiks.","exception_cross_site":"Ristskriptimine on lubatud ainult HTTP kasutamisel.","exception_high_surrogate":"Funktsioonis fixedCharCodeAt() ei järgne kõrgemale asendusliikmele madalam asendusliige.","exception_string_length":"Vigane string. Pikkus peab olema 4 kordne.","exception_key_nonobject":"Protseduur Object.keys kutsuti mitteobjekti korral.","exception_null_or_undefined":" see on null või määramata","exception_not_function":" ei ole funktsioon","exception_invalid_date_format":"Sobimatu kuupäeva kuju: ","exception_casting":"Esitamine ei õnnestu ","exception_casting_to":" – "},"eu":{"latex":"LaTeX","cancel":"Ezeztatu","accept":"Txertatu","manual":"Gida","insert_math":"Txertatu matematikako formula - MathType","insert_chem":"Txertatu formula kimiko bat - ChemType","minimize":"Ikonotu","maximize":"Maximizatu","fullscreen":"Pantaila osoa","exit_fullscreen":"Irten pantaila osotik","close":"Itxi","mathtype":"MathType","title_modalwindow":"MathType leiho modala","close_modal_warning":"Ziur irten nahi duzula? Egiten dituzun aldaketak galdu egingo dira.","latex_name_label":"LaTex Formula","browser_no_compatible":"Zure arakatzailea ez da bateragarria AJAX teknologiarekin. Erabili Mozilla Firefoxen azken bertsioa.","error_convert_accessibility":"Errorea MathMLtik testu irisgarrira bihurtzean.","exception_cross_site":"Gune arteko scriptak HTTPrako soilik onartzen dira.","exception_high_surrogate":"Ordezko baxuak ez dio ordezko altuari jarraitzen, hemen: fixedCharCodeAt()","exception_string_length":"Kate baliogabea. Luzerak 4ren multiploa izan behar du","exception_key_nonobject":"Object.keys deitu zaio objektua ez den zerbaiti","exception_null_or_undefined":" nulua edo definitu gabea da","exception_not_function":" ez da funtzio bat","exception_invalid_date_format":"Data-formatu baliogabea : ","exception_casting":"Ezin da igorri ","exception_casting_to":" honi "},"fi":{"latex":"LaTeX","cancel":"Peruuta","accept":"Lisää","manual":"Manual","insert_math":"Liitä matemaattinen kaava - MathType","insert_chem":"Lisää kemian kaava - ChemType","minimize":"Pienennä","maximize":"Suurenna","fullscreen":"Koko ruutu","exit_fullscreen":"Poistu koko ruudun tilasta","close":"Sulje","mathtype":"MathType","title_modalwindow":"MathTypen modaalinen ikkuna","close_modal_warning":"Oletko varma, että haluat poistua? Menetät tekemäsi muutokset.","latex_name_label":"Latex-kaava","browser_no_compatible":"Selaimesi ei tue AJAX-tekniikkaa. Ole hyvä ja käytä uusinta Firefox-versiota.","error_convert_accessibility":"Virhe muunnettaessa MathML:stä tekstiksi.","exception_cross_site":"Cross site scripting sallitaan vain HTTP:llä.","exception_high_surrogate":"fixedCharCodeAt(): yläsijaismerkkiä ei seurannut alasijaismerkki","exception_string_length":"Epäkelpo merkkijono. Pituuden on oltava 4:n kerrannainen","exception_key_nonobject":"Object.keys kutsui muuta kuin oliota","exception_null_or_undefined":" tämä on null tai ei määritelty","exception_not_function":" ei ole funktio","exception_invalid_date_format":"Virheellinen päivämäärämuoto : ","exception_casting":"Ei voida muuntaa tyyppiä ","exception_casting_to":" tyyppiin "},"fr":{"latex":"LaTeX","cancel":"Annuler","accept":"Insérer","manual":"Manuel","insert_math":"Insérer une formule mathématique - MathType","insert_chem":"Insérer une formule chimique - ChemType","minimize":"Minimiser","maximize":"Maximiser","fullscreen":"Plein écran","exit_fullscreen":"Quitter le plein écran","close":"Fermer","mathtype":"MathType","title_modalwindow":"Fenêtre modale MathType","close_modal_warning":"Confirmez-vous vouloir fermer ? Les changements effectués seront perdus.","latex_name_label":"Formule LaTeX","browser_no_compatible":"Votre navigateur n’est pas compatible avec la technologie AJAX. Veuillez utiliser la dernière version de Mozilla Firefox.","error_convert_accessibility":"Une erreur de conversion du format MathML en texte accessible est survenue.","exception_cross_site":"Le cross-site scripting n’est autorisé que pour HTTP.","exception_high_surrogate":"Substitut élevé non suivi d’un substitut inférieur dans fixedCharCodeAt()","exception_string_length":"Chaîne non valide. Longueur limitée aux multiples de 4","exception_key_nonobject":"Object.keys appelé sur un non-objet","exception_null_or_undefined":" nul ou non défini","exception_not_function":" n’est pas une fonction","exception_invalid_date_format":"Format de date non valide : ","exception_casting":"Impossible de convertir ","exception_casting_to":" sur "},"gl":{"latex":"LaTeX","cancel":"Cancelar","accept":"Inserir","manual":"Manual","insert_math":"Inserir unha fórmula matemática - MathType","insert_chem":"Inserir unha fórmula química - ChemType","minimize":"Minimizar","maximize":"Maximizar","fullscreen":"Pantalla completa","exit_fullscreen":"Saír da pantalla completa","close":"Pechar","mathtype":"MathType","title_modalwindow":"Ventá modal de MathType","close_modal_warning":"Seguro que quere saír? Perderanse os cambios realizados.","latex_name_label":"Fórmula Latex","browser_no_compatible":"O seu explorador non é compatible coa tecnoloxía AJAX. Use a versión máis recente de Mozilla Firefox.","error_convert_accessibility":"Erro ao converter de MathML a texto accesible.","exception_cross_site":"Os scripts de sitios só se permiten para HTTP.","exception_high_surrogate":"Suplente superior non seguido por suplente inferior en fixedCharCodeAt()","exception_string_length":"Cadea non válida. A lonxitude debe ser un múltiplo de 4","exception_key_nonobject":"Claves de obxecto chamadas en non obxecto","exception_null_or_undefined":" nulo ou non definido","exception_not_function":" non é unha función","exception_invalid_date_format":"Formato de data non válido: ","exception_casting":"Non se pode converter ","exception_casting_to":" a "},"he":{"latex":"LaTeX","cancel":"ביטול","accept":"עדכון","manual":"ידני","insert_math":"הוספת נוסחה מתמטית - MathType","insert_chem":"הוספת כתיבה כימית - ChemType","minimize":"מזערי","maximize":"מרבי","fullscreen":"מסך מלא","exit_fullscreen":"יציאה ממצב מסך מלא","close":"סגירה","mathtype":"MathType","title_modalwindow":"חלון מודאלי של MathType","close_modal_warning":"האם לצאת? שינויים אשר בוצעו ימחקו.","latex_name_label":"נוסחת Latex","browser_no_compatible":"הדפדפן שלך אינו תואם לטכנולוגיית AJAX. יש להשתמש בגרסה העדכנית ביותר של Mozilla Firefox.","error_convert_accessibility":"שגיאה בהמרה מ-MathML לטקסט נגיש.","exception_cross_site":"סקריפטינג חוצה-אתרים מורשה עבור HTTP בלבד.","exception_high_surrogate":"ערך ממלא מקום גבוה אינו מופיע אחרי ערך ממלא מקום נמוך ב-fixedCharCodeAt()‎","exception_string_length":"מחרוזת לא חוקית. האורך חייב להיות כפולה של 4","exception_key_nonobject":"בוצעה קריאה אל Object.keys ברכיב שאינו אובייקט","exception_null_or_undefined":" הוא Null או לא מוגדר","exception_not_function":"איננה פונקציה","exception_invalid_date_format":"תסדיר תאריך אינו תקין : ","exception_casting":"לא ניתן להמיר ","exception_casting_to":" ל "},"hr":{"latex":"LaTeX","cancel":"Poništi","accept":"Umetni","manual":"Priručnik","insert_math":"Umetnite matematičku formulu - MathType","insert_chem":"Umetnite kemijsku formulu - ChemType","minimize":"Minimiziraj","maximize":"Maksimiziraj","fullscreen":"Cijeli zaslon","exit_fullscreen":"Izlaz iz prikaza na cijelom zaslonu","close":"Zatvori","mathtype":"MathType","title_modalwindow":"MathType modalni prozor","close_modal_warning":"Sigurno želite zatvoriti? Izgubit će se unesene promjene.","latex_name_label":"Latex formula","browser_no_compatible":"Vaš preglednik nije kompatibilan s AJAX tehnologijom. Upotrijebite najnoviju verziju Mozilla Firefoxa.","error_convert_accessibility":"Pogreška konverzije iz MathML-a u dostupni tekst.","exception_cross_site":"Skriptiranje na različitim web-mjestima dopušteno je samo za HTTP.","exception_high_surrogate":"Iza visoke zamjene ne slijedi niska zamjena u fixedCharCodeAt()","exception_string_length":"Nevažeći niz. Duljina mora biti višekratnik broja 4","exception_key_nonobject":"Object.keys pozvano na ne-objekt","exception_null_or_undefined":" ovo je nula ili nije definirano","exception_not_function":" nije funkcija","exception_invalid_date_format":"Nevažeći format datuma : ","exception_casting":"Ne može se poslati ","exception_casting_to":" na "},"hu":{"latex":"LaTeX","cancel":"Mégsem","accept":"Beszúrás","manual":"Kézikönyv","insert_math":"Matematikai képlet beszúrása - MathType","insert_chem":"Kémiai képet beillesztése - ChemType","minimize":"Kis méret","maximize":"Nagy méret","fullscreen":"Teljes képernyő","exit_fullscreen":"Teljes képernyő elhagyása","close":"Bezárás","mathtype":"MathType","title_modalwindow":"MathType modális ablak","close_modal_warning":"Biztosan kilép? A módosítások el fognak veszni.","latex_name_label":"Latex képlet","browser_no_compatible":"A böngészője nem kompatibilis az AJAX technológiával. Használja a Mozilla Firefox legújabb verzióját.","error_convert_accessibility":"Hiba lépett fel a MathML szöveggé történő konvertálása során.","exception_cross_site":"Az oldalak közti scriptelés csak HTTP esetén engedélyezett.","exception_high_surrogate":"A magas helyettesítő karaktert nem alacsony helyettesítő karakter követi a fixedCharCodeAt() esetében","exception_string_length":"Érvénytelen karakterlánc. A hossznak a 4 többszörösének kell lennie","exception_key_nonobject":"Az Object.keys egy nem objektumra került meghívásra","exception_null_or_undefined":" null vagy nem definiált","exception_not_function":" nem függvény","exception_invalid_date_format":"Érvénytelen dátumformátum: ","exception_casting":"Nem alkalmazható ","exception_casting_to":" erre "},"id":{"latex":"LaTeX","cancel":"Membatalkan","accept":"Masukkan","manual":"Manual","insert_math":"Masukkan rumus matematika - MathType","insert_chem":"Masukkan rumus kimia - ChemType","minimize":"Minikan","maximize":"Perbesar","fullscreen":"Layar penuh","exit_fullscreen":"Keluar layar penuh","close":"Tutup","mathtype":"MathType","title_modalwindow":"Jendela modal MathType","close_modal_warning":"Anda yakin ingin keluar? Anda akan kehilangan perubahan yang Anda buat.","latex_name_label":"Rumus Latex","browser_no_compatible":"Penjelajah Anda tidak kompatibel dengan teknologi AJAX. Harap gunakan Mozilla Firefox versi terbaru.","error_convert_accessibility":"Kesalahan konversi dari MathML menjadi teks yang dapat diakses.","exception_cross_site":"Skrip lintas situs hanya diizinkan untuk HTTP.","exception_high_surrogate":"Pengganti tinggi tidak diikuti oleh pengganti rendah di fixedCharCodeAt()","exception_string_length":"String tidak valid. Panjang harus kelipatan 4","exception_key_nonobject":"Object.keys meminta nonobjek","exception_null_or_undefined":" ini tidak berlaku atau tidak didefinisikan","exception_not_function":" bukan sebuah fungsi","exception_invalid_date_format":"Format tanggal tidak valid : ","exception_casting":"Tidak dapat mentransmisikan ","exception_casting_to":" untuk "},"it":{"latex":"LaTeX","cancel":"Annulla","accept":"Inserisci","manual":"Manuale","insert_math":"Inserisci una formula matematica - MathType","insert_chem":"Inserisci una formula chimica - ChemType","minimize":"Riduci a icona","maximize":"Ingrandisci","fullscreen":"Schermo intero","exit_fullscreen":"Esci da schermo intero","close":"Chiudi","mathtype":"MathType","title_modalwindow":"Finestra modale di MathType","close_modal_warning":"Confermi di voler uscire? Le modifiche effettuate andranno perse.","latex_name_label":"Formula LaTeX","browser_no_compatible":"Il tuo browser non è compatibile con la tecnologia AJAX. Utilizza la versione più recente di Mozilla Firefox.","error_convert_accessibility":"Errore durante la conversione da MathML in testo accessibile.","exception_cross_site":"Lo scripting tra siti è consentito solo per HTTP.","exception_high_surrogate":"Surrogato alto non seguito da surrogato basso in fixedCharCodeAt()","exception_string_length":"Stringa non valida. La lunghezza deve essere un multiplo di 4","exception_key_nonobject":"Metodo Object.keys richiamato in un elemento non oggetto","exception_null_or_undefined":" questo è un valore null o non definito","exception_not_function":" non è una funzione","exception_invalid_date_format":"Formato di data non valido: ","exception_casting":"Impossibile eseguire il cast ","exception_casting_to":" a "},"ja":{"latex":"LaTeX","cancel":"キャンセル","accept":"挿入","manual":"マニュアル","insert_math":"数式を挿入 - MathType","insert_chem":"化学式を挿入 - ChemType","minimize":"最小化","maximize":"最大化","fullscreen":"全画面表示","exit_fullscreen":"全画面表示を解除","close":"閉じる","mathtype":"MathType","title_modalwindow":"MathType モードウィンドウ","close_modal_warning":"このページから移動してもよろしいですか？変更内容は失われます。","latex_name_label":"LaTeX 数式","browser_no_compatible":"お使いのブラウザは、AJAX 技術と互換性がありません。Mozilla Firefox の最新バージョンをご使用ください。","error_convert_accessibility":"MathML からアクセシブルなテキストへの変換中にエラーが発生しました。","exception_cross_site":"クロスサイトスクリプティングは、HTTP のみに許可されています。","exception_high_surrogate":"fixedCharCodeAt（）で上位サロゲートの後に下位サロゲートがありません","exception_string_length":"無効な文字列です。長さは4の倍数である必要があります","exception_key_nonobject":"Object.keys が非オブジェクトで呼び出されました","exception_null_or_undefined":" null であるか、定義されていません","exception_not_function":" は関数ではありません","exception_invalid_date_format":"無効な日付形式: ","exception_casting":"次にキャスト ","exception_casting_to":" できません "},"ko":{"latex":"LaTeX","cancel":"취소","accept":"삽입","manual":"설명서","insert_math":"수학 공식 삽입 - MathType","insert_chem":"화학 공식 입력하기 - ChemType","minimize":"최소화","maximize":"최대화","fullscreen":"전체 화면","exit_fullscreen":"전체 화면 나가기","close":"닫기","mathtype":"MathType","title_modalwindow":"MathType 모달 창","close_modal_warning":"정말로 나가시겠습니까? 변경 사항이 손실됩니다.","latex_name_label":"Latex 공식","browser_no_compatible":"사용자의 브라우저는 AJAX 기술과 호환되지 않습니다. Mozilla Firefox 최신 버전을 사용하십시오.","error_convert_accessibility":"MathML로부터 접근 가능한 텍스트로 오류 변환.","exception_cross_site":"사이트 교차 스크립팅은 HTTP 환경에서만 사용할 수 있습니다.","exception_high_surrogate":"fixedCharCodeAt()에서는 상위 서러게이트 뒤에 하위 서러게이트가 붙지 않습니다","exception_string_length":"유효하지 않은 스트링입니다. 길이는 4의 배수여야 합니다","exception_key_nonobject":"Object.keys가 non-object를 요청하였습니다","exception_null_or_undefined":" Null값이거나 정의되지 않았습니다","exception_not_function":" 함수가 아닙니다","exception_invalid_date_format":"유효하지 않은 날짜 포맷 : ","exception_casting":"캐스팅할 수 없습니다 ","exception_casting_to":" (으)로 "},"nl":{"latex":"LaTeX","cancel":"Annuleren","insert_chem":"Een scheikundige formule invoegen - ChemType","minimize":"Minimaliseer","maximize":"Maximaliseer","fullscreen":"Schermvullend","exit_fullscreen":"Verlaat volledig scherm","close":"Sluit","mathtype":"MathType","title_modalwindow":"Modaal venster MathType","close_modal_warning":"Weet je zeker dat je de app wilt sluiten? De gemaakte wijzigingen gaan verloren.","latex_name_label":"LaTeX-formule","browser_no_compatible":"Je browser is niet compatibel met AJAX-technologie. Gebruik de meest recente versie van Mozilla Firefox.","error_convert_accessibility":"Fout bij conversie van MathML naar toegankelijke tekst.","exception_cross_site":"Cross-site scripting is alleen toegestaan voor HTTP.","exception_high_surrogate":"Hoog surrogaat niet gevolgd door laag surrogaat in fixedCharCodeAt()","exception_string_length":"Ongeldige tekenreeks. Lengte moet een veelvoud van 4 zijn","exception_key_nonobject":"Object.keys opgeroepen voor niet-object","exception_null_or_undefined":" dit is nul of niet gedefinieerd","exception_not_function":" is geen functie","exception_invalid_date_format":"Ongeldige datumnotatie: ","exception_casting":"Kan niet weergeven ","exception_casting_to":" op "},"no":{"latex":"LaTeX","cancel":"Avbryt","accept":"Set inn","manual":"Håndbok","insert_math":"Sett inn matematikkformel - MathType","insert_chem":"Set inn ein kjemisk formel – ChemType","minimize":"Minimer","maximize":"Maksimer","fullscreen":"Fullskjerm","exit_fullscreen":"Avslutt fullskjerm","close":"Lukk","mathtype":"MathType","title_modalwindow":"Modalt MathType-vindu","close_modal_warning":"Er du sikker på at du vil gå ut? Endringane du har gjort, vil gå tapt.","latex_name_label":"LaTeX-formel","browser_no_compatible":"Nettlesaren er ikkje kompatibel med AJAX-teknologien. Bruk den nyaste versjonen av Mozilla Firefox.","error_convert_accessibility":"Feil under konvertering frå MathML til tilgjengeleg tekst.","exception_cross_site":"Skripting på tvers av nettstadar er bere tillaten med HTTP.","exception_high_surrogate":"Høgt surrogat er ikkje etterfølgt av lågt surrogat i fixedCharCodeAt()","exception_string_length":"Ugyldig streng. Lengda må vera deleleg på 4","exception_key_nonobject":"Object.keys kalla på eit ikkje-objekt","exception_null_or_undefined":" dette er null eller ikkje definert","exception_not_function":" er ikkje ein funksjon","exception_invalid_date_format":"Ugyldig datoformat: ","exception_casting":"Kan ikkje bruka casting ","exception_casting_to":" til "},"nb":{"latex":"LaTeX","cancel":"Avbryt","accept":"Insert","manual":"Håndbok","insert_math":"Sett inn matematikkformel - MathType","insert_chem":"Sett inn en kjemisk formel – ChemType","minimize":"Minimer","maximize":"Maksimer","fullscreen":"Fullskjerm","exit_fullscreen":"Avslutt fullskjerm","close":"Lukk","mathtype":"MathType","title_modalwindow":"Modalt MathType-vindu","close_modal_warning":"Er du sikker på at du vil gå ut? Endringene du har gjort, vil gå tapt.","latex_name_label":"LaTeX-formel","browser_no_compatible":"Nettleseren er ikke kompatibel med AJAX-teknologien. Bruk den nyeste versjonen av Mozilla Firefox.","error_convert_accessibility":"Feil under konvertering fra MathML til tilgjengelig tekst.","exception_cross_site":"Skripting på tvers av nettsteder er bare tillatt med HTTP.","exception_high_surrogate":"Høyt surrogat etterfølges ikke av lavt surrogat i fixedCharCodeAt()","exception_string_length":"Ugyldig streng. Lengden må være delelig på 4","exception_key_nonobject":"Object.keys kalte på et ikke-objekt","exception_null_or_undefined":" dette er null eller ikke definert","exception_not_function":" er ikke en funksjon","exception_invalid_date_format":"Ugyldig datoformat: ","exception_casting":"Kan ikke bruke casting ","exception_casting_to":" til "},"nn":{"latex":"LaTeX","cancel":"Avbryt","accept":"Set inn","manual":"Håndbok","insert_math":"Sett inn matematikkformel - MathType","insert_chem":"Set inn ein kjemisk formel – ChemType","minimize":"Minimer","maximize":"Maksimer","fullscreen":"Fullskjerm","exit_fullscreen":"Avslutt fullskjerm","close":"Lukk","mathtype":"MathType","title_modalwindow":"Modalt MathType-vindu","close_modal_warning":"Er du sikker på at du vil gå ut? Endringane du har gjort, vil gå tapt.","latex_name_label":"LaTeX-formel","browser_no_compatible":"Nettlesaren er ikkje kompatibel med AJAX-teknologien. Bruk den nyaste versjonen av Mozilla Firefox.","error_convert_accessibility":"Feil under konvertering frå MathML til tilgjengeleg tekst.","exception_cross_site":"Skripting på tvers av nettstadar er bere tillaten med HTTP.","exception_high_surrogate":"Høgt surrogat er ikkje etterfølgt av lågt surrogat i fixedCharCodeAt()","exception_string_length":"Ugyldig streng. Lengda må vera deleleg på 4","exception_key_nonobject":"Object.keys kalla på eit ikkje-objekt","exception_null_or_undefined":" dette er null eller ikkje definert","exception_not_function":" er ikkje ein funksjon","exception_invalid_date_format":"Ugyldig datoformat: ","exception_casting":"Kan ikkje bruka casting ","exception_casting_to":" til "},"pl":{"latex":"LaTeX","cancel":"Anuluj","accept":"Wstaw","manual":"Instrukcja","insert_math":"Wstaw formułę matematyczną - MathType","insert_chem":"Wstaw wzór chemiczny — ChemType","minimize":"Minimalizuj","maximize":"Maksymalizuj","fullscreen":"Pełny ekran","exit_fullscreen":"Opuść tryb pełnoekranowy","close":"Zamknij","mathtype":"MathType","title_modalwindow":"Okno modalne MathType","close_modal_warning":"Czy na pewno chcesz zamknąć? Wprowadzone zmiany zostaną utracone.","latex_name_label":"Wzór Latex","browser_no_compatible":"Twoja przeglądarka jest niezgodna z technologią AJAX Użyj najnowszej wersji Mozilla Firefox.","error_convert_accessibility":"Błąd podczas konwertowania z formatu MathML na dostępny tekst.","exception_cross_site":"Krzyżowanie skryptów witryny jest dozwolone tylko dla HTTP.","exception_high_surrogate":"Brak niskiego surogatu po wysokim surogacie w fixedCharCodeAt()","exception_string_length":"Niewłaściwy ciąg znaków. Długość musi być wielokrotnością liczby 4.","exception_key_nonobject":"Argumentem wywołanej funkcji Object.key nie jest obiekt.","exception_null_or_undefined":" jest zerowy lub niezdefiniowany","exception_not_function":" nie jest funkcją","exception_invalid_date_format":"Nieprawidłowy format daty: ","exception_casting":"Nie można rzutować ","exception_casting_to":" na "},"pt":{"latex":"LaTeX","cancel":"Cancelar","accept":"Inserir","manual":"Manual","insert_math":"Inserir fórmula matemática - MathType","insert_chem":"Inserir uma fórmula química - ChemType","minimize":"Minimizar","maximize":"Maximizar","fullscreen":"Ecrã completo","exit_fullscreen":"Sair do ecrã completo","close":"Fechar","mathtype":"MathType","title_modalwindow":"Janela modal do MathType","close_modal_warning":"Pretende sair? As alterações efetuadas serão perdidas.","latex_name_label":"Fórmula Latex","browser_no_compatible":"O seu navegador não é compatível com a tecnologia AJAX. Utilize a versão mais recente do Mozilla Firefox.","error_convert_accessibility":"Erro ao converter de MathML para texto acessível.","exception_cross_site":"O processamento de scripts em vários sites só é permitido para HTTP.","exception_high_surrogate":"Substituto alto não seguido por um substituto baixo em fixedCharCodeAt()","exception_string_length":"Cadeia inválida. O comprimento tem de ser um múltiplo de 4","exception_key_nonobject":"Object.keys chamou um não-objeto","exception_null_or_undefined":" é nulo ou não está definido","exception_not_function":" não é uma função","exception_invalid_date_format":"Formato de data inválido: ","exception_casting":"Não é possível adicionar ","exception_casting_to":" até "},"pt_br":{"latex":"LaTeX","cancel":"Cancelar","accept":"Inserir","manual":"Manual","insert_math":"Inserir fórmula matemática - MathType","insert_chem":"Insira uma fórmula química - ChemType","minimize":"Minimizar","maximize":"Maximizar","fullscreen":"Tela cheia","exit_fullscreen":"Sair de tela cheia","close":"Fechar","mathtype":"MathType","title_modalwindow":"Janela modal do MathType","close_modal_warning":"Tem certeza de que deseja sair? Todas as alterações serão perdidas.","latex_name_label":"Fórmula LaTeX","browser_no_compatible":"O navegador não é compatível com a tecnologia AJAX. Use a versão mais recente do Mozilla Firefox.","error_convert_accessibility":"Erro ao converter de MathML para texto acessível.","exception_cross_site":"O uso de scripts entre sites só é permitido para HTTP.","exception_high_surrogate":"High surrogate não seguido de low surrogate em fixedCharCodeAt()","exception_string_length":"String inválida. O comprimento deve ser um múltiplo de 4","exception_key_nonobject":"Object.keys chamados em não objeto","exception_null_or_undefined":" isto é nulo ou não definido","exception_not_function":" não é uma função","exception_invalid_date_format":"Formato de data inválido: ","exception_casting":"Não é possível transmitir ","exception_casting_to":" para "},"ro":{"latex":"LaTeX","cancel":"Anulare","accept":"Inserați","manual":"Ghid","insert_math":"Inserați o formulă matematică - MathType","insert_chem":"Inserați o formulă chimică - ChemType","minimize":"Minimizați","maximize":"Maximizați","fullscreen":"Afișați pe tot ecranul","exit_fullscreen":"Opriți afișarea pe tot ecranul","close":"Închideți","mathtype":"MathType","title_modalwindow":"Fereastră modală MathType","close_modal_warning":"Sigur doriți să ieșiți? Modificările realizate se vor pierde.","latex_name_label":"Formulă Latex","browser_no_compatible":"Browserul dvs. nu este compatibil cu tehnologia AJAX. Utilizați cea mai recentă versiune de Mozilla Firefox.","error_convert_accessibility":"Eroare la convertirea din MathML în text accesibil.","exception_cross_site":"Scriptarea între site‑uri este permisă doar pentru HTTP.","exception_high_surrogate":"Surogatul superior nu este urmat de un surogat inferior în fixedCharCodeAt()","exception_string_length":"Șir nevalid. Lungimea trebuie să fie multiplu de 4","exception_key_nonobject":"Object.keys a apelat un non-obiect","exception_null_or_undefined":" este null sau nu este definit","exception_not_function":" nu este funcție","exception_invalid_date_format":"Format de dată nevalid: ","exception_casting":"nu se poate difuza ","exception_casting_to":" către "},"ru":{"latex":"LaTeX","cancel":"отмена","accept":"Вставка","manual":"вручную","insert_math":"Вставить математическую формулу: WIRIS","insert_chem":"Вставить химическую формулу — ChemType","minimize":"Свернуть","maximize":"Развернуть","fullscreen":"На весь экран","exit_fullscreen":"Выйти из полноэкранного режима","close":"Закрыть","mathtype":"MathType","title_modalwindow":"Режимное окно MathType","close_modal_warning":"Вы уверены, что хотите выйти? Все внесенные изменения будут утрачены.","latex_name_label":"Формула Latex","browser_no_compatible":"Ваш браузер несовместим с технологией AJAX. Используйте последнюю версию Mozilla Firefox.","error_convert_accessibility":"При преобразовании формулы в текст допустимого формата произошла ошибка.","exception_cross_site":"Межсайтовые сценарии доступны только для HTTP.","exception_high_surrogate":"Младший символ-заместитель не сопровождает старший символ-заместитель в исправленном методе CharCodeAt()","exception_string_length":"Недопустимая строка. Длинна должна быть кратной 4.","exception_key_nonobject":"Метод Object.keys вызван не для объекта","exception_null_or_undefined":" значение пустое или не определено","exception_not_function":" не функция","exception_invalid_date_format":"Недопустимый формат даты: ","exception_casting":"Не удается привести ","exception_casting_to":" к "},"sv":{"latex":"LaTeX","cancel":"Avbryt","accept":"Infoga","manual":"Bruksanvisning","insert_math":"Infoga matematisk formel - MathType","insert_chem":"Infoga en kemiformel – ChemType","minimize":"Minimera","maximize":"Maximera","fullscreen":"Helskärm","exit_fullscreen":"Stäng helskärm","close":"Stäng","mathtype":"MathType","title_modalwindow":"MathType modulfönster","close_modal_warning":"Vill du avsluta? Inga ändringar kommer att sparas.","latex_name_label":"Latex-formel","browser_no_compatible":"Din webbläsare är inte kompatibel med AJAX-teknik. Använd den senaste versionen av Mozilla Firefox.","error_convert_accessibility":"Det uppstod ett fel vid konvertering från MathML till åtkomlig text.","exception_cross_site":"Skriptkörning över flera sajter är endast tillåtet för HTTP.","exception_high_surrogate":"Hög surrogat följs inte av låg surrogat i fixedCharCodeAt()","exception_string_length":"Ogiltig sträng. Längden måste vara en multipel av 4","exception_key_nonobject":"Object.keys anropade icke-objekt","exception_null_or_undefined":" det är null eller inte definierat","exception_not_function":" är inte en funktion","exception_invalid_date_format":"Ogiltigt datumformat: ","exception_casting":"Går inte att konvertera ","exception_casting_to":" till "},"tr":{"latex":"LaTeX","cancel":"Vazgeç","accept":"Ekle","manual":"Kılavuz","insert_math":"Matematik formülü ekle - MathType","insert_chem":"Kimya formülü ekleyin - ChemType","minimize":"Simge Durumuna Küçült","maximize":"Ekranı Kapla","fullscreen":"Tam Ekran","exit_fullscreen":"Tam Ekrandan Çık","close":"Kapat","mathtype":"MathType","title_modalwindow":"MathType kalıcı penceresi","close_modal_warning":"Çıkmak istediğinizden emin misiniz? Yaptığınız değişiklikler kaybolacak.","latex_name_label":"Latex Formülü","browser_no_compatible":"Tarayıcınız AJAX teknolojisiyle uyumlu değil. Lütfen en güncel Mozilla Firefox sürümünü kullanın.","error_convert_accessibility":"MathML biçiminden erişilebilir metne dönüştürme hatası.","exception_cross_site":"Siteler arası komut dosyası yazma işlemine yalnızca HTTP için izin verilir.","exception_high_surrogate":"fixedCharCodeAt() fonksiyonunda üst vekilin ardından alt vekil gelmiyor","exception_string_length":"Geçersiz dizgi. Uzunluk, 4\'ün katlarından biri olmalıdır","exception_key_nonobject":"Nesne olmayan öğe üzerinde Object.keys çağrıldı","exception_null_or_undefined":" bu değer boş veya tanımlanmamış","exception_not_function":" bir fonksiyon değil","exception_invalid_date_format":"Geçersiz tarih biçimi: ","exception_casting":"Tür dönüştürülemiyor ","exception_casting_to":" hedef: "},"zh":{"latex":"LaTeX","cancel":"取消","accept":"插入","manual":"手册","insert_math":"插入数学公式 - MathType","insert_chem":"插入化学分子式 - ChemType","minimize":"最小化","maximize":"最大化","fullscreen":"全屏幕","exit_fullscreen":"退出全屏幕","close":"关闭","mathtype":"MathType","title_modalwindow":"MathType 模式窗口","close_modal_warning":"您确定要离开吗？您所做的修改将丢失。","latex_name_label":"Latex 分子式","browser_no_compatible":"您的浏览器不兼容 AJAX 技术。请使用最新版 Mozilla Firefox。","error_convert_accessibility":"将 MathML 转换为可访问文本时出错。","exception_cross_site":"仅 HTTP 允许跨站脚本。","exception_high_surrogate":"fixedCharCodeAt() 中的高位代理之后未跟随低位代理","exception_string_length":"无效字符串。长度必须是 4 的倍数","exception_key_nonobject":"非对象调用了 Object.keys","exception_null_or_undefined":" 该值为空或未定义","exception_not_function":" 不是一个函数","exception_invalid_date_format":"无效日期格式： ","exception_casting":"无法转换 ","exception_casting_to":" 为 "},"":{}}')},function(e,t,n){(function(e,r){var i;self,i=n=>(()=>{var i={703:(e,t,n)=>{"use strict";var r=n(414);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},787:e=>{"use strict";e.exports=n}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e](n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{"use strict";o.r(s),o.d(s,{CKEditor:()=>on,CKEditorContext:()=>rn});var n=o(787),i=o.n(n),a=o(697),l=o.n(a);const c=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},u="object"==typeof e&&e&&e.Object===Object&&e;var d="object"==typeof self&&self&&self.Object===Object&&self;const h=u||d||Function("return this")(),f=function(){return h.Date.now()};var p=/\s/,m=/^\s+/;const g=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&p.test(e.charAt(t)););return t}(e)+1).replace(m,""):e},v=h.Symbol;var b=Object.prototype,y=b.hasOwnProperty,A=b.toString,_=v?v.toStringTag:void 0,w=Object.prototype.toString,E=v?v.toStringTag:void 0;const S=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":E&&E in Object(e)?function(e){var t=y.call(e,_),n=e[_];try{e[_]=void 0;var r=!0}catch(e){}var i=A.call(e);return r&&(t?e[_]=n:delete e[_]),i}(e):function(e){return w.call(e)}(e)},C=function(e){return null!=e&&"object"==typeof e};var T=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,x=/^0o[0-7]+$/i,O=parseInt;const I=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||C(e)&&"[object Symbol]"==S(e)}(e))return NaN;if(c(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=c(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=g(e);var n=k.test(e);return n||x.test(e)?O(e.slice(2),n?2:8):T.test(e)?NaN:+e};var M=Math.max,P=Math.min;const D=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return c(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),function(e,t,n){var r,i,a,o,s,l,u=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=r,a=i;return r=i=void 0,u=t,o=e.apply(a,n)}function g(e){return u=e,s=setTimeout(b,t),d?m(e):o}function v(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=a}function b(){var e=f();if(v(e))return y(e);s=setTimeout(b,function(e){var n=t-(e-l);return h?P(n,a-(e-u)):n}(e))}function y(e){return s=void 0,p&&r?m(e):(r=i=void 0,o)}function A(){var e=f(),n=v(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return g(l);if(h)return clearTimeout(s),s=setTimeout(b,t),m(l)}return void 0===s&&(s=setTimeout(b,t)),o}return t=I(t)||0,c(n)&&(d=!!n.leading,a=(h="maxWait"in n)?M(I(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),A.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},A.flush=function(){return void 0===s?o:y(f())},A}(e,t,{leading:r,maxWait:t,trailing:i})},N=function(e,t){return e===t||e!=e&&t!=t},L=function(e,t){for(var n=e.length;n--;)if(N(e[n][0],t))return n;return-1};var R=Array.prototype.splice;function B(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}B.prototype.clear=function(){this.__data__=[],this.size=0},B.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0||(n==t.length-1?t.pop():R.call(t,n,1),--this.size,0))},B.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},B.prototype.has=function(e){return L(this.__data__,e)>-1},B.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const j=B,F=function(e){if(!c(e))return!1;var t=S(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},U=h["__core-js_shared__"];var H=function(){var e=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),z=Function.prototype.toString;const V=function(e){if(null!=e){try{return z.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var W=/^\[object .+?Constructor\]$/,G=Function.prototype,q=Object.prototype,Y=G.toString,K=q.hasOwnProperty,X=RegExp("^"+Y.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Q=function(e){return!(!c(e)||function(e){return!!H&&H in e}(e))&&(F(e)?X:W).test(V(e))},$=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Q(n)?n:void 0},J=$(h,"Map"),Z=$(Object,"create");var ee=Object.prototype.hasOwnProperty,te=Object.prototype.hasOwnProperty;function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ne.prototype.clear=function(){this.__data__=Z?Z(null):{},this.size=0},ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ne.prototype.get=function(e){var t=this.__data__;if(Z){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ee.call(t,e)?t[e]:void 0},ne.prototype.has=function(e){var t=this.__data__;return Z?void 0!==t[e]:te.call(t,e)},ne.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Z&&void 0===t?"__lodash_hash_undefined__":t,this};const re=ne,ie=function(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map};function ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ae.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(J||j),string:new re}},ae.prototype.delete=function(e){var t=ie(this,e).delete(e);return this.size-=t?1:0,t},ae.prototype.get=function(e){return ie(this,e).get(e)},ae.prototype.has=function(e){return ie(this,e).has(e)},ae.prototype.set=function(e,t){var n=ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const oe=ae;function se(e){var t=this.__data__=new j(e);this.size=t.size}se.prototype.clear=function(){this.__data__=new j,this.size=0},se.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof j){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oe(r)}return n.set(e,t),this.size=n.size,this};const le=se,ce=function(){try{var e=$(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ue=function(e,t,n){"__proto__"==t&&ce?ce(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var de=Object.prototype.hasOwnProperty;const he=function(e,t,n){var r=e[t];de.call(e,t)&&N(r,n)&&(void 0!==n||t in e)||ue(e,t,n)},fe=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?ue(n,s,l):he(n,s,l)}return n},pe=function(e){return C(e)&&"[object Arguments]"==S(e)};var me=Object.prototype,ge=me.hasOwnProperty,ve=me.propertyIsEnumerable;const be=pe(function(){return arguments}())?pe:function(e){return C(e)&&ge.call(e,"callee")&&!ve.call(e,"callee")},ye=Array.isArray;var Ae=t&&!t.nodeType&&t,_e=Ae&&"object"==typeof r&&r&&!r.nodeType&&r,we=_e&&_e.exports===Ae?h.Buffer:void 0;const Ee=(we?we.isBuffer:void 0)||function(){return!1};var Se=/^(?:0|[1-9]\d*)$/;const Ce=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Se.test(e))&&e>-1&&e%1==0&&e<t},Te=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;const xe=function(e){return function(t){return e(t)}};var Oe=t&&!t.nodeType&&t,Ie=Oe&&"object"==typeof r&&r&&!r.nodeType&&r,Me=Ie&&Ie.exports===Oe&&u.process;const Pe=function(){try{return Ie&&Ie.require&&Ie.require("util").types||Me&&Me.binding&&Me.binding("util")}catch(e){}}();var De=Pe&&Pe.isTypedArray;const Ne=De?xe(De):function(e){return C(e)&&Te(e.length)&&!!ke[S(e)]};var Le=Object.prototype.hasOwnProperty;const Re=function(e,t){var n=ye(e),r=!n&&be(e),i=!n&&!r&&Ee(e),a=!n&&!r&&!i&&Ne(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!Le.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ce(c,l))||s.push(c);return s};var Be=Object.prototype;const je=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Be)},Fe=function(e,t){return function(n){return e(t(n))}},Ue=Fe(Object.keys,Object);var He=Object.prototype.hasOwnProperty;const ze=function(e){return null!=e&&Te(e.length)&&!F(e)},Ve=function(e){return ze(e)?Re(e):function(e){if(!je(e))return Ue(e);var t=[];for(var n in Object(e))He.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)};var We=Object.prototype.hasOwnProperty;const Ge=function(e){if(!c(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=je(e),n=[];for(var r in e)("constructor"!=r||!t&&We.call(e,r))&&n.push(r);return n},qe=function(e){return ze(e)?Re(e,!0):Ge(e)};var Ye=t&&!t.nodeType&&t,Ke=Ye&&"object"==typeof r&&r&&!r.nodeType&&r,Xe=Ke&&Ke.exports===Ye?h.Buffer:void 0,Qe=Xe?Xe.allocUnsafe:void 0;const $e=function(){return[]};var Je=Object.prototype.propertyIsEnumerable,Ze=Object.getOwnPropertySymbols;const et=Ze?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(Ze(e),(function(t){return Je.call(e,t)})))}:$e,tt=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},nt=Fe(Object.getPrototypeOf,Object),rt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)tt(t,et(e)),e=nt(e);return t}:$e,it=function(e,t,n){var r=t(e);return ye(e)?r:tt(r,n(e))},at=function(e){return it(e,Ve,et)},ot=function(e){return it(e,qe,rt)},st=$(h,"DataView"),lt=$(h,"Promise"),ct=$(h,"Set"),ut=$(h,"WeakMap");var dt="[object Map]",ht="[object Promise]",ft="[object Set]",pt="[object WeakMap]",mt="[object DataView]",gt=V(st),vt=V(J),bt=V(lt),yt=V(ct),At=V(ut),_t=S;(st&&_t(new st(new ArrayBuffer(1)))!=mt||J&&_t(new J)!=dt||lt&&_t(lt.resolve())!=ht||ct&&_t(new ct)!=ft||ut&&_t(new ut)!=pt)&&(_t=function(e){var t=S(e),n="[object Object]"==t?e.constructor:void 0,r=n?V(n):"";if(r)switch(r){case gt:return mt;case vt:return dt;case bt:return ht;case yt:return ft;case At:return pt}return t});const wt=_t;var Et=Object.prototype.hasOwnProperty;const St=h.Uint8Array,Ct=function(e){var t=new e.constructor(e.byteLength);return new St(t).set(new St(e)),t};var Tt=/\w*$/,kt=v?v.prototype:void 0,xt=kt?kt.valueOf:void 0;const Ot=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Ct(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return function(e,t){var n=t?Ct(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?Ct(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,Tt.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return function(e){return xt?Object(xt.call(e)):{}}(e)}};var It=Object.create;const Mt=function(){function e(){}return function(t){if(!c(t))return{};if(It)return It(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Pt=Pe&&Pe.isMap;const Dt=Pt?xe(Pt):function(e){return C(e)&&"[object Map]"==wt(e)};var Nt=Pe&&Pe.isSet;const Lt=Nt?xe(Nt):function(e){return C(e)&&"[object Set]"==wt(e)};var Rt="[object Arguments]",Bt="[object Function]",jt={};jt[Rt]=jt["[object Array]"]=jt["[object ArrayBuffer]"]=jt["[object DataView]"]=jt["[object Boolean]"]=jt["[object Date]"]=jt["[object Float32Array]"]=jt["[object Float64Array]"]=jt["[object Int8Array]"]=jt["[object Int16Array]"]=jt["[object Int32Array]"]=jt["[object Map]"]=jt["[object Number]"]=jt["[object Object]"]=jt["[object RegExp]"]=jt["[object Set]"]=jt["[object String]"]=jt["[object Symbol]"]=jt["[object Uint8Array]"]=jt["[object Uint8ClampedArray]"]=jt["[object Uint16Array]"]=jt["[object Uint32Array]"]=!0,jt["[object Error]"]=jt[Bt]=jt["[object WeakMap]"]=!1;const Ft=function e(t,n,r,i,a,o){var s,l=1&n,u=2&n,d=4&n;if(r&&(s=a?r(t,i,a,o):r(t)),void 0!==s)return s;if(!c(t))return t;var h=ye(t);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Et.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!l)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(t,s)}else{var f=wt(t),p=f==Bt||"[object GeneratorFunction]"==f;if(Ee(t))return function(e,t){if(t)return e.slice();var n=e.length,r=Qe?Qe(n):new e.constructor(n);return e.copy(r),r}(t,l);if("[object Object]"==f||f==Rt||p&&!a){if(s=u||p?{}:function(e){return"function"!=typeof e.constructor||je(e)?{}:Mt(nt(e))}(t),!l)return u?function(e,t){return fe(e,rt(e),t)}(t,function(e,t){return e&&fe(t,qe(t),e)}(s,t)):function(e,t){return fe(e,et(e),t)}(t,function(e,t){return e&&fe(t,Ve(t),e)}(s,t))}else{if(!jt[f])return a?t:{};s=Ot(t,f,l)}}o||(o=new le);var m=o.get(t);if(m)return m;o.set(t,s),Lt(t)?t.forEach((function(i){s.add(e(i,n,r,i,t,o))})):Dt(t)&&t.forEach((function(i,a){s.set(a,e(i,n,r,a,t,o))}));var g=h?void 0:(d?u?ot:at:u?qe:Ve)(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(g||t,(function(i,a){g&&(i=t[a=i]),he(s,a,e(i,n,r,a,t,o))})),s};var Ut=Function.prototype,Ht=Object.prototype,zt=Ut.toString,Vt=Ht.hasOwnProperty,Wt=zt.call(Object);const Gt=function(e){return C(e)&&1===e.nodeType&&!function(e){if(!C(e)||"[object Object]"!=S(e))return!1;var t=nt(e);if(null===t)return!0;var n=Vt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&zt.call(n)==Wt}(e)};function qt(e,t=new Set){const n=[e],r=new Set;let i=0;for(;n.length>i;){const a=n[i++];if(!(r.has(a)||Yt(a)||t.has(a)))if(r.add(a),a[Symbol.iterator])try{for(const e of a)n.push(e)}catch(e){}else for(const e in a)"defaultValue"!==e&&n.push(a[e])}return r}function Yt(e){const t=Object.prototype.toString.call(e),n=typeof e;return"number"===n||"boolean"===n||"string"===n||"symbol"===n||"function"===n||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e instanceof EventTarget||e instanceof Event}function Kt(e,t,n=new Set){if(e===t&&"object"==typeof(r=e)&&null!==r)return!0;var r;const i=qt(e,n),a=qt(t,n);for(const e of i)if(a.has(e))return!0;return!1}class Xt{constructor(e){if(this.crashes=[],this.state="initializing",this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._now=Date.now,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t=e.error||e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter(e=>e!==t)}_fire(e,...t){const n=this._listeners[e]||[];for(const e of n)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t.filename,lineno:t.lineno,colno:t.colno,date:this._now()});const n=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:n}),n?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){return this.crashes.length<=this._crashNumberLimit||(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}class Qt extends Xt{constructor(e,t={}){super(t),this._editor=null,this._throttledSave=D(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),this._creator=(t,n)=>e.create(t,n),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}_restart(){return Promise.resolve().then(()=>(this.state="initializing",this._fire("stateChange"),this._destroy())).catch(e=>{console.error("An error happened during the editor destroying.",e)}).then(()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const e=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,e,e.context)}}).then(()=>{this._fire("restart")})}create(e=this._elementOrData,t=this._config,n){return Promise.resolve().then(()=>(super._startErrorHandling(),this._elementOrData=e,this._config=this._cloneEditorConfiguration(t)||{},this._config.context=n,this._creator(e,this._config))).then(e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")})}destroy(){return Promise.resolve().then(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling(),this._throttledSave.flush();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)})}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e={};for(const t of this._editor.model.document.getRootNames())e[t]=this._editor.data.get({rootName:t});return e}_isErrorComingFromThisItem(e){return Kt(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return function(e,t){return Ft(e,5,t="function"==typeof t?t:void 0)}(e,(e,t)=>Gt(e)||"context"===t?e:void 0)}}const $t=new Array(256).fill().map((e,t)=>("0"+t.toString(16)).slice(-2)),Jt=Symbol("MainQueueId");class Zt extends Xt{constructor(e,t={}){super(t),this._watchdogs=new Map,this._watchdogConfig=t,this._context=null,this._contextProps=new Set,this._actionQueues=new en,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty(()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))})}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(Jt,()=>(this._contextConfig=e,this._create()))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=tn(e);return Promise.all(t.map(e=>this._actionQueues.enqueue(e.id,()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new Qt(this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",(n,{error:r,causesRestart:i})=>{this._fire("itemError",{itemId:e.id,error:r}),i&&this._actionQueues.enqueue(e.id,()=>new Promise(n=>{t.on("restart",function r(){t.off("restart",r),this._fire("itemRestart",{itemId:e.id}),n()}.bind(this))}))}),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))}remove(e){const t=tn(e);return Promise.all(t.map(e=>this._actionQueues.enqueue(e,()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))}destroy(){return this._actionQueues.enqueue(Jt,()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_restart(){return this._actionQueues.enqueue(Jt,()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch(e=>{console.error("An error happened during destroying the context or items.",e)}).then(()=>this._create()).then(()=>this._fire("restart"))))}_create(){return Promise.resolve().then(()=>(this._startErrorHandling(),this._creator(this._contextConfig))).then(e=>(this._context=e,this._contextProps=qt(this._context),Promise.all(Array.from(this._watchdogs.values()).map(e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map(e=>e.destroy())).then(()=>this._destructor(e))})}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return Kt(this._context,e.context)}}class en{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._actions=new WeakMap,this._lastActionId=0,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const n=e===Jt;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const r=(n?Promise.all(this._queues.values()):Promise.all([this._queues.get(Jt),this._queues.get(e)])).then(t),i=r.catch(()=>{});return this._queues.set(e,i),r.finally(()=>{this._activeActions--,this._queues.get(e)===i&&0===this._activeActions&&this._onEmptyCallbacks.forEach(e=>e())})}}function tn(e){return Array.isArray(e)?e:[e]}const nn=i().createContext("contextWatchdog");class rn extends i().Component{constructor(e,t){super(e,t),this.contextWatchdog=null,this.props.isLayoutReady&&this._initializeContextWatchdog(this.props.config)}async shouldComponentUpdate(e){return e.id!==this.props.id&&(this.contextWatchdog&&await this.contextWatchdog.destroy(),await this._initializeContextWatchdog(e.config)),e.isLayoutReady&&!this.contextWatchdog?(await this._initializeContextWatchdog(e.config),!0):this.props.children!==e.children}render(){return i().createElement(nn.Provider,{value:this.contextWatchdog},this.props.children)}async componentWillUnmount(){await this._destroyContext()}async _initializeContextWatchdog(e){this.contextWatchdog=new Zt(this.props.context),this.contextWatchdog.on("error",(e,t)=>{this.props.onError(t.error,{phase:"runtime",willContextRestart:t.causesRestart})}),this.contextWatchdog.on("stateChange",()=>{"ready"===this.contextWatchdog.state&&this.props.onReady&&this.props.onReady(this.contextWatchdog.context)}),await this.contextWatchdog.create(e).catch(e=>{this.props.onError(e,{phase:"initialization",willContextRestart:!1})})}async _destroyContext(){this.contextWatchdog&&(await this.contextWatchdog.destroy(),this.contextWatchdog=null)}}rn.defaultProps={isLayoutReady:!0,onError:(e,t)=>console.error(e,t)},rn.propTypes={id:l().string,isLayoutReady:l().bool,context:l().func,config:l().object,onReady:l().func,onError:l().func};const an="Lock from React integration (@ckeditor/ckeditor5-react)";class on extends i().Component{constructor(e){super(e),this.domContainer=i().createRef(),this.watchdog=null;const{CKEDITOR_VERSION:t}=window;if(t){const[e]=t.split(".").map(Number);e<34&&console.warn("The <CKEditor> component requires using CKEditor 5 in version 34 or higher.")}else console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.')}get editor(){return this.watchdog?this.watchdog.editor:null}shouldComponentUpdate(e){return!(!this.editor||e.id===this.props.id&&(this._shouldUpdateEditor(e)&&this.editor.setData(e.data),"disabled"in e&&(e.disabled?this.editor.enableReadOnlyMode(an):this.editor.disableReadOnlyMode(an)),1))}async componentDidMount(){await this._initializeEditor()}async componentDidUpdate(){await this._destroyEditor(),await this._initializeEditor()}async componentWillUnmount(){await this._destroyEditor()}render(){return i().createElement("div",{ref:this.domContainer})}async _initializeEditor(){this.watchdog||(this.context instanceof Zt?this.watchdog=new sn(this.context):this.watchdog=new on._EditorWatchdog(this.props.editor),this.watchdog.setCreator((e,t)=>this._createEditor(e,t)),this.watchdog.on("error",(e,{error:t,causesRestart:n})=>{this.props.onError(t,{phase:"runtime",willEditorRestart:n})}),await this.watchdog.create(this.domContainer.current,this._getConfig()).catch(e=>this.props.onError(e,{phase:"initialization",willEditorRestart:!1})))}_createEditor(e,t){return this.props.editor.create(e,t).then(e=>{"disabled"in this.props&&this.props.disabled&&e.enableReadOnlyMode(an);const t=e.model.document,n=e.editing.view.document;return t.on("change:data",t=>{this.props.onChange&&this.props.onChange(t,e)}),n.on("focus",t=>{this.props.onFocus&&this.props.onFocus(t,e)}),n.on("blur",t=>{this.props.onBlur&&this.props.onBlur(t,e)}),setTimeout(()=>{this.props.onReady&&this.props.onReady(this.editor)}),e})}async _destroyEditor(){this.editor&&(await this.watchdog.destroy(),this.watchdog=null)}_shouldUpdateEditor(e){return this.props.data!==e.data&&this.editor.getData()!==e.data}_getConfig(){return this.props.data&&this.props.config.initialData&&console.warn("Editor data should be provided either using `config.initialData` or `data` properties. The config property is over the data value and the first one will be used when specified both."),{...this.props.config,initialData:this.props.config.initialData||this.props.data||""}}}class sn{constructor(e){this._contextWatchdog=e,this._id=function(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0;return"e"+$t[e>>0&255]+$t[e>>8&255]+$t[e>>16&255]+$t[e>>24&255]+$t[t>>0&255]+$t[t>>8&255]+$t[t>>16&255]+$t[t>>24&255]+$t[n>>0&255]+$t[n>>8&255]+$t[n>>16&255]+$t[n>>24&255]+$t[r>>0&255]+$t[r>>8&255]+$t[r>>16&255]+$t[r>>24&255]}()}setCreator(e){this._creator=e}create(e,t){return this._contextWatchdog.add({sourceElementOrData:e,config:t,creator:this._creator,id:this._id,type:"editor"})}on(e,t){this._contextWatchdog.on("itemError",(e,{itemId:n,causesRestart:r,error:i})=>{n===this._id&&t(null,{error:i,causesRestart:r})})}destroy(){this._contextWatchdog.remove(this._id)}get editor(){return this._contextWatchdog.getItem(this._id)}}on.contextType=nn,on.propTypes={editor:l().func.isRequired,data:l().string,config:l().object,onChange:l().func,onReady:l().func,onFocus:l().func,onBlur:l().func,onError:l().func,disabled:l().bool,onInit:(e,t)=>{if(e[t])return new Error('The "onInit" property is not supported anymore by the CKEditor component. Use the "onReady" property instead.')}},on.defaultProps={config:{},onError:(e,t)=>console.error(e,t)},on._EditorWatchdog=Qt})(),s})(),r.exports=i(n(0))}).call(this,n(68),n(256)(e))},function(e,t,n){(function(){(null!==t?t:this).Lethargy=function(){function e(e,t,n,r){this.stability=null!=e?Math.abs(e):8,this.sensitivity=null!=t?1+Math.abs(t):100,this.tolerance=null!=n?1+Math.abs(n):1.1,this.delay=null!=r?r:150,this.lastUpDeltas=function(){var e,t,n;for(n=[],e=1,t=2*this.stability;1<=t?e<=t:e>=t;1<=t?e++:e--)n.push(null);return n}.call(this),this.lastDownDeltas=function(){var e,t,n;for(n=[],e=1,t=2*this.stability;1<=t?e<=t:e>=t;1<=t?e++:e--)n.push(null);return n}.call(this),this.deltasTimestamp=function(){var e,t,n;for(n=[],e=1,t=2*this.stability;1<=t?e<=t:e>=t;1<=t?e++:e--)n.push(null);return n}.call(this)}return e.prototype.check=function(e){var t;return null!=(e=e.originalEvent||e).wheelDelta?t=e.wheelDelta:null!=e.deltaY?t=-40*e.deltaY:null==e.detail&&0!==e.detail||(t=-40*e.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),t>0?(this.lastUpDeltas.push(t),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(t),this.lastDownDeltas.shift(),this.isInertia(-1))},e.prototype.isInertia=function(e){var t,n,r,i,a,o,s;return null===(t=-1===e?this.lastDownDeltas:this.lastUpDeltas)[0]?e:!(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&t[0]===t[2*this.stability-1])&&(r=t.slice(0,this.stability),n=t.slice(this.stability,2*this.stability),s=r.reduce((function(e,t){return e+t})),a=n.reduce((function(e,t){return e+t})),o=s/r.length,i=a/n.length,Math.abs(o)<Math.abs(i*this.tolerance)&&this.sensitivity<Math.abs(i)&&e)},e.prototype.showLastUpDeltas=function(){return this.lastUpDeltas},e.prototype.showLastDownDeltas=function(){return this.lastDownDeltas},e}()}).call(this)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((r=n(1638))&&r.__esModule?r:{default:r}).default;t.default=i},function(e,t){var n="undefined"!=typeof Element,r="function"==typeof Map,i="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,t){try{return function e(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var s,l,c,u;if(Array.isArray(t)){if((s=t.length)!=o.length)return!1;for(l=s;0!=l--;)if(!e(t[l],o[l]))return!1;return!0}if(r&&t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(u=t.entries();!(l=u.next()).done;)if(!o.has(l.value[0]))return!1;for(u=t.entries();!(l=u.next()).done;)if(!e(l.value[1],o.get(l.value[0])))return!1;return!0}if(i&&t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(u=t.entries();!(l=u.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((s=t.length)!=o.length)return!1;for(l=s;0!=l--;)if(t[l]!==o[l])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if((s=(c=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(o,c[l]))return!1;if(n&&t instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!t.$$typeof)&&!e(t[c[l]],o[c[l]]))return!1;return!0}return t!=t&&o!=o}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},function(e,t,n){"use strict";function r(e){return"left"===e.sticky||"right"===e.sticky?e.sticky:e.parent?r(e.parent):null}function i(e,t){const n=t.findIndex(({id:t})=>t===e),i=t[n],a=t[n+1],o="left"===r(i),s=a&&"left"===r(a);return o&&!s}function a(e,t){const n=t.findIndex(({id:t})=>t===e),i=t[n],a=t[n-1],o="right"===r(i),s=a&&"right"===r(a);return o&&!s}function o(e,t){let n=0;for(let r=t.findIndex(({id:t})=>t===e)+1;r<t.length;r+=1)!1!==t[r].isVisible&&(n+=t[r].width);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.checkErrors=e=>{const t=!!e.find(e=>e.parent),n=e.filter(e=>e.sticky&&!e.parent).map(({Header:e})=>`'${e}'`);if(t&&n.length)throw new Error(`WARNING react-table-sticky:\n      \nYour ReactTable has group and sticky columns outside groups, and that will break UI.\n      \nYou must place ${n.join(" and ")} columns into a group (even a group with an empty Header label)\n`);const r=e.find(e=>!e.sticky&&e.columns&&e.columns.find(e=>e.sticky));if(!r)return;const i=r.columns.find(({sticky:e})=>e);if(i)throw new Error(`WARNING react-table-sticky:\n    \nYour ReactTable contain columns group with at least one child columns sticky.\n    \nWhen ReactTable has columns groups, only columns groups can be sticky\n    \nYou must set sticky: 'left' | 'right' for the '${r.Header}'\n    column, or remove the sticky property of '${i.Header}' column.`)},t.getStickyValue=r,t.columnIsLastLeftSticky=i,t.columnIsFirstRightSticky=a,t.getMarginRight=o;const s={position:"sticky",zIndex:3};function l(e,n){let l={};const c={};t.checkErrors(n.columns);const u=r(e);if(u){l=Object.assign({},s),c["data-sticky-td"]=!0;const t=function(e,t){return t.filter(t=>t.depth===e.depth)}(e,n.flatHeaders),r="left"===u?e.totalLeft:o(e.id,t);l=Object.assign(Object.assign({},l),{[u]:`${r}px`}),i(e.id,t)&&(c["data-sticky-last-left-td"]=!0),a(e.id,t)&&(c["data-sticky-first-right-td"]=!0)}return Object.assign({style:l},c)}t.useSticky=e=>{e.getHeaderProps.push((e,{instance:t,column:n})=>[e,l(n,t)]),e.getCellProps.push((e,{instance:t,cell:n})=>[e,l(n.column,t)])},t.useSticky.pluginName="useSticky"},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",container:"container--25Fxy",formTitle:"formTitle--Ewl15"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",leftBarContent:"leftBarContent--1Tjes",firstAreaUpperWrapper:"firstAreaUpperWrapper--1A_N7"}},function(e,t,n){"use strict";e.exports=n(1695)},function(e,t,n){"use strict";var r=u(n(942)),i=u(n(1003)),a=u(n(998)),o=u(n(1799)),s=u(n(1800)),l=u(n(1801)),c=n(540);function u(e){return e&&e.__esModule?e:{default:e}}e.exports={render:l.default,shallow:s.default,mount:o.default,ShallowWrapper:i.default,ReactWrapper:r.default,configure:c.merge,EnzymeAdapter:a.default}},function(e,t,n){"use strict";(function(e){var r=n(12),i=n.n(r),a=n(15),o=n.n(a),s=n(3),l=n.n(s),c=n(13),u=n.n(c),d=n(14),h=n.n(d),f=n(10),p=n.n(f),m=n(2),g=n.n(m),v=n(0),b=n.n(v),y=n(139),A=n(127),_=n(17),w=n(140),E=n(8),S=n(36),C=n(1),T=n(37),k=n(20),x=n(63),O=n(387);n(1802),n(7);e.t=k.a.t;var I=function(e){u()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=p()(e);if(t()){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h()(this,n)}}(n);function n(){var e;i()(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a)),g()(l()(e),"componentDidMount",(function(){e.props.initializeApp()})),e}return o()(n,[{key:"render",value:function(){var e=this;return b.a.createElement(O.a.Provider,{value:{trackingVideoCountViewData:this.props.trackingVideoCountViewData,reportUserSessionState:this.props.reportUserSessionState}},b.a.createElement(y.b,{transition:y.a}),b.a.createElement(S.fb,{logRequests:!1}),b.a.createElement(S.nc,null),b.a.createElement(w.c,{history:T.a},b.a.createElement(S.D,null),b.a.createElement(w.d,null,T.b.map((function(e,t){switch(e.type){case C.g.PAGE_AUTH_TYPE.UNAUTHENTICATED:return b.a.createElement(S.hc,{exact:!0,key:t,path:e.path,component:e.component});case C.g.PAGE_AUTH_TYPE.AUTHENTICATED:return b.a.createElement(S.h,{exact:!0,key:t,path:e.path,component:e.component});default:return b.a.createElement(w.b,{exact:!0,key:t,path:e.path,component:e.component})}})),b.a.createElement(w.b,{path:"/:slug",exact:!0,strict:!0,render:function(t){var n=t.match;if(!/^_[0-9a-zA-Z]{5,10}$/.test(n.params.slug))return b.a.createElement(w.a,{to:{pathname:C.g.HOME_PAGE_PATH,state:{from:e.props.location}}});window.location.href=C.g.UNSHORTEN_SERVICES_ENDPOINT+n.params.slug}}),b.a.createElement(w.b,null,b.a.createElement(w.a,{to:{pathname:C.g.HOME_PAGE_PATH,state:{from:this.props.location}}})))))}}]),n}(v.Component),M=Object(A.a)(x.d,Object(_.b)(null,(function(e){return{initializeApp:function(){return e(E.f.initializeApp())}}})))(I);t.a=M}).call(this,n(68))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(438),i=n.n(r),a=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,o=0;o<a;++o)t[o].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),o=n(562),s=n.n(o),l=n(1013),c=n.n(l),u=n(409),d=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return i()(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(a),h=String.fromCharCode(9),f=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},p=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},m=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}i()(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return n=s()(f(t[1]),{type:"tag",tagType:"byterange"}),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var a=p(t[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=f(a.BYTERANGE))}r.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=p(t[1]),n.attributes.RESOLUTION){var o=n.attributes.RESOLUTION.split("x"),l={};o[0]&&(l.width=parseInt(o[0],10)),o[1]&&(l.height=parseInt(o[1],10)),n.attributes.RESOLUTION=l}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}r.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=p(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=p(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=p(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"skip"}).attributes=p(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(h)),void r.trigger("data",n);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=p(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=f(n.attributes.BYTERANGE)),void r.trigger("data",n);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"server-control"}).attributes=p(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part-inf"}).attributes=p(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"preload-hint"}).attributes=p(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void r.trigger("data",n);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"rendition-report"}).attributes=p(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),void r.trigger("data",n);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,a=e.segment;"function"!=typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:a}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(a),g=function(e){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[n]})),t},v=function(e){var t=e.serverControl,n=e.targetDuration,r=e.partTargetDuration;if(t){var i="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",s=n&&3*n,l=r&&2*r;n&&!t.hasOwnProperty(a)&&(t[a]=s,this.trigger("info",{message:i+" defaulting HOLD-BACK to targetDuration * 3 ("+s+")."})),s&&t[a]<s&&(this.trigger("warn",{message:i+" clamping HOLD-BACK ("+t[a]+") to targetDuration * 3 ("+s+")"}),t[a]=s),r&&!t.hasOwnProperty(o)&&(t[o]=3*r,this.trigger("info",{message:i+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[o]+")."})),r&&t[o]<l&&(this.trigger("warn",{message:i+" clamping PART-HOLD-BACK ("+t[o]+") to partTargetDuration * 2 ("+l+")."}),t[o]=l)}},b=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new d,t.parseStream=new m,t.lineStream.pipe(t.parseStream);var n,r,i=c()(t),a=[],o={},l=!1,h=function(){},f={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},p=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var b=0,y=0;return t.on("end",(function(){o.uri||!o.parts&&!o.preloadHints||(!o.map&&n&&(o.map=n),!o.key&&r&&(o.key=r),o.timeline||"number"!=typeof p||(o.timeline=p),t.manifest.preloadSegment=o)})),t.parseStream.on("data",(function(e){var t,c;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(o.byterange=t,t.length=e.length,"offset"in e||(e.offset=b)),"offset"in e&&(o.byterange=t,t.offset=e.offset),b=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(o.duration=e.duration),0===e.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Object(u.a)(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,p=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),r&&(n.key=r)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||f,e.attributes?(o.attributes||(o.attributes={}),s()(o.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||f,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(c={default:/yes/i.test(e.attributes.DEFAULT)}).default?c.autoselect=!0:c.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(c.language=e.attributes.LANGUAGE),e.attributes.URI&&(c.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(c.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(c.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(c.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=c}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){p+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),o.dateTimeString=e.dateTimeString,o.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,v.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){o.cueOut=e.data},"cue-out-cont":function(){o.cueOutCont=e.data},"cue-in":function(){o.cueIn=e.data},skip:function(){this.manifest.skip=g(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;l=!0;var n=this.manifest.segments.length,r=g(e.attributes);o.parts=o.parts||[],o.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=y),y=r.byterange.offset+r.byterange.length);var i=o.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+i+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=g(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),v.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,n=g(e.attributes),r=n.type&&"PART"===n.type;o.preloadHints=o.preloadHints||[],o.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?y:0,r&&(y=n.byterange.offset+n.byterange.length)));var i=o.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var a=0;a<o.preloadHints.length-1;a++){var s=o.preloadHints[a];s.type&&(s.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+a}))}},"rendition-report":function(){var t=g(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];l&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,r)},"part-inf":function(){this.manifest.partInf=g(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),v.call(this,this.manifest)}}[e.tagType]||h).call(i)},uri:function(){o.uri=e.uri,a.push(o),!this.manifest.targetDuration||"duration"in o||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),r&&(o.key=r),o.timeline=p,n&&(o.map=n),y=0,o={}},comment:function(){},custom:function(){e.segment?(o.custom=o.custom||{},o.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}i()(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var r=[];n.forEach((function(e){t.hasOwnProperty(e)||r.push(e)})),r.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+r.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(a)},function(e,t,n){"use strict";var r,i=new Uint8Array(16);function a(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"==typeof e&&o.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},,,function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),a=n(79),o=n.n(a),s=n(17),l=n(385),c=n(1),u=n(26),d=n(1048);n(1803),n(1804),n(1805),n(1806),n(1807),n(1808),n(1809);String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};var h=c.g.GOOGLE_APP_ID;if(o.a.render(i.a.createElement(s.a,{store:u.a},i.a.createElement(l.a,{clientId:h},i.a.createElement(d.a,null))),document.getElementById("root")),"serviceWorker"in navigator){console.log("Service worker is disbaled, MM_SW_ENABLED = 0"),navigator.serviceWorker.getRegistrations().then((function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){i.value.unregister()}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}})).catch((function(e){console.log("Service Worker registration failed: ",e)}))}else console.error("Service workers are not supported!")},,,,,function(e,t,n){"use strict";
/** @license React v17.0.2
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r=n(144),i=60103,a=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,s=60110,l=60112;t.Suspense=60113;var c=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),a=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),o=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),u=d("react.lazy")}var h="function"==typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(f(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var y=b.prototype=new v;y.constructor=b,r(y,g.prototype),y.isPureReactComponent=!0;var A={current:null},_=Object.prototype.hasOwnProperty,w={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r,a={},o=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)_.call(t,r)&&!w.hasOwnProperty(r)&&(a[r]=t[r]);var l=arguments.length-2;if(1===l)a.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===a[r]&&(a[r]=l[r]);return{$$typeof:i,type:e,key:o,ref:s,props:a,_owner:A.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var C=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function k(e,t,n,r,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case a:l=!0}}if(l)return o=o(l=e),e=""===r?"."+T(l,0):r,Array.isArray(o)?(n="",null!=e&&(n=e.replace(C,"$&/")+"/"),k(o,t,n,"",(function(e){return e}))):null!=o&&(S(o)&&(o=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(C,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var u=r+T(s=e[c],c);l+=k(s,t,n,u,o)}else if("function"==typeof(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e)))for(e=u.call(e),c=0;!(s=e.next()).done;)l+=k(s=s.value,t,n,u=r+T(s,c++),o);else if("object"===s)throw t=""+e,Error(f(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function x(e,t,n){if(null==e)return e;var r=[],i=0;return k(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function O(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var I={current:null};function M(){var e=I.current;if(null===e)throw Error(f(321));return e}var P={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:A,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:x,forEach:function(e,t,n){x(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return x(e,(function(){t++})),t},toArray:function(e){return x(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(f(143));return e}},t.Component=g,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,t.cloneElement=function(e,t,n){if(null==e)throw Error(f(267,e));var a=r({},e.props),o=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=A.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)_.call(t,u)&&!w.hasOwnProperty(u)&&(a[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)a.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];a.children=c}return{$$typeof:i,type:e.type,key:o,ref:s,props:a,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return M().useCallback(e,t)},t.useContext=function(e,t){return M().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return M().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return M().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return M().useLayoutEffect(e,t)},t.useMemo=function(e,t){return M().useMemo(e,t)},t.useReducer=function(e,t,n){return M().useReducer(e,t,n)},t.useRef=function(e){return M().useRef(e)},t.useState=function(e){return M().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";
/** @license React v17.0.2
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r=n(0),i=n(144),a=n(1060);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));var s=new Set,l={};function c(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f=Object.prototype.hasOwnProperty,p={},m={};function g(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function A(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!f.call(m,e)||!f.call(p,e)&&(h.test(e)?m[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,y);v[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,y);v[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,y);v[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=60103,E=60106,S=60107,C=60108,T=60114,k=60109,x=60110,O=60112,I=60113,M=60120,P=60115,D=60116,N=60121,L=60128,R=60129,B=60130,j=60131;if("function"==typeof Symbol&&Symbol.for){var F=Symbol.for;w=F("react.element"),E=F("react.portal"),S=F("react.fragment"),C=F("react.strict_mode"),T=F("react.profiler"),k=F("react.provider"),x=F("react.context"),O=F("react.forward_ref"),I=F("react.suspense"),M=F("react.suspense_list"),P=F("react.memo"),D=F("react.lazy"),N=F("react.block"),F("react.scope"),L=F("react.opaque.id"),R=F("react.debug_trace_mode"),B=F("react.offscreen"),j=F("react.legacy_hidden")}var U,H="function"==typeof Symbol&&Symbol.iterator;function z(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=H&&e[H]||e["@@iterator"])?e:null}function V(e){if(void 0===U)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);U=t&&t[1]||""}return"\n"+U+e}var W=!1;function G(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s])return"\n"+i[o].replace(" at new "," at ")}while(1<=o&&0<=s);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?V(e):""}function q(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=G(e.type,!1);case 11:return e=G(e.type.render,!1);case 22:return e=G(e.type._render,!1);case 1:return e=G(e.type,!0);default:return""}}function Y(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case E:return"Portal";case T:return"Profiler";case C:return"StrictMode";case I:return"Suspense";case M:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case x:return(e.displayName||"Context")+".Consumer";case k:return(e._context.displayName||"Context")+".Provider";case O:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case P:return Y(e.type);case N:return Y(e._render);case D:t=e._payload,e=e._init;try{return Y(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function X(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=X(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=X(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&A(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ae(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function oe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ce(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ue(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",he="http://www.w3.org/2000/svg";function fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,ge=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==he||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","ms","Moz","O"];function Ae(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function _e(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Ae(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){ye.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var we=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ee(e,t){if(t){if(we[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if(!("object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ce(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,ke=null,xe=null;function Oe(e){if(e=Jr(e)){if("function"!=typeof Te)throw Error(o(280));var t=e.stateNode;t&&(t=ei(t),Te(e.stateNode,e.type,t))}}function Ie(e){ke?xe?xe.push(e):xe=[e]:ke=e}function Me(){if(ke){var e=ke,t=xe;if(xe=ke=null,Oe(e),t)for(e=0;e<t.length;e++)Oe(t[e])}}function Pe(e,t){return e(t)}function De(e,t,n,r,i){return e(t,n,r,i)}function Ne(){}var Le=Pe,Re=!1,Be=!1;function je(){null===ke&&null===xe||(Ne(),Me())}function Fe(e,t){var n=e.stateNode;if(null===n)return null;var r=ei(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Ue=!1;if(d)try{var He={};Object.defineProperty(He,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",He,He),window.removeEventListener("test",He,He)}catch(e){Ue=!1}function ze(e,t,n,r,i,a,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Ve=!1,We=null,Ge=!1,qe=null,Ye={onError:function(e){Ve=!0,We=e}};function Ke(e,t,n,r,i,a,o,s,l){Ve=!1,We=null,ze.apply(Ye,arguments)}function Xe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function $e(e){if(Xe(e)!==e)throw Error(o(188))}function Je(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Xe(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return $e(i),e;if(a===r)return $e(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Ze(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,it=!1,at=[],ot=null,st=null,lt=null,ct=new Map,ut=new Map,dt=[],ht="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ft(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function pt(e,t){switch(e){case"focusin":case"focusout":ot=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ut.delete(t.pointerId)}}function mt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e=ft(t,n,r,i,a),null!==t&&(null!==(t=Jr(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function gt(e){var t=$r(e.target);if(null!==t){var n=Xe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){a.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function vt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Jr(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){vt(e)&&n.delete(t)}function yt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=Jr(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==ot&&vt(ot)&&(ot=null),null!==st&&vt(st)&&(st=null),null!==lt&&vt(lt)&&(lt=null),ct.forEach(bt),ut.forEach(bt)}function At(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,yt)))}function _t(e){function t(t){return At(t,e)}if(0<at.length){At(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ot&&At(ot,e),null!==st&&At(st,e),null!==lt&&At(lt,e),ct.forEach(t),ut.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)gt(n),null===n.blockedOn&&dt.shift()}function wt(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Et={animationend:wt("Animation","AnimationEnd"),animationiteration:wt("Animation","AnimationIteration"),animationstart:wt("Animation","AnimationStart"),transitionend:wt("Transition","TransitionEnd")},St={},Ct={};function Tt(e){if(St[e])return St[e];if(!Et[e])return e;var t,n=Et[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ct)return St[e]=n[t];return e}d&&(Ct=document.createElement("div").style,"AnimationEvent"in window||(delete Et.animationend.animation,delete Et.animationiteration.animation,delete Et.animationstart.animation),"TransitionEvent"in window||delete Et.transitionend.transition);var kt=Tt("animationend"),xt=Tt("animationiteration"),Ot=Tt("animationstart"),It=Tt("transitionend"),Mt=new Map,Pt=new Map,Dt=["abort","abort",kt,"animationEnd",xt,"animationIteration",Ot,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",It,"transitionEnd","waiting","waiting"];function Nt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Pt.set(r,t),Mt.set(r,i),c(i,[r])}}(0,a.unstable_now)();var Lt=8;function Rt(e){if(0!=(1&e))return Lt=15,1;if(0!=(2&e))return Lt=14,2;if(0!=(4&e))return Lt=13,4;var t=24&e;return 0!==t?(Lt=12,t):0!=(32&e)?(Lt=11,32):0!==(t=192&e)?(Lt=10,t):0!=(256&e)?(Lt=9,256):0!==(t=3584&e)?(Lt=8,t):0!=(4096&e)?(Lt=7,4096):0!==(t=4186112&e)?(Lt=6,t):0!==(t=62914560&e)?(Lt=5,t):67108864&e?(Lt=4,67108864):0!=(134217728&e)?(Lt=3,134217728):0!==(t=805306368&e)?(Lt=2,t):0!=(1073741824&e)?(Lt=1,1073741824):(Lt=8,e)}function Bt(e,t){var n=e.pendingLanes;if(0===n)return Lt=0;var r=0,i=0,a=e.expiredLanes,o=e.suspendedLanes,s=e.pingedLanes;if(0!==a)r=a,i=Lt=15;else if(0!==(a=134217727&n)){var l=a&~o;0!==l?(r=Rt(l),i=Lt):0!==(s&=a)&&(r=Rt(s),i=Lt)}else 0!==(a=n&~o)?(r=Rt(a),i=Lt):0!==s&&(r=Rt(s),i=Lt);if(0===r)return 0;if(r=n&((0>(r=31-Vt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&o)){if(Rt(t),i<=Lt)return t;Lt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Vt(t)),r|=e[n],t&=~i;return r}function jt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ft(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?Ft(10,t):e;case 10:return 0===(e=Ut(192&~t))?Ft(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(o(358,e))}function Ut(e){return e&-e}function Ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Vt(t)]=n}var Vt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Gt|0)|0},Wt=Math.log,Gt=Math.LN2;var qt=a.unstable_UserBlockingPriority,Yt=a.unstable_runWithPriority,Kt=!0;function Xt(e,t,n,r){Re||Ne();var i=$t,a=Re;Re=!0;try{De(i,e,t,n,r)}finally{(Re=a)||je()}}function Qt(e,t,n,r){Yt(qt,$t.bind(null,e,t,n,r))}function $t(e,t,n,r){var i;if(Kt)if((i=0==(4&t))&&0<at.length&&-1<ht.indexOf(e))e=ft(null,e,t,n,r),at.push(e);else{var a=Jt(e,t,n,r);if(null===a)i&&pt(e,r);else{if(i){if(-1<ht.indexOf(e))return e=ft(a,e,t,n,r),void at.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return ot=mt(ot,e,t,n,r,i),!0;case"dragenter":return st=mt(st,e,t,n,r,i),!0;case"mouseover":return lt=mt(lt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return ct.set(a,mt(ct.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,ut.set(a,mt(ut.get(a)||null,e,t,n,r,i)),!0}return!1}(a,e,t,n,r))return;pt(e,r)}Ir(e,t,r,null,n)}}}function Jt(e,t,n,r){var i=Ce(r);if(null!==(i=$r(i))){var a=Xe(i);if(null===a)i=null;else{var o=a.tag;if(13===o){if(null!==(i=Qe(a)))return i;i=null}else if(3===o){if(a.stateNode.hydrate)return 3===a.tag?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Ir(e,t,r,i,n),null}var Zt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,i="value"in Zt?Zt.value:Zt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return tn=i.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function on(){return!1}function sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:on,this.isPropagationStopped=on,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var ln,cn,un,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=sn(dn),fn=i({},dn,{view:0,detail:0}),pn=sn(fn),mn=i({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(ln=e.screenX-un.screenX,cn=e.screenY-un.screenY):cn=ln=0,un=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=sn(mn),vn=sn(i({},mn,{dataTransfer:0})),bn=sn(i({},fn,{relatedTarget:0})),yn=sn(i({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),An=sn(i({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),_n=sn(i({},dn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Tn(){return Cn}var kn=sn(i({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),xn=sn(i({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),On=sn(i({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),In=sn(i({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=sn(i({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Pn=[9,13,27,32],Dn=d&&"CompositionEvent"in window,Nn=null;d&&"documentMode"in document&&(Nn=document.documentMode);var Ln=d&&"TextEvent"in window&&!Nn,Rn=d&&(!Dn||Nn&&8<Nn&&11>=Nn),Bn=String.fromCharCode(32),jn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1;var zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zn[e.type]:"textarea"===t}function Wn(e,t,n,r){Ie(r),0<(t=Pr(t,"onChange")).length&&(n=new hn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,qn=null;function Yn(e){Sr(e,0)}function Kn(e){if($(Zr(e)))return e}function Xn(e,t){if("change"===e)return t}var Qn=!1;if(d){var $n;if(d){var Jn="oninput"in document;if(!Jn){var Zn=document.createElement("div");Zn.setAttribute("oninput","return;"),Jn="function"==typeof Zn.oninput}$n=Jn}else $n=!1;Qn=$n&&(!document.documentMode||9<document.documentMode)}function er(){Gn&&(Gn.detachEvent("onpropertychange",tr),qn=Gn=null)}function tr(e){if("value"===e.propertyName&&Kn(qn)){var t=[];if(Wn(t,qn,e,Ce(e)),e=Yn,Re)e(t);else{Re=!0;try{Pe(e,t)}finally{Re=!1,je()}}}}function nr(e,t,n){"focusin"===e?(er(),qn=n,(Gn=t).attachEvent("onpropertychange",tr)):"focusout"===e&&er()}function rr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(qn)}function ir(e,t){if("click"===e)return Kn(t)}function ar(e,t){if("input"===e||"change"===e)return Kn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},sr=Object.prototype.hasOwnProperty;function lr(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!sr.call(t,n[r])||!or(e[n[r]],t[n[r]]))return!1;return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var fr=d&&"documentMode"in document&&11>=document.documentMode,pr=null,mr=null,gr=null,vr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==pr||pr!==J(r)||("selectionStart"in(r=pr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&lr(gr,r)||(gr=r,0<(r=Pr(mr,"onSelect")).length&&(t=new hn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=pr)))}Nt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Nt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Nt(Dt,2);for(var yr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ar=0;Ar<yr.length;Ar++)Pt.set(yr[Ar],0);u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),wr=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function Er(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(Ke.apply(this,arguments),Ve){if(!Ve)throw Error(o(198));var u=We;Ve=!1,We=null,Ge||(Ge=!0,qe=u)}}(r,t,void 0,e),e.currentTarget=null}function Sr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;Er(i,s,c),a=l}else for(o=0;o<r.length;o++){if(l=(s=r[o]).instance,c=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;Er(i,s,c),a=l}}}if(Ge)throw e=qe,Ge=!1,qe=null,e}function Cr(e,t){var n=ti(t),r=e+"__bubble";n.has(r)||(Or(t,e,2,!1),n.add(r))}var Tr="_reactListening"+Math.random().toString(36).slice(2);function kr(e){e[Tr]||(e[Tr]=!0,s.forEach((function(t){wr.has(t)||xr(t,!1,e,null),xr(t,!0,e,null)})))}function xr(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=n;if("selectionchange"===e&&9!==n.nodeType&&(a=n.ownerDocument),null!==r&&!t&&wr.has(e)){if("scroll"!==e)return;i|=2,a=r}var o=ti(a),s=e+"__"+(t?"capture":"bubble");o.has(s)||(t&&(i|=4),Or(a,e,i,t),o.add(s))}function Or(e,t,n,r){var i=Pt.get(t);switch(void 0===i?2:i){case 0:i=Xt;break;case 1:i=Qt;break;default:i=$t}n=i.bind(null,t,n,e),i=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ir(e,t,n,r,i){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=$r(s)))return;if(5===(l=o.tag)||6===l){r=a=o;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Be)return e(t,n);Be=!0;try{Le(e,t,n)}finally{Be=!1,je()}}((function(){var r=a,i=Ce(n),o=[];e:{var s=Mt.get(e);if(void 0!==s){var l=hn,c=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":l=kn;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=On;break;case kt:case xt:case Ot:l=yn;break;case It:l=In;break;case"scroll":l=pn;break;case"wheel":l=Mn;break;case"copy":case"cut":case"paste":l=An;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=xn}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&(null!=(m=Fe(p,h))&&u.push(Mr(p,m,f)))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),o.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(c=n.relatedTarget||n.fromElement)||!$r(c)&&!c[Xr])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?$r(c):null)&&(c!==(d=Xe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=gn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=xn,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:Zr(l),f=null==c?s:Zr(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,$r(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,p=0,f=u=l;f;f=Dr(f))p++;for(f=0,m=h;m;m=Dr(m))f++;for(;0<p-f;)u=Dr(u),p--;for(;0<f-p;)h=Dr(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=Dr(u),h=Dr(h)}u=null}else u=null;null!==l&&Nr(o,s,l,u,!1),null!==c&&null!==d&&Nr(o,d,c,u,!0)}if("select"===(l=(s=r?Zr(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Xn;else if(Vn(s))if(Qn)g=ar;else{g=rr;var v=nr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ir);switch(g&&(g=g(e,r))?Wn(o,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ie(s,"number",s.value)),v=r?Zr(r):window,e){case"focusin":(Vn(v)||"true"===v.contentEditable)&&(pr=v,mr=r,gr=null);break;case"focusout":gr=mr=pr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,br(o,n,i);break;case"selectionchange":if(fr)break;case"keydown":case"keyup":br(o,n,i)}var b;if(Dn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Hn?Fn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(Rn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Hn&&(b=nn()):(en="value"in(Zt=i)?Zt.value:Zt.textContent,Hn=!0)),0<(v=Pr(r,y)).length&&(y=new _n(y,e,null,n,i),o.push({event:y,listeners:v}),b?y.data=b:null!==(b=Un(n))&&(y.data=b))),(b=Ln?function(e,t){switch(e){case"compositionend":return Un(t);case"keypress":return 32!==t.which?null:(jn=!0,Bn);case"textInput":return(e=t.data)===Bn&&jn?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Dn&&Fn(e,t)?(e=nn(),tn=en=Zt=null,Hn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Pr(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=b))}Sr(o,t)}))}function Mr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Fe(e,n))&&r.unshift(Mr(e,a,i)),null!=(a=Fe(e,t))&&r.push(Mr(e,a,i))),e=e.return}return r}function Dr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Nr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Fe(n,a))&&o.unshift(Mr(n,l,s)):i||null!=(l=Fe(n,a))&&o.push(Mr(n,l,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}function Lr(){}var Rr=null,Br=null;function jr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Fr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ur="function"==typeof setTimeout?setTimeout:void 0,Hr="function"==typeof clearTimeout?clearTimeout:void 0;function zr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Vr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Gr=0;var qr=Math.random().toString(36).slice(2),Yr="__reactFiber$"+qr,Kr="__reactProps$"+qr,Xr="__reactContainer$"+qr,Qr="__reactEvents$"+qr;function $r(e){var t=e[Yr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xr]||n[Yr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[Yr])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function Jr(e){return!(e=e[Yr]||e[Xr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Zr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ei(e){return e[Kr]||null}function ti(e){var t=e[Qr];return void 0===t&&(t=e[Qr]=new Set),t}var ni=[],ri=-1;function ii(e){return{current:e}}function ai(e){0>ri||(e.current=ni[ri],ni[ri]=null,ri--)}function oi(e,t){ri++,ni[ri]=e.current,e.current=t}var si={},li=ii(si),ci=ii(!1),ui=si;function di(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function hi(e){return null!=(e=e.childContextTypes)}function fi(){ai(ci),ai(li)}function pi(e,t,n){if(li.current!==si)throw Error(o(168));oi(li,t),oi(ci,n)}function mi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in e))throw Error(o(108,Y(t)||"Unknown",a));return i({},n,r)}function gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,ui=li.current,oi(li,e),oi(ci,ci.current),!0}function vi(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=mi(e,t,ui),r.__reactInternalMemoizedMergedChildContext=e,ai(ci),ai(li),oi(li,e)):ai(ci),oi(ci,n)}var bi=null,yi=null,Ai=a.unstable_runWithPriority,_i=a.unstable_scheduleCallback,wi=a.unstable_cancelCallback,Ei=a.unstable_shouldYield,Si=a.unstable_requestPaint,Ci=a.unstable_now,Ti=a.unstable_getCurrentPriorityLevel,ki=a.unstable_ImmediatePriority,xi=a.unstable_UserBlockingPriority,Oi=a.unstable_NormalPriority,Ii=a.unstable_LowPriority,Mi=a.unstable_IdlePriority,Pi={},Di=void 0!==Si?Si:function(){},Ni=null,Li=null,Ri=!1,Bi=Ci(),ji=1e4>Bi?Ci:function(){return Ci()-Bi};function Fi(){switch(Ti()){case ki:return 99;case xi:return 98;case Oi:return 97;case Ii:return 96;case Mi:return 95;default:throw Error(o(332))}}function Ui(e){switch(e){case 99:return ki;case 98:return xi;case 97:return Oi;case 96:return Ii;case 95:return Mi;default:throw Error(o(332))}}function Hi(e,t){return e=Ui(e),Ai(e,t)}function zi(e,t,n){return e=Ui(e),_i(e,t,n)}function Vi(){if(null!==Li){var e=Li;Li=null,wi(e)}Wi()}function Wi(){if(!Ri&&null!==Ni){Ri=!0;var e=0;try{var t=Ni;Hi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ni=null}catch(t){throw null!==Ni&&(Ni=Ni.slice(e+1)),_i(ki,Vi),t}finally{Ri=!1}}}var Gi=_.ReactCurrentBatchConfig;function qi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Yi=ii(null),Ki=null,Xi=null,Qi=null;function $i(){Qi=Xi=Ki=null}function Ji(e){var t=Yi.current;ai(Yi),e.type._context._currentValue=t}function Zi(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ea(e,t){Ki=e,Qi=Xi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Po=!0),e.firstContext=null)}function ta(e,t){if(Qi!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Qi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Xi){if(null===Ki)throw Error(o(308));Xi=t,Ki.dependencies={lanes:0,firstContext:t,responders:null}}else Xi=Xi.next=t;return e._currentValue}var na=!1;function ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ia(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function aa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function oa(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function sa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function la(e,t,n,r){var a=e.updateQueue;na=!1;var o=a.firstBaseUpdate,s=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?o=u:s.next=u,s=c;var d=e.alternate;if(null!==d){var h=(d=d.updateQueue).lastBaseUpdate;h!==s&&(null===h?d.firstBaseUpdate=u:h.next=u,d.lastBaseUpdate=c)}}if(null!==o){for(h=a.baseState,s=0,d=u=c=null;;){l=o.lane;var f=o.eventTime;if((r&l)===l){null!==d&&(d=d.next={eventTime:f,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,m=o;switch(l=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){h=p.call(f,h,l);break e}h=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null==(l="function"==typeof(p=m.payload)?p.call(f,h,l):p))break e;h=i({},h,l);break e;case 2:na=!0}}null!==o.callback&&(e.flags|=32,null===(l=a.effects)?a.effects=[o]:l.push(o))}else f={eventTime:f,lane:l,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===d?(u=d=f,c=h):d=d.next=f,s|=l;if(null===(o=o.next)){if(null===(l=a.shared.pending))break;o=l.next,l.next=null,a.lastBaseUpdate=l,a.shared.pending=null}}null===d&&(c=h),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=d,Ns|=s,e.lanes=s,e.memoizedState=h}}function ca(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var ua=(new r.Component).refs;function da(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ha={isMounted:function(e){return!!(e=e._reactInternals)&&Xe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=al(),i=ol(e),a=aa(r,i);a.payload=t,null!=n&&(a.callback=n),oa(e,a),sl(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=al(),i=ol(e),a=aa(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),oa(e,a),sl(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=al(),r=ol(e),i=aa(n,r);i.tag=2,null!=t&&(i.callback=t),oa(e,i),sl(e,r,n)}};function fa(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,a))}function pa(e,t,n){var r=!1,i=si,a=t.contextType;return"object"==typeof a&&null!==a?a=ta(a):(i=hi(t)?ui:li.current,a=(r=null!=(r=t.contextTypes))?di(e,i):si),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ha,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ma(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ha.enqueueReplaceState(t,t.state,null)}function ga(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ua,ra(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=ta(a):(a=hi(t)?ui:li.current,i.context=di(e,a)),la(e,n,i,r),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(da(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ha.enqueueReplaceState(i,i.state,null),la(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}var va=Array.isArray;function ba(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ua&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function ya(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Aa(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Fl(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Vl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=ba(e,t,n),r.return=e,r):((r=Ul(n.type,n.key,n.props,null,e.mode,r)).ref=ba(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Wl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Hl(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Vl(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Ul(t.type,t.key,t.props,null,e.mode,n)).ref=ba(e,null,t),n.return=e,n;case E:return(t=Wl(t,e.mode,n)).return=e,t}if(va(t)||z(t))return(t=Hl(t,e.mode,n,null)).return=e,t;ya(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?n.type===S?d(e,t,n.props.children,r,i):c(e,t,n,r):null;case E:return n.key===i?u(e,t,n,r):null}if(va(n)||z(n))return null!==i?null:d(e,t,n,r,null);ya(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case w:return e=e.get(null===r.key?n:r.key)||null,r.type===S?d(t,e,r.props.children,i,r.key):c(t,e,r,i);case E:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(va(r)||z(r))return d(t,e=e.get(n)||null,r,i,null);ya(t,r)}return null}function m(i,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(i,d),c;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(o=a(d,o,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),c}function g(i,s,l,c){var u=z(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,m=s,g=s=0,v=null,b=l.next();null!==m&&!b.done;g++,b=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var y=f(i,m,b.value,c);if(null===y){null===m&&(m=v);break}e&&m&&null===y.alternate&&t(i,m),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y,m=v}if(b.done)return n(i,m),u;if(null===m){for(;!b.done;g++,b=l.next())null!==(b=h(i,b.value,c))&&(s=a(b,s,g),null===d?u=b:d.sibling=b,d=b);return u}for(m=r(i,m);!b.done;g++,b=l.next())null!==(b=p(m,i,g,b.value,c))&&(e&&null!==b.alternate&&m.delete(null===b.key?g:b.key),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b);return e&&m.forEach((function(e){return t(i,e)})),u}return function(e,r,a,l){var c="object"==typeof a&&null!==a&&a.type===S&&null===a.key;c&&(a=a.props.children);var u="object"==typeof a&&null!==a;if(u)switch(a.$$typeof){case w:e:{for(u=a.key,c=r;null!==c;){if(c.key===u){switch(c.tag){case 7:if(a.type===S){n(e,c.sibling),(r=i(c,a.props.children)).return=e,e=r;break e}break;default:if(c.elementType===a.type){n(e,c.sibling),(r=i(c,a.props)).ref=ba(e,c,a),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}a.type===S?((r=Hl(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=Ul(a.type,a.key,a.props,null,e.mode,l)).ref=ba(e,r,a),l.return=e,e=l)}return s(e);case E:e:{for(c=a.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=i(r,a.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Wl(a,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,a)).return=e,e=r):(n(e,r),(r=Vl(a,e.mode,l)).return=e,e=r),s(e);if(va(a))return m(e,r,a,l);if(z(a))return g(e,r,a,l);if(u&&ya(e,a),void 0===a&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,Y(e.type)||"Component"))}return n(e,r)}}var _a=Aa(!0),wa=Aa(!1),Ea={},Sa=ii(Ea),Ca=ii(Ea),Ta=ii(Ea);function ka(e){if(e===Ea)throw Error(o(174));return e}function xa(e,t){switch(oi(Ta,t),oi(Ca,e),oi(Sa,Ea),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ai(Sa),oi(Sa,t)}function Oa(){ai(Sa),ai(Ca),ai(Ta)}function Ia(e){ka(Ta.current);var t=ka(Sa.current),n=pe(t,e.type);t!==n&&(oi(Ca,e),oi(Sa,n))}function Ma(e){Ca.current===e&&(ai(Sa),ai(Ca))}var Pa=ii(0);function Da(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Na=null,La=null,Ra=!1;function Ba(e,t){var n=Bl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ja(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Fa(e){if(Ra){var t=La;if(t){var n=t;if(!ja(e,t)){if(!(t=Vr(n.nextSibling))||!ja(e,t))return e.flags=-1025&e.flags|2,Ra=!1,void(Na=e);Ba(Na,n)}Na=e,La=Vr(t.firstChild)}else e.flags=-1025&e.flags|2,Ra=!1,Na=e}}function Ua(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Na=e}function Ha(e){if(e!==Na)return!1;if(!Ra)return Ua(e),Ra=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Fr(t,e.memoizedProps))for(t=La;t;)Ba(e,t),t=Vr(t.nextSibling);if(Ua(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){La=Vr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}La=null}}else La=Na?Vr(e.stateNode.nextSibling):null;return!0}function za(){La=Na=null,Ra=!1}var Va=[];function Wa(){for(var e=0;e<Va.length;e++)Va[e]._workInProgressVersionPrimary=null;Va.length=0}var Ga=_.ReactCurrentDispatcher,qa=_.ReactCurrentBatchConfig,Ya=0,Ka=null,Xa=null,Qa=null,$a=!1,Ja=!1;function Za(){throw Error(o(321))}function eo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function to(e,t,n,r,i,a){if(Ya=a,Ka=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ga.current=null===e||null===e.memoizedState?xo:Oo,e=n(r,i),Ja){a=0;do{if(Ja=!1,!(25>a))throw Error(o(301));a+=1,Qa=Xa=null,t.updateQueue=null,Ga.current=Io,e=n(r,i)}while(Ja)}if(Ga.current=ko,t=null!==Xa&&null!==Xa.next,Ya=0,Qa=Xa=Ka=null,$a=!1,t)throw Error(o(300));return e}function no(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Qa?Ka.memoizedState=Qa=e:Qa=Qa.next=e,Qa}function ro(){if(null===Xa){var e=Ka.alternate;e=null!==e?e.memoizedState:null}else e=Xa.next;var t=null===Qa?Ka.memoizedState:Qa.next;if(null!==t)Qa=t,Xa=e;else{if(null===e)throw Error(o(310));e={memoizedState:(Xa=e).memoizedState,baseState:Xa.baseState,baseQueue:Xa.baseQueue,queue:Xa.queue,next:null},null===Qa?Ka.memoizedState=Qa=e:Qa=Qa.next=e}return Qa}function io(e,t){return"function"==typeof t?t(e):t}function ao(e){var t=ro(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=Xa,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=a=null,c=i;do{var u=c.lane;if((Ya&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,Ka.lanes|=u,Ns|=u}c=c.next}while(null!==c&&c!==i);null===l?a=r:l.next=s,or(r,t.memoizedState)||(Po=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function oo(e){var t=ro(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);or(a,t.memoizedState)||(Po=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function so(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Ya&e)===e)&&(t._workInProgressVersionPrimary=r,Va.push(t))),e)return n(t._source);throw Va.push(t),Error(o(350))}function lo(e,t,n,r){var i=Ts;if(null===i)throw Error(o(349));var a=t._getVersion,s=a(t._source),l=Ga.current,c=l.useState((function(){return so(i,t,n)})),u=c[1],d=c[0];c=Qa;var h=e.memoizedState,f=h.refs,p=f.getSnapshot,m=h.source;h=h.subscribe;var g=Ka;return e.memoizedState={refs:f,source:t,subscribe:r},l.useEffect((function(){f.getSnapshot=n,f.setSnapshot=u;var e=a(t._source);if(!or(s,e)){e=n(t._source),or(d,e)||(u(e),e=ol(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,o=e;0<o;){var l=31-Vt(o),c=1<<l;r[l]|=e,o&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=f.getSnapshot,n=f.setSnapshot;try{n(e(t._source));var r=ol(g);i.mutableReadLanes|=r&i.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),or(p,n)&&or(m,t)&&or(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:io,lastRenderedState:d}).dispatch=u=To.bind(null,Ka,e),c.queue=e,c.baseQueue=null,d=so(i,t,n),c.memoizedState=c.baseState=d),d}function co(e,t,n){return lo(ro(),e,t,n)}function uo(e){var t=no();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:io,lastRenderedState:e}).dispatch=To.bind(null,Ka,e),[t.memoizedState,e]}function ho(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ka.updateQueue)?(t={lastEffect:null},Ka.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function fo(e){return e={current:e},no().memoizedState=e}function po(){return ro().memoizedState}function mo(e,t,n,r){var i=no();Ka.flags|=e,i.memoizedState=ho(1|t,n,void 0,void 0===r?null:r)}function go(e,t,n,r){var i=ro();r=void 0===r?null:r;var a=void 0;if(null!==Xa){var o=Xa.memoizedState;if(a=o.destroy,null!==r&&eo(r,o.deps))return void ho(t,n,a,r)}Ka.flags|=e,i.memoizedState=ho(1|t,n,a,r)}function vo(e,t){return mo(516,4,e,t)}function bo(e,t){return go(516,4,e,t)}function yo(e,t){return go(4,2,e,t)}function Ao(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function _o(e,t,n){return n=null!=n?n.concat([e]):null,go(4,2,Ao.bind(null,t,e),n)}function wo(){}function Eo(e,t){var n=ro();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function So(e,t){var n=ro();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&eo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Co(e,t){var n=Fi();Hi(98>n?98:n,(function(){e(!0)})),Hi(97<n?97:n,(function(){var n=qa.transition;qa.transition=1;try{e(!1),t()}finally{qa.transition=n}}))}function To(e,t,n){var r=al(),i=ol(e),a={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(null===o?a.next=a:(a.next=o.next,o.next=a),t.pending=a,o=e.alternate,e===Ka||null!==o&&o===Ka)Ja=$a=!0;else{if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=o(s,n);if(a.eagerReducer=o,a.eagerState=l,or(l,s))return}catch(e){}sl(e,i,r)}}var ko={readContext:ta,useCallback:Za,useContext:Za,useEffect:Za,useImperativeHandle:Za,useLayoutEffect:Za,useMemo:Za,useReducer:Za,useRef:Za,useState:Za,useDebugValue:Za,useDeferredValue:Za,useTransition:Za,useMutableSource:Za,useOpaqueIdentifier:Za,unstable_isNewReconciler:!1},xo={readContext:ta,useCallback:function(e,t){return no().memoizedState=[e,void 0===t?null:t],e},useContext:ta,useEffect:vo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,mo(4,2,Ao.bind(null,t,e),n)},useLayoutEffect:function(e,t){return mo(4,2,e,t)},useMemo:function(e,t){var n=no();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=no();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=To.bind(null,Ka,e),[r.memoizedState,e]},useRef:fo,useState:uo,useDebugValue:wo,useDeferredValue:function(e){var t=uo(e),n=t[0],r=t[1];return vo((function(){var t=qa.transition;qa.transition=1;try{r(e)}finally{qa.transition=t}}),[e]),n},useTransition:function(){var e=uo(!1),t=e[0];return fo(e=Co.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=no();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},lo(r,e,t,n)},useOpaqueIdentifier:function(){if(Ra){var e=!1,t=function(e){return{$$typeof:L,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Gr++).toString(36))),Error(o(355))})),n=uo(t)[1];return 0==(2&Ka.mode)&&(Ka.flags|=516,ho(5,(function(){n("r:"+(Gr++).toString(36))}),void 0,null)),t}return uo(t="r:"+(Gr++).toString(36)),t},unstable_isNewReconciler:!1},Oo={readContext:ta,useCallback:Eo,useContext:ta,useEffect:bo,useImperativeHandle:_o,useLayoutEffect:yo,useMemo:So,useReducer:ao,useRef:po,useState:function(){return ao(io)},useDebugValue:wo,useDeferredValue:function(e){var t=ao(io),n=t[0],r=t[1];return bo((function(){var t=qa.transition;qa.transition=1;try{r(e)}finally{qa.transition=t}}),[e]),n},useTransition:function(){var e=ao(io)[0];return[po().current,e]},useMutableSource:co,useOpaqueIdentifier:function(){return ao(io)[0]},unstable_isNewReconciler:!1},Io={readContext:ta,useCallback:Eo,useContext:ta,useEffect:bo,useImperativeHandle:_o,useLayoutEffect:yo,useMemo:So,useReducer:oo,useRef:po,useState:function(){return oo(io)},useDebugValue:wo,useDeferredValue:function(e){var t=oo(io),n=t[0],r=t[1];return bo((function(){var t=qa.transition;qa.transition=1;try{r(e)}finally{qa.transition=t}}),[e]),n},useTransition:function(){var e=oo(io)[0];return[po().current,e]},useMutableSource:co,useOpaqueIdentifier:function(){return oo(io)[0]},unstable_isNewReconciler:!1},Mo=_.ReactCurrentOwner,Po=!1;function Do(e,t,n,r){t.child=null===e?wa(t,null,n,r):_a(t,e.child,n,r)}function No(e,t,n,r,i){n=n.render;var a=t.ref;return ea(t,i),r=to(e,t,n,r,a,i),null===e||Po?(t.flags|=1,Do(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,es(e,t,i))}function Lo(e,t,n,r,i,a){if(null===e){var o=n.type;return"function"!=typeof o||jl(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ul(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ro(e,t,o,r,i,a))}return o=e.child,0==(i&a)&&(i=o.memoizedProps,(n=null!==(n=n.compare)?n:lr)(i,r)&&e.ref===t.ref)?es(e,t,a):(t.flags|=1,(e=Fl(o,r)).ref=t.ref,e.return=t,t.child=e)}function Ro(e,t,n,r,i,a){if(null!==e&&lr(e.memoizedProps,r)&&e.ref===t.ref){if(Po=!1,0==(a&i))return t.lanes=e.lanes,es(e,t,a);0!=(16384&e.flags)&&(Po=!0)}return Fo(e,t,n,r,a)}function Bo(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},ml(t,n);else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},ml(t,e),null;t.memoizedState={baseLanes:0},ml(t,null!==a?a.baseLanes:n)}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,ml(t,r);return Do(e,t,i,n),t.child}function jo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Fo(e,t,n,r,i){var a=hi(n)?ui:li.current;return a=di(t,a),ea(t,i),n=to(e,t,n,r,a,i),null===e||Po?(t.flags|=1,Do(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,es(e,t,i))}function Uo(e,t,n,r,i){if(hi(n)){var a=!0;gi(t)}else a=!1;if(ea(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),pa(t,n,r),ga(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;"object"==typeof c&&null!==c?c=ta(c):c=di(t,c=hi(n)?ui:li.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==c)&&ma(t,o,r,c),na=!1;var h=t.memoizedState;o.state=h,la(t,r,o,i),l=t.memoizedState,s!==r||h!==l||ci.current||na?("function"==typeof u&&(da(t,n,u,r),l=t.memoizedState),(s=na||fa(t,n,s,r,h,l,c))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4)):("function"==typeof o.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4),r=!1)}else{o=t.stateNode,ia(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:qi(t.type,s),o.props=c,d=t.pendingProps,h=o.context,"object"==typeof(l=n.contextType)&&null!==l?l=ta(l):l=di(t,l=hi(n)?ui:li.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||h!==l)&&ma(t,o,r,l),na=!1,h=t.memoizedState,o.state=h,la(t,r,o,i);var p=t.memoizedState;s!==d||h!==p||ci.current||na?("function"==typeof f&&(da(t,n,f,r),p=t.memoizedState),(c=na||fa(t,n,c,r,h,p,l))?(u||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=c):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Ho(e,t,n,r,a,i)}function Ho(e,t,n,r,i,a){jo(e,t);var o=0!=(64&t.flags);if(!r&&!o)return i&&vi(t,n,!1),es(e,t,a);r=t.stateNode,Mo.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=_a(t,e.child,null,a),t.child=_a(t,null,s,a)):Do(e,t,s,a),t.memoizedState=r.state,i&&vi(t,n,!0),t.child}function zo(e){var t=e.stateNode;t.pendingContext?pi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&pi(0,t.context,!1),xa(e,t.containerInfo)}var Vo,Wo,Go,qo={dehydrated:null,retryLane:0};function Yo(e,t,n){var r,i=t.pendingProps,a=Pa.current,o=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(o=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),oi(Pa,1&a),null===e?(void 0!==i.fallback&&Fa(t),e=i.children,a=i.fallback,o?(e=Ko(t,e,a,n),t.child.memoizedState={baseLanes:n},t.memoizedState=qo,e):"number"==typeof i.unstable_expectedLoadTime?(e=Ko(t,e,a,n),t.child.memoizedState={baseLanes:n},t.memoizedState=qo,t.lanes=33554432,e):((n=zl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,o?(i=Qo(e,t,i.children,i.fallback,n),o=t.child,a=e.child.memoizedState,o.memoizedState=null===a?{baseLanes:n}:{baseLanes:a.baseLanes|n},o.childLanes=e.childLanes&~n,t.memoizedState=qo,i):(n=Xo(e,t,i.children,n),t.memoizedState=null,n))}function Ko(e,t,n,r){var i=e.mode,a=e.child;return t={mode:"hidden",children:t},0==(2&i)&&null!==a?(a.childLanes=0,a.pendingProps=t):a=zl(t,i,0,null),n=Hl(n,i,r,null),a.return=e,n.return=e,a.sibling=n,e.child=a,n}function Xo(e,t,n,r){var i=e.child;return e=i.sibling,n=Fl(i,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Qo(e,t,n,r,i){var a=t.mode,o=e.child;e=o.sibling;var s={mode:"hidden",children:n};return 0==(2&a)&&t.child!==o?((n=t.child).childLanes=0,n.pendingProps=s,null!==(o=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Fl(o,s),null!==e?r=Fl(e,r):(r=Hl(r,a,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function $o(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Zi(e.return,t)}function Jo(e,t,n,r,i,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.lastEffect=a)}function Zo(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Do(e,t,r.children,n),0!=(2&(r=Pa.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$o(e,n);else if(19===e.tag)$o(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oi(Pa,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Da(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Jo(t,!1,i,n,a,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Da(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Jo(t,!0,n,null,a,t.lastEffect);break;case"together":Jo(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function es(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ns|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Fl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Fl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ts(e,t){if(!Ra)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ns(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return hi(t.type)&&fi(),null;case 3:return Oa(),ai(ci),ai(li),Wa(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ha(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Ma(t);var a=ka(Ta.current);if(n=t.type,null!==e&&null!=t.stateNode)Wo(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}if(e=ka(Sa.current),Ha(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Yr]=t,r[Kr]=s,n){case"dialog":Cr("cancel",r),Cr("close",r);break;case"iframe":case"object":case"embed":Cr("load",r);break;case"video":case"audio":for(e=0;e<_r.length;e++)Cr(_r[e],r);break;case"source":Cr("error",r);break;case"img":case"image":case"link":Cr("error",r),Cr("load",r);break;case"details":Cr("toggle",r);break;case"input":ee(r,s),Cr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Cr("invalid",r);break;case"textarea":le(r,s),Cr("invalid",r)}for(var c in Ee(n,s),e=null,s)s.hasOwnProperty(c)&&(a=s[c],"children"===c?"string"==typeof a?r.textContent!==a&&(e=["children",a]):"number"==typeof a&&r.textContent!==""+a&&(e=["children",""+a]):l.hasOwnProperty(c)&&null!=a&&"onScroll"===c&&Cr("scroll",r));switch(n){case"input":Q(r),re(r,s,!0);break;case"textarea":Q(r),ue(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=Lr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===a.nodeType?a:a.ownerDocument,e===de&&(e=fe(n)),e===de?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Yr]=t,e[Kr]=r,Vo(e,t),t.stateNode=e,c=Se(n,r),n){case"dialog":Cr("cancel",e),Cr("close",e),a=r;break;case"iframe":case"object":case"embed":Cr("load",e),a=r;break;case"video":case"audio":for(a=0;a<_r.length;a++)Cr(_r[a],e);a=r;break;case"source":Cr("error",e),a=r;break;case"img":case"image":case"link":Cr("error",e),Cr("load",e),a=r;break;case"details":Cr("toggle",e),a=r;break;case"input":ee(e,r),a=Z(e,r),Cr("invalid",e);break;case"option":a=ae(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=i({},r,{value:void 0}),Cr("invalid",e);break;case"textarea":le(e,r),a=se(e,r),Cr("invalid",e);break;default:a=r}Ee(n,a);var u=a;for(s in u)if(u.hasOwnProperty(s)){var d=u[s];"style"===s?_e(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===s?"string"==typeof d?("textarea"!==n||""!==d)&&ve(e,d):"number"==typeof d&&ve(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Cr("scroll",e):null!=d&&A(e,s,d,c))}switch(n){case"input":Q(e),re(e,r,!1);break;case"textarea":Q(e),ue(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?oe(e,!!r.multiple,s,!1):null!=r.defaultValue&&oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=Lr)}jr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Go(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));n=ka(Ta.current),ka(Sa.current),Ha(t)?(r=t.stateNode,n=t.memoizedProps,r[Yr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Yr]=t,t.stateNode=r)}return null;case 13:return ai(Pa),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ha(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Pa.current)?0===Ms&&(Ms=3):(0!==Ms&&3!==Ms||(Ms=4),null===Ts||0==(134217727&Ns)&&0==(134217727&Ls)||dl(Ts,xs))),(r||n)&&(t.flags|=4),null);case 4:return Oa(),null===e&&kr(t.stateNode.containerInfo),null;case 10:return Ji(t),null;case 17:return hi(t.type)&&fi(),null;case 19:if(ai(Pa),null===(r=t.memoizedState))return null;if(s=0!=(64&t.flags),null===(c=r.rendering))if(s)ts(r,!1);else{if(0!==Ms||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Da(e))){for(t.flags|=64,ts(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oi(Pa,1&Pa.current|2),t.child}e=e.sibling}null!==r.tail&&ji()>Fs&&(t.flags|=64,s=!0,ts(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Da(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ts(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Ra)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*ji()-r.renderingStartTime>Fs&&1073741824!==n&&(t.flags|=64,s=!0,ts(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=ji(),n.sibling=null,t=Pa.current,oi(Pa,s?1&t|2:1&t),n):null;case 23:case 24:return gl(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function rs(e){switch(e.tag){case 1:hi(e.type)&&fi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Oa(),ai(ci),ai(li),Wa(),0!=(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return Ma(e),null;case 13:return ai(Pa),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ai(Pa),null;case 4:return Oa(),null;case 10:return Ji(e),null;case 23:case 24:return gl(),null;default:return null}}function is(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function as(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Vo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wo=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,ka(Sa.current);var o,s=null;switch(n){case"input":a=Z(e,a),r=Z(e,r),s=[];break;case"option":a=ae(e,a),r=ae(e,r),s=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":a=se(e,a),r=se(e,r),s=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=Lr)}for(d in Ee(n,r),n=null,a)if(!r.hasOwnProperty(d)&&a.hasOwnProperty(d)&&null!=a[d])if("style"===d){var c=a[d];for(o in c)c.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(l.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var u=r[d];if(c=null!=a?a[d]:void 0,r.hasOwnProperty(d)&&u!==c&&(null!=u||null!=c))if("style"===d)if(c){for(o in c)!c.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&c[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(s||(s=[]),s.push(d,n)),n=u;else"dangerouslySetInnerHTML"===d?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(s=s||[]).push(d,u)):"children"===d?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(d,""+u):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(l.hasOwnProperty(d)?(null!=u&&"onScroll"===d&&Cr("scroll",e),s||c===u||(s=[])):"object"==typeof u&&null!==u&&u.$$typeof===L?u.toString():(s=s||[]).push(d,u))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Go=function(e,t,n,r){n!==r&&(t.flags|=4)};var os="function"==typeof WeakMap?WeakMap:Map;function ss(e,t,n){(n=aa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vs||(Vs=!0,Ws=r),as(0,t)},n}function ls(e,t,n){(n=aa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return as(0,t),r(i)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Gs?Gs=new Set([this]):Gs.add(this),as(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var cs="function"==typeof WeakSet?WeakSet:Set;function us(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Dl(e,t)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:qi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&zr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(o(163))}function hs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(Il(n,e),Ol(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:qi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ca(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}ca(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&jr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&_t(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(o(163))}function fs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=null!=i&&i.hasOwnProperty("display")?i.display:null,r.style.display=Ae("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ps(e,t){if(yi&&"function"==typeof yi.onCommitFiberUnmount)try{yi.onCommitFiberUnmount(bi,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))Il(t,n);else{r=t;try{i()}catch(e){Dl(r,e)}}n=n.next}while(n!==e)}break;case 1:if(us(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Dl(t,e)}break;case 5:us(t);break;case 4:bs(e,t)}}function ms(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gs(e){return 5===e.tag||3===e.tag||4===e.tag}function vs(e){e:{for(var t=e.return;null!==t;){if(gs(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.flags&&(ve(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,a=5===i||6===i;if(a)t=a?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=Lr));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,a=5===i||6===i;if(a)t=a?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function bs(e,t){for(var n,r,i=t,a=!1;;){if(!a){a=i.return;e:for(;;){if(null===a)throw Error(o(160));switch(n=a.stateNode,a.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}a=a.return}a=!0}if(5===i.tag||6===i.tag){e:for(var s=e,l=i,c=l;;)if(ps(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,l=i.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(ps(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function ys(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[Kr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Se(e,i),t=Se(e,r),i=0;i<a.length;i+=2){var s=a[i],l=a[i+1];"style"===s?_e(n,l):"dangerouslySetInnerHTML"===s?ge(n,l):"children"===s?ve(n,l):A(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(a=r.value)?oe(n,!!r.multiple,a,!1):e!==!!r.multiple&&(null!=r.defaultValue?oe(n,!!r.multiple,r.defaultValue,!0):oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,_t(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(js=ji(),fs(t.child,!0)),void As(t);case 19:return void As(t);case 17:return;case 23:case 24:return void fs(t,null!==t.memoizedState)}throw Error(o(163))}function As(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new cs),t.forEach((function(t){var r=Ll.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _s(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var ws=Math.ceil,Es=_.ReactCurrentDispatcher,Ss=_.ReactCurrentOwner,Cs=0,Ts=null,ks=null,xs=0,Os=0,Is=ii(0),Ms=0,Ps=null,Ds=0,Ns=0,Ls=0,Rs=0,Bs=null,js=0,Fs=1/0;function Us(){Fs=ji()+500}var Hs,zs=null,Vs=!1,Ws=null,Gs=null,qs=!1,Ys=null,Ks=90,Xs=[],Qs=[],$s=null,Js=0,Zs=null,el=-1,tl=0,nl=0,rl=null,il=!1;function al(){return 0!=(48&Cs)?ji():-1!==el?el:el=ji()}function ol(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Fi()?1:2;if(0===tl&&(tl=Ds),0!==Gi.transition){0!==nl&&(nl=null!==Bs?Bs.pendingLanes:0),e=tl;var t=4186112&~nl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Fi(),0!=(4&Cs)&&98===e?e=Ft(12,tl):e=Ft(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),tl),e}function sl(e,t,n){if(50<Js)throw Js=0,Zs=null,Error(o(185));if(null===(e=ll(e,t)))return null;zt(e,t,n),e===Ts&&(Ls|=t,4===Ms&&dl(e,xs));var r=Fi();1===t?0!=(8&Cs)&&0==(48&Cs)?hl(e):(cl(e,n),0===Cs&&(Us(),Vi())):(0==(4&Cs)||98!==r&&99!==r||(null===$s?$s=new Set([e]):$s.add(e)),cl(e,n)),Bs=e}function ll(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function cl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Vt(s),c=1<<l,u=a[l];if(-1===u){if(0==(c&r)||0!=(c&i)){u=t,Rt(c);var d=Lt;a[l]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=Bt(e,e===Ts?xs:0),t=Lt,0===r)null!==n&&(n!==Pi&&wi(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Pi&&wi(n)}15===t?(n=hl.bind(null,e),null===Ni?(Ni=[n],Li=_i(ki,Wi)):Ni.push(n),n=Pi):14===t?n=zi(99,hl.bind(null,e)):n=zi(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(o(358,e))}}(t),ul.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function ul(e){if(el=-1,nl=tl=0,0!=(48&Cs))throw Error(o(327));var t=e.callbackNode;if(xl()&&e.callbackNode!==t)return null;var n=Bt(e,e===Ts?xs:0);if(0===n)return null;var r=n,i=Cs;Cs|=16;var a=yl();for(Ts===e&&xs===r||(Us(),vl(e,r));;)try{wl();break}catch(t){bl(e,t)}if($i(),Es.current=a,Cs=i,null!==ks?r=0:(Ts=null,xs=0,r=Ms),0!=(Ds&Ls))vl(e,0);else if(0!==r){if(2===r&&(Cs|=64,e.hydrate&&(e.hydrate=!1,zr(e.containerInfo)),0!==(n=jt(e))&&(r=Al(e,n))),1===r)throw t=Ps,vl(e,0),dl(e,n),cl(e,ji()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(o(345));case 2:Cl(e);break;case 3:if(dl(e,n),(62914560&n)===n&&10<(r=js+500-ji())){if(0!==Bt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){al(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ur(Cl.bind(null,e),r);break}Cl(e);break;case 4:if(dl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-Vt(n);a=1<<s,(s=r[s])>i&&(i=s),n&=~a}if(n=i,10<(n=(120>(n=ji()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ws(n/1960))-n)){e.timeoutHandle=Ur(Cl.bind(null,e),n);break}Cl(e);break;case 5:Cl(e);break;default:throw Error(o(329))}}return cl(e,ji()),e.callbackNode===t?ul.bind(null,e):null}function dl(e,t){for(t&=~Rs,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Vt(t),r=1<<n;e[n]=-1,t&=~r}}function hl(e){if(0!=(48&Cs))throw Error(o(327));if(xl(),e===Ts&&0!=(e.expiredLanes&xs)){var t=xs,n=Al(e,t);0!=(Ds&Ls)&&(n=Al(e,t=Bt(e,t)))}else n=Al(e,t=Bt(e,0));if(0!==e.tag&&2===n&&(Cs|=64,e.hydrate&&(e.hydrate=!1,zr(e.containerInfo)),0!==(t=jt(e))&&(n=Al(e,t))),1===n)throw n=Ps,vl(e,0),dl(e,t),cl(e,ji()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cl(e),cl(e,ji()),null}function fl(e,t){var n=Cs;Cs|=1;try{return e(t)}finally{0===(Cs=n)&&(Us(),Vi())}}function pl(e,t){var n=Cs;Cs&=-2,Cs|=8;try{return e(t)}finally{0===(Cs=n)&&(Us(),Vi())}}function ml(e,t){oi(Is,Os),Os|=t,Ds|=t}function gl(){Os=Is.current,ai(Is)}function vl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Hr(n)),null!==ks)for(n=ks.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&fi();break;case 3:Oa(),ai(ci),ai(li),Wa();break;case 5:Ma(r);break;case 4:Oa();break;case 13:case 19:ai(Pa);break;case 10:Ji(r);break;case 23:case 24:gl()}n=n.return}Ts=e,ks=Fl(e.current,null),xs=Os=Ds=t,Ms=0,Ps=null,Rs=Ls=Ns=0}function bl(e,t){for(;;){var n=ks;try{if($i(),Ga.current=ko,$a){for(var r=Ka.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}$a=!1}if(Ya=0,Qa=Xa=Ka=null,Ja=!1,Ss.current=null,null===n||null===n.return){Ms=1,Ps=t,ks=null;break}e:{var a=e,o=n.return,s=n,l=t;if(t=xs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l;if(0==(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!=(1&Pa.current),h=o;do{var f;if(f=13===h.tag){var p=h.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var m=h.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(f){var g=h.updateQueue;if(null===g){var v=new Set;v.add(c),h.updateQueue=v}else g.add(c);if(0==(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var b=aa(-1,1);b.tag=2,oa(s,b)}s.lanes|=1;break e}l=void 0,s=t;var y=a.pingCache;if(null===y?(y=a.pingCache=new os,l=new Set,y.set(c,l)):void 0===(l=y.get(c))&&(l=new Set,y.set(c,l)),!l.has(s)){l.add(s);var A=Nl.bind(null,a,c,s);c.then(A,A)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);l=Error((Y(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ms&&(Ms=2),l=is(l,s),h=o;do{switch(h.tag){case 3:a=l,h.flags|=4096,t&=-t,h.lanes|=t,sa(h,ss(0,a,t));break e;case 1:a=l;var _=h.type,w=h.stateNode;if(0==(64&h.flags)&&("function"==typeof _.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===Gs||!Gs.has(w)))){h.flags|=4096,t&=-t,h.lanes|=t,sa(h,ls(h,a,t));break e}}h=h.return}while(null!==h)}Sl(n)}catch(e){t=e,ks===n&&null!==n&&(ks=n=n.return);continue}break}}function yl(){var e=Es.current;return Es.current=ko,null===e?ko:e}function Al(e,t){var n=Cs;Cs|=16;var r=yl();for(Ts===e&&xs===t||vl(e,t);;)try{_l();break}catch(t){bl(e,t)}if($i(),Cs=n,Es.current=r,null!==ks)throw Error(o(261));return Ts=null,xs=0,Ms}function _l(){for(;null!==ks;)El(ks)}function wl(){for(;null!==ks&&!Ei();)El(ks)}function El(e){var t=Hs(e.alternate,e,Os);e.memoizedProps=e.pendingProps,null===t?Sl(e):ks=t,Ss.current=null}function Sl(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ns(n,t,Os)))return void(ks=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Os)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=rs(t)))return n.flags&=2047,void(ks=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(ks=t);ks=t=e}while(null!==t);0===Ms&&(Ms=5)}function Cl(e){var t=Fi();return Hi(99,Tl.bind(null,e,t)),null}function Tl(e,t){do{xl()}while(null!==Ys);if(0!=(48&Cs))throw Error(o(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,a=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<a;){var c=31-Vt(a),u=1<<c;i[c]=0,s[c]=-1,l[c]=-1,a&=~u}if(null!==$s&&0==(24&r)&&$s.has(e)&&$s.delete(e),e===Ts&&(ks=Ts=null,xs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Cs,Cs|=32,Ss.current=null,Rr=Kt,hr(s=dr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&0!==u.rangeCount){l=u.anchorNode,a=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch(e){l=null;break e}var d=0,h=-1,f=-1,p=0,m=0,g=s,v=null;t:for(;;){for(var b;g!==l||0!==a&&3!==g.nodeType||(h=d+a),g!==c||0!==u&&3!==g.nodeType||(f=d+u),3===g.nodeType&&(d+=g.nodeValue.length),null!==(b=g.firstChild);)v=g,g=b;for(;;){if(g===s)break t;if(v===l&&++p===a&&(h=d),v===c&&++m===u&&(f=d),null!==(b=g.nextSibling))break;v=(g=v).parentNode}g=b}l=-1===h||-1===f?null:{start:h,end:f}}else l=null;l=l||{start:0,end:0}}else l=null;Br={focusedElem:s,selectionRange:l},Kt=!1,rl=null,il=!1,zs=r;do{try{kl()}catch(e){if(null===zs)throw Error(o(330));Dl(zs,e),zs=zs.nextEffect}}while(null!==zs);rl=null,zs=r;do{try{for(s=e;null!==zs;){var y=zs.flags;if(16&y&&ve(zs.stateNode,""),128&y){var A=zs.alternate;if(null!==A){var _=A.ref;null!==_&&("function"==typeof _?_(null):_.current=null)}}switch(1038&y){case 2:vs(zs),zs.flags&=-3;break;case 6:vs(zs),zs.flags&=-3,ys(zs.alternate,zs);break;case 1024:zs.flags&=-1025;break;case 1028:zs.flags&=-1025,ys(zs.alternate,zs);break;case 4:ys(zs.alternate,zs);break;case 8:bs(s,l=zs);var w=l.alternate;ms(l),null!==w&&ms(w)}zs=zs.nextEffect}}catch(e){if(null===zs)throw Error(o(330));Dl(zs,e),zs=zs.nextEffect}}while(null!==zs);if(_=Br,A=dr(),y=_.focusedElem,s=_.selectionRange,A!==y&&y&&y.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(y.ownerDocument.documentElement,y)){null!==s&&hr(y)&&(A=s.start,void 0===(_=s.end)&&(_=A),"selectionStart"in y?(y.selectionStart=A,y.selectionEnd=Math.min(_,y.value.length)):(_=(A=y.ownerDocument||document)&&A.defaultView||window).getSelection&&(_=_.getSelection(),l=y.textContent.length,w=Math.min(s.start,l),s=void 0===s.end?w:Math.min(s.end,l),!_.extend&&w>s&&(l=s,s=w,w=l),l=ur(y,w),a=ur(y,s),l&&a&&(1!==_.rangeCount||_.anchorNode!==l.node||_.anchorOffset!==l.offset||_.focusNode!==a.node||_.focusOffset!==a.offset)&&((A=A.createRange()).setStart(l.node,l.offset),_.removeAllRanges(),w>s?(_.addRange(A),_.extend(a.node,a.offset)):(A.setEnd(a.node,a.offset),_.addRange(A))))),A=[];for(_=y;_=_.parentNode;)1===_.nodeType&&A.push({element:_,left:_.scrollLeft,top:_.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<A.length;y++)(_=A[y]).element.scrollLeft=_.left,_.element.scrollTop=_.top}Kt=!!Rr,Br=Rr=null,e.current=n,zs=r;do{try{for(y=e;null!==zs;){var E=zs.flags;if(36&E&&hs(y,zs.alternate,zs),128&E){A=void 0;var S=zs.ref;if(null!==S){var C=zs.stateNode;switch(zs.tag){case 5:A=C;break;default:A=C}"function"==typeof S?S(A):S.current=A}}zs=zs.nextEffect}}catch(e){if(null===zs)throw Error(o(330));Dl(zs,e),zs=zs.nextEffect}}while(null!==zs);zs=null,Di(),Cs=i}else e.current=n;if(qs)qs=!1,Ys=e,Ks=t;else for(zs=r;null!==zs;)t=zs.nextEffect,zs.nextEffect=null,8&zs.flags&&((E=zs).sibling=null,E.stateNode=null),zs=t;if(0===(r=e.pendingLanes)&&(Gs=null),1===r?e===Zs?Js++:(Js=0,Zs=e):Js=0,n=n.stateNode,yi&&"function"==typeof yi.onCommitFiberRoot)try{yi.onCommitFiberRoot(bi,n,void 0,64==(64&n.current.flags))}catch(e){}if(cl(e,ji()),Vs)throw Vs=!1,e=Ws,Ws=null,e;return 0!=(8&Cs)?null:(Vi(),null)}function kl(){for(;null!==zs;){var e=zs.alternate;il||null===rl||(0!=(8&zs.flags)?Ze(zs,rl)&&(il=!0):13===zs.tag&&_s(e,zs)&&Ze(zs,rl)&&(il=!0));var t=zs.flags;0!=(256&t)&&ds(e,zs),0==(512&t)||qs||(qs=!0,zi(97,(function(){return xl(),null}))),zs=zs.nextEffect}}function xl(){if(90!==Ks){var e=97<Ks?97:Ks;return Ks=90,Hi(e,Ml)}return!1}function Ol(e,t){Xs.push(t,e),qs||(qs=!0,zi(97,(function(){return xl(),null})))}function Il(e,t){Qs.push(t,e),qs||(qs=!0,zi(97,(function(){return xl(),null})))}function Ml(){if(null===Ys)return!1;var e=Ys;if(Ys=null,0!=(48&Cs))throw Error(o(331));var t=Cs;Cs|=32;var n=Qs;Qs=[];for(var r=0;r<n.length;r+=2){var i=n[r],a=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"==typeof s)try{s()}catch(e){if(null===a)throw Error(o(330));Dl(a,e)}}for(n=Xs,Xs=[],r=0;r<n.length;r+=2){i=n[r],a=n[r+1];try{var l=i.create;i.destroy=l()}catch(e){if(null===a)throw Error(o(330));Dl(a,e)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Cs=t,Vi(),!0}function Pl(e,t,n){oa(e,t=ss(0,t=is(n,t),1)),t=al(),null!==(e=ll(e,1))&&(zt(e,1,t),cl(e,t))}function Dl(e,t){if(3===e.tag)Pl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Pl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Gs||!Gs.has(r))){var i=ls(n,e=is(t,e),1);if(oa(n,i),i=al(),null!==(n=ll(n,1)))zt(n,1,i),cl(n,i);else if("function"==typeof r.componentDidCatch&&(null===Gs||!Gs.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Nl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=al(),e.pingedLanes|=e.suspendedLanes&n,Ts===e&&(xs&n)===n&&(4===Ms||3===Ms&&(62914560&xs)===xs&&500>ji()-js?vl(e,0):Rs|=n),cl(e,t)}function Ll(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Fi()?1:2:(0===tl&&(tl=Ds),0===(t=Ut(62914560&~tl))&&(t=4194304))),n=al(),null!==(e=ll(e,t))&&(zt(e,t,n),cl(e,n))}function Rl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bl(e,t,n,r){return new Rl(e,t,n,r)}function jl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fl(e,t){var n=e.alternate;return null===n?((n=Bl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ul(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)jl(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case S:return Hl(n.children,i,a,t);case R:s=8,i|=16;break;case C:s=8,i|=1;break;case T:return(e=Bl(12,n,t,8|i)).elementType=T,e.type=T,e.lanes=a,e;case I:return(e=Bl(13,n,t,i)).type=I,e.elementType=I,e.lanes=a,e;case M:return(e=Bl(19,n,t,i)).elementType=M,e.lanes=a,e;case B:return zl(n,i,a,t);case j:return(e=Bl(24,n,t,i)).elementType=j,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case k:s=10;break e;case x:s=9;break e;case O:s=11;break e;case P:s=14;break e;case D:s=16,r=null;break e;case N:s=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Bl(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Hl(e,t,n,r){return(e=Bl(7,e,r,t)).lanes=n,e}function zl(e,t,n,r){return(e=Bl(23,e,r,t)).elementType=B,e.lanes=n,e}function Vl(e,t,n){return(e=Bl(6,e,null,t)).lanes=n,e}function Wl(e,t,n){return(t=Bl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.mutableSourceEagerHydrationData=null}function ql(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Yl(e,t,n,r){var i=t.current,a=al(),s=ol(i);e:if(n){t:{if(Xe(n=n._reactInternals)!==n||1!==n.tag)throw Error(o(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(hi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(o(171))}if(1===n.tag){var c=n.type;if(hi(c)){n=mi(n,c,l);break e}}n=l}else n=si;return null===t.context?t.context=n:t.pendingContext=n,(t=aa(a,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),oa(i,t),sl(i,s,a),s}function Kl(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Xl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ql(e,t){Xl(e,t),(e=e.alternate)&&Xl(e,t)}function $l(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Gl(e,t,null!=n&&!0===n.hydrate),t=Bl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ra(t),e[Xr]=n.current,kr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zl(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=Kl(o);s.call(e)}}Yl(t,o,e,i)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new $l(e,0,t?{hydrate:!0}:void 0)}(n,r),o=a._internalRoot,"function"==typeof i){var l=i;i=function(){var e=Kl(o);l.call(e)}}pl((function(){Yl(t,o,e,i)}))}return Kl(o)}function ec(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Jl(t))throw Error(o(200));return ql(e,t,null,n)}Hs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||ci.current)Po=!0;else{if(0==(n&r)){switch(Po=!1,t.tag){case 3:zo(t),za();break;case 5:Ia(t);break;case 1:hi(t.type)&&gi(t);break;case 4:xa(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;oi(Yi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?Yo(e,t,n):(oi(Pa,1&Pa.current),null!==(t=es(e,t,n))?t.sibling:null);oi(Pa,1&Pa.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return Zo(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),oi(Pa,Pa.current),r)break;return null;case 23:case 24:return t.lanes=0,Bo(e,t,n)}return es(e,t,n)}Po=0!=(16384&e.flags)}else Po=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=di(t,li.current),ea(t,n),i=to(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,hi(r)){var a=!0;gi(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ra(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&da(t,r,s,e),i.updater=ha,t.stateNode=i,i._reactInternals=t,ga(t,r,e,n),t=Ho(null,t,r,!0,a,n)}else t.tag=0,Do(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(a=i._init)(i._payload),t.type=i,a=t.tag=function(e){if("function"==typeof e)return jl(e)?1:0;if(null!=e){if((e=e.$$typeof)===O)return 11;if(e===P)return 14}return 2}(i),e=qi(i,e),a){case 0:t=Fo(null,t,i,e,n);break e;case 1:t=Uo(null,t,i,e,n);break e;case 11:t=No(null,t,i,e,n);break e;case 14:t=Lo(null,t,i,qi(i.type,e),r,n);break e}throw Error(o(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Fo(e,t,r,i=t.elementType===r?i:qi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Uo(e,t,r,i=t.elementType===r?i:qi(r,i),n);case 3:if(zo(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ia(e,t),la(t,r,null,n),(r=t.memoizedState.element)===i)za(),t=es(e,t,n);else{if((a=(i=t.stateNode).hydrate)&&(La=Vr(t.stateNode.containerInfo.firstChild),Na=t,a=Ra=!0),a){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(a=e[i])._workInProgressVersionPrimary=e[i+1],Va.push(a);for(n=wa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Do(e,t,r,n),za();t=t.child}return t;case 5:return Ia(t),null===e&&Fa(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,Fr(r,i)?s=null:null!==a&&Fr(r,a)&&(t.flags|=16),jo(e,t),Do(e,t,s,n),t.child;case 6:return null===e&&Fa(t),null;case 13:return Yo(e,t,n);case 4:return xa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_a(t,null,r,n):Do(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,No(e,t,r,i=t.elementType===r?i:qi(r,i),n);case 7:return Do(e,t,t.pendingProps,n),t.child;case 8:case 12:return Do(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value;var l=t.type._context;if(oi(Yi,l._currentValue),l._currentValue=a,null!==s)if(l=s.value,0===(a=or(l,a)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,a):1073741823))){if(s.children===i.children&&!ci.current){t=es(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&a)){1===l.tag&&((u=aa(-1,n&-n)).tag=2,oa(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),Zi(l.return,n),c.lanes|=n;break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Do(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(a=t.pendingProps).children,ea(t,n),r=r(i=ta(i,a.unstable_observedBits)),t.flags|=1,Do(e,t,r,n),t.child;case 14:return a=qi(i=t.type,t.pendingProps),Lo(e,t,i,a=qi(i.type,a),r,n);case 15:return Ro(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,hi(r)?(e=!0,gi(t)):e=!1,ea(t,n),pa(t,r,i),ga(t,r,i,n),Ho(null,t,r,!0,e,n);case 19:return Zo(e,t,n);case 23:case 24:return Bo(e,t,n)}throw Error(o(156,t.tag))},$l.prototype.render=function(e){Yl(e,this._internalRoot,null,null)},$l.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Yl(null,e,null,(function(){t[Xr]=null}))},et=function(e){13===e.tag&&(sl(e,4,al()),Ql(e,4))},tt=function(e){13===e.tag&&(sl(e,67108864,al()),Ql(e,67108864))},nt=function(e){if(13===e.tag){var t=al(),n=ol(e);sl(e,n,t),Ql(e,n)}},rt=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ei(r);if(!i)throw Error(o(90));$(r),ne(r,i)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&oe(e,!!n.multiple,t,!1)}},Pe=fl,De=function(e,t,n,r,i){var a=Cs;Cs|=4;try{return Hi(98,e.bind(null,t,n,r,i))}finally{0===(Cs=a)&&(Us(),Vi())}},Ne=function(){0==(49&Cs)&&(function(){if(null!==$s){var e=$s;$s=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,cl(e,ji())}))}Vi()}(),xl())},Le=function(e,t){var n=Cs;Cs|=2;try{return e(t)}finally{0===(Cs=n)&&(Us(),Vi())}};var tc={Events:[Jr,Zr,ei,Ie,Me,xl,{current:!1}]},nc={findFiberByHostInstance:$r,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{bi=ic.inject(rc),yi=ic}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=ec,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)))}return e=null===(e=Je(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Cs;if(0!=(48&n))return e(t);Cs|=1;try{if(e)return Hi(99,e.bind(null,t))}finally{Cs=n,Vi()}},t.hydrate=function(e,t,n){if(!Jl(t))throw Error(o(200));return Zl(null,e,t,!0,n)},t.render=function(e,t,n){if(!Jl(t))throw Error(o(200));return Zl(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(o(40));return!!e._reactRootContainer&&(pl((function(){Zl(null,null,e,!1,(function(){e._reactRootContainer=null,e[Xr]=null}))})),!0)},t.unstable_batchedUpdates=fl,t.unstable_createPortal=function(e,t){return ec(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jl(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Zl(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(1061)},function(e,t,n){"use strict";
/** @license React v0.20.2
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r,i,a,o;if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,d=null,h=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(h,0),e}};r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(h,0))},i=function(e,t){d=setTimeout(e,t)},a=function(){clearTimeout(d)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,v=null,b=-1,y=5,A=0;t.unstable_shouldYield=function(){return t.unstable_now()>=A},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<e?Math.floor(1e3/e):5};var _=new MessageChannel,w=_.port2;_.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();A=e+y;try{v(!0,e)?w.postMessage(null):(g=!1,v=null)}catch(e){throw w.postMessage(null),e}}else g=!1},r=function(e){v=e,g||(g=!0,w.postMessage(null))},i=function(e,n){b=f((function(){e(t.unstable_now())}),n)},a=function(){p(b),b=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<T(i,t)))break e;e[r]=t,e[n]=i,n=r}}function S(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],s=a+1,l=e[s];if(void 0!==o&&0>T(o,n))void 0!==l&&0>T(l,o)?(e[r]=l,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==l&&0>T(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var k=[],x=[],O=1,I=null,M=3,P=!1,D=!1,N=!1;function L(e){for(var t=S(x);null!==t;){if(null===t.callback)C(x);else{if(!(t.startTime<=e))break;C(x),t.sortIndex=t.expirationTime,E(k,t)}t=S(x)}}function R(e){if(N=!1,L(e),!D)if(null!==S(k))D=!0,r(B);else{var t=S(x);null!==t&&i(R,t.startTime-e)}}function B(e,n){D=!1,N&&(N=!1,a()),P=!0;var r=M;try{for(L(n),I=S(k);null!==I&&(!(I.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=I.callback;if("function"==typeof o){I.callback=null,M=I.priorityLevel;var s=o(I.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?I.callback=s:I===S(k)&&C(k),L(n)}else C(k);I=S(k)}if(null!==I)var l=!0;else{var c=S(x);null!==c&&i(R,c.startTime-n),l=!1}return l}finally{I=null,M=r,P=!1}}var j=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){D||P||(D=!0,r(B))},t.unstable_getCurrentPriorityLevel=function(){return M},t.unstable_getFirstCallbackNode=function(){return S(k)},t.unstable_next=function(e){switch(M){case 1:case 2:case 3:var t=3;break;default:t=M}var n=M;M=t;try{return e()}finally{M=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=M;M=e;try{return t()}finally{M=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?s+o:s:o=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:O++,callback:n,priorityLevel:e,startTime:o,expirationTime:l=o+l,sortIndex:-1},o>s?(e.sortIndex=o,E(x,e),null===S(k)&&e===S(x)&&(N?a():N=!0,i(R,o-s))):(e.sortIndex=l,E(k,e),D||P||(D=!0,r(B))),e},t.unstable_wrapCallback=function(e){var t=M;return function(){var n=M;M=t;try{return e.apply(this,arguments)}finally{M=n}}}},function(e,t,n){"use strict";var r=n(1063);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";
/** @license React v16.12.0
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.fundamental"):60117,y=r?Symbol.for("react.responder"):60118,A=r?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case h:case o:case l:case s:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case g:case c:return e;default:return t}}case a:return t}}}function w(e){return _(e)===h}t.typeOf=_,t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=c,t.Element=i,t.ForwardRef=f,t.Fragment=o,t.Lazy=v,t.Memo=g,t.Portal=a,t.Profiler=l,t.StrictMode=s,t.Suspense=p,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===l||e===s||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===y||e.$$typeof===A)},t.isAsyncMode=function(e){return w(e)||_(e)===d},t.isConcurrentMode=w,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===o},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===g},t.isPortal=function(e){return _(e)===a},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===p}},function(e,t,n){(function(e){!function(t){"use strict";function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function r(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function i(e,t,n){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function a(e,t){a.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function o(e,t){o.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,n){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function l(e,t,n){var r=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,r),e}function c(e){var t=void 0===e?"undefined":E(e);return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function u(e,t,n,r,d,h,f){f=f||[];var p=(d=d||[]).slice(0);if(void 0!==h){if(r){if("function"==typeof r&&r(p,h))return;if("object"===(void 0===r?"undefined":E(r))){if(r.prefilter&&r.prefilter(p,h))return;if(r.normalize){var m=r.normalize(p,h,e,t);m&&(e=m[0],t=m[1])}}}p.push(h)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var g=void 0===e?"undefined":E(e),v=void 0===t?"undefined":E(t),b="undefined"!==g||f&&f[f.length-1].lhs&&f[f.length-1].lhs.hasOwnProperty(h),y="undefined"!==v||f&&f[f.length-1].rhs&&f[f.length-1].rhs.hasOwnProperty(h);if(!b&&y)n(new a(p,t));else if(!y&&b)n(new o(p,e));else if(c(e)!==c(t))n(new i(p,e,t));else if("date"===c(e)&&e-t!=0)n(new i(p,e,t));else if("object"===g&&null!==e&&null!==t)if(f.filter((function(t){return t.lhs===e})).length)e!==t&&n(new i(p,e,t));else{if(f.push({lhs:e,rhs:t}),Array.isArray(e)){var A;for(e.length,A=0;A<e.length;A++)A>=t.length?n(new s(p,A,new o(void 0,e[A]))):u(e[A],t[A],n,r,p,A,f);for(;A<t.length;)n(new s(p,A,new a(void 0,t[A++])))}else{var _=Object.keys(e),w=Object.keys(t);_.forEach((function(i,a){var o=w.indexOf(i);o>=0?(u(e[i],t[i],n,r,p,i,f),w=l(w,o)):u(e[i],void 0,n,r,p,i,f)})),w.forEach((function(e){u(void 0,t[e],n,r,p,e,f)}))}f.length=f.length-1}else e!==t&&("number"===g&&isNaN(e)&&isNaN(t)||n(new i(p,e,t)))}function d(e,t,n,r){return r=r||[],u(e,t,(function(e){e&&r.push(e)}),n),r.length?r:void 0}function h(e,t,n){if(e&&t&&n&&n.kind){for(var r=e,i=-1,a=n.path?n.path.length-1:0;++i<a;)void 0===r[n.path[i]]&&(r[n.path[i]]="number"==typeof n.path[i]?[]:{}),r=r[n.path[i]];switch(n.kind){case"A":!function e(t,n,r){if(r.path&&r.path.length){var i,a=t[n],o=r.path.length-1;for(i=0;i<o;i++)a=a[r.path[i]];switch(r.kind){case"A":e(a[r.path[i]],r.index,r.item);break;case"D":delete a[r.path[i]];break;case"E":case"N":a[r.path[i]]=r.rhs}}else switch(r.kind){case"A":e(t[n],r.index,r.item);break;case"D":t=l(t,n);break;case"E":case"N":t[n]=r.rhs}return t}(n.path?r[n.path[i]]:r,n.index,n.item);break;case"D":delete r[n.path[i]];break;case"E":case"N":r[n.path[i]]=n.rhs}}}function f(e){return"color: "+T[e].color+"; font-weight: bold"}function p(e,t,n,r){var i=d(e,t);try{r?n.groupCollapsed("diff"):n.group("diff")}catch(e){n.log("diff")}i?i.forEach((function(e){var t=e.kind,r=function(e){var t=e.kind,n=e.path,r=e.lhs,i=e.rhs,a=e.index,o=e.item;switch(t){case"E":return[n.join("."),r,"→",i];case"N":return[n.join("."),i];case"D":return[n.join(".")];case"A":return[n.join(".")+"["+a+"]",o];default:return[]}}(e);n.log.apply(n,["%c "+T[t].text,f(t)].concat(S(r)))})):n.log("—— no diff ——");try{n.groupEnd()}catch(e){n.log("—— diff end —— ")}}function m(e,t,n,r){switch(void 0===e?"undefined":E(e)){case"object":return"function"==typeof e[r]?e[r].apply(e,S(n)):e[r];case"function":return e(t);default:return e}}function g(e,t){var n=t.logger,r=t.actionTransformer,i=t.titleFormatter,a=void 0===i?function(e){var t=e.timestamp,n=e.duration;return function(e,r,i){var a=["action"];return a.push("%c"+String(e.type)),t&&a.push("%c@ "+r),n&&a.push("%c(in "+i.toFixed(2)+" ms)"),a.join(" ")}}(t):i,o=t.collapsed,s=t.colors,l=t.level,c=t.diff,u=void 0===t.titleFormatter;e.forEach((function(i,d){var h=i.started,f=i.startedTime,g=i.action,v=i.prevState,b=i.error,y=i.took,A=i.nextState,w=e[d+1];w&&(A=w.prevState,y=w.started-h);var E=r(g),S="function"==typeof o?o((function(){return A}),g,i):o,C=_(f),T=s.title?"color: "+s.title(E)+";":"",k=["color: gray; font-weight: lighter;"];k.push(T),t.timestamp&&k.push("color: gray; font-weight: lighter;"),t.duration&&k.push("color: gray; font-weight: lighter;");var x=a(E,C,y);try{S?s.title&&u?n.groupCollapsed.apply(n,["%c "+x].concat(k)):n.groupCollapsed(x):s.title&&u?n.group.apply(n,["%c "+x].concat(k)):n.group(x)}catch(e){n.log(x)}var O=m(l,E,[v],"prevState"),I=m(l,E,[E],"action"),M=m(l,E,[b,v],"error"),P=m(l,E,[A],"nextState");if(O)if(s.prevState){var D="color: "+s.prevState(v)+"; font-weight: bold";n[O]("%c prev state",D,v)}else n[O]("prev state",v);if(I)if(s.action){var N="color: "+s.action(E)+"; font-weight: bold";n[I]("%c action    ",N,E)}else n[I]("action    ",E);if(b&&M)if(s.error){var L="color: "+s.error(b,v)+"; font-weight: bold;";n[M]("%c error     ",L,b)}else n[M]("error     ",b);if(P)if(s.nextState){var R="color: "+s.nextState(A)+"; font-weight: bold";n[P]("%c next state",R,A)}else n[P]("next state",A);c&&p(v,A,n,S);try{n.groupEnd()}catch(e){n.log("—— log end ——")}}))}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},k,e),n=t.logger,r=t.stateTransformer,i=t.errorTransformer,a=t.predicate,o=t.logErrors,s=t.diffPredicate;if(void 0===n)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n  reducer,\n  applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n  // ...options\n});\nconst store = createStore(\n  reducer,\n  applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t)}}};var l=[];return function(e){var n=e.getState;return function(e){return function(c){if("function"==typeof a&&!a(n,c))return e(c);var u={};l.push(u),u.started=w.now(),u.startedTime=new Date,u.prevState=r(n()),u.action=c;var d=void 0;if(o)try{d=e(c)}catch(e){u.error=i(e)}else d=e(c);u.took=w.now()-u.started,u.nextState=r(n());var h=t.diff&&"function"==typeof s?s(n,c):t.diff;if(g(l,Object.assign({},t,{diff:h})),l.length=0,u.error)throw u.error;return d}}}}var b,y,A=function(e,t){return function(e,t){return new Array(t+1).join(e)}("0",t-e.toString().length)+e},_=function(e){return A(e.getHours(),2)+":"+A(e.getMinutes(),2)+":"+A(e.getSeconds(),2)+"."+A(e.getMilliseconds(),3)},w="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,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},S=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},C=[];b="object"===(void 0===e?"undefined":E(e))&&e?e:"undefined"!=typeof window?window:{},(y=b.DeepDiff)&&C.push((function(){void 0!==y&&b.DeepDiff===d&&(b.DeepDiff=y,y=void 0)})),n(i,r),n(a,r),n(o,r),n(s,r),Object.defineProperties(d,{diff:{value:d,enumerable:!0},observableDiff:{value:u,enumerable:!0},applyDiff:{value:function(e,t,n){e&&t&&u(e,t,(function(r){n&&!n(e,t,r)||h(e,t,r)}))},enumerable:!0},applyChange:{value:h,enumerable:!0},revertChange:{value:function(e,t,n){if(e&&t&&n&&n.kind){var r,i,a=e;for(i=n.path.length-1,r=0;r<i;r++)void 0===a[n.path[r]]&&(a[n.path[r]]={}),a=a[n.path[r]];switch(n.kind){case"A":!function e(t,n,r){if(r.path&&r.path.length){var i,a=t[n],o=r.path.length-1;for(i=0;i<o;i++)a=a[r.path[i]];switch(r.kind){case"A":e(a[r.path[i]],r.index,r.item);break;case"D":case"E":a[r.path[i]]=r.lhs;break;case"N":delete a[r.path[i]]}}else switch(r.kind){case"A":e(t[n],r.index,r.item);break;case"D":case"E":t[n]=r.lhs;break;case"N":t=l(t,n)}return t}(a[n.path[r]],n.index,n.item);break;case"D":case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]]}}},enumerable:!0},isConflict:{value:function(){return void 0!==y},enumerable:!0},noConflict:{value:function(){return C&&(C.forEach((function(e){e()})),C=null),d},enumerable:!0}});var T={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},k={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(e){return e},actionTransformer:function(e){return e},errorTransformer:function(e){return e},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,n=e.getState;return"function"==typeof t||"function"==typeof n?v()({dispatch:t,getState:n}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};t.defaults=k,t.createLogger=v,t.logger=x,t.default=x,Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,n(68))},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";var r=n(154),i=n(583),a=n(1069),o=n(589);function s(e){var t=new a(e),n=i(a.prototype.request,t);return r.extend(n,a.prototype,t),r.extend(n,t),n}var l=s(n(443));l.Axios=a,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=n(590),l.CancelToken=n(1083),l.isCancel=n(588),l.all=function(e){return Promise.all(e)},l.spread=n(1084),l.isAxiosError=n(1085),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var r=n(154),i=n(584),a=n(1070),o=n(1071),s=n(589),l=n(1081),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var u=[o,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var d=e;n.length;){var h=n.shift(),f=n.shift();try{d=h(d)}catch(e){f(e);break}}try{i=o(d)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(154);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(154),i=n(1072),a=n(588),o=n(443);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(154),i=n(443);e.exports=function(e,t,n){var a=this||i;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},function(e,t,n){"use strict";var r=n(154);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(587);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(154);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(1077),i=n(1078);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(154),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){"use strict";var r=n(154);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(1082),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={},o=r.version.split(".");function s(e,t){for(var n=t?t.split("."):o,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(e,t,n){var i=t&&s(t);function o(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(o(r," has been removed in "+t));return i&&!a[r]&&(a[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],o=t[a];if(o){var s=e[a],l=void 0===s||o(s,a,e);if(!0!==l)throw new TypeError("option "+a+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:i}},function(e){e.exports=JSON.parse('{"_args":[["axios@0.21.4","/home/jenkins/workspace/mm-web-frontend-aws-prd-deploy"]],"_from":"axios@0.21.4","_id":"axios@0.21.4","_inBundle":false,"_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.4","name":"axios","escapedName":"axios","rawSpec":"0.21.4","saveSpec":null,"fetchSpec":"0.21.4"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_spec":"0.21.4","_where":"/home/jenkins/workspace/mm-web-frontend-aws-prd-deploy","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}')},function(e,t,n){"use strict";var r=n(590);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){var r,i,a;//! moment-timezone.js
//! version : 0.5.33
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
!function(o,s){"use strict";e.exports?e.exports=s(n(21)):(i=[n(21)],void 0===(a="function"==typeof(r=s)?r.apply(t,i):r)||(e.exports=a))}(0,(function(e){"use strict";void 0===e.version&&e.default&&(e=e.default);var t,n={},r={},i={},a={},o={};e&&"string"==typeof e.version||O("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var s=e.version.split("."),l=+s[0],c=+s[1];function u(e){return e>96?e-87:e>64?e-29:e-48}function d(e){var t=0,n=e.split("."),r=n[0],i=n[1]||"",a=1,o=0,s=1;for(45===e.charCodeAt(0)&&(t=1,s=-1);t<r.length;t++)o=60*o+u(r.charCodeAt(t));for(t=0;t<i.length;t++)a/=60,o+=u(i.charCodeAt(t))*a;return o*s}function h(e){for(var t=0;t<e.length;t++)e[t]=d(e[t])}function f(e,t){var n,r=[];for(n=0;n<t.length;n++)r[n]=e[t[n]];return r}function p(e){var t=e.split("|"),n=t[2].split(" "),r=t[3].split(""),i=t[4].split(" ");return h(n),h(r),h(i),function(e,t){for(var n=0;n<t;n++)e[n]=Math.round((e[n-1]||0)+6e4*e[n]);e[t-1]=1/0}(i,r.length),{name:t[0],abbrs:f(t[1].split(" "),r),offsets:f(n,r),untils:i,population:0|t[5]}}function m(e){e&&this._set(p(e))}function g(e,t){this.name=e,this.zones=t}function v(e){var t=e.toTimeString(),n=t.match(/\([a-z ]+\)/i);"GMT"===(n=n&&n[0]?(n=n[0].match(/[A-Z]/g))?n.join(""):void 0:(n=t.match(/[A-Z]{3,5}/g))?n[0]:void 0)&&(n=void 0),this.at=+e,this.abbr=n,this.offset=e.getTimezoneOffset()}function b(e){this.zone=e,this.offsetScore=0,this.abbrScore=0}function y(e,t){for(var n,r;r=6e4*((t.at-e.at)/12e4|0);)(n=new v(new Date(e.at+r))).offset===e.offset?e=n:t=n;return e}function A(e,t){return e.offsetScore!==t.offsetScore?e.offsetScore-t.offsetScore:e.abbrScore!==t.abbrScore?e.abbrScore-t.abbrScore:e.zone.population!==t.zone.population?t.zone.population-e.zone.population:t.zone.name.localeCompare(e.zone.name)}function _(e,t){var n,r;for(h(t),n=0;n<t.length;n++)r=t[n],o[r]=o[r]||{},o[r][e]=!0}function w(e){var t,n,r,i=e.length,s={},l=[];for(t=0;t<i;t++)for(n in r=o[e[t].offset]||{})r.hasOwnProperty(n)&&(s[n]=!0);for(t in s)s.hasOwnProperty(t)&&l.push(a[t]);return l}function E(){try{var e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e&&e.length>3){var t=a[S(e)];if(t)return t;O("Moment Timezone found "+e+" from the Intl api, but did not have that data loaded.")}}catch(e){}var n,r,i,o=function(){var e,t,n,r=(new Date).getFullYear()-2,i=new v(new Date(r,0,1)),a=[i];for(n=1;n<48;n++)(t=new v(new Date(r,n,1))).offset!==i.offset&&(e=y(i,t),a.push(e),a.push(new v(new Date(e.at+6e4)))),i=t;for(n=0;n<4;n++)a.push(new v(new Date(r+n,0,1))),a.push(new v(new Date(r+n,6,1)));return a}(),s=o.length,l=w(o),c=[];for(r=0;r<l.length;r++){for(n=new b(T(l[r]),s),i=0;i<s;i++)n.scoreOffsetAt(o[i]);c.push(n)}return c.sort(A),c.length>0?c[0].zone.name:void 0}function S(e){return(e||"").toLowerCase().replace(/\//g,"_")}function C(e){var t,r,i,o;for("string"==typeof e&&(e=[e]),t=0;t<e.length;t++)o=S(r=(i=e[t].split("|"))[0]),n[o]=e[t],a[o]=r,_(o,i[2].split(" "))}function T(e,t){e=S(e);var i,o=n[e];return o instanceof m?o:"string"==typeof o?(o=new m(o),n[e]=o,o):r[e]&&t!==T&&(i=T(r[e],T))?((o=n[e]=new m)._set(i),o.name=a[e],o):null}function k(e){var t,n,i,o;for("string"==typeof e&&(e=[e]),t=0;t<e.length;t++)i=S((n=e[t].split("|"))[0]),o=S(n[1]),r[i]=o,a[i]=n[0],r[o]=i,a[o]=n[1]}function x(e){var t="X"===e._f||"x"===e._f;return!(!e._a||void 0!==e._tzm||t)}function O(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e)}function I(t){var n=Array.prototype.slice.call(arguments,0,-1),r=arguments[arguments.length-1],i=T(r),a=e.utc.apply(null,n);return i&&!e.isMoment(t)&&x(a)&&a.add(i.parse(a),"minutes"),a.tz(r),a}(l<2||2===l&&c<6)&&O("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+e.version+". See momentjs.com"),m.prototype={_set:function(e){this.name=e.name,this.abbrs=e.abbrs,this.untils=e.untils,this.offsets=e.offsets,this.population=e.population},_index:function(e){var t,n=+e,r=this.untils;for(t=0;t<r.length;t++)if(n<r[t])return t},countries:function(){var e=this.name;return Object.keys(i).filter((function(t){return-1!==i[t].zones.indexOf(e)}))},parse:function(e){var t,n,r,i,a=+e,o=this.offsets,s=this.untils,l=s.length-1;for(i=0;i<l;i++)if(t=o[i],n=o[i+1],r=o[i?i-1:i],t<n&&I.moveAmbiguousForward?t=n:t>r&&I.moveInvalidForward&&(t=r),a<s[i]-6e4*t)return o[i];return o[l]},abbr:function(e){return this.abbrs[this._index(e)]},offset:function(e){return O("zone.offset has been deprecated in favor of zone.utcOffset"),this.offsets[this._index(e)]},utcOffset:function(e){return this.offsets[this._index(e)]}},b.prototype.scoreOffsetAt=function(e){this.offsetScore+=Math.abs(this.zone.utcOffset(e.at)-e.offset),this.zone.abbr(e.at).replace(/[^A-Z]/g,"")!==e.abbr&&this.abbrScore++},I.version="0.5.33",I.dataVersion="",I._zones=n,I._links=r,I._names=a,I._countries=i,I.add=C,I.link=k,I.load=function(e){C(e.zones),k(e.links),function(e){var t,n,r,a;if(e&&e.length)for(t=0;t<e.length;t++)n=(a=e[t].split("|"))[0].toUpperCase(),r=a[1].split(" "),i[n]=new g(n,r)}(e.countries),I.dataVersion=e.version},I.zone=T,I.zoneExists=function e(t){return e.didShowError||(e.didShowError=!0,O("moment.tz.zoneExists('"+t+"') has been deprecated in favor of !moment.tz.zone('"+t+"')")),!!T(t)},I.guess=function(e){return t&&!e||(t=E()),t},I.names=function(){var e,t=[];for(e in a)a.hasOwnProperty(e)&&(n[e]||n[r[e]])&&a[e]&&t.push(a[e]);return t.sort()},I.Zone=m,I.unpack=p,I.unpackBase60=d,I.needsOffset=x,I.moveInvalidForward=!0,I.moveAmbiguousForward=!1,I.countries=function(){return Object.keys(i)},I.zonesForCountry=function(e,t){var n;if(n=(n=e).toUpperCase(),!(e=i[n]||null))return null;var r=e.zones.sort();return t?r.map((function(e){return{name:e,offset:T(e).utcOffset(new Date)}})):r};var M,P=e.fn;function D(e){return function(){return this._z?this._z.abbr(this):e.call(this)}}function N(e){return function(){return this._z=null,e.apply(this,arguments)}}e.tz=I,e.defaultZone=null,e.updateOffset=function(t,n){var r,i=e.defaultZone;if(void 0===t._z&&(i&&x(t)&&!t._isUTC&&(t._d=e.utc(t._a)._d,t.utc().add(i.parse(t),"minutes")),t._z=i),t._z)if(r=t._z.utcOffset(t),Math.abs(r)<16&&(r/=60),void 0!==t.utcOffset){var a=t._z;t.utcOffset(-r,n),t._z=a}else t.zone(r,n)},P.tz=function(t,n){if(t){if("string"!=typeof t)throw new Error("Time zone name must be a string, got "+t+" ["+typeof t+"]");return this._z=T(t),this._z?e.updateOffset(this,n):O("Moment Timezone has no data for "+t+". See http://momentjs.com/timezone/docs/#/data-loading/."),this}if(this._z)return this._z.name},P.zoneName=D(P.zoneName),P.zoneAbbr=D(P.zoneAbbr),P.utc=N(P.utc),P.local=N(P.local),P.utcOffset=(M=P.utcOffset,function(){return arguments.length>0&&(this._z=null),M.apply(this,arguments)}),e.tz.setDefault=function(t){return(l<2||2===l&&c<9)&&O("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+e.version+"."),e.defaultZone=t?T(t):null,e};var L=e.momentProperties;return"[object Array]"===Object.prototype.toString.call(L)?(L.push("_z"),L.push("_a")):L&&(L._z=null),e}))},function(e,t,n){var r={"./af":591,"./af.js":591,"./ar":592,"./ar-dz":593,"./ar-dz.js":593,"./ar-kw":594,"./ar-kw.js":594,"./ar-ly":595,"./ar-ly.js":595,"./ar-ma":596,"./ar-ma.js":596,"./ar-sa":597,"./ar-sa.js":597,"./ar-tn":598,"./ar-tn.js":598,"./ar.js":592,"./az":599,"./az.js":599,"./be":600,"./be.js":600,"./bg":601,"./bg.js":601,"./bm":602,"./bm.js":602,"./bn":603,"./bn.js":603,"./bo":604,"./bo.js":604,"./br":605,"./br.js":605,"./bs":606,"./bs.js":606,"./ca":607,"./ca.js":607,"./cs":608,"./cs.js":608,"./cv":609,"./cv.js":609,"./cy":610,"./cy.js":610,"./da":611,"./da.js":611,"./de":612,"./de-at":613,"./de-at.js":613,"./de-ch":614,"./de-ch.js":614,"./de.js":612,"./dv":615,"./dv.js":615,"./el":616,"./el.js":616,"./en-SG":617,"./en-SG.js":617,"./en-au":618,"./en-au.js":618,"./en-ca":619,"./en-ca.js":619,"./en-gb":620,"./en-gb.js":620,"./en-ie":621,"./en-ie.js":621,"./en-il":622,"./en-il.js":622,"./en-nz":623,"./en-nz.js":623,"./eo":624,"./eo.js":624,"./es":625,"./es-do":626,"./es-do.js":626,"./es-us":627,"./es-us.js":627,"./es.js":625,"./et":628,"./et.js":628,"./eu":629,"./eu.js":629,"./fa":630,"./fa.js":630,"./fi":631,"./fi.js":631,"./fo":632,"./fo.js":632,"./fr":633,"./fr-ca":634,"./fr-ca.js":634,"./fr-ch":635,"./fr-ch.js":635,"./fr.js":633,"./fy":636,"./fy.js":636,"./ga":637,"./ga.js":637,"./gd":638,"./gd.js":638,"./gl":639,"./gl.js":639,"./gom-latn":640,"./gom-latn.js":640,"./gu":641,"./gu.js":641,"./he":642,"./he.js":642,"./hi":643,"./hi.js":643,"./hr":644,"./hr.js":644,"./hu":645,"./hu.js":645,"./hy-am":646,"./hy-am.js":646,"./id":647,"./id.js":647,"./is":648,"./is.js":648,"./it":649,"./it-ch":650,"./it-ch.js":650,"./it.js":649,"./ja":651,"./ja.js":651,"./jv":652,"./jv.js":652,"./ka":653,"./ka.js":653,"./kk":654,"./kk.js":654,"./km":655,"./km.js":655,"./kn":656,"./kn.js":656,"./ko":657,"./ko.js":657,"./ku":658,"./ku.js":658,"./ky":659,"./ky.js":659,"./lb":660,"./lb.js":660,"./lo":661,"./lo.js":661,"./lt":662,"./lt.js":662,"./lv":663,"./lv.js":663,"./me":664,"./me.js":664,"./mi":665,"./mi.js":665,"./mk":666,"./mk.js":666,"./ml":667,"./ml.js":667,"./mn":668,"./mn.js":668,"./mr":669,"./mr.js":669,"./ms":670,"./ms-my":671,"./ms-my.js":671,"./ms.js":670,"./mt":672,"./mt.js":672,"./my":673,"./my.js":673,"./nb":674,"./nb.js":674,"./ne":675,"./ne.js":675,"./nl":676,"./nl-be":677,"./nl-be.js":677,"./nl.js":676,"./nn":678,"./nn.js":678,"./pa-in":679,"./pa-in.js":679,"./pl":680,"./pl.js":680,"./pt":681,"./pt-br":682,"./pt-br.js":682,"./pt.js":681,"./ro":683,"./ro.js":683,"./ru":684,"./ru.js":684,"./sd":685,"./sd.js":685,"./se":686,"./se.js":686,"./si":687,"./si.js":687,"./sk":688,"./sk.js":688,"./sl":689,"./sl.js":689,"./sq":690,"./sq.js":690,"./sr":691,"./sr-cyrl":692,"./sr-cyrl.js":692,"./sr.js":691,"./ss":693,"./ss.js":693,"./sv":694,"./sv.js":694,"./sw":695,"./sw.js":695,"./ta":696,"./ta.js":696,"./te":697,"./te.js":697,"./tet":698,"./tet.js":698,"./tg":699,"./tg.js":699,"./th":700,"./th.js":700,"./tl-ph":701,"./tl-ph.js":701,"./tlh":702,"./tlh.js":702,"./tr":703,"./tr.js":703,"./tzl":704,"./tzl.js":704,"./tzm":705,"./tzm-latn":706,"./tzm-latn.js":706,"./tzm.js":705,"./ug-cn":707,"./ug-cn.js":707,"./uk":708,"./uk.js":708,"./ur":709,"./ur.js":709,"./uz":710,"./uz-latn":711,"./uz-latn.js":711,"./uz.js":710,"./vi":712,"./vi.js":712,"./x-pseudo":713,"./x-pseudo.js":713,"./yo":714,"./yo.js":714,"./zh-cn":715,"./zh-cn.js":715,"./zh-hk":716,"./zh-hk.js":716,"./zh-tw":717,"./zh-tw.js":717};function i(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=a,e.exports=i,i.id=1087},function(e){e.exports=JSON.parse('{"version":"2021a","zones":["Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5","Africa/Accra|LMT GMT +0020 +0030|.Q 0 -k -u|01212121212121212121212121212121212121212121212131313131313131|-2bRzX.8 9RbX.8 fdE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE Mok 1BXE M0k 1BXE fak 9vbu bjCu MLu 1Bcu MLu 1BAu MLu 1Bcu MLu 1Bcu MLu 1Bcu MLu|41e5","Africa/Nairobi|LMT +0230 EAT +0245|-2r.g -2u -30 -2J|012132|-2ua2r.g N6nV.g 3Fbu h1cu dzbJ|47e5","Africa/Algiers|PMT WET WEST CET CEST|-9.l 0 -10 -10 -20|0121212121212121343431312123431213|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5","Africa/Lagos|LMT GMT +0030 WAT|-d.z 0 -u -10|01023|-2B40d.z 7iod.z dnXK.p dLzH.z|17e6","Africa/Bissau|LMT -01 GMT|12.k 10 0|012|-2ldX0 2xoo0|39e4","Africa/Maputo|LMT CAT|-2a.k -20|01|-2GJea.k|26e5","Africa/Cairo|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1bIO0 vb0 1ip0 11z0 1iN0 1nz0 12p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6","Africa/Casablanca|LMT +00 +01|u.k 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0|32e5","Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1y7o0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|85e3","Africa/El_Aaiun|LMT -01 +00 +01|Q.M 10 0 -10|012323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1rDz7.c 1GVA7.c 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0|20e4","Africa/Johannesburg|SAST SAST SAST|-1u -20 -30|012121|-2GJdu 1Ajdu 1cL0 1cN0 1cL0|84e5","Africa/Juba|LMT CAT CAST EAT|-26.s -20 -30 -30|012121212121212121212121212121212131|-1yW26.s 1zK06.s 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 PeX0|","Africa/Khartoum|LMT CAT CAST EAT|-2a.8 -20 -30 -30|012121212121212121212121212121212131|-1yW2a.8 1zK0a.8 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5","Africa/Monrovia|MMT MMT GMT|H.8 I.u 0|012|-23Lzg.Q 28G01.m|11e5","Africa/Ndjamena|LMT WAT WAST|-10.c -10 -20|0121|-2le10.c 2J3c0.c Wn0|13e5","Africa/Sao_Tome|LMT GMT WAT|A.J 0 -10|0121|-2le00 4i6N0 2q00|","Africa/Tripoli|LMT CET CEST EET|-Q.I -10 -20 -20|012121213121212121212121213123123|-21JcQ.I 1hnBQ.I vx0 4iP0 xx0 4eN0 Bb0 7ip0 U0n0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5","Africa/Tunis|PMT CET CEST|-9.l -10 -20|0121212121212121212121212121212121|-2nco9.l 18pa9.l 1qM0 DA0 3Tc0 11B0 1ze0 WM0 7z0 3d0 14L0 1cN0 1f90 1ar0 16J0 1gXB0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5","Africa/Windhoek|+0130 SAST SAST CAT WAT|-1u -20 -30 -20 -10|01213434343434343434343434343434343434343434343434343|-2GJdu 1Ajdu 1cL0 1SqL0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4","America/Adak|NST NWT NPT BST BDT AHST HST HDT|b0 a0 a0 b0 a0 a0 a0 90|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AST AWT APT AHST AHDT YST AKST AKDT|a0 90 90 a0 90 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T00 8wX0 iA0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Port_of_Spain|LMT AST|46.4 40|01|-2kNvR.U|43e3","America/Araguaina|LMT -03 -02|3c.M 30 20|0121212121212121212121212121212121212121212121212121|-2glwL.c HdKL.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4","America/Argentina/Buenos_Aires|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0|","America/Argentina/Catamarca|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Cordoba|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0|","America/Argentina/Jujuy|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0|","America/Argentina/La_Rioja|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Mendoza|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232312121321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0|","America/Argentina/Rio_Gallegos|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Salta|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0|","America/Argentina/San_Juan|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0|","America/Argentina/San_Luis|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121212321212|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0|","America/Argentina/Tucuman|CMT -04 -03 -02|4g.M 40 30 20|0121212121212121212121212121212121212121212323232313232123232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0|","America/Argentina/Ushuaia|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0|","America/Curacao|LMT -0430 AST|4z.L 4u 40|012|-2kV7o.d 28KLS.d|15e4","America/Asuncion|AMT -04 -03|3O.E 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-1x589.k 1DKM9.k 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5","America/Atikokan|CST CDT CWT CPT EST|60 50 50 50 50|0101234|-25TQ0 1in0 Rnb0 3je0 8x30 iw0|28e2","America/Bahia_Banderas|LMT MST CST PST MDT CDT|71 70 60 80 60 50|0121212131414141414141414141414141414152525252525252525252525252525252525252525252525252525252|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3","America/Bahia|LMT -03 -02|2y.4 30 20|01212121212121212121212121212121212121212121212121212121212121|-2glxp.U HdLp.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5","America/Barbados|LMT BMT AST ADT|3W.t 3W.t 40 30|01232323232|-1Q0I1.v jsM0 1ODC1.v IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4","America/Belem|LMT -03 -02|3d.U 30 20|012121212121212121212121212121|-2glwK.4 HdKK.4 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|20e5","America/Belize|LMT CST -0530 CWT CPT CDT|5Q.M 60 5u 50 50 50|012121212121212121212121212121212121212121212121213412121212121212121212121212121212121212121215151|-2kBu7.c fPA7.c Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu Rcu 7Bt0 Ni0 4nd0 Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu e9Au qn0 lxB0 mn0|57e3","America/Blanc-Sablon|AST ADT AWT APT|40 30 30 30|010230|-25TS0 1in0 UGp0 8x50 iu0|11e2","America/Boa_Vista|LMT -04 -03|42.E 40 30|0121212121212121212121212121212121|-2glvV.k HdKV.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2","America/Bogota|BMT -05 -04|4U.g 50 40|0121|-2eb73.I 38yo3.I 2en0|90e5","America/Boise|PST PDT MST MWT MPT MDT|80 70 70 60 60 60|0101023425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-261q0 1nX0 11B0 1nX0 8C10 JCL0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4","America/Cambridge_Bay|-00 MST MWT MPT MDDT MDT CST CDT EST|0 70 60 60 50 60 60 50 50|0123141515151515151515151515151515151515151515678651515151515151515151515151515151515151515151515151515151515151515151515151|-21Jc0 RO90 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2","America/Campo_Grande|LMT -04 -03|3C.s 40 30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwl.w HdLl.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4","America/Cancun|LMT CST EST EDT CDT|5L.4 60 50 40 50|0123232341414141414141414141414141414141412|-1UQG0 2q2o0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4","America/Caracas|CMT -0430 -04|4r.E 4u 40|01212|-2kV7w.k 28KM2.k 1IwOu kqo0|29e5","America/Cayenne|LMT -04 -03|3t.k 40 30|012|-2mrwu.E 2gWou.E|58e3","America/Panama|CMT EST|5j.A 50|01|-2uduE.o|15e5","America/Chicago|CST CDT EST CWT CPT|60 50 50 50 50|01010101010101010101010101010101010102010101010103401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 1wp0 TX0 WN0 1qL0 1cN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 11B0 1Hz0 14p0 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|LMT MST CST CDT MDT|74.k 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4","America/Costa_Rica|SJMT CST CDT|5A.d 60 50|0121212121|-1Xd6n.L 2lu0n.L Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5","America/Creston|MST PST|70 80|010|-29DR0 43B0|53e2","America/Cuiaba|LMT -04 -03|3I.k 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4","America/Danmarkshavn|LMT -03 -02 GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8","America/Dawson_Creek|PST PDT PWT PPT MST|80 70 70 70 70|0102301010101010101010101010101010101010101010101010101014|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 ML0|12e3","America/Dawson|YST YDT YWT YPT YDDT PST PDT MST|90 80 80 80 70 80 70 70|010102304056565656565656565656565656565656565656565656565656565656565656565656565656565656567|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 jrA0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|13e2","America/Denver|MST MDT MWT MPT|70 60 60 60|01010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 11B0 1qL0 WN0 mn0 Ord0 8x20 ix0 LCN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Detroit|LMT CST EST EWT EPT EDT|5w.b 60 50 40 40 40|0123425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2Cgir.N peqr.N 156L0 8x40 iv0 6fd0 11z0 JxX1 SMX 1cN0 1cL0 aW10 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5","America/Edmonton|LMT MST MDT MWT MPT|7x.Q 70 60 60 60|0121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2yd4q.8 shdq.8 1in0 17d0 hz0 2dB0 1fz0 1a10 11z0 1qN0 WL0 1qN0 11z0 IGN0 8x20 ix0 3NB0 11z0 XQp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5","America/Eirunepe|LMT -05 -04|4D.s 50 40|0121212121212121212121212121212121|-2glvk.w HdLk.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3","America/El_Salvador|LMT CST CDT|5U.M 60 50|012121|-1XiG3.c 2Fvc3.c WL0 1qN0 WL0|11e5","America/Tijuana|LMT MST PST PDT PWT PPT|7M.4 70 80 70 70 70|012123245232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQE0 4PX0 8mM0 8lc0 SN0 1cL0 pHB0 83r0 zI0 5O10 1Rz0 cOO0 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 BUp0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5","America/Fort_Nelson|PST PDT PWT PPT MST|80 70 70 70 70|01023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010104|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2","America/Fort_Wayne|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010101023010101010101010101040454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 QI10 Db0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 5Tz0 1o10 qLb0 1cL0 1cN0 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Fortaleza|LMT -03 -02|2y 30 20|0121212121212121212121212121212121212121|-2glxq HdLq 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5","America/Glace_Bay|LMT AST ADT AWT APT|3X.M 40 30 30 30|012134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsI0.c CwO0.c 1in0 UGp0 8x50 iu0 iq10 11z0 Jg10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3","America/Godthab|LMT -03 -02|3q.U 30 20|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5Ux.4 2z5dx.4 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3","America/Goose_Bay|NST NDT NST NDT NWT NPT AST ADT ADDT|3u.Q 2u.Q 3u 2u 2u 2u 40 30 20|010232323232323245232323232323232323232323232323232323232326767676767676767676767676767676767676767676768676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-25TSt.8 1in0 DXb0 2HbX.8 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 S10 g0u 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2","America/Grand_Turk|KMT EST EDT AST|57.a 50 40 40|0121212121212121212121212121212121212121212121212121212121212121212121212132121212121212121212121212121212121212121|-2l1uQ.O 2HHBQ.O 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 7jA0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Guatemala|LMT CST CDT|62.4 60 50|0121212121|-24KhV.U 2efXV.U An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5","America/Guayaquil|QMT -05 -04|5e 50 40|0121|-1yVSK 2uILK rz0|27e5","America/Guyana|LMT -0345 -03 -04|3Q.E 3J 30 40|0123|-2dvU7.k 2r6LQ.k Bxbf|80e4","America/Halifax|LMT AST ADT AWT APT|4e.o 40 30 30 30|0121212121212121212121212121212121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsHJ.A xzzJ.A 1db0 3I30 1in0 3HX0 IL0 1E10 ML0 1yN0 Pb0 1Bd0 Mn0 1Bd0 Rz0 1w10 Xb0 1w10 LX0 1w10 Xb0 1w10 Lz0 1C10 Jz0 1E10 OL0 1yN0 Un0 1qp0 Xb0 1qp0 11X0 1w10 Lz0 1HB0 LX0 1C10 FX0 1w10 Xb0 1qp0 Xb0 1BB0 LX0 1td0 Xb0 1qp0 Xb0 Rf0 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 6i10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Havana|HMT CST CDT|5t.A 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Meuu.o 72zu.o ML0 sld0 An0 1Nd0 Db0 1Nd0 An0 6Ep0 An0 1Nd0 An0 JDd0 Mn0 1Ap0 On0 1fd0 11X0 1qN0 WL0 1wp0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/Hermosillo|LMT MST CST PST MDT|7n.Q 70 60 80 60|0121212131414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4","America/Indiana/Knox|CST CDT CWT CPT EST|60 50 50 50 50|0101023010101010101010101010101010101040101010101010101010101010101010101010101010101010141010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 3Cn0 8wp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Marengo|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010104545454545414545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 dyN0 11z0 6fd0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Petersburg|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010104010101010101010101010141014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 3Fb0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Tell_City|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010401054541010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 8wn0 1cN0 1cL0 1cN0 1cK0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Vevay|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010102304545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 kPB0 Awn0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Vincennes|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Winamac|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010101010454541054545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Inuvik|-00 PST PDDT MST MDT|0 80 60 70 60|0121343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-FnA0 tWU0 1fA0 wPe0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2","America/Iqaluit|-00 EWT EPT EST EDDT EDT CST CDT|0 40 40 50 30 40 60 50|01234353535353535353535353535353535353535353567353535353535353535353535353535353535353535353535353535353535353535353535353|-16K00 7nX0 iv0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2","America/Jamaica|KMT EST EDT|57.a 50 40|0121212121212121212121|-2l1uQ.O 2uM1Q.O 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4","America/Juneau|PST PWT PPT PDT YDT YST AKST AKDT|80 70 70 70 80 90 90 80|01203030303030303030303030403030356767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3","America/Kentucky/Louisville|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101010102301010101010101010101010101454545454545414545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 3Fd0 Nb0 LPd0 11z0 RB0 8x30 iw0 1nX1 e0X 9vd0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 xz0 gso0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Kentucky/Monticello|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 SWp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/La_Paz|CMT BST -04|4w.A 3w.A 40|012|-1x37r.o 13b0|19e5","America/Lima|LMT -05 -04|58.A 50 40|0121212121212121|-2tyGP.o 1bDzP.o zX0 1aN0 1cL0 1cN0 1cL0 1PrB0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6","America/Los_Angeles|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 5Wp1 1VaX 3dA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/Maceio|LMT -03 -02|2m.Q 30 20|012121212121212121212121212121212121212121|-2glxB.8 HdLB.8 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4","America/Managua|MMT CST EST CDT|5J.c 60 50 50|0121313121213131|-1quie.M 1yAMe.M 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5","America/Manaus|LMT -04 -03|40.4 40 30|01212121212121212121212121212121|-2glvX.U HdKX.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5","America/Martinique|FFMT AST ADT|44.k 40 30|0121|-2mPTT.E 2LPbT.E 19X0|39e4","America/Matamoros|LMT CST CDT|6E 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4","America/Mazatlan|LMT MST CST PST MDT|75.E 70 60 80 60|0121212131414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|44e4","America/Menominee|CST CDT CWT CPT EST|60 50 50 50 50|01010230101041010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 LCN0 1fz0 6410 9Jb0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2","America/Merida|LMT CST EST CDT|5W.s 60 50 50|0121313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQG0 2q2o0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|11e5","America/Metlakatla|PST PWT PPT PDT AKST AKDT|80 70 70 70 90 80|01203030303030303030303030303030304545450454545454545454545454545454545454545454|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Mexico_City|LMT MST CST CDT CWT|6A.A 70 60 50 50|012121232324232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 gEn0 TX0 3xd0 Jb0 6zB0 SL0 e5d0 17b0 1Pff0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6","America/Miquelon|LMT AST -03 -02|3I.E 40 30 20|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2mKkf.k 2LTAf.k gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Moncton|EST AST ADT AWT APT|50 40 30 30 30|012121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsH0 CwN0 1in0 zAo0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1K10 Lz0 1zB0 NX0 1u10 Wn0 S20 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3","America/Monterrey|LMT CST CDT|6F.g 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|41e5","America/Montevideo|LMT MMT -04 -03 -0330 -0230 -02 -0130|3I.P 3I.P 40 30 3u 2u 20 1u|012343434343434343434343435353636353636375363636363636363636363636363636363636363636363|-2tRUf.9 sVc0 8jcf.9 1db0 1dcu 1cLu 1dcu 1cLu ircu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu WLu 1fAu 1cLu 1o0u 11zu NAu 3jXu zXu Dq0u 19Xu pcu jz0 cm10 19X0 6tB0 1fbu 3o0u jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5","America/Toronto|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101012301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 11Wu 1nzu 1fD0 WJ0 1wr0 Nb0 1Ap0 On0 1zd0 On0 1wp0 TX0 1tB0 TX0 1tB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 4kM0 8x40 iv0 1o10 11z0 1nX0 11z0 1o10 11z0 1o10 1qL0 11D0 1nX0 11B0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5","America/Nassau|LMT EST EWT EPT EDT|59.u 50 40 40 40|01212314141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2kNuO.u 1drbO.u 6tX0 cp0 1hS0 pF0 J630 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|24e4","America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Nipigon|EST EDT EWT EPT|50 40 40 40|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 Rnb0 3je0 8x40 iv0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|16e2","America/Nome|NST NWT NPT BST BDT YST AKST AKDT|b0 a0 a0 b0 a0 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2","America/Noronha|LMT -02 -01|29.E 20 10|0121212121212121212121212121212121212121|-2glxO.k HdKO.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2","America/North_Dakota/Beulah|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/North_Dakota/Center|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/North_Dakota/New_Salem|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Ojinaga|LMT MST CST CDT MDT|6V.E 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3","America/Pangnirtung|-00 AST AWT APT ADDT ADT EDT EST CST CDT|0 40 30 30 20 30 40 50 60 50|012314151515151515151515151515151515167676767689767676767676767676767676767676767676767676767676767676767676767676767676767|-1XiM0 PnG0 8x50 iu0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Paramaribo|LMT PMT PMT -0330 -03|3E.E 3E.Q 3E.A 3u 30|01234|-2nDUj.k Wqo0.c qanX.I 1yVXN.o|24e4","America/Phoenix|MST MDT MWT|70 60 60|01010202010|-261r0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0|42e5","America/Port-au-Prince|PPMT EST EDT|4N 50 40|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-28RHb 2FnMb 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Rio_Branco|LMT -05 -04|4v.c 50 40|01212121212121212121212121212121|-2glvs.M HdLs.M 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4","America/Porto_Velho|LMT -04 -03|4f.A 40 30|012121212121212121212121212121|-2glvI.o HdKI.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|37e4","America/Puerto_Rico|AST AWT APT|40 30 30|0120|-17lU0 7XT0 iu0|24e5","America/Punta_Arenas|SMT -05 -04 -03|4G.K 50 40 30|0102021212121212121232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 blz0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|","America/Rainy_River|CST CDT CWT CPT|60 50 50 50|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TQ0 1in0 Rnb0 3je0 8x30 iw0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|842","America/Rankin_Inlet|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313131313131313131313131313131313131313131313131313131313131313131|-vDc0 keu0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2","America/Recife|LMT -03 -02|2j.A 30 20|0121212121212121212121212121212121212121|-2glxE.o HdLE.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5","America/Regina|LMT MST MDT MWT MPT CST|6W.A 70 60 60 60 60|012121212121212121212121341212121212121212121212121215|-2AD51.o uHe1.o 1in0 s2L0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 66N0 1cL0 1cN0 19X0 1fB0 1cL0 1fB0 1cL0 1cN0 1cL0 M30 8x20 ix0 1ip0 1cL0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 3NB0 1cL0 1cN0|19e4","America/Resolute|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313431313131313131313131313131313131313131313131313131313131313131|-SnA0 GWS0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229","America/Santarem|LMT -04 -03|3C.M 40 30|0121212121212121212121212121212|-2glwl.c HdLl.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4","America/Santiago|SMT -05 -04 -03|4G.K 50 40 30|010202121212121212321232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 9Bz0 jb0 1oN0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|62e5","America/Santo_Domingo|SDMT EST EDT -0430 AST|4E 50 40 4u 40|01213131313131414|-1ttjk 1lJMk Mn0 6sp0 Lbu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5","America/Sao_Paulo|LMT -03 -02|36.s 30 20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwR.w HdKR.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 pTd0 PX0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6","America/Scoresbysund|LMT -02 -01 +00|1r.Q 20 10 0|0121323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2a5Ww.8 2z5ew.8 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452","America/Sitka|PST PWT PPT PDT YST AKST AKDT|80 70 70 70 90 90 80|01203030303030303030303030303030345656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2","America/St_Johns|NST NDT NST NDT NWT NPT NDDT|3u.Q 2u.Q 3u 2u 2u 2u 1u|01010101010101010101010101010101010102323232323232324523232323232323232323232323232323232323232323232323232323232323232323232323232323232326232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28oit.8 14L0 1nB0 1in0 1gm0 Dz0 1JB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1fB0 19X0 1fB0 19X0 10O0 eKX.8 19X0 1iq0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","America/Swift_Current|LMT MST MDT MWT MPT CST|7b.k 70 60 60 60 60|012134121212121212121215|-2AD4M.E uHdM.E 1in0 UGp0 8x20 ix0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 isN0 1cL0 3Cp0 1cL0 1cN0 11z0 1qN0 WL0 pMp0|16e3","America/Tegucigalpa|LMT CST CDT|5M.Q 60 50|01212121|-1WGGb.8 2ETcb.8 WL0 1qN0 WL0 GRd0 AL0|11e5","America/Thule|LMT AST ADT|4z.8 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5To.Q 31NBo.Q 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656","America/Thunder_Bay|CST EST EWT EPT EDT|60 50 40 40 40|0123141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2q5S0 1iaN0 8x40 iv0 XNB0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","America/Vancouver|PST PDT PWT PPT|80 70 70 70|0102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TO0 1in0 UGp0 8x10 iy0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Whitehorse|YST YDT YWT YPT YDDT PST PDT MST|90 80 80 80 70 80 70 70|010102304056565656565656565656565656565656565656565656565656565656565656565656565656565656567|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 3NA0 vrd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|23e3","America/Winnipeg|CST CDT CWT CPT|60 50 50 50|010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aIi0 WL0 3ND0 1in0 Jap0 Rb0 aCN0 8x30 iw0 1tB0 11z0 1ip0 11z0 1o10 11z0 1o10 11z0 1rd0 10L0 1op0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 1cL0 1cN0 11z0 6i10 WL0 6i10 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4","America/Yakutat|YST YWT YPT YDT AKST AKDT|90 80 80 80 90 80|01203030303030303030303030303030304545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-17T10 8x00 iz0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642","America/Yellowknife|-00 MST MWT MPT MDDT MDT|0 70 60 60 50 60|012314151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151|-1pdA0 hix0 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3","Antarctica/Casey|-00 +08 +11|0 -80 -b0|0121212121212|-2q00 1DjS0 T90 40P0 KL0 blz0 3m10 1o30 14k0 1kr0 12l0 1o01|10","Antarctica/Davis|-00 +07 +05|0 -70 -50|01012121|-vyo0 iXt0 alj0 1D7v0 VB0 3Wn0 KN0|70","Antarctica/DumontDUrville|-00 +10|0 -a0|0101|-U0o0 cfq0 bFm0|80","Antarctica/Macquarie|AEST AEDT -00|-a0 -b0 0|010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 1a00 4SK0 1ayy0 Lvs0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 3Co0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|1","Antarctica/Mawson|-00 +06 +05|0 -60 -50|012|-CEo0 2fyk0|60","Pacific/Auckland|NZMT NZST NZST NZDT|-bu -cu -c0 -d0|01020202020202020202020202023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1GCVu Lz0 1tB0 11zu 1o0u 11zu 1o0u 11zu 1o0u 14nu 1lcu 14nu 1lcu 1lbu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1qLu WMu 1qLu 11Au 1n1bu IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5","Antarctica/Palmer|-00 -03 -04 -02|0 30 40 20|0121212121213121212121212121212121212121212121212121212121212121212121212121212121|-cao0 nD0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40","Antarctica/Rothera|-00 -03|0 30|01|gOo0|130","Antarctica/Syowa|-00 +03|0 -30|01|-vs00|20","Antarctica/Troll|-00 +00 +02|0 0 -20|01212121212121212121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40","Antarctica/Vostok|-00 +06|0 -60|01|-tjA0|25","Europe/Oslo|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2awM0 Qm0 W6o0 5pf0 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 wJc0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1qM0 WM0 zpc0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e4","Asia/Riyadh|LMT +03|-36.Q -30|01|-TvD6.Q|57e5","Asia/Almaty|LMT +05 +06 +07|-57.M -50 -60 -70|012323232323232323232321232323232323232323232323232|-1Pc57.M eUo7.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5","Asia/Amman|LMT EET EEST|-2n.I -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1yW2n.I 1HiMn.I KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e5","Asia/Anadyr|LMT +12 +13 +14 +11|-bN.U -c0 -d0 -e0 -b0|01232121212121212121214121212121212121212121212121212121212141|-1PcbN.U eUnN.U 23CL0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3","Asia/Aqtau|LMT +04 +05 +06|-3l.4 -40 -50 -60|012323232323232323232123232312121212121212121212|-1Pc3l.4 eUnl.4 24PX0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4","Asia/Aqtobe|LMT +04 +05 +06|-3M.E -40 -50 -60|0123232323232323232321232323232323232323232323232|-1Pc3M.E eUnM.E 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4","Asia/Ashgabat|LMT +04 +05 +06|-3R.w -40 -50 -60|0123232323232323232323212|-1Pc3R.w eUnR.w 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4","Asia/Atyrau|LMT +03 +05 +06 +04|-3r.I -30 -50 -60 -40|01232323232323232323242323232323232324242424242|-1Pc3r.I eUor.I 24PW0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|","Asia/Baghdad|BMT +03 +04|-2V.A -30 -40|012121212121212121212121212121212121212121212121212121|-26BeV.A 2ACnV.A 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5","Asia/Qatar|LMT +04 +03|-3q.8 -40 -30|012|-21Jfq.8 27BXq.8|96e4","Asia/Baku|LMT +03 +04 +05|-3j.o -30 -40 -50|01232323232323232323232123232323232323232323232323232323232323232|-1Pc3j.o 1jUoj.o WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5","Asia/Bangkok|BMT +07|-6G.4 -70|01|-218SG.4|15e6","Asia/Barnaul|LMT +06 +07 +08|-5z -60 -70 -80|0123232323232323232323212323232321212121212121212121212121212121212|-21S5z pCnz 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|","Asia/Beirut|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-21aq0 1on0 1410 1db0 19B0 1in0 1ip0 WL0 1lQp0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 q6N0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5","Asia/Bishkek|LMT +05 +06 +07|-4W.o -50 -60 -70|012323232323232323232321212121212121212121212121212|-1Pc4W.o eUnW.o 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4","Asia/Brunei|LMT +0730 +08|-7D.E -7u -80|012|-1KITD.E gDc9.E|42e4","Asia/Kolkata|MMT IST +0630|-5l.a -5u -6u|012121|-2zOtl.a 1r2LP.a 1un0 HB0 7zX0|15e6","Asia/Chita|LMT +08 +09 +10|-7x.Q -80 -90 -a0|012323232323232323232321232323232323232323232323232323232323232312|-21Q7x.Q pAnx.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4","Asia/Choibalsan|LMT +07 +08 +10 +09|-7C -70 -80 -a0 -90|0123434343434343434343434343434343434343434343424242|-2APHC 2UkoC cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3","Asia/Shanghai|CST CDT|-80 -90|01010101010101010101010101010|-23uw0 18n0 OjB0 Rz0 11d0 1wL0 A10 8HX0 1G10 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 aL0 1tU30 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6","Asia/Colombo|MMT +0530 +06 +0630|-5j.w -5u -60 -6u|01231321|-2zOtj.w 1rFbN.w 1zzu 7Apu 23dz0 11zu n3cu|22e5","Asia/Dhaka|HMT +0630 +0530 +06 +07|-5R.k -6u -5u -60 -70|0121343|-18LFR.k 1unn.k HB0 m6n0 2kxbu 1i00|16e6","Asia/Damascus|LMT EET EEST|-2p.c -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-21Jep.c Hep.c 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1xRB0 11X0 1oN0 10L0 1pB0 11b0 1oN0 10L0 1mp0 13X0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|26e5","Asia/Dili|LMT +08 +09|-8m.k -80 -90|01212|-2le8m.k 1dnXm.k 1nfA0 Xld0|19e4","Asia/Dubai|LMT +04|-3F.c -40|01|-21JfF.c|39e5","Asia/Dushanbe|LMT +05 +06 +07|-4z.c -50 -60 -70|012323232323232323232321|-1Pc4z.c eUnz.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4","Asia/Famagusta|LMT EET EEST +03|-2f.M -20 -30 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212312121212121212121212121212121212121212121|-1Vc2f.M 2a3cf.M 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|","Asia/Gaza|EET EEST IST IDT|-20 -30 -20 -30|010101010101010101010101010101010123232323232323232323232323232320101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2o0 MM0 iM0 4JA0 10o0 1pA0 10M0 1pA0 16o0 1jA0 16o0 1jA0 pBa0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|18e5","Asia/Hebron|EET EEST IST IDT|-20 -30 -20 -30|01010101010101010101010101010101012323232323232323232323232323232010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2o0 MM0 iM0 4JA0 10o0 1pA0 10M0 1pA0 16o0 1jA0 16o0 1jA0 pBa0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4","Asia/Ho_Chi_Minh|LMT PLMT +07 +08 +09|-76.E -76.u -70 -80 -90|0123423232|-2yC76.E bK00.a 1h7b6.u 5lz0 18o0 3Oq0 k5b0 aW00 BAM0|90e5","Asia/Hong_Kong|LMT HKT HKST HKWT JST|-7A.G -80 -90 -8u -90|0123412121212121212121212121212121212121212121212121212121212121212121|-2CFH0 1taO0 Hc0 xUu 9tBu 11z0 1tDu Rc0 1wo0 11A0 1cM0 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1nX0 U10 1tz0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5","Asia/Hovd|LMT +06 +07 +08|-66.A -60 -70 -80|012323232323232323232323232323232323232323232323232|-2APG6.A 2Uko6.A cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|IMT +07 +08 +09|-6V.5 -70 -80 -90|01232323232323232323232123232323232323232323232323232323232323232|-21zGV.5 pjXV.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Europe/Istanbul|IMT EET EEST +03 +04|-1U.U -20 -30 -30 -40|0121212121212121212121212121212121212121212121234312121212121212121212121212121212121212121212121212121212121212123|-2ogNU.U dzzU.U 11b0 8tB0 1on0 1410 1db0 19B0 1in0 3Rd0 Un0 1oN0 11b0 zSN0 CL0 mp0 1Vz0 1gN0 8yn0 1yp0 ML0 1kp0 17b0 1ip0 17b0 1fB0 19X0 1ip0 19X0 1ip0 17b0 qdB0 38L0 1jd0 Tz0 l6O0 11A0 WN0 1qL0 TB0 1tX0 U10 1tz0 11B0 1in0 17d0 z90 cne0 pb0 2Cp0 1800 14o0 1dc0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6","Asia/Jakarta|BMT +0720 +0730 +09 +08 WIB|-77.c -7k -7u -90 -80 -70|01232425|-1Q0Tk luM0 mPzO 8vWu 6kpu 4PXu xhcu|31e6","Asia/Jayapura|LMT +09 +0930 WIT|-9m.M -90 -9u -90|0123|-1uu9m.M sMMm.M L4nu|26e4","Asia/Jerusalem|JMT IST IDT IDDT|-2k.E -20 -30 -40|01212121212121321212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-26Bek.E SyOk.E MM0 iM0 4JA0 10o0 1pA0 10M0 1pA0 16o0 1jA0 16o0 1jA0 3LA0 Eo0 oo0 1co0 1dA0 16o0 10M0 1jc0 1tA0 14o0 1cM0 1a00 11A0 1Nc0 Ao0 1Nc0 Ao0 1Ko0 LA0 1o00 WM0 EQK0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4","Asia/Kabul|+04 +0430|-40 -4u|01|-10Qs0|46e5","Asia/Kamchatka|LMT +11 +12 +13|-ay.A -b0 -c0 -d0|012323232323232323232321232323232323232323232323232323232323212|-1SLKy.A ivXy.A 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4","Asia/Karachi|LMT +0530 +0630 +05 PKT PKST|-4s.c -5u -6u -50 -50 -60|012134545454|-2xoss.c 1qOKW.c 7zX0 eup0 LqMu 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6","Asia/Urumqi|LMT +06|-5O.k -60|01|-1GgtO.k|32e5","Asia/Kathmandu|LMT +0530 +0545|-5F.g -5u -5J|012|-21JhF.g 2EGMb.g|12e5","Asia/Khandyga|LMT +08 +09 +10 +11|-92.d -80 -90 -a0 -b0|0123232323232323232323212323232323232323232323232343434343434343432|-21Q92.d pAp2.d 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2","Asia/Krasnoyarsk|LMT +06 +07 +08|-6b.q -60 -70 -80|01232323232323232323232123232323232323232323232323232323232323232|-21Hib.q prAb.q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5","Asia/Kuala_Lumpur|SMT +07 +0720 +0730 +09 +08|-6T.p -70 -7k -7u -90 -80|0123435|-2Bg6T.p 17anT.p l5XE 17bO 8Fyu 1so1u|71e5","Asia/Kuching|LMT +0730 +08 +0820 +09|-7l.k -7u -80 -8k -90|0123232323232323242|-1KITl.k gDbP.k 6ynu AnE 1O0k AnE 1NAk AnE 1NAk AnE 1NAk AnE 1O0k AnE 1NAk AnE pAk 8Fz0|13e4","Asia/Macau|LMT CST +09 +10 CDT|-7y.a -80 -90 -a0 -90|012323214141414141414141414141414141414141414141414141414141414141414141|-2CFHy.a 1uqKy.a PX0 1kn0 15B0 11b0 4Qq0 1oM0 11c0 1ko0 1u00 11A0 1cM0 11c0 1o00 11A0 1o00 11A0 1oo0 1400 1o00 11A0 1o00 U00 1tA0 U00 1wo0 Rc0 1wru U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cK0 1cO0 1cK0 1cO0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4","Asia/Magadan|LMT +10 +11 +12|-a3.c -a0 -b0 -c0|012323232323232323232321232323232323232323232323232323232323232312|-1Pca3.c eUo3.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3","Asia/Makassar|LMT MMT +08 +09 WITA|-7V.A -7V.A -80 -90 -80|01234|-21JjV.A vfc0 myLV.A 8ML0|15e5","Asia/Manila|PST PDT JST|-80 -90 -90|010201010|-1kJI0 AL0 cK10 65X0 mXB0 vX0 VK10 1db0|24e6","Asia/Nicosia|LMT EET EEST|-2d.s -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Vc2d.s 2a3cd.s 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|32e4","Asia/Novokuznetsk|LMT +06 +07 +08|-5M.M -60 -70 -80|012323232323232323232321232323232323232323232323232323232323212|-1PctM.M eULM.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4","Asia/Novosibirsk|LMT +06 +07 +08|-5v.E -60 -70 -80|0123232323232323232323212323212121212121212121212121212121212121212|-21Qnv.E pAFv.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5","Asia/Omsk|LMT +05 +06 +07|-4R.u -50 -60 -70|01232323232323232323232123232323232323232323232323232323232323232|-224sR.u pMLR.u 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5","Asia/Oral|LMT +03 +05 +06 +04|-3p.o -30 -50 -60 -40|01232323232323232424242424242424242424242424242|-1Pc3p.o eUop.o 23CK0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4","Asia/Pontianak|LMT PMT +0730 +09 +08 WITA WIB|-7h.k -7h.k -7u -90 -80 -80 -70|012324256|-2ua7h.k XE00 munL.k 8Rau 6kpu 4PXu xhcu Wqnu|23e4","Asia/Pyongyang|LMT KST JST KST|-8n -8u -90 -90|012313|-2um8n 97XR 1lTzu 2Onc0 6BA0|29e5","Asia/Qostanay|LMT +04 +05 +06|-4e.s -40 -50 -60|012323232323232323232123232323232323232323232323|-1Pc4e.s eUoe.s 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|","Asia/Qyzylorda|LMT +04 +05 +06|-4l.Q -40 -50 -60|01232323232323232323232323232323232323232323232|-1Pc4l.Q eUol.Q 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4","Asia/Rangoon|RMT +0630 +09|-6o.L -6u -90|0121|-21Jio.L SmnS.L 7j9u|48e5","Asia/Sakhalin|LMT +09 +11 +12 +10|-9u.M -90 -b0 -c0 -a0|01232323232323232323232423232323232424242424242424242424242424242|-2AGVu.M 1BoMu.M 1qFa0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4","Asia/Samarkand|LMT +04 +05 +06|-4r.R -40 -50 -60|01232323232323232323232|-1Pc4r.R eUor.R 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4","Asia/Seoul|LMT KST JST KST KDT KDT|-8r.Q -8u -90 -90 -a0 -9u|012343434343151515151515134343|-2um8r.Q 97XV.Q 1m1zu 6CM0 Fz0 1kN0 14n0 1kN0 14L0 1zd0 On0 69B0 2I0u OL0 1FB0 Rb0 1qN0 TX0 1tB0 TX0 1tB0 TX0 1tB0 TX0 2ap0 12FBu 11A0 1o00 11A0|23e6","Asia/Srednekolymsk|LMT +10 +11 +12|-ae.Q -a0 -b0 -c0|01232323232323232323232123232323232323232323232323232323232323232|-1Pcae.Q eUoe.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2","Asia/Taipei|CST JST CDT|-80 -90 -90|01020202020202020202020202020202020202020|-1iw80 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0|74e5","Asia/Tashkent|LMT +05 +06 +07|-4B.b -50 -60 -70|012323232323232323232321|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5","Asia/Tbilisi|TBMT +03 +04 +05|-2X.b -30 -40 -50|0123232323232323232323212121232323232323232323212|-1Pc2X.b 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5","Asia/Tehran|LMT TMT +0330 +04 +05 +0430|-3p.I -3p.I -3u -40 -50 -4u|01234325252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2btDp.I 1d3c0 1huLT.I TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6","Asia/Thimphu|LMT +0530 +06|-5W.A -5u -60|012|-Su5W.A 1BGMs.A|79e3","Asia/Tokyo|JST JDT|-90 -a0|010101010|-QJJ0 Rc0 1lc0 14o0 1zc0 Oo0 1zc0 Oo0|38e6","Asia/Tomsk|LMT +06 +07 +08|-5D.P -60 -70 -80|0123232323232323232323212323232323232323232323212121212121212121212|-21NhD.P pxzD.P 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5","Asia/Ulaanbaatar|LMT +07 +08 +09|-77.w -70 -80 -90|012323232323232323232323232323232323232323232323232|-2APH7.w 2Uko7.w cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5","Asia/Ust-Nera|LMT +08 +09 +12 +11 +10|-9w.S -80 -90 -c0 -b0 -a0|012343434343434343434345434343434343434343434343434343434343434345|-21Q9w.S pApw.S 23CL0 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2","Asia/Vladivostok|LMT +09 +10 +11|-8L.v -90 -a0 -b0|01232323232323232323232123232323232323232323232323232323232323232|-1SJIL.v itXL.v 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Asia/Yakutsk|LMT +08 +09 +10|-8C.W -80 -90 -a0|01232323232323232323232123232323232323232323232323232323232323232|-21Q8C.W pAoC.W 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4","Asia/Yekaterinburg|LMT PMT +04 +05 +06|-42.x -3J.5 -40 -50 -60|012343434343434343434343234343434343434343434343434343434343434343|-2ag42.x 7mQh.s qBvJ.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5","Asia/Yerevan|LMT +03 +04 +05|-2W -30 -40 -50|0123232323232323232323212121212323232323232323232323232323232|-1Pc2W 1jUnW WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5","Atlantic/Azores|HMT -02 -01 +00 WET|1S.w 20 10 0 0|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121232323232323232323232323232323234323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2ldW0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4","Atlantic/Bermuda|BMT BST AST ADT|4j.i 3j.i 40 30|010102323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28p7E.G 1bb0 1i10 11X0 ru30 thbE.G 1PX0 11B0 1tz0 Rd0 1zb0 Op0 1zb0 3I10 Lz0 1EN0 FX0 1HB0 FX0 1Kp0 Db0 1Kp0 Db0 1Kp0 FX0 93d0 11z0 GAp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3","Atlantic/Canary|LMT -01 WET WEST|11.A 10 0 -10|01232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UtaW.o XPAW.o 1lAK0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4","Atlantic/Cape_Verde|LMT -02 -01|1y.4 20 10|01212|-2ldW0 1eEo0 7zX0 1djf0|50e4","Atlantic/Faroe|LMT WET WEST|r.4 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2uSnw.U 2Wgow.U 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|49e3","Atlantic/Madeira|FMT -01 +00 +01 WET WEST|17.A 10 0 -10 0 -10|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2ldX0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e4","Atlantic/Reykjavik|LMT -01 +00 GMT|1s 10 0 0|012121212121212121212121212121212121212121212121212121212121212121213|-2uWmw mfaw 1Bd0 ML0 1LB0 Cn0 1LB0 3fX0 C10 HrX0 1cO0 LB0 1EL0 LA0 1C00 Oo0 1wo0 Rc0 1wo0 Rc0 1wo0 Rc0 1zc0 Oo0 1zc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0|12e4","Atlantic/South_Georgia|-02|20|0||30","Atlantic/Stanley|SMT -04 -03 -02|3P.o 40 30 20|012121212121212323212121212121212121212121212121212121212121212121212|-2kJw8.A 12bA8.A 19X0 1fB0 19X0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 Cn0 1Cc10 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2","Australia/Sydney|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293k0 xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5","Australia/Adelaide|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293ju xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5","Australia/Brisbane|AEST AEDT|-a0 -b0|01010101010101010|-293k0 xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5","Australia/Broken_Hill|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293ju xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|18e3","Australia/Hobart|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 1a00 1qM0 Oo0 1zc0 Oo0 TAo0 yM0 1cM0 1cM0 1fA0 1a00 VfA0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|21e4","Australia/Darwin|ACST ACDT|-9u -au|010101010|-293ju xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00|12e4","Australia/Eucla|+0845 +0945|-8J -9J|0101010101010101010|-293iJ xc0 10jc0 yM0 1cM0 1cM0 1gSo0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368","Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|0121212121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347","Australia/Lindeman|AEST AEDT|-a0 -b0|010101010101010101010|-293k0 xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10","Australia/Melbourne|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293k0 xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|39e5","Australia/Perth|AWST AWDT|-80 -90|0101010101010101010|-293i0 xc0 10jc0 yM0 1cM0 1cM0 1gSo0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5","CET|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|","Pacific/Easter|EMT -07 -06 -05|7h.s 70 60 50|012121212121212121212121212123232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1uSgG.w 1s4IG.w WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|30e2","CST6CDT|CST CDT CWT CPT|60 50 50 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","EET|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|","Europe/Dublin|DMT IST GMT BST IST|p.l -y.D 0 -10 -10|01232323232324242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242|-2ax9y.D Rc0 1fzy.D 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 g600 14o0 1wo0 17c0 1io0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","EST|EST|50|0||","EST5EDT|EST EDT EWT EPT|50 40 40 40|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 SgN0 8x40 iv0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","Etc/GMT-0|GMT|0|0||","Etc/GMT-1|+01|-10|0||","Pacific/Port_Moresby|+10|-a0|0||25e4","Etc/GMT-11|+11|-b0|0||","Pacific/Tarawa|+12|-c0|0||29e3","Etc/GMT-13|+13|-d0|0||","Etc/GMT-14|+14|-e0|0||","Etc/GMT-2|+02|-20|0||","Etc/GMT-3|+03|-30|0||","Etc/GMT-4|+04|-40|0||","Etc/GMT-5|+05|-50|0||","Etc/GMT-6|+06|-60|0||","Indian/Christmas|+07|-70|0||21e2","Etc/GMT-8|+08|-80|0||","Pacific/Palau|+09|-90|0||21e3","Etc/GMT+1|-01|10|0||","Etc/GMT+10|-10|a0|0||","Etc/GMT+11|-11|b0|0||","Etc/GMT+12|-12|c0|0||","Etc/GMT+3|-03|30|0||","Etc/GMT+4|-04|40|0||","Etc/GMT+5|-05|50|0||","Etc/GMT+6|-06|60|0||","Etc/GMT+7|-07|70|0||","Etc/GMT+8|-08|80|0||","Etc/GMT+9|-09|90|0||","Etc/UTC|UTC|0|0||","Europe/Amsterdam|AMT NST +0120 +0020 CEST CET|-j.w -1j.w -1k -k -20 -10|010101010101010101010101010101010101010101012323234545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545|-2aFcj.w 11b0 1iP0 11A0 1io0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1co0 1io0 1yo0 Pc0 1a00 1fA0 1Bc0 Mo0 1tc0 Uo0 1tA0 U00 1uo0 W00 1s00 VA0 1so0 Vc0 1sM0 UM0 1wo0 Rc0 1u00 Wo0 1rA0 W00 1s00 VA0 1sM0 UM0 1w00 fV0 BCX.w 1tA0 U00 1u00 Wo0 1sm0 601k WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|16e5","Europe/Andorra|WET CET CEST|0 -10 -20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-UBA0 1xIN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|79e3","Europe/Astrakhan|LMT +03 +04 +05|-3c.c -30 -40 -50|012323232323232323212121212121212121212121212121212121212121212|-1Pcrc.c eUMc.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5","Europe/Athens|AMT EET EEST CEST CET|-1y.Q -20 -30 -20 -10|012123434121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a61x.Q CNbx.Q mn0 kU10 9b0 3Es0 Xa0 1fb0 1dd0 k3X0 Nz0 SCp0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5","Europe/London|GMT BST BDST|0 -10 -20|0101010101010101010101010101010101010101010101010121212121210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6","Europe/Belgrade|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19RC0 3IP0 WM0 1fA0 1cM0 1cM0 1rc0 Qo0 1vmo0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Europe/Berlin|CET CEST CEMT|-10 -20 -30|01010101010101210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 kL0 Nc0 m10 WM0 1ao0 1cp0 dX0 jz0 Dd0 1io0 17c0 1fA0 1a00 1ehA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e5","Europe/Prague|CET CEST GMT|-10 -20 0|01010101010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 1qM0 11c0 mp0 xA0 mn0 17c0 1io0 17c0 1fc0 1ao0 1bNc0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|13e5","Europe/Brussels|WET CET CEST WEST|0 -10 -20 -10|0121212103030303030303030303030303030303030303030303212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ehc0 3zX0 11c0 1iO0 11A0 1o00 11A0 my0 Ic0 1qM0 Rc0 1EM0 UM0 1u00 10o0 1io0 1io0 17c0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a30 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 y00 5Wn0 WM0 1fA0 1cM0 16M0 1iM0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|21e5","Europe/Bucharest|BMT EET EEST|-1I.o -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1xApI.o 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Axc0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|19e5","Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 1oo0 11c0 1lc0 17c0 O1V0 3Nf0 WM0 1fA0 1cM0 1cM0 1oJ0 1dd0 1020 1fX0 1cp0 1cM0 1cM0 1cM0 1fA0 1a00 bhy0 Rb0 1wr0 Rc0 1C00 LA0 1C00 LA0 SNW0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cO0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5","Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19Lc0 11A0 1o00 11A0 1xG10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e4","Europe/Chisinau|CMT BMT EET EEST CEST CET MSK MSD|-1T -1I.o -20 -30 -20 -10 -30 -40|012323232323232323234545467676767676767676767323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-26jdT wGMa.A 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 27A0 2en0 39g0 WM0 1fA0 1cM0 V90 1t7z0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4","Europe/Copenhagen|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 Tz0 VuO0 60q0 WM0 1fA0 1cM0 1cM0 1cM0 S00 1HA0 Nc0 1C00 Dc0 1Nc0 Ao0 1h5A0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Europe/Gibraltar|GMT BST BDST CET CEST|0 -10 -20 -10 -20|010101010101010101010101010101010101010101010101012121212121010121010101010101010101034343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 10Jz0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|30e3","Europe/Helsinki|HMT EET EEST|-1D.N -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1WuND.N OULD.N 1dA0 1xGq0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Europe/Kaliningrad|CET CEST EET EEST MSK MSD +03|-10 -20 -20 -30 -30 -40 -30|01010101010101232454545454545454543232323232323232323232323232323232323232323262|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 390 7A0 1en0 12N0 1pbb0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4","Europe/Kiev|KMT EET MSK CEST CET MSD EEST|-22.4 -20 -30 -20 -10 -40 -30|0123434252525252525252525256161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc22.4 eUo2.4 rnz0 2Hg0 WM0 1fA0 da0 1v4m0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|34e5","Europe/Kirov|LMT +03 +04 +05|-3i.M -30 -40 -50|01232323232323232321212121212121212121212121212121212121212121|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4","Europe/Lisbon|LMT WET WEST WEMT CET CEST|A.J 0 -10 -20 -10 -20|012121212121212121212121212121212121212121212321232123212321212121212121212121212121212121212121214121212121212121212121212121212124545454212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2le00 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 pvy0 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5","Europe/Luxembourg|LMT CET CEST WET WEST WEST WET|-o.A -10 -20 0 -10 -20 -10|0121212134343434343434343434343434343434343434343434565651212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2DG0o.A t6mo.A TB0 1nX0 Up0 1o20 11A0 rW0 CM0 1qP0 R90 1EO0 UK0 1u20 10m0 1ip0 1in0 17e0 19W0 1fB0 1db0 1cp0 1in0 17d0 1fz0 1a10 1in0 1a10 1in0 17f0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 vA0 60L0 WM0 1fA0 1cM0 17c0 1io0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4","Europe/Madrid|WET WEST WEMT CET CEST|0 -10 -20 -10 -20|010101010101010101210343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-25Td0 19B0 1cL0 1dd0 b1z0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1in0 17d0 iIn0 Hd0 1cL0 bb0 1200 2s20 14n0 5aL0 Mp0 1vz0 17d0 1in0 17d0 1in0 17d0 1in0 17d0 6hX0 11B0 XHX0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e5","Europe/Malta|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1co0 17c0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4","Europe/Minsk|MMT EET MSK CEST CET MSD EEST +03|-1O -20 -30 -20 -10 -40 -30 -30|01234343252525252525252525261616161616161616161616161616161616161617|-1Pc1O eUnO qNX0 3gQ0 WM0 1fA0 1cM0 Al0 1tsn0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5","Europe/Monaco|PMT WET WEST WEMT CET CEST|-9.l 0 -10 -20 -10 -20|01212121212121212121212121212121212121212121212121232323232345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2n5c9.l cFX9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 2RV0 11z0 11B0 1ze0 WM0 1fA0 1cM0 1fa0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e3","Europe/Moscow|MMT MMT MST MDST MSD MSK +05 EET EEST MSK|-2u.h -2v.j -3v.j -4v.j -40 -30 -50 -20 -30 -40|012132345464575454545454545454545458754545454545454545454545454545454545454595|-2ag2u.h 2pyW.W 1bA0 11X0 GN0 1Hb0 c4v.j ik0 3DA0 dz0 15A0 c10 2q10 iM10 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6","Europe/Paris|PMT WET WEST CEST CET WEMT|-9.l 0 -10 -20 -10 -20|0121212121212121212121212121212121212121212121212123434352543434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 Ik0 5M30 WM0 1fA0 1cM0 Vx0 hB0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6","Europe/Riga|RMT LST EET MSK CEST CET MSD EEST|-1A.y -2A.y -20 -30 -20 -10 -40 -30|010102345454536363636363636363727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272|-25TzA.y 11A0 1iM0 ko0 gWm0 yDXA.y 2bX0 3fE0 WM0 1fA0 1cM0 1cM0 4m0 1sLy0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|64e4","Europe/Rome|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1cM0 16M0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|39e5","Europe/Samara|LMT +03 +04 +05|-3k.k -30 -40 -50|0123232323232323232121232323232323232323232323232323232323212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5","Europe/Saratov|LMT +03 +04 +05|-34.i -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810|","Europe/Simferopol|SMT EET MSK CEST CET MSD EEST MSK|-2g -20 -30 -20 -10 -40 -30 -40|012343432525252525252525252161616525252616161616161616161616161616161616172|-1Pc2g eUog rEn0 2qs0 WM0 1fA0 1cM0 3V0 1u0L0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4","Europe/Sofia|EET CET CEST EEST|-20 -10 -20 -30|01212103030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030|-168L0 WM0 1fA0 1cM0 1cM0 1cN0 1mKH0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Europe/Stockholm|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 TB0 2yDe0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|15e5","Europe/Tallinn|TMT CET CEST EET MSK MSD EEST|-1D -10 -20 -20 -30 -40 -30|012103421212454545454545454546363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363|-26oND teD 11A0 1Ta0 4rXl KSLD 2FX0 2Jg0 WM0 1fA0 1cM0 18J0 1sTX0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e4","Europe/Tirane|LMT CET CEST|-1j.k -10 -20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glBj.k 14pcj.k 5LC0 WM0 4M0 1fCK0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4","Europe/Ulyanovsk|LMT +03 +04 +05 +02|-3d.A -30 -40 -50 -20|01232323232323232321214121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5","Europe/Uzhgorod|CET CEST MSK MSD EET EEST|-10 -20 -30 -40 -20 -30|010101023232323232323232320454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-1cqL0 6i00 WM0 1fA0 1cM0 1ml0 1Cp0 1r3W0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e4","Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 3KM0 14o0 LA00 6i00 WM0 1fA0 1cM0 1cM0 1cM0 400 2qM0 1ao0 1co0 1cM0 1io0 17c0 1gHa0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|18e5","Europe/Vilnius|WMT KMT CET EET MSK CEST MSD EEST|-1o -1z.A -10 -20 -30 -20 -40 -30|012324525254646464646464646473737373737373737352537373737373737373737373737373737373737373737373737373737373737373737373|-293do 6ILM.o 1Ooz.A zz0 Mfd0 29W0 3is0 WM0 1fA0 1cM0 LV0 1tgL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4","Europe/Volgograd|LMT +03 +04 +05|-2V.E -30 -40 -50|0123232323232323212121212121212121212121212121212121212121212121|-21IqV.E psLV.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0 5gn0|10e5","Europe/Warsaw|WMT CET CEST EET EEST|-1o -10 -20 -20 -30|012121234312121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ctdo 1LXo 11d0 1iO0 11A0 1o00 11A0 1on0 11A0 6zy0 HWP0 5IM0 WM0 1fA0 1cM0 1dz0 1mL0 1en0 15B0 1aq0 1nA0 11A0 1io0 17c0 1fA0 1a00 iDX0 LA0 1cM0 1cM0 1C00 Oo0 1cM0 1cM0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1C00 LA0 uso0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5","Europe/Zaporozhye|+0220 EET MSK CEST CET MSD EEST|-2k -20 -30 -20 -10 -40 -30|01234342525252525252525252526161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc2k eUok rdb0 2RE0 WM0 1fA0 8m0 1v9a0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|77e4","HST|HST|a0|0||","Indian/Chagos|LMT +05 +06|-4N.E -50 -60|012|-2xosN.E 3AGLN.E|30e2","Indian/Cocos|+0630|-6u|0||596","Indian/Kerguelen|-00 +05|0 -50|01|-MG00|130","Indian/Mahe|LMT +04|-3F.M -40|01|-2xorF.M|79e3","Indian/Maldives|MMT +05|-4S -50|01|-olgS|35e4","Indian/Mauritius|LMT +04 +05|-3O -40 -50|012121|-2xorO 34unO 14L0 12kr0 11z0|15e4","Indian/Reunion|LMT +04|-3F.Q -40|01|-2mDDF.Q|84e4","Pacific/Kwajalein|+11 +10 +09 -12 +12|-b0 -a0 -90 c0 -c0|012034|-1kln0 akp0 6Up0 12ry0 Wan0|14e3","MET|MET MEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|","MST|MST|70|0||","MST7MDT|MST MDT MWT MPT|70 60 60 60|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","Pacific/Chatham|+1215 +1245 +1345|-cf -cJ -dJ|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-WqAf 1adef IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600","Pacific/Apia|LMT -1130 -11 -10 +14 +13|bq.U bu b0 a0 -e0 -d0|01232345454545454545454545454545454545454545454545454545454|-2nDMx.4 1yW03.4 2rRbu 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3","Pacific/Bougainville|+10 +09 +11|-a0 -90 -b0|0102|-16Wy0 7CN0 2MQp0|18e4","Pacific/Chuuk|+10 +09|-a0 -90|01010|-2ewy0 axB0 RVX0 axd0|49e3","Pacific/Efate|LMT +11 +12|-bd.g -b0 -c0|012121212121212121212121|-2l9nd.g 2uNXd.g Dc0 n610 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3","Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1","Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483","Pacific/Fiji|LMT +12 +13|-bT.I -c0 -d0|0121212121212121212121212121212121212121212121212121212121212121|-2bUzT.I 3m8NT.I LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 20o0 pc0 2hc0 bc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0 s00 1VA0 s00 20o0 pc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0 s00 20o0 pc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0 s00 1VA0 s00|88e4","Pacific/Galapagos|LMT -05 -06|5W.o 50 60|01212|-1yVS1.A 2dTz1.A gNd0 rz0|25e3","Pacific/Gambier|LMT -09|8X.M 90|01|-2jof0.c|125","Pacific/Guadalcanal|LMT +11|-aD.M -b0|01|-2joyD.M|11e4","Pacific/Guam|GST +09 GDT ChST|-a0 -90 -b0 -a0|01020202020202020203|-18jK0 6pB0 AhB0 3QL0 g2p0 3p91 WOX rX0 1zd0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4","Pacific/Honolulu|HST HDT HWT HPT HST|au 9u 9u 9u a0|0102304|-1thLu 8x0 lef0 8wWu iAu 46p0|37e4","Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2","Pacific/Kosrae|+11 +09 +10 +12|-b0 -90 -a0 -c0|01021030|-2ewz0 axC0 HBy0 akp0 axd0 WOK0 1bdz0|66e2","Pacific/Majuro|+11 +09 +10 +12|-b0 -90 -a0 -c0|0102103|-2ewz0 axC0 HBy0 akp0 6RB0 12um0|28e3","Pacific/Marquesas|LMT -0930|9i 9u|01|-2joeG|86e2","Pacific/Pago_Pago|LMT SST|bm.M b0|01|-2nDMB.c|37e2","Pacific/Nauru|LMT +1130 +09 +12|-b7.E -bu -90 -c0|01213|-1Xdn7.E QCnB.E 7mqu 1lnbu|10e3","Pacific/Niue|-1120 -1130 -11|bk bu b0|012|-KfME 17y0a|12e2","Pacific/Norfolk|+1112 +1130 +1230 +11 +12|-bc -bu -cu -b0 -c0|012134343434343434343434343434343434343434|-Kgbc W01G Oo0 1COo0 9Jcu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|25e4","Pacific/Noumea|LMT +11 +12|-b5.M -b0 -c0|01212121|-2l9n5.M 2EqM5.M xX0 1PB0 yn0 HeP0 Ao0|98e3","Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56","Pacific/Pohnpei|+11 +09 +10|-b0 -90 -a0|010210|-2ewz0 axC0 HBy0 akp0 axd0|34e3","Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3","Pacific/Tahiti|LMT -10|9W.g a0|01|-2joe1.I|18e4","Pacific/Tongatapu|+1220 +13 +14|-ck -d0 -e0|0121212121|-1aB0k 2n5dk 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3","PST8PDT|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","WET|WET WEST|0 -10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|"],"links":["Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/St_Helena","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Atikokan|America/Coral_Harbour","America/Chicago|US/Central","America/Curacao|America/Aruba","America/Curacao|America/Kralendijk","America/Curacao|America/Lower_Princes","America/Denver|America/Shiprock","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|Canada/Mountain","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Godthab|America/Nuuk","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/Los_Angeles|US/Pacific","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Panama|America/Cayman","America/Phoenix|US/Arizona","America/Port_of_Spain|America/Anguilla","America/Port_of_Spain|America/Antigua","America/Port_of_Spain|America/Dominica","America/Port_of_Spain|America/Grenada","America/Port_of_Spain|America/Guadeloupe","America/Port_of_Spain|America/Marigot","America/Port_of_Spain|America/Montserrat","America/Port_of_Spain|America/St_Barthelemy","America/Port_of_Spain|America/St_Kitts","America/Port_of_Spain|America/St_Lucia","America/Port_of_Spain|America/St_Thomas","America/Port_of_Spain|America/St_Vincent","America/Port_of_Spain|America/Tortola","America/Port_of_Spain|America/Virgin","America/Regina|Canada/Saskatchewan","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Tijuana|America/Ensenada","America/Tijuana|America/Santa_Isabel","America/Tijuana|Mexico/BajaNorte","America/Toronto|America/Montreal","America/Toronto|Canada/Eastern","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|Canada/Central","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Vientiane","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Ho_Chi_Minh|Asia/Saigon","Asia/Hong_Kong|Hongkong","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Singapore","Asia/Kuala_Lumpur|Singapore","Asia/Macau|Asia/Macao","Asia/Makassar|Asia/Ujung_Pandang","Asia/Nicosia|Europe/Nicosia","Asia/Qatar|Asia/Bahrain","Asia/Rangoon|Asia/Yangon","Asia/Riyadh|Asia/Aden","Asia/Riyadh|Asia/Kuwait","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|PRC","Asia/Taipei|ROC","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Asia/Kashgar","Atlantic/Faroe|Atlantic/Faeroe","Atlantic/Reykjavik|Iceland","Atlantic/South_Georgia|Etc/GMT+2","Australia/Adelaide|Australia/South","Australia/Brisbane|Australia/Queensland","Australia/Broken_Hill|Australia/Yancowinna","Australia/Darwin|Australia/North","Australia/Hobart|Australia/Currie","Australia/Hobart|Australia/Tasmania","Australia/Lord_Howe|Australia/LHI","Australia/Melbourne|Australia/Victoria","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/NSW","Etc/GMT-0|Etc/GMT","Etc/GMT-0|Etc/GMT+0","Etc/GMT-0|Etc/GMT0","Etc/GMT-0|Etc/Greenwich","Etc/GMT-0|GMT","Etc/GMT-0|GMT+0","Etc/GMT-0|GMT-0","Etc/GMT-0|GMT0","Etc/GMT-0|Greenwich","Etc/UTC|Etc/UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UCT","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Belgrade|Europe/Ljubljana","Europe/Belgrade|Europe/Podgorica","Europe/Belgrade|Europe/Sarajevo","Europe/Belgrade|Europe/Skopje","Europe/Belgrade|Europe/Zagreb","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Helsinki|Europe/Mariehamn","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Portugal","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Oslo|Arctic/Longyearbyen","Europe/Oslo|Atlantic/Jan_Mayen","Europe/Prague|Europe/Bratislava","Europe/Rome|Europe/San_Marino","Europe/Rome|Europe/Vatican","Europe/Warsaw|Poland","Europe/Zurich|Europe/Busingen","Europe/Zurich|Europe/Vaduz","Indian/Christmas|Etc/GMT-7","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Chuuk|Pacific/Truk","Pacific/Chuuk|Pacific/Yap","Pacific/Easter|Chile/EasterIsland","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kwajalein|Kwajalein","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Palau|Etc/GMT-9","Pacific/Pohnpei|Pacific/Ponape","Pacific/Port_Moresby|Etc/GMT-10","Pacific/Tarawa|Etc/GMT-12","Pacific/Tarawa|Pacific/Funafuti","Pacific/Tarawa|Pacific/Wake","Pacific/Tarawa|Pacific/Wallis"],"countries":["AD|Europe/Andorra","AE|Asia/Dubai","AF|Asia/Kabul","AG|America/Port_of_Spain America/Antigua","AI|America/Port_of_Spain America/Anguilla","AL|Europe/Tirane","AM|Asia/Yerevan","AO|Africa/Lagos Africa/Luanda","AQ|Antarctica/Casey Antarctica/Davis Antarctica/DumontDUrville Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Syowa Antarctica/Troll Antarctica/Vostok Pacific/Auckland Antarctica/McMurdo","AR|America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Salta America/Argentina/Jujuy America/Argentina/Tucuman America/Argentina/Catamarca America/Argentina/La_Rioja America/Argentina/San_Juan America/Argentina/Mendoza America/Argentina/San_Luis America/Argentina/Rio_Gallegos America/Argentina/Ushuaia","AS|Pacific/Pago_Pago","AT|Europe/Vienna","AU|Australia/Lord_Howe Antarctica/Macquarie Australia/Hobart Australia/Currie Australia/Melbourne Australia/Sydney Australia/Broken_Hill Australia/Brisbane Australia/Lindeman Australia/Adelaide Australia/Darwin Australia/Perth Australia/Eucla","AW|America/Curacao America/Aruba","AX|Europe/Helsinki Europe/Mariehamn","AZ|Asia/Baku","BA|Europe/Belgrade Europe/Sarajevo","BB|America/Barbados","BD|Asia/Dhaka","BE|Europe/Brussels","BF|Africa/Abidjan Africa/Ouagadougou","BG|Europe/Sofia","BH|Asia/Qatar Asia/Bahrain","BI|Africa/Maputo Africa/Bujumbura","BJ|Africa/Lagos Africa/Porto-Novo","BL|America/Port_of_Spain America/St_Barthelemy","BM|Atlantic/Bermuda","BN|Asia/Brunei","BO|America/La_Paz","BQ|America/Curacao America/Kralendijk","BR|America/Noronha America/Belem America/Fortaleza America/Recife America/Araguaina America/Maceio America/Bahia America/Sao_Paulo America/Campo_Grande America/Cuiaba America/Santarem America/Porto_Velho America/Boa_Vista America/Manaus America/Eirunepe America/Rio_Branco","BS|America/Nassau","BT|Asia/Thimphu","BW|Africa/Maputo Africa/Gaborone","BY|Europe/Minsk","BZ|America/Belize","CA|America/St_Johns America/Halifax America/Glace_Bay America/Moncton America/Goose_Bay America/Blanc-Sablon America/Toronto America/Nipigon America/Thunder_Bay America/Iqaluit America/Pangnirtung America/Atikokan America/Winnipeg America/Rainy_River America/Resolute America/Rankin_Inlet America/Regina America/Swift_Current America/Edmonton America/Cambridge_Bay America/Yellowknife America/Inuvik America/Creston America/Dawson_Creek America/Fort_Nelson America/Vancouver America/Whitehorse America/Dawson","CC|Indian/Cocos","CD|Africa/Maputo Africa/Lagos Africa/Kinshasa Africa/Lubumbashi","CF|Africa/Lagos Africa/Bangui","CG|Africa/Lagos Africa/Brazzaville","CH|Europe/Zurich","CI|Africa/Abidjan","CK|Pacific/Rarotonga","CL|America/Santiago America/Punta_Arenas Pacific/Easter","CM|Africa/Lagos Africa/Douala","CN|Asia/Shanghai Asia/Urumqi","CO|America/Bogota","CR|America/Costa_Rica","CU|America/Havana","CV|Atlantic/Cape_Verde","CW|America/Curacao","CX|Indian/Christmas","CY|Asia/Nicosia Asia/Famagusta","CZ|Europe/Prague","DE|Europe/Zurich Europe/Berlin Europe/Busingen","DJ|Africa/Nairobi Africa/Djibouti","DK|Europe/Copenhagen","DM|America/Port_of_Spain America/Dominica","DO|America/Santo_Domingo","DZ|Africa/Algiers","EC|America/Guayaquil Pacific/Galapagos","EE|Europe/Tallinn","EG|Africa/Cairo","EH|Africa/El_Aaiun","ER|Africa/Nairobi Africa/Asmara","ES|Europe/Madrid Africa/Ceuta Atlantic/Canary","ET|Africa/Nairobi Africa/Addis_Ababa","FI|Europe/Helsinki","FJ|Pacific/Fiji","FK|Atlantic/Stanley","FM|Pacific/Chuuk Pacific/Pohnpei Pacific/Kosrae","FO|Atlantic/Faroe","FR|Europe/Paris","GA|Africa/Lagos Africa/Libreville","GB|Europe/London","GD|America/Port_of_Spain America/Grenada","GE|Asia/Tbilisi","GF|America/Cayenne","GG|Europe/London Europe/Guernsey","GH|Africa/Accra","GI|Europe/Gibraltar","GL|America/Nuuk America/Danmarkshavn America/Scoresbysund America/Thule","GM|Africa/Abidjan Africa/Banjul","GN|Africa/Abidjan Africa/Conakry","GP|America/Port_of_Spain America/Guadeloupe","GQ|Africa/Lagos Africa/Malabo","GR|Europe/Athens","GS|Atlantic/South_Georgia","GT|America/Guatemala","GU|Pacific/Guam","GW|Africa/Bissau","GY|America/Guyana","HK|Asia/Hong_Kong","HN|America/Tegucigalpa","HR|Europe/Belgrade Europe/Zagreb","HT|America/Port-au-Prince","HU|Europe/Budapest","ID|Asia/Jakarta Asia/Pontianak Asia/Makassar Asia/Jayapura","IE|Europe/Dublin","IL|Asia/Jerusalem","IM|Europe/London Europe/Isle_of_Man","IN|Asia/Kolkata","IO|Indian/Chagos","IQ|Asia/Baghdad","IR|Asia/Tehran","IS|Atlantic/Reykjavik","IT|Europe/Rome","JE|Europe/London Europe/Jersey","JM|America/Jamaica","JO|Asia/Amman","JP|Asia/Tokyo","KE|Africa/Nairobi","KG|Asia/Bishkek","KH|Asia/Bangkok Asia/Phnom_Penh","KI|Pacific/Tarawa Pacific/Enderbury Pacific/Kiritimati","KM|Africa/Nairobi Indian/Comoro","KN|America/Port_of_Spain America/St_Kitts","KP|Asia/Pyongyang","KR|Asia/Seoul","KW|Asia/Riyadh Asia/Kuwait","KY|America/Panama America/Cayman","KZ|Asia/Almaty Asia/Qyzylorda Asia/Qostanay Asia/Aqtobe Asia/Aqtau Asia/Atyrau Asia/Oral","LA|Asia/Bangkok Asia/Vientiane","LB|Asia/Beirut","LC|America/Port_of_Spain America/St_Lucia","LI|Europe/Zurich Europe/Vaduz","LK|Asia/Colombo","LR|Africa/Monrovia","LS|Africa/Johannesburg Africa/Maseru","LT|Europe/Vilnius","LU|Europe/Luxembourg","LV|Europe/Riga","LY|Africa/Tripoli","MA|Africa/Casablanca","MC|Europe/Monaco","MD|Europe/Chisinau","ME|Europe/Belgrade Europe/Podgorica","MF|America/Port_of_Spain America/Marigot","MG|Africa/Nairobi Indian/Antananarivo","MH|Pacific/Majuro Pacific/Kwajalein","MK|Europe/Belgrade Europe/Skopje","ML|Africa/Abidjan Africa/Bamako","MM|Asia/Yangon","MN|Asia/Ulaanbaatar Asia/Hovd Asia/Choibalsan","MO|Asia/Macau","MP|Pacific/Guam Pacific/Saipan","MQ|America/Martinique","MR|Africa/Abidjan Africa/Nouakchott","MS|America/Port_of_Spain America/Montserrat","MT|Europe/Malta","MU|Indian/Mauritius","MV|Indian/Maldives","MW|Africa/Maputo Africa/Blantyre","MX|America/Mexico_City America/Cancun America/Merida America/Monterrey America/Matamoros America/Mazatlan America/Chihuahua America/Ojinaga America/Hermosillo America/Tijuana America/Bahia_Banderas","MY|Asia/Kuala_Lumpur Asia/Kuching","MZ|Africa/Maputo","NA|Africa/Windhoek","NC|Pacific/Noumea","NE|Africa/Lagos Africa/Niamey","NF|Pacific/Norfolk","NG|Africa/Lagos","NI|America/Managua","NL|Europe/Amsterdam","NO|Europe/Oslo","NP|Asia/Kathmandu","NR|Pacific/Nauru","NU|Pacific/Niue","NZ|Pacific/Auckland Pacific/Chatham","OM|Asia/Dubai Asia/Muscat","PA|America/Panama","PE|America/Lima","PF|Pacific/Tahiti Pacific/Marquesas Pacific/Gambier","PG|Pacific/Port_Moresby Pacific/Bougainville","PH|Asia/Manila","PK|Asia/Karachi","PL|Europe/Warsaw","PM|America/Miquelon","PN|Pacific/Pitcairn","PR|America/Puerto_Rico","PS|Asia/Gaza Asia/Hebron","PT|Europe/Lisbon Atlantic/Madeira Atlantic/Azores","PW|Pacific/Palau","PY|America/Asuncion","QA|Asia/Qatar","RE|Indian/Reunion","RO|Europe/Bucharest","RS|Europe/Belgrade","RU|Europe/Kaliningrad Europe/Moscow Europe/Simferopol Europe/Kirov Europe/Astrakhan Europe/Volgograd Europe/Saratov Europe/Ulyanovsk Europe/Samara Asia/Yekaterinburg Asia/Omsk Asia/Novosibirsk Asia/Barnaul Asia/Tomsk Asia/Novokuznetsk Asia/Krasnoyarsk Asia/Irkutsk Asia/Chita Asia/Yakutsk Asia/Khandyga Asia/Vladivostok Asia/Ust-Nera Asia/Magadan Asia/Sakhalin Asia/Srednekolymsk Asia/Kamchatka Asia/Anadyr","RW|Africa/Maputo Africa/Kigali","SA|Asia/Riyadh","SB|Pacific/Guadalcanal","SC|Indian/Mahe","SD|Africa/Khartoum","SE|Europe/Stockholm","SG|Asia/Singapore","SH|Africa/Abidjan Atlantic/St_Helena","SI|Europe/Belgrade Europe/Ljubljana","SJ|Europe/Oslo Arctic/Longyearbyen","SK|Europe/Prague Europe/Bratislava","SL|Africa/Abidjan Africa/Freetown","SM|Europe/Rome Europe/San_Marino","SN|Africa/Abidjan Africa/Dakar","SO|Africa/Nairobi Africa/Mogadishu","SR|America/Paramaribo","SS|Africa/Juba","ST|Africa/Sao_Tome","SV|America/El_Salvador","SX|America/Curacao America/Lower_Princes","SY|Asia/Damascus","SZ|Africa/Johannesburg Africa/Mbabane","TC|America/Grand_Turk","TD|Africa/Ndjamena","TF|Indian/Reunion Indian/Kerguelen","TG|Africa/Abidjan Africa/Lome","TH|Asia/Bangkok","TJ|Asia/Dushanbe","TK|Pacific/Fakaofo","TL|Asia/Dili","TM|Asia/Ashgabat","TN|Africa/Tunis","TO|Pacific/Tongatapu","TR|Europe/Istanbul","TT|America/Port_of_Spain","TV|Pacific/Funafuti","TW|Asia/Taipei","TZ|Africa/Nairobi Africa/Dar_es_Salaam","UA|Europe/Simferopol Europe/Kiev Europe/Uzhgorod Europe/Zaporozhye","UG|Africa/Nairobi Africa/Kampala","UM|Pacific/Pago_Pago Pacific/Wake Pacific/Honolulu Pacific/Midway","US|America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu","UY|America/Montevideo","UZ|Asia/Samarkand Asia/Tashkent","VA|Europe/Rome Europe/Vatican","VC|America/Port_of_Spain America/St_Vincent","VE|America/Caracas","VG|America/Port_of_Spain America/Tortola","VI|America/Port_of_Spain America/St_Thomas","VN|Asia/Bangkok Asia/Ho_Chi_Minh","VU|Pacific/Efate","WF|Pacific/Wallis","WS|Pacific/Apia","YE|Asia/Riyadh Asia/Aden","YT|Africa/Nairobi Indian/Mayotte","ZA|Africa/Johannesburg","ZM|Africa/Maputo Africa/Lusaka","ZW|Africa/Maputo Africa/Harare"]}')},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},function(e,t,n){"use strict";(function(t,r){const i=n(226).EventEmitter,a=n(720),o=n(1104),s=n(1105),l=n(1112),c=n(1129),u=n(257).Writable,d=n(155),h=n(1130),f=n(1131),p=n(1133),m=n(227),g=n(300)("mqttjs:client"),v=t?t.nextTick:function(e){setTimeout(e,0)},b=r.setImmediate||function(e){v(e)},y={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},A=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],_={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function w(e,t){let n;t.properties&&(n=t.properties.topicAlias);let r=t.topic.toString();if(0===r.length){if(void 0===n)return new Error("Unregistered Topic Alias");if(r=e.topicAliasSend.getTopicByAlias(n),void 0===r)return new Error("Unregistered Topic Alias");t.topic=r}n&&delete t.properties.topicAlias}function E(e,t,n){g("sendPacket :: packet: %O",t),g("sendPacket :: emitting `packetsend`"),e.emit("packetsend",t),g("sendPacket :: writing to stream");const r=l.writeToStream(t,e.stream,e.options);g("sendPacket :: writeToStream result %s",r),!r&&n&&n!==T?(g("sendPacket :: handle events on `drain` once through callback."),e.stream.once("drain",n)):n&&(g("sendPacket :: invoking cb"),n())}function S(e){e&&(g("flush: queue exists? %b",!!e),Object.keys(e).forEach((function(t){"function"==typeof e[t].cb&&(e[t].cb(new Error("Connection closed")),delete e[t])})))}function C(e,t,n,r){g("storeAndSend :: store packet with cmd %s to outgoingStore",t.cmd);let i,a=t;if("publish"===a.cmd&&(a=f(t),i=w(e,a),i))return n&&n(i);e.outgoingStore.put(a,(function(i){if(i)return n&&n(i);r(),E(e,t,n)}))}function T(e){g("nop ::",e)}function k(e,t){let n;const r=this;if(!(this instanceof k))return new k(e,t);for(n in this.options=t||{},y)void 0===this.options[n]?this.options[n]=y[n]:this.options[n]=t[n];g("MqttClient :: options.protocol",t.protocol),g("MqttClient :: options.protocolVersion",t.protocolVersion),g("MqttClient :: options.username",t.username),g("MqttClient :: options.keepalive",t.keepalive),g("MqttClient :: options.reconnectPeriod",t.reconnectPeriod),g("MqttClient :: options.rejectUnauthorized",t.rejectUnauthorized),g("MqttClient :: options.topicAliasMaximum",t.topicAliasMaximum),this.options.clientId="string"==typeof t.clientId?t.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),g("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=5===t.protocolVersion&&t.customHandleAcks?t.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=e,this.messageIdProvider=void 0===this.options.messageIdProvider?new c:this.options.messageIdProvider,this.outgoingStore=t.outgoingStore||new a,this.incomingStore=t.incomingStore||new a,this.queueQoSZero=void 0===t.queueQoSZero||t.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,t.topicAliasMaximum>0&&(t.topicAliasMaximum>65535?g("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new o(t.topicAliasMaximum)),this.on("connect",(function(){const e=this.queue;g("connect :: sending queued packets"),function t(){const n=e.shift();g("deliver :: entry %o",n);let i=null;if(!n)return void r._resubscribe();i=n.packet,g("deliver :: call _sendPacket for %o",i);let a=!0;i.messageId&&0!==i.messageId&&(r.messageIdProvider.register(i.messageId)||(a=!1)),a?r._sendPacket(i,(function(e){n.cb&&n.cb(e),t()})):(g("messageId: %d has already used. The message is skipped and removed.",i.messageId),t())}()})),this.on("close",(function(){g("close :: connected set to `false`"),this.connected=!1,g("close :: clearing connackTimer"),clearTimeout(this.connackTimer),g("close :: clearing ping timer"),null!==r.pingTimer&&(r.pingTimer.clear(),r.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),g("close :: calling _setupReconnect"),this._setupReconnect()})),i.call(this),g("MqttClient :: setting up stream"),this._setupStream()}d(k,i),k.prototype._setupStream=function(){const e=this,t=new u,n=l.parser(this.options);let r=null;const i=[];function a(){if(i.length)v(o);else{const e=r;r=null,e()}}function o(){g("work :: getting next packet in queue");const t=i.shift();if(t)g("work :: packet pulled from queue"),e._handlePacket(t,a);else{g("work :: no packets in queue");const e=r;r=null,g("work :: done flag is %s",!!e),e&&e()}}g("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),g("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),n.on("packet",(function(e){g("parser :: on packet push to packets array."),i.push(e)})),t._write=function(e,t,i){r=i,g("writable stream :: parsing buffer"),n.parse(e),o()},g("_setupStream :: pipe stream to writable stream"),this.stream.pipe(t),this.stream.on("error",(function(t){g("streamErrorHandler :: error",t.message),A.includes(t.code)?(g("streamErrorHandler :: emitting error"),e.emit("error",t)):T(t)})),this.stream.on("close",(function(){var t;g("(%s)stream :: on close",e.options.clientId),(t=e.outgoing)&&(g("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(t).forEach((function(e){t[e].volatile&&"function"==typeof t[e].cb&&(t[e].cb(new Error("Connection closed")),delete t[e])}))),g("stream: emit close to MqttClient"),e.emit("close")})),g("_setupStream: sending packet `connect`");const s=Object.create(this.options);if(s.cmd="connect",this.topicAliasRecv&&(s.properties||(s.properties={}),this.topicAliasRecv&&(s.properties.topicAliasMaximum=this.topicAliasRecv.max)),E(this,s),n.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return e.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket){E(this,m({cmd:"auth",reasonCode:0},this.options.authPacket))}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){g("!!connectTimeout hit!! Calling _cleanUp with force `true`"),e._cleanUp(!0)}),this.options.connectTimeout)},k.prototype._handlePacket=function(e,t){const n=this.options;if(5===n.protocolVersion&&n.properties&&n.properties.maximumPacketSize&&n.properties.maximumPacketSize<e.length)return this.emit("error",new Error("exceeding packets size "+e.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(g("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",e),e.cmd){case"publish":this._handlePublish(e,t);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(e),t();break;case"pubrel":this._handlePubrel(e,t);break;case"connack":this._handleConnack(e),t();break;case"auth":this._handleAuth(e),t();break;case"pingresp":this._handlePingresp(e),t();break;case"disconnect":this._handleDisconnect(e),t()}},k.prototype._checkDisconnecting=function(e){return this.disconnecting&&(e&&e!==T?e(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},k.prototype.publish=function(e,t,n,r){g("publish :: message `%s` to topic `%s`",t,e);const i=this.options;"function"==typeof n&&(r=n,n=null);if(n=m({qos:0,retain:!1,dup:!1},n),this._checkDisconnecting(r))return this;const a=this,o=function(){let o=0;if((1===n.qos||2===n.qos)&&(o=a._nextId(),null===o))return g("No messageId left"),!1;const s={cmd:"publish",topic:e,payload:t,qos:n.qos,retain:n.retain,messageId:o,dup:n.dup};switch(5===i.protocolVersion&&(s.properties=n.properties),g("publish :: qos",n.qos),n.qos){case 1:case 2:a.outgoing[s.messageId]={volatile:!1,cb:r||T},g("MqttClient:publish: packet cmd: %s",s.cmd),a._sendPacket(s,void 0,n.cbStorePut);break;default:g("MqttClient:publish: packet cmd: %s",s.cmd),a._sendPacket(s,r,n.cbStorePut)}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!o())&&this._storeProcessingQueue.push({invoke:o,cbStorePut:n.cbStorePut,callback:r}),this},k.prototype.subscribe=function(){const e=this,t=new Array(arguments.length);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];const n=[];let r=t.shift();const i=r.resubscribe;let a=t.pop()||T,o=t.pop();const s=this.options.protocolVersion;delete r.resubscribe,"string"==typeof r&&(r=[r]),"function"!=typeof a&&(o=a,a=T);const l=p.validateTopics(r);if(null!==l)return b(a,new Error("Invalid topic "+l)),this;if(this._checkDisconnecting(a))return g("subscribe: discconecting true"),this;const c={qos:0};if(5===s&&(c.nl=!1,c.rap=!1,c.rh=0),o=m(c,o),Array.isArray(r)?r.forEach((function(t){if(g("subscribe: array topic %s",t),!Object.prototype.hasOwnProperty.call(e._resubscribeTopics,t)||e._resubscribeTopics[t].qos<o.qos||i){const e={topic:t,qos:o.qos};5===s&&(e.nl=o.nl,e.rap=o.rap,e.rh=o.rh,e.properties=o.properties),g("subscribe: pushing topic `%s` and qos `%s` to subs list",e.topic,e.qos),n.push(e)}})):Object.keys(r).forEach((function(t){if(g("subscribe: object topic %s",t),!Object.prototype.hasOwnProperty.call(e._resubscribeTopics,t)||e._resubscribeTopics[t].qos<r[t].qos||i){const e={topic:t,qos:r[t].qos};5===s&&(e.nl=r[t].nl,e.rap=r[t].rap,e.rh=r[t].rh,e.properties=o.properties),g("subscribe: pushing `%s` to subs list",e),n.push(e)}})),!n.length)return a(null,[]),this;const u=function(){const t=e._nextId();if(null===t)return g("No messageId left"),!1;const r={cmd:"subscribe",subscriptions:n,qos:1,retain:!1,dup:!1,messageId:t};if(o.properties&&(r.properties=o.properties),e.options.resubscribe){g("subscribe :: resubscribe true");const t=[];n.forEach((function(n){if(e.options.reconnectPeriod>0){const r={qos:n.qos};5===s&&(r.nl=n.nl||!1,r.rap=n.rap||!1,r.rh=n.rh||0,r.properties=n.properties),e._resubscribeTopics[n.topic]=r,t.push(n.topic)}})),e.messageIdToTopic[r.messageId]=t}return e.outgoing[r.messageId]={volatile:!0,cb:function(e,t){if(!e){const e=t.granted;for(let t=0;t<e.length;t+=1)n[t].qos=e[t]}a(e,n)}},g("subscribe :: call _sendPacket"),e._sendPacket(r),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!u())&&this._storeProcessingQueue.push({invoke:u,callback:a}),this},k.prototype.unsubscribe=function(){const e=this,t=new Array(arguments.length);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];let n=t.shift(),r=t.pop()||T,i=t.pop();"string"==typeof n&&(n=[n]),"function"!=typeof r&&(i=r,r=T);const a=p.validateTopics(n);if(null!==a)return b(r,new Error("Invalid topic "+a)),this;if(e._checkDisconnecting(r))return this;const o=function(){const t=e._nextId();if(null===t)return g("No messageId left"),!1;const a={cmd:"unsubscribe",qos:1,messageId:t};return"string"==typeof n?a.unsubscriptions=[n]:Array.isArray(n)&&(a.unsubscriptions=n),e.options.resubscribe&&a.unsubscriptions.forEach((function(t){delete e._resubscribeTopics[t]})),"object"==typeof i&&i.properties&&(a.properties=i.properties),e.outgoing[a.messageId]={volatile:!0,cb:r},g("unsubscribe: call _sendPacket"),e._sendPacket(a),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!o())&&this._storeProcessingQueue.push({invoke:o,callback:r}),this},k.prototype.end=function(e,t,n){const r=this;function i(){g("end :: closeStores: closing incoming and outgoing stores"),r.disconnected=!0,r.incomingStore.close((function(e){r.outgoingStore.close((function(t){if(g("end :: closeStores: emitting end"),r.emit("end"),n){const r=e||t;g("end :: closeStores: invoking callback with args"),n(r)}}))})),r._deferredReconnect&&r._deferredReconnect()}function a(){g("end :: (%s) :: finish :: calling _cleanUp with force %s",r.options.clientId,e),r._cleanUp(e,()=>{g("end :: finish :: calling process.nextTick on closeStores"),v(i.bind(r))},t)}return g("end :: (%s)",this.options.clientId),null!=e&&"boolean"==typeof e||(n=t||T,t=e,e=!1,"object"!=typeof t&&(n=t,t=null,"function"!=typeof n&&(n=T))),"object"!=typeof t&&(n=t,t=null),g("end :: cb? %s",!!n),n=n||T,this.disconnecting?(n(),this):(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?(g("end :: (%s) :: calling finish in 10ms once outgoing is empty",r.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,a,10))):(g("end :: (%s) :: immediately calling finish",r.options.clientId),a()),this)},k.prototype.removeOutgoingMessage=function(e){const t=this.outgoing[e]?this.outgoing[e].cb:null;return delete this.outgoing[e],this.outgoingStore.del({messageId:e},(function(){t(new Error("Message removed"))})),this},k.prototype.reconnect=function(e){g("client reconnect");const t=this,n=function(){e?(t.options.incomingStore=e.incomingStore,t.options.outgoingStore=e.outgoingStore):(t.options.incomingStore=null,t.options.outgoingStore=null),t.incomingStore=t.options.incomingStore||new a,t.outgoingStore=t.options.outgoingStore||new a,t.disconnecting=!1,t.disconnected=!1,t._deferredReconnect=null,t._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=n:n(),this},k.prototype._reconnect=function(){g("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),g("client already connected. disconnecting first.")):(g("_reconnect: calling _setupStream"),this._setupStream())},k.prototype._setupReconnect=function(){const e=this;!e.disconnecting&&!e.reconnectTimer&&e.options.reconnectPeriod>0?(this.reconnecting||(g("_setupReconnect :: emit `offline` state"),this.emit("offline"),g("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),g("_setupReconnect :: setting reconnectTimer for %d ms",e.options.reconnectPeriod),e.reconnectTimer=setInterval((function(){g("reconnectTimer :: reconnect triggered!"),e._reconnect()}),e.options.reconnectPeriod)):g("_setupReconnect :: doing nothing...")},k.prototype._clearReconnect=function(){g("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},k.prototype._cleanUp=function(e,t){const n=arguments[2];if(t&&(g("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",t)),g("_cleanUp :: forced? %s",e),e)0===this.options.reconnectPeriod&&this.options.clean&&S(this.outgoing),g("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const e=m({cmd:"disconnect"},n);g("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(e,b.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(g("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(g("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),t&&!this.connected&&(g("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",t),t())},k.prototype._sendPacket=function(e,t,n){g("_sendPacket :: (%s) ::  start",this.options.clientId),n=n||T,t=t||T;const r=function(e,t){if(5===e.options.protocolVersion&&"publish"===t.cmd){let n;t.properties&&(n=t.properties.topicAlias);const r=t.topic.toString();if(e.topicAliasSend)if(n){if(0!==r.length&&(g("applyTopicAlias :: register topic: %s - alias: %d",r,n),!e.topicAliasSend.put(r,n)))return g("applyTopicAlias :: error out of range. topic: %s - alias: %d",r,n),new Error("Sending Topic Alias out of range")}else 0!==r.length&&(e.options.autoAssignTopicAlias?(n=e.topicAliasSend.getAliasByTopic(r),n?(t.topic="",t.properties={...t.properties,topicAlias:n},g("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",r,n)):(n=e.topicAliasSend.getLruAlias(),e.topicAliasSend.put(r,n),t.properties={...t.properties,topicAlias:n},g("applyTopicAlias :: auto assign topic: %s - alias: %d",r,n))):e.options.autoUseTopicAlias&&(n=e.topicAliasSend.getAliasByTopic(r),n&&(t.topic="",t.properties={...t.properties,topicAlias:n},g("applyTopicAlias :: auto use topic: %s - alias: %d",r,n))));else if(n)return g("applyTopicAlias :: error out of range. topic: %s - alias: %d",r,n),new Error("Sending Topic Alias out of range")}}(this,e);if(r)t(r);else{if(!this.connected)return"auth"===e.cmd?(this._shiftPingInterval(),void E(this,e,t)):(g("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(e,t,n));switch(this._shiftPingInterval(),e.cmd){case"publish":break;case"pubrel":return void C(this,e,t,n);default:return void E(this,e,t)}switch(e.qos){case 2:case 1:C(this,e,t,n);break;case 0:default:E(this,e,t)}g("_sendPacket :: (%s) ::  end",this.options.clientId)}},k.prototype._storePacket=function(e,t,n){g("_storePacket :: packet: %o",e),g("_storePacket :: cb? %s",!!t),n=n||T;let r=e;if("publish"===r.cmd){r=f(e);const n=w(this,r);if(n)return t&&t(n)}0===(r.qos||0)&&this.queueQoSZero||"publish"!==r.cmd?this.queue.push({packet:r,cb:t}):r.qos>0?(t=this.outgoing[r.messageId]?this.outgoing[r.messageId].cb:null,this.outgoingStore.put(r,(function(e){if(e)return t&&t(e);n()}))):t&&t(new Error("No connection to broker"))},k.prototype._setupPingTimer=function(){g("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const e=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=h((function(){e._checkPing()}),1e3*this.options.keepalive))},k.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},k.prototype._checkPing=function(){g("_checkPing :: checking ping..."),this.pingResp?(g("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(g("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},k.prototype._handlePingresp=function(){this.pingResp=!0},k.prototype._handleConnack=function(e){g("_handleConnack");const t=this.options,n=5===t.protocolVersion?e.reasonCode:e.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,e.properties){if(e.properties.topicAliasMaximum){if(e.properties.topicAliasMaximum>65535)return void this.emit("error",new Error("topicAliasMaximum from broker is out of range"));e.properties.topicAliasMaximum>0&&(this.topicAliasSend=new s(e.properties.topicAliasMaximum))}e.properties.serverKeepAlive&&t.keepalive&&(t.keepalive=e.properties.serverKeepAlive,this._shiftPingInterval()),e.properties.maximumPacketSize&&(t.properties||(t.properties={}),t.properties.maximumPacketSize=e.properties.maximumPacketSize)}if(0===n)this.reconnecting=!1,this._onConnect(e);else if(n>0){const e=new Error("Connection refused: "+_[n]);e.code=n,this.emit("error",e)}},k.prototype._handleAuth=function(e){const t=this.options.protocolVersion,n=5===t?e.reasonCode:e.returnCode;if(5!==t){const e=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+t);return e.code=n,void this.emit("error",e)}const r=this;this.handleAuth(e,(function(e,t){if(e)r.emit("error",e);else if(24===n)r.reconnecting=!1,r._sendPacket(t);else{const t=new Error("Connection refused: "+_[n]);e.code=n,r.emit("error",t)}}))},k.prototype.handleAuth=function(e,t){t()},k.prototype._handlePublish=function(e,t){g("_handlePublish: packet %o",e),t=void 0!==t?t:T;let n=e.topic.toString();const r=e.payload,i=e.qos,a=e.messageId,o=this,s=this.options,l=[0,16,128,131,135,144,145,151,153];if(5===this.options.protocolVersion){let t;if(e.properties&&(t=e.properties.topicAlias),void 0!==t)if(0===n.length){if(!(t>0&&t<=65535))return g("_handlePublish :: topic alias out of range. alias: %d",t),void this.emit("error",new Error("Received Topic Alias is out of range"));{const e=this.topicAliasRecv.getTopicByAlias(t);if(!e)return g("_handlePublish :: unregistered topic alias. alias: %d",t),void this.emit("error",new Error("Received unregistered Topic Alias"));n=e,g("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",n,t)}}else{if(!this.topicAliasRecv.put(n,t))return g("_handlePublish :: topic alias out of range. alias: %d",t),void this.emit("error",new Error("Received Topic Alias is out of range"));g("_handlePublish :: registered topic: %s - alias: %d",n,t)}}switch(g("_handlePublish: qos %d",i),i){case 2:s.customHandleAcks(n,r,e,(function(n,r){return n instanceof Error||(r=n,n=null),n?o.emit("error",n):-1===l.indexOf(r)?o.emit("error",new Error("Wrong reason code for pubrec")):void(r?o._sendPacket({cmd:"pubrec",messageId:a,reasonCode:r},t):o.incomingStore.put(e,(function(){o._sendPacket({cmd:"pubrec",messageId:a},t)})))}));break;case 1:s.customHandleAcks(n,r,e,(function(i,s){return i instanceof Error||(s=i,i=null),i?o.emit("error",i):-1===l.indexOf(s)?o.emit("error",new Error("Wrong reason code for puback")):(s||o.emit("message",n,r,e),void o.handleMessage(e,(function(e){if(e)return t&&t(e);o._sendPacket({cmd:"puback",messageId:a,reasonCode:s},t)})))}));break;case 0:this.emit("message",n,r,e),this.handleMessage(e,t);break;default:g("_handlePublish: unknown QoS. Doing nothing.")}},k.prototype.handleMessage=function(e,t){t()},k.prototype._handleAck=function(e){const t=e.messageId,n=e.cmd;let r=null;const i=this.outgoing[t]?this.outgoing[t].cb:null,a=this;let o;if(i){switch(g("_handleAck :: packet type",n),n){case"pubcomp":case"puback":{const n=e.reasonCode;n&&n>0&&16!==n&&(o=new Error("Publish error: "+_[n]),o.code=n,i(o,e)),delete this.outgoing[t],this.outgoingStore.del(e,i),this.messageIdProvider.deallocate(t),this._invokeStoreProcessingQueue();break}case"pubrec":{r={cmd:"pubrel",qos:2,messageId:t};const n=e.reasonCode;n&&n>0&&16!==n?(o=new Error("Publish error: "+_[n]),o.code=n,i(o,e)):this._sendPacket(r);break}case"suback":delete this.outgoing[t],this.messageIdProvider.deallocate(t);for(let n=0;n<e.granted.length;n++)if(0!=(128&e.granted[n])){const e=this.messageIdToTopic[t];e&&e.forEach((function(e){delete a._resubscribeTopics[e]}))}this._invokeStoreProcessingQueue(),i(null,e);break;case"unsuback":delete this.outgoing[t],this.messageIdProvider.deallocate(t),this._invokeStoreProcessingQueue(),i(null);break;default:a.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&0===Object.keys(this.outgoing).length&&this.emit("outgoingEmpty")}else g("_handleAck :: Server sent an ack in error. Ignoring.")},k.prototype._handlePubrel=function(e,t){g("handling pubrel packet"),t=void 0!==t?t:T;const n=e.messageId,r=this,i={cmd:"pubcomp",messageId:n};r.incomingStore.get(e,(function(e,n){e?r._sendPacket(i,t):(r.emit("message",n.topic,n.payload,n),r.handleMessage(n,(function(e){if(e)return t(e);r.incomingStore.del(n,T),r._sendPacket(i,t)})))}))},k.prototype._handleDisconnect=function(e){this.emit("disconnect",e)},k.prototype._nextId=function(){return this.messageIdProvider.allocate()},k.prototype.getLastMessageId=function(){return this.messageIdProvider.getLastAllocated()},k.prototype._resubscribe=function(){g("_resubscribe");const e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||5===this.options.protocolVersion&&!this.connackPacket.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(5===this.options.protocolVersion){g("_resubscribe: protocolVersion 5");for(let t=0;t<e.length;t++){const n={};n[e[t]]=this._resubscribeTopics[e[t]],n.resubscribe=!0,this.subscribe(n,{properties:n[e[t]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},k.prototype._onConnect=function(e){if(this.disconnected)return void this.emit("connect",e);const t=this;this.connackPacket=e,this.messageIdProvider.clear(),this._setupPingTimer(),this.connected=!0,function n(){let r=t.outgoingStore.createStream();function i(){t._storeProcessing=!1,t._packetIdsDuringStoreProcessing={}}function a(){r.destroy(),r=null,t._flushStoreProcessingQueue(),i()}t.once("close",a),r.on("error",(function(e){i(),t._flushStoreProcessingQueue(),t.removeListener("close",a),t.emit("error",e)})),r.on("end",(function(){let r=!0;for(const e in t._packetIdsDuringStoreProcessing)if(!t._packetIdsDuringStoreProcessing[e]){r=!1;break}r?(i(),t.removeListener("close",a),t._invokeAllStoreProcessingQueue(),t.emit("connect",e)):n()})),function e(){if(!r)return;t._storeProcessing=!0;const n=r.read(1);let i;n?t._packetIdsDuringStoreProcessing[n.messageId]?e():t.disconnecting||t.reconnectTimer?r.destroy&&r.destroy():(i=t.outgoing[n.messageId]?t.outgoing[n.messageId].cb:null,t.outgoing[n.messageId]={volatile:!1,cb:function(t,n){i&&i(t,n),e()}},t._packetIdsDuringStoreProcessing[n.messageId]=!0,t.messageIdProvider.register(n.messageId)?t._sendPacket(n):g("messageId: %d has already used.",n.messageId)):r.once("readable",e)}()}()},k.prototype._invokeStoreProcessingQueue=function(){if(this._storeProcessingQueue.length>0){const e=this._storeProcessingQueue[0];if(e&&e.invoke())return this._storeProcessingQueue.shift(),!0}return!1},k.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},k.prototype._flushStoreProcessingQueue=function(){for(const e of this._storeProcessingQueue)e.cbStorePut&&e.cbStorePut(new Error("Connection closed")),e.callback&&e.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},e.exports=k}).call(this,n(96),n(68))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),o=r[0],s=r[1],l=new a(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),u=0,d=s>0?o-4:o;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=0,s=n-i;o<s;o+=16383)a.push(u(e,o,o+16383>s?s:o+16383));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s<l;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,a,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[n+f]=255&o,f+=p,o/=256,c-=8);e[n+f-p]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(113).Buffer,s=n(1098).inspect,l=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,c;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&a(t.prototype,n),c&&a(t,c),e}()},function(e,t){},function(e,t,n){var r=n(113),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(444),o=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),d=Symbol("handlePromise"),h=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var n=e[h].read();null!==n&&(e[u]=null,e[o]=null,e[s]=null,t(f(n,!1)))}}function m(e){t.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(r={get stream(){return this[h]},next:function(){var e=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[h].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[l]?r(e[l]):n(f(void 0,!0))}))}));var r,i=this[u];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[c]?n(f(void 0,!0)):t[d](n,r)}),r)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(f(a,!1));r=new Promise(this[d])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(v,(i(t={},h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var r=n[h].read();r?(n[u]=null,n[o]=null,n[s]=null,e(f(r,!1))):(n[o]=e,n[s]=t)},writable:!0}),t));return n[u]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[u]=null,n[o]=null,n[s]=null,t(e)),void(n[l]=e)}var r=n[o];null!==r&&(n[u]=null,n[o]=null,n[s]=null,r(f(void 0,!0))),n[c]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this,n(96))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=i;var r=n(727);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(155)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var i=n(258).codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(444)),r(e,{readable:t,writable:i},(function(e){if(e)return a(e);s=!0,a()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new o("pipe"))}}function c(e){e()}function u(e,t){return e.pipe(t)}function d(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=d(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var o=t.map((function(e,n){var a=n<t.length-1;return l(e,a,n>0,(function(e){r||(r=e),e&&o.forEach(c),a||(o.forEach(c),i(r))}))}));return t.reduce(u)}},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.aliasToTopic={},this.max=e}r.prototype.put=function(e,t){return!(0===t||t>this.max)&&(this.aliasToTopic[t]=e,this.length=Object.keys(this.aliasToTopic).length,!0)},r.prototype.getTopicByAlias=function(e){return this.aliasToTopic[e]},r.prototype.clear=function(){this.aliasToTopic={}},e.exports=r},function(e,t,n){"use strict";const r=n(1106),i=n(1109).NumberAllocator;function a(e){if(!(this instanceof a))return new a(e);e>0&&(this.aliasToTopic=new r({max:e}),this.topicToAlias={},this.numberAllocator=new i(1,e),this.max=e,this.length=0)}a.prototype.put=function(e,t){if(0===t||t>this.max)return!1;const n=this.aliasToTopic.get(t);return n&&delete this.topicToAlias[n],this.aliasToTopic.set(t,e),this.topicToAlias[e]=t,this.numberAllocator.use(t),this.length=this.aliasToTopic.length,!0},a.prototype.getTopicByAlias=function(e){return this.aliasToTopic.get(e)},a.prototype.getAliasByTopic=function(e){const t=this.topicToAlias[e];return void 0!==t&&this.aliasToTopic.get(t),t},a.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},a.prototype.getLruAlias=function(){const e=this.numberAllocator.firstVacant();return e||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},e.exports=a},function(e,t,n){"use strict";const r=n(1107),i=Symbol("max"),a=Symbol("length"),o=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),d=Symbol("lruList"),h=Symbol("cache"),f=Symbol("updateAgeOnGet"),p=()=>1;const m=(e,t,n)=>{const r=e[h].get(t);if(r){const t=r.value;if(g(e,t)){if(b(e,r),!e[s])return}else n&&(e[f]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},v=e=>{if(e[a]>e[i])for(let t=e[d].tail;e[a]>e[i]&&null!==t;){const n=t.prev;b(e,t),t=n}},b=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[a]-=n.length,e[h].delete(n.key),e[d].removeNode(t)}};class y{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const A=(e,t,n,r)=>{let i=n.value;g(e,i)&&(b(e,n),e[s]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[o]="function"!=typeof t?p:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,v(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,v(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[o]&&(this[o]=e,this[a]=0,this[d].forEach(e=>{e.length=this[o](e.value,e.key),this[a]+=e.length})),v(this)}get lengthCalculator(){return this[o]}get length(){return this[a]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;A(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;A(this,e,n,t),n=r}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach(e=>this[c](e.key,e.value)),this[h]=new Map,this[d]=new r,this[a]=0}dump(){return this[d].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[o](t,e);if(this[h].has(e)){if(s>this[i])return b(this,this[h].get(e)),!1;const o=this[h].get(e).value;return this[c]&&(this[u]||this[c](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[a]+=s-o.length,o.length=s,this.get(e),v(this),!0}const f=new y(e,t,s,r,n);return f.length>this[i]?(this[c]&&this[c](e,t),!1):(this[a]+=f.length,this[d].unshift(f),this[h].set(e,this[d].head),v(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[d].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[h].forEach((e,t)=>m(this,t,!1))}}},function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new s(n,null,t,e):new s(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function a(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,n,r){if(!(this instanceof s))return new s(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=s,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,a=this.head;null!==a&&i<e;i++)a=a.next;for(;null!==a&&i<t;i++,a=a.next)n.push(a.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,a=this.tail;null!==a&&i>t;i--)a=a.prev;for(;null!==a&&i>e;i--,a=a.prev)n.push(a.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,a=this.head;null!==a&&r<e;r++)a=a.next;var o=[];for(r=0;a&&r<t;r++)o.push(a.value),a=this.removeNode(a);null===a&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(r=0;r<n.length;r++)a=i(this,a,n[r]);return o},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(1108)(r)}catch(e){}},function(e,t,n){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,n){const r=n(1110);e.exports.NumberAllocator=r},function(e,t,n){"use strict";const r=n(1810).Set,i=n(728)("number-allocator:trace"),a=n(728)("number-allocator:error");function o(e,t){this.low=e,this.high=t}function s(e,t){if(!(this instanceof s))return new s(e,t);this.min=e,this.max=t,this.ss=new r([],(e,t)=>e.compare(t)),i("Create"),this.clear()}o.prototype.equals=function(e){return this.low===e.low&&this.high===e.high},o.prototype.compare=function(e){return this.low<e.low&&this.high<e.low?-1:e.low<this.low&&e.high<this.low?1:0},s.prototype.firstVacant=function(){return 0===this.ss.size()?null:this.ss.front().low},s.prototype.alloc=function(){if(0===this.ss.size())return i("alloc():empty"),null;const e=this.ss.front(),t=e.low;return t+1<=e.high?++e.low:this.ss.eraseElementByPos(0),i("alloc():"+t),t},s.prototype.use=function(e){const t=new o(e,e),n=this.ss.lowerBound(t);if(n){if(n.equals(t))return this.ss.eraseElementByValue(n),i("use():"+e),!0;if(n.low>e)return!1;if(n.low===e)return++n.low,i("use():"+e),!0;if(n.high===e)return--n.high,i("use():"+e),!0;const r=n.low;return n.low=e+1,this.ss.insert(new o(r,e-1)),i("use():"+e),!0}return i("use():failed"),!1},s.prototype.free=function(e){if(e<this.min||e>this.max)return void a("free():"+e+" is out of range");const t=new o(e,e),n=this.ss.lowerBound(t);if(n){if(n.low<=e&&e<=n.high)return void a("free():"+e+" has already been vacant");if(n===this.ss.front())e+1===n.low?--n.low:this.ss.insert(t);else{const r=this.ss.reverseLowerBound(t);r.high+1===e?e+1===n.low?(this.ss.eraseElementByValue(r),n.low=r.low):r.high=e:e+1===n.low?n.low=e:this.ss.insert(t)}}else{if(n===this.ss.front())return void this.ss.insert(t);const r=this.ss.reverseLowerBound(t);r.high+1===e?r.high=e:this.ss.insert(t)}i("free():"+e)},s.prototype.clear=function(){i("clear()"),this.ss.clear(),this.ss.insert(new o(this.min,this.max))},s.prototype.intervalCount=function(){return this.ss.size()},s.prototype.dump=function(){console.log("length:"+this.ss.size());for(const e of this.ss)console.log(e)},e.exports=s},function(e,t,n){e.exports=function(e){function t(e){let n,i,a,o=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),a=i-(n||i);r.diff=a,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];n=a.call(r,t),e.splice(o,1),o--}return n}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(445),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t,n){t.parser=n(1113).parser,t.generate=n(1126),t.writeToStream=n(737)},function(e,t,n){const r=n(1114),i=n(226),a=n(1124),o=n(735),s=n(736)("mqtt-packet:parser");class l extends i{constructor(){super(),this.parser=this.constructor.parser}static parser(e){return this instanceof l?(this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new l).parser(e)}_resetState(){s("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new a,this.error=null,this._list=r(),this._stateCounter=0}parse(e){for(this.error&&this._resetState(),this._list.append(e),s("parse: current state: %s",this._states[this._stateCounter]);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,s("parse: state complete. _stateCounter is now: %d",this._stateCounter),s("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return s("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const e=this._list.readUInt8(0);return this.packet.cmd=o.types[e>>o.CMD_SHIFT],this.packet.retain=0!=(e&o.RETAIN_MASK),this.packet.qos=e>>o.QOS_SHIFT&o.QOS_MASK,this.packet.dup=0!=(e&o.DUP_MASK),s("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),s("_parseLength %d",e.value),!!e}_parsePayload(){s("_parsePayload: payload %O",this._list);let e=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}e=!0}return s("_parsePayload complete result: %s",e),e}_parseConnect(){let e,t,n,r;s("_parseConnect");const i={},a=this.packet,l=this._parseString();if(null===l)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==l&&"MQIsdp"!==l)return this._emitError(new Error("Invalid protocolId"));if(a.protocolId=l,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(a.protocolVersion=this._list.readUInt8(this._pos),a.protocolVersion>=128&&(a.bridgeMode=!0,a.protocolVersion=a.protocolVersion-128),3!==a.protocolVersion&&4!==a.protocolVersion&&5!==a.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(i.username=this._list.readUInt8(this._pos)&o.USERNAME_MASK,i.password=this._list.readUInt8(this._pos)&o.PASSWORD_MASK,i.will=this._list.readUInt8(this._pos)&o.WILL_FLAG_MASK,i.will&&(a.will={},a.will.retain=0!=(this._list.readUInt8(this._pos)&o.WILL_RETAIN_MASK),a.will.qos=(this._list.readUInt8(this._pos)&o.WILL_QOS_MASK)>>o.WILL_QOS_SHIFT),a.clean=0!=(this._list.readUInt8(this._pos)&o.CLEAN_SESSION_MASK),this._pos++,a.keepalive=this._parseNum(),-1===a.keepalive)return this._emitError(new Error("Packet too short"));if(5===a.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(a.properties=e)}const c=this._parseString();if(null===c)return this._emitError(new Error("Packet too short"));if(a.clientId=c,s("_parseConnect: packet.clientId: %s",a.clientId),i.will){if(5===a.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(a.will.properties=e)}if(e=this._parseString(),null===e)return this._emitError(new Error("Cannot parse will topic"));if(a.will.topic=e,s("_parseConnect: packet.will.topic: %s",a.will.topic),t=this._parseBuffer(),null===t)return this._emitError(new Error("Cannot parse will payload"));a.will.payload=t,s("_parseConnect: packet.will.paylaod: %s",a.will.payload)}if(i.username){if(r=this._parseString(),null===r)return this._emitError(new Error("Cannot parse username"));a.username=r,s("_parseConnect: packet.username: %s",a.username)}if(i.password){if(n=this._parseBuffer(),null===n)return this._emitError(new Error("Cannot parse password"));a.password=n}return this.settings=a,s("_parseConnect: complete"),a}_parseConnack(){s("_parseConnack");const e=this.packet;if(this._list.length<1)return null;if(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&o.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else{if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++)}if(-1===e.returnCode||-1===e.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}s("_parseConnack: complete")}_parsePublish(){s("_parsePublish");const e=this.packet;if(e.topic=this._parseString(),null===e.topic)return this._emitError(new Error("Cannot parse topic"));if(!(e.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length),s("_parsePublish: payload from buffer list: %o",e.payload)}}_parseSubscribe(){s("_parseSubscribe");const e=this.packet;let t,n,r,i,a,l,c;if(1!==e.qos)return this._emitError(new Error("Wrong subscribe header"));if(e.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos<e.length;){if(t=this._parseString(),null===t)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=e.length)return this._emitError(new Error("Malformed Subscribe Payload"));n=this._parseByte(),r=n&o.SUBSCRIBE_OPTIONS_QOS_MASK,l=0!=(n>>o.SUBSCRIBE_OPTIONS_NL_SHIFT&o.SUBSCRIBE_OPTIONS_NL_MASK),a=0!=(n>>o.SUBSCRIBE_OPTIONS_RAP_SHIFT&o.SUBSCRIBE_OPTIONS_RAP_MASK),i=n>>o.SUBSCRIBE_OPTIONS_RH_SHIFT&o.SUBSCRIBE_OPTIONS_RH_MASK,c={topic:t,qos:r},5===this.settings.protocolVersion?(c.nl=l,c.rap=a,c.rh=i):this.settings.bridgeMode&&(c.rh=0,c.rap=!0,c.nl=!0),s("_parseSubscribe: push subscription `%s` to subscription",c),e.subscriptions.push(c)}}}_parseSuback(){s("_parseSuback");const e=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){s("_parseUnsubscribe");const e=this.packet;if(e.unsubscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos<e.length;){const t=this._parseString();if(null===t)return this._emitError(new Error("Cannot parse topic"));s("_parseUnsubscribe: push topic `%s` to unsubscriptions",t),e.unsubscriptions.push(t)}}}_parseUnsuback(){s("_parseUnsuback");const e=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(5===this.settings.protocolVersion){const t=this._parseProperties();for(Object.getOwnPropertyNames(t).length&&(e.properties=t),e.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){s("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const e=this.packet;if(this._parseMessageId(),5===this.settings.protocolVersion&&(e.length>2?(e.reasonCode=this._parseByte(),s("_parseConfirmation: packet.reasonCode `%d`",e.reasonCode)):e.reasonCode=0,e.length>3)){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return!0}_parseDisconnect(){const e=this.packet;if(s("_parseDisconnect"),5===this.settings.protocolVersion){this._list.length>0?e.reasonCode=this._parseByte():e.reasonCode=0;const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return s("_parseDisconnect result: true"),!0}_parseAuth(){s("_parseAuth");const e=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));e.reasonCode=this._parseByte();const t=this._parseProperties();return Object.getOwnPropertyNames(t).length&&(e.properties=t),s("_parseAuth: result: true"),!0}_parseMessageId(){const e=this.packet;return e.messageId=this._parseNum(),null===e.messageId?(this._emitError(new Error("Cannot parse messageId")),!1):(s("_parseMessageId: packet.messageId %d",e.messageId),!0)}_parseString(e){const t=this._parseNum(),n=t+this._pos;if(-1===t||n>this._list.length||n>this.packet.length)return null;const r=this._list.toString("utf8",this._pos,n);return this._pos+=t,s("_parseString: result: %s",r),r}_parseStringPair(){return s("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const e=this._parseNum(),t=e+this._pos;if(-1===e||t>this._list.length||t>this.packet.length)return null;const n=this._list.slice(this._pos,t);return this._pos+=e,s("_parseBuffer: result: %o",n),n}_parseNum(){if(this._list.length-this._pos<2)return-1;const e=this._list.readUInt16BE(this._pos);return this._pos+=2,s("_parseNum: result: %s",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const e=this._list.readUInt32BE(this._pos);return this._pos+=4,s("_parse4ByteNum: result: %s",e),e}_parseVarByteNum(e){s("_parseVarByteNum");let t,n=0,r=1,i=0,a=!1;const l=this._pos?this._pos:0;for(;n<4&&l+n<this._list.length;){if(t=this._list.readUInt8(l+n++),i+=r*(t&o.VARBYTEINT_MASK),r*=128,0==(t&o.VARBYTEINT_FIN_MASK)){a=!0;break}if(this._list.length<=n)break}return!a&&4===n&&this._list.length>=n&&this._emitError(new Error("Invalid variable byte integer")),l&&(this._pos+=n),a=!!a&&(e?{bytes:n,value:i}:i),s("_parseVarByteNum: result: %o",a),a}_parseByte(){let e;return this._pos<this._list.length&&(e=this._list.readUInt8(this._pos),this._pos++),s("_parseByte: result: %o",e),e}_parseByType(e){switch(s("_parseByType: type: %s",e),e){case"byte":return 0!==this._parseByte();case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){s("_parseProperties");const e=this._parseVarByteNum(),t=this._pos+e,n={};for(;this._pos<t;){const e=this._parseByte();if(!e)return this._emitError(new Error("Cannot parse property code type")),!1;const t=o.propertiesCodes[e];if(!t)return this._emitError(new Error("Unknown property")),!1;if("userProperties"!==t)n[t]?Array.isArray(n[t])?n[t].push(this._parseByType(o.propertiesTypes[t])):(n[t]=[n[t]],n[t].push(this._parseByType(o.propertiesTypes[t]))):n[t]=this._parseByType(o.propertiesTypes[t]);else{n[t]||(n[t]=Object.create(null));const e=this._parseByType(o.propertiesTypes[t]);if(n[t][e.name])if(Array.isArray(n[t][e.name]))n[t][e.name].push(e.value);else{const r=n[t][e.name];n[t][e.name]=[r],n[t][e.name].push(e.value)}else n[t][e.name]=e.value}}return n}_newPacket(){return s("_newPacket"),this.packet&&(this._list.consume(this.packet.length),s("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),s("_newPacket: new packet"),this.packet=new a,this._pos=0,!0}_emitError(e){s("_emitError"),this.error=e,this.emit("error",e)}}e.exports=l},function(e,t,n){"use strict";const r=n(1115).Duplex,i=n(155),a=n(1123);function o(e){if(!(this instanceof o))return new o(e);if("function"==typeof e){this._callback=e;const t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)})),e=null}a._init.call(this,e),r.call(this)}i(o,r),Object.assign(o.prototype,a.prototype),o.prototype._new=function(e){return new o(e)},o.prototype._write=function(e,t,n){this._appendBuffer(e),"function"==typeof n&&n()},o.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},o.prototype.end=function(e){r.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},o.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},o.prototype._isBufferList=function(e){return e instanceof o||e instanceof a||o.isBufferList(e)},o.isBufferList=a.isBufferList,e.exports=o,e.exports.BufferListStream=o,e.exports.BufferList=a},function(e,t,n){(t=e.exports=n(729)).Stream=t,t.Readable=t,t.Writable=n(733),t.Duplex=n(261),t.Transform=n(734),t.PassThrough=n(1121),t.finished=n(446),t.pipeline=n(1122)},function(e,t){},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(113).Buffer,s=n(1118).inspect,l=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,c;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&a(t.prototype,n),c&&a(t,c),e}()},function(e,t){},function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(446),o=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),d=Symbol("handlePromise"),h=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var n=e[h].read();null!==n&&(e[u]=null,e[o]=null,e[s]=null,t(f(n,!1)))}}function m(e){t.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(r={get stream(){return this[h]},next:function(){var e=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[h].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[l]?r(e[l]):n(f(void 0,!0))}))}));var r,i=this[u];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[c]?n(f(void 0,!0)):t[d](n,r)}),r)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(f(a,!1));r=new Promise(this[d])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(v,(i(t={},h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var r=n[h].read();r?(n[u]=null,n[o]=null,n[s]=null,e(f(r,!1))):(n[o]=e,n[s]=t)},writable:!0}),t));return n[u]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[u]=null,n[o]=null,n[s]=null,t(e)),void(n[l]=e)}var r=n[o];null!==r&&(n[u]=null,n[o]=null,n[s]=null,r(f(void 0,!0))),n[c]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this,n(96))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=i;var r=n(734);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(155)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var i=n(260).codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(446)),r(e,{readable:t,writable:i},(function(e){if(e)return a(e);s=!0,a()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new o("pipe"))}}function c(e){e()}function u(e,t){return e.pipe(t)}function d(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=d(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var o=t.map((function(e,n){var a=n<t.length-1;return l(e,a,n>0,(function(e){r||(r=e),e&&o.forEach(c),a||(o.forEach(c),i(r))}))}));return t.reduce(u)}},function(e,t,n){"use strict";const{Buffer:r}=n(113),i=Symbol.for("BufferList");function a(e){if(!(this instanceof a))return new a(e);a._init.call(this,e)}a._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},a.prototype._new=function(e){return new a(e)},a.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let n=0;n<this._bufs.length;n++){const r=t+this._bufs[n].length;if(e<r||n===this._bufs.length-1)return[n,e-t];t=r}},a.prototype._reverseOffset=function(e){const t=e[0];let n=e[1];for(let e=0;e<t;e++)n+=this._bufs[e].length;return n},a.prototype.get=function(e){if(e>this.length||e<0)return;const t=this._offset(e);return this._bufs[t[0]][t[1]]},a.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},a.prototype.copy=function(e,t,n,i){if(("number"!=typeof n||n<0)&&(n=0),("number"!=typeof i||i>this.length)&&(i=this.length),n>=this.length)return e||r.alloc(0);if(i<=0)return e||r.alloc(0);const a=!!e,o=this._offset(n),s=i-n;let l=s,c=a&&t||0,u=o[1];if(0===n&&i===this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:r.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,c),c+=this._bufs[t].length;return e}if(l<=this._bufs[o[0]].length-u)return a?this._bufs[o[0]].copy(e,t,u,u+l):this._bufs[o[0]].slice(u,u+l);a||(e=r.allocUnsafe(s));for(let t=o[0];t<this._bufs.length;t++){const n=this._bufs[t].length-u;if(!(l>n)){this._bufs[t].copy(e,c,u,u+l),c+=n;break}this._bufs[t].copy(e,c,u),c+=n,l-=n,u&&(u=0)}return e.length>c?e.slice(0,c):e},a.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();const n=this._offset(e),r=this._offset(t),i=this._bufs.slice(n[0],r[0]+1);return 0===r[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,r[1]),0!==n[1]&&(i[0]=i[0].slice(n[1])),this._new(i)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){const e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},a.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(r.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(r.from(e));return this},a.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},a.prototype.indexOf=function(e,t,n){if(void 0===n&&"string"==typeof t&&(n=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=r.from([e]):"string"==typeof e?e=r.from(e,n):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=r.from(e.buffer,e.byteOffset,e.byteLength):r.isBuffer(e)||(e=r.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;const i=this._offset(t);let a=i[0],o=i[1];for(;a<this._bufs.length;a++){const t=this._bufs[a];for(;o<t.length;){if(t.length-o>=e.length){const n=t.indexOf(e,o);if(-1!==n)return this._reverseOffset([a,n]);o=t.length-e.length+1}else{const t=this._reverseOffset([a,o]);if(this._match(t,e))return t;o++}}o=0}return-1},a.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let n=0;n<t.length;n++)if(this.get(e+n)!==t[n])return!1;return!0},function(){const e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const t in e)!function(t){a.prototype[t]=null===e[t]?function(e,n){return this.slice(e,e+n)[t](0,n)}:function(n=0){return this.slice(n,n+e[t])[t](0)}}(t)}(),a.prototype._isBufferList=function(e){return e instanceof a||a.isBufferList(e)},a.isBufferList=function(e){return null!=e&&e[i]},e.exports=a},function(e,t){e.exports=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},function(e,t,n){e.exports=function(e){function t(e){let n,i,a,o=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),a=i-(n||i);r.diff=a,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];n=a.call(r,t),e.splice(o,1),o--}return n}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(445),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t,n){(function(t){const r=n(737),i=n(226);class a extends i{constructor(){super(),this._array=new Array(20),this._i=0}write(e){return this._array[this._i++]=e,!0}concat(){let e=0;const n=new Array(this._array.length),r=this._array;let i,a=0;for(i=0;i<r.length&&void 0!==r[i];i++)"string"!=typeof r[i]?n[i]=r[i].length:n[i]=t.byteLength(r[i]),e+=n[i];const o=t.allocUnsafe(e);for(i=0;i<r.length&&void 0!==r[i];i++)"string"!=typeof r[i]?(r[i].copy(o,a),a+=n[i]):(o.write(r[i],a),a+=n[i]);return o}}e.exports=function(e,t){const n=new a;return r(e,n,t),n.concat()}}).call(this,n(113).Buffer)},function(e,t,n){(function(t){const n={},r=t.isBuffer(t.from([1,2]).subarray(0,1));function i(e){const n=t.allocUnsafe(2);return n.writeUInt8(e>>8,0),n.writeUInt8(255&e,1),n}e.exports={cache:n,generateCache:function(){for(let e=0;e<65536;e++)n[e]=i(e)},generateNumber:i,genBufVariableByteInt:function(e){let n=0,i=0;const a=t.allocUnsafe(4);do{n=e%128|0,(e=e/128|0)>0&&(n|=128),a.writeUInt8(n,i++)}while(e>0&&i<4);return e>0&&(i=0),r?a.subarray(0,i):a.slice(0,i)},generate4ByteBuffer:function(e){const n=t.allocUnsafe(4);return n.writeUInt32BE(e,0),n}}}).call(this,n(113).Buffer)},function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,n(96))},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;this.nextId=Math.max(1,Math.floor(65535*Math.random()))}r.prototype.allocate=function(){const e=this.nextId++;return 65536===this.nextId&&(this.nextId=1),e},r.prototype.getLastAllocated=function(){return 1===this.nextId?65535:this.nextId-1},r.prototype.register=function(e){return!0},r.prototype.deallocate=function(e){},r.prototype.clear=function(){},e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=this;this._callback=e,this._args=n,this._interval=setInterval(e,t,this._args),this.reschedule=function(e){e||(e=r._interval),r._interval&&clearInterval(r._interval),r._interval=setInterval(r._callback,e,r._args)},this.clear=function(){r._interval&&(clearInterval(r._interval),r._interval=void 0)},this.destroy=function(){r._interval&&clearInterval(r._interval),r._callback=void 0,r._interval=void 0,r._args=void 0}}e.exports=function(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var t=0;t<e.length;t++)e[t]=arguments[t+2]}return new r(arguments[0],arguments[1],e)}},function(e,t,n){"use strict";e.exports=n(1132)()},function(e,t,n){"use strict";(function(t){function n(e){return e instanceof t?t.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){return(e=e||{}).circles?function(e){var t=[],r=[];return e.proto?function e(a){if("object"!=typeof a||null===a)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return i(a,e);if(a instanceof Map)return new Map(i(Array.from(a),e));if(a instanceof Set)return new Set(i(Array.from(a),e));var o={};for(var s in t.push(a),r.push(o),a){var l=a[s];if("object"!=typeof l||null===l)o[s]=l;else if(l instanceof Date)o[s]=new Date(l);else if(l instanceof Map)o[s]=new Map(i(Array.from(l),e));else if(l instanceof Set)o[s]=new Set(i(Array.from(l),e));else if(ArrayBuffer.isView(l))o[s]=n(l);else{var c=t.indexOf(l);o[s]=-1!==c?r[c]:e(l)}}return t.pop(),r.pop(),o}:function e(a){if("object"!=typeof a||null===a)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return i(a,e);if(a instanceof Map)return new Map(i(Array.from(a),e));if(a instanceof Set)return new Set(i(Array.from(a),e));var o={};for(var s in t.push(a),r.push(o),a)if(!1!==Object.hasOwnProperty.call(a,s)){var l=a[s];if("object"!=typeof l||null===l)o[s]=l;else if(l instanceof Date)o[s]=new Date(l);else if(l instanceof Map)o[s]=new Map(i(Array.from(l),e));else if(l instanceof Set)o[s]=new Set(i(Array.from(l),e));else if(ArrayBuffer.isView(l))o[s]=n(l);else{var c=t.indexOf(l);o[s]=-1!==c?r[c]:e(l)}}return t.pop(),r.pop(),o};function i(e,i){for(var a=Object.keys(e),o=new Array(a.length),s=0;s<a.length;s++){var l=a[s],c=e[l];if("object"!=typeof c||null===c)o[l]=c;else if(c instanceof Date)o[l]=new Date(c);else if(ArrayBuffer.isView(c))o[l]=n(c);else{var u=t.indexOf(c);o[l]=-1!==u?r[u]:i(c)}}return o}}(e):e.proto?function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return t(r,e);if(r instanceof Map)return new Map(t(Array.from(r),e));if(r instanceof Set)return new Set(t(Array.from(r),e));var i={};for(var a in r){var o=r[a];"object"!=typeof o||null===o?i[a]=o:o instanceof Date?i[a]=new Date(o):o instanceof Map?i[a]=new Map(t(Array.from(o),e)):o instanceof Set?i[a]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?i[a]=n(o):i[a]=e(o)}return i}:function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return t(r,e);if(r instanceof Map)return new Map(t(Array.from(r),e));if(r instanceof Set)return new Set(t(Array.from(r),e));var i={};for(var a in r)if(!1!==Object.hasOwnProperty.call(r,a)){var o=r[a];"object"!=typeof o||null===o?i[a]=o:o instanceof Date?i[a]=new Date(o):o instanceof Map?i[a]=new Map(t(Array.from(o),e)):o instanceof Set?i[a]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?i[a]=n(o):i[a]=e(o)}return i};function t(e,t){for(var r=Object.keys(e),i=new Array(r.length),a=0;a<r.length;a++){var o=r[a],s=e[o];"object"!=typeof s||null===s?i[o]=s:s instanceof Date?i[o]=new Date(s):ArrayBuffer.isView(s)?i[o]=n(s):i[o]=t(s)}return i}}}).call(this,n(113).Buffer)},function(e,t,n){"use strict";function r(e){const t=e.split("/");for(let e=0;e<t.length;e++)if("+"!==t[e]){if("#"===t[e])return e===t.length-1;if(-1!==t[e].indexOf("+")||-1!==t[e].indexOf("#"))return!1}return!0}e.exports={validateTopics:function(e){if(0===e.length)return"empty_topic_list";for(let t=0;t<e.length;t++)if(!r(e[t]))return e[t];return null}}},function(e,t,n){e.exports=function(e){function t(e){let n,i,a,o=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),a=i-(n||i);r.diff=a,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];n=a.call(r,t),e.splice(o,1),o--}return n}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(445),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t,n){"use strict";var r=n(1136),i=n(1137);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=y(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(1138);function y(e,t,n){if(e&&i.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var y=e=c.join(s);if(y=y.trim(),!n&&1===e.split("#").length){var A=l.exec(y);if(A)return this.path=y,this.href=y,this.pathname=A[1],A[2]?(this.search=A[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=o.exec(y);if(_){var w=(_=_[0]).toLowerCase();this.protocol=w,y=y.substr(_.length)}if(n||_||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===y.substr(0,2);!E||_&&g[_]||(y=y.substr(2),this.slashes=!0)}if(!g[_]&&(E||_&&!v[_])){for(var S,C,T=-1,k=0;k<h.length;k++){-1!==(x=y.indexOf(h[k]))&&(-1===T||x<T)&&(T=x)}-1!==(C=-1===T?y.lastIndexOf("@"):y.lastIndexOf("@",T))&&(S=y.slice(0,C),y=y.slice(C+1),this.auth=decodeURIComponent(S)),T=-1;for(k=0;k<d.length;k++){var x;-1!==(x=y.indexOf(d[k]))&&(-1===T||x<T)&&(T=x)}-1===T&&(T=y.length),this.host=y.slice(0,T),y=y.slice(T),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var I=this.hostname.split(/\./),M=(k=0,I.length);k<M;k++){var P=I[k];if(P&&!P.match(f)){for(var D="",N=0,L=P.length;N<L;N++)P.charCodeAt(N)>127?D+="x":D+=P[N];if(!D.match(f)){var R=I.slice(0,k),B=I.slice(k+1),j=P.match(p);j&&(R.push(j[1]),B.unshift(j[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[w])for(k=0,M=u.length;k<M;k++){var H=u[k];if(-1!==y.indexOf(H)){var z=encodeURIComponent(H);z===H&&(z=escape(H)),y=y.split(H).join(z)}}var V=y.indexOf("#");-1!==V&&(this.hash=y.substr(V),y=y.slice(0,V));var W=y.indexOf("?");if(-1!==W?(this.search=y.substr(W),this.query=y.substr(W+1),t&&(this.query=b.parse(this.query)),y=y.slice(0,W)):t&&(this.search="",this.query={}),y&&(this.pathname=y),v[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var G=this.search||"";this.path=F+G}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,o="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(o=b.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+a+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var f=d[h];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",b=n.search||"";n.path=m+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),A=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=A||y||n.host&&e.pathname,w=_,E=n.pathname&&n.pathname.split("/")||[],S=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===E[0])),A)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(S)n.hostname=n.host=E.shift(),(O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=E.slice(-1)[0],T=(n.host||e.host||E.length>1)&&("."===C||".."===C)||""===C,k=0,x=E.length;x>=0;x--)"."===(C=E[x])?E.splice(x,1):".."===C?(E.splice(x,1),k++):k&&(E.splice(x,1),k--);if(!_&&!w)for(;k--;k)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),T&&"/"!==E.join("/").substr(-1)&&E.push("");var O,I=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(n.hostname=n.host=I?"":E.length?E.shift():"",(O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift()));return(_=_||n.host&&E.length)&&!I&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r&&r;o.global!==o&&o.window!==o&&o.self;var s,l=2147483647,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,p=String.fromCharCode;function m(e){throw new RangeError(h[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function b(e){for(var t,n,r=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function y(e){return g(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function A(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;r+=36)e=f(e/35);return f(r+36*e/(e+38))}function w(e){var t,n,r,i,a,o,s,c,u,d,h,p=[],g=e.length,v=0,b=128,A=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&m("not-basic"),p.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(a=v,o=1,s=36;i>=g&&m("invalid-input"),((c=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>f((l-v)/o))&&m("overflow"),v+=c*o,!(c<(u=s<=A?1:s>=A+26?26:s-A));s+=36)o>f(l/(d=36-u))&&m("overflow"),o*=d;A=_(v-a,t=p.length+1,0==a),f(v/t)>l-b&&m("overflow"),b+=f(v/t),v%=t,p.splice(v++,0,b)}return y(p)}function E(e){var t,n,r,i,a,o,s,c,u,d,h,g,v,y,w,E=[];for(g=(e=b(e)).length,t=128,n=0,a=72,o=0;o<g;++o)(h=e[o])<128&&E.push(p(h));for(r=i=E.length,i&&E.push("-");r<g;){for(s=l,o=0;o<g;++o)(h=e[o])>=t&&h<s&&(s=h);for(s-t>f((l-n)/(v=r+1))&&m("overflow"),n+=(s-t)*v,t=s,o=0;o<g;++o)if((h=e[o])<t&&++n>l&&m("overflow"),h==t){for(c=n,u=36;!(c<(d=u<=a?1:u>=a+26?26:u-a));u+=36)w=c-d,y=36-d,E.push(p(A(d+w%y,0))),c=f(w/y);E.push(p(A(c,0))),a=_(n,v,r==i),n=0,++r}++n,++t}return E.join("")}s={version:"1.4.1",ucs2:{decode:b,encode:y},decode:w,encode:E,toASCII:function(e){return v(e,(function(e){return u.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return v(e,(function(e){return c.test(e)?w(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(256)(e),n(68))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(1139),t.encode=t.stringify=n(1140)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var l=1e3;a&&"number"==typeof a.maxKeys&&(l=a.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,h,f,p,m=e[u].replace(s,"%20"),g=m.indexOf(n);g>=0?(d=m.substr(0,g),h=m.substr(g+1)):(d=m,h=""),f=decodeURIComponent(d),p=decodeURIComponent(h),r(o,f)?i(o[f])?o[f].push(p):o[f]=[o[f],p]:o[f]=p}return o};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?a(o(e),(function(o){var s=encodeURIComponent(r(o))+n;return i(e[o])?a(e[o],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[o]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t){},function(e,t,n){(function(t){var r=n(1143),i=function(){},a=function(e,n,o){if("function"==typeof n)return a(e,null,n);n||(n={}),o=r(o||i);var s=e._writableState,l=e._readableState,c=n.readable||!1!==n.readable&&e.readable,u=n.writable||!1!==n.writable&&e.writable,d=!1,h=function(){e.writable||f()},f=function(){u=!1,c||o.call(e)},p=function(){c=!1,u||o.call(e)},m=function(t){o.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){o.call(e,t)},v=function(){t.nextTick(b)},b=function(){if(!d)return(!c||l&&l.ended&&!l.destroyed)&&(!u||s&&s.ended&&!s.destroyed)?void 0:o.call(e,new Error("premature close"))},y=function(){e.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?u&&!s&&(e.on("end",h),e.on("close",h)):(e.on("complete",f),e.on("abort",v),e.req?y():e.on("request",y)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",m),e.on("end",p),e.on("finish",f),!1!==n.error&&e.on("error",g),e.on("close",v),function(){d=!0,e.removeListener("complete",f),e.removeListener("abort",v),e.removeListener("request",y),e.req&&e.req.removeListener("finish",f),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("exit",m),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",v)}};e.exports=a}).call(this,n(96))},function(e,t,n){var r=n(1144);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function a(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(a),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return a(this)},configurable:!0})}))},function(e,t){e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},function(e,t){e.exports=function(e){var t=e._readableState;return t?t.objectMode||"number"==typeof e._duplexState?e.read():e.read(function(e){if(e.buffer.length)return e.buffer.head?e.buffer.head.data.length:e.buffer[0].length;return e.length}(t)):null}},function(e,t,n){"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(e,t,n){var r;!function(i,a){"use strict";var o="model",s="name",l="type",c="vendor",u="version",d="mobile",h="tablet",f="smarttv",p=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},m=function(e,t){return"string"==typeof e&&-1!==g(t).indexOf(g(e))},g=function(e){return e.toLowerCase()},v=function(e,t){if("string"==typeof e)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===t?e:e.substring(0,255)},b=function(e,t){for(var n,r,i,a,o,s,l=0;l<t.length&&!o;){var c=t[l],u=t[l+1];for(n=r=0;n<c.length&&!o;)if(o=c[n++].exec(e))for(i=0;i<u.length;i++)s=o[++r],"object"==typeof(a=u[i])&&a.length>0?2===a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,s):this[a[0]]=a[1]:3===a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=s?s.replace(a[1],a[2]):void 0:this[a[0]]=s?a[1].call(this,s,a[2]):void 0:4===a.length&&(this[a[0]]=s?a[3].call(this,s.replace(a[1],a[2])):void 0):this[a]=s||void 0;l+=2}},y=function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(m(t[n][r],e))return"?"===n?void 0:n}else if(m(t[n],e))return"?"===n?void 0:n;return e},A={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},_={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,u],[/opios[\/ ]+([\w\.]+)/i],[u,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[u,[s,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[s,u],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[u,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[u,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[u,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],u],[/\bfocus\/([\w\.]+)/i],[u,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[u,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[u,[s,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,u],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,"Facebook"],u],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,u],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,u],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[u,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[u,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[u,y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[s,u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[s,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[s,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",g]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",g]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",g]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[c,"Samsung"],[l,h]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[c,"Samsung"],[l,d]],[/\((ip(?:hone|od)[\w ]*);/i],[o,[c,"Apple"],[l,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[c,"Apple"],[l,h]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[c,"Huawei"],[l,h]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[o,[c,"Huawei"],[l,d]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[o,/_/g," "],[c,"Xiaomi"],[l,d]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[c,"Xiaomi"],[l,h]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[c,"OPPO"],[l,d]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[c,"Vivo"],[l,d]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[o,[c,"Realme"],[l,d]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[c,"Motorola"],[l,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[c,"Motorola"],[l,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[c,"LG"],[l,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[c,"LG"],[l,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[c,"Lenovo"],[l,h]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[c,"Nokia"],[l,d]],[/(pixel c)\b/i],[o,[c,"Google"],[l,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[c,"Google"],[l,d]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[c,"Sony"],[l,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[c,"Sony"],[l,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[c,"OnePlus"],[l,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[c,"Amazon"],[l,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[l,d]],[/(playbook);[-\w\),; ]+(rim)/i],[o,c,[l,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[c,"BlackBerry"],[l,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[c,"ASUS"],[l,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[c,"ASUS"],[l,d]],[/(nexus 9)/i],[o,[c,"HTC"],[l,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[c,[o,/_/g," "],[l,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[c,"Acer"],[l,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[c,"Meizu"],[l,d]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[c,"Sharp"],[l,d]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[c,o,[l,d]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[c,o,[l,h]],[/(surface duo)/i],[o,[c,"Microsoft"],[l,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[c,"Fairphone"],[l,d]],[/(u304aa)/i],[o,[c,"AT&T"],[l,d]],[/\bsie-(\w*)/i],[o,[c,"Siemens"],[l,d]],[/\b(rct\w+) b/i],[o,[c,"RCA"],[l,h]],[/\b(venue[\d ]{2,7}) b/i],[o,[c,"Dell"],[l,h]],[/\b(q(?:mv|ta)\w+) b/i],[o,[c,"Verizon"],[l,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[c,"Barnes & Noble"],[l,h]],[/\b(tm\d{3}\w+) b/i],[o,[c,"NuVision"],[l,h]],[/\b(k88) b/i],[o,[c,"ZTE"],[l,h]],[/\b(nx\d{3}j) b/i],[o,[c,"ZTE"],[l,d]],[/\b(gen\d{3}) b.+49h/i],[o,[c,"Swiss"],[l,d]],[/\b(zur\d{3}) b/i],[o,[c,"Swiss"],[l,h]],[/\b((zeki)?tb.*\b) b/i],[o,[c,"Zeki"],[l,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],o,[l,h]],[/\b(ns-?\w{0,9}) b/i],[o,[c,"Insignia"],[l,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[c,"NextBook"],[l,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],o,[l,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],o,[l,d]],[/\b(ph-1) /i],[o,[c,"Essential"],[l,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[c,"Envizen"],[l,h]],[/\b(trio[-\w\. ]+) b/i],[o,[c,"MachSpeed"],[l,h]],[/\btu_(1491) b/i],[o,[c,"Rotor"],[l,h]],[/(shield[\w ]+) b/i],[o,[c,"Nvidia"],[l,h]],[/(sprint) (\w+)/i],[c,o,[l,d]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[c,"Microsoft"],[l,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[c,"Zebra"],[l,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[c,"Zebra"],[l,d]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,o,[l,"console"]],[/droid.+; (shield) bui/i],[o,[c,"Nvidia"],[l,"console"]],[/(playstation [345portablevi]+)/i],[o,[c,"Sony"],[l,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[c,"Microsoft"],[l,"console"]],[/smart-tv.+(samsung)/i],[c,[l,f]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[c,"Samsung"],[l,f]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,"LG"],[l,f]],[/(apple) ?tv/i],[c,[o,"Apple TV"],[l,f]],[/crkey/i],[[o,"Chromecast"],[c,"Google"],[l,f]],[/droid.+aft(\w)( bui|\))/i],[o,[c,"Amazon"],[l,f]],[/\(dtv[\);].+(aquos)/i],[o,[c,"Sharp"],[l,f]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[c,v],[o,v],[l,f]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,f]],[/((pebble))app/i],[c,o,[l,"wearable"]],[/droid.+; (glass) \d/i],[o,[c,"Google"],[l,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[o,[c,"Zebra"],[l,"wearable"]],[/(quest( 2)?)/i],[o,[c,"Facebook"],[l,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[l,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[o,[l,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[l,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,h]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,d]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[s,u],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,u],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[u,y,A]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[u,y,A]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[u,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[u,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,u],[/\(bb(10);/i],[u,[s,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[u,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[u,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],u],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,u],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],u],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,u]]},w=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof w))return new w(e,t).getResult();var n=e||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(_,t):_;return this.getBrowser=function(){var e,t={};return t.name=void 0,t.version=void 0,b.call(t,n,r.browser),t.major="string"==typeof(e=t.version)?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,t},this.getCPU=function(){var e={architecture:void 0};return b.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return b.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return b.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return b.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n="string"==typeof e&&e.length>255?v(e,255):e,this},this.setUA(n),this};w.VERSION="0.7.31",w.BROWSER=p([s,u,"major"]),w.CPU=p(["architecture"]),w.DEVICE=p([o,c,l,"console",d,f,h,"wearable","embedded"]),w.ENGINE=w.OS=p([s,u]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=w),t.UAParser=w):n(1148)?void 0===(r=function(){return w}.call(t,n,t,e))||(e.exports=r):void 0!==i&&(i.UAParser=w);var E=void 0!==i&&(i.jQuery||i.Zepto);if(E&&!E.ua){var S=new w;E.ua=S.getResult(),E.ua.get=function(){return S.getUA()},E.ua.set=function(e){S.setUA(e);var t=S.getResult();for(var n in t)E.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}var o=a(n(262)),s=a(n(449)),l=a(n(263)),c=a(n(1159)),u=n(747),d=a(n(301)),h=n(1166),f=a(n(744)),p=a(n(126)),m=n(1189),g=a(n(350)),v=a(n(1202)),b=a(n(117)),y=a(n(1203)),A=a(n(1204)),_=n(760),w={PlaylistLoader:s.default,Playlist:l.default,Decrypter:u.Decrypter,AsyncStream:u.AsyncStream,decrypt:u.decrypt,utils:d.default,STANDARD_PLAYLIST_SELECTOR:_.lastBandwidthSelector,INITIAL_PLAYLIST_SELECTOR:_.lowestBitrateCompatibleVariantSelector,comparePlaylistBandwidth:_.comparePlaylistBandwidth,comparePlaylistResolution:_.comparePlaylistResolution,xhr:(0,c.default)()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach((function(e){Object.defineProperty(w,e,{get:function(){return p.default.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),g.default[e]},set:function(t){p.default.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?p.default.log.warn("value of Hls."+e+" must be greater than or equal to 0"):g.default[e]=t}})}));var E=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.uri){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};w.canPlaySource=function(){return p.default.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")},w.supportsNativeHls=function(){var e=o.default.createElement("video");if(!p.default.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),w.isSupported=function(){return p.default.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var S=function(e){function t(e,n,r){var a=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n,r.hls),n.options_&&n.options_.playerId){var s=(0,p.default)(n.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return p.default.log.warn("player.hls is deprecated. Use player.tech_.hls instead."),n.trigger({type:"usage",name:"hls-player-access"}),a}})}if(this.tech_=n,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");this.on(o.default,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=o.default.fullscreenElement||o.default.webkitFullscreenElement||o.default.mozFullScreenElement||o.default.msFullscreenElement;t&&t.contains(a.tech_.el())&&a.masterPlaylistController_.fastQualityChange_()})),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"setOptions_",value:function(){var e=this;this.options_.withCredentials=this.options_.withCredentials||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=4194304),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&4194304===this.options_.bandwidth,["withCredentials","bandwidth","handleManifestRedirects"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.bandwidth=this.options_.bandwidth}},{key:"src",value:function(e){var t=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=w,this.masterPlaylistController_=new m.MasterPlaylistController(this.options_),this.playbackWatcher_=new y.default(p.default.mergeOptions(this.options_,{seekable:function(){return t.seekable()}})),this.masterPlaylistController_.on("error",(function(){p.default.players[t.tech_.options_.playerId].error(t.masterPlaylistController_.error)})),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):w.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=w.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e=1/(this.bandwidth||1),t=void 0;return t=this.throughput>0?1/this.throughput:0,Math.floor(1/(e+t))},set:function(){p.default.log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return t.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return t.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return t.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return t.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return t.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return t.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return t.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return t.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("selectedinitialmedia",(function(){(0,v.default)(t)})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.tech_.ready((function(){return t.setupQualityLevels_()})),this.tech_.el()&&this.tech_.src(p.default.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var e=this,t=p.default.players[this.tech_.options_.playerId];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),E(t,n.playlists)})),this.playlists.on("mediachange",(function(){E(e.qualityLevels_,e.playlists)})))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),i(Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}}]),t}(p.default.getComponent("Component")),C=function e(t){return{canHandleSource:function(n){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=p.default.mergeOptions(p.default.options,r);return(!i.hls||!i.hls.mode||i.hls.mode===t)&&e.canPlayType(n.type,i)},handleSource:function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=p.default.mergeOptions(p.default.options,r,{hls:{mode:t}});return"flash"===t&&n.setTimeout((function(){n.trigger("loadstart")}),1),n.hls=new S(e,n,i),n.hls.xhr=(0,c.default)(),n.hls.src(e.src),n.hls},canPlayType:function(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=p.default.mergeOptions(p.default.options,n);return e.canPlayType(t,r)?"maybe":""}}};C.canPlayType=function(e,t){if(p.default.browser.IE_VERSION&&p.default.browser.IE_VERSION<=10)return!1;return!(!t.hls.overrideNative&&w.supportsNativeHls)&&/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(e)},void 0!==p.default.MediaSource&&void 0!==p.default.URL||(p.default.MediaSource=h.MediaSource,p.default.URL=h.URL);var T=p.default.getTech("Flash");h.MediaSource.supportsNativeMediaSources()&&p.default.getTech("Html5").registerSourceHandler(C("html5"),0),b.default.Uint8Array&&T&&T.registerSourceHandler(C("flash")),p.default.HlsHandler=S,p.default.HlsSourceHandler=C,p.default.Hls=w,p.default.use||p.default.registerComponent("Hls",w),p.default.m3u8=f.default,p.default.options.hls=p.default.options.hls||{},p.default.registerPlugin?p.default.registerPlugin("reloadSourceOnError",A.default):p.default.plugin("reloadSourceOnError",A.default),e.exports={Hls:w,HlsHandler:S,HlsSourceHandler:C}},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(1152)),a=r(n(117));t.default=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=i.default.buildAbsoluteURL(a.default.location.href,e)),i.default.buildAbsoluteURL(e,t))},e.exports=t.default},function(e,t,n){var r,i,a,o,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var c={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var u=o.path,d=u.substring(0,u.lastIndexOf("/")+1)+a.path;c.path=s.normalizePath(d)}else c.path=o.path,a.params||(c.params=o.params,a.query||(c.query=o.query));return null===c.path&&(c.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(c)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t,n){"use strict";n.r(t);var r=n(126),i=n.n(r);t.default=function(){return function e(t,n){t=Object(r.mergeOptions)({timeout:45e3},t);let a=e.beforeRequest||i.a.Hls.xhr.beforeRequest;if(a&&"function"==typeof a){let e=a(t);e&&(t=e)}let o=Object(r.xhr)(t,(function(e,t){let r=o.response;!e&&r&&(o.responseTime=Date.now(),o.roundTripTime=o.responseTime-o.requestTime,o.bytesReceived=r.byteLength||r.length,o.bandwidth||(o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3))),e&&"ETIMEDOUT"===e.code&&(o.timedout=!0),e||o.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(o&&(r||o.responseText)))),n(e,o)}));const s=o.abort;return o.abort=function(){return o.aborted=!0,s.apply(o,arguments)},o.uri=t.uri,o.requestTime=Date.now(),o}}},function(e,t,n){var r=n(117),i=e.exports={WebVTT:n(1155),VTTCue:n(1156),VTTRegion:n(1157)};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,o=i.VTTRegion,s=r.VTTCue,l=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=o},i.restore=function(){r.VTTCue=s,r.VTTRegion=l},r.VTTCue||i.shim()},function(e,t){var n=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function r(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function i(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function a(){this.values=n(null)}function o(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);if(2===o.length)t(o[0],o[1])}}function s(e,t,n){var s=e;function l(){var t=i(e);if(null===t)throw new r(r.Errors.BadTimeStamp,"Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=l(),c(),"--\x3e"!==e.substr(0,3))throw new r(r.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.substr(3),c(),t.endTime=l(),c(),function(e,t){var r=new a;o(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}r.prototype=n(Error.prototype),r.prototype.constructor=r,r.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},a.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var l={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={v:"title",lang:"lang"},d={rt:"ruby"};function h(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return l[e]}function a(e){for(;b=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(b[0],r);return e}function o(e,t){return!d[t.localName]||d[t.localName]===e.localName}function s(t,n){var r=c[t];if(!r)return null;var i=e.document.createElement(r);i.localName=r;var a=u[t];return a&&n&&(i[a]=n.trim()),i}for(var h,f=e.document.createElement("div"),p=f,m=[];null!==(h=n());)if("<"!==h[0])p.appendChild(e.document.createTextNode(a(h)));else{if("/"===h[1]){m.length&&m[m.length-1]===h.substr(2).replace(">","")&&(m.pop(),p=p.parentNode);continue}var g,v=i(h.substr(1,h.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),p.appendChild(g);continue}var b=h.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!b)continue;if(!(g=s(b[1],b[3])))continue;if(!o(p,g))continue;b[2]&&(g.className=b[2].substr(1).replace("."," ")),m.push(b[1]),p.appendChild(g),p=g}return f}var f=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function p(e){for(var t=0;t<f.length;t++){var n=f[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function m(){}function g(e,t,n){var r=/MSIE\s8\.0/.test(navigator.userAgent),i="rgba(255, 255, 255, 1)",a="rgba(0, 0, 0, 0.8)";r&&(i="rgb(255, 255, 255)",a="rgb(0, 0, 0)"),m.call(this),this.cue=t,this.cueDiv=h(e,t.text);var o={color:i,backgroundColor:a,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(o.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",o.unicodeBidi="plaintext"),this.applyStyles(o,this.cueDiv),this.div=e.document.createElement("div"),o={textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(o.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(p(n.charCodeAt(a)))return"rtl";return"ltr"}(this.cueDiv),o.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(o),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":s=t.position;break;case"middle":s=t.position-t.size/2;break;case"end":s=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function v(e){var t,n,r,i,a=/MSIE\s8\.0/.test(navigator.userAgent);if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight,a&&!this.lineHeight&&(this.lineHeight=13)}function b(e,t,n,r){var i=new v(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(a),s=[];if(a.snapToLines){var l;switch(a.vertical){case"":s=["+y","-y"],l="height";break;case"rl":s=["+x","-x"],l="width";break;case"lr":s=["-x","+x"],l="width"}var c=i.lineHeight,u=c*Math.round(o),d=n[l]+c,h=s[0];Math.abs(u)>d&&(u=u<0?-1:1,u*=Math.ceil(d/c)*c),o<0&&(u+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(h,u)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"middle":o-=f/2;break;case"end":o-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new v(t)}var p=function(e,t){for(var i,a=new v(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var l=e.intersectPercentage(n);o>l&&(i=new v(e),o=l),e=new v(a)}return i||a}(i,s);t.move(p.toCSSCompatValues(n))}function y(){}m.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},m.prototype.formatStyle=function(e,t){return 0===e?0:e+t},g.prototype=n(m.prototype),g.prototype.constructor=g,v.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},v.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},v.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},v.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},v.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},v.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},v.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},v.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},y.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},y.convertCueToDOMTree=function(e,t){return e&&t?h(e,t):null};y.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],a=v.getSimpleBoxPosition(r),o={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,s,l=0;l<t.length;l++)s=t[l],n=new g(e,s,o),r.appendChild(n.div),b(0,n,a,i),s.displayState=n.div,i.push(v.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},y.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},y.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof r))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function l(e){e.match(/X-TIMESTAMP-MAP/)?o(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new a;o(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",i(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):o(e,(function(e,n){switch(e){case"Region":!function(e){var n=new a;if(o(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new a;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var c;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var u=(c=n()).match(/^WEBVTT([ \t].*)?$/);if(!u||!u[0])throw new r(r.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:c=n(),t.state){case"HEADER":/:/.test(c)?l(c):c||(t.state="ID");continue;case"NOTE":c||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){t.state="NOTE";break}if(!c)continue;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===c.indexOf("--\x3e")){t.cue.id=c;continue}case"CUE":try{s(c,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==c.indexOf("--\x3e");if(!c||h&&(d=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=c;continue;case"BADCUE":c||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new r(r.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=y},function(e,t){var n={"":!0,lr:!0,rl:!0},r={start:!0,middle:!0,end:!0,left:!0,right:!0};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function o(e,t,r){var o=this,s=/MSIE\s8\.0/.test(navigator.userAgent),l={};s?o=document.createElement("custom"):l.enumerable=!0,o.hasBeenReset=!1;var c="",u=!1,d=e,h=t,f=r,p=null,m="",g=!0,v="auto",b="start",y=50,A="middle",_=50,w="middle";if(Object.defineProperty(o,"id",a({},l,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(o,"pauseOnExit",a({},l,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(o,"startTime",a({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",a({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",a({},l,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",a({},l,{get:function(){return p},set:function(e){p=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",a({},l,{get:function(){return m},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",a({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",a({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",a({},l,{get:function(){return b},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",a({},l,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",a({},l,{get:function(){return A},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");A=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",a({},l,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",a({},l,{get:function(){return w},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),o.displayState=void 0,s)return o}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,a=100,o=0,s=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=l(n(450)),o=l(n(745)),s=l(n(746));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.lineStream=new o.default,e.parseStream=new s.default,e.lineStream.pipe(e.parseStream);var n=e,i=[],a={},l=void 0,c=void 0,u=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h=0;return e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},e.parseStream.on("data",(function(e){var t=void 0,o=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(this.trigger("info",{message:"defaulting offset to zero"}),e.offset=0)),"offset"in e&&(a.byterange=t,t.offset=e.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key:function(){e.attributes?"NONE"!==e.attributes.METHOD?e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),c={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(c.iv=e.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):c=null:this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,h=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){l={},e.uri&&(l.uri=e.uri),e.byterange&&(l.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||d,e.attributes?(a.attributes||(a.attributes={}),r(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(o={default:/yes/i.test(e.attributes.DEFAULT)}).default?o.autoselect=!0:o.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(o.language=e.attributes.LANGUAGE),e.attributes.URI&&(o.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(o.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(o.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(o.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=o}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){h+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function(){this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data}}[e.tagType]||u).call(n)},uri:function(){a.uri=e.uri,i.push(a),!this.manifest.targetDuration||"duration"in a||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),c&&(a.key=c),a.timeline=h,l&&(a.map=l),a={}},comment:function(){}})[e.type].call(n)})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"push",value:function(e){this.lineStream.push(e)}},{key:"end",value:function(){this.lineStream.push("\n")}}]),t}(a.default);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(126),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(){return function e(t,n){t=(0,i.mergeOptions)({timeout:45e3},t);var r=e.beforeRequest||a.default.Hls.xhr.beforeRequest;if(r&&"function"==typeof r){var o=r(t);o&&(t=o)}var s=(0,i.xhr)(t,(function(e,t){var r=s.response;!e&&r&&(s.responseTime=Date.now(),s.roundTripTime=s.responseTime-s.requestTime,s.bytesReceived=r.byteLength||r.length,s.bandwidth||(s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3))),e&&"ETIMEDOUT"===e.code&&(s.timedout=!0),e||s.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(s&&(r||s.responseText)))),n(e,s)})),l=s.abort;return s.abort=function(){return s.aborted=!0,l.apply(s,arguments)},s.uri=t.uri,s.requestTime=Date.now(),s}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(1161)),o=i(n(748)),s=n(1163),l=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},c=function(e,t,n){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),i=new a.default(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),s=new Int32Array(o.buffer),c=void 0,u=void 0,d=void 0,h=void 0,f=void 0,p=void 0,m=void 0,g=void 0,v=void 0;for(c=n[0],u=n[1],d=n[2],h=n[3],v=0;v<r.length;v+=4)f=l(r[v]),p=l(r[v+1]),m=l(r[v+2]),g=l(r[v+3]),i.decrypt(f,p,m,g,s,v),s[v]=l(s[v]^c),s[v+1]=l(s[v+1]^u),s[v+2]=l(s[v+2]^d),s[v+3]=l(s[v+3]^h),c=f,u=p,d=m,h=g;return o};t.decrypt=c;var u=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a=e.STEP,c=new Int32Array(t.buffer),u=new Uint8Array(t.byteLength),d=0;for(this.asyncStream_=new o.default,this.asyncStream_.push(this.decryptChunk_(c.subarray(d,d+a),n,r,u)),d=a;d<c.length;d+=a)r=new Uint32Array([l(c[d-4]),l(c[d-3]),l(c[d-2]),l(c[d-1])]),this.asyncStream_.push(this.decryptChunk_(c.subarray(d,d+a),n,r,u));this.asyncStream_.push((function(){i(null,(0,s.unpad)(u))}))}return r(e,[{key:"decryptChunk_",value:function(e,t,n,r){return function(){var i=c(e,t,n);r.set(i,e.byteOffset)}}}],[{key:"STEP",get:function(){return 32e3}}]),e}();t.Decrypter=u,t.default={Decrypter:u,decrypt:c}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=null,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i||(i=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],r=t[4],i=n[4],a=void 0,o=void 0,s=void 0,l=[],c=[],u=void 0,d=void 0,h=void 0,f=void 0,p=void 0;for(a=0;a<256;a++)c[(l[a]=a<<1^283*(a>>7))^a]=a;for(o=s=0;!r[o];o^=u||1,s=c[s]||1)for(h=(h=s^s<<1^s<<2^s<<3^s<<4)>>8^255&h^99,r[o]=h,i[h]=o,p=16843009*l[d=l[u=l[o]]]^65537*d^257*u^16843008*o,f=257*l[h]^16843008*h,a=0;a<4;a++)t[a][o]=f=f<<24^f>>>8,n[a][h]=p=p<<24^p>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),n[a]=n[a].slice(0);return e}()),this._tables=[[i[0][0].slice(),i[0][1].slice(),i[0][2].slice(),i[0][3].slice(),i[0][4].slice()],[i[1][0].slice(),i[1][1].slice(),i[1][2].slice(),i[1][3].slice(),i[1][4].slice()]];var n=void 0,r=void 0,a=void 0,o=void 0,s=void 0,l=this._tables[0][4],c=this._tables[1],u=t.length,d=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(o=t.slice(0),s=[],this._key=[o,s],n=u;n<4*u+28;n++)a=o[n-1],(n%u==0||8===u&&n%u==4)&&(a=l[a>>>24]<<24^l[a>>16&255]<<16^l[a>>8&255]<<8^l[255&a],n%u==0&&(a=a<<8^a>>>24^d<<24,d=d<<1^283*(d>>7))),o[n]=o[n-u]^a;for(r=0;n;r++,n--)a=o[3&r?n:n-4],s[r]=n<=4||r<4?a:c[0][l[a>>>24]]^c[1][l[a>>16&255]]^c[2][l[a>>8&255]]^c[3][l[255&a]]}return r(e,[{key:"decrypt",value:function(e,t,n,r,i,a){var o=this._key[1],s=e^o[0],l=r^o[1],c=n^o[2],u=t^o[3],d=void 0,h=void 0,f=void 0,p=o.length/4-2,m=void 0,g=4,v=this._tables[1],b=v[0],y=v[1],A=v[2],_=v[3],w=v[4];for(m=0;m<p;m++)d=b[s>>>24]^y[l>>16&255]^A[c>>8&255]^_[255&u]^o[g],h=b[l>>>24]^y[c>>16&255]^A[u>>8&255]^_[255&s]^o[g+1],f=b[c>>>24]^y[u>>16&255]^A[s>>8&255]^_[255&l]^o[g+2],u=b[u>>>24]^y[s>>16&255]^A[l>>8&255]^_[255&c]^o[g+3],g+=4,s=d,l=h,c=f;for(m=0;m<4;m++)i[(3&-m)+a]=w[s>>>24]<<24^w[l>>16&255]<<16^w[c>>8&255]<<8^w[255&u]^o[g++],d=s,s=l,l=c,c=u,u=d}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}return r(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"off",value:function(e,t){var n;return!!this.listeners[e]&&(n=this.listeners[e].indexOf(t),this.listeners[e].splice(n,1),n>-1)}},{key:"trigger",value:function(e){var t=void 0,n=void 0,r=void 0,i=void 0;if(t=this.listeners[e])if(2===arguments.length)for(r=t.length,n=0;n<r;++n)t[n].call(this,arguments[1]);else for(i=Array.prototype.slice.call(arguments,1),r=t.length,n=0;n<r;++n)t[n].apply(this,i)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(e){this.on("data",(function(t){e.push(t)}))}}]),e}();t.default=i,e.exports=t.default},function(e,t,n){"use strict";t.pad=n(1164),t.unpad=n(1165)},function(e,t,n){"use strict";var r;e.exports=function(e){var t=r[e.byteLength%16||0],n=new Uint8Array(e.byteLength+t.length);return n.set(e),n.set(t,e.byteLength),n},r=[[16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16],[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15],[14,14,14,14,14,14,14,14,14,14,14,14,14,14],[13,13,13,13,13,13,13,13,13,13,13,13,13],[12,12,12,12,12,12,12,12,12,12,12,12],[11,11,11,11,11,11,11,11,11,11,11],[10,10,10,10,10,10,10,10,10,10],[9,9,9,9,9,9,9,9,9],[8,8,8,8,8,8,8,8],[7,7,7,7,7,7,7],[6,6,6,6,6,6],[5,5,5,5,5],[4,4,4,4],[3,3,3],[2,2],[1]]},function(e,t,n){"use strict";e.exports=function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(117)),a=r(n(1167)),o=r(n(1183)),s=r(n(264)),l=0,c={mode:"auto"};s.default.mediaSources={};var u=function(e,t){var n=s.default.mediaSources[e];if(!n)throw new Error("Media Source not found (Video.js)");n.trigger({type:"sourceopen",swfId:t})},d=function(){return!!i.default.MediaSource&&!!i.default.MediaSource.isTypeSupported&&i.default.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},h=function(e){var t=s.default.mergeOptions(c,e);if(this.MediaSource={open:u,supportsNativeMediaSources:d},"html5"===t.mode||"auto"===t.mode&&d())return new o.default;if(s.default.getTech("Flash"))return new a.default;throw new Error("Cannot use Flash or Html5 to create a MediaSource for this video")};t.MediaSource=h,h.open=u,h.supportsNativeMediaSources=d;var f={createObjectURL:function(e){var t=void 0;return e instanceof o.default?(t=i.default.URL.createObjectURL(e.nativeMediaSource_),e.url_=t,t):e instanceof a.default?(t="blob:vjs-media-source/"+l,l++,s.default.mediaSources[t]=e,t):(t=i.default.URL.createObjectURL(e),e.url_=t,t)}};t.URL=f,s.default.MediaSource=h,s.default.URL=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(262)),o=i(n(264)),s=i(n(1174)),l=i(n(756)),c=n(349),u=function(e){function t(){var e=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.sourceBuffers=[],this.readyState="closed",this.on(["sourceopen","webkitsourceopen"],(function(t){e.swfObj=a.default.getElementById(t.swfId),e.player_=(0,o.default)(e.swfObj.parentNode),e.tech_=e.swfObj.tech,e.readyState="open",e.tech_.on("seeking",(function(){for(var t=e.sourceBuffers.length;t--;)e.sourceBuffers[t].abort()})),e.swfObj&&e.swfObj.vjs_load()}))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"addSeekableRange_",value:function(){}},{key:"addSourceBuffer",value:function(e){var t=(0,c.parseContentType)(e),n=void 0;if("video/mp2t"!==t.type&&"audio/mp2t"!==t.type)throw new Error("NotSupportedError (Video.js)");return n=new s.default(this),this.sourceBuffers.push(n),n}},{key:"endOfStream",value:function(e){"network"===e?this.tech_.error(2):"decode"===e&&this.tech_.error(3),"ended"!==this.readyState&&(this.readyState="ended",this.swfObj.vjs_endOfStream())}}]),t}(o.default.EventTarget);t.default=u;try{Object.defineProperty(u.prototype,"duration",{get:function(){return this.swfObj?this.swfObj.vjs_getProperty("duration"):NaN},set:function(e){var t=void 0,n=this.swfObj.vjs_getProperty("duration");if(this.swfObj.vjs_setProperty("duration",e),e<n)for(t=0;t<this.sourceBuffers.length;t++)this.sourceBuffers[t].remove(e,n);return e}})}catch(e){u.prototype.duration=NaN}for(var d in l.default)u[d]=l.default[d];e.exports=t.default},function(e,t,n){"use strict";var r=n(117),i=n(749),a=n(1169),o=n(227);function s(e,t,n){var r=e;return i(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=o(t,{uri:e}),r.callback=n,r}function l(e,t,n){return c(t=s(e,t,n))}function c(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML;return null}(u),v)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,b)}function o(){if(!c){var t;clearTimeout(d),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var i=b,o=null;return 0!==t?(i={body:r(),statusCode:t,method:f,headers:{},url:h,rawRequest:u},u.getAllResponseHeaders&&(i.headers=a(u.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),n(o,i,i.body)}}var s,c,u=e.xhr||null;u||(u=e.cors||e.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var d,h=u.url=e.uri||e.url,f=u.method=e.method||"GET",p=e.body||e.data,m=u.headers=e.headers||{},g=!!e.sync,v=!1,b={body:void 0,headers:{},statusCode:0,method:f,url:h,rawRequest:u};if("json"in e&&!1!==e.json&&(v=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(o,0)},u.onload=o,u.onerror=i,u.onprogress=function(){},u.onabort=function(){c=!0},u.ontimeout=i,u.open(f,h,!g,e.username,e.password),g||(u.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(d=setTimeout((function(){if(!c){c=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),u.setRequestHeader)for(s in m)m.hasOwnProperty(s)&&u.setRequestHeader(s,m[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}e.exports=l,l.XMLHttpRequest=r.XMLHttpRequest||function(){},l.XDomainRequest="withCredentials"in new l.XMLHttpRequest?l.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){l["delete"===e?"del":e]=function(t,n,r){return(n=s(t,n,r)).method=e.toUpperCase(),c(n)}}))},function(e,t){var n=function(e){return e.replace(/^\s+|\s+$/g,"")};e.exports=function(e){if(!e)return{};for(var t,r={},i=n(e).split("\n"),a=0;a<i.length;a++){var o=i[a],s=o.indexOf(":"),l=n(o.slice(0,s)).toLowerCase(),c=n(o.slice(s+1));void 0===r[l]?r[l]=c:(t=r[l],"[object Array]"===Object.prototype.toString.call(t)?r[l].push(c):r[l]=[r[l],c])}return r}},function(e,t,n){var r=n(117),i=e.exports={WebVTT:n(1171),VTTCue:n(1172),VTTRegion:n(1173)};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,o=i.VTTRegion,s=r.VTTCue,l=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=o},i.restore=function(){r.VTTCue=s,r.VTTRegion=l},r.VTTCue||i.shim()},function(e,t){var n=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function r(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function i(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function a(){this.values=n(null)}function o(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);if(2===o.length)t(o[0],o[1])}}function s(e,t,n){var s=e;function l(){var t=i(e);if(null===t)throw new r(r.Errors.BadTimeStamp,"Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=l(),c(),"--\x3e"!==e.substr(0,3))throw new r(r.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.substr(3),c(),t.endTime=l(),c(),function(e,t){var r=new a;o(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}r.prototype=n(Error.prototype),r.prototype.constructor=r,r.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},a.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var l={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={v:"title",lang:"lang"},d={rt:"ruby"};function h(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return l[e]}function a(e){for(;b=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(b[0],r);return e}function o(e,t){return!d[t.localName]||d[t.localName]===e.localName}function s(t,n){var r=c[t];if(!r)return null;var i=e.document.createElement(r);i.localName=r;var a=u[t];return a&&n&&(i[a]=n.trim()),i}for(var h,f=e.document.createElement("div"),p=f,m=[];null!==(h=n());)if("<"!==h[0])p.appendChild(e.document.createTextNode(a(h)));else{if("/"===h[1]){m.length&&m[m.length-1]===h.substr(2).replace(">","")&&(m.pop(),p=p.parentNode);continue}var g,v=i(h.substr(1,h.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),p.appendChild(g);continue}var b=h.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!b)continue;if(!(g=s(b[1],b[3])))continue;if(!o(p,g))continue;b[2]&&(g.className=b[2].substr(1).replace("."," ")),m.push(b[1]),p.appendChild(g),p=g}return f}var f=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function p(e){for(var t=0;t<f.length;t++){var n=f[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function m(){}function g(e,t,n){var r=/MSIE\s8\.0/.test(navigator.userAgent),i="rgba(255, 255, 255, 1)",a="rgba(0, 0, 0, 0.8)";r&&(i="rgb(255, 255, 255)",a="rgb(0, 0, 0)"),m.call(this),this.cue=t,this.cueDiv=h(e,t.text);var o={color:i,backgroundColor:a,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(o.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",o.unicodeBidi="plaintext"),this.applyStyles(o,this.cueDiv),this.div=e.document.createElement("div"),o={textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(o.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(p(n.charCodeAt(a)))return"rtl";return"ltr"}(this.cueDiv),o.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(o),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":s=t.position;break;case"middle":s=t.position-t.size/2;break;case"end":s=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function v(e){var t,n,r,i,a=/MSIE\s8\.0/.test(navigator.userAgent);if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight,a&&!this.lineHeight&&(this.lineHeight=13)}function b(e,t,n,r){var i=new v(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(a),s=[];if(a.snapToLines){var l;switch(a.vertical){case"":s=["+y","-y"],l="height";break;case"rl":s=["+x","-x"],l="width";break;case"lr":s=["-x","+x"],l="width"}var c=i.lineHeight,u=c*Math.round(o),d=n[l]+c,h=s[0];Math.abs(u)>d&&(u=u<0?-1:1,u*=Math.ceil(d/c)*c),o<0&&(u+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(h,u)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"middle":o-=f/2;break;case"end":o-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new v(t)}var p=function(e,t){for(var i,a=new v(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var l=e.intersectPercentage(n);o>l&&(i=new v(e),o=l),e=new v(a)}return i||a}(i,s);t.move(p.toCSSCompatValues(n))}function y(){}m.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},m.prototype.formatStyle=function(e,t){return 0===e?0:e+t},g.prototype=n(m.prototype),g.prototype.constructor=g,v.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},v.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},v.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},v.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},v.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},v.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},v.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},v.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},y.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},y.convertCueToDOMTree=function(e,t){return e&&t?h(e,t):null};y.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],a=v.getSimpleBoxPosition(r),o={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,s,l=0;l<t.length;l++)s=t[l],n=new g(e,s,o),r.appendChild(n.div),b(0,n,a,i),s.displayState=n.div,i.push(v.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},y.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},y.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof r))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function l(e){e.match(/X-TIMESTAMP-MAP/)?o(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new a;o(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",i(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):o(e,(function(e,n){switch(e){case"Region":!function(e){var n=new a;if(o(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new a;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var c;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var u=(c=n()).match(/^WEBVTT([ \t].*)?$/);if(!u||!u[0])throw new r(r.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:c=n(),t.state){case"HEADER":/:/.test(c)?l(c):c||(t.state="ID");continue;case"NOTE":c||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){t.state="NOTE";break}if(!c)continue;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===c.indexOf("--\x3e")){t.cue.id=c;continue}case"CUE":try{s(c,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==c.indexOf("--\x3e");if(!c||h&&(d=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=c;continue;case"BADCUE":c||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new r(r.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=y},function(e,t){var n={"":!0,lr:!0,rl:!0},r={start:!0,middle:!0,end:!0,left:!0,right:!0};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function o(e,t,r){var o=this,s=/MSIE\s8\.0/.test(navigator.userAgent),l={};s?o=document.createElement("custom"):l.enumerable=!0,o.hasBeenReset=!1;var c="",u=!1,d=e,h=t,f=r,p=null,m="",g=!0,v="auto",b="start",y=50,A="middle",_=50,w="middle";if(Object.defineProperty(o,"id",a({},l,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(o,"pauseOnExit",a({},l,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(o,"startTime",a({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",a({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",a({},l,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",a({},l,{get:function(){return p},set:function(e){p=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",a({},l,{get:function(){return m},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",a({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",a({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",a({},l,{get:function(){return b},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",a({},l,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",a({},l,{get:function(){return A},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");A=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",a({},l,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",a({},l,{get:function(){return w},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),o.displayState=void 0,s)return o}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,a=100,o=0,s=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(117)),o=i(n(264)),s=i(n(750)),l=i(n(348)),c=i(n(754)),u=n(453),d=i(n(755)),h=i(n(454)),f=i(n(756)),p=function(e){a.default.setTimeout(e,f.default.TIME_BETWEEN_CHUNKS)},m=function(){return Math.random().toString(36).slice(2,8)},g=function(e,t){("number"!=typeof t||t<0)&&(t=0);var n=Math.pow(10,t);return Math.round(e*n)/n},v=function(e){function t(e){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var r;this.chunkSize_=f.default.BYTES_PER_CHUNK,this.buffer_=[],this.bufferSize_=0,this.basePtsOffset_=NaN,this.mediaSource_=e,this.audioBufferEnd_=NaN,this.videoBufferEnd_=NaN,this.updating=!1,this.timestampOffset_=0,r=a.default.btoa(String.fromCharCode.apply(null,Array.prototype.slice.call(s.default.getFlvHeader())));var i=this.mediaSource_.player_.id().replace(/[^a-zA-Z0-9]/g,"_");this.flashEncodedHeaderName_="vjs_flashEncodedHeader_"+i+m(),this.flashEncodedDataName_="vjs_flashEncodedData_"+i+m(),a.default[this.flashEncodedHeaderName_]=function(){return delete a.default[n.flashEncodedHeaderName_],r},this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedHeaderName_),this.transmuxer_=(0,h.default)(d.default,function(){var e=void 0;try{e=755}catch(e){}return e}()),this.transmuxer_.postMessage({action:"init",options:{}}),this.transmuxer_.onmessage=function(e){"data"===e.data.action&&n.receiveBuffer_(e.data.segment)},this.one("updateend",(function(){n.mediaSource_.tech_.trigger("loadedmetadata")})),Object.defineProperty(this,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"==typeof e&&e>=0&&(this.timestampOffset_=e,this.mediaSource_.swfObj.vjs_discontinuity(),this.basePtsOffset_=NaN,this.audioBufferEnd_=NaN,this.videoBufferEnd_=NaN,this.transmuxer_.postMessage({action:"reset"}))}}),Object.defineProperty(this,"buffered",{get:function(){if(!(this.mediaSource_&&this.mediaSource_.swfObj&&"vjs_getProperty"in this.mediaSource_.swfObj))return o.default.createTimeRange();var e=this.mediaSource_.swfObj.vjs_getProperty("buffered");return e&&e.length&&(e[0][0]=g(e[0][0],3),e[0][1]=g(e[0][1],3)),o.default.createTimeRanges(e)}}),this.mediaSource_.player_.on("seeked",(function(){if((0,l.default)(0,1/0,n.metadataTrack_),n.inbandTextTracks_)for(var e in n.inbandTextTracks_)(0,l.default)(0,1/0,n.inbandTextTracks_[e])}));var c=this.onHlsReset_.bind(this);this.mediaSource_.player_.tech_.on("hls-reset",c),this.mediaSource_.player_.tech_.hls.on("dispose",(function(){n.transmuxer_.terminate(),n.mediaSource_.player_.tech_.off("hls-reset",c)}))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"appendBuffer",value:function(e){var t=void 0;if(this.updating)throw(t=new Error("SourceBuffer.append() cannot be called while an update is in progress")).name="InvalidStateError",t.code=11,t;this.updating=!0,this.mediaSource_.readyState="open",this.trigger({type:"update"}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"abort",value:function(){this.buffer_=[],this.bufferSize_=0,this.mediaSource_.swfObj.vjs_abort(),this.updating&&(this.updating=!1,this.trigger({type:"updateend"}))}},{key:"remove",value:function(e,t){if((0,l.default)(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)(0,l.default)(e,t,this.inbandTextTracks_[n]);this.trigger({type:"update"}),this.trigger({type:"updateend"})}},{key:"receiveBuffer_",value:function(e){var t=this;(0,c.default)(this,this.mediaSource_,e),(0,u.addTextTrackData)(this,e.captions,e.metadata),p((function(){var n=t.convertTagsToData_(e);0===t.buffer_.length&&p(t.processBuffer_.bind(t)),n&&(t.buffer_.push(n),t.bufferSize_+=n.byteLength)}))}},{key:"processBuffer_",value:function(){var e=this,t=f.default.BYTES_PER_CHUNK;if(this.buffer_.length){var n=this.buffer_[0].subarray(0,t);n.byteLength<t||this.buffer_[0].byteLength===t?this.buffer_.shift():this.buffer_[0]=this.buffer_[0].subarray(t),this.bufferSize_-=n.byteLength;for(var r=[],i=n.byteLength,o=0;o<i;o++)r.push(String.fromCharCode(n[o]));var s=a.default.btoa(r.join(""));a.default[this.flashEncodedDataName_]=function(){return p(e.processBuffer_.bind(e)),delete a.default[e.flashEncodedDataName_],s},this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedDataName_)}else!1!==this.updating&&(this.updating=!1,this.trigger({type:"updateend"}))}},{key:"convertTagsToData_",value:function(e){var t=0,n=this.mediaSource_.tech_,r=0,i=void 0,a=e.tags.videoTags,o=e.tags.audioTags;if(isNaN(this.basePtsOffset_)&&(a.length||o.length)){var s=a[0]||{pts:1/0},l=o[0]||{pts:1/0};this.basePtsOffset_=Math.min(l.pts,s.pts)}n.seeking()&&(this.videoBufferEnd_=NaN,this.audioBufferEnd_=NaN),isNaN(this.videoBufferEnd_)?(n.buffered().length&&(r=n.buffered().end(0)-this.timestampOffset),n.seeking()&&(r=Math.max(r,n.currentTime()-this.timestampOffset)),r*=1e3,r+=this.basePtsOffset_):r=this.videoBufferEnd_+.1;var c=a.length;if(c&&a[c-1].pts>=r){for(;--c;){var u=a[c];if(!(u.pts>r)&&(u.keyFrame||u.metaDataTag))break}for(;c;){if(!a[c-1].metaDataTag)break;c--}}var d=a.slice(c),h=void 0;for(h=isNaN(this.audioBufferEnd_)?r:this.audioBufferEnd_+.1,d.length&&(h=Math.min(h,d[0].pts)),c=0;c<o.length&&!(o[c].pts>=h);)c++;var f=o.slice(c);f.length&&(this.audioBufferEnd_=f[f.length-1].pts),d.length&&(this.videoBufferEnd_=d[d.length-1].pts);var p=this.getOrderedTags_(d,f);if(0!==p.length){if(p[0].pts<r&&n.seeking()){var m=n.currentTime()-(r-p[0].pts)/1e3;m<1/30&&(m=0);try{this.mediaSource_.swfObj.vjs_adjustCurrentTime(m)}catch(e){}}for(var g=0;g<p.length;g++)t+=p[g].bytes.byteLength;i=new Uint8Array(t);g=0;for(var v=0;g<p.length;g++)i.set(p[g].bytes,v),v+=p[g].bytes.byteLength;return i}}},{key:"getOrderedTags_",value:function(e,t){for(var n=void 0,r=[];e.length||t.length;)n=e.length?t.length&&t[0].dts<e[0].dts?t.shift():e.shift():t.shift(),r.push(n);return r}},{key:"onHlsReset_",value:function(){this.transmuxer_.postMessage({action:"resetCaptions"})}}]),t}(o.default.EventTarget);t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r,i,a,o,s,l,c=n(180),u=n(451),d=n(751),h=n(752),f=n(753).H264Stream,p=n(1180),m=n(1181);o=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts?e.timelineStartInfo.pts=t.pts:e.timelineStartInfo.pts=Math.min(e.timelineStartInfo.pts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts?e.timelineStartInfo.dts=t.dts:e.timelineStartInfo.dts=Math.min(e.timelineStartInfo.dts,t.dts))},s=function(e,t){var n=new u(u.METADATA_TAG);return n.dts=t,n.pts=t,n.writeMetaDataDouble("videocodecid",7),n.writeMetaDataDouble("width",e.width),n.writeMetaDataDouble("height",e.height),n},l=function(e,t){var n,r=new u(u.VIDEO_TAG,!0);for(r.dts=t,r.pts=t,r.writeByte(1),r.writeByte(e.profileIdc),r.writeByte(e.profileCompatibility),r.writeByte(e.levelIdc),r.writeByte(255),r.writeByte(225),r.writeShort(e.sps[0].length),r.writeBytes(e.sps[0]),r.writeByte(e.pps.length),n=0;n<e.pps.length;++n)r.writeShort(e.pps[n].length),r.writeBytes(e.pps[n]);return r},(a=function(e){var t,n=[],r=[];a.prototype.init.call(this),this.push=function(t){o(e,t),e&&(e.audioobjecttype=t.audioobjecttype,e.channelcount=t.channelcount,e.samplerate=t.samplerate,e.samplingfrequencyindex=t.samplingfrequencyindex,e.samplesize=t.samplesize,e.extraData=e.audioobjecttype<<11|e.samplingfrequencyindex<<7|e.channelcount<<3),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),n.push(t)},this.flush=function(){var i,a,o,s=new m;if(0!==n.length){for(o=-1/0;n.length;)i=n.shift(),r.length&&i.pts>=r[0]&&(o=r.shift(),this.writeMetaDataTags(s,o)),(e.extraData!==t||i.pts-o>=1e3)&&(this.writeMetaDataTags(s,i.pts),t=e.extraData,o=i.pts),(a=new u(u.AUDIO_TAG)).pts=i.pts,a.dts=i.dts,a.writeBytes(i.data),s.push(a.finalize());r.length=0,t=null,this.trigger("data",{track:e,tags:s.list}),this.trigger("done","AudioSegmentStream")}else this.trigger("done","AudioSegmentStream")},this.writeMetaDataTags=function(t,n){var r;(r=new u(u.METADATA_TAG)).pts=n,r.dts=n,r.writeMetaDataDouble("audiocodecid",10),r.writeMetaDataBoolean("stereo",2===e.channelcount),r.writeMetaDataDouble("audiosamplerate",e.samplerate),r.writeMetaDataDouble("audiosamplesize",16),t.push(r.finalize()),(r=new u(u.AUDIO_TAG,!0)).pts=n,r.dts=n,r.view.setUint16(r.position,e.extraData),r.position+=2,r.length=Math.max(r.length,r.position),t.push(r.finalize())},this.onVideoKeyFrame=function(e){r.push(e)}}).prototype=new c,(i=function(e){var t,n,r=[];i.prototype.init.call(this),this.finishFrame=function(r,i){if(i){if(t&&e&&e.newMetadata&&(i.keyFrame||0===r.length)){var a=s(t,i.dts).finalize(),o=l(e,i.dts).finalize();a.metaDataTag=o.metaDataTag=!0,r.push(a),r.push(o),e.newMetadata=!1,this.trigger("keyframe",i.dts)}i.endNalUnit(),r.push(i.finalize()),n=null}},this.push=function(t){o(e,t),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),r.push(t)},this.flush=function(){for(var i,a=new m;r.length&&"access_unit_delimiter_rbsp"!==r[0].nalUnitType;)r.shift();if(0!==r.length){for(;r.length;)"seq_parameter_set_rbsp"===(i=r.shift()).nalUnitType?(e.newMetadata=!0,t=i.config,e.width=t.width,e.height=t.height,e.sps=[i.data],e.profileIdc=t.profileIdc,e.levelIdc=t.levelIdc,e.profileCompatibility=t.profileCompatibility,n.endNalUnit()):"pic_parameter_set_rbsp"===i.nalUnitType?(e.newMetadata=!0,e.pps=[i.data],n.endNalUnit()):"access_unit_delimiter_rbsp"===i.nalUnitType?(n&&this.finishFrame(a,n),(n=new u(u.VIDEO_TAG)).pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.endNalUnit()),n.startNalUnit(),n.writeBytes(i.data);n&&this.finishFrame(a,n),this.trigger("data",{track:e,tags:a.list}),this.trigger("done","VideoSegmentStream")}else this.trigger("done","VideoSegmentStream")}}).prototype=new c,(r=function(e){var t,n,o,s,l,c,u,m,g,v,b,y,A=this;r.prototype.init.call(this),e=e||{},this.metadataStream=new d.MetadataStream,e.metadataStream=this.metadataStream,t=new d.TransportPacketStream,n=new d.TransportParseStream,o=new d.ElementaryStream,s=new d.TimestampRolloverStream("video"),l=new d.TimestampRolloverStream("audio"),c=new d.TimestampRolloverStream("timed-metadata"),u=new h,m=new f,y=new p(e),t.pipe(n).pipe(o),o.pipe(s).pipe(m),o.pipe(l).pipe(u),o.pipe(c).pipe(this.metadataStream).pipe(y),b=new d.CaptionStream,m.pipe(b).pipe(y),o.on("data",(function(e){var t,n,r;if("metadata"===e.type){for(t=e.tracks.length;t--;)"video"===e.tracks[t].type?n=e.tracks[t]:"audio"===e.tracks[t].type&&(r=e.tracks[t]);n&&!g&&(y.numberOfTracks++,g=new i(n),m.pipe(g).pipe(y)),r&&!v&&(y.numberOfTracks++,v=new a(r),u.pipe(v).pipe(y),g&&g.on("keyframe",v.onVideoKeyFrame))}})),this.push=function(e){t.push(e)},this.flush=function(){t.flush()},this.resetCaptions=function(){b.reset()},y.on("data",(function(e){A.trigger("data",e)})),y.on("done",(function(){A.trigger("done")}))}).prototype=new c,e.exports=r},function(e,t,n){"use strict";var r=n(180),i=function(){i.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new c(0,0),new c(0,1),new c(1,0),new c(1,1)],this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("done",this.trigger.bind(this,"done"))}),this)};i.prototype=new r,i.prototype.push=function(e){var t,n;"sei_rbsp"===e.nalUnitType&&4===(t=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}t+=i,r=0,i=0}return n}(e.escapedRBSP)).payloadType&&(n=function(e){return 181!==e.payload[0]?null:49!=(e.payload[1]<<8|e.payload[2])?null:"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])?null:3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)}(t))&&(e.dts<this.latestDts_?this.ignoreNextEqualDts_=!0:e.dts===this.latestDts_&&this.ignoreNextEqualDts_?this.ignoreNextEqualDts_=!1:(this.captionPackets_=this.captionPackets_.concat(function(e,t){var n,r,i,a,o=[];if(!(64&t[0]))return o;for(r=31&t[0],n=0;n<r;n++)a={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(a.ccData=t[i+3]<<8|t[i+4],o.push(a));return o}(e.pts,n)),this.latestDts_=e.dts))},i.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2&&this.dispatchCea608Packet(e)}),this),this.captionPackets_.length=0,this.ccStreams_.forEach((function(e){e.flush()}),this)):this.ccStreams_.forEach((function(e){e.flush()}),this)},i.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},i.prototype.dispatchCea608Packet=function(e){this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},i.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},i.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)};var a={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},o=function(e){return null===e?"":(e=a[e]||e,String.fromCharCode(e))},s=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],l=function(){for(var e=[],t=15;t--;)e.push("");return e},c=function(e,t){c.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.topRow_=13,this.mode_="rollUp";else if(t===this.ROLL_UP_3_ROWS_)this.topRow_=12,this.mode_="rollUp";else if(t===this.ROLL_UP_4_ROWS_)this.topRow_=11,this.mode_="rollUp";else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[14]=this.nonDisplayed_[14].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=l();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=l();else if(t===this.RESUME_DIRECT_CAPTIONING_)this.mode_="paintOn";else if(this.isSpecialCharacter(r,i))a=o((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1),a=o((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var c=s.indexOf(7968&t);c!==this.row_&&(this.clearFormatting(e.pts),this.row_=c),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),a=o(r),a+=o(i),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};c.prototype=new r,c.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){return e.trim()})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},c.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=l(),this.nonDisplayed_=l(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.formatting_=[]},c.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},c.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},c.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},c.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},c.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},c.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},c.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},c.prototype.isNormalChar=function(e){return e>=32&&e<=127},c.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},c.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},c.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},c.prototype.rollUp=function(e,t){var n=this.displayed_[14];n+=t,this.displayed_[14]=n},c.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.topRow_;e<14;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[14]=""},c.prototype.paintOn=function(){},e.exports={CaptionStream:i,Cea608Stream:c}},function(e,t,n){"use strict";var r=n(180),i=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},a=function(e){var t,n;a.prototype.init.call(this),this.type_=e,this.push=function(e){e.type===this.type_&&(void 0===n&&(n=e.dts),e.dts=i(e.dts,n),e.pts=i(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.discontinuity=function(){n=void 0,t=void 0}};a.prototype=new r,e.exports={TimestampRolloverStream:a,handleRollover:i}},function(e,t,n){"use strict";var r,i=n(180),a=n(452),o=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},s=function(e,t,n){return decodeURIComponent(o(e,t,n))},l=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},c={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=s(e.data,1,t),e.value=s(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=s(e.data,1,t),e.url=s(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(o(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(r=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},i=0,o=[],s=0;if(r.prototype.init.call(this),this.dispatchType=a.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,r,a,u,d;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(s=0,o.length=0),0===o.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(o.push(e),s+=e.data.byteLength,1===o.length&&(i=l(e.data.subarray(6,10)),i+=10),!(s<i)){for(t={data:new Uint8Array(i),frames:[],pts:o[0].pts,dts:o[0].dts},d=0;d<i;)t.data.set(o[0].data.subarray(0,i-d),d),d+=o[0].data.byteLength,s-=o[0].data.byteLength,o.shift();r=10,64&t.data[5]&&(r+=4,r+=l(t.data.subarray(10,14)),i-=l(t.data.subarray(16,20)));do{if((a=l(t.data.subarray(r+4,r+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[r],t.data[r+1],t.data[r+2],t.data[r+3]),data:t.data.subarray(r+10,r+a+10)}).key=u.id,c[u.id]&&(c[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var h=u.data,f=(1&h[3])<<30|h[4]<<22|h[5]<<14|h[6]<<6|h[7]>>>2;f*=4,f+=3&h[7],u.timeStamp=f,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),r+=10,r+=a}while(r<i);this.trigger("data",t)}}}).prototype=new i,e.exports=r},function(e,t,n){"use strict";var r;r=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,a=new Uint8Array(4),o=Math.min(4,t);if(0===o)throw new Error("no bytes available");a.set(e.subarray(i,i+o)),n=new DataView(a.buffer).getUint32(0),r=8*o,t-=o},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),a=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?a<<i|this.readBits(i):a},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},e.exports=r},function(e,t,n){"use strict";var r=n(180),i=function(e){this.numberOfTracks=0,this.metadataStream=e.metadataStream,this.videoTags=[],this.audioTags=[],this.videoTrack=null,this.audioTrack=null,this.pendingCaptions=[],this.pendingMetadata=[],this.pendingTracks=0,this.processedTracks=0,i.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):("video"===e.track.type&&(this.videoTrack=e.track,this.videoTags=e.tags,this.pendingTracks++),void("audio"===e.track.type&&(this.audioTrack=e.track,this.audioTags=e.tags,this.pendingTracks++)))}};i.prototype=new r,i.prototype.flush=function(e){var t,n,r,i,a={tags:{},captions:[],captionStreams:{},metadata:[]};if(this.pendingTracks<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(0===this.pendingTracks&&(this.processedTracks++,this.processedTracks<this.numberOfTracks))return}if(this.processedTracks+=this.pendingTracks,this.pendingTracks=0,!(this.processedTracks<this.numberOfTracks)){for(this.videoTrack?i=this.videoTrack.timelineStartInfo.pts:this.audioTrack&&(i=this.audioTrack.timelineStartInfo.pts),a.tags.videoTags=this.videoTags,a.tags.audioTags=this.audioTags,r=0;r<this.pendingCaptions.length;r++)(n=this.pendingCaptions[r]).startTime=n.startPts-i,n.startTime/=9e4,n.endTime=n.endPts-i,n.endTime/=9e4,a.captionStreams[n.stream]=!0,a.captions.push(n);for(r=0;r<this.pendingMetadata.length;r++)(t=this.pendingMetadata[r]).cueTime=t.pts-i,t.cueTime/=9e4,a.metadata.push(t);a.metadata.dispatchType=this.metadataStream.dispatchType,this.videoTrack=null,this.audioTrack=null,this.videoTags=[],this.audioTags=[],this.pendingCaptions.length=0,this.pendingMetadata.length=0,this.pendingTracks=0,this.processedTracks=0,this.trigger("data",a),this.trigger("done")}},e.exports=i},function(e,t,n){"use strict";e.exports=function(){var e=this;this.list=[],this.push=function(e){this.list.push({bytes:e.bytes,dts:e.dts,pts:e.pts,keyFrame:e.keyFrame,metaDataTag:e.metaDataTag})},Object.defineProperty(this,"length",{get:function(){return e.list.length}})}},function(e,t,n){"use strict";var r=n(451);e.exports=function(e,t,n){var i,a,o,s=new Uint8Array(9),l=new DataView(s.buffer);return e=e||0,t=void 0===t||t,n=void 0===n||n,l.setUint8(0,70),l.setUint8(1,76),l.setUint8(2,86),l.setUint8(3,1),l.setUint8(4,(t?4:0)|(n?1:0)),l.setUint32(5,s.byteLength),e<=0?((a=new Uint8Array(s.byteLength+4)).set(s),a.set([0,0,0,0],s.byteLength),a):((i=new r(r.METADATA_TAG)).pts=i.dts=0,i.writeMetaDataDouble("duration",e),o=i.finalize().length,(a=new Uint8Array(s.byteLength+o)).set(s),a.set(l.byteLength,o),a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(117)),o=i(n(262)),s=i(n(264)),l=i(n(1184)),c=n(453),u=n(349),d=function(e){function t(){var e=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var n=void 0;for(n in this.nativeMediaSource_=new a.default.MediaSource,this.nativeMediaSource_)n in t.prototype||"function"!=typeof this.nativeMediaSource_[n]||(this[n]=this.nativeMediaSource_[n].bind(this.nativeMediaSource_));this.duration_=NaN,Object.defineProperty(this,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(e){this.duration_=e,e===1/0||(this.nativeMediaSource_.duration=e)}}),Object.defineProperty(this,"seekable",{get:function(){return this.duration_===1/0?s.default.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(this,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(this,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),this.sourceBuffers=[],this.activeSourceBuffers_=[],this.updateActiveSourceBuffers_=function(){if(e.activeSourceBuffers_.length=0,1===e.sourceBuffers.length){var t=e.sourceBuffers[0];return t.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,void e.activeSourceBuffers_.push(t)}for(var n=!1,r=!0,i=0;i<e.player_.audioTracks().length;i++){var a=e.player_.audioTracks()[i];if(a.enabled&&"main"!==a.kind){n=!0,r=!1;break}}e.sourceBuffers.forEach((function(t){if(t.appendAudioInitSegment_=!0,t.videoCodec_&&t.audioCodec_)t.audioDisabled_=n;else if(t.videoCodec_&&!t.audioCodec_)t.audioDisabled_=!0,r=!1;else if(!t.videoCodec_&&t.audioCodec_&&(t.audioDisabled_=r,r))return;e.activeSourceBuffers_.push(t)}))},this.onPlayerMediachange_=function(){e.sourceBuffers.forEach((function(e){e.appendAudioInitSegment_=!0}))},this.onHlsReset_=function(){e.sourceBuffers.forEach((function(e){e.transmuxer_&&e.transmuxer_.postMessage({action:"resetCaptions"})}))},this.onHlsSegmentTimeMapping_=function(t){e.sourceBuffers.forEach((function(e){return e.timeMapping_=t.mapping}))},["sourceopen","sourceclose","sourceended"].forEach((function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))}),this),this.on("sourceopen",(function(t){var n=o.default.querySelector('[src="'+e.url_+'"]');n&&(e.player_=(0,s.default)(n.parentNode),e.player_.tech_.on("hls-reset",e.onHlsReset_),e.player_.tech_.on("hls-segment-time-mapping",e.onHlsSegmentTimeMapping_),e.player_.audioTracks&&e.player_.audioTracks()&&(e.player_.audioTracks().on("change",e.updateActiveSourceBuffers_),e.player_.audioTracks().on("addtrack",e.updateActiveSourceBuffers_),e.player_.audioTracks().on("removetrack",e.updateActiveSourceBuffers_)),e.player_.on("mediachange",e.onPlayerMediachange_))})),this.on("sourceended",(function(t){for(var n=(0,c.durationOfVideo)(e.duration),r=0;r<e.sourceBuffers.length;r++){var i=e.sourceBuffers[r],a=i.metadataTrack_&&i.metadataTrack_.cues;a&&a.length&&(a[a.length-1].endTime=n)}})),this.on("sourceclose",(function(e){this.sourceBuffers.forEach((function(e){e.transmuxer_&&e.transmuxer_.terminate()})),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&(this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))}))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"addSeekableRange_",value:function(e,t){var n=void 0;if(this.duration!==1/0)throw(n=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",n.code=11,n;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var t=void 0,n=(0,u.parseContentType)(e);if(/^(video|audio)\/mp2t$/i.test(n.type)){var r=[];n.parameters&&n.parameters.codecs&&(r=n.parameters.codecs.split(","),r=(r=(0,u.translateLegacyCodecs)(r)).filter((function(e){return(0,u.isAudioCodec)(e)||(0,u.isVideoCodec)(e)}))),0===r.length&&(r=["avc1.4d400d","mp4a.40.2"]),t=new l.default(this,r),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else t=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(t),t}}]),t}(s.default.EventTarget);t.default=d,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(264)),o=i(n(754)),s=i(n(348)),l=n(453),c=i(n(454)),u=i(n(757)),d=n(349),h=function(e,t,n){if(!t||!e.length)return[];var r=Math.ceil(9e4*(t.currentTime()-n+3)),i=void 0;for(i=0;i<e.length&&!(e[i].pts>r);i++);return e.slice(i)};t.gopsSafeToAlignWith=h;var f=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)};t.updateGopBuffer=f;var p=function(e,t,n,r){for(var i=Math.ceil(9e4*(t-r)),a=Math.ceil(9e4*(n-r)),o=e.slice(),s=e.length;s--&&!(e[s].pts<=a););if(-1===s)return o;for(var l=s+1;l--&&!(e[l].pts<=i););return l=Math.max(l,0),o.splice(l,s-l+1),o};t.removeGopBuffer=p;var m=function(e){function t(e,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,a.default.EventTarget),this.timestampOffset_=0,this.pendingBuffers_=[],this.bufferUpdating_=!1,this.mediaSource_=e,this.codecs_=n,this.audioCodec_=null,this.videoCodec_=null,this.audioDisabled_=!1,this.appendAudioInitSegment_=!0,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=a.default.browser.IE_VERSION>=11;var i={remux:!1,alignGopsAtEnd:this.safeAppend_};this.codecs_.forEach((function(e){(0,d.isAudioCodec)(e)?r.audioCodec_=e:(0,d.isVideoCodec)(e)&&(r.videoCodec_=e)})),this.transmuxer_=(0,c.default)(u.default,function(){var e=void 0;try{e=757}catch(e){}return e}()),this.transmuxer_.postMessage({action:"init",options:i}),this.transmuxer_.onmessage=function(e){return"data"===e.data.action?r.data_(e):"done"===e.data.action?r.done_(e):"gopInfo"===e.data.action?r.appendGopInfo_(e):void 0},Object.defineProperty(this,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"==typeof e&&e>=0&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(this,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),Object.defineProperty(this,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(this,"buffered",{get:function(){var e=null,t=null,n=0,r=[],i=[];if(!this.videoBuffer_&&!this.audioBuffer_)return a.default.createTimeRange();if(!this.videoBuffer_)return this.audioBuffer_.buffered;if(!this.audioBuffer_)return this.videoBuffer_.buffered;if(this.audioDisabled_)return this.videoBuffer_.buffered;if(0===this.videoBuffer_.buffered.length&&0===this.audioBuffer_.buffered.length)return a.default.createTimeRange();for(var o=this.videoBuffer_.buffered,s=this.audioBuffer_.buffered,l=o.length;l--;)r.push({time:o.start(l),type:"start"}),r.push({time:o.end(l),type:"end"});for(l=s.length;l--;)r.push({time:s.start(l),type:"start"}),r.push({time:s.end(l),type:"end"});for(r.sort((function(e,t){return e.time-t.time})),l=0;l<r.length;l++)"start"===r[l].type?2===++n&&(e=r[l].time):"end"===r[l].type&&1===--n&&(t=r[l].time),null!==e&&null!==t&&(i.push([e,t]),e=null,t=null);return a.default.createTimeRanges(i)}})}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"data_",value:function(e){var t=e.data.segment;t.data=new Uint8Array(t.data,e.data.byteOffset,e.data.byteLength),t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength),(0,o.default)(this,this.mediaSource_,t),this.pendingBuffers_.push(t)}},{key:"done_",value:function(e){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"createRealSourceBuffers_",value:function(){var e=this,t=["audio","video"];t.forEach((function(n){if(e[n+"Codec_"]&&!e[n+"Buffer_"]){var r=null;if(e.mediaSource_[n+"Buffer_"])(r=e.mediaSource_[n+"Buffer_"]).updating=!1;else{var i=n+'/mp4;codecs="'+e[n+"Codec_"]+'"';r=function(e,t){var n=e.addSourceBuffer(t),r=Object.create(null);r.updating=!1,r.realBuffer_=n;var i=function(e){"function"==typeof n[e]?r[e]=function(){return n[e].apply(n,arguments)}:void 0===r[e]&&Object.defineProperty(r,e,{get:function(){return n[e]},set:function(t){return n[e]=t}})};for(var a in n)i(a);return r}(e.mediaSource_.nativeMediaSource_,i),e.mediaSource_[n+"Buffer_"]=r}e[n+"Buffer_"]=r,["update","updatestart","updateend"].forEach((function(i){r.addEventListener(i,(function(){if("audio"!==n||!e.audioDisabled_)return"updateend"===i&&(e[n+"Buffer_"].updating=!1),t.every((function(t){return!("audio"!==t||!e.audioDisabled_)||(n===t||!e[t+"Buffer_"]||!e[t+"Buffer_"].updating)}))?e.trigger(i):void 0}))}))}}))}},{key:"appendBuffer",value:function(e){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:h(this.gopBuffer_,this.mediaSource_.player_,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(e){this.gopBuffer_=f(this.gopBuffer_,e.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(e,t){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(e,t),this.gopBuffer_=p(this.gopBuffer_,e,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(e,t)),(0,s.default)(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)(0,s.default)(e,t,this.inbandTextTracks_[n])}},{key:"processPendingSegments_",value:function(){var e={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};e=this.pendingBuffers_.reduce((function(e,t){var n=t.type,r=t.data,i=t.initSegment;return e[n].segments.push(r),e[n].bytes+=r.byteLength,e[n].initSegment=i,t.captions&&(e.captions=e.captions.concat(t.captions)),t.info&&(e[n].info=t.info),t.metadata&&(e.metadata=e.metadata.concat(t.metadata)),e}),e),this.videoBuffer_||this.audioBuffer_||(0===e.video.bytes&&(this.videoCodec_=null),0===e.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),e.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:e.audio.info}),e.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:e.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(e.audio.segments.unshift(e.audio.initSegment),e.audio.bytes+=e.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var t=!1;this.videoBuffer_&&e.video.bytes?(e.video.segments.unshift(e.video.initSegment),e.video.bytes+=e.video.initSegment.byteLength,this.concatAndAppendSegments_(e.video,this.videoBuffer_),(0,l.addTextTrackData)(this,e.captions,e.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(t=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(e.audio,this.audioBuffer_),this.pendingBuffers_.length=0,t&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(e,t){var n=0,r=void 0;if(e.bytes){r=new Uint8Array(e.bytes),e.segments.forEach((function(e){r.set(e,n),n+=e.byteLength}));try{t.updating=!0,t.appendBuffer(r)}catch(e){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1}}]),t}(a.default.EventTarget);t.default=m},function(e,t,n){e.exports={generator:n(758),Transmuxer:n(455).Transmuxer,AudioSegmentStream:n(455).AudioSegmentStream,VideoSegmentStream:n(455).VideoSegmentStream}},function(e,t,n){"use strict";var r,i=n(180);(r=function(){var e=new Uint8Array,t=0;r.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.parseId3TagSize=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},this.parseAdtsSize=function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},this.push=function(n){var r,i,a,o,s=0,l=0;for(e.length?(o=e.length,(e=new Uint8Array(n.byteLength+o)).set(e.subarray(0,o)),e.set(n,o)):e=n;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(!0&e[l]&&240==(240&e[l+1])){if(e.length-l<7)break;if((s=this.parseAdtsSize(e,l))>e.length)break;a={type:"audio",data:e.subarray(l,l+s),pts:t,dts:t},this.trigger("data",a),l+=s}else l++;else{if(e.length-l<10)break;if((s=this.parseId3TagSize(e,l))>e.length)break;i={type:"timed-metadata",data:e.subarray(l,l+s)},this.trigger("data",i),l+=s}r=e.length-l,e=r>0?e.subarray(l):new Uint8Array}}).prototype=new i,e.exports=r},function(e,t){var n,r=[33,16,5,32,164,27],i=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],a=function(e){for(var t=[];e--;)t.push(0);return t},o={96e3:[r,[227,64],a(154),[56]],88200:[r,[231],a(170),[56]],64e3:[r,[248,192],a(240),[56]],48e3:[r,[255,192],a(268),[55,148,128],a(54),[112]],44100:[r,[255,192],a(268),[55,163,128],a(84),[112]],32e3:[r,[255,192],a(268),[55,234],a(226),[112]],24e3:[r,[255,192],a(268),[55,255,128],a(268),[111,112],a(126),[224]],16e3:[r,[255,192],a(268),[55,255,128],a(268),[111,255],a(269),[223,108],a(195),[1,192]],12e3:[i,a(268),[3,127,248],a(268),[6,255,240],a(268),[13,255,224],a(268),[27,253,128],a(259),[56]],11025:[i,a(268),[3,127,248],a(268),[6,255,240],a(268),[13,255,224],a(268),[27,255,192],a(268),[55,175,128],a(108),[112]],8e3:[i,a(268),[3,121,16],a(47),[7]]};e.exports=(n=o,Object.keys(n).reduce((function(e,t){return e[t]=new Uint8Array(n[t].reduce((function(e,t){return e.concat(t)}),[])),e}),{}))},function(e,t){var n,r,i,a,o,s;n=function(e){return 9e4*e},r=function(e,t){return e*t},i=function(e){return e/9e4},a=function(e,t){return e/t},o=function(e,t){return n(a(e,t))},s=function(e,t){return r(i(e),t)},e.exports={secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:a,audioTsToVideoTs:o,videoTsToAudioTs:s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(449)),o=n(263),s=i(n(759)),l=i(n(1192)),c=i(n(456)),u=i(n(126)),d=i(n(1193)),h=i(n(1194)),f=n(349),p=i(n(454)),m=i(n(763)),g=i(n(350)),v=n(761),b=n(1201),y=void 0,A={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},_=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],w=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},E=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return(0,f.translateLegacyCodecs)([e])[0]}))};t.mapLegacyAvcCodecs_=E;var S=function(e,t,n){return e+"/"+t+'; codecs="'+n.filter((function(e){return!!e})).join(", ")+'"'},C=function(e,t){var n=function(e){return e.segments&&e.segments.length&&e.segments[0].map?"mp4":"mp2t"}(t),r=function(e){var t=e.attributes||{};return t.CODECS?(0,v.parseCodecs)(t.CODECS):A}(t),i=t.attributes||{},a=!0,o=!1;if(!t)return[];if(e.mediaGroups.AUDIO&&i.AUDIO){var s=e.mediaGroups.AUDIO[i.AUDIO];if(s)for(var l in o=!0,a=!1,s)if(!s[l].uri){a=!0;break}}o&&!r.audioProfile&&(u.default.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),r.audioProfile=A.audioProfile);var c={};r.videoCodec&&(c.video=""+r.videoCodec+r.videoObjectTypeIndicator),r.audioProfile&&(c.audio="mp4a.40."+r.audioProfile);var d=S("audio",n,[c.audio]),h=S("video",n,[c.video]),f=S("video",n,[c.video,c.audio]);return o?!a&&c.video?[h,d]:[f,d]:c.video?[f]:[d]};t.mimeTypesForPlaylist_=C;var T=function(e){function t(e){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var r=e.url,i=e.handleManifestRedirects,o=e.withCredentials,c=e.mode,d=e.tech,f=e.bandwidth,g=e.externHls,v=e.useCueTags,A=e.blacklistDuration,E=e.enableLowInitialPlaylist;if(!r)throw new Error("A non-empty playlist URL is required");y=g,this.tech_=d,this.hls_=d.hls,this.mode_=c,this.useCueTags_=v,this.blacklistDuration=A,this.enableLowInitialPlaylist=E,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:o,handleManifestRedirects:i,timeout:null},this.mediaTypes_=(0,b.createMediaTypes)(),this.mediaSource=new u.default.MediaSource({mode:c}),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_.bind(this)),this.seekable_=u.default.createTimeRanges(),this.hasPlayed_=function(){return!1},this.syncController_=new h.default(e),this.segmentMetadataTrack_=d.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=(0,p.default)(m.default,function(){var e=void 0;try{e=763}catch(e){}return e}());var S={hls:this.hls_,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.mediaSource.duration},hasPlayed:function(){return n.hasPlayed_()},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:f,syncController:this.syncController_,decrypter:this.decrypter_};this.masterPlaylistLoader_=new a.default(r,this.hls_,this.requestOptions_),this.setupMasterPlaylistLoaderListeners_(),this.mainSegmentLoader_=new s.default(u.default.mergeOptions(S,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new s.default(u.default.mergeOptions(S,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new l.default(u.default.mergeOptions(S,{loaderType:"vtt"}),e),this.setupSegmentLoaderListeners_(),_.forEach((function(e){n[e+"_"]=w.bind(n,e)})),this.masterPlaylistLoader_.load()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*e.masterPlaylistLoader_.targetDuration*1e3;(0,o.isLowestEnabledRendition)(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),(0,b.setupMediaGroups)({segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,mode:e.mode_,hls:e.hls_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t);try{e.setupSourceBuffers_()}catch(t){return u.default.log.warn("Failed to create SourceBuffers",t),e.mediaSource.endOfStream("decode")}e.setupFirstPlay(),e.trigger("selectedinitialmedia")})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var t,n=e.masterPlaylistLoader_.media();if(!n){var r=void 0;return e.enableLowInitialPlaylist&&(r=e.selectInitialPlaylist()),r||(r=e.selectPlaylist()),e.initialMedia_=r,void e.masterPlaylistLoader_.media(e.initialMedia_)}e.useCueTags_&&e.updateAdCues_(n),e.mainSegmentLoader_.playlist(n,e.requestOptions_),e.updateDuration(),e.tech_.paused()||e.mainSegmentLoader_.load(),n.endList||(t=function(){var t=e.seekable();0!==t.length&&e.mediaSource.addSeekableRange_(t.start(0),t.end(0))},e.duration()!==1/0?e.tech_.one("durationchange",(function n(){e.duration()===1/0?t():e.tech_.one("durationchange",n)})):t())})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*e.masterPlaylistLoader_.targetDuration*1e3;(0,o.isLowestEnabledRendition)(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))}},{key:"triggerPresenceUsage_",value:function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var o in n.AUDIO[a]){n.AUDIO[a][o].uri||(r=!1)}r&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),y.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),y.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist(),n=e.masterPlaylistLoader_.media(),r=e.tech_.buffered(),i=r.length?r.end(r.length-1)-e.tech_.currentTime():0,a=e.bufferLowWaterLine();(!n.endList||e.duration()<g.default.MAX_BUFFER_LOW_WATER_LINE||t.attributes.BANDWIDTH<n.attributes.BANDWIDTH||i>=a)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("ended",(function(){e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(){e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)})),this.mainSegmentLoader_.on("reseteverything",(function(){e.tech_.trigger("hls-reset")})),this.mainSegmentLoader_.on("segmenttimemapping",(function(t){e.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})})),this.audioSegmentLoader_.on("ended",(function(){e.onEndOfStream()}))}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"fastQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_()&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var e,t=this,n=this.masterPlaylistLoader_.media();if(!n||this.tech_.paused()||this.hasPlayed_())return!1;if(!n.endList){var r=(e=t.seekable()).length?u.default.browser.IE_VERSION&&"html5"===t.mode_&&0===t.tech_.readyState()?(t.tech_.one("loadedmetadata",(function(){t.trigger("firstplay"),t.tech_.setCurrentTime(e.end(0)),t.hasPlayed_=function(){return!0}})),{v:!1}):(t.trigger("firstplay"),void t.tech_.setCurrentTime(e.end(0))):{v:!1};if("object"==typeof r)return r.v}return this.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(e){return u.default.log.warn("Failed to create Source Buffers",e),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=e&&this.audioSegmentLoader_.ended_),e&&this.mediaSource.endOfStream()}},{key:"stuckAtPlaylistEnd_",value:function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===t)return!1;var n=y.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=c.default.SAFE_TIME_DELTA;var a=i.end(i.length-1);return a-r<=c.default.SAFE_TIME_DELTA&&n-a<=c.default.SAFE_TIME_DELTA}},{key:"blacklistCurrentPlaylist",value:function(e,t){void 0===e&&(e={});var n,r=void 0;if(r=e.playlist||this.masterPlaylistLoader_.media(),t=t||e.blacklistDuration||this.blacklistDuration,!r){this.error=e;try{return this.mediaSource.endOfStream("network")}catch(e){return this.trigger("error")}}var i=1===this.masterPlaylistLoader_.master.playlists.filter(o.isEnabled).length;return i?(u.default.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(i)):(r.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),n=this.selectPlaylist(),u.default.log.warn("Problem encountered with the current HLS playlist."+(e.message?" "+e.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(n))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(e){var t=c.default.findRange(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length&&"flash"!==this.mode_?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:y.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var e=void 0,t=void 0;if(this.masterPlaylistLoader_){var n=this.masterPlaylistLoader_.media();if(n){var r=this.syncController_.getExpiredTime(n,this.mediaSource.duration);if(null!==r&&0!==(e=y.Playlist.seekable(n,r)).length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(n=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(r=this.syncController_.getExpiredTime(n,this.mediaSource.duration)))return;if(0===(t=y.Playlist.seekable(n,r)).length)return}t?t.start(0)>e.end(0)||e.start(0)>t.end(0)?this.seekable_=e:this.seekable_=u.default.createTimeRanges([[t.start(0)>e.start(0)?t.start(0):e.start(0),t.end(0)<e.end(0)?t.end(0):e.end(0)]]):this.seekable_=e,this.tech_.trigger("seekablechanged")}}}}},{key:"updateDuration",value:function(){var e=this,t=this.mediaSource.duration,n=y.Playlist.duration(this.masterPlaylistLoader_.media()),r=this.tech_.buffered(),i=function t(){e.mediaSource.duration=n,e.tech_.trigger("durationchange"),e.mediaSource.removeEventListener("sourceopen",t)};r.length>0&&(n=Math.max(n,r.end(r.length-1))),t!==n&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",i):i())}},{key:"dispose",value:function(){var e=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e,t=this.masterPlaylistLoader_.media();if(t&&"open"===this.mediaSource.readyState){if((e=C(this.masterPlaylistLoader_.master,t)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri,this.mediaSource.endOfStream("decode");this.mainSegmentLoader_.mimeType(e[0]),e[1]&&this.audioSegmentLoader_.mimeType(e[1]),this.excludeIncompatibleVariants_(t)}}},{key:"excludeIncompatibleVariants_",value:function(e){var t=this.masterPlaylistLoader_.master,n=2,r=null,i=void 0;e.attributes.CODECS&&(i=(0,v.parseCodecs)(e.attributes.CODECS),r=i.videoCodec,n=i.codecCount),t.playlists.forEach((function(e){var t={codecCount:2,videoCodec:null};if(e.attributes.CODECS){var i=e.attributes.CODECS;t=(0,v.parseCodecs)(i),window.MediaSource&&window.MediaSource.isTypeSupported&&!window.MediaSource.isTypeSupported('video/mp4; codecs="'+E(i)+'"')&&(e.excludeUntil=1/0)}t.codecCount!==n&&(e.excludeUntil=1/0),t.videoCodec!==r&&(e.excludeUntil=1/0)}))}},{key:"updateAdCues_",value:function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),d.default.updateAdCues(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=g.default.GOAL_BUFFER_LENGTH,n=g.default.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,g.default.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=g.default.BUFFER_LOW_WATER_LINE,n=g.default.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,g.default.MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,r)}}]),t}(u.default.EventTarget);t.MasterPlaylistController=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i,a=n(126),o=(i=a)&&i.__esModule?i:{default:i},s=function(){},l=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(){r.sourceBuffer_=t.addSourceBuffer(n),r.onUpdateendCallback_=function(){var e=r.pendingCallback_;r.pendingCallback_=null,e&&e(),r.runCallback_()},r.sourceBuffer_.addEventListener("updateend",r.onUpdateendCallback_),r.runCallback_()};this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,"closed"===t.readyState?t.addEventListener("sourceopen",i):i()}return r(e,[{key:"abort",value:function(e){var t=this;this.processedAppend_&&this.queueCallback_((function(){t.sourceBuffer_.abort()}),e)}},{key:"appendBuffer",value:function(e,t){var n=this;this.processedAppend_=!0,this.queueCallback_((function(){n.sourceBuffer_.appendBuffer(e)}),t)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:o.default.createTimeRanges()}},{key:"remove",value:function(e,t){var n=this;this.processedAppend_&&this.queueCallback_((function(){n.sourceBuffer_.remove(e,t)}),s)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(e){var t=this;return void 0!==e&&(this.queueCallback_((function(){t.sourceBuffer_.timestampOffset=e})),this.timestampOffset_=e),this.timestampOffset_}},{key:"queueCallback_",value:function(e,t){this.callbacks_.push([e.bind(this),t]),this.runCallback_()}},{key:"runCallback_",value:function(){var e=void 0;!this.updating()&&this.callbacks_.length&&(e=this.callbacks_.shift(),this.pendingCallback_=e[1],e[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),e}();t.default=l,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(126),a=(r=i)&&r.__esModule?r:{default:r},o=n(301),s={FAILURE:2,TIMEOUT:-101,ABORTED:-102};t.REQUEST_ERRORS=s;var l=function(e){var t,n,r={};return e.byterange&&(r.Range=(t=e.byterange,n=t.offset+t.length-1,"bytes="+t.offset+"-"+n)),r},c=function(e){e.forEach((function(e){e.abort()}))},u=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:s.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:s.ABORTED,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:s.FAILURE,xhr:t}:null},d=function(e,t,n){var r=[],i=0;return function(a,s){if(a&&(c(e),r.push(a)),(i+=1)===e.length){if(s.endOfAllRequests=Date.now(),r.length>0){var l=function(e){return e.reduce((function(e,t){return t.code>e.code?t:e}))}(r);return n(l,s)}return s.encryptedBytes?function(e,t,n){e.addEventListener("message",(function r(i){if(i.data.source===t.requestId){e.removeEventListener("message",r);var a=i.data.decrypted;return t.bytes=new Uint8Array(a.bytes,a.byteOffset,a.byteLength),n(null,t)}})),e.postMessage((0,o.createTransferableMessage)({source:t.requestId,encrypted:t.encryptedBytes,key:t.key.bytes,iv:t.key.iv}),[t.encryptedBytes.buffer,t.key.bytes.buffer])}(t,s,n):n(null,s)}}},h=function(e,t){return function(n){var r,i,o;return e.stats=a.default.mergeOptions(e.stats,(i=(r=n).target,(o={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=r.loaded,o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3),o)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(n,e)}};t.mediaSegmentRequest=function(e,t,n,r,i,o){var f=[],p=d(f,n,o);if(r.key){var m=e(a.default.mergeOptions(t,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),function(e,t){return function(n,r){var i=r.response,a=u(n,r);if(a)return t(a,e);if(16!==i.byteLength)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:s.FAILURE,xhr:r},e);var o=new DataView(i);return e.key.bytes=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),t(null,e)}}(r,p));f.push(m)}if(r.map&&!r.map.bytes){var g=e(a.default.mergeOptions(t,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:l(r.map)}),function(e,t){return function(n,r){var i=r.response,a=u(n,r);return a?t(a,e):0===i.byteLength?t({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:s.FAILURE,xhr:r},e):(e.map.bytes=new Uint8Array(r.response),t(null,e))}}(r,p));f.push(g)}var v=e(a.default.mergeOptions(t,{uri:r.resolvedUri,responseType:"arraybuffer",headers:l(r)}),function(e,t){return function(n,r){var i=r.response,a=u(n,r);return a?t(a,e):0===i.byteLength?t({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:s.FAILURE,xhr:r},e):(e.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(r),e.key?e.encryptedBytes=new Uint8Array(r.response):e.bytes=new Uint8Array(r.response),t(null,e))}}(r,p));return v.addEventListener("progress",h(r,i)),f.push(v),function(){return c(f)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=a(n(759)),l=a(n(126)),c=a(n(117)),u=a(n(348)),d=n(301),h=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),f=function(e){return String.fromCharCode.apply(null,e)},p=function(e){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.mediaSource_=null,this.subtitlesTrack_=null}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return l.default.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return l.default.createTimeRanges([[t,n]])}},{key:"initSegment",value:function(e){var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(!e)return null;var n=(0,d.initSegmentId)(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=h.byteLength+e.bytes.byteLength,a=new Uint8Array(i);a.set(e.bytes),a.set(h,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(e){return void 0===e?this.subtitlesTrack_:(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}},{key:"remove",value:function(e,t){(0,u.default)(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}}},{key:"skipEmptySegments_",value:function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var t,n=this.pendingSegment_,r=n.segment;if("function"!=typeof c.default.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var i=(t=function(){e.handleSegment_()},e.state="WAITING_ON_VTTJS",e.subtitlesTrack_.tech_.one("vttjsloaded",t),e.subtitlesTrack_.tech_.one("vttjserror",(function(){e.subtitlesTrack_.tech_.off("vttjsloaded",t),e.error({message:"Error loading vtt.js"}),e.state="READY",e.pause(),e.trigger("error")})),{v:void 0});if("object"==typeof i)return i.v}r.requested=!0;try{this.parseVTTCues_(n)}catch(e){return this.error({message:e.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,n.cues.length&&this.remove(n.cues[0].endTime,n.cues[n.cues.length-1].endTime),n.cues.forEach((function(t){e.subtitlesTrack_.addCue(t)})),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(e){var t=void 0,n=!1;"function"==typeof c.default.TextDecoder?t=new c.default.TextDecoder("utf8"):(t=c.default.WebVTT.StringDecoder(),n=!0);var r=new c.default.WebVTT.Parser(c.default,c.default.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){return e.timestampmap=t},r.onparsingerror=function(e){l.default.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var i=e.segment.map.bytes;n&&(i=f(i)),r.parse(i)}var a=e.bytes;n&&(a=f(a)),r.parse(a),r.flush()}},{key:"updateTimeMapping_",value:function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,a=i.MPEGTS/9e4-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var o=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(o,s-r.duration)}}}else r.empty=!0}}]),t}(s.default);t.default=p,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};var i,a=n(117),o=(i=a)&&i.__esModule?i:{default:i},s=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null};t.default={updateAdCues:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];if(e.segments)for(var i=n,a=void 0,l=0;l<e.segments.length;l++){var c=e.segments[l];if(a||(a=s(t,i+c.duration/2)),a){if("cueIn"in c){a.endTime=i,a.adEndTime=i,i+=c.duration,a=null;continue}if(i<a.endTime){i+=c.duration;continue}a.endTime+=c.duration}else if("cueOut"in c&&((a=new o.default.VTTCue(i,i+c.duration,c.cueOut)).adStartTime=i,a.adEndTime=i+parseFloat(c.cueOut),t.addCue(a)),"cueOutCont"in c){var u=void 0,d=void 0,h=c.cueOutCont.split("/").map(parseFloat),f=r(h,2);u=f[0],d=f[1],(a=new o.default.VTTCue(i,i+c.duration,"")).adStartTime=i-u,a.adEndTime=a.adStartTime+d,t.addCue(a)}i+=c.duration}},findAdCue:s},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(o)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=a,n=o,r=!0,s=c=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=a(n(1195)),l=n(1196),c=n(263),u=a(n(126)),d=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){return e.datetimeToDisplayTime&&t.dateTimeObject?{time:t.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,segmentIndex:0}:null}},{name:"Segment",run:function(e,t,n,r,i){var a=t.segments||[],o=null,s=null;i=i||0;for(var l=0;l<a.length;l++){var c=a[l];if(c.timeline===r&&void 0!==c.start){var u=Math.abs(i-c.start);if(null!==s&&s<u)break;(!o||null===s||s>=u)&&(s=u,o={time:c.start,segmentIndex:l})}}return o}},{name:"Discontinuity",run:function(e,t,n,r,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=null,s=0;s<t.discontinuityStarts.length;s++){var l=t.discontinuityStarts[s],c=t.discontinuitySequence+s+1,u=e.discontinuities[c];if(u){var d=Math.abs(i-u.time);if(null!==o&&o<d)break;(!a||null===o||o>=d)&&(o=d,a={time:u.time,segmentIndex:l})}}return a}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}];t.syncPointStrategies=d;var h=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];o(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.inspectCache_=void 0,this.timelines=[],this.discontinuities=[],this.datetimeToDisplayTime=null,e.debug&&(this.logger_=u.default.log.bind(u.default,"sync-controller ->"))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"getSyncPoint",value:function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+(0,c.sumDurations)(e,r.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,n,r){for(var i=[],a=0;a<d.length;a++){var o=d[a],s=o.run(this,e,t,n,r);s&&(s.strategy=o.name,i.push({strategy:o.name,syncPoint:s}),this.logger_("syncPoint found via <"+o.name+">:",s))}return i}},{key:"selectSyncPoint_",value:function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,a=1;a<e.length;a++){var o=Math.abs(e[a].syncPoint[t.key]-t.value);o<r&&(r=o,n=e[a].syncPoint,i=e[a].strategy)}return this.logger_("syncPoint with strategy <"+i+"> chosen: ",n),n}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist sync:",t.syncInfo),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.dateTimeObject){var t=e.dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(e){var t=e.segment,n=e.playlist,r=void 0;return(r=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e))&&this.calculateSegmentTimeMapping_(e,r)&&(this.saveDiscontinuitySyncInfo_(e),n.syncInfo||(n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:t.start})),r}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,n=s.default.timescale(t.map.bytes),r=s.default.startTime(n,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=r),{start:r,end:r+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=(0,l.inspect)(e.bytes,this.inspectCache_),n=void 0,r=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,n=t.video[0].dtsTime,r=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,n=t.audio[0].dtsTime,r=t.audio[1].dtsTime),{start:n,end:r,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var n=e.segment,r=this.timelines[e.timeline];if(null!==e.timestampOffset)this.logger_("tsO:",e.timestampOffset),r={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=r,this.trigger("timestampoffset"),n.start=e.startOfSegment,n.end=t.end+r.mapping;else{if(!r)return!1;n.start=t.start+r.mapping,n.end=t.end+r.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,o=i-e.mediaIndex,s=Math.abs(o);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>s){var l=void 0;l=o<0?n.start-(0,c.sumDurations)(t,e.mediaIndex,i):n.end+(0,c.sumDurations)(t,e.mediaIndex+1,i),this.discontinuities[a]={time:l,accuracy:s}}}}},{key:"logger_",value:function(){}}]),t}(u.default.EventTarget);t.default=h},function(e,t,n){"use strict";var r,i,a,o;r=function(e,t){var n,a,o,s,l,c=[];if(!t.length)return null;for(n=0;n<e.byteLength;)a=e[n]<<24,a|=e[n+1]<<16,a|=e[n+2]<<8,a|=e[n+3],o=i(e.subarray(n+4,n+8)),s=a>1?n+a:e.byteLength,o===t[0]&&(1===t.length?c.push(e.subarray(n+8,s)):(l=r(e.subarray(n+8,s),t.slice(1))).length&&(c=c.concat(l))),n=s;return c},i=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},a=function(e){return r(e,["moov","trak"]).reduce((function(e,t){var n,i,a,o;return(n=r(t,["tkhd"])[0])?(a=n[i=0===n[0]?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3],(o=r(t,["mdia","mdhd"])[0])?(i=0===o[0]?12:20,e[a]=o[i]<<24|o[i+1]<<16|o[i+2]<<8|o[i+3],e):null):null}),{})},o=function(e,t){var n,i,a;return n=r(t,["moof","traf"]),i=[].concat.apply([],n.map((function(t){return r(t,["tfhd"]).map((function(n){var i,a;return i=n[4]<<24|n[5]<<16|n[6]<<8|n[7],a=e[i]||9e4,(r(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=e[4]<<24|e[5]<<16|e[6]<<8|e[7],1===t&&(n*=Math.pow(2,32),n+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),n}))[0]||1/0)/a}))}))),a=Math.min.apply(null,i),isFinite(a)?a:0},e.exports={parseType:i,timescale:a,startTime:o}},function(e,t,n){"use strict";var r=n(762),i=n(1197).handleRollover,a={};a.ts=n(1199),a.aac=n(1200);var o=function(e,t,n){for(var r,i,o,s,l=0,c=188,u=!1;c<e.byteLength;)if(71!==e[l]||71!==e[c])l++,c++;else{switch(r=e.subarray(l,c),a.ts.parseType(r,t.pid)){case"pes":i=a.ts.parsePesType(r,t.table),o=a.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&o&&(s=a.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),u=!0)}if(u)break;l+=188,c+=188}for(l=(c=e.byteLength)-188,u=!1;l>=0;)if(71!==e[l]||71!==e[c])l--,c--;else{switch(r=e.subarray(l,c),a.ts.parseType(r,t.pid)){case"pes":i=a.ts.parsePesType(r,t.table),o=a.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&o&&(s=a.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),u=!0)}if(u)break;l-=188,c-=188}},s=function(e,t,n){for(var r,i,o,s,l,c,u,d=0,h=188,f=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[d]||71!==e[h])d++,h++;else{switch(r=e.subarray(d,h),a.ts.parseType(r,t.pid)){case"pes":if(i=a.ts.parsePesType(r,t.table),o=a.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(o&&!f&&(s=a.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),f=!0),!n.firstKeyFrame)){if(o&&0!==p.size){for(l=new Uint8Array(p.size),c=0;p.data.length;)u=p.data.shift(),l.set(u,c),c+=u.byteLength;a.ts.videoPacketContainsKeyFrame(l)&&(n.firstKeyFrame=a.ts.parsePesTime(l),n.firstKeyFrame.type="video"),p.size=0}p.data.push(r),p.size+=r.byteLength}}if(f&&n.firstKeyFrame)break;d+=188,h+=188}for(d=(h=e.byteLength)-188,f=!1;d>=0;)if(71!==e[d]||71!==e[h])d--,h--;else{switch(r=e.subarray(d,h),a.ts.parseType(r,t.pid)){case"pes":i=a.ts.parsePesType(r,t.table),o=a.ts.parsePayloadUnitStartIndicator(r),"video"===i&&o&&(s=a.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),f=!0)}if(f)break;d-=188,h-=188}},l=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),a.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=a.ts.parsePat(n));break;case"pmt":t.table||(t.table=a.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],s(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],o(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n,r;return(r=(n=e)[0]==="I".charCodeAt(0)&&n[1]==="D".charCodeAt(0)&&n[2]==="3".charCodeAt(0)?function(e){for(var t,n=!1,r=0,i=null,o=null,s=0,l=0;e.length-l>=3;){switch(a.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((s=a.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===o&&(t=e.subarray(l,l+s),o=a.aac.parseAacTimestamp(t)),l+=s;break;case"audio":if(e.length-l<7){n=!0;break}if((s=a.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===i&&(t=e.subarray(l,l+s),i=a.aac.parseSampleRate(t)),r++,l+=s;break;default:l++}if(n)return null}if(null===i||null===o)return null;var c=9e4/i;return{audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*r*c,pts:o+1024*r*c}]}}(e):l(e))&&(r.audio||r.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})),e.firstKeyFrame){var a=e.firstKeyFrame;a.dts=i(a.dts,r),a.pts=i(a.pts,r),a.dtsTime=a.dts/9e4,a.ptsTime=a.dts/9e4}}}(r,t),r):null}}},function(e,t,n){"use strict";var r=n(1198),i=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},a=function(e){var t,n;a.prototype.init.call(this),this.type_=e,this.push=function(e){e.type===this.type_&&(void 0===n&&(n=e.dts),e.dts=i(e.dts,n),e.pts=i(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.discontinuity=function(){n=void 0,t=void 0}};a.prototype=new r,e.exports={TimestampRolloverStream:a,handleRollover:i}},function(e,t,n){"use strict";var r=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,a;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,a)}},this.dispose=function(){e={}}}};r.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),e},r.prototype.push=function(e){this.trigger("data",e)},r.prototype.flush=function(e){this.trigger("done",e)},e.exports=r},function(e,t,n){"use strict";var r=n(762),i=function(e){var t=31&e[1];return t<<=8,t|=e[2]},a=function(e){return!!(64&e[1])},o=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},s=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};e.exports={parseType:function(e,t){var n=i(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=a(e),n=4+o(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=a(e),r=4+o(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var s=12+((15&e[r+10])<<8|e[r+11]);s<i;){var l=r+s;t[(31&e[l+1])<<8|e[l+2]]=e[l],s+=5+((15&e[l+3])<<8|e[l+4])}return t}},parsePayloadUnitStartIndicator:a,parsePesType:function(e,t){switch(t[i(e)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!a(e))return null;var t=4+o(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+o(e),n=e.subarray(t),r=0,i=0,a=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(a=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(a=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(a=!0),a}}},function(e,t,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={parseId3TagSize:function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return r[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=i(e.subarray(10,14)));do{if((n=i(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var a=0;a<r.byteLength;a++)if(0===r[a]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,a))){var o=r.subarray(a+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(126)),a=r(n(449)),o=function(){},s=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},l=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)};t.stopLoaders=l;var c=function(e,t){t.activePlaylistLoader=e,e.load()};t.startLoaders=c;var u=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,a=t.mediaTypes[e],o=a.activeTrack(),s=a.activeGroup(o),u=a.activePlaylistLoader;l(r,a),s&&(s.playlistLoader?(r.resyncLoader(),c(s.playlistLoader,a)):u&&i.resetEverything())}};t.onGroupChanged=u;var d=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,a=t.mediaTypes[e],o=a.activeTrack(),s=a.activeGroup(o),u=a.activePlaylistLoader;l(r,a),s&&(s.playlistLoader?u!==s.playlistLoader?(r.track&&r.track(o),r.resetEverything(),c(s.playlistLoader,a)):c(s.playlistLoader,a):i.resetEverything())}};t.onTrackChanged=d;var h={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],a=t.blacklistCurrentPlaylist;l(n,r);var o=r.activeTrack(),s=r.activeGroup(),c=(s.filter((function(e){return e.default}))[0]||s[0]).id,u=r.tracks[c];if(o!==u){for(var d in i.default.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[d].enabled=r.tracks[d]===u;r.onTrackChanged()}else a({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];i.default.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),l(n,r);var a=r.activeTrack();a&&(a.mode="disabled"),r.onTrackChanged()}}};t.onError=h;var f={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",h[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e],o=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),a.track(o.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",h[e](e,n))}};t.setupListeners=f;var p={AUDIO:function(e,t){var n=t.mode,r=t.hls,o=t.segmentLoaders[e],l=t.requestOptions,c=t.master.mediaGroups,u=t.mediaTypes[e],d=u.groups,p=u.tracks;for(var m in c[e]&&0!==Object.keys(c[e]).length&&"html5"===n||(c[e]={main:{default:{default:!0}}}),c[e])for(var g in d[m]||(d[m]=[]),c[e][m]){var v=c[e][m][g],b=void 0;if(b=v.resolvedUri?new a.default(v.resolvedUri,r,l):null,v=i.default.mergeOptions({id:g,playlistLoader:b},v),f[e](e,v.playlistLoader,t),d[m].push(v),void 0===p[g]){var y=new i.default.AudioTrack({id:g,kind:s(v),enabled:!1,language:v.language,default:v.default,label:g});p[g]=y}}o.on("error",h[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.hls,o=t.segmentLoaders[e],s=t.requestOptions,l=t.master.mediaGroups,c=t.mediaTypes[e],u=c.groups,d=c.tracks;for(var p in l[e])for(var m in u[p]||(u[p]=[]),l[e][p])if(!l[e][p][m].forced){var g=l[e][p][m];if(g=i.default.mergeOptions({id:m,playlistLoader:new a.default(g.resolvedUri,r,s)},g),f[e](e,g.playlistLoader,t),u[p].push(g),void 0===d[m]){var v=n.addRemoteTextTrack({id:m,kind:"subtitles",enabled:!1,language:g.language,label:m},!1).track;d[m]=v}}o.on("error",h[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,a=t.mediaTypes[e],o=a.groups,s=a.tracks;for(var l in r[e])for(var c in o[l]||(o[l]=[]),r[e][l]){var u=r[e][l][c];if(u.instreamId.match(/CC\d/)&&(o[l].push(i.default.mergeOptions({id:c},u)),void 0===s[c])){var d=n.addRemoteTextTrack({id:u.instreamId,kind:"captions",enabled:!1,language:u.language,label:c},!1).track;s[c]=d}}}};t.initialize=p;var m=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,a=r.media();if(!a)return null;var o=null;return a.attributes[e]&&(o=i[a.attributes[e]]),o=o||i.main,void 0===n?o:null===n?null:o.filter((function(e){return e.id===n.id}))[0]||null}};t.activeGroup=m;var g={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode)return n[r];return null}}};t.activeTrack=g;t.setupMediaGroups=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){p[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.hls;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=m(n,e),t[n].activeTrack=g[n](n,e),t[n].onGroupChanged=u(n,e),t[n].onTrackChanged=d(n,e)}));var a=t.AUDIO.activeGroup(),o=(a.filter((function(e){return e.default}))[0]||a[0]).id;t.AUDIO.tracks[o].enabled=!0,t.AUDIO.onTrackChanged(),n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))}));var s=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"hls-audio-change"})};for(var l in r.audioTracks().addEventListener("change",s),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",s),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[l])};t.createMediaTypes=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:o,activeTrack:o,onGroupChanged:o,onTrackChanged:o}})),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(263),i=function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a,o,s,l=t.masterPlaylistController_.fastQualityChange_.bind(t.masterPlaylistController_);if(n.attributes.RESOLUTION){var c=n.attributes.RESOLUTION;this.width=c.width,this.height=c.height}this.bandwidth=n.attributes.BANDWIDTH,this.id=i,this.enabled=(a=t.playlists,o=n.uri,s=l,function(e){var t=a.master.playlists[o],n=(0,r.isIncompatible)(t),i=(0,r.isEnabled)(t);return void 0===e?i:(e?delete t.disabled:t.disabled=!0,e===i||n||(s(),e?a.trigger("renditionenabled"):a.trigger("renditiondisabled")),e)})};t.default=function(e){var t=e.playlists;e.representations=function(){return t.master.playlists.filter((function(e){return!(0,r.isIncompatible)(e)})).map((function(t,n){return new i(e,t,t.uri)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(117)),o=i(n(456)),s=i(n(126)),l=["seeking","seeked","pause","playing","error"],c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tech_=t.tech,this.seekable=t.seekable,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,t.debug&&(this.logger_=s.default.log.bind(s.default,"playback-watcher ->")),this.logger_("initialize");var r=function(){return n.monitorCurrentTime_()},i=function(){return n.techWaiting_()},o=function(){return n.cancelTimer_()},c=function(){return n.fixesBadSeeks_()};this.tech_.on("seekablechanged",c),this.tech_.on("waiting",i),this.tech_.on(l,o),this.tech_.on("canplay",r),this.dispose=function(){n.logger_("dispose"),n.tech_.off("seekablechanged",c),n.tech_.off("waiting",i),n.tech_.off(l,o),n.tech_.off("canplay",r),n.checkCurrentTimeTimeout_&&a.default.clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}return r(e,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&a.default.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=a.default.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+o.default.SAFE_TIME_DELTA>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var e=this.tech_.seeking(),t=this.seekable(),n=this.tech_.currentTime(),r=void 0;e&&this.afterSeekableWindow_(t,n)&&(r=t.end(t.length-1));e&&this.beforeSeekableWindow_(t,n)&&(r=t.start(0)+o.default.SAFE_TIME_DELTA);return void 0!==r&&(this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+o.default.printableRange(t)+". Seeking to "+r+"."),this.tech_.setCurrentTime(r),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=o.default.findRange(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.buffered(),i=o.default.findNextRange(r,t);if(this.videoUnderflow_(i,r,t))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(i.length>0){var a=i.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+i.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t){return!!e.length&&t>e.end(e.length-1)+o.default.SAFE_TIME_DELTA}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-o.default.SAFE_TIME_DELTA)}},{key:"videoUnderflow_",value:function(e,t,n){if(0===e.length){var r=this.gapFromVideoUnderflow_(t,n);if(r)return this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+n),!0}return!1}},{key:"skipTheGap_",value:function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=o.default.findNextRange(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+o.default.TIME_FUDGE_FACTOR),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(e,t){for(var n=o.default.findGaps(e),r=0;r<n.length;r++){var i=n.start(r),a=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:a}}return null}},{key:"logger_",value:function(){}}]),e}();t.default=c,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(126),a=(r=i)&&r.__esModule?r:{default:r},o={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}};t.default=function(e){!function e(t,n){var r=0,i=0,s=a.default.mergeOptions(o,n);t.ready((function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var l=function(){i&&t.currentTime(i)},c=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",l),t.src(e),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){if(Date.now()-r<1e3*s.errorInterval)t.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(s.getSource&&"function"==typeof s.getSource)return r=Date.now(),s.getSource.call(t,c);a.default.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},d=function e(){t.off("loadedmetadata",l),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",d),t.reloadSourceOnError=function(n){d(),e(t,n)}}(this,e)},e.exports=t.default},function(e,t){},function(e,t,n){"use strict";var r=n(764);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,i,a){if(n)e(n);else if(i.statusCode>=400&&i.statusCode<=599){var o=a;if(t)if(r.TextDecoder){var s=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return"charset"===r.trim()?i.trim():e}),"utf-8")}(i.headers&&i.headers["content-type"]);try{o=new TextDecoder(s).decode(a)}catch(e){}}else o=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:o})}else e(null,a)}}},function(e,t,n){var r=n(262),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function o(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function l(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);if(2===o.length)t(o[0].trim(),o[1].trim())}}function c(e,t,n){var r=e;function i(){var t=o(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=i(),c(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),c(),t.endTime=i(),c(),function(e,t){var r=new s;l(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}a.prototype=i(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var u=r.createElement&&r.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},f={v:"title",lang:"lang"},p={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!p[t.localName]||p[t.localName]===e.localName}function i(t,n){var r=d[t];if(!r)return null;var i=e.document.createElement(r),a=f[t];return a&&n&&(i[a]=n.trim()),i}for(var a,s,l=e.document.createElement("div"),c=l,m=[];null!==(a=n());)if("<"!==a[0])c.appendChild(e.document.createTextNode((s=a,u.innerHTML=s,s=u.textContent,u.textContent="",s)));else{if("/"===a[1]){m.length&&m[m.length-1]===a.substr(2).replace(">","")&&(m.pop(),c=c.parentNode);continue}var g,v=o(a.substr(1,a.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),c.appendChild(g);continue}var b=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!b)continue;if(!(g=i(b[1],b[3])))continue;if(!r(c,g))continue;if(b[2]){var y=b[2].split(".");y.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];g.style[r]=i}})),g.className=y.join(" ")}m.push(b[1]),c.appendChild(g),c=g}return l}var g=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<g.length;t++){var n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function b(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(v(n.charCodeAt(a)))return"rtl";return"ltr"}function y(){}function A(e,t,n){y.call(this),this.cue=t,this.cueDiv=m(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:b(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function _(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function w(e,t,n,r){var i=new _(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(a),s=[];if(a.snapToLines){var l;switch(a.vertical){case"":s=["+y","-y"],l="height";break;case"rl":s=["+x","-x"],l="width";break;case"lr":s=["-x","+x"],l="width"}var c=i.lineHeight,u=c*Math.round(o),d=n[l]+c,h=s[0];Math.abs(u)>d&&(u=u<0?-1:1,u*=Math.ceil(d/c)*c),o<0&&(u+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(h,u)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=f/2;break;case"end":o-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new _(t)}var p=function(e,t){for(var i,a=new _(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var l=e.intersectPercentage(n);o>l&&(i=new _(e),o=l),e=new _(a)}return i||a}(i,s);t.move(p.toCSSCompatValues(n))}function E(){}y.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},y.prototype.formatStyle=function(e,t){return 0===e?0:e+t},A.prototype=i(y.prototype),A.prototype.constructor=A,_.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},_.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},_.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},_.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},_.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},_.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},_.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},_.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},E.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},E.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};E.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],a=_.getSimpleBoxPosition(r),o={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,s,l=0;l<t.length;l++)s=t[l],n=new A(e,s,o),r.appendChild(n.div),w(0,n,a,i),s.displayState=n.div,i.push(_.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},E.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},E.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){e.match(/X-TIMESTAMP-MAP/)?l(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new s;l(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",o(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):l(e,(function(e,n){switch(e){case"Region":!function(e){var n=new s;if(l(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var u=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!u||!u[0])throw new a(a.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{c(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(d=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new a(a.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=E},function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function a(e,t,r){this.hasBeenReset=!1;var a="",o=!1,s=e,l=t,c=r,u=null,d="",h=!0,f="auto",p="start",m="auto",g="auto",v=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=i(e);t?(p=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=i(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");b=t,this.hasBeenReset=!0}}}),this.displayState=void 0}a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=a},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,a=100,o=0,s=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):l=t}}})}},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(352),i=n(765),a=n(1213),o=n(1214),s=i.DOMImplementation,l=r.NAMESPACE,c=o.ParseError,u=o.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function p(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var n=this.options,r=new u,i=n.domBuilder||new f,o=n.errorHandler,s=n.locator,c=n.xmlns||{},h=/\/x?html?$/.test(t),p=h?a.HTML_ENTITIES:a.XML_ENTITIES;s&&i.setDocumentLocator(s),r.errorHandler=function(e,t,n){if(!e){if(t instanceof f)return t;e=t}var r={},i=e instanceof Function;function a(t){var a=e[t];!a&&i&&(a=2==e.length?function(n){e(t,n)}:e),r[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+m(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),r}(o,i,s),r.domBuilder=n.domBuilder||i,h&&(c[""]=l.HTML),c.xml=c.xml||l.XML;var g=n.normalizeLineEndings||d;return e&&"string"==typeof e?r.parse(g(e),c,p):r.errorHandler.error("invalid doc source"),i.doc},f.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),o=r.length;v(this,a),this.currentElement=a,this.locator&&p(this.locator,a);for(var s=0;s<o;s++){e=r.getURI(s);var l=r.getValue(s),c=(n=r.getQName(s),i.createAttributeNS(e,n));this.locator&&p(r.getLocator(s),c),c.value=c.nodeValue=l,a.setAttributeNode(c)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&p(this.locator,n),v(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=g.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&p(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=g.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&p(this.locator,r),v(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&p(this.locator,i),v(this,i),this.doc.doctype=i}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new c(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){f.prototype[e]=function(){return null}})),t.__DOMHandler=f,t.normalizeLineEndings=d,t.DOMParser=h},function(e,t,n){"use strict";var r=n(352).freeze;t.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=r({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ﬃ",fflig:"ﬀ",ffllig:"ﬄ",Ffr:"𝔉",ffr:"𝔣",filig:"ﬁ",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"ﬂ",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"Ĳ",ijlig:"ĳ",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ŉ",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){var r=n(352).NAMESPACE,i=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,a=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+i.source+a.source+"*(?::"+i.source+a.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function l(){}function c(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,n,i,a,o){function s(e,t,r){n.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),r)}for(var l,c=++t,u=0;;){var d=e.charAt(c);switch(d){case"=":if(1===u)l=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(o.warning('attribute value must after "="'),l=e.slice(t,c)),t=c+1,!((c=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");s(l,h=e.slice(t,c),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(l,h=e.slice(t,c),t),o.warning('attribute "'+l+'" missed start quot('+d+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:n.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&n.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:n.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,c)).slice(-1)&&(n.closed=!0,h=h.slice(0,-1));case 2:2===u&&(h=l),4==u?(o.warning('attribute "'+h+'" missed quot(")!'),s(l,h,t)):(r.isHTML(i[""])&&h.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),s(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"":d=" ";default:if(d<=" ")switch(u){case 0:n.setTagName(e.slice(t,c)),u=6;break;case 1:l=e.slice(t,c),u=2;break;case 4:var h=e.slice(t,c);o.warning('attribute "'+h+'" missed quot(")!!'),s(l,h,t);case 5:u=6}else switch(u){case 2:n.tagName;r.isHTML(i[""])&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),s(l,l,t),t=c,u=1;break;case 5:o.warning('attribute space is required"'+l+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function d(e,t,n){for(var i=e.tagName,a=null,o=e.length;o--;){var s=e[o],l=s.qName,c=s.value;if((f=l.indexOf(":"))>0)var u=s.prefix=l.slice(0,f),d=l.slice(f+1),h="xmlns"===u&&d;else d=l,u=null,h="xmlns"===l&&"";s.localName=d,!1!==h&&(null==a&&(a={},p(n,n={})),n[h]=a[h]=c,s.uri=r.XMLNS,t.startPrefixMapping(h,c))}for(o=e.length;o--;){(u=(s=e[o]).prefix)&&("xml"===u&&(s.uri=r.XML),"xmlns"!==u&&(s.uri=n[u||""]))}var f;(f=i.indexOf(":"))>0?(u=e.prefix=i.slice(0,f),d=e.localName=i.slice(f+1)):(u=null,d=e.localName=i);var m=e.uri=n[u||""];if(t.startElement(m,d,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(m,d,i),a)for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&t.endPrefixMapping(u)}function h(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function f(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function p(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function m(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],l=!1,c=!1;o>3&&(/^public$/i.test(a[2][0])?(l=a[3][0],c=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(c=a[3][0]));var u=a[o-1];return n.startDTD(s,l,c),n.endDTD(),u.index+u[0].length}}return-1}function g(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function v(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,l.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),p(t,t={}),function(e,t,n,i,a){function o(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function l(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,o);_&&p(S),i.characters(n,0,t-S),S=t}}function p(t,n){for(;t>=y&&(n=A.exec(e));)b=n.index,y=b+n[0].length,_.lineNumber++;_.columnNumber=t-b+1}var b=0,y=0,A=/.*(?:\r\n?|\n)|.*$/g,_=i.locator,w=[{currentNSMap:t}],E={},S=0;for(;;){try{var C=e.indexOf("<",S);if(C<0){if(!e.substr(S).match(/^\s*$/)){var T=i.doc,k=T.createTextNode(e.substr(S));T.appendChild(k),i.currentElement=k}return}switch(C>S&&l(C),e.charAt(C+1)){case"/":var x=e.indexOf(">",C+3),O=e.substring(C+2,x).replace(/[ \t\n\r]+$/g,""),I=w.pop();x<0?(O=e.substring(C+2).replace(/[\s<].*/,""),a.error("end tag name: "+O+" is not complete:"+I.tagName),x=C+1+O.length):O.match(/\s</)&&(O=O.replace(/[\s<].*/,""),a.error("end tag name: "+O+" maybe not complete"),x=C+1+O.length);var M=I.localNSMap,P=I.tagName==O;if(P||I.tagName&&I.tagName.toLowerCase()==O.toLowerCase()){if(i.endElement(I.uri,I.localName,O),M)for(var D in M)Object.prototype.hasOwnProperty.call(M,D)&&i.endPrefixMapping(D);P||a.fatalError("end tag name: "+O+" is not match the current start tagName:"+I.tagName)}else w.push(I);x++;break;case"?":_&&p(C),x=g(e,C,i);break;case"!":_&&p(C),x=m(e,C,i,a);break;default:_&&p(C);var N=new v,L=w[w.length-1].currentNSMap,R=(x=u(e,C,N,L,o,a),N.length);if(!N.closed&&f(e,x,N.tagName,E)&&(N.closed=!0,n.nbsp||a.warning("unclosed xml attribute")),_&&R){for(var B=c(_,{}),j=0;j<R;j++){var F=N[j];p(F.offset),F.locator=c(_,{})}i.locator=B,d(N,i,L)&&w.push(N),i.locator=_}else d(N,i,L)&&w.push(N);r.isHTML(N.uri)&&!N.closed?x=h(e,x,N.tagName,o,i):x++}}catch(e){if(e instanceof s)throw e;a.error("element parse error: "+e),x=-1}x>S?S=x:l(Math.max(C,S)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},v.prototype={setTagName:function(e){if(!o.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!o.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=s},function(e,t){var n=Math.pow(2,32);e.exports={getUint64:function(e){var t,r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getBigUint64?(t=r.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:r.getUint32(0)*n+r.getUint32(4)},MAX_UINT32:n}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){!function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,n)};function r(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}
/*!
     * Copyright (c) 2017 Vladimir Agafonkin (rewrite by Jun Kato in TypeScript for PSBrush implementation)
     *
     * Simplify.js, a high-performance JS polyline simplification library
     * https://mourner.github.io/simplify-js/
     * @license BSD-2-Clause
     */var i=function(){function e(){this._tolerance=1,this.sqTolerance=1}return Object.defineProperty(e.prototype,"tolerance",{get:function(){return this._tolerance},set:function(e){"number"!=typeof e&&(e=1),this._tolerance=e,this.sqTolerance=e*e},enumerable:!1,configurable:!0}),e.prototype.getSquareDistance=function(e,t){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r},e.prototype.getSquareSegmentDistance=function(e,t,n){var r=t.x,i=t.y,a=n.x-r,o=n.y-i;if(0!==a||0!==o){var s=((e.x-r)*a+(e.y-i)*o)/(a*a+o*o);s>1?(r=n.x,i=n.y):s>0&&(r+=a*s,i+=o*s)}return(a=e.x-r)*a+(o=e.y-i)*o},e.prototype.simplifyRadialDistance=function(e){for(var t,n=e[0],r=[n],i=1,a=e.length;i<a;i++)t=e[i],this.getSquareDistance(t,n)>this.sqTolerance&&(r.push(t),n=t);return n!==t&&r.push(t),r},e.prototype.simplifyDouglasPeucker=function(e){var t,n,r,i,a=e.length,o=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(a),s=0,l=a-1,c=[],u=[];for(o[s]=o[l]=1;l;){for(n=0,t=s+1;t<l;t++)(r=this.getSquareSegmentDistance(e[t],e[s],e[l]))>n&&(i=t,n=r);n>this.sqTolerance&&(o[i]=1,c.push(s,i,i,l)),l=c.pop(),s=c.pop()}for(t=0;t<a;t++)o[t]&&u.push(e[t]);return u},e.prototype.do=function(e,t){return e=t?e:this.simplifyRadialDistance(e),this.simplifyDouglasPeucker(e)},e}(),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pressureCoeff=100,t}return r(t,e),t.prototype.getSquareDistance=function(e,t){var n=e.x-t.x,r=e.y-t.y,i=e.pressure-t.pressure;return n*n+r*r+i*i*this.pressureCoeff},t.prototype.getSquareSegmentDistance=function(e,t,n){var r=t.x,i=t.y,a=t.pressure,o=n.x-r,s=n.y-i,l=n.pressure-a;if(0!==o||0!==s||0!==l){var c=((e.x-r)*o+(e.y-i)*s+(e.pressure-a)*l*this.pressureCoeff)/(o*o+s*s+l*l*this.pressureCoeff);c>1?(r=n.x,i=n.y,a=n.pressure):c>0&&(r+=o*c,i+=s*c,a+=l*c)}return(o=e.x-r)*o+(s=e.y-i)*s+(l=e.pressure-a)*l*this.pressureCoeff},t}(i);function o(e){return e.touches&&e.touches.length>0?e.touches[0].force:"mouse"===e.pointerType||"number"!=typeof e.pressure?.5:e.pressure}var s="undefined"==typeof fabric?n(457).fabric:fabric,l=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.type="PSPoint",i.pressure=r,i}return r(t,e),t.prototype.midPointFrom=function(n){var r=e.prototype.midPointFrom.call(this,n);return new t(r.x,r.y,(this.pressure+n.pressure)/2)},t.prototype.clone=function(){return new t(this.x,this.y,this.pressure)},t}(s.Point);l.fromObject=function(e,t){t&&t(new l(e.x,e.y,e.pressure))},s.PSPoint=l;var c="undefined"==typeof fabric?n(457).fabric:fabric,u=c.util.array.min,d=c.util.array.max,h=c.util.object.extend,f=c.util.createClass(c.Object,{type:"PSStroke",strokePoints:null,startTime:null,endTime:null,cacheProperties:c.Object.prototype.cacheProperties.concat("strokePoints","startTime","endTime","fillRule"),stateProperties:c.Object.prototype.stateProperties.concat("strokePoints","startTime","endTime"),initialize:function(e,t){t=t||{},this.callSuper("initialize",t),this.startTime=t.startTime,this.endTime=t.endTime,this.strokePoints=(e||[]).concat(),this._setPositionDimensions(t)},_setPositionDimensions:function(e){var t=this._parseDimensions();this.width=t.width,this.height=t.height,void 0===e.left&&void 0===e.top&&(this.left=t.left,this.top=t.top),this.strokeOffset=this.strokeOffset||{x:t.left+this.width/2,y:t.top+this.height/2}},_renderStroke:function(e){var t,n=this.strokeWidth/1e3,r=this.strokePoints[0],i=this.strokePoints[1],a=r,o=this.strokePoints.length,s=1,c=1,u=o>2,d=-this.strokeOffset.x,h=-this.strokeOffset.y;for(u&&(s=this.strokePoints[2].x<i.x?-1:this.strokePoints[2].x===i.x?0:1,c=this.strokePoints[2].y<i.y?-1:this.strokePoints[2].y===i.y?0:1),2===this.strokePoints.length&&r.x===i.x&&r.y===i.y&&(r=new l(r.x,r.y,r.pressure),i=new l(i.x,i.y,i.pressure),r.x-=n,i.x+=n,a.x=r.x),e.strokeStyle=this.stroke,e.lineCap=this.strokeLineCap,e.lineJoin=this.strokeLineJoin,t=1,o=this.strokePoints.length;t<o;t++)e.beginPath(),e.moveTo(a.x-s*n+d,a.y-c*n+h),e.lineWidth=r.pressure*this.strokeWidth,a=r.midPointFrom(i),e.quadraticCurveTo(r.x-s*n+d,r.y-c*n+h,a.x-s*n+d,a.y-c*n+h),r=this.strokePoints[t],i=this.strokePoints[t+1],e.stroke()},_render:function(e){this._renderStroke(e),this._renderPaintInOrder(e)},toString:function(){return"#<Stroke ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},toObject:function(e){return h(this.callSuper("toObject",e),{strokePoints:this.strokePoints.map((function(e){return e.clone()})),startTime:this.startTime,endTime:this.endTime,top:this.top,left:this.left})},_toSVG:function(){for(var e=['<g transform="translate(',String(-this.strokeOffset.x),",",String(-this.strokeOffset.y),')" ',"COMMON_PARTS",">\n"],t=null,n=0;n<this.strokePoints.length;n++){var r=this.strokePoints[n];if(t){var i=t.x,a=t.y,o=r.x,s=r.y;e.push("<line ",'x1="',String(i),'" y1="',String(a),'" x2="',String(o),'" y2="',String(s),'" ','stroke-width="',String(t.pressure*this.strokeWidth),'" ','stroke-linecap="round" />\n')}t=r}return e.push("</g>\n"),e},toClipPathSVG:function(e){return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:e})},toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(),{reviver:e})},complexity:function(){return this.strokePoints.length},_parseDimensions:function(){function e(){this.bounds=[],this.aX=[],this.aY=[],this.x=0,this.y=0}e.prototype._done=function(){var e=this;this.bounds.forEach((function(t){e.aX.push(t.x),e.aY.push(t.y)})),this.aX.push(this.x),this.aY.push(this.y)},e.prototype.moveTo=function(e,t){this.x=e,this.y=t,this.bounds=[],this._done()},e.prototype.quadraticCurveTo=function(e,t,n,r){this.bounds=c.util.getBoundsOfCurve(this.x,this.y,e,t,e,t,n,r),this.x=n,this.y=r,this._done()},e.prototype.calcBounds=function(){var e=u(this.aX)||0,t=u(this.aY)||0;return{left:e,top:t,width:(d(this.aX)||0)-e,height:(d(this.aY)||0)-t}};var t,n,r=new e,i=this.strokePoints[0],a=this.strokePoints[1],o=i;if(2===this.strokePoints.length&&i.x===a.x&&i.y===a.y){var s=this.strokeWidth/1e3;i=new l(i.x,i.y,i.pressure),a=new l(a.x,a.y,a.pressure),i.x-=s,a.x+=s,o.x=i.x}for(t=1,n=this.strokePoints.length;t<n;t++)r.moveTo(o.x,o.y),r.lineWidth=i.pressure*this.strokeWidth,o=i.midPointFrom(a),r.quadraticCurveTo(i.x,i.y,o.x,o.y),i=this.strokePoints[t],a=this.strokePoints[t+1];return r.calcBounds()}});f.fromObject=function(e,t){c.util.enlivenPatterns([e.fill,e.stroke],(function(n){void 0!==n[0]&&(e.fill=n[0]),void 0!==n[1]&&(e.stroke=n[1]),c.util.enlivenObjects([e.clipPath],(function(n){e.clipPath=n[0],c.util.enlivenObjects(e.strokePoints,(function(n){var r=new f(n,e);t&&t(r)}),null,null)}),null,null)}))},c.PSStroke=f;
/*!
     * Copyright (c) 2020 Arch Inc. (Jun Kato, Kenta Hara)
     *
     * fabricjs-psbrush, a lightweight pressure-sensitive brush implementation for Fabric.js
     * @license MIT
     */
var p="undefined"==typeof fabric?n(457).fabric:fabric,m=1e-4,g=.07999999821186066,v=p.util.createClass(p.BaseBrush,{simplify:null,pressureCoeff:100,simplifyTolerance:0,simplifyHighestQuality:!1,pressureIgnoranceOnStart:-1,opacity:1,currentStartTime:null,initialize:function(e){this.simplify=new a,this.canvas=e,this._points=[]},_drawSegment:function(e,t,n){var r=t.midPointFrom(n);return e.lineWidth=t.pressure*this.width,e.quadraticCurveTo(t.x,t.y,r.x,r.y),r},onMouseDown:function(e,t){var n=t?t.pointer:e,r=t?t.e:e.e||null;this._prepareForDrawing(n,r),this._captureDrawingPath(n,r),this._render()},onMouseMove:function(e,t){var n=t?t.pointer:e,r=t?t.e:e.e||null;if(this._captureDrawingPath(n,r)&&this._points.length>1)if(this.needsFullRender)this.canvas.clearContext(this.canvas.contextTop),this._render();else{var i=this._points,a=i.length,o=this.canvas.contextTop;this._saveAndTransform(o),this.oldEnd&&(o.beginPath(),o.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(o,i[a-2],i[a-1],!0),o.stroke(),o.restore()}},onMouseUp:function(e){this.oldEnd=void 0,this._finalizeAndAddPath()},_prepareForDrawing:function(e,t){var n=o(t),r=new l(e.x,e.y,n===g?m:n);this._reset(),this._addPoint(r),this.canvas.contextTop.moveTo(r.x,r.y),this.currentStartTime=Date.now()},_addPoint:function(e){return!(this._points.length>1&&e.eq(this._points[this._points.length-1])||(this._points.push(e),0))},_reset:function(){this._points.length=0,this._setBrushStyles();var e=new p.Color(this.color);this.needsFullRender=e.getAlpha()<1,this._setShadow()},_captureDrawingPath:function(e,t){var n=o(t),r=this.pressureIgnoranceOnStart>Date.now()-this.currentStartTime,i=Array.isArray(this._points)&&this._points.length>0,a=i?this._points[this._points.length-1].pressure:m,s=new l(e.x,e.y,r?m:n===g?a:Math.max(m,n));return!this.pressureShouldBeIgnored&&i&&a===m&&s.pressure!==m&&(this._points.forEach((function(e){return e.pressure=Math.max(e.pressure,s.pressure)})),this._redrawSegments(this._points)),this._addPoint(s)},_redrawSegments:function(e){var t=this,n=this.canvas.contextTop;this._saveAndTransform(n),this.oldEnd&&n.closePath();var r=this._points[0];n.moveTo(r.x,r.y),n.beginPath(),this._points.forEach((function(e){t.oldEnd=t._drawSegment(n,r,e,!0),r=e})),n.stroke(),n.restore()},_render:function(){var e,t,n=this.canvas.contextTop,r=this._points[0],i=this._points[1],a=r;if(this._saveAndTransform(n),2===this._points.length&&r.x===i.x&&r.y===i.y){var o=r.pressure*this.width/1e3;r=new l(r.x,r.y,r.pressure),i=new l(i.x,i.y,i.pressure),r.x-=o,i.x+=o,a.x=r.x}var s=n.globalCompositeOperation,c=n.globalAlpha;for(n.globalCompositeOperation="destination-atop",n.globalAlpha=this.opacity,e=1,t=this._points.length;e<t;e++)n.beginPath(),n.moveTo(a.x,a.y),a=this._drawSegment(n,r,i),n.closePath(),n.stroke(),r=this._points[e],i=this._points[e+1];n.restore(),n.globalCompositeOperation=s,n.globalAlpha=c},convertPointsToSVGPath:function(e){var t,n=[],r=this.width/1e3,i=new l(e[0].x,e[0].y,e[0].pressure),a=new l(e[1].x,e[1].y,e[1].pressure),o=i,s=e.length,c=1,u=1,d=s>2;for(d&&(c=e[2].x<a.x?-1:e[2].x===a.x?0:1,u=e[2].y<a.y?-1:e[2].y===a.y?0:1),t=1;t<s;t++)n.push("M ",o.x-c*r," ",o.y-u*r," "),i.eq(a)||(o=i.midPointFrom(a),n.push("Q ",i.x," ",i.y," ",o.x," ",o.y," ")),i=e[t],t+1<e.length&&(a=e[t+1]);return d&&(c=i.x>e[t-2].x?1:i.x===e[t-2].x?0:-1,u=i.y>e[t-2].y?1:i.y===e[t-2].y?0:-1),n.push("L ",i.x+c*r," ",i.y+u*r),n},createPSStroke:function(e){var t=new f(e,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray}),n=new p.Point(t.left+t.width/2,t.top+t.height/2);return n=t.translateToGivenOrigin(n,"center","center",t.originX,t.originY),t.top=n.y,t.left=n.x,this.shadow&&(this.shadow.affectStroke=!0,t.setShadow(this.shadow)),t},_finalizeAndAddPath:function(){if(this.canvas.contextTop.closePath(),this.simplifyTolerance>0&&(this.simplify.pressureCoeff=this.pressureCoeff,this.simplify.tolerance=this.simplifyTolerance,this._points=this.simplify.do(this._points,this.simplifyHighestQuality)),"M 0 0 Q 0 0 0 0 L 0 0"!==this.convertPointsToSVGPath(this._points).join("")){var e=this.createPSStroke(this._points);e.opacity=this.opacity,e.startTime=this.currentStartTime,e.endTime=Date.now(),this.canvas.clearContext(this.canvas.contextTop),this.canvas.add(e),e.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:e})}else this.canvas.requestRenderAll()}});p.PSBrush=v,e.PSBrush=v,e.PSPoint=l,e.PSStroke=f,e.Simplify=i,e.getPressure=o,e.isPSPoint=function(e){return e&&"PSPoint"===e.type},e.isPSStroke=function(e){return e&&"PSStroke"===e.type},Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t){},function(e,t){},function(e,t){},function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(null,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,i,a,o){var s=i||"<<anonymous>>",l=o||r;if(null==n[r])return t?new Error("Required "+a+" `"+l+"` was not specified in `"+s+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),d=6;d<c;d++)u[d-6]=arguments[d];return e.apply(void 0,[n,r,s,a,l].concat(u))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n},e.exports=t.default},function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},function(e,t,n){"use strict";(function(t){var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var a=n(0),o=n(6),s=n(79).findDOMNode,l=n(1229),c=["blur","checkValidity","click","focus","select","setCustomValidity","setSelectionRange","setRangeText"];var u=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state={isOpen:!1,highlightedIndex:null},t._debugStates=[],t.ensureHighlightedIndex=t.ensureHighlightedIndex.bind(t),t.exposeAPI=t.exposeAPI.bind(t),t.handleInputFocus=t.handleInputFocus.bind(t),t.handleInputBlur=t.handleInputBlur.bind(t),t.handleChange=t.handleChange.bind(t),t.handleKeyDown=t.handleKeyDown.bind(t),t.handleInputClick=t.handleInputClick.bind(t),t.maybeAutoCompleteText=t.maybeAutoCompleteText.bind(t),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),i(n,[{key:"componentWillMount",value:function(){this.refs={},this._ignoreBlur=!1,this._ignoreFocus=!1,this._scrollOffset=null,this._scrollTimer=null}},{key:"componentWillUnmount",value:function(){clearTimeout(this._scrollTimer),this._scrollTimer=null}},{key:"componentWillReceiveProps",value:function(e){null!==this.state.highlightedIndex&&this.setState(this.ensureHighlightedIndex),!e.autoHighlight||this.props.value===e.value&&null!==this.state.highlightedIndex||this.setState(this.maybeAutoCompleteText)}},{key:"componentDidMount",value:function(){this.isOpen()&&this.setMenuPositions()}},{key:"componentDidUpdate",value:function(e,t){(this.state.isOpen&&!t.isOpen||"open"in this.props&&this.props.open&&!e.open)&&this.setMenuPositions(),this.maybeScrollItemIntoView(),t.isOpen!==this.state.isOpen&&this.props.onMenuVisibilityChange(this.state.isOpen)}},{key:"exposeAPI",value:function(e){var t=this;this.refs.input=e,c.forEach((function(n){return t[n]=e&&e[n]&&e[n].bind(e)}))}},{key:"maybeScrollItemIntoView",value:function(){if(this.isOpen()&&null!==this.state.highlightedIndex){var e=this.refs["item-"+this.state.highlightedIndex],t=this.refs.menu;l(s(e),s(t),{onlyScrollIfNeeded:!0})}}},{key:"handleKeyDown",value:function(e){n.keyDownHandlers[e.key]?n.keyDownHandlers[e.key].call(this,e):this.isOpen()||this.setState({isOpen:!0})}},{key:"handleChange",value:function(e){this.props.onChange(e,e.target.value)}},{key:"getFilteredItems",value:function(e){var t=e.items;return e.shouldItemRender&&(t=t.filter((function(t){return e.shouldItemRender(t,e.value)}))),e.sortItems&&t.sort((function(t,n){return e.sortItems(t,n,e.value)})),t}},{key:"maybeAutoCompleteText",value:function(e,t){for(var n=e.highlightedIndex,r=t.value,i=t.getItemValue,a=null===n?0:n,o=this.getFilteredItems(t),s=0;s<o.length&&!t.isItemSelectable(o[a]);s++)a=(a+1)%o.length;var l=o[a]&&t.isItemSelectable(o[a])?o[a]:null;if(""!==r&&l&&0===i(l).toLowerCase().indexOf(r.toLowerCase()))return{highlightedIndex:a};return{highlightedIndex:null}}},{key:"ensureHighlightedIndex",value:function(e,t){if(e.highlightedIndex>=this.getFilteredItems(t).length)return{highlightedIndex:null}}},{key:"setMenuPositions",value:function(){var e=this.refs.input,n=e.getBoundingClientRect(),r=t.window.getComputedStyle(e),i=parseInt(r.marginBottom,10)||0,a=parseInt(r.marginLeft,10)||0,o=parseInt(r.marginRight,10)||0;this.setState({menuTop:n.bottom+i,menuLeft:n.left+a,menuWidth:n.width+a+o})}},{key:"highlightItemFromMouse",value:function(e){this.setState({highlightedIndex:e})}},{key:"selectItemFromMouse",value:function(e){var t=this,n=this.props.getItemValue(e);this.setIgnoreBlur(!1),this.setState({isOpen:!1,highlightedIndex:null},(function(){t.props.onSelect(n,e)}))}},{key:"setIgnoreBlur",value:function(e){this._ignoreBlur=e}},{key:"renderMenu",value:function(){var e=this,t=this.getFilteredItems(this.props).map((function(t,n){var r=e.props.renderItem(t,e.state.highlightedIndex===n,{cursor:"default"});return a.cloneElement(r,{onMouseEnter:e.props.isItemSelectable(t)?function(){return e.highlightItemFromMouse(n)}:null,onClick:e.props.isItemSelectable(t)?function(){return e.selectItemFromMouse(t)}:null,ref:function(t){return e.refs["item-"+n]=t}})})),n={left:this.state.menuLeft,top:this.state.menuTop,minWidth:this.state.menuWidth},r=this.props.renderMenu(t,this.props.value,n);return a.cloneElement(r,{ref:function(t){return e.refs.menu=t},onTouchStart:function(){return e.setIgnoreBlur(!0)},onMouseEnter:function(){return e.setIgnoreBlur(!0)},onMouseLeave:function(){return e.setIgnoreBlur(!1)}})}},{key:"handleInputBlur",value:function(e){var t=this;if(this._ignoreBlur)return this._ignoreFocus=!0,this._scrollOffset={x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop},void this.refs.input.focus();var n=void 0,r=this.state.highlightedIndex;if(this.props.selectOnBlur&&null!==r){var i=this.getFilteredItems(this.props)[r],a=this.props.getItemValue(i);n=function(){return t.props.onSelect(a,i)}}this.setState({isOpen:!1,highlightedIndex:null},n);var o=this.props.inputProps.onBlur;o&&o(e)}},{key:"handleInputFocus",value:function(e){var t=this;if(this._ignoreFocus){this._ignoreFocus=!1;var n=this._scrollOffset,r=n.x,i=n.y;return this._scrollOffset=null,window.scrollTo(r,i),clearTimeout(this._scrollTimer),void(this._scrollTimer=setTimeout((function(){t._scrollTimer=null,window.scrollTo(r,i)}),0))}this.setState({isOpen:!0});var a=this.props.inputProps.onFocus;a&&a(e)}},{key:"isInputFocused",value:function(){var e=this.refs.input;return e.ownerDocument&&e===e.ownerDocument.activeElement}},{key:"handleInputClick",value:function(){this.isInputFocused()&&!this.isOpen()&&this.setState({isOpen:!0})}},{key:"composeEventHandlers",value:function(e,t){return t?function(n){e(n),t(n)}:e}},{key:"isOpen",value:function(){return"open"in this.props?this.props.open:this.state.isOpen}},{key:"render",value:function(){this.props.debug&&this._debugStates.push({id:this._debugStates.length,state:this.state});var e=this.props.inputProps,t=this.isOpen();return a.createElement("div",r({style:r({},this.props.wrapperStyle)},this.props.wrapperProps),this.props.renderInput(r({},e,{role:"combobox","aria-autocomplete":"list","aria-expanded":t,autoComplete:"off",ref:this.exposeAPI,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onChange:this.handleChange,onKeyDown:this.composeEventHandlers(this.handleKeyDown,e.onKeyDown),onClick:this.composeEventHandlers(this.handleInputClick,e.onClick),value:this.props.value})),t&&this.renderMenu(),this.props.debug&&a.createElement("pre",{style:{marginLeft:300}},JSON.stringify(this._debugStates.slice(Math.max(0,this._debugStates.length-5),this._debugStates.length),null,2)))}}]),n}(a.Component);u.propTypes={items:o.array.isRequired,value:o.any,onChange:o.func,onSelect:o.func,shouldItemRender:o.func,isItemSelectable:o.func,sortItems:o.func,getItemValue:o.func.isRequired,renderItem:o.func.isRequired,renderMenu:o.func,menuStyle:o.object,renderInput:o.func,inputProps:o.object,wrapperProps:o.object,wrapperStyle:o.object,autoHighlight:o.bool,selectOnBlur:o.bool,onMenuVisibilityChange:o.func,open:o.bool,debug:o.bool},u.defaultProps={value:"",wrapperProps:{},wrapperStyle:{display:"inline-block"},inputProps:{},renderInput:function(e){return a.createElement("input",e)},onChange:function(){},onSelect:function(){},isItemSelectable:function(){return!0},renderMenu:function(e,t,n){return a.createElement("div",{style:r({},n,this.menuStyle),children:e})},menuStyle:{borderRadius:"3px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",background:"rgba(255, 255, 255, 0.9)",padding:"2px 0",fontSize:"90%",position:"fixed",overflow:"auto",maxHeight:"50%"},autoHighlight:!0,selectOnBlur:!1,onMenuVisibilityChange:function(){}},u.keyDownHandlers={ArrowDown:function(e){e.preventDefault();var t=this.getFilteredItems(this.props);if(t.length){for(var n=this.state.highlightedIndex,r=null===n?-1:n,i=0;i<t.length;i++){var a=(r+i+1)%t.length;if(this.props.isItemSelectable(t[a])){r=a;break}}r>-1&&r!==n&&this.setState({highlightedIndex:r,isOpen:!0})}},ArrowUp:function(e){e.preventDefault();var t=this.getFilteredItems(this.props);if(t.length){for(var n=this.state.highlightedIndex,r=null===n?t.length:n,i=0;i<t.length;i++){var a=(r-(1+i)+t.length)%t.length;if(this.props.isItemSelectable(t[a])){r=a;break}}r!==t.length&&this.setState({highlightedIndex:r,isOpen:!0})}},Enter:function(e){var t=this;if(13===e.keyCode&&(this.setIgnoreBlur(!1),this.isOpen()))if(null==this.state.highlightedIndex)this.setState({isOpen:!1},(function(){t.refs.input.select()}));else{e.preventDefault();var n=this.getFilteredItems(this.props)[this.state.highlightedIndex],r=this.props.getItemValue(n);this.setState({isOpen:!1,highlightedIndex:null},(function(){t.refs.input.setSelectionRange(r.length,r.length),t.props.onSelect(r,n)}))}},Escape:function(){this.setIgnoreBlur(!1),this.setState({highlightedIndex:null,isOpen:!1})},Tab:function(){this.setIgnoreBlur(!1)}},e.exports=u}).call(this,n(68))},function(e,t,n){e.exports=n(1230)},function(e,t,n){var r=n(1231);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var i=n.allowHorizontalScroll,a=n.onlyScrollIfNeeded,o=n.alignWithTop,s=n.alignWithLeft;i=void 0===i||i;var l,c,u,d,h,f,p,m,g,v,b=r.isWindow(t),y=r.offset(e),A=r.outerHeight(e),_=r.outerWidth(e);b?(p=t,v=r.height(p),g=r.width(p),m={left:r.scrollLeft(p),top:r.scrollTop(p)},h={left:y.left-m.left,top:y.top-m.top},f={left:y.left+_-(m.left+g),top:y.top+A-(m.top+v)},d=m):(l=r.offset(t),c=t.clientHeight,u=t.clientWidth,d={left:t.scrollLeft,top:t.scrollTop},h={left:y.left-(l.left+(parseFloat(r.css(t,"borderLeftWidth"))||0)),top:y.top-(l.top+(parseFloat(r.css(t,"borderTopWidth"))||0))},f={left:y.left+_-(l.left+u+(parseFloat(r.css(t,"borderRightWidth"))||0)),top:y.top+A-(l.top+c+(parseFloat(r.css(t,"borderBottomWidth"))||0))}),h.top<0||f.top>0?!0===o?r.scrollTop(t,d.top+h.top):!1===o?r.scrollTop(t,d.top+f.top):h.top<0?r.scrollTop(t,d.top+h.top):r.scrollTop(t,d.top+f.top):a||((o=void 0===o||!!o)?r.scrollTop(t,d.top+h.top):r.scrollTop(t,d.top+f.top)),i&&(h.left<0||f.left>0?!0===s?r.scrollLeft(t,d.left+h.left):!1===s?r.scrollLeft(t,d.left+f.left):h.left<0?r.scrollLeft(t,d.left+h.left):r.scrollLeft(t,d.left+f.left):a||((s=void 0===s||!!s)?r.scrollLeft(t,d.left+h.left):r.scrollLeft(t,d.left+f.left)))}},function(e,t){function n(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var i=e.document;"number"!=typeof(n=i.documentElement[r])&&(n=i.body[r])}return n}function r(e){return n(e)}function i(e){return n(e,!0)}function a(e){var t=function(e){var t,n,r,i=e.ownerDocument,a=i.body,o=i&&i.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=o.clientLeft||a.clientLeft||0,top:r-=o.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,a=n.defaultView||n.parentWindow;return t.left+=r(a),t.top+=i(a),t}var o,s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),l=/^(top|right|bottom|left)$/;function c(e,t){for(var n=0;n<e.length;n++)t(e[n])}function u(e){return"border-box"===o(e,"boxSizing")}"undefined"!=typeof window&&(o=window.getComputedStyle?function(e,t,n){var r="",i=e.ownerDocument;return(n=n||i.defaultView.getComputedStyle(e,null))&&(r=n.getPropertyValue(t)||n[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!l.test(t)){var r=e.style,i=r.left,a=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,r.left="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r.left=i,e.runtimeStyle.left=a}return""===n?"auto":n});var d=["margin","border","padding"];function h(e,t,n){var r,i={},a=e.style;for(r in t)i[r]=a[r],a[r]=t[r];for(r in n.call(e),t)a[r]=i[r]}function f(e,t,n){var r,i,a,s=0;for(i=0;i<t.length;i++)if(r=t[i])for(a=0;a<n.length;a++){var l;l="border"===r?r+n[a]+"Width":r+n[a],s+=parseFloat(o(e,l))||0}return s}function p(e){return null!=e&&e==e.window}var m={};function g(e,t,n){if(p(e))return"width"===t?m.viewportWidth(e):m.viewportHeight(e);if(9===e.nodeType)return"width"===t?m.docWidth(e):m.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],i="width"===t?e.offsetWidth:e.offsetHeight,a=(o(e),u(e)),s=0;(null==i||i<=0)&&(i=void 0,(null==(s=o(e,t))||Number(s)<0)&&(s=e.style[t]||0),s=parseFloat(s)||0),void 0===n&&(n=a?1:-1);var l=void 0!==i||a,c=i||s;return-1===n?l?c-f(e,["border","padding"],r):s:l?c+(1===n?0:2===n?-f(e,["border"],r):f(e,["margin"],r)):s+f(e,d.slice(n),r)}c(["Width","Height"],(function(e){m["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],m["viewport"+e](n))},m["viewport"+e]=function(t){var n="client"+e,r=t.document,i=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||i&&i[n]||a}}));var v={position:"absolute",visibility:"hidden",display:"block"};function b(e){var t,n=arguments;return 0!==e.offsetWidth?t=g.apply(void 0,n):h(e,v,(function(){t=g.apply(void 0,n)})),t}function y(e,t,n){if("object"!=typeof t){if(void 0===n)return o(e,t);"number"==typeof n&&(n+="px"),e.style[t]=n}else for(var r in t)y(e,r,t[r])}function A(e,t){for(var n in t)e[n]=t[n];return e}c(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);m["outer"+t]=function(t,n){return t&&b(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];m[e]=function(t,r){if(void 0===r)return t&&b(t,e,-1);if(t){o(t);return u(t)&&(r+=f(t,["padding","border"],n)),y(t,e,r)}}}));var _=e.exports={getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return a(e);!function(e,t){"static"===y(e,"position")&&(e.style.position="relative");var n,r,i=a(e),o={};for(r in t)n=parseFloat(y(e,r))||0,o[r]=n+t[r]-i[r];y(e,o)}(e,t)},isWindow:p,each:c,css:y,clone:function(e){var t={};for(var n in e)t[n]=e[n];if(e.overflow)for(n in e)t.overflow[n]=e.overflow[n];return t},mix:A,scrollLeft:function(e,t){if(p(e)){if(void 0===t)return r(e);window.scrollTo(t,i(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(p(e)){if(void 0===t)return i(e);window.scrollTo(r(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},merge:function(){for(var e={},t=0;t<arguments.length;t++)_.mix(e,arguments[t]);return e},viewportWidth:0,viewportHeight:0};A(_,m)},function(e,t,n){var r,i,a=n(766),o=n(767),s=0,l=0;e.exports=function(e,t,n){var c=t&&n||0,u=t||[],d=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==h){var f=a();null==d&&(d=r=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==h&&(h=i=16383&(f[6]<<8|f[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:l+1,g=p-s+(m-l)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||p>s)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,l=m,i=h;var v=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;u[c++]=v>>>24&255,u[c++]=v>>>16&255,u[c++]=v>>>8&255,u[c++]=255&v;var b=p/4294967296*1e4&268435455;u[c++]=b>>>8&255,u[c++]=255&b,u[c++]=b>>>24&15|16,u[c++]=b>>>16&255,u[c++]=h>>>8|128,u[c++]=255&h;for(var y=0;y<6;++y)u[c+y]=d[y];return t||o(u)}},function(e,t,n){var r=n(766),i=n(767);e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[a+s]=o[s];return t||i(o)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(30);function i(e){return Object(r.a)(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(547),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.default)(e,-n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(548),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.default)(e,-n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(322),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.default)(e,-n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(549),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.default)(e,-n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(323),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.default)(e,-n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(550),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(i.default)(e,-n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getSeconds();return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getMinutes();return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getHours();return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getDay();return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getDate();return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getMonth();return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=Math.floor(t.getMonth()/3)+1;return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getFullYear();return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getTime();return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(38),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e),o=Object(r.a)(t);return n.setSeconds(o),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(38),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e),o=Object(r.a)(t);return n.setMinutes(o),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(38),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e),o=Object(r.a)(t);return n.setHours(o),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(50),i=n(38),a=n(555),o=n(30);function s(e,t){Object(o.a)(2,arguments);var n=Object(i.default)(e),s=Object(r.a)(t),l=Math.floor(n.getMonth()/3)+1,c=s-l;return Object(a.default)(n,n.getMonth()+3*c)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(50),i=n(38),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e),o=Object(r.a)(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(o),n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){var t,n;if(Object(i.a)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!=typeof e||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Object(r.default)(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){var t,n;if(Object(i.a)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!=typeof e||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Object(r.default)(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(190),i=n(248),a=n(30);function o(e,t){Object(a.a)(2,arguments);var n=Object(i.default)(e),o=Object(i.default)(t),s=n.getTime()-Object(r.a)(n),l=o.getTime()-Object(r.a)(o);return Math.round((s-l)/864e5)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t),o=n.getFullYear()-a.getFullYear(),s=n.getMonth()-a.getMonth();return 12*o+s}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(287),i=n(190),a=n(30);function o(e,t,n){Object(a.a)(2,arguments);var o=Object(r.default)(e,n),s=Object(r.default)(t,n),l=o.getTime()-Object(i.a)(o),c=s.getTime()-Object(i.a)(s);return Math.round((l-c)/6048e5)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t);return n.getFullYear()-a.getFullYear()}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e);return t.setDate(1),t.setHours(0,0,0,0),t}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e);return t.setHours(23,59,59,999),t}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(38),i=n(50),a=n(30);function o(e,t){Object(a.a)(1,arguments);var n=t||{},o=n.locale,s=o&&o.options&&o.options.weekStartsOn,l=null==s?0:Object(i.a)(s),c=null==n.weekStartsOn?l:Object(i.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(r.default)(e),d=u.getDay(),h=6+(d<c?-7:0)-(d-c);return u.setDate(u.getDate()+h),u.setHours(23,59,59,999),u}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e){Object(i.a)(1,arguments);var t=Object(r.default)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t);return n.getTime()===a.getTime()}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(248),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t);return n.getTime()===a.getTime()}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t);return n.getFullYear()===a.getFullYear()}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(415),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t);return n.getTime()===a.getTime()}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t);return n.getTime()>a.getTime()}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e),a=Object(r.default)(t);return n.getTime()<a.getTime()}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(38),i=n(30);function a(e,t){Object(i.a)(2,arguments);var n=Object(r.default)(e).getTime(),a=Object(r.default)(t.start).getTime(),o=Object(r.default)(t.end).getTime();if(!(a<=o))throw new RangeError("Invalid interval");return n>=a&&n<=o}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return c}));var r=n(50),i=n(30),a={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},o=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,s=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,l=/^([+-])(\d{2})(?::?(\d{2}))?$/;function c(e,t){Object(i.a)(1,arguments);var n=t||{},a=null==n.additionalDigits?2:Object(r.a)(n.additionalDigits);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var o,s=u(e);if(s.date){var l=d(s.date,a);o=h(l.restDateString,l.year)}if(isNaN(o)||!o)return new Date(NaN);var c,f=o.getTime(),m=0;if(s.time&&(m=p(s.time),isNaN(m)||null===m))return new Date(NaN);if(!s.timezone){var v=new Date(f+m),b=new Date(0);return b.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),b.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),b}return c=g(s.timezone),isNaN(c)?new Date(NaN):new Date(f+m+c)}function u(e){var t,n={},r=e.split(a.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1],a.timeZoneDelimiter.test(n.date)&&(n.date=e.split(a.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var i=a.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}function d(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:null};var i=r[1]&&parseInt(r[1]),a=r[2]&&parseInt(r[2]);return{year:null==a?i:100*a,restDateString:e.slice((r[1]||r[2]).length)}}function h(e,t){if(null===t)return null;var n=e.match(o);if(!n)return null;var r=!!n[4],i=f(n[1]),a=f(n[2])-1,s=f(n[3]),l=f(n[4]),c=f(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,l,c)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,a=7*(t-1)+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}(t,l,c):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(v[t]||(b(e)?29:28))}(t,a,s)&&function(e,t){return t>=1&&t<=(b(e)?366:365)}(t,i)?(u.setUTCFullYear(t,a,Math.max(i,s)),u):new Date(NaN)}function f(e){return e?parseInt(e):1}function p(e){var t=e.match(s);if(!t)return null;var n=m(t[1]),r=m(t[2]),i=m(t[3]);return function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i)?36e5*n+6e4*r+1e3*i:NaN}function m(e){return e&&parseFloat(e.replace(",","."))||0}function g(e){if("Z"===e)return 0;var t=e.match(l);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(36e5*r+6e4*i):NaN}var v=[31,null,31,30,31,30,31,31,30,31,30,31];function b(e){return e%400==0||e%4==0&&e%100}},function(e,t,n){"use strict";n.r(t),n.d(t,"IGNORE_CLASS_NAME",(function(){return p}));var r=n(0),i=n(79);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var l,c,u=(void 0===l&&(l=0),function(){return++l}),d={},h={},f=["touchstart","touchmove"],p="ignore-react-onclickoutside";function m(e,t){var n=null;return-1!==f.indexOf(t)&&c&&(n={passive:!e.props.preventDefault}),n}t.default=function(e,t){var n,l,f=e.displayName||e.name||"Component";return l=n=function(n){var l,p;function g(e){var r;return(r=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof r.__clickOutsideHandlerProp){var t=r.getInstance();if("function"!=typeof t.props.handleClickOutside){if("function"!=typeof t.handleClickOutside)throw new Error("WrappedComponent: "+f+" lacks a handleClickOutside(event) function for processing outside click events.");t.handleClickOutside(e)}else t.props.handleClickOutside(e)}else r.__clickOutsideHandlerProp(e)},r.__getComponentNode=function(){var e=r.getInstance();return t&&"function"==typeof t.setClickOutsideRef?t.setClickOutsideRef()(e):"function"==typeof e.setClickOutsideRef?e.setClickOutsideRef():Object(i.findDOMNode)(e)},r.enableOnClickOutside=function(){if("undefined"!=typeof document&&!h[r._uid]){void 0===c&&(c=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}}()),h[r._uid]=!0;var e=r.props.eventTypes;e.forEach||(e=[e]),d[r._uid]=function(e){var t;null!==r.componentNode&&(r.props.preventDefault&&e.preventDefault(),r.props.stopPropagation&&e.stopPropagation(),r.props.excludeScrollbar&&(t=e,document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(s(e,t,n))return!0;e=e.parentNode}return e}(e.target,r.componentNode,r.props.outsideClickIgnoreClass)===document&&r.__outsideClickHandler(e))},e.forEach((function(e){document.addEventListener(e,d[r._uid],m(o(r),e))}))}},r.disableOnClickOutside=function(){delete h[r._uid];var e=d[r._uid];if(e&&"undefined"!=typeof document){var t=r.props.eventTypes;t.forEach||(t=[t]),t.forEach((function(t){return document.removeEventListener(t,e,m(o(r),t))})),delete d[r._uid]}},r.getRef=function(e){return r.instanceRef=e},r._uid=u(),r}p=n,(l=g).prototype=Object.create(p.prototype),l.prototype.constructor=l,a(l,p);var v=g.prototype;return v.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},v.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent: "+f+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside()}},v.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},v.componentWillUnmount=function(){this.disableOnClickOutside()},v.render=function(){var t=this.props;t.excludeScrollbar;var n=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},g}(r.Component),n.displayName="OnClickOutside("+f+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:p,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},l}},function(e,t,n){"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=n(769),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===a.call(e),r=o(e),s=t&&"[object String]"===a.call(e),h=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var p=c&&n;if(s&&e.length>0&&!i.call(e,0))for(var m=0;m<e.length;++m)h.push(String(m));if(r&&e.length>0)for(var g=0;g<e.length;++g)h.push(String(g));else for(var v in e)p&&"prototype"===v||!i.call(e,v)||h.push(String(v));if(l)for(var b=function(e){if("undefined"==typeof window||!f)return d(e);try{return d(e)}catch(e){return!1}}(e),y=0;y<u.length;++y)b&&"constructor"===u[y]||!i.call(e,u[y])||h.push(u[y]);return h}}e.exports=r},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,i=Object.prototype.toString,a=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i.call(e)},o=function(e){return!!a(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i.call(e)&&"[object Function]"===i.call(e.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=o,e.exports=s?a:o},function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,a=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==a.call(t))throw new TypeError(r+t);for(var n,o=i.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,o.concat(i.call(arguments)));return Object(r)===r?r:this}return t.apply(e,o.concat(i.call(arguments)))},l=Math.max(0,t.length-o.length),c=[],u=0;u<l;u++)c.push("$"+u);if(n=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var d=function(){};d.prototype=t.prototype,n.prototype=new d,d.prototype=null}return n}},function(e,t,n){"use strict";var r=n(141),i=n(265),a=n(772),o=n(773),s=n(1280),l=i(a);r(l,{getPolyfill:o,implementation:a,shim:s}),e.exports=l},function(e,t,n){"use strict";var r=n(141).supportsDescriptors,i=n(773),a=Object.getOwnPropertyDescriptor,o=Object.defineProperty,s=TypeError,l=Object.getPrototypeOf,c=/a/;e.exports=function(){if(!r||!l)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=i(),t=l(c),n=a(t,"flags");return n&&n.get===e||o(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(0),i=(o(r),o(n(6))),a=o(n(543));o(n(142));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}t.default=function(e,t){var n,o,d="__create-react-context-"+(0,a.default)()+"__",h=function(e){function n(){var t,r;s(this,n);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return t=r=l(this,e.call.apply(e,[this].concat(a))),r.emitter=u(r.props.value),l(r,t)}return c(n,e),n.prototype.getChildContext=function(){var e;return(e={})[d]=this.emitter,e},n.prototype.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n=this.props.value,r=e.value,i=void 0;((a=n)===(o=r)?0!==a||1/a==1/o:a!=a&&o!=o)?i=0:(i="function"==typeof t?t(n,r):1073741823,0!==(i|=0)&&this.emitter.set(e.value,i))}var a,o},n.prototype.render=function(){return this.props.children},n}(r.Component);h.childContextTypes=((n={})[d]=i.default.object.isRequired,n);var f=function(t){function n(){var e,r;s(this,n);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return e=r=l(this,t.call.apply(t,[this].concat(a))),r.state={value:r.getValue()},r.onUpdate=function(e,t){0!=((0|r.observedBits)&t)&&r.setState({value:r.getValue()})},l(r,e)}return c(n,t),n.prototype.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},n.prototype.componentDidMount=function(){this.context[d]&&this.context[d].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},n.prototype.componentWillUnmount=function(){this.context[d]&&this.context[d].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[d]?this.context[d].get():e},n.prototype.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return f.contextTypes=((o={})[d]=i.default.object,o),{Provider:h,Consumer:f}},e.exports=t.default},function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(null,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1284),i=n(1285),a=n(1286),o=n(1287);e.exports=function(e){return r(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(775);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(775);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1289);e.exports=function(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1292);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(460).default,i=n(1293);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(460).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(776);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(355).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1297),i=n(1298),a=n(778),o=n(1299);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1301);e.exports=function(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(777);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1305);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1307),i=n(1308),a=n(1309);e.exports=function(e){var t=i();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(e.exports=n=function(){return!!t},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(355).default,i=n(1310);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1312),i=n(1313),a=n(778),o=n(1314);e.exports=function(e){return r(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(779);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=c(a),s=n(6),l=c(n(1317));function c(e){return e&&e.__esModule?e:{default:e}}var u={"ps-scroll-y":"onScrollY","ps-scroll-x":"onScrollX","ps-scroll-up":"onScrollUp","ps-scroll-down":"onScrollDown","ps-scroll-left":"onScrollLeft","ps-scroll-right":"onScrollRight","ps-y-reach-start":"onYReachStart","ps-y-reach-end":"onYReachEnd","ps-x-reach-start":"onXReachStart","ps-x-reach-end":"onXReachEnd"};Object.freeze(u);var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleRef=n.handleRef.bind(n),n._handlerByEvent={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.option&&console.warn('react-perfect-scrollbar: the "option" prop has been deprecated in favor of "options"'),this._ps=new l.default(this._container,this.props.options||this.props.option),this._updateEventHook(),this._updateClassName()}},{key:"componentDidUpdate",value:function(e){this._updateEventHook(e),this.updateScroll(),e.className!==this.props.className&&this._updateClassName()}},{key:"componentWillUnmount",value:function(){var e=this;Object.keys(this._handlerByEvent).forEach((function(t){var n=e._handlerByEvent[t];n&&e._container.removeEventListener(t,n,!1)})),this._handlerByEvent={},this._ps.destroy(),this._ps=null}},{key:"_updateEventHook",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(u).forEach((function(n){var r=e.props[u[n]],i=t[u[n]];if(r!==i){if(i){var a=e._handlerByEvent[n];e._container.removeEventListener(n,a,!1),e._handlerByEvent[n]=null}if(r){var o=function(){return r(e._container)};e._container.addEventListener(n,o,!1),e._handlerByEvent[n]=o}}}))}},{key:"_updateClassName",value:function(){var e=this.props.className,t=this._container.className.split(" ").filter((function(e){return e.match(/^ps([-_].+|)$/)})).join(" ");this._container&&(this._container.className="scrollbar-container"+(e?" "+e:"")+(t?" "+t:""))}},{key:"updateScroll",value:function(){this.props.onSync(this._ps)}},{key:"handleRef",value:function(e){this._container=e,this.props.containerRef(e)}},{key:"render",value:function(){var e=this.props,t=(e.className,e.style),n=(e.option,e.options,e.containerRef,e.onScrollY,e.onScrollX,e.onScrollUp,e.onScrollDown,e.onScrollLeft,e.onScrollRight,e.onYReachStart,e.onYReachEnd,e.onXReachStart,e.onXReachEnd,e.component),i=(e.onSync,e.children),a=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["className","style","option","options","containerRef","onScrollY","onScrollX","onScrollUp","onScrollDown","onScrollLeft","onScrollRight","onYReachStart","onYReachEnd","onXReachStart","onXReachEnd","component","onSync","children"]),s=n;return o.default.createElement(s,r({style:t,ref:this.handleRef},a),i)}}]),t}(a.Component);t.default=d,d.defaultProps={className:"",style:void 0,option:void 0,options:void 0,containerRef:function(){},onScrollY:void 0,onScrollX:void 0,onScrollUp:void 0,onScrollDown:void 0,onScrollLeft:void 0,onScrollRight:void 0,onYReachStart:void 0,onYReachEnd:void 0,onXReachStart:void 0,onXReachEnd:void 0,onSync:function(e){return e.update()},component:"div"},d.propTypes={children:s.PropTypes.node.isRequired,className:s.PropTypes.string,style:s.PropTypes.object,option:s.PropTypes.object,options:s.PropTypes.object,containerRef:s.PropTypes.func,onScrollY:s.PropTypes.func,onScrollX:s.PropTypes.func,onScrollUp:s.PropTypes.func,onScrollDown:s.PropTypes.func,onScrollLeft:s.PropTypes.func,onScrollRight:s.PropTypes.func,onYReachStart:s.PropTypes.func,onYReachEnd:s.PropTypes.func,onXReachStart:s.PropTypes.func,onXReachEnd:s.PropTypes.func,onSync:s.PropTypes.func,component:s.PropTypes.string},e.exports=t.default},function(e,t,n){"use strict";
/*!
 * perfect-scrollbar v1.5.0
 * Copyright 2020 Hyunje Jun, MDBootstrap and Contributors
 * Licensed under MIT
 */
function r(e){return getComputedStyle(e)}function i(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r+="px"),e.style[n]=r}return e}function a(e){var t=document.createElement("div");return t.className=e,t}n.r(t);var o="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function s(e,t){if(!o)throw new Error("No element matching method supported");return o.call(e,t)}function l(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function c(e,t){return Array.prototype.filter.call(e.children,(function(e){return s(e,t)}))}var u="ps",d="ps__rtl",h={thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},f={focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}},p={x:null,y:null};function m(e,t){var n=e.element.classList,r=f.scrolling(t);n.contains(r)?clearTimeout(p[t]):n.add(r)}function g(e,t){p[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(f.scrolling(t))}),e.settings.scrollingThreshold)}var v=function(e){this.element=e,this.handlers={}},b={isEmpty:{configurable:!0}};v.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},v.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter((function(r){return!(!t||r===t)||(n.element.removeEventListener(e,r,!1),!1)}))},v.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},b.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(v.prototype,b);var y=function(){this.eventElements=[]};function A(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function _(e,t,n,r,i){var a;if(void 0===r&&(r=!0),void 0===i&&(i=!1),"top"===t)a=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");a=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,r,i){var a=n[0],o=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===r&&(r=!0);void 0===i&&(i=!1);var d=e.element;e.reach[l]=null,d[s]<1&&(e.reach[l]="start");d[s]>e[a]-e[o]-1&&(e.reach[l]="end");t&&(d.dispatchEvent(A("ps-scroll-"+l)),t<0?d.dispatchEvent(A("ps-scroll-"+c)):t>0&&d.dispatchEvent(A("ps-scroll-"+u)),r&&function(e,t){m(e,t),g(e,t)}(e,l));e.reach[l]&&(t||i)&&d.dispatchEvent(A("ps-"+l+"-reach-"+e.reach[l]))}(e,n,a,r,i)}function w(e){return parseInt(e,10)||0}y.prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new v(e),this.eventElements.push(t)),t},y.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},y.prototype.unbind=function(e,t,n){var r=this.eventElement(e);r.unbind(t,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},y.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},y.prototype.once=function(e,t,n){var r=this.eventElement(e),i=function(e){r.unbind(t,i),n(e)};r.bind(t,i)};var E={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function S(e){var t=e.element,n=Math.floor(t.scrollTop),r=t.getBoundingClientRect();e.containerWidth=Math.ceil(r.width),e.containerHeight=Math.ceil(r.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(c(t,h.rail("x")).forEach((function(e){return l(e)})),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(c(t,h.rail("y")).forEach((function(e){return l(e)})),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=C(e,w(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=w((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=C(e,w(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=w(n*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,t){var n={width:t.railXWidth},r=Math.floor(e.scrollTop);t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:n.left=e.scrollLeft;t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-r:n.top=t.scrollbarXTop+r;i(t.scrollbarXRail,n);var a={top:r,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?a.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:a.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?a.left=t.negativeScrollAdjustment+e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:a.left=t.scrollbarYLeft+e.scrollLeft;i(t.scrollbarYRail,a),i(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),i(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}(t,e),e.scrollbarXActive?t.classList.add(f.active("x")):(t.classList.remove(f.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?t.classList.add(f.active("y")):(t.classList.remove(f.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function C(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function T(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=e.element,h=null,p=null,v=null;function b(t){t.touches&&t.touches[0]&&(t[i]=t.touches[0].pageY),d[l]=h+v*(t[i]-p),m(e,c),S(e),t.stopPropagation(),t.preventDefault()}function y(){g(e,c),e[u].classList.remove(f.clicking),e.event.unbind(e.ownerDocument,"mousemove",b)}function A(t,o){h=d[l],o&&t.touches&&(t[i]=t.touches[0].pageY),p=t[i],v=(e[r]-e[n])/(e[a]-e[s]),o?e.event.bind(e.ownerDocument,"touchmove",b):(e.event.bind(e.ownerDocument,"mousemove",b),e.event.once(e.ownerDocument,"mouseup",y),t.preventDefault()),e[u].classList.add(f.clicking),t.stopPropagation()}e.event.bind(e[o],"mousedown",(function(e){A(e)})),e.event.bind(e[o],"touchstart",(function(e){A(e,!0)}))}var k={"click-rail":function(e){e.element,e.event.bind(e.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarYRail,"mousedown",(function(t){var n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=n*e.containerHeight,S(e),t.stopPropagation()})),e.event.bind(e.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarXRail,"mousedown",(function(t){var n=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=n*e.containerWidth,S(e),t.stopPropagation()}))},"drag-thumb":function(e){T(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),T(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(s(t,":hover")||s(e.scrollbarX,":focus")||s(e.scrollbarY,":focus"))){var r,i=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(i){if("IFRAME"===i.tagName)i=i.contentDocument.activeElement;else for(;i.shadowRoot;)i=i.shadowRoot.activeElement;if(s(r=i,"input,[contenteditable]")||s(r,"select,[contenteditable]")||s(r,"textarea,[contenteditable]")||s(r,"button,[contenteditable]"))return}var a=0,o=0;switch(n.which){case 37:a=n.metaKey?-e.contentWidth:n.altKey?-e.containerWidth:-30;break;case 38:o=n.metaKey?e.contentHeight:n.altKey?e.containerHeight:30;break;case 39:a=n.metaKey?e.contentWidth:n.altKey?e.containerWidth:30;break;case 40:o=n.metaKey?-e.contentHeight:n.altKey?-e.containerHeight:-30;break;case 32:o=n.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:o=e.containerHeight;break;case 34:o=-e.containerHeight;break;case 36:o=e.contentHeight;break;case 35:o=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==a||e.settings.suppressScrollY&&0!==o||(t.scrollTop-=o,t.scrollLeft+=a,S(e),function(n,r){var i=Math.floor(t.scrollTop);if(0===n){if(!e.scrollbarYActive)return!1;if(0===i&&r>0||i>=e.contentHeight-e.containerHeight&&r<0)return!e.settings.wheelPropagation}var a=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===a&&n<0||a>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}(a,o)&&n.preventDefault())}}))},wheel:function(e){var t=e.element;function n(n){var i=function(e){var t=e.deltaX,n=-1*e.deltaY;return void 0!==t&&void 0!==n||(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!=t&&n!=n&&(t=0,n=e.wheelDelta),e.shiftKey?[-n,-t]:[t,n]}(n),a=i[0],o=i[1];if(!function(e,n,i){if(!E.isWebKit&&t.querySelector("select:focus"))return!0;if(!t.contains(e))return!1;for(var a=e;a&&a!==t;){if(a.classList.contains(h.consuming))return!0;var o=r(a);if(i&&o.overflowY.match(/(scroll|auto)/)){var s=a.scrollHeight-a.clientHeight;if(s>0&&(a.scrollTop>0&&i<0||a.scrollTop<s&&i>0))return!0}if(n&&o.overflowX.match(/(scroll|auto)/)){var l=a.scrollWidth-a.clientWidth;if(l>0&&(a.scrollLeft>0&&n<0||a.scrollLeft<l&&n>0))return!0}a=a.parentNode}return!1}(n.target,a,o)){var s=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(o?t.scrollTop-=o*e.settings.wheelSpeed:t.scrollTop+=a*e.settings.wheelSpeed,s=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(a?t.scrollLeft+=a*e.settings.wheelSpeed:t.scrollLeft-=o*e.settings.wheelSpeed,s=!0):(t.scrollTop-=o*e.settings.wheelSpeed,t.scrollLeft+=a*e.settings.wheelSpeed),S(e),(s=s||function(n,r){var i=Math.floor(t.scrollTop),a=0===t.scrollTop,o=i+t.offsetHeight===t.scrollHeight,s=0===t.scrollLeft,l=t.scrollLeft+t.offsetWidth===t.scrollWidth;return!(Math.abs(r)>Math.abs(n)?a||o:s||l)||!e.settings.wheelPropagation}(a,o))&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}void 0!==window.onwheel?e.event.bind(t,"wheel",n):void 0!==window.onmousewheel&&e.event.bind(t,"mousewheel",n)},touch:function(e){if(E.supportsTouch||E.supportsIePointer){var t=e.element,n={},i=0,a={},o=null;E.supportsTouch?(e.event.bind(t,"touchstart",u),e.event.bind(t,"touchmove",d),e.event.bind(t,"touchend",f)):E.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",u),e.event.bind(t,"pointermove",d),e.event.bind(t,"pointerup",f)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",u),e.event.bind(t,"MSPointerMove",d),e.event.bind(t,"MSPointerUp",f)))}function s(n,r){t.scrollTop-=r,t.scrollLeft-=n,S(e)}function l(e){return e.targetTouches?e.targetTouches[0]:e}function c(e){return(!e.pointerType||"pen"!==e.pointerType||0!==e.buttons)&&(!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function u(e){if(c(e)){var t=l(e);n.pageX=t.pageX,n.pageY=t.pageY,i=(new Date).getTime(),null!==o&&clearInterval(o)}}function d(o){if(c(o)){var u=l(o),d={pageX:u.pageX,pageY:u.pageY},f=d.pageX-n.pageX,p=d.pageY-n.pageY;if(function(e,n,i){if(!t.contains(e))return!1;for(var a=e;a&&a!==t;){if(a.classList.contains(h.consuming))return!0;var o=r(a);if(i&&o.overflowY.match(/(scroll|auto)/)){var s=a.scrollHeight-a.clientHeight;if(s>0&&(a.scrollTop>0&&i<0||a.scrollTop<s&&i>0))return!0}if(n&&o.overflowX.match(/(scroll|auto)/)){var l=a.scrollWidth-a.clientWidth;if(l>0&&(a.scrollLeft>0&&n<0||a.scrollLeft<l&&n>0))return!0}a=a.parentNode}return!1}(o.target,f,p))return;s(f,p),n=d;var m=(new Date).getTime(),g=m-i;g>0&&(a.x=f/g,a.y=p/g,i=m),function(n,r){var i=Math.floor(t.scrollTop),a=t.scrollLeft,o=Math.abs(n),s=Math.abs(r);if(s>o){if(r<0&&i===e.contentHeight-e.containerHeight||r>0&&0===i)return 0===window.scrollY&&r>0&&E.isChrome}else if(o>s&&(n<0&&a===e.contentWidth-e.containerWidth||n>0&&0===a))return!0;return!0}(f,p)&&o.preventDefault()}}function f(){e.settings.swipeEasing&&(clearInterval(o),o=setInterval((function(){e.isInitialized?clearInterval(o):a.x||a.y?Math.abs(a.x)<.01&&Math.abs(a.y)<.01?clearInterval(o):(s(30*a.x,30*a.y),a.x*=.8,a.y*=.8):clearInterval(o)}),10))}}},x=function(e,t){var n=this;if(void 0===t&&(t={}),"string"==typeof e&&(e=document.querySelector(e)),!e||!e.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var o in this.element=e,e.classList.add(u),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},t)this.settings[o]=t[o];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var s,l,c=function(){return e.classList.add(f.focus)},p=function(){return e.classList.remove(f.focus)};this.isRtl="rtl"===r(e).direction,!0===this.isRtl&&e.classList.add(d),this.isNegativeScroll=(l=e.scrollLeft,e.scrollLeft=-1,s=e.scrollLeft<0,e.scrollLeft=l,s),this.negativeScrollAdjustment=this.isNegativeScroll?e.scrollWidth-e.clientWidth:0,this.event=new y,this.ownerDocument=e.ownerDocument||document,this.scrollbarXRail=a(h.rail("x")),e.appendChild(this.scrollbarXRail),this.scrollbarX=a(h.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",c),this.event.bind(this.scrollbarX,"blur",p),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var m=r(this.scrollbarXRail);this.scrollbarXBottom=parseInt(m.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=w(m.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=w(m.borderLeftWidth)+w(m.borderRightWidth),i(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=w(m.marginLeft)+w(m.marginRight),i(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=a(h.rail("y")),e.appendChild(this.scrollbarYRail),this.scrollbarY=a(h.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",c),this.event.bind(this.scrollbarY,"blur",p),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var g=r(this.scrollbarYRail);this.scrollbarYRight=parseInt(g.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=w(g.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var t=r(e);return w(t.width)+w(t.paddingLeft)+w(t.paddingRight)+w(t.borderLeftWidth)+w(t.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=w(g.borderTopWidth)+w(g.borderBottomWidth),i(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=w(g.marginTop)+w(g.marginBottom),i(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:e.scrollLeft<=0?"start":e.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:e.scrollTop<=0?"start":e.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(e){return k[e](n)})),this.lastScrollTop=Math.floor(e.scrollTop),this.lastScrollLeft=e.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return n.onScroll(e)})),S(this)};x.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,i(this.scrollbarXRail,{display:"block"}),i(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=w(r(this.scrollbarXRail).marginLeft)+w(r(this.scrollbarXRail).marginRight),this.railYMarginHeight=w(r(this.scrollbarYRail).marginTop)+w(r(this.scrollbarYRail).marginBottom),i(this.scrollbarXRail,{display:"none"}),i(this.scrollbarYRail,{display:"none"}),S(this),_(this,"top",0,!1,!0),_(this,"left",0,!1,!0),i(this.scrollbarXRail,{display:""}),i(this.scrollbarYRail,{display:""}))},x.prototype.onScroll=function(e){this.isAlive&&(S(this),_(this,"top",this.element.scrollTop-this.lastScrollTop),_(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},x.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),l(this.scrollbarX),l(this.scrollbarY),l(this.scrollbarXRail),l(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},x.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(e){return!e.match(/^ps([-_].+|)$/)})).join(" ")},t.default=x},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){n(461),n(465),n(473),n(1331),n(1336),n(1338),n(1339),e.exports=n(198).Map},function(e,t,n){e.exports=n(464)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(466),i=n(467);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===c||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(785),i=n(357),a=n(472),o={};n(266)(o,n(164)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(229),i=n(230),a=n(469);e.exports=n(208)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var r=n(231),i=n(358),a=n(1325)(!1),o=n(471)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,c=[];for(n in s)n!=o&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},function(e,t,n){var r=n(358),i=n(359),a=n(1326);e.exports=function(e){return function(t,n,o){var s,l=r(t),c=i(l.length),u=a(o,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(466),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(181).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(231),i=n(360),a=n(471)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){"use strict";var r=n(1330),i=n(787),a=n(304),o=n(358);e.exports=n(468)(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(164)("unscopables"),i=Array.prototype;null==i[r]&&n(266)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";var r=n(788),i=n(267);e.exports=n(476)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(181),i=n(229),a=n(208),o=n(164)("species");e.exports=function(e){var t=r[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(169),i=n(1334).set;e.exports=function(e,t,n){var a,o=t.constructor;return o!==n&&"function"==typeof o&&(a=o.prototype)!==n.prototype&&r(a)&&i&&i(e,a),e}},function(e,t,n){var r=n(169),i=n(230),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(232)(Function.call,n(1335).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){var r=n(793),i=n(357),a=n(358),o=n(783),s=n(231),l=n(781),c=Object.getOwnPropertyDescriptor;t.f=n(208)?c:function(e,t){if(e=a(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(209);r(r.P+r.R,"Map",{toJSON:n(794)("Map")})},function(e,t,n){var r=n(305);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){n(477)("Map")},function(e,t,n){n(478)("Map")},function(e,t,n){n(461),n(465),n(473),n(1341),n(1342),n(1343),n(1344),e.exports=n(198).Set},function(e,t,n){"use strict";var r=n(788),i=n(267);e.exports=n(476)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){var r=n(209);r(r.P+r.R,"Set",{toJSON:n(794)("Set")})},function(e,t,n){n(477)("Set")},function(e,t,n){n(478)("Set")},function(e,t,n){n(461),n(473),n(1346),n(1352),n(1353),e.exports=n(198).WeakMap},function(e,t,n){"use strict";var r,i=n(181),a=n(795)(0),o=n(228),s=n(361),l=n(796),c=n(1351),u=n(169),d=n(267),h=n(267),f=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,m=Object.isExtensible,g=c.ufstore,v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(e){if(u(e)){var t=p(e);return!0===t?g(d(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(d(this,"WeakMap"),e,t)}},y=e.exports=n(476)("WeakMap",v,b,c,!0,!0);h&&f&&(l((r=c.getConstructor(v,"WeakMap")).prototype,b),s.NEED=!0,a(["delete","has","get","set"],(function(e){var t=y.prototype,n=t[e];o(t,e,(function(t,i){if(u(t)&&!m(t)){this._f||(this._f=new r);var a=this._f[e](t,i);return"set"==e?this:a}return n.call(this,t,i)}))})))},function(e,t,n){var r=n(1348);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(169),i=n(1349),a=n(164)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(463);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(474),i=n(361).getWeak,a=n(230),o=n(169),s=n(475),l=n(305),c=n(795),u=n(231),d=n(267),h=c(5),f=c(6),p=0,m=function(e){return e._l||(e._l=new g)},g=function(){this.a=[]},v=function(e,t){return h(e.a,(function(e){return e[0]===t}))};g.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var c=e((function(e,r){s(e,c,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=r&&l(r,n,e[a],e)}));return r(c.prototype,{delete:function(e){if(!o(e))return!1;var n=i(e);return!0===n?m(d(this,t)).delete(e):n&&u(n,this._i)&&delete n[this._i]},has:function(e){if(!o(e))return!1;var n=i(e);return!0===n?m(d(this,t)).has(e):n&&u(n,this._i)}}),c},def:function(e,t,n){var r=i(a(t),!0);return!0===r?m(e).set(t,n):r[e._i]=n,e},ufstore:m}},function(e,t,n){n(477)("WeakMap")},function(e,t,n){n(478)("WeakMap")},function(e,t,n){n(465),n(1355),e.exports=n(198).Array.from},function(e,t,n){"use strict";var r=n(232),i=n(209),a=n(360),o=n(789),s=n(790),l=n(359),c=n(1356),u=n(791);i(i.S+i.F*!n(792)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,h=a(e),f="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,b=u(h);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==b||f==Array&&s(b))for(n=new f(t=l(h.length));t>v;v++)c(n,v,g?m(h[v],v):h[v]);else for(d=b.call(h),n=new f;!(i=d.next()).done;v++)c(n,v,g?o(d,m,[i.value,v],!0):i.value);return n.length=v,n}})},function(e,t,n){"use strict";var r=n(229),i=n(357);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){n(1358),e.exports=n(198).Object.assign},function(e,t,n){var r=n(209);r(r.S+r.F,"Object",{assign:n(796)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1360);t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(188),i=n(0);function a(e){return e&&e.__esModule?e:{default:e}}var o=a(r),s=a(i);function l(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function c(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}function u(e){return null!==e&&1===e.length?e[0]:e.slice()}function d(e){Object.keys(e).forEach(t=>{"undefined"!=typeof document&&document.addEventListener(t,e[t],!1)})}function h(e,t){return f(function(e,t){let n=e;return n<=t.min&&(n=t.min),n>=t.max&&(n=t.max),n}(e,t),t)}function f(e,t){const n=(e-t.min)%t.step;let r=e-n;return 2*Math.abs(n)>=t.step&&(r+=n>0?t.step:-t.step),parseFloat(r.toFixed(5))}let p=function(e){function t(t){var n;(n=e.call(this,t)||this).onKeyUp=()=>{n.onEnd()},n.onMouseUp=()=>{n.onEnd(n.getMouseEventMap())},n.onTouchEnd=()=>{n.onEnd(n.getTouchEventMap())},n.onBlur=()=>{n.setState({index:-1},n.onEnd(n.getKeyDownEventMap()))},n.onMouseMove=e=>{n.setState({pending:!0});const t=n.getMousePosition(e),r=n.getDiffPosition(t[0]),i=n.getValueFromPosition(r);n.move(i)},n.onTouchMove=e=>{if(e.touches.length>1)return;n.setState({pending:!0});const t=n.getTouchPosition(e);if(void 0===n.isScrolling){const e=t[0]-n.startPosition[0],r=t[1]-n.startPosition[1];n.isScrolling=Math.abs(r)>Math.abs(e)}if(n.isScrolling)return void n.setState({index:-1});const r=n.getDiffPosition(t[0]),i=n.getValueFromPosition(r);n.move(i)},n.onKeyDown=e=>{if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(n.setState({pending:!0}),e.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":e.preventDefault(),n.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":e.preventDefault(),n.moveUpByStep();break;case"Home":e.preventDefault(),n.move(n.props.min);break;case"End":e.preventDefault(),n.move(n.props.max);break;case"PageDown":e.preventDefault(),n.moveDownByStep(n.props.pageFn(n.props.step));break;case"PageUp":e.preventDefault(),n.moveUpByStep(n.props.pageFn(n.props.step))}},n.onSliderMouseDown=e=>{if(!n.props.disabled&&2!==e.button){if(n.setState({pending:!0}),!n.props.snapDragDisabled){const t=n.getMousePosition(e);n.forceValueFromPosition(t[0],e=>{n.start(e,t[0]),d(n.getMouseEventMap())})}l(e)}},n.onSliderClick=e=>{if(!n.props.disabled&&n.props.onSliderClick&&!n.hasMoved){const t=n.getMousePosition(e),r=h(n.calcValue(n.calcOffsetFromPosition(t[0])),n.props);n.props.onSliderClick(r)}},n.createOnKeyDown=e=>t=>{n.props.disabled||(n.start(e),d(n.getKeyDownEventMap()),l(t))},n.createOnMouseDown=e=>t=>{if(n.props.disabled||2===t.button)return;n.setState({pending:!0});const r=n.getMousePosition(t);n.start(e,r[0]),d(n.getMouseEventMap()),l(t)},n.createOnTouchStart=e=>t=>{if(n.props.disabled||t.touches.length>1)return;n.setState({pending:!0});const r=n.getTouchPosition(t);n.startPosition=r,n.isScrolling=void 0,n.start(e,r[0]),d(n.getTouchEventMap()),function(e){e.stopPropagation&&e.stopPropagation()}(t)},n.handleResize=()=>{const e=window.setTimeout(()=>{n.pendingResizeTimeouts.shift(),n.resize()},0);n.pendingResizeTimeouts.push(e)},n.renderThumb=(e,t)=>{const r=n.props.thumbClassName+" "+n.props.thumbClassName+"-"+t+" "+(n.state.index===t?n.props.thumbActiveClassName:""),i={ref:e=>{n["thumb"+t]=e},key:n.props.thumbClassName+"-"+t,className:r,style:e,onMouseDown:n.createOnMouseDown(t),onTouchStart:n.createOnTouchStart(t),onFocus:n.createOnKeyDown(t),tabIndex:0,role:"slider","aria-orientation":n.props.orientation,"aria-valuenow":n.state.value[t],"aria-valuemin":n.props.min,"aria-valuemax":n.props.max,"aria-label":Array.isArray(n.props.ariaLabel)?n.props.ariaLabel[t]:n.props.ariaLabel,"aria-labelledby":Array.isArray(n.props.ariaLabelledby)?n.props.ariaLabelledby[t]:n.props.ariaLabelledby},a={index:t,value:u(n.state.value),valueNow:n.state.value[t]};return n.props.ariaValuetext&&(i["aria-valuetext"]="string"==typeof n.props.ariaValuetext?n.props.ariaValuetext:n.props.ariaValuetext(a)),n.props.renderThumb(i,a)},n.renderTrack=(e,t,r)=>{const i={key:n.props.trackClassName+"-"+e,className:n.props.trackClassName+" "+n.props.trackClassName+"-"+e,style:n.buildTrackStyle(t,n.state.upperBound-r)},a={index:e,value:u(n.state.value)};return n.props.renderTrack(i,a)};let r=c(t.value);r.length||(r=c(t.defaultValue)),n.pendingResizeTimeouts=[];const i=[];for(let e=0;e<r.length;e+=1)r[e]=h(r[e],t),i.push(e);return n.resizeObserver=null,n.resizeElementRef=s.default.createRef(),n.state={index:-1,upperBound:0,sliderLength:0,value:r,zIndices:i},n}o.default(t,e);var n=t.prototype;return n.componentDidMount=function(){"undefined"!=typeof window&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},t.getDerivedStateFromProps=function(e,t){const n=c(e.value);return n.length?t.pending?null:{value:n.map(t=>h(t,e))}:null},n.componentDidUpdate=function(){0===this.state.upperBound&&this.resize()},n.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},n.onEnd=function(e){e&&function(e){Object.keys(e).forEach(t=>{"undefined"!=typeof document&&document.removeEventListener(t,e[t],!1)})}(e),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},n.getValue=function(){return u(this.state.value)},n.getClosestIndex=function(e){let t=Number.MAX_VALUE,n=-1;const{value:r}=this.state,i=r.length;for(let a=0;a<i;a+=1){const i=this.calcOffset(r[a]),o=Math.abs(e-i);o<t&&(t=o,n=a)}return n},n.getMousePosition=function(e){return[e["page"+this.axisKey()],e["page"+this.orthogonalAxisKey()]]},n.getTouchPosition=function(e){const t=e.touches[0];return[t["page"+this.axisKey()],t["page"+this.orthogonalAxisKey()]]},n.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},n.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},n.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},n.getValueFromPosition=function(e){const t=e/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return h(this.state.startValue+t,this.props)},n.getDiffPosition=function(e){let t=e-this.state.startPosition;return this.props.invert&&(t*=-1),t},n.resize=function(){const{slider:e,thumb0:t}=this;if(!e||!t)return;const n=this.sizeKey(),r=e.getBoundingClientRect(),i=e[n],a=r[this.posMaxKey()],o=r[this.posMinKey()],s=t.getBoundingClientRect()[n.replace("client","").toLowerCase()],l=i-s,c=Math.abs(a-o);this.state.upperBound===l&&this.state.sliderLength===c&&this.state.thumbSize===s||this.setState({upperBound:l,sliderLength:c,thumbSize:s})},n.calcOffset=function(e){const t=this.props.max-this.props.min;return 0===t?0:(e-this.props.min)/t*this.state.upperBound},n.calcValue=function(e){return e/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},n.calcOffsetFromPosition=function(e){const{slider:t}=this,n=t.getBoundingClientRect(),r=n[this.posMaxKey()],i=n[this.posMinKey()];let a=e-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?r:i));return this.props.invert&&(a=this.state.sliderLength-a),a-=this.state.thumbSize/2,a},n.forceValueFromPosition=function(e,t){const n=this.calcOffsetFromPosition(e),r=this.getClosestIndex(n),i=h(this.calcValue(n),this.props),a=this.state.value.slice();a[r]=i;for(let e=0;e<a.length-1;e+=1)if(a[e+1]-a[e]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:a},()=>{t(r),this.fireChangeEvent("onChange")})},n.clearPendingResizeTimeouts=function(){do{const e=this.pendingResizeTimeouts.shift();clearTimeout(e)}while(this.pendingResizeTimeouts.length)},n.start=function(e,t){const n=this["thumb"+e];n&&n.focus();const{zIndices:r}=this.state;r.splice(r.indexOf(e),1),r.push(e),this.setState(n=>({startValue:n.value[e],startPosition:void 0!==t?t:n.startPosition,index:e,zIndices:r}))},n.moveUpByStep=function(e){void 0===e&&(e=this.props.step);const t=h(this.state.value[this.state.index]+e,this.props);this.move(Math.min(t,this.props.max))},n.moveDownByStep=function(e){void 0===e&&(e=this.props.step);const t=h(this.state.value[this.state.index]-e,this.props);this.move(Math.max(t,this.props.min))},n.move=function(e){const{index:t,value:n}=this.state,{length:r}=n,i=n[t];if(e===i)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:a,max:o,min:s,minDistance:l}=this.props;if(!a){if(t>0){const r=n[t-1];e<r+l&&(e=r+l)}if(t<r-1){const r=n[t+1];e>r-l&&(e=r-l)}}n[t]=e,a&&r>1&&(e>i?(this.pushSucceeding(n,l,t),function(e,t,n,r){for(let i=0;i<e;i+=1){const a=r-i*n;t[e-1-i]>a&&(t[e-1-i]=a)}}(r,n,l,o)):e<i&&(this.pushPreceding(n,l,t),function(e,t,n,r){for(let i=0;i<e;i+=1){const e=r+i*n;t[i]<e&&(t[i]=e)}}(r,n,l,s))),this.setState({value:n},this.fireChangeEvent.bind(this,"onChange"))},n.pushSucceeding=function(e,t,n){let r,i;for(r=n,i=e[r]+t;null!==e[r+1]&&i>e[r+1];r+=1,i=e[r]+t)e[r+1]=f(i,this.props)},n.pushPreceding=function(e,t,n){for(let r=n,i=e[r]-t;null!==e[r-1]&&i<e[r-1];r-=1,i=e[r]-t)e[r-1]=f(i,this.props)},n.axisKey=function(){return"vertical"===this.props.orientation?"Y":"X"},n.orthogonalAxisKey=function(){return"vertical"===this.props.orientation?"X":"Y"},n.posMinKey=function(){return"vertical"===this.props.orientation?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},n.posMaxKey=function(){return"vertical"===this.props.orientation?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},n.sizeKey=function(){return"vertical"===this.props.orientation?"clientHeight":"clientWidth"},n.fireChangeEvent=function(e){this.props[e]&&this.props[e](u(this.state.value),this.state.index)},n.buildThumbStyle=function(e,t){const n={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return n[this.posMinKey()]=e+"px",n},n.buildTrackStyle=function(e,t){const n={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return n[this.posMinKey()]=e,n[this.posMaxKey()]=t,n},n.buildMarkStyle=function(e){var t;return(t={position:"absolute"})[this.posMinKey()]=e,t},n.renderThumbs=function(e){const{length:t}=e,n=[];for(let r=0;r<t;r+=1)n[r]=this.buildThumbStyle(e[r],r);const r=[];for(let e=0;e<t;e+=1)r[e]=this.renderThumb(n[e],e);return r},n.renderTracks=function(e){const t=[],n=e.length-1;t.push(this.renderTrack(0,0,e[0]));for(let r=0;r<n;r+=1)t.push(this.renderTrack(r+1,e[r],e[r+1]));return t.push(this.renderTrack(n+1,e[n],this.state.upperBound)),t},n.renderMarks=function(){let{marks:e}=this.props;const t=this.props.max-this.props.min+1;return"boolean"==typeof e?e=Array.from({length:t}).map((e,t)=>t):"number"==typeof e&&(e=Array.from({length:t}).map((e,t)=>t).filter(t=>t%e==0)),e.map(parseFloat).sort((e,t)=>e-t).map(e=>{const t=this.calcOffset(e),n={key:e,className:this.props.markClassName,style:this.buildMarkStyle(t)};return this.props.renderMark(n)})},n.render=function(){const e=[],{value:t}=this.state,n=t.length;for(let r=0;r<n;r+=1)e[r]=this.calcOffset(t[r],r);const r=this.props.withTracks?this.renderTracks(e):null,i=this.renderThumbs(e),a=this.props.marks?this.renderMarks():null;return s.default.createElement("div",{ref:e=>{this.slider=e,this.resizeElementRef.current=e},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},r,i,a)},t}(s.default.Component);p.displayName="ReactSlider",p.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:e=>s.default.createElement("div",e),renderTrack:e=>s.default.createElement("div",e),renderMark:e=>s.default.createElement("span",e)};var m=p;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(210);t.default=class{constructor(e,t=r.default.WARN){this.name=e,this.level=t}info(e){this.log(r.default.INFO,e)}warn(e){this.log(r.default.WARN,e)}error(e){this.log(r.default.ERROR,e)}debug(e){r.default.DEBUG<this.level||("string"==typeof e?this.log(r.default.DEBUG,e):e?this.log(r.default.DEBUG,e()):this.log(r.default.DEBUG,""+e))}setLogLevel(e){this.level=e}getLogLevel(){return this.level}log(e,t){if(e<this.level)return;const n=`${(new Date).toISOString()} [${r.default[e]}] ${this.name} - ${t}`;switch(e){case r.default.ERROR:console.error(n);break;case r.default.WARN:console.warn(n);break;case r.default.DEBUG:console.debug(n.replace(/\\r\\n/g,"\n"));break;case r.default.INFO:console.info(n)}}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"BrowserInfo",(function(){return i})),n.d(t,"NodeInfo",(function(){return a})),n.d(t,"SearchBotDeviceInfo",(function(){return o})),n.d(t,"BotInfo",(function(){return s})),n.d(t,"ReactNativeInfo",(function(){return l})),n.d(t,"detect",(function(){return h})),n.d(t,"browserName",(function(){return p})),n.d(t,"parseUserAgent",(function(){return m})),n.d(t,"detectOS",(function(){return g})),n.d(t,"getNodeVersion",(function(){return v}));var r=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},i=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},a=function(t){this.version=t,this.type="node",this.name="node",this.os=e.platform},o=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},s=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},l=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},c=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,u=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],d=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function h(e){return e?m(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new l:"undefined"!=typeof navigator?m(navigator.userAgent):v()}function f(e){return""!==e&&u.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var a=i.exec(e);return!!a&&[r,a]}),!1)}function p(e){var t=f(e);return t?t[0]:null}function m(e){var t=f(e);if(!t)return null;var n=t[0],a=t[1];if("searchbot"===n)return new s;var l=a[1]&&a[1].split(".").join("_").split("_").slice(0,3);l?l.length<3&&(l=r(r([],l,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-l.length),!0)):l=[];var u=l.join("."),d=g(e),h=c.exec(e);return h&&h[1]?new o(n,u,d,h[1]):new i(n,u,d)}function g(e){for(var t=0,n=d.length;t<n;t++){var r=d[t],i=r[0];if(r[1].exec(e))return i}return null}function v(){return void 0!==e&&e.version?new a(e.version.slice(1)):null}}.call(this,n(96))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e=.9,t=.01,n=.2,r=.2){this.speakerWeight=e,this.cutoffThreshold=t,this.silenceThreshold=n,this.takeoverRate=r,this.volumes={}}calculateScore(e,t,n){(n||null===t)&&(t=0),this.volumes.hasOwnProperty(e)||(this.volumes[e]=0),t=t>this.silenceThreshold?1:0;const r=this.volumes[e]*this.speakerWeight+t*(1-this.speakerWeight);this.volumes[e]=r;for(const n in this.volumes)n!==e&&(this.volumes[n]=Math.max(this.volumes[n]-this.takeoverRate*t,0));return r<this.cutoffThreshold?0:r}prioritizeVideoSendBandwidthForActiveSpeaker(){return!0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hash:"2f1c179",raw:"v2.18.0",semverString:"2.18.0"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=e=>{const t={};for(const[n,r]of Object.entries(e))if(null!=r&&""!==r){if("number"!=typeof r&&"string"!=typeof r)throw new TypeError("Unhandled type received while flattening attributes.");t[n]=r}return t}},function(e,t,n){"use strict";e.exports=n(1368)},function(e,t,n){"use strict";var r=t;function i(){r.Reader._configure(r.BufferReader),r.util._configure()}r.build="minimal",r.Writer=n(838),r.BufferWriter=n(1377),r.Reader=n(839),r.BufferReader=n(1378),r.util=n(234),r.rpc=n(1379),r.roots=n(1381),r.configure=i,r.Writer._configure(r.BufferWriter),i()},function(e,t,n){"use strict";e.exports=function(e,t){var n=new Array(arguments.length-1),r=0,i=2,a=!0;for(;i<arguments.length;)n[r++]=arguments[i++];return new Promise((function(i,o){n[r]=function(e){if(a)if(a=!1,e)o(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];i.apply(null,t)}};try{e.apply(t||null,n)}catch(e){a&&(a=!1,o(e))}}))}},function(e,t,n){"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var i=new Array(64),a=new Array(123),o=0;o<64;)a[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(e,t,n){for(var r,a=null,o=[],s=0,l=0;t<n;){var c=e[t++];switch(l){case 0:o[s++]=i[c>>2],r=(3&c)<<4,l=1;break;case 1:o[s++]=i[r|c>>4],r=(15&c)<<2,l=2;break;case 2:o[s++]=i[r|c>>6],o[s++]=i[63&c],l=0}s>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,o)),s=0)}return l&&(o[s++]=i[r],o[s++]=61,1===l&&(o[s++]=61)),a?(s&&a.push(String.fromCharCode.apply(String,o.slice(0,s))),a.join("")):String.fromCharCode.apply(String,o.slice(0,s))};r.decode=function(e,t,n){for(var r,i=n,o=0,s=0;s<e.length;){var l=e.charCodeAt(s++);if(61===l&&o>1)break;if(void 0===(l=a[l]))throw Error("invalid encoding");switch(o){case 0:r=l,o=1;break;case 1:t[n++]=r<<2|(48&l)>>4,r=l,o=2;break;case 2:t[n++]=(15&r)<<4|(60&l)>>2,r=l,o=3;break;case 3:t[n++]=(3&r)<<6|l,o=0}}if(1===o)throw Error("invalid encoding");return n-i},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},function(e,t,n){"use strict";function r(){this._listeners={}}e.exports=r,r.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},r.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},r.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},function(e,t,n){"use strict";function r(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3]}function a(e,r,i){t[0]=e,r[i]=n[3],r[i+1]=n[2],r[i+2]=n[1],r[i+3]=n[0]}function o(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?i:a,e.writeFloatBE=r?a:i,e.readFloatLE=r?o:s,e.readFloatBE=r?s:o}():function(){function t(e,t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var a=Math.floor(Math.log(t)/Math.LN2);e((i<<31|a+127<<23|8388607&Math.round(t*Math.pow(2,-a)*8388608))>>>0,n,r)}}function n(e,t,n){var r=e(t,n),i=2*(r>>31)+1,a=r>>>23&255,o=8388607&r;return 255===a?o?NaN:i*(1/0):0===a?1401298464324817e-60*i*o:i*Math.pow(2,a-150)*(o+8388608)}e.writeFloatLE=t.bind(null,i),e.writeFloatBE=t.bind(null,a),e.readFloatLE=n.bind(null,o),e.readFloatBE=n.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3],r[i+4]=n[4],r[i+5]=n[5],r[i+6]=n[6],r[i+7]=n[7]}function a(e,r,i){t[0]=e,r[i]=n[7],r[i+1]=n[6],r[i+2]=n[5],r[i+3]=n[4],r[i+4]=n[3],r[i+5]=n[2],r[i+6]=n[1],r[i+7]=n[0]}function o(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function s(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?i:a,e.writeDoubleBE=r?a:i,e.readDoubleLE=r?o:s,e.readDoubleBE=r?s:o}():function(){function t(e,t,n,r,i,a){var o=r<0?1:0;if(o&&(r=-r),0===r)e(0,i,a+t),e(1/r>0?0:2147483648,i,a+n);else if(isNaN(r))e(0,i,a+t),e(2146959360,i,a+n);else if(r>17976931348623157e292)e(0,i,a+t),e((o<<31|2146435072)>>>0,i,a+n);else{var s;if(r<22250738585072014e-324)e((s=r/5e-324)>>>0,i,a+t),e((o<<31|s/4294967296)>>>0,i,a+n);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(s=r*Math.pow(2,-l))>>>0,i,a+t),e((o<<31|l+1023<<20|1048576*s&1048575)>>>0,i,a+n)}}}function n(e,t,n,r,i){var a=e(r,i+t),o=e(r,i+n),s=2*(o>>31)+1,l=o>>>20&2047,c=4294967296*(1048575&o)+a;return 2047===l?c?NaN:s*(1/0):0===l?5e-324*s*c:s*Math.pow(2,l-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,i,0,4),e.writeDoubleBE=t.bind(null,a,4,0),e.readDoubleLE=n.bind(null,o,0,4),e.readDoubleBE=n.bind(null,s,4,0)}(),e}function i(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function a(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=r(r)},function(module,exports,__webpack_require__){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},function(e,t,n){"use strict";var r=t;r.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},r.read=function(e,t,n){if(n-t<1)return"";for(var r,i=null,a=[],o=0;t<n;)(r=e[t++])<128?a[o++]=r:r>191&&r<224?a[o++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,a[o++]=55296+(r>>10),a[o++]=56320+(1023&r)):a[o++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),o=0);return i?(o&&i.push(String.fromCharCode.apply(String,a.slice(0,o))),i.join("")):String.fromCharCode.apply(String,a.slice(0,o))},r.write=function(e,t,n){for(var r,i,a=n,o=0;o<e.length;++o)(r=e.charCodeAt(o))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(i=e.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&i),++o,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-a}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=n||8192,i=r>>>1,a=null,o=r;return function(n){if(n<1||n>i)return e(n);o+n>r&&(a=e(r),o=0);var s=t.call(a,o,o+=n);return 7&o&&(o=1+(7|o)),s}}},function(e,t,n){"use strict";e.exports=i;var r=n(234);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var a=i.zero=new i(0,0);a.toNumber=function(){return 0},a.zzEncode=a.zzDecode=function(){return this},a.length=function(){return 1};var o=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return a;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new i(n,r)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(r.isString(e)){if(!r.Long)return i.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):a},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;i.fromHash=function(e){return e===o?a:new i((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},function(e,t,n){"use strict";e.exports=o;var r=n(838);(o.prototype=Object.create(r.prototype)).constructor=o;var i=n(234),a=i.Buffer;function o(){r.call(this)}o.alloc=function(e){return(o.alloc=i._Buffer_allocUnsafe)(e)};var s=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]};function l(e,t,n){e.length<40?i.utf8.write(e,t,n):t.utf8Write(e,n)}o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(s,t,e),this},o.prototype.string=function(e){var t=a.byteLength(e);return this.uint32(t),t&&this._push(l,t,e),this}},function(e,t,n){"use strict";e.exports=a;var r=n(839);(a.prototype=Object.create(r.prototype)).constructor=a;var i=n(234);function a(e){r.call(this,e)}i.Buffer&&(a.prototype._slice=i.Buffer.prototype.slice),a.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},function(e,t,n){"use strict";t.Service=n(1380)},function(e,t,n){"use strict";e.exports=i;var r=n(234);function i(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(i.prototype=Object.create(r.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,n,i,a,o){if(!a)throw TypeError("request must be specified");var s=this;if(!o)return r.asPromise(e,s,t,n,i,a);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](a).finish(),(function(e,n){if(e)return s.emit("error",e,t),o(e);if(null!==n){if(!(n instanceof i))try{n=i[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),o(e)}return s.emit("data",n,t),o(null,n)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TranscriptEventConverter=void 0;const r=n(133),i=n(843),a=n(844),o=n(845),s=n(846),l={[r.SdkTranscriptionStatus.Type.STARTED]:o.default.STARTED,[r.SdkTranscriptionStatus.Type.INTERRUPTED]:o.default.INTERRUPTED,[r.SdkTranscriptionStatus.Type.RESUMED]:o.default.RESUMED,[r.SdkTranscriptionStatus.Type.STOPPED]:o.default.STOPPED,[r.SdkTranscriptionStatus.Type.FAILED]:o.default.FAILED};t.TranscriptEventConverter=class{static from(e){let t;try{t=r.SdkTranscriptFrame.decode(e.data)}catch(e){throw new Error("Cannot decode transcript data message: "+e)}const n=[];for(const e of t.events)if(e.status){const t=l[e.status.type];if(!t)continue;const r=new a.default;r.type=t,r.eventTimeMs=e.status.eventTime,r.transcriptionRegion=e.status.transcriptionRegion,r.transcriptionConfiguration=e.status.transcriptionConfiguration,e.status.message&&(r.message=e.status.message),n.push(r)}else if(e.transcript){const t=new i.default;t.results=[];for(const n of e.transcript.results){const e={channelId:n.channelId,isPartial:n.isPartial,resultId:n.resultId,startTimeMs:n.startTime,endTimeMs:n.endTime,alternatives:[]};for(const t of n.alternatives){const n={items:[],transcript:t.transcript};for(const e of t.items){const t={content:e.content,attendee:{attendeeId:e.speakerAttendeeId,externalUserId:e.speakerExternalUserId},startTimeMs:e.startTime,endTimeMs:e.endTime,type:null};switch(e.vocabularyFilterMatch&&(t.vocabularyFilterMatch=e.vocabularyFilterMatch),e.type){case r.SdkTranscriptItem.Type.PRONUNCIATION:t.type=s.default.PRONUNCIATION;break;case r.SdkTranscriptItem.Type.PUNCTUATION:t.type=s.default.PUNCTUATION}n.items.push(t)}e.alternatives.push(n)}t.results.push(e)}n.push(t)}return n}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(487),a=n(157),o=n(483),s=n(485),l=n(101),c=n(494),u=n(803),d=n(804),h=n(805),f=n(806),p=n(807),m=n(808),g=n(809),v=n(810),b=n(811),y=n(898);class A{constructor(e,t,n=new y.default){this.logger=e,this.meetingSession=t,this.configuration=n,this.browserBehavior=new a.default}static delay(e){return r(this,void 0,void 0,(function*(){return new Promise(t=>setTimeout(t,e))}))}checkAudioInput(e){return r(this,void 0,void 0,(function*(){try{return yield this.meetingSession.audioVideo.chooseAudioInputDevice(e),yield this.meetingSession.audioVideo.chooseAudioInputDevice(null),d.default.Succeeded}catch(e){return this.logger.error(`MeetingReadinessChecker: Audio input check failed with error ${e}`),e instanceof s.default?d.default.PermissionDenied:d.default.Failed}}))}checkAudioOutput(e,t,n=null){return r(this,void 0,void 0,(function*(){try{const r=e?o.default.getIntrinsicDeviceId(e):"";return yield this.playTone(r,440,n),(yield t())?h.default.Succeeded:h.default.Failed}catch(e){return this.logger.error(`MeetingReadinessChecker: Audio output check failed with error: ${e}`),h.default.Failed}finally{this.stopTone()}}))}playTone(e,t,n){return r(this,void 0,void 0,(function*(){this.oscillatorNode&&this.stopTone(),this.audioContext=o.default.getAudioContext(),this.gainNode=this.audioContext.createGain(),this.gainNode.gain.value=0,this.oscillatorNode=this.audioContext.createOscillator(),this.oscillatorNode.frequency.value=t,this.oscillatorNode.connect(this.gainNode),this.destinationStream=this.audioContext.createMediaStreamDestination(),this.gainNode.connect(this.destinationStream);const r=this.audioContext.currentTime+.1;this.gainNode.gain.linearRampToValueAtTime(0,r),this.gainNode.gain.linearRampToValueAtTime(.1,r+.1),this.oscillatorNode.start();const a=new i.default(this.logger);try{this.browserBehavior.supportsSetSinkId()&&(yield a.bindAudioDevice({deviceId:e}))}catch(e){this.logger.error(`Failed to bind audio device: ${e}`)}try{yield a.bindAudioElement(n||new Audio)}catch(e){this.logger.error(`Failed to bind audio element: ${e}`)}yield a.bindAudioStream(this.destinationStream.stream)}))}stopTone(){if(!(this.audioContext&&this.gainNode&&this.oscillatorNode&&this.destinationStream))return;const e=this.audioContext.currentTime;this.gainNode.gain.linearRampToValueAtTime(.1,e+.1+1),this.gainNode.gain.linearRampToValueAtTime(0,e+.2+1),this.oscillatorNode.stop(),this.oscillatorNode.disconnect(this.gainNode),this.gainNode.disconnect(this.destinationStream),this.oscillatorNode=null,this.gainNode=null,this.destinationStream=null}checkVideoInput(e){return r(this,void 0,void 0,(function*(){try{return yield this.meetingSession.audioVideo.chooseVideoInputDevice(e),yield this.meetingSession.audioVideo.chooseVideoInputDevice(null),b.default.Succeeded}catch(e){return this.logger.error(`MeetingReadinessChecker: Video check failed with error ${e}`),e instanceof s.default?b.default.PermissionDenied:b.default.Failed}}))}checkCameraResolution(e,t,n){return r(this,void 0,void 0,(function*(){let r;try{const i=o.default.getIntrinsicDeviceId(e),a={video:this.calculateVideoConstraint(i,t,n)};r=yield navigator.mediaDevices.getUserMedia(a)}catch(e){return this.logger.error(`MeetingReadinessChecker: Camera resolution check with width: ${t} height ${n} failed with error ${e}`),e&&"OverconstrainedError"===e.name?f.default.ResolutionNotSupported:e&&"NotAllowedError"===e.name?f.default.PermissionDenied:f.default.Failed}finally{r&&r.getTracks().forEach((function(e){e.stop()}))}return f.default.Succeeded}))}calculateVideoConstraint(e,t,n){const r=this.browserBehavior.requiresResolutionAlignment(t,n),i={};return this.browserBehavior.requiresNoExactMediaStreamConstraints()?(i.deviceId=e,i.width=t,i.height=n):(i.deviceId={exact:e},i.width={exact:r[0]},i.height={exact:r[1]}),i}checkContentShareConnectivity(e){return r(this,void 0,void 0,(function*(){let t=!1,n=!1;const i={contentShareDidStart:()=>{t=!0}},a={audioVideoDidStart:()=>{n=!0}};try{return this.meetingSession.audioVideo.addObserver(a),this.meetingSession.audioVideo.start(),this.meetingSession.audioVideo.addContentShareObserver(i),yield this.meetingSession.audioVideo.startContentShareFromScreenCapture(e),yield this.executeTimeoutTask(()=>r(this,void 0,void 0,(function*(){return n&&t}))),n?(yield this.stopMeeting(),t?p.default.Succeeded:p.default.TimedOut):p.default.ConnectionFailed}catch(e){return this.logger.error(`MeetingReadinessChecker: Content share check failed with error ${e}`),"NotAllowedError"===e.name?p.default.PermissionDenied:p.default.Failed}finally{this.meetingSession.audioVideo.removeObserver(a),this.meetingSession.audioVideo.stopContentShare(),this.meetingSession.audioVideo.removeContentShareObserver(i)}}))}checkAudioConnectivity(e){return r(this,void 0,void 0,(function*(){let t=!1;const n=this.meetingSession.audioVideo,i=(e,n,r,i)=>{e===this.meetingSession.configuration.credentials.attendeeId&&n&&(t=!0)};try{yield n.chooseAudioInputDevice(e)}catch(e){return this.logger.error(`MeetingReadinessChecker: Failed to get audio input device with error ${e}`),e instanceof s.default?u.default.AudioInputPermissionDenied:u.default.AudioInputRequestFailed}if(n.realtimeSubscribeToAttendeeIdPresence(i),!(yield this.startMeeting())){n.realtimeUnsubscribeToAttendeeIdPresence(i);try{yield this.meetingSession.audioVideo.chooseAudioInputDevice(null)}catch(e){this.logger.error(`MeetingReadinessChecker: Failed to choose null device with error ${e}`)}return u.default.ConnectionFailed}yield this.executeTimeoutTask(()=>r(this,void 0,void 0,(function*(){return t}))),n.realtimeUnsubscribeToAttendeeIdPresence(i),yield this.stopMeeting();try{yield this.meetingSession.audioVideo.chooseAudioInputDevice(null)}catch(e){this.logger.error(`MeetingReadinessChecker: Failed to choose null device with error ${e}`)}return t?u.default.Succeeded:u.default.AudioNotReceived}))}checkVideoConnectivity(e){return r(this,void 0,void 0,(function*(){const t=this.meetingSession.audioVideo;try{yield t.chooseVideoInputDevice(e)}catch(e){return this.logger.error(`MeetingReadinessChecker: Failed to get video input device with error ${e}`),e instanceof s.default?v.default.VideoInputPermissionDenied:v.default.VideoInputRequestFailed}if(!(yield this.startMeeting()))return v.default.ConnectionFailed;let n=0;return t.startLocalVideoTile(),yield this.executeTimeoutTask(()=>r(this,void 0,void 0,(function*(){const e=yield t.getRTCPeerConnectionStats();return e&&e.forEach(e=>{"outbound-rtp"===e.type&&"video"===e.mediaType&&(n=e.packetsSent)}),n>0}))),t.stopLocalVideoTile(),yield this.stopMeeting(),n<=0?v.default.VideoNotSent:v.default.Succeeded}))}checkNetworkUDPConnectivity(){return r(this,void 0,void 0,(function*(){try{this.originalURLRewriter=this.meetingSession.configuration.urls.urlRewriter}catch(e){return this.logger.error(`MeetingSessionConfiguration.urls doesn't exist. Error: ${e}`),g.default.MeetingSessionURLsNotInitialized}this.meetingSession.configuration.urls.urlRewriter=e=>{const t=this.originalURLRewriter(e);return t.includes("transport=tcp")?"":t};const e=this.meetingSession.audioVideo;if(!(yield this.startMeeting()))return this.meetingSession.configuration.urls.urlRewriter=this.originalURLRewriter,g.default.ConnectionFailed;let t=!1;return yield this.executeTimeoutTask(()=>r(this,void 0,void 0,(function*(){const n=yield e.getRTCPeerConnectionStats();return n&&n.forEach(e=>{"candidate-pair"===e.type&&"succeeded"===e.state&&(t=!0)}),t}))),this.meetingSession.configuration.urls.urlRewriter=this.originalURLRewriter,yield this.stopMeeting(),t?g.default.Succeeded:g.default.ICENegotiationFailed}))}checkNetworkTCPConnectivity(){return r(this,void 0,void 0,(function*(){try{this.originalURLRewriter=this.meetingSession.configuration.urls.urlRewriter}catch(e){return this.logger.error(`MeetingSessionConfiguration.urls doesn't exist. Error: ${e}`),m.default.MeetingSessionURLsNotInitialized}this.meetingSession.configuration.urls.urlRewriter=e=>{const t=this.originalURLRewriter(e);return t.includes("transport=udp")?"":t};const e=this.meetingSession.audioVideo;if(!(yield this.startMeeting()))return this.meetingSession.configuration.urls.urlRewriter=this.originalURLRewriter,m.default.ConnectionFailed;let t=!1;return yield this.executeTimeoutTask(()=>r(this,void 0,void 0,(function*(){const n=yield e.getRTCPeerConnectionStats();return n&&n.forEach(e=>{"candidate-pair"===e.type&&"succeeded"===e.state&&(t=!0)}),t}))),this.meetingSession.configuration.urls.urlRewriter=this.originalURLRewriter,yield this.stopMeeting(),t?m.default.Succeeded:m.default.ICENegotiationFailed}))}startMeeting(){return r(this,void 0,void 0,(function*(){let e=!1;const t={audioVideoDidStart:()=>{e=!0}};return this.meetingSession.audioVideo.addObserver(t),this.meetingSession.audioVideo.start(),yield this.executeTimeoutTask(()=>r(this,void 0,void 0,(function*(){return e}))),this.meetingSession.audioVideo.removeObserver(t),e}))}stopMeeting(){return r(this,void 0,void 0,(function*(){let e=!1;const t={audioVideoDidStop:t=>{e=!0}};return this.meetingSession.audioVideo.addObserver(t),this.meetingSession.audioVideo.stop(),yield this.executeTimeoutTask(()=>r(this,void 0,void 0,(function*(){return e}))),this.meetingSession.audioVideo.removeObserver(t),e}))}executeTimeoutTask(e){return r(this,void 0,void 0,(function*(){let t=!1;class n extends l.default{constructor(e,t){super(e),this.waitDurationMs=t,this.isCancelled=!1}cancel(){this.isCancelled=!0}run(){return r(this,void 0,void 0,(function*(){for(;!this.isCancelled;){if(yield e()){t=!0;break}yield A.delay(this.waitDurationMs)}}))}}const i=new c.default(this.logger,new n(this.logger,this.configuration.waitDurationMs),this.configuration.timeoutMs);return yield i.run(),t}))}}t.default=A},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(488),a=n(893),o=n(235),s=n(157),l=n(817),c=n(894),u=n(505),d=n(899),h=n(895),f=n(901),p=n(369),m=n(370);t.default=class{constructor(e,t,n,r){this._configuration=e,this._logger=t,this.checkBrowserSupportAndFeatureConfiguration(),this.setupEventReporter(e,t,r),this._deviceController=n,this.audioVideoController=new i.default(this._configuration,this._logger,new m.default(this._logger),n,new p.default(this._configuration.reconnectTimeoutMs,new o.default(this._configuration.reconnectFixedWaitMs,this._configuration.reconnectShortBackOffMs,this._configuration.reconnectLongBackOffMs)),this._eventReporter),n.bindToAudioVideoController(this.audioVideoController);const s=new l.default(this._logger);this.contentShareController=new c.default(s,new i.default(c.default.createContentShareMeetingSessionConfigure(this._configuration),this._logger,new m.default(this._logger),s,new p.default(this._configuration.reconnectTimeoutMs,new o.default(this._configuration.reconnectFixedWaitMs,this._configuration.reconnectShortBackOffMs,this._configuration.reconnectLongBackOffMs))),this.audioVideoController),this.audioVideoFacade=new a.default(this.audioVideoController,this.audioVideoController.videoTileController,this.audioVideoController.realtimeController,this.audioVideoController.audioMixController,this._deviceController,this.contentShareController)}get configuration(){return this._configuration}get logger(){return this._logger}get audioVideo(){return this.audioVideoFacade}get contentShare(){return this.contentShareController}get deviceController(){return this._deviceController}get eventReporter(){return this._eventReporter}destroy(){return r(this,void 0,void 0,(function*(){u.isDestroyable(this.contentShareController)&&(yield this.contentShareController.destroy()),u.isDestroyable(this.audioVideoController)&&(yield this.audioVideoController.destroy()),u.isDestroyable(this.eventReporter)&&(yield this.eventReporter.destroy()),this._logger=void 0,this._configuration=void 0,this._deviceController=void 0,this.audioVideoFacade=void 0,this.audioVideoController=void 0,this.contentShareController=void 0,this._eventReporter=void 0}))}setupEventReporter(e,t,n){if(n)this._eventReporter=n;else{const n=e.urls.eventIngestionURL;if(n){this.logger.info("Event ingestion URL is present in the configuration");const{meetingId:r,credentials:{attendeeId:i,joinToken:a}}=e,o=new f.default(r,i,a),s=new d.default(o,n);this._eventReporter=new h.default(s,t)}}}checkBrowserSupportAndFeatureConfiguration(){const e=new s.default,t=`${e.name()} ${e.majorVersion()} (${e.version()})`;this.logger.info(`browser is ${t}`),e.isSupported()||this.logger.warn("this browser is not currently supported. Stability may suffer. "+`Supported browsers are: ${e.supportString()}.`),this._configuration.enableUnifiedPlanForChromiumBasedBrowsers&&(e.hasChromiumWebRTC()?this.logger.info("WebRTC unified plan for Chromium-based browsers is enabled"):this.logger.info(`WebRTC unified plan is required for ${e.name()}`)),this._configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers&&(this._configuration.enableUnifiedPlanForChromiumBasedBrowsers?e.hasChromiumWebRTC()?this.logger.info(`Simulcast is enabled for ${e.name()}`):(this._configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers=!1,this.logger.info("Simulcast requires WebRTC Unified Plan and is only supported on Chromium-based browsers")):(this._configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers=!1,this.logger.info("Simulcast requires enabling WebRTC Unified Plan for Chromium-based browsers")))}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(235),a=n(902),o=n(369),s=n(182),l=n(903),c=n(370),u=n(365);t.default=class{constructor(e,t,n,r,a){this.configuration=e,this.logger=t,this.webSocket=n,this.reconnectController=r,this.sigV4=a,this.observerQueue=new Set,this.webSocket||(this.webSocket=new c.default(this.logger)),this.reconnectController||(this.reconnectController=new o.default(e.reconnectTimeoutMs,new i.default(e.reconnectFixedWaitMs,e.reconnectShortBackoffMs,e.reconnectLongBackoffMs))),this.sigV4||(this.sigV4=new l.default(this.configuration.chimeClient,this.configuration.awsClient))}addObserver(e){this.logger.info("adding messaging observer"),this.observerQueue.add(e)}removeObserver(e){this.logger.info("removing messaging observer"),this.observerQueue.delete(e)}start(){this.isClosed()?this.startConnecting(!1):this.logger.info("messaging session already started")}stop(){this.isClosed()?this.logger.info("no existing connection needs closing"):(this.isClosing=!0,this.webSocket.close())}forEachObserver(e){for(const t of this.observerQueue)s.default.nextTick(()=>{this.observerQueue.has(t)&&e(t)})}setUpEventListeners(){this.webSocket.addEventListener("open",()=>{this.openEventHandler()}),this.webSocket.addEventListener("message",e=>{this.receiveMessageHandler(e.data)}),this.webSocket.addEventListener("close",e=>{this.closeEventHandler(e)}),this.webSocket.addEventListener("error",()=>{this.logger.error("WebSocket error")})}startConnecting(e){const t=this.prepareWebSocketUrl();this.logger.info(`opening connection to ${t}`),e||this.reconnectController.reset(),this.reconnectController.hasStartedConnectionAttempt()?this.reconnectController.startedConnectionAttempt(!1):this.reconnectController.startedConnectionAttempt(!0),this.webSocket.create(t,[],!0),this.forEachObserver(t=>{t.messagingSessionDidStartConnecting&&t.messagingSessionDidStartConnecting(e)}),this.setUpEventListeners()}prepareWebSocketUrl(){const e=new Map;return e.set("userArn",[this.configuration.userArn]),e.set("sessionId",[this.configuration.messagingSessionId]),this.sigV4.signURL("GET","wss","chime",this.configuration.endpointUrl,"/connect","",e)}isClosed(){return this.webSocket.readyState()===u.default.None||this.webSocket.readyState()===u.default.Closed}openEventHandler(){this.reconnectController.reset(),this.isSessionEstablished=!1}receiveMessageHandler(e){try{const t=JSON.parse(e),n=t.Headers["x-amz-chime-event-type"],r=new a.default(n,t.Headers,t.Payload||null);if(this.isSessionEstablished||"SESSION_ESTABLISHED"!==n){if(!this.isSessionEstablished)return}else this.forEachObserver(e=>{e.messagingSessionDidStart&&e.messagingSessionDidStart()}),this.isSessionEstablished=!0;this.forEachObserver(e=>{e.messagingSessionDidReceiveMessage&&e.messagingSessionDidReceiveMessage(r)})}catch(e){this.logger.error(`Messaging parsing failed: ${e}`)}}closeEventHandler(e){this.logger.info(`WebSocket close: ${e.code} ${e.reason}`),this.webSocket.destroy(),!this.isClosing&&this.canReconnect(e.code)&&this.reconnectController.retryWithBackoff(()=>r(this,void 0,void 0,(function*(){this.startConnecting(!0)})),null)||(this.isClosing=!1,this.isSessionEstablished&&this.forEachObserver(t=>{t.messagingSessionDidStop&&t.messagingSessionDidStop(e)}))}canReconnect(e){return 1001===e||1006===e||e>=1011&&e<=1014||e>4e3&&4002!==e&&4003!==e&&4401!==e}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(157),a=n(904);class o{constructor(e,t,n,r=new i.default){this.logger=e,this.device=t,this.processors=n,this.browserBehavior=r,this.observers=new Set,this.pipe=new a.default(this.logger,this.processors),this.pipe.addObserver(this)}get outputMediaStream(){return this.pipe.outputMediaStream}chooseNewInnerDevice(e){const t=new o(this.logger,e,this.processors,this.browserBehavior);return t.pipe=this.pipe,t}getInnerDevice(){return this.device}intrinsicDevice(){return r(this,void 0,void 0,(function*(){const e={};return this.device?"string"==typeof this.device?(this.browserBehavior.requiresNoExactMediaStreamConstraints()?e.deviceId=this.device:e.deviceId={exact:this.device},e):this.device.id?this.device:Object.assign(Object.assign({},this.device),e):e}))}transformStream(e){return r(this,void 0,void 0,(function*(){return yield this.pipe.setInputMediaStream(e),this.inputMediaStream=e,this.pipe.getActiveOutputMediaStream()}))}onOutputStreamDisconnect(){this.logger.info("DefaultVideoTransformDevice: detach stopping input media stream");const e=this.device&&this.device.id;if(this.pipe.stop(),!e&&this.inputMediaStream)for(const e of this.inputMediaStream.getVideoTracks())e.stop()}stop(){return r(this,void 0,void 0,(function*(){if(this.inputMediaStream)for(const e of this.inputMediaStream.getVideoTracks())e.stop();this.pipe.destroy(),this.inputMediaStream=null}))}addObserver(e){this.observers.add(e)}removeObserver(e){this.observers.add(e)}processingDidStart(){this.logger.info("video transform device processing started"),this.forEachObserver(e=>{e.processingDidStart&&e.processingDidStart()})}processingLatencyTooHigh(e){this.forEachObserver(t=>{t.processingLatencyTooHigh&&t.processingLatencyTooHigh(e)})}processingDidFailToStart(){this.logger.info("video transform device processing failed to start"),this.forEachObserver(e=>{e.processingDidFailToStart&&e.processingDidFailToStart()})}processingDidStop(){this.logger.info("video transform device processing stopped"),this.forEachObserver(e=>{e.processingDidStop&&e.processingDidStop()})}forEachObserver(e){for(const t of this.observers)setTimeout(()=>{e(t)},0)}}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(235),i=n(905);t.default=class{constructor(e,t,n){this.fixedWaitMs=e,this.shortBackoffMs=t,this.longBackoffMs=n}create(){return new r.default(this.fixedWaitMs,this.shortBackoffMs,this.longBackoffMs)}createWithLimit(e){return new i.default(this.fixedWaitMs,this.shortBackoffMs,this.longBackoffMs,e)}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(210),a=n(211),o=n(906);t.default=class{constructor(e,t,n,r,a,o=i.default.WARN,s){this.name=e,this.configuration=t,this.batchSize=n,this.intervalMs=r,this.url=a,this.level=o,this.headers=s,this.logCapture=[],this.sequenceNumber=0,this.lock=!1,this.startLogPublishScheduler(this.batchSize),this.eventListener=()=>{this.stop()},this.addEventListener()}addEventListener(){this.eventListener&&"window"in e&&window.addEventListener&&window.addEventListener("unload",this.eventListener)}removeEventListener(){this.eventListener&&"window"in e&&window.removeEventListener&&window.removeEventListener("unload",this.eventListener)}debug(e){i.default.DEBUG<this.level||("string"==typeof e?this.log(i.default.DEBUG,e):e?this.log(i.default.DEBUG,e()):this.log(i.default.DEBUG,""+e))}info(e){this.log(i.default.INFO,e)}warn(e){this.log(i.default.WARN,e)}error(e){this.log(i.default.ERROR,e)}setLogLevel(e){this.level=e}getLogLevel(){return this.level}getLogCaptureSize(){return this.logCapture.length}startLogPublishScheduler(e){var t;this.addEventListener(),null===(t=this.intervalScheduler)||void 0===t||t.stop(),this.intervalScheduler=new a.default(this.intervalMs),this.intervalScheduler.start(()=>r(this,void 0,void 0,(function*(){if(!0===this.lock||0===this.getLogCaptureSize())return;this.lock=!0;const t=this.logCapture.slice(0,e),n=this.makeRequestBody(t);try{200===(yield fetch(this.url,Object.assign({method:"POST",body:n},this.headers?{headers:this.headers}:{}))).status&&(this.logCapture=this.logCapture.slice(t.length))}catch(e){console.warn("[MeetingSessionPOSTLogger] "+e.message)}finally{this.lock=!1}})))}stop(){var e;null===(e=this.intervalScheduler)||void 0===e||e.stop(),this.intervalScheduler=void 0,this.removeEventListener();const t=this.makeRequestBody(this.logCapture);navigator.sendBeacon(this.url,t)}destroy(){var e;return r(this,void 0,void 0,(function*(){null===(e=this.intervalScheduler)||void 0===e||e.stop(),this.intervalScheduler=void 0,this.removeEventListener(),this.configuration=void 0,this.logCapture=[]}))}makeRequestBody(e){return JSON.stringify({meetingId:this.configuration.meetingId,attendeeId:this.configuration.credentials.attendeeId,appName:this.name,logs:e})}log(e,t){if(e<this.level)return;const n=Date.now();this.logCapture.push(new o.default(this.sequenceNumber,t,n,i.default[e])),this.sequenceNumber+=1}}}).call(this,n(68))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t,n,r,i){this.userArn=e,this.messagingSessionId=t,this.endpointUrl=n,this.chimeClient=r,this.awsClient=i,this.reconnectTimeoutMs=1e4,this.reconnectFixedWaitMs=0,this.reconnectShortBackoffMs=1e3,this.reconnectLongBackoffMs=5e3,this.messagingSessionId||(this.messagingSessionId=this.generateSessionId())}generateSessionId(){const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(210);t.default=class{constructor(...e){this._loggers=e}info(e){for(const t of this._loggers)t.info(e)}warn(e){for(const t of this._loggers)t.warn(e)}error(e){for(const t of this._loggers)t.error(e)}debug(e){let t,n;n="string"==typeof e?e:e?()=>(t||(t=e()),t):""+e;for(const e of this._loggers)e.debug(n)}setLogLevel(e){for(const t of this._loggers)t.setLogLevel(e)}getLogLevel(){for(const e of this._loggers)return e.getLogLevel();return r.default.OFF}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(235),i=n(907),a=n(506),o=n(502),s=n(368),l=n(504),c=n(369),u=n(370),d=n(488);class h extends d.default{constructor(e){const t=new o.default;t.meetingId="",t.externalMeetingId="",t.credentials=new s.default,t.credentials.attendeeId="",t.credentials.joinToken="",t.urls=new l.default,t.urls.turnControlURL="",t.urls.audioHostURL="",t.urls.screenViewingURL="",t.urls.screenDataURL="",t.urls.screenSharingURL="wss://localhost/",t.urls.signalingURL="wss://localhost/",super(e||t,new i.default,new u.default(new i.default),new a.default,new c.default(0,new r.default(0,0,0)))}setAudioProfile(e){}start(){}stop(){}}t.default=h},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DestroyableNoOpDeviceController=void 0;const i=n(506);class a extends i.default{constructor(e){super()}listAudioInputDevices(){return Promise.resolve([])}listVideoInputDevices(){return Promise.resolve([])}listAudioOutputDevices(){return Promise.resolve([])}chooseAudioInputDevice(e){return Promise.reject()}chooseVideoInputDevice(e){return Promise.reject()}chooseAudioOutputDevice(e){return Promise.reject()}addDeviceChangeObserver(e){}removeDeviceChangeObserver(e){}createAnalyserNodeForAudioInput(){return null}startVideoPreviewForVideoInput(e){}stopVideoPreviewForVideoInput(e){}setDeviceLabelTrigger(e){}mixIntoAudioInput(e){return null}chooseVideoInputQuality(e,t,n,r){}getVideoInputQualitySettings(){return null}}t.default=a;t.DestroyableNoOpDeviceController=class extends a{constructor(){super(...arguments),this.destroyed=!1}destroy(){return r(this,void 0,void 0,(function*(){this.destroyed=!0}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){}reportEvent(e,t,n){}start(){}stop(){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{cancel(){}name(){return"NoOpTask"}run(){return Promise.resolve()}setParent(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{create(){return{clientWidth:400,clientHeight:300,width:400,height:300,videoWidth:400,videoHeight:300,style:{transform:""},hasAttribute:()=>!1,removeAttribute:()=>{},setAttribute:()=>{},srcObject:!1,pause:()=>{},play:()=>Promise.resolve()}}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});t.default=class{process(e){return r(this,void 0,void 0,(function*(){return e}))}destroy(){return r(this,void 0,void 0,(function*(){}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(268);t.default=class{reset(){}updateIndex(e){}updateMetrics(e){}wantsResubscribe(){return!1}chooseSubscriptions(){return new r.default}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(311);t.default=class{constructor(){}updateConnectionMetric(e){}chooseMediaTrackConstraints(){return{}}chooseEncodingParameters(){return new Map}updateIndex(e){}wantsResubscribe(){return!1}chooseCaptureAndEncodeParameters(){return new r.default(0,0,0,0,!1)}maxBandwidthKbps(){return 0}setIdealMaxBandwidthKbps(e){}setHasBandwidthPriority(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.attendeeIndex=null,this.attendeesInFrame=null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(101);class i extends r.default{constructor(e,t,n="RunnableTask"){super(e),this.fn=t,this.taskName=n}run(){return this.fn().then(()=>{})}}t.default=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e){this.inner=e}mute(e){return r(this,void 0,void 0,(function*(){}))}stop(){var e;return r(this,void 0,void 0,(function*(){null===(e=this.node)||void 0===e||e.disconnect()}))}intrinsicDevice(){return r(this,void 0,void 0,(function*(){return this.inner}))}createAudioNode(e){var t;return r(this,void 0,void 0,(function*(){return null===(t=this.node)||void 0===t||t.disconnect(),this.node=yield this.createSingleAudioNode(e),{start:this.node,end:this.node}}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(307),i=n(498),a=n(367),o=n(496);class s extends o.default{constructor(e){super(e),this.logger=e,super.shouldPauseTiles=!1,this.videoPreferences=void 0}reset(){super.reset(),super.shouldPauseTiles=!1,this.videoPreferences=void 0}updateIndex(e){super.updateIndex(e);const t=a.VideoPreferences.prepare();let n=!1;const o=e.remoteStreamDescriptions();for(const e of o)t.some(t=>t.attendeeId===e.attendeeId)||(e.attendeeId.endsWith(r.default.Modality)?(t.add(new i.default(e.attendeeId,1)),n=!0):t.add(new i.default(e.attendeeId,2)));n?(this.videoPreferences=t.build(),this.videoPreferencesUpdated=!0):this.videoPreferences=void 0}chooseRemoteVideoSources(e){this.logger.error("chooseRemoteVideoSources should not be called by VideoAdaptiveProbePolicy")}}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VoiceFocusDeviceTransformer=void 0;const i=n(1408),a=n(503),o=n(212),s=n(1413),l=n(910),c=n(1414);class u{constructor(e,{preload:t=!0,logger:n,fetchBehavior:r=u.defaultFetchBehavior()},i){this.spec=e,this.supported=!0,this.logger=n,this.vfLogger=n?new s.default(n):void 0,this.preload=t,this.fetchBehavior=r,this.spec=u.augmentSpec(this.spec),i&&(this.configuration=Promise.resolve(i))}static isSupported(e,t){var n,r;const o={fetchBehavior:u.defaultFetchBehavior(),logger:(null==t?void 0:t.logger)?new s.default(t.logger):void 0};if(a.isIFramed()){if(!1===(null==t?void 0:t.allowIFrame))return null===(n=null==t?void 0:t.logger)||void 0===n||n.error("Amazon Voice Focus support check inside iframe: not supported."),Promise.resolve(!1);null===(r=null==t?void 0:t.logger)||void 0===r||r.warn("Amazon Voice Focus support check inside iframe: not recommended.")}return i.VoiceFocus.isSupported(u.augmentSpec(e),o)}static create(e={},t={},n){return r(this,void 0,void 0,(function*(){const r=new u(e,t,n);return yield r.init(),r}))}static configure(e={},t={}){return r(this,void 0,void 0,(function*(){return new u(e,t,void 0).configure(!0)}))}getConfiguration(){return this.configuration}isSupported(){return this.supported}createTransformDevice(e,t){return r(this,void 0,void 0,(function*(){if(this.supported)try{const n=!0,[r,i]=yield this.allocateVoiceFocus(n);return new l.default(e,r,i,t)}catch(e){return}}))}static augmentSpec(e){return e&&(e.assetGroup||e.revisionID)?e:Object.assign(Object.assign({},e),{assetGroup:u.currentSDKAssetGroup()})}configure(e=!1){return r(this,void 0,void 0,(function*(){const t={fetchBehavior:this.fetchBehavior,preResolve:e,logger:this.vfLogger};return i.VoiceFocus.configure(this.spec,t)}))}init(){var e;return r(this,void 0,void 0,(function*(){this.configuration||(this.configuration=this.configure());const t=yield this.configuration;if(t.supported){this.pendingVoiceFocus=this.createVoiceFocus(t,this.preload);try{yield this.pendingVoiceFocus}catch(t){null===(e=this.logger)||void 0===e||e.error(`Unable to initialize Amazon Voice Focus: ${t}`),this.supported=!1}}else this.supported=!1}))}createVoiceFocus(e,t){return r(this,void 0,void 0,(function*(){const n=new c.default;return[yield i.VoiceFocus.init(e,{delegate:n,preload:t,logger:this.vfLogger}),n]}))}allocateVoiceFocus(e){return r(this,void 0,void 0,(function*(){if(!this.supported)throw new Error("Not supported.");if(this.pendingVoiceFocus){const e=this.pendingVoiceFocus;return this.pendingVoiceFocus=void 0,e}return this.createVoiceFocus(yield this.configuration,e)}))}static majorVersion(){return o.default.sdkVersion.match(/^[1-9][0-9]*\.(?:0|[1-9][0-9]*)/)[0]}static majorMinorVersion(){return o.default.sdkVersion.match(/^[1-9][0-9]*\.(?:0|(?:[1-9][0-9]*))\.(?:0|[1-9][0-9]*)/)[0]}static currentSDKAssetGroup(){const e=this.majorVersion();return e?`sdk-${e}`:"stable-v1"}static defaultFetchBehavior(){const e=u.majorMinorVersion()||"unknown",t=o.default.sdkUserAgentLowResolution;return{escapedQueryString:`sdk=${encodeURIComponent(e)}&ua=${encodeURIComponent(t)}`}}}t.VoiceFocusDeviceTransformer=u,t.default=u},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getAudioInput=t.createAudioContext=t.VoiceFocus=void 0;const i=n(1409),a=n(909),o=n(507),s=n(312),l=n(1410),c=n(1411),u=n(1412),d={useVoiceFocusAGC:!1,useBuiltInAGC:!0},h="stable-v1",f="https://static.sdkassets.chime.aws/",p={processors:`${f}processors/`,workers:`${f}workers/`,wasm:`${f}wasm/`,models:`${f}wasm/`},m={latencyHint:0},g={channelCount:1,echoCancellation:!0,googEchoCancellation:!0,noiseSuppression:!1,googNoiseSuppression:!1,googHighpassFilter:!1,googTypingNoiseDetection:!1},v=Object.assign(Object.assign({},g),{autoGainControl:!0,googAutoGainControl:!0,googAutoGainControl2:!0}),b=Object.assign(Object.assign({},g),{autoGainControl:!1,googAutoGainControl:!1,googAutoGainControl2:!1}),y={"voicefocus-worker-sab-processor":{file:"worklet-worker-sab-processor-v1.js",node:c.default},"voicefocus-worker-postMessage-processor":{file:"worklet-worker-postMessage-processor-v1.js",node:u.default},"voicefocus-inline-processor":{file:"worklet-inline-processor-v1.js",node:l.default}},A=(e,t)=>{if(void 0!==e&&!a.isValidAssetGroup(e))throw new Error(`Invalid asset group ${e}`);if(void 0!==t&&!a.isValidRevisionID(t))throw new Error(`Invalid revision ID ${t}`)},_=(e,t)=>`${t.models}${i.decideModel(e)}.wasm`;class w{constructor(e,t,n,r,i){this.processorURL=t,this.nodeConstructor=n,this.nodeOptions=r,this.executionQuanta=i,this.internal={worker:e,nodeOptions:r}}static isSupported(e,t){const{fetchBehavior:n,logger:r}=t||{};if("undefined"==typeof globalThis)return null==r||r.debug("Browser does not have globalThis."),Promise.resolve(!1);if(!s.supportsAudioWorklet(globalThis,r))return null==r||r.debug("Browser does not support Audio Worklet."),Promise.resolve(!1);if(!s.supportsWASM(globalThis,r))return null==r||r.debug("Browser does not support WASM."),Promise.resolve(!1);s.supportsWASMStreaming(globalThis,r)||null==r||r.debug("Browser does not support streaming WASM compilation.");const{assetGroup:i=h,revisionID:o,paths:l=p}=e||{};A(i,o);const c=o?{revisionID:o}:{assetGroup:i},u=a.addQueryParams(n,c),d=Object.assign(Object.assign({},u),{paths:l});return s.supportsVoiceFocusWorker(globalThis,d,r)}static mungeExecutionPreference(e,t){const n=void 0===e||"auto"===e;if(s.isSafari(globalThis)){if(n||"inline"===e)return"inline";if(!n)throw new Error(`Unsupported execution preference ${e}`)}if("worker-sab"===e&&!s.supportsSharedArrayBuffer(globalThis,globalThis,t))throw new Error(`Unsupported execution preference ${e}`);return e||"auto"}static configure(e,t){return r(this,void 0,void 0,(function*(){const{fetchBehavior:n,preResolve:r,logger:o}=t||{},{category:s="voicefocus",name:l="default",variant:c="auto",assetGroup:u=h,revisionID:d,simd:f="detect",executionPreference:m="auto",executionQuantaPreference:g,usagePreference:v="interactivity",estimatorBudget:b=100,paths:y=p,thresholds:w}=e||{};if(null==o||o.debug("Configuring Voice Focus with spec",e),void 0!==s&&"voicefocus"!==s)throw new Error(`Unrecognized category ${s}`);if(void 0!==l&&"default"!==l)throw new Error(`Unrecognized feature name ${l}`);if(void 0!==c&&!["auto","c100","c50","c20","c10"].includes(c))throw new Error(`Unrecognized feature variant ${c}`);if(void 0!==g&&![1,2,3].includes(g))throw new Error(`Unrecognized execution quanta preference ${g}`);if(A(u,d),void 0!==f&&!["detect","force","disable"].includes(f))throw new Error(`Unrecognized SIMD option ${f}`);if(void 0!==m&&!["auto","inline","worker","worker-sab","worker-postMessage"].includes(m))throw new Error(`Unrecognized execution preference ${m}`);if(void 0!==v&&!["quality","interactivity"].includes(v))throw new Error(`Unrecognized usage preference ${v}`);const E={executionPreference:this.mungeExecutionPreference(m,o),usagePreference:v,executionQuantaPreference:g,variantPreference:c,simdPreference:f,estimatorBudget:b},S=d?{revisionID:d}:{assetGroup:u},C=a.addQueryParams(n,S),T=Object.assign({paths:y},C),k=yield i.measureAndDecideExecutionApproach(E,T,o,w);if(!1===k.supported)return{supported:!1,reason:k.reason};null==o||o.info("Decided execution approach",k);const{useSIMD:x,processor:O,variant:I,executionQuanta:M}=k,P={category:s||"voicefocus",name:l||"default",variant:I,simd:x};if(r){const e=_(P,y);P.url=yield a.resolveURL(e,C)}return{fetchConfig:T,model:P,processor:O,executionQuanta:M,supported:!0}}))}static init(e,{delegate:t,preload:n=!0,logger:i}){return r(this,void 0,void 0,(function*(){if(!1===e.supported)throw new Error("Voice Focus not supported. Reason: "+e.reason);const{model:r,processor:a,fetchConfig:l,executionQuanta:c}=e,{simd:u}=r,{paths:d}=l;if("voicefocus-inline-processor"!==a&&"voicefocus-worker-postMessage-processor"!==a&&"voicefocus-worker-sab-processor"!==a)throw new Error(`Unknown processor ${a}`);const h=r.url||_(r,d);null==i||i.debug(`Using model URL ${h}.`);const f=`${d.wasm}audio_buffer-v1${u?"_simd":""}.wasm`,p=`${d.wasm}resampler-v1${u?"_simd":""}.wasm`,m=`${d.workers}worker-v1.js`,{file:g,node:v}=y[a],b=`${d.processors}${g}`,A=yield o.loadWorker(m,"VoiceFocusWorker",l,i);if(n){null==i||i.debug("Preloading",h);let e=s.supportsWASMPostMessage(globalThis)?"get-module":"get-module-buffer";A.postMessage({message:e,preload:!0,key:"model",fetchBehavior:l,path:h})}const E=new w(A,b,v,{processor:a,worker:A,audioBufferURL:f,resamplerURL:p,fetchBehavior:l,modelURL:h,delegate:t,logger:i},c);return Promise.resolve(E)}))}createNode(e,t){var n;const{voiceFocusSampleRate:r=(16e3===e.sampleRate?16e3:48e3),enabled:i=!0,agc:o=d}=t||{},s={voiceFocusSampleRate:r,enabled:i,sendBufferCount:10,prefill:6,agc:o,executionQuanta:this.executionQuanta},l=a.withQueryString(this.processorURL,null===(n=this.nodeOptions)||void 0===n?void 0:n.fetchBehavior);return e.audioWorklet.addModule(l).then(()=>new this.nodeConstructor(e,Object.assign(Object.assign({},this.nodeOptions),{processorOptions:s})))}applyToStream(e,t,n){return r(this,void 0,void 0,(function*(){const r=t.createMediaStreamSource(e),i=yield this.applyToSourceNode(r,t,n),a=t.createMediaStreamDestination();return i.connect(a),{node:i,source:r,destination:a,stream:a.stream}}))}applyToSourceNode(e,t,n){return r(this,void 0,void 0,(function*(){const r=yield this.createNode(t,n);return e.connect(r),r}))}}t.VoiceFocus=w;t.createAudioContext=(e=m)=>new(window.AudioContext||window.webkitAudioContext)(e);t.getAudioInput=(e,t,n)=>r(void 0,void 0,void 0,(function*(){var r,i;const{constraints:a,spec:o,delegate:s,preload:l=!0,options:c}=t,{logger:u}=n,h=yield w.configure(o,n);if(!h.supported)return null===(r=n.logger)||void 0===r||r.warn("Voice Focus not supported; returning standard stream."),window.navigator.mediaDevices.getUserMedia(a);const f=yield w.init(h,{delegate:s,preload:l,logger:u}),p=(null===(i=t.options)||void 0===i?void 0:i.agc)||d,m=yield window.navigator.mediaDevices.getUserMedia(((e,t)=>{let n;if(n=t.useBuiltInAGC?v:b,!e)return{audio:n};if(!e.audio)return e;if(e.video)throw new Error("Not adding Voice Focus to multi-device getUserMedia call.");return Object.assign(Object.assign({},e),{audio:!0===e.audio?n:Object.assign(Object.assign({},e.audio),n)})})(a,p));return f.applyToStream(m,e,c).then(e=>e.stream)}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.decideModel=t.measureAndDecideExecutionApproach=void 0;const i=n(507),a=n(312),o={wasm:{noSupport:.07,inline:{c100:1,c50:.36,c20:.16,c10:.07},worker:{c100:.5,c50:.18,c20:.08,c10:.06}},simd:{noSupport:.1,inline:{c100:1,c50:.43,c20:.3,c10:.2},worker:{c100:.5,c50:.21,c20:.15,c10:.1}}};class s{constructor(e,t){this.fetchConfig=e,this.logger=t;const n=`${e.paths.workers}estimator-v1.js`;this.fetchBehavior={headers:e.headers,escapedQueryString:e.escapedQueryString},this.worker=i.loadWorker(n,"VoiceFocusEstimator",this.fetchBehavior,t)}roundtrip(e,t,n){return new Promise((r,i)=>{this.worker.then(i=>{let a;a=e=>{const{message:o,key:s}=e.data;o===t&&s===n&&(i.removeEventListener("message",a),r(e.data))},i.addEventListener("message",a),i.postMessage(e)}).catch(e=>{var t;null===(t=this.logger)||void 0===t||t.error("Failed to load worker.",e),i(e)})})}supportsSIMD(e){const t=e||`${this.fetchConfig.paths.wasm}simd-v1.wasm`,n={message:"supports-simd",fetchBehavior:this.fetchBehavior,path:t,key:"simd"};return this.roundtrip(n,"simd-support","simd").then(e=>e.supports)}measure(e,t){const n=`${this.fetchConfig.paths.wasm}bench-v1.wasm`,r=`${this.fetchConfig.paths.wasm}bench-v1_simd.wasm`,i=e?r:n,a=`bench:${e}`,o={message:"measure",fetchBehavior:this.fetchBehavior,budget:t,path:i,key:a};return this.roundtrip(o,"measurement",a).then(e=>{if(e.measurement)return e.measurement;throw new Error("Failed to measure.")})}stop(){this.worker.then(e=>{var t;null===(t=this.logger)||void 0===t||t.debug("Stopping estimator worker."),e.terminate()}).catch(e=>{})}}const l=(e,t,n,i)=>r(void 0,void 0,void 0,(function*(){const r={supportsSIMD:e,supportsSAB:a.supportsSharedArrayBuffer(globalThis,window,n),duration:-1};if(e)return null==n||n.info("Supports SIMD: true (force)"),r;const o=!i,l=i||new s(t,n);try{const t=!a.isOldChrome(window,n)&&(yield l.supportsSIMD());return null==n||n.info(`Supports SIMD: ${t} (force: ${e})`),r.supportsSIMD=t,r}finally{o&&l.stop()}}));t.measureAndDecideExecutionApproach=(e,t,n,i=o)=>r(void 0,void 0,void 0,(function*(){let c=e.executionPreference;const{usagePreference:u,variantPreference:d,simdPreference:h,estimatorBudget:f,executionQuantaPreference:p}=e;"interactivity"===u&&"inline"!==c&&(null==n||n.debug(`Overriding execution preference ${c} to reflect interactivity preference.`),c="inline");const m="force"===h,g="auto"!==d,v="auto"!==c;let b;try{b=g&&v?yield l(m,t,n):yield((e,t,n,i)=>r(void 0,void 0,void 0,(function*(){const r=new s(t,i);try{const a=yield l(e,t,i,r);if(a.supportsSIMD)try{return a.duration=yield r.measure(!0,n),null==i||i.info("SIMD timing:",a.duration),a}catch(e){null==i||i.warn("Failed SIMD estimation; falling back to non-SIMD."),a.supportsSIMD=!1}return a.duration=yield r.measure(!1,n),null==i||i.info("No-SIMD timing:",a.duration),a}catch(e){throw null==i||i.error("Could not feature check.",e),e}finally{r.stop()}})))(m,t,f,n)}catch(e){throw null==n||n.error("Could not load estimator.",e),new Error("Could not load Voice Focus estimator.")}return(({supportsSIMD:e,supportsSAB:t,duration:n,executionPreference:r="auto",simdPreference:i,variantPreference:s="auto",usagePreference:l,executionQuantaPreference:c=3},u=o,d)=>{const h="force"===i||"disable"!==i&&e,f=-1!==n,p=f?(h?2.5:2.63)/n:0,m=h?u.simd:u.wasm,g=f?((e,t)=>1===e?.6:"quality"===t?.65*e:.5*e)(c,l)*p:0,v=f?.7*p:0,b=e=>({supported:!1,reason:e});if(f){if(p<m.noSupport)return b(`Performance score ${p} worse than threshold ${m.noSupport}.`)}else if("auto"===r||"auto"===s)return b(`Missing explicit execution (${r}) or variant (${s}) preference, but no scoring performed.`);null==d||d.debug(`Bench duration ${n} yields inline score ${g} and worker score ${v}.`);const y=(e,t,n)=>({supported:!0,useSIMD:h,processor:e,executionApproach:t,variant:n,executionQuanta:"inline"===t?c:void 0}),A=(e,t,n)=>"auto"!==t?!f||e>n[t]?t:"failed":e>n.c100?"c100":e>n.c50?"c50":e>n.c20?"c20":e>n.c10?"c10":"failed",_=e=>{switch(e||"auto"){case"auto":{let e=_("inline"),t=_("worker");return null==d||d.debug(`Reducing auto preference: ${JSON.stringify(e)} vs ${JSON.stringify(t)}`),!1===e.supported?t:!1===t.supported?t:e.variant===t.variant||"c50"===e.variant?e:t}case"worker":return a.supportsSharedArrayBuffer(globalThis,window,d)?_("worker-sab"):_("worker-postMessage");case"inline":{const e=A(g,s,m.inline);return"failed"===e?b(`Performance score ${g} not sufficient for inline use with variant preference ${s}.`):y("voicefocus-inline-processor","inline",e)}case"worker-sab":{if(!t){const e="Requested worker-sab but no SharedArrayBuffer support.";return null==d||d.warn(e),{supported:!1,reason:e}}const e=A(v,s,m.worker);return"failed"===e?b(`Performance score ${v} not sufficient for worker use with variant preference ${s}.`):y("voicefocus-worker-sab-processor","worker-sab",e)}case"worker-postMessage":{const e=A(v,s,m.worker);return"failed"===e?b(`Performance score ${v} not sufficient for worker use.`):y("voicefocus-worker-postMessage-processor","worker-postMessage",e)}}};return _(r)})(Object.assign(Object.assign({},b),{simdPreference:h,executionPreference:c,variantPreference:d,usagePreference:u,executionQuantaPreference:p}),i,n)}));t.decideModel=({category:e,name:t,variant:n,simd:r,url:i})=>`${e}-${t}-${n}-v1${r?"_simd":""}`},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(312),a=n(508);class o extends a.VoiceFocusAudioWorkletNode{constructor(e,t){super(e,t.processor,t),this.channelCountMode="explicit",this.channelCount=1;const{modelURL:n,worker:r,fetchBehavior:a,logger:o,delegate:s}=t;this.logger=o,this.port.onmessage=this.onProcessorMessage.bind(this),this.delegate=s,o&&o.debug("VoiceFocusInlineNode:",n),this.worker=r,this.worker.onmessage=this.onWorkerMessage.bind(this);const l=i.supportsWASMPostMessage(globalThis)?"get-module":"get-module-buffer";this.worker.postMessage({message:l,key:"model",fetchBehavior:a,path:n})}onModuleBufferLoaded(e,t){this.port.postMessage({message:"module-buffer",buffer:e,key:t})}onModuleLoaded(e,t){this.port.postMessage({message:"module",module:e,key:t})}enable(){return r(this,void 0,void 0,(function*(){this.port.postMessage({message:"enable"})}))}disable(){return r(this,void 0,void 0,(function*(){this.port.postMessage({message:"disable"})}))}stop(){return r(this,void 0,void 0,(function*(){this.port.postMessage({message:"stop"}),this.disconnect()}))}onProcessorMessage(e){var t,n,r;const i=e.data;switch(i.message){case"cpu":null===(t=this.logger)||void 0===t||t.warn("CPU warning:",i.message),null===(n=this.delegate)||void 0===n||n.onCPUWarning();break;default:null===(r=this.logger)||void 0===r||r.debug("Ignoring processor message.")}}onWorkerMessage(e){const t=e.data;switch(t.message){case"module-buffer":if(!t.buffer||!t.key)return;this.onModuleBufferLoaded(t.buffer,t.key);break;case"module":if(!t.module||!t.key)return;this.onModuleLoaded(t.module,t.key);break;case"stopped":this.worker&&this.worker.terminate();break;default:return}}}t.default=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(312),a=n(508),o=0,s=1,l=0,c=1,u=2;class d extends a.VoiceFocusAudioWorkletNode{constructor(e,t){super(e,t.processor,t),this.channelCountMode="explicit",this.channelCount=1;const{modelURL:n,resamplerURL:r,worker:a,fetchBehavior:o,delegate:s}=t;this.delegate=s,this.worker=a,this.worker.onmessage=this.onWorkerMessage.bind(this),this.port.onmessage=this.onProcessorMessage.bind(this),this.worker.postMessage({message:"init",approach:"sab",frames:16e3===e.sampleRate?160:480,enabled:t.processorOptions.enabled,model:n});const l=i.supportsWASMPostMessage(globalThis)?"get-module":"get-module-buffer";this.worker.postMessage({message:l,key:"resampler",fetchBehavior:o,path:r})}enable(){return r(this,void 0,void 0,(function*(){this.state?(Atomics.store(this.state,s,c),Atomics.notify(this.state,o,1)):this.worker.postMessage({message:"enable"})}))}disable(){return r(this,void 0,void 0,(function*(){this.state?(Atomics.store(this.state,s,l),Atomics.notify(this.state,o,1)):this.worker.postMessage({message:"disable"})}))}stop(){return r(this,void 0,void 0,(function*(){if(this.state)Atomics.store(this.state,s,u),Atomics.notify(this.state,o,1);else try{this.worker.postMessage({message:"stop"})}catch(e){}this.disconnect()}))}onWorkerMessage(e){var t;const n=e.data;switch(n.message){case"ready":if(!n.shared)throw new Error("No shared state.");this.state=new Int32Array(n.shared.state),this.port.postMessage(n);break;case"stopped":this.worker.terminate();break;case"module-buffer":case"module":this.port.postMessage(n);break;case"cpu":null===(t=this.delegate)||void 0===t||t.onCPUWarning();break;case"processing":this.port.postMessage(n);break;default:return}}onProcessorMessage(e){var t;const n=e.data;switch(n.message){case"cpu":null===(t=this.delegate)||void 0===t||t.onCPUWarning();break;case"prepare-for-frames":this.worker.postMessage(n)}}}t.default=d},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(312),a=n(508);class o extends a.VoiceFocusAudioWorkletNode{constructor(e,t){super(e,t.processor,t),this.channelCountMode="explicit",this.channelCount=1;const{modelURL:n,audioBufferURL:r,worker:a,fetchBehavior:o,delegate:s}=t;this.delegate=s,this.worker=a,this.worker.onmessage=this.onWorkerMessage.bind(this),this.port.onmessage=this.onProcessorMessage.bind(this),this.worker.postMessage({message:"init",approach:"postMessage",frames:16e3===e.sampleRate?160:480,enabled:t.processorOptions.enabled,agc:t.processorOptions.agc,fetchBehavior:o,model:n});const l=i.supportsWASMPostMessage(globalThis)?"get-module":"get-module-buffer";this.worker.postMessage({message:l,key:"buffer",fetchBehavior:o,path:r})}enable(){return r(this,void 0,void 0,(function*(){this.worker.postMessage({message:"enable"})}))}disable(){return r(this,void 0,void 0,(function*(){this.worker.postMessage({message:"disable"})}))}stop(){return r(this,void 0,void 0,(function*(){try{this.worker.postMessage({message:"stop"})}catch(e){}this.disconnect()}))}onWorkerMessage(e){var t;const n=e.data;switch(n.message){case"ready":this.port.postMessage({message:"ready",shared:n.shared},n.shared?Object.values(n.shared):[]);break;case"data":if(!n.buffer)return;this.port.postMessage({message:"data",buffer:n.buffer},[n.buffer]);break;case"stopped":this.worker.terminate();break;case"module-buffer":case"module":this.port.postMessage(n);break;case"cpu":null===(t=this.delegate)||void 0===t||t.onCPUWarning();break;case"processing":this.port.postMessage(n);break;default:return}}onProcessorMessage(e){var t;const n=e.data;switch(n.message){case"data":if(!n.buffer)return;this.worker.postMessage({message:"data",buffer:n.buffer},[n.buffer]);break;case"cpu":null===(t=this.delegate)||void 0===t||t.onCPUWarning();break;case"prepare-for-frames":this.worker.postMessage(n);break;default:return}}}t.default=o},function(e,t,n){"use strict";function r(e){return e.map(e=>"object"==typeof e?JSON.stringify(e):`${e}`).join(" ")}Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e){this.base=e}debug(...e){this.base.debug(r(e))}info(...e){this.base.info(r(e))}warn(...e){this.base.warn(r(e))}error(...e){this.base.error(r(e))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.observers=new Set}addObserver(e){this.observers.add(e)}removeObserver(e){this.observers.delete(e)}onFallback(e,t){var n;for(const r of this.observers)null===(n=r.voiceFocusFellBackToInnerStream)||void 0===n||n.call(r,e,t)}onCPUWarning(){var e;for(const t of this.observers)null===(e=t.voiceFocusInsufficientResources)||void 0===e||e.call(t)}}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(0)),s=n(911),l=n(509),c=["ArrowRight","ArrowUp","k","PageUp"],u=["ArrowLeft","ArrowDown","j","PageDown"],d=function(e){function t(t){var n=e.call(this,t)||this;return n.trackRef=o.createRef(),n.thumbRefs=[],n.state={draggedThumbIndex:-1,thumbZIndexes:new Array(n.props.values.length).fill(0).map((function(e,t){return t})),isChanged:!1},n.getOffsets=function(){var e=n.props,t=e.direction,r=e.values,i=e.min,a=e.max,o=n.trackRef.current,c=o.getBoundingClientRect(),u=s.getPaddingAndBorder(o);return n.getThumbs().map((function(e,n){var o={x:0,y:0},d=e.getBoundingClientRect(),h=s.getMargin(e);switch(t){case l.Direction.Right:return o.x=-1*(h.left+u.left),o.y=-1*((d.height-c.height)/2+u.top),o.x+=c.width*s.relativeValue(r[n],i,a)-d.width/2,o;case l.Direction.Left:return o.x=-1*(h.right+u.right),o.y=-1*((d.height-c.height)/2+u.top),o.x+=c.width-c.width*s.relativeValue(r[n],i,a)-d.width/2,o;case l.Direction.Up:return o.x=-1*((d.width-c.width)/2+h.left+u.left),o.y=-u.left,o.y+=c.height-c.height*s.relativeValue(r[n],i,a)-d.height/2,o;case l.Direction.Down:return o.x=-1*((d.width-c.width)/2+h.left+u.left),o.y=-u.left,o.y+=c.height*s.relativeValue(r[n],i,a)-d.height/2,o;default:return s.assertUnreachable(t)}}))},n.getThumbs=function(){return n.trackRef&&n.trackRef.current?Array.from(n.trackRef.current.children):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},n.getTargetIndex=function(e){return n.getThumbs().findIndex((function(t){return t===e.target||t.contains(e.target)}))},n.addTouchEvents=function(e){document.addEventListener("touchmove",n.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",n.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",n.schdOnEnd,{passive:!1})},n.addMouseEvents=function(e){document.addEventListener("mousemove",n.schdOnMouseMove),document.addEventListener("mouseup",n.schdOnEnd)},n.onMouseDownTrack=function(e){var t;0!==e.button||n.props.values.length>1||(null===(t=n.thumbRefs[0].current)||void 0===t||t.focus(),e.persist(),e.preventDefault(),n.addMouseEvents(e.nativeEvent),n.setState({draggedThumbIndex:0},(function(){return n.onMove(e.clientX,e.clientY)})))},n.onResize=function(){s.translateThumbs(n.getThumbs(),n.getOffsets(),n.props.rtl)},n.onTouchStartTrack=function(e){n.props.values.length>1||(e.persist(),n.addTouchEvents(e.nativeEvent),n.setState({draggedThumbIndex:0},(function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)})))},n.onMouseOrTouchStart=function(e){if(!n.props.disabled){var t=s.isTouchEvent(e);if(t||0===e.button){var r=n.getTargetIndex(e);-1!==r&&(t?n.addTouchEvents(e):n.addMouseEvents(e),n.setState({draggedThumbIndex:r,thumbZIndexes:n.state.thumbZIndexes.map((function(e,t){return t===r?Math.max.apply(Math,n.state.thumbZIndexes):e<=n.state.thumbZIndexes[r]?e:e-1}))}))}}},n.onMouseMove=function(e){e.preventDefault(),n.onMove(e.clientX,e.clientY)},n.onTouchMove=function(e){e.preventDefault(),n.onMove(e.touches[0].clientX,e.touches[0].clientY)},n.onKeyDown=function(e){var t=n.props,r=t.values,i=t.onChange,a=t.step,o=t.rtl,l=n.state.isChanged,d=n.getTargetIndex(e.nativeEvent),h=o?-1:1;-1!==d&&(c.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:d,isChanged:!0}),i(s.replaceAt(r,d,n.normalizeValue(r[d]+h*("PageUp"===e.key?10*a:a),d)))):u.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:d,isChanged:!0}),i(s.replaceAt(r,d,n.normalizeValue(r[d]-h*("PageDown"===e.key?10*a:a),d)))):"Tab"===e.key?n.setState({draggedThumbIndex:-1},(function(){l&&n.fireOnFinalChange()})):l&&n.fireOnFinalChange())},n.onKeyUp=function(e){var t=n.state.isChanged;n.setState({draggedThumbIndex:-1},(function(){t&&n.fireOnFinalChange()}))},n.onMove=function(e,t){var r=n.state.draggedThumbIndex,i=n.props,a=i.direction,o=i.min,c=i.max,u=i.onChange,d=i.values,h=i.step,f=i.rtl;if(-1===r)return null;var p=n.trackRef.current.getBoundingClientRect(),m=s.isVertical(a)?p.height:p.width,g=0;switch(a){case l.Direction.Right:g=(e-p.left)/m*(c-o)+o;break;case l.Direction.Left:g=(m-(e-p.left))/m*(c-o)+o;break;case l.Direction.Down:g=(t-p.top)/m*(c-o)+o;break;case l.Direction.Up:g=(m-(t-p.top))/m*(c-o)+o;break;default:s.assertUnreachable(a)}f&&(g=c+o-g),Math.abs(d[r]-g)>=h&&u(s.replaceAt(d,r,n.normalizeValue(g,r)))},n.normalizeValue=function(e,t){var r=n.props,i=r.min,a=r.max,o=r.step,l=r.allowOverlap,c=r.values;return s.normalizeValue(e,t,i,a,o,l,c)},n.onEnd=function(e){e.preventDefault(),document.removeEventListener("mousemove",n.schdOnMouseMove),document.removeEventListener("touchmove",n.schdOnTouchMove),document.removeEventListener("mouseup",n.schdOnEnd),document.removeEventListener("touchend",n.schdOnEnd),document.removeEventListener("touchcancel",n.schdOnEnd),-1!==n.state.draggedThumbIndex&&n.setState({draggedThumbIndex:-1},(function(){n.fireOnFinalChange()}))},n.fireOnFinalChange=function(){n.setState({isChanged:!1});var e=n.props,t=e.onFinalChange,r=e.values;t&&t(r)},n.schdOnMouseMove=s.schd(n.onMouseMove),n.schdOnTouchMove=s.schd(n.onTouchMove),n.schdOnEnd=s.schd(n.onEnd),n.schdOnResize=s.schd(n.onResize),n.thumbRefs=t.values.map((function(){return o.createRef()})),s.isStepDivisible(t.min,t.max,t.step)||console.warn("The difference of `max` and `min` must be divisible by `step`"),n}return i(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.values,r=t.min,i=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.schdOnResize):{observe:function(){return window.addEventListener("resize",e.schdOnResize)},unobserve:function(){return window.removeEventListener("resize",e.schdOnResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&s.checkInitialOverlap(this.props.values),this.props.values.forEach((function(t){return s.checkBoundaries(t,e.props.min,e.props.max)})),this.resizeObserver.observe(this.trackRef.current),s.translateThumbs(this.getThumbs(),this.getOffsets(),this.props.rtl),n.forEach((function(e){s.isStepDivisible(r,e,i)||console.warn("The `values` property is in conflict with the current `step`, `min` and `max` properties. Please provide values that are accessible using the min, max an step values")}))},t.prototype.componentDidUpdate=function(e){s.translateThumbs(this.getThumbs(),this.getOffsets(),this.props.rtl)},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},t.prototype.render=function(){var e=this,t=this.props,n=t.renderTrack,r=t.renderThumb,i=t.values,a=t.min,o=t.max,l=t.allowOverlap,c=t.disabled,u=this.state,d=u.draggedThumbIndex,h=u.thumbZIndexes;return n({props:{style:{transform:"scale(1)",cursor:d>-1?"grabbing":1!==i.length||c?"inherit":"pointer"},onMouseDown:c?s.voidFn:this.onMouseDownTrack,onTouchStart:c?s.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:c,children:i.map((function(t,n){var u=e.state.draggedThumbIndex===n;return r({index:n,value:t,isDragged:u,props:{style:{position:"absolute",zIndex:h[n],cursor:c?"inherit":u?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:n,tabIndex:c?void 0:0,"aria-valuemax":l?o:i[n+1]||o,"aria-valuemin":l?a:i[n-1]||a,"aria-valuenow":t,draggable:!1,ref:e.thumbRefs[n],role:"slider",onKeyDown:c?s.voidFn:e.onKeyDown,onKeyUp:c?s.voidFn:e.onKeyUp}})}))})},t.defaultProps={step:1,direction:l.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,min:0,max:100},t}(o.Component);t.default=d},function(e,t,n){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(r.call(e,i)){if((n=e[i])||null!=n&&!isNaN(n)||(n=""),i=encodeURIComponent(i),n=encodeURIComponent(n),null===i||null===n)continue;a.push(i+"="+n)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?&]+)=?([^&]*)/g,r={};t=n.exec(e);){var a=i(t[1]),o=i(t[2]);null===a||null===o||a in r||(r[a]=o)}return r}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(31)),o=i(n(40)),s=i(n(186)),l=i(n(9)),c=i(n(60)),u=i(n(12)),d=i(n(15)),h=i(n(3)),f=i(n(13)),p=i(n(14)),m=i(n(10)),g=i(n(2)),v=r(n(0)),b=i(n(6)),y=i(n(372)),A=i(n(313)),_=i(n(510)),w=r(n(371)),E=i(n(314)),S=i(n(912)),C=i(n(913)),T=i(n(1425)),k=i(n(1426)),x=n(185),O=n(199);function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){(0,g.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,m.default)(e);if(t){var i=(0,m.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,p.default)(this,n)}}var D=w.PDFDataRangeTransport,N=function(e){(0,f.default)(n,e);var t=P(n);function n(){var e;(0,u.default)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,g.default)((0,h.default)(e),"state",{pdf:null}),(0,g.default)((0,h.default)(e),"viewer",{scrollPageIntoView:function(t){var n=t.pageNumber,r=e.props.onItemClick;if(r)r({pageNumber:n});else{var i=e.pages[n-1];i?i.scrollIntoView():(0,x.warnOnDev)("Warning: An internal link leading to page ".concat(n," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}}}),(0,g.default)((0,h.default)(e),"linkService",new C.default({eventBus:k.default})),(0,g.default)((0,h.default)(e),"loadDocument",(0,c.default)(l.default.mark((function t(){var n,r,i,a,o,s,c;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=null,t.prev=1,t.next=4,e.findDocumentSource();case 4:n=t.sent,e.onSourceSuccess(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),e.onSourceError(t.t0);case 11:if(n){t.next=13;break}return t.abrupt("return");case 13:return e.setState((function(e){return e.pdf?{pdf:null}:null})),r=e.props,i=r.options,a=r.onLoadProgress,o=r.onPassword,t.prev=15,(0,x.cancelRunningTask)(e.runningTask),e.loadingTask=w.getDocument(M(M({},n),i)),e.loadingTask.onPassword=o,a&&(e.loadingTask.onProgress=a),s=(0,A.default)(e.loadingTask.promise),e.runningTask=s,t.next=24,s.promise;case 24:c=t.sent,e.setState((function(e){return e.pdf&&e.pdf.fingerprint===c.fingerprint?null:{pdf:c}}),e.onLoadSuccess),t.next=31;break;case 28:t.prev=28,t.t1=t.catch(15),e.onLoadError(t.t1);case 31:case"end":return t.stop()}}),t,null,[[1,8],[15,28]])})))),(0,g.default)((0,h.default)(e),"setupLinkService",(function(){e.linkService.setViewer(e.viewer);var t=(0,h.default)(e);Object.defineProperty(e.linkService,"externalLinkTarget",{get:function(){switch(t.props.externalLinkTarget){case"_self":return 1;case"_blank":return 2;case"_parent":return 3;case"_top":return 4;default:return 0}}})})),(0,g.default)((0,h.default)(e),"onSourceSuccess",(function(){var t=e.props.onSourceSuccess;t&&t()})),(0,g.default)((0,h.default)(e),"onSourceError",(function(t){(0,x.errorOnDev)(t);var n=e.props.onSourceError;n&&n(t)})),(0,g.default)((0,h.default)(e),"onLoadSuccess",(function(){var t=e.props.onLoadSuccess,n=e.state.pdf;t&&t(n),e.pages=new Array(n.numPages),e.linkService.setDocument(n)})),(0,g.default)((0,h.default)(e),"onLoadError",(function(t){e.setState({pdf:!1}),(0,x.errorOnDev)(t);var n=e.props.onLoadError;n&&n(t)})),(0,g.default)((0,h.default)(e),"findDocumentSource",(0,c.default)(l.default.mark((function t(){var n,r,i,a,c;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props.file){t.next=3;break}return t.abrupt("return",null);case 3:if("string"!=typeof n){t.next=9;break}if(!(0,x.isDataURI)(n)){t.next=7;break}return r=(0,x.dataURItoByteString)(n),t.abrupt("return",{data:r});case 7:return(0,x.displayCORSWarning)(),t.abrupt("return",{url:n});case 9:if(!(n instanceof D)){t.next=11;break}return t.abrupt("return",{range:n});case 11:if(!(0,x.isArrayBuffer)(n)){t.next=13;break}return t.abrupt("return",{data:n});case 13:if(!x.isBrowser){t.next=19;break}if(!(0,x.isBlob)(n)&&!(0,x.isFile)(n)){t.next=19;break}return t.next=17,(0,x.loadFromFile)(n);case 17:return t.t0=t.sent,t.abrupt("return",{data:t.t0});case 19:if("object"===(0,s.default)(n)){t.next=21;break}throw new Error("Invalid parameter in file, need either Uint8Array, string or a parameter object");case 21:if(n.url||n.data||n.range){t.next=23;break}throw new Error("Invalid parameter object: need either .data, .range or .url");case 23:if("string"!=typeof n.url){t.next=29;break}if(!(0,x.isDataURI)(n.url)){t.next=28;break}return i=n.url,a=(0,o.default)(n,["url"]),c=(0,x.dataURItoByteString)(i),t.abrupt("return",M({data:c},a));case 28:(0,x.displayCORSWarning)();case 29:return t.abrupt("return",n);case 30:case"end":return t.stop()}}),t)})))),(0,g.default)((0,h.default)(e),"registerPage",(function(t,n){e.pages[t]=n})),(0,g.default)((0,h.default)(e),"unregisterPage",(function(t){delete e.pages[t]})),e}return(0,d.default)(n,[{key:"componentDidMount",value:function(){this.loadDocument(),this.setupLinkService()}},{key:"componentDidUpdate",value:function(e){this.props.file!==e.file&&this.loadDocument()}},{key:"componentWillUnmount",value:function(){this.loadingTask&&this.loadingTask.destroy(),(0,x.cancelRunningTask)(this.runningTask)}},{key:"renderChildren",value:function(){var e=this.props.children;return(v.default.createElement(E.default.Provider,{value:this.childContext},e))}},{key:"renderContent",value:function(){var e=this.props.file,t=this.state.pdf;if(!e){var n=this.props.noData;return(v.default.createElement(S.default,{type:"no-data"},"function"==typeof n?n():n))}if(null===t){var r=this.props.loading;return(v.default.createElement(S.default,{type:"loading"},"function"==typeof r?r():r))}if(!1===t){var i=this.props.error;return(v.default.createElement(S.default,{type:"error"},"function"==typeof i?i():i))}return this.renderChildren()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.inputRef;return(v.default.createElement("div",(0,a.default)({className:(0,_.default)("react-pdf__Document",t),ref:n},this.eventProps),this.renderContent()))}},{key:"childContext",get:function(){var e=this.linkService,t=this.registerPage,n=this.unregisterPage,r=this.props,i=r.imageResourcesPath,a=r.renderMode,o=r.rotate;return{imageResourcesPath:i,linkService:e,pdf:this.state.pdf,registerPage:t,renderMode:a,rotate:o,unregisterPage:n}}},{key:"eventProps",get:function(){var e=this;return(0,y.default)(this.props,(function(){return e.state.pdf}))}}]),n}(v.PureComponent);t.default=N,N.defaultProps={error:"Failed to load PDF file.",loading:"Loading PDF…",noData:"No PDF file specified.",onPassword:function(e,t){switch(t){case T.default.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case T.default.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}}};var L=b.default.oneOfType([b.default.func,b.default.node]);N.propTypes=M(M({},O.eventProps),{},{children:b.default.node,className:O.isClassName,error:L,file:x.isFile,imageResourcesPath:b.default.string,inputRef:O.isRef,loading:L,noData:L,onItemClick:b.default.func,onLoadError:b.default.func,onLoadProgress:b.default.func,onLoadSuccess:b.default.func,onPassword:b.default.func,onSourceError:b.default.func,onSourceSuccess:b.default.func,rotate:b.default.number})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=void 0;var r=n(914);t.PDFLinkService=class{constructor({eventBus:e,externalLinkTarget:t=null,externalLinkRel:n=null,externalLinkEnabled:r=!0,ignoreDestinationZoom:i=!1}={}){this.eventBus=e,this.externalLinkTarget=t,this.externalLinkRel=n,this.externalLinkEnabled=r,this._ignoreDestinationZoom=i,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}setDocument(e,t=null){this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}setViewer(e){this.pdfViewer=e}setHistory(e){this.pdfHistory=e}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(e){this.pdfViewer.currentPageNumber=e}get rotation(){return this.pdfViewer.pagesRotation}set rotation(e){this.pdfViewer.pagesRotation=e}navigateTo(e){const t=({namedDest:n,explicitDest:r})=>{const i=r[0];let a;if(i instanceof Object){if(a=this._cachedPageNumber(i),null===a)return void this.pdfDocument.getPageIndex(i).then(e=>{this.cachePageRef(e+1,i),t({namedDest:n,explicitDest:r})}).catch(()=>{console.error(`PDFLinkService.navigateTo: "${i}" is not `+`a valid page reference, for dest="${e}".`)})}else{if(!Number.isInteger(i))return void console.error(`PDFLinkService.navigateTo: "${i}" is not `+`a valid destination reference, for dest="${e}".`);a=i+1}!a||a<1||a>this.pagesCount?console.error(`PDFLinkService.navigateTo: "${a}" is not `+`a valid page number, for dest="${e}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:n,explicitDest:r,pageNumber:a})),this.pdfViewer.scrollPageIntoView({pageNumber:a,destArray:r,ignoreDestinationZoom:this._ignoreDestinationZoom}))};new Promise((t,n)=>{"string"!=typeof e?t({namedDest:"",explicitDest:e}):this.pdfDocument.getDestination(e).then(n=>{t({namedDest:e,explicitDest:n})})}).then(n=>{Array.isArray(n.explicitDest)?t(n):console.error(`PDFLinkService.navigateTo: "${n.explicitDest}" is`+` not a valid destination array, for dest="${e}".`)})}getDestinationHash(e){if("string"==typeof e)return this.getAnchorUrl("#"+escape(e));if(Array.isArray(e)){const t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}getAnchorUrl(e){return(this.baseUrl||"")+e}setHash(e){let t,n;if(e.includes("=")){const i=(0,r.parseQueryString)(e);if("search"in i&&this.eventBus.dispatch("findfromurlhash",{source:this,query:i.search.replace(/"/g,""),phraseSearch:"true"===i.phrase}),"page"in i&&(t=0|i.page||1),"zoom"in i){const e=i.zoom.split(","),t=e[0],r=parseFloat(t);t.includes("Fit")?"Fit"===t||"FitB"===t?n=[null,{name:t}]:"FitH"===t||"FitBH"===t||"FitV"===t||"FitBV"===t?n=[null,{name:t},e.length>1?0|e[1]:null]:"FitR"===t?5!==e.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):n=[null,{name:t},0|e[1],0|e[2],0|e[3],0|e[4]]:console.error(`PDFLinkService.setHash: "${t}" is not `+"a valid zoom value."):n=[null,{name:"XYZ"},e.length>1?0|e[1]:null,e.length>2?0|e[2]:null,r?r/100:t]}n?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:n,allowNegativeOffset:!0}):t&&(this.page=t),"pagemode"in i&&this.eventBus.dispatch("pagemode",{source:this,mode:i.pagemode}),"nameddest"in i&&this.navigateTo(i.nameddest)}else{n=unescape(e);try{n=JSON.parse(n),Array.isArray(n)||(n=n.toString())}catch(e){}if("string"==typeof n||function(e){if(!Array.isArray(e))return!1;const t=e.length;if(t<2)return!1;const n=e[0];if(!("object"==typeof n&&Number.isInteger(n.num)&&Number.isInteger(n.gen)||Number.isInteger(n)&&n>=0))return!1;const r=e[1];if("object"!=typeof r||"string"!=typeof r.name)return!1;let i=!0;switch(r.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;i=!1;break;default:return!1}for(let n=2;n<t;n++){const t=e[n];if(!("number"==typeof t||i&&null===t))return!1}return!0}(n))return void this.navigateTo(n);console.error(`PDFLinkService.setHash: "${unescape(e)}" is not `+"a valid destination.")}}executeNamedAction(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page<this.pagesCount&&this.page++;break;case"PrevPage":this.page>1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:e})}cachePageRef(e,t){if(!t)return;const n=0===t.gen?`${t.num}R`:`${t.num}R${t.gen}`;this._pagesRefCache[n]=e}_cachedPageNumber(e){const t=0===e.gen?`${e.num}R`:`${e.num}R${e.gen}`;return this._pagesRefCache&&this._pagesRefCache[t]||null}isPageVisible(e){return this.pdfViewer.isPageVisible(e)}};t.SimpleLinkService=class{constructor(){this.externalLinkTarget=null,this.externalLinkRel=null,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=!1}get pagesCount(){return 0}get page(){return 0}set page(e){}get rotation(){return 0}set rotation(e){}navigateTo(e){}getDestinationHash(e){return"#"}getAnchorUrl(e){return"#"}setHash(e){}executeNamedAction(e){}cachePageRef(e,t){}isPageVisible(e){return!0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=new(n(914).EventBus);t.default=r},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.OutlineInternal=void 0;var a=i(n(31)),o=i(n(9)),s=i(n(60)),l=i(n(12)),c=i(n(15)),u=i(n(3)),d=i(n(13)),h=i(n(14)),f=i(n(10)),p=i(n(2)),m=r(n(0)),g=i(n(6)),v=i(n(313)),b=i(n(372)),y=i(n(510)),A=i(n(314)),_=i(n(915)),w=i(n(1428)),E=n(185),S=n(199);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,h.default)(this,n)}}var k=function(e){(0,d.default)(n,e);var t=T(n);function n(){var e;(0,l.default)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,p.default)((0,u.default)(e),"state",{outline:null}),(0,p.default)((0,u.default)(e),"loadOutline",(0,s.default)(o.default.mark((function t(){var n,r,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.pdf,e.setState((function(e){return e.outline?{outline:null}:null})),t.prev=2,r=(0,v.default)(n.getOutline()),e.runningTask=r,t.next=7,r.promise;case 7:i=t.sent,e.setState({outline:i},e.onLoadSuccess),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(2),e.onLoadError(t.t0);case 14:case"end":return t.stop()}}),t,null,[[2,11]])})))),(0,p.default)((0,u.default)(e),"onLoadSuccess",(function(){var t=e.props.onLoadSuccess,n=e.state.outline;t&&t(n)})),(0,p.default)((0,u.default)(e),"onLoadError",(function(t){e.setState({outline:!1}),(0,E.errorOnDev)(t);var n=e.props.onLoadError;n&&n(t)})),(0,p.default)((0,u.default)(e),"onItemClick",(function(t){var n=t.pageIndex,r=t.pageNumber,i=e.props.onItemClick;i&&i({pageIndex:n,pageNumber:r})})),e}return(0,c.default)(n,[{key:"componentDidMount",value:function(){if(!this.props.pdf)throw new Error("Attempted to load an outline, but no document was specified.");this.loadOutline()}},{key:"componentDidUpdate",value:function(e){var t=this.props.pdf;e.pdf&&t!==e.pdf&&this.loadOutline()}},{key:"componentWillUnmount",value:function(){(0,E.cancelRunningTask)(this.runningTask)}},{key:"renderOutline",value:function(){var e=this.state.outline;return(m.default.createElement("ul",null,e.map((function(e,t){return m.default.createElement(w.default,{key:"string"==typeof e.destination?e.destination:t,item:e})}))))}},{key:"render",value:function(){var e=this.props.pdf,t=this.state.outline;if(!e||!t)return null;var n=this.props,r=n.className,i=n.inputRef;return(m.default.createElement("div",(0,a.default)({className:(0,y.default)("react-pdf__Outline",r),ref:i},this.eventProps),m.default.createElement(_.default.Provider,{value:this.childContext},this.renderOutline())))}},{key:"childContext",get:function(){return{onClick:this.onItemClick}}},{key:"eventProps",get:function(){var e=this;return(0,b.default)(this.props,(function(){return e.state.outline}))}}]),n}(m.PureComponent);function x(e,t){return m.default.createElement(A.default.Consumer,null,(function(n){return m.default.createElement(k,(0,a.default)({ref:t},n,e))}))}t.OutlineInternal=k,k.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,p.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:S.isClassName,inputRef:S.isRef,onItemClick:g.default.func,onLoadError:g.default.func,onLoadSuccess:g.default.func,pdf:S.isPdf},S.eventProps);var O=m.default.forwardRef(x);t.default=O},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.OutlineItemInternal=void 0;var a=i(n(31)),o=i(n(40)),s=i(n(29)),l=i(n(9)),c=i(n(60)),u=i(n(12)),d=i(n(15)),h=i(n(3)),f=i(n(13)),p=i(n(14)),m=i(n(10)),g=i(n(2)),v=r(n(0)),b=i(n(6)),y=i(n(314)),A=i(n(915)),_=i(n(1429)),w=n(185),E=n(199);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,m.default)(e);if(t){var i=(0,m.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,p.default)(this,n)}}var C=function(e){(0,f.default)(n,e);var t=S(n);function n(){var e;(0,u.default)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,g.default)((0,h.default)(e),"getDestination",(0,c.default)(l.default.mark((function t(){var n,r,i;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props,r=n.item,i=n.pdf,(0,w.isDefined)(e.destination)){t.next=9;break}if("string"!=typeof r.dest){t.next=8;break}return t.next=5,i.getDestination(r.dest);case 5:e.destination=t.sent,t.next=9;break;case 8:e.destination=r.dest;case 9:return t.abrupt("return",e.destination);case 10:case"end":return t.stop()}}),t)})))),(0,g.default)((0,h.default)(e),"getPageIndex",(0,c.default)(l.default.mark((function t(){var n,r,i,a;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props.pdf,(0,w.isDefined)(e.pageIndex)){t.next=10;break}return t.next=4,e.getDestination();case 4:if(!(r=t.sent)){t.next=10;break}return i=(0,s.default)(r,1),a=i[0],t.next=9,n.getPageIndex(new _.default(a));case 9:e.pageIndex=t.sent;case 10:return t.abrupt("return",e.pageIndex);case 11:case"end":return t.stop()}}),t)})))),(0,g.default)((0,h.default)(e),"getPageNumber",(0,c.default)(l.default.mark((function t(){return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((0,w.isDefined)(e.pageNumber)){t.next=5;break}return t.next=3,e.getPageIndex();case 3:t.t0=t.sent,e.pageNumber=t.t0+1;case 5:return t.abrupt("return",e.pageNumber);case 6:case"end":return t.stop()}}),t)})))),(0,g.default)((0,h.default)(e),"onClick",function(){var t=(0,c.default)(l.default.mark((function t(n){var r,i,a;return l.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.props.onClick,n.preventDefault(),t.next=4,e.getPageIndex();case 4:return i=t.sent,t.next=7,e.getPageNumber();case 7:a=t.sent,r&&r({pageIndex:i,pageNumber:a});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return(0,d.default)(n,[{key:"renderSubitems",value:function(){var e=this.props,t=e.item,r=(0,o.default)(e,["item"]);if(!t.items||!t.items.length)return null;var i=t.items;return(v.default.createElement("ul",null,i.map((function(e,t){return v.default.createElement(n,(0,a.default)({key:"string"==typeof e.destination?e.destination:t,item:e},r))}))))}},{key:"render",value:function(){var e=this.props.item;return(v.default.createElement("li",null,v.default.createElement("a",{href:"#",onClick:this.onClick},e.title),this.renderSubitems()))}}]),n}(v.PureComponent);t.OutlineItemInternal=C;var T=b.default.oneOfType([b.default.string,b.default.arrayOf(b.default.any)]);C.propTypes={item:b.default.shape({dest:T,items:b.default.arrayOf(b.default.shape({dest:T,title:b.default.string})),title:b.default.string}).isRequired,onClick:b.default.func,pdf:E.isPdf.isRequired};var k=function(e){return v.default.createElement(y.default.Consumer,null,(function(t){return v.default.createElement(A.default.Consumer,null,(function(n){return v.default.createElement(C,(0,a.default)({},t,n,e))}))}))};t.default=k},function(e,t,n){"use strict";var r=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(12)),a=r(n(15)),o=function(){function e(t){var n=t.num,r=t.gen;(0,i.default)(this,e),this.num=n,this.gen=r}return(0,a.default)(e,[{key:"toString",value:function(){var e="".concat(this.num,"R");return 0!==this.gen&&(e+=this.gen),e}}]),e}();t.default=o},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PageInternal=void 0;var a=i(n(31)),o=i(n(9)),s=i(n(60)),l=i(n(12)),c=i(n(15)),u=i(n(3)),d=i(n(13)),h=i(n(14)),f=i(n(10)),p=i(n(2)),m=r(n(0)),g=i(n(6)),v=i(n(313)),b=i(n(372)),y=i(n(510)),A=i(n(916)),_=i(n(314)),w=i(n(269)),E=i(n(912)),S=i(n(1431)),C=i(n(1432)),T=i(n(1433)),k=i(n(1435)),x=n(185),O=n(199);function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){(0,p.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,h.default)(this,n)}}var D=function(e){(0,d.default)(n,e);var t=P(n);function n(){var e;(0,l.default)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,p.default)((0,u.default)(e),"state",{page:null}),(0,p.default)((0,u.default)(e),"onLoadSuccess",(function(){var t=e.props,n=t.onLoadSuccess,r=t.registerPage,i=e.state.page;n&&n((0,x.makePageCallback)(i,e.scale)),r&&r(e.pageIndex,e.ref)})),(0,p.default)((0,u.default)(e),"onLoadError",(function(t){(0,x.errorOnDev)(t);var n=e.props.onLoadError;n&&n(t)})),(0,p.default)((0,u.default)(e),"loadPage",(0,s.default)(o.default.mark((function t(){var n,r,i,a;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props.pdf,r=e.getPageNumber()){t.next=4;break}return t.abrupt("return");case 4:return e.setState((function(e){return e.page?{page:null}:null})),t.prev=5,i=(0,v.default)(n.getPage(r)),e.runningTask=i,t.next=10,i.promise;case 10:a=t.sent,e.setState({page:a},e.onLoadSuccess),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(5),e.setState({page:!1}),e.onLoadError(t.t0);case 18:case"end":return t.stop()}}),t,null,[[5,14]])})))),e}return(0,c.default)(n,[{key:"componentDidMount",value:function(){if(!this.props.pdf)throw new Error("Attempted to load a page, but no document was specified.");this.loadPage()}},{key:"componentDidUpdate",value:function(e){var t=this.props.pdf;if(e.pdf&&t!==e.pdf||this.getPageNumber()!==this.getPageNumber(e)){var n=this.props.unregisterPage;n&&n(this.getPageIndex(e)),this.loadPage()}}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterPage;e&&e(this.pageIndex),(0,x.cancelRunningTask)(this.runningTask)}},{key:"getPageIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return(0,x.isProvided)(e.pageNumber)?e.pageNumber-1:(0,x.isProvided)(e.pageIndex)?e.pageIndex:null}},{key:"getPageNumber",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return(0,x.isProvided)(e.pageNumber)?e.pageNumber:(0,x.isProvided)(e.pageIndex)?e.pageIndex+1:null}},{key:"renderMainLayer",value:function(){var e=this.props,t=e.canvasRef;switch(e.renderMode){case"none":return null;case"svg":return m.default.createElement(C.default,{key:"".concat(this.pageKeyNoScale,"_svg")});case"canvas":default:return m.default.createElement(S.default,{key:"".concat(this.pageKey,"_canvas"),canvasRef:t})}}},{key:"renderTextLayer",value:function(){var e=this.props.renderTextLayer;return e?m.default.createElement(T.default,{key:"".concat(this.pageKey,"_text")}):null}},{key:"renderAnnotationLayer",value:function(){var e=this.props.renderAnnotationLayer;return e?m.default.createElement(k.default,{key:"".concat(this.pageKey,"_annotations")}):null}},{key:"renderChildren",value:function(){var e=this.props.children;return(m.default.createElement(w.default.Provider,{value:this.childContext},this.renderMainLayer(),this.renderTextLayer(),this.renderAnnotationLayer(),e))}},{key:"renderContent",value:function(){var e=this.pageNumber,t=this.props.pdf,n=this.state.page;if(!e){var r=this.props.noData;return(m.default.createElement(E.default,{type:"no-data"},"function"==typeof r?r():r))}if(null===t||null===n){var i=this.props.loading;return(m.default.createElement(E.default,{type:"loading"},"function"==typeof i?i():i))}if(!1===t||!1===n){var a=this.props.error;return(m.default.createElement(E.default,{type:"error"},"function"==typeof a?a():a))}return this.renderChildren()}},{key:"render",value:function(){var e=this.pageNumber,t=this.props,n=t.className,r=t.inputRef;return m.default.createElement("div",(0,a.default)({className:(0,y.default)("react-pdf__Page",n),"data-page-number":e,ref:(0,A.default)(r,this.ref),style:{position:"relative"}},this.eventProps),this.renderContent())}},{key:"childContext",get:function(){var e=this.state.page;if(!e)return{};var t=this.props;return{customTextRenderer:t.customTextRenderer,onGetAnnotationsError:t.onGetAnnotationsError,onGetAnnotationsSuccess:t.onGetAnnotationsSuccess,onGetTextError:t.onGetTextError,onGetTextSuccess:t.onGetTextSuccess,onRenderAnnotationLayerError:t.onRenderAnnotationLayerError,onRenderAnnotationLayerSuccess:t.onRenderAnnotationLayerSuccess,onRenderError:t.onRenderError,onRenderSuccess:t.onRenderSuccess,page:e,renderInteractiveForms:t.renderInteractiveForms,rotate:this.rotate,scale:this.scale}}},{key:"pageIndex",get:function(){return this.getPageIndex()}},{key:"pageNumber",get:function(){return this.getPageNumber()}},{key:"rotate",get:function(){var e=this.props.rotate;if((0,x.isProvided)(e))return e;var t=this.state.page;return t?t.rotate:null}},{key:"scale",get:function(){var e=this.state.page;if(!e)return null;var t=this.props,n=t.scale,r=t.width,i=t.height,a=this.rotate,o=1,s=null===n?1:n;if(r||i){var l=e.getViewport({scale:1,rotation:a});o=r?r/l.width:i/l.height}return s*o}},{key:"eventProps",get:function(){var e=this;return(0,b.default)(this.props,(function(){var t=e.state.page;return t?(0,x.makePageCallback)(t,e.scale):t}))}},{key:"pageKey",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"@").concat(this.scale,"/").concat(this.rotate)}},{key:"pageKeyNoScale",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"/").concat(this.rotate)}}]),n}(m.PureComponent);t.PageInternal=D,D.defaultProps={error:"Failed to load the page.",loading:"Loading page…",noData:"No page specified.",renderAnnotationLayer:!0,renderInteractiveForms:!1,renderMode:"canvas",renderTextLayer:!0,scale:1};var N=g.default.oneOfType([g.default.func,g.default.node]);function L(e,t){return m.default.createElement(_.default.Consumer,null,(function(n){return m.default.createElement(D,(0,a.default)({ref:t},n,e))}))}D.propTypes=M(M({},O.eventProps),{},{children:g.default.node,className:O.isClassName,customTextRenderer:g.default.func,error:N,height:g.default.number,imageResourcesPath:g.default.string,inputRef:O.isRef,loading:N,noData:N,onGetTextError:g.default.func,onGetTextSuccess:g.default.func,onLoadError:g.default.func,onLoadSuccess:g.default.func,onRenderError:g.default.func,onRenderSuccess:g.default.func,pageIndex:O.isPageIndex,pageNumber:O.isPageNumber,pdf:O.isPdf,registerPage:g.default.func,renderAnnotationLayer:g.default.bool,renderInteractiveForms:g.default.bool,renderMode:O.isRenderMode,renderTextLayer:g.default.bool,rotate:O.isRotate,scale:g.default.number,unregisterPage:g.default.func,width:g.default.number});var R=m.default.forwardRef(L);t.default=R},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return f.default.createElement(g.default.Consumer,null,(function(t){return f.default.createElement(A,(0,a.default)({},t,e))}))},t.PageCanvasInternal=void 0;var a=i(n(31)),o=i(n(12)),s=i(n(15)),l=i(n(3)),c=i(n(13)),u=i(n(14)),d=i(n(10)),h=i(n(2)),f=r(n(0)),p=i(n(6)),m=i(n(916)),g=i(n(269)),v=n(185),b=n(199);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.default)(e);if(t){var i=(0,d.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,u.default)(this,n)}}var A=function(e){(0,c.default)(n,e);var t=y(n);function n(){var e;(0,o.default)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,h.default)((0,l.default)(e),"onRenderSuccess",(function(){e.renderer=null;var t=e.props,n=t.onRenderSuccess,r=t.page,i=t.scale;n&&n((0,v.makePageCallback)(r,i))})),(0,h.default)((0,l.default)(e),"onRenderError",(function(t){if(!(0,v.isCancelException)(t)){(0,v.errorOnDev)(t);var n=e.props.onRenderError;n&&n(t)}})),(0,h.default)((0,l.default)(e),"drawPageOnCanvas",(function(){var t=(0,l.default)(e).canvasLayer;if(!t)return null;var n=(0,l.default)(e),r=n.renderViewport,i=n.viewport,a=e.props,o=a.page,s=a.renderInteractiveForms;t.width=r.width,t.height=r.height,t.style.width="".concat(Math.floor(i.width),"px"),t.style.height="".concat(Math.floor(i.height),"px");var c={get canvasContext(){return t.getContext("2d")},viewport:r,renderInteractiveForms:s};return e.cancelRenderingTask(),e.renderer=o.render(c),e.renderer.promise.then(e.onRenderSuccess).catch(e.onRenderError)})),e}return(0,s.default)(n,[{key:"componentDidMount",value:function(){this.drawPageOnCanvas()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.page;t.renderInteractiveForms!==e.renderInteractiveForms&&(n.cleanup(),this.drawPageOnCanvas())}},{key:"componentWillUnmount",value:function(){this.cancelRenderingTask(),this.canvasLayer&&(this.canvasLayer.width=0,this.canvasLayer.height=0,this.canvasLayer=null)}},{key:"cancelRenderingTask",value:function(){this.renderer&&this.renderer._internalRenderTask.running&&this.renderer._internalRenderTask.cancel()}},{key:"render",value:function(){var e=this,t=this.props.canvasRef;return f.default.createElement("canvas",{className:"react-pdf__Page__canvas",dir:"ltr",ref:(0,m.default)(t,(function(t){e.canvasLayer=t})),style:{display:"block",userSelect:"none"}})}},{key:"renderViewport",get:function(){var e=this.props,t=e.page,n=e.rotate,r=e.scale,i=(0,v.getPixelRatio)();return t.getViewport({scale:r*i,rotation:n})}},{key:"viewport",get:function(){var e=this.props,t=e.page,n=e.rotate,r=e.scale;return t.getViewport({scale:r,rotation:n})}}]),n}(f.PureComponent);t.PageCanvasInternal=A,A.propTypes={canvasRef:b.isRef,onRenderError:p.default.func,onRenderSuccess:p.default.func,page:b.isPage.isRequired,renderInteractiveForms:p.default.bool,rotate:b.isRotate,scale:p.default.number}},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return f.default.createElement(g.default.Consumer,null,(function(t){return f.default.createElement(A,(0,a.default)({},t,e))}))},t.PageSVGInternal=void 0;var a=i(n(31)),o=i(n(12)),s=i(n(15)),l=i(n(3)),c=i(n(13)),u=i(n(14)),d=i(n(10)),h=i(n(2)),f=r(n(0)),p=i(n(6)),m=r(n(371)),g=i(n(269)),v=n(185),b=n(199);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.default)(e);if(t){var i=(0,d.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,u.default)(this,n)}}var A=function(e){(0,c.default)(n,e);var t=y(n);function n(){var e;(0,o.default)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,h.default)((0,l.default)(e),"state",{svg:null}),(0,h.default)((0,l.default)(e),"onRenderSuccess",(function(){e.renderer=null;var t=e.props,n=t.onRenderSuccess,r=t.page,i=t.scale;n&&n((0,v.makePageCallback)(r,i))})),(0,h.default)((0,l.default)(e),"onRenderError",(function(t){if(!(0,v.isCancelException)(t)){(0,v.errorOnDev)(t);var n=e.props.onRenderError;n&&n(t)}})),(0,h.default)((0,l.default)(e),"renderSVG",(function(){var t=e.props.page;return e.renderer=t.getOperatorList(),e.renderer.then((function(n){var r=new m.SVGGraphics(t.commonObjs,t.objs);e.renderer=r.getSVG(n,e.viewport).then((function(t){e.setState({svg:t},e.onRenderSuccess)})).catch(e.onRenderError)})).catch(e.onRenderError)})),(0,h.default)((0,l.default)(e),"drawPageOnContainer",(function(t){var n=e.state.svg;if(t&&n){t.firstElementChild||t.appendChild(n);var r=e.viewport,i=r.width,a=r.height;n.setAttribute("width",i),n.setAttribute("height",a)}})),e}return(0,s.default)(n,[{key:"componentDidMount",value:function(){this.renderSVG()}},{key:"render",value:function(){var e=this,t=this.viewport,n=t.width,r=t.height;return f.default.createElement("div",{className:"react-pdf__Page__svg",ref:function(t){return e.drawPageOnContainer(t)},style:{display:"block",backgroundColor:"white",overflow:"hidden",width:n,height:r,userSelect:"none"}})}},{key:"viewport",get:function(){var e=this.props,t=e.page,n=e.rotate,r=e.scale;return t.getViewport({scale:r,rotation:n})}}]),n}(f.PureComponent);t.PageSVGInternal=A,A.propTypes={onRenderError:p.default.func,onRenderSuccess:p.default.func,page:b.isPage.isRequired,rotate:b.isRotate,scale:p.default.number}},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return m.default.createElement(b.default.Consumer,null,(function(t){return m.default.createElement(E,(0,a.default)({},t,e))}))},t.TextLayerInternal=void 0;var a=i(n(31)),o=i(n(9)),s=i(n(60)),l=i(n(12)),c=i(n(15)),u=i(n(3)),d=i(n(13)),h=i(n(14)),f=i(n(10)),p=i(n(2)),m=r(n(0)),g=i(n(6)),v=i(n(313)),b=i(n(269)),y=i(n(1434)),A=n(185),_=n(199);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,h.default)(this,n)}}var E=function(e){(0,d.default)(n,e);var t=w(n);function n(){var e;(0,l.default)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,p.default)((0,u.default)(e),"state",{textItems:null}),(0,p.default)((0,u.default)(e),"loadTextItems",(0,s.default)(o.default.mark((function t(){var n,r,i,a;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.page,t.prev=1,r=(0,v.default)(n.getTextContent()),e.runningTask=r,t.next=6,r.promise;case 6:i=t.sent,a=i.items,e.setState({textItems:a},e.onLoadSuccess),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.onLoadError(t.t0);case 14:case"end":return t.stop()}}),t,null,[[1,11]])})))),(0,p.default)((0,u.default)(e),"onLoadSuccess",(function(){var t=e.props.onGetTextSuccess,n=e.state.textItems;t&&t(n)})),(0,p.default)((0,u.default)(e),"onLoadError",(function(t){e.setState({textItems:!1}),(0,A.errorOnDev)(t);var n=e.props.onGetTextError;n&&n(t)})),e}return(0,c.default)(n,[{key:"componentDidMount",value:function(){if(!this.props.page)throw new Error("Attempted to load page text content, but no page was specified.");this.loadTextItems()}},{key:"componentDidUpdate",value:function(e){var t=this.props.page;e.page&&t!==e.page&&this.loadTextItems()}},{key:"componentWillUnmount",value:function(){(0,A.cancelRunningTask)(this.runningTask)}},{key:"renderTextItems",value:function(){var e=this.state.textItems;return e?e.map((function(e,t){return m.default.createElement(y.default,(0,a.default)({key:t,itemIndex:t},e))})):null}},{key:"render",value:function(){var e=this.unrotatedViewport,t=this.rotate;return(m.default.createElement("div",{className:"react-pdf__Page__textContent",style:{position:"absolute",top:"50%",left:"50%",width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),color:"transparent",transform:"translate(-50%, -50%) rotate(".concat(t,"deg)"),WebkitTransform:"translate(-50%, -50%) rotate(".concat(t,"deg)"),pointerEvents:"none"}},this.renderTextItems()))}},{key:"unrotatedViewport",get:function(){var e=this.props,t=e.page,n=e.scale;return t.getViewport({scale:n})}},{key:"rotate",get:function(){var e=this.props,t=e.page;return e.rotate-t.rotate}}]),n}(m.PureComponent);t.TextLayerInternal=E,E.propTypes={onGetTextError:g.default.func,onGetTextSuccess:g.default.func,page:_.isPage.isRequired,rotate:_.isRotate,scale:g.default.number}},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return g.default.createElement(b.default.Consumer,null,(function(t){return g.default.createElement(_,(0,a.default)({},t,e))}))},t.TextLayerItemInternal=void 0;var a=i(n(31)),o=i(n(29)),s=i(n(9)),l=i(n(60)),c=i(n(12)),u=i(n(15)),d=i(n(3)),h=i(n(13)),f=i(n(14)),p=i(n(10)),m=i(n(2)),g=r(n(0)),v=i(n(6)),b=i(n(269)),y=n(199);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,p.default)(e);if(t){var i=(0,p.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,f.default)(this,n)}}var _=function(e){(0,h.default)(i,e);var t,n,r=A(i);function i(){var e;(0,c.default)(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),(0,m.default)((0,d.default)(e),"getElementWidth",(function(t){var n=(0,d.default)(e).sideways;return t.getBoundingClientRect()[n?"height":"width"]})),e}return(0,u.default)(i,[{key:"componentDidMount",value:function(){this.alignTextItem()}},{key:"componentDidUpdate",value:function(){this.alignTextItem()}},{key:"getFontData",value:(n=(0,l.default)(s.default.mark((function e(t){var n,r;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props.page,e.next=3,new Promise((function(e){n.commonObjs.get(t,e)}));case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"alignTextItem",value:(t=(0,l.default)(s.default.mark((function e(){var t,n,r,i,a,o,l,c,u,d,h;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.item){e.next=3;break}return e.abrupt("return");case 3:return t.style.transform="",n=this.props,r=n.fontName,i=n.scale,a=n.width,t.style.fontFamily="".concat(r,", sans-serif"),e.next=8,this.getFontData(r);case 8:o=e.sent,l=o?o.fallbackName:"sans-serif",t.style.fontFamily="".concat(r,", ").concat(l),c=a*i,u=this.getElementWidth(t),d="scaleX(".concat(c/u,")"),(h=o?o.ascent:0)&&(d+=" translateY(".concat(100*(1-h),"%)")),t.style.transform=d,t.style.WebkitTransform=d;case 18:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.fontSize,n=this.top,r=this.left,i=this.props,a=i.customTextRenderer,o=i.scale,s=i.str;return g.default.createElement("span",{ref:function(t){e.item=t},style:{height:"1em",fontFamily:"sans-serif",fontSize:"".concat(t*o,"px"),position:"absolute",top:"".concat(n*o,"px"),left:"".concat(r*o,"px"),transformOrigin:"left bottom",whiteSpace:"pre",pointerEvents:"all"}},a?a(this.props):s)}},{key:"unrotatedViewport",get:function(){var e=this.props,t=e.page,n=e.scale;return t.getViewport({scale:n})}},{key:"rotate",get:function(){var e=this.props,t=e.page;return e.rotate-t.rotate}},{key:"sideways",get:function(){return this.rotate%180!=0}},{key:"defaultSideways",get:function(){return this.unrotatedViewport.rotation%180!=0}},{key:"fontSize",get:function(){var e=this.props.transform,t=this.defaultSideways,n=(0,o.default)(e,2),r=n[0],i=n[1];return t?i:r}},{key:"top",get:function(){var e=this.props.transform,t=this.unrotatedViewport,n=this.defaultSideways,r=(0,o.default)(e,6),i=r[2],a=r[3],s=r[4],l=r[5],c=(0,o.default)(t.viewBox,4),u=c[1],d=c[3];return n?s+i+u:d-(l+a)}},{key:"left",get:function(){var e=this.props.transform,t=this.unrotatedViewport,n=this.defaultSideways,r=(0,o.default)(e,6),i=r[4],a=r[5],s=(0,o.default)(t.viewBox,1)[0];return n?a-s:i-s}}]),i}(g.PureComponent);t.TextLayerItemInternal=_,_.propTypes={customTextRenderer:v.default.func,fontName:v.default.string.isRequired,itemIndex:v.default.number.isRequired,page:y.isPage.isRequired,rotate:y.isRotate,scale:v.default.number,str:v.default.string.isRequired,transform:v.default.arrayOf(v.default.number).isRequired,width:v.default.number.isRequired}},function(e,t,n){"use strict";var r=n(184),i=n(147);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.AnnotationLayerInternal=void 0;var a=i(n(31)),o=i(n(9)),s=i(n(60)),l=i(n(12)),c=i(n(15)),u=i(n(3)),d=i(n(13)),h=i(n(14)),f=i(n(10)),p=i(n(2)),m=r(n(0)),g=i(n(6)),v=r(n(371)),b=i(n(313)),y=i(n(314)),A=i(n(269)),_=n(185),w=n(199);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,h.default)(this,n)}}var S=function(e){(0,d.default)(n,e);var t=E(n);function n(){var e;(0,l.default)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,p.default)((0,u.default)(e),"state",{annotations:null}),(0,p.default)((0,u.default)(e),"loadAnnotations",(0,s.default)(o.default.mark((function t(){var n,r,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.page,t.prev=1,r=(0,b.default)(n.getAnnotations()),e.runningTask=r,t.next=6,r.promise;case 6:i=t.sent,e.setState({annotations:i},e.onLoadSuccess),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),e.onLoadError(t.t0);case 13:case"end":return t.stop()}}),t,null,[[1,10]])})))),(0,p.default)((0,u.default)(e),"onLoadSuccess",(function(){var t=e.props.onGetAnnotationsSuccess,n=e.state.annotations;t&&t(n)})),(0,p.default)((0,u.default)(e),"onLoadError",(function(t){e.setState({annotations:!1}),(0,_.errorOnDev)(t);var n=e.props.onGetAnnotationsError;n&&n(t)})),(0,p.default)((0,u.default)(e),"onRenderSuccess",(function(){var t=e.props.onRenderAnnotationLayerSuccess;t&&t()})),(0,p.default)((0,u.default)(e),"onRenderError",(function(t){(0,_.errorOnDev)(t);var n=e.props.onRenderAnnotationLayerError;n&&n(t)})),e}return(0,c.default)(n,[{key:"componentDidMount",value:function(){if(!this.props.page)throw new Error("Attempted to load page annotations, but no page was specified.");this.loadAnnotations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.page,r=t.renderInteractiveForms;(e.page&&n!==e.page||r!==e.renderInteractiveForms)&&this.loadAnnotations()}},{key:"componentWillUnmount",value:function(){(0,_.cancelRunningTask)(this.runningTask)}},{key:"renderAnnotationLayer",value:function(){var e=this.state.annotations;if(e){var t=this.props,n=t.imageResourcesPath,r=t.linkService,i=t.page,a=t.renderInteractiveForms,o=this.viewport.clone({dontFlip:!0}),s={annotations:e,div:this.annotationLayer,imageResourcesPath:n,linkService:r,page:i,renderInteractiveForms:a,viewport:o};this.annotationLayer.innerHTML="";try{v.AnnotationLayer.render(s),this.onRenderSuccess()}catch(e){this.onRenderError(e)}}}},{key:"render",value:function(){var e=this;return(m.default.createElement("div",{className:"react-pdf__Page__annotations annotationLayer",ref:function(t){e.annotationLayer=t}},this.renderAnnotationLayer()))}},{key:"viewport",get:function(){var e=this.props,t=e.page,n=e.rotate,r=e.scale;return t.getViewport({scale:r,rotation:n})}}]),n}(m.PureComponent);t.AnnotationLayerInternal=S,S.propTypes={imageResourcesPath:g.default.string,linkService:w.isLinkService.isRequired,onGetAnnotationsError:g.default.func,onGetAnnotationsSuccess:g.default.func,onRenderAnnotationLayerError:g.default.func,onRenderAnnotationLayerSuccess:g.default.func,page:w.isPage,renderInteractiveForms:g.default.bool,rotate:w.isRotate,scale:g.default.number};var C=function(e){return m.default.createElement(y.default.Consumer,null,(function(t){return m.default.createElement(A.default.Consumer,null,(function(n){return m.default.createElement(S,(0,a.default)({},t,n,e))}))}))};t.default=C},function(e,t,n){"use strict";function r(){return new Worker(n.p+"scripts/bundle.94e3eabe05c5fe12704f.worker.js")}n.r(t),n.d(t,"default",(function(){return r}))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){"use strict";var r=n(1439),i=n(1440),a=n(1441),o=n(1442),s=n(1443),l=n(1445);e.exports=function e(){var t,n=[],i=s(),b={},y=-1;return A.data=function(e,n){if("string"==typeof e)return 2===arguments.length?(m("data",t),b[e]=n,A):u.call(b,e)&&b[e]||null;if(e)return m("data",t),b=e,A;return b},A.freeze=_,A.attachers=n,A.use=function(e){var r;if(m("use",t),null==e);else if("function"==typeof e)u.apply(null,arguments);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?l(e):i(e)}r&&(b.settings=a(b.settings||{},r));return A;function i(e){l(e.plugins),e.settings&&(r=a(r||{},e.settings))}function s(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u.apply(null,e):i(e)}}function l(e){var t=-1;if(null==e);else{if(!("object"==typeof e&&"length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)s(e[t])}}function u(e,t){var r=w(e);r?(o(r[1])&&o(t)&&(t=a(!0,r[1],t)),r[1]=t):n.push(c.call(arguments))}},A.parse=function(e){var t,n=l(e);if(_(),f("parse",t=A.Parser),h(t,"parse"))return new t(String(n),n).parse();return t(String(n),n)},A.stringify=function(e,t){var n,r=l(t);if(_(),p("stringify",n=A.Compiler),g(e),h(n,"compile"))return new n(e,r).compile();return n(e,r)},A.run=E,A.runSync=function(e,t){var n,i;return E(e,t,(function(e,t){i=!0,n=t,r(e)})),v("runSync","run",i),n},A.process=S,A.processSync=function(e){var t,n;return _(),f("processSync",A.Parser),p("processSync",A.Compiler),S(t=l(e),(function(e){n=!0,r(e)})),v("processSync","process",n),t},A;function A(){for(var t=e(),r=-1;++r<n.length;)t.use.apply(null,n[r]);return t.data(a(!0,{},b)),t}function _(){var e,r;if(t)return A;for(;++y<n.length;)!1!==(e=n[y])[1]&&(!0===e[1]&&(e[1]=void 0),"function"==typeof(r=e[0].apply(A,e.slice(1)))&&i.use(r));return t=!0,y=1/0,A}function w(e){for(var t=-1;++t<n.length;)if(n[t][0]===e)return n[t]}function E(e,t,n){if(g(e),_(),n||"function"!=typeof t||(n=t,t=null),!n)return new Promise(r);function r(r,a){i.run(e,l(t),(function(t,i,o){i=i||e,t?a(t):r?r(i):n(null,i,o)}))}r(null,n)}function S(e,t){if(_(),f("process",A.Parser),p("process",A.Compiler),!t)return new Promise(n);function n(n,r){var i=l(e);d.run(A,{file:i},(function(e){e?r(e):n?n(i):t(null,i)}))}n(null,t)}}().freeze();var c=[].slice,u={}.hasOwnProperty,d=s().use((function(e,t){t.tree=e.parse(t.file)})).use((function(e,t,n){e.run(t.tree,t.file,(function(e,r,i){e?n(e):(t.tree=r,t.file=i,n())}))})).use((function(e,t){var n=e.stringify(t.tree,t.file);null==n||("string"==typeof n||i(n)?t.file.contents=n:t.file.result=n)}));function h(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)return!0;return!1}(e.prototype)||t in e.prototype)}function f(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Parser`")}function p(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Compiler`")}function m(e,t){if(t)throw new Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function g(e){if(!e||"string"!=typeof e.type)throw new Error("Expected node, got `"+e+"`")}function v(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}},function(e,t,n){"use strict";e.exports=function(e){if(e)throw e}},function(e,t){
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!a)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(o)return o(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,a,o,d=arguments[0],h=1,f=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<f;++h)if(null!=(t=arguments[h]))for(n in t)r=u(d,n),d!==(i=u(t,n))&&(p&&i&&(l(i)||(a=s(i)))?(a?(a=!1,o=r&&s(r)?r:[]):o=r&&l(r)?r:{},c(d,{name:n,newValue:e(p,o,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},function(e,t,n){"use strict";var r=n(1444);e.exports=a,a.wrap=r;var i=[].slice;function a(){var e=[],t={run:function(){var t=-1,n=i.call(arguments,0,-1),a=arguments[arguments.length-1];if("function"!=typeof a)throw new Error("Expected function as last argument, not "+a);function o(s){var l=e[++t],c=i.call(arguments,0),u=c.slice(1),d=n.length,h=-1;if(s)a(s);else{for(;++h<d;)null!==u[h]&&void 0!==u[h]||(u[h]=n[h]);n=u,l?r(l,o).apply(null,n):a.apply(null,[null].concat(n))}}o.apply(null,[null].concat(n))},use:function(n){if("function"!=typeof n)throw new Error("Expected `fn` to be a function, not "+n);return e.push(n),t}};return t}},function(e,t,n){"use strict";var r=[].slice;e.exports=function(e,t){var n;return function(){var t,o=r.call(arguments,0),s=e.length>o.length;s&&o.push(i);try{t=e.apply(null,o)}catch(e){if(s&&n)throw e;return i(e)}s||(t&&"function"==typeof t.then?t.then(a,i):t instanceof Error?i(t):a(t))};function i(){n||(n=!0,t.apply(null,arguments))}function a(e){i(null,e)}}},function(e,t,n){"use strict";e.exports=n(1446)},function(e,t,n){"use strict";var r=n(1447),i=n(1448);e.exports=i,i.prototype.message=function(e,t,n){var i=new r(e,t,n);this.path&&(i.name=this.path+":"+i.name,i.file=this.path);return i.fatal=!1,this.messages.push(i),i},i.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},i.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}},function(e,t,n){"use strict";var r=n(918);function i(){}e.exports=o,i.prototype=Error.prototype,o.prototype=new i;var a=o.prototype;function o(e,t,n){var i,a,o;"string"==typeof t&&(n=t,t=null),i=function(e){var t,n=[null,null];"string"==typeof e&&(-1===(t=e.indexOf(":"))?n[1]=e:(n[0]=e.slice(0,t),n[1]=e.slice(t+1)));return n}(n),a=r(t)||"1:1",o={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(o=t,t=t.start):o.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=a,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=o,this.source=i[0],this.ruleId=i[1]}a.file="",a.name="",a.reason="",a.message="",a.stack="",a.fatal=null,a.column=null,a.line=null},function(e,t,n){"use strict";var r=n(1449),i=n(1450),a=n(1451);e.exports=l;var o={}.hasOwnProperty,s=["history","path","basename","stem","extname","dirname"];function l(e){var t,n;if(e){if("string"==typeof e||a(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof l))return new l(e);for(this.data={},this.messages=[],this.history=[],this.cwd=i.cwd(),n=-1;++n<s.length;)t=s[n],o.call(e,t)&&(this[t]=e[t]);for(t in e)s.indexOf(t)<0&&(this[t]=e[t])}function c(e,t){if(e&&e.indexOf(r.sep)>-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+r.sep+"`")}function u(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function d(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}l.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(l.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){u(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(l.prototype,"dirname",{get:function(){return"string"==typeof this.path?r.dirname(this.path):void 0},set:function(e){d(this.path,"dirname"),this.path=r.join(e||"",this.basename)}}),Object.defineProperty(l.prototype,"basename",{get:function(){return"string"==typeof this.path?r.basename(this.path):void 0},set:function(e){u(e,"basename"),c(e,"basename"),this.path=r.join(this.dirname||"",e)}}),Object.defineProperty(l.prototype,"extname",{get:function(){return"string"==typeof this.path?r.extname(this.path):void 0},set:function(e){if(c(e,"extname"),d(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=r.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(l.prototype,"stem",{get:function(){return"string"==typeof this.path?r.basename(this.path,this.extname):void 0},set:function(e){u(e,"stem"),c(e,"stem"),this.path=r.join(this.dirname||"",e+(this.extname||""))}})},function(e,t,n){"use strict";function r(e){var t,n;return i(e),t=47===e.charCodeAt(0),(n=function(e,t){var n,r,i="",a=0,o=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(o===l-1||1===s);else if(o!==l-1&&2===s){if(i.length<2||2!==a||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),o=l,s=0;continue}}else if(i.length){i="",a=0,o=l,s=0;continue}t&&(i=i.length?i+"/..":"..",a=2)}else i.length?i+="/"+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t)).length||t||(n="."),n.length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function i(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}t.basename=function(e,t){var n,r,a,o,s=0,l=-1;if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');if(i(e),n=e.length,void 0===t||!t.length||t.length>e.length){for(;n--;)if(47===e.charCodeAt(n)){if(a){s=n+1;break}}else l<0&&(a=!0,l=n+1);return l<0?"":e.slice(s,l)}if(t===e)return"";r=-1,o=t.length-1;for(;n--;)if(47===e.charCodeAt(n)){if(a){s=n+1;break}}else r<0&&(a=!0,r=n+1),o>-1&&(e.charCodeAt(n)===t.charCodeAt(o--)?o<0&&(l=n):(o=-1,l=r));s===l?l=r:l<0&&(l=e.length);return e.slice(s,l)},t.dirname=function(e){var t,n,r;if(i(e),!e.length)return".";t=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(n){t=r;break}}else n||(n=!0);return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)},t.extname=function(e){var t,n,r,a=-1,o=0,s=-1,l=0;i(e),r=e.length;for(;r--;)if(47!==(n=e.charCodeAt(r)))s<0&&(t=!0,s=r+1),46===n?a<0?a=r:1!==l&&(l=1):a>-1&&(l=-1);else if(t){o=r+1;break}if(a<0||s<0||0===l||1===l&&a===s-1&&a===o+1)return"";return e.slice(a,s)},t.join=function(){var e,t=-1;for(;++t<arguments.length;)i(arguments[t]),arguments[t]&&(e=void 0===e?arguments[t]:e+"/"+arguments[t]);return void 0===e?".":r(e)},t.sep="/"},function(e,t,n){"use strict";t.cwd=function(){return"/"}},function(e,t){
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";e.exports=function(e){var t=this;this.Parser=function(n){return r(n,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var r=n(1453)},function(e,t,n){"use strict";e.exports=n(1454)},function(e,t,n){"use strict";e.exports=function(e,t,n){"string"!=typeof t&&(n=t,t=void 0);return function(e){var t=e||{},n=function(e,t){var n=-1;for(;++n<t.length;)f(e,t[n]);return e}({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:g(I),autolinkProtocol:w,autolinkEmail:w,atxHeading:g(k),blockQuote:g((function(){return{type:"blockquote",children:[]}})),characterEscape:w,characterReference:w,codeFenced:g(T),codeFencedFenceInfo:v,codeFencedFenceMeta:v,codeIndented:g(T,v),codeText:g((function(){return{type:"inlineCode",value:""}}),v),codeTextData:w,data:w,codeFlowValue:w,definition:g((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:v,definitionLabelString:v,definitionTitleString:v,emphasis:g((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:g(x),hardBreakTrailing:g(x),htmlFlow:g(O,v),htmlFlowData:w,htmlText:g(O,v),htmlTextData:w,image:g((function(){return{type:"image",title:null,url:"",alt:null}})),label:v,link:g(I),listItem:g((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){p("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=parseInt(this.sliceSerialize(e),10),u("expectingFirstListItemValue"))},listOrdered:g(M,(function(){u("expectingFirstListItemValue",!0)})),listUnordered:g(M),paragraph:g((function(){return{type:"paragraph",children:[]}})),reference:function(){u("referenceType","collapsed")},referenceString:v,resourceDestinationString:v,resourceTitleString:v,setextHeading:g(k),strong:g((function(){return{type:"strong",children:[]}})),thematicBreak:g((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:y(),atxHeadingSequence:function(e){this.stack[this.stack.length-1].depth||(this.stack[this.stack.length-1].depth=this.sliceSerialize(e).length)},autolink:y(),autolinkEmail:function(e){E.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){E.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:y(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:C,characterReferenceMarkerNumeric:C,characterReferenceValue:function(e){var t,n,r=this.sliceSerialize(e),i=p("characterReferenceType");i?(t=s(r,"characterReferenceMarkerNumeric"===i?10:16),u("characterReferenceType")):t=d(r);(n=this.stack.pop()).value+=t,n.position.end=m(e.end)},codeFenced:y((function(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),u("flowCodeInside")})),codeFencedFence:function(){if(p("flowCodeInside"))return;this.buffer(),u("flowCodeInside",!0)},codeFencedFenceInfo:function(){var e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){var e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:E,codeIndented:y((function(){var e=this.resume();this.stack[this.stack.length-1].value=e})),codeText:y((function(){var e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:E,data:E,definition:y(),definitionDestinationString:function(){var e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=o(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){var e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:y(),hardBreakEscape:y(S),hardBreakTrailing:y(S),htmlFlow:y((function(){var e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:E,htmlText:y((function(){var e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:E,image:y((function(){var e=this.stack[this.stack.length-1];p("inReference")?(e.type+="Reference",e.referenceType=p("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType);u("referenceType")})),label:function(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,u("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t},labelText:function(e){this.stack[this.stack.length-2].identifier=o(this.sliceSerialize(e)).toLowerCase()},lineEnding:function(e){var t=this.stack[this.stack.length-1];if(p("atHardBreak"))return t.children[t.children.length-1].position.end=m(e.end),void u("atHardBreak");!p("setextHeadingSlurpLineEnding")&&n.canContainEols.indexOf(t.type)>-1&&(w.call(this,e),E.call(this,e))},link:y((function(){var e=this.stack[this.stack.length-1];p("inReference")?(e.type+="Reference",e.referenceType=p("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType);u("referenceType")})),listItem:y(),listOrdered:y(),listUnordered:y(),paragraph:y(),referenceString:function(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=o(this.sliceSerialize(e)).toLowerCase(),u("referenceType","full")},resourceDestinationString:function(){var e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){var e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){u("inReference")},setextHeading:y((function(){u("setextHeadingSlurpLineEnding")})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){u("setextHeadingSlurpLineEnding",!0)},strong:y(),thematicBreak:y()}},t.mdastExtensions||[]),l={};return function(e){var t,r,o={type:"root",children:[]},s=[],l=[],d=-1,f={stack:[o],tokenStack:s,config:n,enter:b,exit:A,buffer:v,resume:_,setData:u,getData:p};for(;++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?l.push(d):(r=l.pop(d),d=c(e,r,d)));d=-1;for(;++d<e.length;)t=n[e[d][0]],a.call(t,e[d][1].type)&&t[e[d][1].type].call(i({sliceSerialize:e[d][2].sliceSerialize},f),e[d][1]);if(s.length)throw new Error("Cannot close document, a token (`"+s[s.length-1].type+"`, "+h({start:s[s.length-1].start,end:s[s.length-1].end})+") is still open");o.position={start:m(e.length?e[0][1].start:{line:1,column:1,offset:0}),end:m(e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;for(;++d<n.transforms.length;)o=n.transforms[d](o)||o;return o};function c(e,t,n){for(var r,i,a,o,s,l,c,u=t-1,d=-1,h=!1;++u<=n;)if("listUnordered"===(s=e[u])[1].type||"listOrdered"===s[1].type||"blockQuote"===s[1].type?("enter"===s[0]?d++:d--,c=void 0):"lineEndingBlank"===s[1].type?"enter"===s[0]&&(!r||c||d||l||(l=u),c=void 0):"linePrefix"===s[1].type||"listItemValue"===s[1].type||"listItemMarker"===s[1].type||"listItemPrefix"===s[1].type||"listItemPrefixWhitespace"===s[1].type||(c=void 0),!d&&"enter"===s[0]&&"listItemPrefix"===s[1].type||-1===d&&"exit"===s[0]&&("listUnordered"===s[1].type||"listOrdered"===s[1].type)){if(r){for(i=u,a=void 0;i--;)if("lineEnding"===(o=e[i])[1].type||"lineEndingBlank"===o[1].type){if("exit"===o[0])continue;a&&(e[a][1].type="lineEndingBlank",h=!0),o[1].type="lineEnding",a=i}else if("linePrefix"!==o[1].type&&"blockQuotePrefix"!==o[1].type&&"blockQuotePrefixWhitespace"!==o[1].type&&"blockQuoteMarker"!==o[1].type&&"listItemIndent"!==o[1].type)break;l&&(!a||l<a)&&(r._spread=!0),r.end=m(a?e[a][1].start:s[1].end),e.splice(a||u,0,["exit",r,s[2]]),u++,n++}"listItemPrefix"===s[1].type&&(r={type:"listItem",_spread:!1,start:m(s[1].start)},e.splice(u,0,["enter",r,s[2]]),u++,n++,l=void 0,c=!0)}return e[t][1]._spread=h,n}function u(e,t){l[e]=t}function p(e){return l[e]}function m(e){return{line:e.line,column:e.column,offset:e.offset}}function g(e,t){return function(n){b.call(this,e(n),n),t&&t.call(this,n)}}function v(){this.stack.push({type:"fragment",children:[]})}function b(e,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push(t),e.position={start:m(t.start)},e}function y(e){return function(t){e&&e.call(this,t);A.call(this,t)}}function A(e){var t=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+h({start:e.start,end:e.end})+"): it’s not open");if(n.type!==e.type)throw new Error("Cannot close `"+e.type+"` ("+h({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+h({start:n.start,end:n.end})+") is open");return t.position.end=m(e.end),t}function _(){return r(this.stack.pop())}function w(e){var t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:m(e.start)},this.stack[this.stack.length-1].children.push(n)),this.stack.push(n)}function E(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=m(e.end)}function S(){u("atHardBreak",!0)}function C(e){u("characterReferenceType",e.type)}function T(){return{type:"code",lang:null,meta:null,value:""}}function k(){return{type:"heading",depth:void 0,children:[]}}function x(){return{type:"break"}}function O(){return{type:"html",value:""}}function I(){return{type:"link",title:null,url:"",children:[]}}function M(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(u(l(n).document().write(c()(e,t,!0))))};var r=n(1455),i=n(315),a=n(919),o=n(511),s=n(1456),l=n(1457),c=n(1496),u=n(1497),d=n(924),h=n(918);function f(e,t){var n,r;for(n in t)r=a.call(e,n)?e[n]:e[n]={},"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,t[n]):Object.assign(r,t[n])}},function(e,t,n){"use strict";function r(e){return e&&(e.value||e.alt||e.title||"children"in e&&i(e.children)||"length"in e&&i(e))||""}function i(e){for(var t=[],n=-1;++n<e.length;)t[n]=r(e[n]);return t.join("")}e.exports=r},function(e,t,n){"use strict";var r=n(373);e.exports=function(e,t){var n=parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":r(n)}},function(e,t,n){"use strict";var r=n(1458),i=n(1459),a=n(1460),o=n(922),s=n(1463),l=n(1464),c=n(512),u=n(1467);e.exports=function(e){var t={defined:[],constructs:s([u].concat(c((e||{}).extensions))),content:n(r),document:n(i),flow:n(a),string:n(o.string),text:n(o.text)};return t;function n(e){return function(n){return l(t,e,n)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(121),i=n(134),a=function(e){var t,n=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,n,"linePrefix")}),(function(t){return e.enter("paragraph"),a(t)}));return n;function a(n){var r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,o(n)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):r(t)?(e.consume(t),e.exit("chunkText"),a):(e.consume(t),o)}};t.tokenize=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(121),i=n(134),a=n(374),o=function(e){var t,n,i,o=this,c=[],u=0,d={tokenize:function(e,r){var i=0;return t={},u;function u(r){return i<c.length?(o.containerState=c[i][1],e.attempt(c[i][0].continuation,d,h)(r)):n.currentConstruct&&n.currentConstruct.concrete?(t.flowContinue=!0,m(r)):(o.interrupt=n.currentConstruct&&n.currentConstruct.interruptible,o.containerState={},e.attempt(s,p,m)(r))}function d(e){return i++,o.containerState._closeFlow?p(e):u(e)}function h(t){return n.currentConstruct&&n.currentConstruct.lazy?(o.containerState={},e.attempt(s,p,e.attempt(l,p,e.check(a,p,f)))(t)):p(t)}function f(e){return i=c.length,t.lazy=!0,t.flowContinue=!0,m(e)}function p(e){return t.flowEnd=!0,m(e)}function m(e){return t.continued=i,o.interrupt=o.containerState=void 0,r(e)}},partial:!0};return h;function h(t){return u<c.length?(o.containerState=c[u][1],e.attempt(c[u][0].continuation,f,p)(t)):p(t)}function f(e){return u++,h(e)}function p(r){return t&&t.flowContinue?g(r):(o.interrupt=n&&n.currentConstruct&&n.currentConstruct.interruptible,o.containerState={},e.attempt(s,m,g)(r))}function m(e){return c.push([o.currentConstruct,o.containerState]),o.containerState=void 0,p(e)}function g(t){return null===t?(A(0,!0),void e.consume(t)):(n=n||o.parser.flow(o.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),v(t))}function v(t){return null===t?(y(e.exit("chunkFlow")),g(t)):r(t)?(e.consume(t),y(e.exit("chunkFlow")),e.check(d,b)):(e.consume(t),v)}function b(e){return A(t.continued,t&&t.flowEnd),u=0,h(e)}function y(e){i&&(i.next=e),i=e,n.lazy=t&&t.lazy,n.defineSkip(e.start),n.write(o.sliceStream(e))}function A(t,r){var a=c.length;for(n&&r&&(n.write([null]),i=n=void 0);a-- >t;)o.containerState=c[a][1],c[a][0].exit.call(o,e);c.length=t}},s={tokenize:function(e,t,n){return i(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},l={tokenize:function(e,t,n){return i(e,e.lazy(this.parser.constructs.flow,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};t.tokenize=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1461),i=n(134),a=n(374),o=function(e){var t=this,n=e.attempt(a,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,o,i(e,e.attempt(this.parser.constructs.flow,o,e.attempt(r,o)),"linePrefix")));return n;function o(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}};t.tokenize=o},function(e,t,n){"use strict";var r=n(121),i=n(375),a=n(921),o=n(134),s={tokenize:function(e,t){var n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(t)};function i(t){return null===t?a(t):r(t)?e.check(l,o,a)(t):(e.consume(t),i)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n=n.next=e.enter("chunkContent",{contentType:"content",previous:n}),i}},resolve:function(e){return a(e),e},interruptible:!0,lazy:!0},l={tokenize:function(e,t,n){var a=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o(e,s,"linePrefix")};function s(o){return null===o||r(o)?n(o):a.parser.constructs.disable.null.indexOf("codeIndented")>-1||i(a.events,"linePrefix")<4?e.interrupt(a.parser.constructs.flow,n,t)(o):t(o)}},partial:!0};e.exports=s},function(e,t,n){"use strict";var r=[].splice;e.exports=r},function(e,t,n){"use strict";var r=n(919),i=n(213),a=n(512);function o(e,t){var n,i,o,l;for(n in t)for(l in i=r.call(e,n)?e[n]:e[n]={},o=t[n])i[l]=s(a(o[l]),r.call(i,l)?i[l]:[])}function s(e,t){for(var n=-1,r=[];++n<e.length;)("after"===e[n].add?t:r).push(e[n]);return i(t,0,0,r),t}e.exports=function(e){for(var t={},n=-1;++n<e.length;)o(t,e[n]);return t}},function(e,t,n){"use strict";var r=n(315),i=n(121),a=n(513),o=n(213),s=n(512),l=n(514),c=n(1465),u=n(270),d=n(1466);e.exports=function(e,t,n){var h=n?u(n):{line:1,column:1,offset:0},f={},p=[],m=[],g=[],v={consume:function(e){i(e)?(h.line++,h.column=1,h.offset+=-3===e?2:1,k()):-1!==e&&(h.column++,h.offset++);h._bufferIndex<0?h._index++:(h._bufferIndex++,h._bufferIndex===m[h._index].length&&(h._bufferIndex=-1,h._index++));b.previous=e},enter:function(e,t){var n=t||{};return n.type=e,n.start=_(),b.events.push(["enter",n,b]),g.push(n),n},exit:function(e){var t=g.pop();return t.end=_(),b.events.push(["exit",t,b]),t},attempt:C((function(e,t){T(e,t.from)})),check:C(S),interrupt:C(S,{interrupt:!0}),lazy:C(S,{lazy:!0})},b={previous:null,events:[],parser:e,sliceStream:A,sliceSerialize:function(e){return c(A(e))},now:_,defineSkip:function(e){f[e.line]=e.column,k()},write:function(e){if(m=a(m,e),w(),null!==m[m.length-1])return[];return T(t,0),b.events=l(p,b.events,b),b.events}},y=t.tokenize.call(b,v);return t.resolveAll&&p.push(t),h._index=0,h._bufferIndex=-1,b;function A(e){return d(m,e)}function _(){return u(h)}function w(){for(var e,t;h._index<m.length;)if("string"==typeof(t=m[h._index]))for(e=h._index,h._bufferIndex<0&&(h._bufferIndex=0);h._index===e&&h._bufferIndex<t.length;)E(t.charCodeAt(h._bufferIndex));else E(t)}function E(e){y=y(e)}function S(e,t){t.restore()}function C(e,t){return function(n,i,a){var o,l,c,u;return n.tokenize||"length"in n?d(s(n)):function(e){if(e in n||null in n)return d(n.null?s(n[e]).concat(s(n.null)):n[e])(e);return a(e)};function d(e){return o=e,f(e[l=0])}function f(e){return function(n){u=function(){var e=_(),t=b.previous,n=b.currentConstruct,r=b.events.length,i=Array.from(g);return{restore:function(){h=e,b.previous=t,b.currentConstruct=n,b.events.length=r,g=i,k()},from:r}}(),c=e,e.partial||(b.currentConstruct=e);if(e.name&&b.parser.constructs.disable.null.indexOf(e.name)>-1)return m();return e.tokenize.call(t?r({},b,t):b,v,p,m)(n)}}function p(t){return e(c,u),i}function m(e){return u.restore(),++l<o.length?f(o[l]):a}}}function T(e,t){e.resolveAll&&p.indexOf(e)<0&&p.push(e),e.resolve&&o(b.events,t,b.events.length-t,e.resolve(b.events.slice(t),b)),e.resolveTo&&(b.events=e.resolveTo(b.events,b))}function k(){h.line in f&&h.column<2&&(h.column=f[h.line],h.offset+=f[h.line]-1)}}},function(e,t,n){"use strict";var r=n(373);e.exports=function(e){for(var t,n,i,a=-1,o=[];++a<e.length;){if("string"==typeof(t=e[a]))n=t;else if(-5===t)n="\r";else if(-4===t)n="\n";else if(-3===t)n="\r\n";else if(-2===t)n="\t";else if(-1===t){if(i)continue;n=" "}else n=r(t);i=-2===t,o.push(n)}return o.join("")}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r=t.start._index,i=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;return r===a?n=[e[r].slice(i,o)]:(n=e.slice(r,a),i>-1&&(n[0]=n[0].slice(i)),o>0&&n.push(e[a].slice(0,o))),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(922),i=n(1468),a=n(1474),o=n(1476),s=n(1477),l=n(1479),c=n(1481),u=n(1482),d=n(1483),h=n(1484),f=n(1485),p=n(1486),m=n(1487),g=n(1490),v=n(516),b=n(1491),y=n(1492),A=n(1493),_=n(1494),w=n(1495),E=n(930),S={42:_,43:_,45:_,48:_,49:_,50:_,51:_,52:_,53:_,54:_,55:_,56:_,57:_,62:o},C={91:h},T={"-2":u,"-1":u,32:u},k={35:p,42:E,45:[w,E],60:m,61:w,95:E,96:c,126:c},x={38:l,92:s},O={"-5":A,"-4":A,"-3":A,33:b,38:l,42:i,60:[a,g],91:y,92:[f,s],93:v,95:i,96:d},I={null:[i,r.resolver]};t.contentInitial=C,t.disable={null:[]},t.document=S,t.flow=k,t.flowInitial=T,t.insideSpan=I,t.string=x,t.text=O},function(e,t,n){"use strict";var r=n(513),i=n(213),a=n(1469),o=n(1473),s=n(514),l=n(270),c={name:"attention",tokenize:function(e,t){var n,r=a(this.previous);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(o){var s,l,c,u;return o===n?(e.consume(o),i):(s=e.exit("attentionSequence"),c=!(l=a(o))||2===l&&r,u=!r||2===r&&l,s._open=42===n?c:c&&(r||!u),s._close=42===n?u:u&&(l||!c),t(o))}},resolveAll:function(e,t){var n,a,c,u,d,h,f,p,m=-1;for(;++m<e.length;)if("enter"===e[m][0]&&"attentionSequence"===e[m][1].type&&e[m][1]._close)for(n=m;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[m][1]).charCodeAt(0)){if((e[n][1]._close||e[m][1]._open)&&(e[m][1].end.offset-e[m][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[m][1].end.offset-e[m][1].start.offset)%3))continue;h=e[n][1].end.offset-e[n][1].start.offset>1&&e[m][1].end.offset-e[m][1].start.offset>1?2:1,u={type:h>1?"strongSequence":"emphasisSequence",start:o(l(e[n][1].end),-h),end:l(e[n][1].end)},d={type:h>1?"strongSequence":"emphasisSequence",start:l(e[m][1].start),end:o(l(e[m][1].start),h)},c={type:h>1?"strongText":"emphasisText",start:l(e[n][1].end),end:l(e[m][1].start)},a={type:h>1?"strong":"emphasis",start:l(u.start),end:l(d.end)},e[n][1].end=l(u.start),e[m][1].start=l(d.end),f=[],e[n][1].end.offset-e[n][1].start.offset&&(f=r(f,[["enter",e[n][1],t],["exit",e[n][1],t]])),f=r(f,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",c,t]]),f=r(f,s(t.parser.constructs.insideSpan.null,e.slice(n+1,m),t)),f=r(f,[["exit",c,t],["enter",d,t],["exit",d,t],["exit",a,t]]),e[m][1].end.offset-e[m][1].start.offset?(p=2,f=r(f,[["enter",e[m][1],t],["exit",e[m][1],t]])):p=0,i(e,n-1,m-n+3,f),m=n+f.length-p-2;break}m=-1;for(;++m<e.length;)"attentionSequence"===e[m][1].type&&(e[m][1].type="data");return e}};e.exports=c},function(e,t,n){"use strict";var r=n(214),i=n(1470),a=n(1472);e.exports=function(e){return null===e||r(e)||a(e)?1:i(e)?2:void 0}},function(e,t,n){"use strict";var r=n(1471),i=n(215)(r);e.exports=i},function(e,t,n){"use strict";e.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/},function(e,t,n){"use strict";var r=n(215)(/\s/);e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}},function(e,t,n){"use strict";var r=n(515),i=n(376),a=n(1475),o=n(923),s={name:"autolink",tokenize:function(e,t,n){var s=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return r(t)?(e.consume(t),c):a(t)?h(t):n(t)}function c(e){return 43===e||45===e||46===e||i(e)?u(e):h(e)}function u(t){return 58===t?(e.consume(t),d):(43===t||45===t||46===t||i(t))&&s++<32?(e.consume(t),u):h(t)}function d(t){return 62===t?(e.exit("autolinkProtocol"),g(t)):32===t||60===t||o(t)?n(t):(e.consume(t),d)}function h(t){return 64===t?(e.consume(t),s=0,f):a(t)?(e.consume(t),h):n(t)}function f(e){return i(e)?p(e):n(e)}function p(t){return 46===t?(e.consume(t),s=0,f):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",g(t)):m(t)}function m(t){return(45===t||i(t))&&s++<63?(e.consume(t),45===t?m:p):n(t)}function g(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}};e.exports=s},function(e,t,n){"use strict";var r=n(215)(/[#-'*+\--9=?A-Z^-~]/);e.exports=r},function(e,t,n){"use strict";var r=n(200),i=n(134),a={name:"blockQuote",tokenize:function(e,t,n){var i=this;return function(t){if(62===t)return i.containerState.open||(e.enter("blockQuote",{_container:!0}),i.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a;return n(t)};function a(n){return r(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){return i(e,e.attempt(a,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};e.exports=a},function(e,t,n){"use strict";var r=n(1478),i={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),i};function i(i){return r(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}};e.exports=i},function(e,t,n){"use strict";var r=n(215)(/[!-/:-@[-`{-~]/);e.exports=r},function(e,t,n){"use strict";var r=n(924),i=n(376),a=n(925),o=n(1480);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(r),c={name:"characterReference",tokenize:function(e,t,n){var r,s,c=this,u=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),d};function d(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),r=31,s=i,f(t))}function h(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,s=o,f):(e.enter("characterReferenceValue"),r=7,s=a,f(t))}function f(a){var o;return 59===a&&u?(o=e.exit("characterReferenceValue"),s!==i||l.default(c.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)):s(a)&&u++<r?(e.consume(a),f):n(a)}}};e.exports=c},function(e,t,n){"use strict";var r=n(215)(/[\dA-Fa-f]/);e.exports=r},function(e,t,n){"use strict";var r=n(121),i=n(214),a=n(375),o=n(134),s={name:"codeFenced",tokenize:function(e,t,n){var s,l=this,c={tokenize:function(e,t,n){var i=0;return o(e,(function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(t)}),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function a(t){return t===s?(e.consume(t),i++,a):i<d?n(t):(e.exit("codeFencedFenceSequence"),o(e,l,"whitespace")(t))}function l(i){return null===i||r(i)?(e.exit("codeFencedFence"),t(i)):n(i)}},partial:!0},u=a(this.events,"linePrefix"),d=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s=t,h(t)};function h(t){return t===s?(e.consume(t),d++,h):(e.exit("codeFencedFenceSequence"),d<3?n(t):o(e,f,"whitespace")(t))}function f(t){return null===t||r(t)?v(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||i(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),o(e,m,"whitespace")(t)):96===t&&t===s?n(t):(e.consume(t),p)}function m(t){return null===t||r(t)?v(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(t))}function g(t){return null===t||r(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(t)):96===t&&t===s?n(t):(e.consume(t),g)}function v(n){return e.exit("codeFencedFence"),l.interrupt?t(n):b(n)}function b(t){return null===t?A(t):r(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e.attempt(c,A,u?o(e,b,"linePrefix",u+1):b)):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||r(t)?(e.exit("codeFlowValue"),b(t)):(e.consume(t),y)}function A(n){return e.exit("codeFenced"),t(n)}},concrete:!0};e.exports=s},function(e,t,n){"use strict";var r=n(121),i=n(213),a=n(375),o=n(134),s={name:"codeIndented",tokenize:function(e,t,n){return e.attempt(l,i,n);function i(n){return null===n?t(n):r(n)?e.attempt(l,i,t)(n):(e.enter("codeFlowValue"),a(n))}function a(t){return null===t||r(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}},resolve:function(e,t){var n={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return i(e,0,0,[["enter",n,t]]),i(e,e.length,0,[["exit",n,t]]),e}},l={tokenize:function(e,t,n){var i=this;return o(e,(function s(l){if(r(l))return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o(e,s,"linePrefix",5);return a(i.events,"linePrefix")<4?n(l):t(l)}),"linePrefix",5)},partial:!0};e.exports=s},function(e,t,n){"use strict";var r=n(121),i={name:"codeText",tokenize:function(e,t,n){var i,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),o++,s):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):96===t?(a=e.enter("codeTextSequence"),i=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):r(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||r(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),c)}function u(n){return 96===n?(e.consume(n),i++,u):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",c(n))}},resolve:function(e){var t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[r][1].type=e[i][1].type="codeTextPadding",i+=2,r-=2;break}t=i-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};e.exports=i},function(e,t,n){"use strict";var r=n(121),i=n(214),a=n(511),o=n(926),s=n(927),l=n(134),c=n(928),u=n(929),d={name:"definition",tokenize:function(e,t,n){var i,u=this;return function(t){return e.enter("definition"),s.call(u,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function d(t){return i=a(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),c(e,o(e,e.attempt(h,l(e,f,"whitespace"),l(e,f,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function f(a){return null===a||r(a)?(e.exit("definition"),u.parser.defined.indexOf(i)<0&&u.parser.defined.push(i),t(a)):n(a)}}},h={tokenize:function(e,t,n){return function(t){return i(t)?c(e,a)(t):n(t)};function a(t){return 34===t||39===t||40===t?u(e,l(e,o,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function o(e){return null===e||r(e)?t(e):n(e)}},partial:!0};e.exports=d},function(e,t,n){"use strict";var r=n(121),i={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),i};function i(i){return r(i)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(i)):n(i)}}};e.exports=i},function(e,t,n){"use strict";var r=n(121),i=n(214),a=n(200),o=n(213),s=n(134),l={name:"headingAtx",tokenize:function(e,t,n){var o=this,l=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),c(t)};function c(r){return 35===r&&l++<6?(e.consume(r),c):null===r||i(r)?(e.exit("atxHeadingSequence"),o.interrupt?t(r):u(r)):n(r)}function u(n){return 35===n?(e.enter("atxHeadingSequence"),d(n)):null===n||r(n)?(e.exit("atxHeading"),t(n)):a(n)?s(e,u,"whitespace")(n):(e.enter("atxHeadingText"),h(n))}function d(t){return 35===t?(e.consume(t),d):(e.exit("atxHeadingSequence"),u(t))}function h(t){return null===t||35===t||i(t)?(e.exit("atxHeadingText"),u(t)):(e.consume(t),h)}},resolve:function(e,t){var n,r,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},o(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};e.exports=l},function(e,t,n){"use strict";var r=n(515),i=n(376),a=n(121),o=n(214),s=n(200),l=n(373),c=n(1488),u=n(1489),d=n(374),h={name:"htmlFlow",tokenize:function(e,t,n){var d,h,p,m,g,v=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),b};function b(i){return 33===i?(e.consume(i),y):47===i?(e.consume(i),w):63===i?(e.consume(i),d=3,v.interrupt?t:z):r(i)?(e.consume(i),p=l(i),h=!0,E):n(i)}function y(i){return 45===i?(e.consume(i),d=2,A):91===i?(e.consume(i),d=5,p="CDATA[",m=0,_):r(i)?(e.consume(i),d=4,v.interrupt?t:z):n(i)}function A(r){return 45===r?(e.consume(r),v.interrupt?t:z):n(r)}function _(r){return r===p.charCodeAt(m++)?(e.consume(r),m===p.length?v.interrupt?t:L:_):n(r)}function w(t){return r(t)?(e.consume(t),p=l(t),E):n(t)}function E(r){return null===r||47===r||62===r||o(r)?47!==r&&h&&u.indexOf(p.toLowerCase())>-1?(d=1,v.interrupt?t(r):L(r)):c.indexOf(p.toLowerCase())>-1?(d=6,47===r?(e.consume(r),S):v.interrupt?t(r):L(r)):(d=7,v.interrupt?n(r):h?T(r):C(r)):45===r||i(r)?(e.consume(r),p+=l(r),E):n(r)}function S(r){return 62===r?(e.consume(r),v.interrupt?t:L):n(r)}function C(t){return s(t)?(e.consume(t),C):D(t)}function T(t){return 47===t?(e.consume(t),D):58===t||95===t||r(t)?(e.consume(t),k):s(t)?(e.consume(t),T):D(t)}function k(t){return 45===t||46===t||58===t||95===t||i(t)?(e.consume(t),k):x(t)}function x(t){return 61===t?(e.consume(t),O):s(t)?(e.consume(t),x):T(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),g=t,I):s(t)?(e.consume(t),O):(g=void 0,M(t))}function I(t){return t===g?(e.consume(t),P):null===t||a(t)?n(t):(e.consume(t),I)}function M(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||o(t)?x(t):(e.consume(t),M)}function P(e){return 47===e||62===e||s(e)?T(e):n(e)}function D(t){return 62===t?(e.consume(t),N):n(t)}function N(t){return s(t)?(e.consume(t),N):null===t||a(t)?L(t):n(t)}function L(t){return 45===t&&2===d?(e.consume(t),j):60===t&&1===d?(e.consume(t),F):62===t&&4===d?(e.consume(t),V):63===t&&3===d?(e.consume(t),z):93===t&&5===d?(e.consume(t),H):!a(t)||6!==d&&7!==d?null===t||a(t)?R(t):(e.consume(t),L):e.check(f,V,R)(t)}function R(t){return e.exit("htmlFlowData"),B(t)}function B(t){return null===t?W(t):a(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B):(e.enter("htmlFlowData"),L(t))}function j(t){return 45===t?(e.consume(t),z):L(t)}function F(t){return 47===t?(e.consume(t),p="",U):L(t)}function U(t){return 62===t&&u.indexOf(p.toLowerCase())>-1?(e.consume(t),V):r(t)&&p.length<8?(e.consume(t),p+=l(t),U):L(t)}function H(t){return 93===t?(e.consume(t),z):L(t)}function z(t){return 62===t?(e.consume(t),V):L(t)}function V(t){return null===t||a(t)?(e.exit("htmlFlowData"),W(t)):(e.consume(t),V)}function W(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){var t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},f={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(d,t,n)}},partial:!0};e.exports=h},function(e,t,n){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},function(e,t,n){"use strict";e.exports=["pre","script","style","textarea"]},function(e,t,n){"use strict";var r=n(515),i=n(376),a=n(121),o=n(214),s=n(200),l=n(134),c={name:"htmlText",tokenize:function(e,t,n){var c,u,d,h,f=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),p};function p(t){return 33===t?(e.consume(t),m):47===t?(e.consume(t),x):63===t?(e.consume(t),T):r(t)?(e.consume(t),M):n(t)}function m(t){return 45===t?(e.consume(t),g):91===t?(e.consume(t),u="CDATA[",d=0,_):r(t)?(e.consume(t),C):n(t)}function g(t){return 45===t?(e.consume(t),v):n(t)}function v(t){return null===t||62===t?n(t):45===t?(e.consume(t),b):y(t)}function b(e){return null===e||62===e?n(e):y(e)}function y(t){return null===t?n(t):45===t?(e.consume(t),A):a(t)?(h=y,F(t)):(e.consume(t),y)}function A(t){return 45===t?(e.consume(t),H):y(t)}function _(t){return t===u.charCodeAt(d++)?(e.consume(t),d===u.length?w:_):n(t)}function w(t){return null===t?n(t):93===t?(e.consume(t),E):a(t)?(h=w,F(t)):(e.consume(t),w)}function E(t){return 93===t?(e.consume(t),S):w(t)}function S(t){return 62===t?H(t):93===t?(e.consume(t),S):w(t)}function C(t){return null===t||62===t?H(t):a(t)?(h=C,F(t)):(e.consume(t),C)}function T(t){return null===t?n(t):63===t?(e.consume(t),k):a(t)?(h=T,F(t)):(e.consume(t),T)}function k(e){return 62===e?H(e):T(e)}function x(t){return r(t)?(e.consume(t),O):n(t)}function O(t){return 45===t||i(t)?(e.consume(t),O):I(t)}function I(t){return a(t)?(h=I,F(t)):s(t)?(e.consume(t),I):H(t)}function M(t){return 45===t||i(t)?(e.consume(t),M):47===t||62===t||o(t)?P(t):n(t)}function P(t){return 47===t?(e.consume(t),H):58===t||95===t||r(t)?(e.consume(t),D):a(t)?(h=P,F(t)):s(t)?(e.consume(t),P):H(t)}function D(t){return 45===t||46===t||58===t||95===t||i(t)?(e.consume(t),D):N(t)}function N(t){return 61===t?(e.consume(t),L):a(t)?(h=N,F(t)):s(t)?(e.consume(t),N):P(t)}function L(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,R):a(t)?(h=L,F(t)):s(t)?(e.consume(t),L):(e.consume(t),c=void 0,j)}function R(t){return t===c?(e.consume(t),B):null===t?n(t):a(t)?(h=R,F(t)):(e.consume(t),R)}function B(e){return 62===e||47===e||o(e)?P(e):n(e)}function j(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||o(t)?P(t):(e.consume(t),j)}function F(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l(e,U,"linePrefix",f.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function U(t){return e.enter("htmlTextData"),h(t)}function H(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}}};e.exports=c},function(e,t,n){"use strict";var r={name:"labelStartImage",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:n(516).resolveAll};e.exports=r},function(e,t,n){"use strict";var r={name:"labelStartLink",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:n(516).resolveAll};e.exports=r},function(e,t,n){"use strict";var r=n(134),i={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r(e,t,"linePrefix")}}};e.exports=i},function(e,t,n){"use strict";var r=n(925),i=n(200),a=n(375),o=n(920),s=n(134),l=n(374),c=n(930),u={name:"list",tokenize:function(e,t,n){var s=this,u=a(s.events,"linePrefix"),h=0;return function(t){var i=s.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!s.containerState.marker||t===s.containerState.marker:r(t)){if(s.containerState.type||(s.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(c,n,p)(t):p(t);if(!s.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(t)}return n(t)};function f(t){return r(t)&&++h<10?(e.consume(t),f):(!s.interrupt||h<2)&&(s.containerState.marker?t===s.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),p(t)):n(t)}function p(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||t,e.check(l,s.interrupt?n:m,e.attempt(d,v,g))}function m(e){return s.containerState.initialBlankLine=!0,u++,v(e)}function g(t){return i(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),v):n(t)}function v(n){return s.containerState.size=u+o(s.sliceStream(e.exit("listItemPrefix"))),t(n)}},continuation:{tokenize:function(e,t,n){var r=this;return r.containerState._closeFlow=void 0,e.check(l,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,s(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!i(n))return r.containerState.furtherBlankLines=r.containerState.initialBlankLine=void 0,a(n);return r.containerState.furtherBlankLines=r.containerState.initialBlankLine=void 0,e.attempt(h,t,a)(n)}));function a(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,s(e,e.attempt(u,t,n),"linePrefix",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},d={tokenize:function(e,t,n){var r=this;return s(e,(function(e){return i(e)||!a(r.events,"listItemPrefixWhitespace")?n(e):t(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},h={tokenize:function(e,t,n){var r=this;return s(e,(function(e){return a(r.events,"listItemIndent")===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};e.exports=u},function(e,t,n){"use strict";var r=n(121),i=n(270),a=n(134),o={name:"setextUnderline",tokenize:function(e,t,n){var i,o,s=this,l=s.events.length;for(;l--;)if("lineEnding"!==s.events[l][1].type&&"linePrefix"!==s.events[l][1].type&&"content"!==s.events[l][1].type){o="paragraph"===s.events[l][1].type;break}return function(t){if(!s.lazy&&(s.interrupt||o))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,c(t);return n(t)};function c(t){return t===i?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),a(e,u,"lineSuffix")(t))}function u(i){return null===i||r(i)?(e.exit("setextHeadingLine"),t(i)):n(i)}},resolveTo:function(e,t){var n,r,a,o,s=e.length;for(;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){n=s;break}"paragraph"===e[s][1].type&&(r=s)}else"content"===e[s][1].type&&e.splice(s,1),a||"definition"!==e[s][1].type||(a=s);o={type:"setextHeading",start:i(e[r][1].start),end:i(e[e.length-1][1].end)},e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",o,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end=i(e[a][1].end)):e[n][1]=o;return e.push(["exit",o,t]),e}};e.exports=o},function(e,t,n){"use strict";var r=/[\0\t\n\r]/g;e.exports=function(){var e,t=!0,n=1,i="";return function(a,o,s){var l,c,u,d,h,f=[];a=i+a.toString(o),u=0,i="",t&&(65279===a.charCodeAt(0)&&u++,t=void 0);for(;u<a.length;){if(r.lastIndex=u,l=r.exec(a),d=l?l.index:a.length,h=a.charCodeAt(d),!l){i=a.slice(u);break}if(10===h&&u===d&&e)f.push(-3),e=void 0;else if(e&&(f.push(-5),e=void 0),u<d&&(f.push(a.slice(u,d)),n+=d-u),0===h)f.push(65533),n++;else if(9===h)for(c=4*Math.ceil(n/4),f.push(-2);n++<c;)f.push(-1);else 10===h?(f.push(-4),n=1):(e=!0,n=1);u=d+1}s&&(e&&f.push(-5),i&&f.push(i),f.push(null));return f}}},function(e,t,n){"use strict";var r=n(921);e.exports=function(e){for(;!r(e););return e}},function(e,t,n){var r=n(1499);e.exports=function(){return function(e){return r(e,"list",(function(e,t){var n,r,i=0;for(n=0,r=t.length;n<r;n++)"list"===t[n].type&&(i+=1);for(n=0,r=e.children.length;n<r;n++){var a=e.children[n];a.index=n,a.ordered=e.ordered}e.depth=i})),e}}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=[];"function"==typeof t&&(n=t,t=null);function i(e){var a;return t&&e.type!==t||(a=n(e,r.concat())),e.children&&!1!==a?function(e,t){var n,a=e.length,o=-1;r.push(t);for(;++o<a;)if((n=e[o])&&!1===i(n))return!1;return r.pop(),!0}(e.children,e):a}i(e)}},function(e,t,n){"use strict";var r=n(377),i=/^<(area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)\s*\/?>$/i,a=/^<(\/?)([a-z]+)\s*>$/;e.exports=function(e){var t,n;return r(e,"html",(function(e,r,o){n!==o&&(t=[],n=o);var s=function(e){var t=e.value.match(i);return!!t&&t[1]}(e);if(s)return o.children.splice(r,1,{type:"virtualHtml",tag:s,position:e.position}),!0;var l=function(e,t){var n=e.value.match(a);return!!n&&{tag:n[2],opening:!n[1],node:e}}(e);if(!l)return!0;var c=function(e,t){var n=e.length;for(;n--;)if(e[n].tag===t)return e.splice(n,1)[0];return!1}(t,l.tag);return c?o.children.splice(r,0,function(e,t,n){var r=n.children.indexOf(e.node),i=n.children.indexOf(t.node),a=n.children.splice(r,i-r+1).slice(1,-1);return{type:"virtualHtml",children:a,tag:e.tag,position:{start:e.node.position.start,end:t.node.position.end,indent:[]}}}(l,c,o)):l.opening||t.push(l),!0}),!0),e}},function(e,t,n){"use strict";e.exports=a;var r=n(1502),i=n(1503);function a(e,t,n,a){var o,s;"function"==typeof t&&"function"!=typeof n&&(a=n,n=t,t=null),s=r(t),o=a?-1:1,function e(r,l,c){var u,d="object"==typeof r&&null!==r?r:{};"string"==typeof d.type&&(u="string"==typeof d.tagName?d.tagName:"string"==typeof d.name?d.name:void 0,h.displayName="node ("+i(d.type+(u?"<"+u+">":""))+")");return h;function h(){var i,u,d=c.concat(r),h=[];if((!t||s(r,l,c[c.length-1]||null))&&!1===(h=function(e){if(null!==e&&"object"==typeof e&&"length"in e)return e;if("number"==typeof e)return[!0,e];return[e]}(n(r,c)))[0])return h;if(r.children&&"skip"!==h[0])for(u=(a?r.children.length:-1)+o;u>-1&&u<r.children.length;){if(!1===(i=e(r.children[u],u,d)())[0])return i;u="number"==typeof i[1]?i[1]:u+o}return h}}(e,null,[])()}a.CONTINUE=!0,a.SKIP="skip",a.EXIT=!1},function(e,t,n){"use strict";function r(e){if(null==e)return i;if("string"==typeof e)return function(e){return function(t){return Boolean(t&&t.type===e)}}(e);if("object"==typeof e)return"length"in e?function(e){var t=[],n=-1;for(;++n<e.length;)t[n]=r(e[n]);return function(){var e=-1;for(;++e<t.length;)if(t[e].apply(this,arguments))return!0;return!1}}(e):function(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function i(){return!0}e.exports=r},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";var r=n(377),i=[].splice;function a(e,t){return function(e){return r(e,n),e};function n(n,r,a){if(a&&!e(n,r,a)){var o=[r,1];return"unwrap"===t&&n.children&&(o=o.concat(n.children)),i.apply(a.children,o),r}}}t.ofType=function(e,t){return a((function(t,n,r){return!e.includes(t.type)}),t)},t.ifNotMatch=a},function(e,t,n){"use strict";var r=n(0),i=n(227),a=n(217);function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,l=t.renderers[e.type];e.position||(e.position={start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}});var c=e.position.start,u=[e.type,c.line,c.column,i].join("-");if(!a.isValidElementType(l))throw new Error("Renderer for type `".concat(e.type,"` not defined or is not renderable"));var d=s(e,u,t,l,n,i);return r.createElement(l,d,d.children||h()||void 0);function h(){return e.children&&e.children.map((function(n,r){return o(n,t,{node:e,props:d},r)}))}}function s(e,t,n,a,s,u){var d,h={key:t},f="string"==typeof a||a===r.Fragment;n.sourcePos&&e.position&&(h["data-sourcepos"]=[(d=e.position).start.line,":",d.start.column,"-",d.end.line,":",d.end.column].map(String).join("")),n.rawSourcePos&&!f&&(h.sourcePosition=e.position),n.includeNodeIndex&&s.node&&s.node.children&&!f&&(h.index=s.node.children.indexOf(e),h.parentChildCount=s.node.children.length);var p=null!==e.identifier&&void 0!==e.identifier?n.definitions[e.identifier.toUpperCase()]||{}:null;switch(e.type){case"root":l(h,{className:n.className});break;case"text":h.nodeKey=t,h.children=e.value;break;case"heading":h.level=e.depth;break;case"list":h.start=e.start,h.ordered=e.ordered,h.spread=e.spread,h.depth=e.depth;break;case"listItem":h.checked=e.checked,h.spread=e.spread,h.ordered=e.ordered,h.index=e.index,h.children=function(e,t){return(t&&t.node?function(e){var t=e.children,n=e.spread,r=-1;for(;!n&&++r<t.length;)n=c(t[r]);return n}(t.node):c(e))?e.children:function(e){return e.children.reduce((function(e,t){return e.concat("paragraph"===t.type?t.children:[t])}),[])}(e)}(e,s).map((function(t,r){return o(t,n,{node:e,props:h},r)}));break;case"definition":l(h,{identifier:e.identifier,title:e.title,url:e.url});break;case"code":l(h,{language:e.lang&&e.lang.split(/\s/,1)[0]});break;case"inlineCode":h.children=e.value,h.inline=!0;break;case"link":l(h,{title:e.title||void 0,target:"function"==typeof n.linkTarget?n.linkTarget(e.url,e.children,e.title):n.linkTarget,href:n.transformLinkUri?n.transformLinkUri(e.url,e.children,e.title):e.url});break;case"image":l(h,{src:n.transformImageUri?n.transformImageUri(e.url,e.children,e.title,e.alt):e.url,alt:e.alt||"",title:e.title||void 0});break;case"linkReference":l(h,i(p,{href:n.transformLinkUri?n.transformLinkUri(p.href):p.href}));break;case"imageReference":l(h,{src:n.transformImageUri&&p.href?n.transformImageUri(p.href,e.children,p.title,e.alt):p.href,alt:e.alt||"",title:p.title||void 0});break;case"table":case"tableHead":case"tableBody":h.columnAlignment=e.align;break;case"tableRow":h.isHeader="tableHead"===s.node.type,h.columnAlignment=s.props.columnAlignment;break;case"tableCell":l(h,{isHeader:s.props.isHeader,align:s.props.columnAlignment[u]});break;case"virtualHtml":h.tag=e.tag;break;case"html":h.isBlock=e.position.start.line!==e.position.end.line,h.allowDangerousHtml=n.allowDangerousHtml,h.escapeHtml=n.escapeHtml,h.skipHtml=n.skipHtml;break;case"parsedHtml":var m;e.children&&(m=e.children.map((function(t,r){return o(t,n,{node:e,props:h},r)}))),h.allowDangerousHtml=n.allowDangerousHtml,h.escapeHtml=n.escapeHtml,h.skipHtml=n.skipHtml,h.element=e.element?function(e,t){var n=e.element;if(Array.isArray(n)){var i=r.Fragment||"div";return r.createElement(i,null,n)}if(n.props.children||t){var a=r.Children.toArray(n.props.children).concat(t);return r.cloneElement(n,null,a)}return r.cloneElement(n,null)}(e,m):null;break;default:l(h,i(e,{type:void 0,position:void 0,children:void 0}))}return!f&&e.value&&(h.value=e.value),f||(h.node=e),h}function l(e,t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])}function c(e){var t=e.spread;return null==t?e.children.length>1:t}e.exports=o},function(e,t,n){"use strict";var r=n(377);function i(e){var t=e.children;e.children=[{type:"tableHead",align:e.align,children:[t[0]],position:t[0].position}],t.length>1&&e.children.push({type:"tableBody",align:e.align,children:t.slice(1),position:{start:t[1].position.start,end:t[t.length-1].position.end}})}e.exports=function(e){return r(e,"table",i),e}},function(e,t,n){"use strict";var r=n(377);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r(e,"definition",(function(e){var n=e.identifier.toUpperCase();n in t||(t[n]={href:e.url,title:e.title})})),t}},function(e,t,n){"use strict";var r=["http","https","mailto","tel"];e.exports=function(e){var t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;var i=t.indexOf(":");if(-1===i)return t;for(var a=r.length,o=-1;++o<a;){var s=r[o];if(i===s.length&&t.slice(0,s.length).toLowerCase()===s)return t}return-1!==(o=t.indexOf("?"))&&i>o?t:-1!==(o=t.indexOf("#"))&&i>o?t:"javascript:void(0)"}},function(e,t,n){"use strict";var r=n(227),i=n(0),a=parseInt((i.version||"16").slice(0,2),10)>=16,o=i.createElement;function s(e,t){return o(e,l(t),t.children)}function l(e){var t=e["data-sourcepos"];return t?{"data-sourcepos":t}:{}}e.exports={break:"br",paragraph:"p",emphasis:"em",strong:"strong",thematicBreak:"hr",blockquote:"blockquote",delete:"del",link:"a",image:"img",linkReference:"a",imageReference:"img",table:s.bind(null,"table"),tableHead:s.bind(null,"thead"),tableBody:s.bind(null,"tbody"),tableRow:s.bind(null,"tr"),tableCell:function(e){var t=e.align?{textAlign:e.align}:void 0,n=l(e);return o(e.isHeader?"th":"td",t?r({style:t},n):n,e.children)},root:function(e){var t=e.className,n=!t&&i.Fragment||"div";return o(n,t?{className:t}:null,e.children)},text:function(e){var t=e.children||"";return a?t:o("span",null,t)},list:function(e){var t=l(e);null!==e.start&&1!==e.start&&void 0!==e.start&&(t.start=e.start.toString());return o(e.ordered?"ol":"ul",t,e.children)},listItem:function(e){var t=null;if(null!==e.checked&&void 0!==e.checked){var n=e.checked;t=o("input",{type:"checkbox",checked:n,readOnly:!0})}return o("li",l(e),t,e.children)},definition:function(){return null},heading:function(e){return o("h".concat(e.level),l(e),e.children)},inlineCode:function(e){return o("code",l(e),e.children)},code:function(e){var t=e.language&&"language-".concat(e.language),n=o("code",t?{className:t}:null,e.value);return o("pre",l(e),n)},html:function(e){if(e.skipHtml)return null;var t=e.allowDangerousHtml||!1===e.escapeHtml,n=e.isBlock?"div":"span";if(!t)return o(i.Fragment||n,null,e.value);var r={dangerouslySetInnerHTML:{__html:e.value}};return o(n,r)},virtualHtml:function(e){return o(e.tag,l(e),e.children)},parsedHtml:function(e){return e["data-sourcepos"]?i.cloneElement(e.element,{"data-sourcepos":e["data-sourcepos"]}):e.element}}},function(e,t,n){"use strict";t.HtmlParser="undefined"==typeof Symbol?"__RMD_HTML_PARSER__":Symbol("__RMD_HTML_PARSER__")},function(e,t){function n(){var e=this;document.addEventListener("keydown",(function(t){e.focusByKeyboard=!0}),!0),document.addEventListener("mousedown",(function(t){e.focusByKeyboard=!1}),!0),document.addEventListener("focus",(function(t){e.updateVisibility()}),!0),document.addEventListener("focusout",(function(t){window.setTimeout((function(){document.hasFocus()||(e.focusByKeyboard=!0,e.updateVisibility())}),0)})),this.updateVisibility()}n.prototype={focusByKeyboard:!0,updateVisibility:function(){this.hidden=!this.focusByKeyboard},set hidden(e){document.documentElement.classList.toggle("focus-outline-hidden",e)},get hidden(){return document.documentElement.classList.contains("focus-outline-hidden")}},new n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(931),o=(r=a)&&r.__esModule?r:{default:r};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.query,n=void 0===t?'[href^="#"]:not([href="#"]':t,r=e.match,a=void 0===r?function(e){return document.getElementById(e.hash.substring(1))}:r,s=e.hashChange,l=void 0===s||s,c=e.scrollSmoothConfig,u=document.querySelectorAll(n),d=function(e){e.preventDefault();var t=a(e.target);t&&(l&&history.replaceState(null,null,"#"+t.id),(0,o.default)(t,i({},c)))};Array.from(u).map((function(e){e.addEventListener("click",d,!1)}))},e.exports=t.default},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.activeClass,n=void 0===t?"active":t,i=e.query,a=void 0===i?'[href^="#"]:not([href="#"]':i,o=e.threshold,s=void 0===o?[.25,.5,.75]:o,l=e.detectType,c=void 0===l?"max":l,u={threshold:s},d=function(e){return e.classList.remove(n)},h=function(e){return e.classList.add(n)},f=function(){document.querySelectorAll("."+n).forEach(d)},p=function(e){f(),h(document.querySelector('a[href="#'+e.id+'"]'))},m=function(e){e.forEach((function(e){e.intersectionRatio>=Math[c].apply(Math,r(s))&&p(e.target)}))},g=document.querySelectorAll(a),v=new IntersectionObserver(m,u),b=function(e){var t=document.querySelector("#"+e.hash.slice(1));v.observe(t)};g.forEach(b)},e.exports=t.default},function(e,t,n){var r=n(58),i=n(1515);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1517);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:208,79%,51%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#bcdefb;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#dedede;--ck-color-button-on-hover-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:#c7c7c7;--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-foreground);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3)}:root{--ck-disabled-opacity:.5}:root{--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border)}:root{--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em}:root{--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px}:root{--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active)}:root{--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1519);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1521);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1523);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1525);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle{display:none}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1527);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{-webkit-backface-visibility:hidden;pointer-events:none;position:absolute}.ck.ck-tooltip{display:none;opacity:0;visibility:hidden;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";height:0;width:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{background:var(--ck-color-tooltip-background);color:var(--ck-color-tooltip-text);font-size:.9em;left:-50%;line-height:1.5;padding:var(--ck-spacing-small) var(--ck-spacing-medium);position:relative}.ck.ck-tooltip .ck-tooltip__text:after{border-style:solid;left:50%;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip.ck-tooltip_s,.ck.ck-tooltip.ck-tooltip_se,.ck.ck-tooltip.ck-tooltip_sw{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{border-color:transparent transparent var(--ck-color-tooltip-background) transparent;border-width:0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);top:calc(var(--ck-tooltip-arrow-size)*-1 + 1px);transform:translateX(-50%)}.ck.ck-tooltip.ck-tooltip_sw{left:auto;right:50%}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text{left:auto;right:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{left:auto;right:0}.ck.ck-tooltip.ck-tooltip_se{left:50%;right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text{left:calc(var(--ck-tooltip-arrow-size)*-2);right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after{left:0;right:auto;transform:translateX(50%)}.ck.ck-tooltip.ck-tooltip_n{top:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{border-color:var(--ck-color-tooltip-background) transparent transparent transparent;border-width:var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size);bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateX(-50%)}.ck.ck-tooltip.ck-tooltip_e{left:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text:after{border-color:transparent var(--ck-color-tooltip-background) transparent transparent;border-width:var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0;left:calc(var(--ck-tooltip-arrow-size)*-1);top:calc(50% - var(--ck-tooltip-arrow-size)*1)}.ck.ck-tooltip.ck-tooltip_w{left:auto;right:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text:after{border-color:transparent transparent transparent var(--ck-color-tooltip-background);border-width:var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);left:100%;top:calc(50% - var(--ck-tooltip-arrow-size)*1)}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1529);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{opacity:1;visibility:visible}.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1531);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - var(--ck-switch-button-toggle-spacing)*2)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);transition:background .4s ease;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);margin:var(--ck-switch-button-toggle-spacing);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1533);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1535);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1537);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1539);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border:0;border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1541);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1543);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1545);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1547);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1549);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1551);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1553);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1555);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1557);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow))}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1559);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1561);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1563);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1565);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1567);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck .ck-button.ck-color-table__remove-color{align-items:center;display:flex;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1569);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1571);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1573);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}",""]),e.exports=t},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}",""]),e.exports=t},function(module,__webpack_exports__,__webpack_require__){"use strict";var md5,_unused_webpack_default_export=md5;!function(){var HxOverrides=function(){};HxOverrides.__name__=!0,HxOverrides.dateStr=function(e){var t=e.getMonth()+1,n=e.getDate(),r=e.getHours(),i=e.getMinutes(),a=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(n<10?"0"+n:""+n)+" "+(r<10?"0"+r:""+r)+":"+(i<10?"0"+i:""+i)+":"+(a<10?"0"+a:""+a)},HxOverrides.strDate=function(e){switch(e.length){case 8:var t=e.split(":"),n=new Date;return n.setTime(0),n.setUTCHours(t[0]),n.setUTCMinutes(t[1]),n.setUTCSeconds(t[2]),n;case 10:t=e.split("-");return new Date(t[0],t[1]-1,t[2],0,0,0);case 19:var r=(t=e.split(" "))[0].split("-"),i=t[1].split(":");return new Date(r[0],r[1]-1,r[2],i[0],i[1],i[2]);default:throw"Invalid date format : "+e}},HxOverrides.cca=function(e,t){var n=e.charCodeAt(t);if(n==n)return n},HxOverrides.substr=function(e,t,n){return null!=t&&0!=t&&null!=n&&n<0?"":(null==n&&(n=e.length),t<0?(t=e.length+t)<0&&(t=0):n<0&&(n=e.length+n-t),e.substr(t,n))},HxOverrides.remove=function(e,t){for(var n=0,r=e.length;n<r;){if(e[n]==t)return e.splice(n,1),!0;n++}return!1},HxOverrides.iter=function(e){return{cur:0,arr:e,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var IntIter=function(e,t){this.min=e,this.max=t};IntIter.__name__=!0,IntIter.prototype={next:function(){return this.min++},hasNext:function(){return this.min<this.max},__class__:IntIter};var Std=function(){};Std.__name__=!0,Std.is=function(e,t){return js.Boot.__instanceof(e,t)},Std.string=function(e){return js.Boot.__string_rec(e,"")},Std.int=function(e){return 0|e},Std.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=HxOverrides.cca(e,1)&&88!=HxOverrides.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t},Std.parseFloat=function(e){return parseFloat(e)},Std.random=function(e){return Math.floor(Math.random()*e)};var com=com||{};com.wiris||(com.wiris={}),com.wiris.js||(com.wiris.js={}),com.wiris.js.JsPluginTools=function(){this.tryReady()},com.wiris.js.JsPluginTools.__name__=!0,com.wiris.js.JsPluginTools.main=function(){var e;e=com.wiris.js.JsPluginTools.getInstance(),haxe.Timer.delay($bind(e,e.tryReady),100)},com.wiris.js.JsPluginTools.getInstance=function(){return null==com.wiris.js.JsPluginTools.instance&&(com.wiris.js.JsPluginTools.instance=new com.wiris.js.JsPluginTools),com.wiris.js.JsPluginTools.instance},com.wiris.js.JsPluginTools.bypassEncapsulation=function(){null==window.com&&(window.com={}),null==window.com.wiris&&(window.com.wiris={}),null==window.com.wiris.js&&(window.com.wiris.js={}),null==window.com.wiris.js.JsPluginTools&&(window.com.wiris.js.JsPluginTools=com.wiris.js.JsPluginTools.getInstance())},com.wiris.js.JsPluginTools.prototype={md5encode:function(e){return haxe.Md5.encode(e)},doLoad:function(){this.ready=!0,com.wiris.js.JsPluginTools.instance=this,com.wiris.js.JsPluginTools.bypassEncapsulation()},tryReady:function(){this.ready=!1,js.Lib.document.readyState&&(this.doLoad(),this.ready=!0),this.ready||haxe.Timer.delay($bind(this,this.tryReady),100)},__class__:com.wiris.js.JsPluginTools};var haxe=haxe||{};haxe.Log=function(){},haxe.Log.__name__=!0,haxe.Log.trace=function(e,t){js.Boot.__trace(e,t)},haxe.Log.clear=function(){js.Boot.__clear_trace()},haxe.Md5=function(){},haxe.Md5.__name__=!0,haxe.Md5.encode=function(e){return(new haxe.Md5).doEncode(e)},haxe.Md5.prototype={doEncode:function(e){for(var t=this.str2blks(e),n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o<t.length;){var s=n,l=r,c=i,u=a;0,n=this.ff(n,r,i,a,t[o],7,-680876936),a=this.ff(a,n,r,i,t[o+1],12,-389564586),i=this.ff(i,a,n,r,t[o+2],17,606105819),r=this.ff(r,i,a,n,t[o+3],22,-1044525330),n=this.ff(n,r,i,a,t[o+4],7,-176418897),a=this.ff(a,n,r,i,t[o+5],12,1200080426),i=this.ff(i,a,n,r,t[o+6],17,-1473231341),r=this.ff(r,i,a,n,t[o+7],22,-45705983),n=this.ff(n,r,i,a,t[o+8],7,1770035416),a=this.ff(a,n,r,i,t[o+9],12,-1958414417),i=this.ff(i,a,n,r,t[o+10],17,-42063),r=this.ff(r,i,a,n,t[o+11],22,-1990404162),n=this.ff(n,r,i,a,t[o+12],7,1804603682),a=this.ff(a,n,r,i,t[o+13],12,-40341101),i=this.ff(i,a,n,r,t[o+14],17,-1502002290),r=this.ff(r,i,a,n,t[o+15],22,1236535329),n=this.gg(n,r,i,a,t[o+1],5,-165796510),a=this.gg(a,n,r,i,t[o+6],9,-1069501632),i=this.gg(i,a,n,r,t[o+11],14,643717713),r=this.gg(r,i,a,n,t[o],20,-373897302),n=this.gg(n,r,i,a,t[o+5],5,-701558691),a=this.gg(a,n,r,i,t[o+10],9,38016083),i=this.gg(i,a,n,r,t[o+15],14,-660478335),r=this.gg(r,i,a,n,t[o+4],20,-405537848),n=this.gg(n,r,i,a,t[o+9],5,568446438),a=this.gg(a,n,r,i,t[o+14],9,-1019803690),i=this.gg(i,a,n,r,t[o+3],14,-187363961),r=this.gg(r,i,a,n,t[o+8],20,1163531501),n=this.gg(n,r,i,a,t[o+13],5,-1444681467),a=this.gg(a,n,r,i,t[o+2],9,-51403784),i=this.gg(i,a,n,r,t[o+7],14,1735328473),r=this.gg(r,i,a,n,t[o+12],20,-1926607734),n=this.hh(n,r,i,a,t[o+5],4,-378558),a=this.hh(a,n,r,i,t[o+8],11,-2022574463),i=this.hh(i,a,n,r,t[o+11],16,1839030562),r=this.hh(r,i,a,n,t[o+14],23,-35309556),n=this.hh(n,r,i,a,t[o+1],4,-1530992060),a=this.hh(a,n,r,i,t[o+4],11,1272893353),i=this.hh(i,a,n,r,t[o+7],16,-155497632),r=this.hh(r,i,a,n,t[o+10],23,-1094730640),n=this.hh(n,r,i,a,t[o+13],4,681279174),a=this.hh(a,n,r,i,t[o],11,-358537222),i=this.hh(i,a,n,r,t[o+3],16,-722521979),r=this.hh(r,i,a,n,t[o+6],23,76029189),n=this.hh(n,r,i,a,t[o+9],4,-640364487),a=this.hh(a,n,r,i,t[o+12],11,-421815835),i=this.hh(i,a,n,r,t[o+15],16,530742520),r=this.hh(r,i,a,n,t[o+2],23,-995338651),n=this.ii(n,r,i,a,t[o],6,-198630844),a=this.ii(a,n,r,i,t[o+7],10,1126891415),i=this.ii(i,a,n,r,t[o+14],15,-1416354905),r=this.ii(r,i,a,n,t[o+5],21,-57434055),n=this.ii(n,r,i,a,t[o+12],6,1700485571),a=this.ii(a,n,r,i,t[o+3],10,-1894986606),i=this.ii(i,a,n,r,t[o+10],15,-1051523),r=this.ii(r,i,a,n,t[o+1],21,-2054922799),n=this.ii(n,r,i,a,t[o+8],6,1873313359),a=this.ii(a,n,r,i,t[o+15],10,-30611744),i=this.ii(i,a,n,r,t[o+6],15,-1560198380),r=this.ii(r,i,a,n,t[o+13],21,1309151649),n=this.ii(n,r,i,a,t[o+4],6,-145523070),a=this.ii(a,n,r,i,t[o+11],10,-1120210379),i=this.ii(i,a,n,r,t[o+2],15,718787259),r=this.ii(r,i,a,n,t[o+9],21,-343485551),n=this.addme(n,s),r=this.addme(r,l),i=this.addme(i,c),a=this.addme(a,u),o+=16}return this.rhex(n)+this.rhex(r)+this.rhex(i)+this.rhex(a)},ii:function(e,t,n,r,i,a,o){return this.cmn(this.bitXOR(n,this.bitOR(t,~r)),e,t,i,a,o)},hh:function(e,t,n,r,i,a,o){return this.cmn(this.bitXOR(this.bitXOR(t,n),r),e,t,i,a,o)},gg:function(e,t,n,r,i,a,o){return this.cmn(this.bitOR(this.bitAND(t,r),this.bitAND(n,~r)),e,t,i,a,o)},ff:function(e,t,n,r,i,a,o){return this.cmn(this.bitOR(this.bitAND(t,n),this.bitAND(~t,r)),e,t,i,a,o)},cmn:function(e,t,n,r,i,a){return this.addme(this.rol(this.addme(this.addme(t,e),this.addme(r,a)),i),n)},rol:function(e,t){return e<<t|e>>>32-t},str2blks:function(e){for(var t=1+(e.length+8>>6),n=new Array,r=0,i=16*t;r<i;){n[a=r++]=0}for(var a=0;a<e.length;)n[a>>2]|=HxOverrides.cca(e,a)<<(8*e.length+a)%4*8,a++;n[a>>2]|=128<<(8*e.length+a)%4*8;var o=8*e.length,s=16*t-2;return n[s]=255&o,n[s]|=(o>>>8&255)<<8,n[s]|=(o>>>16&255)<<16,n[s]|=(o>>>24&255)<<24,n},rhex:function(e){for(var t="",n=0;n<4;){var r=n++;t+="0123456789abcdef".charAt(e>>8*r+4&15)+"0123456789abcdef".charAt(e>>8*r&15)}return t},addme:function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},bitAND:function(e,t){return(e>>>1&t>>>1)<<1|1&e&t},bitXOR:function(e,t){return(e>>>1^t>>>1)<<1|1&e^1&t},bitOR:function(e,t){return(e>>>1|t>>>1)<<1|(1&e|1&t)},__class__:haxe.Md5},haxe.Timer=function(e){var t=this;this.id=window.setInterval((function(){t.run()}),e)},haxe.Timer.__name__=!0,haxe.Timer.delay=function(e,t){var n=new haxe.Timer(t);return n.run=function(){n.stop(),e()},n},haxe.Timer.measure=function(e,t){var n=haxe.Timer.stamp(),r=e();return haxe.Log.trace(haxe.Timer.stamp()-n+"s",t),r},haxe.Timer.stamp=function(){return(new Date).getTime()/1e3},haxe.Timer.prototype={run:function(){},stop:function(){null!=this.id&&(window.clearInterval(this.id),this.id=null)},__class__:haxe.Timer};var js=js||{},$_;function $bind(e,t){var n=function(){return n.method.apply(n.scope,arguments)};return n.scope=e,n.method=t,n}js.Boot=function(){},js.Boot.__name__=!0,js.Boot.__unhtml=function(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;")},js.Boot.__trace=function(e,t){var n,r=null!=t?t.fileName+":"+t.lineNumber+": ":"";r+=js.Boot.__string_rec(e,""),"undefined"!=typeof document&&null!=(n=document.getElementById("haxe:trace"))?n.innerHTML+=js.Boot.__unhtml(r)+"<br/>":"undefined"!=typeof console&&null!=console.log&&console.log(r)},js.Boot.__clear_trace=function(){var e=document.getElementById("haxe:trace");null!=e&&(e.innerHTML="")},js.Boot.isClass=function(e){return e.__name__},js.Boot.isEnum=function(e){return e.__ename__},js.Boot.getClass=function(e){return e.__class__},js.Boot.__string_rec=function(e,t){if(null==e)return"null";if(t.length>=5)return"<...>";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var r=e[0]+"(";t+="\t";for(var i=2,a=e.length;i<a;){r+=2!=(o=i++)?","+js.Boot.__string_rec(e[o],t):js.Boot.__string_rec(e[o],t)}return r+")"}var o,s=e.length;r="[";t+="\t";for(a=0;a<s;){var l=a++;r+=(l>0?",":"")+js.Boot.__string_rec(e[l],t)}return r+="]"}var c;try{c=e.toString}catch(e){return"???"}if(null!=c&&c!=Object.toString){var u=e.toString();if("[object Object]"!=u)return u}var d=null;r="{\n";t+="\t";var h=null!=e.hasOwnProperty;for(var d in e)h&&!e.hasOwnProperty(d)||"prototype"!=d&&"__class__"!=d&&"__super__"!=d&&"__interfaces__"!=d&&"__properties__"!=d&&(2!=r.length&&(r+=", \n"),r+=t+d+" : "+js.Boot.__string_rec(e[d],t));return r+="\n"+(t=t.substring(1))+"}";case"function":return"<function>";case"string":return e;default:return String(e)}},js.Boot.__interfLoop=function(e,t){if(null==e)return!1;if(e==t)return!0;var n=e.__interfaces__;if(null!=n)for(var r=0,i=n.length;r<i;){var a=n[r++];if(a==t||js.Boot.__interfLoop(a,t))return!0}return js.Boot.__interfLoop(e.__super__,t)},js.Boot.__instanceof=function(e,t){try{if(e instanceof t)return t!=Array||null==e.__enum__;if(js.Boot.__interfLoop(e.__class__,t))return!0}catch(e){if(null==t)return!1}switch(t){case Int:return Math.ceil(e%2147483648)===e;case Float:return"number"==typeof e;case Bool:return!0===e||!1===e;case String:return"string"==typeof e;case Dynamic:return!0;default:return null!=e&&(t==Class&&null!=e.__name__||(t==Enum&&null!=e.__ename__||e.__enum__==t))}},js.Boot.__cast=function(e,t){if(js.Boot.__instanceof(e,t))return e;throw"Cannot cast "+Std.string(e)+" to "+Std.string(t)},js.Lib=function(){},js.Lib.__name__=!0,js.Lib.debug=function(){},js.Lib.alert=function(e){alert(js.Boot.__string_rec(e,""))},js.Lib.eval=function(code){return eval(code)},js.Lib.setErrorHandler=function(e){js.Lib.onerror=e},Array.prototype.indexOf&&(HxOverrides.remove=function(e,t){var n=e.indexOf(t);return-1!=n&&(e.splice(n,1),!0)}),Math.__name__=["Math"],Math.NaN=Number.NaN,Math.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,Math.POSITIVE_INFINITY=Number.POSITIVE_INFINITY,Math.isFinite=function(e){return isFinite(e)},Math.isNaN=function(e){return isNaN(e)},String.prototype.__class__=String,String.__name__=!0,Array.prototype.__class__=Array,Array.__name__=!0,Date.prototype.__class__=Date,Date.__name__=["Date"];var Int={__name__:["Int"]},Dynamic={__name__:["Dynamic"]},Float=Number;Float.__name__=["Float"];var Bool=Boolean;Bool.__ename__=["Bool"];var Class={__name__:["Class"]},Enum={},Void={__ename__:["Void"]};"undefined"!=typeof document&&(js.Lib.document=document),"undefined"!=typeof window&&(js.Lib.window=window,js.Lib.window.onerror=function(e,t,n){var r=js.Lib.onerror;return null!=r&&r(e,[t+":"+n])}),com.wiris.js.JsPluginTools.main(),delete Array.prototype.__class__}(),function(){var HxOverrides=function(){};HxOverrides.__name__=!0,HxOverrides.dateStr=function(e){var t=e.getMonth()+1,n=e.getDate(),r=e.getHours(),i=e.getMinutes(),a=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(n<10?"0"+n:""+n)+" "+(r<10?"0"+r:""+r)+":"+(i<10?"0"+i:""+i)+":"+(a<10?"0"+a:""+a)},HxOverrides.strDate=function(e){switch(e.length){case 8:var t=e.split(":"),n=new Date;return n.setTime(0),n.setUTCHours(t[0]),n.setUTCMinutes(t[1]),n.setUTCSeconds(t[2]),n;case 10:t=e.split("-");return new Date(t[0],t[1]-1,t[2],0,0,0);case 19:var r=(t=e.split(" "))[0].split("-"),i=t[1].split(":");return new Date(r[0],r[1]-1,r[2],i[0],i[1],i[2]);default:throw"Invalid date format : "+e}},HxOverrides.cca=function(e,t){var n=e.charCodeAt(t);if(n==n)return n},HxOverrides.substr=function(e,t,n){return null!=t&&0!=t&&null!=n&&n<0?"":(null==n&&(n=e.length),t<0?(t=e.length+t)<0&&(t=0):n<0&&(n=e.length+n-t),e.substr(t,n))},HxOverrides.remove=function(e,t){for(var n=0,r=e.length;n<r;){if(e[n]==t)return e.splice(n,1),!0;n++}return!1},HxOverrides.iter=function(e){return{cur:0,arr:e,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var IntIter=function(e,t){this.min=e,this.max=t};IntIter.__name__=!0,IntIter.prototype={next:function(){return this.min++},hasNext:function(){return this.min<this.max},__class__:IntIter};var Std=function(){};Std.__name__=!0,Std.is=function(e,t){return js.Boot.__instanceof(e,t)},Std.string=function(e){return js.Boot.__string_rec(e,"")},Std.int=function(e){return 0|e},Std.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=HxOverrides.cca(e,1)&&88!=HxOverrides.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t},Std.parseFloat=function(e){return parseFloat(e)},Std.random=function(e){return Math.floor(Math.random()*e)};var com=com||{};com.wiris||(com.wiris={}),com.wiris.js||(com.wiris.js={}),com.wiris.js.JsPluginTools=function(){this.tryReady()},com.wiris.js.JsPluginTools.__name__=!0,com.wiris.js.JsPluginTools.main=function(){var e;e=com.wiris.js.JsPluginTools.getInstance(),haxe.Timer.delay($bind(e,e.tryReady),100)},com.wiris.js.JsPluginTools.getInstance=function(){return null==com.wiris.js.JsPluginTools.instance&&(com.wiris.js.JsPluginTools.instance=new com.wiris.js.JsPluginTools),com.wiris.js.JsPluginTools.instance},com.wiris.js.JsPluginTools.bypassEncapsulation=function(){null==window.com&&(window.com={}),null==window.com.wiris&&(window.com.wiris={}),null==window.com.wiris.js&&(window.com.wiris.js={}),null==window.com.wiris.js.JsPluginTools&&(window.com.wiris.js.JsPluginTools=com.wiris.js.JsPluginTools.getInstance())},com.wiris.js.JsPluginTools.prototype={md5encode:function(e){return haxe.Md5.encode(e)},doLoad:function(){this.ready=!0,com.wiris.js.JsPluginTools.instance=this,com.wiris.js.JsPluginTools.bypassEncapsulation()},tryReady:function(){this.ready=!1,js.Lib.document.readyState&&(this.doLoad(),this.ready=!0),this.ready||haxe.Timer.delay($bind(this,this.tryReady),100)},__class__:com.wiris.js.JsPluginTools};var haxe=haxe||{};haxe.Log=function(){},haxe.Log.__name__=!0,haxe.Log.trace=function(e,t){js.Boot.__trace(e,t)},haxe.Log.clear=function(){js.Boot.__clear_trace()},haxe.Md5=function(){},haxe.Md5.__name__=!0,haxe.Md5.encode=function(e){return(new haxe.Md5).doEncode(e)},haxe.Md5.prototype={doEncode:function(e){for(var t=this.str2blks(e),n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o<t.length;){var s=n,l=r,c=i,u=a;0,n=this.ff(n,r,i,a,t[o],7,-680876936),a=this.ff(a,n,r,i,t[o+1],12,-389564586),i=this.ff(i,a,n,r,t[o+2],17,606105819),r=this.ff(r,i,a,n,t[o+3],22,-1044525330),n=this.ff(n,r,i,a,t[o+4],7,-176418897),a=this.ff(a,n,r,i,t[o+5],12,1200080426),i=this.ff(i,a,n,r,t[o+6],17,-1473231341),r=this.ff(r,i,a,n,t[o+7],22,-45705983),n=this.ff(n,r,i,a,t[o+8],7,1770035416),a=this.ff(a,n,r,i,t[o+9],12,-1958414417),i=this.ff(i,a,n,r,t[o+10],17,-42063),r=this.ff(r,i,a,n,t[o+11],22,-1990404162),n=this.ff(n,r,i,a,t[o+12],7,1804603682),a=this.ff(a,n,r,i,t[o+13],12,-40341101),i=this.ff(i,a,n,r,t[o+14],17,-1502002290),r=this.ff(r,i,a,n,t[o+15],22,1236535329),n=this.gg(n,r,i,a,t[o+1],5,-165796510),a=this.gg(a,n,r,i,t[o+6],9,-1069501632),i=this.gg(i,a,n,r,t[o+11],14,643717713),r=this.gg(r,i,a,n,t[o],20,-373897302),n=this.gg(n,r,i,a,t[o+5],5,-701558691),a=this.gg(a,n,r,i,t[o+10],9,38016083),i=this.gg(i,a,n,r,t[o+15],14,-660478335),r=this.gg(r,i,a,n,t[o+4],20,-405537848),n=this.gg(n,r,i,a,t[o+9],5,568446438),a=this.gg(a,n,r,i,t[o+14],9,-1019803690),i=this.gg(i,a,n,r,t[o+3],14,-187363961),r=this.gg(r,i,a,n,t[o+8],20,1163531501),n=this.gg(n,r,i,a,t[o+13],5,-1444681467),a=this.gg(a,n,r,i,t[o+2],9,-51403784),i=this.gg(i,a,n,r,t[o+7],14,1735328473),r=this.gg(r,i,a,n,t[o+12],20,-1926607734),n=this.hh(n,r,i,a,t[o+5],4,-378558),a=this.hh(a,n,r,i,t[o+8],11,-2022574463),i=this.hh(i,a,n,r,t[o+11],16,1839030562),r=this.hh(r,i,a,n,t[o+14],23,-35309556),n=this.hh(n,r,i,a,t[o+1],4,-1530992060),a=this.hh(a,n,r,i,t[o+4],11,1272893353),i=this.hh(i,a,n,r,t[o+7],16,-155497632),r=this.hh(r,i,a,n,t[o+10],23,-1094730640),n=this.hh(n,r,i,a,t[o+13],4,681279174),a=this.hh(a,n,r,i,t[o],11,-358537222),i=this.hh(i,a,n,r,t[o+3],16,-722521979),r=this.hh(r,i,a,n,t[o+6],23,76029189),n=this.hh(n,r,i,a,t[o+9],4,-640364487),a=this.hh(a,n,r,i,t[o+12],11,-421815835),i=this.hh(i,a,n,r,t[o+15],16,530742520),r=this.hh(r,i,a,n,t[o+2],23,-995338651),n=this.ii(n,r,i,a,t[o],6,-198630844),a=this.ii(a,n,r,i,t[o+7],10,1126891415),i=this.ii(i,a,n,r,t[o+14],15,-1416354905),r=this.ii(r,i,a,n,t[o+5],21,-57434055),n=this.ii(n,r,i,a,t[o+12],6,1700485571),a=this.ii(a,n,r,i,t[o+3],10,-1894986606),i=this.ii(i,a,n,r,t[o+10],15,-1051523),r=this.ii(r,i,a,n,t[o+1],21,-2054922799),n=this.ii(n,r,i,a,t[o+8],6,1873313359),a=this.ii(a,n,r,i,t[o+15],10,-30611744),i=this.ii(i,a,n,r,t[o+6],15,-1560198380),r=this.ii(r,i,a,n,t[o+13],21,1309151649),n=this.ii(n,r,i,a,t[o+4],6,-145523070),a=this.ii(a,n,r,i,t[o+11],10,-1120210379),i=this.ii(i,a,n,r,t[o+2],15,718787259),r=this.ii(r,i,a,n,t[o+9],21,-343485551),n=this.addme(n,s),r=this.addme(r,l),i=this.addme(i,c),a=this.addme(a,u),o+=16}return this.rhex(n)+this.rhex(r)+this.rhex(i)+this.rhex(a)},ii:function(e,t,n,r,i,a,o){return this.cmn(this.bitXOR(n,this.bitOR(t,~r)),e,t,i,a,o)},hh:function(e,t,n,r,i,a,o){return this.cmn(this.bitXOR(this.bitXOR(t,n),r),e,t,i,a,o)},gg:function(e,t,n,r,i,a,o){return this.cmn(this.bitOR(this.bitAND(t,r),this.bitAND(n,~r)),e,t,i,a,o)},ff:function(e,t,n,r,i,a,o){return this.cmn(this.bitOR(this.bitAND(t,n),this.bitAND(~t,r)),e,t,i,a,o)},cmn:function(e,t,n,r,i,a){return this.addme(this.rol(this.addme(this.addme(t,e),this.addme(r,a)),i),n)},rol:function(e,t){return e<<t|e>>>32-t},str2blks:function(e){for(var t=1+(e.length+8>>6),n=new Array,r=0,i=16*t;r<i;){n[a=r++]=0}for(var a=0;a<e.length;)n[a>>2]|=HxOverrides.cca(e,a)<<(8*e.length+a)%4*8,a++;n[a>>2]|=128<<(8*e.length+a)%4*8;var o=8*e.length,s=16*t-2;return n[s]=255&o,n[s]|=(o>>>8&255)<<8,n[s]|=(o>>>16&255)<<16,n[s]|=(o>>>24&255)<<24,n},rhex:function(e){for(var t="",n=0;n<4;){var r=n++;t+="0123456789abcdef".charAt(e>>8*r+4&15)+"0123456789abcdef".charAt(e>>8*r&15)}return t},addme:function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},bitAND:function(e,t){return(e>>>1&t>>>1)<<1|1&e&t},bitXOR:function(e,t){return(e>>>1^t>>>1)<<1|1&e^1&t},bitOR:function(e,t){return(e>>>1|t>>>1)<<1|(1&e|1&t)},__class__:haxe.Md5},haxe.Timer=function(e){var t=this;this.id=window.setInterval((function(){t.run()}),e)},haxe.Timer.__name__=!0,haxe.Timer.delay=function(e,t){var n=new haxe.Timer(t);return n.run=function(){n.stop(),e()},n},haxe.Timer.measure=function(e,t){var n=haxe.Timer.stamp(),r=e();return haxe.Log.trace(haxe.Timer.stamp()-n+"s",t),r},haxe.Timer.stamp=function(){return(new Date).getTime()/1e3},haxe.Timer.prototype={run:function(){},stop:function(){null!=this.id&&(window.clearInterval(this.id),this.id=null)},__class__:haxe.Timer};var js=js||{},$_;function $bind(e,t){var n=function(){return n.method.apply(n.scope,arguments)};return n.scope=e,n.method=t,n}js.Boot=function(){},js.Boot.__name__=!0,js.Boot.__unhtml=function(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;")},js.Boot.__trace=function(e,t){var n,r=null!=t?t.fileName+":"+t.lineNumber+": ":"";r+=js.Boot.__string_rec(e,""),"undefined"!=typeof document&&null!=(n=document.getElementById("haxe:trace"))?n.innerHTML+=js.Boot.__unhtml(r)+"<br/>":"undefined"!=typeof console&&null!=console.log&&console.log(r)},js.Boot.__clear_trace=function(){var e=document.getElementById("haxe:trace");null!=e&&(e.innerHTML="")},js.Boot.isClass=function(e){return e.__name__},js.Boot.isEnum=function(e){return e.__ename__},js.Boot.getClass=function(e){return e.__class__},js.Boot.__string_rec=function(e,t){if(null==e)return"null";if(t.length>=5)return"<...>";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var r=e[0]+"(";t+="\t";for(var i=2,a=e.length;i<a;){r+=2!=(o=i++)?","+js.Boot.__string_rec(e[o],t):js.Boot.__string_rec(e[o],t)}return r+")"}var o,s=e.length;r="[";t+="\t";for(a=0;a<s;){var l=a++;r+=(l>0?",":"")+js.Boot.__string_rec(e[l],t)}return r+="]"}var c;try{c=e.toString}catch(e){return"???"}if(null!=c&&c!=Object.toString){var u=e.toString();if("[object Object]"!=u)return u}var d=null;r="{\n";t+="\t";var h=null!=e.hasOwnProperty;for(var d in e)h&&!e.hasOwnProperty(d)||"prototype"!=d&&"__class__"!=d&&"__super__"!=d&&"__interfaces__"!=d&&"__properties__"!=d&&(2!=r.length&&(r+=", \n"),r+=t+d+" : "+js.Boot.__string_rec(e[d],t));return r+="\n"+(t=t.substring(1))+"}";case"function":return"<function>";case"string":return e;default:return String(e)}},js.Boot.__interfLoop=function(e,t){if(null==e)return!1;if(e==t)return!0;var n=e.__interfaces__;if(null!=n)for(var r=0,i=n.length;r<i;){var a=n[r++];if(a==t||js.Boot.__interfLoop(a,t))return!0}return js.Boot.__interfLoop(e.__super__,t)},js.Boot.__instanceof=function(e,t){try{if(e instanceof t)return t!=Array||null==e.__enum__;if(js.Boot.__interfLoop(e.__class__,t))return!0}catch(e){if(null==t)return!1}switch(t){case Int:return Math.ceil(e%2147483648)===e;case Float:return"number"==typeof e;case Bool:return!0===e||!1===e;case String:return"string"==typeof e;case Dynamic:return!0;default:return null!=e&&(t==Class&&null!=e.__name__||(t==Enum&&null!=e.__ename__||e.__enum__==t))}},js.Boot.__cast=function(e,t){if(js.Boot.__instanceof(e,t))return e;throw"Cannot cast "+Std.string(e)+" to "+Std.string(t)},js.Lib=function(){},js.Lib.__name__=!0,js.Lib.debug=function(){},js.Lib.alert=function(e){alert(js.Boot.__string_rec(e,""))},js.Lib.eval=function(code){return eval(code)},js.Lib.setErrorHandler=function(e){js.Lib.onerror=e},Array.prototype.indexOf&&(HxOverrides.remove=function(e,t){var n=e.indexOf(t);return-1!=n&&(e.splice(n,1),!0)}),Math.__name__=["Math"],Math.NaN=Number.NaN,Math.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,Math.POSITIVE_INFINITY=Number.POSITIVE_INFINITY,Math.isFinite=function(e){return isFinite(e)},Math.isNaN=function(e){return isNaN(e)},String.prototype.__class__=String,String.__name__=!0,Array.prototype.__class__=Array,Array.__name__=!0,Date.prototype.__class__=Date,Date.__name__=["Date"];var Int={__name__:["Int"]},Dynamic={__name__:["Dynamic"]},Float=Number;Float.__name__=["Float"];var Bool=Boolean;Bool.__ename__=["Bool"];var Class={__name__:["Class"]},Enum={},Void={__ename__:["Void"]};"undefined"!=typeof document&&(js.Lib.document=document),"undefined"!=typeof window&&(js.Lib.window=window,js.Lib.window.onerror=function(e,t,n){var r=js.Lib.onerror;return null!=r&&r(e,[t+":"+n])}),com.wiris.js.JsPluginTools.main()}(),delete Array.prototype.__class__},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){var r=n(58),i=n(1578);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1580);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]),e.exports=t},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck-vertical-form .ck-button:after{bottom:var(--ck-spacing-small);content:"";position:absolute;right:-1px;top:var(--ck-spacing-small);width:0;z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:var(--ck-spacing-small);content:"";position:absolute;right:-1px;top:var(--ck-spacing-small);width:0;z-index:1}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border:0;border-radius:0;border-top:1px solid var(--ck-color-base-border);margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1583);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{border:0;border-radius:0;border-top:1px solid var(--ck-color-base-border);margin:0;padding:var(--ck-spacing-standard);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1585);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child){margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1587);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck-widget.raw-html-embed{display:flow-root;font-style:normal;margin:.9em auto;min-width:15em;position:relative}.ck-widget.raw-html-embed:before{position:absolute;z-index:1}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{display:flex;flex-direction:column;position:absolute}.ck-widget.raw-html-embed .raw-html-embed__preview{display:flex;overflow:hidden;position:relative}.ck-widget.raw-html-embed .raw-html-embed__preview-content{border-collapse:separate;border-spacing:7px;display:table;margin:auto;position:relative;width:100%}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}:root{--ck-html-embed-content-width:calc(100% - var(--ck-icon-size)*1.5);--ck-html-embed-source-height:10em;--ck-html-embed-unfocused-outline-width:1px;--ck-html-embed-content-min-height:calc(var(--ck-icon-size) + var(--ck-spacing-standard));--ck-html-embed-source-disabled-background:var(--ck-color-base-foreground);--ck-html-embed-source-disabled-color:#737373}.ck-widget.raw-html-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base)}.ck-widget.raw-html-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.raw-html-embed[dir=ltr]{text-align:left}.ck-widget.raw-html-embed[dir=rtl]{text-align:right}.ck-widget.raw-html-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);top:calc(var(--ck-html-embed-unfocused-outline-width)*-1);transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.raw-html-embed[dir=rtl]:before{left:auto;right:var(--ck-spacing-standard)}.ck-widget.raw-html-embed[dir=ltr] .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck.ck-editor__editable.ck-blurred .ck-widget.raw-html-embed.ck-widget_selected:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable:not(.ck-blurred) .ck-widget.raw-html-embed.ck-widget_selected:before{background:var(--ck-color-focus-border);padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable .ck-widget.raw-html-embed:not(.ck-widget_selected):hover:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck-widget.raw-html-embed .raw-html-embed__content-wrapper{padding:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{right:var(--ck-spacing-standard);top:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__save-button{color:var(--ck-color-button-save)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__cancel-button{color:var(--ck-color-button-cancel)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button:not(:first-child){margin-top:var(--ck-spacing-small)}.ck-widget.raw-html-embed[dir=rtl] .raw-html-embed__buttons-wrapper{left:var(--ck-spacing-standard);right:auto}.ck-widget.raw-html-embed .raw-html-embed__source{box-sizing:border-box;direction:ltr;font-family:monospace;font-size:var(--ck-font-size-base);height:var(--ck-html-embed-source-height);min-width:0;padding:var(--ck-spacing-standard);resize:none;tab-size:4;text-align:left;white-space:pre-wrap;width:var(--ck-html-embed-content-width)}.ck-widget.raw-html-embed .raw-html-embed__source[disabled]{-webkit-text-fill-color:var(--ck-html-embed-source-disabled-color);background:var(--ck-html-embed-source-disabled-background);color:var(--ck-html-embed-source-disabled-color);opacity:1}.ck-widget.raw-html-embed .raw-html-embed__preview{min-height:var(--ck-html-embed-content-min-height);width:var(--ck-html-embed-content-width)}.ck-editor__editable:not(.ck-read-only) .ck-widget.raw-html-embed .raw-html-embed__preview{pointer-events:none}.ck-widget.raw-html-embed .raw-html-embed__preview-content{background-color:var(--ck-color-base-foreground);box-sizing:border-box}.ck-widget.raw-html-embed .raw-html-embed__preview-content>*{margin-left:auto;margin-right:auto}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{color:var(--ck-html-embed-source-disabled-color)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1589);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-color-table-focused-cell-background:rgba(158,207,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1591);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);width:var(--ck-insert-table-dropdown-box-width)}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1593);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1595);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1597);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-table-caption-background);caption-side:top;color:var(--ck-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1599);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-color-table-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table table{overflow:hidden;table-layout:fixed}.ck-content .table td,.ck-content .table th{position:relative}.ck-content .table .table-column-resizer{bottom:-999999px;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:-999999px;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck-content .table[draggable] .table-column-resizer{display:none}.ck-content .table .table-column-resizer:hover,.ck-content .table .table-column-resizer__active{background-color:var(--ck-color-table-column-resizer-hover);opacity:.25}.ck-content[dir=rtl] .table .table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}.ck-content.ck-read-only .table .table-column-resizer{display:none}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1601);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom:1px solid var(--ck-color-input-border);border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1603);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]),e.exports=t},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}",""]),e.exports=t},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1607);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1609);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1611);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}",""]),e.exports=t},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1614);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1616);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1618);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1620);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1622);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1624);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1626);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-image-insert-form:focus{outline:none}.ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-image-insert-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1628);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-image-insert__panel{padding:var(--ck-spacing-large)}.ck.ck-image-insert__ck-finder-button{border:1px solid #ccc;border-radius:var(--ck-border-radius);display:block;margin:var(--ck-spacing-standard) auto;width:100%}.ck.ck-splitbutton>.ck-file-dialog-button.ck-button{border:none;margin:0;padding:0}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1630);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+");background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}',""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1632);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,":root{--ck-html-object-embed-unfocused-outline-width:1px}.ck-widget.html-object-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base);min-width:calc(76px + var(--ck-spacing-standard));padding:var(--ck-spacing-small);padding-top:calc(var(--ck-font-size-tiny) + var(--ck-spacing-large))}.ck-widget.html-object-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-object-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.html-object-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-object-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);font-style:normal;font-weight:400;left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-object-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);position:absolute;top:0;transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.html-object-embed .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck-widget.html-object-embed .html-object-embed__content{pointer-events:none}div.ck-widget.html-object-embed{margin:1em auto}span.ck-widget.html-object-embed{display:inline-block}",""]),e.exports=t},function(e,t,n){var r=n(58),i=n(1634);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,'.ck-source-editing-area{overflow:hidden;position:relative}.ck-source-editing-area textarea,.ck-source-editing-area:after{border:1px solid transparent;font-family:monospace;font-size:var(--ck-font-size-normal);line-height:var(--ck-line-height-base);margin:0;padding:var(--ck-spacing-large);white-space:pre-wrap}.ck-source-editing-area:after{content:attr(data-value) " ";display:block;visibility:hidden}.ck-source-editing-area textarea{border-color:var(--ck-color-base-border);border-radius:0;box-sizing:border-box;height:100%;outline:none;overflow:hidden;position:absolute;resize:none;width:100%}.ck-rounded-corners .ck-source-editing-area textarea,.ck-source-editing-area textarea.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck-source-editing-area textarea:not([readonly]):focus{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}',""]),e.exports=t},function(e,t){},function(e,t,n){var r=n(58),i=n(1637);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0},o=(r(i,a),i.locals?i.locals:{});e.exports=o},function(e,t,n){(t=n(59)(!1)).push([e.i,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]),e.exports=t},function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=c(n(0)),a=n(1639),o=c(n(1645)),s=c(n(1647)),l=n(316);function c(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A=(0,l.canUseDOM)()&&n(1648),_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(d,e);var t,n,r,c=m(d);function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),y(v(t=c.call(this,e)),"innerSliderRefHandler",(function(e){return t.innerSlider=e})),y(v(t),"slickPrev",(function(){return t.innerSlider.slickPrev()})),y(v(t),"slickNext",(function(){return t.innerSlider.slickNext()})),y(v(t),"slickGoTo",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.innerSlider.slickGoTo(e,n)})),y(v(t),"slickPause",(function(){return t.innerSlider.pause("paused")})),y(v(t),"slickPlay",(function(){return t.innerSlider.autoPlay("play")})),t.state={breakpoint:null},t._responsiveMediaHandlers=[],t}return t=d,(n=[{key:"media",value:function(e,t){A.register(e,t),this._responsiveMediaHandlers.push({query:e,handler:t})}},{key:"componentDidMount",value:function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map((function(e){return e.breakpoint}));t.sort((function(e,t){return e-t})),t.forEach((function(n,r){var i;i=0===r?(0,o.default)({minWidth:0,maxWidth:n}):(0,o.default)({minWidth:t[r-1]+1,maxWidth:n}),(0,l.canUseDOM)()&&e.media(i,(function(){e.setState({breakpoint:n})}))}));var n=(0,o.default)({minWidth:t.slice(-1)[0]});(0,l.canUseDOM)()&&this.media(n,(function(){e.setState({breakpoint:null})}))}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEach((function(e){A.unregister(e.query,e.handler)}))}},{key:"render",value:function(){var e,t,n=this;(e=this.state.breakpoint?"unslick"===(t=this.props.responsive.filter((function(e){return e.breakpoint===n.state.breakpoint})))[0].settings?"unslick":h(h(h({},s.default),this.props),t[0].settings):h(h({},s.default),this.props)).centerMode&&(e.slidesToScroll,e.slidesToScroll=1),e.fade&&(e.slidesToShow,e.slidesToScroll,e.slidesToShow=1,e.slidesToScroll=1);var r=i.default.Children.toArray(this.props.children);r=r.filter((function(e){return"string"==typeof e?!!e.trim():!!e})),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var o=[],l=null,c=0;c<r.length;c+=e.rows*e.slidesPerRow){for(var d=[],f=c;f<c+e.rows*e.slidesPerRow;f+=e.slidesPerRow){for(var p=[],m=f;m<f+e.slidesPerRow&&(e.variableWidth&&r[m].props.style&&(l=r[m].props.style.width),!(m>=r.length));m+=1)p.push(i.default.cloneElement(r[m],{key:100*c+10*f+m,tabIndex:-1,style:{width:"".concat(100/e.slidesPerRow,"%"),display:"inline-block"}}));d.push(i.default.createElement("div",{key:10*c+f},p))}e.variableWidth?o.push(i.default.createElement("div",{key:c,style:{width:l}},d)):o.push(i.default.createElement("div",{key:c},d))}if("unslick"===e){var g="regular slider "+(this.props.className||"");return(i.default.createElement("div",{className:g},r))}return o.length<=e.slidesToShow&&(e.unslick=!0),i.default.createElement(a.InnerSlider,u({style:this.props.style,ref:this.innerSliderRefHandler},e),o)}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.default.Component);t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSlider=void 0;var r=h(n(0)),i=h(n(1640)),a=h(n(324)),o=h(n(4)),s=n(316),l=n(1641),c=n(1642),u=n(1643),d=h(n(1644));function h(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="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)}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var i=E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(_,e);var t,n,h,g=A(_);function _(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_),S(w(t=g.call(this,e)),"listRefHandler",(function(e){return t.list=e})),S(w(t),"trackRefHandler",(function(e){return t.track=e})),S(w(t),"adaptHeight",(function(){if(t.props.adaptiveHeight&&t.list){var e=t.list.querySelector('[data-index="'.concat(t.state.currentSlide,'"]'));t.list.style.height=(0,s.getHeight)(e)+"px"}})),S(w(t),"componentDidMount",(function(){if(t.props.onInit&&t.props.onInit(),t.props.lazyLoad){var e=(0,s.getOnDemandLazySlides)(v(v({},t.props),t.state));e.length>0&&(t.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),t.props.onLazyLoad&&t.props.onLazyLoad(e))}var n=v({listRef:t.list,trackRef:t.track},t.props);t.updateState(n,!0,(function(){t.adaptHeight(),t.props.autoplay&&t.autoPlay("update")})),"progressive"===t.props.lazyLoad&&(t.lazyLoadTimer=setInterval(t.progressiveLazyLoad,1e3)),t.ro=new d.default((function(){t.state.animating?(t.onWindowResized(!1),t.callbackTimers.push(setTimeout((function(){return t.onWindowResized()}),t.props.speed))):t.onWindowResized()})),t.ro.observe(t.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),(function(e){e.onfocus=t.props.pauseOnFocus?t.onSlideFocus:null,e.onblur=t.props.pauseOnFocus?t.onSlideBlur:null})),window.addEventListener?window.addEventListener("resize",t.onWindowResized):window.attachEvent("onresize",t.onWindowResized)})),S(w(t),"componentWillUnmount",(function(){t.animationEndCallback&&clearTimeout(t.animationEndCallback),t.lazyLoadTimer&&clearInterval(t.lazyLoadTimer),t.callbackTimers.length&&(t.callbackTimers.forEach((function(e){return clearTimeout(e)})),t.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",t.onWindowResized):window.detachEvent("onresize",t.onWindowResized),t.autoplayTimer&&clearInterval(t.autoplayTimer),t.ro.disconnect()})),S(w(t),"componentDidUpdate",(function(e){if(t.checkImagesLoad(),t.props.onReInit&&t.props.onReInit(),t.props.lazyLoad){var n=(0,s.getOnDemandLazySlides)(v(v({},t.props),t.state));n.length>0&&(t.setState((function(e){return{lazyLoadedList:e.lazyLoadedList.concat(n)}})),t.props.onLazyLoad&&t.props.onLazyLoad(n))}t.adaptHeight();var i=v(v({listRef:t.list,trackRef:t.track},t.props),t.state),a=t.didPropsChange(e);a&&t.updateState(i,a,(function(){t.state.currentSlide>=r.default.Children.count(t.props.children)&&t.changeSlide({message:"index",index:r.default.Children.count(t.props.children)-t.props.slidesToShow,currentSlide:t.state.currentSlide}),t.props.autoplay?t.autoPlay("update"):t.pause("paused")}))})),S(w(t),"onWindowResized",(function(e){t.debouncedResize&&t.debouncedResize.cancel(),t.debouncedResize=(0,a.default)((function(){return t.resizeWindow(e)}),50),t.debouncedResize()})),S(w(t),"resizeWindow",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Boolean(t.track&&t.track.node);if(n){var r=v(v({listRef:t.list,trackRef:t.track},t.props),t.state);t.updateState(r,e,(function(){t.props.autoplay?t.autoPlay("update"):t.pause("paused")})),t.setState({animating:!1}),clearTimeout(t.animationEndCallback),delete t.animationEndCallback}})),S(w(t),"updateState",(function(e,n,i){var a=(0,s.initializedState)(e);e=v(v(v({},e),a),{},{slideIndex:a.currentSlide});var o=(0,s.getTrackLeft)(e);e=v(v({},e),{},{left:o});var l=(0,s.getTrackCSS)(e);(n||r.default.Children.count(t.props.children)!==r.default.Children.count(e.children))&&(a.trackStyle=l),t.setState(a,i)})),S(w(t),"ssrInit",(function(){if(t.props.variableWidth){var e=0,n=0,i=[],a=(0,s.getPreClones)(v(v(v({},t.props),t.state),{},{slideCount:t.props.children.length})),o=(0,s.getPostClones)(v(v(v({},t.props),t.state),{},{slideCount:t.props.children.length}));t.props.children.forEach((function(t){i.push(t.props.style.width),e+=t.props.style.width}));for(var l=0;l<a;l++)n+=i[i.length-1-l],e+=i[i.length-1-l];for(var c=0;c<o;c++)e+=i[c];for(var u=0;u<t.state.currentSlide;u++)n+=i[u];var d={width:e+"px",left:-n+"px"};if(t.props.centerMode){var h="".concat(i[t.state.currentSlide],"px");d.left="calc(".concat(d.left," + (100% - ").concat(h,") / 2 ) ")}return{trackStyle:d}}var f=r.default.Children.count(t.props.children),p=v(v(v({},t.props),t.state),{},{slideCount:f}),m=(0,s.getPreClones)(p)+(0,s.getPostClones)(p)+f,g=100/t.props.slidesToShow*m,b=100/m,y=-b*((0,s.getPreClones)(p)+t.state.currentSlide)*g/100;return t.props.centerMode&&(y+=(100-b*g/100)/2),{slideWidth:b+"%",trackStyle:{width:g+"%",left:y+"%"}}})),S(w(t),"checkImagesLoad",(function(){var e=t.list&&t.list.querySelectorAll&&t.list.querySelectorAll(".slick-slide img")||[],n=e.length,r=0;Array.prototype.forEach.call(e,(function(e){var i=function(){return++r&&r>=n&&t.onWindowResized()};if(e.onclick){var a=e.onclick;e.onclick=function(){a(),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(t.props.lazyLoad?e.onload=function(){t.adaptHeight(),t.callbackTimers.push(setTimeout(t.onWindowResized,t.props.speed))}:(e.onload=i,e.onerror=function(){i(),t.props.onLazyLoadError&&t.props.onLazyLoadError()}))}))})),S(w(t),"progressiveLazyLoad",(function(){for(var e=[],n=v(v({},t.props),t.state),r=t.state.currentSlide;r<t.state.slideCount+(0,s.getPostClones)(n);r++)if(t.state.lazyLoadedList.indexOf(r)<0){e.push(r);break}for(var i=t.state.currentSlide-1;i>=-(0,s.getPreClones)(n);i--)if(t.state.lazyLoadedList.indexOf(i)<0){e.push(i);break}e.length>0?(t.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),t.props.onLazyLoad&&t.props.onLazyLoad(e)):t.lazyLoadTimer&&(clearInterval(t.lazyLoadTimer),delete t.lazyLoadTimer)})),S(w(t),"slideHandler",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.props,i=r.asNavFor,a=r.beforeChange,o=r.onLazyLoad,l=r.speed,c=r.afterChange,u=t.state.currentSlide,d=(0,s.slideHandler)(v(v(v({index:e},t.props),t.state),{},{trackRef:t.track,useCSS:t.props.useCSS&&!n})),h=d.state,f=d.nextState;if(h){a&&a(u,h.currentSlide);var p=h.lazyLoadedList.filter((function(e){return t.state.lazyLoadedList.indexOf(e)<0}));o&&p.length>0&&o(p),!t.props.waitForAnimate&&t.animationEndCallback&&(clearTimeout(t.animationEndCallback),c&&c(u),delete t.animationEndCallback),t.setState(h,(function(){i&&t.asNavForIndex!==e&&(t.asNavForIndex=e,i.innerSlider.slideHandler(e)),f&&(t.animationEndCallback=setTimeout((function(){var e=f.animating,n=m(f,["animating"]);t.setState(n,(function(){t.callbackTimers.push(setTimeout((function(){return t.setState({animating:e})}),10)),c&&c(h.currentSlide),delete t.animationEndCallback}))}),l))}))}})),S(w(t),"changeSlide",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=v(v({},t.props),t.state),i=(0,s.changeSlide)(r,e);if((0===i||i)&&(!0===n?t.slideHandler(i,n):t.slideHandler(i),t.props.autoplay&&t.autoPlay("update"),t.props.focusOnSelect)){var a=t.list.querySelectorAll(".slick-current");a[0]&&a[0].focus()}})),S(w(t),"clickHandler",(function(e){!1===t.clickable&&(e.stopPropagation(),e.preventDefault()),t.clickable=!0})),S(w(t),"keyHandler",(function(e){var n=(0,s.keyHandler)(e,t.props.accessibility,t.props.rtl);""!==n&&t.changeSlide({message:n})})),S(w(t),"selectHandler",(function(e){t.changeSlide(e)})),S(w(t),"disableBodyScroll",(function(){window.ontouchmove=function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}})),S(w(t),"enableBodyScroll",(function(){window.ontouchmove=null})),S(w(t),"swipeStart",(function(e){t.props.verticalSwiping&&t.disableBodyScroll();var n=(0,s.swipeStart)(e,t.props.swipe,t.props.draggable);""!==n&&t.setState(n)})),S(w(t),"swipeMove",(function(e){var n=(0,s.swipeMove)(e,v(v(v({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));n&&(n.swiping&&(t.clickable=!1),t.setState(n))})),S(w(t),"swipeEnd",(function(e){var n=(0,s.swipeEnd)(e,v(v(v({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));if(n){var r=n.triggerSlideHandler;delete n.triggerSlideHandler,t.setState(n),void 0!==r&&(t.slideHandler(r),t.props.verticalSwiping&&t.enableBodyScroll())}})),S(w(t),"touchEnd",(function(e){t.swipeEnd(e),t.clickable=!0})),S(w(t),"slickPrev",(function(){t.callbackTimers.push(setTimeout((function(){return t.changeSlide({message:"previous"})}),0))})),S(w(t),"slickNext",(function(){t.callbackTimers.push(setTimeout((function(){return t.changeSlide({message:"next"})}),0))})),S(w(t),"slickGoTo",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Number(e),isNaN(e))return"";t.callbackTimers.push(setTimeout((function(){return t.changeSlide({message:"index",index:e,currentSlide:t.state.currentSlide},n)}),0))})),S(w(t),"play",(function(){var e;if(t.props.rtl)e=t.state.currentSlide-t.props.slidesToScroll;else{if(!(0,s.canGoNext)(v(v({},t.props),t.state)))return!1;e=t.state.currentSlide+t.props.slidesToScroll}t.slideHandler(e)})),S(w(t),"autoPlay",(function(e){t.autoplayTimer&&clearInterval(t.autoplayTimer);var n=t.state.autoplaying;if("update"===e){if("hovered"===n||"focused"===n||"paused"===n)return}else if("leave"===e){if("paused"===n||"focused"===n)return}else if("blur"===e&&("paused"===n||"hovered"===n))return;t.autoplayTimer=setInterval(t.play,t.props.autoplaySpeed+50),t.setState({autoplaying:"playing"})})),S(w(t),"pause",(function(e){t.autoplayTimer&&(clearInterval(t.autoplayTimer),t.autoplayTimer=null);var n=t.state.autoplaying;"paused"===e?t.setState({autoplaying:"paused"}):"focused"===e?"hovered"!==n&&"playing"!==n||t.setState({autoplaying:"focused"}):"playing"===n&&t.setState({autoplaying:"hovered"})})),S(w(t),"onDotsOver",(function(){return t.props.autoplay&&t.pause("hovered")})),S(w(t),"onDotsLeave",(function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")})),S(w(t),"onTrackOver",(function(){return t.props.autoplay&&t.pause("hovered")})),S(w(t),"onTrackLeave",(function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")})),S(w(t),"onSlideFocus",(function(){return t.props.autoplay&&t.pause("focused")})),S(w(t),"onSlideBlur",(function(){return t.props.autoplay&&"focused"===t.state.autoplaying&&t.autoPlay("blur")})),S(w(t),"render",(function(){var e,n,i,a=(0,o.default)("slick-slider",t.props.className,{"slick-vertical":t.props.vertical,"slick-initialized":!0}),d=v(v({},t.props),t.state),h=(0,s.extractObject)(d,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),f=t.props.pauseOnHover;if(h=v(v({},h),{},{onMouseEnter:f?t.onTrackOver:null,onMouseLeave:f?t.onTrackLeave:null,onMouseOver:f?t.onTrackOver:null,focusOnSelect:t.props.focusOnSelect&&t.clickable?t.selectHandler:null}),!0===t.props.dots&&t.state.slideCount>=t.props.slidesToShow){var m=(0,s.extractObject)(d,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),g=t.props.pauseOnDotsHover;m=v(v({},m),{},{clickHandler:t.changeSlide,onMouseEnter:g?t.onDotsLeave:null,onMouseOver:g?t.onDotsOver:null,onMouseLeave:g?t.onDotsLeave:null}),e=r.default.createElement(c.Dots,m)}var b=(0,s.extractObject)(d,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);b.clickHandler=t.changeSlide,t.props.arrows&&(n=r.default.createElement(u.PrevArrow,b),i=r.default.createElement(u.NextArrow,b));var y=null;t.props.vertical&&(y={height:t.state.listHeight});var A=null;!1===t.props.vertical?!0===t.props.centerMode&&(A={padding:"0px "+t.props.centerPadding}):!0===t.props.centerMode&&(A={padding:t.props.centerPadding+" 0px"});var _=v(v({},y),A),w=t.props.touchMove,E={className:"slick-list",style:_,onClick:t.clickHandler,onMouseDown:w?t.swipeStart:null,onMouseMove:t.state.dragging&&w?t.swipeMove:null,onMouseUp:w?t.swipeEnd:null,onMouseLeave:t.state.dragging&&w?t.swipeEnd:null,onTouchStart:w?t.swipeStart:null,onTouchMove:t.state.dragging&&w?t.swipeMove:null,onTouchEnd:w?t.touchEnd:null,onTouchCancel:t.state.dragging&&w?t.swipeEnd:null,onKeyDown:t.props.accessibility?t.keyHandler:null},S={className:a,dir:"ltr",style:t.props.style};return t.props.unslick&&(E={className:"slick-list"},S={className:a}),r.default.createElement("div",S,t.props.unslick?"":n,r.default.createElement("div",p({ref:t.listRefHandler},E),r.default.createElement(l.Track,p({ref:t.trackRefHandler},h),t.props.children)),t.props.unslick?"":i,t.props.unslick?"":e)})),t.list=null,t.track=null,t.state=v(v({},i.default),{},{currentSlide:t.props.initialSlide,slideCount:r.default.Children.count(t.props.children)}),t.callbackTimers=[],t.clickable=!0,t.debouncedResize=null;var n=t.ssrInit();return t.state=v(v({},t.state),n),t}return t=_,(n=[{key:"didPropsChange",value:function(e){for(var t=!1,n=0,i=Object.keys(this.props);n<i.length;n++){var a=i[n];if(!e.hasOwnProperty(a)){t=!0;break}if("object"!==f(e[a])&&"function"!=typeof e[a]&&e[a]!==this.props[a]){t=!0;break}}return t||r.default.Children.count(this.props.children)!==r.default.Children.count(e.children)}}])&&b(t.prototype,n),h&&b(t,h),Object.defineProperty(t,"prototype",{writable:!1}),_}(r.default.Component);t.InnerSlider=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0};t.default=r},function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var i=s(n(0)),a=s(n(4)),o=n(316);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){var t,n,r,i,a;return r=(a=e.rtl?e.slideCount-1-e.index:e.index)<0||a>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),n=(a-e.currentSlide)%e.slideCount==0,a>e.currentSlide-i-1&&a<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=a&&a<e.currentSlide+e.slidesToShow,{"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":r,"slick-current":a===(e.targetSlide<0?e.targetSlide+e.slideCount:e.targetSlide>=e.slideCount?e.targetSlide-e.slideCount:e.targetSlide)}},A=function(e,t){return e.key||t},_=function(e){var t,n=[],r=[],s=[],l=i.default.Children.count(e.children),c=(0,o.lazyStartIndex)(e),u=(0,o.lazyEndIndex)(e);return i.default.Children.forEach(e.children,(function(d,h){var f,p={message:"children",index:h,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};f=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(h)>=0?d:i.default.createElement("div",null);var m=function(e){var t={};return void 0!==e.variableWidth&&!1!==e.variableWidth||(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=e.currentSlide===e.index?1:0,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t}(v(v({},e),{},{index:h})),g=f.props.className||"",b=y(v(v({},e),{},{index:h}));if(n.push(i.default.cloneElement(f,{key:"original"+A(f,h),"data-index":h,className:(0,a.default)(b,g),tabIndex:"-1","aria-hidden":!b["slick-active"],style:v(v({outline:"none"},f.props.style||{}),m),onClick:function(t){f.props&&f.props.onClick&&f.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(p)}})),e.infinite&&!1===e.fade){var _=l-h;_<=(0,o.getPreClones)(e)&&l!==e.slidesToShow&&((t=-_)>=c&&(f=d),b=y(v(v({},e),{},{index:t})),r.push(i.default.cloneElement(f,{key:"precloned"+A(f,t),"data-index":t,tabIndex:"-1",className:(0,a.default)(b,g),"aria-hidden":!b["slick-active"],style:v(v({},f.props.style||{}),m),onClick:function(t){f.props&&f.props.onClick&&f.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(p)}}))),l!==e.slidesToShow&&((t=l+h)<u&&(f=d),b=y(v(v({},e),{},{index:t})),s.push(i.default.cloneElement(f,{key:"postcloned"+A(f,t),"data-index":t,tabIndex:"-1",className:(0,a.default)(b,g),"aria-hidden":!b["slick-active"],style:v(v({},f.props.style||{}),m),onClick:function(t){f.props&&f.props.onClick&&f.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(p)}})))}})),e.rtl?r.concat(n,s).reverse():r.concat(n,s)},w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(o,e);var t,n,r,a=h(o);function o(){var e;c(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(p(e=a.call.apply(a,[this].concat(n))),"node",null),b(p(e),"handleRef",(function(t){e.node=t})),e}return t=o,(n=[{key:"render",value:function(){var e=_(this.props),t=this.props,n={onMouseEnter:t.onMouseEnter,onMouseOver:t.onMouseOver,onMouseLeave:t.onMouseLeave};return i.default.createElement("div",l({ref:this.handleRef,className:"slick-track",style:this.props.trackStyle},n),e)}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(i.default.PureComponent);t.Track=w},function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.Dots=void 0;var i=s(n(0)),a=s(n(4)),o=n(316);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(p,e);var t,n,r,s=f(p);function p(){return u(this,p),s.apply(this,arguments)}return t=p,(n=[{key:"clickHandler",value:function(e,t){t.preventDefault(),this.props.clickHandler(e)}},{key:"render",value:function(){for(var e,t=this.props,n=t.onMouseEnter,r=t.onMouseOver,s=t.onMouseLeave,u=t.infinite,d=t.slidesToScroll,h=t.slidesToShow,f=t.slideCount,p=t.currentSlide,m=(e={slideCount:f,slidesToScroll:d,slidesToShow:h,infinite:u}).infinite?Math.ceil(e.slideCount/e.slidesToScroll):Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,g={onMouseEnter:n,onMouseOver:r,onMouseLeave:s},v=[],b=0;b<m;b++){var y=(b+1)*d-1,A=u?y:(0,o.clamp)(y,0,f-1),_=A-(d-1),w=u?_:(0,o.clamp)(_,0,f-1),E=(0,a.default)({"slick-active":u?p>=w&&p<=A:p===w}),S={message:"dots",index:b,slidesToScroll:d,currentSlide:p},C=this.clickHandler.bind(this,S);v=v.concat(i.default.createElement("li",{key:b,className:E},i.default.cloneElement(this.props.customPaging(b),{onClick:C})))}return(i.default.cloneElement(this.props.appendDots(v),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:this.props.dotsClass},g)))}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(i.default.PureComponent);t.Dots=g},function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.PrevArrow=t.NextArrow=void 0;var i=s(n(0)),a=s(n(4)),o=n(316);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=function(e){m(n,e);var t=v(n);function n(){return h(this,n),t.apply(this,arguments)}return p(n,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var n={key:"0","data-role":"none",className:(0,a.default)(e),style:{display:"block"},onClick:t},r={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.prevArrow?i.default.cloneElement(this.props.prevArrow,u(u({},n),r)):i.default.createElement("button",l({key:"0",type:"button"},n)," ","Previous")}}]),n}(i.default.PureComponent);t.PrevArrow=A;var _=function(e){m(n,e);var t=v(n);function n(){return h(this,n),t.apply(this,arguments)}return p(n,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});(0,o.canGoNext)(this.props)||(e["slick-disabled"]=!0,t=null);var n={key:"1","data-role":"none",className:(0,a.default)(e),style:{display:"block"},onClick:t},r={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.nextArrow?i.default.cloneElement(this.props.nextArrow,u(u({},n),r)):i.default.createElement("button",l({key:"1",type:"button"},n)," ","Next")}}]),n}(i.default.PureComponent);t.NextArrow=_},function(e,t,n){"use strict";n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}())}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var o=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&l()}function s(){a(o)}function l(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;o.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},d=v(0,0,0,0);function h(e){return parseFloat(e)||0}function f(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return d;var r=u(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],a=e["padding-"+i];t[i]=h(a)}return t}(r),a=i.left+i.right,o=i.top+i.bottom,s=h(r.width),l=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==t&&(s-=f(r,"left","right")+a),Math.round(l+o)!==n&&(l-=f(r,"top","bottom")+o)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(s+a)-t,p=Math.round(l+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(p)&&(l-=p)}return v(i.left,i.top,s,l)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?m(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):p(e):d}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var b=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),y=function(e,t){var n,r,i,a,o,s,l,u=(r=(n=t).x,i=n.y,a=n.width,o=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:i,width:a,height:o,top:i,right:r+a,bottom:o+i,left:r}),l);c(this,{target:e,contentRect:u})},A=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new b(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new y(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),_="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new A(t,n,this);_.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=_.get(this))[e].apply(t,arguments)}}));var E=void 0!==i.ResizeObserver?i.ResizeObserver:w;t.default=E}.call(this,n(68))},function(e,t,n){var r=n(1646),i=function(e){var t="",n=Object.keys(e);return n.forEach((function(i,a){var o=e[i];(function(e){return/[height|width]$/.test(e)})(i=r(i))&&"number"==typeof o&&(o+="px"),t+=!0===o?i:!1===o?"not "+i:"("+i+": "+o+")",a<n.length-1&&(t+=" and ")})),t};e.exports=function(e){var t="";return"string"==typeof e?e:e instanceof Array?(e.forEach((function(n,r){t+=i(n),r<e.length-1&&(t+=", ")})),t):i(e)}},function(e,t){e.exports=function(e){return e.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()})).toLowerCase()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r};var a={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return i.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return i.default.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0};t.default=a},function(e,t,n){var r=n(1649);e.exports=new r},function(e,t,n){var r=n(1650),i=n(938),a=i.each,o=i.isFunction,s=i.isArray;function l(){if(!window.matchMedia)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!window.matchMedia("only all").matches}l.prototype={constructor:l,register:function(e,t,n){var i=this.queries,l=n&&this.browserIsIncapable;return i[e]||(i[e]=new r(e,l)),o(t)&&(t={match:t}),s(t)||(t=[t]),a(t,(function(t){o(t)&&(t={match:t}),i[e].addHandler(t)})),this},unregister:function(e,t){var n=this.queries[e];return n&&(t?n.removeHandler(t):(n.clear(),delete this.queries[e])),this}},e.exports=l},function(e,t,n){var r=n(1651),i=n(938).each;function a(e,t){this.query=e,this.isUnconditional=t,this.handlers=[],this.mql=window.matchMedia(e);var n=this;this.listener=function(e){n.mql=e.currentTarget||e,n.assess()},this.mql.addListener(this.listener)}a.prototype={constuctor:a,addHandler:function(e){var t=new r(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var t=this.handlers;i(t,(function(n,r){if(n.equals(e))return n.destroy(),!t.splice(r,1)}))},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){i(this.handlers,(function(e){e.destroy()})),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";i(this.handlers,(function(t){t[e]()}))}},e.exports=a},function(e,t){function n(e){this.options=e,!e.deferSetup&&this.setup()}n.prototype={constructor:n,setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},e.exports=n},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){var r=n(519).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(1659);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=(0,i.useState)(e.count),n=r(t,2),a=n[0],o=n[1],s=(0,i.useState)(e.size),l=r(s,2),c=l[0],u=l[1],d=(0,i.useState)(e.char),h=r(d,2),f=h[0],p=h[1],m=(0,i.useState)(e.color),g=r(m,2),v=g[0],b=g[1],y=(0,i.useState)(e.activeColor),A=r(y,2),_=A[0],w=A[1],E=(0,i.useState)(e.isHalf),S=r(E,2),C=S[0],T=S[1],k=(0,i.useState)(e.edit),x=r(k,2),O=x[0],I=x[1],M=(0,i.useState)(e.emptyIcon),P=r(M,2),D=P[0],N=P[1],L=(0,i.useState)(e.halfIcon),R=r(L,2),B=R[0],j=R[1],F=(0,i.useState)(e.filledIcon),U=r(F,2),H=U[0],z=U[1],V=(0,i.useState)(e.a11y),W=r(V,2),G=W[0],q=W[1];return[{count:a,size:c,char:f,color:v,activeColor:_,isHalf:C,edit:O,emptyIcon:D,halfIcon:B,filledIcon:H,a11y:G},function(e){o(e.count),u(e.size),p(e.char),b(e.color),w(e.activeColor),T(e.isHalf),I(e.edit),N(e.emptyIcon),j(e.halfIcon),z(e.filledIcon),q(e.a11y)}]};var i=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){var t=e.index,n=e.active,i=e.config,a=e.onMouseOver,l=e.onMouseLeave,c=e.onClick,u=e.halfStarHidden,d=e.halfStarAt,h=e.isUsingIcons,f=e.uniqueness,p=i.color,m=i.activeColor,g=i.size,v=i.char,b=i.isHalf,y=i.edit,A=i.halfIcon,_=i.emptyIcon,w=i.filledIcon,E="",S=!1;b&&!u&&d===t&&(E=h?"react-stars-half":"react-stars-"+f,S=!0);var C=r({},s,{color:n?m:p,cursor:y?"pointer":"default",fontSize:g+"px"});return o.default.createElement("span",{className:E,style:C,key:t,"data-index":t,"data-forhalf":w?t:v,onMouseOver:a,onMouseMove:a,onMouseLeave:l,onClick:c},h?n?w:!n&&S?A:_:v)};var i,a=n(0),o=(i=a)&&i.__esModule?i:{default:i};var s={position:"relative",overflow:"hidden",cursor:"pointer",display:"block",float:"left"}},function(e,t,n){!function(e,t){"use strict";function n(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,l,"next",e)}function l(e){n(o,i,a,s,l,"throw",e)}s(void 0)}))}}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var s={init:"init"},l=function(e){var t=e.value;return void 0===t?"":t},c=function(){return t.createElement(t.Fragment,null," ")},u={Cell:l,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){var n=t.style,r=t.className;return e=i({},e,{},a(t,["style","className"])),n&&(e.style=e.style?i({},e.style||{},{},n||{}):n),r&&(e.className=e.className?e.className+" "+r:r),""===e.className&&delete e.className,e}),{})}var h=function(e,t){return void 0===t&&(t={}),function(n){return void 0===n&&(n={}),[].concat(e,[n]).reduce((function(e,r){return function e(t,n,r){return"function"==typeof n?e({},n(t,r)):Array.isArray(n)?d.apply(void 0,[t].concat(n)):d(t,n)}(e,r,i({},t,{userProps:n}))}),{})}},f=function(e,t,n,r){return void 0===n&&(n={}),e.reduce((function(e,t){return t(e,n)}),t)},p=function(e,t,n){return void 0===n&&(n={}),e.forEach((function(e){e(t,n)}))};function m(e,t,n,r){e.findIndex((function(e){return e.pluginName===n})),t.forEach((function(t){e.findIndex((function(e){return e.pluginName===t}))}))}function g(e,t){return"function"==typeof e?e(t):e}function v(e){var n=t.useRef();return n.current=e,t.useCallback((function(){return n.current}),[])}var b="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function y(e,n){var r=t.useRef(!1);b((function(){r.current&&e(),r.current=!0}),n)}function A(e,t,n){return void 0===n&&(n={}),function(r,a){void 0===a&&(a={});var o="string"==typeof r?t[r]:r;if(void 0===o)throw console.info(t),new Error("Renderer Error ☝️");return _(o,i({},e,{column:t},n,{},a))}}function _(e,n){return function(e){return"function"==typeof e&&(t=Object.getPrototypeOf(e)).prototype&&t.prototype.isReactComponent;var t}(r=e)||"function"==typeof r||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(r)?t.createElement(e,n):e;var r}function w(e,t,n){return void 0===n&&(n=0),e.map((function(e){return S(e=i({},e,{parent:t,depth:n})),e.columns&&(e.columns=w(e.columns,e,n+1)),e}))}function E(e){return I(e,"columns")}function S(e){var t=e.id,n=e.accessor,r=e.Header;if("string"==typeof n){t=t||n;var i=n.split(".");n=function(e){return function(e,t,n){if(!t)return e;var r,i="function"==typeof t?t:JSON.stringify(t),a=k.get(i)||function(){var e=function(e){return function e(t,n){if(void 0===n&&(n=[]),Array.isArray(t))for(var r=0;r<t.length;r+=1)e(t[r],n);else n.push(t);return n}(e).map((function(e){return String(e).replace(".","_")})).join(".").replace(R,".").replace(B,"").split(".")}(t);return k.set(i,e),e}();try{r=a.reduce((function(e,t){return e[t]}),e)}catch(e){}return void 0!==r?r:void 0}(e,i)}}if(!t&&"string"==typeof r&&r&&(t=r),!t&&e.columns)throw console.error(e),new Error('A column ID (or unique "Header" value) is required!');if(!t)throw console.error(e),new Error("A column ID (or string accessor) is required!");return Object.assign(e,{id:t,accessor:n}),e}function C(e,t){if(!t)throw new Error;return Object.assign(e,i({Header:c,Footer:c},u,{},t,{},e)),Object.assign(e,{originalWidth:e.width}),e}function T(e,t,n){void 0===n&&(n=function(){return{}});for(var r=[],a=e,o=0,s=function(){return o++},l=function(){var e={headers:[]},o=[],l=a.some((function(e){return e.parent}));a.forEach((function(r){var a,c=[].concat(o).reverse()[0];l&&(a=r.parent?i({},r.parent,{originalId:r.parent.id,id:r.parent.id+"_"+s(),headers:[r]},n(r)):C(i({originalId:r.id+"_placeholder",id:r.id+"_placeholder_"+s(),placeholderOf:r,headers:[r]},n(r)),t),c&&c.originalId===a.originalId?c.headers.push(r):o.push(a)),e.headers.push(r)})),r.push(e),a=o};a.length;)l();return r.reverse()}var k=new Map;function x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r+=1)if(void 0!==t[r])return t[r]}function O(e){if("function"==typeof e)return e}function I(e,t){var n=[];return function e(r){r.forEach((function(r){r[t]?e(r[t]):n.push(r)}))}(e),n}function M(e,t){var n=t.manualExpandedKey,r=t.expanded,i=t.expandSubRows,a=void 0===i||i,o=[];return e.forEach((function(e){return function e(t,i){void 0===i&&(i=!0),t.isExpanded=t.original&&t.original[n]||r[t.id],t.canExpand=t.subRows&&!!t.subRows.length,i&&o.push(t),t.subRows&&t.subRows.length&&t.isExpanded&&t.subRows.forEach((function(t){return e(t,a)}))}(e)})),o}function P(e,t,n){return O(e)||t[e]||n[e]||n.text}function D(e,t,n){return e?e(t,n):void 0===t}function N(){throw new Error("React-Table: You have not called prepareRow(row) one or more rows you are attempting to render.")}var L=null,R=/\[/g,B=/\]/g,j=function(e){return i({role:"table"},e)},F=function(e){return i({role:"rowgroup"},e)},U=function(e,t){var n=t.column;return i({key:"header_"+n.id,colSpan:n.totalVisibleHeaderCount,role:"columnheader"},e)},H=function(e,t){var n=t.column;return i({key:"footer_"+n.id,colSpan:n.totalVisibleHeaderCount},e)},z=function(e,t){return i({key:"headerGroup_"+t.index,role:"row"},e)},V=function(e,t){return i({key:"footerGroup_"+t.index},e)},W=function(e,t){return i({key:"row_"+t.row.id,role:"row"},e)},G=function(e,t){var n=t.cell;return i({key:"cell_"+n.row.id+"_"+n.column.id,role:"cell"},e)};function q(){return{useOptions:[],stateReducers:[],useControlledState:[],columns:[],columnsDeps:[],allColumns:[],allColumnsDeps:[],accessValue:[],materializedColumns:[],materializedColumnsDeps:[],useInstanceAfterData:[],visibleColumns:[],visibleColumnsDeps:[],headerGroups:[],headerGroupsDeps:[],useInstanceBeforeDimensions:[],useInstance:[],prepareRow:[],getTableProps:[j],getTableBodyProps:[F],getHeaderGroupProps:[z],getFooterGroupProps:[V],getHeaderProps:[U],getFooterProps:[H],getRowProps:[W],getCellProps:[G],useFinalInstance:[]}}s.resetHiddenColumns="resetHiddenColumns",s.toggleHideColumn="toggleHideColumn",s.setHiddenColumns="setHiddenColumns",s.toggleHideAllColumns="toggleHideAllColumns";var Y=function(e){e.getToggleHiddenProps=[K],e.getToggleHideAllColumnsProps=[X],e.stateReducers.push(Q),e.useInstanceBeforeDimensions.push($),e.headerGroupsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.hiddenColumns])})),e.useInstance.push(J)};Y.pluginName="useColumnVisibility";var K=function(e,t){var n=t.column;return[e,{onChange:function(e){n.toggleHidden(!e.target.checked)},style:{cursor:"pointer"},checked:n.isVisible,title:"Toggle Column Visible"}]},X=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleHideAllColumns(!e.target.checked)},style:{cursor:"pointer"},checked:!n.allColumnsHidden&&!n.state.hiddenColumns.length,title:"Toggle All Columns Hidden",indeterminate:!n.allColumnsHidden&&n.state.hiddenColumns.length}]};function Q(e,t,n,r){if(t.type===s.init)return i({hiddenColumns:[]},e);if(t.type===s.resetHiddenColumns)return i({},e,{hiddenColumns:r.initialState.hiddenColumns||[]});if(t.type===s.toggleHideColumn){var a=(void 0!==t.value?t.value:!e.hiddenColumns.includes(t.columnId))?[].concat(e.hiddenColumns,[t.columnId]):e.hiddenColumns.filter((function(e){return e!==t.columnId}));return i({},e,{hiddenColumns:a})}return t.type===s.setHiddenColumns?i({},e,{hiddenColumns:g(t.value,e.hiddenColumns)}):t.type===s.toggleHideAllColumns?i({},e,{hiddenColumns:(void 0!==t.value?t.value:!e.hiddenColumns.length)?r.allColumns.map((function(e){return e.id})):[]}):void 0}function $(e){var n=e.headers,r=e.state.hiddenColumns;t.useRef(!1).current;var i=0;n.forEach((function(e){return i+=function e(t,n){t.isVisible=n&&!r.includes(t.id);var i=0;return t.headers&&t.headers.length?t.headers.forEach((function(n){return i+=e(n,t.isVisible)})):i=t.isVisible?1:0,t.totalVisibleHeaderCount=i,i}(e,!0)}))}function J(e){var n=e.columns,r=e.flatHeaders,i=e.dispatch,a=e.allColumns,o=e.getHooks,l=e.state.hiddenColumns,c=e.autoResetHiddenColumns,u=void 0===c||c,d=v(e),f=a.length===l.length,p=t.useCallback((function(e,t){return i({type:s.toggleHideColumn,columnId:e,value:t})}),[i]),m=t.useCallback((function(e){return i({type:s.setHiddenColumns,value:e})}),[i]),g=t.useCallback((function(e){return i({type:s.toggleHideAllColumns,value:e})}),[i]),b=h(o().getToggleHideAllColumnsProps,{instance:d()});r.forEach((function(e){e.toggleHidden=function(t){i({type:s.toggleHideColumn,columnId:e.id,value:t})},e.getToggleHiddenProps=h(o().getToggleHiddenProps,{instance:d(),column:e})}));var A=v(u);y((function(){A()&&i({type:s.resetHiddenColumns})}),[i,n]),Object.assign(e,{allColumnsHidden:f,toggleHideColumn:p,setHiddenColumns:m,toggleHideAllColumns:g,getToggleHideAllColumnsProps:b})}var Z={},ee={},te=function(e,t,n){return e},ne=function(e,t){return e.subRows||[]},re=function(e,t,n){return""+(n?[n.id,t].join("."):t)},ie=function(e){return e};function ae(e){var t=e.initialState,n=void 0===t?Z:t,r=e.defaultColumn,o=void 0===r?ee:r,s=e.getSubRows,l=void 0===s?ne:s,c=e.getRowId,u=void 0===c?re:c,d=e.stateReducer,h=void 0===d?te:d,f=e.useControlledState,p=void 0===f?ie:f;return i({},a(e,["initialState","defaultColumn","getSubRows","getRowId","stateReducer","useControlledState"]),{initialState:n,defaultColumn:o,getSubRows:l,getRowId:u,stateReducer:h,useControlledState:p})}function oe(e,t){void 0===t&&(t=0);var n=0,r=0,i=0,a=0;return e.forEach((function(e){var o=e.headers;if(e.totalLeft=t,o&&o.length){var s=oe(o,t),l=s[0],c=s[1],u=s[2],d=s[3];e.totalMinWidth=l,e.totalWidth=c,e.totalMaxWidth=u,e.totalFlexWidth=d}else e.totalMinWidth=e.minWidth,e.totalWidth=Math.min(Math.max(e.minWidth,e.width),e.maxWidth),e.totalMaxWidth=e.maxWidth,e.totalFlexWidth=e.canResize?e.totalWidth:0;e.isVisible&&(t+=e.totalWidth,n+=e.totalMinWidth,r+=e.totalWidth,i+=e.totalMaxWidth,a+=e.totalFlexWidth)})),[n,r,i,a]}function se(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,a=e.column,o=e.getRowId,s=e.getSubRows,l=e.accessValueHooks,c=e.getInstance;t.forEach((function(e,u){return function e(n,u,d,h,p){void 0===d&&(d=0);var m=n,g=o(n,u,h),v=i[g];if(v)v.subRows&&v.originalSubRows.forEach((function(t,n){return e(t,n,d+1,v)}));else if((v={id:g,original:m,index:u,depth:d,cells:[{}]}).cells.map=N,v.cells.filter=N,v.cells.forEach=N,v.cells[0].getCellProps=N,v.values={},p.push(v),r.push(v),i[g]=v,v.originalSubRows=s(n,u),v.originalSubRows){var b=[];v.originalSubRows.forEach((function(t,n){return e(t,n,d+1,v,b)})),v.subRows=b}a.accessor&&(v.values[a.id]=a.accessor(n,u,v,p,t)),v.values[a.id]=f(l,v.values[a.id],{row:v,column:a,instance:c()})}(e,u,0,void 0,n)}))}s.resetExpanded="resetExpanded",s.toggleRowExpanded="toggleRowExpanded",s.toggleAllRowsExpanded="toggleAllRowsExpanded";var le=function(e){e.getToggleAllRowsExpandedProps=[ce],e.getToggleRowExpandedProps=[ue],e.stateReducers.push(de),e.useInstance.push(he),e.prepareRow.push(fe)};le.pluginName="useExpanded";var ce=function(e,t){var n=t.instance;return[e,{onClick:function(e){n.toggleAllRowsExpanded()},style:{cursor:"pointer"},title:"Toggle All Rows Expanded"}]},ue=function(e,t){var n=t.row;return[e,{onClick:function(){n.toggleRowExpanded()},style:{cursor:"pointer"},title:"Toggle Row Expanded"}]};function de(e,t,n,r){if(t.type===s.init)return i({expanded:{}},e);if(t.type===s.resetExpanded)return i({},e,{expanded:r.initialState.expanded||{}});if(t.type===s.toggleAllRowsExpanded){var l=t.value,c=r.rowsById,u=Object.keys(c).length===Object.keys(e.expanded).length;if(void 0!==l?l:!u){var d={};return Object.keys(c).forEach((function(e){d[e]=!0})),i({},e,{expanded:d})}return i({},e,{expanded:{}})}if(t.type===s.toggleRowExpanded){var h,f=t.id,p=t.value,m=e.expanded[f],g=void 0!==p?p:!m;if(!m&&g)return i({},e,{expanded:i({},e.expanded,(h={},h[f]=!0,h))});if(m&&!g){var v=e.expanded;return v[f],i({},e,{expanded:a(v,[f].map(o))})}return e}}function he(e){var n=e.data,r=e.rows,i=e.rowsById,a=e.manualExpandedKey,o=void 0===a?"expanded":a,l=e.paginateExpandedRows,c=void 0===l||l,u=e.expandSubRows,d=void 0===u||u,f=e.autoResetExpanded,p=void 0===f||f,g=e.getHooks,b=e.plugins,A=e.state.expanded,_=e.dispatch;m(b,["useSortBy","useGroupBy","usePivotColumns","useGlobalFilter"],"useExpanded");var w=v(p),E=Boolean(Object.keys(i).length&&Object.keys(A).length);E&&Object.keys(i).some((function(e){return!A[e]}))&&(E=!1),y((function(){w()&&_({type:s.resetExpanded})}),[_,n]);var S=t.useCallback((function(e,t){_({type:s.toggleRowExpanded,id:e,value:t})}),[_]),C=t.useCallback((function(e){return _({type:s.toggleAllRowsExpanded,value:e})}),[_]),T=t.useMemo((function(){return c?M(r,{manualExpandedKey:o,expanded:A,expandSubRows:d}):r}),[c,r,o,A,d]),k=t.useMemo((function(){return function(e){var t=0;return Object.keys(e).forEach((function(e){var n=e.split(".");t=Math.max(t,n.length)})),t}(A)}),[A]),x=v(e),O=h(g().getToggleAllRowsExpandedProps,{instance:x()});Object.assign(e,{preExpandedRows:r,expandedRows:T,rows:T,expandedDepth:k,isAllRowsExpanded:E,toggleRowExpanded:S,toggleAllRowsExpanded:C,getToggleAllRowsExpandedProps:O})}function fe(e,t){var n=t.instance.getHooks,r=t.instance;e.toggleRowExpanded=function(t){return r.toggleRowExpanded(e.id,t)},e.getToggleRowExpandedProps=h(n().getToggleRowExpandedProps,{instance:r,row:e})}var pe=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return String(r).toLowerCase().includes(String(n).toLowerCase())}))}))};pe.autoRemove=function(e){return!e};var me=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return void 0===r||String(r).toLowerCase()===String(n).toLowerCase()}))}))};me.autoRemove=function(e){return!e};var ge=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return void 0===r||String(r)===String(n)}))}))};ge.autoRemove=function(e){return!e};var ve=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t].includes(n)}))}))};ve.autoRemove=function(e){return!e||!e.length};var be=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return r&&r.length&&n.every((function(e){return r.includes(e)}))}))}))};be.autoRemove=function(e){return!e||!e.length};var ye=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return r&&r.length&&n.some((function(e){return r.includes(e)}))}))}))};ye.autoRemove=function(e){return!e||!e.length};var Ae=function(e,t,n){return e.filter((function(e){return t.some((function(t){var r=e.values[t];return n.includes(r)}))}))};Ae.autoRemove=function(e){return!e||!e.length};var _e=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t]===n}))}))};_e.autoRemove=function(e){return void 0===e};var we=function(e,t,n){return e.filter((function(e){return t.some((function(t){return e.values[t]==n}))}))};we.autoRemove=function(e){return null==e};var Ee=function(e,t,n){var r=n||[],i=r[0],a=r[1];if((i="number"==typeof i?i:-1/0)>(a="number"==typeof a?a:1/0)){var o=i;i=a,a=o}return e.filter((function(e){return t.some((function(t){var n=e.values[t];return n>=i&&n<=a}))}))};Ee.autoRemove=function(e){return!e||"number"!=typeof e[0]&&"number"!=typeof e[1]};var Se=Object.freeze({__proto__:null,text:pe,exactText:me,exactTextCase:ge,includes:ve,includesAll:be,includesSome:ye,includesValue:Ae,exact:_e,equals:we,between:Ee});s.resetFilters="resetFilters",s.setFilter="setFilter",s.setAllFilters="setAllFilters";var Ce=function(e){e.stateReducers.push(Te),e.useInstance.push(ke)};function Te(e,t,n,r){if(t.type===s.init)return i({filters:[]},e);if(t.type===s.resetFilters)return i({},e,{filters:r.initialState.filters||[]});if(t.type===s.setFilter){var a=t.columnId,o=t.filterValue,l=r.allColumns,c=r.filterTypes,u=l.find((function(e){return e.id===a}));if(!u)throw new Error("React-Table: Could not find a column with id: "+a);var d=P(u.filter,c||{},Se),h=e.filters.find((function(e){return e.id===a})),f=g(o,h&&h.value);return D(d.autoRemove,f,u)?i({},e,{filters:e.filters.filter((function(e){return e.id!==a}))}):i({},e,h?{filters:e.filters.map((function(e){return e.id===a?{id:a,value:f}:e}))}:{filters:[].concat(e.filters,[{id:a,value:f}])})}if(t.type===s.setAllFilters){var p=t.filters,m=r.allColumns,v=r.filterTypes;return i({},e,{filters:g(p,e.filters).filter((function(e){var t=m.find((function(t){return t.id===e.id}));return!D(P(t.filter,v||{},Se).autoRemove,e.value,t)}))})}}function ke(e){var n=e.data,r=e.rows,i=e.flatRows,a=e.rowsById,o=e.allColumns,l=e.filterTypes,c=e.manualFilters,u=e.defaultCanFilter,d=void 0!==u&&u,h=e.disableFilters,f=e.state.filters,p=e.dispatch,m=e.autoResetFilters,g=void 0===m||m,b=t.useCallback((function(e,t){p({type:s.setFilter,columnId:e,filterValue:t})}),[p]),A=t.useCallback((function(e){p({type:s.setAllFilters,filters:e})}),[p]);o.forEach((function(e){var t=e.id,n=e.accessor,r=e.defaultCanFilter,i=e.disableFilters;e.canFilter=n?x(!0!==i&&void 0,!0!==h&&void 0,!0):x(r,d,!1),e.setFilter=function(t){return b(e.id,t)};var a=f.find((function(e){return e.id===t}));e.filterValue=a&&a.value}));var _=t.useMemo((function(){if(c||!f.length)return[r,i,a];var e=[],t={};return[function n(r,i){void 0===i&&(i=0);var a=r;return(a=f.reduce((function(e,t){var n=t.id,r=t.value,a=o.find((function(e){return e.id===n}));if(!a)return e;0===i&&(a.preFilteredRows=e);var s=P(a.filter,l||{},Se);return s?(a.filteredRows=s(e,[n],r),a.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+a.id+"."),e)}),r)).forEach((function(r){e.push(r),t[r.id]=r,r.subRows&&(r.subRows=r.subRows&&r.subRows.length>0?n(r.subRows,i+1):r.subRows)})),a}(r),e,t]}),[c,f,r,i,a,o,l]),w=_[0],E=_[1],S=_[2];t.useMemo((function(){o.filter((function(e){return!f.find((function(t){return t.id===e.id}))})).forEach((function(e){e.preFilteredRows=w,e.filteredRows=w}))}),[w,f,o]);var C=v(g);y((function(){C()&&p({type:s.resetFilters})}),[p,c?null:n]),Object.assign(e,{preFilteredRows:r,preFilteredFlatRows:i,preFilteredRowsById:a,filteredRows:w,filteredFlatRows:E,filteredRowsById:S,rows:w,flatRows:E,rowsById:S,setFilter:b,setAllFilters:A})}Ce.pluginName="useFilters",s.resetGlobalFilter="resetGlobalFilter",s.setGlobalFilter="setGlobalFilter";var xe=function(e){e.stateReducers.push(Oe),e.useInstance.push(Ie)};function Oe(e,t,n,r){if(t.type===s.resetGlobalFilter)return i({},e,{globalFilter:r.initialState.globalFilter||void 0});if(t.type===s.setGlobalFilter){var o=t.filterValue,l=r.userFilterTypes,c=P(r.globalFilter,l||{},Se),u=g(o,e.globalFilter);return D(c.autoRemove,u)?(e.globalFilter,a(e,["globalFilter"])):i({},e,{globalFilter:u})}}function Ie(e){var n=e.data,r=e.rows,i=e.flatRows,a=e.rowsById,o=e.allColumns,l=e.filterTypes,c=e.globalFilter,u=e.manualGlobalFilter,d=e.state.globalFilter,h=e.dispatch,f=e.autoResetGlobalFilter,p=void 0===f||f,m=e.disableGlobalFilter,g=t.useCallback((function(e){h({type:s.setGlobalFilter,filterValue:e})}),[h]),b=t.useMemo((function(){if(u||void 0===d)return[r,i,a];var e=[],t={},n=P(c,l||{},Se);if(!n)return console.warn("Could not find a valid 'globalFilter' option."),r;o.forEach((function(e){var t=e.disableGlobalFilter;e.canFilter=x(!0!==t&&void 0,!0!==m&&void 0,!0)}));var s=o.filter((function(e){return!0===e.canFilter}));return[function r(i){return(i=n(i,s.map((function(e){return e.id})),d)).forEach((function(n){e.push(n),t[n.id]=n,n.subRows=n.subRows&&n.subRows.length?r(n.subRows):n.subRows})),i}(r),e,t]}),[u,d,c,l,o,r,i,a,m]),A=b[0],_=b[1],w=b[2],E=v(p);y((function(){E()&&h({type:s.resetGlobalFilter})}),[h,u?null:n]),Object.assign(e,{preGlobalFilteredRows:r,preGlobalFilteredFlatRows:i,preGlobalFilteredRowsById:a,globalFilteredRows:A,globalFilteredFlatRows:_,globalFilteredRowsById:w,rows:A,flatRows:_,rowsById:w,setGlobalFilter:g,disableGlobalFilter:m})}function Me(e,t){return t.reduce((function(e,t){return e+("number"==typeof t?t:0)}),0)}xe.pluginName="useGlobalFilter";var Pe=Object.freeze({__proto__:null,sum:Me,min:function(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e))})),t},max:function(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.max(t,e))})),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e),n=Math.max(n,e))})),t+".."+n},average:function(e){return Me(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort((function(e,t){return e-t}));return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),De=[],Ne={};s.resetGroupBy="resetGroupBy",s.setGroupBy="setGroupBy",s.toggleGroupBy="toggleGroupBy";var Le=function(e){e.getGroupByToggleProps=[Re],e.stateReducers.push(Be),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.groupBy])})),e.visibleColumns.push(je),e.useInstance.push(Ue),e.prepareRow.push(He)};Le.pluginName="useGroupBy";var Re=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(e){e.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function Be(e,t,n,r){if(t.type===s.init)return i({groupBy:[]},e);if(t.type===s.resetGroupBy)return i({},e,{groupBy:r.initialState.groupBy||[]});if(t.type===s.setGroupBy)return i({},e,{groupBy:t.value});if(t.type===s.toggleGroupBy){var a=t.columnId,o=t.value,l=void 0!==o?o:!e.groupBy.includes(a);return i({},e,l?{groupBy:[].concat(e.groupBy,[a])}:{groupBy:e.groupBy.filter((function(e){return e!==a}))})}}function je(e,t){var n=t.instance.state.groupBy,r=n.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean),i=e.filter((function(e){return!n.includes(e.id)}));return(e=[].concat(r,i)).forEach((function(e){e.isGrouped=n.includes(e.id),e.groupedIndex=n.indexOf(e.id)})),e}var Fe={};function Ue(e){var n=e.data,r=e.rows,a=e.flatRows,o=e.rowsById,l=e.allColumns,c=e.flatHeaders,u=e.groupByFn,d=void 0===u?ze:u,f=e.manualGroupBy,p=e.aggregations,g=void 0===p?Fe:p,b=e.plugins,A=e.state.groupBy,_=e.dispatch,w=e.autoResetGroupBy,E=void 0===w||w,S=e.disableGroupBy,C=e.defaultCanGroupBy,T=e.getHooks;m(b,["useColumnOrder","useFilters"],"useGroupBy");var k=v(e);l.forEach((function(t){var n=t.accessor,r=t.defaultGroupBy,i=t.disableGroupBy;t.canGroupBy=n?x(t.canGroupBy,!0!==i&&void 0,!0!==S&&void 0,!0):x(t.canGroupBy,r,C,!1),t.canGroupBy&&(t.toggleGroupBy=function(){return e.toggleGroupBy(t.id)}),t.Aggregated=t.Aggregated||t.Cell}));var O=t.useCallback((function(e,t){_({type:s.toggleGroupBy,columnId:e,value:t})}),[_]),M=t.useCallback((function(e){_({type:s.setGroupBy,value:e})}),[_]);c.forEach((function(e){e.getGroupByToggleProps=h(T().getGroupByToggleProps,{instance:k(),header:e})}));var P=t.useMemo((function(){if(f||!A.length)return[r,a,o,De,Ne,a,o];var e=A.filter((function(e){return l.find((function(t){return t.id===e}))})),t=[],n={},s=[],c={},u=[],h={},p=function r(a,o,f){if(void 0===o&&(o=0),o===e.length)return a.map((function(e){return i({},e,{depth:o})}));var p=e[o],m=d(a,p);return Object.entries(m).map((function(i,a){var d=i[0],m=i[1],v=p+":"+d,b=r(m,o+1,v=f?f+">"+v:v),y=o?I(m,"leafRows"):m,A=function(t,n,r){var i={};return l.forEach((function(a){if(e.includes(a.id))i[a.id]=n[0]?n[0].values[a.id]:null;else{var o="function"==typeof a.aggregate?a.aggregate:g[a.aggregate]||Pe[a.aggregate];if(o){var s=n.map((function(e){return e.values[a.id]})),l=t.map((function(e){var t=e.values[a.id];if(!r&&a.aggregateValue){var n="function"==typeof a.aggregateValue?a.aggregateValue:g[a.aggregateValue]||Pe[a.aggregateValue];if(!n)throw console.info({column:a}),new Error("React Table: Invalid column.aggregateValue option for column listed above");t=n(t,e,a)}return t}));i[a.id]=o(l,s)}else{if(a.aggregate)throw console.info({column:a}),new Error("React Table: Invalid column.aggregate option for column listed above");i[a.id]=null}}})),i}(y,m,o),_={id:v,isGrouped:!0,groupByID:p,groupByVal:d,values:A,subRows:b,leafRows:y,depth:o,index:a};return b.forEach((function(e){t.push(e),n[e.id]=e,e.isGrouped?(s.push(e),c[e.id]=e):(u.push(e),h[e.id]=e)})),_}))}(r);return p.forEach((function(e){t.push(e),n[e.id]=e,e.isGrouped?(s.push(e),c[e.id]=e):(u.push(e),h[e.id]=e)})),[p,t,n,s,c,u,h]}),[f,A,r,a,o,l,g,d]),D=P[0],N=P[1],L=P[2],R=P[3],B=P[4],j=P[5],F=P[6],U=v(E);y((function(){U()&&_({type:s.resetGroupBy})}),[_,f?null:n]),Object.assign(e,{preGroupedRows:r,preGroupedFlatRow:a,preGroupedRowsById:o,groupedRows:D,groupedFlatRows:N,groupedRowsById:L,onlyGroupedFlatRows:R,onlyGroupedRowsById:B,nonGroupedFlatRows:j,nonGroupedRowsById:F,rows:D,flatRows:N,rowsById:L,toggleGroupBy:O,setGroupBy:M})}function He(e){e.allCells.forEach((function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&(null==(n=e.subRows)?void 0:n.length)}))}function ze(e,t){return e.reduce((function(e,n,r){var i=""+n.values[t];return e[i]=Array.isArray(e[i])?e[i]:[],e[i].push(n),e}),{})}var Ve=/([0-9]+)/gm;function We(e,t){return e===t?0:e>t?1:-1}function Ge(e,t,n){return[e.values[n],t.values[n]]}function qe(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}var Ye=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=Ge(e,t,n),i=r[0],a=r[1];for(i=qe(i),a=qe(a),i=i.split(Ve).filter(Boolean),a=a.split(Ve).filter(Boolean);i.length&&a.length;){var o=i.shift(),s=a.shift(),l=parseInt(o,10),c=parseInt(s,10),u=[l,c].sort();if(isNaN(u[0])){if(o>s)return 1;if(s>o)return-1}else{if(isNaN(u[1]))return isNaN(l)?-1:1;if(l>c)return 1;if(c>l)return-1}}return i.length-a.length},datetime:function(e,t,n){var r=Ge(e,t,n),i=r[0],a=r[1];return We(i=i.getTime(),a=a.getTime())},basic:function(e,t,n){var r=Ge(e,t,n);return We(r[0],r[1])},string:function(e,t,n){var r=Ge(e,t,n),i=r[0],a=r[1];for(i=i.split("").filter(Boolean),a=a.split("").filter(Boolean);i.length&&a.length;){var o=i.shift(),s=a.shift(),l=o.toLowerCase(),c=s.toLowerCase();if(l>c)return 1;if(c>l)return-1;if(o>s)return 1;if(s>o)return-1}return i.length-a.length},number:function(e,t,n){var r=Ge(e,t,n),i=r[0],a=r[1],o=/[^0-9.]/gi;return We(i=Number(String(i).replace(o,"")),a=Number(String(a).replace(o,"")))}});s.resetSortBy="resetSortBy",s.setSortBy="setSortBy",s.toggleSortBy="toggleSortBy",s.clearSortBy="clearSortBy",u.sortType="alphanumeric",u.sortDescFirst=!1;var Ke=function(e){e.getSortByToggleProps=[Xe],e.stateReducers.push(Qe),e.useInstance.push($e)};Ke.pluginName="useSortBy";var Xe=function(e,t){var n=t.instance,r=t.column,i=n.isMultiSortEvent,a=void 0===i?function(e){return e.shiftKey}:i;return[e,{onClick:r.canSort?function(e){e.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&a(e))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function Qe(e,t,n,r){if(t.type===s.init)return i({sortBy:[]},e);if(t.type===s.resetSortBy)return i({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===s.clearSortBy)return i({},e,{sortBy:e.sortBy.filter((function(e){return e.id!==t.columnId}))});if(t.type===s.setSortBy)return i({},e,{sortBy:t.sortBy});if(t.type===s.toggleSortBy){var a,o=t.columnId,l=t.desc,c=t.multi,u=r.allColumns,d=r.disableMultiSort,h=r.disableSortRemove,f=r.disableMultiRemove,p=r.maxMultiSortColCount,m=void 0===p?Number.MAX_SAFE_INTEGER:p,g=e.sortBy,v=u.find((function(e){return e.id===o})).sortDescFirst,b=g.find((function(e){return e.id===o})),y=g.findIndex((function(e){return e.id===o})),A=null!=l,_=[];return"toggle"!=(a=!d&&c?b?"toggle":"add":y!==g.length-1||1!==g.length?"replace":b?"toggle":"replace")||h||A||c&&f||!(b&&b.desc&&!v||!b.desc&&v)||(a="remove"),"replace"===a?_=[{id:o,desc:A?l:v}]:"add"===a?(_=[].concat(g,[{id:o,desc:A?l:v}])).splice(0,_.length-m):"toggle"===a?_=g.map((function(e){return e.id===o?i({},e,{desc:A?l:!b.desc}):e})):"remove"===a&&(_=g.filter((function(e){return e.id!==o}))),i({},e,{sortBy:_})}}function $e(e){var n=e.data,r=e.rows,i=e.flatRows,a=e.allColumns,o=e.orderByFn,l=void 0===o?Je:o,c=e.sortTypes,u=e.manualSortBy,d=e.defaultCanSort,f=e.disableSortBy,p=e.flatHeaders,g=e.state.sortBy,b=e.dispatch,A=e.plugins,_=e.getHooks,w=e.autoResetSortBy,E=void 0===w||w;m(A,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var S=t.useCallback((function(e){b({type:s.setSortBy,sortBy:e})}),[b]),C=t.useCallback((function(e,t,n){b({type:s.toggleSortBy,columnId:e,desc:t,multi:n})}),[b]),T=v(e);p.forEach((function(e){var t=e.accessor,n=e.canSort,r=e.disableSortBy,i=e.id,a=t?x(!0!==r&&void 0,!0!==f&&void 0,!0):x(d,n,!1);e.canSort=a,e.canSort&&(e.toggleSortBy=function(t,n){return C(e.id,t,n)},e.clearSortBy=function(){b({type:s.clearSortBy,columnId:e.id})}),e.getSortByToggleProps=h(_().getSortByToggleProps,{instance:T(),column:e});var o=g.find((function(e){return e.id===i}));e.isSorted=!!o,e.sortedIndex=g.findIndex((function(e){return e.id===i})),e.isSortedDesc=e.isSorted?o.desc:void 0}));var k=t.useMemo((function(){if(u||!g.length)return[r,i];var e=[],t=g.filter((function(e){return a.find((function(t){return t.id===e.id}))}));return[function n(r){var i=l(r,t.map((function(e){var t=a.find((function(t){return t.id===e.id}));if(!t)throw new Error("React-Table: Could not find a column with id: "+e.id+" while sorting");var n=t.sortType,r=O(n)||(c||{})[n]||Ye[n];if(!r)throw new Error("React-Table: Could not find a valid sortType of '"+n+"' for column '"+e.id+"'.");return function(t,n){return r(t,n,e.id,e.desc)}})),t.map((function(e){var t=a.find((function(t){return t.id===e.id}));return t&&t.sortInverted?e.desc:!e.desc})));return i.forEach((function(t){e.push(t),t.subRows&&0!==t.subRows.length&&(t.subRows=n(t.subRows))})),i}(r),e]}),[u,g,r,i,a,l,c]),I=k[0],M=k[1],P=v(E);y((function(){P()&&b({type:s.resetSortBy})}),[u?null:n]),Object.assign(e,{preSortedRows:r,preSortedFlatRows:i,sortedRows:I,sortedFlatRows:M,rows:I,flatRows:M,setSortBy:S,toggleSortBy:C})}function Je(e,t,n){return[].concat(e).sort((function(e,r){for(var i=0;i<t.length;i+=1){var a=t[i],o=!1===n[i]||"desc"===n[i],s=a(e,r);if(0!==s)return o?-s:s}return n[0]?e.index-r.index:r.index-e.index}))}s.resetPage="resetPage",s.gotoPage="gotoPage",s.setPageSize="setPageSize";var Ze=function(e){e.stateReducers.push(et),e.useInstance.push(tt)};function et(e,t,n,r){if(t.type===s.init)return i({pageSize:10,pageIndex:0},e);if(t.type===s.resetPage)return i({},e,{pageIndex:r.initialState.pageIndex||0});if(t.type===s.gotoPage){var a=r.pageCount,o=r.page,l=g(t.pageIndex,e.pageIndex),c=!1;return l>e.pageIndex?c=-1===a?o.length>=e.pageSize:l<a:l<e.pageIndex&&(c=l>-1),c?i({},e,{pageIndex:l}):e}if(t.type===s.setPageSize){var u=t.pageSize,d=e.pageSize*e.pageIndex;return i({},e,{pageIndex:Math.floor(d/u),pageSize:u})}}function tt(e){var n=e.rows,r=e.autoResetPage,i=void 0===r||r,a=e.manualExpandedKey,o=void 0===a?"expanded":a,l=e.plugins,c=e.pageCount,u=e.paginateExpandedRows,d=void 0===u||u,h=e.expandSubRows,f=void 0===h||h,p=e.state,g=p.pageSize,b=p.pageIndex,A=p.expanded,_=p.globalFilter,w=p.filters,E=p.groupBy,S=p.sortBy,C=e.dispatch,T=e.data,k=e.manualPagination;m(l,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var x=v(i);y((function(){x()&&C({type:s.resetPage})}),[C,k?null:T,_,w,E,S]);var O=k?c:Math.ceil(n.length/g),I=t.useMemo((function(){return O>0?[].concat(new Array(O)).fill(null).map((function(e,t){return t})):[]}),[O]),P=t.useMemo((function(){var e;if(k)e=n;else{var t=g*b,r=t+g;e=n.slice(t,r)}return d?e:M(e,{manualExpandedKey:o,expanded:A,expandSubRows:f})}),[f,A,o,k,b,g,d,n]),D=b>0,N=-1===O?P.length>=g:b<O-1,L=t.useCallback((function(e){C({type:s.gotoPage,pageIndex:e})}),[C]),R=t.useCallback((function(){return L((function(e){return e-1}))}),[L]),B=t.useCallback((function(){return L((function(e){return e+1}))}),[L]),j=t.useCallback((function(e){C({type:s.setPageSize,pageSize:e})}),[C]);Object.assign(e,{pageOptions:I,pageCount:O,page:P,canPreviousPage:D,canNextPage:N,gotoPage:L,previousPage:R,nextPage:B,setPageSize:j})}Ze.pluginName="usePagination",s.resetPivot="resetPivot",s.togglePivot="togglePivot";var nt=function(e){e.getPivotToggleProps=[it],e.stateReducers.push(at),e.useInstanceAfterData.push(ot),e.allColumns.push(st),e.accessValue.push(lt),e.materializedColumns.push(ct),e.materializedColumnsDeps.push(ut),e.visibleColumns.push(dt),e.visibleColumnsDeps.push(ht),e.useInstance.push(ft),e.prepareRow.push(pt)};nt.pluginName="usePivotColumns";var rt=[],it=function(e,t){var n=t.header;return[e,{onClick:n.canPivot?function(e){e.persist(),n.togglePivot()}:void 0,style:{cursor:n.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function at(e,t,n,r){if(t.type===s.init)return i({pivotColumns:rt},e);if(t.type===s.resetPivot)return i({},e,{pivotColumns:r.initialState.pivotColumns||rt});if(t.type===s.togglePivot){var a=t.columnId,o=t.value,l=void 0!==o?o:!e.pivotColumns.includes(a);return i({},e,l?{pivotColumns:[].concat(e.pivotColumns,[a])}:{pivotColumns:e.pivotColumns.filter((function(e){return e!==a}))})}}function ot(e){e.allColumns.forEach((function(t){t.isPivotSource=e.state.pivotColumns.includes(t.id)}))}function st(e,t){var n=t.instance;return e.forEach((function(e){e.isPivotSource=n.state.pivotColumns.includes(e.id),e.uniqueValues=new Set})),e}function lt(e,t){var n=t.column;return n.uniqueValues&&void 0!==e&&n.uniqueValues.add(e),e}function ct(e,t){var n=t.instance,r=n.allColumns,a=n.state;if(!a.pivotColumns.length||!a.groupBy||!a.groupBy.length)return e;var o=a.pivotColumns.map((function(e){return r.find((function(t){return t.id===e}))})).filter(Boolean),s=r.filter((function(e){return!e.isPivotSource&&!a.groupBy.includes(e.id)&&!a.pivotColumns.includes(e.id)})),l=E(function e(t,n,r){void 0===t&&(t=0),void 0===r&&(r=[]);var a=o[t];return a?Array.from(a.uniqueValues).sort().map((function(o){var s=i({},a,{Header:a.PivotHeader||"string"==typeof a.header?a.Header+": "+o:o,isPivotGroup:!0,parent:n,depth:t,id:n?n.id+"."+a.id+"."+o:a.id+"."+o,pivotValue:o});return s.columns=e(t+1,s,[].concat(r,[function(e){return e.values[a.id]===o}])),s})):s.map((function(e){return i({},e,{canPivot:!1,isPivoted:!0,parent:n,depth:t,id:""+(n?n.id+"."+e.id:e.id),accessor:function(t,n,i){if(r.every((function(e){return e(i)})))return i.values[e.id]}})}))}());return[].concat(e,l)}function ut(e,t){var n=t.instance.state,r=n.pivotColumns,i=n.groupBy;return[].concat(e,[r,i])}function dt(e,t){var n=t.instance.state;return e=e.filter((function(e){return!e.isPivotSource})),n.pivotColumns.length&&n.groupBy&&n.groupBy.length&&(e=e.filter((function(e){return e.isGrouped||e.isPivoted}))),e}function ht(e,t){var n=t.instance;return[].concat(e,[n.state.pivotColumns,n.state.groupBy])}function ft(e){var t=e.columns,n=e.allColumns,r=e.flatHeaders,i=e.getHooks,a=e.plugins,o=e.dispatch,l=e.autoResetPivot,c=void 0===l||l,u=e.manaulPivot,d=e.disablePivot,f=e.defaultCanPivot;m(a,["useGroupBy"],"usePivotColumns");var p=v(e);n.forEach((function(t){var n=t.accessor,r=t.defaultPivot,i=t.disablePivot;t.canPivot=n?x(t.canPivot,!0!==i&&void 0,!0!==d&&void 0,!0):x(t.canPivot,r,f,!1),t.canPivot&&(t.togglePivot=function(){return e.togglePivot(t.id)}),t.Aggregated=t.Aggregated||t.Cell})),r.forEach((function(e){e.getPivotToggleProps=h(i().getPivotToggleProps,{instance:p(),header:e})}));var g=v(c);y((function(){g()&&o({type:s.resetPivot})}),[o,u?null:t]),Object.assign(e,{togglePivot:function(e,t){o({type:s.togglePivot,columnId:e,value:t})}})}function pt(e){e.allCells.forEach((function(e){e.isPivoted=e.column.isPivoted}))}s.resetSelectedRows="resetSelectedRows",s.toggleAllRowsSelected="toggleAllRowsSelected",s.toggleRowSelected="toggleRowSelected",s.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var mt=function(e){e.getToggleRowSelectedProps=[gt],e.getToggleAllRowsSelectedProps=[vt],e.getToggleAllPageRowsSelectedProps=[bt],e.stateReducers.push(yt),e.useInstance.push(At),e.prepareRow.push(_t)};mt.pluginName="useRowSelect";var gt=function(e,t){var n=t.instance,r=t.row,i=n.manualRowSelectedKey,a=void 0===i?"isSelected":i;return[e,{onChange:function(e){r.toggleRowSelected(e.target.checked)},style:{cursor:"pointer"},checked:!(!r.original||!r.original[a])||r.isSelected,title:"Toggle Row Selected",indeterminate:r.isSomeSelected}]},vt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!n.isAllRowsSelected&&Object.keys(n.state.selectedRowIds).length)}]},bt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllPageRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!n.isAllPageRowsSelected&&n.page.some((function(e){var t=e.id;return n.state.selectedRowIds[t]})))}]};function yt(e,t,n,r){if(t.type===s.init)return i({selectedRowIds:{}},e);if(t.type===s.resetSelectedRows)return i({},e,{selectedRowIds:r.initialState.selectedRowIds||{}});if(t.type===s.toggleAllRowsSelected){var a=t.value,o=r.isAllRowsSelected,l=r.rowsById,c=r.nonGroupedRowsById,u=void 0===c?l:c,d=void 0!==a?a:!o,h=Object.assign({},e.selectedRowIds);return d?Object.keys(u).forEach((function(e){h[e]=!0})):Object.keys(u).forEach((function(e){delete h[e]})),i({},e,{selectedRowIds:h})}if(t.type===s.toggleRowSelected){var f=t.id,p=t.value,m=r.rowsById,g=r.selectSubRows,v=void 0===g||g,b=r.getSubRows,y=e.selectedRowIds[f],A=void 0!==p?p:!y;if(y===A)return e;var _=i({},e.selectedRowIds);return function e(t){var n=m[t];if(n&&(n.isGrouped||(A?_[t]=!0:delete _[t]),v&&b(n)))return b(n).forEach((function(t){return e(t.id)}))}(f),i({},e,{selectedRowIds:_})}if(t.type===s.toggleAllPageRowsSelected){var w=t.value,E=r.page,S=r.rowsById,C=r.selectSubRows,T=void 0===C||C,k=r.isAllPageRowsSelected,x=r.getSubRows,O=void 0!==w?w:!k,I=i({},e.selectedRowIds);return E.forEach((function(e){return function e(t){var n=S[t];if(n.isGrouped||(O?I[t]=!0:delete I[t]),T&&x(n))return x(n).forEach((function(t){return e(t.id)}))}(e.id)})),i({},e,{selectedRowIds:I})}return e}function At(e){var n=e.data,r=e.rows,i=e.getHooks,a=e.plugins,o=e.rowsById,l=e.nonGroupedRowsById,c=void 0===l?o:l,u=e.autoResetSelectedRows,d=void 0===u||u,f=e.state.selectedRowIds,p=e.selectSubRows,g=void 0===p||p,b=e.dispatch,A=e.page,_=e.getSubRows;m(a,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var w=t.useMemo((function(){var e=[];return r.forEach((function(t){var n=g?function e(t,n,r){if(n[t.id])return!0;var i=r(t);if(i&&i.length){var a=!0,o=!1;return i.forEach((function(t){o&&!a||(e(t,n,r)?o=!0:a=!1)})),!!a||!!o&&null}return!1}(t,f,_):!!f[t.id];t.isSelected=!!n,t.isSomeSelected=null===n,n&&e.push(t)})),e}),[r,g,f,_]),E=Boolean(Object.keys(c).length&&Object.keys(f).length),S=E;E&&Object.keys(c).some((function(e){return!f[e]}))&&(E=!1),E||A&&A.length&&A.some((function(e){var t=e.id;return!f[t]}))&&(S=!1);var C=v(d);y((function(){C()&&b({type:s.resetSelectedRows})}),[b,n]);var T=t.useCallback((function(e){return b({type:s.toggleAllRowsSelected,value:e})}),[b]),k=t.useCallback((function(e){return b({type:s.toggleAllPageRowsSelected,value:e})}),[b]),x=t.useCallback((function(e,t){return b({type:s.toggleRowSelected,id:e,value:t})}),[b]),O=v(e),I=h(i().getToggleAllRowsSelectedProps,{instance:O()}),M=h(i().getToggleAllPageRowsSelectedProps,{instance:O()});Object.assign(e,{selectedFlatRows:w,isAllRowsSelected:E,isAllPageRowsSelected:S,toggleRowSelected:x,toggleAllRowsSelected:T,getToggleAllRowsSelectedProps:I,getToggleAllPageRowsSelectedProps:M,toggleAllPageRowsSelected:k})}function _t(e,t){var n=t.instance;e.toggleRowSelected=function(t){return n.toggleRowSelected(e.id,t)},e.getToggleRowSelectedProps=h(n.getHooks().getToggleRowSelectedProps,{instance:n,row:e})}var wt=function(e){return{}},Et=function(e){return{}};s.setRowState="setRowState",s.setCellState="setCellState",s.resetRowState="resetRowState";var St=function(e){e.stateReducers.push(Ct),e.useInstance.push(Tt),e.prepareRow.push(kt)};function Ct(e,t,n,r){var a=r.initialRowStateAccessor,o=void 0===a?wt:a,l=r.initialCellStateAccessor,c=void 0===l?Et:l,u=r.rowsById;if(t.type===s.init)return i({rowState:{}},e);if(t.type===s.resetRowState)return i({},e,{rowState:r.initialState.rowState||{}});if(t.type===s.setRowState){var d,h=t.rowId,f=t.value,p=void 0!==e.rowState[h]?e.rowState[h]:o(u[h]);return i({},e,{rowState:i({},e.rowState,(d={},d[h]=g(f,p),d))})}if(t.type===s.setCellState){var m,v,b,y,A,_=t.rowId,w=t.columnId,E=t.value,S=void 0!==e.rowState[_]?e.rowState[_]:o(u[_]),C=void 0!==(null==S?void 0:null==(m=S.cellState)?void 0:m[w])?S.cellState[w]:c(null==(v=u[_])?void 0:null==(b=v.cells)?void 0:b.find((function(e){return e.column.id===w})));return i({},e,{rowState:i({},e.rowState,(A={},A[_]=i({},S,{cellState:i({},S.cellState||{},(y={},y[w]=g(E,C),y))}),A))})}}function Tt(e){var n=e.autoResetRowState,r=void 0===n||n,i=e.data,a=e.dispatch,o=t.useCallback((function(e,t){return a({type:s.setRowState,rowId:e,value:t})}),[a]),l=t.useCallback((function(e,t,n){return a({type:s.setCellState,rowId:e,columnId:t,value:n})}),[a]),c=v(r);y((function(){c()&&a({type:s.resetRowState})}),[i]),Object.assign(e,{setRowState:o,setCellState:l})}function kt(e,t){var n=t.instance,r=n.initialRowStateAccessor,i=void 0===r?wt:r,a=n.initialCellStateAccessor,o=void 0===a?Et:a,s=n.state.rowState;e&&(e.state=void 0!==s[e.id]?s[e.id]:i(e),e.setState=function(t){return n.setRowState(e.id,t)},e.cells.forEach((function(t){e.state.cellState||(e.state.cellState={}),t.state=void 0!==e.state.cellState[t.column.id]?e.state.cellState[t.column.id]:o(t),t.setState=function(r){return n.setCellState(e.id,t.column.id,r)}})))}St.pluginName="useRowState",s.resetColumnOrder="resetColumnOrder",s.setColumnOrder="setColumnOrder";var xt=function(e){e.stateReducers.push(Ot),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.columnOrder])})),e.visibleColumns.push(It),e.useInstance.push(Mt)};function Ot(e,t,n,r){return t.type===s.init?i({columnOrder:[]},e):t.type===s.resetColumnOrder?i({},e,{columnOrder:r.initialState.columnOrder||[]}):t.type===s.setColumnOrder?i({},e,{columnOrder:g(t.columnOrder,e.columnOrder)}):void 0}function It(e,t){var n=t.instance.state.columnOrder;if(!n||!n.length)return e;for(var r=[].concat(n),i=[].concat(e),a=[],o=function(){var e=r.shift(),t=i.findIndex((function(t){return t.id===e}));t>-1&&a.push(i.splice(t,1)[0])};i.length&&r.length;)o();return[].concat(a,i)}function Mt(e){var n=e.dispatch;e.setColumnOrder=t.useCallback((function(e){return n({type:s.setColumnOrder,columnOrder:e})}),[n])}xt.pluginName="useColumnOrder",u.canResize=!0,s.columnStartResizing="columnStartResizing",s.columnResizing="columnResizing",s.columnDoneResizing="columnDoneResizing",s.resetResize="resetResize";var Pt=function(e){e.getResizerProps=[Dt],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(Nt),e.useInstance.push(Rt),e.useInstanceBeforeDimensions.push(Lt)},Dt=function(e,t){var n=t.instance,r=t.header,i=n.dispatch,a=function(e,t){var n=!1;if("touchstart"===e.type){if(e.touches&&e.touches.length>1)return;n=!0}var r,a,o=function(e){var t=[];return function e(n){n.columns&&n.columns.length&&n.columns.map(e),t.push(n)}(e),t}(t).map((function(e){return[e.id,e.totalWidth]})),l=n?Math.round(e.touches[0].clientX):e.clientX,c=function(){window.cancelAnimationFrame(r),r=null,i({type:s.columnDoneResizing})},u=function(){window.cancelAnimationFrame(r),r=null,i({type:s.columnResizing,clientX:a})},d=function(e){a=e,r||(r=window.requestAnimationFrame(u))},h={mouse:{moveEvent:"mousemove",moveHandler:function(e){return d(e.clientX)},upEvent:"mouseup",upHandler:function(e){document.removeEventListener("mousemove",h.mouse.moveHandler),document.removeEventListener("mouseup",h.mouse.upHandler),c()}},touch:{moveEvent:"touchmove",moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(e){document.removeEventListener(h.touch.moveEvent,h.touch.moveHandler),document.removeEventListener(h.touch.upEvent,h.touch.moveHandler),c()}}},f=n?h.touch:h.mouse,p=!!function(){if("boolean"==typeof L)return L;var e=!1;try{var t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return L=e}()&&{passive:!1};document.addEventListener(f.moveEvent,f.moveHandler,p),document.addEventListener(f.upEvent,f.upHandler,p),i({type:s.columnStartResizing,columnId:t.id,columnWidth:t.totalWidth,headerIdWidths:o,clientX:l})};return[e,{onMouseDown:function(e){return e.persist()||a(e,r)},onTouchStart:function(e){return e.persist()||a(e,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Nt(e,t){if(t.type===s.init)return i({columnResizing:{columnWidths:{}}},e);if(t.type===s.resetResize)return i({},e,{columnResizing:{columnWidths:{}}});if(t.type===s.columnStartResizing){var n=t.clientX,r=t.columnId,a=t.columnWidth,o=t.headerIdWidths;return i({},e,{columnResizing:i({},e.columnResizing,{startX:n,headerIdWidths:o,columnWidth:a,isResizingColumn:r})})}if(t.type===s.columnResizing){var l=t.clientX,c=e.columnResizing,u=c.startX,d=c.columnWidth,h=c.headerIdWidths,f=(l-u)/d,p={};return(void 0===h?[]:h).forEach((function(e){var t=e[0],n=e[1];p[t]=Math.max(n+n*f,0)})),i({},e,{columnResizing:i({},e.columnResizing,{columnWidths:i({},e.columnResizing.columnWidths,{},p)})})}return t.type===s.columnDoneResizing?i({},e,{columnResizing:i({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}Pt.pluginName="useResizeColumns";var Lt=function(e){var t=e.flatHeaders,n=e.disableResizing,r=e.getHooks,i=e.state.columnResizing,a=v(e);t.forEach((function(e){var t=x(!0!==e.disableResizing&&void 0,!0!==n&&void 0,!0);e.canResize=t,e.width=i.columnWidths[e.id]||e.originalWidth||e.width,e.isResizing=i.isResizingColumn===e.id,t&&(e.getResizerProps=h(r().getResizerProps,{instance:a(),header:e}))}))};function Rt(e){var n=e.plugins,r=e.dispatch,i=e.autoResetResize,a=void 0===i||i,o=e.columns;m(n,["useAbsoluteLayout"],"useResizeColumns");var l=v(a);y((function(){l()&&r({type:s.resetResize})}),[o]);var c=t.useCallback((function(){return r({type:s.resetResize})}),[r]);Object.assign(e,{resetResizing:c})}var Bt={position:"absolute",top:0},jt=function(e){e.getTableBodyProps.push(Ft),e.getRowProps.push(Ft),e.getHeaderGroupProps.push(Ft),e.getFooterGroupProps.push(Ft),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:i({},Bt,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:i({},Bt,{left:n.column.totalLeft+"px",width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:i({},Bt,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]}))};jt.pluginName="useAbsoluteLayout";var Ft=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},Ut={display:"inline-block",boxSizing:"border-box"},Ht=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},zt=function(e){e.getRowProps.push(Ht),e.getHeaderGroupProps.push(Ht),e.getFooterGroupProps.push(Ht),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:i({},Ut,{width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:i({},Ut,{width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:i({},Ut,{width:n.totalWidth+"px"})}]}))};function Vt(e){e.getTableProps.push(Wt),e.getRowProps.push(Gt),e.getHeaderGroupProps.push(Gt),e.getFooterGroupProps.push(Gt),e.getHeaderProps.push(qt),e.getCellProps.push(Yt),e.getFooterProps.push(Kt)}zt.pluginName="useBlockLayout",Vt.pluginName="useFlexLayout";var Wt=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Gt=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},qt=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},Yt=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},Kt=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function Xt(e){e.stateReducers.push(Zt),e.getTableProps.push(Qt),e.getHeaderProps.push($t),e.getRowProps.push(Jt)}s.columnStartResizing="columnStartResizing",s.columnResizing="columnResizing",s.columnDoneResizing="columnDoneResizing",s.resetResize="resetResize",Xt.pluginName="useGridLayout";var Qt=function(e,t){var n=t.instance;return[e,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map((function(e){var t;return n.state.gridLayout.columnWidths[e.id]?n.state.gridLayout.columnWidths[e.id]+"px":(null==(t=n.state.columnResizing)?void 0:t.isResizingColumn)?n.state.gridLayout.startWidths[e.id]+"px":"number"==typeof e.width?e.width+"px":e.width})).join(" ")}}]},$t=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},Jt=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function Zt(e,t,n,r){if(t.type===s.init)return i({gridLayout:{columnWidths:{}}},e);if(t.type===s.resetResize)return i({},e,{gridLayout:{columnWidths:{}}});if(t.type===s.columnStartResizing){var a=t.columnId,o=t.headerIdWidths,l=en(a);if(void 0!==l){var c=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=en(t.id),n))}),{}),u=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=t.minWidth,n))}),{}),d=r.visibleColumns.reduce((function(e,t){var n;return i({},e,((n={})[t.id]=t.maxWidth,n))}),{}),h=o.map((function(e){var t=e[0];return[t,en(t)]}));return i({},e,{gridLayout:i({},e.gridLayout,{startWidths:c,minWidths:u,maxWidths:d,headerIdGridWidths:h,columnWidth:l})})}return e}if(t.type===s.columnResizing){var f=t.clientX,p=e.columnResizing.startX,m=e.gridLayout,g=m.columnWidth,v=m.minWidths,b=m.maxWidths,y=m.headerIdGridWidths,A=(f-p)/g,_={};return(void 0===y?[]:y).forEach((function(e){var t=e[0],n=e[1];_[t]=Math.min(Math.max(v[t],n+n*A),b[t])})),i({},e,{gridLayout:i({},e.gridLayout,{columnWidths:i({},e.gridLayout.columnWidths,{},_)})})}return t.type===s.columnDoneResizing?i({},e,{gridLayout:i({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function en(e){var t,n=null==(t=document.getElementById("header-cell-"+e))?void 0:t.offsetWidth;if(void 0!==n)return n}e._UNSTABLE_usePivotColumns=nt,e.actions=s,e.defaultColumn=u,e.defaultGroupByFn=ze,e.defaultOrderByFn=Je,e.defaultRenderer=l,e.emptyRenderer=c,e.ensurePluginOrder=m,e.flexRender=_,e.functionalUpdate=g,e.loopHooks=p,e.makePropGetter=h,e.makeRenderer=A,e.reduceHooks=f,e.safeUseLayoutEffect=b,e.useAbsoluteLayout=jt,e.useAsyncDebounce=function(e,n){void 0===n&&(n=0);var i=t.useRef({}),a=v(e),o=v(n);return t.useCallback(function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,s,l=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=l.length,n=new Array(t),s=0;s<t;s++)n[s]=l[s];return i.current.promise||(i.current.promise=new Promise((function(e,t){i.current.resolve=e,i.current.reject=t}))),i.current.timeout&&clearTimeout(i.current.timeout),i.current.timeout=setTimeout(r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete i.current.timeout,e.prev=1,e.t0=i.current,e.next=5,a().apply(void 0,n);case 5:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=12;break;case 9:e.prev=9,e.t2=e.catch(1),i.current.reject(e.t2);case 12:return e.prev=12,delete i.current.promise,e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])}))),o()),e.abrupt("return",i.current.promise);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),[a,o])},e.useBlockLayout=zt,e.useColumnOrder=xt,e.useExpanded=le,e.useFilters=Ce,e.useFlexLayout=Vt,e.useGetLatest=v,e.useGlobalFilter=xe,e.useGridLayout=Xt,e.useGroupBy=Le,e.useMountedLayoutEffect=y,e.usePagination=Ze,e.useResizeColumns=Pt,e.useRowSelect=mt,e.useRowState=St,e.useSortBy=Ke,e.useTable=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];e=ae(e),r=[Y].concat(r);var o=t.useRef({}),l=v(o.current);Object.assign(l(),i({},e,{plugins:r,hooks:q()})),r.filter(Boolean).forEach((function(e){e(l().hooks)}));var c=v(l().hooks);l().getHooks=c,delete l().hooks,Object.assign(l(),f(c().useOptions,ae(e)));var u=l(),d=u.data,m=u.columns,g=u.initialState,b=u.defaultColumn,y=u.getSubRows,_=u.getRowId,k=u.stateReducer,x=u.useControlledState,O=v(k),I=t.useCallback((function(e,t){if(!t.type)throw console.info({action:t}),new Error("Unknown Action 👆");return[].concat(c().stateReducers,Array.isArray(O())?O():[O()]).reduce((function(n,r){return r(n,t,e,l())||n}),e)}),[c,O,l]),M=t.useReducer(I,void 0,(function(){return I(g,{type:s.init})})),P=M[0],D=M[1],N=f([].concat(c().useControlledState,[x]),P,{instance:l()});Object.assign(l(),{state:N,dispatch:D});var L=t.useMemo((function(){return w(f(c().columns,m,{instance:l()}))}),[c,l,m].concat(f(c().columnsDeps,[],{instance:l()})));l().columns=L;var R=t.useMemo((function(){return f(c().allColumns,E(L),{instance:l()}).map(S)}),[L,c,l].concat(f(c().allColumnsDeps,[],{instance:l()})));l().allColumns=R;var B=t.useMemo((function(){for(var e=[],t=[],n={},r=[].concat(R);r.length;){var i=r.shift();se({data:d,rows:e,flatRows:t,rowsById:n,column:i,getRowId:_,getSubRows:y,accessValueHooks:c().accessValue,getInstance:l})}return[e,t,n]}),[R,d,_,y,c,l]),j=B[0],F=B[1],U=B[2];Object.assign(l(),{rows:j,initialRows:[].concat(j),flatRows:F,rowsById:U}),p(c().useInstanceAfterData,l());var H=t.useMemo((function(){return f(c().visibleColumns,R,{instance:l()}).map((function(e){return C(e,b)}))}),[c,R,l,b].concat(f(c().visibleColumnsDeps,[],{instance:l()})));R=t.useMemo((function(){var e=[].concat(H);return R.forEach((function(t){e.find((function(e){return e.id===t.id}))||e.push(t)})),e}),[R,H]),l().allColumns=R;var z=t.useMemo((function(){return f(c().headerGroups,T(H,b),l())}),[c,H,b,l].concat(f(c().headerGroupsDeps,[],{instance:l()})));l().headerGroups=z;var V=t.useMemo((function(){return z.length?z[0].headers:[]}),[z]);l().headers=V,l().flatHeaders=z.reduce((function(e,t){return[].concat(e,t.headers)}),[]),p(c().useInstanceBeforeDimensions,l());var W=H.filter((function(e){return e.isVisible})).map((function(e){return e.id})).sort().join("_");H=t.useMemo((function(){return H.filter((function(e){return e.isVisible}))}),[H,W]),l().visibleColumns=H;var G=oe(V),K=G[0],X=G[1],Q=G[2];return l().totalColumnsMinWidth=K,l().totalColumnsWidth=X,l().totalColumnsMaxWidth=Q,p(c().useInstance,l()),[].concat(l().flatHeaders,l().allColumns).forEach((function(e){e.render=A(l(),e),e.getHeaderProps=h(c().getHeaderProps,{instance:l(),column:e}),e.getFooterProps=h(c().getFooterProps,{instance:l(),column:e})})),l().headerGroups=t.useMemo((function(){return z.filter((function(e,t){return e.headers=e.headers.filter((function(e){return e.headers?function e(t){return t.filter((function(t){return t.headers?e(t.headers):t.isVisible})).length}(e.headers):e.isVisible})),!!e.headers.length&&(e.getHeaderGroupProps=h(c().getHeaderGroupProps,{instance:l(),headerGroup:e,index:t}),e.getFooterGroupProps=h(c().getFooterGroupProps,{instance:l(),headerGroup:e,index:t}),!0)}))}),[z,l,c]),l().footerGroups=[].concat(l().headerGroups).reverse(),l().prepareRow=t.useCallback((function(e){e.getRowProps=h(c().getRowProps,{instance:l(),row:e}),e.allCells=R.map((function(t){var n=e.values[t.id],r={column:t,row:e,value:n};return r.getCellProps=h(c().getCellProps,{instance:l(),cell:r}),r.render=A(l(),t,{row:e,cell:r,value:n}),r})),e.cells=H.map((function(t){return e.allCells.find((function(e){return e.column.id===t.id}))})),p(c().prepareRow,e,{instance:l()})}),[c,l,R,H]),l().getTableProps=h(c().getTableProps,{instance:l()}),l().getTableBodyProps=h(c().getTableBodyProps,{instance:l()}),p(c().useFinalInstance,l()),l()},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(0))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem",hideScrollX:"hideScrollX--2pj4w",activationDesc:"activationDesc--jRSXI"}},function(e,t){e.exports='<!doctype html>\n<html>\n\n<head>\n    <meta charset="utf-8">\n    <title>Demo</title>\n    <meta name="description" content="An Icon Font Generated By IcoMoon.io">\n    <meta name="viewport" content="width=device-width, initial-scale=1">\n\n<body>\n    <div style="user-select: text;">\n        <div class="bgc1 clearfix">\n            <h1 class="mhmm mvm"><span class="fgc1">Font Name:</span> fuvi-icon v1.31b <small\n                    class="fgc1">(Glyphs:&nbsp;370)</small></h1>\n        </div>\n        <div class="clearfix mhl ptl">\n            <h1 class="mvm mtn fgc1">Grid Size: 16</h1>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-export-html"></i>\n                    <span class="mls"> fuvi-export-html</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaac" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaac;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-save-to-myvideo"></i>\n                    <span class="mls"> fuvi-save-to-myvideo</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaad" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaad;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-icon-grid"></i>\n                    <span class="mls"> fuvi-icon-grid</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaaa" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaaa;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-icon-list"></i>\n                    <span class="mls"> fuvi-icon-list</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaab" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaab;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-share-icon-full-fill"></i>\n                    <span class="mls"> fuvi-share-icon-full-fill</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa9" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa9;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-clipboard-copy"></i>\n                    <span class="mls"> fuvi-clipboard-copy</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa6" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa6;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-privacy-lock"></i>\n                    <span class="mls"> fuvi-privacy-lock</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa7" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa7;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-privacy-unlock"></i>\n                    <span class="mls"> fuvi-privacy-unlock</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa8" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa8;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-video-document"></i>\n                    <span class="mls"> fuvi-video-document</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa5" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa5;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-button"></i>\n                    <span class="mls"> fuvi-play-button</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa3" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa3;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-document"></i>\n                    <span class="mls"> fuvi-play-document</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa4" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa4;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-enter-fullscreen-attachment"></i>\n                    <span class="mls"> fuvi-enter-fullscreen-attachment</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa1" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa1;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-exit-fullscreen-attachment"></i>\n                    <span class="mls"> fuvi-exit-fullscreen-attachment</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa2" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa2;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-playlist-branch"></i>\n                    <span class="mls"> fuvi-playlist-branch</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea9f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea9f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-playlist-root"></i>\n                    <span class="mls"> fuvi-playlist-root</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="eaa0" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xeaa0;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-list"></i>\n                    <span class="mls"> fuvi-play-list</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea9e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea9e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-up-level"></i>\n                    <span class="mls"> fuvi-up-level</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea9d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea9d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-write-comment-disable"></i>\n                    <span class="mls"> fuvi-write-comment-disable</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea9c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea9c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-arrow-bottom-bold"></i>\n                    <span class="mls"> fuvi-arrow-bottom-bold</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea89" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea89;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-arrow-left-bold"></i>\n                    <span class="mls"> fuvi-arrow-left-bold</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea8a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea8a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-arrow-right-bold"></i>\n                    <span class="mls"> fuvi-arrow-right-bold</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea8b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea8b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-arrow-top-bold"></i>\n                    <span class="mls"> fuvi-arrow-top-bold</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea8c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea8c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-cam-live"></i>\n                    <span class="mls"> fuvi-cam-live</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea8d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea8d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-cam-live-off"></i>\n                    <span class="mls"> fuvi-cam-live-off</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea8e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea8e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-hang-meeting"></i>\n                    <span class="mls"> fuvi-hang-meeting</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea8f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea8f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-join-room"></i>\n                    <span class="mls"> fuvi-join-room</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea90" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea90;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-live-icon"></i>\n                    <span class="mls"> fuvi-live-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea91" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea91;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-meeting-crop-round"></i>\n                    <span class="mls"> fuvi-meeting-crop-round</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea92" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea92;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-meeting-full"></i>\n                    <span class="mls"> fuvi-meeting-full</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea93" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea93;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-mic"></i>\n                    <span class="mls"> fuvi-mic</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea94" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea94;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-more-option"></i>\n                    <span class="mls"> fuvi-more-option</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea95" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea95;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-mute-mic"></i>\n                    <span class="mls"> fuvi-mute-mic</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea96" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea96;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-share-screen"></i>\n                    <span class="mls"> fuvi-share-screen</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea97" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea97;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-start"></i>\n                    <span class="mls"> fuvi-start</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea98" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea98;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stop"></i>\n                    <span class="mls"> fuvi-stop</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea99" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea99;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-voice-action"></i>\n                    <span class="mls"> fuvi-voice-action</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea9a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea9a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-write-comment"></i>\n                    <span class="mls"> fuvi-write-comment</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea9b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea9b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-enter-fullscreen-mobile"></i>\n                    <span class="mls"> fuvi-enter-fullscreen-mobile</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea88" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea88;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-create-meeting"></i>\n                    <span class="mls"> fuvi-create-meeting</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea87" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea87;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-disk-icon"></i>\n                    <span class="mls"> fuvi-disk-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea86" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea86;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-meet-team"></i>\n                    <span class="mls"> fuvi-meet-team</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea85" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea85;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-like-full"></i>\n                    <span class="mls"> fuvi-like-full</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea82" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea82;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-like-share"></i>\n                    <span class="mls"> fuvi-like-share</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea83" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea83;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-no-like-share"></i>\n                    <span class="mls"> fuvi-no-like-share</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea84" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea84;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-link-ic"></i>\n                    <span class="mls"> fuvi-link-ic</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea81" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea81;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-mute-speaker"></i>\n                    <span class="mls"> fuvi-mute-speaker</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea7e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea7e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-speaker"></i>\n                    <span class="mls"> fuvi-speaker</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea7f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea7f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-key-owner"></i>\n                    <span class="mls"> fuvi-key-owner</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea80" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea80;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-video-after"></i>\n                    <span class="mls"> fuvi-chapter-video-after</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea7c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea7c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-heading-before"></i>\n                    <span class="mls"> fuvi-chapter-heading-before</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea7d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea7d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-reg-icon"></i>\n                    <span class="mls"> fuvi-reg-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea7a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea7a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-reg"></i>\n                    <span class="mls"> fuvi-user-reg</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea7b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea7b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-video-after-chapter"></i>\n                    <span class="mls"> fuvi-add-video-after-chapter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea78" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea78;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-tite-before-chapter"></i>\n                    <span class="mls"> fuvi-add-tite-before-chapter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea79" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea79;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-create-video"></i>\n                    <span class="mls"> fuvi-create-video</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea72" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea72;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-down-arrow-s"></i>\n                    <span class="mls"> fuvi-down-arrow-s</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea73" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea73;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-down-arrow-thin"></i>\n                    <span class="mls"> fuvi-down-arrow-thin</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea74" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea74;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-mark-round"></i>\n                    <span class="mls"> fuvi-mark-round</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea75" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea75;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-up-arrow-s"></i>\n                    <span class="mls"> fuvi-up-arrow-s</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea76" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea76;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-up-arrow-thin"></i>\n                    <span class="mls"> fuvi-up-arrow-thin</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea77" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea77;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-item"></i>\n                    <span class="mls"> fuvi-add-item</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea65" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea65;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-bo-enable-icon"></i>\n                    <span class="mls"> fuvi-bo-enable-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea66" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea66;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-checked-mark-single"></i>\n                    <span class="mls"> fuvi-checked-mark-single</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea67" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea67;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-couse"></i>\n                    <span class="mls"> fuvi-couse</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea68" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea68;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-couse-list"></i>\n                    <span class="mls"> fuvi-couse-list</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea69" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea69;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-disable-user-copy"></i>\n                    <span class="mls"> fuvi-disable-user-copy</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea6a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea6a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-group-avatar"></i>\n                    <span class="mls"> fuvi-group-avatar</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea6b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea6b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-group-avatar-ibg"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-group-avatar-ibg</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea6c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea6c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-group-icon"></i>\n                    <span class="mls"> fuvi-group-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea6e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea6e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-group-icon-add"></i>\n                    <span class="mls"> fuvi-group-icon-add</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea6f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea6f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-avatar-ibg"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-user-avatar-ibg</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea70" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea70;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-change-user-password-ro"></i>\n                    <span class="mls"> fuvi-change-user-password-ro</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea64" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea64;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-change-user-password"></i>\n                    <span class="mls"> fuvi-change-user-password</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea5f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea5f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-disable-user"></i>\n                    <span class="mls"> fuvi-disable-user</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea60" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea60;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-enable-user"></i>\n                    <span class="mls"> fuvi-enable-user</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea61" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea61;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-remove-user-role"></i>\n                    <span class="mls"> fuvi-remove-user-role</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea62" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea62;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-role"></i>\n                    <span class="mls"> fuvi-user-role</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea63" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea63;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-bookmark-like-chapter"></i>\n                    <span class="mls"> fuvi-bookmark-like-chapter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea55" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea55;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-checked-a"></i>\n                    <span class="mls"> fuvi-checked-a</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea56" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea56;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-checked-b"></i>\n                    <span class="mls"> fuvi-checked-b</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea57" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea57;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-checked-c"></i>\n                    <span class="mls"> fuvi-checked-c</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea58" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea58;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-order-history"></i>\n                    <span class="mls"> fuvi-order-history</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea59" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea59;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-transcripted"></i>\n                    <span class="mls"> fuvi-transcripted</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea5a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea5a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-uncheck-a"></i>\n                    <span class="mls"> fuvi-uncheck-a</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea5b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea5b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-uncheck-b"></i>\n                    <span class="mls"> fuvi-uncheck-b</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea5c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea5c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-uncheck-c"></i>\n                    <span class="mls"> fuvi-uncheck-c</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea5d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea5d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-video-icon"></i>\n                    <span class="mls"> fuvi-video-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea5e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea5e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-current-img"></i>\n                    <span class="mls"> fuvi-current-img</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea4c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea4c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-pen-draw"></i>\n                    <span class="mls"> fuvi-pen-draw</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea4d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea4d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-list-bookmark"></i>\n                    <span class="mls"> fuvi-play-list-bookmark</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea4e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea4e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stroke-styleB"></i>\n                    <span class="mls"> fuvi-stroke-styleB</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea4f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea4f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stroke-styleC"></i>\n                    <span class="mls"> fuvi-stroke-styleC</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea50" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea50;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stroke-styleD"></i>\n                    <span class="mls"> fuvi-stroke-styleD</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea51" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea51;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stroke-styleE"></i>\n                    <span class="mls"> fuvi-stroke-styleE</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea52" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea52;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stroke-styleF"></i>\n                    <span class="mls"> fuvi-stroke-styleF</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea53" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea53;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stroke-styleG"></i>\n                    <span class="mls"> fuvi-stroke-styleG</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea54" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea54;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-send"></i>\n                    <span class="mls"> fuvi-send</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea49" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea49;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-add"></i>\n                    <span class="mls"> fuvi-user-add</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea4a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea4a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-addlist"></i>\n                    <span class="mls"> fuvi-user-addlist</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea4b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea4b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-copping-file"></i>\n                    <span class="mls"> fuvi-copping-file</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea47" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea47;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-copy-file"></i>\n                    <span class="mls"> fuvi-copy-file</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea48" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea48;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-delete-rounder"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-delete-rounder</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea45" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea45;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-in-review"></i>\n                    <span class="mls"> fuvi-in-review</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea44" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea44;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-comment"></i>\n                    <span class="mls"> fuvi-comment</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea41" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea41;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-exclamation"></i>\n                    <span class="mls"> fuvi-exclamation</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea42" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea42;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-premission"></i>\n                    <span class="mls"> fuvi-user-premission</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea43" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea43;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-save-icon"></i>\n                    <span class="mls"> fuvi-save-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea3f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea3f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-unsave-icon"></i>\n                    <span class="mls"> fuvi-unsave-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea40" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea40;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-info-icon"></i>\n                    <span class="mls"> fuvi-info-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea3d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea3d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-warning-icon"></i>\n                    <span class="mls"> fuvi-warning-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea3e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea3e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-most-recent"></i>\n                    <span class="mls"> fuvi-most-recent</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea39" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea39;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-most-view"></i>\n                    <span class="mls"> fuvi-most-view</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea3a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea3a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-sort-icon"></i>\n                    <span class="mls"> fuvi-sort-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea3b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea3b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-top-rated"></i>\n                    <span class="mls"> fuvi-top-rated</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea3c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea3c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-heading-withoutvideo-after"></i>\n                    <span class="mls"> fuvi-chapter-heading-withoutvideo-after</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea38" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea38;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-insert-video-chapter-after"></i>\n                    <span class="mls"> fuvi-insert-video-chapter-after</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea36" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea36;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-insert-video-chapter-before"></i>\n                    <span class="mls"> fuvi-insert-video-chapter-before</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea37" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea37;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-notification-icon"></i>\n                    <span class="mls"> fuvi-notification-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea35" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea35;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-center-line"><span class="path1"></span><span class="path2"></span><span\n                            class="path3"></span></i>\n                    <span class="mls"> fuvi-center-line</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea29" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea29;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-exit-fullscreen-a"><span class="path1"></span><span class="path2"></span><span\n                            class="path3"></span><span class="path4"></span><span class="path5"></span><span\n                            class="path6"></span></i>\n                    <span class="mls"> fuvi-exit-fullscreen-a</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea2e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea2e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-restore-item-default"></i>\n                    <span class="mls"> fuvi-restore-item-default</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea34" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea34;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-exit-fullscreen-b"></i>\n                    <span class="mls"> fuvi-exit-fullscreen-b</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea18" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea18;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-exit-fullscreen-c"></i>\n                    <span class="mls"> fuvi-exit-fullscreen-c</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea19" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea19;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-friend-group"></i>\n                    <span class="mls"> fuvi-friend-group</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea2a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea2a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-request-user"></i>\n                    <span class="mls"> fuvi-request-user</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea2b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea2b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-change-password"></i>\n                    <span class="mls"> fuvi-change-password</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e910" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe910;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-checked-mark"></i>\n                    <span class="mls"> fuvi-checked-mark</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e911" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe911;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-clock-icon"></i>\n                    <span class="mls"> fuvi-clock-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e912" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe912;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-enter-fullscreen-b"><span class="path1"></span><span class="path2"></span><span\n                            class="path3"></span><span class="path4"></span><span class="path5"></span><span\n                            class="path6"></span></i>\n                    <span class="mls"> fuvi-enter-fullscreen-b</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e913" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe913;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-my-files"></i>\n                    <span class="mls"> fuvi-my-files</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e919" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe919;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-east-blue"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-play-east-blue</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e91a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe91a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stop-east-blue"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-stop-east-blue</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea26" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea26;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-profile"></i>\n                    <span class="mls"> fuvi-user-profile</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea28" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea28;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-clear-format"></i>\n                    <span class="mls"> fuvi-clear-format</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e90a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe90a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-format-painter"></i>\n                    <span class="mls"> fuvi-format-painter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e90b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe90b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-insert-chapter-after"></i>\n                    <span class="mls"> fuvi-insert-chapter-after</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e90c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe90c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-insert-chapter-before"></i>\n                    <span class="mls"> fuvi-insert-chapter-before</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e90d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe90d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-minute-icon"></i>\n                    <span class="mls"> fuvi-minute-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e90e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe90e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-plus-icon"></i>\n                    <span class="mls"> fuvi-plus-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e90f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe90f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-unlock-icon-op"></i>\n                    <span class="mls"> fuvi-unlock-icon-op</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea24" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea24;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-unlock-icon-op2"></i>\n                    <span class="mls"> fuvi-unlock-icon-op2</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea25" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea25;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-red"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-play-red</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea1a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea1a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-yellow"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-play-yellow</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea1e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea1e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stop-red"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-stop-red</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea20" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea20;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stop-yellow"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-stop-yellow</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea22" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea22;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-life-gallery"></i>\n                    <span class="mls"> fuvi-life-gallery</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea10" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea10;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-no-fill-icon"></i>\n                    <span class="mls"> fuvi-no-fill-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea11" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea11;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-attach-rotated-90"></i>\n                    <span class="mls"> fuvi-attach-rotated-90</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea12" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea12;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-locked-icon"></i>\n                    <span class="mls"> fuvi-locked-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea13" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea13;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-new-composing"></i>\n                    <span class="mls"> fuvi-new-composing</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea14" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea14;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-show-room"></i>\n                    <span class="mls"> fuvi-show-room</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea15" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea15;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stop-blue"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-stop-blue</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea16" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea16;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-text-fill-color"></i>\n                    <span class="mls"> fuvi-text-fill-color</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea1c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea1c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-unlock-icon"></i>\n                    <span class="mls"> fuvi-unlock-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea1d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea1d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-video-to-select-chapter"></i>\n                    <span class="mls"> fuvi-add-video-to-select-chapter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea06" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea06;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-attach-rotated"></i>\n                    <span class="mls"> fuvi-attach-rotated</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea07" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea07;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-bold-style"></i>\n                    <span class="mls"> fuvi-bold-style</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea08" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea08;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-contact-book"></i>\n                    <span class="mls"> fuvi-contact-book</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea09" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea09;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-continue-learning"></i>\n                    <span class="mls"> fuvi-continue-learning</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea0a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea0a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-dashboard"></i>\n                    <span class="mls"> fuvi-dashboard</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea0b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea0b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fill-icon-copy"></i>\n                    <span class="mls"> fuvi-fill-icon-copy</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea0c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea0c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-finished-learn"></i>\n                    <span class="mls"> fuvi-finished-learn</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea0d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea0d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-italic-style"></i>\n                    <span class="mls"> fuvi-italic-style</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea0e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea0e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-under-line-style"></i>\n                    <span class="mls"> fuvi-under-line-style</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea0f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea0f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-restore"></i>\n                    <span class="mls"> fuvi-restore</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea05" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea05;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-item-gallery-copy"></i>\n                    <span class="mls"> fuvi-add-item-gallery-copy</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea00" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea00;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-delete-chapter"></i>\n                    <span class="mls"> fuvi-delete-chapter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea01" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea01;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-edit-upload-video"></i>\n                    <span class="mls"> fuvi-edit-upload-video</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea02" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea02;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-icon-show-canvas"></i>\n                    <span class="mls"> fuvi-icon-show-canvas</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea03" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea03;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-price-tag"></i>\n                    <span class="mls"> fuvi-price-tag</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="ea04" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xea04;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-heading-withoutvideo-s1"></i>\n                    <span class="mls"> fuvi-chapter-heading-withoutvideo-s1</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9fe" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9fe;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-normal-s2"></i>\n                    <span class="mls"> fuvi-chapter-normal-s2</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ff" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ff;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-heading-withoutvideo"></i>\n                    <span class="mls"> fuvi-chapter-heading-withoutvideo</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9fc" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9fc;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-normal"></i>\n                    <span class="mls"> fuvi-chapter-normal</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9fd" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9fd;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-capture-linh"><span class="path1"></span><span class="path2"></span><span\n                            class="path3"></span></i>\n                    <span class="mls"> fuvi-capture-linh</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9f6" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9f6;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-index"></i>\n                    <span class="mls"> fuvi-chapter-index</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9f9" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9f9;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-video-intro"></i>\n                    <span class="mls"> fuvi-chapter-video-intro</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9fa" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9fa;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-insert-video-chapter"></i>\n                    <span class="mls"> fuvi-insert-video-chapter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9fb" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9fb;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-name-notime"></i>\n                    <span class="mls"> fuvi-chapter-name-notime</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9f5" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9f5;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-leftfullscreen"></i>\n                    <span class="mls"> fuvi-leftfullscreen</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9f3" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9f3;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-left-fullscreen-op"></i>\n                    <span class="mls"> fuvi-left-fullscreen-op</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9f4" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9f4;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-center-point"></i>\n                    <span class="mls"> fuvi-center-point</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ee" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ee;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-change-cover-image"></i>\n                    <span class="mls"> fuvi-change-cover-image</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ef" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ef;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-chapter-name"></i>\n                    <span class="mls"> fuvi-chapter-name</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9f0" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9f0;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-unpublish-opi"></i>\n                    <span class="mls"> fuvi-unpublish-opi</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9f1" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9f1;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-unpublish-opii"></i>\n                    <span class="mls"> fuvi-unpublish-opii</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9f2" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9f2;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-Business-Center"></i>\n                    <span class="mls"> fuvi-Business-Center</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d3" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d3;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-capture_image"></i>\n                    <span class="mls"> fuvi-capture_image</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9da" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9da;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-Composing"></i>\n                    <span class="mls"> fuvi-Composing</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9db" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9db;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-Library"></i>\n                    <span class="mls"> fuvi-Library</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ec" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ec;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-People"></i>\n                    <span class="mls"> fuvi-People</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ed" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ed;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-mn-exploring"></i>\n                    <span class="mls"> fuvi-mn-exploring</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e8" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e8;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-mn-home"></i>\n                    <span class="mls"> fuvi-mn-home</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e9" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e9;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-mn-messaging"></i>\n                    <span class="mls"> fuvi-mn-messaging</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ea" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ea;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-New-Learning"></i>\n                    <span class="mls"> fuvi-New-Learning</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9eb" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9eb;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-right-fullscreen"></i>\n                    <span class="mls"> fuvi-right-fullscreen</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d1" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d1;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-right-fullscreen-op"></i>\n                    <span class="mls"> fuvi-right-fullscreen-op</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d2" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d2;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-capture-conner"></i>\n                    <span class="mls"> fuvi-capture-conner</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e99d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe99d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-close-square-bracket"></i>\n                    <span class="mls"> fuvi-close-square-bracket</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a2" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a2;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-open-square-bracket"></i>\n                    <span class="mls"> fuvi-open-square-bracket</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a3" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a3;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-public-global"></i>\n                    <span class="mls"> fuvi-public-global</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9cf" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9cf;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-public-global-ic"></i>\n                    <span class="mls"> fuvi-public-global-ic</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d0" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d0;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-file-icon"></i>\n                    <span class="mls"> fuvi-add-file-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e95a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe95a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-folder-icon"></i>\n                    <span class="mls"> fuvi-add-folder-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e95c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe95c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color7"></i>\n                    <span class="mls"> fuvi-toolbar-color7</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ae" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ae;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-stroke3"></i>\n                    <span class="mls"> fuvi-toolbar-stroke3</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d9" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d9;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-enter-fullscreen"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-enter-fullscreen</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e958" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe958;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-back-gallery"></i>\n                    <span class="mls"> fuvi-back-gallery</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e957" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe957;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-item-gallery"></i>\n                    <span class="mls"> fuvi-add-item-gallery</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e6" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e6;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-clone-file"></i>\n                    <span class="mls"> fuvi-clone-file</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e5" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e5;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-publish"></i>\n                    <span class="mls"> fuvi-publish</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e7" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e7;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-eye-disable"></i>\n                    <span class="mls"> fuvi-eye-disable</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9dc" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9dc;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-back-gallery-op"><span class="path1"></span><span class="path2"></span><span\n                            class="path3"></span><span class="path4"></span></i>\n                    <span class="mls"> fuvi-back-gallery-op</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9dd" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9dd;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-export-sub"></i>\n                    <span class="mls"> fuvi-export-sub</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e1" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e1;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-eye-disable1"></i>\n                    <span class="mls"> fuvi-eye-disable1</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e2" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e2;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-hand-signature"></i>\n                    <span class="mls"> fuvi-hand-signature</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e3" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e3;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-import-sub"></i>\n                    <span class="mls"> fuvi-import-sub</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9e4" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9e4;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-exit-fullscreen"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-exit-fullscreen</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9c3" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9c3;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-launcher"></i>\n                    <span class="mls"> fuvi-launcher</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="1f3d3" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#x1f3d3;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-launcher-b"></i>\n                    <span class="mls"> fuvi-launcher-b</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9c4" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9c4;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-nothumnail-image-file"></i>\n                    <span class="mls"> fuvi-nothumnail-image-file</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9c5" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9c5;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-stop-play-bookmark"><span class="path1"></span><span class="path2"></span><span\n                            class="path3"></span><span class="path4"></span><span class="path5"></span><span\n                            class="path6"></span><span class="path7"></span></i>\n                    <span class="mls"> fuvi-stop-play-bookmark</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9c7" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9c7;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-upload-file"></i>\n                    <span class="mls"> fuvi-upload-file</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9c0" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9c0;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-upload-folder"></i>\n                    <span class="mls"> fuvi-upload-folder</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9c1" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9c1;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-upload-video"></i>\n                    <span class="mls"> fuvi-upload-video</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d4" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d4;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-up-arrow"></i>\n                    <span class="mls"> fuvi-up-arrow</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9be" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9be;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-exam-ex"></i>\n                    <span class="mls"> fuvi-exam-ex</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e928" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe928;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-plus-ex"></i>\n                    <span class="mls"> fuvi-plus-ex</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b4" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b4;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-next-btn-ex"></i>\n                    <span class="mls"> fuvi-next-btn-ex</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b6" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b6;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-pre-btn-ex"></i>\n                    <span class="mls"> fuvi-pre-btn-ex</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b7" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b7;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-redo-ex"></i>\n                    <span class="mls"> fuvi-redo-ex</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b8" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b8;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-rotate-left-ex"></i>\n                    <span class="mls"> fuvi-rotate-left-ex</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b9" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b9;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-rotate-right-ex"></i>\n                    <span class="mls"> fuvi-rotate-right-ex</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ba" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ba;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-short-next"></i>\n                    <span class="mls"> fuvi-short-next</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9bb" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9bb;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-short-pre"></i>\n                    <span class="mls"> fuvi-short-pre</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9bc" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9bc;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-undo-ex"></i>\n                    <span class="mls"> fuvi-undo-ex</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9bd" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9bd;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-zigzag"></i>\n                    <span class="mls"> fuvi-toolbar-zigzag</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b5" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b5;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-edit-copy"></i>\n                    <span class="mls"> fuvi-edit-copy</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a9" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a9;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-sb-hide"></i>\n                    <span class="mls"> fuvi-sb-hide</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9aa" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9aa;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-curve"></i>\n                    <span class="mls"> fuvi-toolbar-curve</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ab" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ab;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-line"></i>\n                    <span class="mls"> fuvi-toolbar-line</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ac" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ac;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-pen1"></i>\n                    <span class="mls"> fuvi-toolbar-pen1</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9ad" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9ad;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-pen3"></i>\n                    <span class="mls"> fuvi-toolbar-pen3</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b0" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b0;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-polygon"></i>\n                    <span class="mls"> fuvi-toolbar-polygon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9af" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9af;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-rectangle"></i>\n                    <span class="mls"> fuvi-toolbar-rectangle</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b1" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b1;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-stroke6"></i>\n                    <span class="mls"> fuvi-toolbar-stroke6</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b2" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b2;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-triangle"></i>\n                    <span class="mls"> fuvi-toolbar-triangle</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9b3" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9b3;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-trash-can-copy-2"></i>\n                    <span class="mls"> fuvi-trash-can-copy-2</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9bf" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9bf;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-exploring"></i>\n                    <span class="mls"> fuvi-exploring</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9c2" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9c2;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-gallery"></i>\n                    <span class="mls"> fuvi-gallery</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9c6" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9c6;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-home"></i>\n                    <span class="mls"> fuvi-home</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a4" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a4;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-mastering"></i>\n                    <span class="mls"> fuvi-mastering</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a5" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a5;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-messaging"></i>\n                    <span class="mls"> fuvi-messaging</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a6" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a6;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-notes"></i>\n                    <span class="mls"> fuvi-notes</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a7" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a7;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-utilizing"></i>\n                    <span class="mls"> fuvi-utilizing</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a8" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a8;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-bg-placeholder"></i>\n                    <span class="mls"> fuvi-bg-placeholder</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e961" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe961;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-clear-canvas"></i>\n                    <span class="mls"> fuvi-clear-canvas</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e967" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe967;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-bookmark"><span class="path1"></span><span class="path2"></span><span\n                            class="path3"></span><span class="path4"></span><span class="path5"></span><span\n                            class="path6"></span></i>\n                    <span class="mls"> fuvi-play-bookmark</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e968" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe968;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-sb-show"><span class="path1"></span><span class="path2"></span><span\n                            class="path3"></span><span class="path4"></span></i>\n                    <span class="mls"> fuvi-sb-show</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e990" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe990;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-circle"></i>\n                    <span class="mls"> fuvi-toolbar-circle</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e994" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe994;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color11"></i>\n                    <span class="mls"> fuvi-toolbar-color11</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e996" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe996;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-eraser"></i>\n                    <span class="mls"> fuvi-toolbar-eraser</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e998" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe998;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-hexagon"></i>\n                    <span class="mls"> fuvi-toolbar-hexagon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e997" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe997;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-pen"></i>\n                    <span class="mls"> fuvi-toolbar-pen</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e99c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe99c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-pentagon"></i>\n                    <span class="mls"> fuvi-toolbar-pentagon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e999" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe999;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-select"></i>\n                    <span class="mls"> fuvi-toolbar-select</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e99a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe99a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-stroke1"></i>\n                    <span class="mls"> fuvi-toolbar-stroke1</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d5" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d5;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-stroke2"></i>\n                    <span class="mls"> fuvi-toolbar-stroke2</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d6" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d6;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-stroke4"></i>\n                    <span class="mls"> fuvi-toolbar-stroke4</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e99e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe99e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-stroke5"></i>\n                    <span class="mls"> fuvi-toolbar-stroke5</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e99f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe99f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-stroke-indicator"></i>\n                    <span class="mls"> fuvi-toolbar-stroke-indicator</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a0" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a0;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-textbox"></i>\n                    <span class="mls"> fuvi-toolbar-textbox</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9a1" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9a1;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-logoutk"></i>\n                    <span class="mls"> fuvi-logoutk</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e989" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe989;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-logouts"></i>\n                    <span class="mls"> fuvi-logouts</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e98a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe98a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-menu"></i>\n                    <span class="mls"> fuvi-menu</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e98b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe98b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-three-dots-h"></i>\n                    <span class="mls"> fuvi-three-dots-h</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e98c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe98c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-three-dots-v"></i>\n                    <span class="mls"> fuvi-three-dots-v</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e98d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe98d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item23"></i>\n                    <span class="mls"> fuvi-toolbar-item23</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e976" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe976;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item24"></i>\n                    <span class="mls"> fuvi-toolbar-item24</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e977" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe977;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item25"></i>\n                    <span class="mls"> fuvi-toolbar-item25</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e978" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe978;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item26"></i>\n                    <span class="mls"> fuvi-toolbar-item26</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e979" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe979;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item27"></i>\n                    <span class="mls"> fuvi-toolbar-item27</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e987" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe987;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item28"></i>\n                    <span class="mls"> fuvi-toolbar-item28</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e986" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe986;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item29"></i>\n                    <span class="mls"> fuvi-toolbar-item29</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e995" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe995;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item30"></i>\n                    <span class="mls"> fuvi-toolbar-item30</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e988" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe988;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color2"></i>\n                    <span class="mls"> fuvi-toolbar-color2</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e99b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe99b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color3"></i>\n                    <span class="mls"> fuvi-toolbar-color3</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e985" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe985;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color4"></i>\n                    <span class="mls"> fuvi-toolbar-color4</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d8" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d8;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color5"></i>\n                    <span class="mls"> fuvi-toolbar-color5</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e9d7" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe9d7;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color6"></i>\n                    <span class="mls"> fuvi-toolbar-color6</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e95b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe95b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color8"></i>\n                    <span class="mls"> fuvi-toolbar-color8</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e95d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe95d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color9"></i>\n                    <span class="mls"> fuvi-toolbar-color9</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e95e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe95e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-color10"></i>\n                    <span class="mls"> fuvi-toolbar-color10</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e95f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe95f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item1"></i>\n                    <span class="mls"> fuvi-toolbar-item1</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e960" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe960;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item3"></i>\n                    <span class="mls"> fuvi-toolbar-item3</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e962" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe962;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item4"></i>\n                    <span class="mls"> fuvi-toolbar-item4</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e963" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe963;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item5"></i>\n                    <span class="mls"> fuvi-toolbar-item5</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e964" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe964;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item6"></i>\n                    <span class="mls"> fuvi-toolbar-item6</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e965" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe965;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item7"></i>\n                    <span class="mls"> fuvi-toolbar-item7</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e966" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe966;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item10"></i>\n                    <span class="mls"> fuvi-toolbar-item10</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e969" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe969;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item11"></i>\n                    <span class="mls"> fuvi-toolbar-item11</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e96a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe96a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item12"></i>\n                    <span class="mls"> fuvi-toolbar-item12</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e96b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe96b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item13"></i>\n                    <span class="mls"> fuvi-toolbar-item13</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e96c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe96c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item14"></i>\n                    <span class="mls"> fuvi-toolbar-item14</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e96d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe96d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item17"></i>\n                    <span class="mls"> fuvi-toolbar-item17</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e970" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe970;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item18"></i>\n                    <span class="mls"> fuvi-toolbar-item18</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e971" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe971;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item19"></i>\n                    <span class="mls"> fuvi-toolbar-item19</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e972" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe972;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item21"></i>\n                    <span class="mls"> fuvi-toolbar-item21</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e974" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe974;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-toolbar-item22"></i>\n                    <span class="mls"> fuvi-toolbar-item22</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e975" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe975;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-repeat-icon-s"></i>\n                    <span class="mls"> fuvi-repeat-icon-s</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e954" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe954;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-repeat-icon-s1"></i>\n                    <span class="mls"> fuvi-repeat-icon-s1</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e955" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe955;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-repeat-icon-s2"></i>\n                    <span class="mls"> fuvi-repeat-icon-s2</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e956" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe956;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-loop-chapter"></i>\n                    <span class="mls"> fuvi-loop-chapter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e952" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe952;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-sequence-chapter"></i>\n                    <span class="mls"> fuvi-sequence-chapter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e953" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe953;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-align-center"></i>\n                    <span class="mls"> fuvi-align-center</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e942" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe942;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-align-justify"></i>\n                    <span class="mls"> fuvi-align-justify</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e943" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe943;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-align-left"></i>\n                    <span class="mls"> fuvi-align-left</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e944" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe944;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-align-right"></i>\n                    <span class="mls"> fuvi-align-right</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e945" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe945;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-border-style"></i>\n                    <span class="mls"> fuvi-border-style</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e946" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe946;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fill-icon"></i>\n                    <span class="mls"> fuvi-fill-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e947" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe947;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-left-curly-icon"></i>\n                    <span class="mls"> fuvi-left-curly-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e948" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe948;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-math-icon"></i>\n                    <span class="mls"> fuvi-math-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e949" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe949;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-repeat-icon"></i>\n                    <span class="mls"> fuvi-repeat-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e94a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe94a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-right-curly-icon"></i>\n                    <span class="mls"> fuvi-right-curly-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e94b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe94b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-select-icon"></i>\n                    <span class="mls"> fuvi-select-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e94c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe94c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-sequentially-icon"></i>\n                    <span class="mls"> fuvi-sequentially-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e94d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe94d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-suffle-icon"></i>\n                    <span class="mls"> fuvi-suffle-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e94e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe94e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-text-box"></i>\n                    <span class="mls"> fuvi-text-box</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e94f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe94f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-text-icon"></i>\n                    <span class="mls"> fuvi-text-icon</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e950" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe950;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-weight-border"></i>\n                    <span class="mls"> fuvi-weight-border</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e951" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe951;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-pause-btn"></i>\n                    <span class="mls"> fuvi-pause-btn</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e91c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe91c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-play-btn"></i>\n                    <span class="mls"> fuvi-play-btn</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e940" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe940;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-refresh"></i>\n                    <span class="mls"> fuvi-refresh</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e941" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe941;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-add-cognitive-video"></i>\n                    <span class="mls"> fuvi-add-cognitive-video</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e938" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe938;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-arrow-down"></i>\n                    <span class="mls"> fuvi-arrow-down</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e939" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe939;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-arrow-up"></i>\n                    <span class="mls"> fuvi-arrow-up</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e93a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe93a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-calendar"></i>\n                    <span class="mls"> fuvi-calendar</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e93b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe93b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-camera"></i>\n                    <span class="mls"> fuvi-camera</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e93c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe93c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-cognitive-video"></i>\n                    <span class="mls"> fuvi-cognitive-video</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e93d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe93d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-full"></i>\n                    <span class="mls"> fuvi-user-full</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e93e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe93e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-user-trim"></i>\n                    <span class="mls"> fuvi-user-trim</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e93f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe93f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-trash-can"></i>\n                    <span class="mls"> fuvi-trash-can</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e930" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe930;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-facebook"></i>\n                    <span class="mls"> fuvi-facebook</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e92e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe92e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-googleplus"></i>\n                    <span class="mls"> fuvi-googleplus</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e92f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe92f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-googleplus1"></i>\n                    <span class="mls"> fuvi-googleplus1</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e931" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe931;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-linkedin"></i>\n                    <span class="mls"> fuvi-linkedin</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e932" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe932;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-s-arrow-down"></i>\n                    <span class="mls"> fuvi-s-arrow-down</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e933" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe933;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-s-arrow-left"></i>\n                    <span class="mls"> fuvi-s-arrow-left</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e934" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe934;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-s-arrow-right"></i>\n                    <span class="mls"> fuvi-s-arrow-right</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e935" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe935;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-s-arrow-up"></i>\n                    <span class="mls"> fuvi-s-arrow-up</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e936" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe936;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-twitter"></i>\n                    <span class="mls"> fuvi-twitter</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e937" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe937;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-eye"></i>\n                    <span class="mls"> fuvi-eye</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e92b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe92b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-like"></i>\n                    <span class="mls"> fuvi-like</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e92c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe92c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-download"></i>\n                    <span class="mls"> fuvi-download</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e92d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe92d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner"></i>\n                    <span class="mls"> fuvi-spinner</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e97a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe97a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner, loading2" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner2"></i>\n                    <span class="mls"> fuvi-spinner2</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e97b" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe97b;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner2, loading3" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner3"></i>\n                    <span class="mls"> fuvi-spinner3</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e97c" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe97c;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner3, loading4" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner4"></i>\n                    <span class="mls"> fuvi-spinner4</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e97d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe97d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner4, loading5" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner5"></i>\n                    <span class="mls"> fuvi-spinner5</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e97e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe97e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner5, loading6" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner6"></i>\n                    <span class="mls"> fuvi-spinner6</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e97f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe97f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner6, loading7" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner7"></i>\n                    <span class="mls"> fuvi-spinner7</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e980" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe980;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner7, loading8" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner8"></i>\n                    <span class="mls"> fuvi-spinner8</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e981" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe981;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner8, loading9" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner9"></i>\n                    <span class="mls"> fuvi-spinner9</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e982" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe982;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner9, loading10" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner10"></i>\n                    <span class="mls"> fuvi-spinner10</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e983" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe983;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner10, loading11" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-spinner11"></i>\n                    <span class="mls"> fuvi-spinner11</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e984" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe984;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="spinner11, loading12" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fv1"></i>\n                    <span class="mls"> fuvi-fv1</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e922" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe922;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fv2"></i>\n                    <span class="mls"> fuvi-fv2</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e923" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe923;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fv3"><span class="path1"></span><span class="path2"></span></i>\n                    <span class="mls"> fuvi-fv3</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e924" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe924;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fv4"></i>\n                    <span class="mls"> fuvi-fv4</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e926" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe926;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fv5"></i>\n                    <span class="mls"> fuvi-fv5</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e927" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe927;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fv6"></i>\n                    <span class="mls"> fuvi-fv6</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e929" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe929;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-fv7"></i>\n                    <span class="mls"> fuvi-fv7</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e92a" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe92a;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-next"></i>\n                    <span class="mls"> fuvi-next</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e920" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe920;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-prev"></i>\n                    <span class="mls"> fuvi-prev</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e921" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe921;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-arrow-left"></i>\n                    <span class="mls"> fuvi-arrow-left</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e900" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe900;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-arrow-right"></i>\n                    <span class="mls"> fuvi-arrow-right</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e901" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe901;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-attach"></i>\n                    <span class="mls"> fuvi-attach</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e902" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe902;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-bracket-close"></i>\n                    <span class="mls"> fuvi-bracket-close</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e903" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe903;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-bracket-open"></i>\n                    <span class="mls"> fuvi-bracket-open</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e904" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe904;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-cart"></i>\n                    <span class="mls"> fuvi-cart</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e905" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe905;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-check"></i>\n                    <span class="mls"> fuvi-check</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e906" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe906;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-delete"></i>\n                    <span class="mls"> fuvi-delete</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e907" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe907;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-edit-pen"></i>\n                    <span class="mls"> fuvi-edit-pen</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e908" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe908;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-edit"></i>\n                    <span class="mls"> fuvi-edit</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e909" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe909;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-search"></i>\n                    <span class="mls"> fuvi-search</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e91d" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe91d;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-share"></i>\n                    <span class="mls"> fuvi-share</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e91e" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe91e;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n            <div class="glyph fs1">\n                <div class="clearfix bshadow0 pbs">\n                    <i class="fuvi-sqrt"></i>\n                    <span class="mls"> fuvi-sqrt</span>\n                </div>\n                <fieldset class="fs0 size1of1 clearfix hidden-false">\n                    <input type="text" readonly value="e91f" class="unit size1of2" />\n                    <input type="text" maxlength="1" readonly value="&#xe91f;"\n                        class="unitRight size1of2 talign-right" />\n                </fieldset>\n                <div class="fs0 bshadow0 clearfix hidden-false">\n                    <span class="unit pvs fgc1">liga: </span>\n                    <input type="text" readonly value="" class="liga unitRight" />\n                </div>\n            </div>\n        </div>\n\n        \x3c!--[if gt IE 8]>\x3c!--\x3e\n        <div class="mhl clearfix mbl">\n            <h1>Font Test Drive</h1>\n            <label>\n                Font Size: <input id="fontSize" type="number" class="textbox0 mbm" min="8" value="48" />\n                px\n            </label>\n            <input id="testText" type="text" class="phl size1of1 mvl" placeholder="Type some text to test..."\n                value="spinner loading2 spinner2 loading3 spinner3 loading4 spinner4 loading5 spinner5 loading6 spinner6 loading7 spinner7 loading8 spinner8 loading9 spinner9 loading10 spinner10 loading11 spinner11 loading12" />\n            <div id="testDrive" class="icomoon-liga" style="font-family: fuvi-icon">spinner loading2 spinner2 loading3\n                spinner3 loading4 spinner4 loading5 spinner5 loading6 spinner6 loading7 spinner7 loading8 spinner8\n                loading9 spinner9 loading10 spinner10 loading11 spinner11 loading12&nbsp;\n            </div>\n        </div>\n        \x3c!--<![endif]--\x3e\n    </div>\n\n    <script src="liga.js"><\/script>\n    <script src="demo-files/demo.js"><\/script>\n</body>\n\n</html>'},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t){},function(e,t,n){var r;e.exports=(r=n(84),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e}}(),r.lib.WordArray)},function(e,t,n){var r;e.exports=(r=n(84),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2){var a=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i<n;i++)r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a+=2){var o=i(t[a>>>2]>>>16-a%4*8&65535);r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],a=0;a<n;a++)r[a>>>1]|=i(e.charCodeAt(a)<<16-a%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},function(e,t,n){var r,i,a;e.exports=(a=n(84),i=(r=a).lib.WordArray,r.enc.Base64url={stringify:function(e,t=!0){var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var a=[],o=0;o<r;o+=3)for(var s=(n[o>>>2]>>>24-o%4*8&255)<<16|(n[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|n[o+2>>>2]>>>24-(o+2)%4*8&255,l=0;l<4&&o+.75*l<r;l++)a.push(i.charAt(s>>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;a.length%4;)a.push(c);return a.join("")},parse:function(e,t=!0){var n=e.length,r=t?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<r.length;o++)a[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var l=e.indexOf(s);-1!==l&&(n=l)}return function(e,t,n){for(var r=[],a=0,o=0;o<t;o++)if(o%4){var s=n[e.charCodeAt(o-1)]<<o%4*2,l=n[e.charCodeAt(o)]>>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return i.create(r,a)}(e,n,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},a.enc.Base64url)},function(e,t,n){var r,i,a,o,s,l;e.exports=(l=n(84),n(940),i=(r=l).lib.WordArray,a=r.algo,o=a.SHA256,s=a.SHA224=o.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=o._createHelper(s),r.HmacSHA224=o._createHmacHelper(s),l.SHA224)},function(e,t,n){var r,i,a,o,s,l,c,u;e.exports=(u=n(84),n(378),n(941),i=(r=u).x64,a=i.Word,o=i.WordArray,s=r.algo,l=s.SHA512,c=s.SHA384=l.extend({_doReset:function(){this._hash=new o.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var e=l._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c),u.SHA384)},function(e,t,n){var r;e.exports=(r=n(84),n(378),function(e){var t=r,n=t.lib,i=n.WordArray,a=n.Hasher,o=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){l[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,a=0;a<24;a++){for(var s=0,d=0,h=0;h<7;h++){if(1&i){var f=(1<<h)-1;f<32?d^=1<<f:s^=1<<f-32}128&i?i=i<<1^113:i<<=1}u[a]=o.create(s,d)}}();var d=[];!function(){for(var e=0;e<25;e++)d[e]=o.create()}();var h=s.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var a=e[t+2*i],o=e[t+2*i+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(x=n[i]).high^=o,x.low^=a}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var f=0,p=0,m=0;m<5;m++)f^=(x=n[h+5*m]).high,p^=x.low;var g=d[h];g.high=f,g.low=p}for(h=0;h<5;h++){var v=d[(h+4)%5],b=d[(h+1)%5],y=b.high,A=b.low;for(f=v.high^(y<<1|A>>>31),p=v.low^(A<<1|y>>>31),m=0;m<5;m++)(x=n[h+5*m]).high^=f,x.low^=p}for(var _=1;_<25;_++){var w=(x=n[_]).high,E=x.low,S=l[_];S<32?(f=w<<S|E>>>32-S,p=E<<S|w>>>32-S):(f=E<<S-32|w>>>64-S,p=w<<S-32|E>>>64-S);var C=d[c[_]];C.high=f,C.low=p}var T=d[0],k=n[0];for(T.high=k.high,T.low=k.low,h=0;h<5;h++)for(m=0;m<5;m++){var x=n[_=h+5*m],O=d[_],I=d[(h+1)%5+5*m],M=d[(h+2)%5+5*m];x.high=O.high^~I.high&M.high,x.low=O.low^~I.low&M.low}x=n[0];var P=u[s];x.high^=P.high,x.low^=P.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),a=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u<l;u++){var d=o[u],h=d.high,f=d.low;h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(h)}return new i.init(c,s)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=a._createHelper(h),t.HmacSHA3=a._createHmacHelper(h)}(Math),r.SHA3)},function(e,t,n){var r;e.exports=(r=n(84),
/** @preserve
	(c) 2012 by Cédric Mesnil. All rights reserved.

	Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

	    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
	    - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	*/
function(e){var t=r,n=t.lib,i=n.WordArray,a=n.Hasher,o=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,f,A,_,w,E,S,C,T,k,x=this._hash.words,O=d.words,I=h.words,M=s.words,P=l.words,D=c.words,N=u.words;for(w=a=x[0],E=o=x[1],S=f=x[2],C=A=x[3],T=_=x[4],n=0;n<80;n+=1)k=a+e[t+M[n]]|0,k+=n<16?p(o,f,A)+O[0]:n<32?m(o,f,A)+O[1]:n<48?g(o,f,A)+O[2]:n<64?v(o,f,A)+O[3]:b(o,f,A)+O[4],k=(k=y(k|=0,D[n]))+_|0,a=_,_=A,A=y(f,10),f=o,o=k,k=w+e[t+P[n]]|0,k+=n<16?b(E,S,C)+I[0]:n<32?v(E,S,C)+I[1]:n<48?g(E,S,C)+I[2]:n<64?m(E,S,C)+I[3]:p(E,S,C)+I[4],k=(k=y(k|=0,N[n]))+T|0,w=T,T=C,C=y(S,10),S=E,E=k;k=x[1]+f+C|0,x[1]=x[2]+A+T|0,x[2]=x[3]+_+w|0,x[3]=x[4]+a+E|0,x[4]=x[0]+o+S|0,x[0]=k},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function b(e,t,n){return e^(t|~n)}function y(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(f),t.HmacRIPEMD160=a._createHmacHelper(f)}(Math),r.RIPEMD160)},function(e,t,n){var r,i,a,o,s,l,c,u,d;e.exports=(d=n(84),n(520),n(521),i=(r=d).lib,a=i.Base,o=i.WordArray,s=r.algo,l=s.SHA1,c=s.HMAC,u=s.PBKDF2=a.extend({cfg:a.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=c.create(n.hasher,e),i=o.create(),a=o.create([1]),s=i.words,l=a.words,u=n.keySize,d=n.iterations;s.length<u;){var h=r.update(t).finalize(a);r.reset();for(var f=h.words,p=f.length,m=h,g=1;g<d;g++){m=r.finalize(m),r.reset();for(var v=m.words,b=0;b<p;b++)f[b]^=v[b]}i.concat(h),l[0]++}return i.sigBytes=4*u,i}}),r.PBKDF2=function(e,t,n){return u.create(n).compute(e,t)},d.PBKDF2)},function(e,t,n){var r;e.exports=(r=n(84),n(135),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var o=0;o<n;o++)e[t+o]^=i[o]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i,r),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,a=e.slice(n,n+i);t.call(this,e,n,i,r),this._prevBlock=a}}),e}(),r.mode.CFB)},function(e,t,n){var r,i,a;e.exports=(a=n(84),n(135),a.mode.CTR=(r=a.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0);var o=a.slice(0);n.encryptBlock(o,0),a[r-1]=a[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=o[s]}}),r.Decryptor=i,r),a.mode.CTR)},function(e,t,n){var r;e.exports=(r=n(84),n(135),
/** @preserve
	 * Counter block mode compatible with  Dr Brian Gladman fileenc.c
	 * derived from CryptoJS.mode.CTR
	 * Jan Hruby jhruby.web@gmail.com
	 */
r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(o);var s=o.slice(0);r.encryptBlock(s,0);for(var l=0;l<i;l++)e[n+l]^=s[l]}});return e.Decryptor=n,e}(),r.mode.CTRGladman)},function(e,t,n){var r,i,a;e.exports=(a=n(84),n(135),a.mode.OFB=(r=a.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,a=this._keystream;i&&(a=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(a,0);for(var o=0;o<r;o++)e[t+o]^=a[o]}}),r.Decryptor=i,r),a.mode.OFB)},function(e,t,n){var r,i;e.exports=(i=n(84),n(135),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),i.mode.ECB)},function(e,t,n){var r;e.exports=(r=n(84),n(135),r.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,a=n+i-1;e.clamp(),e.words[a>>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},function(e,t,n){var r;e.exports=(r=n(84),n(135),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},function(e,t,n){var r;e.exports=(r=n(84),n(135),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},function(e,t,n){var r;e.exports=(r=n(84),n(135),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},function(e,t,n){var r;e.exports=(r=n(84),n(135),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},function(e,t,n){var r,i,a,o;e.exports=(o=n(84),n(135),i=(r=o).lib.CipherParams,a=r.enc.Hex,r.format.Hex={stringify:function(e){return e.ciphertext.toString(a)},parse:function(e){var t=a.parse(e);return i.create({ciphertext:t})}},o.format.Hex)},function(e,t,n){var r;e.exports=(r=n(84),n(271),n(272),n(237),n(135),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],a=[],o=[],s=[],l=[],c=[],u=[],d=[],h=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,a[p]=n;var m=e[n],g=e[m],v=e[g],b=257*e[p]^16843008*p;o[n]=b<<24|b>>>8,s[n]=b<<16|b>>>16,l[n]=b<<8|b>>>24,c[n]=b,b=16843009*v^65537*g^257*m^16843008*n,u[p]=b<<24|b>>>8,d[p]=b<<16|b>>>16,h[p]=b<<8|b>>>24,f[p]=b,n?(n=m^e[e[e[v^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],o=0;o<r;o++)o<n?a[o]=t[o]:(c=a[o-1],o%n?n>6&&o%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[o/n|0]<<24),a[o]=a[o-n]^c);for(var s=this._invKeySchedule=[],l=0;l<r;l++){if(o=r-l,l%4)var c=a[o];else c=a[o-4];s[l]=l<4||o<=4?c:u[i[c>>>24]]^d[i[c>>>16&255]]^h[i[c>>>8&255]]^f[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,d,h,f,a),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,a,o,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],d=e[t+2]^n[2],h=e[t+3]^n[3],f=4,p=1;p<l;p++){var m=r[c>>>24]^i[u>>>16&255]^a[d>>>8&255]^o[255&h]^n[f++],g=r[u>>>24]^i[d>>>16&255]^a[h>>>8&255]^o[255&c]^n[f++],v=r[d>>>24]^i[h>>>16&255]^a[c>>>8&255]^o[255&u]^n[f++],b=r[h>>>24]^i[c>>>16&255]^a[u>>>8&255]^o[255&d]^n[f++];c=m,u=g,d=v,h=b}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^n[f++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[f++],v=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[f++],b=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^n[f++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=b},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},function(e,t,n){var r;e.exports=(r=n(84),n(271),n(272),n(237),n(135),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=o[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){var c=i[a]=[],u=l[a];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var d=this._invSubKeys=[];for(n=0;n<16;n++)d[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],a=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((o^i[l])&u[l])>>>0];this._lBlock=o,this._rBlock=a^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,h.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function f(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=i._createHelper(d);var p=a.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(t)),this._des2=d.createEncryptor(n.create(r)),this._des3=d.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},function(e,t,n){var r;e.exports=(r=n(84),n(271),n(272),n(237),n(135),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var a=0;i<256;i++){var o=i%n,s=t[o>>>2]>>>24-o%4*8&255;a=(a+r[i]+s)%256;var l=r[i];r[i]=r[a],r[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[n],e[n]=a,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var o=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),r.RC4)},function(e,t,n){var r;e.exports=(r=n(84),n(271),n(272),n(237),n(135),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],a=[],o=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var a=t.words,o=a[0],s=a[1],c=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=c>>>16|4294901760&u,h=u<<16|65535&c;for(i[0]^=c,i[1]^=d,i[2]^=u,i[3]^=h,i[4]^=c,i[5]^=d,i[6]^=u,i[7]^=h,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=l^c}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},function(e,t,n){var r;e.exports=(r=n(84),n(271),n(272),n(237),n(135),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],a=[],o=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var a=t.words,o=a[0],s=a[1],c=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=c>>>16|4294901760&u,h=u<<16|65535&c;for(r[0]^=c,r[1]^=d,r[2]^=u,r[3]^=h,r[4]^=c,r[5]^=d,r[6]^=u,r[7]^=h,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=l^c}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},function(e,t,n){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=a(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=o(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),s=0;s<a.length;s++){var l=a[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";(function(e){
/** @license React v16.13.1
 * react-test-renderer.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var t=n(144),r=n(1696),i=n(0),a=n(1698);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;l.hasOwnProperty("ReactCurrentDispatcher")||(l.ReactCurrentDispatcher={current:null}),l.hasOwnProperty("ReactCurrentBatchConfig")||(l.ReactCurrentBatchConfig={suspense:null});var c="function"==typeof Symbol&&Symbol.for,u=c?Symbol.for("react.element"):60103,d=c?Symbol.for("react.portal"):60106,h=c?Symbol.for("react.fragment"):60107,f=c?Symbol.for("react.strict_mode"):60108,p=c?Symbol.for("react.profiler"):60114,m=c?Symbol.for("react.provider"):60109,g=c?Symbol.for("react.context"):60110,v=c?Symbol.for("react.concurrent_mode"):60111,b=c?Symbol.for("react.forward_ref"):60112,y=c?Symbol.for("react.suspense"):60113,A=c?Symbol.for("react.suspense_list"):60120,_=c?Symbol.for("react.memo"):60115,w=c?Symbol.for("react.lazy"):60116,E=c?Symbol.for("react.block"):60121,S="function"==typeof Symbol&&Symbol.iterator;function C(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=S&&e[S]||e["@@iterator"])?e:null}function T(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case h:return"Fragment";case d:return"Portal";case p:return"Profiler";case f:return"StrictMode";case y:return"Suspense";case A:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case g:return"Context.Consumer";case m:return"Context.Provider";case b:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case _:return T(e.type);case E:return T(e.render);case w:if(e=1===e._status?e._result:null)return T(e)}return null}function k(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function x(e){if(k(e)!==e)throw Error(o(188))}function O(e){var t=e.alternate;if(!t){if(null===(t=k(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return x(i),e;if(a===r)return x(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}var I={},M={},P=new WeakMap;function D(e){switch(e.tag){case"INSTANCE":var t=e.rootContainerInstance.createNodeMock;return"object"==typeof(t=t({type:e.type,props:e.props}))&&null!==t&&P.set(t,e),t;default:return e}}function N(e,t){var n=e.children.indexOf(t);-1!==n&&e.children.splice(n,1),e.children.push(t)}function L(e,t,n){var r=e.children.indexOf(t);-1!==r&&e.children.splice(r,1),n=e.children.indexOf(n),e.children.splice(n,0,t)}var R=setTimeout,B=clearTimeout,j=/^(.*)[\\\/]/;function F(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,a=T(e.type);n=null,r&&(n=T(r.type)),r=a,a="",i?a=" (at "+i.fileName.replace(j,"")+":"+i.lineNumber+")":n&&(a=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+a}t+=n,e=e.return}while(e);return t}var U=[],H=-1;function z(e){0>H||(e.current=U[H],U[H]=null,H--)}function V(e,t){H++,U[H]=e.current,e.current=t}var W={},G={current:W},q={current:!1},Y=W;function K(e,t){var n=e.type.contextTypes;if(!n)return W;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function X(e){return null!=(e=e.childContextTypes)}function Q(){z(q),z(G)}function $(e,t,n){if(G.current!==W)throw Error(o(168));V(G,t),V(q,n)}function J(e,n,r){var i=e.stateNode;if(e=n.childContextTypes,"function"!=typeof i.getChildContext)return r;for(var a in i=i.getChildContext())if(!(a in e))throw Error(o(108,T(n)||"Unknown",a));return t({},r,{},i)}function Z(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||W,Y=G.current,V(G,e),V(q,q.current),!0}function ee(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=J(e,t,Y),r.__reactInternalMemoizedMergedChildContext=e,z(q),z(G),V(G,e)):z(q),V(q,n)}var te=a.unstable_runWithPriority,ne=a.unstable_scheduleCallback,re=a.unstable_cancelCallback,ie=a.unstable_requestPaint,ae=a.unstable_now,oe=a.unstable_getCurrentPriorityLevel,se=a.unstable_ImmediatePriority,le=a.unstable_UserBlockingPriority,ce=a.unstable_NormalPriority,ue=a.unstable_LowPriority,de=a.unstable_IdlePriority,he={},fe=a.unstable_shouldYield,pe=void 0!==ie?ie:function(){},me=null,ge=null,ve=!1,be=ae(),ye=1e4>be?ae:function(){return ae()-be};function Ae(){switch(oe()){case se:return 99;case le:return 98;case ce:return 97;case ue:return 96;case de:return 95;default:throw Error(o(332))}}function _e(e){switch(e){case 99:return se;case 98:return le;case 97:return ce;case 96:return ue;case 95:return de;default:throw Error(o(332))}}function we(e,t){return e=_e(e),te(e,t)}function Ee(e,t,n){return e=_e(e),ne(e,t,n)}function Se(e){return null===me?(me=[e],ge=ne(se,Te)):me.push(e),he}function Ce(){if(null!==ge){var e=ge;ge=null,re(e)}Te()}function Te(){if(!ve&&null!==me){ve=!0;var e=0;try{var t=me;we(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),me=null}catch(t){throw null!==me&&(me=me.slice(e+1)),ne(se,Ce),t}finally{ve=!1}}}var ke="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},xe=Object.prototype.hasOwnProperty;function Oe(e,t){if(ke(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!xe.call(t,n[r])||!ke(e[n[r]],t[n[r]]))return!1;return!0}function Ie(e,n){if(e&&e.defaultProps)for(var r in n=t({},n),e=e.defaultProps)void 0===n[r]&&(n[r]=e[r]);return n}var Me={current:null},Pe=null,De=null,Ne=null;function Le(){Ne=De=Pe=null}function Re(e){var t=Me.current;z(Me),e.type._context._currentValue2=t}function Be(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function je(e,t){Pe=e,Ne=De=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(nn=!0),e.firstContext=null)}function Fe(e,t){if(Ne!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Ne=e,t=1073741823),t={context:e,observedBits:t,next:null},null===De){if(null===Pe)throw Error(o(308));De=t,Pe.dependencies={expirationTime:0,firstContext:t,responders:null}}else De=De.next=t;return e._currentValue2}var Ue=!1;function He(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ze(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function Ve(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function We(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function Ge(e,t){var n=e.alternate;null!==n&&ze(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function qe(e,n,r,i){var a=e.updateQueue;Ue=!1;var o=a.baseQueue,s=a.shared.pending;if(null!==s){if(null!==o){var l=o.next;o.next=s.next,s.next=l}o=s,a.shared.pending=null,null!==(l=e.alternate)&&(null!==(l=l.updateQueue)&&(l.baseQueue=s))}if(null!==o){l=o.next;var c=a.baseState,u=0,d=null,h=null,f=null;if(null!==l)for(var p=l;;){if((s=p.expirationTime)<i){var m={expirationTime:p.expirationTime,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null};null===f?(h=f=m,d=c):f=f.next=m,s>u&&(u=s)}else{null!==f&&(f=f.next={expirationTime:1073741823,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null}),Mr(s,p.suspenseConfig);e:{var g=e,v=p;switch(s=n,m=r,v.tag){case 1:if("function"==typeof(g=v.payload)){c=g.call(m,c,s);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(s="function"==typeof(g=v.payload)?g.call(m,c,s):g))break e;c=t({},c,s);break e;case 2:Ue=!0}}null!==p.callback&&(e.effectTag|=32,null===(s=a.effects)?a.effects=[p]:s.push(p))}if(null===(p=p.next)||p===l){if(null===(s=a.shared.pending))break;p=o.next=s.next,s.next=l,a.baseQueue=o=s,a.shared.pending=null}}null===f?d=c:f.next=h,a.baseState=d,a.baseQueue=f,Pr(u),e.expirationTime=u,e.memoizedState=c}}function Ye(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!=typeof r)throw Error(o(191,r));r.call(i)}}}var Ke=l.ReactCurrentBatchConfig,Xe=(new i.Component).refs;function Qe(e,n,r,i){r=null==(r=r(i,n=e.memoizedState))?n:t({},n,r),e.memoizedState=r,0===e.expirationTime&&(e.updateQueue.baseState=r)}var $e={isMounted:function(e){return!!(e=e._reactInternalFiber)&&k(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=yr(),i=Ke.suspense;(i=Ve(r=Ar(r,e,i),i)).payload=t,null!=n&&(i.callback=n),We(e,i),_r(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=yr(),i=Ke.suspense;(i=Ve(r=Ar(r,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),We(e,i),_r(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=yr(),r=Ke.suspense;(r=Ve(n=Ar(n,e,r),r)).tag=2,null!=t&&(r.callback=t),We(e,r),_r(e,n)}};function Je(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!Oe(n,r)||!Oe(i,a))}function Ze(e,t,n){var r=!1,i=W,a=t.contextType;return"object"==typeof a&&null!==a?a=Fe(a):(i=X(t)?Y:G.current,a=(r=null!=(r=t.contextTypes))?K(e,i):W),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=$e,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function et(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$e.enqueueReplaceState(t,t.state,null)}function tt(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Xe,He(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Fe(a):(a=X(t)?Y:G.current,i.context=K(e,a)),qe(e,n,i,r),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Qe(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&$e.enqueueReplaceState(i,i.state,null),qe(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var nt=Array.isArray;function rt(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===Xe&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function it(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function at(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=$r(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=ei(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=rt(e,t,n),r.return=e,r):((r=Jr(n.type,n.key,n.props,null,e.mode,r)).ref=rt(e,t,n),r.return=e,r)}function f(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ti(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function p(e,t,n,r,a){return null===t||7!==t.tag?((t=Zr(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=ei(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case u:return(n=Jr(t.type,t.key,t.props,null,e.mode,n)).ref=rt(e,null,t),n.return=e,n;case d:return(t=ti(t,e.mode,n)).return=e,t}if(nt(t)||C(t))return(t=Zr(t,e.mode,n,null)).return=e,t;it(e,t)}return null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case u:return n.key===i?n.type===h?p(e,t,n.props.children,r,i):c(e,t,n,r):null;case d:return n.key===i?f(e,t,n,r):null}if(nt(n)||C(n))return null!==i?null:p(e,t,n,r,null);it(e,n)}return null}function v(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case u:return e=e.get(null===r.key?n:r.key)||null,r.type===h?p(t,e,r.props.children,i,r.key):c(t,e,r,i);case d:return f(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(nt(r)||C(r))return p(t,e=e.get(n)||null,r,i,null);it(t,r)}return null}function b(i,o,s,l){for(var c=null,u=null,d=o,h=o=0,f=null;null!==d&&h<s.length;h++){d.index>h?(f=d,d=null):f=d.sibling;var p=g(i,d,s[h],l);if(null===p){null===d&&(d=f);break}e&&d&&null===p.alternate&&t(i,d),o=a(p,o,h),null===u?c=p:u.sibling=p,u=p,d=f}if(h===s.length)return n(i,d),c;if(null===d){for(;h<s.length;h++)null!==(d=m(i,s[h],l))&&(o=a(d,o,h),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);h<s.length;h++)null!==(f=v(d,i,h,s[h],l))&&(e&&null!==f.alternate&&d.delete(null===f.key?h:f.key),o=a(f,o,h),null===u?c=f:u.sibling=f,u=f);return e&&d.forEach((function(e){return t(i,e)})),c}function y(i,s,l,c){var u=C(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,h=s,f=s=0,p=null,b=l.next();null!==h&&!b.done;f++,b=l.next()){h.index>f?(p=h,h=null):p=h.sibling;var y=g(i,h,b.value,c);if(null===y){null===h&&(h=p);break}e&&h&&null===y.alternate&&t(i,h),s=a(y,s,f),null===d?u=y:d.sibling=y,d=y,h=p}if(b.done)return n(i,h),u;if(null===h){for(;!b.done;f++,b=l.next())null!==(b=m(i,b.value,c))&&(s=a(b,s,f),null===d?u=b:d.sibling=b,d=b);return u}for(h=r(i,h);!b.done;f++,b=l.next())null!==(b=v(h,i,f,b.value,c))&&(e&&null!==b.alternate&&h.delete(null===b.key?f:b.key),s=a(b,s,f),null===d?u=b:d.sibling=b,d=b);return e&&h.forEach((function(e){return t(i,e)})),u}return function(e,r,a,l){var c="object"==typeof a&&null!==a&&a.type===h&&null===a.key;c&&(a=a.props.children);var f="object"==typeof a&&null!==a;if(f)switch(a.$$typeof){case u:e:{for(f=a.key,c=r;null!==c;){if(c.key===f){switch(c.tag){case 7:if(a.type===h){n(e,c.sibling),(r=i(c,a.props.children)).return=e,e=r;break e}break;default:if(c.elementType===a.type){n(e,c.sibling),(r=i(c,a.props)).ref=rt(e,c,a),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}a.type===h?((r=Zr(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=Jr(a.type,a.key,a.props,null,e.mode,l)).ref=rt(e,r,a),l.return=e,e=l)}return s(e);case d:e:{for(c=a.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=i(r,a.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=ti(a,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,a)).return=e,e=r):(n(e,r),(r=ei(a,e.mode,l)).return=e,e=r),s(e);if(nt(a))return b(e,r,a,l);if(C(a))return y(e,r,a,l);if(f&&it(e,a),void 0===a&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(o(152,e.displayName||e.name||"Component"))}return n(e,r)}}var ot=at(!0),st=at(!1),lt={},ct={current:lt},ut={current:lt},dt={current:lt};function ht(e){if(e===lt)throw Error(o(174));return e}function ft(e,t){V(dt,t),V(ut,e),V(ct,lt),z(ct),V(ct,I)}function pt(){z(ct),z(ut),z(dt)}function mt(e){ht(dt.current),ht(ct.current)!==I&&(V(ut,e),V(ct,I))}function gt(e){ut.current===e&&(z(ct),z(ut))}var vt={current:0};function bt(e){for(var t=e;null!==t;){if(13===t.tag){var n,r=t.memoizedState;if(n=null!==r){if(!(r=null===r.dehydrated))throw Error(o(305));if(!r)throw Error(o(305));n=r}if(n)return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function yt(e,t){return{responder:e,props:t}}var At=l.ReactCurrentDispatcher,_t=l.ReactCurrentBatchConfig,wt=0,Et=null,St=null,Ct=null,Tt=!1;function kt(){throw Error(o(321))}function xt(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ke(e[n],t[n]))return!1;return!0}function Ot(e,t,n,r,i,a){if(wt=a,Et=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,At.current=null===e||null===e.memoizedState?Jt:Zt,e=n(r,i),t.expirationTime===wt){a=0;do{if(t.expirationTime=0,!(25>a))throw Error(o(301));a+=1,Ct=St=null,t.updateQueue=null,At.current=en,e=n(r,i)}while(t.expirationTime===wt)}if(At.current=$t,t=null!==St&&null!==St.next,wt=0,Ct=St=Et=null,Tt=!1,t)throw Error(o(300));return e}function It(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ct?Et.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function Mt(){if(null===St){var e=Et.alternate;e=null!==e?e.memoizedState:null}else e=St.next;var t=null===Ct?Et.memoizedState:Ct.next;if(null!==t)Ct=t,St=e;else{if(null===e)throw Error(o(310));e={memoizedState:(St=e).memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},null===Ct?Et.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Pt(e,t){return"function"==typeof t?t(e):t}function Dt(e){var t=Mt(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=St,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=a=null,c=i;do{var u=c.expirationTime;if(u<wt){var d={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,u>Et.expirationTime&&(Et.expirationTime=u,Pr(u))}else null!==l&&(l=l.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),Mr(u,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==i);null===l?a=r:l.next=s,ke(r,t.memoizedState)||(nn=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Nt(e){var t=Mt(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);ke(a,t.memoizedState)||(nn=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Lt(e){var t=It();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e}).dispatch=Qt.bind(null,Et,e),[t.memoizedState,e]}function Rt(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Et.updateQueue)?(t={lastEffect:null},Et.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Bt(){return Mt().memoizedState}function jt(e,t,n,r){var i=It();Et.effectTag|=e,i.memoizedState=Rt(1|t,n,void 0,void 0===r?null:r)}function Ft(e,t,n,r){var i=Mt();r=void 0===r?null:r;var a=void 0;if(null!==St){var o=St.memoizedState;if(a=o.destroy,null!==r&&xt(r,o.deps))return void Rt(t,n,a,r)}Et.effectTag|=e,i.memoizedState=Rt(1|t,n,a,r)}function Ut(e,t){return jt(516,4,e,t)}function Ht(e,t){return Ft(516,4,e,t)}function zt(e,t){return Ft(4,2,e,t)}function Vt(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Wt(e,t,n){return n=null!=n?n.concat([e]):null,Ft(4,2,Vt.bind(null,t,e),n)}function Gt(){}function qt(e,t){return It().memoizedState=[e,void 0===t?null:t],e}function Yt(e,t){var n=Mt();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xt(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Kt(e,t){var n=Mt();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xt(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xt(e,t,n){var r=Ae();we(98>r?98:r,(function(){e(!0)})),we(97<r?97:r,(function(){var r=_t.suspense;_t.suspense=void 0===t?null:t;try{e(!1),n()}finally{_t.suspense=r}}))}function Qt(e,t,n){var r=yr(),i=Ke.suspense;i={expirationTime:r=Ar(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===Et||null!==a&&a===Et)Tt=!0,i.expirationTime=wt,Et.expirationTime=wt;else{if(0===e.expirationTime&&(null===a||0===a.expirationTime)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.eagerReducer=a,i.eagerState=s,ke(s,o))return}catch(e){}_r(e,r)}}var $t={readContext:Fe,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useResponder:kt,useDeferredValue:kt,useTransition:kt},Jt={readContext:Fe,useCallback:qt,useContext:Fe,useEffect:Ut,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,jt(4,2,Vt.bind(null,t,e),n)},useLayoutEffect:function(e,t){return jt(4,2,e,t)},useMemo:function(e,t){var n=It();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=It();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Qt.bind(null,Et,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},It().memoizedState=e},useState:Lt,useDebugValue:Gt,useResponder:yt,useDeferredValue:function(e,t){var n=Lt(e),r=n[0],i=n[1];return Ut((function(){var n=_t.suspense;_t.suspense=void 0===t?null:t;try{i(e)}finally{_t.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Lt(!1),n=t[0];return t=t[1],[qt(Xt.bind(null,t,e),[t,e]),n]}},Zt={readContext:Fe,useCallback:Yt,useContext:Fe,useEffect:Ht,useImperativeHandle:Wt,useLayoutEffect:zt,useMemo:Kt,useReducer:Dt,useRef:Bt,useState:function(){return Dt(Pt)},useDebugValue:Gt,useResponder:yt,useDeferredValue:function(e,t){var n=Dt(Pt),r=n[0],i=n[1];return Ht((function(){var n=_t.suspense;_t.suspense=void 0===t?null:t;try{i(e)}finally{_t.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Dt(Pt),n=t[0];return t=t[1],[Yt(Xt.bind(null,t,e),[t,e]),n]}},en={readContext:Fe,useCallback:Yt,useContext:Fe,useEffect:Ht,useImperativeHandle:Wt,useLayoutEffect:zt,useMemo:Kt,useReducer:Nt,useRef:Bt,useState:function(){return Nt(Pt)},useDebugValue:Gt,useResponder:yt,useDeferredValue:function(e,t){var n=Nt(Pt),r=n[0],i=n[1];return Ht((function(){var n=_t.suspense;_t.suspense=void 0===t?null:t;try{i(e)}finally{_t.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Nt(Pt),n=t[0];return t=t[1],[Yt(Xt.bind(null,t,e),[t,e]),n]}},tn=l.ReactCurrentOwner,nn=!1;function rn(e,t,n,r){t.child=null===e?st(t,null,n,r):ot(t,e.child,n,r)}function an(e,t,n,r,i){n=n.render;var a=t.ref;return je(t,i),r=Ot(e,t,n,r,a,i),null===e||nn?(t.effectTag|=1,rn(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),_n(e,t,i))}function on(e,t,n,r,i,a){if(null===e){var o=n.type;return"function"!=typeof o||Qr(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Jr(n.type,null,r,null,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,sn(e,t,o,r,i,a))}return o=e.child,i<a&&(i=o.memoizedProps,(n=null!==(n=n.compare)?n:Oe)(i,r)&&e.ref===t.ref)?_n(e,t,a):(t.effectTag|=1,(e=$r(o,r)).ref=t.ref,e.return=t,t.child=e)}function sn(e,t,n,r,i,a){return null!==e&&Oe(e.memoizedProps,r)&&e.ref===t.ref&&(nn=!1,i<a)?(t.expirationTime=e.expirationTime,_n(e,t,a)):cn(e,t,n,r,a)}function ln(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function cn(e,t,n,r,i){var a=X(n)?Y:G.current;return a=K(t,a),je(t,i),n=Ot(e,t,n,r,a,i),null===e||nn?(t.effectTag|=1,rn(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),_n(e,t,i))}function un(e,t,n,r,i){if(X(n)){var a=!0;Z(t)}else a=!1;if(je(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Ze(t,n,r),tt(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;"object"==typeof c&&null!==c?c=Fe(c):c=K(t,c=X(n)?Y:G.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==c)&&et(t,o,r,c),Ue=!1;var h=t.memoizedState;o.state=h,qe(t,r,o,i),l=t.memoizedState,s!==r||h!==l||q.current||Ue?("function"==typeof u&&(Qe(t,n,u,r),l=t.memoizedState),(s=Ue||Je(t,n,s,r,h,l,c))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.effectTag|=4)):("function"==typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=s):("function"==typeof o.componentDidMount&&(t.effectTag|=4),r=!1)}else o=t.stateNode,ze(e,t),s=t.memoizedProps,o.props=t.type===t.elementType?s:Ie(t.type,s),l=o.context,"object"==typeof(c=n.contextType)&&null!==c?c=Fe(c):c=K(t,c=X(n)?Y:G.current),(d="function"==typeof(u=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==c)&&et(t,o,r,c),Ue=!1,l=t.memoizedState,o.state=l,qe(t,r,o,i),h=t.memoizedState,s!==r||l!==h||q.current||Ue?("function"==typeof u&&(Qe(t,n,u,r),h=t.memoizedState),(u=Ue||Je(t,n,s,r,l,h,c))?(d||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,c),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,c)),"function"==typeof o.componentDidUpdate&&(t.effectTag|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=c,r=u):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),r=!1);return dn(e,t,n,r,a,i)}function dn(e,t,n,r,i,a){ln(e,t);var o=0!=(64&t.effectTag);if(!r&&!o)return i&&ee(t,n,!1),_n(e,t,a);r=t.stateNode,tn.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&o?(t.child=ot(t,e.child,null,a),t.child=ot(t,null,s,a)):rn(e,t,s,a),t.memoizedState=r.state,i&&ee(t,n,!0),t.child}function hn(e){var t=e.stateNode;t.pendingContext?$(0,t.pendingContext,t.pendingContext!==t.context):t.context&&$(0,t.context,!1),ft(e,t.containerInfo)}var fn,pn,mn,gn={dehydrated:null,retryTime:0};function vn(e,t,n){var r,i=t.mode,a=t.pendingProps,o=vt.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&o)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(o|=1),V(vt,1&o),null===e){if(s){if(s=a.fallback,(a=Zr(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(n=Zr(s,i,n,null)).return=t,a.sibling=n,t.memoizedState=gn,t.child=a,n}return i=a.children,t.memoizedState=null,t.child=st(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(a=a.fallback,(n=$r(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=$r(i,a)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=gn,t.child=n,i}return n=ot(t,e.child,a.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=a.fallback,(a=Zr(null,i,0,null)).return=t,a.child=e,null!==e&&(e.return=a),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(n=Zr(s,i,n,null)).return=t,a.sibling=n,n.effectTag|=2,a.childExpirationTime=0,t.memoizedState=gn,t.child=a,n}return t.memoizedState=null,t.child=ot(t,e,a.children,n)}function bn(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),Be(e.return,t)}function yn(e,t,n,r,i,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailExpiration=0,o.tailMode=i,o.lastEffect=a)}function An(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(rn(e,t,r.children,n),0!=(2&(r=vt.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&bn(e,n);else if(19===e.tag)bn(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(V(vt,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===bt(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),yn(t,!1,i,n,a,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===bt(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}yn(t,!0,n,null,a,t.lastEffect);break;case"together":yn(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function _n(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&Pr(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=$r(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$r(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function wn(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function En(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return X(t.type)&&Q(),null;case 3:return pt(),z(q),z(G),(e=t.stateNode).pendingContext&&(e.context=e.pendingContext,e.pendingContext=null),null;case 5:gt(t);var i=ht(dt.current);if(n=t.type,null!==e&&null!=t.stateNode)pn(e,t,0,r),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}ht(ct.current),fn(e={type:n,props:r,isHidden:!1,children:[],internalInstanceHandle:t,rootContainerInstance:i,tag:"INSTANCE"},t),t.stateNode=e,null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)mn(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));ht(dt.current),ht(ct.current),t.stateNode={text:r,isHidden:!1,tag:"TEXT"}}return null;case 13:if(z(vt),r=t.memoizedState,0!=(64&t.effectTag))return t.expirationTime=n,t;if(r=null!==r,i=!1,null!==e&&(i=null!==(n=e.memoizedState),!r&&null!==n&&null!==(n=e.child.sibling))){var a=t.firstEffect;null!==a?(t.firstEffect=n,n.nextEffect=a):(t.firstEffect=t.lastEffect=n,n.nextEffect=null),n.effectTag=8}return r&&!i&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&vt.current)?er===Yn&&(er=Kn):(er!==Yn&&er!==Kn||(er=Xn),0!==ar&&null!==$n&&(ii($n,Zn),ai($n,ar)))),(r||i)&&(t.effectTag|=4),null;case 4:return pt(),null;case 10:return Re(t),null;case 17:return X(t.type)&&Q(),null;case 19:if(z(vt),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(a=r.rendering)){if(i)wn(r,!1);else if(er!==Yn||null!==e&&0!=(64&e.effectTag))for(e=t.child;null!==e;){if(null!==(a=bt(e))){for(t.effectTag|=64,wn(r,!1),null!==(e=a.updateQueue)&&(t.updateQueue=e,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,e=n,r=t.child;null!==r;)n=e,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(a=i.alternate)?(i.childExpirationTime=0,i.expirationTime=n,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=a.childExpirationTime,i.expirationTime=a.expirationTime,i.child=a.child,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,n=a.dependencies,i.dependencies=null===n?null:{expirationTime:n.expirationTime,firstContext:n.firstContext,responders:n.responders}),r=r.sibling;return V(vt,1&vt.current|2),t.child}e=e.sibling}}else{if(!i)if(null!==(e=bt(a))){if(t.effectTag|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.effectTag|=4),wn(r,!0),null===r.tail&&"hidden"===r.tailMode&&!a.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*ye()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,wn(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=r.last)?e.sibling=a:t.child=a,r.last=a)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=ye()+500),e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=ye(),e.sibling=null,t=vt.current,V(vt,i?1&t|2:1&t),e):null}throw Error(o(156,t.tag))}function Sn(e){switch(e.tag){case 1:X(e.type)&&Q();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(pt(),z(q),z(G),0!=(64&(t=e.effectTag)))throw Error(o(285));return e.effectTag=-4097&t|64,e;case 5:return gt(e),null;case 13:return z(vt),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return z(vt),null;case 4:return pt(),null;case 10:return Re(e),null;default:return null}}function Cn(e,t){return{value:e,source:t,stack:F(t)}}fn=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag){var r=e,i=n.stateNode,a=r.children.indexOf(i);-1!==a&&r.children.splice(a,1),r.children.push(i)}else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},pn=function(e,t,n,r){e.memoizedProps!==r&&(ht(ct.current),t.updateQueue=M)&&(t.effectTag|=4)},mn=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var Tn="function"==typeof WeakSet?WeakSet:Set;function kn(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=F(n)),null!==n&&T(n.type),t=t.value,null!==e&&1===e.tag&&T(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function xn(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Wr(e,t)}else t.current=null}function On(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ie(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(o(163))}function In(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function Mn(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Pn(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void Mn(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Ie(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&Ye(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=D(n.child.stateNode);break;case 1:e=n.child.stateNode}Ye(n,t,e)}return;case 5:case 6:case 4:case 12:case 13:return;case 19:case 17:case 20:case 21:return}throw Error(o(163))}function Dn(e,t,n){switch("function"==typeof Kr&&Kr(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;we(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){Wr(i,e)}}e=e.next}while(e!==r)}))}break;case 1:xn(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Wr(e,t)}}(t,n);break;case 5:xn(t);break;case 4:Bn(e,t,n)}}function Nn(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&Nn(t)}function Ln(e){return 5===e.tag||3===e.tag||4===e.tag}function Rn(e){e:{for(var t=e.return;null!==t;){if(Ln(t)){var n=t;break e}t=t.return}throw Error(o(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.effectTag&&(n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Ln(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,a=5===i||6===i;if(a)t=a?t.stateNode:t.stateNode.instance,n?L(r,t,n):N(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,a=5===i||6===i;if(a)t=a?t.stateNode:t.stateNode.instance,n?L(r,t,n):N(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function Bn(e,t,n){for(var r,i=t,a=!1;;){if(!a){a=i.return;e:for(;;){if(null===a)throw Error(o(160));switch(r=a.stateNode,a.tag){case 5:break e;case 3:case 4:r=r.containerInfo;break e}a=a.return}a=!0}if(5===i.tag||6===i.tag){e:for(var s=e,l=i,c=n,u=l;;)if(Dn(s,u,c),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===l)break e;for(;null===u.sibling;){if(null===u.return||u.return===l)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}l=(s=r).children.indexOf(i.stateNode),s.children.splice(l,1)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,i.child.return=i,i=i.child;continue}}else if(Dn(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function jn(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void In(3,t);case 1:return;case 5:if(null!=(e=t.stateNode)){var n=t.memoizedProps,r=t.type,i=t.updateQueue;t.updateQueue=null,null!==i&&(e.type=r,e.props=n)}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.text=t.memoizedProps);case 3:case 12:return;case 13:if(e=t,null===t.memoizedState?n=!1:(n=!0,e=t.child,sr=ye()),null!==e)e:for(r=e;;){if(5===r.tag)i=r.stateNode,n?i.isHidden=!0:r.stateNode.isHidden=!1;else if(6===r.tag)r.stateNode.isHidden=!!n;else{if(13===r.tag&&null!==r.memoizedState&&null===r.memoizedState.dehydrated){(i=r.child.sibling).return=r,r=i;continue}if(null!==r.child){r.child.return=r,r=r.child;continue}}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}return void Fn(t);case 19:return void Fn(t);case 17:return}throw Error(o(163))}function Fn(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Tn),t.forEach((function(t){var r=qr.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var Un="function"==typeof WeakMap?WeakMap:Map;function Hn(e,t,n){(n=Ve(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){cr||(cr=!0,ur=r),kn(e,t)},n}function zn(e,t,n){(n=Ve(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return kn(e,t),r(i)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===dr?dr=new Set([this]):dr.add(this),kn(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Vn,Wn=Math.ceil,Gn=l.ReactCurrentDispatcher,qn=l.ReactCurrentOwner,Yn=0,Kn=3,Xn=4,Qn=0,$n=null,Jn=null,Zn=0,er=Yn,tr=null,nr=1073741823,rr=1073741823,ir=null,ar=0,or=!1,sr=0,lr=null,cr=!1,ur=null,dr=null,hr=!1,fr=null,pr=90,mr=null,gr=0,vr=null,br=0;function yr(){return 0!=(48&Qn)?1073741821-(ye()/10|0):0!==br?br:br=1073741821-(ye()/10|0)}function Ar(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Ae();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Qn))return Zn;if(null!==n)e=1073741821-25*(1+((1073741821-e+(0|n.timeoutMs||5e3)/10)/25|0));else switch(r){case 99:e=1073741823;break;case 98:e=1073741821-10*(1+((1073741821-e+15)/10|0));break;case 97:case 96:e=1073741821-25*(1+((1073741821-e+500)/25|0));break;case 95:e=2;break;default:throw Error(o(326))}return null!==$n&&e===Zn&&--e,e}function _r(e,t){if(50<gr)throw gr=0,vr=null,Error(o(185));if(null!==(e=wr(e,t))){var n=Ae();1073741823===t?0!=(8&Qn)&&0==(48&Qn)?Tr(e):(Sr(e),0===Qn&&Ce()):Sr(e),0==(4&Qn)||98!==n&&99!==n||(null===mr?mr=new Map([[e,t]]):(void 0===(n=mr.get(e))||n>t)&&mr.set(e,t))}}function wr(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&($n===i&&(Pr(t),er===Xn&&ii(i,Zn)),ai(i,t)),i}function Er(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!ri(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Sr(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Se(Tr.bind(null,e));else{var t=Er(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=yr();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==he&&re(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Se(Tr.bind(null,e)):Ee(r,Cr.bind(null,e),{timeout:10*(1073741821-t)-ye()}),e.callbackNode=t}}}function Cr(e,t){if(br=0,t){t=yr();var n=e.lastExpiredTime;return(0===n||n>t)&&(e.lastExpiredTime=t),Sr(e),null}if(0!==(n=Er(e))){if(t=e.callbackNode,0!=(48&Qn))throw Error(o(327));if(Hr(),e===$n&&n===Zn||xr(e,n),null!==Jn){var r=Qn;Qn|=16;for(var i=Ir();;)try{Nr();break}catch(t){Or(e,t)}if(Le(),Qn=r,Gn.current=i,1===er)throw t=tr,xr(e,n),ii(e,n),Sr(e),t;if(null===Jn)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=er,$n=null,r){case Yn:case 1:throw Error(o(345));case 2:n=2<n?2:n,(0===(r=e.lastExpiredTime)||r>n)&&(e.lastExpiredTime=n);break;case Kn:if(ii(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Br(i)),1073741823===nr&&10<(i=sr+500-ye())){if(or){var a=e.lastPingedTime;if(0===a||a>=n){e.lastPingedTime=n,xr(e,n);break}}if(0!==(a=Er(e))&&a!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=R(jr.bind(null,e),i);break}jr(e);break;case Xn:if(ii(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Br(i)),or&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,xr(e,n);break}if(0!==(i=Er(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==rr?r=10*(1073741821-rr)-ye():1073741823===nr?r=0:(r=10*(1073741821-nr)-5e3,0>(r=(i=ye())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wn(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=R(jr.bind(null,e),r);break}jr(e);break;case 5:if(1073741823!==nr&&null!==ir){a=nr;var s=ir;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(a=ye()-(10*(1073741821-a)-(0|s.timeoutMs||5e3)))<=i?0:i+r-a),10<r){ii(e,n),e.timeoutHandle=R(jr.bind(null,e),r);break}}jr(e);break;default:throw Error(o(329))}if(Sr(e),e.callbackNode===t)return Cr.bind(null,e)}}return null}function Tr(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Qn))throw Error(o(327));if(Hr(),e===$n&&t===Zn||xr(e,t),null!==Jn){var n=Qn;Qn|=16;for(var r=Ir();;)try{Dr();break}catch(t){Or(e,t)}if(Le(),Qn=n,Gn.current=r,1===er)throw n=tr,xr(e,t),ii(e,t),Sr(e),n;if(null!==Jn)throw Error(o(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,$n=null,jr(e),Sr(e)}return null}function kr(e,t){var n=Qn;Qn|=1;try{return e(t)}finally{0===(Qn=n)&&Ce()}}function xr(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,B(n)),null!==Jn)for(n=Jn.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&Q();break;case 3:pt(),z(q),z(G);break;case 5:gt(r);break;case 4:pt();break;case 13:case 19:z(vt);break;case 10:Re(r)}n=n.return}$n=e,Jn=$r(e.current,null),Zn=t,er=Yn,tr=null,rr=nr=1073741823,ir=null,ar=0,or=!1}function Or(e,t){for(;;){try{if(Le(),At.current=$t,Tt)for(var n=Et.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(wt=0,Ct=St=Et=null,Tt=!1,null===Jn||null===Jn.return)return er=1,tr=t,Jn=null;e:{var i=e,a=Jn.return,o=Jn,s=t;if(t=Zn,o.effectTag|=2048,o.firstEffect=o.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var l=s;if(0==(2&o.mode)){var c=o.alternate;c?(o.updateQueue=c.updateQueue,o.memoizedState=c.memoizedState,o.expirationTime=c.expirationTime):(o.updateQueue=null,o.memoizedState=null)}var u=0!=(1&vt.current),d=a;do{var h;if(h=13===d.tag){var f=d.memoizedState;if(null!==f)h=null!==f.dehydrated;else{var p=d.memoizedProps;h=void 0!==p.fallback&&(!0!==p.unstable_avoidThisFallback||!u)}}if(h){var m=d.updateQueue;if(null===m){var g=new Set;g.add(l),d.updateQueue=g}else m.add(l);if(0==(2&d.mode)){if(d.effectTag|=64,o.effectTag&=-2981,1===o.tag)if(null===o.alternate)o.tag=17;else{var v=Ve(1073741823,null);v.tag=2,We(o,v)}o.expirationTime=1073741823;break e}s=void 0,o=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new Un,s=new Set,b.set(l,s)):void 0===(s=b.get(l))&&(s=new Set,b.set(l,s)),!s.has(o)){s.add(o);var y=Gr.bind(null,i,l,o);l.then(y,y)}d.effectTag|=4096,d.expirationTime=t;break e}d=d.return}while(null!==d);s=Error((T(o.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+F(o))}5!==er&&(er=2),s=Cn(s,o),d=a;do{switch(d.tag){case 3:l=s,d.effectTag|=4096,d.expirationTime=t,Ge(d,Hn(d,l,t));break e;case 1:l=s;var A=d.type,_=d.stateNode;if(0==(64&d.effectTag)&&("function"==typeof A.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===dr||!dr.has(_)))){d.effectTag|=4096,d.expirationTime=t,Ge(d,zn(d,l,t));break e}}d=d.return}while(null!==d)}Jn=Rr(Jn)}catch(e){t=e;continue}break}}function Ir(){var e=Gn.current;return Gn.current=$t,null===e?$t:e}function Mr(e,t){e<nr&&2<e&&(nr=e),null!==t&&e<rr&&2<e&&(rr=e,ir=t)}function Pr(e){e>ar&&(ar=e)}function Dr(){for(;null!==Jn;)Jn=Lr(Jn)}function Nr(){for(;null!==Jn&&!fe();)Jn=Lr(Jn)}function Lr(e){var t=Vn(e.alternate,e,Zn);return e.memoizedProps=e.pendingProps,null===t&&(t=Rr(e)),qn.current=null,t}function Rr(e){Jn=e;do{var t=Jn.alternate;if(e=Jn.return,0==(2048&Jn.effectTag)){if(t=En(t,Jn,Zn),1===Zn||1!==Jn.childExpirationTime){for(var n=0,r=Jn.child;null!==r;){var i=r.expirationTime,a=r.childExpirationTime;i>n&&(n=i),a>n&&(n=a),r=r.sibling}Jn.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Jn.firstEffect),null!==Jn.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Jn.firstEffect),e.lastEffect=Jn.lastEffect),1<Jn.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Jn:e.firstEffect=Jn,e.lastEffect=Jn))}else{if(null!==(t=Sn(Jn)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Jn.sibling))return t;Jn=e}while(null!==Jn);return er===Yn&&(er=5),null}function Br(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function jr(e){var t=Ae();return we(99,Fr.bind(null,e,t)),null}function Fr(e,t){do{Hr()}while(null!==fr);if(0!=(48&Qn))throw Error(o(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=Br(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===$n&&(Jn=$n=null,Zn=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var a=Qn;Qn|=32,qn.current=null,lr=i;do{try{Ur()}catch(e){if(null===lr)throw Error(o(330));Wr(lr,e),lr=lr.nextEffect}}while(null!==lr);lr=i;do{try{for(var s=e,l=t;null!==lr;){var c=lr.effectTag;if(128&c){var u=lr.alternate;if(null!==u){var d=u.ref;null!==d&&("function"==typeof d?d(null):d.current=null)}}switch(1038&c){case 2:Rn(lr),lr.effectTag&=-3;break;case 6:Rn(lr),lr.effectTag&=-3,jn(lr.alternate,lr);break;case 1024:lr.effectTag&=-1025;break;case 1028:lr.effectTag&=-1025,jn(lr.alternate,lr);break;case 4:jn(lr.alternate,lr);break;case 8:var h=lr;Bn(s,h,l),Nn(h)}lr=lr.nextEffect}}catch(e){if(null===lr)throw Error(o(330));Wr(lr,e),lr=lr.nextEffect}}while(null!==lr);e.current=n,lr=i;do{try{for(c=e;null!==lr;){var f=lr.effectTag;if(36&f&&Pn(c,lr.alternate,lr),128&f){u=void 0;var p=lr.ref;if(null!==p){var m=lr.stateNode;switch(lr.tag){case 5:u=D(m);break;default:u=m}"function"==typeof p?p(u):p.current=u}}lr=lr.nextEffect}}catch(e){if(null===lr)throw Error(o(330));Wr(lr,e),lr=lr.nextEffect}}while(null!==lr);lr=null,pe(),Qn=a}else e.current=n;if(hr)hr=!1,fr=e,pr=t;else for(lr=i;null!==lr;)t=lr.nextEffect,lr.nextEffect=null,lr=t;if(0===(t=e.firstPendingTime)&&(dr=null),1073741823===t?e===vr?gr++:(gr=0,vr=e):gr=0,"function"==typeof Yr&&Yr(n.stateNode,r),Sr(e),cr)throw cr=!1,e=ur,ur=null,e;return 0!=(8&Qn)?null:(Ce(),null)}function Ur(){for(;null!==lr;){var e=lr.effectTag;0!=(256&e)&&On(lr.alternate,lr),0==(512&e)||hr||(hr=!0,Ee(97,(function(){return Hr(),null}))),lr=lr.nextEffect}}function Hr(){if(90!==pr){var e=97<pr?97:pr;return pr=90,we(e,zr)}}function zr(){if(null===fr)return!1;var e=fr;if(fr=null,0!=(48&Qn))throw Error(o(331));var t=Qn;for(Qn|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:In(5,n),Mn(5,n)}}catch(t){if(null===e)throw Error(o(330));Wr(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Qn=t,Ce(),!0}function Vr(e,t,n){We(e,t=Hn(e,t=Cn(n,t),1073741823)),null!==(e=wr(e,1073741823))&&Sr(e)}function Wr(e,t){if(3===e.tag)Vr(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Vr(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===dr||!dr.has(r))){We(n,e=zn(n,e=Cn(t,e),1073741823)),null!==(n=wr(n,1073741823))&&Sr(n);break}}n=n.return}}function Gr(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),$n===e&&Zn===n?er===Xn||er===Kn&&1073741823===nr&&ye()-sr<500?xr(e,Zn):or=!0:ri(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Sr(e)))}function qr(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Ar(t=yr(),e,null)),null!==(e=wr(e,t))&&Sr(e)}Vn=function(e,t,n){var r=t.expirationTime;if(null!==e)if(e.memoizedProps!==t.pendingProps||q.current)nn=!0;else{if(r<n){switch(nn=!1,t.tag){case 3:hn(t);break;case 5:mt(t);break;case 1:X(t.type)&&Z(t);break;case 4:ft(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;V(Me,i._currentValue2),i._currentValue2=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?vn(e,t,n):(V(vt,1&vt.current),null!==(t=_n(e,t,n))?t.sibling:null);V(vt,1&vt.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return An(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),V(vt,vt.current),!r)return null}return _n(e,t,n)}nn=!1}else nn=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=K(t,G.current),je(t,n),i=Ot(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,X(r)){var a=!0;Z(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,He(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&Qe(t,r,s,e),i.updater=$e,t.stateNode=i,i._reactInternalFiber=t,tt(t,r,e,n),t=dn(null,t,r,!0,a,n)}else t.tag=0,rn(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,a=t.tag=function(e){if("function"==typeof e)return Qr(e)?1:0;if(null!=e){if((e=e.$$typeof)===b)return 11;if(e===_)return 14}return 2}(i),e=Ie(i,e),a){case 0:t=cn(null,t,i,e,n);break e;case 1:t=un(null,t,i,e,n);break e;case 11:t=an(null,t,i,e,n);break e;case 14:t=on(null,t,i,Ie(i.type,e),r,n);break e}throw Error(o(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,cn(e,t,r,i=t.elementType===r?i:Ie(r,i),n);case 1:return r=t.type,i=t.pendingProps,un(e,t,r,i=t.elementType===r?i:Ie(r,i),n);case 3:if(hn(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));return r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ze(e,t),qe(t,r,null,n),(r=t.memoizedState.element)===i?t=_n(e,t,n):(rn(e,t,r,n),t=t.child),t;case 5:return mt(t),r=t.pendingProps.children,ln(e,t),rn(e,t,r,n),t=t.child;case 6:return null;case 13:return vn(e,t,n);case 4:return ft(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ot(t,null,r,n):rn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,an(e,t,r,i=t.elementType===r?i:Ie(r,i),n);case 7:return rn(e,t,t.pendingProps,n),t.child;case 8:case 12:return rn(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value;var l=t.type._context;if(V(Me,l._currentValue2),l._currentValue2=a,null!==s)if(l=s.value,0===(a=ke(l,a)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,a):1073741823))){if(s.children===i.children&&!q.current){t=_n(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&a)){1===l.tag&&((u=Ve(n,null)).tag=2,We(l,u)),l.expirationTime<n&&(l.expirationTime=n),null!==(u=l.alternate)&&u.expirationTime<n&&(u.expirationTime=n),Be(l.return,n),c.expirationTime<n&&(c.expirationTime=n);break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}rn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(a=t.pendingProps).children,je(t,n),r=r(i=Fe(i,a.unstable_observedBits)),t.effectTag|=1,rn(e,t,r,n),t.child;case 14:return a=Ie(i=t.type,t.pendingProps),on(e,t,i,a=Ie(i.type,a),r,n);case 15:return sn(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ie(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,X(r)?(e=!0,Z(t)):e=!1,je(t,n),Ze(t,r,i),tt(t,r,i,n),dn(null,t,r,!0,e,n);case 19:return An(e,t,n)}throw Error(o(156,t.tag))};var Yr=null,Kr=null;function Xr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Qr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function $r(e,t){var n=e.alternate;return null===n?((n=new Xr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Jr(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)Qr(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case h:return Zr(n.children,i,a,t);case v:s=8,i|=7;break;case f:s=8,i|=1;break;case p:return(e=new Xr(12,n,t,8|i)).elementType=p,e.type=p,e.expirationTime=a,e;case y:return(e=new Xr(13,n,t,i)).type=y,e.elementType=y,e.expirationTime=a,e;case A:return(e=new Xr(19,n,t,i)).elementType=A,e.expirationTime=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case m:s=10;break e;case g:s=9;break e;case b:s=11;break e;case _:s=14;break e;case w:s=16,r=null;break e;case E:s=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=new Xr(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=a,t}function Zr(e,t,n,r){return(e=new Xr(7,e,r,t)).expirationTime=n,e}function ei(e,t,n){return(e=new Xr(6,e,null,t)).expirationTime=n,e}function ti(e,t,n){return(t=new Xr(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ni(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function ri(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function ii(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function ai(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}var oi=null;function si(e,t,n,r){var i=t.current,a=yr(),s=Ke.suspense;a=Ar(a,i,s);e:if(n){t:{if(k(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(o(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(X(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(o(171))}if(1===n.tag){var c=n.type;if(X(c)){n=J(n,c,l);break e}}n=l}else n=W;return null===t.context?t.context=n:t.pendingContext=n,(t=Ve(a,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),We(i,t),_r(i,a),a}var li=l.IsSomeRendererActing,ci="function"==typeof a.unstable_flushAllWithoutAsserting,ui=a.unstable_flushAllWithoutAsserting||function(){for(var e=!1;Hr();)e=!0;return e};function di(t){try{ui(),function(t){if(null===oi)try{var n=("require"+Math.random()).slice(0,7);oi=(e&&e[n])("timers").setImmediate}catch(e){oi=function(e){var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}oi(t)}((function(){ui()?di(t):t()}))}catch(e){t(e)}}var hi=0,fi=!1,pi=function(){return null};function mi(e){if(e.isHidden)return null;switch(e.tag){case"TEXT":return e.text;case"INSTANCE":var t=e.props,n=["children"];if(null==t)t={};else{var r,i={},a=Object.keys(t);for(r=0;r<a.length;r++){var o=a[r];0<=n.indexOf(o)||(i[o]=t[o])}t=i}if(n=null,e.children&&e.children.length)for(i=0;i<e.children.length;i++)null!==(a=mi(e.children[i]))&&(null===n?n=[a]:n.push(a));return e={type:e.type,props:t,children:n},Object.defineProperty(e,"$$typeof",{value:Symbol.for("react.test.json")}),e;default:throw Error("Unexpected node type in toJSON: "+e.tag)}}function gi(e){return e?0===(e=vi(e)).length?null:1===e.length?yi(e[0]):bi(e.map(yi)):null}function vi(e){for(var t=[];null!=e;)t.push(e),e=e.sibling;return t}function bi(e){var t=[];for(e=[{i:0,array:e}];e.length;)for(var n=e.pop();n.i<n.array.length;){var r=n.array[n.i];if(n.i+=1,Array.isArray(r)){e.push(n),e.push({i:0,array:r});break}t.push(r)}return t}function yi(e){if(null==e)return null;switch(e.tag){case 3:case 4:return gi(e.child);case 1:return{nodeType:"component",type:e.type,props:t({},e.memoizedProps),instance:e.stateNode,rendered:gi(e.child)};case 0:case 15:return{nodeType:"component",type:e.type,props:t({},e.memoizedProps),instance:null,rendered:gi(e.child)};case 22:return{nodeType:"block",type:e.type,props:t({},e.memoizedProps),instance:null,rendered:gi(e.child)};case 5:return{nodeType:"host",type:e.type,props:t({},e.memoizedProps),instance:null,rendered:bi(vi(e.child).map(yi))};case 6:return e.stateNode.text;case 7:case 10:case 9:case 8:case 12:case 11:case 14:case 17:case 21:return gi(e.child);default:throw Error(o(214,e.tag))}}var Ai=new Set([0,1,5,11,14,15,22,3]);function _i(e){var t=[],n=e;if(null===n.child)return t;n.child.return=n,n=n.child;e:for(;;){var r=!1;if(Ai.has(n.tag)?t.push(Oi(n)):6===n.tag?t.push(""+n.memoizedProps):r=!0,r&&null!==n.child)n.child.return=n,n=n.child;else{for(;null===n.sibling;){if(n.return===e)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}}return t}var wi=function(){function e(e){if(!Ai.has(e.tag))throw Error(o(225,e.tag));this._fiber=e}var t=e.prototype;return t._currentFiber=function(){var e=O(this._fiber);if(null===e)throw Error(o(224));return e},t.find=function(e){return Si(this.findAll(e,{deep:!1}),"matching custom predicate: "+e.toString())},t.findByType=function(e){return Si(this.findAllByType(e,{deep:!1}),'with node type: "'+(e.displayName||e.name)+'"')},t.findByProps=function(e){return Si(this.findAllByProps(e,{deep:!1}),"with props: "+JSON.stringify(e))},t.findAll=function(e){return Ei(this,e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:null)},t.findAllByType=function(e){return Ei(this,(function(t){return t.type===e}),1<arguments.length&&void 0!==arguments[1]?arguments[1]:null)},t.findAllByProps=function(e){return Ei(this,(function(t){var n;if(n=t.props)e:{for(var r in e)if(t.props[r]!==e[r]){n=!1;break e}n=!0}return n}),1<arguments.length&&void 0!==arguments[1]?arguments[1]:null)},function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(e,[{key:"instance",get:function(){return 5===this._fiber.tag?D(this._fiber.stateNode):this._fiber.stateNode}},{key:"type",get:function(){return this._fiber.type}},{key:"props",get:function(){return this._currentFiber().memoizedProps}},{key:"parent",get:function(){for(var e=this._fiber.return;null!==e;){if(Ai.has(e.tag)){if(3===e.tag&&2>_i(e).length)break;return Oi(e)}e=e.return}return null}},{key:"children",get:function(){return _i(this._currentFiber())}}]),e}();function Ei(e,t,n){var r=!n||n.deep,i=[];return t(e)&&(i.push(e),!r)?i:(e.children.forEach((function(e){"string"!=typeof e&&i.push.apply(i,Ei(e,t,n))})),i)}function Si(e,t){if(1===e.length)return e[0];throw Error((0===e.length?"No instances found ":"Expected 1 but found "+e.length+" instances ")+t)}var Ci,Ti,ki={_Scheduler:r,create:function(e,t){var n=pi,i=!1;"object"==typeof t&&null!==t&&("function"==typeof t.createNodeMock&&(n=t.createNodeMock),!0===t.unstable_isConcurrent&&(i=!0));var a={children:[],createNodeMock:n,tag:"CONTAINER"},s=function(e,t,n){return e=new ni(e,t,n),t=new Xr(3,null,null,2===t?7:1===t?3:0),e.current=t,t.stateNode=e,He(t),e}(a,i?2:0,!1);if(null==s)throw Error(o(215));return si(e,s,null,null),e={_Scheduler:r,root:void 0,toJSON:function(){if(null==s||null==s.current||null==a||0===a.children.length)return null;if(1===a.children.length)return mi(a.children[0]);if(2===a.children.length&&!0===a.children[0].isHidden&&!1===a.children[1].isHidden)return mi(a.children[1]);var e=null;if(a.children&&a.children.length)for(var t=0;t<a.children.length;t++){var n=mi(a.children[t]);null!==n&&(null===e?e=[n]:e.push(n))}return e},toTree:function(){return null==s||null==s.current?null:yi(s.current)},update:function(e){null!=s&&null!=s.current&&si(e,s,null,null)},unmount:function(){null!=s&&null!=s.current&&(si(null,s,null,null),s=a=null)},getInstance:function(){if(null==s||null==s.current)return null;e:{var e=s.current;if(e.child)switch(e.child.tag){case 5:e=D(e.child.stateNode);break e;default:e=e.child.stateNode}else e=null}return e},unstable_flushSync:function(e){e:{if(0!=(48&Qn))throw Error(o(187));var t=Qn;Qn|=1;try{var n=we(99,e.bind(null,void 0));break e}finally{Qn=t,Ce()}n=void 0}return n}},Object.defineProperty(e,"root",{configurable:!0,enumerable:!0,get:function(){if(null===s)throw Error("Can't access .root on unmounted test renderer");var e=_i(s.current);if(0===e.length)throw Error("Can't access .root on unmounted test renderer");return 1===e.length?e[0]:Oi(s.current)}}),e},unstable_batchedUpdates:kr,act:function(e){function t(){hi--,li.current=n}!1===fi&&(fi=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),hi++;var n=li.current;li.current=!0;try{var r=kr(e)}catch(e){throw t(),e}if(null!==r&&"object"==typeof r&&"function"==typeof r.then)return{then:function(e,i){r.then((function(){1<hi||!0===ci&&!0===n?(t(),e()):di((function(n){t(),n?i(n):e()}))}),(function(e){t(),i(e)}))}};try{1!==hi||!1!==ci&&!1!==n||ui(),t()}catch(e){throw t(),e}return{then:function(e){e()}}}},xi=new WeakMap;function Oi(e){var t=xi.get(e);return void 0===t&&null!==e.alternate&&(t=xi.get(e.alternate)),void 0===t&&(t=new wi(e),xi.set(e,t)),t}Ti=(Ci={findFiberByHostInstance:function(){throw Error("TestRenderer does not support findFiberByHostInstance()")},bundleType:0,version:"16.13.1",rendererPackageName:"react-test-renderer"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Yr=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Kr=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(t({},Ci,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=function(e){if(!(e=O(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Ti?Ti(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),e.exports=ki.default||ki}).call(this,n(256)(e))},function(e,t,n){"use strict";e.exports=n(1697)},function(e,t,n){"use strict";
/** @license React v0.19.1
 * scheduler-unstable_mock.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r=0,i=null,a=null,o=-1,s=null,l=-1,c=!1,u=!1,d=!1,h=!1;function f(){return!!(-1!==l&&null!==s&&s.length>=l||h&&d)&&(c=!0)}function p(){if(u)throw Error("Already flushing work.");if(null===i)return!1;var e=i;u=!0;try{var t=!0;do{t=e(!0,r)}while(t);return t||(i=null),!0}finally{u=!1}}function m(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<b(i,t)))break e;e[r]=t,e[n]=i,n=r}}function g(e){return void 0===(e=e[0])?null:e}function v(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],s=a+1,l=e[s];if(void 0!==o&&0>b(o,n))void 0!==l&&0>b(l,o)?(e[r]=l,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==l&&0>b(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function b(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var y=[],A=[],_=1,w=null,E=3,S=!1,C=!1,T=!1;function k(e){for(var t=g(A);null!==t;){if(null===t.callback)v(A);else{if(!(t.startTime<=e))break;v(A),t.sortIndex=t.expirationTime,m(y,t)}t=g(A)}}function x(e){if(T=!1,k(e),!C)if(null!==g(y))C=!0,i=O;else{var t=g(A);null!==t&&(e=t.startTime-e,a=x,o=r+e)}}function O(e,t){C=!1,T&&(T=!1,a=null,o=-1),S=!0;var n=E;try{for(k(t),w=g(y);null!==w&&(!(w.expirationTime>t)||e&&!f());){var i=w.callback;if(null!==i){w.callback=null,E=w.priorityLevel;var s=i(w.expirationTime<=t);t=r,"function"==typeof s?w.callback=s:w===g(y)&&v(y),k(t)}else v(y);w=g(y)}if(null!==w)var l=!0;else{var c=g(A);if(null!==c){var u=c.startTime-t;a=x,o=r+u}l=!1}return l}finally{w=null,E=n,S=!1}}function I(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_advanceTime=function(e){r+=e,null!==a&&o<=r&&(a(r),o=-1,a=null)},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_clearYields=function(){if(null===s)return[];var e=s;return s=null,e},t.unstable_continueExecution=function(){C||S||(C=!0,i=O)},t.unstable_flushAll=function(){if(null!==s)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");if(p(),null!==s)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])")},t.unstable_flushAllWithoutAsserting=p,t.unstable_flushExpired=function(){if(u)throw Error("Already flushing work.");if(null!==i){u=!0;try{i(!1,r)||(i=null)}finally{u=!1}}},t.unstable_flushNumberOfYields=function(e){if(u)throw Error("Already flushing work.");if(null!==i){var t=i;l=e,u=!0;try{e=!0;do{e=t(!0,r)}while(e&&!c);e||(i=null)}finally{l=-1,u=c=!1}}},t.unstable_flushUntilNextPaint=function(){if(u)throw Error("Already flushing work.");if(null!==i){var e=i;h=!0,d=!1,u=!0;try{var t=!0;do{t=e(!0,r)}while(t&&!c);t||(i=null)}finally{u=c=h=!1}}},t.unstable_forceFrameRate=function(){},t.unstable_getCurrentPriorityLevel=function(){return E},t.unstable_getFirstCallbackNode=function(){return g(y)},t.unstable_next=function(e){switch(E){case 1:case 2:case 3:var t=3;break;default:t=E}var n=E;E=t;try{return e()}finally{E=n}},t.unstable_now=function(){return r},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){d=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=E;E=e;try{return t()}finally{E=n}},t.unstable_scheduleCallback=function(e,t,n){var s=r;if("object"==typeof n&&null!==n){var l=n.delay;l="number"==typeof l&&0<l?s+l:s,n="number"==typeof n.timeout?n.timeout:I(e)}else n=I(e),l=s;return e={id:_++,callback:t,priorityLevel:e,startTime:l,expirationTime:n=l+n,sortIndex:-1},l>s?(e.sortIndex=l,m(A,e),null===g(y)&&e===g(A)&&(T?(a=null,o=-1):T=!0,a=x,o=r+(l-s))):(e.sortIndex=n,m(y,e),C||S||(C=!0,i=O)),e},t.unstable_shouldYield=function(){var e=r;k(e);var t=g(y);return t!==w&&null!==w&&null!==t&&null!==t.callback&&t.startTime<=e&&t.expirationTime<w.expirationTime||f()},t.unstable_wrapCallback=function(e){var t=E;return function(){var n=E;E=t;try{return e.apply(this,arguments)}finally{E=n}}},t.unstable_yieldValue=function(e){null===s?s=[e]:s.push(e)}},function(e,t,n){"use strict";e.exports=n(1699)},function(e,t,n){"use strict";
/** @license React v0.19.1
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r,i,a,o,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,c=null,u=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(u,0),e}},d=Date.now();t.unstable_now=function(){return Date.now()-d},r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(u,0))},i=function(e,t){c=setTimeout(e,t)},a=function(){clearTimeout(c)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var h=window.performance,f=window.Date,p=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof h&&"function"==typeof h.now)t.unstable_now=function(){return h.now()};else{var v=f.now();t.unstable_now=function(){return f.now()-v}}var b=!1,y=null,A=-1,_=5,w=0;o=function(){return t.unstable_now()>=w},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):_=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,S=E.port2;E.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+_;try{y(!0,e)?S.postMessage(null):(b=!1,y=null)}catch(e){throw S.postMessage(null),e}}else b=!1},r=function(e){y=e,b||(b=!0,S.postMessage(null))},i=function(e,n){A=p((function(){e(t.unstable_now())}),n)},a=function(){m(A),A=-1}}function C(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<x(i,t)))break e;e[r]=t,e[n]=i,n=r}}function T(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],s=a+1,l=e[s];if(void 0!==o&&0>x(o,n))void 0!==l&&0>x(l,o)?(e[r]=l,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==l&&0>x(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function x(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],I=[],M=1,P=null,D=3,N=!1,L=!1,R=!1;function B(e){for(var t=T(I);null!==t;){if(null===t.callback)k(I);else{if(!(t.startTime<=e))break;k(I),t.sortIndex=t.expirationTime,C(O,t)}t=T(I)}}function j(e){if(R=!1,B(e),!L)if(null!==T(O))L=!0,r(F);else{var t=T(I);null!==t&&i(j,t.startTime-e)}}function F(e,n){L=!1,R&&(R=!1,a()),N=!0;var r=D;try{for(B(n),P=T(O);null!==P&&(!(P.expirationTime>n)||e&&!o());){var s=P.callback;if(null!==s){P.callback=null,D=P.priorityLevel;var l=s(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?P.callback=l:P===T(O)&&k(O),B(n)}else k(O);P=T(O)}if(null!==P)var c=!0;else{var u=T(I);null!==u&&i(j,u.startTime-n),c=!1}return c}finally{P=null,D=r,N=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var H=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||N||(L=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_getFirstCallbackNode=function(){return T(O)},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=H,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var l=o.delay;l="number"==typeof l&&0<l?s+l:s,o="number"==typeof o.timeout?o.timeout:U(e)}else o=U(e),l=s;return e={id:M++,callback:n,priorityLevel:e,startTime:l,expirationTime:o=l+o,sortIndex:-1},l>s?(e.sortIndex=l,C(I,e),null===T(O)&&e===T(I)&&(R?a():R=!0,i(j,l-s))):(e.sortIndex=o,C(O,e),L||N||(L=!0,r(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();B(e);var n=T(O);return n!==P&&null!==P&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<P.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}}},function(e,t,n){"use strict";var r=n(141),i=n(944);e.exports=function(){var e=i();return r(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e}},function(e,t,n){"use strict";var r=n(107),i=r("%Array%"),a=r("%Symbol.species%",!0),o=r("%TypeError%"),s=n(522),l=n(524),c=n(1704),u=n(1705),d=n(201);e.exports=function(e,t){if(!u(t)||t<0)throw new o("Assertion failed: length must be an integer >= 0");var n,r=0===t?0:t;if(l(e)&&(n=s(e,"constructor"),a&&"Object"===d(n)&&null===(n=s(n,a))&&(n=void 0)),void 0===n)return i(r);if(!c(n))throw new o("C must be a constructor");return new n(r)}},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e&&!!e.prototype}},function(e,t,n){"use strict";var r=n(107)("%Math%"),i=r.floor,a=r.abs,o=n(525),s=n(946);e.exports=function(e){if("number"!=typeof e||o(e)||!s(e))return!1;var t=a(e);return i(t)===t}},function(e,t,n){"use strict";var r=n(107)("%TypeError%"),i=n(947),a=n(1707),o=n(1708),s=n(522),l=n(1719),c=n(524),u=n(951),d=n(953);e.exports=function e(t,n,h,f,p){var m;arguments.length>5&&(m=arguments[5]);for(var g=f,v=0;v<h;){var b=d(v),y=l(n,b);if(!0===y){var A=s(n,b);if(void 0!==m){if(arguments.length<=6)throw new r("Assertion failed: thisArg is required when mapperFunction is provided");A=a(m,arguments[6],[A,v,n])}var _=!1;if(p>0&&(_=c(A)),_){var w=u(s(A,"length"));g=e(t,A,w,g,p-1)}else{if(g>=i)throw new r("index too large");o(t,d(g),A),g+=1}}v+=1}return g}},function(e,t,n){"use strict";var r=n(107)("%TypeError%"),i=n(523),a=n(526);e.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!a(e))throw new r(i(e)+" is not a function");return e.apply(t,n)}},function(e,t,n){"use strict";var r=n(107)("%TypeError%"),i=n(1709),a=n(318),o=n(201);e.exports=function(e,t,n){if("Object"!==o(e))throw new r("Assertion failed: Type(O) is not Object");if(!a(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=i(e,t,n);if(!s)throw new r("unable to create data property");return s}},function(e,t,n){"use strict";var r=n(107)("%TypeError%"),i=n(1710),a=n(1711),o=n(1712),s=n(1716),l=n(1717),c=n(318),u=n(1718),d=n(201);e.exports=function(e,t,n){if("Object"!==d(e))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var h=o(e,t),f=h||l(e);return!(h&&(!h.writable||!h.configurable)||!f)&&i(s,u,a,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":n,"[[Writable]]":!0})}},function(e,t,n){"use strict";var r=n(107)("%Object.defineProperty%",!0);if(r)try{r({},"a",{value:1})}catch(e){r=null}var i=n(238)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,n,a,o,s){if(!r){if(!e(s))return!1;if(!s["[[Configurable]]"]||!s["[[Writable]]"])return!1;if(o in a&&i(a,o)!==!!s["[[Enumerable]]"])return!1;var l=s["[[Value]]"];return a[o]=l,t(a[o],l)}return r(a,o,n(s)),!0}},function(e,t,n){"use strict";var r=n(948),i=n(201);e.exports=function(e){if(void 0===e)return e;r(i,"Property Descriptor","Desc",e);var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=e["[[Configurable]]"]),t}},function(e,t,n){"use strict";var r=n(107),i=n(1713),a=r("%TypeError%"),o=n(238)("Object.prototype.propertyIsEnumerable"),s=n(156),l=n(524),c=n(318),u=n(1714),d=n(1715),h=n(201);e.exports=function(e,t){if("Object"!==h(e))throw new a("Assertion failed: O must be an Object");if(!c(t))throw new a("Assertion failed: P must be a Property Key");if(s(e,t)){if(!i){var n=l(e)&&"length"===t,r=u(e)&&"lastIndex"===t;return{"[[Configurable]]":!(n||r),"[[Enumerable]]":o(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return d(i(e,t))}}},function(e,t,n){"use strict";var r=n(107)("%Object.getOwnPropertyDescriptor%");if(r)try{r([],"length")}catch(e){r=null}e.exports=r},function(e,t,n){"use strict";var r=n(107)("%Symbol.match%",!0),i=n(459),a=n(949);e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(r){var t=e[r];if(void 0!==t)return a(t)}return i(e)}},function(e,t,n){"use strict";var r=n(156),i=n(107)("%TypeError%"),a=n(201),o=n(949),s=n(526);e.exports=function(e){if("Object"!==a(e))throw new i("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=o(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=o(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=o(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!s(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var l=e.set;if(void 0!==l&&!s(l))throw new i("setter must be a function");t["[[Set]]"]=l}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new i("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},function(e,t,n){"use strict";var r=n(156),i=n(948),a=n(201);e.exports=function(e){return void 0!==e&&(i(a,"Property Descriptor","Desc",e),!(!r(e,"[[Value]]")&&!r(e,"[[Writable]]")))}},function(e,t,n){"use strict";var r=n(107)("%Object%"),i=n(950),a=r.preventExtensions,o=r.isExtensible;e.exports=a?function(e){return!i(e)&&o(e)}:function(e){return!i(e)}},function(e,t,n){"use strict";var r=n(525);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},function(e,t,n){"use strict";var r=n(107)("%TypeError%"),i=n(318),a=n(201);e.exports=function(e,t){if("Object"!==a(e))throw new r("Assertion failed: `O` must be an Object");if(!i(t))throw new r("Assertion failed: `P` must be a Property Key");return t in e}},function(e,t,n){"use strict";var r=n(107)("%Math%"),i=n(1721),a=n(525),o=n(946),s=n(1722),l=r.floor,c=r.abs;e.exports=function(e){var t=i(e);return a(t)?0:0!==t&&o(t)?s(t)*l(c(t)):t}},function(e,t,n){"use strict";e.exports=function(e){return+e}},function(e,t,n){"use strict";e.exports=function(e){return e>=0?1:-1}},function(e,t,n){"use strict";var r=n(107),i=r("%TypeError%"),a=r("%Number%"),o=r("%RegExp%"),s=r("%parseInt%"),l=n(238),c=n(1724),u=n(950),d=l("String.prototype.slice"),h=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),p=c(/^[-+]0x[0-9a-f]+$/i),m=c(new o("["+["","​","￾"].join("")+"]","g")),g=["\t\n\v\f\r   ᠎    ","         　\u2028","\u2029\ufeff"].join(""),v=new RegExp("(^["+g+"]+)|(["+g+"]+$)","g"),b=l("String.prototype.replace"),y=n(1725);e.exports=function e(t){var n=u(t)?t:y(t,a);if("symbol"==typeof n)throw new i("Cannot convert a Symbol value to a number");if("string"==typeof n){if(h(n))return e(s(d(n,2),2));if(f(n))return e(s(d(n,2),8));if(m(n)||p(n))return NaN;var r=function(e){return b(e,v,"")}(n);if(r!==n)return e(r)}return a(n)}},function(e,t,n){"use strict";var r=n(107)("RegExp.prototype.test"),i=n(265);e.exports=function(e){return i(r,e)}},function(e,t,n){"use strict";var r=n(1726);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,i=n(1727),a=n(527),o=n(774),s=n(1728),l=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,o,s="string"===t?["toString","valueOf"]:["valueOf","toString"];for(o=0;o<s.length;++o)if(n=e[s[o]],a(n)&&(r=n.call(e),i(r)))return r;throw new TypeError("No default value")},c=function(e,t){var n=e[t];if(null!=n){if(!a(n))throw new TypeError(n+" returned for property "+t+" of object "+e+" is not a function");return n}};e.exports=function(e){if(i(e))return e;var t,n="default";if(arguments.length>1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=c(e,Symbol.toPrimitive):s(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(e,n);if(i(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(o(e)||s(e))&&(n="string"),l(e,"default"===n?"number":n)}},function(e,t,n){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(770)()){var i=Symbol.prototype.toString,a=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&a.test(i.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},function(e,t,n){"use strict";var r=n(107)("%Object%"),i=n(528);e.exports=function(e){return i(e),r(e)}},function(e,t,n){"use strict";var r=n(141),i=n(955);e.exports=function(){var e=i();return r(Array.prototype,{flat:e},{flat:function(){return Array.prototype.flat!==e}}),e}},function(e,t,n){(function(e,n){var r="[object Arguments]",i="[object Map]",a="[object Object]",o="[object Set]",s=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[r]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c[i]=c["[object Number]"]=c[a]=c["[object RegExp]"]=c[o]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")(),f=t&&!t.nodeType&&t,p=f&&"object"==typeof n&&n&&!n.nodeType&&n,m=p&&p.exports===f,g=m&&u.process,v=function(){try{return g&&g.binding&&g.binding("util")}catch(e){}}(),b=v&&v.isTypedArray;function y(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function A(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function _(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var w,E,S,C=Array.prototype,T=Function.prototype,k=Object.prototype,x=h["__core-js_shared__"],O=T.toString,I=k.hasOwnProperty,M=(w=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",P=k.toString,D=RegExp("^"+O.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=m?h.Buffer:void 0,L=h.Symbol,R=h.Uint8Array,B=k.propertyIsEnumerable,j=C.splice,F=L?L.toStringTag:void 0,U=Object.getOwnPropertySymbols,H=N?N.isBuffer:void 0,z=(E=Object.keys,S=Object,function(e){return E(S(e))}),V=ve(h,"DataView"),W=ve(h,"Map"),G=ve(h,"Promise"),q=ve(h,"Set"),Y=ve(h,"WeakMap"),K=ve(Object,"create"),X=_e(V),Q=_e(W),$=_e(G),J=_e(q),Z=_e(Y),ee=L?L.prototype:void 0,te=ee?ee.valueOf:void 0;function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ie;++t<n;)this.add(e[t])}function oe(e){var t=this.__data__=new re(e);this.size=t.size}function se(e,t){var n=Se(e),r=!n&&Ee(e),i=!n&&!r&&Ce(e),a=!n&&!r&&!i&&Ie(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!I.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ae(c,l))||s.push(c);return s}function le(e,t){for(var n=e.length;n--;)if(we(e[n][0],t))return n;return-1}function ce(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=I.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var i=P.call(e);r&&(t?e[F]=n:delete e[F]);return i}(e):function(e){return P.call(e)}(e)}function ue(e){return Oe(e)&&ce(e)==r}function de(e,t,n,s,l){return e===t||(null==e||null==t||!Oe(e)&&!Oe(t)?e!=e&&t!=t:function(e,t,n,s,l,c){var u=Se(e),d=Se(t),h=u?"[object Array]":ye(e),f=d?"[object Array]":ye(t),p=(h=h==r?a:h)==a,m=(f=f==r?a:f)==a,g=h==f;if(g&&Ce(e)){if(!Ce(t))return!1;u=!0,p=!1}if(g&&!p)return c||(c=new oe),u||Ie(e)?pe(e,t,n,s,l,c):function(e,t,n,r,a,s,l){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new R(e),new R(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return we(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case i:var c=A;case o:var u=1&r;if(c||(c=_),e.size!=t.size&&!u)return!1;var d=l.get(e);if(d)return d==t;r|=2,l.set(e,t);var h=pe(c(e),c(t),r,a,s,l);return l.delete(e),h;case"[object Symbol]":if(te)return te.call(e)==te.call(t)}return!1}(e,t,h,n,s,l,c);if(!(1&n)){var v=p&&I.call(e,"__wrapped__"),b=m&&I.call(t,"__wrapped__");if(v||b){var y=v?e.value():e,w=b?t.value():t;return c||(c=new oe),l(y,w,n,s,c)}}if(!g)return!1;return c||(c=new oe),function(e,t,n,r,i,a){var o=1&n,s=me(e),l=s.length,c=me(t).length;if(l!=c&&!o)return!1;var u=l;for(;u--;){var d=s[u];if(!(o?d in t:I.call(t,d)))return!1}var h=a.get(e);if(h&&a.get(t))return h==t;var f=!0;a.set(e,t),a.set(t,e);var p=o;for(;++u<l;){d=s[u];var m=e[d],g=t[d];if(r)var v=o?r(g,m,d,t,e,a):r(m,g,d,e,t,a);if(!(void 0===v?m===g||i(m,g,n,r,a):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var b=e.constructor,y=t.constructor;b!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y)&&(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,s,l,c)}(e,t,n,s,de,l))}function he(e){return!(!xe(e)||function(e){return!!M&&M in e}(e))&&(Te(e)?D:s).test(_e(e))}function fe(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||k,t!==r)return z(e);var t,n,r,i=[];for(var a in Object(e))I.call(e,a)&&"constructor"!=a&&i.push(a);return i}function pe(e,t,n,r,i,a){var o=1&n,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var u=-1,d=!0,h=2&n?new ae:void 0;for(a.set(e,t),a.set(t,e);++u<s;){var f=e[u],p=t[u];if(r)var m=o?r(p,f,u,t,e,a):r(f,p,u,e,t,a);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!y(t,(function(e,t){if(o=t,!h.has(o)&&(f===e||i(f,e,n,r,a)))return h.push(t);var o}))){d=!1;break}}else if(f!==p&&!i(f,p,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function me(e){return function(e,t,n){var r=t(e);return Se(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Me,be)}function ge(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ve(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}ne.prototype.clear=function(){this.__data__=K?K(null):{},this.size=0},ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ne.prototype.get=function(e){var t=this.__data__;if(K){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return I.call(t,e)?t[e]:void 0},ne.prototype.has=function(e){var t=this.__data__;return K?void 0!==t[e]:I.call(t,e)},ne.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=K&&void 0===t?"__lodash_hash_undefined__":t,this},re.prototype.clear=function(){this.__data__=[],this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=le(t,e);return!(n<0)&&(n==t.length-1?t.pop():j.call(t,n,1),--this.size,!0)},re.prototype.get=function(e){var t=this.__data__,n=le(t,e);return n<0?void 0:t[n][1]},re.prototype.has=function(e){return le(this.__data__,e)>-1},re.prototype.set=function(e,t){var n=this.__data__,r=le(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(W||re),string:new ne}},ie.prototype.delete=function(e){var t=ge(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return ge(this,e).get(e)},ie.prototype.has=function(e){return ge(this,e).has(e)},ie.prototype.set=function(e,t){var n=ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ae.prototype.add=ae.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ae.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.clear=function(){this.__data__=new re,this.size=0},oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},oe.prototype.get=function(e){return this.__data__.get(e)},oe.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof re){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ie(r)}return n.set(e,t),this.size=n.size,this};var be=U?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(U(e),(function(t){return B.call(e,t)})))}:function(){return[]},ye=ce;function Ae(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||l.test(e))&&e>-1&&e%1==0&&e<t}function _e(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function we(e,t){return e===t||e!=e&&t!=t}(V&&"[object DataView]"!=ye(new V(new ArrayBuffer(1)))||W&&ye(new W)!=i||G&&"[object Promise]"!=ye(G.resolve())||q&&ye(new q)!=o||Y&&"[object WeakMap]"!=ye(new Y))&&(ye=function(e){var t=ce(e),n=t==a?e.constructor:void 0,r=n?_e(n):"";if(r)switch(r){case X:return"[object DataView]";case Q:return i;case $:return"[object Promise]";case J:return o;case Z:return"[object WeakMap]"}return t});var Ee=ue(function(){return arguments}())?ue:function(e){return Oe(e)&&I.call(e,"callee")&&!B.call(e,"callee")},Se=Array.isArray;var Ce=H||function(){return!1};function Te(e){if(!xe(e))return!1;var t=ce(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==typeof e}var Ie=b?function(e){return function(t){return e(t)}}(b):function(e){return Oe(e)&&ke(e.length)&&!!c[ce(e)]};function Me(e){return null!=(t=e)&&ke(t.length)&&!Te(t)?se(e):fe(e);var t}n.exports=function(e,t){return de(e,t)}}).call(this,n(68),n(256)(e))},function(e,t,n){"use strict";var r=n(959),i=n(141);e.exports=function(){var e=r();return i(Object,{entries:e},{entries:function(){return Object.entries!==e}}),e}},function(e,t,n){"use strict";var r=n(141).supportsDescriptors,i=n(961)(),a=n(962),o=Object.defineProperty,s=TypeError;e.exports=function(){var e=a();if(i)return e;if(!r)throw new s("Shimming Function.prototype.name support requires ES5 property descriptor support.");var t=Function.prototype;return o(t,"name",{configurable:!0,enumerable:!1,get:function(){var n=e.call(this);return this!==t&&o(this,"name",{configurable:!0,enumerable:!1,value:n,writable:!1}),n}}),e}},function(e,t,n){"use strict";var r=n(265),i=n(141),a=n(963),o=n(964),s=n(1735),l=r(o());i(l,{getPolyfill:o,implementation:a,shim:s}),e.exports=l},function(e,t,n){"use strict";var r=n(141),i=n(964);e.exports=function(){var e=i();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.root=t.parseHTML=t.merge=t.contains=void 0;var r=n(216);r.__exportStar(n(1737),t),r.__exportStar(n(965),t);var i=n(965);t.default=i.load([]);var a=r.__importStar(n(319));t.contains=a.contains,t.merge=a.merge,t.parseHTML=a.parseHTML,t.root=a.root},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var i={equals:"",element:"~",start:"^",end:"$",any:"*",not:"!",hyphen:"|"},a=new Set(r(r([],Object.keys(i).map((function(e){return i[e]})).filter(Boolean),!0),[":","[","]"," ","\\","(",")","'"],!1));function o(e){return e.map(s).join(", ")}function s(e){return e.map(l).join("")}function l(e){switch(e.type){case"child":return" > ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return u(e.namespace)+"*";case"tag":return c(e);case"pseudo-element":return"::"+d(e.name);case"pseudo":return null===e.data?":"+d(e.name):"string"==typeof e.data?":"+d(e.name)+"("+d(e.data)+")":":"+d(e.name)+"("+o(e.data)+")";case"attribute":if("id"===e.name&&"equals"===e.action&&!e.ignoreCase&&!e.namespace)return"#"+d(e.value);if("class"===e.name&&"element"===e.action&&!e.ignoreCase&&!e.namespace)return"."+d(e.value);var t=c(e);return"exists"===e.action?"["+t+"]":"["+t+i[e.action]+"='"+d(e.value)+"'"+(e.ignoreCase?"i":!1===e.ignoreCase?"s":"")+"]"}}function c(e){return""+u(e.namespace)+d(e.name)}function u(e){return null!==e?("*"===e?"*":d(e))+"|":""}function d(e){return e.split("").map((function(e){return a.has(e)?"\\"+e:e})).join("")}t.default=o},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(380)),l=n(972),c=n(1741),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);var d=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(e,t){void 0===t&&(t={});for(var n=("length"in e?e:[e]),r="",i=0;i<n.length;i++)r+=f(n[i],t);return r}function f(e,t){switch(e.type){case s.Root:return h(e.children,t);case s.Directive:case s.Doctype:return"<"+e.data+">";case s.Comment:return function(e){return"\x3c!--"+e.data+"--\x3e"}(e);case s.CDATA:return function(e){return"<![CDATA["+e.children[0].data+"]]>"}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=c.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&p.has(e.parent.name)&&(t=r(r({},t),{xmlMode:!1})));!t.xmlMode&&m.has(e.name)&&(t=r(r({},t),{xmlMode:"foreign"}));var i="<"+e.name,a=function(e,t){if(e)return Object.keys(e).map((function(n){var r,i,a=null!==(r=e[n])&&void 0!==r?r:"";return"foreign"===t.xmlMode&&(n=null!==(i=c.attributeNames.get(n))&&void 0!==i?i:n),t.emptyAttrs||t.xmlMode||""!==a?n+'="'+(!1!==t.decodeEntities?l.encodeXML(a):a.replace(/"/g,"&quot;"))+'"':n})).join(" ")}(e.attribs,t);a&&(i+=" "+a);0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=h(e.children,t)),!t.xmlMode&&d.has(e.name)||(i+="</"+e.name+">"));return i}(e,t);case s.Text:return function(e,t){var n=e.data||"";!1===t.decodeEntities||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=l.encodeXML(n));return n}(e,t)}}t.default=h;var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},function(e){e.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var r=n(274),i=[];function a(e){var t;return null!==(t=e.children)&&void 0!==t?t:i}function o(e){return e.parent||null}t.getChildren=a,t.getParent=o,t.getSiblings=function(e){var t=o(e);if(null!=t)return a(t);for(var n=[e],r=e.prev,i=e.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=i;)n.push(i),i=i.next;return n},t.getAttributeValue=function(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,r.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,r.isTag)(t);)t=t.prev;return t}},function(e,t,n){"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var i=t.parent=e.parent;if(i){var a=i.children;a[a.lastIndexOf(e)]=t}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var r=n(274);function i(e,t){var n=[],i=[];if(e===t)return 0;for(var a=(0,r.hasChildren)(e)?e:e.parent;a;)n.unshift(a),a=a.parent;for(a=(0,r.hasChildren)(t)?t:t.parent;a;)i.unshift(a),a=a.parent;for(var o=Math.min(n.length,i.length),s=0;s<o&&n[s]===i[s];)s++;if(0===s)return 1;var l=n[s-1],c=l.children,u=n[s],d=i[s];return c.indexOf(u)>c.indexOf(d)?l===t?20:4:l===e?10:2}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(var r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e},t.compareDocumentPosition=i,t.uniqueSort=function(e){return(e=e.filter((function(e,t,n){return!n.includes(e,t+1)}))).sort((function(e,t){var n=i(e,t);return 2&n?-1:4&n?1:0})),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var r=n(970),i=n(978);t.getFeed=function(e){var t=l(d,e);return t?"feed"===t.name?function(e){var t,n=e.children,r={type:"atom",items:(0,i.getElementsByTagName)("entry",n).map((function(e){var t,n=e.children,r={media:s(n)};u(r,"id","id",n),u(r,"title","title",n);var i=null===(t=l("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);var a=c("summary",n)||c("content",n);a&&(r.description=a);var o=c("updated",n);return o&&(r.pubDate=new Date(o)),r}))};u(r,"id","id",n),u(r,"title","title",n);var a=null===(t=l("link",n))||void 0===t?void 0:t.attribs.href;a&&(r.link=a);u(r,"description","subtitle",n);var o=c("updated",n);o&&(r.updated=new Date(o));return u(r,"author","email",n,!0),r}(t):function(e){var t,n,r=null!==(n=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==n?n:[],a={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,n={media:s(t)};u(n,"id","guid",t),u(n,"title","title",t),u(n,"link","link",t),u(n,"description","description",t);var r=c("pubDate",t);return r&&(n.pubDate=new Date(r)),n}))};u(a,"title","title",r),u(a,"link","link",r),u(a,"description","description",r);var o=c("lastBuildDate",r);o&&(a.updated=new Date(o));return u(a,"author","managingEditor",r,!0),a}(t):null};var a=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,n={medium:t.medium,isDefault:!!t.isDefault},r=0,i=a;r<i.length;r++){t[c=i[r]]&&(n[c]=t[c])}for(var s=0,l=o;s<l.length;s++){var c;t[c=l[s]]&&(n[c]=parseInt(t[c],10))}return t.expression&&(n.expression=t.expression),n}))}function l(e,t){return(0,i.getElementsByTagName)(e,t,!0,1)[0]}function c(e,t,n){return void 0===n&&(n=!1),(0,r.textContent)((0,i.getElementsByTagName)(e,t,n,1)).trim()}function u(e,t,n,r,i){void 0===i&&(i=!1);var a=c(n,r,i);a&&(e[t]=a)}function d(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compileToken=t.compileUnsafe=t.compile=void 0;var i=n(531),a=n(239),o=r(n(1747)),s=n(534),l=n(1748),c=n(535);function u(e,t,n){return m("string"==typeof e?(0,i.parse)(e,t):e,t,n)}function d(e){return"pseudo"===e.type&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((function(e){return e.some(d)})))}t.compile=function(e,t,n){var r=u(e,t,n);return(0,c.ensureIsTag)(r,t.adapter)},t.compileUnsafe=u;var h={type:"descendant"},f={type:"_flexibleDescendant"},p={type:"pseudo",name:"scope",data:null};function m(e,t,n){var r;(e=e.filter((function(e){return e.length>0}))).forEach(o.default),n=null!==(r=t.context)&&void 0!==r?r:n;var i=Array.isArray(n),u=n&&(Array.isArray(n)?n:[n]);!function(e,t,n){for(var r=t.adapter,i=!!(null==n?void 0:n.every((function(e){var t=r.isTag(e)&&r.getParent(e);return e===c.PLACEHOLDER_ELEMENT||t&&r.isTag(t)}))),a=0,o=e;a<o.length;a++){var l=o[a];if(l.length>0&&(0,s.isTraversal)(l[0])&&"descendant"!==l[0].type);else{if(!i||l.some(d))continue;l.unshift(h)}l.unshift(p)}}(e,t,u);var v=!1,b=e.map((function(e){if(e.length>=2){var n=e[0],r=e[1];"pseudo"!==n.type||"scope"!==n.name||(i&&"descendant"===r.type?e[1]=f:"adjacent"!==r.type&&"sibling"!==r.type||(v=!0))}return function(e,t,n){var r;return e.reduce((function(e,r){return e===a.falseFunc?a.falseFunc:(0,l.compileGeneralSelector)(e,r,t,n,m)}),null!==(r=t.rootFunc)&&void 0!==r?r:a.trueFunc)}(e,t,u)})).reduce(g,a.falseFunc);return b.shouldTestNextSiblings=v,b}function g(e,t){return t===a.falseFunc||e===a.trueFunc?e:e===a.falseFunc||t===a.trueFunc?t:function(n){return e(n)||t(n)}}t.compileToken=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(534),i={exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4};function a(e){var t=r.procedure[e.type];if("attribute"===e.type)(t=i[e.action])===i.equals&&"id"===e.name&&(t=9),e.ignoreCase&&(t>>=1);else if("pseudo"===e.type)if(e.data)if("has"===e.name||"contains"===e.name)t=0;else if(Array.isArray(e.data)){t=0;for(var n=0;n<e.data.length;n++)if(1===e.data[n].length){var o=a(e.data[n][0]);if(0===o){t=0;break}o>t&&(t=o)}e.data.length>1&&t>0&&(t-=1)}else t=1;else t=3;return t}t.default=function(e){for(var t=e.map(a),n=1;n<e.length;n++){var r=t[n];if(!(r<0))for(var i=n-1;i>=0&&r<t[i];i--){var o=e[i+1];e[i+1]=e[i],e[i]=o,t[i+1]=t[i],t[i]=r}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileGeneralSelector=void 0;var r=n(1749),i=n(979);t.compileGeneralSelector=function(e,t,n,a,o){var s=n.adapter,l=n.equals;switch(t.type){case"pseudo-element":throw new Error("Pseudo-elements are not supported by css-select");case"attribute":return r.attributeRules[t.action](e,t,n);case"pseudo":return(0,i.compilePseudoSelector)(e,t,n,a,o);case"tag":return function(n){return s.getName(n)===t.name&&e(n)};case"descendant":if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(t){for(var n=t;n=s.getParent(n);)if(s.isTag(n)&&e(n))return!0;return!1};var c=new WeakSet;return function(t){for(var n=t;n=s.getParent(n);)if(!c.has(n)){if(s.isTag(n)&&e(n))return!0;c.add(n)}return!1};case"_flexibleDescendant":return function(t){var n=t;do{if(s.isTag(n)&&e(n))return!0}while(n=s.getParent(n));return!1};case"parent":return function(t){return s.getChildren(t).some((function(t){return s.isTag(t)&&e(t)}))};case"child":return function(t){var n=s.getParent(t);return null!=n&&s.isTag(n)&&e(n)};case"sibling":return function(t){for(var n=s.getSiblings(t),r=0;r<n.length;r++){var i=n[r];if(l(t,i))break;if(s.isTag(i)&&e(i))return!0}return!1};case"adjacent":return function(t){for(var n,r=s.getSiblings(t),i=0;i<r.length;i++){var a=r[i];if(l(t,a))break;s.isTag(a)&&(n=a)}return!!n&&e(n)};case"universal":return e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeRules=void 0;var r=n(239),i=/[-[\]{}()*+?.,\\^$|#\s]/g;function a(e){return e.replace(i,"\\$&")}t.attributeRules={equals:function(e,t,n){var r=n.adapter,i=t.name,a=t.value;return t.ignoreCase?(a=a.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return null!=n&&n.length===a.length&&n.toLowerCase()===a&&e(t)}):function(t){return r.getAttributeValue(t,i)===a&&e(t)}},hyphen:function(e,t,n){var r=n.adapter,i=t.name,a=t.value,o=a.length;return t.ignoreCase?(a=a.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return null!=n&&(n.length===o||"-"===n.charAt(o))&&n.substr(0,o).toLowerCase()===a&&e(t)}):function(t){var n=r.getAttributeValue(t,i);return null!=n&&(n.length===o||"-"===n.charAt(o))&&n.substr(0,o)===a&&e(t)}},element:function(e,t,n){var i=t.name,o=t.value,s=t.ignoreCase,l=n.adapter;if(/\s/.test(o))return r.falseFunc;var c=new RegExp("(?:^|\\s)".concat(a(o),"(?:$|\\s)"),s?"i":"");return function(t){var n=l.getAttributeValue(t,i);return null!=n&&n.length>=o.length&&c.test(n)&&e(t)}},exists:function(e,t,n){var r=t.name,i=n.adapter;return function(t){return i.hasAttrib(t,r)&&e(t)}},start:function(e,t,n){var i=n.adapter,a=t.name,o=t.value,s=o.length;return 0===s?r.falseFunc:t.ignoreCase?(o=o.toLowerCase(),function(t){var n=i.getAttributeValue(t,a);return null!=n&&n.length>=s&&n.substr(0,s).toLowerCase()===o&&e(t)}):function(t){var n;return!!(null===(n=i.getAttributeValue(t,a))||void 0===n?void 0:n.startsWith(o))&&e(t)}},end:function(e,t,n){var i=n.adapter,a=t.name,o=t.value,s=-o.length;return 0===s?r.falseFunc:t.ignoreCase?(o=o.toLowerCase(),function(t){var n;return(null===(n=i.getAttributeValue(t,a))||void 0===n?void 0:n.substr(s).toLowerCase())===o&&e(t)}):function(t){var n;return!!(null===(n=i.getAttributeValue(t,a))||void 0===n?void 0:n.endsWith(o))&&e(t)}},any:function(e,t,n){var i=n.adapter,o=t.name,s=t.value;if(""===s)return r.falseFunc;if(t.ignoreCase){var l=new RegExp(a(s),"i");return function(t){var n=i.getAttributeValue(t,o);return null!=n&&n.length>=s.length&&l.test(n)&&e(t)}}return function(t){var n;return!!(null===(n=i.getAttributeValue(t,o))||void 0===n?void 0:n.includes(s))&&e(t)}},not:function(e,t,n){var r=n.adapter,i=t.name,a=t.value;return""===a?function(t){return!!r.getAttributeValue(t,i)&&e(t)}:t.ignoreCase?(a=a.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return(null==n||n.length!==a.length||n.toLowerCase()!==a)&&e(t)}):function(t){return r.getAttributeValue(t,i)!==a&&e(t)}}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;var i=r(n(1751)),a=n(239);function o(e,t){return function(n){var r=t.getParent(n);return null!=r&&t.isTag(r)&&e(n)}}function s(e){return function(t,n,r){var i=r.adapter[e];return"function"!=typeof i?a.falseFunc:function(e){return i(e)&&t(e)}}}t.filters={contains:function(e,t,n){var r=n.adapter;return function(n){return e(n)&&r.getText(n).includes(t)}},icontains:function(e,t,n){var r=n.adapter,i=t.toLowerCase();return function(t){return e(t)&&r.getText(t).toLowerCase().includes(i)}},"nth-child":function(e,t,n){var r=n.adapter,s=n.equals,l=(0,i.default)(t);return l===a.falseFunc?a.falseFunc:l===a.trueFunc?o(e,r):function(t){for(var n=r.getSiblings(t),i=0,a=0;a<n.length&&!s(t,n[a]);a++)r.isTag(n[a])&&i++;return l(i)&&e(t)}},"nth-last-child":function(e,t,n){var r=n.adapter,s=n.equals,l=(0,i.default)(t);return l===a.falseFunc?a.falseFunc:l===a.trueFunc?o(e,r):function(t){for(var n=r.getSiblings(t),i=0,a=n.length-1;a>=0&&!s(t,n[a]);a--)r.isTag(n[a])&&i++;return l(i)&&e(t)}},"nth-of-type":function(e,t,n){var r=n.adapter,s=n.equals,l=(0,i.default)(t);return l===a.falseFunc?a.falseFunc:l===a.trueFunc?o(e,r):function(t){for(var n=r.getSiblings(t),i=0,a=0;a<n.length;a++){var o=n[a];if(s(t,o))break;r.isTag(o)&&r.getName(o)===r.getName(t)&&i++}return l(i)&&e(t)}},"nth-last-of-type":function(e,t,n){var r=n.adapter,s=n.equals,l=(0,i.default)(t);return l===a.falseFunc?a.falseFunc:l===a.trueFunc?o(e,r):function(t){for(var n=r.getSiblings(t),i=0,a=n.length-1;a>=0;a--){var o=n[a];if(s(t,o))break;r.isTag(o)&&r.getName(o)===r.getName(t)&&i++}return l(i)&&e(t)}},root:function(e,t,n){var r=n.adapter;return function(t){var n=r.getParent(t);return(null==n||!r.isTag(n))&&e(t)}},scope:function(e,n,r,i){var a=r.equals;return i&&0!==i.length?1===i.length?function(t){return a(i[0],t)&&e(t)}:function(t){return i.includes(t)&&e(t)}:t.filters.root(e,n,r)},hover:s("isHovered"),visited:s("isVisited"),active:s("isActive")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compile=t.parse=void 0;var r=n(1752);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return r.parse}});var i=n(1753);Object.defineProperty(t,"compile",{enumerable:!0,get:function(){return i.compile}}),t.default=function(e){return(0,i.compile)((0,r.parse)(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var r=new Set([9,10,12,13,32]),i="0".charCodeAt(0),a="9".charCodeAt(0);t.parse=function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];var t=0,n=0,o=l(),s=c();if(t<e.length&&"n"===e.charAt(t)&&(t++,n=o*(null!=s?s:1),u(),t<e.length?(o=l(),u(),s=c()):o=s=0),null===s||t<e.length)throw new Error("n-th rule couldn't be parsed ('"+e+"')");return[n,o*s];function l(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function c(){for(var n=t,r=0;t<e.length&&e.charCodeAt(t)>=i&&e.charCodeAt(t)<=a;)r=10*r+(e.charCodeAt(t)-i),t++;return t===n?null:r}function u(){for(;t<e.length&&r.has(e.charCodeAt(t));)t++}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compile=void 0;var r=n(239);t.compile=function(e){var t=e[0],n=e[1]-1;if(n<0&&t<=0)return r.falseFunc;if(-1===t)return function(e){return e<=n};if(0===t)return function(e){return e===n};if(1===t)return n<0?r.trueFunc:function(e){return e>=n};var i=Math.abs(t),a=(n%i+i)%i;return t>1?function(e){return e>=n&&e%i===a}:function(e){return e<=n&&e%i===a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyPseudoArgs=t.pseudos=void 0,t.pseudos={empty:function(e,t){var n=t.adapter;return!n.getChildren(e).some((function(e){return n.isTag(e)||""!==n.getText(e)}))},"first-child":function(e,t){var n=t.adapter,r=t.equals,i=n.getSiblings(e).find((function(e){return n.isTag(e)}));return null!=i&&r(e,i)},"last-child":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),a=i.length-1;a>=0;a--){if(r(e,i[a]))return!0;if(n.isTag(i[a]))break}return!1},"first-of-type":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),a=n.getName(e),o=0;o<i.length;o++){var s=i[o];if(r(e,s))return!0;if(n.isTag(s)&&n.getName(s)===a)break}return!1},"last-of-type":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),a=n.getName(e),o=i.length-1;o>=0;o--){var s=i[o];if(r(e,s))return!0;if(n.isTag(s)&&n.getName(s)===a)break}return!1},"only-of-type":function(e,t){var n=t.adapter,r=t.equals,i=n.getName(e);return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)||n.getName(t)!==i}))},"only-child":function(e,t){var n=t.adapter,r=t.equals;return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)}))}},t.verifyPseudoArgs=function(e,t,n){if(null===n){if(e.length>2)throw new Error("pseudo-selector :".concat(t," requires an argument"))}else if(2===e.length)throw new Error("pseudo-selector :".concat(t," doesn't have any arguments"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=void 0,t.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n        :is(button, input, select, textarea, optgroup, option)[disabled],\n        optgroup[disabled] > option,\n        fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n    )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupSelectors=t.getDocumentRoot=void 0;var r=n(980);t.getDocumentRoot=function(e){for(;e.parent;)e=e.parent;return e},t.groupSelectors=function(e){for(var t=[],n=[],i=0,a=e;i<a.length;i++){var o=a[i];o.some(r.isFilter)?t.push(o):n.push(o)}return[n,t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var r=n(148),i=[];function a(e){var t;return null!==(t=e.children)&&void 0!==t?t:i}function o(e){return e.parent||null}t.getChildren=a,t.getParent=o,t.getSiblings=function(e){var t=o(e);if(null!=t)return a(t);for(var n=[e],r=e.prev,i=e.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=i;)n.push(i),i=i.next;return n},t.getAttributeValue=function(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,r.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,r.isTag)(t);)t=t.prev;return t}},function(e,t,n){"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var i=t.parent=e.parent;if(i){var a=i.children;a[a.lastIndexOf(e)]=t}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var r=n(148);function i(e,t){var n=[],i=[];if(e===t)return 0;for(var a=(0,r.hasChildren)(e)?e:e.parent;a;)n.unshift(a),a=a.parent;for(a=(0,r.hasChildren)(t)?t:t.parent;a;)i.unshift(a),a=a.parent;for(var o=Math.min(n.length,i.length),s=0;s<o&&n[s]===i[s];)s++;if(0===s)return 1;var l=n[s-1],c=l.children,u=n[s],d=i[s];return c.indexOf(u)>c.indexOf(d)?l===t?20:4:l===e?10:2}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(var r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e},t.compareDocumentPosition=i,t.uniqueSort=function(e){return(e=e.filter((function(e,t,n){return!n.includes(e,t+1)}))).sort((function(e,t){var n=i(e,t);return 2&n?-1:4&n?1:0})),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var r=n(986),i=n(989);t.getFeed=function(e){var t=l(d,e);return t?"feed"===t.name?function(e){var t,n=e.children,r={type:"atom",items:(0,i.getElementsByTagName)("entry",n).map((function(e){var t,n=e.children,r={media:s(n)};u(r,"id","id",n),u(r,"title","title",n);var i=null===(t=l("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);var a=c("summary",n)||c("content",n);a&&(r.description=a);var o=c("updated",n);return o&&(r.pubDate=new Date(o)),r}))};u(r,"id","id",n),u(r,"title","title",n);var a=null===(t=l("link",n))||void 0===t?void 0:t.attribs.href;a&&(r.link=a);u(r,"description","subtitle",n);var o=c("updated",n);o&&(r.updated=new Date(o));return u(r,"author","email",n,!0),r}(t):function(e){var t,n,r=null!==(n=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==n?n:[],a={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,n={media:s(t)};u(n,"id","guid",t),u(n,"title","title",t),u(n,"link","link",t),u(n,"description","description",t);var r=c("pubDate",t);return r&&(n.pubDate=new Date(r)),n}))};u(a,"title","title",r),u(a,"link","link",r),u(a,"description","description",r);var o=c("lastBuildDate",r);o&&(a.updated=new Date(o));return u(a,"author","managingEditor",r,!0),a}(t):null};var a=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,n={medium:t.medium,isDefault:!!t.isDefault},r=0,i=a;r<i.length;r++){t[c=i[r]]&&(n[c]=t[c])}for(var s=0,l=o;s<l.length;s++){var c;t[c=l[s]]&&(n[c]=parseInt(t[c],10))}return t.expression&&(n.expression=t.expression),n}))}function l(e,t){return(0,i.getElementsByTagName)(e,t,!0,1)[0]}function c(e,t,n){return void 0===n&&(n=!1),(0,r.textContent)((0,i.getElementsByTagName)(e,t,n,1)).trim()}function u(e,t,n,r,i){void 0===i&&(i=!1);var a=c(n,r,i);a&&(e[t]=a)}function d(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},function(e,t,n){"use strict";const r=n(1763),i=n(1774);t.parse=function(e,t){return new r(t).parse(e)},t.parseFragment=function(e,t,n){return"string"==typeof e&&(n=t,t=e,e=null),new r(n).parseFragment(t,e)},t.serialize=function(e,t){return new i(e,t).serialize()}},function(e,t,n){"use strict";const r=n(381),i=n(1766),a=n(1767),o=n(1768),s=n(1770),l=n(202),c=n(993),u=n(994),d=n(995),h=n(1773),f=n(537),p=n(536),m=n(240),g=m.TAG_NAMES,v=m.NAMESPACES,b=m.ATTRS,y={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:c},A="IN_TABLE_MODE",_={[g.TR]:"IN_ROW_MODE",[g.TBODY]:"IN_TABLE_BODY_MODE",[g.THEAD]:"IN_TABLE_BODY_MODE",[g.TFOOT]:"IN_TABLE_BODY_MODE",[g.CAPTION]:"IN_CAPTION_MODE",[g.COLGROUP]:"IN_COLUMN_GROUP_MODE",[g.TABLE]:A,[g.BODY]:"IN_BODY_MODE",[g.FRAMESET]:"IN_FRAMESET_MODE"},w={[g.CAPTION]:A,[g.COLGROUP]:A,[g.TBODY]:A,[g.TFOOT]:A,[g.THEAD]:A,[g.COL]:"IN_COLUMN_GROUP_MODE",[g.TR]:"IN_TABLE_BODY_MODE",[g.TD]:"IN_ROW_MODE",[g.TH]:"IN_ROW_MODE"},E={INITIAL_MODE:{[r.CHARACTER_TOKEN]:B,[r.NULL_CHARACTER_TOKEN]:B,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const n=t.forceQuirks?m.DOCUMENT_MODE.QUIRKS:d.getDocumentMode(t);d.isConforming(t)||e._err(f.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode="BEFORE_HTML_MODE"},[r.START_TAG_TOKEN]:B,[r.END_TAG_TOKEN]:B,[r.EOF_TOKEN]:B},BEFORE_HTML_MODE:{[r.CHARACTER_TOKEN]:j,[r.NULL_CHARACTER_TOKEN]:j,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){t.tagName===g.HTML?(e._insertElement(t,v.HTML),e.insertionMode="BEFORE_HEAD_MODE"):j(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n!==g.HTML&&n!==g.HEAD&&n!==g.BODY&&n!==g.BR||j(e,t)},[r.EOF_TOKEN]:j},BEFORE_HEAD_MODE:{[r.CHARACTER_TOKEN]:F,[r.NULL_CHARACTER_TOKEN]:F,[r.WHITESPACE_CHARACTER_TOKEN]:M,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:P,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.HEAD?(e._insertElement(t,v.HTML),e.headElement=e.openElements.current,e.insertionMode="IN_HEAD_MODE"):F(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?F(e,t):e._err(f.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:F},IN_HEAD_MODE:{[r.CHARACTER_TOKEN]:z,[r.NULL_CHARACTER_TOKEN]:z,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:P,[r.START_TAG_TOKEN]:U,[r.END_TAG_TOKEN]:H,[r.EOF_TOKEN]:z},IN_HEAD_NO_SCRIPT_MODE:{[r.CHARACTER_TOKEN]:V,[r.NULL_CHARACTER_TOKEN]:V,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:P,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.BASEFONT||n===g.BGSOUND||n===g.HEAD||n===g.LINK||n===g.META||n===g.NOFRAMES||n===g.STYLE?U(e,t):n===g.NOSCRIPT?e._err(f.nestedNoscriptInHead):V(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.NOSCRIPT?(e.openElements.pop(),e.insertionMode="IN_HEAD_MODE"):n===g.BR?V(e,t):e._err(f.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:V},AFTER_HEAD_MODE:{[r.CHARACTER_TOKEN]:W,[r.NULL_CHARACTER_TOKEN]:W,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:P,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.BODY?(e._insertElement(t,v.HTML),e.framesetOk=!1,e.insertionMode="IN_BODY_MODE"):n===g.FRAMESET?(e._insertElement(t,v.HTML),e.insertionMode="IN_FRAMESET_MODE"):n===g.BASE||n===g.BASEFONT||n===g.BGSOUND||n===g.LINK||n===g.META||n===g.NOFRAMES||n===g.SCRIPT||n===g.STYLE||n===g.TEMPLATE||n===g.TITLE?(e._err(f.abandonedHeadElementChild),e.openElements.push(e.headElement),U(e,t),e.openElements.remove(e.headElement)):n===g.HEAD?e._err(f.misplacedStartTagForHeadElement):W(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.BODY||n===g.HTML||n===g.BR?W(e,t):n===g.TEMPLATE?H(e,t):e._err(f.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:W},IN_BODY_MODE:{[r.CHARACTER_TOKEN]:q,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:G,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:re,[r.END_TAG_TOKEN]:se,[r.EOF_TOKEN]:le},TEXT_MODE:{[r.CHARACTER_TOKEN]:L,[r.NULL_CHARACTER_TOKEN]:L,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:M,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:M,[r.END_TAG_TOKEN]:function(e,t){t.tagName===g.SCRIPT&&(e.pendingScript=e.openElements.current);e.openElements.pop(),e.insertionMode=e.originalInsertionMode},[r.EOF_TOKEN]:function(e,t){e._err(f.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}},[A]:{[r.CHARACTER_TOKEN]:ce,[r.NULL_CHARACTER_TOKEN]:ce,[r.WHITESPACE_CHARACTER_TOKEN]:ce,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:ue,[r.END_TAG_TOKEN]:de,[r.EOF_TOKEN]:le},IN_TABLE_TEXT_MODE:{[r.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0},[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t)},[r.COMMENT_TOKEN]:fe,[r.DOCTYPE_TOKEN]:fe,[r.START_TAG_TOKEN]:fe,[r.END_TAG_TOKEN]:fe,[r.EOF_TOKEN]:fe},IN_CAPTION_MODE:{[r.CHARACTER_TOKEN]:q,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:G,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.CAPTION||n===g.COL||n===g.COLGROUP||n===g.TBODY||n===g.TD||n===g.TFOOT||n===g.TH||n===g.THEAD||n===g.TR?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A,e._processToken(t)):re(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.CAPTION||n===g.TABLE?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A,n===g.TABLE&&e._processToken(t)):n!==g.BODY&&n!==g.COL&&n!==g.COLGROUP&&n!==g.HTML&&n!==g.TBODY&&n!==g.TD&&n!==g.TFOOT&&n!==g.TH&&n!==g.THEAD&&n!==g.TR&&se(e,t)},[r.EOF_TOKEN]:le},IN_COLUMN_GROUP_MODE:{[r.CHARACTER_TOKEN]:pe,[r.NULL_CHARACTER_TOKEN]:pe,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.COL?(e._appendElement(t,v.HTML),t.ackSelfClosing=!0):n===g.TEMPLATE?U(e,t):pe(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.COLGROUP?e.openElements.currentTagName===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=A):n===g.TEMPLATE?H(e,t):n!==g.COL&&pe(e,t)},[r.EOF_TOKEN]:le},IN_TABLE_BODY_MODE:{[r.CHARACTER_TOKEN]:ce,[r.NULL_CHARACTER_TOKEN]:ce,[r.WHITESPACE_CHARACTER_TOKEN]:ce,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,v.HTML),e.insertionMode="IN_ROW_MODE"):n===g.TH||n===g.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(g.TR),e.insertionMode="IN_ROW_MODE",e._processToken(t)):n===g.CAPTION||n===g.COL||n===g.COLGROUP||n===g.TBODY||n===g.TFOOT||n===g.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A,e._processToken(t)):ue(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.TBODY||n===g.TFOOT||n===g.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A):n===g.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A,e._processToken(t)):(n!==g.BODY&&n!==g.CAPTION&&n!==g.COL&&n!==g.COLGROUP||n!==g.HTML&&n!==g.TD&&n!==g.TH&&n!==g.TR)&&de(e,t)},[r.EOF_TOKEN]:le},IN_ROW_MODE:{[r.CHARACTER_TOKEN]:ce,[r.NULL_CHARACTER_TOKEN]:ce,[r.WHITESPACE_CHARACTER_TOKEN]:ce,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.TH||n===g.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,v.HTML),e.insertionMode="IN_CELL_MODE",e.activeFormattingElements.insertMarker()):n===g.CAPTION||n===g.COL||n===g.COLGROUP||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR?e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):ue(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.TR?e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE"):n===g.TABLE?e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):n===g.TBODY||n===g.TFOOT||n===g.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):(n!==g.BODY&&n!==g.CAPTION&&n!==g.COL&&n!==g.COLGROUP||n!==g.HTML&&n!==g.TD&&n!==g.TH)&&de(e,t)},[r.EOF_TOKEN]:le},IN_CELL_MODE:{[r.CHARACTER_TOKEN]:q,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:G,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.CAPTION||n===g.COL||n===g.COLGROUP||n===g.TBODY||n===g.TD||n===g.TFOOT||n===g.TH||n===g.THEAD||n===g.TR?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),e._processToken(t)):re(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode="IN_ROW_MODE"):n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==g.BODY&&n!==g.CAPTION&&n!==g.COL&&n!==g.COLGROUP&&n!==g.HTML&&se(e,t)},[r.EOF_TOKEN]:le},IN_SELECT_MODE:{[r.CHARACTER_TOKEN]:L,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:me,[r.END_TAG_TOKEN]:ge,[r.EOF_TOKEN]:le},IN_SELECT_IN_TABLE_MODE:{[r.CHARACTER_TOKEN]:L,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processToken(t)):me(e,t)},[r.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processToken(t)):ge(e,t)},[r.EOF_TOKEN]:le},IN_TEMPLATE_MODE:{[r.CHARACTER_TOKEN]:q,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:G,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;if(n===g.BASE||n===g.BASEFONT||n===g.BGSOUND||n===g.LINK||n===g.META||n===g.NOFRAMES||n===g.SCRIPT||n===g.STYLE||n===g.TEMPLATE||n===g.TITLE)U(e,t);else{const r=w[n]||"IN_BODY_MODE";e._popTmplInsertionMode(),e._pushTmplInsertionMode(r),e.insertionMode=r,e._processToken(t)}},[r.END_TAG_TOKEN]:function(e,t){t.tagName===g.TEMPLATE&&H(e,t)},[r.EOF_TOKEN]:ve},AFTER_BODY_MODE:{[r.CHARACTER_TOKEN]:be,[r.NULL_CHARACTER_TOKEN]:be,[r.WHITESPACE_CHARACTER_TOKEN]:G,[r.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0])},[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){t.tagName===g.HTML?re(e,t):be(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===g.HTML?e.fragmentContext||(e.insertionMode="AFTER_AFTER_BODY_MODE"):be(e,t)},[r.EOF_TOKEN]:R},IN_FRAMESET_MODE:{[r.CHARACTER_TOKEN]:M,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.FRAMESET?e._insertElement(t,v.HTML):n===g.FRAME?(e._appendElement(t,v.HTML),t.ackSelfClosing=!0):n===g.NOFRAMES&&U(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName!==g.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===g.FRAMESET||(e.insertionMode="AFTER_FRAMESET_MODE"))},[r.EOF_TOKEN]:R},AFTER_FRAMESET_MODE:{[r.CHARACTER_TOKEN]:M,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:L,[r.COMMENT_TOKEN]:D,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.NOFRAMES&&U(e,t)},[r.END_TAG_TOKEN]:function(e,t){t.tagName===g.HTML&&(e.insertionMode="AFTER_AFTER_FRAMESET_MODE")},[r.EOF_TOKEN]:R},AFTER_AFTER_BODY_MODE:{[r.CHARACTER_TOKEN]:ye,[r.NULL_CHARACTER_TOKEN]:ye,[r.WHITESPACE_CHARACTER_TOKEN]:G,[r.COMMENT_TOKEN]:N,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){t.tagName===g.HTML?re(e,t):ye(e,t)},[r.END_TAG_TOKEN]:ye,[r.EOF_TOKEN]:R},AFTER_AFTER_FRAMESET_MODE:{[r.CHARACTER_TOKEN]:M,[r.NULL_CHARACTER_TOKEN]:M,[r.WHITESPACE_CHARACTER_TOKEN]:G,[r.COMMENT_TOKEN]:N,[r.DOCTYPE_TOKEN]:M,[r.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.NOFRAMES&&U(e,t)},[r.END_TAG_TOKEN]:M,[r.EOF_TOKEN]:R}};function S(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):oe(e,t),n}function C(e,t){let n=null;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function T(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);const n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=k(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function k(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function x(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{const r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===g.TEMPLATE&&i===v.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function O(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a)}function I(e,t){let n;for(let r=0;r<8&&(n=S(e,t),n);r++){const t=C(e,n);if(!t)break;e.activeFormattingElements.bookmark=n;const r=T(e,t,n.element),i=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(r),x(e,i,r),O(e,t,n)}}function M(){}function P(e){e._err(f.misplacedDoctype)}function D(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function N(e,t){e._appendCommentNode(t,e.document)}function L(e,t){e._insertCharacters(t)}function R(e){e.stopped=!0}function B(e,t){e._err(f.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,m.DOCUMENT_MODE.QUIRKS),e.insertionMode="BEFORE_HTML_MODE",e._processToken(t)}function j(e,t){e._insertFakeRootElement(),e.insertionMode="BEFORE_HEAD_MODE",e._processToken(t)}function F(e,t){e._insertFakeElement(g.HEAD),e.headElement=e.openElements.current,e.insertionMode="IN_HEAD_MODE",e._processToken(t)}function U(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.BASE||n===g.BASEFONT||n===g.BGSOUND||n===g.LINK||n===g.META?(e._appendElement(t,v.HTML),t.ackSelfClosing=!0):n===g.TITLE?e._switchToTextParsing(t,r.MODE.RCDATA):n===g.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,r.MODE.RAWTEXT):(e._insertElement(t,v.HTML),e.insertionMode="IN_HEAD_NO_SCRIPT_MODE"):n===g.NOFRAMES||n===g.STYLE?e._switchToTextParsing(t,r.MODE.RAWTEXT):n===g.SCRIPT?e._switchToTextParsing(t,r.MODE.SCRIPT_DATA):n===g.TEMPLATE?(e._insertTemplate(t,v.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode="IN_TEMPLATE_MODE",e._pushTmplInsertionMode("IN_TEMPLATE_MODE")):n===g.HEAD?e._err(f.misplacedStartTagForHeadElement):z(e,t)}function H(e,t){const n=t.tagName;n===g.HEAD?(e.openElements.pop(),e.insertionMode="AFTER_HEAD_MODE"):n===g.BODY||n===g.BR||n===g.HTML?z(e,t):n===g.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==g.TEMPLATE&&e._err(f.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(f.endTagWithoutMatchingOpenElement)}function z(e,t){e.openElements.pop(),e.insertionMode="AFTER_HEAD_MODE",e._processToken(t)}function V(e,t){const n=t.type===r.EOF_TOKEN?f.openElementsLeftAfterEof:f.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode="IN_HEAD_MODE",e._processToken(t)}function W(e,t){e._insertFakeElement(g.BODY),e.insertionMode="IN_BODY_MODE",e._processToken(t)}function G(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function q(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Y(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML)}function K(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function X(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Q(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function $(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,v.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function J(e,t){e._appendElement(t,v.HTML),t.ackSelfClosing=!0}function Z(e,t){e._switchToTextParsing(t,r.MODE.RAWTEXT)}function ee(e,t){e.openElements.currentTagName===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML)}function te(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,v.HTML)}function ne(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML)}function re(e,t){const n=t.tagName;switch(n.length){case 1:n===g.I||n===g.S||n===g.B||n===g.U?X(e,t):n===g.P?Y(e,t):n===g.A?function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(g.A);n&&(I(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):ne(e,t);break;case 2:n===g.DL||n===g.OL||n===g.UL?Y(e,t):n===g.H1||n===g.H2||n===g.H3||n===g.H4||n===g.H5||n===g.H6?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement();const n=e.openElements.currentTagName;n!==g.H1&&n!==g.H2&&n!==g.H3&&n!==g.H4&&n!==g.H5&&n!==g.H6||e.openElements.pop(),e._insertElement(t,v.HTML)}(e,t):n===g.LI||n===g.DD||n===g.DT?function(e,t){e.framesetOk=!1;const n=t.tagName;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.items[t],i=e.treeAdapter.getTagName(r);let a=null;if(n===g.LI&&i===g.LI?a=g.LI:n!==g.DD&&n!==g.DT||i!==g.DD&&i!==g.DT||(a=i),a){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(i!==g.ADDRESS&&i!==g.DIV&&i!==g.P&&e._isSpecialElement(r))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML)}(e,t):n===g.EM||n===g.TT?X(e,t):n===g.BR?$(e,t):n===g.HR?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,v.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t):n===g.RB?te(e,t):n===g.RT||n===g.RP?function(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,v.HTML)}(e,t):n!==g.TH&&n!==g.TD&&n!==g.TR&&ne(e,t);break;case 3:n===g.DIV||n===g.DIR||n===g.NAV?Y(e,t):n===g.PRE?K(e,t):n===g.BIG?X(e,t):n===g.IMG||n===g.WBR?$(e,t):n===g.XMP?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===g.SVG?function(e,t){e._reconstructActiveFormattingElements(),h.adjustTokenSVGAttrs(t),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,v.SVG):e._insertElement(t,v.SVG),t.ackSelfClosing=!0}(e,t):n===g.RTC?te(e,t):n!==g.COL&&ne(e,t);break;case 4:n===g.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):n===g.BASE||n===g.LINK||n===g.META?U(e,t):n===g.BODY?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t):n===g.MAIN||n===g.MENU?Y(e,t):n===g.FORM?function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML),n||(e.formElement=e.openElements.current))}(e,t):n===g.CODE||n===g.FONT?X(e,t):n===g.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(I(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,v.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):n===g.AREA?$(e,t):n===g.MATH?function(e,t){e._reconstructActiveFormattingElements(),h.adjustTokenMathMLAttrs(t),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,v.MATHML):e._insertElement(t,v.MATHML),t.ackSelfClosing=!0}(e,t):n===g.MENU?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML)}(e,t):n!==g.HEAD&&ne(e,t);break;case 5:n===g.STYLE||n===g.TITLE?U(e,t):n===g.ASIDE?Y(e,t):n===g.SMALL?X(e,t):n===g.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==m.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML),e.framesetOk=!1,e.insertionMode=A}(e,t):n===g.EMBED?$(e,t):n===g.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,v.HTML);const n=r.getTokenAttr(t,b.TYPE);n&&"hidden"===n.toLowerCase()||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):n===g.PARAM||n===g.TRACK?J(e,t):n===g.IMAGE?function(e,t){t.tagName=g.IMG,$(e,t)}(e,t):n!==g.FRAME&&n!==g.TBODY&&n!==g.TFOOT&&n!==g.THEAD&&ne(e,t);break;case 6:n===g.SCRIPT?U(e,t):n===g.CENTER||n===g.FIGURE||n===g.FOOTER||n===g.HEADER||n===g.HGROUP||n===g.DIALOG?Y(e,t):n===g.BUTTON?function(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.framesetOk=!1}(e,t):n===g.STRIKE||n===g.STRONG?X(e,t):n===g.APPLET||n===g.OBJECT?Q(e,t):n===g.KEYGEN?$(e,t):n===g.SOURCE?J(e,t):n===g.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===g.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.framesetOk=!1,e.insertionMode===A||"IN_CAPTION_MODE"===e.insertionMode||"IN_TABLE_BODY_MODE"===e.insertionMode||"IN_ROW_MODE"===e.insertionMode||"IN_CELL_MODE"===e.insertionMode?e.insertionMode="IN_SELECT_IN_TABLE_MODE":e.insertionMode="IN_SELECT_MODE"}(e,t):n===g.OPTION?ee(e,t):ne(e,t);break;case 7:n===g.BGSOUND?U(e,t):n===g.DETAILS||n===g.ADDRESS||n===g.ARTICLE||n===g.SECTION||n===g.SUMMARY?Y(e,t):n===g.LISTING?K(e,t):n===g.MARQUEE?Q(e,t):n===g.NOEMBED?Z(e,t):n!==g.CAPTION&&ne(e,t);break;case 8:n===g.BASEFONT?U(e,t):n===g.FRAMESET?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,v.HTML),e.insertionMode="IN_FRAMESET_MODE")}(e,t):n===g.FIELDSET?Y(e,t):n===g.TEXTAREA?function(e,t){e._insertElement(t,v.HTML),e.skipNextNewLine=!0,e.tokenizer.state=r.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode="TEXT_MODE"}(e,t):n===g.TEMPLATE?U(e,t):n===g.NOSCRIPT?e.options.scriptingEnabled?Z(e,t):ne(e,t):n===g.OPTGROUP?ee(e,t):n!==g.COLGROUP&&ne(e,t);break;case 9:n===g.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML),e.tokenizer.state=r.MODE.PLAINTEXT}(e,t):ne(e,t);break;case 10:n===g.BLOCKQUOTE||n===g.FIGCAPTION?Y(e,t):ne(e,t);break;default:ne(e,t)}}function ie(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ae(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function oe(e,t){const n=t.tagName;for(let t=e.openElements.stackTop;t>0;t--){const r=e.openElements.items[t];if(e.treeAdapter.getTagName(r)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(r);break}if(e._isSpecialElement(r))break}}function se(e,t){const n=t.tagName;switch(n.length){case 1:n===g.A||n===g.B||n===g.I||n===g.S||n===g.U?I(e,t):n===g.P?function(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(g.P),e._closePElement()}(e):oe(e,t);break;case 2:n===g.DL||n===g.UL||n===g.OL?ie(e,t):n===g.LI?function(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}(e):n===g.DD||n===g.DT?function(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t):n===g.H1||n===g.H2||n===g.H3||n===g.H4||n===g.H5||n===g.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):n===g.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(g.BR),e.openElements.pop(),e.framesetOk=!1}(e):n===g.EM||n===g.TT?I(e,t):oe(e,t);break;case 3:n===g.BIG?I(e,t):n===g.DIR||n===g.DIV||n===g.NAV||n===g.PRE?ie(e,t):oe(e,t);break;case 4:n===g.BODY?function(e){e.openElements.hasInScope(g.BODY)&&(e.insertionMode="AFTER_BODY_MODE")}(e):n===g.HTML?function(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode="AFTER_BODY_MODE",e._processToken(t))}(e,t):n===g.FORM?function(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):e.openElements.remove(n))}(e):n===g.CODE||n===g.FONT||n===g.NOBR?I(e,t):n===g.MAIN||n===g.MENU?ie(e,t):oe(e,t);break;case 5:n===g.ASIDE?ie(e,t):n===g.SMALL?I(e,t):oe(e,t);break;case 6:n===g.CENTER||n===g.FIGURE||n===g.FOOTER||n===g.HEADER||n===g.HGROUP||n===g.DIALOG?ie(e,t):n===g.APPLET||n===g.OBJECT?ae(e,t):n===g.STRIKE||n===g.STRONG?I(e,t):oe(e,t);break;case 7:n===g.ADDRESS||n===g.ARTICLE||n===g.DETAILS||n===g.SECTION||n===g.SUMMARY||n===g.LISTING?ie(e,t):n===g.MARQUEE?ae(e,t):oe(e,t);break;case 8:n===g.FIELDSET?ie(e,t):n===g.TEMPLATE?H(e,t):oe(e,t);break;case 10:n===g.BLOCKQUOTE||n===g.FIGCAPTION?ie(e,t):oe(e,t);break;default:oe(e,t)}}function le(e,t){e.tmplInsertionModeStackTop>-1?ve(e,t):e.stopped=!0}function ce(e,t){const n=e.openElements.currentTagName;n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode="IN_TABLE_TEXT_MODE",e._processToken(t)):he(e,t)}function ue(e,t){const n=t.tagName;switch(n.length){case 2:n===g.TD||n===g.TH||n===g.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(g.TBODY),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)}(e,t):he(e,t);break;case 3:n===g.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(g.COLGROUP),e.insertionMode="IN_COLUMN_GROUP_MODE",e._processToken(t)}(e,t):he(e,t);break;case 4:n===g.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,v.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):he(e,t);break;case 5:n===g.TABLE?function(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):n===g.STYLE?U(e,t):n===g.TBODY||n===g.TFOOT||n===g.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,v.HTML),e.insertionMode="IN_TABLE_BODY_MODE"}(e,t):n===g.INPUT?function(e,t){const n=r.getTokenAttr(t,b.TYPE);n&&"hidden"===n.toLowerCase()?e._appendElement(t,v.HTML):he(e,t),t.ackSelfClosing=!0}(e,t):he(e,t);break;case 6:n===g.SCRIPT?U(e,t):he(e,t);break;case 7:n===g.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,v.HTML),e.insertionMode="IN_CAPTION_MODE"}(e,t):he(e,t);break;case 8:n===g.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,v.HTML),e.insertionMode="IN_COLUMN_GROUP_MODE"}(e,t):n===g.TEMPLATE?U(e,t):he(e,t);break;default:he(e,t)}}function de(e,t){const n=t.tagName;n===g.TABLE?e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode()):n===g.TEMPLATE?H(e,t):n!==g.BODY&&n!==g.CAPTION&&n!==g.COL&&n!==g.COLGROUP&&n!==g.HTML&&n!==g.TBODY&&n!==g.TD&&n!==g.TFOOT&&n!==g.TH&&n!==g.THEAD&&n!==g.TR&&he(e,t)}function he(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function fe(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)he(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}function pe(e,t){e.openElements.currentTagName===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=A,e._processToken(t))}function me(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.OPTION?(e.openElements.currentTagName===g.OPTION&&e.openElements.pop(),e._insertElement(t,v.HTML)):n===g.OPTGROUP?(e.openElements.currentTagName===g.OPTION&&e.openElements.pop(),e.openElements.currentTagName===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,v.HTML)):n===g.INPUT||n===g.KEYGEN||n===g.TEXTAREA||n===g.SELECT?e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),n!==g.SELECT&&e._processToken(t)):n!==g.SCRIPT&&n!==g.TEMPLATE||U(e,t)}function ge(e,t){const n=t.tagName;if(n===g.OPTGROUP){const t=e.openElements.items[e.openElements.stackTop-1],n=t&&e.treeAdapter.getTagName(t);e.openElements.currentTagName===g.OPTION&&n===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===g.OPTGROUP&&e.openElements.pop()}else n===g.OPTION?e.openElements.currentTagName===g.OPTION&&e.openElements.pop():n===g.SELECT&&e.openElements.hasInSelectScope(g.SELECT)?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode()):n===g.TEMPLATE&&H(e,t)}function ve(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function be(e,t){e.insertionMode="IN_BODY_MODE",e._processToken(t)}function ye(e,t){e.insertionMode="IN_BODY_MODE",e._processToken(t)}e.exports=class{constructor(e){this.options=u(y,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&l.install(this,o),this.options.onParseError&&l.install(this,s,{onParseError:this.options.onParseError})}parse(e){const t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(g.TEMPLATE,v.HTML,[]));const n=this.treeAdapter.createElement("documentmock",v.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===g.TEMPLATE&&this._pushTmplInsertionMode("IN_TEMPLATE_MODE"),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);const r=this.treeAdapter.getFirstChild(n),i=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,i),i}_bootstrap(e,t){this.tokenizer=new r(this.options),this.stopped=!1,this.insertionMode="INITIAL_MODE",this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new i(this.document,this.treeAdapter),this.activeFormattingElements=new a(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();const t=this.tokenizer.getNextToken();if(t.type===r.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===r.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){const e=this.pendingScript;return this.pendingScript=null,void t(e)}e&&e()}_setupTokenizerCDATAMode(){const e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==v.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,v.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode="TEXT_MODE"}switchToPlaintextParsing(){this.insertionMode="TEXT_MODE",this.originalInsertionMode="IN_BODY_MODE",this.tokenizer.state=r.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===g.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===v.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===g.TITLE||e===g.TEXTAREA?this.tokenizer.state=r.MODE.RCDATA:e===g.STYLE||e===g.XMP||e===g.IFRAME||e===g.NOEMBED||e===g.NOFRAMES||e===g.NOSCRIPT?this.tokenizer.state=r.MODE.RAWTEXT:e===g.SCRIPT?this.tokenizer.state=r.MODE.SCRIPT_DATA:e===g.PLAINTEXT&&(this.tokenizer.state=r.MODE.PLAINTEXT)}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){const t=this.treeAdapter.createElement(e,v.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,v.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(g.HTML,v.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){const t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;const n=this.treeAdapter.getNamespaceURI(t);if(n===v.HTML)return!1;if(this.treeAdapter.getTagName(t)===g.ANNOTATION_XML&&n===v.MATHML&&e.type===r.START_TAG_TOKEN&&e.tagName===g.SVG)return!1;const i=e.type===r.CHARACTER_TOKEN||e.type===r.NULL_CHARACTER_TOKEN||e.type===r.WHITESPACE_CHARACTER_TOKEN;return(!(e.type===r.START_TAG_TOKEN&&e.tagName!==g.MGLYPH&&e.tagName!==g.MALIGNMARK)&&!i||!this._isIntegrationPoint(t,v.MATHML))&&((e.type!==r.START_TAG_TOKEN&&!i||!this._isIntegrationPoint(t,v.HTML))&&e.type!==r.EOF_TOKEN)}_processToken(e){E[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){E.IN_BODY_MODE[e.type](this,e)}_processTokenInForeignContent(e){e.type===r.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e):e.type===r.NULL_CHARACTER_TOKEN?function(e,t){t.chars=p.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e):e.type===r.WHITESPACE_CHARACTER_TOKEN?L(this,e):e.type===r.COMMENT_TOKEN?D(this,e):e.type===r.START_TAG_TOKEN?function(e,t){if(h.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==v.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===v.MATHML?h.adjustTokenMathMLAttrs(t):r===v.SVG&&(h.adjustTokenSVGTagName(t),h.adjustTokenSVGAttrs(t)),h.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):e.type===r.END_TAG_TOKEN&&function(e,t){for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===v.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===r.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(f.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){const n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),i=this.treeAdapter.getAttrList(e);return h.isIntegrationPoint(n,r,i,t)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.length;if(e){let t=e,n=null;do{if(t--,n=this.activeFormattingElements.entries[t],n.type===a.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(let r=t;r<e;r++)n=this.activeFormattingElements.entries[r],this._insertElement(n.token,this.treeAdapter.getNamespaceURI(n.element)),n.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode="IN_ROW_MODE"}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop,t=!1;e>=0;e--){let n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));const r=this.treeAdapter.getTagName(n),i=_[r];if(i){this.insertionMode=i;break}if(!(t||r!==g.TD&&r!==g.TH)){this.insertionMode="IN_CELL_MODE";break}if(!t&&r===g.HEAD){this.insertionMode="IN_HEAD_MODE";break}if(r===g.SELECT){this._resetInsertionModeForSelect(e);break}if(r===g.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===g.HTML){this.insertionMode=this.headElement?"AFTER_HEAD_MODE":"BEFORE_HEAD_MODE";break}if(t){this.insertionMode="IN_BODY_MODE";break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.items[t],n=this.treeAdapter.getTagName(e);if(n===g.TEMPLATE)break;if(n===g.TABLE)return void(this.insertionMode="IN_SELECT_IN_TABLE_MODE")}this.insertionMode="IN_SELECT_MODE"}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){const t=this.treeAdapter.getTagName(e);return t===g.TABLE||t===g.TBODY||t===g.TFOOT||t===g.THEAD||t===g.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),i=this.treeAdapter.getNamespaceURI(n);if(r===g.TEMPLATE&&i===v.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(r===g.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return m.SPECIAL_ELEMENTS[n][t]}}},function(e,t,n){"use strict";const r=n(536),i=n(537),a=r.CODE_POINTS;e.exports=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){const t=this.html.charCodeAt(this.pos+1);if(r.isSurrogatePair(t))return this.pos++,this._addGap(),r.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,a.EOF;return this._err(i.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,a.EOF;let e=this.html.charCodeAt(this.pos);if(this.skipNextNewLine&&e===a.LINE_FEED)return this.skipNextNewLine=!1,this._addGap(),this.advance();if(e===a.CARRIAGE_RETURN)return this.skipNextNewLine=!0,a.LINE_FEED;return this.skipNextNewLine=!1,r.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===a.LINE_FEED||e===a.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){r.isControlCodePoint(e)?this._err(i.controlCharacterInInputStream):r.isUndefinedCodePoint(e)&&this._err(i.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}},function(e,t,n){"use strict";e.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},function(e,t,n){"use strict";const r=n(240),i=r.TAG_NAMES,a=r.NAMESPACES;function o(e){switch(e.length){case 1:return e===i.P;case 2:return e===i.RB||e===i.RP||e===i.RT||e===i.DD||e===i.DT||e===i.LI;case 3:return e===i.RTC;case 6:return e===i.OPTION;case 8:return e===i.OPTGROUP}return!1}function s(e){switch(e.length){case 1:return e===i.P;case 2:return e===i.RB||e===i.RP||e===i.RT||e===i.DD||e===i.DT||e===i.LI||e===i.TD||e===i.TH||e===i.TR;case 3:return e===i.RTC;case 5:return e===i.TBODY||e===i.TFOOT||e===i.THEAD;case 6:return e===i.OPTION;case 7:return e===i.CAPTION;case 8:return e===i.OPTGROUP||e===i.COLGROUP}return!1}function l(e,t){switch(e.length){case 2:if(e===i.TD||e===i.TH)return t===a.HTML;if(e===i.MI||e===i.MO||e===i.MN||e===i.MS)return t===a.MATHML;break;case 4:if(e===i.HTML)return t===a.HTML;if(e===i.DESC)return t===a.SVG;break;case 5:if(e===i.TABLE)return t===a.HTML;if(e===i.MTEXT)return t===a.MATHML;if(e===i.TITLE)return t===a.SVG;break;case 6:return(e===i.APPLET||e===i.OBJECT)&&t===a.HTML;case 7:return(e===i.CAPTION||e===i.MARQUEE)&&t===a.HTML;case 8:return e===i.TEMPLATE&&t===a.HTML;case 13:return e===i.FOREIGN_OBJECT&&t===a.SVG;case 14:return e===i.ANNOTATION_XML&&t===a.MATHML}return!1}e.exports=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===i.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===a.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){const n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===a.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){const t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.H1||e===i.H2||e===i.H3||e===i.H4||e===i.H5||e===i.H6&&t===a.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.TD||e===i.TH&&t===a.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==i.TABLE&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==a.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==i.TBODY&&this.currentTagName!==i.TFOOT&&this.currentTagName!==i.THEAD&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==a.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==i.TR&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==a.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const e=this.items[1];return e&&this.treeAdapter.getTagName(e)===i.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===i.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===a.HTML)return!0;if(l(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===i.H1||t===i.H2||t===i.H3||t===i.H4||t===i.H5||t===i.H6)&&n===a.HTML)return!0;if(l(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===a.HTML)return!0;if((n===i.UL||n===i.OL)&&r===a.HTML||l(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===a.HTML)return!0;if(n===i.BUTTON&&r===a.HTML||l(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===a.HTML){if(n===e)return!0;if(n===i.TABLE||n===i.TEMPLATE||n===i.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===a.HTML){if(t===i.TBODY||t===i.THEAD||t===i.TFOOT)return!0;if(t===i.TABLE||t===i.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===a.HTML){if(n===e)return!0;if(n!==i.OPTION&&n!==i.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;o(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;s(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;o(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}},function(e,t,n){"use strict";class r{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){const t=[];if(this.length>=3){const n=this.treeAdapter.getAttrList(e).length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const o=this.entries[e];if(o.type===r.MARKER_ENTRY)break;const s=o.element,l=this.treeAdapter.getAttrList(s);this.treeAdapter.getTagName(s)===i&&this.treeAdapter.getNamespaceURI(s)===a&&l.length===n&&t.push({idx:e,attrs:l})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let n=t.length;if(n){const r=this.treeAdapter.getAttrList(e),i=r.length,a=Object.create(null);for(let e=0;e<i;e++){const t=r[e];a[t.name]=t.value}for(let e=0;e<i;e++)for(let r=0;r<n;r++){const i=t[r].attrs[e];if(a[i.name]!==i.value&&(t.splice(r,1),n--),t.length<3)return}for(let e=n-1;e>=2;e--)this.entries.splice(t[e].idx,1),this.length--}}insertMarker(){this.entries.push({type:r.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:r.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:r.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===r.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===r.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===r.ELEMENT_ENTRY&&n.element===e)return n}return null}}r.MARKER_ENTRY="MARKER_ENTRY",r.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=r},function(e,t,n){"use strict";const r=n(202),i=n(381),a=n(991),o=n(1769),s=n(240).TAG_NAMES;e.exports=class extends r{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),a={};t.type===i.END_TAG_TOKEN&&r===t.tagName?(a.endTag=Object.assign({},n),a.endLine=n.endLine,a.endCol=n.endCol,a.endOffset=n.endOffset):(a.endLine=n.startLine,a.endCol=n.startCol,a.endOffset=n.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}_getOverriddenMethods(e,t){return{_bootstrap(n,i){t._bootstrap.call(this,n,i),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const s=r.install(this.tokenizer,a);e.posTracker=s.posTracker,r.install(this.openElements,o,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===i.END_TAG_TOKEN&&(n.tagName===s.HTML||n.tagName===s.BODY&&this.openElements.hasInScope(s.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];if(this.treeAdapter.getTagName(r)===n.tagName){e._setEndLocation(r,n);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const n=this.treeAdapter.getChildNodes(this.document),r=n.length;for(let t=0;t<r;t++){const r=n[t];if(this.treeAdapter.isDocumentTypeNode(r)){this.treeAdapter.setNodeSourceCodeLocation(r,e.location);break}}},_attachElementToTree(n){e._setStartLocation(n),e.lastStartTagToken=null,t._attachElementToTree.call(this,n)},_appendElement(n,r){e.lastStartTagToken=n,t._appendElement.call(this,n,r)},_insertElement(n,r){e.lastStartTagToken=n,t._insertElement.call(this,n,r)},_insertTemplate(n){e.lastStartTagToken=n,t._insertTemplate.call(this,n);const r=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(r,null)},_insertFakeRootElement(){t._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(e,n){t._appendCommentNode.call(this,e,n);const r=this.treeAdapter.getChildNodes(n),i=r[r.length-1];this.treeAdapter.setNodeSourceCodeLocation(i,e.location)},_findFosterParentingLocation(){return e.lastFosterParentingLocation=t._findFosterParentingLocation.call(this),e.lastFosterParentingLocation},_insertCharacters(n){t._insertCharacters.call(this,n);const r=this._shouldFosterParentOnInsertion(),i=r&&e.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,a=this.treeAdapter.getChildNodes(i),o=r&&e.lastFosterParentingLocation.beforeElement?a.indexOf(e.lastFosterParentingLocation.beforeElement)-1:a.length-1,s=a[o];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:e,endCol:t,endOffset:r}=n.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:e,endCol:t,endOffset:r})}else this.treeAdapter.setNodeSourceCodeLocation(s,n.location)}}}}},function(e,t,n){"use strict";const r=n(202);e.exports=class extends r{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let t=this.stackTop;t>0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}}},function(e,t,n){"use strict";const r=n(538),i=n(1771),a=n(991),o=n(202);e.exports=class extends r{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),o.install(this.tokenizer,i,e.opts),o.install(this.tokenizer,a)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t)}}}}},function(e,t,n){"use strict";const r=n(538),i=n(1772),a=n(202);e.exports=class extends r{constructor(e,t){super(e,t);const n=a.install(e.preprocessor,i,t);this.posTracker=n.posTracker}}},function(e,t,n){"use strict";const r=n(538),i=n(992),a=n(202);e.exports=class extends r{constructor(e,t){super(e,t),this.posTracker=a.install(e,i),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}}},function(e,t,n){"use strict";const r=n(381),i=n(240),a=i.TAG_NAMES,o=i.NAMESPACES,s=i.ATTRS,l="text/html",c="application/xhtml+xml",u={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},d={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:o.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:o.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:o.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:o.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:o.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:o.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:o.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:o.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:o.XML},"xml:space":{prefix:"xml",name:"space",namespace:o.XML},xmlns:{prefix:"",name:"xmlns",namespace:o.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:o.XMLNS}},h=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},f={[a.B]:!0,[a.BIG]:!0,[a.BLOCKQUOTE]:!0,[a.BODY]:!0,[a.BR]:!0,[a.CENTER]:!0,[a.CODE]:!0,[a.DD]:!0,[a.DIV]:!0,[a.DL]:!0,[a.DT]:!0,[a.EM]:!0,[a.EMBED]:!0,[a.H1]:!0,[a.H2]:!0,[a.H3]:!0,[a.H4]:!0,[a.H5]:!0,[a.H6]:!0,[a.HEAD]:!0,[a.HR]:!0,[a.I]:!0,[a.IMG]:!0,[a.LI]:!0,[a.LISTING]:!0,[a.MENU]:!0,[a.META]:!0,[a.NOBR]:!0,[a.OL]:!0,[a.P]:!0,[a.PRE]:!0,[a.RUBY]:!0,[a.S]:!0,[a.SMALL]:!0,[a.SPAN]:!0,[a.STRONG]:!0,[a.STRIKE]:!0,[a.SUB]:!0,[a.SUP]:!0,[a.TABLE]:!0,[a.TT]:!0,[a.U]:!0,[a.UL]:!0,[a.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return!!(t===a.FONT&&(null!==r.getTokenAttr(e,s.COLOR)||null!==r.getTokenAttr(e,s.SIZE)||null!==r.getTokenAttr(e,s.FACE)))||f[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}},t.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=u[e.attrs[t].name];n&&(e.attrs[t].name=n)}},t.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=d[e.attrs[t].name];n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}},t.adjustTokenSVGTagName=function(e){const t=h[e.tagName];t&&(e.tagName=t)},t.isIntegrationPoint=function(e,t,n,r){return!(r&&r!==o.HTML||!function(e,t,n){if(t===o.MATHML&&e===a.ANNOTATION_XML)for(let e=0;e<n.length;e++)if(n[e].name===s.ENCODING){const t=n[e].value.toLowerCase();return t===l||t===c}return t===o.SVG&&(e===a.FOREIGN_OBJECT||e===a.DESC||e===a.TITLE)}(e,t,n))||!(r&&r!==o.MATHML||!function(e,t){return t===o.MATHML&&(e===a.MI||e===a.MO||e===a.MN||e===a.MS||e===a.MTEXT)}(e,t))}},function(e,t,n){"use strict";const r=n(993),i=n(994),a=n(995),o=n(240),s=o.TAG_NAMES,l=o.NAMESPACES,c={treeAdapter:r},u=/&/g,d=/\u00a0/g,h=/"/g,f=/</g,p=/>/g;class m{constructor(e,t){this.options=i(c,t),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=e}serialize(){return this._serializeChildNodes(this.startNode),this.html}_serializeChildNodes(e){const t=this.treeAdapter.getChildNodes(e);if(t)for(let e=0,n=t.length;e<n;e++){const n=t[e];this.treeAdapter.isElementNode(n)?this._serializeElement(n):this.treeAdapter.isTextNode(n)?this._serializeTextNode(n):this.treeAdapter.isCommentNode(n)?this._serializeCommentNode(n):this.treeAdapter.isDocumentTypeNode(n)&&this._serializeDocumentTypeNode(n)}}_serializeElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);if(this.html+="<"+t,this._serializeAttributes(e),this.html+=">",t!==s.AREA&&t!==s.BASE&&t!==s.BASEFONT&&t!==s.BGSOUND&&t!==s.BR&&t!==s.COL&&t!==s.EMBED&&t!==s.FRAME&&t!==s.HR&&t!==s.IMG&&t!==s.INPUT&&t!==s.KEYGEN&&t!==s.LINK&&t!==s.META&&t!==s.PARAM&&t!==s.SOURCE&&t!==s.TRACK&&t!==s.WBR){const r=t===s.TEMPLATE&&n===l.HTML?this.treeAdapter.getTemplateContent(e):e;this._serializeChildNodes(r),this.html+="</"+t+">"}}_serializeAttributes(e){const t=this.treeAdapter.getAttrList(e);for(let e=0,n=t.length;e<n;e++){const n=t[e],r=m.escapeString(n.value,!0);this.html+=" ",n.namespace?n.namespace===l.XML?this.html+="xml:"+n.name:n.namespace===l.XMLNS?("xmlns"!==n.name&&(this.html+="xmlns:"),this.html+=n.name):n.namespace===l.XLINK?this.html+="xlink:"+n.name:this.html+=n.prefix+":"+n.name:this.html+=n.name,this.html+='="'+r+'"'}}_serializeTextNode(e){const t=this.treeAdapter.getTextNodeContent(e),n=this.treeAdapter.getParentNode(e);let r=void 0;n&&this.treeAdapter.isElementNode(n)&&(r=this.treeAdapter.getTagName(n)),r===s.STYLE||r===s.SCRIPT||r===s.XMP||r===s.IFRAME||r===s.NOEMBED||r===s.NOFRAMES||r===s.PLAINTEXT||r===s.NOSCRIPT?this.html+=t:this.html+=m.escapeString(t,!1)}_serializeCommentNode(e){this.html+="\x3c!--"+this.treeAdapter.getCommentNodeContent(e)+"--\x3e"}_serializeDocumentTypeNode(e){const t=this.treeAdapter.getDocumentTypeNodeName(e);this.html+="<"+a.serializeContent(t,null,null)+">"}}m.escapeString=function(e,t){return e=e.replace(u,"&amp;").replace(d,"&nbsp;"),e=t?e.replace(h,"&quot;"):e.replace(f,"&lt;").replace(p,"&gt;")},e.exports=m},function(e,t,n){"use strict";const r=n(1776),{DOCUMENT_MODE:i}=n(996),a={element:1,text:3,cdata:4,comment:8},o={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};class s{constructor(e){for(const t of Object.keys(e))this[t]=e[t]}get firstChild(){const e=this.children;return e&&e[0]||null}get lastChild(){const e=this.children;return e&&e[e.length-1]||null}get nodeType(){return a[this.type]||a.element}}Object.keys(o).forEach(e=>{const t=o[e];Object.defineProperty(s.prototype,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})}),t.createDocument=function(){return new s({type:"root",name:"root",parent:null,prev:null,next:null,children:[],"x-mode":i.NO_QUIRKS})},t.createDocumentFragment=function(){return new s({type:"root",name:"root",parent:null,prev:null,next:null,children:[]})},t.createElement=function(e,t,n){const r=Object.create(null),i=Object.create(null),a=Object.create(null);for(let e=0;e<n.length;e++){const t=n[e].name;r[t]=n[e].value,i[t]=n[e].namespace,a[t]=n[e].prefix}return new s({type:"script"===e||"style"===e?e:"tag",name:e,namespace:t,attribs:r,"x-attribsNamespace":i,"x-attribsPrefix":a,children:[],parent:null,prev:null,next:null})},t.createCommentNode=function(e){return new s({type:"comment",data:e,parent:null,prev:null,next:null})};const l=function(e){return new s({type:"text",data:e,parent:null,prev:null,next:null})},c=t.appendChild=function(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},u=t.insertBefore=function(e,t,n){const r=e.children.indexOf(n),i=n.prev;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e};t.setTemplateContent=function(e,t){c(e,t)},t.getTemplateContent=function(e){return e.children[0]},t.setDocumentType=function(e,t,n,i){const a=r.serializeContent(t,n,i);let o=null;for(let t=0;t<e.children.length;t++)if("directive"===e.children[t].type&&"!doctype"===e.children[t].name){o=e.children[t];break}o?(o.data=a,o["x-name"]=t,o["x-publicId"]=n,o["x-systemId"]=i):c(e,new s({type:"directive",name:"!doctype",data:a,"x-name":t,"x-publicId":n,"x-systemId":i}))},t.setDocumentMode=function(e,t){e["x-mode"]=t},t.getDocumentMode=function(e){return e["x-mode"]},t.detachNode=function(e){if(e.parent){const t=e.parent.children.indexOf(e),n=e.prev,r=e.next;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},t.insertText=function(e,t){const n=e.children[e.children.length-1];n&&"text"===n.type?n.data+=t:c(e,l(t))},t.insertTextBefore=function(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&"text"===r.type?r.data+=t:u(e,l(t),n)},t.adoptAttributes=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;void 0===e.attribs[r]&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},t.getFirstChild=function(e){return e.children[0]},t.getChildNodes=function(e){return e.children},t.getParentNode=function(e){return e.parent},t.getAttrList=function(e){const t=[];for(const n in e.attribs)t.push({name:n,value:e.attribs[n],namespace:e["x-attribsNamespace"][n],prefix:e["x-attribsPrefix"][n]});return t},t.getTagName=function(e){return e.name},t.getNamespaceURI=function(e){return e.namespace},t.getTextNodeContent=function(e){return e.data},t.getCommentNodeContent=function(e){return e.data},t.getDocumentTypeNodeName=function(e){return e["x-name"]},t.getDocumentTypeNodePublicId=function(e){return e["x-publicId"]},t.getDocumentTypeNodeSystemId=function(e){return e["x-systemId"]},t.isTextNode=function(e){return"text"===e.type},t.isCommentNode=function(e){return"comment"===e.type},t.isDocumentTypeNode=function(e){return"directive"===e.type&&"!doctype"===e.name},t.isElementNode=function(e){return!!e.attribs},t.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t},t.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation},t.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t)}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(996),i=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],a=i.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),o=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],s=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],l=s.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function c(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function u(e,t){for(let n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return!0;return!1}t.isConforming=function(e){return"html"===e.name&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},t.getDocumentMode=function(e){if("html"!==e.name)return r.QUIRKS;const t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return r.QUIRKS;let n=e.publicId;if(null!==n){if(n=n.toLowerCase(),o.indexOf(n)>-1)return r.QUIRKS;let e=null===t?a:i;if(u(n,e))return r.QUIRKS;if(e=null===t?s:l,u(n,e))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},t.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+c(t):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+c(n)),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cheerio=void 0;var r=n(216),i=r.__importDefault(n(539)),a=r.__importDefault(n(530)),o=n(241),s=r.__importStar(n(1778)),l=r.__importStar(n(1779)),c=r.__importStar(n(1780)),u=r.__importStar(n(1781)),d=r.__importStar(n(1782)),h=function(){function e(e,t,n,r){var s=this;if(void 0===r&&(r=a.default),this.length=0,this.options=r,!e)return this;if(n&&("string"==typeof n&&(n=i.default(n,this.options,!1)),this._root=new this.constructor(n,null,null,this.options),this._root._root=this._root),o.isCheerio(e))return e;var l,c="string"==typeof e&&o.isHtml(e)?i.default(e,this.options,!1).children:(l=e).name||"root"===l.type||"text"===l.type||"comment"===l.type?[e]:Array.isArray(e)?e:null;if(c)return c.forEach((function(e,t){s[t]=e})),this.length=c.length,this;var u=e,d=t?"string"==typeof t?o.isHtml(t)?this._make(i.default(t,this.options,!1)):(u=t+" "+u,this._root):o.isCheerio(t)?t:this._make(t):this._root;return d?d.find(u):this}return e.prototype._make=function(e,t){var n=new this.constructor(e,t,this._root,this.options);return n.prevObject=this,n},e}();t.Cheerio=h,h.prototype.cheerio="[cheerio object]",h.prototype.splice=Array.prototype.splice,h.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(h.prototype,s,l,c,u,d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toggleClass=t.removeClass=t.addClass=t.hasClass=t.removeAttr=t.val=t.data=t.prop=t.attr=void 0;var r=n(319),i=n(241),a=Object.prototype.hasOwnProperty,o=/\s+/,s={null:null,true:!0,false:!1},l=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,c=/^{[^]*}$|^\[[^]*]$/;function u(e,t,n){var o;if(e&&i.isTag(e))return null!==(o=e.attribs)&&void 0!==o||(e.attribs={}),t?a.call(e.attribs,t)?!n&&l.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?r.text(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function d(e,t,n){null===n?g(e,t):e.attribs[t]=""+n}function h(e,t,n){if(e&&i.isTag(e))return t in e?e[t]:!n&&l.test(t)?void 0!==u(e,t,!1):u(e,t,n)}function f(e,t,n,r){t in e?e[t]=n:d(e,t,!r&&l.test(t)?n?"":null:""+n)}function p(e,t,n){var r,i=e;null!==(r=i.data)&&void 0!==r||(i.data={}),"object"==typeof t?Object.assign(i.data,t):"string"==typeof t&&void 0!==n&&(i.data[t]=n)}function m(e,t){var n,r,o;null==t?r=(n=Object.keys(e.attribs).filter((function(e){return e.startsWith("data-")}))).map((function(e){return i.camelCase(e.slice("data-".length))})):(n=["data-"+i.cssCase(t)],r=[t]);for(var l=0;l<n.length;++l){var u=n[l],d=r[l];if(a.call(e.attribs,u)&&!a.call(e.data,d)){if(o=e.attribs[u],a.call(s,o))o=s[o];else if(o===String(Number(o)))o=Number(o);else if(c.test(o))try{o=JSON.parse(o)}catch(e){}e.data[d]=o}}return null==t?e.data:o}function g(e,t){e.attribs&&a.call(e.attribs,t)&&delete e.attribs[t]}function v(e){return e?e.trim().split(o):[]}t.attr=function(e,t){if("object"==typeof e||void 0!==t){if("function"==typeof t){if("string"!=typeof e)throw new Error("Bad combination of arguments.");return i.domEach(this,(function(n,r){i.isTag(n)&&d(n,e,t.call(n,r,n.attribs[e]))}))}return i.domEach(this,(function(n){i.isTag(n)&&("object"==typeof e?Object.keys(e).forEach((function(t){var r=e[t];d(n,t,r)})):d(n,e,t))}))}return arguments.length>1?this:u(this[0],e,this.options.xmlMode)},t.prop=function(e,t){var n=this;if("string"==typeof e&&void 0===t)switch(e){case"style":var r=this.css(),a=Object.keys(r);return a.forEach((function(e,t){r[t]=e})),r.length=a.length,r;case"tagName":case"nodeName":var o=this[0];return i.isTag(o)?o.name.toUpperCase():void 0;case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return h(this[0],e,this.options.xmlMode)}if("object"==typeof e||void 0!==t){if("function"==typeof t){if("object"==typeof e)throw new Error("Bad combination of arguments.");return i.domEach(this,(function(r,a){i.isTag(r)&&f(r,e,t.call(r,a,h(r,e,n.options.xmlMode)),n.options.xmlMode)}))}return i.domEach(this,(function(r){i.isTag(r)&&("object"==typeof e?Object.keys(e).forEach((function(t){var i=e[t];f(r,t,i,n.options.xmlMode)})):f(r,e,t,n.options.xmlMode))}))}},t.data=function(e,t){var n,r=this[0];if(r&&i.isTag(r)){var o=r;return null!==(n=o.data)&&void 0!==n||(o.data={}),e?"object"==typeof e||void 0!==t?(i.domEach(this,(function(n){i.isTag(n)&&("object"==typeof e?p(n,e):p(n,e,t))})),this):a.call(o.data,e)?o.data[e]:m(o,e):m(o)}},t.val=function(e){var t=0===arguments.length,n=this[0];if(!n||!i.isTag(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":var a=this.find("option:selected");if(!t){if(null==this.attr("multiple")&&"object"==typeof e)return this;this.find("option").removeAttr("selected");for(var o="object"!=typeof e?[e]:e,s=0;s<o.length;s++)this.find('option[value="'+o[s]+'"]').attr("selected","");return this}return this.attr("multiple")?a.toArray().map((function(e){return r.text(e.children)})):a.attr("value");case"input":case"option":return t?this.attr("value"):this.attr("value",e)}},t.removeAttr=function(e){for(var t=v(e),n=function(e){i.domEach(r,(function(n){i.isTag(n)&&g(n,t[e])}))},r=this,a=0;a<t.length;a++)n(a);return this},t.hasClass=function(e){return this.toArray().some((function(t){var n=i.isTag(t)&&t.attribs.class,r=-1;if(n&&e.length)for(;(r=n.indexOf(e,r+1))>-1;){var a=r+e.length;if((0===r||o.test(n[r-1]))&&(a===n.length||o.test(n[a])))return!0}return!1}))},t.addClass=function e(t){if("function"==typeof t)return i.domEach(this,(function(n,r){if(i.isTag(n)){var a=n.attribs.class||"";e.call([n],t.call(n,r,a))}}));if(!t||"string"!=typeof t)return this;for(var n=t.split(o),r=this.length,a=0;a<r;a++){var s=this[a];if(i.isTag(s)){var l=u(s,"class",!1);if(l){for(var c=" "+l+" ",h=0;h<n.length;h++){var f=n[h]+" ";c.includes(" "+f)||(c+=f)}d(s,"class",c.trim())}else d(s,"class",n.join(" ").trim())}}return this},t.removeClass=function e(t){if("function"==typeof t)return i.domEach(this,(function(n,r){i.isTag(n)&&e.call([n],t.call(n,r,n.attribs.class||""))}));var n=v(t),r=n.length,a=0===arguments.length;return i.domEach(this,(function(e){if(i.isTag(e))if(a)e.attribs.class="";else{for(var t=v(e.attribs.class),o=!1,s=0;s<r;s++){var l=t.indexOf(n[s]);l>=0&&(t.splice(l,1),o=!0,s--)}o&&(e.attribs.class=t.join(" "))}}))},t.toggleClass=function e(t,n){if("function"==typeof t)return i.domEach(this,(function(r,a){i.isTag(r)&&e.call([r],t.call(r,a,r.attribs.class||"",n),n)}));if(!t||"string"!=typeof t)return this;for(var r=t.split(o),a=r.length,s="boolean"==typeof n?n?1:-1:0,l=this.length,c=0;c<l;c++){var u=this[c];if(i.isTag(u)){for(var d=v(u.attribs.class),h=0;h<a;h++){var f=d.indexOf(r[h]);s>=0&&f<0?d.push(r[h]):s<=0&&f>=0&&d.splice(f,1)}u.attribs.class=d.join(" ")}}return this}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addBack=t.add=t.end=t.slice=t.index=t.toArray=t.get=t.eq=t.last=t.first=t.has=t.not=t.is=t.filterArray=t.filter=t.map=t.each=t.contents=t.children=t.siblings=t.prevUntil=t.prevAll=t.prev=t.nextUntil=t.nextAll=t.next=t.closest=t.parentsUntil=t.parents=t.parent=t.find=void 0;var r=n(216),i=n(148),a=r.__importStar(n(966)),o=n(241),s=n(319),l=n(275),c=l.DomUtils.uniqueSort,u=/^\s*[~+]/;function d(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return function(r){var i,a=e(t,this);return r&&(a=v(a,r,this.options.xmlMode,null===(i=this._root)||void 0===i?void 0:i[0])),this._make(this.length>1&&a.length>1?n.reduce((function(e,t){return t(e)}),a):a)}}}t.find=function(e){var t;if(!e)return this._make([]);var n=this.toArray();if("string"!=typeof e){var r=o.isCheerio(e)?e.toArray():[e];return this._make(r.filter((function(e){return n.some((function(t){return s.contains(t,e)}))})))}var i=u.test(e)?n:this.children().toArray(),l={context:n,root:null===(t=this._root)||void 0===t?void 0:t[0],xmlMode:this.options.xmlMode};return this._make(a.select(e,i,l))};var h=d((function(e,t){for(var n,r=[],i=0;i<t.length;i++){var a=e(t[i]);r.push(a)}return(n=new Array).concat.apply(n,r)})),f=d((function(e,t){for(var n=[],r=0;r<t.length;r++){var i=e(t[r]);null!==i&&n.push(i)}return n}));function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=null,s=d((function(e,t){var n=[];return o.domEach(t,(function(t){for(var r;(r=e(t))&&(null==i?!void 0:!i(r,n.length));t=r)n.push(r)})),n})).apply(void 0,r.__spreadArray([e],t));return function(e,t){var n=this;i="string"==typeof e?function(t){return a.is(t,e,n.options)}:e?g(e):null;var r=s.call(this,t);return i=null,r}}function m(e){return Array.from(new Set(e))}function g(e){return"function"==typeof e?function(t,n){return e.call(t,n,t)}:o.isCheerio(e)?function(t){return Array.prototype.includes.call(e,t)}:function(t){return e===t}}function v(e,t,n,r){return"string"==typeof t?a.filter(t,e,{xmlMode:n,root:r}):e.filter(g(t))}t.parent=f((function(e){var t=e.parent;return t&&!i.isDocument(t)?t:null}),m),t.parents=h((function(e){for(var t=[];e.parent&&!i.isDocument(e.parent);)t.push(e.parent),e=e.parent;return t}),c,(function(e){return e.reverse()})),t.parentsUntil=p((function(e){var t=e.parent;return t&&!i.isDocument(t)?t:null}),c,(function(e){return e.reverse()})),t.closest=function(e){var t=this,n=[];return e?(o.domEach(this,(function(r){for(var i;r&&"root"!==r.type;){if(!e||v([r],e,t.options.xmlMode,null===(i=t._root)||void 0===i?void 0:i[0]).length){r&&!n.includes(r)&&n.push(r);break}r=r.parent}})),this._make(n)):this._make(n)},t.next=f((function(e){return l.DomUtils.nextElementSibling(e)})),t.nextAll=h((function(e){for(var t=[];e.next;)e=e.next,o.isTag(e)&&t.push(e);return t}),m),t.nextUntil=p((function(e){return l.DomUtils.nextElementSibling(e)}),m),t.prev=f((function(e){return l.DomUtils.prevElementSibling(e)})),t.prevAll=h((function(e){for(var t=[];e.prev;)e=e.prev,o.isTag(e)&&t.push(e);return t}),m),t.prevUntil=p((function(e){return l.DomUtils.prevElementSibling(e)}),m),t.siblings=h((function(e){return l.DomUtils.getSiblings(e).filter((function(t){return o.isTag(t)&&t!==e}))}),c),t.children=h((function(e){return l.DomUtils.getChildren(e).filter(o.isTag)}),m),t.contents=function(){var e=this.toArray().reduce((function(e,t){return i.hasChildren(t)?e.concat(t.children):e}),[]);return this._make(e)},t.each=function(e){for(var t=0,n=this.length;t<n&&!1!==e.call(this[t],t,this[t]);)++t;return this},t.map=function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n],i=e.call(r,n,r);null!=i&&(t=t.concat(i))}return this._make(t)},t.filter=function(e){var t;return this._make(v(this.toArray(),e,this.options.xmlMode,null===(t=this._root)||void 0===t?void 0:t[0]))},t.filterArray=v,t.is=function(e){var t=this.toArray();return"string"==typeof e?a.some(t.filter(o.isTag),e,this.options):!!e&&t.some(g(e))},t.not=function(e){var t=this.toArray();if("string"==typeof e){var n=new Set(a.filter(e,t,this.options));t=t.filter((function(e){return!n.has(e)}))}else{var r=g(e);t=t.filter((function(e,t){return!r(e,t)}))}return this._make(t)},t.has=function(e){var t=this;return this.filter("string"==typeof e?":has("+e+")":function(n,r){return t._make(r).find(e).length>0})},t.first=function(){return this.length>1?this._make(this[0]):this},t.last=function(){return this.length>0?this._make(this[this.length-1]):this},t.eq=function(e){var t;return 0===(e=+e)&&this.length<=1?this:(e<0&&(e=this.length+e),this._make(null!==(t=this[e])&&void 0!==t?t:[]))},t.get=function(e){return null==e?this.toArray():this[e<0?this.length+e:e]},t.toArray=function(){return Array.prototype.slice.call(this)},t.index=function(e){var t,n;return null==e?(t=this.parent().children(),n=this[0]):"string"==typeof e?(t=this._make(e),n=this[0]):(t=this,n=o.isCheerio(e)?e[0]:e),Array.prototype.indexOf.call(t,n)},t.slice=function(e,t){return this._make(Array.prototype.slice.call(this,e,t))},t.end=function(){var e;return null!==(e=this.prevObject)&&void 0!==e?e:this._make([])},t.add=function(e,t){var n=this._make(e,t),i=c(r.__spreadArray(r.__spreadArray([],this.get()),n.get()));return this._make(i)},t.addBack=function(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=t.text=t.toString=t.html=t.empty=t.replaceWith=t.remove=t.insertBefore=t.before=t.insertAfter=t.after=t.wrapAll=t.unwrap=t.wrapInner=t.wrap=t.prepend=t.append=t.prependTo=t.appendTo=t._makeDomArray=void 0;var r=n(216),i=n(148),a=n(148),o=r.__importStar(n(539)),s=n(319),l=n(241),c=n(275);function u(e){return function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=this.length-1;return l.domEach(this,(function(r,o){if(i.hasChildren(r)){var l="function"==typeof n[0]?n[0].call(r,o,s.html(r.children)):n,c=t._makeDomArray(l,o<a);e(c,r.children,r)}}))}}function d(e,t,n,i,a){for(var o,s,l=r.__spreadArray([t,n],i),c=e[t-1]||null,u=e[t+n]||null,d=0;d<i.length;++d){var h=i[d],f=h.parent;if(f){var p=f.children.indexOf(i[d]);p>-1&&(f.children.splice(p,1),a===f&&t>p&&l[0]--)}h.parent=a,h.prev&&(h.prev.next=null!==(o=h.next)&&void 0!==o?o:null),h.next&&(h.next.prev=null!==(s=h.prev)&&void 0!==s?s:null),h.prev=i[d-1]||c,h.next=i[d+1]||u}return c&&(c.next=i[0]),u&&(u.prev=i[i.length-1]),e.splice.apply(e,l)}function h(e){return function(t){for(var n=this.length-1,r=this.parents().last(),i=0;i<this.length;i++){var a=this[i],o="function"==typeof t?t.call(a,i,a):"string"!=typeof t||l.isHtml(t)?t:r.find(t).clone(),s=this._makeDomArray(o,i<n)[0];if(s&&c.DomUtils.hasChildren(s)){for(var u=s,d=0;d<u.children.length;){var h=u.children[d];l.isTag(h)?(u=h,d=0):d++}e(a,u,[s])}}return this}}t._makeDomArray=function(e,t){var n=this;return null==e?[]:l.isCheerio(e)?t?l.cloneDom(e.get()):e.get():Array.isArray(e)?e.reduce((function(e,r){return e.concat(n._makeDomArray(r,t))}),[]):"string"==typeof e?o.default(e,this.options,!1).children:t?l.cloneDom([e]):[e]},t.appendTo=function(e){return(l.isCheerio(e)?e:this._make(e)).append(this),this},t.prependTo=function(e){return(l.isCheerio(e)?e:this._make(e)).prepend(this),this},t.append=u((function(e,t,n){d(t,t.length,0,e,n)})),t.prepend=u((function(e,t,n){d(t,0,0,e,n)})),t.wrap=h((function(e,t,n){var r=e.parent;if(r){var i=r.children,a=i.indexOf(e);o.update([e],t),d(i,a,0,n,r)}})),t.wrapInner=h((function(e,t,n){i.hasChildren(e)&&(o.update(e.children,t),o.update(n,e))})),t.unwrap=function(e){var t=this;return this.parent(e).not("body").each((function(e,n){t._make(n).replaceWith(n.children)})),this},t.wrapAll=function(e){var t=this[0];if(t){for(var n=this._make("function"==typeof e?e.call(t,0,t):e).insertBefore(t),r=void 0,i=0;i<n.length;i++)"tag"===n[i].type&&(r=n[i]);for(var a=0;r&&a<r.children.length;){var o=r.children[a];"tag"===o.type?(r=o,a=0):a++}r&&this._make(r).append(this)}return this},t.after=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.length-1;return l.domEach(this,(function(n,i){var a=n.parent;if(c.DomUtils.hasChildren(n)&&a){var o=a.children,l=o.indexOf(n);if(!(l<0)){var u="function"==typeof t[0]?t[0].call(n,i,s.html(n.children)):t;d(o,l+1,0,e._makeDomArray(u,i<r),a)}}}))},t.insertAfter=function(e){var t=this;"string"==typeof e&&(e=this._make(e)),this.remove();var n=[];return this._makeDomArray(e).forEach((function(e){var r=t.clone().toArray(),i=e.parent;if(i){var a=i.children,o=a.indexOf(e);o<0||(d(a,o+1,0,r,i),n.push.apply(n,r))}})),this._make(n)},t.before=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.length-1;return l.domEach(this,(function(n,i){var a=n.parent;if(c.DomUtils.hasChildren(n)&&a){var o=a.children,l=o.indexOf(n);if(!(l<0)){var u="function"==typeof t[0]?t[0].call(n,i,s.html(n.children)):t;d(o,l,0,e._makeDomArray(u,i<r),a)}}}))},t.insertBefore=function(e){var t=this,n=this._make(e);this.remove();var r=[];return l.domEach(n,(function(e){var n=t.clone().toArray(),i=e.parent;if(i){var a=i.children,o=a.indexOf(e);o<0||(d(a,o,0,n,i),r.push.apply(r,n))}})),this._make(r)},t.remove=function(e){var t=e?this.filter(e):this;return l.domEach(t,(function(e){c.DomUtils.removeElement(e),e.prev=e.next=e.parent=null})),this},t.replaceWith=function(e){var t=this;return l.domEach(this,(function(n,r){var i=n.parent;if(i){var a=i.children,s="function"==typeof e?e.call(n,r,n):e,l=t._makeDomArray(s);o.update(l,null);var c=a.indexOf(n);d(a,c,1,l,i),l.includes(n)||(n.parent=n.prev=n.next=null)}}))},t.empty=function(){return l.domEach(this,(function(e){c.DomUtils.hasChildren(e)&&(e.children.forEach((function(e){e.next=e.prev=e.parent=null})),e.children.length=0)}))},t.html=function(e){if(void 0===e){var t=this[0];return t&&c.DomUtils.hasChildren(t)?s.html(t.children,this.options):null}var n=r.__assign(r.__assign({},this.options),{context:null});return l.domEach(this,(function(t){if(c.DomUtils.hasChildren(t)){t.children.forEach((function(e){e.next=e.prev=e.parent=null})),n.context=t;var r=l.isCheerio(e)?e.toArray():o.default(""+e,n,!1).children;o.update(r,t)}}))},t.toString=function(){return s.html(this,this.options)},t.text=function e(t){var n=this;return void 0===t?s.text(this):"function"==typeof t?l.domEach(this,(function(r,i){e.call(n._make(r),t.call(r,i,s.text([r])))})):l.domEach(this,(function(e){if(c.DomUtils.hasChildren(e)){e.children.forEach((function(e){e.next=e.prev=e.parent=null}));var n=new a.Text(t);o.update(n,e)}}))},t.clone=function(){return this._make(l.cloneDom(this.get()))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.css=void 0;var r=n(241);function i(e,t){if(e&&r.isTag(e)){var n=function(e){return(e=(e||"").trim())?e.split(";").reduce((function(e,t){var n=t.indexOf(":");return n<1||n===t.length-1?e:(e[t.slice(0,n).trim()]=t.slice(n+1).trim(),e)}),{}):{}}(e.attribs.style);if("string"==typeof t)return n[t];if(Array.isArray(t)){var i={};return t.forEach((function(e){null!=n[e]&&(i[e]=n[e])})),i}return n}}t.css=function(e,t){return null!=e&&null!=t||"object"==typeof e&&!Array.isArray(e)?r.domEach(this,(function(n,a){r.isTag(n)&&function e(t,n,r,a){if("string"==typeof n){var o=i(t),s="function"==typeof r?r.call(t,a,o[n]):r;""===s?delete o[n]:null!=s&&(o[n]=s),t.attribs.style=(l=o,Object.keys(l).reduce((function(e,t){return e+(e?" ":"")+t+": "+l[t]+";"}),""))}else"object"==typeof n&&Object.keys(n).forEach((function(r,i){e(t,r,n[r],i)}));var l}(n,e,t,a)})):i(this[0],e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeArray=t.serialize=void 0;var r=n(241),i=/%20/g,a=/\r?\n/g;t.serialize=function(){return this.serializeArray().map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)})).join("&").replace(i,"+")},t.serializeArray=function(){var e=this;return this.map((function(t,n){var i=e._make(n);return r.isTag(n)&&"form"===n.name?i.find("input,select,textarea,keygen").toArray():i.filter("input,select,textarea,keygen").toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t,n){var r,i=e._make(n),o=i.attr("name"),s=null!==(r=i.val())&&void 0!==r?r:"";return Array.isArray(s)?s.map((function(e){return{name:o,value:e.replace(a,"\r\n")}})):{name:o,value:s.replace(a,"\r\n")}})).toArray()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){return"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&Object.keys(t).every((function(n){if(!e.propertyIsEnumerable(n))return!1;var i=t[n],a=e[n];return!("object"==typeof i&&null!==i?!r(a,i):a!==i)}))}));t.default=r,e.exports=t.default},function(e,t,n){(function(t){var n=/[&<>"'`]/g,r=RegExp(n.source),i="object"==typeof t&&t&&t.Object===Object&&t,a="object"==typeof self&&self&&self.Object===Object&&self,o=i||a||Function("return this")();var s,l=(s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},function(e){return null==s?void 0:s[e]}),c=Object.prototype.toString,u=o.Symbol,d=u?u.prototype:void 0,h=d?d.toString:void 0;function f(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return h?h.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}e.exports=function(e){var t;return(e=null==(t=e)?"":f(t))&&r.test(e)?e.replace(n,l):e}}).call(this,n(68))},function(e,t,n){"use strict";var r=String.prototype.valueOf,i=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"string"==typeof e||"object"==typeof e&&(a?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object String]"===i.call(e))}},function(e,t,n){"use strict";var r=Number.prototype.toString,i=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"number"==typeof e||"object"==typeof e&&(a?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Number]"===i.call(e))}},function(e,t,n){"use strict";var r=Boolean.prototype.toString,i=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"boolean"==typeof e||null!==e&&"object"==typeof e&&(a&&Symbol.toStringTag in e?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===i.call(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createParser=t.createGenerator=void 0;var r=a(n(1789)),i=a(n(1790));function a(e){return e&&e.__esModule?e:{default:e}}t.createGenerator=r.default,t.createParser=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return JSON.stringify(e)},i=function(e){var t=e.body,n=[],i=!0,a=!1,o=void 0;try{for(var s,l=t[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var c=s.value,u=void 0;if("universalSelector"===c.type)u="*";else if("typeSelector"===c.type)u=c.name;else if("idSelector"===c.type)u="#"+c.name;else if("classSelector"===c.type)u="."+c.name;else if("attributePresenceSelector"===c.type)u="["+c.name+"]";else if("attributeValueSelector"===c.type)u="["+c.name+c.operator+r(c.value)+"]";else if("pseudoClassSelector"===c.type)u=":"+c.name,c.parameters.length&&(u+="("+c.parameters.map(r).join(", ")+")");else{if("pseudoElementSelector"!==c.type)throw new Error("Unknown token.");u="::"+c.name}n.push(u)}}catch(e){a=!0,o=e}finally{try{!i&&l.return&&l.return()}finally{if(a)throw o}}return n.join("")};t.default=function(){return{generate:function(e){var t=[],n=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=o.value;if("selector"===l.type)t.push(i(l));else if("descendantCombinator"===l.type)t.push(" ");else if("childCombinator"===l.type)t.push(" > ");else if("adjacentSiblingCombinator"===l.type)t.push(" + ");else{if("generalSiblingCombinator"!==l.type)throw new Error("Unknown token.");t.push(" ~ ")}}}catch(e){r=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw a}}return t.join("")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1791),a=n(1792),o=(r=a)&&r.__esModule?r:{default:r};t.default=function(){return{parse:function(e){var t=new i.Parser(o.default.ParserRules,o.default.ParserStart).feed(e).results;if(0===t.length)throw new Error("Found no parsings.");if(t.length>1)throw new Error("Ambiguous results.");return t[0]}}}},function(e,t,n){var r,i;r=this,i=function(){function e(t,n,r){return this.id=++e.highestId,this.name=t,this.symbols=n,this.postprocess=r,this}function t(e,t,n,r){this.rule=e,this.dot=t,this.reference=n,this.data=[],this.wantedBy=r,this.isComplete=this.dot===e.symbols.length}function n(e,t){this.grammar=e,this.index=t,this.states=[],this.wants={},this.scannable=[],this.completed={}}function r(e,t){this.rules=e,this.start=t||this.rules[0].name;var n=this.byName={};this.rules.forEach((function(e){n.hasOwnProperty(e.name)||(n[e.name]=[]),n[e.name].push(e)}))}function i(){this.reset("")}function a(e,t,a){if(e instanceof r){var o=e;a=t}else o=r.fromCompiled(e,t);for(var s in this.grammar=o,this.options={keepHistory:!1,lexer:o.lexer||new i},a||{})this.options[s]=a[s];this.lexer=this.options.lexer,this.lexerState=void 0;var l=new n(o,0);this.table=[l],l.wants[o.start]=[],l.predict(o.start),l.process(),this.current=0}return e.highestId=0,e.prototype.toString=function(e){function t(e){return e.literal?JSON.stringify(e.literal):e.type?"%"+e.type:e.toString()}var n=void 0===e?this.symbols.map(t).join(" "):this.symbols.slice(0,e).map(t).join(" ")+" ● "+this.symbols.slice(e).map(t).join(" ");return this.name+" → "+n},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var n=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return n.left=this,n.right=e,n.isComplete&&(n.data=n.build(),n.right=void 0),n},t.prototype.build=function(){var e=[],t=this;do{e.push(t.right.data),t=t.left}while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,a.fail))},n.prototype.process=function(e){for(var t=this.states,n=this.wants,r=this.completed,i=0;i<t.length;i++){var o=t[i];if(o.isComplete){if(o.finish(),o.data!==a.fail){for(var s=o.wantedBy,l=s.length;l--;){var c=s[l];this.complete(c,o)}if(o.reference===this.index){var u=o.rule.name;(this.completed[u]=this.completed[u]||[]).push(o)}}}else{if("string"!=typeof(u=o.rule.symbols[o.dot])){this.scannable.push(o);continue}if(n[u]){if(n[u].push(o),r.hasOwnProperty(u)){var d=r[u];for(l=0;l<d.length;l++){var h=d[l];this.complete(o,h)}}}else n[u]=[o],this.predict(u)}}},n.prototype.predict=function(e){for(var n=this.grammar.byName[e]||[],r=0;r<n.length;r++){var i=n[r],a=this.wants[e],o=new t(i,0,this.index,a);this.states.push(o)}},n.prototype.complete=function(e,t){var n=e.nextState(t);this.states.push(n)},r.fromCompiled=function(t,n){var i=t.Lexer;t.ParserStart&&(n=t.ParserStart,t=t.ParserRules);var a=new r(t=t.map((function(t){return new e(t.name,t.symbols,t.postprocess)})),n);return a.lexer=i,a},i.prototype.reset=function(e,t){this.buffer=e,this.index=0,this.line=t?t.line:1,this.lastLineBreak=t?-t.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var e=this.buffer[this.index++];return"\n"===e&&(this.line+=1,this.lastLineBreak=this.index),{value:e}}},i.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},i.prototype.formatError=function(e,t){var n=this.buffer;if("string"==typeof n){var r=n.indexOf("\n",this.index);-1===r&&(r=n.length);var i=n.substring(this.lastLineBreak,r),a=this.index-this.lastLineBreak;return t+=" at line "+this.line+" col "+a+":\n\n",t+="  "+i+"\n",t+="  "+Array(a).join(" ")+"^"}return t+" at index "+(this.index-1)},a.fail={},a.prototype.feed=function(e){var t,r=this.lexer;for(r.reset(e,this.lexerState);t=r.next();){var a=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var o=this.current+1,s=new n(this.grammar,o);this.table.push(s);for(var l=void 0!==t.text?t.text:t.value,c=r.constructor===i?t.value:t,u=a.scannable,d=u.length;d--;){var h=u[d],f=h.rule.symbols[h.dot];if(f.test?f.test(c):f.type?f.type===t.type:f.literal===l){var p=h.nextState({data:c,token:t,isToken:!0,reference:o-1});s.states.push(p)}}if(s.process(),0===s.states.length){var m=new Error(this.reportError(t));throw m.offset=this.current,m.token=t,m}this.options.keepHistory&&(a.lexerState=r.save()),this.current++}return a&&(this.lexerState=r.save()),this.results=this.finish(),this},a.prototype.reportError=function(e){var t=[],n=(e.type?e.type+" token: ":"")+JSON.stringify(void 0!==e.value?e.value:e);t.push(this.lexer.formatError(e,"Syntax error")),t.push("Unexpected "+n+". Instead, I was expecting to see one of the following:\n");var r=this.table.length-2;return this.table[r].states.filter((function(e){var t=e.rule.symbols[e.dot];return t&&"string"!=typeof t})).map((function(e){return this.buildFirstStateStack(e,[])}),this).forEach((function(e){var n=e[0],r=n.rule.symbols[n.dot],i=this.getSymbolDisplay(r);t.push("A "+i+" based on:"),this.displayStateStack(e,t)}),this),t.push(""),t.join("\n")},a.prototype.displayStateStack=function(e,t){for(var n,r=0,i=0;i<e.length;i++){var a=e[i],o=a.rule.toString(a.dot);o===n?r++:(r>0&&t.push("    ⬆ ︎"+r+" more lines identical to this"),r=0,t.push("    "+o)),n=o}},a.prototype.getSymbolDisplay=function(e){var t=typeof e;if("string"===t)return e;if("object"===t&&e.literal)return JSON.stringify(e.literal);if("object"===t&&e instanceof RegExp)return"character matching "+e;if("object"===t&&e.type)return e.type+" token";throw new Error("Unknown symbol type: "+e)},a.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var n=e.wantedBy[0],r=[e].concat(t),i=this.buildFirstStateStack(n,r);return null===i?null:[e].concat(i)},a.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},a.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},a.prototype.rewind=function(e){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},a.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach((function(n){n.rule.name===t&&n.dot===n.rule.symbols.length&&0===n.reference&&n.data!==a.fail&&e.push(n)})),e.map((function(e){return e.data}))},{Parser:a,Grammar:r,Rule:e}},e.exports?e.exports=i():r.nearley=i()},function(e,t,n){"use strict";!function(){function t(e){return e[0]}var r,i,a=n(1793),o=function(e){return e=e.filter((function(e){return null!==e})),a(e)},s={" ":"descendantCombinator","+":"adjacentSiblingCombinator",">":"childCombinator","~":"generalSiblingCombinator"},l=function(e,t,n){var r=a(e).join(""),i=parseFloat(r);return isNaN(i)?n:i},c=function(e,t,n){return"true"===e[0]||"false"!==e[0]&&n},u=function(e,t,n){return"NaN"===e[0]?NaN:"undefined"!==e[0]?"null"===e[0]?null:n:void 0},d={Lexer:void 0,ParserRules:[{name:"combinator",symbols:["selector"]},{name:"combinator",symbols:["combinator","_",/[>+~ ]/,"_","selector"],postprocess:function(e){return(Array.isArray(e[0])?e[0]:[e[0]]).concat({type:s[e[2]]}).concat(e[4])}},{name:"selector",symbols:["selectorBody"],postprocess:function(e){return{type:"selector",body:e[0]}}},{name:"selectorBody$ebnf$1",symbols:["typeSelector"],postprocess:t},{name:"selectorBody$ebnf$1",symbols:[],postprocess:function(e){return null}},{name:"selectorBody$ebnf$2",symbols:[]},{name:"selectorBody$ebnf$2",symbols:["selectorBody$ebnf$2","simpleSelector"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"selectorBody",symbols:["selectorBody$ebnf$1","selectorBody$ebnf$2"],postprocess:function(e,t,n){var r=o(e);return r.length?r:n}},{name:"selectorBody$ebnf$3",symbols:[]},{name:"selectorBody$ebnf$3",symbols:["selectorBody$ebnf$3","simpleSelector"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"selectorBody",symbols:["universalSelector","selectorBody$ebnf$3"],postprocess:o},{name:"simpleSelector",symbols:["idSelector"]},{name:"simpleSelector",symbols:["classSelector"]},{name:"simpleSelector",symbols:["attributeValueSelector"]},{name:"simpleSelector",symbols:["attributePresenceSelector"]},{name:"simpleSelector",symbols:["pseudoClassSelector"]},{name:"simpleSelector",symbols:["pseudoElementSelector"]},{name:"typeSelector",symbols:["attributeName"],postprocess:function(e){return{type:"typeSelector",name:e[0]}}},{name:"className$ebnf$1",symbols:[{literal:"-"}],postprocess:t},{name:"className$ebnf$1",symbols:[],postprocess:function(e){return null}},{name:"className$ebnf$2",symbols:[]},{name:"className$ebnf$2",symbols:["className$ebnf$2",/[_a-zA-Z0-9-]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"className",symbols:["className$ebnf$1",/[_a-zA-Z]/,"className$ebnf$2"],postprocess:function(e){return(e[0]||"")+e[1]+e[2].join("")}},{name:"attributeName$ebnf$1",symbols:[]},{name:"attributeName$ebnf$1",symbols:["attributeName$ebnf$1",/[_a-zA-Z()0-9-]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"attributeName",symbols:[/[_a-z()A-Z]/,"attributeName$ebnf$1"],postprocess:function(e){return e[0]+e[1].join("")}},{name:"classSelector",symbols:[{literal:"."},"className"],postprocess:function(e){return{type:"classSelector",name:e[1]}}},{name:"idSelector",symbols:[{literal:"#"},"attributeName"],postprocess:function(e){return{type:"idSelector",name:e[1]}}},{name:"universalSelector",symbols:[{literal:"*"}],postprocess:function(e){return{type:"universalSelector"}}},{name:"attributePresenceSelector",symbols:[{literal:"["},"attributeName",{literal:"]"}],postprocess:function(e){return{type:"attributePresenceSelector",name:e[1]}}},{name:"attributeOperator",symbols:[{literal:"="}]},{name:"attributeOperator$string$1",symbols:[{literal:"~"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$1"]},{name:"attributeOperator$string$2",symbols:[{literal:"|"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$2"]},{name:"attributeOperator$string$3",symbols:[{literal:"^"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$3"]},{name:"attributeOperator$string$4",symbols:[{literal:"$"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$4"]},{name:"attributeOperator$string$5",symbols:[{literal:"*"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$5"]},{name:"attributeValueSelector",symbols:[{literal:"["},"attributeName","attributeOperator","attributeValue",{literal:"]"}],postprocess:function(e){return{type:"attributeValueSelector",name:e[1],value:e[3],operator:e[2][0]}}},{name:"attributeValue",symbols:["falsyPrimitiveStrings"],postprocess:t},{name:"attributeValue",symbols:["numericValue"],postprocess:t},{name:"attributeValue",symbols:["sqstring"],postprocess:t},{name:"attributeValue",symbols:["dqstring"],postprocess:t},{name:"falsyPrimitiveStrings$string$1",symbols:[{literal:"f"},{literal:"a"},{literal:"l"},{literal:"s"},{literal:"e"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$1"],postprocess:c},{name:"falsyPrimitiveStrings$string$2",symbols:[{literal:"t"},{literal:"r"},{literal:"u"},{literal:"e"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$2"],postprocess:c},{name:"falsyPrimitiveStrings$string$3",symbols:[{literal:"N"},{literal:"a"},{literal:"N"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$3"],postprocess:u},{name:"falsyPrimitiveStrings$string$4",symbols:[{literal:"n"},{literal:"u"},{literal:"l"},{literal:"l"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$4"],postprocess:u},{name:"falsyPrimitiveStrings$string$5",symbols:[{literal:"u"},{literal:"n"},{literal:"d"},{literal:"e"},{literal:"f"},{literal:"i"},{literal:"n"},{literal:"e"},{literal:"d"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$5"],postprocess:u},{name:"numericValue",symbols:["int",{literal:"."},"int"],postprocess:l},{name:"numericValue",symbols:[{literal:"+"},"int",{literal:"."},"int"],postprocess:l},{name:"numericValue",symbols:[{literal:"-"},"int",{literal:"."},"int"],postprocess:l},{name:"numericValue",symbols:[{literal:"-"},"int"],postprocess:l},{name:"numericValue",symbols:["int"],postprocess:l},{name:"numericValue",symbols:[{literal:"+"},"int"],postprocess:l},{name:"numericValue$string$1",symbols:[{literal:"I"},{literal:"n"},{literal:"f"},{literal:"i"},{literal:"n"},{literal:"i"},{literal:"t"},{literal:"y"}],postprocess:function(e){return e.join("")}},{name:"numericValue",symbols:["numericValue$string$1"],postprocess:l},{name:"numericValue$string$2",symbols:[{literal:"+"},{literal:"I"},{literal:"n"},{literal:"f"},{literal:"i"},{literal:"n"},{literal:"i"},{literal:"t"},{literal:"y"}],postprocess:function(e){return e.join("")}},{name:"numericValue",symbols:["numericValue$string$2"],postprocess:l},{name:"numericValue$string$3",symbols:[{literal:"-"},{literal:"I"},{literal:"n"},{literal:"f"},{literal:"i"},{literal:"n"},{literal:"i"},{literal:"t"},{literal:"y"}],postprocess:function(e){return e.join("")}},{name:"numericValue",symbols:["numericValue$string$3"],postprocess:l},{name:"int$ebnf$1",symbols:[/[0-9]/]},{name:"int$ebnf$1",symbols:["int$ebnf$1",/[0-9]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"int",symbols:["int$ebnf$1"]},{name:"classParameters",symbols:[]},{name:"classParameters",symbols:["classParameter"]},{name:"classParameters",symbols:["classParameters",{literal:","},"_","classParameter"],postprocess:(r=0,i=3,function(e){return e[r].concat([e[i]])})},{name:"classParameter$ebnf$1",symbols:[/[^()"', ]/]},{name:"classParameter$ebnf$1",symbols:["classParameter$ebnf$1",/[^()"', ]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"classParameter",symbols:["classParameter$ebnf$1"],postprocess:function(e){return e[0].join("")}},{name:"classParameter",symbols:["sqstring"],postprocess:t},{name:"classParameter",symbols:["dqstring"],postprocess:t},{name:"pseudoElementSelector$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:function(e){return e.join("")}},{name:"pseudoElementSelector",symbols:["pseudoElementSelector$string$1","pseudoClassSelectorName"],postprocess:function(e){return{type:"pseudoElementSelector",name:e[1]}}},{name:"pseudoClassSelector",symbols:[{literal:":"},"pseudoClassSelectorName"],postprocess:function(e){return{type:"pseudoClassSelector",name:e[1]}}},{name:"pseudoClassSelector",symbols:[{literal:":"},"pseudoClassSelectorName",{literal:"("},"classParameters",{literal:")"}],postprocess:function(e){return{type:"pseudoClassSelector",name:e[1],parameters:e[3]}}},{name:"pseudoClassSelectorName$ebnf$1",symbols:[/[a-zA-Z0-9-_]/]},{name:"pseudoClassSelectorName$ebnf$1",symbols:["pseudoClassSelectorName$ebnf$1",/[a-zA-Z0-9-_]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"pseudoClassSelectorName",symbols:[/[a-zA-Z]/,"pseudoClassSelectorName$ebnf$1"],postprocess:function(e){return e[0]+e[1].join("")}},{name:"dqstring$ebnf$1",symbols:[]},{name:"dqstring$ebnf$1",symbols:["dqstring$ebnf$1","dstrchar"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"dqstring",symbols:[{literal:'"'},"dqstring$ebnf$1",{literal:'"'}],postprocess:function(e){return e[1].join("")}},{name:"dstrchar",symbols:[/[^"]/],postprocess:t},{name:"dstrchar$string$1",symbols:[{literal:"\\"},{literal:'"'}],postprocess:function(e){return e.join("")}},{name:"dstrchar",symbols:["dstrchar$string$1"],postprocess:function(e){return'"'}},{name:"sqstring$ebnf$1",symbols:[]},{name:"sqstring$ebnf$1",symbols:["sqstring$ebnf$1","sstrchar"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"sqstring",symbols:[{literal:"'"},"sqstring$ebnf$1",{literal:"'"}],postprocess:function(e){return e[1].join("")}},{name:"sstrchar",symbols:[/[^']/],postprocess:t},{name:"sstrchar$string$1",symbols:[{literal:"\\"},{literal:"'"}],postprocess:function(e){return e.join("")}},{name:"sstrchar",symbols:["sstrchar$string$1"],postprocess:function(e){return"'"}},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1",/[ ]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"_",symbols:["_$ebnf$1"],postprocess:function(e){return null}}],ParserStart:"combinator"};void 0!==e.exports?e.exports=d:window.grammar=d}()},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,i=n||r||Function("return this")();function a(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var o=Object.prototype,s=o.hasOwnProperty,l=o.toString,c=i.Symbol,u=o.propertyIsEnumerable,d=c?c.isConcatSpreadable:void 0;function h(e){return f(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?l.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}(e)}(e)&&s.call(e,"callee")&&(!u.call(e,"callee")||"[object Arguments]"==l.call(e))}(e)||!!(d&&e&&e[d])}var f=Array.isArray;e.exports=function(e){return(e?e.length:0)?function e(t,n,r,i,o){var s=-1,l=t.length;for(r||(r=h),o||(o=[]);++s<l;){var c=t[s];n>0&&r(c)?n>1?e(c,n-1,r,i,o):a(o,c):i||(o[o.length]=c)}return o}(e,1/0):[]}}).call(this,n(68))},function(e,t,n){"use strict";var r=n(141),i=n(1001),a=n(1002),o=n(1795),s=a();r(s,{getPolyfill:a,implementation:i,shim:o}),e.exports=s},function(e,t,n){"use strict";var r=n(1002),i=n(141);e.exports=function(){var e=r();return i(Object,{values:e},{values:function(){return Object.values!==e}}),e}},function(e,t,n){"use strict";var r=n(1797),i=n(1798);e.exports=function(e){if(!e)return[];var t=i();return e===t.unknown?[]:e===t.all?t.elements:r(t.elements,(function(t){return t.constructor===e}))}},function(e,t){e.exports=function(e,t,r){if(e.filter)return e.filter(t,r);if(null==e)throw new TypeError;if("function"!=typeof t)throw new TypeError;for(var i=[],a=0;a<e.length;a++)if(n.call(e,a)){var o=e[a];t.call(r,o,a,e)&&i.push(o)}return i};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";(function(t){var n=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r],r));return n},r=[["HTMLElement","article"],["HTMLElement","section"],["HTMLBaseFontElement","basefont","HTMLBaseFontElementConstructor"],["HTMLPhraseElement","cite","HTMLElement"],["HTMLElement","noscript"],["HTMLBGSoundElement","bgsound","HTMLElement"],["HTMLPhraseElement","blink","HTMLElement"],["HTMLElement","multicol"],["HTMLNextIdElement","nextid","HTMLElement"],["HTMLElement","rb"],["HTMLElement","spacer"],["HTMLAnchorElement","a","HTMLElement"],["HTMLAreaElement","area","HTMLElement"],["HTMLAudioElement","audio","HTMLElement"],["HTMLBaseElement","base","HTMLElement"],["HTMLBodyElement","body","HTMLElement"],["HTMLBRElement","br","HTMLElement"],["HTMLButtonElement","button"],["HTMLCanvasElement","canvas"],["HTMLContentElement","content","HTMLElement"],["HTMLDataElement","data","HTMLElement"],["HTMLDataListElement","datalist"],["HTMLDialogElement","dialog","HTMLElement"],["HTMLDirectoryElement","dir"],["HTMLDivElement","div"],["HTMLDListElement","dl"],["HTMLEmbedElement","embed"],["HTMLFieldSetElement","fieldset"],["HTMLFontElement","font"],["HTMLFormElement","form"],["HTMLFrameElement","frame"],["HTMLFrameSetElement","frameset"],["HTMLHeadElement","head"],["HTMLHeadingElement","h1"],["HTMLHeadingElement","h2"],["HTMLHeadingElement","h3"],["HTMLHeadingElement","h4"],["HTMLHeadingElement","h5"],["HTMLHeadingElement","h6"],["HTMLHtmlElement","html"],["HTMLHRElement","hr"],["HTMLIFrameElement","iframe"],["HTMLImageElement","img"],["HTMLInputElement","input"],["HTMLIsIndexElement","index","HTMLElement"],["HTMLKeygenElement","keygen","HTMLBlockElement"],["HTMLLabelElement","label"],["HTMLLegendElement","legend"],["HTMLLIElement","li"],["HTMLLinkElement","link"],["HTMLElement","main"],["HTMLMapElement","map"],["HTMLMarqueeElement","marquee"],["HTMLMenuElement","menu"],["HTMLMetaElement","meta"],["HTMLMeterElement","meter","HTMLElement"],["HTMLModElement","del"],["HTMLModElement","ins"],["HTMLObjectElement","object"],["HTMLOListElement","ol"],["HTMLOptGroupElement","optgroup"],["HTMLOptionElement","option"],["HTMLOutputElement","output"],["HTMLParagraphElement","p"],["HTMLParamElement","param"],["HTMLPictureElement","picture","HTMLElement"],["HTMLPreElement","pre"],["HTMLProgressElement","progress","HTMLElement"],["HTMLQuoteElement","q","HTMLBlockquoteElement"],["HTMLQuoteElement","blockquote","HTMLBlockElement","HTMLBlockquoteElement"],["HTMLScriptElement","script"],["HTMLSelectElement","select"],["HTMLShadowElement","shadow","HTMLElement"],["HTMLSourceElement","source"],["HTMLSpanElement","span","HTMLElement"],["HTMLStyleElement","style"],["HTMLTableElement","table"],["HTMLTableCaptionElement","caption"],["HTMLTableCellElement","td","HTMLTableDataCellElement"],["HTMLTableCellElement","th","HTMLTableHeaderCellElement"],["HTMLTableRowElement","tr"],["HTMLTableColElement","col"],["HTMLTableColElement","colgroup"],["HTMLTableSectionElement","tbody"],["HTMLTableSectionElement","thead"],["HTMLTableSectionElement","tfoot"],["HTMLTemplateElement","template","HTMLElement"],["HTMLTextAreaElement","textarea"],["HTMLTimeElement","time","HTMLElement"],["HTMLTitleElement","title"],["HTMLTrackElement","track","HTMLElement"],["HTMLUListElement","ul"],["HTMLVideoElement","video"],["HTMLElement","abbr"],["HTMLElement","address"],["HTMLElement","aside"],["HTMLElement","b"],["HTMLElement","bdi"],["HTMLElement","bdo"],["HTMLElement","code"],["HTMLElement","dd"],["HTMLDetailsElement","details","HTMLElement"],["HTMLElement","dfn"],["HTMLElement","dt"],["HTMLElement","em"],["HTMLElement","figcaption"],["HTMLElement","figure"],["HTMLElement","footer"],["HTMLElement","header"],["HTMLElement","hgroup"],["HTMLElement","i"],["HTMLElement","kbd"],["HTMLElement","mark"],["HTMLElement","nav"],["HTMLElement","rp"],["HTMLElement","rt"],["HTMLElement","ruby"],["HTMLElement","s"],["HTMLElement","samp"],["HTMLSlotElement","slot","HTMLElement"],["HTMLElement","small"],["HTMLElement","strong"],["HTMLElement","summary"],["HTMLElement","u"],["HTMLElement","var"],["HTMLElement","wbr"]],i=function(e,t,n){if("undefined"!=typeof document&&"function"==typeof document.createElement){var r=document.createElement(e).constructor;if(r!==n)return r}};e.exports=function(){var e=t.HTMLUnknownElement;return{all:t.HTMLElement,elements:n(r,(function(n){for(var r,a,o=n[0],s=n[1],l=2;l<arguments.length&&!a;l+=1)a=(r=n[l])&&t[r];var c=t[o];return{constructor:i(s,0,e),constructorName:a?r:o,expectedConstructor:a||c,tag:s}})),unknown:e}}}).call(this,n(68))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return new a.default(e,null,t)};var r,i=n(942),a=(r=i)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return new a.default(e,null,t)};var r,i=n(1003),a=(r=i)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.default)(t),o=n.createRenderer((0,r.default)({mode:"string"},t)),s=o.render(e,t.context);return(0,a.loadCheerioRoot)(s)};var r=o(n(273)),i=o(n(242)),a=n(379);function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";n(0),n(17),n(140),n(8),n(1815),n(1),n(343)},function(e,t,n){"use strict";(function(e){Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))}).call(this,n(96))},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){e.exports={scaleSizeLg:"1",scaleSizeSm:".85",bodyColor:"#4b4b4b",bodyBg:"#eeeef0",topBarHeight:"6.875rem",sbHeight:"4.5rem",cogvidItemHeight:"11rem",smallCogvidItemHeight:"11rem",IRLCogvidItemHeight:"6.25rem",primary_color:"#86c9cf",hover_primary_color:"rgba(134,201,207,0.3)",secondary_color:"#dc632a",success_color:"#00b0f0",info_color:"#00b0f0",warning_color:"#FFC000",danger_color:"#ed0e0c",light_color:"#f8f9fa",dark_color:"#343a40",dd_color:"#ddd",authorBreakDown:"100rem",widthLeftBar:"17rem",widthRightBar:"17rem",heightQuickMenu:"1.875rem",heightPlayback:"1.875rem",menuItemHeight:"2rem",heightChapter:"6.875rem",heightPeopleItem:"16.25rem",fontSizeBase:"1rem",fontSizeLg:"1rem",fontSizeSm:".85rem",screenLarge:"2561px",screenSmall:"1440px",heightToolbar:"2rem",sizeCustomScrollbar:"8px",heightVideoFilter:"2.5rem",heightChapterSlider:"2.75rem"}},function(e,t,n){"use strict";n.r(t),n.d(t,"Vector",(function(){return l})),n.d(t,"Stack",(function(){return u})),n.d(t,"Queue",(function(){return g})),n.d(t,"LinkList",(function(){return p})),n.d(t,"Deque",(function(){return y})),n.d(t,"PriorityQueue",(function(){return _})),n.d(t,"Set",(function(){return k})),n.d(t,"Map",(function(){return M})),n.d(t,"HashSet",(function(){return L})),n.d(t,"HashMap",(function(){return F}));var r=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},a=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function s(e){var t=this;void 0===e&&(e=[]);var n=0,s=[];this.size=function(){return n},this.empty=function(){return 0===n},this.clear=function(){n=0,s.length=0},this.front=function(){if(!this.empty())return s[0]},this.back=function(){if(!this.empty())return s[n-1]},this.forEach=function(e){s.forEach(e)},this.getElementByPos=function(e){if(e<0||e>=n)throw new Error("pos must more than 0 and less than vector's size");return s[e]},this.eraseElementByPos=function(e){if(e<0||e>=n)throw new Error("pos must more than 0 and less than vector's size");for(var t=e;t<n-1;++t)s[t]=s[t+1];this.popBack()},this.eraseElementByValue=function(e){var t=[];this.forEach((function(n){n!==e&&t.push(n)})),t.forEach((function(e,t){s[t]=e}));for(var r=t.length;n>r;)this.popBack()},this.pushBack=function(e){s.push(e),++n},this.popBack=function(){s.pop(),n>0&&--n},this.setElementByPos=function(e,t){if(e<0||e>=n)throw new Error("pos must more than 0 and less than vector's size");s[e]=t},this.insert=function(e,t,r){if(void 0===r&&(r=1),e<0||e>n)throw new Error("pos must more than 0 and less than or equal to vector's size");s.splice.apply(s,a([e,0],i(new Array(r).fill(t)),!1)),n+=r},this.find=function(e){return s.includes(e)},this.reverse=function(){s.reverse()},this.unique=function(){var e,t=[];this.forEach((function(n,r){0!==r&&n===e||(t.push(n),e=n)})),t.forEach((function(e,t){s[t]=e}));for(var r=t.length;n>r;)this.popBack()},this.sort=function(e){s.sort(e)},this[Symbol.iterator]=function(){return function(){return r(this,(function(e){switch(e.label){case 0:return[5,o(s)];case 1:return[2,e.sent()]}}))}()},e.forEach((function(e){return t.pushBack(e)})),Object.freeze(this)}Object.freeze(s);var l=s;function c(e){var t=this;void 0===e&&(e=[]);var n=0,r=[];this.size=function(){return n},this.empty=function(){return 0===n},this.clear=function(){n=0,r.length=0},this.push=function(e){r.push(e),++n},this.pop=function(){r.pop(),n>0&&--n},this.top=function(){return r[n-1]},e.forEach((function(e){return t.push(e)})),Object.freeze(this)}Object.freeze(c);var u=c,d=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},h=function(e){this.value=void 0,this.pre=void 0,this.next=void 0,this.value=e};function f(e){var t=this;void 0===e&&(e=[]);var n=0,r=void 0,i=void 0;this.size=function(){return n},this.empty=function(){return 0===n},this.clear=function(){r=i=void 0,n=0},this.front=function(){return null==r?void 0:r.value},this.back=function(){return null==i?void 0:i.value},this.forEach=function(e){for(var t=r,n=0;t;){if(void 0===t.value)throw new Error("unknown error");e(t.value,n++),t=t.next}},this.getElementByPos=function(e){if(e<0||e>=n)throw new Error("pos must more then 0 and less then the list length");for(var t=r;e--&&t;)t=t.next;if(!t||void 0===t.value)throw new Error("unknown error");return t.value},this.eraseElementByPos=function(e){if(e<0||e>=n)throw new Error("erase pos must more then 0 and less then the list length");if(0===e)this.popFront();else if(e===n-1)this.popBack();else{for(var t=r;e--;){if(!(null==t?void 0:t.next))throw new Error("unknown error");t=t.next}if(!t||!t.pre||!t.next)throw new Error("unknown error");var i=t.pre,a=t.next;a.pre=i,i.next=a,n>0&&--n}},this.eraseElementByValue=function(e){for(;r&&r.value===e;)this.popFront();for(;i&&i.value===e;)this.popBack();if(r)for(var t=r;t;){if(t.value===e){var a=t.pre,o=t.next;o&&(o.pre=a),a&&(a.next=o),n>0&&--n}t=t.next}},this.pushBack=function(e){if(null==e)throw new Error("you can't push null or undefined here");++n;var t=new h(e);i?(i.next=t,t.pre=i,i=t):r=i=t},this.popBack=function(){i&&(n>0&&--n,i&&(r===i?r=i=void 0:(i=i.pre)&&(i.next=void 0)))},this.setElementByPos=function(e,t){if(null==t)throw new Error("you can't set null or undefined here");if(e<0||e>=n)throw new Error("pos must more then 0 and less then the list length");for(var i=r;e--;){if(!i)throw new Error("unknown error");i=i.next}i&&(i.value=t)},this.insert=function(e,t,i){if(void 0===i&&(i=1),null==t)throw new Error("you can't insert null or undefined here");if(e<0||e>n)throw new Error("insert pos must more then 0 and less then or equal to the list length");if(i<0)throw new Error("insert size must more than 0");if(0===e)for(;i--;)this.pushFront(t);else if(e===n)for(;i--;)this.pushBack(t);else{for(var a=r,o=1;o<e;++o){if(!(null==a?void 0:a.next))throw new Error("unknown error");a=null==a?void 0:a.next}if(!a)throw new Error("unknown error");var s=a.next;for(n+=i;i--;)a.next=new h(t),a.next.pre=a,a=a.next;a.next=s,s&&(s.pre=a)}},this.find=function(e){for(var t=r;t;){if(t.value===e)return!0;t=t.next}return!1},this.reverse=function(){for(var e=r,t=i,a=0;e&&t&&2*a<n;){var o=e.value;e.value=t.value,t.value=o,e=e.next,t=t.pre,++a}},this.unique=function(){for(var e=r;e;){for(var t=e;t&&t.next&&t.value===t.next.value;)t=t.next,n>0&&--n;e.next=t.next,e.next&&(e.next.pre=e),e=e.next}},this.sort=function(e){var t=[];this.forEach((function(e){t.push(e)})),t.sort(e);var n=r;t.forEach((function(e){n&&(n.value=e,n=n.next)}))},this.pushFront=function(e){if(null==e)throw new Error("you can't push null or undefined here");++n;var t=new h(e);r?(t.next=r,r.pre=t,r=t):r=i=t},this.popFront=function(){r&&(n>0&&--n,r&&(r===i?r=i=void 0:(r=r.next)&&(r.pre=void 0)))},this.merge=function(e){var t=this,a=r;e.forEach((function(e){for(;a&&void 0!==a.value&&a.value<=e;)a=a.next;if(void 0===a)t.pushBack(e),a=i;else if(a===r)t.pushFront(e),a=r;else{++n;var o=a.pre;o&&(o.next=new h(e),o.next.pre=o,o.next.next=a,a&&(a.pre=o.next))}}))},this[Symbol.iterator]=function(){return function(){var e;return d(this,(function(t){switch(t.label){case 0:e=r,t.label=1;case 1:if(void 0===e)return[3,3];if(!e.value)throw new Error("unknown error");return[4,e.value];case 2:return t.sent(),e=e.next,[3,1];case 3:return[2]}}))}()},e.forEach((function(e){return t.pushBack(e)})),Object.freeze(this)}Object.freeze(f);var p=f;function m(e){void 0===e&&(e=[]);var t=new p(e);this.size=function(){return t.size()},this.empty=function(){return t.empty()},this.clear=function(){t.clear()},this.push=function(e){t.pushBack(e)},this.pop=function(){t.popFront()},this.front=function(){return t.front()},Object.freeze(this)}Object.freeze(m);var g=m,v=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};function b(e){var t=this;void 0===e&&(e=[]);var n=[],r=0,i=0,a=0,o=0,s=0,l=0;this.size=function(){return l},this.empty=function(){return 0===l},this.clear=function(){r=a=i=o=s=l=0,u.call(this,b.bucketSize),l=0},this.front=function(){return n[r][i]},this.back=function(){return n[a][o]},this.forEach=function(e){if(!this.empty()){var t=0;if(r!==a){for(l=i;l<b.bucketSize;++l)e(n[r][l],t++);for(l=r+1;l<a;++l)for(var s=0;s<b.bucketSize;++s)e(n[l][s],t++);for(l=0;l<=o;++l)e(n[a][l],t++)}else for(var l=i;l<=o;++l)e(n[r][l],t++)}};var c=function(e){var t=r*b.bucketSize+i,n=t+e,s=a*b.bucketSize+o;if(n<t||n>s)throw new Error("pos should more than 0 and less than queue's size");return{curNodeBucketIndex:Math.floor(n/b.bucketSize),curNodePointerIndex:n%b.bucketSize}};this.getElementByPos=function(e){var t=c(e),r=t.curNodeBucketIndex,i=t.curNodePointerIndex;return n[r][i]},this.eraseElementByPos=function(e){var t=this;if(e<0||e>l)throw new Error("pos should more than 0 and less than queue's size");if(0===e)this.popFront();else if(e===this.size())this.popBack();else{for(var n=[],r=e+1;r<l;++r)n.push(this.getElementByPos(r));this.cut(e),this.popBack(),n.forEach((function(e){return t.pushBack(e)}))}},this.eraseElementByValue=function(e){if(!this.empty()){var t=[];this.forEach((function(n){n!==e&&t.push(n)}));for(var n=t.length,r=0;r<n;++r)this.setElementByPos(r,t[r]);this.cut(n-1)}};var u=function(e){for(var t=[],c=e*b.sigma,u=Math.max(Math.ceil(c/b.bucketSize),2),d=0;d<u;++d)t.push(new Array(b.bucketSize));var h=Math.ceil(e/b.bucketSize),f=Math.floor(u/2)-Math.floor(h/2),p=f,m=0;if(this.size())for(d=0;d<h;++d){for(var g=0;g<b.bucketSize;++g)if(t[f+d][g]=this.front(),this.popFront(),this.empty()){p=f+d,m=g;break}if(this.empty())break}n=t,r=f,i=0,a=p,o=m,s=u,l=e};this.pushBack=function(e){this.empty()||(a===s-1&&o===b.bucketSize-1&&u.call(this,this.size()),o<b.bucketSize-1?++o:a<s-1&&(++a,o=0)),++l,n[a][o]=e},this.popBack=function(){this.empty()||(1!==this.size()&&(o>0?--o:r<a&&(--a,o=b.bucketSize-1)),l>0&&--l)},this.setElementByPos=function(e,t){var r=c(e),i=r.curNodeBucketIndex,a=r.curNodePointerIndex;n[i][a]=t},this.insert=function(e,t,n){var r=this;if(void 0===n&&(n=1),0===e)for(;n--;)this.pushFront(t);else if(e===this.size())for(;n--;)this.pushBack(t);else{for(var i=[],a=e;a<l;++a)i.push(this.getElementByPos(a));this.cut(e-1);for(a=0;a<n;++a)this.pushBack(t);i.forEach((function(e){return r.pushBack(e)}))}},this.find=function(e){if(r===a){for(var t=i;t<=o;++t)if(n[r][t]===e)return!0;return!1}for(t=i;t<b.bucketSize;++t)if(n[r][t]===e)return!0;for(t=r+1;t<a;++t)for(var s=0;s<b.bucketSize;++s)if(n[t][s]===e)return!0;for(t=0;t<=o;++t)if(n[a][t]===e)return!0;return!1},this.reverse=function(){for(var e=0,t=l-1;e<t;){var n=this.getElementByPos(e);this.setElementByPos(e,this.getElementByPos(t)),this.setElementByPos(t,n),++e,--t}},this.unique=function(){if(!this.empty()){var e=[],t=this.front();this.forEach((function(n,r){0!==r&&n===t||(e.push(n),t=n)}));for(var n=0;n<l;++n)this.setElementByPos(n,e[n]);this.cut(e.length-1)}},this.sort=function(e){var t=[];this.forEach((function(e){t.push(e)})),t.sort(e);for(var n=0;n<l;++n)this.setElementByPos(n,t[n])},this.pushFront=function(e){this.empty()||(0===r&&0===i&&u.call(this,this.size()),i>0?--i:r>0&&(--r,i=b.bucketSize-1)),++l,n[r][i]=e},this.popFront=function(){this.empty()||(1!==this.size()&&(i<b.bucketSize-1?++i:r<a&&(++r,i=0)),l>0&&--l)},this.shrinkToFit=function(){var e=this,t=[];this.forEach((function(e){t.push(e)}));var r=t.length;n=[];for(var i=Math.ceil(r/b.bucketSize),a=0;a<i;++a)n.push(new Array(b.bucketSize));this.clear(),t.forEach((function(t){return e.pushBack(t)}))},this.cut=function(e){if(e<0)this.clear();else{var t=c(e),n=t.curNodeBucketIndex,r=t.curNodePointerIndex;a=n,o=r,l=e+1}},this[Symbol.iterator]=function(){return function(){var e,t;return v(this,(function(s){switch(s.label){case 0:if(0===l)return[2];if(r!==a)return[3,5];t=i,s.label=1;case 1:return t<=o?[4,n[r][t]]:[3,4];case 2:s.sent(),s.label=3;case 3:return++t,[3,1];case 4:return[2];case 5:t=i,s.label=6;case 6:return t<b.bucketSize?[4,n[r][t]]:[3,9];case 7:s.sent(),s.label=8;case 8:return++t,[3,6];case 9:t=r+1,s.label=10;case 10:if(!(t<a))return[3,15];e=0,s.label=11;case 11:return e<b.bucketSize?[4,n[t][e]]:[3,14];case 12:s.sent(),s.label=13;case 13:return++e,[3,11];case 14:return++t,[3,10];case 15:t=0,s.label=16;case 16:return t<=o?[4,n[a][t]]:[3,19];case 17:s.sent(),s.label=18;case 18:return++t,[3,16];case 19:return[2]}}))}()},function(){var i=b.bucketSize;e.size?i=e.size():e.length&&(i=e.length);var o=i*b.sigma;s=Math.ceil(o/b.bucketSize),s=Math.max(s,3);for(var l=0;l<s;++l)n.push(new Array(b.bucketSize));var c=Math.ceil(i/b.bucketSize);r=Math.floor(s/2)-Math.floor(c/2),a=r,e.forEach((function(e){return t.pushBack(e)}))}(),Object.freeze(this)}b.sigma=3,b.bucketSize=5e3,Object.freeze(b);var y=b;function A(e,t){void 0===e&&(e=[]),t=t||function(e,t){return e>t?-1:e<t?1:0};var n=[];e.forEach((function(e){return n.push(e)}));var r=n.length,i=function(e,t){if(e<0||e>=r)throw new Error("unknown error");if(t<0||t>=r)throw new Error("unknown error");var i=n[e];n[e]=n[t],n[t]=i},a=function(e){if(e<0||e>=r)throw new Error("unknown error");var a=2*e+1,o=2*e+2;a<r&&t(n[e],n[a])>0&&i(e,a),o<r&&t(n[e],n[o])>0&&i(e,o)};!function(){for(var e=Math.floor((r-1)/2);e>=0;--e)for(var a=e,o=2*a+1;o<r;){var s=o+1,l=o;if(s<r&&t(n[o],n[s])>0&&(l=s),t(n[a],n[l])<=0)break;i(a,l),o=2*(a=l)+1}}(),this.size=function(){return r},this.empty=function(){return 0===r},this.clear=function(){r=0,n.length=0},this.push=function(e){if(n.push(e),1!==++r)for(var i=r-1;i>0;){var o=Math.floor((i-1)/2);if(t(n[o],e)<=0)break;a(o),i=o}},this.pop=function(){if(!this.empty())if(1!==this.size()){var e=n[r-1];--r;for(var i=0;i<this.size();){var a=2*i+1,o=2*i+2;if(a>=this.size())break;var s=a;if(o<this.size()&&t(n[a],n[o])>0&&(s=o),t(n[s],e)>=0)break;n[i]=n[s],i=s}n[i]=e}else--r},this.top=function(){return n[0]},Object.freeze(this)}Object.freeze(A);var _=A,w=function(){function e(e,t){this.color=!0,this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0,this.leftChild=void 0,this.rightChild=void 0,this.key=e,this.value=t}return e.prototype.rotateLeft=function(){var e=this.parent,t=this.brother,n=this.leftChild,r=this.rightChild;if(!r)throw new Error("unknown error");var i=r.leftChild,a=r.rightChild;return e&&(e.leftChild===this?e.leftChild=r:e.rightChild===this&&(e.rightChild=r)),r.parent=e,r.brother=t,r.leftChild=this,r.rightChild=a,t&&(t.brother=r),this.parent=r,this.brother=a,this.leftChild=n,this.rightChild=i,a&&(a.parent=r,a.brother=this),n&&(n.parent=this,n.brother=i),i&&(i.parent=this,i.brother=n),r},e.prototype.rotateRight=function(){var e=this.parent,t=this.brother,n=this.leftChild;if(!n)throw new Error("unknown error");var r=this.rightChild,i=n.leftChild,a=n.rightChild;return e&&(e.leftChild===this?e.leftChild=n:e.rightChild===this&&(e.rightChild=n)),n.parent=e,n.brother=t,n.leftChild=i,n.rightChild=this,t&&(t.brother=n),i&&(i.parent=n,i.brother=this),this.parent=n,this.brother=i,this.leftChild=a,this.rightChild=r,a&&(a.parent=this,a.brother=r),r&&(r.parent=this,r.brother=a),n},e.prototype.remove=function(){if(this.leftChild||this.rightChild)throw new Error("can only remove leaf node");this.parent&&(this===this.parent.leftChild?this.parent.leftChild=void 0:this===this.parent.rightChild&&(this.parent.rightChild=void 0)),this.brother&&(this.brother.brother=void 0),this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0},e.TreeNodeColorType={red:!0,black:!1},e}();Object.freeze(w);var E=w,S=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},C=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function T(e,t){var n=this;void 0===e&&(e=[]),t=t||function(e,t){return e<t?-1:e>t?1:0};var r=0,i=new E;i.color=E.TreeNodeColorType.black,this.size=function(){return r},this.empty=function(){return 0===r},this.clear=function(){r=0,i.key=void 0,i.leftChild=i.rightChild=i.brother=i.parent=void 0,i.color=E.TreeNodeColorType.black};var a=function(e){if(!e||void 0===e.key)throw new Error("unknown error");return e.leftChild?a(e.leftChild):e},o=function(e){if(!e||void 0===e.key)throw new Error("unknown error");return e.rightChild?o(e.rightChild):e};this.front=function(){if(!this.empty())return a(i).key},this.back=function(){if(!this.empty())return o(i).key},this.forEach=function(e){var t,n,r=0;try{for(var i=C(this),a=i.next();!a.done;a=i.next()){e(a.value,r++)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},this.getElementByPos=function(e){var t,n;if(e<0||e>=this.size())throw new Error("pos must more than 0 and less than set's size");var r=0;try{for(var i=C(this),a=i.next();!a.done;a=i.next()){var o=a.value;if(r===e)return o;++r}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}throw new Error("unknown error")};var s=function(e){var t=e.parent;if(!t){if(e===i)return;throw new Error("unknown error")}if(e.color!==E.TreeNodeColorType.red){var n=e.brother;if(!n)throw new Error("unknown error");if(e===t.leftChild){if(n.color===E.TreeNodeColorType.red){n.color=E.TreeNodeColorType.black,t.color=E.TreeNodeColorType.red;var r=t.rotateLeft();i===t&&(i=r),s(e)}else if(n.color===E.TreeNodeColorType.black)if(n.rightChild&&n.rightChild.color===E.TreeNodeColorType.red){n.color=t.color,t.color=E.TreeNodeColorType.black,n.rightChild&&(n.rightChild.color=E.TreeNodeColorType.black);r=t.rotateLeft();i===t&&(i=r),e.color=E.TreeNodeColorType.black}else if(n.rightChild&&n.rightChild.color!==E.TreeNodeColorType.black||!n.leftChild||n.leftChild.color!==E.TreeNodeColorType.red)n.leftChild&&n.leftChild.color!==E.TreeNodeColorType.black||n.rightChild&&n.rightChild.color!==E.TreeNodeColorType.black||(n.color=E.TreeNodeColorType.red,s(t));else{n.color=E.TreeNodeColorType.red,n.leftChild&&(n.leftChild.color=E.TreeNodeColorType.black);r=n.rotateRight();i===n&&(i=r),s(e)}}else if(e===t.rightChild)if(n.color===E.TreeNodeColorType.red){n.color=E.TreeNodeColorType.black,t.color=E.TreeNodeColorType.red;r=t.rotateRight();i===t&&(i=r),s(e)}else if(n.color===E.TreeNodeColorType.black)if(n.leftChild&&n.leftChild.color===E.TreeNodeColorType.red){n.color=t.color,t.color=E.TreeNodeColorType.black,n.leftChild&&(n.leftChild.color=E.TreeNodeColorType.black);r=t.rotateRight();i===t&&(i=r),e.color=E.TreeNodeColorType.black}else if(n.leftChild&&n.leftChild.color!==E.TreeNodeColorType.black||!n.rightChild||n.rightChild.color!==E.TreeNodeColorType.red)n.leftChild&&n.leftChild.color!==E.TreeNodeColorType.black||n.rightChild&&n.rightChild.color!==E.TreeNodeColorType.black||(n.color=E.TreeNodeColorType.red,s(t));else{n.color=E.TreeNodeColorType.red,n.rightChild&&(n.rightChild.color=E.TreeNodeColorType.black);r=n.rotateLeft();i===n&&(i=r),s(e)}}else e.color=E.TreeNodeColorType.black},l=function(e){for(var t=e;t.leftChild||t.rightChild;){if(t.rightChild){t=a(t.rightChild);var n=e.key;e.key=t.key,t.key=n,e=t}if(t.leftChild){t=o(t.leftChild);n=e.key;e.key=t.key,t.key=n,e=t}}s(t),t&&t.remove(),--r,i.color=E.TreeNodeColorType.black},c=function(e,t){return!(!e||void 0===e.key)&&(!!c(e.leftChild,t)||(!!t(e)||c(e.rightChild,t)))};this.eraseElementByPos=function(e){if(e<0||e>=r)throw new Error("pos must more than 0 and less than set's size");var t=0;c(i,(function(n){return e===t?(l(n),!0):(++t,!1)}))},this.eraseElementByValue=function(e){if(!this.empty()){var n=h(i,e);void 0!==n&&void 0!==n.key&&0===t(n.key,e)&&l(n)}};var u=function(e,n){if(!e||void 0===e.key)throw new Error("unknown error");var r=t(n,e.key);return r<0?e.leftChild?u(e.leftChild,n):(e.leftChild=new E,e.leftChild.parent=e,e.leftChild.brother=e.rightChild,e.rightChild&&(e.rightChild.brother=e.leftChild),e.leftChild):r>0?e.rightChild?u(e.rightChild,n):(e.rightChild=new E,e.rightChild.parent=e,e.rightChild.brother=e.leftChild,e.leftChild&&(e.leftChild.brother=e.rightChild),e.rightChild):e},d=function(e){var t=e.parent;if(!t){if(e===i)return;throw new Error("unknown error")}if(t.color!==E.TreeNodeColorType.black&&t.color===E.TreeNodeColorType.red){var n=t.brother,r=t.parent;if(!r)throw new Error("unknown error");if(n&&n.color===E.TreeNodeColorType.red)n.color=t.color=E.TreeNodeColorType.black,r.color=E.TreeNodeColorType.red,d(r);else if(!n||n.color===E.TreeNodeColorType.black)if(t===r.leftChild){if(e===t.leftChild){t.color=E.TreeNodeColorType.black,r.color=E.TreeNodeColorType.red;var a=r.rotateRight();r===i&&(i=a)}else if(e===t.rightChild){a=t.rotateLeft();r===i&&(i=a),d(t)}}else if(t===r.rightChild)if(e===t.leftChild){a=t.rotateRight();r===i&&(i=a),d(t)}else if(e===t.rightChild){t.color=E.TreeNodeColorType.black,r.color=E.TreeNodeColorType.red;a=r.rotateLeft();r===i&&(i=a)}}};this.insert=function(e){if(null==e)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(this.empty())return++r,i.key=e,void(i.color=E.TreeNodeColorType.black);var n=u(i,e);void 0!==n.key&&0===t(n.key,e)||(++r,n.key=e,d(n),i.color=E.TreeNodeColorType.black)};var h=function(e,n){if(e&&void 0!==e.key){var r=t(n,e.key);return r<0?h(e.leftChild,n):r>0?h(e.rightChild,n):e}};this.find=function(e){var n=h(i,e);return void 0!==n&&void 0!==n.key&&0===t(n.key,e)};var f=function(e,n){if(e&&void 0!==e.key){var r=t(e.key,n);if(0===r)return e.key;if(r<0)return f(e.rightChild,n);var i=f(e.leftChild,n);return void 0!==i?i:e.key}};this.lowerBound=function(e){return f(i,e)};var p=function(e,n){if(e&&void 0!==e.key){if(t(e.key,n)<=0)return p(e.rightChild,n);var r=p(e.leftChild,n);return void 0!==r?r:e.key}};this.upperBound=function(e){return p(i,e)};var m=function(e,n){if(e&&void 0!==e.key){var r=t(e.key,n);if(0===r)return e.key;if(r>0)return m(e.leftChild,n);var i=m(e.rightChild,n);return void 0!==i?i:e.key}};this.reverseLowerBound=function(e){return m(i,e)};var g=function(e,n){if(e&&void 0!==e.key){if(t(e.key,n)>=0)return g(e.leftChild,n);var r=g(e.rightChild,n);return void 0!==r?r:e.key}};this.reverseUpperBound=function(e){return g(i,e)},this.union=function(e){var t=this;e.forEach((function(e){return t.insert(e)}))},this.getHeight=function(){if(this.empty())return 0;var e=function(t){return t?Math.max(e(t.leftChild),e(t.rightChild))+1:1};return e(i)};var v=function(e){return S(this,(function(t){switch(t.label){case 0:return e&&void 0!==e.key?[5,C(v(e.leftChild))]:[2];case 1:return t.sent(),[4,e.key];case 2:return t.sent(),[5,C(v(e.rightChild))];case 3:return t.sent(),[2]}}))};this[Symbol.iterator]=function(){return v(i)},e.forEach((function(e){return n.insert(e)})),Object.freeze(this)}Object.freeze(T);var k=T,x=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},O=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function I(e,t){var n=this;void 0===e&&(e=[]),t=t||function(e,t){return e<t?-1:e>t?1:0};var r=0,i=new E;i.color=E.TreeNodeColorType.black,this.size=function(){return r},this.empty=function(){return 0===r},this.clear=function(){r=0,i.key=i.value=void 0,i.leftChild=i.rightChild=i.brother=void 0};var a=function(e){if(!e||void 0===e.key)throw new Error("unknown error");return e.leftChild?a(e.leftChild):e},o=function(e){if(!e||void 0===e.key)throw new Error("unknown error");return e.rightChild?o(e.rightChild):e};this.front=function(){if(!this.empty()){var e=a(i);if(void 0===e.key||void 0===e.value)throw new Error("unknown error");return{key:e.key,value:e.value}}},this.back=function(){if(!this.empty()){var e=o(i);if(void 0===e.key||void 0===e.value)throw new Error("unknown error");return{key:e.key,value:e.value}}},this.forEach=function(e){var t,n,r=0;try{for(var i=O(this),a=i.next();!a.done;a=i.next()){e(a.value,r++)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},this.getElementByPos=function(e){var t,n;if(e<0||e>=this.size())throw new Error("pos must more than 0 and less than set's size");var r=0;try{for(var i=O(this),a=i.next();!a.done;a=i.next()){var o=a.value;if(r===e)return o;++r}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}throw new Error("unknown Error")};var s=function(e,n){if(e&&void 0!==e.key&&void 0!==e.value){var r=t(e.key,n);return 0===r?{key:e.key,value:e.value}:r<0?s(e.rightChild,n):s(e.leftChild,n)||{key:e.key,value:e.value}}};this.lowerBound=function(e){return s(i,e)};var l=function(e,n){if(e&&void 0!==e.key&&void 0!==e.value)return t(e.key,n)<=0?l(e.rightChild,n):l(e.leftChild,n)||{key:e.key,value:e.value}};this.upperBound=function(e){return l(i,e)};var c=function(e,n){if(e&&void 0!==e.key&&void 0!==e.value){var r=t(e.key,n);return 0===r?{key:e.key,value:e.value}:r>0?c(e.leftChild,n):c(e.rightChild,n)||{key:e.key,value:e.value}}};this.reverseLowerBound=function(e){return c(i,e)};var u=function(e,n){if(e&&void 0!==e.key&&void 0!==e.value)return t(e.key,n)>=0?u(e.leftChild,n):u(e.rightChild,n)||{key:e.key,value:e.value}};this.reverseUpperBound=function(e){return u(i,e)};var d=function(e){var t=e.parent;if(!t){if(e===i)return;throw new Error("unknown error")}if(e.color!==E.TreeNodeColorType.red){var n=e.brother;if(!n)throw new Error("unknown error");if(e===t.leftChild){if(n.color===E.TreeNodeColorType.red){n.color=E.TreeNodeColorType.black,t.color=E.TreeNodeColorType.red;var r=t.rotateLeft();i===t&&(i=r),d(e)}else if(n.color===E.TreeNodeColorType.black)if(n.rightChild&&n.rightChild.color===E.TreeNodeColorType.red){n.color=t.color,t.color=E.TreeNodeColorType.black,n.rightChild&&(n.rightChild.color=E.TreeNodeColorType.black);r=t.rotateLeft();i===t&&(i=r),e.color=E.TreeNodeColorType.black}else if(n.rightChild&&n.rightChild.color!==E.TreeNodeColorType.black||!n.leftChild||n.leftChild.color!==E.TreeNodeColorType.red)n.leftChild&&n.leftChild.color!==E.TreeNodeColorType.black||n.rightChild&&n.rightChild.color!==E.TreeNodeColorType.black||(n.color=E.TreeNodeColorType.red,d(t));else{n.color=E.TreeNodeColorType.red,n.leftChild&&(n.leftChild.color=E.TreeNodeColorType.black);r=n.rotateRight();i===n&&(i=r),d(e)}}else if(e===t.rightChild)if(n.color===E.TreeNodeColorType.red){n.color=E.TreeNodeColorType.black,t.color=E.TreeNodeColorType.red;r=t.rotateRight();i===t&&(i=r),d(e)}else if(n.color===E.TreeNodeColorType.black)if(n.leftChild&&n.leftChild.color===E.TreeNodeColorType.red){n.color=t.color,t.color=E.TreeNodeColorType.black,n.leftChild&&(n.leftChild.color=E.TreeNodeColorType.black);r=t.rotateRight();i===t&&(i=r),e.color=E.TreeNodeColorType.black}else if(n.leftChild&&n.leftChild.color!==E.TreeNodeColorType.black||!n.rightChild||n.rightChild.color!==E.TreeNodeColorType.red)n.leftChild&&n.leftChild.color!==E.TreeNodeColorType.black||n.rightChild&&n.rightChild.color!==E.TreeNodeColorType.black||(n.color=E.TreeNodeColorType.red,d(t));else{n.color=E.TreeNodeColorType.red,n.rightChild&&(n.rightChild.color=E.TreeNodeColorType.black);r=n.rotateLeft();i===n&&(i=r),d(e)}}else e.color=E.TreeNodeColorType.black},h=function(e){for(var t=e;t.leftChild||t.rightChild;){if(t.rightChild){t=a(t.rightChild);var n=e.key;e.key=t.key,t.key=n;var s=e.value;e.value=t.value,t.value=s,e=t}if(t.leftChild){t=o(t.leftChild);n=e.key;e.key=t.key,t.key=n;s=e.value;e.value=t.value,t.value=s,e=t}}d(t),t&&t.remove(),--r,i.color=E.TreeNodeColorType.black},f=function(e,t){return!(!e||void 0===e.key)&&(!!f(e.leftChild,t)||(!!t(e)||f(e.rightChild,t)))};this.eraseElementByPos=function(e){if(e<0||e>=r)throw new Error("pos must more than 0 and less than set's size");var t=0;f(i,(function(n){return e===t?(h(n),!0):(++t,!1)}))},this.eraseElementByKey=function(e){if(!this.empty()){var n=g(i,e);void 0!==n&&void 0!==n.key&&0===t(n.key,e)&&h(n)}};var p=function(e,n){if(!e||void 0===e.key)throw new Error("unknown error");var r=t(n,e.key);return r<0?e.leftChild?p(e.leftChild,n):(e.leftChild=new E,e.leftChild.parent=e,e.leftChild.brother=e.rightChild,e.rightChild&&(e.rightChild.brother=e.leftChild),e.leftChild):r>0?e.rightChild?p(e.rightChild,n):(e.rightChild=new E,e.rightChild.parent=e,e.rightChild.brother=e.leftChild,e.leftChild&&(e.leftChild.brother=e.rightChild),e.rightChild):e},m=function(e){var t=e.parent;if(!t){if(e===i)return;throw new Error("unknown error")}if(t.color!==E.TreeNodeColorType.black&&t.color===E.TreeNodeColorType.red){var n=t.brother,r=t.parent;if(!r)throw new Error("unknown error");if(n&&n.color===E.TreeNodeColorType.red)n.color=t.color=E.TreeNodeColorType.black,r.color=E.TreeNodeColorType.red,m(r);else if(!n||n.color===E.TreeNodeColorType.black)if(t===r.leftChild){if(e===t.leftChild){t.color=E.TreeNodeColorType.black,r.color=E.TreeNodeColorType.red;var a=r.rotateRight();r===i&&(i=a)}else if(e===t.rightChild){a=t.rotateLeft();r===i&&(i=a),m(t)}}else if(t===r.rightChild)if(e===t.leftChild){a=t.rotateRight();r===i&&(i=a),m(t)}else if(e===t.rightChild){t.color=E.TreeNodeColorType.black,r.color=E.TreeNodeColorType.red;a=r.rotateLeft();r===i&&(i=a)}}};this.setElement=function(e,n){if(null==e)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(null!=n){if(this.empty())return++r,i.key=e,i.value=n,void(i.color=E.TreeNodeColorType.black);var a=p(i,e);void 0===a.key||0!==t(a.key,e)?(++r,a.key=e,a.value=n,m(a),i.color=E.TreeNodeColorType.black):a.value=n}else this.eraseElementByKey(e)};var g=function(e,n){if(e&&void 0!==e.key){var r=t(n,e.key);return r<0?g(e.leftChild,n):r>0?g(e.rightChild,n):e}};this.find=function(e){return!!g(i,e)},this.getElementByKey=function(e){var t=g(i,e);if(void 0===(null==t?void 0:t.key)||void 0===(null==t?void 0:t.value))throw new Error("unknown error");return t.value},this.union=function(e){var t=this;e.forEach((function(e){var n=e.key,r=e.value;return t.setElement(n,r)}))},this.getHeight=function(){if(this.empty())return 0;var e=function(t){return t?Math.max(e(t.leftChild),e(t.rightChild))+1:1};return e(i)};var v=function(e){return x(this,(function(t){switch(t.label){case 0:return e&&void 0!==e.key&&void 0!==e.value?[5,O(v(e.leftChild))]:[2];case 1:return t.sent(),[4,{key:e.key,value:e.value}];case 2:return t.sent(),[5,O(v(e.rightChild))];case 3:return t.sent(),[2]}}))};this[Symbol.iterator]=function(){return v(i)},e.forEach((function(e){var t=e.key,r=e.value;return n.setElement(t,r)})),Object.freeze(this)}Object.freeze(I);var M=I,P=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},D=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function N(e,t,n){var r=this;if(void 0===e&&(e=[]),void 0===t&&(t=N.initSize),n=n||function(e){var t=0,n="";if("number"==typeof e)t=((t=Math.floor(e))<<5)-t,t&=t;else{n="string"!=typeof e?JSON.stringify(e):e;for(var r=0;r<n.length;r++){t=(t<<5)-t+n.charCodeAt(r),t&=t}}return t^=t>>>16},0!=(t&t-1))throw new Error("initBucketNum must be 2 to the power of n");var i=0,a=[],o=Math.max(N.initSize,Math.min(N.maxSize,t));this.size=function(){return i},this.empty=function(){return 0===i},this.clear=function(){i=0,o=t,a=[]},this.forEach=function(e){var t=0;a.forEach((function(n){n.forEach((function(n){e(n,t++)}))}))};var s=function(e){if(!(e>=N.maxSize)){o=2*e;var t=[];a.forEach((function(r,i){if(!r.empty()){if(r instanceof p&&1===r.size()){var s=r.front();if(void 0===s)throw new Error("unknown error");t[n(s)&o-1]=new p([s])}else if(r instanceof k){var l=new p,c=new p;r.forEach((function(t){0==(n(t)&e)?l.pushBack(t):c.pushBack(t)})),l.size()>N.untreeifyThreshold?t[i]=new k(l):l.size()&&(t[i]=l),c.size()>N.untreeifyThreshold?t[i+e]=new k(c):c.size()&&(t[i+e]=c)}else{var u=new p,d=new p;r.forEach((function(t){0==(n(t)&e)?u.pushBack(t):d.pushBack(t)})),u.size()&&(t[i]=u),d.size()&&(t[i+e]=d)}a[i].clear()}})),a=t}};this.insert=function(e){if(null==e)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");var t=n(e)&o-1;if(a[t]){var r=a[t].size();if(a[t]instanceof p){if(a[t].find(e))return;a[t].pushBack(e),a[t].size()>=N.treeifyThreshold&&(a[t]=new k(a[t]))}else a[t].insert(e);var l=a[t].size();i+=l-r}else a[t]=new p([e]),++i;i>o*N.sigma&&s.call(this,o)},this.eraseElementByValue=function(e){var t=n(e)&o-1;if(a[t]){var r=a[t].size();a[t].eraseElementByValue(e),a[t]instanceof k&&a[t].size()<=N.untreeifyThreshold&&(a[t]=new p(a[t]));var s=a[t].size();i+=s-r}},this.find=function(e){var t=n(e)&o-1;return!!a[t]&&a[t].find(e)},this[Symbol.iterator]=function(){return function(){var e,t,n,r,i,s;return P(this,(function(l){switch(l.label){case 0:e=0,l.label=1;case 1:if(!(e<o))return[3,10];for(;e<o&&!a[e];)++e;if(e>=o)return[3,10];l.label=2;case 2:l.trys.push([2,7,8,9]),i=void 0,t=D(a[e]),n=t.next(),l.label=3;case 3:return n.done?[3,6]:[4,n.value];case 4:l.sent(),l.label=5;case 5:return n=t.next(),[3,3];case 6:return[3,9];case 7:return r=l.sent(),i={error:r},[3,9];case 8:try{n&&!n.done&&(s=t.return)&&s.call(t)}finally{if(i)throw i.error}return[7];case 9:return++e,[3,1];case 10:return[2]}}))}()},e.forEach((function(e){return r.insert(e)})),Object.freeze(this)}N.initSize=16,N.maxSize=1<<30,N.sigma=.75,N.treeifyThreshold=8,N.untreeifyThreshold=6,N.minTreeifySize=64,Object.freeze(N);var L=N,R=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},B=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function j(e,t,n){var r=this;if(void 0===e&&(e=[]),void 0===t&&(t=j.initSize),n=n||function(e){var t,n,r=0,i="";if("number"==typeof e)r=((r=Math.floor(e))<<5)-r,r&=r;else{i="string"!=typeof e?JSON.stringify(e):e;try{for(var a=B(i),o=a.next();!o.done;o=a.next()){r=(r<<5)-r+o.value.charCodeAt(0),r&=r}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}return r^=r>>>16},0!=(t&t-1))throw new Error("initBucketNum must be 2 to the power of n");var i=0,a=[],o=Math.max(j.initSize,Math.min(j.maxSize,t));this.size=function(){return i},this.empty=function(){return 0===i},this.clear=function(){i=0,o=t,a=[]},this.forEach=function(e){var t=0;a.forEach((function(n){n.forEach((function(n){e(n,t++)}))}))};var s=function(e){if(!(e>=j.maxSize)){o=2*e;var t=[];a.forEach((function(r,i){if(!r.empty()){if(r instanceof p&&1===r.size()){var s=r.front(),l=s.key,c=s.value;t[n(l)&o-1]=new p([{key:l,value:c}])}else if(r instanceof M){var u=new p,d=new p;r.forEach((function(t){0==(n(t.key)&e)?u.pushBack(t):d.pushBack(t)})),u.size()>j.untreeifyThreshold?t[i]=new M(u):u.size()&&(t[i]=u),d.size()>j.untreeifyThreshold?t[i+e]=new M(d):d.size()&&(t[i+e]=d)}else{var h=new p,f=new p;r.forEach((function(t){0==(n(t.key)&e)?h.pushBack(t):f.pushBack(t)})),h.size()&&(t[i]=h),f.size()&&(t[i+e]=f)}a[i].clear()}})),a=t}};this.setElement=function(e,t){var r,l;if(null==e)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(null!=t){var c=n(e)&o-1;if(a[c]){var u=a[c].size();if(a[c]instanceof p){try{for(var d=B(a[c]),h=d.next();!h.done;h=d.next()){var f=h.value;if(f.key===e)return void(f.value=t)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(l=d.return)&&l.call(d)}finally{if(r)throw r.error}}a[c].pushBack({key:e,value:t}),a[c].size()>=j.treeifyThreshold&&(a[c]=new M(a[c]))}else a[c].setElement(e,t);var m=a[c].size();i+=m-u}else++i,a[c]=new p([{key:e,value:t}]);i>o*j.sigma&&s.call(this,o)}else this.eraseElementByKey(e)},this.getElementByKey=function(e){var t,r,i=n(e)&o-1;if(a[i]){if(a[i]instanceof M)return a[i].getElementByKey(e);try{for(var s=B(a[i]),l=s.next();!l.done;l=s.next()){var c=l.value;if(c.key===e)return c.value}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}},this.eraseElementByKey=function(e){var t,r,s=n(e)&o-1;if(a[s]){var l=a[s].size();if(a[s]instanceof M)a[s].eraseElementByKey(e),a[s].size()<=j.untreeifyThreshold&&(a[s]=new p(a[s]));else{var c=-1;try{for(var u=B(a[s]),d=u.next();!d.done;d=u.next()){var h=d.value;if(++c,h.key===e){a[s].eraseElementByPos(c);break}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}}var f=a[s].size();i+=f-l}},this.find=function(e){var t,r,i=n(e)&o-1;if(!a[i])return!1;if(a[i]instanceof M)return a[i].find(e);try{for(var s=B(a[i]),l=s.next();!l.done;l=s.next()){if(l.value.key===e)return!0}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return!1},this[Symbol.iterator]=function(){return function(){var e,t,n,r,i,s;return R(this,(function(l){switch(l.label){case 0:e=0,l.label=1;case 1:if(!(e<o))return[3,10];for(;e<o&&!a[e];)++e;if(e>=o)return[3,10];l.label=2;case 2:l.trys.push([2,7,8,9]),i=void 0,t=B(a[e]),n=t.next(),l.label=3;case 3:return n.done?[3,6]:[4,n.value];case 4:l.sent(),l.label=5;case 5:return n=t.next(),[3,3];case 6:return[3,9];case 7:return r=l.sent(),i={error:r},[3,9];case 8:try{n&&!n.done&&(s=t.return)&&s.call(t)}finally{if(i)throw i.error}return[7];case 9:return++e,[3,1];case 10:return[2]}}))}()},e.forEach((function(e){var t=e.key,n=e.value;return r.setElement(t,n)})),Object.freeze(this)}j.initSize=16,j.maxSize=1<<30,j.sigma=.75,j.treeifyThreshold=8,j.untreeifyThreshold=6,j.minTreeifySize=64,Object.freeze(j);var F=j},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return ae}));var r=n(426),i=n(412),a=n(38);function o(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var s=n(413),l=n(190),c=n(195),u=n(50),d=n(286),h=n(30);function f(e,t,n){Object(h.a)(2,arguments);var r=n||{},i=r.locale,o=i&&i.options&&i.options.weekStartsOn,s=null==o?0:Object(u.a)(o),l=null==r.weekStartsOn?s:Object(u.a)(r.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Object(a.default)(e),d=Object(u.a)(t),f=c.getUTCDay(),p=d%7,m=(p+7)%7,g=(m<l?7:0)+d-f;return c.setUTCDate(c.getUTCDate()+g),c}var p=n(436);var m=n(435);var g=n(191),v=n(176),b=/^(1[0-2]|0?\d)/,y=/^(3[0-1]|[0-2]?\d)/,A=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,_=/^(5[0-3]|[0-4]?\d)/,w=/^(2[0-3]|[0-1]?\d)/,E=/^(2[0-4]|[0-1]?\d)/,S=/^(1[0-1]|0?\d)/,C=/^(1[0-2]|0?\d)/,T=/^[0-5]?\d/,k=/^[0-5]?\d/,x=/^\d/,O=/^\d{1,2}/,I=/^\d{1,3}/,M=/^\d{1,4}/,P=/^-?\d+/,D=/^-?\d/,N=/^-?\d{1,2}/,L=/^-?\d{1,3}/,R=/^-?\d{1,4}/,B=/^([+-])(\d{2})(\d{2})?|Z/,j=/^([+-])(\d{2})(\d{2})|Z/,F=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,U=/^([+-])(\d{2}):(\d{2})|Z/,H=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function z(e,t,n){var r=t.match(e);if(!r)return null;var i=parseInt(r[0],10);return{value:n?n(i):i,rest:t.slice(r[0].length)}}function V(e,t){var n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function W(e,t){return z(P,e,t)}function G(e,t,n){switch(e){case 1:return z(x,t,n);case 2:return z(O,t,n);case 3:return z(I,t,n);case 4:return z(M,t,n);default:return z(new RegExp("^\\d{1,"+e+"}"),t,n)}}function q(e,t,n){switch(e){case 1:return z(D,t,n);case 2:return z(N,t,n);case 3:return z(L,t,n);case 4:return z(R,t,n);default:return z(new RegExp("^-?\\d{1,"+e+"}"),t,n)}}function Y(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function K(e,t){var n,r=t>0,i=r?t:1-t;if(i<=50)n=e||100;else{var a=i+50;n=e+100*Math.floor(a/100)-(e>=a%100?100:0)}return r?n:1-n}var X=[31,28,31,30,31,30,31,31,30,31,30,31],Q=[31,29,31,30,31,30,31,31,30,31,30,31];function $(e){return e%400==0||e%4==0&&e%100!=0}var J={G:{priority:140,parse:function(e,t,n,r){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}},set:function(e,t,n,r){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(e,t,n,r){var i=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return G(4,e,i);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:i});default:return G(t.length,e,i)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var i=e.getUTCFullYear();if(n.isTwoDigitYear){var a=K(n.year,i);return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}var o="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(e,t,n,r){var i=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return G(4,e,i);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:i});default:return G(t.length,e,i)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var i=Object(d.a)(e,r);if(n.isTwoDigitYear){var a=K(n.year,i);return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Object(v.a)(e,r)}var o="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Object(v.a)(e,r)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(e,t,n,r){return q("R"===t?4:t.length,e)},set:function(e,t,n,r){var i=new Date(0);return i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),Object(g.a)(i)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(e,t,n,r){return q("u"===t?4:t.length,e)},set:function(e,t,n,r){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(e,t,n,r){switch(t){case"Q":case"QQ":return G(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,r){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(e,t,n,r){switch(t){case"q":case"qq":return G(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,r){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(e,t,n,r){var i=function(e){return e-1};switch(t){case"M":return z(b,e,i);case"MM":return G(2,e,i);case"Mo":return n.ordinalNumber(e,{unit:"month",valueCallback:i});case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(e,t,n,r){var i=function(e){return e-1};switch(t){case"L":return z(b,e,i);case"LL":return G(2,e,i);case"Lo":return n.ordinalNumber(e,{unit:"month",valueCallback:i});case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(e,t,n,r){switch(t){case"w":return z(_,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return G(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return Object(v.a)(function(e,t,n){Object(h.a)(2,arguments);var r=Object(a.default)(e),i=Object(u.a)(t),o=Object(m.a)(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,n,r),r)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(e,t,n,r){switch(t){case"I":return z(_,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return G(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return Object(g.a)(function(e,t){Object(h.a)(2,arguments);var n=Object(a.default)(e),r=Object(u.a)(t),i=Object(p.a)(n)-r;return n.setUTCDate(n.getUTCDate()-7*i),n}(e,n,r),r)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(e,t,n,r){switch(t){case"d":return z(y,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return G(t.length,e)}},validate:function(e,t,n){var r=$(e.getUTCFullYear()),i=e.getUTCMonth();return r?t>=1&&t<=Q[i]:t>=1&&t<=X[i]},set:function(e,t,n,r){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(e,t,n,r){switch(t){case"D":case"DD":return z(A,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return G(t.length,e)}},validate:function(e,t,n){return $(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,n,r){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(e,t,n,r){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=f(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(e,t,n,r){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return G(t.length,e,i);case"eo":return n.ordinalNumber(e,{unit:"day",valueCallback:i});case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=f(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(e,t,n,r){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return G(t.length,e,i);case"co":return n.ordinalNumber(e,{unit:"day",valueCallback:i});case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=f(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(e,t,n,r){var i=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return G(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return n.day(e,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i});case"iiiii":return n.day(e,{width:"narrow",context:"formatting",valueCallback:i});case"iiiiii":return n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i});case"iiii":default:return n.day(e,{width:"wide",context:"formatting",valueCallback:i})||n.day(e,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i})}},validate:function(e,t,n){return t>=1&&t<=7},set:function(e,t,n,r){return(e=function(e,t){Object(h.a)(2,arguments);var n=Object(u.a)(t);n%7==0&&(n-=7);var r=1,i=Object(a.default)(e),o=i.getUTCDay(),s=n%7,l=(s+7)%7,c=(l<r?7:0)+n-o;return i.setUTCDate(i.getUTCDate()+c),i}(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(e,t,n,r){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(Y(n),0,0,0),e},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(e,t,n,r){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(Y(n),0,0,0),e},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(e,t,n,r){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(Y(n),0,0,0),e},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(e,t,n,r){switch(t){case"h":return z(C,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return G(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=12},set:function(e,t,n,r){var i=e.getUTCHours()>=12;return i&&n<12?e.setUTCHours(n+12,0,0,0):i||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(e,t,n,r){switch(t){case"H":return z(w,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return G(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=23},set:function(e,t,n,r){return e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(e,t,n,r){switch(t){case"K":return z(S,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return G(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(e,t,n,r){switch(t){case"k":return z(E,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return G(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=24},set:function(e,t,n,r){var i=n<=24?n%24:n;return e.setUTCHours(i,0,0,0),e},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(e,t,n,r){switch(t){case"m":return z(T,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return G(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,r){return e.setUTCMinutes(n,0,0),e},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(e,t,n,r){switch(t){case"s":return z(k,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return G(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,r){return e.setUTCSeconds(n,0),e},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(e,t,n,r){return G(t.length,e,(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))},set:function(e,t,n,r){return e.setUTCMilliseconds(n),e},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(e,t,n,r){switch(t){case"X":return V(B,e);case"XX":return V(j,e);case"XXXX":return V(F,e);case"XXXXX":return V(H,e);case"XXX":default:return V(U,e)}},set:function(e,t,n,r){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(e,t,n,r){switch(t){case"x":return V(B,e);case"xx":return V(j,e);case"xxxx":return V(F,e);case"xxxxx":return V(H,e);case"xxx":default:return V(U,e)}},set:function(e,t,n,r){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(e,t,n,r){return W(e)},set:function(e,t,n,r){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(e,t,n,r){return W(e)},set:function(e,t,n,r){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},Z=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,te=/^'([^]*?)'?$/,ne=/''/g,re=/\S/,ie=/[a-zA-Z]/;function ae(e,t,n,d){Object(h.a)(3,arguments);var f=String(e),p=String(t),m=d||{},g=m.locale||r.a;if(!g.match)throw new RangeError("locale must contain match property");var v=g.options&&g.options.firstWeekContainsDate,b=null==v?1:Object(u.a)(v),y=null==m.firstWeekContainsDate?b:Object(u.a)(m.firstWeekContainsDate);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=g.options&&g.options.weekStartsOn,_=null==A?0:Object(u.a)(A),w=null==m.weekStartsOn?_:Object(u.a)(m.weekStartsOn);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===p)return""===f?Object(a.default)(n):new Date(NaN);var E,S={firstWeekContainsDate:y,weekStartsOn:w,locale:g},C=[{priority:10,subPriority:-1,set:oe,index:0}],T=p.match(ee).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,s.a[t])(e,g.formatLong,S):e})).join("").match(Z),k=[];for(E=0;E<T.length;E++){var x=T[E];!m.useAdditionalWeekYearTokens&&Object(c.b)(x)&&Object(c.c)(x,p,e),!m.useAdditionalDayOfYearTokens&&Object(c.a)(x)&&Object(c.c)(x,p,e);var O=x[0],I=J[O];if(I){var M=I.incompatibleTokens;if(Array.isArray(M)){for(var P=void 0,D=0;D<k.length;D++){var N=k[D].token;if(-1!==M.indexOf(N)||N===O){P=k[D];break}}if(P)throw new RangeError("The format string mustn't contain `".concat(P.fullToken,"` and `").concat(x,"` at the same time"))}else if("*"===I.incompatibleTokens&&k.length)throw new RangeError("The format string mustn't contain `".concat(x,"` and any other token at the same time"));k.push({token:O,fullToken:x});var L=I.parse(f,x,g.match,S);if(!L)return new Date(NaN);C.push({priority:I.priority,subPriority:I.subPriority||0,set:I.set,validate:I.validate,value:L.value,index:C.length}),f=L.rest}else{if(O.match(ie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");if("''"===x?x="'":"'"===O&&(x=se(x)),0!==f.indexOf(x))return new Date(NaN);f=f.slice(x.length)}}if(f.length>0&&re.test(f))return new Date(NaN);var R=C.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return C.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),B=Object(a.default)(n);if(isNaN(B))return new Date(NaN);var j=Object(i.a)(B,Object(l.a)(B)),F={};for(E=0;E<R.length;E++){var U=R[E];if(U.validate&&!U.validate(j,U.value,S))return new Date(NaN);var H=U.set(j,F,U.value,S);H[0]?(j=H[0],o(F,H[1])):j=H}return j}function oe(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}function se(e){return e.match(te)[1].replace(ne,"'")}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return D}));var r=n(546),i=n(426),a=n(412),o=n(38);function s(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var l={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return s("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):s(n+1,2)},d:function(e,t){return s(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return s(e.getUTCHours()%12||12,t.length)},H:function(e,t){return s(e.getUTCHours(),t.length)},m:function(e,t){return s(e.getUTCMinutes(),t.length)},s:function(e,t){return s(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return s(Math.floor(r*Math.pow(10,n-3)),t.length)}},c=n(30);var u=n(436),d=n(414),h=n(435),f=n(286),p="midnight",m="noon",g="morning",v="afternoon",b="evening",y="night";function A(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=t||"";return n+String(i)+o+s(a,2)}function _(e,t){return e%60==0?(e>0?"-":"+")+s(Math.abs(e)/60,2):w(e,t)}function w(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+s(Math.floor(i/60),2)+n+s(i%60,2)}var E={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return l.y(e,t)},Y:function(e,t,n,r){var i=Object(f.a)(e,r),a=i>0?i:1-i;return"YY"===t?s(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):s(a,t.length)},R:function(e,t){return s(Object(d.a)(e),t.length)},u:function(e,t){return s(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return l.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=Object(h.a)(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):s(i,t.length)},I:function(e,t,n){var r=Object(u.a)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):s(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):l.d(e,t)},D:function(e,t,n){var r=function(e){Object(c.a)(1,arguments);var t=Object(o.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return s(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return s(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return s(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?m:0===i?p:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?b:i>=12?v:i>=4?g:y,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return l.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):l.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):l.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):l.s(e,t)},S:function(e,t){return l.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return _(i);case"XXXX":case"XX":return w(i);case"XXXXX":case"XXX":default:return w(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return _(i);case"xxxx":case"xx":return w(i);case"xxxxx":case"xxx":default:return w(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+A(i,":");case"OOOO":default:return"GMT"+w(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+A(i,":");case"zzzz":default:return"GMT"+w(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return s(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return s((r._originalDate||e).getTime(),t.length)}},S=n(413),C=n(190),T=n(195),k=n(50),x=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,O=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,I=/^'([^]*?)'?$/,M=/''/g,P=/[a-zA-Z]/;function D(e,t,n){Object(c.a)(2,arguments);var s=String(t),l=n||{},u=l.locale||i.a,d=u.options&&u.options.firstWeekContainsDate,h=null==d?1:Object(k.a)(d),f=null==l.firstWeekContainsDate?h:Object(k.a)(l.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=u.options&&u.options.weekStartsOn,m=null==p?0:Object(k.a)(p),g=null==l.weekStartsOn?m:Object(k.a)(l.weekStartsOn);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!u.localize)throw new RangeError("locale must contain localize property");if(!u.formatLong)throw new RangeError("locale must contain formatLong property");var v=Object(o.default)(e);if(!Object(r.default)(v))throw new RangeError("Invalid time value");var b=Object(C.a)(v),y=Object(a.a)(v,b),A={firstWeekContainsDate:f,weekStartsOn:g,locale:u,_originalDate:v},_=s.match(O).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,S.a[t])(e,u.formatLong,A):e})).join("").match(x).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return N(n);var i=E[r];if(i)return!l.useAdditionalWeekYearTokens&&Object(T.b)(n)&&Object(T.c)(n,t,e),!l.useAdditionalDayOfYearTokens&&Object(T.a)(n)&&Object(T.c)(n,t,e),i(y,n,u.localize,A);if(r.match(P))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return _}function N(e){return e.match(I)[1].replace(M,"'")}},function(e,t,n){"use strict";n.r(t),n.d(t,"Popper",(function(){return O})),n.d(t,"placements",(function(){return x})),n.d(t,"Manager",(function(){return _})),n.d(t,"Reference",(function(){return D}));var r=n(542),i=n.n(r),a=n(31),o=n.n(a),s=n(188),l=n.n(s),c=n(3),u=n.n(c),d=n(2),h=n.n(d),f=n(1019),p=n.n(f),m=n(0),g=n(564),v=n(565),b=n.n(v),y=b()(),A=b()(),_=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(u()(u()(t)),"referenceNode",void 0),h()(u()(u()(t)),"setReferenceNode",(function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())})),t}l()(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.referenceNode=null},n.render=function(){return m.createElement(y.Provider,{value:this.referenceNode},m.createElement(A.Provider,{value:this.setReferenceNode},this.props.children))},t}(m.Component),w=function(e){return Array.isArray(e)?e[0]:e},E=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},S=function(e,t){if("function"==typeof e)return E(e,t);null!=e&&(e.current=t)},C={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},T={},k=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(u()(u()(t)),"state",{data:void 0,placement:void 0}),h()(u()(u()(t)),"popperInstance",void 0),h()(u()(u()(t)),"popperNode",null),h()(u()(u()(t)),"arrowNode",null),h()(u()(u()(t)),"setPopperNode",(function(e){e&&t.popperNode!==e&&(S(t.props.innerRef,e),t.popperNode=e,t.updatePopperInstance())})),h()(u()(u()(t)),"setArrowNode",(function(e){t.arrowNode=e})),h()(u()(u()(t)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var n=e.placement;return t.setState({data:e,placement:n}),e}}),h()(u()(u()(t)),"getOptions",(function(){return{placement:t.props.placement,eventsEnabled:t.props.eventsEnabled,positionFixed:t.props.positionFixed,modifiers:o()({},t.props.modifiers,{arrow:o()({},t.props.modifiers&&t.props.modifiers.arrow,{enabled:!!t.arrowNode,element:t.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:t.updateStateModifier})}})),h()(u()(u()(t)),"getPopperStyle",(function(){return t.popperNode&&t.state.data?o()({position:t.state.data.offsets.popper.position},t.state.data.styles):C})),h()(u()(u()(t)),"getPopperPlacement",(function(){return t.state.data?t.state.placement:void 0})),h()(u()(u()(t)),"getArrowStyle",(function(){return t.arrowNode&&t.state.data?t.state.data.arrowStyles:T})),h()(u()(u()(t)),"getOutOfBoundariesState",(function(){return t.state.data?t.state.data.hide:void 0})),h()(u()(u()(t)),"destroyPopperInstance",(function(){t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)})),h()(u()(u()(t)),"updatePopperInstance",(function(){t.destroyPopperInstance();var e=u()(u()(t)).popperNode,n=t.props.referenceElement;n&&e&&(t.popperInstance=new g.a(n,e,t.getOptions()))})),h()(u()(u()(t)),"scheduleUpdate",(function(){t.popperInstance&&t.popperInstance.scheduleUpdate()})),t}l()(t,e);var n=t.prototype;return n.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&p()(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},n.componentWillUnmount=function(){S(this.props.innerRef,null),this.destroyPopperInstance()},n.render=function(){return w(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},t}(m.Component);h()(k,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});var x=g.a.placements;function O(e){var t=e.referenceElement,n=i()(e,["referenceElement"]);return m.createElement(y.Consumer,null,(function(e){return m.createElement(k,o()({referenceElement:void 0!==t?t:e},n))}))}var I=n(142),M=n.n(I),P=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(u()(u()(t)),"refHandler",(function(e){S(t.props.innerRef,e),E(t.props.setReferenceNode,e)})),t}l()(t,e);var n=t.prototype;return n.componentWillUnmount=function(){S(this.props.innerRef,null)},n.render=function(){return M()(Boolean(this.props.setReferenceNode),"`Reference` should not be used outside of a `Manager` component."),w(this.props.children)({ref:this.refHandler})},t}(m.Component);function D(e){return m.createElement(A.Consumer,null,(function(t){return m.createElement(P,o()({setReferenceNode:t},e))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return c}));var r=n(38),i=n(287),a=n(30);function o(e){return Object(a.a)(1,arguments),Object(i.default)(e,{weekStartsOn:1})}function s(e){Object(a.a)(1,arguments);var t=Object(r.default)(e),n=t.getFullYear(),i=new Date(0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);var s=o(i),l=new Date(0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);var c=o(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function l(e){Object(a.a)(1,arguments);var t=s(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=o(n);return r}function c(e){Object(a.a)(1,arguments);var t=Object(r.default)(e),n=o(t).getTime()-l(t).getTime();return Math.round(n/6048e5)+1}},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(42),o=n.n(a),s=n(0),l=n.n(s),c=n(47),u=["bsPrefix","variant","animation","size","children","as","className"],d=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.variant,s=e.animation,d=e.size,h=e.children,f=e.as,p=void 0===f?"div":f,m=e.className,g=Object(i.a)(e,u),v=(n=Object(c.a)(n,"spinner"))+"-"+s;return l.a.createElement(p,Object(r.a)({ref:t},g,{className:o()(m,v,d&&v+"-"+d,a&&"text-"+a)}),h)}));d.displayName="Spinner",t.a=d},,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(42),o=n.n(a),s=n(0),l=n.n(s),c=(n(347),n(47)),u=["bsPrefix","placement","className","style","children","arrowProps","popper","show"],d=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.placement,s=e.className,d=e.style,h=e.children,f=e.arrowProps,p=(e.popper,e.show,Object(i.a)(e,u));n=Object(c.a)(n,"tooltip");var m=((null==a?void 0:a.split("-"))||[])[0];return(l.a.createElement("div",Object(r.a)({ref:t,style:d,role:"tooltip","x-placement":m,className:o()(s,n,"bs-tooltip-"+m)},p),l.a.createElement("div",Object(r.a)({className:"arrow"},f)),l.a.createElement("div",{className:n+"-inner"},h)))}));d.defaultProps={placement:"right"},d.displayName="Tooltip",t.a=d},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(42),o=n.n(a),s=n(0),l=n.n(s),c=n(149),u=n(150),d=n(47),h=n(175),f=n(407),p=n(247),m=n(97),g=n(219),v=["bsPrefix","show","closeLabel","className","children","variant","onClose","dismissible","transition"],b=Object(p.a)("h4");b.displayName="DivStyledAsH4";var y=Object(m.a)("alert-heading",{Component:b}),A=Object(m.a)("alert-link",{Component:g.a}),_={show:!0,transition:h.a,closeLabel:"Close alert"},w=l.a.forwardRef((function(e,t){var n=Object(c.a)(e,{show:"onClose"}),a=n.bsPrefix,s=n.show,p=n.closeLabel,m=n.className,g=n.children,b=n.variant,y=n.onClose,A=n.dismissible,_=n.transition,w=Object(i.a)(n,v),E=Object(d.a)(a,"alert"),S=Object(u.a)((function(e){y&&y(!1,e)})),C=!0===_?h.a:_,T=l.a.createElement("div",Object(r.a)({role:"alert"},C?void 0:w,{ref:t,className:o()(m,E,b&&E+"-"+b,A&&E+"-dismissible")}),A&&l.a.createElement(f.a,{onClick:S,label:p}),g);return C?l.a.createElement(C,Object(r.a)({unmountOnExit:!0},w,{ref:void 0,in:s}),T):s?T:null}));w.displayName="Alert",w.defaultProps=_,w.Link=A,w.Heading=y,t.a=w},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(42),o=n.n(a),s=n(0),l=n.n(s),c=n(47),u=["bsPrefix","className","striped","bordered","borderless","hover","size","variant","responsive"],d=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,s=e.striped,d=e.bordered,h=e.borderless,f=e.hover,p=e.size,m=e.variant,g=e.responsive,v=Object(i.a)(e,u),b=Object(c.a)(n,"table"),y=o()(a,b,m&&b+"-"+m,p&&b+"-"+p,s&&b+"-striped",d&&b+"-bordered",h&&b+"-borderless",f&&b+"-hover"),A=l.a.createElement("table",Object(r.a)({},v,{className:y,ref:t}));if(g){var _=b+"-responsive";return"string"==typeof g&&(_=_+"-"+g),l.a.createElement("div",{className:_},A)}return A}));t.a=d},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var r=n(0),i=n(335);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=0,c=Object(r.memo)((function(e){var t=e.children,n=a(function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=t;a[u]||(a[u]=Object(i.b)(e,t,n,r));return a[u]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(s(e,["children"])),2),o=n[0],c=n[1];return r.useEffect((function(){return c&&l++,function(){c&&(0===--l&&(d()[u]=null))}}),[]),r.createElement(i.a.Provider,{value:o},t)}));c.displayName="DndProvider";var u=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function d(){return void 0!==e?e:window}}).call(this,n(68))},function(e,t,n){"use strict";var r,i=n(41),a=n(33),o=n(42),s=n.n(o),l=n(406),c=n(284),u=n(405),d=n(328);function h(e){if((!r&&0!==r||e)&&c.a){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),r=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return r}var f=n(0),p=n.n(f);var m=n(150),g=n(431),v=n(429),b=n(94),y=n(166),A=n(173);function _(e){void 0===e&&(e=Object(A.a)());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}var w=n(327),E=n(278),S=n(223),C=n(6),T=n.n(C),k=n(79),x=n.n(k),O=n(390);function I(e){var t,n,r=(t=e,(n=Object(f.useRef)(t)).current=t,n);Object(f.useEffect)((function(){return function(){return r.current()}}),[])}var M=n(389),P=n(151);function D(e,t){e.classList?e.classList.add(t):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function N(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function L(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=N(e.className,t):e.setAttribute("class",N(e.className&&e.className.baseVal||"",t))}function R(e,t){return function(e){var t=Object(A.a)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var B=/([A-Z])/g;var j=/^ms-/;function F(e){return function(e){return e.replace(B,"-$1").toLowerCase()}(e).replace(j,"-ms-")}var U=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;var H,z=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(F(t))||R(e).getPropertyValue(F(t));Object.keys(t).forEach((function(i){var a=t[i];a||0===a?!function(e){return!(!e||!U.test(e))}(i)?n+=F(i)+": "+a+";":r+=i+"("+a+") ":e.style.removeProperty(F(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};function V(e){return"window"in e&&e.window===e?e:"nodeType"in(t=e)&&t.nodeType===document.DOCUMENT_NODE&&e.defaultView||!1;var t}function W(e){var t;return V(e)||(t=e)&&"body"===t.tagName.toLowerCase()?function(e){var t=V(e)?Object(A.a)():Object(A.a)(e),n=V(e)||t.defaultView;return t.body.clientWidth<n.innerWidth}(e):e.scrollHeight>e.clientHeight}var G=["template","script","style"],q=function(e,t,n){[].forEach.call(e.children,(function(e){var r,i,a;-1===t.indexOf(e)&&(i=(r=e).nodeType,a=r.tagName,1===i&&-1===G.indexOf(a.toLowerCase()))&&n(e)}))};function Y(e,t){t&&(e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden"))}var K,X=function(){function e(e){var t=void 0===e?{}:e,n=t.hideSiblingNodes,r=void 0===n||n,i=t.handleContainerOverflow,a=void 0===i||i;this.hideSiblingNodes=void 0,this.handleContainerOverflow=void 0,this.modals=void 0,this.containers=void 0,this.data=void 0,this.scrollbarSize=void 0,this.hideSiblingNodes=r,this.handleContainerOverflow=a,this.modals=[],this.containers=[],this.data=[],this.scrollbarSize=function(e){if((!H&&0!==H||e)&&E.a){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),H=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return H}()}var t=e.prototype;return t.isContainerOverflowing=function(e){var t=this.data[this.containerIndexFromModal(e)];return t&&t.overflowing},t.containerIndexFromModal=function(e){return t=this.data,n=function(t){return-1!==t.modals.indexOf(e)},r=-1,t.some((function(e,t){return!!n(e,t)&&(r=t,!0)})),r;var t,n,r},t.setContainerStyle=function(e,t){var n={overflow:"hidden"};e.style={overflow:t.style.overflow,paddingRight:t.style.paddingRight},e.overflowing&&(n.paddingRight=parseInt(z(t,"paddingRight")||"0",10)+this.scrollbarSize+"px"),z(t,n)},t.removeContainerStyle=function(e,t){Object.assign(t.style,e.style)},t.add=function(e,t,n){var r=this.modals.indexOf(e),i=this.containers.indexOf(t);if(-1!==r)return r;if(r=this.modals.length,this.modals.push(e),this.hideSiblingNodes&&function(e,t){var n=t.dialog,r=t.backdrop;q(e,[n,r],(function(e){return Y(!0,e)}))}(t,e),-1!==i)return this.data[i].modals.push(e),r;var a={modals:[e],classes:n?n.split(/\s+/):[],overflowing:W(t)};return this.handleContainerOverflow&&this.setContainerStyle(a,t),a.classes.forEach(D.bind(null,t)),this.containers.push(t),this.data.push(a),r},t.remove=function(e){var t=this.modals.indexOf(e);if(-1!==t){var n=this.containerIndexFromModal(e),r=this.data[n],i=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.classes.forEach(L.bind(null,i)),this.handleContainerOverflow&&this.removeContainerStyle(r,i),this.hideSiblingNodes&&function(e,t){var n=t.dialog,r=t.backdrop;q(e,[n,r],(function(e){return Y(!1,e)}))}(i,e),this.containers.splice(n,1),this.data.splice(n,1);else if(this.hideSiblingNodes){var a=r.modals[r.modals.length-1],o=a.backdrop;Y(!1,a.dialog),Y(!1,o)}}},t.isTopModal=function(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e},e}(),Q=n(329);function $(e){var t=e||(K||(K=new X),K),n=Object(f.useRef)({dialog:null,backdrop:null});return Object.assign(n.current,{add:function(e,r){return t.add(n.current,e,r)},remove:function(){return t.remove(n.current)},isTopModal:function(){return t.isTopModal(n.current)},setDialogRef:Object(f.useCallback)((function(e){n.current.dialog=e}),[]),setBackdropRef:Object(f.useCallback)((function(e){n.current.backdrop=e}),[])})}var J=Object(f.forwardRef)((function(e,t){var n=e.show,r=void 0!==n&&n,i=e.role,a=void 0===i?"dialog":i,o=e.className,s=e.style,l=e.children,c=e.backdrop,u=void 0===c||c,d=e.keyboard,h=void 0===d||d,m=e.onBackdropClick,g=e.onEscapeKeyDown,v=e.transition,A=e.backdropTransition,C=e.autoFocus,T=void 0===C||C,k=e.enforceFocus,D=void 0===k||k,N=e.restoreFocus,L=void 0===N||N,R=e.restoreFocusOptions,B=e.renderDialog,j=e.renderBackdrop,F=void 0===j?function(e){return p.a.createElement("div",e)}:j,U=e.manager,H=e.container,z=e.containerClassName,V=e.onShow,W=e.onHide,G=void 0===W?function(){}:W,q=e.onExit,Y=e.onExited,K=e.onExiting,X=e.onEnter,J=e.onEntering,Z=e.onEntered,ee=Object(y.a)(e,["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","backdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","containerClassName","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"]),te=Object(Q.a)(H),ne=$(U),re=Object(O.a)(),ie=Object(M.a)(r),ae=Object(f.useState)(!r),oe=ae[0],se=ae[1],le=Object(f.useRef)(null);Object(f.useImperativeHandle)(t,(function(){return ne}),[ne]),E.a&&!ie&&r&&(le.current=_()),v||r||oe?r&&oe&&se(!1):se(!0);var ce=Object(P.a)((function(){if(ne.add(te,z),me.current=Object(S.a)(document,"keydown",fe),pe.current=Object(S.a)(document,"focus",(function(){return setTimeout(de)}),!0),V&&V(),T){var e=_(document);ne.dialog&&e&&!Object(w.a)(ne.dialog,e)&&(le.current=e,ne.dialog.focus())}})),ue=Object(P.a)((function(){var e;(ne.remove(),null==me.current||me.current(),null==pe.current||pe.current(),L)&&(null==(e=le.current)||null==e.focus||e.focus(R),le.current=null)}));Object(f.useEffect)((function(){r&&te&&ce()}),[r,te,ce]),Object(f.useEffect)((function(){oe&&ue()}),[oe,ue]),I((function(){ue()}));var de=Object(P.a)((function(){if(D&&re()&&ne.isTopModal()){var e=_();ne.dialog&&e&&!Object(w.a)(ne.dialog,e)&&ne.dialog.focus()}})),he=Object(P.a)((function(e){e.target===e.currentTarget&&(null==m||m(e),!0===u&&G())})),fe=Object(P.a)((function(e){h&&27===e.keyCode&&ne.isTopModal()&&(null==g||g(e),e.defaultPrevented||G())})),pe=Object(f.useRef)(),me=Object(f.useRef)(),ge=v;if(!te||!(r||ge&&!oe))return null;var ve=Object(b.a)({role:a,ref:ne.setDialogRef,"aria-modal":"dialog"===a||void 0},ee,{style:s,className:o,tabIndex:-1}),be=B?B(ve):p.a.createElement("div",ve,p.a.cloneElement(l,{role:"document"}));ge&&(be=p.a.createElement(ge,{appear:!0,unmountOnExit:!0,in:!!r,onExit:q,onExiting:K,onExited:function(){se(!0);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==Y||Y.apply(void 0,t)},onEnter:X,onEntering:J,onEntered:Z},be));var ye=null;if(u){var Ae=A;ye=F({ref:ne.setBackdropRef,onClick:he}),Ae&&(ye=p.a.createElement(Ae,{appear:!0,in:!!r},ye))}return(p.a.createElement(p.a.Fragment,null,x.a.createPortal(p.a.createElement(p.a.Fragment,null,ye,be),te)))})),Z={show:T.a.bool,container:T.a.any,onShow:T.a.func,onHide:T.a.func,backdrop:T.a.oneOfType([T.a.bool,T.a.oneOf(["static"])]),renderDialog:T.a.func,renderBackdrop:T.a.func,onEscapeKeyDown:T.a.func,onBackdropClick:T.a.func,containerClassName:T.a.string,keyboard:T.a.bool,transition:T.a.elementType,backdropTransition:T.a.elementType,autoFocus:T.a.bool,enforceFocus:T.a.bool,restoreFocus:T.a.bool,restoreFocusOptions:T.a.shape({preventScroll:T.a.bool}),onEnter:T.a.func,onEntering:T.a.func,onEntered:T.a.func,onExit:T.a.func,onExiting:T.a.func,onExited:T.a.func,manager:T.a.instanceOf(X)};J.displayName="Modal",J.propTypes=Z;var ee=Object.assign(J,{Manager:X}),te=(n(142),n(289)),ne=n(177),re=n(206),ie=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ae=".sticky-top",oe=".navbar-toggler",se=function(e){function t(){return e.apply(this,arguments)||this}Object(te.a)(t,e);var n=t.prototype;return n.adjustAndStore=function(e,t,n){var r,i=t.style[e];t.dataset[e]=i,Object(ne.a)(t,((r={})[e]=parseFloat(Object(ne.a)(t,e))+n+"px",r))},n.restore=function(e,t){var n,r=t.dataset[e];void 0!==r&&(delete t.dataset[e],Object(ne.a)(t,((n={})[e]=r,n)))},n.setContainerStyle=function(t,n){var r=this;if(e.prototype.setContainerStyle.call(this,t,n),t.overflowing){var i=h();Object(re.a)(n,ie).forEach((function(e){return r.adjustAndStore("paddingRight",e,i)})),Object(re.a)(n,ae).forEach((function(e){return r.adjustAndStore("marginRight",e,-i)})),Object(re.a)(n,oe).forEach((function(e){return r.adjustAndStore("marginRight",e,i)}))}},n.removeContainerStyle=function(t,n){var r=this;e.prototype.removeContainerStyle.call(this,t,n),Object(re.a)(n,ie).forEach((function(e){return r.restore("paddingRight",e)})),Object(re.a)(n,ae).forEach((function(e){return r.restore("marginRight",e)})),Object(re.a)(n,oe).forEach((function(e){return r.restore("marginRight",e)}))},t}(X),le=n(175),ce=n(97),ue=Object(ce.a)("modal-body"),de=p.a.createContext({onHide:function(){}}),he=n(47),fe=["bsPrefix","className","contentClassName","centered","size","children","scrollable"],pe=p.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,o=e.contentClassName,l=e.centered,c=e.size,u=e.children,d=e.scrollable,h=Object(i.a)(e,fe),f=(n=Object(he.a)(n,"modal"))+"-dialog";return p.a.createElement("div",Object(a.a)({},h,{ref:t,className:s()(f,r,c&&n+"-"+c,l&&f+"-centered",d&&f+"-scrollable")}),p.a.createElement("div",{className:s()(n+"-content",o)},u))}));pe.displayName="ModalDialog";var me=pe,ge=Object(ce.a)("modal-footer"),ve=n(407),be=["bsPrefix","closeLabel","closeButton","onHide","className","children"],ye=p.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.closeLabel,o=e.closeButton,l=e.onHide,c=e.className,u=e.children,d=Object(i.a)(e,be);n=Object(he.a)(n,"modal-header");var h=Object(f.useContext)(de),g=Object(m.a)((function(){h&&h.onHide(),l&&l()}));return p.a.createElement("div",Object(a.a)({ref:t},d,{className:s()(c,n)}),u,o&&p.a.createElement(ve.a,{label:r,onClick:g}))}));ye.displayName="ModalHeader",ye.defaultProps={closeLabel:"Close",closeButton:!1};var Ae,_e=ye,we=n(247),Ee=Object(we.a)("h4"),Se=Object(ce.a)("modal-title",{Component:Ee}),Ce=["bsPrefix","className","style","dialogClassName","contentClassName","children","dialogAs","aria-labelledby","show","animation","backdrop","keyboard","onEscapeKeyDown","onShow","onHide","container","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","onEntered","onExit","onExiting","onEnter","onEntering","onExited","backdropClassName","manager"],Te={show:!1,backdrop:!0,keyboard:!0,autoFocus:!0,enforceFocus:!0,restoreFocus:!0,animation:!0,dialogAs:me};function ke(e){return p.a.createElement(le.a,Object(a.a)({},e,{timeout:null}))}function xe(e){return p.a.createElement(le.a,Object(a.a)({},e,{timeout:null}))}var Oe=p.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.className,o=e.style,b=e.dialogClassName,y=e.contentClassName,A=e.children,_=e.dialogAs,w=e["aria-labelledby"],E=e.show,S=e.animation,C=e.backdrop,T=e.keyboard,k=e.onEscapeKeyDown,x=e.onShow,O=e.onHide,I=e.container,M=e.autoFocus,P=e.enforceFocus,D=e.restoreFocus,N=e.restoreFocusOptions,L=e.onEntered,R=e.onExit,B=e.onExiting,j=e.onEnter,F=e.onEntering,U=e.onExited,H=e.backdropClassName,z=e.manager,V=Object(i.a)(e,Ce),W=Object(f.useState)({}),G=W[0],q=W[1],Y=Object(f.useState)(!1),K=Y[0],X=Y[1],Q=Object(f.useRef)(!1),$=Object(f.useRef)(!1),J=Object(f.useRef)(null),Z=Object(f.useState)(null),te=Z[0],ne=Z[1],re=Object(m.a)(O);n=Object(he.a)(n,"modal"),Object(f.useImperativeHandle)(t,(function(){return{get _modal(){return te}}}),[te]);var ie=Object(f.useMemo)((function(){return{onHide:re}}),[re]);function ae(){return z||(Ae||(Ae=new se),Ae)}function oe(e){if(c.a){var t=ae().isContainerOverflowing(te),n=e.scrollHeight>Object(u.a)(e).documentElement.clientHeight;q({paddingRight:t&&!n?h():void 0,paddingLeft:!t&&n?h():void 0})}}var le=Object(m.a)((function(){te&&oe(te.dialog)}));Object(g.a)((function(){Object(d.a)(window,"resize",le),J.current&&J.current()}));var ce=function(){Q.current=!0},ue=function(e){Q.current&&te&&e.target===te.dialog&&($.current=!0),Q.current=!1},fe=function(){X(!0),J.current=Object(v.a)(te.dialog,(function(){X(!1)}))},pe=function(e){"static"!==C?$.current||e.target!==e.currentTarget?$.current=!1:null==O||O():function(e){e.target===e.currentTarget&&fe()}(e)},me=Object(f.useCallback)((function(e){return p.a.createElement("div",Object(a.a)({},e,{className:s()(n+"-backdrop",H,!S&&"show")}))}),[S,H,n]),ge=Object(a.a)({},o,G);S||(ge.display="block");return p.a.createElement(de.Provider,{value:ie},p.a.createElement(ee,{show:E,ref:ne,backdrop:C,container:I,keyboard:!0,autoFocus:M,enforceFocus:P,restoreFocus:D,restoreFocusOptions:N,onEscapeKeyDown:function(e){T||"static"!==C?T&&k&&k(e):(e.preventDefault(),fe())},onShow:x,onHide:O,onEnter:function(e,t){e&&(e.style.display="block",oe(e)),null==j||j(e,t)},onEntering:function(e,t){null==F||F(e,t),Object(l.a)(window,"resize",le)},onEntered:L,onExit:function(e){null==J.current||J.current(),null==R||R(e)},onExiting:B,onExited:function(e){e&&(e.style.display=""),null==U||U(e),Object(d.a)(window,"resize",le)},manager:ae(),containerClassName:n+"-open",transition:S?ke:void 0,backdropTransition:S?xe:void 0,renderBackdrop:me,renderDialog:function(e){return p.a.createElement("div",Object(a.a)({role:"dialog"},e,{style:ge,className:s()(r,n,K&&n+"-static"),onClick:C?pe:void 0,onMouseUp:ue,"aria-labelledby":w}),p.a.createElement(_,Object(a.a)({},V,{onMouseDown:ce,className:b,contentClassName:y}),A))}}))}));Oe.displayName="Modal",Oe.defaultProps=Te,Oe.Body=ue,Oe.Header=_e,Oe.Title=Se,Oe.Footer=ge,Oe.Dialog=me,Oe.TRANSITION_DURATION=300,Oe.BACKDROP_TRANSITION_DURATION=150;t.a=Oe},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(42),o=n.n(a),s=n(0),l=n.n(s),c=(n(353),n(6)),u=n.n(c),d=["as","className","type","tooltip"],h={type:u.a.string,tooltip:u.a.bool,as:u.a.elementType},f=l.a.forwardRef((function(e,t){var n=e.as,a=void 0===n?"div":n,s=e.className,c=e.type,u=void 0===c?"valid":c,h=e.tooltip,f=void 0!==h&&h,p=Object(i.a)(e,d);return(l.a.createElement(a,Object(r.a)({},p,{ref:t,className:o()(s,u+"-"+(f?"tooltip":"feedback"))})))}));f.displayName="Feedback",f.propTypes=h;var p=f,m=n(120),g=n(47),v=["id","bsPrefix","bsCustomPrefix","className","type","isValid","isInvalid","isStatic","as"],b=l.a.forwardRef((function(e,t){var n=e.id,a=e.bsPrefix,c=e.bsCustomPrefix,u=e.className,d=e.type,h=void 0===d?"checkbox":d,f=e.isValid,p=void 0!==f&&f,b=e.isInvalid,y=void 0!==b&&b,A=e.isStatic,_=e.as,w=void 0===_?"input":_,E=Object(i.a)(e,v),S=Object(s.useContext)(m.a),C=S.controlId,T=S.custom?[c,"custom-control-input"]:[a,"form-check-input"],k=T[0],x=T[1];return a=Object(g.a)(k,x),l.a.createElement(w,Object(r.a)({},E,{ref:t,type:h,id:n||C,className:o()(u,a,p&&"is-valid",y&&"is-invalid",A&&"position-static")}))}));b.displayName="FormCheckInput";var y=b,A=["bsPrefix","bsCustomPrefix","className","htmlFor"],_=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.bsCustomPrefix,c=e.className,u=e.htmlFor,d=Object(i.a)(e,A),h=Object(s.useContext)(m.a),f=h.controlId,p=h.custom?[a,"custom-control-label"]:[n,"form-check-label"],v=p[0],b=p[1];return n=Object(g.a)(v,b),l.a.createElement("label",Object(r.a)({},d,{ref:t,htmlFor:u||f,className:o()(c,n)}))}));_.displayName="FormCheckLabel";var w=_,E=["id","bsPrefix","bsCustomPrefix","inline","disabled","isValid","isInvalid","feedbackTooltip","feedback","className","style","title","type","label","children","custom","as"],S=l.a.forwardRef((function(e,t){var n=e.id,a=e.bsPrefix,c=e.bsCustomPrefix,u=e.inline,d=void 0!==u&&u,h=e.disabled,f=void 0!==h&&h,v=e.isValid,b=void 0!==v&&v,A=e.isInvalid,_=void 0!==A&&A,S=e.feedbackTooltip,C=void 0!==S&&S,T=e.feedback,k=e.className,x=e.style,O=e.title,I=void 0===O?"":O,M=e.type,P=void 0===M?"checkbox":M,D=e.label,N=e.children,L=e.custom,R=e.as,B=void 0===R?"input":R,j=Object(i.a)(e,E),F="switch"===P||L,U=F?[c,"custom-control"]:[a,"form-check"],H=U[0],z=U[1];a=Object(g.a)(H,z);var V=Object(s.useContext)(m.a).controlId,W=Object(s.useMemo)((function(){return{controlId:n||V,custom:F}}),[V,F,n]),G=F||null!=D&&!1!==D&&!N,q=l.a.createElement(y,Object(r.a)({},j,{type:"switch"===P?"checkbox":P,ref:t,isValid:b,isInvalid:_,isStatic:!G,disabled:f,as:B}));return l.a.createElement(m.a.Provider,{value:W},l.a.createElement("div",{style:x,className:o()(k,a,F&&"custom-"+P,d&&a+"-inline")},N||l.a.createElement(l.a.Fragment,null,q,G&&l.a.createElement(w,{title:I},D),(b||_)&&l.a.createElement(p,{type:b?"valid":"invalid",tooltip:C},T))))}));S.displayName="FormCheck",S.Input=y,S.Label=w;var C=S,T=["id","bsPrefix","bsCustomPrefix","className","isValid","isInvalid","lang","as"],k=l.a.forwardRef((function(e,t){var n=e.id,a=e.bsPrefix,c=e.bsCustomPrefix,u=e.className,d=e.isValid,h=e.isInvalid,f=e.lang,p=e.as,v=void 0===p?"input":p,b=Object(i.a)(e,T),y=Object(s.useContext)(m.a),A=y.controlId,_=y.custom?[c,"custom-file-input"]:[a,"form-control-file"],w=_[0],E=_[1];return a=Object(g.a)(w,E),l.a.createElement(v,Object(r.a)({},b,{ref:t,id:n||A,type:"file",lang:f,className:o()(u,a,d&&"is-valid",h&&"is-invalid")}))}));k.displayName="FormFileInput";var x=k,O=["bsPrefix","bsCustomPrefix","className","htmlFor"],I=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.bsCustomPrefix,c=e.className,u=e.htmlFor,d=Object(i.a)(e,O),h=Object(s.useContext)(m.a),f=h.controlId,p=h.custom?[a,"custom-file-label"]:[n,"form-file-label"],v=p[0],b=p[1];return n=Object(g.a)(v,b),l.a.createElement("label",Object(r.a)({},d,{ref:t,htmlFor:u||f,className:o()(c,n),"data-browse":d["data-browse"]}))}));I.displayName="FormFileLabel";var M=I,P=["id","bsPrefix","bsCustomPrefix","disabled","isValid","isInvalid","feedbackTooltip","feedback","className","style","label","children","custom","lang","data-browse","as","inputAs"],D=l.a.forwardRef((function(e,t){var n=e.id,a=e.bsPrefix,c=e.bsCustomPrefix,u=e.disabled,d=void 0!==u&&u,h=e.isValid,f=void 0!==h&&h,v=e.isInvalid,b=void 0!==v&&v,y=e.feedbackTooltip,A=void 0!==y&&y,_=e.feedback,w=e.className,E=e.style,S=e.label,C=e.children,T=e.custom,k=e.lang,O=e["data-browse"],I=e.as,D=void 0===I?"div":I,N=e.inputAs,L=void 0===N?"input":N,R=Object(i.a)(e,P),B=T?[c,"custom"]:[a,"form-file"],j=B[0],F=B[1];a=Object(g.a)(j,F);var U=Object(s.useContext)(m.a).controlId,H=Object(s.useMemo)((function(){return{controlId:n||U,custom:T}}),[U,T,n]),z=null!=S&&!1!==S&&!C,V=l.a.createElement(x,Object(r.a)({},R,{ref:t,isValid:f,isInvalid:b,disabled:d,as:L,lang:k}));return l.a.createElement(m.a.Provider,{value:H},l.a.createElement(D,{style:E,className:o()(w,a,T&&"custom-file")},C||l.a.createElement(l.a.Fragment,null,T?l.a.createElement(l.a.Fragment,null,V,z&&l.a.createElement(M,{"data-browse":O},S)):l.a.createElement(l.a.Fragment,null,z&&l.a.createElement(M,null,S),V),(f||b)&&l.a.createElement(p,{type:f?"valid":"invalid",tooltip:A},_))))}));D.displayName="FormFile",D.Input=x,D.Label=M;var N=D,L=(n(142),["bsPrefix","bsCustomPrefix","type","size","htmlSize","id","className","isValid","isInvalid","plaintext","readOnly","custom","as"]),R=l.a.forwardRef((function(e,t){var n,a,c=e.bsPrefix,u=e.bsCustomPrefix,d=e.type,h=e.size,f=e.htmlSize,p=e.id,v=e.className,b=e.isValid,y=void 0!==b&&b,A=e.isInvalid,_=void 0!==A&&A,w=e.plaintext,E=e.readOnly,S=e.custom,C=e.as,T=void 0===C?"input":C,k=Object(i.a)(e,L),x=Object(s.useContext)(m.a).controlId,O=S?[u,"custom"]:[c,"form-control"],I=O[0],M=O[1];if(c=Object(g.a)(I,M),w)(a={})[c+"-plaintext"]=!0,n=a;else if("file"===d){var P;(P={})[c+"-file"]=!0,n=P}else if("range"===d){var D;(D={})[c+"-range"]=!0,n=D}else if("select"===T&&S){var N;(N={})[c+"-select"]=!0,N[c+"-select-"+h]=h,n=N}else{var R;(R={})[c]=!0,R[c+"-"+h]=h,n=R}return l.a.createElement(T,Object(r.a)({},k,{type:d,size:f,ref:t,readOnly:E,id:p||x,className:o()(v,n,y&&"is-valid",_&&"is-invalid")}))}));R.displayName="FormControl";var B=Object.assign(R,{Feedback:p}),j=n(1017),F=n(1007),U=["as","bsPrefix","column","srOnly","className","htmlFor"],H=l.a.forwardRef((function(e,t){var n=e.as,a=void 0===n?"label":n,c=e.bsPrefix,u=e.column,d=e.srOnly,h=e.className,f=e.htmlFor,p=Object(i.a)(e,U),v=Object(s.useContext)(m.a).controlId;c=Object(g.a)(c,"form-label");var b="col-form-label";"string"==typeof u&&(b=b+" "+b+"-"+u);var y=o()(h,c,d&&"sr-only",u&&b);return f=f||v,u?l.a.createElement(F.a,Object(r.a)({ref:t,as:"label",className:y,htmlFor:f},p)):l.a.createElement(a,Object(r.a)({ref:t,className:y,htmlFor:f},p))}));H.displayName="FormLabel",H.defaultProps={column:!1,srOnly:!1};var z=H,V=["bsPrefix","className","as","muted"],W=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.className,s=e.as,c=void 0===s?"small":s,u=e.muted,d=Object(i.a)(e,V);return n=Object(g.a)(n,"form-text"),l.a.createElement(c,Object(r.a)({},d,{ref:t,className:o()(a,n,u&&"text-muted")}))}));W.displayName="FormText";var G=W,q=l.a.forwardRef((function(e,t){return l.a.createElement(C,Object(r.a)({},e,{ref:t,type:"switch"}))}));q.displayName="Switch",q.Input=C.Input,q.Label=C.Label;var Y=q,K=n(97),X=["bsPrefix","inline","className","validated","as"],Q=Object(K.a)("form-row"),$=l.a.forwardRef((function(e,t){var n=e.bsPrefix,a=e.inline,s=e.className,c=e.validated,u=e.as,d=void 0===u?"form":u,h=Object(i.a)(e,X);return n=Object(g.a)(n,"form"),l.a.createElement(d,Object(r.a)({},h,{ref:t,className:o()(s,c&&"was-validated",a&&n+"-inline")}))}));$.displayName="Form",$.defaultProps={inline:!1},$.Row=Q,$.Group=j.a,$.Control=B,$.Check=C,$.File=N,$.Switch=Y,$.Label=z,$.Text=G;t.a=$},function(e,t,n){"use strict";var r=n(33),i=n(41),a=n(289);var o=n(0),s=n.n(o);var l=n(431),c=Math.pow(2,31)-1;function u(){var e=function(){var e=Object(o.useRef)(!0),t=Object(o.useRef)((function(){return e.current}));return Object(o.useEffect)((function(){return function(){e.current=!1}}),[]),t.current}(),t=Object(o.useRef)();return Object(l.a)((function(){return clearTimeout(t.current)})),Object(o.useMemo)((function(){var n=function(){return clearTimeout(t.current)};return{set:function(r,i){void 0===i&&(i=0),e()&&(n(),i<=c?t.current=setTimeout(r,i):function e(t,n,r){var i=r-Date.now();t.current=i<=c?setTimeout(n,i):setTimeout((function(){return e(t,n,r)}),c)}(t,r,Date.now()+i))},clear:n}}),[])}var d=n(246),h=(n(142),n(149)),f=n(42),p=n.n(f),m=n(94),g=n(166),v=n(6),b=n.n(v),y=n(79),A=n.n(y),_=n(326),w=function(e){return e&&"function"!=typeof e?function(t){e.current=t}:e};var E=function(e,t){return Object(o.useMemo)((function(){return function(e,t){var n=w(e),r=w(t);return function(e){n&&n(e),r&&r(e)}}(e,t)}),[e,t])},S=n(45),C=n(432),T=n(433),k=n(329),x=n(402),O=s.a.forwardRef((function(e,t){var n=e.flip,r=e.offset,i=e.placement,a=e.containerPadding,l=void 0===a?5:a,c=e.popperConfig,u=void 0===c?{}:c,d=e.transition,h=Object(_.a)(),f=h[0],p=h[1],v=Object(_.a)(),b=v[0],y=v[1],w=E(p,t),S=Object(k.a)(e.container),O=Object(k.a)(e.target),I=Object(o.useState)(!e.show),M=I[0],P=I[1],D=Object(C.a)(O,f,Object(x.a)({placement:i,enableEvents:!!e.show,containerPadding:l||5,flip:n,offset:r,arrowElement:b,popperConfig:u})),N=D.styles,L=D.attributes,R=Object(g.a)(D,["styles","attributes"]);e.show?M&&P(!1):e.transition||M||P(!0);var B=e.show||d&&!M;if(Object(T.a)(f,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!B)return null;var j=e.children(Object(m.a)({},R,{show:!!e.show,props:Object(m.a)({},L.popper,{style:N.popper,ref:w}),arrowProps:Object(m.a)({},L.arrow,{style:N.arrow,ref:y})}));if(d){var F=e.onExit,U=e.onExiting,H=e.onEnter,z=e.onEntering,V=e.onEntered;j=s.a.createElement(d,{in:e.show,appear:!0,onExit:F,onExiting:U,onExited:function(){P(!0),e.onExited&&e.onExited.apply(e,arguments)},onEnter:H,onEntering:z,onEntered:V},j)}return S?A.a.createPortal(j,S):null}));O.displayName="Overlay",O.propTypes={show:b.a.bool,placement:b.a.oneOf(S.h),target:b.a.any,container:b.a.any,flip:b.a.bool,children:b.a.func.isRequired,containerPadding:b.a.number,popperConfig:b.a.object,rootClose:b.a.bool,rootCloseEvent:b.a.oneOf(["click","mousedown"]),rootCloseDisabled:b.a.bool,onHide:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;return e.rootClose?(i=b.a.func).isRequired.apply(i,[e].concat(n)):b.a.func.apply(b.a,[e].concat(n))},transition:b.a.elementType,onEnter:b.a.func,onEntering:b.a.func,onEntered:b.a.func,onExit:b.a.func,onExiting:b.a.func,onExited:b.a.func};var I=O,M=n(430),P=n(175),D=["children","transition","popperConfig"],N=["props","arrowProps","show","update","forceUpdate","placement","state"],L={transition:P.a,rootClose:!1,show:!1,placement:"top"};function R(e){var t=e.children,n=e.transition,a=e.popperConfig,l=void 0===a?{}:a,c=Object(i.a)(e,D),u=Object(o.useRef)({}),h=Object(M.a)(),f=h[0],m=h[1],g=!0===n?P.a:n||null;return s.a.createElement(I,Object(r.a)({},c,{ref:f,popperConfig:Object(r.a)({},l,{modifiers:m.concat(l.modifiers||[])}),transition:g}),(function(e){var a,o=e.props,l=e.arrowProps,c=e.show,h=e.update,f=(e.forceUpdate,e.placement),m=e.state,g=Object(i.a)(e,N);!function(e,t){var n=e.ref,r=t.ref;e.ref=n.__wrapped||(n.__wrapped=function(e){return n(Object(d.a)(e))}),t.ref=r.__wrapped||(r.__wrapped=function(e){return r(Object(d.a)(e))})}(o,l);var v=Object.assign(u.current,{state:m,scheduleUpdate:h,placement:f,outOfBoundaries:(null==m?void 0:null==(a=m.modifiersData.hide)?void 0:a.isReferenceHidden)||!1});return"function"==typeof t?t(Object(r.a)({},g,o,{placement:f,show:c},!n&&c&&{className:"show"},{popper:v,arrowProps:l})):s.a.cloneElement(t,Object(r.a)({},g,o,{placement:f,arrowProps:l,popper:v,className:p()(t.props.className,!n&&c&&"show"),style:Object(r.a)({},t.props.style,o.style)}))}))}R.defaultProps=L;var B=R,j=["trigger","overlay","children","popperConfig","show","defaultShow","onToggle","delay","placement","flip"],F=function(e){function t(){return e.apply(this,arguments)||this}return Object(a.a)(t,e),t.prototype.render=function(){return this.props.children},t}(s.a.Component);function U(e,t,n){var r,i,a=t[0],o=a.currentTarget,s=a.relatedTarget||a.nativeEvent[n];s&&s===o||(i=s,(r=o).contains?r.contains(i):r.compareDocumentPosition?r===i||16&r.compareDocumentPosition(i):void 0)||e.apply(void 0,t)}function H(e){var t=e.trigger,n=e.overlay,a=e.children,l=e.popperConfig,c=void 0===l?{}:l,f=e.show,p=e.defaultShow,m=void 0!==p&&p,g=e.onToggle,v=e.delay,b=e.placement,y=e.flip,A=void 0===y?b&&-1!==b.indexOf("auto"):y,_=Object(i.a)(e,j),w=Object(o.useRef)(null),E=u(),S=Object(o.useRef)(""),C=Object(h.b)(f,m,g),T=C[0],k=C[1],x=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(v),O="function"!=typeof a?s.a.Children.only(a).props:{},I=O.onFocus,M=O.onBlur,P=O.onClick,D=Object(o.useCallback)((function(){return Object(d.a)(w.current)}),[]),N=Object(o.useCallback)((function(){E.clear(),S.current="show",x.show?E.set((function(){"show"===S.current&&k(!0)}),x.show):k(!0)}),[x.show,k,E]),L=Object(o.useCallback)((function(){E.clear(),S.current="hide",x.hide?E.set((function(){"hide"===S.current&&k(!1)}),x.hide):k(!1)}),[x.hide,k,E]),R=Object(o.useCallback)((function(){N();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==I||I.apply(void 0,t)}),[N,I]),H=Object(o.useCallback)((function(){L();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];null==M||M.apply(void 0,t)}),[L,M]),z=Object(o.useCallback)((function(){k(!T),P&&P.apply(void 0,arguments)}),[P,k,T]),V=Object(o.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];U(N,t,"fromElement")}),[N]),W=Object(o.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];U(L,t,"toElement")}),[L]),G=null==t?[]:[].concat(t),q={};return-1!==G.indexOf("click")&&(q.onClick=z),-1!==G.indexOf("focus")&&(q.onFocus=R,q.onBlur=H),-1!==G.indexOf("hover")&&(q.onMouseOver=V,q.onMouseOut=W),s.a.createElement(s.a.Fragment,null,"function"==typeof a?a(Object(r.a)({},q,{ref:w})):s.a.createElement(F,{ref:w},Object(o.cloneElement)(a,q)),s.a.createElement(B,Object(r.a)({},_,{show:T,onHide:L,flip:A,placement:b,popperConfig:c,target:D}),n))}H.defaultProps={defaultShow:!1,trigger:["hover","focus"]};t.a=H}]); 